` element reference
+ */
+
+
+ Label.prototype.getHTMLLineElement = function (text) {
+ // Create the
element
+ var div = document.createElement("div");
+ div.innerHTML = text; // Set text alignment
+
+ switch (this.textAlign) {
+ case "middle":
+ div.style.textAlign = "center";
+ break;
+
+ case "end":
+ div.style.textAlign = "right";
+ break;
+ } // Disable or enable wrapping
+
+
+ if (this.wrap) {
+ div.style.wordWrap = "break-word";
+ } else {
+ div.style.whiteSpace = "nowrap";
+ } // Don't let labels bleed out of the alotted area
+ // Moved to `draw()` because setting "hidden" kills all measuring
+
+ /*if (this.truncate) {
+ div.style.overflow = "hidden";
+ }*/
+ // Set RTL-related styles
+
+
+ if (this.rtl) {
+ div.style.direction = "rtl"; //div.style.unicodeBidi = "bidi-override";
+ } // Translate some of the SVG styles into CSS
+
+
+ if (_utils_Type__WEBPACK_IMPORTED_MODULE_7__.hasValue(this.fill)) {
+ div.style.color = this.fill.toString();
+ }
+
+ return div;
+ };
+ /**
+ * Applies specific styles to text to make it not selectable, unless it is
+ * explicitly set as `selectable`.
+ *
+ * @ignore Exclude from docs
+ * @todo Set styles via AMElement
+ */
+
+
+ Label.prototype.setStyles = function () {
+ var group = this.element;
+
+ if (!this.selectable || this.draggable || this.resizable || this.swipeable) {
+ group.addStyle({
+ "webkitUserSelect": "none",
+ "msUserSelect": "none"
+ });
+ } else if (this.selectable) {
+ group.removeStyle("webkitUserSelect");
+ group.removeStyle("msUserSelect");
+ }
+ };
+ /**
+ * Hides unused lines
+ */
+
+
+ Label.prototype.hideUnused = function (index) {
+ this.initLineCache();
+ var lines = this.getCache("lineInfo");
+
+ if (lines.length >= index) {
+ for (var i = index; i < lines.length; i++) {
+ var line = lines[i];
+
+ if (line && line.element) {
+ line.element.attr({
+ "display": "none"
+ });
+ }
+ }
+ }
+ };
+
+ Object.defineProperty(Label.prototype, "text", {
+ /**
+ * @return SVG text
+ */
+ get: function get() {
+ return this.getPropertyValue("text");
+ },
+
+ /**
+ * An SVG text.
+ *
+ * Please note that setting `html` will override this setting if browser
+ * supports `foreignObject` in SGV, such as most modern browsers excluding
+ * IEs.
+ *
+ * @param value SVG Text
+ */
+ set: function set(value) {
+ //this.setPropertyValue("html", undefined);
+ this.setPropertyValue("text", value, true);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Label.prototype, "path", {
+ /**
+ * @return Path
+ */
+ get: function get() {
+ return this.getPropertyValue("path");
+ },
+
+ /**
+ * An SVG path string to position text along. If set, the text will follow
+ * the curvature of the path.
+ *
+ * Location along the path can be set using `locationOnPath`.
+ *
+ * IMPORTANT: Only SVG text can be put on path. If you are using HTML text
+ * this setting will be ignored.
+ *
+ * @since 4.1.2
+ * @param value Path
+ */
+ set: function set(value) {
+ if (this.setPropertyValue("path", value, true)) {
+ if (this.pathElement) {
+ this.pathElement.dispose();
+ }
+
+ if (this.textPathElement) {
+ this.textPathElement.dispose();
+ }
+
+ this.pathElement = this.paper.add("path");
+ this.pathElement.attr({
+ "d": value
+ });
+ this.pathElement.attr({
+ "id": "text-path-" + this.uid
+ });
+
+ this._disposers.push(this.pathElement);
+
+ this.textPathElement = this.paper.addGroup("textPath");
+ this.textPathElement.attrNS(_utils_DOM__WEBPACK_IMPORTED_MODULE_8__.XLINK, "xlink:href", "#text-path-" + this.uid); // TODO remove after https://bugzilla.mozilla.org/show_bug.cgi?id=455986 is fixed
+
+ this.textPathElement.attr({
+ "path": value
+ });
+
+ this._disposers.push(this.textPathElement);
+
+ this.hardInvalidate();
+ }
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Label.prototype, "locationOnPath", {
+ /**
+ * @return Relatvie location on path
+ */
+ get: function get() {
+ return this.getPropertyValue("locationOnPath");
+ },
+
+ /**
+ * Relative label location on `path`. Value range is from 0 (beginning)
+ * to 1 (end).
+ *
+ * Works only if you set `path` setting to an SVG path.
+ *
+ * @since 4.1.2
+ * @default 0
+ * @param value Relatvie location on path
+ */
+ set: function set(value) {
+ this.setPropertyValue("locationOnPath", value);
+
+ if (this.textPathElement) {
+ this.textPathElement.attr({
+ "startOffset": value * 100 + "%"
+ });
+ }
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Label.prototype, "baseLineRatio", {
+ /**
+ * @return Base line ratio
+ */
+ get: function get() {
+ return this.getPropertyValue("baseLineRatio");
+ },
+
+ /**
+ * A ratio to calculate text baseline. Ralative distance from the bottom of
+ * the label.
+ *
+ * @since 4.4.2
+ * @default -0.27
+ * @param value Base line ratio
+ */
+ set: function set(value) {
+ this.setPropertyValue("baseLineRatio", value);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Label.prototype, "wrap", {
+ /**
+ * @return Auto-wrap enabled or not
+ */
+ get: function get() {
+ return this.getPropertyValue("wrap");
+ },
+
+ /**
+ * Enables or disables autowrapping of text.
+ *
+ * @param value Auto-wrapping enabled
+ */
+ set: function set(value) {
+ this.resetBBox();
+ this.setPropertyValue("wrap", value, true);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Label.prototype, "truncate", {
+ /**
+ * @return Truncate text?
+ */
+ get: function get() {
+ return this.getPropertyValue("truncate");
+ },
+
+ /**
+ * Indicates if text lines need to be truncated if they do not fit, using
+ * configurable `ellipsis` string.
+ *
+ * `truncate` overrides `wrap` if both are set to `true`.
+ *
+ * NOTE: For HTML text, this setting **won't** trigger a parser and actual
+ * line truncation with ellipsis. It will just hide everything that goes
+ * outside the label.
+ *
+ * @param value trincate text?
+ */
+ set: function set(value) {
+ this.resetBBox();
+ this.setPropertyValue("truncate", value, true);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Label.prototype, "fullWords", {
+ /**
+ * @return Truncate on full words?
+ */
+ get: function get() {
+ return this.getPropertyValue("fullWords");
+ },
+
+ /**
+ * If `truncate` is enabled, should Label try to break only on full words
+ * (`true`), or whenever needed, including middle of the word. (`false`)
+ *
+ * @default true
+ * @param value Truncate on full words?
+ */
+ set: function set(value) {
+ this.setPropertyValue("fullWords", value, true);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Label.prototype, "ellipsis", {
+ /**
+ * @return Ellipsis string
+ */
+ get: function get() {
+ return this.getPropertyValue("ellipsis");
+ },
+
+ /**
+ * Ellipsis character to use if `truncate` is enabled.
+ *
+ * @param value Ellipsis string
+ * @default "..."
+ */
+ set: function set(value) {
+ this.setPropertyValue("ellipsis", value, true);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Label.prototype, "selectable", {
+ /**
+ * @return Text selectable?
+ */
+ get: function get() {
+ return this.getPropertyValue("selectable");
+ },
+
+ /**
+ * Forces the text to be selectable. This setting will be ignored if the
+ * object has some kind of interaction attached to it, such as it is
+ * `draggable`, `swipeable`, `resizable`.
+ *
+ * @param value Text selectable?
+ * @default false
+ */
+ set: function set(value) {
+ this.setPropertyValue("selectable", value, true);
+ this.setStyles();
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Label.prototype, "textAlign", {
+ /**
+ * @return Alignment
+ */
+ get: function get() {
+ return this.getPropertyValue("textAlign");
+ },
+
+ /**
+ * Horizontal text alignment.
+ *
+ * Available choices:
+ * * "start"
+ * * "middle"
+ * * "end"
+ *
+ * @param value Alignment
+ */
+ set: function set(value) {
+ this.setPropertyValue("textAlign", value, true);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Label.prototype, "textValign", {
+ /**
+ * @ignore Exclude from docs (not used)
+ * @return Alignment
+ * @deprecated
+ */
+ get: function get() {
+ return this.getPropertyValue("textValign");
+ },
+
+ /**
+ * Vertical text alignment.
+ *
+ * @ignore Exclude from docs (not used)
+ * @param value Alignment
+ * @deprecated
+ */
+ set: function set(value) {
+ this.setPropertyValue("textValign", value, true);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Label.prototype, "html", {
+ /**
+ * @return HTML content
+ */
+ get: function get() {
+ return this.getPropertyValue("html");
+ },
+
+ /**
+ * Raw HTML to be used as text.
+ *
+ * NOTE: HTML text is subject to browser support. It relies on browsers
+ * supporting SVG `foreignObject` nodes. Some browsers (read IEs) do not
+ * support it. On those browsers, the text will fall back to basic SVG text,
+ * striping out all HTML markup and styling that goes with it.
+ *
+ * For more information about `foreignObject` and its browser compatibility
+ * refer to [this page](https://developer.mozilla.org/en/docs/Web/SVG/Element/foreignObject#Browser_compatibility).
+ *
+ * @param value HTML text
+ */
+ set: function set(value) {
+ this.setPropertyValue("html", value, true);
+
+ if (!_utils_Type__WEBPACK_IMPORTED_MODULE_7__.hasValue(value)) {
+ var group = this.element;
+ group.removeChildrenByTag("foreignObject");
+ }
+ },
+ enumerable: true,
+ configurable: true
+ });
+
+ Label.prototype.setFill = function (value) {
+ _super.prototype.setFill.call(this, value);
+
+ if (this.html) {
+ var group = this.element;
+ var divs = group.node.getElementsByTagName("div");
+
+ for (var i = 0; i < divs.length; i++) {
+ var div = divs[i];
+
+ if (_utils_Type__WEBPACK_IMPORTED_MODULE_7__.hasValue(this.fill)) {
+ div.style.color = this.fill.toString();
+ }
+ }
+ }
+ };
+
+ Object.defineProperty(Label.prototype, "hideOversized", {
+ /**
+ * @return Hide if text does not fit?
+ */
+ get: function get() {
+ return this.getPropertyValue("hideOversized");
+ },
+
+ /**
+ * Indicates whether the whole text should be hidden if it does not fit into
+ * its allotted space.
+ *
+ * @param value Hide if text does not fit?
+ */
+ set: function set(value) {
+ this.setPropertyValue("hideOversized", value, true);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Label.prototype, "ignoreFormatting", {
+ /**
+ * @return Ignore formatting?
+ */
+ get: function get() {
+ return this.getPropertyValue("ignoreFormatting");
+ },
+
+ /**
+ * If set to `true` square-bracket formatting blocks will be treated as
+ * regular text.
+ *
+ * @default false
+ * @param value Ignore formatting?
+ */
+ set: function set(value) {
+ this.setPropertyValue("ignoreFormatting", value, true);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ /**
+ * Override `mesaureElement` so it does not get measure again, because
+ * internal `_bbox` is being updated by measuring routines in Text itself.
+ */
+
+ Label.prototype.measureElement = function () {};
+ /**
+ * Returns information about a line element.
+ *
+ * @ignore Exclude from docs
+ * @param index Line index
+ * @return Line info object
+ */
+
+
+ Label.prototype.getLineInfo = function (index) {
+ this.initLineCache();
+ var lines = this.getCache("lineInfo");
+ return lines.length > index ? lines[index] : undefined;
+ };
+ /**
+ * Adds a line to line info cache.
+ *
+ * @ignore Exclude from docs
+ * @param line Line info object
+ * @param index Insert at specified index
+ */
+
+
+ Label.prototype.addLineInfo = function (line, index) {
+ this.initLineCache();
+ this.getCache("lineInfo")[index] = line;
+ };
+ /**
+ * Checks if line cache is initialized and initializes it.
+ */
+
+
+ Label.prototype.initLineCache = function () {
+ if (!_utils_Type__WEBPACK_IMPORTED_MODULE_7__.hasValue(this.getCache("lineInfo"))) {
+ this.setCache("lineInfo", [], 0);
+ }
+ };
+ /**
+ * Sets a [[DataItem]] to use for populating dynamic sections of the text.
+ *
+ * Check the description for [[Text]] class, for data binding.
+ *
+ * @param dataItem Data item
+ */
+
+
+ Label.prototype.setDataItem = function (dataItem) {
+ if (this._sourceDataItemEvents) {
+ this._sourceDataItemEvents.dispose();
+ }
+
+ if (dataItem) {
+ this._sourceDataItemEvents = new _utils_Disposer__WEBPACK_IMPORTED_MODULE_3__.MultiDisposer([dataItem.events.on("valuechanged", this.invalidate, this, false), dataItem.events.on("workingvaluechanged", this.invalidate, this, false), dataItem.events.on("calculatedvaluechanged", this.invalidate, this, false), dataItem.events.on("propertychanged", this.invalidate, this, false)]);
+ }
+
+ _super.prototype.setDataItem.call(this, dataItem);
+ };
+
+ Object.defineProperty(Label.prototype, "availableWidth", {
+ /**
+ * Returns available horizontal space.
+ *
+ * @ignore Exclude from docs
+ * @return Available width (px)
+ */
+ get: function get() {
+ return _utils_Type__WEBPACK_IMPORTED_MODULE_7__.hasValue(this.maxWidth) ? this.maxWidth : this.pixelWidth;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Label.prototype, "availableHeight", {
+ /**
+ * Returns available vertical space.
+ *
+ * @return Available height (px)
+ */
+ get: function get() {
+ return _utils_Type__WEBPACK_IMPORTED_MODULE_7__.hasValue(this.maxHeight) ? this.maxHeight : this.pixelHeight;
+ },
+ enumerable: true,
+ configurable: true
+ }); // temp, replacing textFormatter method
+
+ Label.prototype.getSvgElement = function (text, style, parent) {
+ var element = this.paper.add("tspan");
+ element.textContent = text;
+
+ if (style) {
+ if (_Options__WEBPACK_IMPORTED_MODULE_10__.options.nonce && parent) {
+ //element.node.setAttribute("nonce", "test123");
+ var classid = "amcharts_element_style_" + btoa(style).replace(/[^\w]*/g, "");
+ element.node.setAttribute("class", classid);
+ var defs = document.createElementNS(_utils_DOM__WEBPACK_IMPORTED_MODULE_8__.SVGNS, "defs");
+ parent.node.appendChild(defs);
+ var e = document.createElement("style");
+ e.type = "text/css";
+ e.innerHTML = "." + classid + " { " + style + "}";
+ e.setAttribute("nonce", _Options__WEBPACK_IMPORTED_MODULE_10__.options.nonce);
+ defs.appendChild(e);
+ } else {
+ element.node.setAttribute("style", style);
+ }
+ }
+
+ if (parent) {
+ parent.add(element);
+ }
+
+ return element;
+ };
+ /**
+ * Invalidates the whole element, including layout AND all its child
+ * elements.
+ */
+
+
+ Label.prototype.deepInvalidate = function () {
+ _super.prototype.deepInvalidate.call(this);
+
+ this.hardInvalidate();
+ };
+
+ Object.defineProperty(Label.prototype, "readerTitle", {
+ /**
+ * @return Title
+ */
+ get: function get() {
+ var title = this.getPropertyValue("readerTitle");
+
+ if (!title) {
+ title = this.populateString(_utils_Utils__WEBPACK_IMPORTED_MODULE_6__.plainText(_utils_Utils__WEBPACK_IMPORTED_MODULE_6__.isNotEmpty(this.html) ? this.html : this.text));
+ } else if (this.dataItem) {
+ title = this.populateString(title);
+ }
+
+ return title;
+ },
+
+ /**
+ * Screen reader title of the element.
+ *
+ * @param value Title
+ */
+ set: function set(value) {
+ value = _utils_Type__WEBPACK_IMPORTED_MODULE_7__.toText(value);
+
+ if (this.setPropertyValue("readerTitle", value)) {
+ this.applyAccessibility();
+ }
+ },
+ enumerable: true,
+ configurable: true
+ });
+ return Label;
+}(_Container__WEBPACK_IMPORTED_MODULE_0__.Container);
+
+
+/**
+ * Register class in system, so that it can be instantiated using its name from
+ * anywhere.
+ *
+ * @ignore
+ */
+
+_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses.Label = Label;
+/**
+ * Add default responsive rules
+ */
+
+/**
+ * Hide labels added directly to chart, like titles if chart is short.
+ */
+
+_utils_Responsive__WEBPACK_IMPORTED_MODULE_9__.defaultRules.push({
+ relevant: _utils_Responsive__WEBPACK_IMPORTED_MODULE_9__.ResponsiveBreakpoints.heightXS,
+ state: function state(target, stateId) {
+ if (target instanceof Label && target.parent && target.parent.isBaseSprite) {
+ var state = target.states.create(stateId);
+ state.properties.disabled = true;
+ return state;
+ }
+
+ return null;
+ }
+});
+
+/***/ }),
+
+/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Line.js":
+/*!**************************************************************************!*\
+ !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/Line.js ***!
+ \**************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "Line": () => (/* binding */ Line)
+/* harmony export */ });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
+/* harmony import */ var _Sprite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Sprite */ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js");
+/* harmony import */ var _utils_Color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/Color */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Color.js");
+/* harmony import */ var _rendering_fills_LinearGradient__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../rendering/fills/LinearGradient */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/LinearGradient.js");
+/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
+/* harmony import */ var _utils_Type__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
+/* harmony import */ var _utils_Math__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
+/**
+ * Line drawing functionality.
+ */
+
+/**
+ * ============================================================================
+ * IMPORTS
+ * ============================================================================
+ * @hidden
+ */
+
+
+
+
+
+
+
+/**
+ * ============================================================================
+ * MAIN CLASS
+ * ============================================================================
+ * @hidden
+ */
+
+/**
+ * Draws a line.
+ *
+ * @see {@link ILineEvents} for a list of available events
+ * @see {@link ILineAdapters} for a list of available Adapters
+ */
+
+var Line =
+/** @class */
+function (_super) {
+ (0,tslib__WEBPACK_IMPORTED_MODULE_6__.__extends)(Line, _super);
+ /**
+ * Constructor
+ */
+
+
+ function Line() {
+ var _this = _super.call(this) || this;
+
+ _this.className = "Line";
+ _this.element = _this.paper.add("line");
+ _this.fill = (0,_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)(); //"none";
+
+ _this.x1 = 0;
+ _this.y1 = 0;
+
+ _this.applyTheme();
+
+ return _this;
+ }
+ /**
+ * Draws the line.
+ *
+ * @ignore Exclude from docs
+ */
+
+
+ Line.prototype.draw = function () {
+ _super.prototype.draw.call(this);
+
+ if (this.x1 == this.x2 || this.y1 == this.y2) {
+ this.pixelPerfect = true;
+ } else {
+ this.pixelPerfect = false;
+ }
+
+ this.x1 = this.x1;
+ this.x2 = this.x2;
+ this.y1 = this.y1;
+ this.y2 = this.y2;
+ };
+
+ Object.defineProperty(Line.prototype, "x1", {
+ /**
+ * @return X
+ */
+ get: function get() {
+ return this.getPropertyValue("x1");
+ },
+
+ /**
+ * X coordinate of first end.
+ *
+ * @param value X
+ */
+ set: function set(value) {
+ if (!_utils_Type__WEBPACK_IMPORTED_MODULE_4__.isNumber(value)) {
+ value = 0;
+ }
+
+ var delta = 0;
+
+ if (this.pixelPerfect && this.stroke instanceof _rendering_fills_LinearGradient__WEBPACK_IMPORTED_MODULE_2__.LinearGradient) {
+ delta = 0.00001;
+ }
+
+ this.setPropertyValue("x1", value, true);
+ this.element.attr({
+ "x1": value + delta
+ });
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Line.prototype, "x2", {
+ /**
+ * @return X
+ */
+ get: function get() {
+ var value = this.getPropertyValue("x2");
+
+ if (!_utils_Type__WEBPACK_IMPORTED_MODULE_4__.isNumber(value)) {
+ value = this.pixelWidth;
+ }
+
+ return value;
+ },
+
+ /**
+ * X coordinate of second end.
+ *
+ * @param value X
+ */
+ set: function set(value) {
+ if (!_utils_Type__WEBPACK_IMPORTED_MODULE_4__.isNumber(value)) {
+ value = 0;
+ }
+
+ this.setPropertyValue("x2", value, true);
+ this.element.attr({
+ "x2": value
+ });
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Line.prototype, "y1", {
+ /**
+ * @return Y
+ */
+ get: function get() {
+ return this.getPropertyValue("y1");
+ },
+
+ /**
+ * Y coordinate of first end.
+ *
+ * @param value Y
+ */
+ set: function set(value) {
+ if (!_utils_Type__WEBPACK_IMPORTED_MODULE_4__.isNumber(value)) {
+ value = 0;
+ }
+
+ var delta = 0;
+
+ if (this.pixelPerfect && this.stroke instanceof _rendering_fills_LinearGradient__WEBPACK_IMPORTED_MODULE_2__.LinearGradient) {
+ delta = 0.00001;
+ }
+
+ this.setPropertyValue("y1", value, true);
+ this.element.attr({
+ "y1": value + delta
+ });
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Line.prototype, "y2", {
+ /**
+ * @return Y
+ */
+ get: function get() {
+ var value = this.getPropertyValue("y2");
+
+ if (!_utils_Type__WEBPACK_IMPORTED_MODULE_4__.isNumber(value)) {
+ value = this.pixelHeight;
+ }
+
+ return value;
+ },
+
+ /**
+ * Y coordinate of second end.
+ *
+ * @param value Y
+ */
+ set: function set(value) {
+ if (!_utils_Type__WEBPACK_IMPORTED_MODULE_4__.isNumber(value)) {
+ value = 0;
+ }
+
+ this.setPropertyValue("y2", value, true);
+ this.element.attr({
+ "y2": value
+ });
+ },
+ enumerable: true,
+ configurable: true
+ });
+ /**
+ * Converts relative position along the line (0-1) into pixel coordinates.
+ *
+ * @param position Position (0-1)
+ * @return Coordinates
+ */
+
+ Line.prototype.positionToPoint = function (position) {
+ var point1 = {
+ x: this.x1,
+ y: this.y1
+ };
+ var point2 = {
+ x: this.x2,
+ y: this.y2
+ };
+ var point = _utils_Math__WEBPACK_IMPORTED_MODULE_5__.getMidPoint(point1, point2, position);
+ var angle = _utils_Math__WEBPACK_IMPORTED_MODULE_5__.getAngle(point1, point2);
+ return {
+ x: point.x,
+ y: point.y,
+ angle: angle
+ };
+ };
+
+ return Line;
+}(_Sprite__WEBPACK_IMPORTED_MODULE_0__.Sprite);
+
+
+/**
+ * Register class in system, so that it can be instantiated using its name from
+ * anywhere.
+ *
+ * @ignore
+ */
+
+_Registry__WEBPACK_IMPORTED_MODULE_3__.registry.registeredClasses.Line = Line;
+
+/***/ }),
+
+/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Modal.js":
+/*!***************************************************************************!*\
+ !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/Modal.js ***!
+ \***************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "Modal": () => (/* binding */ Modal)
+/* harmony export */ });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
+/* harmony import */ var _Popup__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Popup */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Popup.js");
+/* harmony import */ var _utils_Adapter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/Adapter */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Adapter.js");
+/**
+ * Modal class is used to display information over chart area.
+ */
+
+/**
+ * ============================================================================
+ * IMPORTS
+ * ============================================================================
+ * @hidden
+ */
+
+
+
+/**
+ * Shows an HTML modal which covers window or a chart area.
+ *
+ * @see {@link https://www.amcharts.com/docs/v4/concepts/popups-and-modals/} For examples and docs on Popups and Modals.
+ */
+
+var Modal =
+/** @class */
+function (_super) {
+ (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(Modal, _super);
+ /**
+ * Constructor
+ */
+
+
+ function Modal() {
+ var _this = _super.call(this) || this;
+ /**
+ * Adapter.
+ */
+
+
+ _this.adapter = new _utils_Adapter__WEBPACK_IMPORTED_MODULE_1__.Adapter(_this);
+ _this.className = "Modal";
+ _this.showCurtain = true;
+ _this.draggable = false;
+ return _this;
+ }
+
+ return Modal;
+}(_Popup__WEBPACK_IMPORTED_MODULE_0__.Popup);
+
+
+
+/***/ }),
+
+/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/PlayButton.js":
+/*!********************************************************************************!*\
+ !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/PlayButton.js ***!
+ \********************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "PlayButton": () => (/* binding */ PlayButton)
+/* harmony export */ });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
+/* harmony import */ var _Button__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Button */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Button.js");
+/* harmony import */ var _RoundedRectangle__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./RoundedRectangle */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/RoundedRectangle.js");
+/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
+/* harmony import */ var _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/utils/InterfaceColorSet */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/InterfaceColorSet.js");
+/* harmony import */ var _Triangle__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Triangle */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Triangle.js");
+/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
+/**
+ * Play button functionality.
+ */
+
+/**
+ * ============================================================================
+ * IMPORTS
+ * ============================================================================
+ * @hidden
+ */
+
+
+
+
+
+
+
+/**
+ * ============================================================================
+ * MAIN CLASS
+ * ============================================================================
+ * @hidden
+ */
+
+/**
+ * Creates a zoom out button.
+ *
+ * @see {@link IPlayButtonEvents} for a list of available events
+ * @see {@link IPlayButtonAdapters} for a list of available Adapters
+ */
+
+var PlayButton =
+/** @class */
+function (_super) {
+ (0,tslib__WEBPACK_IMPORTED_MODULE_6__.__extends)(PlayButton, _super);
+ /**
+ * Constructor
+ */
+
+
+ function PlayButton() {
+ var _this = // Init
+ _super.call(this) || this;
+
+ _this.className = "PlayButton";
+
+ _this.padding(12, 12, 12, 12);
+
+ _this.showSystemTooltip = true;
+ var interfaceColors = new _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_3__.InterfaceColorSet();
+ var background = _this.background;
+ background.cornerRadius(25, 25, 25, 25);
+ background.fill = interfaceColors.getFor("primaryButton");
+ background.stroke = interfaceColors.getFor("primaryButtonStroke");
+ background.strokeOpacity = 0;
+ background.states.getKey("hover").properties.fill = interfaceColors.getFor("primaryButtonHover");
+ background.states.getKey("down").properties.fill = interfaceColors.getFor("primaryButtonActive"); // Create a play icon
+
+ var playIcon = new _Triangle__WEBPACK_IMPORTED_MODULE_4__.Triangle();
+ playIcon.direction = "right";
+ playIcon.width = 9;
+ playIcon.height = 11;
+ playIcon.marginLeft = 1;
+ playIcon.marginRight = 1;
+ playIcon.horizontalCenter = "middle";
+ playIcon.verticalCenter = "middle";
+ playIcon.stroke = interfaceColors.getFor("primaryButtonText");
+ playIcon.fill = playIcon.stroke;
+ _this.icon = playIcon; // Create a play icon
+
+ var stopIcon = new _RoundedRectangle__WEBPACK_IMPORTED_MODULE_1__.RoundedRectangle();
+ stopIcon.width = 11;
+ stopIcon.height = 11;
+ stopIcon.horizontalCenter = "middle";
+ stopIcon.verticalCenter = "middle";
+ stopIcon.cornerRadius(0, 0, 0, 0);
+ stopIcon.stroke = interfaceColors.getFor("primaryButtonText");
+ stopIcon.fill = playIcon.stroke;
+ _this.togglable = true;
+
+ var activeState = _this.states.create("active");
+
+ activeState.transitionDuration = 0;
+ activeState.properties.icon = stopIcon;
+ _this.defaultState.transitionDuration = 0; // Apply theme
+
+ _this.applyTheme();
+
+ return _this;
+ }
+ /**
+ * Sets defaults that instantiate some objects that rely on parent, so they
+ * cannot be set in constructor.
+ */
+
+
+ PlayButton.prototype.applyInternalDefaults = function () {
+ _super.prototype.applyInternalDefaults.call(this);
+
+ if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_5__.hasValue(this.readerTitle)) {
+ this.readerTitle = this.language.translate("Play");
+ }
+ };
+
+ return PlayButton;
+}(_Button__WEBPACK_IMPORTED_MODULE_0__.Button);
+
+
+/**
+ * Register class in system, so that it can be instantiated using its name from
+ * anywhere.
+ *
+ * @ignore
+ */
+
+_Registry__WEBPACK_IMPORTED_MODULE_2__.registry.registeredClasses.PlayButton = PlayButton;
+
+/***/ }),
+
+/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/PointedRectangle.js":
+/*!**************************************************************************************!*\
+ !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/PointedRectangle.js ***!
+ \**************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "PointedRectangle": () => (/* binding */ PointedRectangle)
+/* harmony export */ });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
+/* harmony import */ var _PointedShape__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./PointedShape */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/PointedShape.js");
+/* harmony import */ var _utils_Math__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
+/**
+ * Pointed rectangle module.
+ */
+
+/**
+ * ============================================================================
+ * IMPORTS
+ * ============================================================================
+ * @hidden
+ */
+
+
+
+/**
+ * ============================================================================
+ * MAIN CLASS
+ * ============================================================================
+ * @hidden
+ */
+
+/**
+ * Draws a rectangle with a pointer.
+ *
+ * @see {@link IPointedRectangleEvents} for a list of available events
+ * @see {@link IPointedRectangleAdapters} for a list of available Adapters
+ */
+
+var PointedRectangle =
+/** @class */
+function (_super) {
+ (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(PointedRectangle, _super);
+ /**
+ * Constructor
+ */
+
+
+ function PointedRectangle() {
+ var _this = _super.call(this) || this;
+
+ _this.className = "PointedRectangle";
+ _this.element = _this.paper.add("path");
+ _this.cornerRadius = 6;
+
+ _this.applyTheme();
+
+ return _this;
+ }
+ /**
+ * Draws the element.
+ *
+ * @ignore Exclude from docs
+ */
+
+
+ PointedRectangle.prototype.draw = function () {
+ _super.prototype.draw.call(this);
+
+ var cr = this.cornerRadius;
+ var w = this.innerWidth;
+ var h = this.innerHeight;
+
+ if (w > 0 && h > 0) {
+ var x = this.pointerX;
+ var y = this.pointerY;
+ var bwh = this.pointerBaseWidth / 2;
+ var maxcr = _utils_Math__WEBPACK_IMPORTED_MODULE_1__.min(w / 2, h / 2);
+ var crtl = _utils_Math__WEBPACK_IMPORTED_MODULE_1__.fitToRange(cr, 0, maxcr);
+ var crtr = _utils_Math__WEBPACK_IMPORTED_MODULE_1__.fitToRange(cr, 0, maxcr);
+ var crbr = _utils_Math__WEBPACK_IMPORTED_MODULE_1__.fitToRange(cr, 0, maxcr);
+ var crbl = _utils_Math__WEBPACK_IMPORTED_MODULE_1__.fitToRange(cr, 0, maxcr); // corner coordinates
+ // top left
+
+ var xtl = 0;
+ var ytl = 0; // top right
+
+ var xtr = w;
+ var ytr = 0; // bottom right
+
+ var xbr = w;
+ var ybr = h; // bottom left
+
+ var xbl = 0;
+ var ybl = h;
+ var lineT = void 0;
+ var lineR = void 0;
+ var lineB = void 0;
+ var lineL = void 0; // find stem base side: http://$math.stackexchange.com/questions/274712/calculate-on-which-side-of-straign-line-is-dot-located
+ // d=(x−x1)(y2−y1)−(y−y1)(x2−x1)
+
+ var d1 = (x - xtl) * (ybr - ytl) - (y - ytl) * (xbr - xtl);
+ var d2 = (x - xbl) * (ytr - ybl) - (y - ybl) * (xtr - xbl); // top
+
+ if (d1 > 0 && d2 > 0) {
+ var stemX = _utils_Math__WEBPACK_IMPORTED_MODULE_1__.fitToRange(x, crtl + bwh, w - bwh - crtr);
+ y = _utils_Math__WEBPACK_IMPORTED_MODULE_1__.fitToRange(y, -Infinity, 0);
+ lineT = "M" + crtl + ",0 L" + (stemX - bwh) + ",0 L" + x + "," + y + " L" + (stemX + bwh) + ",0 L" + (w - crtr) + ",0";
+ } else {
+ lineT = "M" + crtl + ",0 L" + (w - crtr) + ",0";
+ } // bottom
+
+
+ if (d1 < 0 && d2 < 0) {
+ var stemX = _utils_Math__WEBPACK_IMPORTED_MODULE_1__.fitToRange(x, crbl + bwh, w - bwh - crbr);
+ y = _utils_Math__WEBPACK_IMPORTED_MODULE_1__.fitToRange(y, h, Infinity);
+ lineB = " L" + (w - crbr) + "," + h + " L" + (stemX + bwh) + "," + h + " L" + x + "," + y + " L" + (stemX - bwh) + "," + h + " L" + crbl + "," + h;
+ } else {
+ lineB = " L" + crbl + "," + h;
+ } // left
+
+
+ if (d1 < 0 && d2 > 0) {
+ var stemY = _utils_Math__WEBPACK_IMPORTED_MODULE_1__.fitToRange(y, crtl + bwh, h - crbl - bwh);
+ x = _utils_Math__WEBPACK_IMPORTED_MODULE_1__.fitToRange(x, -Infinity, 0);
+ lineL = " L0," + (h - crbl) + " L0," + (stemY + bwh) + " L" + x + "," + y + " L0," + (stemY - bwh) + " L0," + crtl;
+ } else {
+ lineL = " L0," + crtl;
+ } // right
+
+
+ if (d1 > 0 && d2 < 0) {
+ var stemY = _utils_Math__WEBPACK_IMPORTED_MODULE_1__.fitToRange(y, crtr + bwh, h - bwh - crbr);
+ x = _utils_Math__WEBPACK_IMPORTED_MODULE_1__.fitToRange(x, w, Infinity);
+ lineR = " L" + w + "," + crtr + " L" + w + "," + (stemY - bwh) + " L" + x + "," + y + " L" + w + "," + (stemY + bwh) + " L" + w + "," + (h - crbr);
+ } else {
+ lineR = " L" + w + "," + (h - crbr);
+ }
+
+ var arcTR = " a" + crtr + "," + crtr + " 0 0 1 " + crtr + "," + crtr;
+ var arcBR = " a" + crbr + "," + crbr + " 0 0 1 -" + crbr + "," + crbr;
+ var arcBL = " a" + crbl + "," + crbl + " 0 0 1 -" + crbl + ",-" + crbl;
+ var arcTL = " a" + crtl + "," + crtl + " 0 0 1 " + crtl + ",-" + crtl;
+ this.path = lineT + arcTR + lineR + arcBR + lineB + arcBL + lineL + arcTL;
+ }
+ };
+
+ Object.defineProperty(PointedRectangle.prototype, "cornerRadius", {
+ /**
+ * @return Corner radius (px)
+ */
+ get: function get() {
+ return this.getPropertyValue("cornerRadius");
+ },
+
+ /**
+ * Radius of rectangle's border in pixels.
+ *
+ * @default 0
+ * @param value Corner radius (px)
+ */
+ set: function set(value) {
+ this.setPropertyValue("cornerRadius", value, true);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ return PointedRectangle;
+}(_PointedShape__WEBPACK_IMPORTED_MODULE_0__.PointedShape);
+
+
+
+/***/ }),
+
+/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/PointedShape.js":
+/*!**********************************************************************************!*\
+ !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/PointedShape.js ***!
+ \**********************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "PointedShape": () => (/* binding */ PointedShape)
+/* harmony export */ });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
+/* harmony import */ var _Sprite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Sprite */ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js");
+/* harmony import */ var _utils_Type__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
+/**
+ * Pointed shape module.
+ */
+
+/**
+ * ============================================================================
+ * IMPORTS
+ * ============================================================================
+ * @hidden
+ */
+
+
+
+/**
+ * ============================================================================
+ * MAIN CLASS
+ * ============================================================================
+ * @hidden
+ */
+
+/**
+ * Draws a shape with a pointer.
+ *
+ * @see {@link IPointedShapeEvents} for a list of available events
+ * @see {@link IPointedShapeAdapters} for a list of available Adapters
+ */
+
+var PointedShape =
+/** @class */
+function (_super) {
+ (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(PointedShape, _super);
+ /**
+ * Constructor
+ */
+
+
+ function PointedShape() {
+ var _this = _super.call(this) || this;
+
+ _this.className = "PointedShape";
+ _this.pointerBaseWidth = 15;
+ _this.pointerLength = 10;
+ _this.pointerY = 0;
+ _this.pointerX = 0;
+
+ _this.applyTheme();
+
+ return _this;
+ }
+ /**
+ * Draws the element.
+ *
+ * @ignore Exclude from docs
+ */
+
+
+ PointedShape.prototype.draw = function () {
+ _super.prototype.draw.call(this);
+
+ if (!_utils_Type__WEBPACK_IMPORTED_MODULE_1__.isNumber(this.pointerX)) {
+ this.pointerX = this.pixelWidth / 2;
+ }
+
+ if (!_utils_Type__WEBPACK_IMPORTED_MODULE_1__.isNumber(this.pointerY)) {
+ this.pointerY = this.pixelHeight + 10;
+ }
+ };
+
+ Object.defineProperty(PointedShape.prototype, "pointerBaseWidth", {
+ /**
+ * @return Width (px)
+ */
+ get: function get() {
+ return this.getPropertyValue("pointerBaseWidth");
+ },
+
+ /**
+ * A width of the pinter's (stem's) thick end (base) in pixels.
+ *
+ * @default 15
+ * @param value Width (px)
+ */
+ set: function set(value) {
+ this.setPropertyValue("pointerBaseWidth", value, true);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(PointedShape.prototype, "pointerLength", {
+ /**
+ * @return Length (px)
+ */
+ get: function get() {
+ return this.getPropertyValue("pointerLength");
+ },
+
+ /**
+ * A length of the pinter (stem) in pixels.
+ *
+ * @default 10
+ * @param value Length (px)
+ */
+ set: function set(value) {
+ this.setPropertyValue("pointerLength", value, true);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(PointedShape.prototype, "pointerX", {
+ /**
+ * @return X
+ */
+ get: function get() {
+ return this.getPropertyValue("pointerX");
+ },
+
+ /**
+ * X coordinate the shape is pointing to.
+ *
+ * @param value X
+ */
+ set: function set(value) {
+ this.setPropertyValue("pointerX", value, true);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(PointedShape.prototype, "pointerY", {
+ /**
+ * @return Y
+ */
+ get: function get() {
+ return this.getPropertyValue("pointerY");
+ },
+
+ /**
+ * Y coordinate the shape is pointing to.
+ *
+ * @param value Y
+ */
+ set: function set(value) {
+ this.setPropertyValue("pointerY", value, true);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ return PointedShape;
+}(_Sprite__WEBPACK_IMPORTED_MODULE_0__.Sprite);
+
+
+
+/***/ }),
+
+/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Polyarc.js":
+/*!*****************************************************************************!*\
+ !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/Polyarc.js ***!
+ \*****************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "Polyarc": () => (/* binding */ Polyarc)
+/* harmony export */ });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
+/* harmony import */ var _Polyline__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Polyline */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Polyline.js");
+/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
+/* harmony import */ var _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
+/* harmony import */ var _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/rendering/Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");
+/**
+ * Module for a multi-part arched line.
+ */
+
+/**
+ * ============================================================================
+ * IMPORTS
+ * ============================================================================
+ * @hidden
+ */
+
+
+
+
+
+/**
+ * ============================================================================
+ * MAIN CLASS
+ * ============================================================================
+ * @hidden
+ */
+
+/**
+ * Draws a multi-part arched line.
+ *
+ * @see {@link IPolyarcEvents} for a list of available events
+ * @see {@link IPolyarcAdapters} for a list of available Adapters
+ */
+
+var Polyarc =
+/** @class */
+function (_super) {
+ (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__extends)(Polyarc, _super);
+ /**
+ * Constructor
+ */
+
+
+ function Polyarc() {
+ var _this = _super.call(this) || this;
+
+ _this.className = "Polyarc";
+ _this.controlPointDistance = 0.5;
+ _this.controlPointPosition = 0.5;
+
+ _this.applyTheme();
+
+ return _this;
+ }
+ /**
+ * Creats and adds an SVG path for the arc.
+ *
+ * @ignore Exclude from docs
+ */
+
+
+ Polyarc.prototype.makePath = function () {
+ this._distance = 0;
+ var segments = this.segments;
+
+ if (segments && segments.length > 0) {
+ var path = "";
+ this._realSegments = [];
+
+ for (var i = 0, len = segments.length; i < len; i++) {
+ var points = segments[i];
+ var realPoints = [];
+
+ this._realSegments.push(realPoints);
+
+ if (points.length > 0) {
+ path += _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__.moveTo(points[0]);
+
+ for (var p = 1; p < points.length; p++) {
+ var pointA = points[p - 1];
+ var pointB = points[p];
+ var distanceAB = _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.getDistance(pointB, pointA);
+ var cpDistance = distanceAB * this.controlPointDistance;
+ var controlPointPosition = this.controlPointPosition;
+ var angle = -_core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.getAngle(pointA, pointB);
+ var cpx = pointA.x + (pointB.x - pointA.x) * controlPointPosition * 0.5 - cpDistance * _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.sin(angle);
+ var cpy = pointA.y + (pointB.y - pointA.y) * controlPointPosition * 0.5 - cpDistance * _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.cos(angle);
+ var controlPoint1 = {
+ x: cpx,
+ y: cpy
+ };
+ var cpx2 = pointA.x + (pointB.x - pointA.x) * controlPointPosition * 1.5 - cpDistance * _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.sin(angle);
+ var cpy2 = pointA.y + (pointB.y - pointA.y) * controlPointPosition * 1.5 - cpDistance * _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.cos(angle);
+ var controlPoint2 = {
+ x: cpx2,
+ y: cpy2
+ };
+ path += _core_rendering_Path__WEBPACK_IMPORTED_MODULE_3__.cubicCurveTo(pointB, controlPoint1, controlPoint2); // we add a lot of points in order to get the position/angle later
+
+ var stepCount = Math.ceil(distanceAB);
+ var prevPoint = pointA;
+
+ if (stepCount > 0) {
+ for (var i_1 = 0; i_1 <= stepCount; i_1++) {
+ var point = _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.getPointOnCubicCurve(pointA, pointB, controlPoint1, controlPoint2, i_1 / stepCount);
+ realPoints.push(point);
+ this._distance += _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.getDistance(prevPoint, point);
+ prevPoint = point;
+ }
+ } else {
+ realPoints.push(pointA);
+ }
+ }
+ }
+ }
+
+ this.path = path;
+ }
+ };
+
+ Object.defineProperty(Polyarc.prototype, "controlPointPosition", {
+ /**
+ * @return Position (0-1)
+ */
+ get: function get() {
+ return this.getPropertyValue("controlPointPosition");
+ },
+
+ /**
+ * Relative position along the line the control point is. (0-1)
+ *
+ * @default 0.5
+ * @param value Position (0-1)
+ */
+ set: function set(value) {
+ this.setPropertyValue("controlPointPosition", value);
+ this.makePath();
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Polyarc.prototype, "controlPointDistance", {
+ /**
+ * @return Distance (0-1)
+ */
+ get: function get() {
+ return this.getPropertyValue("controlPointDistance");
+ },
+
+ /**
+ * Relative distance of the control point. (0-1)
+ *
+ * Default is half the length of the line. (0.5)
+ *
+ * @default 0.5
+ * @param value Distance (0-1)
+ */
+ set: function set(value) {
+ this.setPropertyValue("controlPointDistance", value);
+ this.makePath();
+ },
+ enumerable: true,
+ configurable: true
+ });
+ return Polyarc;
+}(_Polyline__WEBPACK_IMPORTED_MODULE_0__.Polyline);
+
+
+/**
+ * Register class in system, so that it can be instantiated using its name from
+ * anywhere.
+ *
+ * @ignore
+ */
+
+_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses.Polyarc = Polyarc;
+
+/***/ }),
+
+/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Polygon.js":
+/*!*****************************************************************************!*\
+ !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/Polygon.js ***!
+ \*****************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "Polygon": () => (/* binding */ Polygon)
+/* harmony export */ });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
+/* harmony import */ var _Sprite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Sprite */ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js");
+/* harmony import */ var _utils_Morpher__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/Morpher */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Morpher.js");
+/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
+/* harmony import */ var _rendering_Path__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../rendering/Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");
+/* harmony import */ var _utils_Type__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
+/**
+ * Polygon module.
+ */
+
+/**
+ * ============================================================================
+ * IMPORTS
+ * ============================================================================
+ * @hidden
+ */
+
+
+
+
+
+
+/**
+ * ============================================================================
+ * MAIN CLASS
+ * ============================================================================
+ * @hidden
+ */
+
+/**
+ * Draws a polygon.
+ *
+ * @see {@link IPolygonEvents} for a list of available events
+ * @see {@link IPolygonAdapters} for a list of available Adapters
+ */
+
+var Polygon =
+/** @class */
+function (_super) {
+ (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__extends)(Polygon, _super);
+ /**
+ * Constructor
+ */
+
+
+ function Polygon() {
+ var _this = _super.call(this) || this;
+
+ _this.className = "Polygon";
+ _this.element = _this.paper.add("path");
+ _this.shapeRendering = "auto";
+ _this._currentPoints = [];
+
+ _this.applyTheme();
+
+ return _this;
+ }
+
+ Object.defineProperty(Polygon.prototype, "points", {
+ /**
+ * @return Polygon points
+ */
+ get: function get() {
+ var points = this.getPropertyValue("points");
+ var path = this.path;
+
+ if (path && (!points || points.length == 0)) {
+ var valueStr = path.slice(1, path.length - 1);
+ var segments = valueStr.split("ZM");
+
+ for (var s = 0; s < segments.length; s++) {
+ var segment = segments[s];
+
+ if (segment.length > 0) {
+ var areaHole = segment.split("M");
+ var areaArr = areaHole[0];
+ var holeArr = areaHole[1];
+
+ if (areaArr && areaArr.length > 0) {
+ var pointsArr = areaArr.split("L");
+
+ if (pointsArr.length > 0) {
+ var area = [];
+ var areaAndHole = [area];
+ points.push(areaAndHole);
+
+ for (var p = 0; p < pointsArr.length; p++) {
+ var coords = pointsArr[p].split(",");
+ area.push({
+ x: +coords[0],
+ y: +coords[1]
+ });
+ }
+
+ if (holeArr && holeArr.length > 0) {
+ var pointsArr_1 = holeArr.split("L");
+
+ if (pointsArr_1.length > 0) {
+ var hole = [];
+ areaAndHole.push(hole);
+
+ for (var p = pointsArr_1.length - 1; p >= 0; p--) {
+ var coords = pointsArr_1[p].split(",");
+ hole.push({
+ x: +coords[0],
+ y: +coords[1]
+ });
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ this.setPropertyValue("points", points);
+ this._currentPoints = points;
+ }
+
+ return points;
+ },
+
+ /**
+ * An array of X/Y coordinates for each elbow of the polygon.
+ *
+ * @todo Example
+ * @param points Polygon points
+ */
+ set: function set(points) {
+ this.setPropertyValue("points", points, true);
+ this._currentPoints = points;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Polygon.prototype, "currentPoints", {
+ /**
+ * @return Polygon points
+ */
+ get: function get() {
+ if ((!this._currentPoints || this._currentPoints.length == 0) && this.path) {
+ this._currentPoints = this.points;
+ }
+
+ return this._currentPoints;
+ },
+
+ /**
+ * Current points. Used when morphing the element, so that original `points`
+ * are not overwritten.
+ *
+ * @param points Polygon points
+ */
+ set: function set(points) {
+ if (this._currentPoints != points) {
+ this._currentPoints = points;
+ this.draw();
+ }
+ },
+ enumerable: true,
+ configurable: true
+ });
+ /**
+ * Draws the element.
+ *
+ * @ignore Exclude from docs
+ */
+
+ Polygon.prototype.draw = function () {
+ var path = "";
+ var points = this._currentPoints;
+ var left;
+ var right;
+ var top;
+ var bottom;
+
+ if (points.length > 0) {
+ // separate areas
+ for (var i = 0, len = points.length; i < len; i++) {
+ // surface
+ var surface = points[i][0];
+ var hole = points[i][1];
+
+ if (surface && surface.length > 0) {
+ var point = surface[0];
+ path += _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.moveTo(point);
+
+ for (var s = 0; s < surface.length; s++) {
+ point = surface[s];
+ path += _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.lineTo(point);
+
+ if (!_utils_Type__WEBPACK_IMPORTED_MODULE_4__.isNumber(right) || right < point.x) {
+ right = point.x;
+ }
+
+ if (!_utils_Type__WEBPACK_IMPORTED_MODULE_4__.isNumber(left) || left > point.x) {
+ left = point.x;
+ }
+
+ if (!_utils_Type__WEBPACK_IMPORTED_MODULE_4__.isNumber(top) || top > point.y) {
+ top = point.y;
+ }
+
+ if (!_utils_Type__WEBPACK_IMPORTED_MODULE_4__.isNumber(bottom) || bottom < point.y) {
+ bottom = point.y;
+ }
+ }
+ } // hole
+
+
+ if (hole && hole.length > 0) {
+ var point = hole[0];
+ path += _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.moveTo(point);
+
+ for (var h = 0, hlen = hole.length; h < hlen; h++) {
+ point = hole[h];
+ path += _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.lineTo(point);
+ }
+ }
+ }
+
+ if (path) {
+ path += _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.closePath();
+ }
+
+ this.bbox.x = left;
+ this.bbox.y = top;
+ this.bbox.width = right - left;
+ this.bbox.height = bottom - top;
+
+ _super.prototype.setPath.call(this, path);
+ }
+ };
+ /**
+ * @ignore
+ */
+
+
+ Polygon.prototype.setPath = function (value) {
+ if (_super.prototype.setPath.call(this, value)) {
+ this.points = [];
+ this._bbox = this.group.getBBox();
+ return true;
+ }
+
+ return false;
+ };
+ /**
+ * Measures element
+ */
+
+
+ Polygon.prototype.measureElement = function () {// Overriding to avoid extra measurement.
+ };
+
+ Object.defineProperty(Polygon.prototype, "centerPoint", {
+ /**
+ * A calculated center point for the shape.
+ *
+ * @readonly
+ * @return Center
+ */
+ get: function get() {
+ return {
+ x: this.bbox.x + this.bbox.width / 2,
+ y: this.bbox.y + this.bbox.height / 2
+ };
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Polygon.prototype, "morpher", {
+ /**
+ * A [[Morpher]] instance that is used to morph polygon into some other
+ * shape.
+ *
+ * @readonly
+ * @return Morpher instance
+ */
+ get: function get() {
+ if (!this._morpher) {
+ this._morpher = new _utils_Morpher__WEBPACK_IMPORTED_MODULE_1__.Morpher(this);
+
+ this._disposers.push(this._morpher);
+ }
+
+ return this._morpher;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ return Polygon;
+}(_Sprite__WEBPACK_IMPORTED_MODULE_0__.Sprite);
+
+
+/**
+ * Register class in system, so that it can be instantiated using its name from
+ * anywhere.
+ *
+ * @ignore
+ */
+
+_Registry__WEBPACK_IMPORTED_MODULE_2__.registry.registeredClasses.Polygon = Polygon;
+
+/***/ }),
+
+/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Polyline.js":
+/*!******************************************************************************!*\
+ !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/Polyline.js ***!
+ \******************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "Polyline": () => (/* binding */ Polyline)
+/* harmony export */ });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
+/* harmony import */ var _Sprite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Sprite */ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js");
+/* harmony import */ var _utils_Color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/Color */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Color.js");
+/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
+/* harmony import */ var _rendering_Path__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../rendering/Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");
+/* harmony import */ var _utils_Math__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
+/**
+ * Polyline module
+ */
+
+/**
+ * ============================================================================
+ * IMPORTS
+ * ============================================================================
+ * @hidden
+ */
+
+
+
+
+
+
+/**
+ * ============================================================================
+ * MAIN CLASS
+ * ============================================================================
+ * @hidden
+ */
+
+/**
+ * Draws a polyline.
+ *
+ * @see {@link IPolylineEvents} for a list of available events
+ * @see {@link IPolylineAdapters} for a list of available Adapters
+ */
+
+var Polyline =
+/** @class */
+function (_super) {
+ (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__extends)(Polyline, _super);
+ /**
+ * Constructor
+ */
+
+
+ function Polyline() {
+ var _this = _super.call(this) || this;
+ /**
+ * [_distance description]
+ *
+ * @todo Description
+ */
+
+
+ _this._distance = 0;
+ _this.className = "Polyline";
+ _this.element = _this.paper.add("path");
+ _this.shapeRendering = "auto";
+ _this.fill = (0,_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)();
+ _this.strokeOpacity = 1;
+
+ _this.applyTheme();
+
+ return _this;
+ }
+ /**
+ * Creats and adds an SVG path for the arc.
+ *
+ * @ignore Exclude from docs
+ */
+
+
+ Polyline.prototype.makePath = function () {
+ this._distance = 0;
+ var segments = this.segments;
+
+ if (segments && segments.length > 0) {
+ var path = "";
+
+ for (var i = 0, len = segments.length; i < len; i++) {
+ var points = segments[i];
+
+ if (points.length > 0) {
+ path += _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.moveTo(points[0]);
+
+ for (var p = 1; p < points.length; p++) {
+ var point = points[p];
+ path += _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.lineTo(point);
+ this._distance += _utils_Math__WEBPACK_IMPORTED_MODULE_4__.getDistance(points[p - 1], point);
+ }
+ }
+ }
+
+ this.path = path;
+ }
+
+ this._realSegments = segments;
+ };
+
+ Object.defineProperty(Polyline.prototype, "segments", {
+ /**
+ * @return Segments
+ */
+ get: function get() {
+ return this.getPropertyValue("segments");
+ },
+
+ /**
+ * A list of segment coordinates for the multi-part line.
+ *
+ * @todo Example
+ * @param segments Segments
+ */
+ set: function set(segments) {
+ this.setPropertyValue("segments", segments);
+ this.makePath();
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Polyline.prototype, "distance", {
+ /**
+ * [distance description]
+ *
+ * @todo Description
+ * @return [description]
+ */
+ get: function get() {
+ return this._distance;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ /**
+ * Converts relative position along the line (0-1) into pixel coordinates.
+ *
+ * @param position Position (0-1)
+ * @return Coordinates
+ */
+
+ Polyline.prototype.positionToPoint = function (position) {
+ var deltaAngle = 0;
+
+ if (position < 0) {
+ position = Math.abs(position);
+ deltaAngle = 180;
+ }
+
+ var segments = this._realSegments;
+
+ if (segments) {
+ var totalDistance = this.distance;
+ var currentDistance = 0;
+ var distanceAB = void 0;
+ var positionA = 0;
+ var positionB = 0;
+ var pointA = void 0;
+ var pointB = void 0;
+
+ for (var s = 0; s < segments.length; s++) {
+ var points = segments[s];
+
+ if (points.length > 1) {
+ for (var p = 1; p < points.length; p++) {
+ pointA = points[p - 1];
+ pointB = points[p];
+ positionA = currentDistance / totalDistance;
+ distanceAB = _utils_Math__WEBPACK_IMPORTED_MODULE_4__.getDistance(pointA, pointB);
+ currentDistance += distanceAB;
+ positionB = currentDistance / totalDistance;
+
+ if (positionA <= position && positionB > position) {
+ s = segments.length;
+ break;
+ }
+ }
+ } else if (points.length == 1) {
+ pointA = points[0];
+ pointB = points[0];
+ positionA = 0;
+ positionB = 1;
+ }
+ }
+
+ if (pointA && pointB) {
+ var positionAB = (position - positionA) / (positionB - positionA);
+ var midPoint = _utils_Math__WEBPACK_IMPORTED_MODULE_4__.getMidPoint(pointA, pointB, positionAB);
+ return {
+ x: midPoint.x,
+ y: midPoint.y,
+ angle: deltaAngle + _utils_Math__WEBPACK_IMPORTED_MODULE_4__.getAngle(pointA, pointB)
+ };
+ }
+ }
+
+ return {
+ x: 0,
+ y: 0,
+ angle: 0
+ };
+ };
+
+ Object.defineProperty(Polyline.prototype, "realSegments", {
+ /**
+ * @ignore
+ */
+ get: function get() {
+ return this._realSegments;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ return Polyline;
+}(_Sprite__WEBPACK_IMPORTED_MODULE_0__.Sprite);
+
+
+/**
+ * Register class in system, so that it can be instantiated using its name from
+ * anywhere.
+ *
+ * @ignore
+ */
+
+_Registry__WEBPACK_IMPORTED_MODULE_2__.registry.registeredClasses.Polyline = Polyline;
+
+/***/ }),
+
+/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Polyspline.js":
+/*!********************************************************************************!*\
+ !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/Polyspline.js ***!
+ \********************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "Polyspline": () => (/* binding */ Polyspline)
+/* harmony export */ });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
+/* harmony import */ var _Polyline__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Polyline */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Polyline.js");
+/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
+/* harmony import */ var _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
+/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
+/* harmony import */ var _core_rendering_Path__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../core/rendering/Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");
+/**
+ * Polyspline (smoothed line) module.
+ */
+
+/**
+ * ============================================================================
+ * IMPORTS
+ * ============================================================================
+ * @hidden
+ */
+
+
+
+
+
+
+/**
+ * ============================================================================
+ * MAIN CLASS
+ * ============================================================================
+ * @hidden
+ */
+
+/**
+ * Draws a polysline. (smoothed multi-sigment line)
+ *
+ * @see {@link IPolysplineEvents} for a list of available events
+ * @see {@link IPolysplineAdapters} for a list of available Adapters
+ */
+
+var Polyspline =
+/** @class */
+function (_super) {
+ (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__extends)(Polyspline, _super);
+ /**
+ * Constructor
+ */
+
+
+ function Polyspline() {
+ var _this = _super.call(this) || this;
+
+ _this.className = "Polyspline";
+ _this.tensionX = 0.5;
+ _this.tensionY = 0.5;
+
+ _this.applyTheme();
+
+ return _this;
+ }
+ /**
+ * Creats and adds an SVG path for the arc.
+ *
+ * @ignore Exclude from docs
+ */
+
+
+ Polyspline.prototype.makePath = function () {
+ this._distance = 0;
+ var segments = this.segments;
+ var tensionX = this.tensionX;
+ var tensionY = this.tensionY;
+ this.allPoints = [];
+
+ if (segments && segments.length > 0) {
+ var path = "";
+ this._realSegments = [];
+
+ for (var i = 0, len = segments.length; i < len; i++) {
+ var points = segments[i];
+ var realPoints = [];
+
+ this._realSegments.push(realPoints);
+
+ if (points.length > 0) {
+ var first = points[0];
+ var last = points[points.length - 1];
+ var closed_1 = false;
+
+ if (_core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.round(first.x, 3) == _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.round(last.x) && _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.round(first.y) == _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.round(last.y)) {
+ closed_1 = true;
+ }
+
+ path += _core_rendering_Path__WEBPACK_IMPORTED_MODULE_4__.moveTo(points[0]);
+
+ for (var p = 0; p < points.length - 1; p++) {
+ var p0 = points[p - 1];
+ var p1 = points[p];
+ var p2 = points[p + 1];
+ var p3 = points[p + 2];
+
+ if (p === 0) {
+ p0 = points[p];
+ } else if (p == points.length - 2) {
+ p3 = points[p + 1];
+ }
+
+ if (!p3) {
+ p3 = p2;
+ }
+
+ if (p === 0) {
+ if (closed_1) {
+ p0 = points[points.length - 2];
+ } else {
+ p0 = points[i];
+ }
+ } else if (p == points.length - 2) {
+ if (closed_1) {
+ p3 = points[1];
+ } else {
+ p3 = points[p + 1];
+ }
+ }
+
+ var controlPointA = _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.getCubicControlPointA(p0, p1, p2, p3, tensionX, tensionY);
+ var controlPointB = _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.getCubicControlPointB(p0, p1, p2, p3, tensionX, tensionY);
+ path += _core_rendering_Path__WEBPACK_IMPORTED_MODULE_4__.cubicCurveTo(p2, controlPointA, controlPointB); // now split to small segments so that we could have positionToPoint later
+
+ var stepCount = Math.ceil(_core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.getCubicCurveDistance(p1, p2, controlPointA, controlPointB, 20)) * 1.2;
+ var prevPoint = p1;
+
+ if (stepCount > 0) {
+ // not good for curved charts
+ //this.allPoints[0] = { x: points[0].x, y: points[0].y, angle: $math.getAngle(points[0], points[1]) };
+ //realPoints.push(this.allPoints[0]);
+ for (var s = 0; s <= stepCount; s++) {
+ var point = _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.getPointOnCubicCurve(p1, p2, controlPointA, controlPointB, s / stepCount);
+
+ if (point.x == prevPoint.x && point.y == prevPoint.y) {
+ continue;
+ }
+
+ realPoints.push(point);
+ var angle = _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.round(_core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.getAngle(prevPoint, point), 5); //this.allPoints.push({ x: point.x, y: point.y, angle: angle });
+
+ this._distance += _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.getDistance(prevPoint, point);
+ this.allPoints[Math.floor(this._distance)] = {
+ x: point.x,
+ y: point.y,
+ angle: angle
+ };
+ prevPoint = point;
+ }
+ } else {
+ realPoints.push(p0);
+ }
+ }
+ }
+
+ var allPoints = this.allPoints;
+
+ if (allPoints.length > 1) {
+ for (var i_1 = 0; i_1 < allPoints.length; i_1++) {
+ if (!allPoints[i_1]) {
+ if (i_1 > 1) {
+ allPoints[i_1] = allPoints[i_1 - 1];
+ } else {
+ for (var k = 1; k < allPoints.length; k++) {
+ if (allPoints[k]) {
+ allPoints[i_1] = allPoints[k];
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ this.path = path;
+ }
+ };
+ /**
+ * Returns an index of the point that is closest to specified coordinates.
+ *
+ * @param point Reference point
+ * @return Index
+ */
+
+
+ Polyspline.prototype.getClosestPointIndex = function (point) {
+ var points = this.allPoints;
+ var index;
+ var closest = Infinity;
+
+ if (points.length > 1) {
+ for (var p = 1; p < points.length; p++) {
+ var distance = _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.getDistance(point, points[p]);
+
+ if (distance < closest) {
+ index = p;
+ closest = distance;
+ }
+ }
+ }
+
+ return index;
+ };
+
+ Object.defineProperty(Polyspline.prototype, "tensionX", {
+ /**
+ * @return Tension
+ */
+ get: function get() {
+ return this.getPropertyValue("tensionX");
+ },
+
+ /**
+ * Horizontal tension for the spline.
+ *
+ * Used by the line smoothing algorithm.
+ *
+ * @default 0.5
+ * @param value Tension
+ */
+ set: function set(value) {
+ this.setPropertyValue("tensionX", value);
+ this.makePath();
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Polyspline.prototype, "tensionY", {
+ /**
+ * @return Tension
+ */
+ get: function get() {
+ return this.getPropertyValue("tensionY");
+ },
+
+ /**
+ * Vertical tension for the spline.
+ *
+ * Used by the line smoothing algorithm.
+ *
+ * @default 0.5
+ * @param value Tensions
+ */
+ set: function set(value) {
+ this.setPropertyValue("tensionY", value, true);
+ this.makePath();
+ },
+ enumerable: true,
+ configurable: true
+ });
+ /**
+ * Converts relative position along the line (0-1) into pixel coordinates.
+ *
+ * @param position Position (0-1)
+ * @return Coordinates
+ */
+
+ Polyspline.prototype.positionToPoint = function (position, extend) {
+ var deltaAngle = 0;
+ var allPoints = this.allPoints;
+ var len = allPoints.length;
+
+ if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_3__.isNumber(position)) {
+ position = 0;
+ }
+
+ if (len > 1) {
+ if (extend && len > 3) {
+ if (position < 0) {
+ if (position < -0.01) {
+ position = -0.01;
+ }
+
+ var f0 = allPoints[0];
+ var f1 = allPoints[1];
+ var x = f0.x - (f0.x - f1.x) * len * position;
+ var y = f0.y - (f0.y - f1.y) * len * position;
+ return {
+ x: x,
+ y: y,
+ angle: _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.getAngle(f0, f1)
+ };
+ } else if (position > 1) {
+ if (position > 1.01) {
+ position = 1.01;
+ }
+
+ var f0 = allPoints[allPoints.length - 2];
+ var f1 = allPoints[allPoints.length - 3];
+ var x = f0.x + (f0.x - f1.x) * len * (position - 1);
+ var y = f0.y + (f0.y - f1.y) * len * (position - 1);
+ return {
+ x: x,
+ y: y,
+ angle: _core_utils_Math__WEBPACK_IMPORTED_MODULE_2__.getAngle(f0, {
+ x: x,
+ y: y
+ })
+ };
+ } else if (position == 1) {
+ var point_1 = allPoints[allPoints.length - 1];
+ return {
+ x: point_1.x,
+ y: point_1.y,
+ angle: point_1.angle
+ };
+ }
+ } else {
+ if (position < 0) {
+ position = Math.abs(position);
+ deltaAngle = 180;
+ }
+
+ if (position >= 1) {
+ position = 0.9999999999999;
+ }
+ }
+
+ var point = allPoints[Math.floor(position * len)];
+ return {
+ x: point.x,
+ y: point.y,
+ angle: point.angle + deltaAngle
+ };
+ } else if (len == 1) {
+ var point = allPoints[0];
+ return {
+ x: point.x,
+ y: point.y,
+ angle: point.angle
+ };
+ } else {
+ return {
+ x: 0,
+ y: 0,
+ angle: 0
+ };
+ }
+ };
+
+ return Polyspline;
+}(_Polyline__WEBPACK_IMPORTED_MODULE_0__.Polyline);
+
+
+/**
+ * Register class in system, so that it can be instantiated using its name from
+ * anywhere.
+ *
+ * @ignore
+ */
+
+_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses.Polyspline = Polyspline;
+
+/***/ }),
+
+/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Popup.js":
+/*!***************************************************************************!*\
+ !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/Popup.js ***!
+ \***************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "Popup": () => (/* binding */ Popup)
+/* harmony export */ });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
+/* harmony import */ var _PopupCSS__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./PopupCSS */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/PopupCSS.js");
+/* harmony import */ var _utils_Adapter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/Adapter */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Adapter.js");
+/* harmony import */ var _Base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Base */ "./node_modules/@amcharts/amcharts4/.internal/core/Base.js");
+/* harmony import */ var _interaction_Interaction__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../interaction/Interaction */ "./node_modules/@amcharts/amcharts4/.internal/core/interaction/Interaction.js");
+/* harmony import */ var _utils_Keyboard__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/Keyboard */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Keyboard.js");
+/* harmony import */ var _utils_Disposer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/Disposer */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Disposer.js");
+/* harmony import */ var _utils_DOM__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/DOM */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/DOM.js");
+/* harmony import */ var _utils_Type__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
+/* harmony import */ var _utils_Object__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/Object */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Object.js");
+/**
+ * Popup class is used to display information over chart area.
+ */
+
+/**
+ * ============================================================================
+ * IMPORTS
+ * ============================================================================
+ * @hidden
+ */
+
+
+
+
+
+
+
+
+
+
+/**
+ * Shows an HTML popup which covers window or a chart area.
+ *
+ * @see {@link https://www.amcharts.com/docs/v4/concepts/popups-and-modals/} For examples and docs on Popups and Modals.
+ * @todo Positioning over whole window
+ */
+
+var Popup =
+/** @class */
+function (_super) {
+ (0,tslib__WEBPACK_IMPORTED_MODULE_9__.__extends)(Popup, _super);
+ /**
+ * Constructor
+ */
+
+
+ function Popup() {
+ var _this = _super.call(this) || this;
+ /**
+ * Adapter.
+ */
+
+
+ _this.adapter = new _utils_Adapter__WEBPACK_IMPORTED_MODULE_1__.Adapter(_this);
+ /**
+ * Holds references to various HTML elements, Popup consists of.
+ */
+
+ _this._elements = {};
+ /**
+ * Holdes Interaction objects for various Popup's elements.
+ */
+
+ _this._IOs = {};
+ /**
+ * Contents of popup window.
+ */
+
+ _this._content = "";
+ /**
+ * Title of the popup window.
+ */
+
+ _this._title = "";
+ /**
+ * Prefix to apply to class names for popup elements.
+ */
+
+ _this._classPrefix = "ampopup";
+ /**
+ * If set to `true` [[Popup]] will use default styles.
+ */
+
+ _this._defaultStyles = true;
+ /**
+ * If set to `true` [[Popup]] will dim out all chart content behind it by
+ * showing a semi-transparent fill. (curtain)
+ */
+
+ _this._showCurtain = false;
+ /**
+ * Indicates whether popup can be dragged.
+ */
+
+ _this._draggable = true;
+ /**
+ * Horizontal position of the content window.
+ */
+
+ _this._align = "center";
+ /**
+ * Resize popup as images are being loaded.
+ */
+
+ _this._dynamicResize = true;
+ /**
+ * Vertical position of the content window.
+ */
+
+ _this._verticalAlign = "middle";
+ /**
+ * Shift in position of the element. (used for dragging)
+ */
+
+ _this._shift = {
+ x: 0,
+ y: 0
+ };
+ /**
+ * Temporary shift in position of the element. (used for dragging)
+ */
+
+ _this._tempShift = {
+ x: 0,
+ y: 0
+ };
+ /**
+ * A title for screen readers. It is very highly recommended to set that title
+ * so that people using screen reader tools can get an immediate summary of
+ * the information in the popup.
+ */
+
+ _this._readerTitle = "";
+ /**
+ * Is popup closable?
+ */
+
+ _this._closable = true;
+ /**
+ * Was CSS already loaded?
+ */
+
+ _this._cssLoaded = false;
+ /**
+ * If set to other than "none" will try to re-adjust the position of the
+ * popop to fit within chart container or browser window.
+ *
+ * @ignore Feature not yet implemented
+ * @todo Implement
+ */
+
+ _this._fitTo = "window";
+ /**
+ * Identifies if this object is a "template" and should not be treated as
+ * real object that is drawn or actually used in the chart.
+ *
+ * @ignore Exclude from docs
+ */
+
+ _this.isTemplate = false;
+ /**
+ * Indicates if the element was already sized and should not be measured for
+ * size again, saving some precious resources.
+ */
+
+ _this._sized = false;
+ _this.className = "Popup";
+ return _this;
+ }
+ /**
+ * Shows popup window.
+ */
+
+
+ Popup.prototype.open = function () {
+ if (this.container) {
+ if (this._elements.wrapper) {
+ this.container.appendChild(this._elements.wrapper);
+ }
+
+ if (this._elements.curtain) {
+ this.container.appendChild(this._elements.curtain);
+ this.showCurtain = this.showCurtain;
+ }
+
+ this.positionElement();
+ this.dispatchImmediately("opened");
+ }
+ };
+ /**
+ * Hides popup window.
+ */
+
+
+ Popup.prototype.close = function () {
+ if (this._elements.wrapper) {
+ if (this._elements.wrapper.parentElement) {
+ this._elements.wrapper.parentElement.removeChild(this._elements.wrapper);
+ }
+ }
+
+ if (this._elements.curtain) {
+ if (this._elements.curtain.parentElement) {
+ this._elements.curtain.parentElement.removeChild(this._elements.curtain);
+ }
+ }
+
+ this.dispatchImmediately("closed");
+ this.releasePointers();
+ };
+ /**
+ * Destroy (dispose) popup.
+ */
+
+
+ Popup.prototype.dispose = function () {
+ this.close();
+
+ _super.prototype.dispose.call(this);
+ };
+ /**
+ * Positions content element in the center of popup based on its actual size.
+ *
+ * @ignore Exclude from docs
+ */
+
+
+ Popup.prototype.positionElement = function (forceResize) {
+ var _this = this;
+
+ if (forceResize === void 0) {
+ forceResize = true;
+ }
+
+ if (!this._elements.wrapper) {
+ return;
+ }
+
+ setTimeout(function () {
+ if (!_this._elements.wrapper) {
+ return;
+ }
+
+ if (forceResize || !_this._sized) {
+ _this._elements.wrapper.style.opacity = "0.01";
+ _this._elements.wrapper.style.left = "0";
+ _this._elements.wrapper.style.top = "0";
+ _this._elements.wrapper.style.margin = "0 0 0 0";
+ _this._elements.wrapper.style.width = "";
+ _this._elements.wrapper.style.height = "";
+
+ var bbox = _this._elements.wrapper.getBoundingClientRect();
+
+ _this._elements.wrapper.style.width = bbox.width + "px";
+ _this._elements.wrapper.style.height = bbox.height + "px";
+ _this._sized = true;
+ } // Check for any images that are not yet loaded
+
+
+ if (_this.dynamicResize) {
+ var images = _this._elements.wrapper.getElementsByTagName("img");
+
+ for (var i = 0; i < images.length; i++) {
+ var image = images[i];
+
+ if (!image.complete) {
+ // Resize popup once again when image is loaded
+ image.addEventListener("load", function () {
+ _this.positionElement(true);
+ }); // Do this for one image only as it will be checked again next time
+ // anyway
+
+ break;
+ }
+ }
+ }
+
+ setTimeout(function () {
+ if (!_this._elements.wrapper) {
+ return;
+ }
+
+ var bbox;
+
+ if ((forceResize || !_this._sized) && _this._bbox) {
+ bbox = _this._bbox;
+ } else {
+ bbox = _this._elements.wrapper.getBoundingClientRect();
+ _this._elements.wrapper.style.opacity = "";
+ } // Set horizontal positioning
+
+
+ switch (_this.align) {
+ case "left":
+ _this._elements.wrapper.style.left = "0";
+ _this._elements.wrapper.style.right = "auto";
+ _this._elements.wrapper.style.marginLeft = _this.toStyle(_this._shift.x + _this._tempShift.x);
+ break;
+
+ case "center":
+ _this._elements.wrapper.style.left = "50%";
+ _this._elements.wrapper.style.right = "auto";
+ _this._elements.wrapper.style.marginLeft = _this.toStyle(Math.round(-bbox.width / 2) + (_this._shift.x + _this._tempShift.x));
+ break;
+
+ case "right":
+ _this._elements.wrapper.style.left = "auto";
+ _this._elements.wrapper.style.right = "0";
+ _this._elements.wrapper.style.marginLeft = _this.toStyle(_this._shift.x + _this._tempShift.x);
+ break;
+
+ default:
+ _this._elements.wrapper.style.left = _this.toStyle(_this.left) || "auto";
+ _this._elements.wrapper.style.right = _this.toStyle(_this.right) || "auto";
+ _this._elements.wrapper.style.marginLeft = _this.toStyle(_this._shift.x + _this._tempShift.x);
+ break;
+ } // Set vertical positioning
+
+
+ switch (_this.verticalAlign) {
+ case "top":
+ _this._elements.wrapper.style.top = "0";
+ _this._elements.wrapper.style.bottom = "auto";
+ _this._elements.wrapper.style.marginTop = _this.toStyle(_this._shift.y + _this._tempShift.y);
+ break;
+
+ case "middle":
+ _this._elements.wrapper.style.top = "50%";
+ _this._elements.wrapper.style.bottom = "auto";
+ _this._elements.wrapper.style.marginTop = _this.toStyle(Math.round(-bbox.height / 2) + (_this._shift.y + _this._tempShift.y));
+ break;
+
+ case "bottom":
+ _this._elements.wrapper.style.top = "auto";
+ _this._elements.wrapper.style.bottom = "0";
+ _this._elements.wrapper.style.marginTop = _this.toStyle(_this._shift.y + _this._tempShift.y);
+ break;
+
+ default:
+ _this._elements.wrapper.style.top = _this.toStyle(_this.top) || "auto";
+ _this._elements.wrapper.style.bottom = _this.toStyle(_this.bottom) || "auto";
+ _this._elements.wrapper.style.marginTop = _this.toStyle(_this._shift.y + _this._tempShift.y);
+ break;
+ }
+ }, 1);
+ }, 1);
+ };
+
+ Popup.prototype.setupDragging = function () {
+ var _this = this;
+
+ if (this.draggable) {
+ if (!this._IOs.header.events.has("drag")) {
+ this._IOs.header.events.on("drag", function (ev) {
+ _this._tempShift.x = ev.shift.x;
+ _this._tempShift.y = ev.shift.y;
+
+ _this.positionElement(false);
+ });
+ }
+
+ if (!this._IOs.header.events.has("dragstop")) {
+ this._IOs.header.events.on("dragstop", function (ev) {
+ _this._shift.x += _this._tempShift.x;
+ _this._shift.y += _this._tempShift.y;
+ _this._tempShift.x = 0;
+ _this._tempShift.y = 0;
+
+ _this.positionElement(false);
+ });
+ }
+ } else {
+ if (this._IOs.header) {
+ (0,_interaction_Interaction__WEBPACK_IMPORTED_MODULE_3__.getInteraction)().unprepElement(this._IOs.header);
+
+ if (this._IOs.header.events.has("drag")) {
+ this._IOs.header.events.off("drag");
+ }
+
+ if (this._IOs.header.events.has("dragstop")) {
+ this._IOs.header.events.off("dragstop");
+ }
+ }
+ }
+ };
+
+ Popup.prototype.toStyle = function (value) {
+ if (!_utils_Type__WEBPACK_IMPORTED_MODULE_7__.hasValue(value)) {
+ return null;
+ } else if (_utils_Type__WEBPACK_IMPORTED_MODULE_7__.isNumber(value)) {
+ return "" + value + "px";
+ } else {
+ return value.toString();
+ }
+ };
+
+ Object.defineProperty(Popup.prototype, "classPrefix", {
+ /**
+ * A prefix that is applied to class names of various popup elements.
+ *
+ * @return Class name prefix
+ */
+ get: function get() {
+ return this.adapter.apply("classPrefix", this._classPrefix);
+ },
+
+ /**
+ * @param value Class name prefix
+ */
+ set: function set(value) {
+ this._classPrefix = value;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Popup.prototype, "classPrefixRaw", {
+ /**
+ * Returns raw prefix (without adapters applied).
+ *
+ * @ignore Exclude from docs
+ * @return Class name prefix
+ */
+ get: function get() {
+ return this._classPrefix;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Popup.prototype, "content", {
+ /**
+ * @return Popup content
+ */
+ get: function get() {
+ return this.adapter.apply("content", this._content);
+ },
+
+ /**
+ * Popup content.
+ *
+ * Popup content can be any valid HTML, including CSS.
+ *
+ * @param value Popup content
+ */
+ set: function set(value) {
+ if (this._content != value) {
+ this._content = value;
+
+ if (!this._elements.content) {
+ this.createContentElement();
+ }
+
+ this._elements.content.innerHTML = value;
+ this.positionElement();
+ }
+ },
+ enumerable: true,
+ configurable: true
+ });
+
+ Popup.prototype.getClassNames = function () {
+ return this.adapter.apply("classNames", {
+ wrapperClass: this.classPrefix + "",
+ headerClass: this.classPrefix + "-header",
+ titleClass: this.classPrefix + "-title",
+ contentClass: this.classPrefix + "-content",
+ insideClass: this.classPrefix + "-inside",
+ curtainClass: this.classPrefix + "-curtain",
+ closeClass: this.classPrefix + "-close"
+ });
+ };
+ /**
+ * Creates content element.
+ */
+
+
+ Popup.prototype.createContentElement = function () {
+ // Check if it's created already
+ if (this._elements.wrapper) {
+ return;
+ } // Get class names for popup elements
+
+
+ var classNames = this.getClassNames(); // Create content element
+
+ var wrapper = document.createElement("div");
+ wrapper.className = classNames.contentClass;
+ wrapper.style.opacity = "0.01"; // Create close button
+
+ var close = document.createElement("a");
+ close.className = classNames.closeClass; // header title
+
+ var header = document.createElement("div");
+ header.className = classNames.headerClass; // Content title
+
+ var title = document.createElement("div");
+ title.innerHTML = this.title;
+ title.className = classNames.titleClass;
+
+ if (!this.title) {
+ title.style.display = "none";
+ } // Content div
+
+
+ var content = document.createElement("div");
+ content.className = classNames.insideClass;
+ content.innerHTML = this.content; // Set up events for content
+
+ this._IOs.wrapper = (0,_interaction_Interaction__WEBPACK_IMPORTED_MODULE_3__.getInteraction)().getInteraction(wrapper);
+ this._IOs.header = (0,_interaction_Interaction__WEBPACK_IMPORTED_MODULE_3__.getInteraction)().getInteraction(header);
+
+ this._disposers.push(this._IOs.wrapper); // Set hover/out events
+
+
+ this._IOs.wrapper.events.on("over", this.disablePointers, this);
+
+ this._IOs.wrapper.events.on("out", this.releasePointers, this); // Create an InteractionObject for close
+
+
+ this._IOs.close = (0,_interaction_Interaction__WEBPACK_IMPORTED_MODULE_3__.getInteraction)().getInteraction(close);
+
+ this._disposers.push(this._IOs.close); // Hide close for now
+
+
+ close.style.visibility = "hidden"; // Add accessible stuff
+
+ wrapper.setAttribute("role", "dialog"); // Add to wrapper
+
+ header.appendChild(close);
+ header.appendChild(title);
+ wrapper.appendChild(header);
+ wrapper.appendChild(content);
+ this.container.appendChild(wrapper); // Save for later access
+
+ this._elements.wrapper = wrapper;
+ this._elements.header = header;
+ this._elements.content = content;
+ this._elements.title = title;
+ this._elements.close = close; // Load CSS
+
+ if (this.defaultStyles) {
+ this.loadDefaultCSS();
+ } // Create curtain as well
+
+
+ this.createCurtainElement(); // Apply events
+
+ this.applyEvents();
+ this.applyReaderSettings(); // Draggable?
+
+ this.setupDragging();
+ };
+
+ Object.defineProperty(Popup.prototype, "title", {
+ /**
+ * @return Popup title
+ */
+ get: function get() {
+ return this.adapter.apply("title", this._title);
+ },
+
+ /**
+ * Popup title.
+ *
+ * Popup title can be any valid HTML, including CSS.
+ *
+ * @param value Popup title
+ */
+ set: function set(value) {
+ if (this._title != value) {
+ this._title = value;
+
+ if (!this._elements.content) {
+ this.createContentElement();
+ }
+
+ this._elements.title.innerHTML = value;
+ this.positionElement();
+ this.applyReaderSettings();
+ }
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Popup.prototype, "readerTitle", {
+ /**
+ * @return Popup content
+ */
+ get: function get() {
+ return this.adapter.apply("readerTitle", this._readerTitle != "" ? this._readerTitle : this.title);
+ },
+
+ /**
+ * A title for screen readers. It is very highly recommended to set that title
+ * so that people using screen reader tools can get an immediate summary of
+ * the information in the popup.
+ *
+ * @param value Reader title
+ */
+ set: function set(value) {
+ if (this._readerTitle != value) {
+ this._readerTitle = value;
+ this.applyReaderSettings();
+ }
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Popup.prototype, "closable", {
+ /**
+ * @return Closable?
+ */
+ get: function get() {
+ return this.adapter.apply("closable", this._closable);
+ },
+
+ /**
+ * Is popup closable?
+ *
+ * If it is, it can be closed in a number of ways, e.g. by hitting ESC key,
+ * clicking curtain, or clicking the close button.
+ *
+ * If it is not closable, the only way to close it is via `close()` call.
+ *
+ * @param value Closable?
+ */
+ set: function set(value) {
+ if (value !== this._closable) {
+ this._closable = value;
+ this.applyEvents();
+ }
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Popup.prototype, "fitTo", {
+ /**
+ * @ignore
+ * @todo Implement
+ * @return Fit option
+ */
+ get: function get() {
+ return this.adapter.apply("fitTo", this._fitTo);
+ },
+
+ /**
+ * If set to other than "none" will try to re-adjust the position of the
+ * popop to fit within chart container or browser window.
+ *
+ * @ignore
+ * @todo Implement
+ * @default "window"
+ * @param value Fit option
+ */
+ set: function set(value) {
+ if (value != this._fitTo) {
+ this._fitTo = value;
+ this.positionElement();
+ }
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Popup.prototype, "defaultStyles", {
+ /**
+ * @return Use default CSS?
+ */
+ get: function get() {
+ return this.adapter.apply("defaultStyles", this._defaultStyles);
+ },
+
+ /**
+ * Should popup use default CSS?
+ *
+ * If default CSS is disabled, an external CSS should handle the look of the
+ * popup, since it will look quite out of place otherwise.
+ *
+ * @default true
+ * @param Use default CSS?
+ */
+ set: function set(value) {
+ if (this._defaultStyles != value) {
+ this._defaultStyles = value;
+ }
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Popup.prototype, "showCurtain", {
+ /**
+ * @return Show curtain?
+ */
+ get: function get() {
+ return this.adapter.apply("showCurtain", this._showCurtain);
+ },
+
+ /**
+ * Should popup use dim out all content behind it?
+ *
+ * @default false
+ * @param Show curtain?
+ */
+ set: function set(value) {
+ if (this._showCurtain != value) {
+ this._showCurtain = value;
+
+ if (this._elements.curtain) {
+ this._elements.curtain.style.display = value ? "block" : "none";
+ }
+ }
+ },
+ enumerable: true,
+ configurable: true
+ });
+ /**
+ * Creates curtain element.
+ */
+
+ Popup.prototype.createCurtainElement = function () {
+ // Get class names for popup elements
+ var classNames = this.getClassNames(); // Create the curtain
+
+ var curtain = document.createElement("div");
+ curtain.className = classNames.curtainClass; // Append curtain to wrapper
+
+ this.container.appendChild(curtain); // Create an InteractionObject for curtain because we might need to
+ // set interactions on it
+
+ this._IOs.curtain = (0,_interaction_Interaction__WEBPACK_IMPORTED_MODULE_3__.getInteraction)().getInteraction(curtain); // Add Curtain IO to disposers
+
+ this._disposers.push(this._IOs.curtain); // Set events to disable underlying interactivity
+
+
+ this._IOs.curtain.events.on("over", this.disablePointers, this);
+
+ this._IOs.curtain.events.on("out", this.releasePointers, this); // Hide it?
+
+
+ curtain.style.display = this.showCurtain ? "block" : "none"; // Save for later
+
+ this._elements.curtain = curtain;
+ };
+
+ Object.defineProperty(Popup.prototype, "draggable", {
+ /**
+ * @return Show curtain?
+ */
+ get: function get() {
+ return this.adapter.apply("draggable", this._draggable);
+ },
+
+ /**
+ * Can the popup be dragged with a pointer?
+ *
+ * @default false
+ * @param Show curtain?
+ */
+ set: function set(value) {
+ if (this._draggable != value) {
+ this._draggable = value;
+ this.setupDragging();
+ }
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Popup.prototype, "dynamicResize", {
+ /**
+ * @return Resize dynamically?
+ */
+ get: function get() {
+ return this.adapter.apply("dynamicResize", this._dynamicResize);
+ },
+
+ /**
+ * Resize popup as images are being loaded.
+ *
+ * @default true
+ * @since 4.9.17
+ * @param Resize dynamically?
+ */
+ set: function set(value) {
+ if (this._dynamicResize != value) {
+ this._dynamicResize = value;
+ this.positionElement(true);
+ }
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Popup.prototype, "align", {
+ /**
+ * @return Horizontal position
+ */
+ get: function get() {
+ return this.adapter.apply("align", this._align);
+ },
+
+ /**
+ * Horizontal positioning of the content window.
+ *
+ * Available options: "left", "center" (default), "right", and "none".
+ *
+ * @default "center"
+ * @param Horizontal position
+ */
+ set: function set(value) {
+ if (this._align != value) {
+ this._align = value;
+ this.positionElement();
+ }
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Popup.prototype, "verticalAlign", {
+ /**
+ * @return Vertical position
+ */
+ get: function get() {
+ return this.adapter.apply("verticalAlign", this._verticalAlign);
+ },
+
+ /**
+ * Vertical positioning of the content window.
+ *
+ * Available options: "top", "middle" (default), "bottom", and "none".
+ *
+ * @default "middle"
+ * @param Vertical position
+ */
+ set: function set(value) {
+ if (this._verticalAlign != value) {
+ this._verticalAlign = value;
+ this.positionElement();
+ }
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Popup.prototype, "left", {
+ /**
+ * @return Left
+ */
+ get: function get() {
+ return this.adapter.apply("left", this._left);
+ },
+
+ /**
+ * "left" coordinate of a non-aligned (`align = "none"`) popup.
+ *
+ * Can be either absolute pixel value, or relative (`Percent`).
+ *
+ * Setting this property will automatically set `align` to "none".
+ *
+ * NOTE: The position is relative to the chart container.
+ *
+ * @param Left
+ */
+ set: function set(value) {
+ if (this.left != value) {
+ this._left = value;
+ this._align = "none";
+ this.positionElement();
+ }
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Popup.prototype, "right", {
+ /**
+ * @return Right
+ */
+ get: function get() {
+ return this.adapter.apply("right", this._right);
+ },
+
+ /**
+ * "right" coordinate of a non-aligned (`align = "none"`) popup.
+ *
+ * Can be either absolute pixel value, or relative (`Percent`).
+ *
+ * Setting this property will automatically set `align` to "none".
+ *
+ * NOTE: The position is relative to the chart container.
+ *
+ * @param Right
+ */
+ set: function set(value) {
+ if (this.right != value) {
+ this._right = value;
+ this._align = "none";
+ this.positionElement();
+ }
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Popup.prototype, "top", {
+ /**
+ * @return Top
+ */
+ get: function get() {
+ return this.adapter.apply("top", this._top);
+ },
+
+ /**
+ * "top" coordinate of a non-aligned (`verticalAlign = "none"`) popup.
+ *
+ * Can be either absolute pixel value, or relative (`Percent`).
+ *
+ * Setting this property will automatically set `verticalAlign` to "none".
+ *
+ * NOTE: The position is relative to the chart container.
+ *
+ * @param Top
+ */
+ set: function set(value) {
+ if (this.top != value) {
+ this._top = value;
+ this._verticalAlign = "none";
+ this.positionElement();
+ }
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Popup.prototype, "bottom", {
+ /**
+ * @return Bottom
+ */
+ get: function get() {
+ return this.adapter.apply("bottom", this._bottom);
+ },
+
+ /**
+ * "bottom" coordinate of a non-aligned (`verticalAlign = "none"`) popup.
+ *
+ * Can be either absolute pixel value, or relative (`Percent`).
+ *
+ * Setting this property will automatically set `verticalAlign` to "none".
+ *
+ * NOTE: The position is relative to the chart container.
+ *
+ * @param Bottom
+ */
+ set: function set(value) {
+ if (this.bottom != value) {
+ this._bottom = value;
+ this._verticalAlign = "none";
+ this.positionElement();
+ }
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Popup.prototype, "elements", {
+ /**
+ * Returns an object with references to various elements of the Popup.
+ *
+ * * `wrapper`
+ * * `title`
+ * * `content`
+ * * `close`
+ * * `curtain`
+ */
+ get: function get() {
+ return this._elements;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ /**
+ * Loads popup CSS.
+ *
+ * @ignore Exclude from docs
+ */
+
+ Popup.prototype.loadDefaultCSS = function () {
+ if (!this._cssLoaded) {
+ this._disposers.push((0,_PopupCSS__WEBPACK_IMPORTED_MODULE_0__["default"])((0,_utils_DOM__WEBPACK_IMPORTED_MODULE_6__.getShadowRoot)(this.container), this.classPrefix));
+
+ _utils_Object__WEBPACK_IMPORTED_MODULE_8__.each(this._elements, function (key, el) {
+ el.style.display = "";
+ });
+ this._cssLoaded = true;
+ }
+ };
+ /**
+ * If popup is closable, this method adds various events to popup elements.
+ */
+
+
+ Popup.prototype.applyEvents = function () {
+ var _this = this;
+
+ if (this._IOs.close) {
+ if (this.closable) {
+ this._IOs.close.element.style.visibility = "visible";
+ var disposers = [(0,_interaction_Interaction__WEBPACK_IMPORTED_MODULE_3__.getInteraction)().body.events.on("keyup", function (ev) {
+ if (_utils_Keyboard__WEBPACK_IMPORTED_MODULE_4__.keyboard.isKey(ev.event, "esc") && _this.closable) {
+ _this.close();
+ }
+ }), this._IOs.close.events.on("hit", function (ev) {
+ _this.close();
+ })];
+ disposers.push(this._IOs.curtain.events.on("hit", function (ev) {
+ if (_this.showCurtain && _this.closable) {
+ _this.close();
+ }
+ }));
+
+ this._disposers.push(new _utils_Disposer__WEBPACK_IMPORTED_MODULE_5__.MultiDisposer(disposers));
+ } else {
+ this._IOs.close.element.style.visibility = "hidden";
+ }
+ }
+ };
+ /**
+ * Disables interactivity on parent chart.
+ */
+
+
+ Popup.prototype.disablePointers = function () {
+ if (this.sprite) {
+ this._spriteInteractionsEnabled = this.sprite.interactionsEnabled;
+ this.sprite.interactionsEnabled = false;
+ }
+ };
+ /**
+ * Releases temporarily disabled pointers on parent chart.
+ */
+
+
+ Popup.prototype.releasePointers = function () {
+ if (_utils_Type__WEBPACK_IMPORTED_MODULE_7__.hasValue(this._spriteInteractionsEnabled)) {
+ this.sprite.interactionsEnabled = this._spriteInteractionsEnabled;
+ this._spriteInteractionsEnabled = undefined;
+ }
+ };
+ /**
+ * Sets screen reader related settings.
+ */
+
+
+ Popup.prototype.applyReaderSettings = function () {
+ this.elements.wrapper.setAttribute("aria-label", this.readerTitle);
+ };
+ /**
+ * Copies all properties and related data from different element.
+ *
+ * @param object Source element
+ */
+
+
+ Popup.prototype.copyFrom = function (source) {
+ _super.prototype.copyFrom.call(this, source);
+
+ this.container = source.container;
+ this.sprite = source.sprite;
+ this.classPrefix = source.classPrefixRaw;
+ this.content = source.content;
+ this.title = source.title;
+ this.readerTitle = source.readerTitle;
+ this.defaultStyles = source.defaultStyles;
+ this.showCurtain = source.showCurtain;
+ this.align = source.align;
+ this.verticalAlign = source.verticalAlign;
+ this.left = source.left;
+ this.right = source.right;
+ this.top = source.top;
+ this.bottom = source.bottom;
+ this.adapter.copyFrom(source.adapter);
+ };
+
+ return Popup;
+}(_Base__WEBPACK_IMPORTED_MODULE_2__.BaseObjectEvents);
+
+
+
+/***/ }),
+
+/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/PopupCSS.js":
+/*!******************************************************************************!*\
+ !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/PopupCSS.js ***!
+ \******************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* export default binding */ __WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _utils_DOM__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/DOM */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/DOM.js");
+/* harmony import */ var _utils_Dictionary__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/Dictionary */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Dictionary.js");
+/* harmony import */ var _utils_Disposer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/Disposer */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Disposer.js");
+/* harmony import */ var _utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/InterfaceColorSet */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/InterfaceColorSet.js");
+
+
+
+
+var rules = new _utils_Dictionary__WEBPACK_IMPORTED_MODULE_1__.Dictionary();
+/**
+ * Default CSS for Popup.
+ *
+ * @ignore Exclude from docs
+ * @param prefix Prefix for CSS classes
+ * @return Disposer for the CSS definition
+ */
+
+/* harmony default export */ function __WEBPACK_DEFAULT_EXPORT__(element, prefix) {
+ if (!prefix) {
+ prefix = "ampopup";
+ }
+
+ var cs = new _utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_3__.InterfaceColorSet();
+ var fg = cs.getFor("text");
+ var bg = cs.getFor("background");
+ bg.alpha = 0.8;
+ var abg = cs.getFor("alternativeBackground");
+ abg.alpha = 0.05;
+ var counter = rules.insertKeyIfEmpty(prefix, function () {
+ var disposer = new _utils_Disposer__WEBPACK_IMPORTED_MODULE_2__.MultiDisposer([new _utils_DOM__WEBPACK_IMPORTED_MODULE_0__.StyleRule(element, "." + prefix, {
+ //"width": "100%",
+ //"height": "100%",
+ "overflow": "visible",
+ "position": "absolute",
+ "top": "0",
+ "left": "0",
+ "z-index": "2000"
+ }), new _utils_DOM__WEBPACK_IMPORTED_MODULE_0__.StyleRule(element, "." + prefix + "-curtain", {
+ "width": "100%",
+ "height": "100%",
+ "position": "absolute",
+ "top": "0",
+ "left": "0",
+ "z-index": "2001",
+ "background-color": bg.hex,
+ "opacity": "0.5"
+ }), new _utils_DOM__WEBPACK_IMPORTED_MODULE_0__.StyleRule(element, "." + prefix + "-header", {
+ "display": "block",
+ "width": "100%",
+ "min-height": "1.8em",
+ "background": abg.rgba
+ }), new _utils_DOM__WEBPACK_IMPORTED_MODULE_0__.StyleRule(element, "." + prefix + "-title", {
+ "font-weight": "bold",
+ "font-size": "110%",
+ "padding": "0.5em 1.2em 0.5em 1em"
+ }), new _utils_DOM__WEBPACK_IMPORTED_MODULE_0__.StyleRule(element, "." + prefix + "-content", {
+ /*"width": "100%",
+ "height": "100%",*/
+ // "padding": "2em 1em 1em 1em",
+ "background": bg.hex,
+ "background-color": bg.rgba,
+ "color": fg.hex,
+ "display": "inline-block",
+ "position": "absolute",
+ "top": "0",
+ "left": "0",
+ "max-width": "90%",
+ "max-height": "90%",
+ "overflow": "auto",
+ "z-index": "2002"
+ }), new _utils_DOM__WEBPACK_IMPORTED_MODULE_0__.StyleRule(element, "." + prefix + "-inside", {
+ "padding": "1em"
+ }), new _utils_DOM__WEBPACK_IMPORTED_MODULE_0__.StyleRule(element, "." + prefix + "-close", {
+ "display": "block",
+ "position": "absolute",
+ "top": "0.3em",
+ "right": "0.3em",
+ "background-color": "rgb(100, 100, 100)",
+ "background": "rgba(100, 100, 100, 0.1) url(data:image/svg+xml;charset=utf-8;base64,PHN2ZyBoZWlnaHQ9IjUxMiIgdmVyc2lvbj0iMSIgdmlld0JveD0iMCAwIDUxMiA1MTIiIHdpZHRoPSI1MTIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTQ0NS4yIDEwOS4ybC00Mi40LTQyLjRMMjU2IDIxMy42IDEwOS4yIDY2LjhsLTQyLjQgNDIuNEwyMTMuNiAyNTYgNjYuOCA0MDIuOGw0Mi40IDQyLjRMMjU2IDI5OC40bDE0Ni44IDE0Ni44IDQyLjQtNDIuNEwyOTguNCAyNTYiLz48L3N2Zz4=) no-repeat center",
+ "background-size": "80%",
+ "width": "1.2em",
+ "height": "1.2em",
+ "cursor": "pointer"
+ })]);
+ return new _utils_Disposer__WEBPACK_IMPORTED_MODULE_2__.CounterDisposer(function () {
+ rules.removeKey(prefix);
+ disposer.dispose();
+ });
+ });
+ return counter.increment();
+}
+
+/***/ }),
+
+/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Preloader.js":
+/*!*******************************************************************************!*\
+ !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/Preloader.js ***!
+ \*******************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "Preloader": () => (/* binding */ Preloader)
+/* harmony export */ });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
+/* harmony import */ var _Container__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Container */ "./node_modules/@amcharts/amcharts4/.internal/core/Container.js");
+/* harmony import */ var _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/utils/InterfaceColorSet */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/InterfaceColorSet.js");
+/* harmony import */ var _Slice__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Slice */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Slice.js");
+/* harmony import */ var _Label__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Label */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Label.js");
+/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
+/* harmony import */ var _core_utils_Percent__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../core/utils/Percent */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Percent.js");
+/**
+ * Preloader module.
+ *
+ * Preloader is a progress indicator.
+ */
+
+/**
+ * ============================================================================
+ * IMPORTS
+ * ============================================================================
+ * @hidden
+ */
+
+
+
+
+
+
+
+/**
+ * ============================================================================
+ * MAIN CLASS
+ * ============================================================================
+ * @hidden
+ */
+
+/**
+ * A class used to draw and display progress indicator.
+ *
+ * @see {@link IPreloaderEvents} for a list of available events
+ * @see {@link IPreloaderAdapters} for a list of available Adapters
+ */
+
+var Preloader =
+/** @class */
+function (_super) {
+ (0,tslib__WEBPACK_IMPORTED_MODULE_6__.__extends)(Preloader, _super);
+ /**
+ * Constructor
+ */
+
+
+ function Preloader() {
+ var _this = // Init
+ _super.call(this) || this;
+
+ _this.className = "Preloader"; // Set dimensions
+
+ _this.width = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_5__.percent)(100);
+ _this.height = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_5__.percent)(100);
+ var interfaceColors = new _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_1__.InterfaceColorSet(); // Create main container
+
+ var sliceContainer = _this.createChild(_Container__WEBPACK_IMPORTED_MODULE_0__.Container);
+
+ sliceContainer.shouldClone = false; // Add background (100%) slice
+
+ var backgroundSlice = sliceContainer.createChild(_Slice__WEBPACK_IMPORTED_MODULE_2__.Slice);
+ backgroundSlice.shouldClone = false;
+ backgroundSlice.radius = 53;
+ backgroundSlice.arc = 360;
+ backgroundSlice.fill = interfaceColors.getFor("fill");
+ backgroundSlice.fillOpacity = 0.8;
+ backgroundSlice.innerRadius = 42;
+ backgroundSlice.isMeasured = false;
+ _this.backgroundSlice = backgroundSlice; // Add progress slice
+
+ var progressSlice = sliceContainer.createChild(_Slice__WEBPACK_IMPORTED_MODULE_2__.Slice);
+ progressSlice.shouldClone = false;
+ progressSlice.radius = 50;
+ progressSlice.innerRadius = 45;
+ progressSlice.fill = interfaceColors.getFor("alternativeBackground");
+ progressSlice.fillOpacity = 0.2;
+ progressSlice.isMeasured = false;
+ _this.progressSlice = progressSlice; // Add text label element
+
+ var label = sliceContainer.createChild(_Label__WEBPACK_IMPORTED_MODULE_3__.Label);
+ label.shouldClone = false;
+ label.horizontalCenter = "middle";
+ label.verticalCenter = "middle";
+ label.isMeasured = false;
+ label.fill = interfaceColors.getFor("text");
+ label.align = "center";
+ label.valign = "middle";
+ label.textAlign = "middle";
+ label.fillOpacity = 0.4;
+ _this.label = label; // Set defaults
+
+ _this.background.opacity = 1;
+ _this.background.fill = interfaceColors.getFor("background");
+ _this.contentAlign = "center";
+ _this.contentValign = "middle";
+ _this.delay = 300; // Create hidden state
+
+ var hiddenState = _this.states.create("hidden");
+
+ hiddenState.properties.opacity = 0; // Hide by default
+
+ _this.visible = false;
+
+ _this.hide(0);
+
+ _this.__disabled = true; // Make it disposable
+ // @todo Maybe it's enough to just dispose `sliceContainer`?
+
+ _this._disposers.push(_this.backgroundSlice);
+
+ _this._disposers.push(_this.progressSlice);
+
+ _this._disposers.push(_this.label);
+
+ _this._disposers.push(sliceContainer);
+
+ return _this;
+ }
+
+ Object.defineProperty(Preloader.prototype, "progress", {
+ /**
+ * @return Progress (0-1)
+ */
+ get: function get() {
+ return this.getPropertyValue("progress");
+ },
+
+ /**
+ * Current preload progress. (0-1)
+ *
+ * * 0 - 0%
+ * * 0.5 - 50%
+ * * 1 - 100%
+ *
+ * Setting this to a value less than 1, will automatically reveal the
+ * preloader, while setting it to 1 (100%) will hide it.
+ *
+ * @param value Progress (0-1)
+ */
+ set: function set(value) {
+ var _this = this;
+
+ this.__disabled = false;
+ this.validateLayout(); // show not in center without this
+
+ this.setPropertyValue("progress", value);
+ /*if (!this.visible && value == 1) {
+ return;
+ }*/
+
+ this.progressSlice.arc = 360 * value;
+
+ if (this.label) {
+ this.label.text = Math.round(value * 100) + "%";
+ }
+
+ if (value >= 1) {
+ // Cancel the timeout
+ if (this._started) {
+ this._started = undefined;
+ } // TODO remove closure ?
+
+
+ _Registry__WEBPACK_IMPORTED_MODULE_4__.registry.events.once("enterframe", function () {
+ var animation = _this.hide();
+
+ if (animation && !animation.isFinished()) {
+ animation.events.once("animationended", function () {
+ _this.__disabled = true;
+ });
+ } else {
+ _this.__disabled = true;
+ }
+ });
+ this.interactionsEnabled = false;
+ this.setPropertyValue("progress", 0);
+ } else if (value > 0) {
+ if (this.delay) {
+ if (!this._started) {
+ this._started = new Date().getTime();
+ } else if (this._started + this.delay <= new Date().getTime()) {
+ this.__disabled = false;
+ this.show();
+ this.interactionsEnabled = true;
+ }
+ } else {
+ this.__disabled = false;
+ this.show();
+ this.interactionsEnabled = true;
+ }
+ }
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Preloader.prototype, "delay", {
+ /**
+ * @return Delay (ms)
+ */
+ get: function get() {
+ return this.getPropertyValue("delay");
+ },
+
+ /**
+ * Delay display of preloader by X milliseconds.
+ *
+ * When loading starts (`progress` is set to <1) and finishes (`progress` is
+ * set to 1) before `delay` ms, the loader is never shown.
+ *
+ * This is used to avoid brief flashing of the preload for very quick loads.
+ *
+ * @default 1000
+ * @param value Delay (ms)
+ */
+ set: function set(value) {
+ this.setPropertyValue("delay", value);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ return Preloader;
+}(_Container__WEBPACK_IMPORTED_MODULE_0__.Container);
+
+
+/**
+ * Register class in system, so that it can be instantiated using its name from
+ * anywhere.
+ *
+ * @ignore
+ */
+
+_Registry__WEBPACK_IMPORTED_MODULE_4__.registry.registeredClasses.Preloader = Preloader;
+
+/***/ }),
+
+/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/QuadraticCurve.js":
+/*!************************************************************************************!*\
+ !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/QuadraticCurve.js ***!
+ \************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "QuadraticCurve": () => (/* binding */ QuadraticCurve)
+/* harmony export */ });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
+/* harmony import */ var _Line__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Line */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Line.js");
+/* harmony import */ var _utils_Color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/Color */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Color.js");
+/* harmony import */ var _rendering_Path__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../rendering/Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");
+/* harmony import */ var _utils_Math__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
+/* harmony import */ var _utils_Type__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
+/**
+ * Functionality for drawing quadratic curves.
+ */
+
+/**
+ * ============================================================================
+ * IMPORTS
+ * ============================================================================
+ * @hidden
+ */
+
+
+
+
+
+
+/**
+ * ============================================================================
+ * MAIN CLASS
+ * ============================================================================
+ * @hidden
+ */
+
+/**
+ * Draws a waved line.
+ *
+ * @see {@link IQuadraticCurveEvents} for a list of available events
+ * @see {@link IQuadraticCurveAdapters} for a list of available Adapters
+ */
+
+var QuadraticCurve =
+/** @class */
+function (_super) {
+ (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__extends)(QuadraticCurve, _super);
+ /**
+ * Constructor
+ */
+
+
+ function QuadraticCurve() {
+ var _this = _super.call(this) || this;
+
+ _this.className = "QuadraticCurve";
+ _this.element = _this.paper.add("path");
+ _this.pixelPerfect = false;
+ _this.fill = (0,_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)();
+
+ _this.applyTheme();
+
+ return _this;
+ }
+ /**
+ * Draws the waved line.
+ *
+ * @ignore Exclude from docs
+ */
+
+
+ QuadraticCurve.prototype.draw = function () {
+ //super.draw();
+ if (_utils_Type__WEBPACK_IMPORTED_MODULE_4__.isNumber(this.x1 + this.x2 + this.y1 + this.y2 + this.cpx + this.cpy)) {
+ var p1 = {
+ x: this.x1,
+ y: this.y1
+ };
+ var p2 = {
+ x: this.x2,
+ y: this.y2
+ };
+ var cp = {
+ x: this.cpx,
+ y: this.cpy
+ };
+ var d = _rendering_Path__WEBPACK_IMPORTED_MODULE_2__.moveTo(p1) + _rendering_Path__WEBPACK_IMPORTED_MODULE_2__.quadraticCurveTo(p2, cp);
+ this.path = d;
+ }
+ };
+
+ Object.defineProperty(QuadraticCurve.prototype, "cpx", {
+ /**
+ * @return X
+ */
+ get: function get() {
+ return this.getPropertyValue("cpx");
+ },
+
+ /**
+ * X coordinate of control point.
+ *
+ * @param value X
+ */
+ set: function set(value) {
+ this.setPropertyValue("cpx", value, true);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(QuadraticCurve.prototype, "cpy", {
+ /**
+ * @return Y
+ */
+ get: function get() {
+ return this.getPropertyValue("cpy");
+ },
+
+ /**
+ * Y coordinate of control point.
+ *
+ * @param value Y
+ */
+ set: function set(value) {
+ this.setPropertyValue("cpy", value, true);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ /**
+ * Converts relative position along the line (0-1) into pixel coordinates.
+ *
+ * @param position Position (0-1)
+ * @return Coordinates
+ */
+
+ QuadraticCurve.prototype.positionToPoint = function (position) {
+ var p1 = {
+ x: this.x1,
+ y: this.y1
+ };
+ var cp = {
+ x: this.cpx,
+ y: this.cpy
+ };
+ var p2 = {
+ x: this.x2,
+ y: this.y2
+ };
+ var point1 = _utils_Math__WEBPACK_IMPORTED_MODULE_3__.getPointOnQuadraticCurve(p1, p2, cp, position);
+ var point2 = _utils_Math__WEBPACK_IMPORTED_MODULE_3__.getPointOnQuadraticCurve(p1, p2, cp, position + 0.001);
+ return {
+ x: point1.x,
+ y: point1.y,
+ angle: _utils_Math__WEBPACK_IMPORTED_MODULE_3__.getAngle(point1, point2)
+ };
+ };
+
+ return QuadraticCurve;
+}(_Line__WEBPACK_IMPORTED_MODULE_0__.Line);
+
+
+
+/***/ }),
+
+/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Rectangle.js":
+/*!*******************************************************************************!*\
+ !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/Rectangle.js ***!
+ \*******************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "Rectangle": () => (/* binding */ Rectangle)
+/* harmony export */ });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
+/* harmony import */ var _Sprite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Sprite */ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js");
+/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
+/* harmony import */ var _utils_Math__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
+/**
+ * Functionality for drawing rectangles.
+ */
+
+/**
+ * ============================================================================
+ * IMPORTS
+ * ============================================================================
+ * @hidden
+ */
+
+
+
+
+/**
+ * ============================================================================
+ * MAIN CLASS
+ * ============================================================================
+ * @hidden
+ */
+
+/**
+ * Used to draw a rectangle.
+ *
+ * @see {@link IRectangleEvents} for a list of available events
+ * @see {@link IRectangleAdapters} for a list of available Adapters
+ */
+
+var Rectangle =
+/** @class */
+function (_super) {
+ (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__extends)(Rectangle, _super);
+ /**
+ * Constructor
+ * * Creates a `
` element
+ * * Creates default state
+ */
+
+
+ function Rectangle() {
+ var _this = _super.call(this) || this;
+
+ _this.className = "Rectangle";
+ _this.element = _this.paper.add("rect"); //this.pixelPerfect = false;
+
+ _this.applyTheme();
+
+ return _this;
+ }
+ /**
+ * Draws the element.
+ *
+ * @ignore Exclude from docs
+ */
+
+
+ Rectangle.prototype.draw = function () {
+ _super.prototype.draw.call(this);
+
+ var precision = this._positionPrecision;
+
+ if (this.pixelPerfect) {
+ precision = 0;
+ }
+
+ var w = _utils_Math__WEBPACK_IMPORTED_MODULE_2__.round(this.innerWidth, precision);
+ var h = _utils_Math__WEBPACK_IMPORTED_MODULE_2__.round(this.innerHeight, precision);
+ this.element.attr({
+ "width": w,
+ "height": h
+ });
+ };
+ /**
+ * Measures the element.
+ *
+ * @ignore Exclude from docs
+ */
+
+
+ Rectangle.prototype.measureElement = function () {};
+
+ Object.defineProperty(Rectangle.prototype, "bbox", {
+ /**
+ * Returns bounding box (square) for this element.
+ *
+ * @ignore Exclude from docs
+ */
+ get: function get() {
+ if (this.definedBBox) {
+ return this.definedBBox;
+ }
+
+ if (this.isMeasured) {
+ return {
+ x: 0,
+ y: 0,
+ width: this.innerWidth,
+ height: this.innerHeight
+ };
+ } else {
+ return {
+ x: 0,
+ y: 0,
+ width: 0,
+ height: 0
+ };
+ }
+ },
+ enumerable: true,
+ configurable: true
+ });
+ return Rectangle;
+}(_Sprite__WEBPACK_IMPORTED_MODULE_0__.Sprite);
+
+
+/**
+ * Register class in system, so that it can be instantiated using its name from
+ * anywhere.
+ *
+ * @ignore
+ */
+
+_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses.Rectangle = Rectangle;
+
+/***/ }),
+
+/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/ResizeButton.js":
+/*!**********************************************************************************!*\
+ !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/ResizeButton.js ***!
+ \**********************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "ResizeButton": () => (/* binding */ ResizeButton)
+/* harmony export */ });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
+/* harmony import */ var _Button__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Button */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Button.js");
+/* harmony import */ var _Sprite__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Sprite */ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js");
+/* harmony import */ var _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/utils/InterfaceColorSet */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/InterfaceColorSet.js");
+/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
+/* harmony import */ var _rendering_Path__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../rendering/Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");
+/**
+ * Resize button module.
+ */
+
+/**
+ * ============================================================================
+ * IMPORTS
+ * ============================================================================
+ * @hidden
+ */
+
+
+
+
+
+
+/**
+ * ============================================================================
+ * MAIN CLASS
+ * ============================================================================
+ * @hidden
+ */
+
+/**
+ * Creates a draggable resize/grip button.
+ *
+ * @see {@link IResizeButtonEvents} for a list of available events
+ * @see {@link IResizeButtonAdapters} for a list of available Adapters
+ */
+
+var ResizeButton =
+/** @class */
+function (_super) {
+ (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__extends)(ResizeButton, _super);
+ /**
+ * Constructor
+ */
+
+
+ function ResizeButton() {
+ var _this = // Init
+ _super.call(this) || this;
+
+ _this.className = "ResizeButton"; // Set defaults
+
+ _this.orientation = "horizontal";
+ _this.layout = "absolute";
+ _this.horizontalCenter = "middle";
+ _this.verticalCenter = "middle";
+ _this.draggable = true;
+
+ _this.padding(8, 8, 8, 8);
+
+ _this.background.cornerRadius(20, 20, 20, 20); // Create an icon
+
+
+ var icon = new _Sprite__WEBPACK_IMPORTED_MODULE_1__.Sprite();
+ icon.element = _this.paper.add("path");
+ var path = _rendering_Path__WEBPACK_IMPORTED_MODULE_4__.moveTo({
+ x: -2,
+ y: -6
+ });
+ path += _rendering_Path__WEBPACK_IMPORTED_MODULE_4__.lineTo({
+ x: -2,
+ y: 6
+ });
+ path += _rendering_Path__WEBPACK_IMPORTED_MODULE_4__.moveTo({
+ x: 2,
+ y: -6
+ });
+ path += _rendering_Path__WEBPACK_IMPORTED_MODULE_4__.lineTo({
+ x: 2,
+ y: 6
+ });
+ icon.path = path;
+ icon.pixelPerfect = true;
+ icon.padding(0, 4, 0, 4);
+ icon.stroke = new _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_2__.InterfaceColorSet().getFor("alternativeText");
+ icon.strokeOpacity = 0.7; //icon.align = "center";
+ //icon.valign = "middle";
+
+ _this.icon = icon;
+
+ _this.label.dispose();
+
+ _this.label = undefined; // Apply theme
+
+ _this.applyTheme();
+
+ return _this;
+ }
+
+ Object.defineProperty(ResizeButton.prototype, "orientation", {
+ /**
+ * Use for setting of direction (orientation) of the resize button.
+ *
+ * Available options: "horizontal", "vertical".
+ *
+ * @param value Orientation
+ */
+ set: function set(value) {
+ var icon = this.icon;
+
+ if (icon) {
+ if (value == "horizontal") {
+ icon.rotation = 0;
+ } else {
+ icon.rotation = -90;
+ }
+ }
+ },
+ enumerable: true,
+ configurable: true
+ });
+ return ResizeButton;
+}(_Button__WEBPACK_IMPORTED_MODULE_0__.Button);
+
+
+/**
+ * Register class in system, so that it can be instantiated using its name from
+ * anywhere.
+ *
+ * @ignore
+ */
+
+_Registry__WEBPACK_IMPORTED_MODULE_3__.registry.registeredClasses.ResizeButton = ResizeButton;
+
+/***/ }),
+
+/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/RoundedRectangle.js":
+/*!**************************************************************************************!*\
+ !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/RoundedRectangle.js ***!
+ \**************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "RoundedRectangle": () => (/* binding */ RoundedRectangle)
+/* harmony export */ });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
+/* harmony import */ var _Sprite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Sprite */ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js");
+/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
+/* harmony import */ var _utils_Math__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
+/* harmony import */ var _utils_Type__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
+/* harmony import */ var _utils_Utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
+/**
+ * Rounded rectangle module.
+ */
+
+/**
+ * ============================================================================
+ * IMPORTS
+ * ============================================================================
+ * @hidden
+ */
+
+
+
+
+
+
+/**
+ * ============================================================================
+ * MAIN CLASS
+ * ============================================================================
+ * @hidden
+ */
+
+/**
+ * Draws a rectangle with rounded corners.
+ *
+ * @see {@link IRoundedRectangleEvents} for a list of available events
+ * @see {@link IRoundedRectangleAdapters} for a list of available Adapters
+ */
+
+var RoundedRectangle =
+/** @class */
+function (_super) {
+ (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__extends)(RoundedRectangle, _super);
+ /**
+ * Constructor
+ */
+
+
+ function RoundedRectangle() {
+ var _this = _super.call(this) || this;
+
+ _this.className = "RoundedRectangle";
+ _this.element = _this.paper.add("path");
+
+ _this.cornerRadius(3, 3, 3, 3);
+
+ _this.applyTheme();
+
+ return _this;
+ }
+ /**
+ * Draws the element.
+ *
+ * @ignore Exclude from docs
+ */
+
+
+ RoundedRectangle.prototype.draw = function () {
+ _super.prototype.draw.call(this);
+
+ var w = this.innerWidth;
+ var h = this.innerHeight;
+
+ if (_utils_Type__WEBPACK_IMPORTED_MODULE_3__.isNumber(w) && _utils_Type__WEBPACK_IMPORTED_MODULE_3__.isNumber(h)) {
+ var minSide = _utils_Math__WEBPACK_IMPORTED_MODULE_2__.min(w, h) / 2;
+ var cornerRadiusTopLeft = _utils_Utils__WEBPACK_IMPORTED_MODULE_4__.relativeToValue(this.cornerRadiusTopLeft, minSide);
+ var cornerRadiusTopRight = _utils_Utils__WEBPACK_IMPORTED_MODULE_4__.relativeToValue(this.cornerRadiusTopRight, minSide);
+ var cornerRadiusBottomRight = _utils_Utils__WEBPACK_IMPORTED_MODULE_4__.relativeToValue(this.cornerRadiusBottomRight, minSide);
+ var cornerRadiusBottomLeft = _utils_Utils__WEBPACK_IMPORTED_MODULE_4__.relativeToValue(this.cornerRadiusBottomLeft, minSide);
+ var maxcr = _utils_Math__WEBPACK_IMPORTED_MODULE_2__.min(Math.abs(w / 2), Math.abs(h / 2));
+ var crtl = _utils_Math__WEBPACK_IMPORTED_MODULE_2__.fitToRange(cornerRadiusTopLeft, 0, maxcr);
+ var crtr = _utils_Math__WEBPACK_IMPORTED_MODULE_2__.fitToRange(cornerRadiusTopRight, 0, maxcr);
+ var crbr = _utils_Math__WEBPACK_IMPORTED_MODULE_2__.fitToRange(cornerRadiusBottomRight, 0, maxcr);
+ var crbl = _utils_Math__WEBPACK_IMPORTED_MODULE_2__.fitToRange(cornerRadiusBottomLeft, 0, maxcr);
+ var lineT = "M" + crtl + ",0 L" + (w - crtr) + ",0";
+ var lineB = " L" + crbl + "," + h;
+ var lineL = " L0," + crtl;
+ var lineR = " L" + w + "," + (h - crbr);
+ var arcTR = " a" + crtr + "," + crtr + " 0 0 1 " + crtr + "," + crtr;
+ var arcBR = " a" + crbr + "," + crbr + " 0 0 1 -" + crbr + "," + crbr;
+ var arcBL = " a" + crbl + "," + crbl + " 0 0 1 -" + crbl + ",-" + crbl;
+ var arcTL = " a" + crtl + "," + crtl + " 0 0 1 " + crtl + ",-" + crtl;
+ var path = lineT + arcTR + lineR + arcBR + lineB + arcBL + lineL + arcTL + " Z";
+ this.path = path;
+ }
+ };
+ /**
+ * Sets radius for all four corners at ones.
+ *
+ * All numbers are in pixels.
+ *
+ * @param tl Top-left corner
+ * @param tr Top-right corner
+ * @param bl Bottom-left corner
+ * @param br Bottom-right corner
+ */
+
+
+ RoundedRectangle.prototype.cornerRadius = function (tl, tr, bl, br) {
+ this.cornerRadiusTopLeft = tl;
+ this.cornerRadiusTopRight = tr;
+ this.cornerRadiusBottomLeft = bl;
+ this.cornerRadiusBottomRight = br;
+ };
+
+ Object.defineProperty(RoundedRectangle.prototype, "cornerRadiusTopLeft", {
+ /**
+ * @return Radius (px or Percent)
+ */
+ get: function get() {
+ return this.getPropertyValue("cornerRadiusTopLeft");
+ },
+
+ /**
+ * Radius of the top-left corner in pixels.
+ *
+ * @default 3
+ * @param value Radius (px or Percent)
+ */
+ set: function set(value) {
+ this.setPercentProperty("cornerRadiusTopLeft", value, true);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(RoundedRectangle.prototype, "cornerRadiusTopRight", {
+ /**
+ * @return Radius (px or Percent)
+ */
+ get: function get() {
+ return this.getPropertyValue("cornerRadiusTopRight");
+ },
+
+ /**
+ * Radius of the top-right corner in pixels.
+ *
+ * @default 3
+ * @param value Radius (px or Percent)
+ */
+ set: function set(value) {
+ this.setPercentProperty("cornerRadiusTopRight", value, true);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(RoundedRectangle.prototype, "cornerRadiusBottomRight", {
+ /**
+ * @return Radius (px or Percent)
+ */
+ get: function get() {
+ return this.getPropertyValue("cornerRadiusBottomRight");
+ },
+
+ /**
+ * Radius of the bottom-right corner in pixels.
+ *
+ * @default 3
+ * @param value Radius (px or Percent)
+ */
+ set: function set(value) {
+ this.setPercentProperty("cornerRadiusBottomRight", value, true);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(RoundedRectangle.prototype, "cornerRadiusBottomLeft", {
+ /**
+ * @return Radius (px or Percent)
+ */
+ get: function get() {
+ return this.getPropertyValue("cornerRadiusBottomLeft");
+ },
+
+ /**
+ * Radius of the bottom-left corner in pixels.
+ *
+ * @default 3
+ * @param value Radius (px or Percent)
+ */
+ set: function set(value) {
+ this.setPercentProperty("cornerRadiusBottomLeft", value, true);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ /**
+ * Measures the element.
+ *
+ * @ignore Exclude from docs
+ */
+
+ RoundedRectangle.prototype.measureElement = function () {};
+
+ Object.defineProperty(RoundedRectangle.prototype, "bbox", {
+ /**
+ * Returns bounding box (square) for this element.
+ *
+ * @ignore Exclude from docs
+ */
+ get: function get() {
+ if (this.definedBBox) {
+ return this.definedBBox;
+ }
+
+ if (this.isMeasured) {
+ return {
+ x: 0,
+ y: 0,
+ width: this.innerWidth,
+ height: this.innerHeight
+ };
+ } else {
+ return {
+ x: 0,
+ y: 0,
+ width: 0,
+ height: 0
+ };
+ }
+ },
+ enumerable: true,
+ configurable: true
+ });
+ return RoundedRectangle;
+}(_Sprite__WEBPACK_IMPORTED_MODULE_0__.Sprite);
+
+
+/**
+ * Register class in system, so that it can be instantiated using its name from
+ * anywhere.
+ *
+ * @ignore
+ */
+
+_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses.RoundedRectangle = RoundedRectangle;
+
+/***/ }),
+
+/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Scrollbar.js":
+/*!*******************************************************************************!*\
+ !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/Scrollbar.js ***!
+ \*******************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "Scrollbar": () => (/* binding */ Scrollbar)
+/* harmony export */ });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
+/* harmony import */ var _Container__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Container */ "./node_modules/@amcharts/amcharts4/.internal/core/Container.js");
+/* harmony import */ var _elements_ResizeButton__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../elements/ResizeButton */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/ResizeButton.js");
+/* harmony import */ var _elements_Button__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../elements/Button */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Button.js");
+/* harmony import */ var _interaction_Interaction__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../interaction/Interaction */ "./node_modules/@amcharts/amcharts4/.internal/core/interaction/Interaction.js");
+/* harmony import */ var _interaction_Mouse__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../interaction/Mouse */ "./node_modules/@amcharts/amcharts4/.internal/core/interaction/Mouse.js");
+/* harmony import */ var _elements_RoundedRectangle__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../elements/RoundedRectangle */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/RoundedRectangle.js");
+/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
+/* harmony import */ var _utils_Keyboard__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/Keyboard */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Keyboard.js");
+/* harmony import */ var _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../core/utils/InterfaceColorSet */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/InterfaceColorSet.js");
+/* harmony import */ var _utils_Percent__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/Percent */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Percent.js");
+/* harmony import */ var _utils_Math__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
+/* harmony import */ var _utils_Ease__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils/Ease */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Ease.js");
+/* harmony import */ var _utils_Type__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
+/* harmony import */ var _utils_Utils__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../utils/Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
+/**
+ * Provides functionality used to build scrollbars.
+ */
+
+/**
+ * ============================================================================
+ * IMPORTS
+ * ============================================================================
+ * @hidden
+ */
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+;
+/**
+ * ============================================================================
+ * MAIN CLASS
+ * ============================================================================
+ * @hidden
+ */
+
+/**
+ * Scrollbar is a generic control allowing to select a range of values or pan
+ * the selection.
+ *
+ * @see {@link IScrollbarEvents} for a list of available events
+ * @see {@link IScrollbarAdapters} for a list of available Adapters
+ */
+
+var Scrollbar =
+/** @class */
+function (_super) {
+ (0,tslib__WEBPACK_IMPORTED_MODULE_14__.__extends)(Scrollbar, _super);
+ /**
+ * Construtor
+ */
+
+
+ function Scrollbar() {
+ var _this = _super.call(this) || this;
+ /**
+ * Previously selected lower (start) value.
+ */
+
+
+ _this._previousStart = 0;
+ /**
+ * Previously selected upper (end) value.
+ */
+
+ _this._previousEnd = 1;
+ /**
+ * A value of previously selected lower value, used for doubleclick function.
+ */
+
+ _this._prevStart = 0;
+ /**
+ * A value of previously selected upper value, used for doubleclick function.
+ */
+
+ _this._prevEnd = 1;
+ /**
+ * Indicates if the Scrollbar is currently "busy" (animating and or
+ * performing zoom by user interaction).
+ */
+
+ _this._isBusy = false;
+ /**
+ * [_skipRangeEvents description]
+ *
+ * @todo Description
+ */
+
+ _this._skipRangeEvents = false;
+ /**
+ * Update the selection when dragging the grips.
+ *
+ * If set to `false` selection will be updated only when the grip is
+ * released.
+ *
+ * @default true
+ */
+
+ _this.updateWhileMoving = true;
+ _this.className = "Scrollbar";
+ _this.minHeight = 12;
+ _this.minWidth = 12;
+ _this.animationDuration = 0;
+ _this.animationEasing = _utils_Ease__WEBPACK_IMPORTED_MODULE_11__.cubicOut;
+
+ _this.margin(10, 10, 10, 10);
+
+ var interfaceColors = new _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_8__.InterfaceColorSet(); // background is also container as it might contain graphs, grid, etc
+
+ var background = _this.background;
+ background.cornerRadius(10, 10, 10, 10);
+ background.fill = interfaceColors.getFor("fill");
+ background.fillOpacity = 0.5; // Make system tooltips appear by default
+
+ _this.showSystemTooltip = true;
+ _this.startGrip = new _elements_ResizeButton__WEBPACK_IMPORTED_MODULE_1__.ResizeButton();
+ _this.endGrip = new _elements_ResizeButton__WEBPACK_IMPORTED_MODULE_1__.ResizeButton(); // Default orientation...
+ // ... is set in `applyInternalDefaults()` because it accesses `language`
+ // and should only be started to access when parent is set
+ // Set events
+
+ _this.events.on("transformed", function () {
+ _this.updateThumb();
+ }, _this, false); // Initial positions
+
+
+ _this.start = 0;
+ _this.end = 1; // Set roles
+
+ _this.role = "scrollbar";
+ _this.thumb.role = "slider";
+ _this.thumb.readerLive = "polite";
+ _this.startGrip.role = "slider";
+ _this.endGrip.role = "slider"; // otherwise range changed won't be registered
+
+ _this.events.once("inited", function () {
+ _this._previousStart = undefined;
+
+ _this.dispatchRangeChange();
+ }, undefined, false);
+
+ _this.hideGrips = false;
+ _this.orientation = "horizontal"; // Min/max values for accessibility
+
+ _this.setSVGAttribute({
+ "aria-valuemin": "0"
+ });
+
+ _this.setSVGAttribute({
+ "aria-valuemax": "100"
+ });
+
+ _this.applyTheme();
+
+ return _this;
+ }
+ /**
+ * Sets defaults that instantiate some objects that rely on parent, so they
+ * cannot be set in constructor.
+ */
+
+
+ Scrollbar.prototype.applyInternalDefaults = function () {
+ _super.prototype.applyInternalDefaults.call(this); // Set screen reader tetxt accordingly
+
+
+ if (this.orientation === "horizontal") {
+ if (!_utils_Type__WEBPACK_IMPORTED_MODULE_12__.hasValue(this.readerTitle)) {
+ this.readerTitle = this.language.translate("Use TAB to select grip buttons or left and right arrows to change selection");
+ }
+
+ if (!_utils_Type__WEBPACK_IMPORTED_MODULE_12__.hasValue(this.thumb.readerDescription)) {
+ this.thumb.readerDescription = this.language.translate("Use left and right arrows to move selection");
+ }
+
+ if (!_utils_Type__WEBPACK_IMPORTED_MODULE_12__.hasValue(this.startGrip.readerDescription)) {
+ this.startGrip.readerDescription = this.language.translate("Use left and right arrows to move left selection");
+ }
+
+ if (!_utils_Type__WEBPACK_IMPORTED_MODULE_12__.hasValue(this.endGrip.readerDescription)) {
+ this.endGrip.readerDescription = this.language.translate("Use left and right arrows to move right selection");
+ }
+
+ this.readerOrientation = "horizontal";
+ } else {
+ if (!_utils_Type__WEBPACK_IMPORTED_MODULE_12__.hasValue(this.readerTitle)) {
+ this.readerTitle = this.language.translate("Use TAB select grip buttons or up and down arrows to change selection");
+ }
+
+ if (!_utils_Type__WEBPACK_IMPORTED_MODULE_12__.hasValue(this.thumb.readerDescription)) {
+ this.thumb.readerDescription = this.language.translate("Use up and down arrows to move selection");
+ }
+
+ if (!_utils_Type__WEBPACK_IMPORTED_MODULE_12__.hasValue(this.startGrip.readerDescription)) {
+ this.startGrip.readerDescription = this.language.translate("Use up and down arrows to move upper selection");
+ }
+
+ if (!_utils_Type__WEBPACK_IMPORTED_MODULE_12__.hasValue(this.endGrip.readerDescription)) {
+ this.endGrip.readerDescription = this.language.translate("Use up and down arrows to move lower selection");
+ }
+
+ this.readerOrientation = "vertical";
+ }
+
+ this.readerControls = this.baseSprite.uidAttr();
+ };
+ /**
+ * Validates the layout of the scrollbar's elements.
+ *
+ * @ignore Exclude from docs
+ */
+
+
+ Scrollbar.prototype.validateLayout = function () {
+ this.updateSize();
+
+ _super.prototype.validateLayout.call(this); // when size changes, need to update extremes
+
+
+ this.updateExtremes();
+ };
+ /**
+ * Update background for the scrollbar.
+ *
+ * @ignore Exclude from docs
+ */
+
+
+ Scrollbar.prototype.processBackground = function () {
+ _super.prototype.processBackground.call(this);
+
+ var background = this.background;
+ background.clickable = true;
+ background.events.on("hit", this.handleBgHit, this, undefined);
+ };
+ /**
+ * Zooms to the particular place when clicked/tapped on the scrollbar
+ * background.
+ *
+ * @ignore Exclude from docs
+ * @param event Event
+ */
+
+
+ Scrollbar.prototype.handleBgHit = function (event) {
+ this.makeBusy();
+ var point = event.spritePoint;
+ point = _utils_Utils__WEBPACK_IMPORTED_MODULE_13__.spritePointToSprite(point, this.background, this);
+ var thumb = this.thumb;
+
+ if (this.orientation == "horizontal") {
+ var thumbX = point.x - thumb.pixelWidth / 2;
+ thumbX = _utils_Math__WEBPACK_IMPORTED_MODULE_10__.fitToRange(thumbX, 0, this.innerWidth - thumb.pixelWidth);
+ this._thumbAnimation = thumb.animate({
+ property: "x",
+ to: thumbX
+ }, this.animationDuration, this.animationEasing);
+ } else {
+ var thumbY = point.y - thumb.pixelHeight / 2;
+ thumbY = _utils_Math__WEBPACK_IMPORTED_MODULE_10__.fitToRange(thumbY, 0, this.innerHeight - thumb.pixelHeight);
+ this._thumbAnimation = thumb.animate({
+ property: "y",
+ to: thumbY
+ }, this.animationDuration, this.animationEasing);
+ }
+
+ if (this.animationDuration > 0) {
+ this._thumbAnimation.events.on("animationended", this.makeUnbusy, this, false);
+ } else {
+ this._thumb.validate();
+
+ this.makeUnbusy();
+ }
+ };
+ /**
+ * Set scrollbar as busy. (currently zooming)
+ *
+ * @ignore Exclude from docs
+ */
+
+
+ Scrollbar.prototype.makeBusy = function () {
+ this._isBusy = true;
+ this._skipRangeEvents = false;
+
+ if (this._unbusyTimeout) {
+ this.removeDispose(this._unbusyTimeout);
+ }
+
+ this._unbusyTimeout = undefined;
+ this.stopAnimations();
+ };
+ /**
+ * Stops all animations, currently playing for the scrollbar.
+ *
+ * @ignore Exclude from docs
+ */
+
+
+ Scrollbar.prototype.stopAnimations = function () {
+ if (this._thumbAnimation) {
+ this._thumbAnimation.stop(true);
+ }
+
+ if (this._zoomAnimation) {
+ this._zoomAnimation.stop(true);
+ }
+ };
+ /**
+ * Cancels "busy" status of the Scrollbar.
+ *
+ * @ignore Exclude from docs
+ */
+
+
+ Scrollbar.prototype.makeUnbusy = function () {
+ /**
+ * We cannot make Scrollbar not busy right after release, because then axes
+ * will take over controll and Scrollbar will start to animate.
+ * Theorethically, it's not right to set timeout by `animationDuration`,
+ * however we can not know all the durations of elements we scroll, so we
+ * assume that animation duration will be the same as
+ * `interpolationDuration` or `rangeChange` duration.
+ */
+ this._unbusyTimeout = this.setTimeout(this.makeUnbusyReal.bind(this), this.animationDuration * 1.1);
+ };
+ /**
+ * [makeUnbusyReal description]
+ *
+ * @todo Description
+ * @ignore Exclude from docs
+ */
+
+
+ Scrollbar.prototype.makeUnbusyReal = function () {
+ this._usingGrip = undefined;
+ this._isBusy = false;
+
+ if (!this.updateWhileMoving) {
+ this.dispatchRangeChange();
+ }
+ };
+ /**
+ * Disptatches rangechanged event if it really changed
+ *
+ * @ignore Exclude from docs
+ */
+
+
+ Scrollbar.prototype.dispatchRangeChange = function () {
+ if (this._previousEnd != this.end || this._previousStart != this.start) {
+ this._previousStart = this.start;
+ this._previousEnd = this.end;
+ this.dispatch("rangechanged");
+ }
+ };
+ /**
+ * Updates the "thumb" element. A draggable element between the grips.
+ * @ignore
+ */
+
+
+ Scrollbar.prototype.updateThumb = function (dispatchEvents) {
+ if (dispatchEvents === void 0) {
+ dispatchEvents = true;
+ }
+
+ if (!this.parent) {
+ return;
+ }
+
+ var thumb = this.thumb;
+ var start = this.start;
+ var end = this.end;
+ var startGrip = this.startGrip;
+ var endGrip = this.endGrip;
+
+ if (this.orientation == "horizontal") {
+ var innerWidth_1 = this.innerWidth;
+ thumb.width = innerWidth_1 * (end - start);
+ thumb.maxX = innerWidth_1 - thumb.pixelWidth;
+ thumb.x = start * innerWidth_1;
+ startGrip.moveTo({
+ x: thumb.pixelX,
+ y: 0
+ }, undefined, undefined, true); // overrides dragging
+
+ endGrip.moveTo({
+ x: thumb.pixelX + thumb.pixelWidth,
+ y: 0
+ }, undefined, undefined, true);
+ startGrip.readerTitle = this.language.translate("From %1", undefined, this.adapter.apply("positionValue", {
+ value: Math.round(start * 100) + "%",
+ position: start
+ }).value);
+ startGrip.readerValueNow = "" + Math.round(start * 100);
+ startGrip.readerValueText = startGrip.readerTitle;
+ endGrip.readerTitle = this.language.translate("To %1", undefined, this.adapter.apply("positionValue", {
+ value: Math.round(end * 100) + "%",
+ position: end
+ }).value);
+ endGrip.readerValueNow = "" + Math.round(end * 100);
+ endGrip.readerValueText = endGrip.readerTitle;
+ } else {
+ var innerHeight_1 = this.innerHeight;
+ thumb.height = innerHeight_1 * (end - start);
+ thumb.maxY = innerHeight_1 - thumb.pixelHeight;
+ thumb.y = (1 - end) * innerHeight_1;
+ startGrip.moveTo({
+ x: 0,
+ y: thumb.pixelY + thumb.pixelHeight
+ }, undefined, undefined, true);
+ endGrip.moveTo({
+ x: 0,
+ y: thumb.pixelY
+ }, undefined, undefined, true);
+ startGrip.readerTitle = this.language.translate("To %1", undefined, this.adapter.apply("positionValue", {
+ value: Math.round((1 - start) * 100) + "%",
+ position: 1 - start
+ }).value);
+ startGrip.readerValueNow = "" + Math.round(start * 100);
+ startGrip.readerValueText = startGrip.readerTitle;
+ endGrip.readerTitle = this.language.translate("From %1", undefined, this.adapter.apply("positionValue", {
+ value: Math.round((1 - end) * 100) + "%",
+ position: 1 - end
+ }).value);
+ endGrip.readerValueNow = "" + Math.round(end * 100);
+ endGrip.readerValueText = endGrip.readerTitle;
+ } // Add accessibility
+
+
+ thumb.readerTitle = this.language.translate("From %1 to %2", undefined, this.adapter.apply("positionValue", {
+ value: Math.round(start * 100) + "%",
+ position: start
+ }).value, this.adapter.apply("positionValue", {
+ value: Math.round(end * 100) + "%",
+ position: end
+ }).value);
+ thumb.readerValueNow = "" + Math.round(start * 100);
+ thumb.readerValueText = thumb.readerTitle;
+ this.readerValueNow = "" + Math.round(start * 100);
+ this.readerValueText = thumb.readerTitle;
+
+ if (!this._skipRangeEvents && this.updateWhileMoving && dispatchEvents) {
+ this.dispatchRangeChange();
+ }
+ };
+ /**
+ * Updates extremes of the scrollbar.
+ */
+
+
+ Scrollbar.prototype.updateExtremes = function () {
+ var orientation = this.orientation;
+ var minX = 0;
+ var minY = 0;
+ var maxX = 0;
+ var maxY = 0;
+
+ if (orientation == "horizontal") {
+ maxX = this.innerWidth;
+ minY = maxY = this.innerHeight / 2;
+ } else {
+ maxY = this.innerHeight;
+ minX = maxX = this.innerWidth / 2;
+ }
+
+ var startGrip = this.startGrip;
+ startGrip.minX = minX;
+ startGrip.maxX = maxX;
+ startGrip.minY = minY;
+ startGrip.maxY = maxY;
+ var endGrip = this.endGrip;
+ endGrip.minX = minX;
+ endGrip.maxX = maxX;
+ endGrip.minY = minY;
+ endGrip.maxY = maxY;
+ var thumb = this.thumb;
+ thumb.minX = minX;
+ thumb.maxX = maxX;
+ thumb.minY = minY;
+ thumb.maxY = maxY;
+ };
+ /**
+ * Updates size of the scrollbar.
+ */
+
+
+ Scrollbar.prototype.updateSize = function () {
+ var orientation = this.orientation;
+ var startGrip = this.startGrip;
+
+ if (startGrip) {
+ startGrip.orientation = orientation;
+ }
+
+ if (this.endGrip) {
+ this.endGrip.orientation = orientation;
+ }
+
+ var thumb = this.thumb;
+
+ if (thumb) {
+ if (orientation == "horizontal") {
+ if (!_utils_Type__WEBPACK_IMPORTED_MODULE_12__.isNumber(this._pixelWidth)) {
+ if (!(this.width instanceof _utils_Percent__WEBPACK_IMPORTED_MODULE_9__.Percent)) {
+ this.width = (0,_utils_Percent__WEBPACK_IMPORTED_MODULE_9__.percent)(100);
+ }
+ } // this teorethically might be wrong, if user indeed sets height of a horizontal scrollbar in percent
+ // however without this height might be equal to 100% if previous orientation was set to horizontal
+ // so this is ok solution, in case user really wants to have scrollbar height set in percent,
+ // he should do this after orientation.
+
+
+ if (_utils_Type__WEBPACK_IMPORTED_MODULE_12__.hasValue(this.percentHeight)) {
+ this.height = this.minHeight;
+ }
+
+ thumb.height = this.innerHeight;
+ thumb.verticalCenter = "middle";
+ thumb.horizontalCenter = "left";
+ } else {
+ if (!_utils_Type__WEBPACK_IMPORTED_MODULE_12__.isNumber(this._pixelHeight)) {
+ if (!(this.height instanceof _utils_Percent__WEBPACK_IMPORTED_MODULE_9__.Percent)) {
+ this.height = (0,_utils_Percent__WEBPACK_IMPORTED_MODULE_9__.percent)(100);
+ }
+ } // same as above with percentHeight
+
+
+ if (_utils_Type__WEBPACK_IMPORTED_MODULE_12__.hasValue(this.percentWidth)) {
+ this.width = this.minWidth;
+ }
+
+ thumb.width = this.innerWidth;
+ thumb.verticalCenter = "top";
+ thumb.horizontalCenter = "middle";
+ }
+ }
+ };
+
+ Object.defineProperty(Scrollbar.prototype, "isBusy", {
+ /**
+ * Indicates if the Scrollbar is currently "busy" (animating and or
+ * performing zoom by user interaction).
+ * @return boolean
+ */
+ get: function get() {
+ return this._isBusy;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Scrollbar.prototype, "start", {
+ /**
+ * @return Position (0-1)
+ */
+ get: function get() {
+ return Math.min(this.getPosition(this._start), this.getPosition(this._end));
+ },
+
+ /**
+ * ==========================================================================
+ * POSITIONS
+ * ==========================================================================
+ * @hidden
+ */
+
+ /**
+ * Relative position (0-1) of the start grip.
+ *
+ * @param position Position (0-1)
+ */
+ set: function set(position) {
+ if (!this._isBusy) {
+ this.__start = position;
+ }
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Scrollbar.prototype, "__start", {
+ /**
+ * @return [description]
+ */
+ get: function get() {
+ return this._start;
+ },
+
+ /**
+ * [__start description]
+ *
+ * @todo Description
+ * @param position [description]
+ */
+ set: function set(position) {
+ this._start = this.getPosition(position);
+ this.updateThumb();
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Scrollbar.prototype, "end", {
+ /**
+ * @return Position (0-1)
+ */
+ get: function get() {
+ return Math.max(this.getPosition(this._start), this.getPosition(this._end));
+ },
+
+ /**
+ * Relative position (0-1) of the end grip.
+ *
+ * @param position Position (0-1)
+ */
+ set: function set(position) {
+ if (!this._isBusy) {
+ this.__end = position;
+ }
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Scrollbar.prototype, "__end", {
+ /**
+ * @return [description]
+ */
+ get: function get() {
+ return this._end;
+ },
+
+ /**
+ * [__end description]
+ *
+ * @todo Description
+ * @param position [description]
+ */
+ set: function set(position) {
+ this._end = this.getPosition(position);
+ this.updateThumb();
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Scrollbar.prototype, "range", {
+ /**
+ * Current selection range.
+ *
+ * @readonly
+ * @return Range
+ */
+ get: function get() {
+ return {
+ start: this.start,
+ end: this.end,
+ priority: this._usingGrip
+ };
+ },
+ enumerable: true,
+ configurable: true
+ });
+ /**
+ * Disables range change events.
+ *
+ * @ignore Exclude from docs
+ */
+
+ Scrollbar.prototype.skipRangeEvents = function () {
+ if (!this._isBusy) {
+ this._skipRangeEvents = true;
+ }
+ };
+ /**
+ * [fixRange description]
+ *
+ * @todo Description
+ * @ignore Exclude from docs
+ * @param range Range
+ */
+
+
+ Scrollbar.prototype.fixRange = function (range) {
+ if (range.start != _utils_Math__WEBPACK_IMPORTED_MODULE_10__.round(this._start, 2) || range.end != _utils_Math__WEBPACK_IMPORTED_MODULE_10__.round(this._end, 2)) {
+ this._start = range.start;
+ this._end = range.end;
+ this._skipRangeEvents = true;
+ this.updateThumb();
+ this._skipRangeEvents = false;
+ this.thumb.validate();
+ this.thumb.background.validate();
+ }
+ };
+ /**
+ * [getPosition description]
+ *
+ * @todo Description
+ * @param position [description]
+ * @return [description]
+ */
+
+
+ Scrollbar.prototype.getPosition = function (position) {
+ return _utils_Math__WEBPACK_IMPORTED_MODULE_10__.fitToRange(_utils_Math__WEBPACK_IMPORTED_MODULE_10__.round(position, 4), 0, 1);
+ };
+
+ Object.defineProperty(Scrollbar.prototype, "orientation", {
+ /**
+ * @return Orientation
+ */
+ get: function get() {
+ return this.getPropertyValue("orientation");
+ },
+
+ /**
+ * ==========================================================================
+ * MISC
+ * ==========================================================================
+ * @hidden
+ */
+
+ /**
+ * Orientation of the scrollbar.
+ *
+ * Available options: "horizontal" (default) and "vertical".
+ *
+ * @default "horizontal"
+ * @param value Orientation
+ */
+ set: function set(value) {
+ if (this.setPropertyValue("orientation", value)) {
+ // Set mouse cursors and screen reader tetxt accordingly
+ if (value === "horizontal") {
+ // Mouse styles
+ this.startGrip.cursorOverStyle = _interaction_Mouse__WEBPACK_IMPORTED_MODULE_4__.MouseCursorStyle.horizontalResize;
+ this.endGrip.cursorOverStyle = _interaction_Mouse__WEBPACK_IMPORTED_MODULE_4__.MouseCursorStyle.horizontalResize; // Reader text
+
+ /*this.readerTitle = this.language.translate("Use TAB to select grip buttons or left and right arrows to change selection");
+ this.thumb.readerDescription = this.language.translate("Use left and right arrows to move selection");
+ this.startGrip.readerDescription = this.language.translate("Use left and right arrows to move left selection");
+ this.endGrip.readerDescription = this.language.translate("Use left and right arrows to move right selection");*/
+ } else {
+ // Mouse styles
+ this.startGrip.cursorOverStyle = _interaction_Mouse__WEBPACK_IMPORTED_MODULE_4__.MouseCursorStyle.verticalResize;
+ this.endGrip.cursorOverStyle = _interaction_Mouse__WEBPACK_IMPORTED_MODULE_4__.MouseCursorStyle.verticalResize; // Reader text
+
+ /*this.readerTitle = this.language.translate("Use TAB select grip buttons or up and down arrows to change selection");
+ this.thumb.readerDescription = this.language.translate("Use up and down arrows to move selection");
+ this.startGrip.readerDescription = this.language.translate("Use up and down arrows to move upper selection");
+ this.endGrip.readerDescription = this.language.translate("Use up and down arrows to move lower selection");*/
+ }
+
+ this.updateByOrientation();
+ this.invalidate();
+ }
+ },
+ enumerable: true,
+ configurable: true
+ });
+ /**
+ * @ignore
+ */
+
+ Scrollbar.prototype.updateByOrientation = function () {};
+
+ Object.defineProperty(Scrollbar.prototype, "startGrip", {
+ /**
+ * @return Grip element
+ */
+ get: function get() {
+ return this._startGrip;
+ },
+
+ /**
+ * ==========================================================================
+ * GRIPS
+ * ==========================================================================
+ * @hidden
+ */
+
+ /**
+ * Start grip element. (button)
+ *
+ * @param button Grip element
+ */
+ set: function set(button) {
+ if (this._startGrip) {
+ this.removeDispose(this._startGrip);
+ }
+
+ this._startGrip = button;
+ this.processGrip(button);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Scrollbar.prototype, "endGrip", {
+ /**
+ * @return Grip element
+ */
+ get: function get() {
+ return this._endGrip;
+ },
+
+ /**
+ * End grip element. (button)
+ *
+ * @param button Grip element
+ */
+ set: function set(button) {
+ if (this._endGrip) {
+ this.removeDispose(this._endGrip);
+ }
+
+ this._endGrip = button;
+ this.processGrip(button);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ /**
+ * Decorates the grip button with properties and events.
+ *
+ * @ignore Exclude from docs
+ * @param button Grip button
+ */
+
+ Scrollbar.prototype.processGrip = function (button) {
+ button.parent = this;
+ button.isMeasured = false;
+ button.focusable = true;
+ button.shouldClone = false; // Set button defaults
+ //button.showSystemTooltip = true; // setting this here is not right because we break inheritance
+
+ button.zIndex = 100;
+ button.events.on("drag", this.handleGripDrag, this, false);
+ button.events.on("dragstop", this.makeUnbusy, this, false);
+ button.events.on("down", this.makeBusy, this, false);
+ button.events.on("up", this.makeUnbusy, this, false);
+
+ this._disposers.push(button);
+ };
+ /**
+ * Updates positions of related elements after grip element is dragged.
+ *
+ * @ignore Exclude from docs
+ * @param event Event
+ */
+
+
+ Scrollbar.prototype.handleGripDrag = function (event) {
+ this.makeBusy();
+
+ if (event.target === this._startGrip) {
+ this._usingGrip = "start";
+ } else {
+ this._usingGrip = "end";
+ }
+
+ if (this.orientation == "horizontal") {
+ this._start = this.startGrip.pixelX / this.innerWidth;
+ this._end = this.endGrip.pixelX / this.innerWidth;
+ } else {
+ this._start = 1 - this.startGrip.pixelY / this.innerHeight;
+ this._end = 1 - this.endGrip.pixelY / this.innerHeight;
+ }
+
+ this.updateThumb();
+ };
+
+ Object.defineProperty(Scrollbar.prototype, "thumb", {
+ /**
+ * @return Thumb element
+ */
+ get: function get() {
+ if (!this._thumb) {
+ // Create scrollbar controls (setters will handle adding disposers)
+ var thumb = new _elements_Button__WEBPACK_IMPORTED_MODULE_2__.Button();
+ thumb.background.cornerRadius(10, 10, 10, 10);
+ thumb.padding(0, 0, 0, 0);
+ this.thumb = thumb;
+ }
+
+ return this._thumb;
+ },
+
+ /**
+ * A "thumb" element.
+ *
+ * It's a draggable square space between the grips, that can be used to
+ * pan the selection.
+ *
+ * @param thumb Thumb element
+ */
+ set: function set(thumb) {
+ var _this = this;
+
+ if (thumb) {
+ if (this._thumb) {
+ this.removeDispose(this._thumb);
+ }
+
+ this._thumb = thumb;
+ thumb.parent = this;
+ thumb.isMeasured = false;
+ thumb.inert = true;
+ thumb.draggable = true;
+ thumb.clickable = true;
+ thumb.hoverable = true;
+ thumb.focusable = true;
+ thumb.shouldClone = false;
+ thumb.zIndex = 0; // TODO remove closures ?
+ // Add events
+ // Add cursor styles to thumb
+
+ thumb.cursorOverStyle = _interaction_Mouse__WEBPACK_IMPORTED_MODULE_4__.MouseCursorStyle.grab;
+ thumb.cursorDownStyle = _interaction_Mouse__WEBPACK_IMPORTED_MODULE_4__.MouseCursorStyle.grabbing;
+ thumb.events.on("dragstart", this.makeBusy, this, false);
+ thumb.events.on("dragstop", this.makeUnbusy, this, false);
+ thumb.events.on("positionchanged", this.handleThumbPosition, this, false);
+ thumb.events.on("sizechanged", this.handleThumbPosition, this, false);
+ thumb.events.on("doublehit", this.handleDoubleClick, this, false); // Add event for space and ENTER to toggle full zoom out and back
+ // (same as doubleclick)
+
+ this._disposers.push((0,_interaction_Interaction__WEBPACK_IMPORTED_MODULE_3__.getInteraction)().body.events.on("keyup", function (ev) {
+ if (_utils_Keyboard__WEBPACK_IMPORTED_MODULE_7__.keyboard.isKey(ev.event, ["space", "enter"]) && _this.thumb.isFocused) {
+ ev.event.preventDefault();
+
+ _this.handleDoubleClick();
+ }
+ }));
+
+ this._disposers.push(this._thumb);
+ }
+ },
+ enumerable: true,
+ configurable: true
+ });
+ /**
+ * Zooms-in and out the selection on double-click of the thumb.
+ *
+ * @ignore Exclude from docs
+ */
+
+ Scrollbar.prototype.handleDoubleClick = function () {
+ this.makeBusy();
+ var newStart = 0;
+ var newEnd = 1;
+
+ if (this.start != 0 || this.end != 1) {
+ this._prevStart = this.start;
+ this._prevEnd = this.end;
+ } else {
+ newStart = this._prevStart;
+ newEnd = this._prevEnd;
+ }
+
+ var zoomAnimation = this.animate([{
+ property: "__start",
+ to: newStart
+ }, {
+ property: "__end",
+ to: newEnd
+ }], this.animationDuration, this.animationEasing);
+
+ if (zoomAnimation && !zoomAnimation.isFinished()) {
+ zoomAnimation.events.on("animationended", this.makeUnbusy, this, false);
+ this._zoomAnimation = zoomAnimation;
+ } else {
+ this.makeUnbusy();
+ }
+ };
+ /**
+ * Updates positions of other elements when thumb is moved.
+ *
+ * @ignore Exclude from docs
+ */
+
+
+ Scrollbar.prototype.handleThumbPosition = function () {
+ var thumb = this.thumb;
+
+ if (this.orientation == "horizontal") {
+ var innerWidth_2 = this.innerWidth;
+ var w = thumb.innerWidth;
+ var x = thumb.pixelX;
+ this._start = x / innerWidth_2;
+ this._end = (x + w) / innerWidth_2;
+ this.updateThumb();
+ } else {
+ var innerHeight_2 = this.innerHeight;
+ var h = thumb.innerHeight;
+ var y = thumb.pixelY;
+
+ if (y + h > innerHeight_2) {
+ y = innerHeight_2 - h;
+ thumb.y = y;
+ }
+
+ this._start = 1 - (y + h) / innerHeight_2;
+ this._end = 1 - y / innerHeight_2;
+ this.updateThumb();
+ }
+ };
+ /**
+ * Creates a background element for the scrollbar.
+ *
+ * @ignore Exclude from docs
+ * @return Background
+ */
+
+
+ Scrollbar.prototype.createBackground = function () {
+ return new _elements_RoundedRectangle__WEBPACK_IMPORTED_MODULE_5__.RoundedRectangle();
+ };
+
+ Object.defineProperty(Scrollbar.prototype, "hideGrips", {
+ /**
+ * @return Show only on hover?
+ */
+ get: function get() {
+ return this._hideGrips;
+ },
+
+ /**
+ * Use this property to set whether grips should be always visible (`false`),
+ * or they should just appear on scrollbar hover (`true`).
+ *
+ * @param value Show only on hover?
+ */
+ set: function set(value) {
+ var _this = this;
+
+ this._hideGrips = value;
+
+ if (this._overDisposer) {
+ this.removeDispose(this._overDisposer);
+ }
+
+ if (this._outDisposer) {
+ this.removeDispose(this._outDisposer);
+ }
+
+ if (value) {
+ this._overDisposer = this.events.on("over", function () {
+ _this.startGrip.show();
+
+ _this.endGrip.show();
+ }, undefined, false);
+ this._outDisposer = this.events.on("out", function () {
+ _this.startGrip.hide();
+
+ _this.endGrip.hide();
+ }, undefined, false);
+ this.startGrip.hide();
+ this.endGrip.hide();
+ } else {
+ this.startGrip.show();
+ this.endGrip.show();
+ }
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Scrollbar.prototype, "animationDuration", {
+ /**
+ * @return Orientation
+ */
+ get: function get() {
+ return this.getPropertyValue("animationDuration");
+ },
+
+ /**
+ * Duration in milliseconds of scrollbar animation (happens when user clicks on a background of a scrollbar)
+ * @default 0
+ * @param value number
+ */
+ set: function set(value) {
+ this.setPropertyValue("animationDuration", value);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Scrollbar.prototype, "animationEasing", {
+ /**
+ * @return {Function}
+ */
+ get: function get() {
+ return this.getPropertyValue("animationEasing");
+ },
+
+ /**
+ * Animation easing function.
+ * @todo: review description and default
+ * @default $ease.cubicOut
+ * @param value (value: number) => number
+ */
+ set: function set(value) {
+ this.setPropertyValue("animationEasing", value);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ /**
+ * Adds easing functions to "function" fields.
+ *
+ * @param field Field name
+ * @return Assign as function?
+ */
+
+ Scrollbar.prototype.asFunction = function (field) {
+ return field == "animationEasing" || _super.prototype.asIs.call(this, field);
+ };
+
+ return Scrollbar;
+}(_Container__WEBPACK_IMPORTED_MODULE_0__.Container);
+
+
+/**
+ * Register class in system, so that it can be instantiated using its name from
+ * anywhere.
+ *
+ * @ignore
+ */
+
+_Registry__WEBPACK_IMPORTED_MODULE_6__.registry.registeredClasses.Scrollbar = Scrollbar;
+
+/***/ }),
+
+/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Slice.js":
+/*!***************************************************************************!*\
+ !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/Slice.js ***!
+ \***************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "Slice": () => (/* binding */ Slice)
+/* harmony export */ });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
+/* harmony import */ var _Container__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Container */ "./node_modules/@amcharts/amcharts4/.internal/core/Container.js");
+/* harmony import */ var _Sprite__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Sprite */ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js");
+/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
+/* harmony import */ var _utils_Math__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
+/* harmony import */ var _rendering_Path__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../rendering/Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");
+/* harmony import */ var _utils_Type__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
+/* harmony import */ var _utils_Utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
+/* harmony import */ var _utils_Percent__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/Percent */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Percent.js");
+/* harmony import */ var _rendering_fills_RadialGradient__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../rendering/fills/RadialGradient */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/fills/RadialGradient.js");
+/**
+ * Slice module.
+ */
+
+/**
+ * ============================================================================
+ * IMPORTS
+ * ============================================================================
+ * @hidden
+ */
+
+
+
+
+
+
+
+
+
+
+/**
+ * ============================================================================
+ * MAIN CLASS
+ * ============================================================================
+ * @hidden
+ */
+
+/**
+ * Draws a wedged semi-circle - slice. Usually used for Pie/Donut charts.
+ *
+ * @see {@link ISliceEvents} for a list of available events
+ * @see {@link ISliceAdapters} for a list of available Adapters
+ */
+
+var Slice =
+/** @class */
+function (_super) {
+ (0,tslib__WEBPACK_IMPORTED_MODULE_9__.__extends)(Slice, _super);
+ /**
+ * Constructor
+ */
+
+
+ function Slice() {
+ var _this = // Init
+ _super.call(this) || this;
+
+ _this.className = "Slice"; // Set defaults
+
+ _this.setPropertyValue("cornerRadius", 0);
+
+ _this.setPropertyValue("startAngle", 0);
+
+ _this.setPercentProperty("innerRadius", 0);
+
+ _this.setPercentProperty("radius", 0);
+
+ _this.setPropertyValue("arc", 0);
+
+ _this.setPropertyValue("shiftRadius", 0);
+
+ _this.strokeOpacity = 1;
+
+ _this.setPropertyValue("layout", "none"); // Create a slice wedge element
+
+
+ _this.slice = _this.createChild(_Sprite__WEBPACK_IMPORTED_MODULE_1__.Sprite);
+ _this.slice.isMeasured = false;
+
+ _this._disposers.push(_this.slice); //this.element.attr({ "stroke-linejoin": "round" });
+ //this.element.attr({ "stroke-linecap": "round" });
+ // Apply theme
+
+
+ _this.applyTheme();
+
+ return _this;
+ }
+ /**
+ * Draws the element.
+ *
+ * @ignore Exclude from docs
+ */
+
+
+ Slice.prototype.draw = function () {
+ _super.prototype.draw.call(this);
+
+ var radiusY = this.radiusY;
+
+ if (this.radius > 0 && radiusY == 0) {
+ radiusY = 0.01;
+ }
+
+ this.slice.path = _rendering_Path__WEBPACK_IMPORTED_MODULE_4__.arc(this.startAngle, this.arc, this.radius, this.pixelInnerRadius, radiusY, this.cornerRadius, this.innerCornerRadius);
+ this.slice.invalidate();
+ this.shiftRadius = this.shiftRadius;
+
+ if (this.realFill instanceof _rendering_fills_RadialGradient__WEBPACK_IMPORTED_MODULE_8__.RadialGradient) {
+ this.updateGradient(this.realFill);
+ }
+
+ if (this.realStroke instanceof _rendering_fills_RadialGradient__WEBPACK_IMPORTED_MODULE_8__.RadialGradient) {
+ this.updateGradient(this.realStroke);
+ }
+ };
+
+ Slice.prototype.updateGradient = function (gradient) {
+ gradient.element.attr({
+ "gradientUnits": "userSpaceOnUse"
+ });
+ gradient.element.attr({
+ "r": this.radius
+ });
+ gradient.cx = 0;
+ gradient.cy = 0;
+ gradient.element.attr({
+ radius: this.radius
+ });
+ };
+
+ Object.defineProperty(Slice.prototype, "bbox", {
+ /**
+ * Returns bounding box (square) for this element.
+ *
+ * @ignore Exclude from docs
+ */
+ get: function get() {
+ if (this.definedBBox) {
+ return this.definedBBox;
+ }
+
+ if (this.isMeasured) {
+ var innerRect = _utils_Math__WEBPACK_IMPORTED_MODULE_3__.getArcRect(this.startAngle, this.startAngle + this.arc, this.pixelInnerRadius);
+ var outerRect = _utils_Math__WEBPACK_IMPORTED_MODULE_3__.getArcRect(this.startAngle, this.startAngle + this.arc, this.radius);
+ return _utils_Math__WEBPACK_IMPORTED_MODULE_3__.getCommonRectangle([innerRect, outerRect]);
+ } else {
+ return {
+ x: 0,
+ y: 0,
+ width: 0,
+ height: 0
+ };
+ }
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Slice.prototype, "startAngle", {
+ /**
+ * @return Angle (0-360)
+ */
+ get: function get() {
+ return this.getPropertyValue("startAngle");
+ },
+
+ /**
+ * The angle at which left edge of the slice is drawn. (0-360)
+ *
+ * 0 is to the right of the center.
+ *
+ * @param value Angle (0-360)
+ */
+ set: function set(value) {
+ this.setPropertyValue("startAngle", _utils_Math__WEBPACK_IMPORTED_MODULE_3__.normalizeAngle(value), true);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Slice.prototype, "arc", {
+ /**
+ * @return [description]
+ */
+ get: function get() {
+ return this.getPropertyValue("arc");
+ },
+
+ /**
+ * [arc description]
+ *
+ * @todo Description
+ * @param value [description]
+ */
+ set: function set(value) {
+ if (!_utils_Type__WEBPACK_IMPORTED_MODULE_5__.isNumber(value)) {
+ value = 0;
+ }
+
+ this.setPropertyValue("arc", value, true);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Slice.prototype, "radius", {
+ /**
+ * @return Radius (px)
+ */
+ get: function get() {
+ var radius = this.getPropertyValue("radius");
+
+ if (!_utils_Type__WEBPACK_IMPORTED_MODULE_5__.isNumber(radius)) {
+ radius = 0;
+ }
+
+ return radius;
+ },
+
+ /**
+ * Radius of the slice in pixels.
+ *
+ * @param value Radius (px)
+ */
+ set: function set(value) {
+ this.setPropertyValue("radius", value, true);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Slice.prototype, "radiusY", {
+ /**
+ * @return Vertical radius (0-1)
+ */
+ get: function get() {
+ var value = this.getPropertyValue("radiusY");
+
+ if (!_utils_Type__WEBPACK_IMPORTED_MODULE_5__.isNumber(value)) {
+ value = this.radius;
+ }
+
+ return value;
+ },
+
+ /**
+ * Vertical radius for creating skewed slices.
+ *
+ * This is relevant to `radius`, e.g. 0.5 will set vertical radius to half
+ * the `radius`.
+ *
+ * @param value Vertical radius (0-1)
+ */
+ set: function set(value) {
+ this.setPropertyValue("radiusY", value, true);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Slice.prototype, "innerRadius", {
+ /**
+ * @return Radius (px or %)
+ */
+ get: function get() {
+ return this.getPropertyValue("innerRadius");
+ },
+
+ /**
+ * Inner radius of the slice for creating cut out (donut) slices.
+ *
+ * @default 0
+ * @param value Radius (px or %)
+ */
+ set: function set(value) {
+ this.setPercentProperty("innerRadius", value, true, false, 10, false);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Slice.prototype, "pixelInnerRadius", {
+ /**
+ * @return Radius px
+ */
+ get: function get() {
+ return _utils_Utils__WEBPACK_IMPORTED_MODULE_6__.relativeToValue(this.innerRadius, this.radius);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Slice.prototype, "cornerRadius", {
+ /**
+ * @return Radius (px)
+ */
+ get: function get() {
+ return this.getPropertyValue("cornerRadius");
+ },
+
+ /**
+ * Radius of slice's outer corners in pixels.
+ *
+ * @default 0
+ * @param value Radius (px)
+ */
+ set: function set(value) {
+ this.setPropertyValue("cornerRadius", value, true);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Slice.prototype, "innerCornerRadius", {
+ /**
+ * @return Radius (px)
+ */
+ get: function get() {
+ return this.getPropertyValue("innerCornerRadius");
+ },
+
+ /**
+ * Radius of slice's inner corners in pixels.
+ *
+ * @default 0
+ * @param value Radius (px)
+ */
+ set: function set(value) {
+ this.setPropertyValue("innerCornerRadius", value, true);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Slice.prototype, "shiftRadius", {
+ /**
+ * @return Radius shift
+ */
+ get: function get() {
+ return this.getPropertyValue("shiftRadius");
+ },
+
+ /**
+ * Indicates how far (relatively to center) a slice should be moved.
+ *
+ * The value is relative to the radius of the slice. Meaning 0 no shift,
+ * 1 - slice shifted outside by whole of its radius.
+ *
+ * @param value Radius shift
+ */
+ set: function set(value) {
+ this.setPropertyValue("shiftRadius", value);
+ value = this.getPropertyValue("shiftRadius");
+ this.dx = value * this.radius * this.ix;
+ this.dy = value * this.radiusY * this.iy;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Slice.prototype, "ix", {
+ /**
+ * [ix description]
+ *
+ * @ignore Exclude from docs
+ * @todo Description
+ * @return [description]
+ */
+ get: function get() {
+ return _utils_Math__WEBPACK_IMPORTED_MODULE_3__.cos(this.middleAngle);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Slice.prototype, "iy", {
+ /**
+ * [iy description]
+ *
+ * @ignore Exclude from docs
+ * @todo Description
+ * @return [description]
+ */
+ get: function get() {
+ return _utils_Math__WEBPACK_IMPORTED_MODULE_3__.sin(this.middleAngle);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Slice.prototype, "middleAngle", {
+ /**
+ * An angle of the slice's middle.
+ *
+ * @ignore Exclude from docs
+ * @return Angle
+ */
+ get: function get() {
+ return this.startAngle + this.arc / 2;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ /**
+ * X coordinate for the slice tooltip.
+ *
+ * @return X
+ */
+
+ Slice.prototype.getTooltipX = function () {
+ var value = this.getPropertyValue("tooltipX");
+
+ if (_utils_Type__WEBPACK_IMPORTED_MODULE_5__.isNumber(value)) {
+ return value;
+ }
+
+ var p = 0.5;
+
+ if (value instanceof _utils_Percent__WEBPACK_IMPORTED_MODULE_7__.Percent) {
+ p = value.value;
+ }
+
+ var innerRadius = _utils_Utils__WEBPACK_IMPORTED_MODULE_6__.relativeToValue(this.innerRadius, this.radius);
+ return this.ix * (innerRadius + (this.radius - innerRadius) * p);
+ };
+ /**
+ * Y coordinate for the slice tooltip.
+ *
+ * @return Y
+ */
+
+
+ Slice.prototype.getTooltipY = function () {
+ var value = this.getPropertyValue("tooltipY");
+
+ if (_utils_Type__WEBPACK_IMPORTED_MODULE_5__.isNumber(value)) {
+ return value;
+ }
+
+ var p = 0.5;
+
+ if (value instanceof _utils_Percent__WEBPACK_IMPORTED_MODULE_7__.Percent) {
+ p = value.value;
+ }
+
+ var innerRadius = _utils_Utils__WEBPACK_IMPORTED_MODULE_6__.relativeToValue(this.innerRadius, this.radius);
+ return this.iy * (innerRadius + (this.radius - innerRadius) * p) + this.slice.dy;
+ };
+
+ return Slice;
+}(_Container__WEBPACK_IMPORTED_MODULE_0__.Container);
+
+
+/**
+ * Register class in system, so that it can be instantiated using its name from
+ * anywhere.
+ *
+ * @ignore
+ */
+
+_Registry__WEBPACK_IMPORTED_MODULE_2__.registry.registeredClasses.Slice = Slice;
+
+/***/ }),
+
+/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Slider.js":
+/*!****************************************************************************!*\
+ !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/Slider.js ***!
+ \****************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "Slider": () => (/* binding */ Slider)
+/* harmony export */ });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
+/* harmony import */ var _core_elements_Scrollbar__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../core/elements/Scrollbar */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Scrollbar.js");
+/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
+/**
+ * Slider is a scrollbar with just one selection grip.
+ */
+
+/**
+ * ============================================================================
+ * IMPORTS
+ * ============================================================================
+ * @hidden
+ */
+
+
+
+/**
+ * ============================================================================
+ * MAIN CLASS
+ * ============================================================================
+ * @hidden
+ */
+
+/**
+ * Creates a slider - a version of scrollbar with just one grip.
+ *
+ * @see {@link ISliderEvents} for a list of available events
+ * @see {@link ISliderAdapters} for a list of available Adapters
+ */
+
+var Slider =
+/** @class */
+function (_super) {
+ (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(Slider, _super);
+ /**
+ * Constructor
+ */
+
+
+ function Slider() {
+ var _this = _super.call(this) || this;
+
+ _this.className = "Slider";
+ _this.thumb.opacity = 0;
+ _this.thumb.interactionsEnabled = false;
+ _this.endGrip.opacity = 0;
+ _this.endGrip.interactionsEnabled = false;
+
+ _this.startGrip.events.on("drag", function () {
+ _this.endGrip.x = _this.startGrip.x;
+ _this.endGrip.y = _this.startGrip.y;
+ });
+
+ _this.applyTheme();
+
+ return _this;
+ }
+
+ Object.defineProperty(Slider.prototype, "__end", {
+ /**
+ * @return [description]
+ */
+ get: function get() {
+ return this._start;
+ },
+ set: function set(value) {},
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Slider.prototype, "end", {
+ /**
+ * @return [description]
+ */
+ get: function get() {
+ return this._start;
+ },
+
+ /**
+ * Relative position (0-1) of the end grip.
+ *
+ * @param position Position (0-1)
+ */
+ set: function set(position) {},
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Slider.prototype, "start", {
+ /**
+ * @return Position (0-1)
+ */
+ get: function get() {
+ return this._start;
+ },
+
+ /**
+ * Relative position (0-1) of the start grip.
+ *
+ * @param position Position (0-1)
+ */
+ set: function set(position) {
+ if (!this._isBusy) {
+ this.__start = position;
+ }
+ },
+ enumerable: true,
+ configurable: true
+ });
+ return Slider;
+}(_core_elements_Scrollbar__WEBPACK_IMPORTED_MODULE_0__.Scrollbar);
+
+
+/**
+ * Register class in system, so that it can be instantiated using its name from
+ * anywhere.
+ *
+ * @ignore
+ */
+
+_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses.Slider = Slider;
+
+/***/ }),
+
+/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/SwitchButton.js":
+/*!**********************************************************************************!*\
+ !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/SwitchButton.js ***!
+ \**********************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "SwitchButton": () => (/* binding */ SwitchButton)
+/* harmony export */ });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
+/* harmony import */ var _Container__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Container */ "./node_modules/@amcharts/amcharts4/.internal/core/Container.js");
+/* harmony import */ var _Label__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Label */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Label.js");
+/* harmony import */ var _elements_Button__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../elements/Button */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Button.js");
+/* harmony import */ var _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/utils/InterfaceColorSet */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/InterfaceColorSet.js");
+/* harmony import */ var _core_elements_Circle__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../core/elements/Circle */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Circle.js");
+/* harmony import */ var _core_utils_Percent__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../core/utils/Percent */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Percent.js");
+/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
+/**
+ * Functionality for drawing simple SwitchButtons.
+ */
+
+/**
+ * ============================================================================
+ * IMPORTS
+ * ============================================================================
+ * @hidden
+ */
+
+
+
+
+
+
+
+
+/**
+ * ============================================================================
+ * MAIN CLASS
+ * ============================================================================
+ * @hidden
+ */
+
+/**
+ * SwitchButton class is capable of drawing a simple rectangular SwitchButton with
+ * optionally rounded corners and an icon in it.
+ *
+ * @see {@link ISwitchButtonEvents} for a list of available events
+ * @see {@link ISwitchButtonAdapters} for a list of available Adapters
+ */
+
+var SwitchButton =
+/** @class */
+function (_super) {
+ (0,tslib__WEBPACK_IMPORTED_MODULE_7__.__extends)(SwitchButton, _super);
+ /**
+ * Constructor
+ */
+
+
+ function SwitchButton() {
+ var _this = // Init
+ _super.call(this) || this;
+
+ _this.className = "SwitchButton";
+ _this.tooltipY = 0; // Set defaults
+
+ _this.layout = "horizontal";
+ _this.contentAlign = "center";
+ _this.contentValign = "middle";
+
+ _this.padding(8, 16, 8, 16);
+
+ _this.setStateOnChildren = true;
+
+ _this.states.create("active");
+
+ var interfaceColors = new _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_3__.InterfaceColorSet(); // Create the label element
+
+ var leftLabel = new _Label__WEBPACK_IMPORTED_MODULE_1__.Label();
+ leftLabel.fillOpacity = 0.3;
+ var llas = leftLabel.states.create("active");
+ llas.properties.fillOpacity = 1;
+ leftLabel.isActive = true;
+ _this.leftLabel = leftLabel;
+ var button = new _elements_Button__WEBPACK_IMPORTED_MODULE_2__.Button();
+ var circle = new _core_elements_Circle__WEBPACK_IMPORTED_MODULE_4__.Circle();
+ button.contentValign = "none";
+ button.padding(0, 0, 0, 0);
+ circle.radius = 10;
+ button.icon = circle;
+ button.icon.valign = "middle";
+ button.label = undefined;
+ var p100 = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_5__.percent)(100);
+ button.background.cornerRadius(p100, p100, p100, p100);
+ button.width = circle.radius * 3.5;
+ button.height = circle.radius * 2.1;
+ button.marginLeft = 8;
+ button.marginRight = 8;
+ button.togglable = true;
+ circle.dx = -circle.radius * 0.7;
+ circle.fill = interfaceColors.getFor("primaryButton");
+ var hs = circle.states.create("hover");
+ hs.properties.fill = interfaceColors.getFor("primaryButtonHover");
+ var as = circle.states.create("active");
+ as.properties.fill = interfaceColors.getFor("primaryButtonActive");
+ as.properties.dx = circle.radius * 0.7;
+ _this.switchButton = button;
+
+ _this.events.on("toggled", function () {
+ _this.leftLabel.isActive = !_this.isActive;
+ _this.rightLabel.isActive = _this.isActive;
+ }); // Create the label element
+
+
+ var rightLabel = new _Label__WEBPACK_IMPORTED_MODULE_1__.Label();
+ rightLabel.fillOpacity = 0.3;
+ var rlas = rightLabel.states.create("active");
+ rlas.properties.fillOpacity = 1;
+ _this.rightLabel = rightLabel; // Set up accessibility
+ // A Button should be always focusable
+
+ _this.role = "button";
+ _this.focusable = true;
+ rightLabel.valign = "middle";
+ leftLabel.valign = "middle";
+ button.valign = "middle"; // Apply theme
+
+ _this.applyTheme();
+
+ return _this;
+ }
+
+ Object.defineProperty(SwitchButton.prototype, "leftLabel", {
+ /**
+ * @return Left label element
+ */
+ get: function get() {
+ return this._leftLabel;
+ },
+
+ /**
+ * [[Label]] element to be used for left text.
+ *
+ * @param left label element
+ */
+ set: function set(label) {
+ if (this._leftLabel) {
+ this.removeDispose(this._leftLabel);
+ }
+
+ this._leftLabel = label;
+
+ if (label) {
+ label.parent = this;
+ label.interactionsEnabled = false;
+ label.shouldClone = false;
+
+ this._disposers.push(this._leftLabel);
+ }
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(SwitchButton.prototype, "rightLabel", {
+ /**
+ * @return Rigth label element
+ */
+ get: function get() {
+ return this._rightLabel;
+ },
+
+ /**
+ * [[Label]] element to be used for left text.
+ *
+ * @param rigth label element
+ */
+ set: function set(label) {
+ if (this._rightLabel) {
+ this.removeDispose(this._rightLabel);
+ }
+
+ this._rightLabel = label;
+
+ if (label) {
+ label.parent = this;
+ label.interactionsEnabled = false;
+ label.shouldClone = false;
+
+ this._disposers.push(this._rightLabel);
+ }
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(SwitchButton.prototype, "switch", {
+ /**
+ * @ignore
+ * @deprecated Use `switchButton` instead
+ */
+ get: function get() {
+ return this._switchButton;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(SwitchButton.prototype, "switchButton", {
+ /**
+ * @return Button
+ */
+ get: function get() {
+ return this._switchButton;
+ },
+
+ /**
+ * A [[Button]] element for switch.
+ *
+ * @param Button
+ */
+ set: function set(button) {
+ if (this._switchButton) {
+ this.removeDispose(this._switchButton);
+ }
+
+ this._switchButton = button;
+
+ if (button) {
+ button.parent = this;
+ button.shouldClone = false;
+
+ this._disposers.push(this._switchButton);
+ }
+ },
+ enumerable: true,
+ configurable: true
+ });
+ /**
+ * Copies properties and other attributes.
+ *
+ * @param source Source
+ */
+
+ SwitchButton.prototype.copyFrom = function (source) {
+ _super.prototype.copyFrom.call(this, source);
+
+ if (source.leftLabel) {
+ this.leftLabel.copyFrom(source.leftLabel);
+ }
+
+ if (source.rightLabel) {
+ this.rightLabel.copyFrom(source.rightLabel);
+ }
+
+ if (source.switchButton) {
+ this.switchButton.copyFrom(source.switchButton);
+ }
+ };
+
+ return SwitchButton;
+}(_Container__WEBPACK_IMPORTED_MODULE_0__.Container);
+
+
+/**
+ * Register class in system, so that it can be instantiated using its name from
+ * anywhere.
+ *
+ * @ignore
+ */
+
+_Registry__WEBPACK_IMPORTED_MODULE_6__.registry.registeredClasses.SwitchButton = SwitchButton;
+
+/***/ }),
+
+/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/TextLink.js":
+/*!******************************************************************************!*\
+ !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/TextLink.js ***!
+ \******************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "TextLink": () => (/* binding */ TextLink)
+/* harmony export */ });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
+/* harmony import */ var _core_elements_Label__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../core/elements/Label */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Label.js");
+/* harmony import */ var _core_interaction_Mouse__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/interaction/Mouse */ "./node_modules/@amcharts/amcharts4/.internal/core/interaction/Mouse.js");
+/* harmony import */ var _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/utils/InterfaceColorSet */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/InterfaceColorSet.js");
+/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
+/**
+ * A module that defines Text element used to indicate links.
+ */
+
+/**
+ * ============================================================================
+ * IMPORTS
+ * ============================================================================
+ * @hidden
+ */
+
+
+
+
+
+/**
+ * ============================================================================
+ * MAIN CLASS
+ * ============================================================================
+ * @hidden
+ */
+
+/**
+ * Creates a text element with a link.
+ *
+ * @see {@link ITextLinkEvents} for a list of available events
+ * @see {@link ITextLinkAdapters} for a list of available Adapters
+ */
+
+var TextLink =
+/** @class */
+function (_super) {
+ (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__extends)(TextLink, _super);
+ /**
+ * Constructor
+ */
+
+
+ function TextLink() {
+ var _this = _super.call(this) || this;
+
+ _this.className = "TextLink";
+ _this.selectable = true;
+ var interfaceColors = new _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_2__.InterfaceColorSet();
+ _this.fill = interfaceColors.getFor("primaryButton").brighten(0.3);
+
+ var hoverState = _this.states.create("hover");
+
+ hoverState.properties.fill = interfaceColors.getFor("primaryButtonHover").brighten(0.3);
+
+ var downState = _this.states.create("down");
+
+ downState.properties.fill = interfaceColors.getFor("primaryButtonDown").brighten(0.3);
+ _this.cursorOverStyle = _core_interaction_Mouse__WEBPACK_IMPORTED_MODULE_1__.MouseCursorStyle.pointer;
+
+ _this.applyTheme();
+
+ return _this;
+ }
+
+ return TextLink;
+}(_core_elements_Label__WEBPACK_IMPORTED_MODULE_0__.Label);
+
+
+/**
+ * Register class in system, so that it can be instantiated using its name from
+ * anywhere.
+ *
+ * @ignore
+ */
+
+_Registry__WEBPACK_IMPORTED_MODULE_3__.registry.registeredClasses.TextLink = TextLink;
+
+/***/ }),
+
+/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Tooltip.js":
+/*!*****************************************************************************!*\
+ !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/Tooltip.js ***!
+ \*****************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "Tooltip": () => (/* binding */ Tooltip)
+/* harmony export */ });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
+/* harmony import */ var _Container__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Container */ "./node_modules/@amcharts/amcharts4/.internal/core/Container.js");
+/* harmony import */ var _core_Registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
+/* harmony import */ var _PointedRectangle__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./PointedRectangle */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/PointedRectangle.js");
+/* harmony import */ var _elements_Label__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../elements/Label */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Label.js");
+/* harmony import */ var _utils_Animation__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/Animation */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Animation.js");
+/* harmony import */ var _utils_Color__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/Color */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Color.js");
+/* harmony import */ var _rendering_filters_DropShadowFilter__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../rendering/filters/DropShadowFilter */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/filters/DropShadowFilter.js");
+/* harmony import */ var _utils_Math__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
+/* harmony import */ var _utils_Ease__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/Ease */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Ease.js");
+/* harmony import */ var _utils_Utils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
+/**
+ * Provides functionality used to creating and showing tooltips (balloons).
+ */
+
+/**
+ * ============================================================================
+ * IMPORTS
+ * ============================================================================
+ * @hidden
+ */
+
+
+
+
+
+
+
+
+
+
+
+/**
+ * ============================================================================
+ * MAIN CLASS
+ * ============================================================================
+ * @hidden
+ */
+
+/**
+ * Tooltip displays text and/or multimedia information in a balloon over chart
+ * area.
+ * @see {@link ITooltipEvents} for a list of available events
+ * @see {@link ITooltipAdapters} for a list of available Adapters
+ */
+
+var Tooltip =
+/** @class */
+function (_super) {
+ (0,tslib__WEBPACK_IMPORTED_MODULE_10__.__extends)(Tooltip, _super);
+ /**
+ * Constructor
+ */
+
+
+ function Tooltip() {
+ var _this = // Init
+ _super.call(this) || this;
+ /**
+ * Holds numeric boundary values. Calculated from the `boundingContainer`.
+ * @ignore
+ */
+
+
+ _this._boundingRect = {
+ x: -40000,
+ y: -40000,
+ width: 80000,
+ height: 80000
+ };
+ /**
+ * Coordinates tooltip's pointer (stem) should point to.
+ */
+
+ _this._pointTo = {
+ x: 0,
+ y: 0
+ };
+ /**
+ * If set to `true` the pointer/stem of the Tooltip will not go outside
+ * Tooltip's width or height depending on pointer's orientation.
+ *
+ * @default false
+ */
+
+ _this.fitPointerToBounds = false;
+ /**
+ * If `tooltipOrientation` is vertical, it can be drawn below or above point
+ * We need to know this when solving overlapping.
+ */
+
+ _this._verticalOrientation = "up";
+ /**
+ * @ignore
+ */
+
+ _this.fixDoc = true;
+ _this.className = "Tooltip";
+ _this.isMeasured = false;
+ _this.getFillFromObject = true;
+
+ _this.margin(5, 5, 5, 5);
+
+ _this.defaultState.transitionDuration = 1;
+ _this.hiddenState.transitionDuration = 1; // Create chrome/background
+
+ var background = _this.background;
+ background.interactionsEnabled = false;
+ background.fillOpacity = 0.9;
+ background.strokeWidth = 1;
+ background.strokeOpacity = 1;
+ background.stroke = (0,_utils_Color__WEBPACK_IMPORTED_MODULE_5__.color)("#ffffff");
+ background.cornerRadius = 3;
+ background.pointerLength = 6;
+ background.pointerBaseWidth = 10;
+ var dropShadow = new _rendering_filters_DropShadowFilter__WEBPACK_IMPORTED_MODULE_6__.DropShadowFilter();
+ dropShadow.dy = 1;
+ dropShadow.dx = 1;
+ dropShadow.opacity = 0.5;
+ background.filters.push(dropShadow);
+ _this.autoTextColor = true; // Create text element
+
+ var label = _this.createChild(_elements_Label__WEBPACK_IMPORTED_MODULE_3__.Label);
+
+ label.shouldClone = false;
+ _this.label = label;
+ label.padding(7, 12, 4, 12);
+ label.interactionsEnabled = false;
+ label.horizontalCenter = "middle";
+ label.fill = (0,_utils_Color__WEBPACK_IMPORTED_MODULE_5__.color)("#ffffff");
+
+ _this._disposers.push(label);
+
+ _this.label.events.on("sizechanged", _this.drawBackground, _this);
+
+ _this.label.zIndex = 1; // @todo remove this line when bg sorting is solved
+ // Set defaults
+
+ _this.pointerOrientation = "vertical";
+ _this.animationDuration = 0;
+ _this.animationEasing = _utils_Ease__WEBPACK_IMPORTED_MODULE_8__.cubicOut;
+
+ _this.setPropertyValue("showInViewport", false); // Set accessibility options
+
+
+ _this.role = "tooltip";
+ _this.visible = false;
+ _this.opacity = 0;
+ _this.x = 0;
+ _this.y = 0;
+
+ _this.events.on("visibilitychanged", _this.handleVisibility, _this); // Apply theme
+
+
+ _this.applyTheme();
+
+ return _this;
+ }
+
+ Tooltip.prototype.handleVisibility = function () {
+ if (this.visible) {
+ this.label.invalidate();
+ }
+ };
+
+ Object.defineProperty(Tooltip.prototype, "getStrokeFromObject", {
+ /**
+ * Specifies if tooltip background should get stroke color from the sprite it is pointing to.
+ *
+ * @return {boolean}
+ * @default false
+ */
+ get: function get() {
+ return this.getPropertyValue("getStrokeFromObject");
+ },
+
+ /**
+ * Specifies if tooltip background should get stroke color from the sprite it is pointing to.
+ *
+ * @param value boolean
+ */
+ set: function set(value) {
+ this.setPropertyValue("getStrokeFromObject", value, true);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Tooltip.prototype, "autoTextColor", {
+ /**
+ * @return {boolean}
+ */
+ get: function get() {
+ return this.getPropertyValue("autoTextColor");
+ },
+
+ /**
+ * Specifies if text color should be chosen automatically for a better
+ * readability.
+ *
+ * IMPORTANT: this feature is generally ignored, if `getFillFromObject = false`.
+ *
+ * If inheriting of `fill` color from object tooltip is displayed for is
+ * disabled, this feature will not work. If you are explicitly setting a
+ * color for tooltip background, you may set a color for its label as well
+ * using `tooltip.label.fill` property.
+ *
+ *
+ * @param value boolean
+ */
+ set: function set(value) {
+ this.setPropertyValue("autoTextColor", value, true);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Tooltip.prototype, "keepTargetHover", {
+ /**
+ * @return Keep target hovered?
+ */
+ get: function get() {
+ return this.getPropertyValue("keepTargetHover");
+ },
+
+ /**
+ * If this tooltip is displayed on hover on some other object, keep that
+ * element hovered if hovering on the tooltip.
+ *
+ * @default false
+ * @since 4.1.13
+ * @param value Keep target hovered?
+ */
+ set: function set(value) {
+ var _this = this;
+
+ if (this.setPropertyValue("keepTargetHover", value, true)) {
+ if (value) {
+ this.hoverable = true;
+ this.background.interactionsEnabled = true;
+
+ this._disposers.push(this.events.on("over", function (ev) {
+ if (_this.targetSprite && _this.targetSprite.hoverable) {
+ _this.targetSprite.isHover = true;
+ }
+ }));
+
+ this._disposers.push(this.events.on("out", function (ev) {
+ if (_this.targetSprite && _this.targetSprite.hoverable) {
+ //this.hideTooltip();
+ //this.targetSprite.handleOut();
+ _this.targetSprite.isHover = false;
+ }
+ }));
+ }
+ }
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Tooltip.prototype, "showInViewport", {
+ /**
+ * @return Force showing tooltip?
+ */
+ get: function get() {
+ return this.getPropertyValue("showInViewport");
+ },
+
+ /**
+ * Normally, a tooltip will hide itself if it is pointing to a coordinate
+ * that is outside viewport.
+ *
+ * Setting this setting to `true` will override that and make tooltip
+ * appear next to the viewport edge closest to the target point.
+ *
+ * @default false
+ * @since 4.5.7
+ * @param value Force showing tooltip?
+ */
+ set: function set(value) {
+ this.setPropertyValue("showInViewport", value);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Tooltip.prototype, "getFillFromObject", {
+ /**
+ * Specifies if tooltip background should get fill color from the sprite it is pointing to.
+ *
+ * @return {boolean}
+ * @default true
+ */
+ get: function get() {
+ return this.getPropertyValue("getFillFromObject");
+ },
+
+ /**
+ * @param value boolean
+ */
+ set: function set(value) {
+ this.setPropertyValue("getFillFromObject", value, true);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ /**
+ * Creates and returns a background element.
+ *
+ * @ignore Exclude from docs
+ * @return Background
+ */
+
+ Tooltip.prototype.createBackground = function () {
+ return new _PointedRectangle__WEBPACK_IMPORTED_MODULE_2__.PointedRectangle();
+ };
+
+ Object.defineProperty(Tooltip.prototype, "pointerOrientation", {
+ /**
+ * @return Orientation
+ */
+ get: function get() {
+ return this.getPropertyValue("pointerOrientation");
+ },
+
+ /**
+ * Pointer orientation: `"horizontal"`, `"vertical"`, `"up"`, `"down"`,
+ * `"right"`, or `"left"`.
+ *
+ * Options`"horizontal"` or `"vertical"` are location-aware, meaning they
+ * will change position of the Tooltip based on the target point's position
+ * in relation to chart center.
+ *
+ * Options `"up"`, `"down"`, `"right"`, `"left"` are static and will point
+ * in the specified direction regardless of the position, even if that means
+ * going out of chart/screen bounds.
+ *
+ * IMPORTANT: in some situations, like having multiple tooltips stacked for
+ * multiple series, the `"up"` and `"down"` values might be ignored in order
+ * to make tooltip overlap algorithm work.
+ *
+ * @default "vertical"
+ * @param value Orientation
+ */
+ set: function set(value) {
+ this.setPropertyValue("pointerOrientation", value, true);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Tooltip.prototype, "animationDuration", {
+ /**
+ * @return Orientation
+ */
+ get: function get() {
+ return this.getPropertyValue("animationDuration");
+ },
+
+ /**
+ * Duration in milliseconds for the animation to take place when the tooltip
+ * is moving from one place to another.
+ *
+ * @default 0
+ * @param value number
+ */
+ set: function set(value) {
+ this.setPropertyValue("animationDuration", value);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Tooltip.prototype, "animationEasing", {
+ /**
+ * @return {Function}
+ */
+ get: function get() {
+ return this.getPropertyValue("animationEasing");
+ },
+
+ /**
+ * Tooltip animation (moving from one place to another) easing function.
+ *
+ * @default $ease.cubicOut
+ * @param value (value: number) => number
+ */
+ set: function set(value) {
+ this.setPropertyValue("animationEasing", value);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Tooltip.prototype, "html", {
+ /**
+ * @return HTML content
+ */
+ get: function get() {
+ return this.label.html;
+ },
+
+ /**
+ * HTML content for the Tooltip.
+ *
+ * Provided value will be used as is, without applying any further
+ * formatting to it.
+ *
+ * @param value HTML content
+ */
+ set: function set(value) {
+ if (this.label.html != value) {
+ this.label.html = value;
+ this.invalidate();
+ }
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Tooltip.prototype, "text", {
+ /**
+ * @return SVG text
+ */
+ get: function get() {
+ return this.label.text;
+ },
+
+ /**
+ * SVG text content for the Tooltip.
+ *
+ * Text can have a number of formatting options supported by
+ * [[TextFormatter]].
+ *
+ * @param value SVG text
+ */
+ set: function set(value) {
+ if (this.label.text != value) {
+ this.label.text = value;
+ this.invalidate();
+ }
+ },
+ enumerable: true,
+ configurable: true
+ });
+ /**
+ * Creates the Tooltip.
+ *
+ * @ignore Exclude from docs
+ */
+
+ Tooltip.prototype.draw = function () {
+ _super.prototype.draw.call(this);
+
+ var label = this.label;
+
+ if (label.invalid) {
+ label.validate();
+ }
+
+ var x = this._pointTo.x;
+ var y = this._pointTo.y;
+ var boundingRect = this._boundingRect;
+ var textW = label.measuredWidth;
+ var textH = label.measuredHeight;
+ var pointerLength = this.background.pointerLength;
+ var textX;
+ var textY;
+
+ if (this.ignoreBounds) {
+ boundingRect = undefined;
+ } // try to handle if text is wider than br
+
+
+ if (boundingRect && this.fixDoc && textW > boundingRect.width) {
+ // TODO maybe this isn't needed ?
+ _utils_Utils__WEBPACK_IMPORTED_MODULE_9__.spritePointToDocument({
+ x: boundingRect.x,
+ y: boundingRect.y
+ }, this.parent);
+ var p1 = _utils_Utils__WEBPACK_IMPORTED_MODULE_9__.spritePointToDocument({
+ x: boundingRect.x + boundingRect.width,
+ y: boundingRect.y + boundingRect.height
+ }, this.parent);
+ var documentWidth = document.body.offsetWidth; // TODO maybe this isn't needed ?
+
+ _utils_Utils__WEBPACK_IMPORTED_MODULE_9__.used(document.body.offsetHeight);
+
+ if (p1.x > documentWidth / 2) {
+ boundingRect.x = boundingRect.width - textW;
+ } else {
+ boundingRect.width = boundingRect.x + textW;
+ }
+ }
+
+ var pointerOrientation = this.pointerOrientation; // horizontal
+
+ if (pointerOrientation == "horizontal" || pointerOrientation == "left" || pointerOrientation == "right") {
+ textY = -textH / 2;
+
+ if (pointerOrientation == "horizontal") {
+ if (boundingRect && x > boundingRect.x + boundingRect.width / 2) {
+ textX = -textW / 2 - pointerLength;
+ } else {
+ textX = textW / 2 + pointerLength;
+ }
+ } else if (pointerOrientation == "left") {
+ textX = textW / 2 + pointerLength;
+ } else {
+ textX = -textW / 2 - pointerLength;
+ }
+ } // vertical pointer
+ else {
+ if (boundingRect) {
+ textX = _utils_Math__WEBPACK_IMPORTED_MODULE_7__.fitToRange(0, boundingRect.x - x + textW / 2, boundingRect.x - x + boundingRect.width - textW / 2);
+ }
+
+ if (pointerOrientation == "vertical") {
+ if (boundingRect && y > boundingRect.y + textH + pointerLength) {
+ textY = -textH - pointerLength;
+ this._verticalOrientation = "up";
+ } else {
+ textY = pointerLength;
+ this._verticalOrientation = "down";
+ }
+ } else if (pointerOrientation == "down") {
+ textY = -textH - pointerLength;
+ this._verticalOrientation = "up";
+ } else {
+ textY = pointerLength;
+ this._verticalOrientation = "down";
+ }
+ }
+
+ if (boundingRect) {
+ textY = _utils_Math__WEBPACK_IMPORTED_MODULE_7__.fitToRange(textY, boundingRect.y - y, boundingRect.y + boundingRect.height - textH - y);
+ }
+
+ label.x = textX;
+ label.y = textY;
+ this.drawBackground();
+ };
+ /**
+ * Overrides functionality from the superclass.
+ *
+ * @ignore Exclude from docs
+ */
+
+
+ Tooltip.prototype.updateBackground = function () {
+ this.group.addToBack(this.background.group);
+ };
+ /**
+ * Draws Tooltip background (chrome, background and pointer/stem).
+ *
+ * @ignore Exclude from docs
+ */
+
+
+ Tooltip.prototype.drawBackground = function () {
+ var label = this.label;
+ var background = this.background;
+ var textWidth = label.measuredWidth;
+ var textHeight = label.measuredHeight;
+ var boundingRect = this._boundingRect;
+ var bgWidth = textWidth;
+ var bgX = label.pixelX - textWidth / 2;
+ var bgHeight = textHeight;
+ var bgY = label.pixelY;
+ var x = this._pointTo.x;
+ var y = this._pointTo.y;
+ var boundX1 = boundingRect.x - x;
+ var boundX2 = boundX1 + boundingRect.width;
+ var boundY1 = boundingRect.y - y;
+ var boundY2 = boundY1 + boundingRect.height;
+ background.x = bgX;
+ background.y = bgY;
+ background.width = bgWidth;
+ background.height = bgHeight;
+
+ if (this.fitPointerToBounds) {
+ background.pointerX = _utils_Math__WEBPACK_IMPORTED_MODULE_7__.fitToRange(-background.x, boundX1 - background.x, boundX2 - background.x);
+ background.pointerY = _utils_Math__WEBPACK_IMPORTED_MODULE_7__.fitToRange(-background.y, boundY1 - background.y, boundY2 - background.y);
+ } else {
+ background.pointerX = -background.x;
+ background.pointerY = -background.y;
+ }
+
+ background.validate();
+ };
+ /**
+ *
+ */
+
+
+ Tooltip.prototype.delayedPointTo = function (point, instantly) {
+ var _this = this;
+
+ if (this._pointToDisposer) {
+ this._pointToDisposer.dispose();
+ }
+
+ this._pointToDisposer = _core_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.events.once("exitframe", function () {
+ _this.pointTo(point, instantly);
+ });
+ this.addDisposer(this._pointToDisposer);
+ };
+ /**
+ * Set nes tooltip's anchor point and moves whole tooltip.
+ *
+ * @param x X coordinate
+ * @param y Y coordinate
+ */
+
+
+ Tooltip.prototype.pointTo = function (point, instantly) {
+ if (this._pointTo.x != point.x || this._pointTo.y != point.y) {
+ this._pointTo = point;
+ this.invalidate(); // this helps to avoid strange animation from nowhere on initial show or when balloon was hidden already
+
+ if (!this.visible || instantly) {
+ this.moveTo(this._pointTo);
+
+ if (this._animation) {
+ this._animation.kill();
+ }
+ } else {
+ // helps to avoid flicker on top/left corner
+ if (this.pixelX == 0 && this.pixelY == 0) {
+ this.moveTo(this._pointTo);
+ } else {
+ if (this._animation) {
+ this._animation.kill();
+ }
+
+ this._animation = new _utils_Animation__WEBPACK_IMPORTED_MODULE_4__.Animation(this, [{
+ property: "x",
+ to: point.x,
+ from: this.pixelX
+ }, {
+ property: "y",
+ to: point.y,
+ from: this.pixelY
+ }], this.animationDuration, this.animationEasing).start();
+ }
+ }
+ }
+ };
+ /**
+ * Sets numeric boundaries Tooltip needs to obey (so it does not go outside
+ * specific area).
+ *
+ * @ignore Exclude from docs
+ * @param rectangle Boundary rectangle
+ */
+
+
+ Tooltip.prototype.setBounds = function (rectangle) {
+ var oldRect = this._boundingRect;
+
+ if (oldRect.x != rectangle.x || oldRect.y != rectangle.y || oldRect.width != rectangle.width || oldRect.height != rectangle.height) {
+ this._boundingRect = rectangle;
+ this.invalidate();
+ }
+ };
+
+ Object.defineProperty(Tooltip.prototype, "boundingContainer", {
+ /**
+ * Sets a [[Container]] instance to be used when calculating numeric
+ * boundaries for the Tooltip.
+ *
+ * @ignore Exclude from docs
+ * @param container Boundary container
+ */
+ set: function set(container) {
+ this._boundingContainer = container; // TODO remove closures ?
+
+ container.events.on("sizechanged", this.updateBounds, this);
+ container.events.on("positionchanged", this.updateBounds, this);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ /**
+ * Updates numeric boundaries for the Tooltip, based on the
+ * `boundingCountrainer`.
+ */
+
+ Tooltip.prototype.updateBounds = function () {
+ var boundingContainer = this._boundingContainer; // to global
+
+ var rect = _utils_Utils__WEBPACK_IMPORTED_MODULE_9__.spriteRectToSvg({
+ x: boundingContainer.pixelX,
+ y: boundingContainer.pixelY,
+ width: boundingContainer.maxWidth,
+ height: boundingContainer.maxHeight
+ }, boundingContainer);
+ this.setBounds(rect);
+ };
+
+ Object.defineProperty(Tooltip.prototype, "ignoreBounds", {
+ /**
+ * @return Ignore chart bounds?
+ */
+ get: function get() {
+ return this.getPropertyValue("ignoreBounds");
+ },
+
+ /**
+ * Normally, a tooltip's position will be adjusted so it always fits into
+ * chart's coundaries.
+ *
+ * Setting this to `false` will disable such checks and will allow tooltip
+ * to "bleed over" the edge of the chart.
+ *
+ * @default false
+ * @since 4.10.8
+ * @param value Ignore chart bounds?
+ */
+ set: function set(value) {
+ this.setPropertyValue("ignoreBounds", value);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Tooltip.prototype, "verticalOrientation", {
+ /**
+ * If tooltipOrientation is vertical, it can be drawn below or above point.
+ * We need to know this when solving overlapping.
+ *
+ * @ignore Exclude from docs
+ * @return "up" | "down"
+ */
+ get: function get() {
+ return this._verticalOrientation;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Tooltip.prototype, "tooltip", {
+ /**
+ * To avoid stackoverflow
+ * @ignore
+ */
+ get: function get() {
+ return undefined;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ /**
+ * Copies properties and other attributes.
+ *
+ * @param source Source
+ */
+
+ Tooltip.prototype.copyFrom = function (source) {
+ _super.prototype.copyFrom.call(this, source);
+
+ this.label.copyFrom(source.label);
+
+ if (source._boundingRect) {
+ this._boundingRect = source._boundingRect;
+ }
+ };
+ /**
+ * Adds easing functions to "function" fields.
+ *
+ * @param field Field name
+ * @return Assign as function?
+ */
+
+
+ Tooltip.prototype.asFunction = function (field) {
+ return field == "animationEasing" || _super.prototype.asIs.call(this, field);
+ };
+
+ return Tooltip;
+}(_Container__WEBPACK_IMPORTED_MODULE_0__.Container);
+
+
+/**
+ * Register class in system, so that it can be instantiated using its name from
+ * anywhere.
+ *
+ * @ignore
+ */
+
+_core_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses.Tooltip = Tooltip;
+
+/***/ }),
+
+/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Trapezoid.js":
+/*!*******************************************************************************!*\
+ !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/Trapezoid.js ***!
+ \*******************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "Trapezoid": () => (/* binding */ Trapezoid)
+/* harmony export */ });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
+/* harmony import */ var _Sprite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Sprite */ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js");
+/* harmony import */ var _core_utils_Percent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/utils/Percent */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Percent.js");
+/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
+/* harmony import */ var _utils_Utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
+/* harmony import */ var _utils_Type__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
+/* harmony import */ var _rendering_Path__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../rendering/Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");
+/**
+ * Functionality for drawing a trapezoid.
+ */
+
+/**
+ * ============================================================================
+ * IMPORTS
+ * ============================================================================
+ * @hidden
+ */
+
+
+
+
+
+
+
+/**
+ * ============================================================================
+ * MAIN CLASS
+ * ============================================================================
+ * @hidden
+ */
+
+/**
+ * Used to draw a Trapezoid.
+ *
+ * @see {@link ITrapezoidEvents} for a list of available events
+ * @see {@link ITrapezoidAdapters} for a list of available Adapters
+ */
+
+var Trapezoid =
+/** @class */
+function (_super) {
+ (0,tslib__WEBPACK_IMPORTED_MODULE_6__.__extends)(Trapezoid, _super);
+ /**
+ * Constructor
+ */
+
+
+ function Trapezoid() {
+ var _this = _super.call(this) || this;
+
+ _this.className = "Trapezoid";
+ _this.element = _this.paper.add("path");
+ _this.topSide = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_1__.percent)(100);
+ _this.bottomSide = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_1__.percent)(100);
+ _this.leftSide = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_1__.percent)(100);
+ _this.rightSide = (0,_core_utils_Percent__WEBPACK_IMPORTED_MODULE_1__.percent)(100);
+ _this.isMeasured = false; // todo: add measureElement
+
+ _this.applyTheme();
+
+ return _this;
+ }
+ /**
+ * Draws the element.
+ *
+ * @ignore Exclude from docs
+ */
+
+
+ Trapezoid.prototype.draw = function () {
+ _super.prototype.draw.call(this);
+
+ var w = this.pixelWidth;
+ var h = this.pixelHeight;
+ var ts = _utils_Utils__WEBPACK_IMPORTED_MODULE_3__.relativeToValue(this.topSide, w);
+ var bs = _utils_Utils__WEBPACK_IMPORTED_MODULE_3__.relativeToValue(this.bottomSide, w);
+ var ls = _utils_Utils__WEBPACK_IMPORTED_MODULE_3__.relativeToValue(this.leftSide, h);
+ var rs = _utils_Utils__WEBPACK_IMPORTED_MODULE_3__.relativeToValue(this.rightSide, h); // 1----2
+ // | |
+ // 4----3
+
+ var x0 = (w - ts) / 2;
+ var y0 = (h - ls) / 2;
+ var x1 = w - (w - ts) / 2;
+ var y1 = (h - rs) / 2;
+ var x2 = w - (w - bs) / 2;
+ var y2 = h - (h - rs) / 2;
+ var x3 = (w - bs) / 2;
+ var y3 = h - (h - ls) / 2;
+ var mt = "";
+ var mr = "";
+ var mb = "";
+ var ml = "";
+
+ if (_utils_Type__WEBPACK_IMPORTED_MODULE_4__.hasValue(this.horizontalNeck)) {
+ var hn = this.horizontalNeck.value;
+ mt = _rendering_Path__WEBPACK_IMPORTED_MODULE_5__.lineTo({
+ x: w * hn,
+ y: Math.max(y0, y1)
+ });
+ mb = _rendering_Path__WEBPACK_IMPORTED_MODULE_5__.lineTo({
+ x: w * hn,
+ y: Math.min(y2, y3)
+ });
+ }
+
+ if (_utils_Type__WEBPACK_IMPORTED_MODULE_4__.hasValue(this.verticalNeck)) {
+ var vn = this.verticalNeck.value;
+ mr = _rendering_Path__WEBPACK_IMPORTED_MODULE_5__.lineTo({
+ x: Math.min(x1, x2),
+ y: h * vn
+ });
+ ml = _rendering_Path__WEBPACK_IMPORTED_MODULE_5__.lineTo({
+ x: Math.max(x0, x3),
+ y: h * vn
+ });
+ }
+
+ var path = _rendering_Path__WEBPACK_IMPORTED_MODULE_5__.moveTo({
+ x: x0,
+ y: y0
+ }) + mt + _rendering_Path__WEBPACK_IMPORTED_MODULE_5__.lineTo({
+ x: x1,
+ y: y1
+ }) + mr + _rendering_Path__WEBPACK_IMPORTED_MODULE_5__.lineTo({
+ x: x2,
+ y: y2
+ }) + mb + _rendering_Path__WEBPACK_IMPORTED_MODULE_5__.lineTo({
+ x: x3,
+ y: y3
+ }) + ml;
+ this.path = path;
+ };
+
+ Object.defineProperty(Trapezoid.prototype, "topSide", {
+ /**
+ * @return Width
+ */
+ get: function get() {
+ return this.getPropertyValue("topSide");
+ },
+
+ /**
+ * Wdith of the top side. Absolute (px) or relative ([[Percent]]).
+ *
+ * @default Percent(100)
+ * @param value Width
+ */
+ set: function set(value) {
+ this.setPercentProperty("topSide", value, true, false, 10, false);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Trapezoid.prototype, "bottomSide", {
+ /**
+ * @return Width
+ */
+ get: function get() {
+ return this.getPropertyValue("bottomSide");
+ },
+
+ /**
+ * Wdith of the bottom side. Absolute (px) or relative ([[Percent]]).
+ *
+ * @default Percent(100)
+ * @param value Width
+ */
+ set: function set(value) {
+ this.setPercentProperty("bottomSide", value, true, false, 10, false);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Trapezoid.prototype, "leftSide", {
+ /**
+ * @return Height
+ */
+ get: function get() {
+ return this.getPropertyValue("leftSide");
+ },
+
+ /**
+ * Height of the left side. Absolute (px) or relative ([[Percent]]).
+ *
+ * @default Percent(100)
+ * @param value Height
+ */
+ set: function set(value) {
+ this.setPercentProperty("leftSide", value, true, false, 10, false);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Trapezoid.prototype, "rightSide", {
+ /**
+ * @return Height
+ */
+ get: function get() {
+ return this.getPropertyValue("rightSide");
+ },
+
+ /**
+ * Height of the right side. Absolute (px) or relative ([[Percent]]).
+ *
+ * @default Percent(100)
+ * @param value Height
+ */
+ set: function set(value) {
+ this.setPercentProperty("rightSide", value, true, false, 10, false);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Trapezoid.prototype, "horizontalNeck", {
+ /**
+ * @return Horizontal neck position
+ */
+ get: function get() {
+ return this.getPropertyValue("horizontalNeck");
+ },
+
+ /**
+ * A relative vertical position of the "neck". If the top and bottom sides
+ * are of different width, and `horizontalNeck` is set, a choke point
+ * will be created at that position, creating a funnel shape.
+ *
+ * @param value Horizontal neck position
+ */
+ set: function set(value) {
+ this.setPropertyValue("horizontalNeck", value, true);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(Trapezoid.prototype, "verticalNeck", {
+ /**
+ * @return Vertical neck position
+ */
+ get: function get() {
+ return this.getPropertyValue("verticalNeck");
+ },
+
+ /**
+ * A relative horizontal position of the "neck". If the left and right sides
+ * are of different height, and `verticalNeck` is set, a choke point
+ * will be created at that position, creating a funnel shape.
+ *
+ * @param value Vertical neck position
+ */
+ set: function set(value) {
+ this.setPropertyValue("verticalNeck", value, true);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ return Trapezoid;
+}(_Sprite__WEBPACK_IMPORTED_MODULE_0__.Sprite);
+
+
+/**
+ * Register class in system, so that it can be instantiated using its name from
+ * anywhere.
+ *
+ * @ignore
+ */
+
+_Registry__WEBPACK_IMPORTED_MODULE_2__.registry.registeredClasses.Trapezoid = Trapezoid;
+
+/***/ }),
+
+/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Triangle.js":
+/*!******************************************************************************!*\
+ !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/Triangle.js ***!
+ \******************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "Triangle": () => (/* binding */ Triangle)
+/* harmony export */ });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
+/* harmony import */ var _Sprite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Sprite */ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js");
+/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
+/* harmony import */ var _rendering_Path__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../rendering/Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");
+/**
+ * Functionality for drawing triangles.
+ */
+
+/**
+ * ============================================================================
+ * IMPORTS
+ * ============================================================================
+ * @hidden
+ */
+
+
+
+
+/**
+ * ============================================================================
+ * MAIN CLASS
+ * ============================================================================
+ * @hidden
+ */
+
+/**
+ * Used to draw a triangle.
+ *
+ * @see {@link ITriangleEvents} for a list of available events
+ * @see {@link ITriangleAdapters} for a list of available Adapters
+ */
+
+var Triangle =
+/** @class */
+function (_super) {
+ (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__extends)(Triangle, _super);
+ /**
+ * Constructor
+ */
+
+
+ function Triangle() {
+ var _this = _super.call(this) || this;
+
+ _this.className = "Triangle";
+ _this.element = _this.paper.add("path");
+ _this.direction = "top";
+
+ _this.applyTheme();
+
+ return _this;
+ }
+ /**
+ * Draws the element.
+ *
+ * @ignore Exclude from docs
+ */
+
+
+ Triangle.prototype.draw = function () {
+ _super.prototype.draw.call(this);
+
+ var w = this.pixelWidth;
+ var h = this.pixelHeight;
+ var path;
+
+ switch (this.direction) {
+ case "right":
+ path = _rendering_Path__WEBPACK_IMPORTED_MODULE_2__.moveTo({
+ x: 0,
+ y: 0
+ }) + _rendering_Path__WEBPACK_IMPORTED_MODULE_2__.lineTo({
+ x: w,
+ y: h / 2
+ }) + _rendering_Path__WEBPACK_IMPORTED_MODULE_2__.lineTo({
+ x: 0,
+ y: h
+ }) + _rendering_Path__WEBPACK_IMPORTED_MODULE_2__.closePath();
+ break;
+
+ case "left":
+ path = _rendering_Path__WEBPACK_IMPORTED_MODULE_2__.moveTo({
+ x: w,
+ y: 0
+ }) + _rendering_Path__WEBPACK_IMPORTED_MODULE_2__.lineTo({
+ x: 0,
+ y: h / 2
+ }) + _rendering_Path__WEBPACK_IMPORTED_MODULE_2__.lineTo({
+ x: w,
+ y: h
+ }) + _rendering_Path__WEBPACK_IMPORTED_MODULE_2__.closePath();
+ break;
+
+ case "bottom":
+ path = _rendering_Path__WEBPACK_IMPORTED_MODULE_2__.moveTo({
+ x: 0,
+ y: 0
+ }) + _rendering_Path__WEBPACK_IMPORTED_MODULE_2__.lineTo({
+ x: w,
+ y: 0
+ }) + _rendering_Path__WEBPACK_IMPORTED_MODULE_2__.lineTo({
+ x: w / 2,
+ y: h
+ }) + _rendering_Path__WEBPACK_IMPORTED_MODULE_2__.closePath();
+ break;
+
+ case "top":
+ path = _rendering_Path__WEBPACK_IMPORTED_MODULE_2__.moveTo({
+ x: w / 2,
+ y: 0
+ }) + _rendering_Path__WEBPACK_IMPORTED_MODULE_2__.lineTo({
+ x: w,
+ y: h
+ }) + _rendering_Path__WEBPACK_IMPORTED_MODULE_2__.lineTo({
+ x: 0,
+ y: h
+ }) + _rendering_Path__WEBPACK_IMPORTED_MODULE_2__.closePath();
+ break;
+ }
+
+ this.path = path;
+ };
+
+ Object.defineProperty(Triangle.prototype, "direction", {
+ /**
+ * Returns direction of a triangle
+ *
+ * @return value
+ */
+ get: function get() {
+ return this.getPropertyValue("direction");
+ },
+
+ /**
+ * Sets direction of a triangle
+ *
+ * @param value
+ */
+ set: function set(value) {
+ this.setPropertyValue("direction", value, true);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ return Triangle;
+}(_Sprite__WEBPACK_IMPORTED_MODULE_0__.Sprite);
+
+
+/**
+ * Register class in system, so that it can be instantiated using its name from
+ * anywhere.
+ *
+ * @ignore
+ */
+
+_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses.Triangle = Triangle;
+
+/***/ }),
+
+/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/WavedCircle.js":
+/*!*********************************************************************************!*\
+ !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/WavedCircle.js ***!
+ \*********************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "WavedCircle": () => (/* binding */ WavedCircle)
+/* harmony export */ });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
+/* harmony import */ var _Circle__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Circle */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Circle.js");
+/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
+/* harmony import */ var _rendering_Path__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../rendering/Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");
+/* harmony import */ var _utils_Math__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
+/* harmony import */ var _utils_Utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
+/* harmony import */ var _core_rendering_Smoothing__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../core/rendering/Smoothing */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Smoothing.js");
+/**
+ * Functionality for drawing waved circles.
+ */
+
+/**
+ * ============================================================================
+ * IMPORTS
+ * ============================================================================
+ * @hidden
+ */
+
+
+
+
+
+
+
+/**
+ * ============================================================================
+ * MAIN CLASS
+ * ============================================================================
+ * @hidden
+ */
+
+/**
+ * Draws a waved circle.
+ *
+ * @see {@link IWavedCircleEvents} for a list of available events
+ * @see {@link IWavedCircleAdapters} for a list of available Adapters
+ */
+
+var WavedCircle =
+/** @class */
+function (_super) {
+ (0,tslib__WEBPACK_IMPORTED_MODULE_6__.__extends)(WavedCircle, _super);
+ /**
+ * Constructor
+ */
+
+
+ function WavedCircle() {
+ var _this = _super.call(this) || this;
+
+ _this.className = "WavedCircle";
+ _this.element = _this.paper.add("path");
+ _this.waveLength = 16;
+ _this.waveHeight = 4;
+ _this.fill = undefined;
+ _this.fillOpacity = 0;
+ _this.tension = 0.8;
+
+ _this.applyTheme();
+
+ return _this;
+ }
+ /**
+ * Draws the waved line.
+ *
+ * @ignore Exclude from docs
+ */
+
+
+ WavedCircle.prototype.draw = function () {
+ var path = "";
+ var radius = this.pixelRadius;
+
+ if (radius > 0) {
+ var points = this.getPoints(radius);
+ path = _rendering_Path__WEBPACK_IMPORTED_MODULE_2__.moveTo(points[0]) + new _core_rendering_Smoothing__WEBPACK_IMPORTED_MODULE_5__.Tension(this.tension, this.tension).smooth(points);
+ }
+
+ var innerRadius = this.pixelInnerRadius;
+
+ if (innerRadius > 0) {
+ var points = this.getPoints(innerRadius);
+ points.reverse();
+ path += _rendering_Path__WEBPACK_IMPORTED_MODULE_2__.moveTo(points[0]) + new _core_rendering_Smoothing__WEBPACK_IMPORTED_MODULE_5__.Tension(this.tension, this.tension).smooth(points);
+ }
+
+ this.path = path;
+ };
+ /**
+ * Returns points that circle consists of.
+ *
+ * @param radius Radius (px)
+ * @return Points
+ */
+
+
+ WavedCircle.prototype.getPoints = function (radius) {
+ var circleLength = radius * Math.PI * 2;
+ var halfWaveHeight = this.waveHeight / 2;
+ var waveLength = circleLength / Math.round(circleLength / this.waveLength);
+ var halfWaveLength = waveLength / 2;
+ var points = [];
+ var count = circleLength / waveLength;
+
+ for (var i = 0; i <= count; i++) {
+ var angle1 = i * waveLength / circleLength * 360;
+ var angle2 = (i * waveLength + halfWaveLength) / circleLength * 360;
+ points.push({
+ x: (radius - halfWaveHeight) * _utils_Math__WEBPACK_IMPORTED_MODULE_3__.cos(angle1),
+ y: (radius - halfWaveHeight) * _utils_Math__WEBPACK_IMPORTED_MODULE_3__.sin(angle1)
+ });
+ points.push({
+ x: (radius + halfWaveHeight) * _utils_Math__WEBPACK_IMPORTED_MODULE_3__.cos(angle2),
+ y: (radius + halfWaveHeight) * _utils_Math__WEBPACK_IMPORTED_MODULE_3__.sin(angle2)
+ });
+ }
+
+ points.pop();
+ return points;
+ };
+
+ Object.defineProperty(WavedCircle.prototype, "innerRadius", {
+ /**
+ * @return Inner radius
+ */
+ get: function get() {
+ return this.getPropertyValue("innerRadius");
+ },
+
+ /**
+ * Inner radius of the circle in pixels (absolute) or [[Percent]] (relative).
+ *
+ * @param value Inner radius
+ */
+ set: function set(value) {
+ this.setPercentProperty("innerRadius", value, true, false, 10, false);
+ this.invalidate();
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(WavedCircle.prototype, "pixelInnerRadius", {
+ /**
+ * Calculated inner radius of the circle in pixels.
+ *
+ * @readonly
+ * @return Inner radius (px)
+ */
+ get: function get() {
+ return _utils_Utils__WEBPACK_IMPORTED_MODULE_4__.relativeToValue(this.innerRadius, _utils_Math__WEBPACK_IMPORTED_MODULE_3__.min(this.innerWidth / 2, this.innerHeight / 2));
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(WavedCircle.prototype, "waveLength", {
+ /**
+ * @return Wave length (px)
+ */
+ get: function get() {
+ return this.getPropertyValue("waveLength");
+ },
+
+ /**
+ * Wave length in pixels.
+ *
+ * @default 16
+ * @param value Wave length (px)
+ */
+ set: function set(value) {
+ this.setPropertyValue("waveLength", value);
+ this.invalidate();
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(WavedCircle.prototype, "waveHeight", {
+ /**
+ * @return Wave height (px)
+ */
+ get: function get() {
+ return this.getPropertyValue("waveHeight");
+ },
+
+ /**
+ * Wave height in pixels.
+ *
+ * @default 4
+ * @param value Wave height (px)
+ */
+ set: function set(value) {
+ this.setPropertyValue("waveHeight", value);
+ this.invalidate();
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(WavedCircle.prototype, "tension", {
+ /**
+ * @return Tension
+ */
+ get: function get() {
+ return this.getPropertyValue("tension");
+ },
+
+ /**
+ * Tension of the wave.
+ *
+ * @default 0.8
+ * @param value Tension
+ */
+ set: function set(value) {
+ this.setPropertyValue("tension", value);
+ this.invalidate();
+ },
+ enumerable: true,
+ configurable: true
+ });
+ return WavedCircle;
+}(_Circle__WEBPACK_IMPORTED_MODULE_0__.Circle);
+
+
+/**
+ * Register class in system, so that it can be instantiated using its name from
+ * anywhere.
+ *
+ * @ignore
+ */
+
+_Registry__WEBPACK_IMPORTED_MODULE_1__.registry.registeredClasses.WavedCircle = WavedCircle;
+
+/***/ }),
+
+/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/WavedLine.js":
+/*!*******************************************************************************!*\
+ !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/WavedLine.js ***!
+ \*******************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "WavedLine": () => (/* binding */ WavedLine)
+/* harmony export */ });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
+/* harmony import */ var _Line__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Line */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Line.js");
+/* harmony import */ var _utils_Color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/Color */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Color.js");
+/* harmony import */ var _rendering_Smoothing__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../rendering/Smoothing */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Smoothing.js");
+/* harmony import */ var _rendering_Path__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../rendering/Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");
+/**
+ * Functionality for drawing waved lines.
+ */
+
+/**
+ * ============================================================================
+ * IMPORTS
+ * ============================================================================
+ * @hidden
+ */
+
+
+
+
+
+/**
+ * ============================================================================
+ * MAIN CLASS
+ * ============================================================================
+ * @hidden
+ */
+
+/**
+ * Draws a waved line.
+ *
+ * @see {@link IWavedLineEvents} for a list of available events
+ * @see {@link IWavedLineAdapters} for a list of available Adapters
+ */
+
+var WavedLine =
+/** @class */
+function (_super) {
+ (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__extends)(WavedLine, _super);
+ /**
+ * Constructor
+ */
+
+
+ function WavedLine() {
+ var _this = _super.call(this) || this;
+
+ _this.className = "WavedLine";
+ _this.element = _this.paper.add("path");
+ _this.waveLength = 16;
+ _this.waveHeight = 4;
+ _this.tension = 0.8;
+ _this.pixelPerfect = false;
+ _this.fill = (0,_utils_Color__WEBPACK_IMPORTED_MODULE_1__.color)();
+
+ _this.applyTheme();
+
+ return _this;
+ }
+ /**
+ * Draws the waved line.
+ *
+ * @ignore Exclude from docs
+ */
+
+
+ WavedLine.prototype.draw = function () {
+ //super.draw();
+ var p1 = {
+ x: this.x1,
+ y: this.y1
+ };
+ var p2 = {
+ x: this.x2,
+ y: this.y2
+ };
+ this.path = _rendering_Path__WEBPACK_IMPORTED_MODULE_3__.moveTo(p1) + (0,_rendering_Smoothing__WEBPACK_IMPORTED_MODULE_2__.wavedLine)(p1, p2, this.waveLength, this.waveHeight, this.tension, true);
+ };
+
+ Object.defineProperty(WavedLine.prototype, "waveLength", {
+ /**
+ * @return Wave length (px)
+ */
+ get: function get() {
+ return this.getPropertyValue("waveLength");
+ },
+
+ /**
+ * Wave length in pixels.
+ *
+ * @default 16
+ * @param value Wave length (px)
+ */
+ set: function set(value) {
+ this.setPropertyValue("waveLength", value);
+ this.invalidate();
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(WavedLine.prototype, "waveHeight", {
+ /**
+ * @return Wave height (px)
+ */
+ get: function get() {
+ return this.getPropertyValue("waveHeight");
+ },
+
+ /**
+ * Wave height in pixels.
+ *
+ * @default 4
+ * @param value Wave height (px)
+ */
+ set: function set(value) {
+ this.setPropertyValue("waveHeight", value);
+ this.invalidate();
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(WavedLine.prototype, "tension", {
+ /**
+ * @return Tension
+ */
+ get: function get() {
+ return this.getPropertyValue("tension");
+ },
+
+ /**
+ * Tension of the wave.
+ *
+ * @default 0.8
+ * @param value Tension
+ */
+ set: function set(value) {
+ this.setPropertyValue("tension", value);
+ this.invalidate();
+ },
+ enumerable: true,
+ configurable: true
+ });
+ return WavedLine;
+}(_Line__WEBPACK_IMPORTED_MODULE_0__.Line);
+
+
+
+/***/ }),
+
+/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/WavedRectangle.js":
+/*!************************************************************************************!*\
+ !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/WavedRectangle.js ***!
+ \************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "WavedRectangle": () => (/* binding */ WavedRectangle)
+/* harmony export */ });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
+/* harmony import */ var _Rectangle__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Rectangle */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Rectangle.js");
+/* harmony import */ var _rendering_Smoothing__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../rendering/Smoothing */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Smoothing.js");
+/* harmony import */ var _rendering_Path__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../rendering/Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");
+/**
+ * Functionality for drawing rectangles with waved edges.
+ */
+
+/**
+ * ============================================================================
+ * IMPORTS
+ * ============================================================================
+ * @hidden
+ */
+
+
+
+
+/**
+ * ============================================================================
+ * MAIN CLASS
+ * ============================================================================
+ * @hidden
+ */
+
+/**
+ * Draws a rectangle with waved edges.
+ *
+ * @see {@link IWavedRectangleEvents} for a list of available events
+ * @see {@link IWavedRectangleAdapters} for a list of available Adapters
+ */
+
+var WavedRectangle =
+/** @class */
+function (_super) {
+ (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__extends)(WavedRectangle, _super);
+ /**
+ * Constructor
+ */
+
+
+ function WavedRectangle() {
+ var _this = // Init
+ _super.call(this) || this;
+
+ _this.className = "WavedRectangle"; // Add path element
+
+ _this.element = _this.paper.add("path"); // Set defaults
+
+ _this.waveLength = 16;
+ _this.waveHeight = 4;
+ _this.tension = 0.8;
+
+ _this.setPropertyValue("wavedLeft", true);
+
+ _this.setPropertyValue("wavedRight", true);
+
+ _this.setPropertyValue("wavedTop", true);
+
+ _this.setPropertyValue("wavedBottom", true); // Apply theme
+
+
+ _this.applyTheme();
+
+ return _this;
+ }
+ /**
+ * Draws the waved rectangle.
+ *
+ * @ignore Exclude from docs
+ */
+
+
+ WavedRectangle.prototype.draw = function () {
+ _super.prototype.draw.call(this);
+
+ var w = this.pixelWidth;
+ var h = this.pixelHeight;
+
+ if (w > 0 && h > 0) {
+ var p1 = {
+ x: 0,
+ y: 0
+ };
+ var p2 = {
+ x: w,
+ y: 0
+ };
+ var p3 = {
+ x: w,
+ y: h
+ };
+ var p4 = {
+ x: 0,
+ y: h
+ };
+ var waveLengthH = Math.min(w, this.waveLength);
+ var waveHeightH = Math.min(h, this.waveHeight);
+ var waveLengthV = Math.min(h, this.waveLength);
+ var waveHeightV = Math.min(w, this.waveHeight);
+ var td = "";
+ var rd = "";
+ var bd = "";
+ var ld = "";
+
+ if (this.wavedTop) {
+ td = (0,_rendering_Smoothing__WEBPACK_IMPORTED_MODULE_1__.wavedLine)(p1, p2, waveLengthH, waveHeightH, this.tension, true);
+ }
+
+ if (this.wavedRight) {
+ rd = (0,_rendering_Smoothing__WEBPACK_IMPORTED_MODULE_1__.wavedLine)(p2, p3, waveLengthV, waveHeightV, this.tension, true);
+ }
+
+ if (this.wavedBottom) {
+ bd = (0,_rendering_Smoothing__WEBPACK_IMPORTED_MODULE_1__.wavedLine)(p3, p4, waveLengthH, waveHeightH, this.tension, true);
+ }
+
+ if (this.wavedLeft) {
+ ld = (0,_rendering_Smoothing__WEBPACK_IMPORTED_MODULE_1__.wavedLine)(p4, p1, waveLengthV, waveHeightV, this.tension, true);
+ }
+
+ this.path = _rendering_Path__WEBPACK_IMPORTED_MODULE_2__.moveTo(p1) + td + _rendering_Path__WEBPACK_IMPORTED_MODULE_2__.lineTo(p2) + rd + _rendering_Path__WEBPACK_IMPORTED_MODULE_2__.lineTo(p3) + bd + _rendering_Path__WEBPACK_IMPORTED_MODULE_2__.lineTo(p4) + ld + "z";
+ }
+ };
+
+ Object.defineProperty(WavedRectangle.prototype, "waveLength", {
+ /**
+ * @return Wave length (px)
+ */
+ get: function get() {
+ return this.getPropertyValue("waveLength");
+ },
+
+ /**
+ * Wave length in pixels.
+ *
+ * @default 16
+ * @param value Wave length (px)
+ */
+ set: function set(value) {
+ this.setPropertyValue("waveLength", value);
+ this.invalidate();
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(WavedRectangle.prototype, "waveHeight", {
+ /**
+ * @return Wave height (px)
+ */
+ get: function get() {
+ return this.getPropertyValue("waveHeight");
+ },
+
+ /**
+ * Wave height in pixels.
+ *
+ * @default 4
+ * @param value Wave height (px)
+ */
+ set: function set(value) {
+ this.setPropertyValue("waveHeight", value);
+ this.invalidate();
+ },
+ enumerable: true,
+ configurable: true
+ });
+ /**
+ * Sets which side should be waved or not. If particular side is set to
+ * `false`, a straight line will be drawn on that side.
+ *
+ * @param top Top waved?
+ * @param right Right side waved?
+ * @param bottom Bottom Waved?
+ * @param left Left side waved?
+ */
+
+ WavedRectangle.prototype.setWavedSides = function (top, right, bottom, left) {
+ this.wavedTop = top;
+ this.wavedRight = right;
+ this.wavedBottom = bottom;
+ this.wavedLeft = left;
+ };
+
+ Object.defineProperty(WavedRectangle.prototype, "tension", {
+ /**
+ * @return Tension
+ */
+ get: function get() {
+ return this.getPropertyValue("tension");
+ },
+
+ /**
+ * Tension of the wave.
+ *
+ * @default 0.8
+ * @param value Tension
+ */
+ set: function set(value) {
+ this.setPropertyValue("tension", value);
+ this.invalidate();
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(WavedRectangle.prototype, "wavedRight", {
+ /**
+ * @return Wave right side?
+ */
+ get: function get() {
+ return this.getPropertyValue("wavedRight");
+ },
+
+ /**
+ * Specifies if right side should be waved.
+ *
+ * @default true
+ * @param value Waved?
+ */
+ set: function set(value) {
+ this.setPropertyValue("wavedRight", value, true);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(WavedRectangle.prototype, "wavedLeft", {
+ /**
+ * @return Wave left side?
+ */
+ get: function get() {
+ return this.getPropertyValue("wavedLeft");
+ },
+
+ /**
+ * Specifies if left side should be waved.
+ *
+ * @default true
+ * @param value Waved?
+ */
+ set: function set(value) {
+ this.setPropertyValue("wavedLeft", value, true);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(WavedRectangle.prototype, "wavedTop", {
+ /**
+ * @return Wave top side?
+ */
+ get: function get() {
+ return this.getPropertyValue("wavedTop");
+ },
+
+ /**
+ * Specifies if top side should be waved.
+ *
+ * @default true
+ * @param value Waved?
+ */
+ set: function set(value) {
+ this.setPropertyValue("wavedTop", value, true);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(WavedRectangle.prototype, "wavedBottom", {
+ /**
+ * @return Wave bottom side?
+ */
+ get: function get() {
+ return this.getPropertyValue("wavedBottom");
+ },
+
+ /**
+ * Specifies if bottom side should be waved.
+ *
+ * @default true
+ * @param value Waved?
+ */
+ set: function set(value) {
+ this.setPropertyValue("wavedBottom", value, true);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ return WavedRectangle;
+}(_Rectangle__WEBPACK_IMPORTED_MODULE_0__.Rectangle);
+
+
+
+/***/ }),
+
+/***/ "./node_modules/@amcharts/amcharts4/.internal/core/elements/ZoomOutButton.js":
+/*!***********************************************************************************!*\
+ !*** ./node_modules/@amcharts/amcharts4/.internal/core/elements/ZoomOutButton.js ***!
+ \***********************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "ZoomOutButton": () => (/* binding */ ZoomOutButton)
+/* harmony export */ });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
+/* harmony import */ var _Button__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Button */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Button.js");
+/* harmony import */ var _Sprite__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Sprite */ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js");
+/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
+/* harmony import */ var _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/utils/InterfaceColorSet */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/InterfaceColorSet.js");
+/* harmony import */ var _rendering_Path__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../rendering/Path */ "./node_modules/@amcharts/amcharts4/.internal/core/rendering/Path.js");
+/* harmony import */ var _core_utils_Type__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../core/utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
+/**
+ * Zoom out button functionality.
+ */
+
+/**
+ * ============================================================================
+ * IMPORTS
+ * ============================================================================
+ * @hidden
+ */
+
+
+
+
+
+
+
+/**
+ * ============================================================================
+ * MAIN CLASS
+ * ============================================================================
+ * @hidden
+ */
+
+/**
+ * Creates a zoom out button.
+ *
+ * @see {@link IZoomOutButtonEvents} for a list of available events
+ * @see {@link IZoomOutButtonAdapters} for a list of available Adapters
+ */
+
+var ZoomOutButton =
+/** @class */
+function (_super) {
+ (0,tslib__WEBPACK_IMPORTED_MODULE_6__.__extends)(ZoomOutButton, _super);
+ /**
+ * Constructor
+ */
+
+
+ function ZoomOutButton() {
+ var _this = // Init
+ _super.call(this) || this;
+
+ _this.className = "ZoomOutButton";
+
+ _this.padding(9, 9, 9, 9); //this.dx = - 5;
+ //this.dy = 5;
+
+
+ _this.showSystemTooltip = true;
+ var interfaceColors = new _core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_3__.InterfaceColorSet();
+ var background = _this.background;
+ background.cornerRadius(20, 20, 20, 20);
+ background.fill = interfaceColors.getFor("primaryButton");
+ background.stroke = interfaceColors.getFor("primaryButtonStroke");
+ background.strokeOpacity = 0;
+ background.states.getKey("hover").properties.fill = interfaceColors.getFor("primaryButtonHover");
+ background.states.getKey("down").properties.fill = interfaceColors.getFor("primaryButtonActive"); // Create an icon
+
+ var icon = new _Sprite__WEBPACK_IMPORTED_MODULE_1__.Sprite();
+ icon.element = _this.paper.add("path");
+ var path = _rendering_Path__WEBPACK_IMPORTED_MODULE_4__.moveTo({
+ x: 0,
+ y: 0
+ });
+ path += _rendering_Path__WEBPACK_IMPORTED_MODULE_4__.lineTo({
+ x: 11,
+ y: 0
+ });
+ icon.path = path;
+ icon.pixelPerfect = true;
+ icon.padding(8, 3, 8, 3);
+ icon.stroke = interfaceColors.getFor("primaryButtonText");
+ _this.icon = icon; // Apply theme
+
+ _this.applyTheme();
+
+ return _this;
+ }
+ /**
+ * Sets defaults that instantiate some objects that rely on parent, so they
+ * cannot be set in constructor.
+ */
+
+
+ ZoomOutButton.prototype.applyInternalDefaults = function () {
+ _super.prototype.applyInternalDefaults.call(this);
+
+ if (!_core_utils_Type__WEBPACK_IMPORTED_MODULE_5__.hasValue(this.readerTitle)) {
+ this.readerTitle = this.language.translate("Zoom Out");
+ }
+ };
+
+ return ZoomOutButton;
+}(_Button__WEBPACK_IMPORTED_MODULE_0__.Button);
+
+
+/**
+ * Register class in system, so that it can be instantiated using its name from
+ * anywhere.
+ *
+ * @ignore
+ */
+
+_Registry__WEBPACK_IMPORTED_MODULE_2__.registry.registeredClasses.ZoomOutButton = ZoomOutButton;
+
+/***/ }),
+
+/***/ "./node_modules/@amcharts/amcharts4/.internal/core/export/Export.js":
+/*!**************************************************************************!*\
+ !*** ./node_modules/@amcharts/amcharts4/.internal/core/export/Export.js ***!
+ \**************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "Export": () => (/* binding */ Export)
+/* harmony export */ });
+/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
+/* harmony import */ var _ExportMenu__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ExportMenu */ "./node_modules/@amcharts/amcharts4/.internal/core/export/ExportMenu.js");
+/* harmony import */ var _utils_Adapter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/Adapter */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Adapter.js");
+/* harmony import */ var _Sprite__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Sprite */ "./node_modules/@amcharts/amcharts4/.internal/core/Sprite.js");
+/* harmony import */ var _elements_Modal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../elements/Modal */ "./node_modules/@amcharts/amcharts4/.internal/core/elements/Modal.js");
+/* harmony import */ var _utils_List__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/List */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/List.js");
+/* harmony import */ var _utils_Dictionary__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/Dictionary */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Dictionary.js");
+/* harmony import */ var _formatters_DateFormatter__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../formatters/DateFormatter */ "./node_modules/@amcharts/amcharts4/.internal/core/formatters/DateFormatter.js");
+/* harmony import */ var _formatters_DurationFormatter__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../formatters/DurationFormatter */ "./node_modules/@amcharts/amcharts4/.internal/core/formatters/DurationFormatter.js");
+/* harmony import */ var _formatters_NumberFormatter__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../formatters/NumberFormatter */ "./node_modules/@amcharts/amcharts4/.internal/core/formatters/NumberFormatter.js");
+/* harmony import */ var _utils_Language__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/Language */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Language.js");
+/* harmony import */ var _utils_Validatable__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils/Validatable */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Validatable.js");
+/* harmony import */ var _utils_Color__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils/Color */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Color.js");
+/* harmony import */ var _Registry__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../Registry */ "./node_modules/@amcharts/amcharts4/.internal/core/Registry.js");
+/* harmony import */ var _Options__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../Options */ "./node_modules/@amcharts/amcharts4/.internal/core/Options.js");
+/* harmony import */ var _utils_DOM__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../utils/DOM */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/DOM.js");
+/* harmony import */ var _utils_Browser__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../utils/Browser */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Browser.js");
+/* harmony import */ var _utils_Object__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../utils/Object */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Object.js");
+/* harmony import */ var _utils_Net__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../utils/Net */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Net.js");
+/* harmony import */ var _utils_Type__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../utils/Type */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Type.js");
+/* harmony import */ var _utils_Log__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../utils/Log */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Log.js");
+/* harmony import */ var _utils_Utils__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../utils/Utils */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Utils.js");
+/* harmony import */ var _utils_Array__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../utils/Array */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Array.js");
+/* harmony import */ var _utils_Math__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../utils/Math */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Math.js");
+/* harmony import */ var _utils_Strings__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../utils/Strings */ "./node_modules/@amcharts/amcharts4/.internal/core/utils/Strings.js");
+/**
+ * Export module.
+ *
+ * Parts of Export functionality rely on the following third party libraries:
+ *
+ * [canvg.js](https://github.com/canvg/canvg)
+ * Copyright (c) Gabe Lerner
+ * Licensed under [MIT](https://github.com/canvg/canvg/blob/master/LICENSE)
+ *
+ * [pdfmake](http://pdfmake.org/)
+ * Copyright (c) 2014 bpampuch
+ * Licensed under [MIT](https://github.com/bpampuch/pdfmake/blob/master/LICENSE)
+ *
+ * [SheetJS Community Edition](https://github.com/sheetjs/js-xlsx)
+ * Licensed under [Apache License 2.0](https://github.com/SheetJS/js-xlsx/blob/master/LICENSE)
+ *
+ * [JSZip](http://stuartk.com/jszip)
+ * Copyright (c) Stuart Knightley
+ * Dual licenced under the [MIT license or GPLv3](https://raw.githubusercontent.com/Stuk/jszip/master/LICENSE.markdown).
+ */
+
+/**
+ * ============================================================================
+ * IMPORTS
+ * ============================================================================
+ * @hidden
+ */
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ // This is used to cache the pdfmake loading
+
+var pdfmakePromise;
+/**
+ * Loads pdfmake dynamic module
+ *
+ * This is an asynchronous function. Check the description of `getImage()`
+ * for description and example usage.
+ *
+ * @ignore Exclude from docs
+ * @return Instance of pdfmake
+ * @async
+ */
+
+function _pdfmake() {
+ return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__awaiter)(this, void 0, void 0, function () {
+ var a, pdfmake, vfs_fonts, global;
+ return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__generator)(this, function (_a) {
+ switch (_a.label) {
+ case 0:
+ return [4
+ /*yield*/
+ , Promise.all([Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! pdfmake/build/pdfmake.js */ "pdfmake/build/pdfmake.js", 23)), Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! ../../pdfmake/vfs_fonts */ "../../pdfmake/vfs_fonts", 23))])];
+
+ case 1:
+ a = _a.sent();
+ pdfmake = a[0];
+ vfs_fonts = a[1];
+ global = window;
+ global.pdfMake = global.pdfMake || {};
+ global.pdfMake.vfs = vfs_fonts.default;
+ pdfmake.vfs = vfs_fonts.default;
+ return [2
+ /*return*/
+ , pdfmake];
+ }
+ });
+ });
+} // TODO better parsing
+
+
+var fontFamilySrcRegexp = /src: ([^;]+);/; // TODO better checks
+
+function supportsBlobUri() {
+ return window.navigator.msSaveOrOpenBlob != null;
+} // TODO move into utils or something ?
+
+
+function blobToDataUri(blob) {
+ return new Promise(function (resolve, reject) {
+ // TODO handle abort ?
+ var f = new FileReader();
+
+ f.onload = function (e) {
+ resolve(f.result);
+ };
+
+ f.onerror = function (e) {
+ reject(e);
+ };
+
+ f.readAsDataURL(blob);
+ });
+}
+
+function getCssRules(s) {
+ return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__awaiter)(this, void 0, void 0, function () {
+ var sheet, e_1;
+ return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__generator)(this, function (_a) {
+ switch (_a.label) {
+ case 0:
+ sheet = s.sheet;
+ _a.label = 1;
+
+ case 1:
+ _a.trys.push([1, 2,, 4]);
+
+ return [2
+ /*return*/
+ , sheet.cssRules];
+
+ case 2:
+ e_1 = _a.sent();
+ return [4
+ /*yield*/
+ , new Promise(function (success, error) {
+ s.addEventListener("load", function () {
+ success(sheet.cssRules);
+ }, true);
+ s.addEventListener("error", function (e) {
+ error(e);
+ }, true);
+ setTimeout(function () {
+ error(new Error("Timeout while waiting for " + this.serializeElement(this.sprite.paper.defs) + this.serializeElement(this.sprite.dom), options, width, height, scale, font, fontSize);
+ svg = new Blob([data], {
+ type: "image/svg+xml"
+ });
+ url = DOMURL.createObjectURL(svg);
+ return [4
+ /*yield*/
+ , this.loadNewImage(url, width * scale * pixelRatio, height * scale * pixelRatio, "anonymous")];
+
+ case 3:
+ img = _a.sent(); // Draw image on canvas
+
+ ctx.drawImage(img, 0, 0);
+ return [3
+ /*break*/
+ , 5];
+
+ case 4:
+ if (url !== null) {
+ DOMURL.revokeObjectURL(url);
+ }
+
+ if (blobs !== null) {
+ _utils_Array__WEBPACK_IMPORTED_MODULE_21__.each(blobs, function (url) {
+ DOMURL.revokeObjectURL(url);
+ });
+ } // Restore replaced tainted images in DOM
+
+
+ this.restoreRemovedObjects();
+ return [7
+ /*endfinally*/
+ ];
+
+ case 5:
+ return [2
+ /*return*/
+ , canvas];
+ }
+ });
+ });
+ };
+ /**
+ * Returns canvas representation of the [[Sprite]] using canvg.
+ *
+ * @param options Options
+ * @return Canvas
+ */
+
+
+ Export.prototype.getCanvasAdvanced = function (options) {
+ return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__awaiter)(this, void 0, void 0, function () {
+ var background, canvg, width, height, font, fontSize, scale, pixelRatio, data, canvas, config;
+ return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__generator)(this, function (_a) {
+ switch (_a.label) {
+ case 0:
+ // Options are set?
+ if (!_utils_Type__WEBPACK_IMPORTED_MODULE_18__.hasValue(options)) {
+ options = {};
+ } // Convert external images to data uris
+
+
+ return [4
+ /*yield*/
+ , this.imagesToDataURI(this.sprite.dom, options)];
+
+ case 1:
+ // Convert external images to data uris
+ _a.sent();
+
+ background = this.backgroundColor || this.findBackgroundColor(this.sprite.dom);
+ return [4
+ /*yield*/
+ , this.canvg];
+
+ case 2:
+ canvg = _a.sent();
+ width = this.sprite.pixelWidth;
+ height = this.sprite.pixelHeight;
+ font = _utils_DOM__WEBPACK_IMPORTED_MODULE_14__.findFont(this.sprite.dom);
+ fontSize = _utils_DOM__WEBPACK_IMPORTED_MODULE_14__.findFontSize(this.sprite.dom);
+ scale = options.scale || 1;
+ pixelRatio = this.getPixelRatio(options); // Check if scale needs to be updated as per min/max dimensions
+
+ scale = this.getAdjustedScale(width * pixelRatio, height * pixelRatio, scale, options);
+ data = this.normalizeSVG(this.serializeElement(this.sprite.paper.defs) + this.serializeElement(this.sprite.dom), options, width, height, scale, font, fontSize, background);
+ canvas = this.getDisposableCanvas(); // Set canvas width/height
+
+ canvas.style.width = width * pixelRatio * scale + 'px';
+ canvas.style.height = height * pixelRatio * scale + 'px';
+ canvas.width = width * pixelRatio * scale;
+ canvas.height = height * pixelRatio * scale;
+ config = {
+ //ignoreDimensions: true,
+ useCORS: true
+ };
+
+ if (pixelRatio != 1) {
+ config.ignoreDimensions = true;
+ config.scaleWidth = width * pixelRatio * scale;
+ config.scaleHeight = height * pixelRatio * scale;
+ }
+
+ return [4
+ /*yield*/
+ , canvg.fromString(canvas.getContext("2d"), data, config).render()];
+
+ case 3:
+ _a.sent();
+
+ return [2
+ /*return*/
+ , canvas];
+ }
+ });
+ });
+ };
+ /**
+ * Tries to dynamically load [canvg.js](https://github.com/canvg/canvg) and
+ * export an image using its functions.
+ *
+ * This is an asynchronous function. Check the description of `getImage()`
+ * for description and example usage.
+ *
+ * @param type Image format
+ * @param options Options
+ * @return Data uri
+ */
+
+
+ Export.prototype.getImageAdvanced = function (type, options, includeExtras) {
+ return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__awaiter)(this, void 0, void 0, function () {
+ var prehidden, canvas, uri;
+ return (0,tslib__WEBPACK_IMPORTED_MODULE_24__.__generator)(this, function (_a) {
+ switch (_a.label) {
+ case 0:
+ prehidden = this._objectsAlreadyHidden;
+
+ if (!prehidden) {
+ this.hideNonExportableSprites();
+ }
+
+ if (!_utils_Type__WEBPACK_IMPORTED_MODULE_18__.hasValue(options)) {
+ options = this.getFormatOptions(type);
+ }
+
+ return [4
+ /*yield*/
+ , this.getCanvasAdvanced(options)];
+
+ case 1:
+ canvas = _a.sent();
+ if (!(includeExtras !== false)) return [3
+ /*break*/
+ , 3];
+ return [4
+ /*yield*/
+ , this.addExtras(canvas, options, true)];
+
+ case 2:
+ canvas = _a.sent();
+ _a.label = 3;
+
+ case 3:
+ uri = canvas.toDataURL(this.getContentType(type), options.quality); // Get rid of the canvas
+
+ this.disposeCanvas(canvas);
+
+ if (!prehidden) {
+ this.restoreNonExportableSprites();
+ }
+
+ return [2
+ /*return*/
+ , uri];
+ }
+ });
+ });
+ };
+ /**
+ * Creates a `