{"version":3,"sources":["webpack:///../../../../../src/.internal/plugins/bullets/PointedCircle.ts","webpack:///../../../../../src/.internal/plugins/bullets/PinBullet.ts","webpack:///../../../../../src/.internal/plugins/bullets/FlagBullet.ts","webpack:///../../../../../src/.internal/plugins/bullets/Star.ts","webpack:///../../../../../src/.internal/plugins/bullets/ShapeBullet.ts","webpack:///./plugins/bullets.js"],"names":["PointedCircle_PointedCircle","_super","PointedCircle","_this","call","this","className","element","paper","add","radius","pointerAngle","applyTheme","Object","tslib_es6","prototype","draw","pw","pointerBaseWidth","pl","pointerLength","angle","x","pointerX","y","pointerY","path","Path","da","utils_Math","Math","atan","a1","a2","defineProperty","getPropertyValue","value","setPropertyValue","getTooltipY","getTooltipX","PointedShape","Registry","registeredClasses","PinBullet_PinBullet","PinBullet","interfaceColors","InterfaceColorSet","circle","createChild","Circle","shouldClone","isMeasured","fill","getFor","Percent","background","fillOpacity","events","on","invalidate","validate","px","py","pa","r","p1","p2","x1","x2","y1","y2","radsq","q","sqrt","cx","cy","width","height","image","attr","preserveAspectRatio","scale","label","_image","_disposers","push","parent","horizontalCenter","verticalCenter","mask","_label","textAlign","dy","copyFrom","source","clone","createBackground","Bullet","FlagBullet_FlagBullet","FlagBullet","waveHeight","waveLength","setWavedSides","strokeOpacity","stroke","pole","Line","Label","padding","poleHeight","updateBackground","bgHeight","pixelHeight","_background","maxLeft","measuredWidth","measuredHeight","abs","maxRight","maxBottom","maxTop","dispose","WavedRectangle","Star_Star","Star","pointCount","arc","innerRadius","cornerRadius","innerCornerRadius","startAngle","pixelInnerRadius","halfAngle","i","p0","replace","Type","setPercentProperty","Utils","Sprite","ShapeBullet_ShapeBullet","ShapeBullet","size","shapeElement","shape","createSquare","createCircle","createTriangle","processShape","rotation","Rectangle","Triangle","window","am4plugins_bullets","bullets_namespaceObject"],"mappings":";;;;;;;;;;;;;;;;;;;yYAuEAA,EAAA,SAAAC,GAqBC,SAAAC,IAAA,IAAAC,EACCF,EAAAG,KAAAC,OAAOA,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AQqE,MAAQvE,KAAKyI,KACrBvI,EAAQsE,OAASxE,KAAKyI,KACtBvI,EAAQ8I,SAAWA,EACnBhJ,KAAK0I,aAAexI,EACpBF,KAAK+I,gBAMEP,EAAA9H,UAAAmI,aAAR,SAAqBG,QAAA,IAAAA,MAAA,GACpB,IAAM9I,EAAUF,KAAK2C,YAAYC,EAAA,GACjC1C,EAAQG,OAASL,KAAKyI,KAAO,EAC7BzI,KAAK0I,aAAexI,EACpBF,KAAK+I,gBAMEP,EAAA9H,UAAAoI,eAAR,SAAuBE,QAAA,IAAAA,MAAA,GACtB,IAAM9I,EAAUF,KAAK2C,YAAYuG,EAAA,GACjChJ,EAAQqE,MAAQvE,KAAKyI,KACrBvI,EAAQsE,OAASxE,KAAKyI,KACtBvI,EAAQ8I,SAAWA,EACnBhJ,KAAK0I,aAAexI,EACpBF,KAAK+I,gBAcNvI,OAAAqB,eAAW2G,EAAA9H,UAAA,aASX,WACC,OAAOV,KAAK8B,iBAAiB,cAV9B,SAAiBC,GACZ/B,KAAKgC,iBAAiB,QAASD,GAAO,IACzC/B,KAAKsD,8CAkBP9C,OAAAqB,eAAW2G,EAAA9H,UAAA,YAWX,WACC,IAAI+H,EAAezI,KAAK8B,iBAAiB,QAIzC,OAHKqG,EAAA,SAAeM,KACnBA,EAAO,GAEDA,OAhBR,SAAgB1G,GACX/B,KAAKgC,iBAAiB,OAAQD,GAAO,KACxC/B,KAAKuE,MAAQxC,EACb/B,KAAKwE,OAASzC,EACd/B,KAAKsD,+CAeRkF,EAtKA,CAAiC5C,EAAA,GA8KjCxD,EAAA,EAASC,kBAA+B,YAAIkG,EC5P5CY,OAAAC,mBAA4BC","file":"./plugins/bullets.js","sourcesContent":["/**\r\n * Pointed rectangle module.\r\n */\r\n\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { PointedShape, IPointedShapeProperties, IPointedShapeAdapters, IPointedShapeEvents } from \"../../core/elements/PointedShape\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport * as $path from \"../../core/rendering/Path\";\r\nimport * as $math from \"../../core/utils/Math\";\r\n\r\n/**\r\n * ============================================================================\r\n * REQUISITES\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines properties for [[PointedCircle]].\r\n */\r\nexport interface IPointedCircleProperties extends IPointedShapeProperties {\r\n\r\n\t/**\r\n\t * Radius of a pin, in pixels.\r\n\t *\r\n\t * @default 18\r\n\t */\r\n\tradius?: number;\r\n\r\n\t/**\r\n\t * Angle of a pointer, in degrees.\r\n\t *\r\n\t * @default 90\r\n\t */\r\n\tpointerAngle?: number;\r\n\r\n}\r\n\r\n/**\r\n * Defines events for [[PointedCircle]].\r\n */\r\nexport interface IPointedCircleEvents extends IPointedShapeEvents { }\r\n\r\n/**\r\n * Defines adapters for [[PointedCircle]].\r\n *\r\n * @see {@link Adapter}\r\n */\r\nexport interface IPointedCircleAdapters extends IPointedShapeAdapters, IPointedCircleProperties { }\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Draws a circle with a pointer.\r\n *\r\n * @since 4.5.7\r\n * @see {@link https://www.amcharts.com/docs/v4/tutorials/plugin-bullets/} for usage instructions.\r\n * @see {@link IPointedCircleEvents} for a list of available events\r\n * @see {@link IPointedCircleAdapters} for a list of available Adapters\r\n */\r\nexport class PointedCircle extends PointedShape {\r\n\r\n\t/**\r\n\t * Defines available properties.\r\n\t */\r\n\tpublic _properties!: IPointedCircleProperties;\r\n\r\n\t/**\r\n\t * Defines available adapters.\r\n\t */\r\n\tpublic _adapter!: IPointedCircleAdapters;\r\n\r\n\t/**\r\n\t * Defines available events.\r\n\t */\r\n\tpublic _events!: IPointedCircleEvents;\r\n\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.className = \"PointedCircle\";\r\n\t\tthis.element = this.paper.add(\"path\");\r\n\t\tthis.radius = 18;\r\n\t\tthis.pointerAngle = 90;\r\n\r\n\t\tthis.applyTheme();\r\n\t}\r\n\r\n\t/**\r\n\t * Draws the element.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t */\r\n\tpublic draw(): void {\r\n\t\tsuper.draw();\r\n\r\n\t\tlet pw = this.pointerBaseWidth;\r\n\t\tlet pl = this.pointerLength;\r\n\r\n\t\tif (pl <= 0.001) {\r\n\t\t\tpl = 0.001;\r\n\t\t}\r\n\r\n\t\tlet angle = this.pointerAngle + 180;\r\n\t\tlet radius = this.radius;\r\n\r\n\r\n\t\tif (pw > 2 * radius) {\r\n\t\t\tpw = 2 * radius;\r\n\t\t}\r\n\r\n\t\tlet x = this.pointerX;\r\n\t\tlet y = this.pointerY;\r\n\r\n\t\tlet path = $path.moveTo({ x: x, y: x });\r\n\r\n\t\tlet da = $math.DEGREES * Math.atan(pw / 2 / pl);\r\n\r\n\t\tif (da <= 0.001) {\r\n\t\t\tda = 0.001;\r\n\t\t}\r\n\r\n\t\tlet a1 = angle - da;\r\n\t\tlet a2 = angle + da;\r\n\r\n\t\tpath += $path.lineTo({ x: x + pl * $math.cos(a1), y: y + pl * $math.sin(a1) });\r\n\t\tpath += $path.arcToPoint({ x: x + pl * $math.cos(a2), y: y + pl * $math.sin(a2) }, radius, radius, true, true);\r\n\t\tpath += $path.lineTo({ x: x, y: x });\r\n\r\n\t\tthis.path = path;\r\n\t}\r\n\r\n\t/**\r\n\t * Radius of a circle in pixels.\r\n\t *\r\n\t * @default 18\r\n\t * @param value Radius (px)\r\n\t */\r\n\tpublic set radius(value: number) {\r\n\t\tthis.setPropertyValue(\"radius\", value, true);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Radius (px)\r\n\t */\r\n\tpublic get radius(): number {\r\n\t\treturn this.getPropertyValue(\"radius\");\r\n\t}\r\n\r\n\t/**\r\n\t * Angle of a pointer, in degrees.\r\n\t * \r\n\t * @default 90\r\n\t * @param value Angle (degrees)\r\n\t */\r\n\tpublic set pointerAngle(value: number) {\r\n\t\tthis.setPropertyValue(\"pointerAngle\", value, true);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Angle of a pointer, in degrees.\r\n\t */\r\n\tpublic get pointerAngle(): number {\r\n\t\treturn this.getPropertyValue(\"pointerAngle\");\r\n\t}\r\n\r\n\tpublic getTooltipY(){\r\n\t\treturn $math.sin(this.pointerAngle) * (-this.pointerLength * 0.8 - this.radius) - this.radius;\r\n\t}\r\n\r\n\tpublic getTooltipX(){\r\n\t\treturn $math.cos(this.pointerAngle) * (-this.pointerLength * 0.8 - this.radius);\r\n\t}\t\r\n}\r\n\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"PointerCircle\"] = PointedCircle;\n\n\n// WEBPACK FOOTER //\n// ../../../../../src/.internal/plugins/bullets/PointedCircle.ts","/**\r\n * Bullet module\r\n */\r\n\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Bullet, IBulletProperties, IBulletAdapters, IBulletEvents } from \"../../charts/elements/Bullet\";\r\nimport { Circle } from \"../../core/elements/Circle\";\r\nimport { PointedCircle } from \"./PointedCircle\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport * as $math from \"../../core/utils/Math\";\r\nimport { percent, Percent } from \"../../core/utils/Percent\";\r\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\r\nimport { Image } from \"../../core/elements/Image\";\r\nimport { Label } from \"../../core/elements/Label\";\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * REQUISITES\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines properties for [[PinBullet]].\r\n */\r\nexport interface IPinBulletProperties extends IBulletProperties { }\r\n\r\n/**\r\n * Defines events for [[PinBullet]].\r\n */\r\nexport interface IPinBulletEvents extends IBulletEvents { }\r\n\r\n/**\r\n * Defines adapters.\r\n * \r\n * Includes both the [[Adapter]] definitions and properties\r\n * \r\n * @see {@link Adapter}\r\n */\r\nexport interface IPinBulletAdapters extends IBulletAdapters, IPinBulletProperties { }\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Creates a pin-shaped bullet with an optional text label and/or image inside\r\n * it.\r\n *\r\n * The background/body of the flag is a [[PointedCircle]] element. Most of\r\n * its the visual appearance is configured via `background` property.\r\n *\r\n * Uses [[Label]] instance to draw the label, so the label itself is\r\n * configurable.\r\n *\r\n * Example:\r\n * \r\n * ```TypeScript\r\n * let series = chart.series.push(new am4charts.LineSeries());\r\n * // ...\r\n * let pinBullet = series.bullets.push(new am4plugins_bullets.PinBullet());\r\n * pinBullet.poleHeight = 15;\r\n * pinBullet.label.text = \"{valueY}\";\r\n * ```\r\n * ```JavaScript\r\n * var series = chart.series.push(new am4charts.LineSeries());\r\n * // ...\r\n * var pinBullet = series.bullets.push(new am4plugins_bullets.PinBullet());\r\n * pinBullet.poleHeight = 15;\r\n * pinBullet.label.text = \"{valueY}\";\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"series\": [{\r\n * // ...\r\n * \"bullets\": [{\r\n * \"type\": \"PinBullet\",\r\n * \"poleHeight\": 15,\r\n * \"label\": {\r\n * \"text\": \"{valueY}\"\r\n * }\r\n * }]\r\n * }]\r\n * }\r\n * ```\r\n *\r\n * @since 4.5.7\r\n * @see {@link https://www.amcharts.com/docs/v4/tutorials/plugin-bullets/} for usage instructions.\r\n * @see {@link IBulletEvents} for a list of available events\r\n * @see {@link IBulletAdapters} for a list of available Adapters\r\n */\r\nexport class PinBullet extends Bullet {\r\n\r\n\t/**\r\n\t * Defines available properties.\r\n\t */\r\n\tpublic _properties!: IPinBulletProperties;\r\n\r\n\t/**\r\n\t * Defines available adapters.\r\n\t */\r\n\tpublic _adapter!: IPinBulletAdapters;\r\n\r\n\t/**\r\n\t * Defines available events.\r\n\t */\r\n\tpublic _events!: IPinBulletEvents;\r\n\r\n\t/**\r\n\t * A [[Circle]] element of the pin. It is used for the \"inside\" of the pin.\r\n\t */\r\n\tpublic circle: Circle;\r\n\r\n\t/**\r\n\t * A type for the background element.\r\n\t */\r\n\tpublic _background: PointedCircle;\r\n\r\n\t/**\r\n\t * Image element.\r\n\t */\r\n\tprotected _image: Image;\r\n\r\n\t/**\r\n\t * Label element.\r\n\t */\r\n\tprotected _label: Label;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\t\tsuper();\r\n\r\n\t\tthis.className = \"PinBullet\";\r\n\t\tlet interfaceColors = new InterfaceColorSet();\r\n\r\n\t\tlet circle = this.createChild(Circle);\r\n\t\tcircle.shouldClone = false;\r\n\t\tcircle.isMeasured = false;\r\n\t\tcircle.fill = interfaceColors.getFor(\"background\");\r\n\t\tcircle.radius = percent(85);\r\n\r\n\t\tthis.circle = circle;\r\n\t\tlet background = this.background;\r\n\t\tbackground.fill = interfaceColors.getFor(\"alternativeBackground\");\r\n\t\tbackground.fillOpacity = 1;\r\n\t\tbackground.pointerBaseWidth = 20;\r\n\t\tbackground.pointerLength = 20;\r\n\t\tbackground.radius = 25;\r\n\t\tbackground.events.on(\"propertychanged\", this.invalidate, this, false);\r\n\r\n\t\tthis.applyTheme();\r\n\t}\r\n\r\n\t/**\r\n\t * Validates element:\r\n\t * * Triggers events\r\n\t * * Redraws the element\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t */\r\n\tpublic validate() {\r\n\t\tsuper.validate();\r\n\t\tlet background = this.background;\r\n\r\n\t\tlet px = background.pointerX;\r\n\t\tlet py = background.pointerY;\r\n\t\tlet pl = background.pointerLength;\r\n\t\tlet pw = background.pointerBaseWidth;\r\n\t\tlet pa = background.pointerAngle + 180;\r\n\t\tlet r = background.radius;\r\n\r\n\t\tif (pw > 2 * r) {\r\n\t\t\tpw = 2 * r;\r\n\t\t}\r\n\r\n\t\tlet da = $math.DEGREES * Math.atan(pw / 2 / pl);\r\n\r\n\t\tif (da <= 0.001) {\r\n\t\t\tda = 0.001;\r\n\t\t}\r\n\r\n\t\tlet a1 = pa - da;\r\n\t\tlet a2 = pa + da;\r\n\r\n\t\tlet p1 = { x: px + pl * $math.cos(a1), y: py + pl * $math.sin(a1) };\r\n\t\tlet p2 = { x: px + pl * $math.cos(a2), y: py + pl * $math.sin(a2) };\r\n\r\n\t\tlet x1 = p1.x;\r\n\t\tlet x2 = p2.x;\r\n\r\n\t\tlet y1 = p1.y;\r\n\t\tlet y2 = p2.y;\r\n\r\n\t\tlet radsq = r * r;\r\n\t\tlet q = Math.sqrt(((x2 - x1) * (x2 - x1)) + ((y2 - y1) * (y2 - y1)));\r\n\r\n\t\tlet x3 = (x1 + x2) / 2;\r\n\t\tlet cx = x3 - Math.sqrt(radsq - ((q / 2) * (q / 2))) * ((y1 - y2) / q);\r\n\r\n\t\tlet y3 = (y1 + y2) / 2;\r\n\t\tlet cy = y3 - Math.sqrt(radsq - ((q / 2) * (q / 2))) * ((x2 - x1) / q);\r\n\r\n\t\tif(this.circle){\r\n\t\t\tlet circleRadius = this.circle.radius;\r\n\r\n\t\t\tif (circleRadius instanceof Percent) {\r\n\t\t\t\tthis.circle.width = r * 2;\r\n\t\t\t\tthis.circle.height = r * 2;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tlet image = this.image;\r\n\t\tif (image) {\r\n\t\t\timage.x = cx;\r\n\t\t\timage.y = cy;\r\n\t\t\timage.width = r * 2;\r\n\t\t\timage.height = r * 2;\r\n\t\t\timage.element.attr({preserveAspectRatio:\"xMidYMid slice\"})\r\n\t\t\tif(this.circle){\r\n\t\t\t\tthis.circle.scale = 1 / image.scale;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif(this.circle){\r\n\t\t\t\tthis.circle.x = cx;\r\n\t\t\t\tthis.circle.y = cy;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tlet label = this.label;\r\n\t\tif (label) {\r\n\t\t\tlabel.x = cx;\r\n\t\t\tlabel.y = cy;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * An element of type [[Image]] to show inside pin's circle.\r\n\t * \r\n\t * @param image Image\r\n\t */\r\n\tpublic set image(image: Image) {\r\n\t\tif (image) {\r\n\t\t\tthis._image = image;\r\n\t\t\tthis._disposers.push(image);\r\n\t\t\timage.shouldClone = false;\r\n\t\t\timage.parent = this;\r\n\t\t\timage.horizontalCenter = \"middle\";\r\n\t\t\timage.verticalCenter = \"middle\";\r\n\r\n\t\t\tif (this.circle) {\r\n\t\t\t\timage.mask = this.circle;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * @return Image\r\n\t */\r\n\tpublic get image(): Image {\r\n\t\treturn this._image;\r\n\t}\r\n\r\n\t/**\r\n\t * A [[Label]] element for displaying within flag.\r\n\t *\r\n\t * Use it's `text` property to set actual text, e.g.:\r\n\t *\r\n\t * ```TypeScript\r\n\t * pinBullet.text = \"Hello\";\r\n\t * ```\r\n\t * ```JavaScript\r\n\t * pinBullet.text = \"Hello\";\r\n\t * ```\r\n\t * ```JSON\r\n\t * {\r\n\t * // ...\r\n\t * \"series\": [{\r\n\t * // ...\r\n\t * \"bullets\": [{\r\n\t * \"type\": \"PinBullet\",\r\n\t * \"label\": {\r\n\t * \"text\": \"Hello\"\r\n\t * }\r\n\t * }]\r\n\t * }]\r\n\t * }\r\n\t * ```\r\n\t * @param label Label\r\n\t */\r\n\tpublic set label(label: Label) {\r\n\t\tif (label) {\r\n\t\t\tthis._label = label;\r\n\t\t\tthis._disposers.push(label);\r\n\t\t\tlabel.shouldClone = false;\r\n\t\t\tlabel.parent = this;\r\n\t\t\tlabel.horizontalCenter = \"middle\";\r\n\t\t\tlabel.verticalCenter = \"middle\";\r\n\t\t\tlabel.textAlign = \"middle\";\r\n\t\t\tlabel.dy = 2;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * @return Label\r\n\t */\r\n\tpublic get label(): Label {\r\n\t\treturn this._label;\r\n\t}\r\n\r\n\t/**\r\n\t * Copies all proprities and related stuff from another instance of\r\n\t * [[PinBullet]].\r\n\t *\r\n\t * @param source Source element\r\n\t */\r\n\tpublic copyFrom(source: this): void {\r\n\t\tsuper.copyFrom(source);\r\n\t\tif (source.image) {\r\n\t\t\tif (!this._image) {\r\n\t\t\t\tthis.image = source.image.clone();\r\n\t\t\t}\r\n\t\t\tthis._image.copyFrom(source.image);\r\n\t\t}\r\n\t\tif(this.circle && source.circle){\r\n\t\t\tthis.circle.copyFrom(source.circle);\r\n\t\t}\r\n\r\n\t\tif (source.label) {\r\n\t\t\tif (!this._label) {\r\n\t\t\t\tthis.label = source.label.clone();\r\n\t\t\t}\r\n\t\t\tthis._label.copyFrom(source.label);\r\n\t\t}\t\r\n\t}\r\n\r\n\t/**\r\n\t * Creates and returns a background element.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @return Background\r\n\t */\r\n\tpublic createBackground(): this[\"_background\"] {\r\n\t\treturn new PointedCircle();\r\n\t}\r\n}\r\n\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"PinBullet\"] = PinBullet;\r\n\n\n\n// WEBPACK FOOTER //\n// ../../../../../src/.internal/plugins/bullets/PinBullet.ts","/**\r\n * Flag bullet module.\r\n */\r\n\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Bullet, IBulletProperties, IBulletAdapters, IBulletEvents } from \"../../charts/elements/Bullet\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport { Label } from \"../../core/elements/Label\";\r\nimport { WavedRectangle } from \"../../core/elements/WavedRectangle\";\r\nimport { Line } from \"../../core/elements/Line\";\r\nimport { Sprite } from \"../../core/Sprite\";\r\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\r\n\r\n/**\r\n * ============================================================================\r\n * REQUISITES\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines properties for [[FlagBullet]].\r\n */\r\nexport interface IFlagBulletProperties extends IBulletProperties {\r\n\r\n\t/**\r\n\t * Flag pole height in pixels.\r\n\t *\r\n\t * @default 10\r\n\t */\r\n\tpoleHeight?: number;\r\n\r\n}\r\n\r\n/**\r\n * Defines events for [[FlagBullet]].\r\n */\r\nexport interface IFlagBulletEvents extends IBulletEvents { }\r\n\r\n/**\r\n * Defines adapters.\r\n * \r\n * Includes both the [[Adapter]] definitions and properties.\r\n * @see {@link Adapter}\r\n */\r\nexport interface IFlagBulletAdapters extends IBulletAdapters, IFlagBulletProperties { }\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Creates a flag-shaped bullet with an optional text label inside it.\r\n *\r\n * The background/body of the flag is a [[WavedRectangle]] element. Most of\r\n * its the visual appearance is configured via `background` property.\r\n *\r\n * The size of a background adopts to the size of a label automatically. If\r\n * you don't want a label to be shown at all, you can set it to `undefined`. In\r\n * this case flag size will be of the `width`/`height` set directly on the\r\n * [[FlagBullet]].\r\n *\r\n * Uses [[Label]] instance to draw the label, so the label itself is\r\n * configurable.\r\n *\r\n * Example:\r\n * \r\n * ```TypeScript\r\n * let series = chart.series.push(new am4charts.LineSeries());\r\n * // ...\r\n * let flagBullet = series.bullets.push(new am4plugins_bullets.FlagBullet());\r\n * flagBullet.poleHeight = 15;\r\n * flagBullet.label.text = \"{valueY}\";\r\n * ```\r\n * ```JavaScript\r\n * var series = chart.series.push(new am4charts.LineSeries());\r\n * // ...\r\n * var flagBullet = series.bullets.push(new am4plugins_bullets.FlagBullet());\r\n * flagBullet.poleHeight = 15;\r\n * flagBullet.label.text = \"{valueY}\";\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"series\": [{\r\n * // ...\r\n * \"bullets\": [{\r\n * \"type\": \"FlagBullet\",\r\n * \"poleHeight\": 15,\r\n * \"label\": {\r\n * \"text\": \"{valueY}\"\r\n * }\r\n * }]\r\n * }]\r\n * }\r\n * ```\r\n *\r\n * @since 4.5.7\r\n * @see {@link https://www.amcharts.com/docs/v4/tutorials/plugin-bullets/} for usage instructions.\r\n * @see {@link IBulletEvents} for a list of available events\r\n * @see {@link IBulletAdapters} for a list of available Adapters\r\n */\r\nexport class FlagBullet extends Bullet {\r\n\r\n\t/**\r\n\t * Defines available properties.\r\n\t */\r\n\tpublic _properties!: IFlagBulletProperties;\r\n\r\n\t/**\r\n\t * Defines available adapters.\r\n\t */\r\n\tpublic _adapter!: IFlagBulletAdapters;\r\n\r\n\t/**\r\n\t * Defines available events.\r\n\t */\r\n\tpublic _events!: IFlagBulletEvents;\r\n\r\n\t/**\r\n\t * A type for the background element.\r\n\t */\r\n\tpublic _background: WavedRectangle;\r\n\r\n\t/**\r\n\t * Label element.\r\n\t */\r\n\tprotected _label: Label;\r\n\r\n\t/**\r\n\t * An element of type [[Line]] that represents flag's \"pole\".\r\n\t * \r\n\t * To set actual height of the pole use `poleHeight` property, which\r\n\t * indicates height of the pole in pixels from bottom of the pole to the\r\n\t * bottom of the flag.\r\n\t */\r\n\tpublic pole: Line;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\t\tsuper();\r\n\r\n\t\tthis.className = \"FlagBullet\";\r\n\r\n\t\tlet background = this.background;\r\n\t\tbackground.fillOpacity = 1;\r\n\t\tbackground.events.on(\"propertychanged\", this.invalidate, this, false);\r\n\t\tbackground.waveHeight = 1.5;\r\n\t\tbackground.waveLength = 7;\r\n\t\tbackground.setWavedSides(true, false, true, false);\r\n\t\tbackground.strokeOpacity = 1;\r\n\r\n\t\tlet interfaceColors = new InterfaceColorSet();\r\n\t\tthis.stroke = interfaceColors.getFor(\"alternativeBackground\");\r\n\r\n\t\tthis.pole = this.createChild(Line);\r\n\t\tthis.pole.strokeOpacity = 1;\r\n\r\n\t\tthis.width = 22;\r\n\t\tthis.height = 16;\r\n\r\n\t\tlet label = new Label();\r\n\t\tlabel.padding(3, 5, 3, 5);\r\n\t\tlabel.dy = 1;\r\n\t\tlabel.events.on(\"propertychanged\", this.invalidate, this, false);\r\n\t\tlabel.events.on(\"positionchanged\", this.invalidate, this, false);\r\n\t\tlabel.strokeOpacity = 0;\r\n\r\n\t\tthis.label = label;\r\n\r\n\t\tthis.poleHeight = 10;\r\n\r\n\t\tthis.applyTheme();\r\n\t}\r\n\r\n\t/**\r\n\t * Validates element:\r\n\t * * Triggers events\r\n\t * * Redraws the element\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t */\r\n\tpublic validate() {\r\n\t\tsuper.validate();\r\n\r\n\t\tthis.updateBackground();\r\n\r\n\t\tlet background = this.background;\r\n\r\n\t\tthis.pole.y1 = 0;\r\n\r\n\t\tlet poleHeight = this.poleHeight;\r\n\t\tlet label = this.label;\r\n\t\tlet bgHeight = background.pixelHeight;\r\n\r\n\t\tif (poleHeight > 0) {\r\n\t\t\tthis.pole.y2 = -poleHeight - bgHeight;\r\n\t\t\tif (label) {\r\n\t\t\t\tlabel.y = -poleHeight - bgHeight;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis.pole.y2 = -poleHeight + bgHeight;\r\n\t\t\tif (label) {\r\n\t\t\t\tlabel.y = -poleHeight;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (label && label.horizontalCenter == \"middle\") {\r\n\t\t\tthis.pole.y2 = -poleHeight;\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * Update the background to fit into specific dimensions.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @todo Make it protected?\r\n\t */\r\n\tpublic updateBackground(): void {\r\n\t\tlet background: Sprite = this._background; // accessing protected, as getter creates instance if it doesn't exist\r\n\t\tif (background) {\r\n\r\n\t\t\tlet label = this.label;\r\n\r\n\t\t\tif (label) {\r\n\t\t\t\tbackground.x = label.maxLeft;\r\n\t\t\t\tbackground.width = label.measuredWidth;\r\n\t\t\t\tbackground.height = label.measuredHeight;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tbackground.width = Math.abs(this.maxRight - this.maxLeft);\r\n\t\t\t\tbackground.height = Math.abs(this.maxBottom - this.maxTop);\r\n\t\t\t}\r\n\t\t\tlet poleHeight = this.poleHeight;\r\n\t\t\tif (poleHeight > 0) {\r\n\t\t\t\tbackground.y = - poleHeight - background.pixelHeight;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tbackground.y = - poleHeight;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * A [[Label]] element for displaying within flag.\r\n\t *\r\n\t * Use it's `text` property to set actual text, e.g.:\r\n\t *\r\n\t * ```TypeScript\r\n\t * flagBullet.text = \"Hello\";\r\n\t * ```\r\n\t * ```JavaScript\r\n\t * flagBullet.text = \"Hello\";\r\n\t * ```\r\n\t * ```JSON\r\n\t * {\r\n\t * // ...\r\n\t * \"series\": [{\r\n\t * // ...\r\n\t * \"bullets\": [{\r\n\t * \"type\": \"FlagBullet\",\r\n\t * \"label\": {\r\n\t * \"text\": \"Hello\"\r\n\t * }\r\n\t * }]\r\n\t * }]\r\n\t * }\r\n\t * ```\r\n\t * @param label Label\r\n\t */\r\n\tpublic set label(label: Label) {\r\n\t\tif (label) {\r\n\t\t\tthis._label = label;\r\n\t\t\tthis._disposers.push(label);\r\n\t\t\tlabel.parent = this;\r\n\t\t\tlabel.shouldClone = false;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif (this._label) {\r\n\t\t\t\tthis._label.dispose();\r\n\t\t\t}\r\n\t\t\tthis._label = label;\r\n\t\t\tthis.invalidate();\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * @return Label\r\n\t */\r\n\tpublic get label(): Label {\r\n\t\treturn this._label;\r\n\t}\r\n\r\n\t/**\r\n\t * Copies all proprities and related stuff from another instance of\r\n\t * [[FlagBullet]].\r\n\t *\r\n\t * @param source Source element\r\n\t */\r\n\tpublic copyFrom(source: this): void {\r\n\t\tif (source.label) {\r\n\t\t\tthis.label = source.label.clone();\r\n\t\t}\r\n\t\tif (source.pole) {\r\n\t\t\tthis.pole.copyFrom(source.pole);\r\n\t\t}\r\n\t\tsuper.copyFrom(source);\r\n\t}\r\n\r\n\t/**\r\n\t * Creates and returns a background element.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @return Background\r\n\t */\r\n\tpublic createBackground(): this[\"_background\"] {\r\n\t\treturn new WavedRectangle();\r\n\t}\r\n\r\n\t/**\r\n\t * Flag pole height in pixels.\r\n\t *\r\n\t * @default 10\r\n\t * @param value Height (px)\r\n\t */\r\n\tpublic set poleHeight(value: number) {\r\n\t\tthis.setPropertyValue(\"poleHeight\", value, true);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Height (px)\r\n\t */\r\n\tpublic get poleHeight(): number {\r\n\t\treturn this.getPropertyValue(\"poleHeight\");\r\n\t}\r\n}\r\n\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"FlagBullet\"] = FlagBullet;\r\n\n\n\n// WEBPACK FOOTER //\n// ../../../../../src/.internal/plugins/bullets/FlagBullet.ts","/**\r\n * Functionality for drawing Stars.\r\n */\r\n\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Sprite, ISpriteProperties, ISpriteAdapters, ISpriteEvents } from \"../../core/Sprite\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport * as $path from \"../../core/rendering/Path\";\r\nimport * as $math from \"../../core/utils/Math\";\r\nimport * as $type from \"../../core/utils/Type\";\r\nimport * as $utils from \"../../core/utils/Utils\";\r\nimport { percent, Percent } from \"../../core/utils/Percent\";\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * REQUISITES\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines properties for [[Star]].\r\n */\r\nexport interface IStarProperties extends ISpriteProperties {\r\n\r\n\t/**\r\n\t * Radius of the star in pixels.\r\n\t *\r\n\t * @default 100\r\n\t */\r\n\tradius?: number;\r\n\r\n\t/**\r\n\t * Vertical radius for creating skewed star.\r\n\t *\r\n\t * This is relevant to `radius`, e.g. 0.5 will set vertical radius to half\r\n\t * the `radius`.\r\n\t */\r\n\tradiusY?: number;\r\n\r\n\t/**\r\n\t * Inner radius of the star, in px or %.\r\n\t */\r\n\tinnerRadius?: number | Percent;\r\n\r\n\t/**\r\n\t * The angle at which left edge of the star is drawn. (0-360)\r\n\t *\r\n\t * 0 is to the right of the center.\r\n\t *\r\n\t * @default -90\r\n\t */\r\n\tstartAngle?: number;\r\n\r\n\t/**\r\n\t * Radius of stars's outer corners in pixels.\r\n\t *\r\n\t * @default 0\r\n\t */\r\n\tcornerRadius?: number;\r\n\r\n\t/**\r\n\t * Radius of stars's inner corners in pixels.\r\n\t *\r\n\t * @default 0\r\n\t */\r\n\tinnerCornerRadius?: number;\r\n\r\n\t/**\r\n\t * How much of a complete circle the star will complete.\r\n\t *\r\n\t * A complete circle is 350 degrees. If set to 180, only half a star will\r\n\t * be drawn\r\n\t *\r\n\t * @default 360\r\n\t */\r\n\tarc?: number;\r\n\r\n\t/**\r\n\t * Number of points (tips).\r\n\t * \r\n\t * @default 5\r\n\t */\r\n\tpointCount?: number;\r\n}\r\n\r\n/**\r\n * Defines events for [[Star]].\r\n */\r\nexport interface IStarEvents extends ISpriteEvents { }\r\n\r\n/**\r\n * Defines adapters for [[Star]].\r\n *\r\n * @see {@link Adapter}\r\n */\r\nexport interface IStarAdapters extends ISpriteAdapters, IStarProperties { }\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Used to draw a Star shape.\r\n *\r\n * @since 4.5.7\r\n * @see {@link https://www.amcharts.com/docs/v4/tutorials/plugin-bullets/} for usage instructions.\r\n * @see {@link IStarEvents} for a list of available events\r\n * @see {@link IStarAdapters} for a list of available Adapters\r\n */\r\nexport class Star extends Sprite {\r\n\r\n\t/**\r\n\t * Defines available properties.\r\n\t */\r\n\tpublic _properties!: IStarProperties;\r\n\r\n\t/**\r\n\t * Defines available adapters.\r\n\t */\r\n\tpublic _adapter!: IStarAdapters;\r\n\r\n\t/**\r\n\t * Defines available events.\r\n\t */\r\n\tpublic _events!: IStarEvents;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.className = \"Star\";\r\n\t\tthis.pointCount = 5;\r\n\t\tthis.arc = 360;\r\n\t\tthis.radius = 100;\r\n\t\tthis.innerRadius = percent(30);\r\n\t\tthis.cornerRadius = 0;\r\n\t\tthis.innerCornerRadius = 0;\r\n\t\tthis.startAngle = -90;\r\n\r\n\t\tthis.element = this.paper.add(\"path\");\r\n\t\tthis.applyTheme();\r\n\t}\r\n\r\n\t/**\r\n\t * Draws the element.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t */\r\n\tpublic draw(): void {\r\n\t\tsuper.draw();\r\n\r\n\r\n\t\tlet startAngle = this.startAngle;\r\n\t\tlet arc = this.arc;\r\n\t\tlet pointCount = this.pointCount;\r\n\t\tlet radius = this.radius;\r\n\t\tlet innerRadius = this.pixelInnerRadius;\r\n\t\tlet cornerRadius = this.cornerRadius;\r\n\r\n\t\tif (cornerRadius > radius - innerRadius) {\r\n\t\t\tcornerRadius = radius - innerRadius;\r\n\t\t}\r\n\r\n\t\tlet innerCornerRadius = this.innerCornerRadius;\r\n\r\n\t\tif (innerCornerRadius > radius - cornerRadius - innerRadius) {\r\n\t\t\tinnerCornerRadius = radius - cornerRadius - innerRadius;\r\n\t\t}\r\n\r\n\r\n\t\tlet halfAngle = arc / pointCount / 2;\r\n\t\tlet path: string = \"\";\r\n\r\n\t\tfor (let i = 0; i < pointCount; i++) {\r\n\r\n\t\t\tlet angle = startAngle + i * arc / pointCount;\r\n\r\n\t\t\tif (cornerRadius > 0) {\r\n\t\t\t\tlet p0 = { x: innerRadius * $math.cos(angle - halfAngle), y: innerRadius * $math.sin(angle - halfAngle) };\r\n\t\t\t\tlet p1 = { x: radius * $math.cos(angle), y: radius * $math.sin(angle) };\r\n\t\t\t\tlet p2 = { x: innerRadius * $math.cos(angle + halfAngle), y: innerRadius * $math.sin(angle + halfAngle) };\r\n\r\n\t\t\t\tlet a1 = $math.getAngle(p1, p0);\r\n\t\t\t\tlet a2 = $math.getAngle(p1, p2);\r\n\r\n\t\t\t\tlet x1 = p1.x + cornerRadius * $math.cos(a1);\r\n\t\t\t\tlet y1 = p1.y + cornerRadius * $math.sin(a1);\r\n\r\n\t\t\t\tlet x2 = p1.x + cornerRadius * $math.cos(a2);\r\n\t\t\t\tlet y2 = p1.y + cornerRadius * $math.sin(a2);\r\n\r\n\t\t\t\tpath += $path.lineTo({ x: x1, y: y1 });\r\n\t\t\t\tpath += \" Q\" + p1.x + \",\" + p1.y + \" \" + x2 + \",\" + y2;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tpath += $path.lineTo({ x: radius * $math.cos(angle), y: radius * $math.sin(angle) });\r\n\t\t\t}\r\n\r\n\t\t\tangle += halfAngle;\r\n\r\n\t\t\tif (innerCornerRadius > 0) {\r\n\t\t\t\tlet p0 = { x: radius * $math.cos(angle - halfAngle), y: radius * $math.sin(angle - halfAngle) };\r\n\t\t\t\tlet p1 = { x: innerRadius * $math.cos(angle), y: innerRadius * $math.sin(angle) };\r\n\t\t\t\tlet p2 = { x: radius * $math.cos(angle + halfAngle), y: radius * $math.sin(angle + halfAngle) };\r\n\r\n\t\t\t\tlet a1 = $math.getAngle(p1, p0);\r\n\t\t\t\tlet a2 = $math.getAngle(p1, p2);\r\n\r\n\t\t\t\tlet x1 = p1.x + innerCornerRadius * $math.cos(a1);\r\n\t\t\t\tlet y1 = p1.y + innerCornerRadius * $math.sin(a1);\r\n\r\n\t\t\t\tlet x2 = p1.x + innerCornerRadius * $math.cos(a2);\r\n\t\t\t\tlet y2 = p1.y + innerCornerRadius * $math.sin(a2);\r\n\r\n\t\t\t\tpath += $path.lineTo({ x: x1, y: y1 });\r\n\t\t\t\tpath += \" Q\" + p1.x + \",\" + p1.y + \" \" + x2 + \",\" + y2;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tpath += $path.lineTo({ x: innerRadius * $math.cos(angle), y: innerRadius * $math.sin(angle) })\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (this.arc < 360) {\r\n\t\t\tpath += $path.lineTo({ x: 0, y: 0 })\r\n\t\t}\r\n\r\n\t\tpath += $path.closePath();\r\n\r\n\t\tpath = path.replace(\"L\", \"M\");\r\n\r\n\t\tthis.path = path;\r\n\t}\r\n\r\n\t/**\r\n\t * The angle at which left edge of the star is drawn. (0-360)\r\n\t *\r\n\t * 0 is to the right of the center.\r\n\t *\r\n\t * @default -90\r\n\t * @param value Angle (0-360)\r\n\t */\r\n\tpublic set startAngle(value: number) {\r\n\t\tthis.setPropertyValue(\"startAngle\", $math.normalizeAngle(value), true);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Angle (0-360)\r\n\t */\r\n\tpublic get startAngle(): number {\r\n\t\treturn this.getPropertyValue(\"startAngle\");\r\n\t}\r\n\r\n\t/**\r\n\t * How much of a complete circle the star will complete.\r\n\t *\r\n\t * A complete circle is 350 degrees. If set to 180, only half a star will\r\n\t * be drawn\r\n\t *\r\n\t * @default 360\r\n\t * @param value Arc scope\r\n\t */\r\n\tpublic set arc(value: number) {\r\n\t\tif (!$type.isNumber(value)) {\r\n\t\t\tvalue = 360;\r\n\t\t}\r\n\t\tthis.setPropertyValue(\"arc\", value, true);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Arc scope\r\n\t */\r\n\tpublic get arc(): number {\r\n\t\treturn this.getPropertyValue(\"arc\");\r\n\t}\r\n\r\n\t/**\r\n\t * Radius of the star in pixels.\r\n\t *\r\n\t * @default 100\r\n\t * @param value Radius (px)\r\n\t */\r\n\tpublic set radius(value: number) {\r\n\t\tthis.setPropertyValue(\"radius\", value, true);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Radius (px)\r\n\t */\r\n\tpublic get radius(): number {\r\n\t\tlet radius: number = this.getPropertyValue(\"radius\");\r\n\t\tif (!$type.isNumber(radius)) {\r\n\t\t\tradius = 0;\r\n\t\t}\r\n\t\treturn radius;\r\n\t}\r\n\r\n\t/**\r\n\t * Vertical radius for creating skewed star shapes.\r\n\t *\r\n\t * This is relevant to `radius`, e.g. 0.5 will set vertical radius to half\r\n\t * the `radius`.\r\n\t *\r\n\t * @param value Vertical radius (0-1)\r\n\t */\r\n\tpublic set radiusY(value: number) {\r\n\t\tthis.setPropertyValue(\"radiusY\", value, true);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Vertical radius (0-1)\r\n\t */\r\n\tpublic get radiusY(): number {\r\n\t\tlet value: number = this.getPropertyValue(\"radiusY\");\r\n\r\n\t\tif (!$type.isNumber(value)) {\r\n\t\t\tvalue = this.radius;\r\n\t\t}\r\n\t\treturn value;\r\n\t}\r\n\r\n\t/**\r\n\t * Inner radius of the star (cutout).\r\n\t *\r\n\t * It can be set either by absolute pixel value or relative to radius in\r\n\t * percent.\r\n\t *\r\n\t * @default 0\r\n\t * @param value Radius (px or %)\r\n\t */\r\n\tpublic set innerRadius(value: number | Percent) {\r\n\t\tthis.setPercentProperty(\"innerRadius\", value, true, false, 10, false);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Radius (px or %)\r\n\t */\r\n\tpublic get innerRadius(): number | Percent {\r\n\t\treturn this.getPropertyValue(\"innerRadius\");\r\n\t}\r\n\r\n\t/**\r\n\t * @return Radius px\r\n\t */\r\n\tpublic get pixelInnerRadius(): number {\r\n\t\treturn $utils.relativeToValue(this.innerRadius, this.radius);\r\n\t}\r\n\r\n\t/**\r\n\t * Radius of star's outer corners in pixels.\r\n\t *\r\n\t * @default 0\r\n\t * @param value Radius (px)\r\n\t */\r\n\tpublic set cornerRadius(value: number) {\r\n\t\tthis.setPropertyValue(\"cornerRadius\", value, true);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Radius (px)\r\n\t */\r\n\tpublic get cornerRadius(): number {\r\n\t\treturn this.getPropertyValue(\"cornerRadius\");\r\n\t}\r\n\r\n\t/**\r\n\t * Radius of star's inner corners in pixels.\r\n\t *\r\n\t * @default 0\r\n\t * @param value Radius (px)\r\n\t */\r\n\tpublic set innerCornerRadius(value: number) {\r\n\t\tthis.setPropertyValue(\"innerCornerRadius\", value, true);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Radius (px)\r\n\t */\r\n\tpublic get innerCornerRadius(): number {\r\n\t\treturn this.getPropertyValue(\"innerCornerRadius\");\r\n\t}\r\n\r\n\t/**\r\n\t * Number of start points\r\n\t *\r\n\t * @default 5\r\n\t * @param value\r\n\t */\r\n\tpublic set pointCount(value: number) {\r\n\t\tthis.setPropertyValue(\"pointCount\", value, true);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Number of star points\r\n\t */\r\n\tpublic get pointCount(): number {\r\n\t\tlet value = this.getPropertyValue(\"pointCount\");\r\n\t\treturn $math.max(3, value);\r\n\t}\r\n\r\n}\r\n\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"Star\"] = Star;\n\n\n// WEBPACK FOOTER //\n// ../../../../../src/.internal/plugins/bullets/Star.ts","/**\r\n * Functionality for drawing bullets with basic shapes.\r\n */\r\n\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Sprite } from \"../../core/Sprite\";\r\nimport { Bullet, IBulletProperties, IBulletAdapters, IBulletEvents } from \"../../charts/elements/Bullet\";\r\nimport { Rectangle } from \"../../core/elements/Rectangle\";\r\nimport { Circle } from \"../../core/elements/Circle\";\r\nimport { Triangle } from \"../../core/elements/Triangle\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport * as $type from \"../../core/utils/Type\";\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * REQUISITES\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines properties for [[ShapeBullet]].\r\n */\r\nexport interface IShapeBulletProperties extends IBulletProperties {\r\n\r\n\t/**\r\n\t * Size (width and height in pixels) of the bullet. The actual shapes will be\r\n\t * sized and positioned to fit this pixel value.\r\n\t *\r\n\t * @default 10\r\n\t */\r\n\tsize?: number;\r\n\r\n\t/**\r\n\t * Shape of the bullet.\r\n\t */\r\n\tshape?: BulletShapes;\r\n\r\n}\r\n\r\n/**\r\n * Defines events for [[ShapeBullet]].\r\n */\r\nexport interface IShapeBulletEvents extends IBulletEvents { }\r\n\r\n/**\r\n * Defines adapters for [[ShapeBullet]].\r\n *\r\n * @see {@link Adapter}\r\n */\r\nexport interface IShapeBulletAdapters extends IBulletAdapters, IShapeBulletProperties { }\r\n\r\n/**\r\n * Defines available shapes for a [[ShapeBullet]].\r\n */\r\nexport type BulletShapes = \"square\" | \"diamond\" | \"circle\" | \"up\" | \"down\" | \"left\" | \"right\";\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Used to draw a ShapeBullet shape.\r\n *\r\n * @since 4.9.34\r\n * @see {@link https://www.amcharts.com/docs/v4/tutorials/plugin-bullets/} for usage instructions.\r\n * @see {@link IShapeBulletEvents} for a list of available events\r\n * @see {@link IShapeBulletAdapters} for a list of available Adapters\r\n */\r\nexport class ShapeBullet extends Bullet {\r\n\r\n\t/**\r\n\t * Defines available properties.\r\n\t */\r\n\tpublic _properties!: IShapeBulletProperties;\r\n\r\n\t/**\r\n\t * Defines available adapters.\r\n\t */\r\n\tpublic _adapter!: IShapeBulletAdapters;\r\n\r\n\t/**\r\n\t * Defines available events.\r\n\t */\r\n\tpublic _events!: IShapeBulletEvents;\r\n\r\n\t/**\r\n\t * An actual element comprising the shape.\r\n\t *\r\n\t * The type of the element will depend on the `shape` setting. It could be\r\n\t * a `Circle`, `Rectangle`, or `Triangle`.\r\n\t */\r\n\tpublic shapeElement: Sprite;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.className = \"ShapeBullet\";\r\n\t\tthis.size = 10;\r\n\t\tthis.applyTheme();\r\n\t}\r\n\r\n\t/**\r\n\t * Draws the element.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t */\r\n\tpublic draw(): void {\r\n\t\tsuper.draw();\r\n\r\n\t\tif (this.shapeElement) {\r\n\t\t\tthis.shapeElement.dispose();\r\n\t\t}\r\n\r\n\t\tswitch (this.shape) {\r\n\t\t\tcase \"square\":\r\n\t\t\t\tthis.createSquare();\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"diamond\":\r\n\t\t\t\tthis.createSquare(45);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"circle\":\r\n\t\t\t\tthis.createCircle();\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"up\":\r\n\t\t\t\tthis.createTriangle();\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"right\":\r\n\t\t\t\tthis.createTriangle(90);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"down\":\r\n\t\t\t\tthis.createTriangle(180);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"left\":\r\n\t\t\t\tthis.createTriangle(270);\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\t// todo\r\n\t}\r\n\r\n\t/**\r\n\t * Decorates the shape so it is positioned properly.\r\n\t */\r\n\tprivate processShape(): void {\r\n\t\tthis.shapeElement.horizontalCenter = \"middle\";\r\n\t\tthis.shapeElement.verticalCenter = \"middle\";\r\n\t}\r\n\r\n\t/**\r\n\t * Creates a square shape.\r\n\t */\r\n\tprivate createSquare(rotation: number = 0): void {\r\n\t\tconst element = this.createChild(Rectangle);\r\n\t\telement.width = this.size;\r\n\t\telement.height = this.size;\r\n\t\telement.rotation = rotation;\r\n\t\tthis.shapeElement = element;\r\n\t\tthis.processShape();\r\n\t}\r\n\r\n\t/**\r\n\t * Creates a circle shape.\r\n\t */\r\n\tprivate createCircle(rotation: number = 0): void {\r\n\t\tconst element = this.createChild(Circle);\r\n\t\telement.radius = this.size / 2;\r\n\t\tthis.shapeElement = element;\r\n\t\tthis.processShape();\r\n\t}\r\n\r\n\t/**\r\n\t * Creates a triangle shape.\r\n\t */\r\n\tprivate createTriangle(rotation: number = 0): void {\r\n\t\tconst element = this.createChild(Triangle);\r\n\t\telement.width = this.size;\r\n\t\telement.height = this.size;\r\n\t\telement.rotation = rotation;\r\n\t\tthis.shapeElement = element;\r\n\t\tthis.processShape();\r\n\t}\r\n\r\n\t/**\r\n\t * Shape of the bullet.\r\n\t *\r\n\t * Available options: `\"square\"`, `\"diamond\"`, `\"circle\"`, `\"up\"`, `\"down\"`,\r\n\t * `\"left\"`, `\"right\"`.\r\n\t *\r\n\t * There is no default. If `shape` is not set, the bullets will come out\r\n\t * empty.\r\n\t *\r\n\t * @param value Shape\r\n\t */\r\n\tpublic set shape(value: BulletShapes) {\r\n\t\tif (this.setPropertyValue(\"shape\", value, true)) {\r\n\t\t\tthis.invalidate();\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * @return shape scope\r\n\t */\r\n\tpublic get shape(): BulletShapes {\r\n\t\treturn this.getPropertyValue(\"shape\");\r\n\t}\r\n\r\n\t/**\r\n\t * Size (width and height in pixels) of the bullet. The actual shapes will be\r\n\t * sized and positioned to fit this pixel value.\r\n\t *\r\n\t * @default 10\r\n\t * @param value Size (px)\r\n\t */\r\n\tpublic set size(value: number) {\r\n\t\tif (this.setPropertyValue(\"size\", value, true)) {\r\n\t\t\tthis.width = value;\r\n\t\t\tthis.height = value;\r\n\t\t\tthis.invalidate();\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * @return Size (px)\r\n\t */\r\n\tpublic get size(): number {\r\n\t\tlet size: number = this.getPropertyValue(\"size\");\r\n\t\tif (!$type.isNumber(size)) {\r\n\t\t\tsize = 0;\r\n\t\t}\r\n\t\treturn size;\r\n\t}\r\n\r\n}\r\n\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"ShapeBullet\"] = ShapeBullet;\n\n\n// WEBPACK FOOTER //\n// ../../../../../src/.internal/plugins/bullets/ShapeBullet.ts","import * as m from \"../../es2015/plugins/bullets\";\nwindow.am4plugins_bullets = m;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./plugins/bullets.js\n// module id = null\n// module chunks = "],"sourceRoot":""}