diff --git a/NAMESPACE b/NAMESPACE index 9793552..dccde9e 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -2,8 +2,30 @@ export(apexcharter) export(apexcharterOutput) +export(ax_annotations) +export(ax_chart) +export(ax_colors) +export(ax_dataLabels) +export(ax_fill) +export(ax_grid) +export(ax_labels) +export(ax_legend) +export(ax_markers) +export(ax_noData) +export(ax_plotOptions) +export(ax_responsive) +export(ax_series) +export(ax_states) +export(ax_stroke) +export(ax_subtitle) +export(ax_theme) +export(ax_title) +export(ax_tooltip) +export(ax_xaxis) +export(ax_yaxis) export(renderApexcharter) importFrom(htmlwidgets,createWidget) importFrom(htmlwidgets,shinyRenderWidget) importFrom(htmlwidgets,shinyWidgetOutput) importFrom(htmlwidgets,sizingPolicy) +importFrom(utils,modifyList) diff --git a/R/apex-utils.R b/R/apex-utils.R new file mode 100644 index 0000000..8aaba8c --- /dev/null +++ b/R/apex-utils.R @@ -0,0 +1,633 @@ + + + + + +# ApexCharts API ---------------------------------------------------------- + + +#' Annotations properties +#' +#' @param ax A \code{apexcharts} \code{htmlwidget} object. +#' @param position +#' @param yaxis +#' @param xaxis +#' @param points +#' @param ... Additional parameters. +#' +#' @return A \code{apexcharts} \code{htmlwidget} object. +#' @export +#' +#' @examples +ax_annotations <- function(ax, + position = NULL, + yaxis = NULL, + xaxis = NULL, + points = NULL, + ...) { + params <- c(as.list(environment()), list(...))[-1] + .ax_opt2(ax, "annotations", l = dropNulls(params)) +} + + +#' Chart parameters +#' +#' @param ax A \code{apexcharts} \code{htmlwidget} object. +#' @param type Specify the chart type. Available Options: \code{"bar"}, \code{"column"}, \code{"line"}, +#' \code{"histogram"}, \code{"pie"}, \code{"donut"}, \code{"radialBar"}, \code{"scatter"}, \code{"bubble"}, \code{"heatmap"}. +#' @param stacked Logical. Enables stacked option for axis charts. +#' @param stackType When stacked, should the stacking be percentage based or normal stacking. Available options: \code{"normal"} or \code{"100%"} +#' @param animations List. +#' @param background Background color for the chart area. If you want to set background with css, use \code{.apexcharts-canvas} to set it. +#' @param foreColor Sets the text color for the chart. Defaults to \code{#373d3f}. +#' @param dropShadow List. +#' @param events List. +#' @param offsetX +#' @param offsetY +#' @param scroller List. +#' @param selection List. +#' @param sparkline List. Sparkline hides all the elements of the charts other than the primary paths. Helps to visualize data in small areas. . +#' @param toolbar +#' @param zoom +#' @param width Width of the chart. +#' @param height Height of the chart. +#' @param ... Additional parameters. +#' +#' @return A \code{apexcharts} \code{htmlwidget} object. +#' @export +#' +#' @examples +ax_chart <- function(ax, + type = NULL, + stacked = NULL, + stackType = NULL, + animations = NULL, + background = NULL, + foreColor = NULL, + dropShadow = NULL, + events = NULL, + offsetX = NULL, + offsetY = NULL, + scroller = NULL, + selection = NULL, + sparkline = NULL, + toolbar = NULL, + zoom = NULL, + width = NULL, + height = NULL, + ...) { + params <- c(as.list(environment()), list(...))[-1] + .ax_opt2(ax, "chart", l = dropNulls(params)) +} + + +#' Specific options for chart +#' +#' @param ax A \code{apexcharts} \code{htmlwidget} object. +#' @param bar +#' @param heatmap +#' @param radialBar +#' @param pie +#' @param ... Additional parameters. +#' +#' @return A \code{apexcharts} \code{htmlwidget} object. +#' @export +#' +#' @examples +ax_plotOptions <- function(ax, + bar = NULL, + heatmap = NULL, + radialBar = NULL, + pie = NULL, + ...) { + params <- c(as.list(environment()), list(...))[-1] + .ax_opt2(ax, "plotOptions", l = dropNulls(params)) +} + + +#' Colors +#' +#' @param ax A \code{apexcharts} \code{htmlwidget} object. +#' @param ... Colors for the chart’s series. When all colors are used, it starts from the beginning. +#' +#' @return A \code{apexcharts} \code{htmlwidget} object. +#' @export +#' +#' @examples +ax_colors <- function(ax, ...) { + .ax_opt(ax, "colors", ...) +} + + +#' Labels on data +#' +#' @param ax A \code{apexcharts} \code{htmlwidget} object. +#' @param enabled +#' @param textAnchor +#' @param offsetX +#' @param offsetY +#' @param style +#' @param dropShadow +#' @param ... Additional parameters. +#' +#' @return A \code{apexcharts} \code{htmlwidget} object. +#' @export +#' +#' @examples +ax_dataLabels <- function(ax, + enabled = NULL, + textAnchor = NULL, + offsetX = NULL, + offsetY = NULL, + style = NULL, + dropShadow = NULL, + ...) { + params <- c(as.list(environment()), list(...))[-1] + .ax_opt2(ax, "dataLabels", l = dropNulls(params)) +} + + +#' Fill property +#' +#' @param ax A \code{apexcharts} \code{htmlwidget} object. +#' @param type +#' @param colors +#' @param opacity +#' @param gradient +#' @param image +#' @param pattern +#' @param ... Additional parameters. +#' +#' @return A \code{apexcharts} \code{htmlwidget} object. +#' @export +#' +#' @examples +ax_fill <- function(ax, + type = NULL, + colors = NULL, + opacity = NULL, + gradient = NULL, + image = NULL, + pattern = NULL, + ...) { + params <- c(as.list(environment()), list(...))[-1] + .ax_opt2(ax, "fill", l = dropNulls(params)) +} + + +#' Add grids on chart +#' +#' @param ax A \code{apexcharts} \code{htmlwidget} object. +#' @param show Logical. To show or hide grid area (including xaxis / yaxis) +#' @param borderColor Colors of grid borders / lines. +#' @param strokeDashArray Creates dashes in borders of svg path. Higher number creates more space between dashes in the border. +#' @param position Whether to place grid behind chart paths of in front. Available options for position: \code{"front"} or \code{"back"} +#' @param xaxis List. +#' @param yaxis List. +#' @param row List. +#' @param column List. +#' @param padding List. +#' @param ... Additional parameters. +#' +#' @return A \code{apexcharts} \code{htmlwidget} object. +#' @export +#' +#' @examples +ax_grid <- function(ax, + show = NULL, + borderColor = NULL, + strokeDashArray = NULL, + position = NULL, + xaxis = NULL, + yaxis = NULL, + row = NULL, + column = NULL, + padding = NULL, + ...) { + params <- c(as.list(environment()), list(...))[-1] + .ax_opt2(ax, "grid", l = dropNulls(params)) +} + + +#' Alternative axis labels +#' +#' @param ax A \code{apexcharts} \code{htmlwidget} object. +#' @param ... +#' +#' @return A \code{apexcharts} \code{htmlwidget} object. +#' @export +#' +#' @examples +ax_labels <- function(ax, ...) { + .ax_opt(ax, "labels", ...) +} + + +#' Legend properties +#' +#' @param ax A \code{apexcharts} \code{htmlwidget} object. +#' @param show +#' @param floating +#' @param position +#' @param horizontalAlign +#' @param verticalAlign +#' @param fontSize +#' @param textAnchor +#' @param offsetY +#' @param offsetX +#' @param formatter +#' @param labels +#' @param markers +#' @param itemMargin +#' @param containerMargin +#' @param onItemClick +#' @param onItemHover +#' @param ... Additional parameters. +#' +#' @return A \code{apexcharts} \code{htmlwidget} object. +#' @export +#' +#' @examples +ax_legend <- function(ax, + show = NULL, + floating = NULL, + position = NULL, + horizontFalAlign = NULL, + verticalAlign = NULL, + fontSize = NULL, + textAnchor = NULL, + offsetY = NULL, + offsetX = NULL, + formatter = NULL, + labels = NULL, + markers = NULL, + itemMargin = NULL, + containerMargin = NULL, + onItemClick = NULL, + onItemHover = NULL, + ...) { + params <- c(as.list(environment()), list(...))[-1] + .ax_opt2(ax, "legend", l = dropNulls(params)) +} + + +#' Markers properties +#' +#' @param ax A \code{apexcharts} \code{htmlwidget} object. +#' @param discrete +#' @param size +#' @param colors +#' @param strokeColor +#' @param strokeWidth +#' @param strokeOpacity +#' @param fillOpacity +#' @param shape +#' @param radius +#' @param offsetX +#' @param offsetY +#' @param hover +#' @param ... Additional parameters. +#' +#' @return A \code{apexcharts} \code{htmlwidget} object. +#' @export +#' +#' @examples +ax_markers <- function(ax, + discrete = NULL, + size = NULL, + colors = NULL, + strokeColor = NULL, + strokeWidth = NULL, + strokeOpacity = NULL, + fillOpacity = NULL, + shape = NULL, + radius = NULL, + offsetX = NULL, + offsetY = NULL, + hover = NULL, + ...) { + params <- c(as.list(environment()), list(...))[-1] + .ax_opt2(ax, "markers", l = dropNulls(params)) +} + + +#' No data specification +#' +#' @param ax A \code{apexcharts} \code{htmlwidget} object. +#' @param text +#' @param align +#' @param verticalAlign +#' @param offsetX +#' @param offsetY +#' @param style +#' @param ... Additional parameters. +#' +#' @return A \code{apexcharts} \code{htmlwidget} object. +#' @export +#' +#' @examples +ax_noData <- function(ax, + text = NULL, + align = NULL, + verticalAlign = NULL, + offsetX = NULL, + offsetY = NULL, + style = NULL, + ...) { + params <- c(as.list(environment()), list(...))[-1] + .ax_opt2(ax, "noData", l = dropNulls(params)) +} + + +#' Responsive options +#' +#' @param ax A \code{apexcharts} \code{htmlwidget} object. +#' @param ... +#' +#' @return A \code{apexcharts} \code{htmlwidget} object. +#' @export +#' +#' @examples +ax_responsive <- function(ax, ...) { + .ax_opt(ax, "responsive", ...) +} + + +#' Add data to a chart +#' +#' @param ax A \code{apexcharts} \code{htmlwidget} object. +#' @param ... Additional parameters. +#' +#' @return A \code{apexcharts} \code{htmlwidget} object. +#' @export +#' +#' @examples +ax_series <- function(ax, ...) { + .ax_opt(ax, "series", ...) +} + + +#' Charts' states +#' +#' @param ax A \code{apexcharts} \code{htmlwidget} object. +#' @param normal +#' @param hover +#' @param active +#' @param ... Additional parameters. +#' +#' @return A \code{apexcharts} \code{htmlwidget} object. +#' @export +#' +#' @examples +ax_states <- function(ax, + normal = NULL, + hover = NULL, + active = NULL, + ...) { + params <- c(as.list(environment()), list(...))[-1] + .ax_opt2(ax, "states", l = dropNulls(params)) +} + + +#' Chart's title +#' +#' @param ax A \code{apexcharts} \code{htmlwidget} object. +#' @param text +#' @param align +#' @param margin +#' @param offsetX +#' @param offsetY +#' @param floating +#' @param style +#' @param ... Additional parameters. +#' +#' @return A \code{apexcharts} \code{htmlwidget} object. +#' @export +#' +#' @examples +ax_title <- function(ax, + text = NULL, + align = NULL, + margin = NULL, + offsetX = NULL, + offsetY = NULL, + floating = NULL, + style = NULL, + ...) { + params <- c(as.list(environment()), list(...))[-1] + .ax_opt2(ax, "title", l = dropNulls(params)) +} + + +#' Chart's subtitle +#' +#' @param ax A \code{apexcharts} \code{htmlwidget} object. +#' @param text Text to display as a subtitle of chart. +#' @param align Alignment of subtitle relative to chart area. Possible Options: \code{"left"}, \code{"center"} and \code{"right"}. +#' @param margin Numeric. Vertical spacing around the subtitle text. +#' @param offsetX Numeric. Sets the left offset for subtitle text. +#' @param offsetY Numeric. Sets the top offset for subtitle text +#' @param floating Logical. The floating option will take out the subtitle text from the chart area and make it float on top of the chart. +#' @param style List. +#' @param ... Additional parameters. +#' +#' @return A \code{apexcharts} \code{htmlwidget} object. +#' @export +#' +#' @examples +ax_subtitle <- function(ax, + text = NULL, + align = NULL, + margin = NULL, + offsetX = NULL, + offsetY = NULL, + floating = NULL, + style = NULL, + ...) { + params <- c(as.list(environment()), list(...))[-1] + .ax_opt2(ax, "subtitle", l = dropNulls(params)) +} + + +#' Stroke properties +#' +#' @param ax A \code{apexcharts} \code{htmlwidget} object. +#' @param show Logical. To show or hide path-stroke / line +#' @param curve In line / area charts, whether to draw smooth lines or straight lines. +#' Available Options: \code{"smooth"} (connects the points in a curve fashion. Also known as spline) +#' and \code{"straight"} (connect the points in straight lines.). +#' @param lineCap For setting the starting and ending points of stroke. Available Options: +#' \code{"butt"} (ends the stroke with a 90-degree angle), \code{"square"} +#' (similar to butt except that it extends the stroke beyond the length of the path) +#' and \code{"round"} (ends the path-stroke with a radius that smooths out the start and end points) +#' @param width Sets the width of border for svg path. +#' @param colors Colors to fill the border for paths. +#' @param dashArray Creates dashes in borders of svg path. Higher number creates more space between dashes in the border. +#' @param ... Additional parameters. +#' +#' @return A \code{apexcharts} \code{htmlwidget} object. +#' @export +#' +#' @examples +ax_stroke <- function(ax, + show = NULL, + curve = NULL, + lineCap = NULL, + width = NULL, + colors = NULL, + dashArray = NULL, + ...) { + params <- c(as.list(environment()), list(...))[-1] + .ax_opt2(ax, "stroke", l = dropNulls(params)) +} + + +#' Tooltip options +#' +#' @param ax A \code{apexcharts} \code{htmlwidget} object. +#' @param enabled Logical. Show tooltip when user hovers over chart area. +#' @param shared Logical. When having multiple series, show a shared tooltip. +#' @param followCursor Logical. Follow user’s cursor position instead of putting tooltip on actual data points. +#' @param intersect Logical. Show tooltip only when user hovers exactly over datapoint. +#' @param inverseOrder Logical. In multiple series, when having shared tooltip, inverse the order of series (for better comparison in stacked charts). +#' @param custom JS function. Draw a custom html tooltip instead of the default one based on the values provided in the function arguments. +#' @param fillSeriesColor Logical. When enabled, fill the tooltip background with the corresponding series color. +#' @param onDatasetHover List. +#' @param theme List. +#' @param x List. +#' @param y List. +#' @param z List. +#' @param marker List. +#' @param items List. +#' @param fixed List. +#' @param ... Additional parameters. +#' +#' @return A \code{apexcharts} \code{htmlwidget} object. +#' @export +#' +#' @examples +ax_tooltip <- function(ax, + enabled = NULL, + shared = NULL, + followCursor = NULL, + intersect = NULL, + inverseOrder = NULL, + custom = NULL, + fillSeriesColor = NULL, + onDatasetHover = NULL, + theme = NULL, + x = NULL, + y = NULL, + z = NULL, + marker = NULL, + items = NULL, + fixed = NULL, + ...) { + params <- c(as.list(environment()), list(...))[-1] + .ax_opt2(ax, "tooltip", l = dropNulls(params)) +} + + +#' X-axis options +#' +#' @param ax A \code{apexcharts} \code{htmlwidget} object. +#' @param type Character. Available Options : \code{"categories"} and \code{"datetime"}. +#' @param categories Categories are labels which are displayed on the x-axis. +#' @param labels List. +#' @param axisBorder List. +#' @param axisTicks List. +#' @param tickAmount Number of Tick Intervals to show. +#' @param min Lowest number to be set for the x-axis. The graph drawing beyond this number will be clipped off. +#' @param max Highest number to be set for the x-axis. The graph drawing beyond this number will be clipped off. +#' @param range Range takes the max value of x-axis, subtracts the provided range value and gets the min value based on that. +#' So, technically it helps to keep the same range when min and max values gets updated dynamically. +#' @param floating Logical. Floating takes x-axis is taken out of normal flow and places x-axis on svg element directly, +#' similar to an absolutely positioned element. Set the offsetX and offsetY then to adjust the position manually +#' @param position Setting this option allows you to change the x-axis position. Available options: \code{"top"} and \code{"bottom"}. +#' @param title List. +#' @param crosshairs List. +#' @param tooltip List. +#' @param ... Additional parameters. +#' +#' @return A \code{apexcharts} \code{htmlwidget} object. +#' @export +#' +#' @examples +ax_xaxis <- function(ax, + type = NULL, + categories = NULL, + labels = NULL, + axisBorder = NULL, + axisTicks = NULL, + tickAmount = NULL, + min = NULL, + max = NULL, + range = NULL, + floating = NULL, + position = NULL, + title = NULL, + crosshairs = NULL, + tooltip = NULL, + ...) { + params <- c(as.list(environment()), list(...))[-1] + .ax_opt2(ax, "xaxis", l = dropNulls(params)) +} + + +#' Y-axis options +#' +#' @param ax A \code{apexcharts} \code{htmlwidget} object. +#' @param opposite Logical. When enabled, will draw the yaxis on the right side of the chart. +#' @param tickAmount Number of Tick Intervals to show. +#' @param max Lowest number to be set for the y-axis. The graph drawing beyond this number will be clipped off. +#' @param min Highest number to be set for the y-axis. The graph drawing beyond this number will be clipped off. +#' @param floating Logical. Floating takes y-axis is taken out of normal flow and places y-axis on svg element directly, +#' similar to an absolutely positioned element. Set the offsetX and offsetY then to adjust the position manually +#' @param labels List. +#' @param axisBorder List. +#' @param axisTicks List. +#' @param title List. +#' @param tooltip List. +#' @param crosshairs List. +#' @param ... Additional parameters. +#' +#' @return A \code{apexcharts} \code{htmlwidget} object. +#' @export +#' +#' @examples +ax_yaxis <- function(ax, + opposite = NULL, + tickAmount = NULL, + max = NULL, + min = NULL, + floating = NULL, + labels = NULL, + axisBorder = NULL, + axisTicks = NULL, + title = NULL, + tooltip = NULL, + crosshairs = NULL, + ...) { + params <- c(as.list(environment()), list(...))[-1] + .ax_opt2(ax, "yaxis", l = dropNulls(params)) +} + + +#' Theme for charts +#' +#' @param ax A \code{apexcharts} \code{htmlwidget} object. +#' @param palette Character. Available palettes: \code{"palette1"} to \code{"palette10"}. +#' @param monochrome List. +#' @param ... Additional parameters. +#' +#' @return A \code{apexcharts} \code{htmlwidget} object. +#' @export +#' +#' @examples +ax_theme <- function(ax, + palette = NULL, + monochrome = NULL, + ...) { + params <- c(as.list(environment()), list(...))[-1] + .ax_opt2(ax, "theme", l = dropNulls(params)) +} diff --git a/R/utils.R b/R/utils.R new file mode 100644 index 0000000..802d55b --- /dev/null +++ b/R/utils.R @@ -0,0 +1,61 @@ + + +# dropNulls +dropNulls <- function(x) { + x[!vapply(x, is.null, FUN.VALUE = logical(1))] +} + + +`%||%` <- function(x, y) { + if (!is.null(x)) x else y +} + + + +#' Utility function to create ApexChart parameters JSON +#' +#' @param ax A \code{apexchart} \code{htmlwidget} object. +#' @param name Slot's name to edit +#' @param ... Arguments for the slot +#' +#' @return A \code{apexchart} \code{htmlwidget} object. +#' +#' @importFrom utils modifyList +#' +#' @noRd +.ax_opt <- function(ax, name, ...) { + + if(!any(class(ax) %in% c("apexcharter", "apexcharter_Proxy"))){ + stop("ax must be a apexcharter or a apexcharterProxy object") + } + + if (is.null(ax$x$ax_opts[[name]])) { + ax$x$ax_opts[[name]] <- list(...) + } else { + ax$x$ax_opts[[name]] <- utils::modifyList(x = ax$x$ax_opts[[name]], val = list(...), keep.null = TRUE) + } + + return(ax) +} + +#' Utility function to create ApexChart parameters JSON +#' +#' @param ax A \code{apexchart} \code{htmlwidget} object. +#' @param name Slot's name to edit +#' @param l List of arguments for the slot +#' +#' @return A \code{apexchart} \code{htmlwidget} object. +#' +#' @noRd +.ax_opt2 <- function(ax, name, l) { + + if (is.null(ax$x$ax_opts[[name]])) { + ax$x$ax_opts[[name]] <- l + } else { + ax$x$ax_opts[[name]] <- utils::modifyList(x = ax$x$ax_opts[[name]], val = l, keep.null = TRUE) + } + + return(ax) +} + + diff --git a/dev/generate-funs.R b/dev/generate-funs.R new file mode 100644 index 0000000..962c7cc --- /dev/null +++ b/dev/generate-funs.R @@ -0,0 +1,59 @@ + + + +# Parsing options --------------------------------------------------------- + +cx <- V8::v8() +cx$source(file = "inst/htmlwidgets/lib/apexcharts-1.0.4/Options.js") +ApexOpts <- cx$get("Options") + +names(ApexOpts) +str(ApexOpts$chart, max.level = 1) +str(ApexOpts$chart$animations, max.level = 1) + + + +# Utils ------------------------------------------------------------------- + +make_fun <- function(opts, name, file = "") { + args <- names(opts[[name]]) + if (is.null(args)) { + args <- "..." + } else { + args <- sprintf("%s = NULL", args) + args <- paste(args, collapse = ",\n") + args <- paste0(args, ", ...") + } + body <- paste( + "\nparams <- c(as.list(environment()), list(...))[-1]", + paste0(".ax_opt2(ax, \"", name, "\", l = dropNulls(params))\n"), + sep = "\n" + ) + res <- paste0("ax_", name, " <- function(ax, ", args, ") {", body, "}\n\n\n") + cat(res, file = file, append = TRUE) + return(invisible(res)) +} + + +# chart ------------------------------------------------------------------- + +make_fun(ApexOpts, "chart") + + + +# plotOptions ------------------------------------------------------------- + +make_fun(ApexOpts, "plotOptions") + + + + +# ALL --------------------------------------------------------------------- + +lapply( + X = names(ApexOpts), + FUN = make_fun, opts = ApexOpts, file = "R/apex-utils.R" +) + + + diff --git a/inst/htmlwidgets/apexcharter.yaml b/inst/htmlwidgets/apexcharter.yaml index 572ebbe..3eae4e0 100644 --- a/inst/htmlwidgets/apexcharter.yaml +++ b/inst/htmlwidgets/apexcharter.yaml @@ -1,5 +1,5 @@ dependencies: - name: apexcharts - version: 1.0.4 - src: htmlwidgets/lib/apexcharts-1.0.4 + version: 1.1.0 + src: htmlwidgets/lib/apexcharts-1.1.0 script: apexcharts.min.js diff --git a/inst/htmlwidgets/lib/apexcharts-1.0.4/Options.js b/inst/htmlwidgets/lib/apexcharts-1.0.4/Options.js new file mode 100644 index 0000000..2d7d355 --- /dev/null +++ b/inst/htmlwidgets/lib/apexcharts-1.0.4/Options.js @@ -0,0 +1,759 @@ + +/** + * ApexCharts Options for setting the initial configuration of ApexCharts. + **/ + +var xAxisAnnotation = { + x: 0, + strokeDashArray: 4, + borderColor: '#c2c2c2', + offsetX: 0, + offsetY: 0, + label: { + borderColor: '#c2c2c2', + borderWidth: 1, + text: "undefined", + textAnchor: 'middle', + orientation: 'vertical', + position: 'top', + offsetX: 0, + offsetY: 0, + style: { + background: '#fff', + color: '#777', + fontSize: '12px', + cssClass: 'apexcharts-xaxis-annotation-label', + padding: { + left: 5, + right: 5, + top: 2, + bottom: 2 + } + } + } +} + +var pointAnnotation = { + x: 0, + y: null, + yAxisIndex: 0, + seriesIndex: 0, + marker: { + size: 0, + fillColor: '#fff', + strokeWidth: 2, + strokeColor: '#333', + shape: 'circle', + radius: 2 + }, + label: { + borderColor: '#c2c2c2', + borderWidth: 1, + text: "undefined", + textAnchor: 'middle', + offsetX: 0, + offsetY: -15, + style: { + background: '#fff', + color: '#777', + fontSize: '12px', + cssClass: 'apexcharts-point-annotation-label', + padding: { + left: 5, + right: 5, + top: 0, + bottom: 2 + } + } + } +} + +var yAxisAnnotation = { + y: 0, + strokeDashArray: 4, + borderColor: '#c2c2c2', + offsetX: 0, + offsetY: 0, + yAxisIndex: 0, + label: { + borderColor: '#c2c2c2', + borderWidth: 1, + text: "undefined", + textAnchor: 'end', + position: 'right', + offsetX: 0, + offsetY: -3, + style: { + background: '#fff', + color: '#777', + fontSize: '12px', + cssClass: 'apexcharts-yaxis-annotation-label', + padding: { + left: 5, + right: 5, + top: 0, + bottom: 2 + } + } + } +} + +var yAxis = { + opposite: false, + tickAmount: 6, + max: "undefined", + min: "undefined", + floating: false, + labels: { + show: true, + maxWidth: 160, + offsetX: 0, + offsetY: 0, + style: { + colors: [], + fontSize: '12px', + cssClass: 'apexcharts-yaxis-label' + }, + formatter: function (val) { + if (typeof val === 'number') { + return val ? val.toFixed(0) : val + } + return val + } + }, + axisBorder: { + show: false, + color: '#78909C', + offsetX: 0, + offsetY: 0 + }, + axisTicks: { + show: false, + color: '#78909C', + width: 6, + offsetX: 0, + offsetY: 0 + }, + title: { + text: "undefined", + rotate: -90, + offsetY: 0, + offsetX: 0, + style: { + color: "undefined", + fontSize: '12px', + cssClass: 'apexcharts-yaxis-title' + } + }, + tooltip: { + enabled: false, + offsetX: 0 + }, + crosshairs: { + show: true, + position: 'front', + stroke: { + color: '#b6b6b6', + width: 1, + dashArray: 0 + } + } +} + +var Options = { + //init () { + // return { + annotations: { + position: 'front', + yaxis: [yAxisAnnotation], + xaxis: [xAxisAnnotation], + points: [pointAnnotation] + }, + chart: { + animations: { + enabled: true, + easing: 'easeinout', // linear, easeout, easein, easeinout + speed: 800, + animateGradually: { + delay: 150, + enabled: true + }, + dynamicAnimation: { + enabled: true, + speed: 350 + } + }, + background: 'transparent', + foreColor: '#373d3f', + dropShadow: { + enabled: false, + enabledSeries: "undefined", + top: 2, + left: 2, + blur: 4, + opacity: 0.35 + }, + events: { + beforeMount: "undefined", + mounted: "undefined", + updated: "undefined", + clicked: "undefined", + selection: "undefined", + dataPointSelection: "undefined", + zoomed: "undefined", + scrolled: "undefined" + }, + height: 'auto', + offsetX: 0, + offsetY: 0, + scroller: { + enabled: false, + height: 30, + track: { + height: 2, + background: '#e0e0e0' + }, + thumb: { + height: 2, + background: '#008FFB' + }, + scrollButtons: { + enabled: true, + size: 6, + borderWidth: 2, + borderColor: '#c3c3c3', + fillColor: '#fff' + }, + padding: { + left: 10, + right: 10 + }, + offsetX: 0, + offsetY: 0 + }, + selection: { + enabled: true, + type: 'x', + selectedPoints: "undefined", + fill: { + color: '#24292e', + opacity: 0.1 + }, + stroke: { + width: 1, + color: '#24292e', + opacity: 0.4, + dashArray: 3 + }, + xaxis: { + min: "undefined", + max: "undefined" + }, + yaxis: { + min: "undefined", + max: "undefined" + } + }, + sparkline: { + enabled: false + }, + stacked: false, + stackType: 'normal', + toolbar: { + show: true, + tools: { + download: true, + selection: true, + zoom: true, + zoomin: true, + zoomout: true, + pan: true, + reset: true + } + }, + type: 'line', + width: '100%', + zoom: { + enabled: true, + type: 'x', + zoomedArea: { + fill: { + color: '#90CAF9', + opacity: 0.4 + }, + stroke: { + color: '#0D47A1', + opacity: 0.4, + width: 1 + } + } + } + }, + plotOptions: { + bar: { + horizontal: false, + endingShape: 'flat', + columnWidth: '70%', // should be in percent 0 - 100 + barHeight: '70%', // should be in percent 0 - 100 + distributed: false, + colors: { + ranges: [], + backgroundBarColors: [], + backgroundBarOpacity: 1 + }, + dataLabels: { + position: 'top' // top, center, bottom + } + // stackedLabels: true + }, + heatmap: { + radius: 2, + enableShades: true, + shadeIntensity: 0.5, + colorScale: { + ranges: [] + } + }, + radialBar: { + size: "undefined", + inverseOrder: false, + startAngle: 0, + endAngle: 360, + offsetX: 0, + offsetY: 0, + hollow: { + margin: 5, + size: '50%', + background: 'transparent', + image: "undefined", + imageWidth: 150, + imageHeight: 150, + imageOffsetX: 0, + imageOffsetY: 0, + imageClipped: true, + position: 'front', + dropShadow: { + enabled: false, + top: 0, + left: 0, + blur: 3, + opacity: 0.5 + } + }, + track: { + show: true, + startAngle: "undefined", + endAngle: "undefined", + background: '#f2f2f2', + strokeWidth: '97%', + opacity: 1, + margin: 5, // margin is in pixels + dropShadow: { + enabled: false, + top: 0, + left: 0, + blur: 3, + opacity: 0.5 + } + }, + dataLabels: { + showOn: 'always', // hover/always + name: { + show: true, + fontSize: '22px', + color: "undefined", + offsetY: -10 + }, + value: { + show: true, + fontSize: '16px', + color: "undefined", + offsetY: 16, + formatter: function (val) { + return val + '%' + } + } + } + }, + pie: { + size: "undefined", + donut: { + size: '65%', + background: 'transparent' + // TODO: draw labels in donut area + // labels: { + // showOn: 'hover', + // name: { + // show: false, + // fontSize: '22px', + // color: "undefined", + // offsetY: -10 + // }, + // value: { + // show: true, + // offsetY: 16, + // fontSize: '16px', + // color: "undefined", + // formatter: function (val) { + // return val + '%' + // } + // } + // } + }, + customScale: 0, + offsetX: 0, + offsetY: 0, + dataLabels: { + offset: 0 // offset by which labels will move outside + } + } + }, + colors: "undefined", + dataLabels: { + enabled: true, + formatter: function (val) { + return val + }, + textAnchor: 'middle', + offsetX: 0, + offsetY: 0, + style: { + fontSize: '14px', + colors: "undefined" + }, + dropShadow: { + enabled: false, + top: 1, + left: 1, + blur: 1, + opacity: 0.45 + } + }, + fill: { + type: 'solid', + colors: "undefined", // array of colors, + opacity: 0.9, + gradient: { + shade: 'dark', + type: 'horizontal', + shadeIntensity: 0.5, + gradientToColors: "undefined", + inverseColors: true, + opacityFrom: 1, + opacityTo: 1, + stops: [0, 50, 100] + }, + image: { + src: [], + width: "undefined", // optional + height: "undefined" // optional + }, + pattern: { + style: 'sqaures', // string or array of strings + width: 6, + height: 6, + strokeWidth: 2 + } + }, + grid: { + show: true, + borderColor: '#e0e0e0', + strokeDashArray: 0, + position: 'back', + xaxis: { + lines: { + show: false, + animate: false + } + }, + yaxis: { + lines: { + show: true, + animate: true + } + }, + row: { + colors: "undefined", // takes as array which will be repeated on rows + opacity: 0.5 + }, + column: { + colors: "undefined", // takes an array which will be repeated on columns + opacity: 0.5 + }, + padding: { + top: 0, + right: 10, + bottom: 0, + left: 10 + } + }, + labels: [], + legend: { + show: true, + floating: false, + position: 'bottom', // whether to position legends in 1 of 4 + // direction - top, bottom, left, right + horizontalAlign: 'center', // when position top/bottom, you can + // specify whether to align legends + // left, right or center + verticalAlign: 'middle', + fontSize: '14px', + textAnchor: 'start', + offsetY: 0, + offsetX: 0, + formatter: "undefined", + labels: { + color: "undefined", + useSeriesColors: false + }, + markers: { + size: 6, + strokeWidth: 0, + strokeColor: '#fff', + offsetX: 0, + offsetY: 0, + shape: 'circle', + radius: 2 + }, + itemMargin: { + horizontal: 20, + vertical: 5 + }, + containerMargin: { + left: 5, + top: 4, + right: 0, + bottom: 0 + }, + onItemClick: { + toggleDataSeries: true + }, + onItemHover: { + highlightDataSeries: true + } + }, + markers: { + discrete: [], + size: 0, + colors: "undefined", + strokeColor: '#fff', + strokeWidth: 2, + strokeOpacity: 0.9, + fillOpacity: 1, + shape: 'circle', + radius: 2, + offsetX: 0, + offsetY: 0, + hover: { + size: 6 + } + }, + noData: { + text: "undefined", + align: 'center', + verticalAlign: 'middle', + offsetX: 0, + offsetY: 0, + style: { + color: '#888', + fontSize: '16px' + } + }, + responsive: [], // breakpoints should follow ascending order 400, then 700, then 1000 + series: "undefined", + states: { + normal: { + filter: { + type: 'none', + value: 0 + } + }, + hover: { + filter: { + type: 'lighten', + value: 0.15 + } + }, + active: { + allowMultipleDataPointsSelection: false, + filter: { + type: 'darken', + value: 0.35 + } + } + }, + title: { + text: "undefined", + align: 'left', + margin: 10, + offsetX: 0, + offsetY: 0, + floating: false, + style: { + fontSize: '16px', + color: '#263238' + } + }, + subtitle: { + text: "undefined", + align: 'left', + margin: 10, + offsetX: 0, + offsetY: 0, + floating: false, + style: { + fontSize: '14px', + color: '#9699a2' + } + }, + stroke: { + show: true, + curve: 'smooth', // "smooth" or "straight" + lineCap: 'butt', // round, butt , square + width: 2, + colors: "undefined", // array of colors + dashArray: 0 // single value or array of values + }, + tooltip: { + enabled: true, + shared: true, + followCursor: false, // when disabled, the tooltip will show on top of the series instead of mouse position + intersect: false, // when enabled, tooltip will only show when user directly hovers over point + inverseOrder: false, + custom: "undefined", + fillSeriesColor: false, + onDatasetHover: { + highlightDataSeries: false + }, + theme: 'light', + x: { // x value + show: true, + format: 'dd MMM', // dd/MM, dd MMM yy, dd MMM yyyy + formatter: "undefined" // a custom user supplied formatter function + }, + y: { + formatter: "undefined", + title: { + formatter: function (seriesName) { + return seriesName + } + } + }, + z: { + formatter: "undefined", + title: 'Size: ' + }, + marker: { + show: true + }, + items: { + display: 'flex' + }, + fixed: { + enabled: false, + position: 'topRight', // topRight, topLeft, bottomRight, bottomLeft + offsetX: -100, + offsetY: 0 + } + }, + xaxis: { + type: 'category', + categories: [], + labels: { + show: true, + rotate: -45, + rotateAlways: false, + trim: true, + maxHeight: 120, + style: { + colors: [], + fontSize: '12px', + cssClass: 'apexcharts-xaxis-label' + }, + offsetX: 0, + offsetY: 0, + format: "undefined", + formatter: "undefined", // custom formatter function which will override format + datetimeFormatter: { + year: 'yyyy', + month: 'MMM \'yy', + day: 'dd MMM', + hour: 'HH:mm' + } + }, + axisBorder: { + show: true, + color: '#78909C', + offsetX: 0, + offsetY: 0 + }, + axisTicks: { + show: true, + color: '#78909C', + height: 6, + offsetX: 0, + offsetY: 0 + }, + tickAmount: "undefined", + min: "undefined", + max: "undefined", + range: "undefined", + floating: false, + position: 'bottom', + title: { + text: "undefined", + offsetX: 0, + offsetY: 0, + style: { + color: "undefined", + fontSize: '12px', + cssClass: 'apexcharts-xaxis-title' + } + }, + crosshairs: { + show: true, + width: 1, // tickWidth/barWidth or an integer + position: 'back', + opacity: 0.9, + stroke: { + color: '#b6b6b6', + width: 0, + dashArray: 0 + }, + fill: { + type: 'solid', // solid, gradient + color: '#B1B9C4', + gradient: { + colorFrom: '#D8E3F0', + colorTo: '#BED1E6', + stops: [0, 100], + opacityFrom: 0.4, + opacityTo: 0.5 + } + }, + dropShadow: { + enabled: false, + left: 0, + top: 0, + blur: 1, + opacity: 0.4 + } + }, + tooltip: { + enabled: true, + offsetY: 0 + } + }, + yaxis: yAxis, + theme: { + palette: 'palette1', // If defined, it will overwrite config.colors variable + monochrome: { // monochrome allows you to select just 1 color and fill out the rest with light/dark shade (intensity can be selected) + enabled: false, + color: '#008FFB', + shadeTo: 'light', + shadeIntensity: 0.65 + } + } + // } + //} +} diff --git a/inst/htmlwidgets/lib/apexcharts-1.1.0/apexcharts.min.js b/inst/htmlwidgets/lib/apexcharts-1.1.0/apexcharts.min.js new file mode 100644 index 0000000..baf0ff6 --- /dev/null +++ b/inst/htmlwidgets/lib/apexcharts-1.1.0/apexcharts.min.js @@ -0,0 +1,2 @@ +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("ApexCharts",[],e):"object"==typeof exports?exports.ApexCharts=e():t.ApexCharts=e()}(this,function(){return function(t){function e(a){if(i[a])return i[a].exports;var s=i[a]={i:a,l:!1,exports:{}};return t[a].call(s.exports,s,s.exports,e),s.l=!0,s.exports}var i={};return e.m=t,e.c=i,e.i=function(t){return t},e.d=function(t,i,a){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:a})},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=138)}([function(t,e,i){"use strict";function a(t){return t&&t.__esModule?t:{default:t}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var i=0;i4&&void 0!==arguments[4]?arguments[4]:"#a8a8a8",r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,n=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;return this.w.globals.dom.Paper.line().attr({x1:t,y1:e,x2:i,y2:a,stroke:s,"stroke-dasharray":r,"stroke-width":n})}},{key:"drawRect",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"#fefefe",n=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1,o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null,h=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0,c=this.w,u=c.globals.dom.Paper.rect();return u.attr({x:t,y:e,width:i>0?i:0,height:a>0?a:0,rx:s,ry:s,fill:r,opacity:n,"stroke-width":null!==o?o:0,stroke:null!==l?l:"none","stroke-dasharray":h}),u}},{key:"drawCircle",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.w,a=i.globals.dom.Paper.circle(2*t);return null!==e&&a.attr(e),a}},{key:"drawPath",value:function(t){var e=t.d,i=void 0===e?"":e,a=t.stroke,s=void 0===a?"#a8a8a8":a,r=t.strokeWidth,n=t.fill,o=t.fillOpacity,l=void 0===o?1:o,h=t.strokeOpacity,c=void 0===h?1:h,u=t.classes,d=t.strokeLinecap,f=void 0===d?null:d,p=t.strokeDashArray,g=void 0===p?0:p,x=this.w;return null===f&&(f=x.config.stroke.lineCap),(i.indexOf("undefined")>-1||i.indexOf("NaN")>-1)&&(i="M 0 "+x.globals.gridHeight),x.globals.dom.Paper.path(i).attr({fill:n,"fill-opacity":l,stroke:s,"stroke-opacity":c,"stroke-linecap":f,"stroke-width":r,"stroke-dasharray":g,class:u})}},{key:"group",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.w,i=e.globals.dom.Paper.group();return null!==t&&i.attr(t),i}},{key:"move",value:function(t,e){return["M",t,e].join(" ")}},{key:"line",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=null;return a=null===i?["L",t,e].join(" "):[i,t].join(" "),a}},{key:"curve",value:function(t,e,i,a,s,r){return["C",t,e,i,a,s,r].join(" ")}},{key:"quadraticCurve",value:function(t,e,i,a){return["Q",t,e,i,a].join(" ")}},{key:"arc",value:function(t,e,i,a,s,r,n){var o=arguments.length>7&&void 0!==arguments[7]&&arguments[7],l="A";return o&&(l="a"),[l,t,e,i,a,s,r,n].join(" ")}},{key:"renderPaths",value:function(t){var e=t.i,i=t.realIndex,a=t.pathFrom,s=t.pathTo,r=t.stroke,n=t.strokeWidth,o=t.fill,l=t.animationDelay,c=t.initialSpeed,d=t.dataChangeSpeed,f=(t.hideStrokesInChange,t.className),p=t.id,g=this.w,x=new h.default(this.ctx),v=new u.default(this.ctx),b=this.w.config.chart.animations.enabled,m=b&&this.w.config.chart.animations.dynamicAnimation.enabled,y=void 0;y=!(b&&!g.globals.resized||m&&g.globals.dataChanged)?s:a;var w=g.config.stroke.dashArray,k=0;k=Array.isArray(w)?w[i]:g.config.stroke.dashArray;var S=this.drawPath({d:y,stroke:r,strokeWidth:n,fill:o,fillOpacity:1,classes:f,strokeLinecap:"butt",strokeDashArray:k});if(S.attr("id",p+"-"+e),S.attr("index",i),"none"!==g.config.states.normal.filter.type)x.getDefaultFilter(S,g.config.states.normal.filter.type,g.config.states.normal.filter.value);else if(g.config.chart.dropShadow.enabled&&(!g.config.chart.dropShadow.enabledSeries||g.config.chart.dropShadow.enabledSeries&&-1!==g.config.chart.dropShadow.enabledSeries.indexOf(i))){var A=g.config.chart.dropShadow;x.dropShadow(S,A)}return S.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,S)),S.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,S)),S.node.addEventListener("mousedown",this.pathMouseDown.bind(this,S)),S.node.addEventListener("touchstart",this.pathMouseDown.bind(this,S)),S.attr({pathTo:s,pathFrom:a}),!b||g.globals.resized||g.globals.dataChanged||v.animatePathsGradually({el:S,pathFrom:a,pathTo:s,speed:c,delay:l,strokeWidth:n}),m&&g.globals.dataChanged&&v.animatePathsGradually({el:S,pathFrom:a,pathTo:s,speed:d,strokeWidth:n}),S}},{key:"drawPattern",value:function(t,e,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#a8a8a8",s=arguments[4];arguments[5];return this.w.globals.dom.Paper.pattern(e,i,function(r){"horizontalLines"===t?r.line(0,0,i,0).stroke({color:a,width:s+1}):"verticalLines"===t?r.line(0,0,0,e).stroke({color:a,width:s+1}):"slantedLines"===t?r.line(0,0,e,i).stroke({color:a,width:s}):"squares"===t?r.rect(e,i).fill("none").stroke({color:a,width:s}):"circles"===t&&r.circle(e).fill("none").stroke({color:a,width:s})})}},{key:"drawGradient",value:function(t,e,i,a,s){var r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,n=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,l=this.w;e=o.default.hexToRgba(e,a),i=o.default.hexToRgba(i,s);var h=0,c=1,u=1,d=1;null!==n&&(h=void 0!==n[0]?n[0]/100:0,c=void 0!==n[1]?n[1]/100:1,u=void 0!==n[2]?n[2]/100:1,d=void 0!==n[3]?n[3]/100:1);var f=!("donut"!==l.config.chart.type&&"pie"!==l.config.chart.type&&"bubble"!==l.config.chart.type),p=l.globals.dom.Paper.gradient(f?"radial":"linear",function(t){t.at(h,e,a),t.at(c,i,s),t.at(u,i,s),t.at(d,e,s)});if(f){var g=l.globals.gridWidth/2,x=l.globals.gridHeight/2;"bubble"!==l.config.chart.type?p.attr({gradientUnits:"userSpaceOnUse",cx:g,cy:x,r:r}):p.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}else"vertical"===t?p.from(0,0).to(0,1):"diagonal"===t?p.from(0,0).to(1,1):"horizontal"===t?p.from(0,1).to(1,1):"diagonal2"===t&&p.from(0,1).to(2,2);return p}},{key:"drawText",value:function(t){var e=this.w,i=t.x,a=t.y,s=t.text,r=t.textAnchor,n=t.fontSize,o=t.foreColor,l=t.opacity;r||(r="start"),void 0!==o&&void 0!==o||(o=e.config.chart.foreColor);var h=e.globals.dom.Paper.plain(s).attr({x:i,y:a,"text-anchor":r,"dominate-baseline":"central",class:t.cssClass});return h.node.style.fontSize=n,h.node.style.fill=o,h.node.style.opacity=l,h}},{key:"drawMarker",value:function(t,e,i){t=t||0;var a=i.pSize||0,s=null;if("square"===i.shape){var r=void 0===i.pRadius?a/2:i.pRadius;null===e&&(a=0,r=0);var n=1.2*a+r,o=this.drawRect(n,n,n,n,r);o.attr({x:t-n/2,y:e-n/2,cx:t,cy:e,class:i.class?i.class:"",fill:i.pointFillColor,"fill-opacity":i.pointFillOpacity?i.pointFillOpacity:1,stroke:i.pointStrokeColor,"stroke-width":i.pWidth?i.pWidth:1,"stroke-opacity":i.pointStrokeOpacity?i.pointStrokeOpacity:1}),s=o}else"circle"===i.shape&&(e||(a=0,e=0),s=this.drawCircle(a,{cx:t,cy:e,class:i.class?i.class:"",stroke:i.pointStrokeColor,fill:i.pointFillColor,"fill-opacity":i.pointFillOpacity?i.pointFillOpacity:1,"stroke-width":i.pWidth?i.pWidth:0,"stroke-opacity":i.pointStrokeOpacity?i.pointStrokeOpacity:1}));return s}},{key:"pathMouseEnter",value:function(t){var e=this.w,i=new h.default(this.ctx);if(("none"===e.config.states.active.filter.type||"true"!==t.node.getAttribute("selected"))&&"none"!==e.config.states.hover.filter.type){var a=e.config.states.hover.filter;i.applyFilter(t,a.type,a.value)}}},{key:"pathMouseLeave",value:function(t){var e=this.w,i=new h.default(this.ctx);"none"!==e.config.states.active.filter.type&&"true"===t.node.getAttribute("selected")||"none"!==e.config.states.hover.filter.type&&i.getDefaultFilter(t)}},{key:"pathMouseDown",value:function(t,e){var i=this.w,a=new h.default(this.ctx),s=parseInt(t.node.getAttribute("index")),r=parseInt(t.node.getAttribute("j")),n="false";if("true"===t.node.getAttribute("selected")){if(t.node.setAttribute("selected","false"),i.globals.selectedDataPoints[s].includes(r)){var o=i.globals.selectedDataPoints[s].indexOf(r);i.globals.selectedDataPoints[s].splice(o,1)}}else{if(!i.config.states.active.allowMultipleDataPointsSelection&&i.globals.selectedDataPoints.length>0){i.globals.selectedDataPoints=[];var l=i.globals.dom.Paper.select(".apexcharts-series path").members,c=i.globals.dom.Paper.select(".apexcharts-series circle").members,u=!0,d=!1,f=void 0;try{for(var p,g=l[Symbol.iterator]();!(u=(p=g.next()).done);u=!0){var x=p.value;x.node.setAttribute("selected","false"),a.getDefaultFilter(x)}}catch(t){d=!0,f=t}finally{try{!u&&g.return&&g.return()}finally{if(d)throw f}}var v=!0,b=!1,m=void 0;try{for(var y,w=c[Symbol.iterator]();!(v=(y=w.next()).done);v=!0){var k=y.value;k.node.setAttribute("selected","false"),a.getDefaultFilter(k)}}catch(t){b=!0,m=t}finally{try{!v&&w.return&&w.return()}finally{if(b)throw m}}}t.node.setAttribute("selected","true"),n="true",void 0===i.globals.selectedDataPoints[s]&&(i.globals.selectedDataPoints[s]=[]),i.globals.selectedDataPoints[s].push(r)}if("true"===n){var S=i.config.states.active.filter;"none"!==S&&(a.applyFilter(t,S.type,S.value),"function"==typeof i.config.chart.events.dataPointSelection&&i.config.chart.events.dataPointSelection(e,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:s,dataPointIndex:r,config:i.config,globals:i.globals}),this.ctx.fireEvent("dataPointSelection",[e,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:s,dataPointIndex:r,config:i.config,globals:i.globals}]))}else"none"!==i.config.states.active.filter.type&&a.getDefaultFilter(t),"function"==typeof i.config.chart.events.dataPointSelection&&i.config.chart.events.dataPointSelection(e,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:s,dataPointIndex:r,config:i.config,globals:i.globals}),this.ctx.fireEvent("dataPointSelection",[e,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:s,dataPointIndex:r,config:i.config,globals:i.globals}]);void 0!==this.w.config.chart.selection.selectedPoints&&this.w.config.chart.selection.selectedPoints(i.globals.selectedDataPoints)}},{key:"rotateAroundCenter",value:function(t){var e=t.getBBox();return{x:e.x+e.width/2,y:e.y+e.height/2}}},{key:"getTextRects",value:function(t,e){var i=this.w,a=this.drawText({x:-200,y:-200,text:t,textAnchor:"start",fontSize:e,foreColor:"#fff",opacity:0});i.globals.dom.Paper.add(a);var s=a.bbox();return a.node.parentNode.removeChild(a.node),{width:s.width,height:s.height}}},{key:"placeTextWithEllipsis",value:function(t,e,i){if(t.textContent=e,e.length>0&&t.getSubStringLength(0,e.length)>=i){for(var a=e.length-3;a>0;a-=3)if(t.getSubStringLength(0,a)<=i)return void(t.textContent=e.substring(0,a)+"...");t.textContent="..."}}}],[{key:"setAttrs",value:function(t,e){for(var i in e)e.hasOwnProperty(i)&&t.setAttribute(i,e[i])}}]),t}();e.default=d},function(t,e,i){"use strict";function a(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n=function(){function t(t,e){for(var i=0;i2&&void 0!==arguments[2]?arguments[2]:void 0;if("#"===e[0]&&"r"===e[0]||(e=this.getHexColorFromName(e)),"number"!=typeof t||t<-1||t>1||"string"!=typeof e||"r"!==e[0]&&"#"!==e[0]||"string"!=typeof i&&void 0!==i)return null;var a=(parseInt,Math.round),s=e.length>9,s="string"==typeof i?i.length>9||"c"===i&&!s:s,r=t<0,t=r?-1*t:t,i=i&&"c"!==i?i:r?"#000000":"#FFFFFF",n=this.sbcRip(e),o=this.sbcRip(i);return n&&o?s?"rgb("+a((o[0]-n[0])*t+n[0])+","+a((o[1]-n[1])*t+n[1])+","+a((o[2]-n[2])*t+n[2])+(n[3]<0&&o[3]<0?")":","+(n[3]>-1&&o[3]>-1?a(1e4*((o[3]-n[3])*t+n[3]))/1e4:o[3]<0?n[3]:o[3])+")"):"#"+(4294967296+16777216*(n[3]>-1&&o[3]>-1?a(255*((o[3]-n[3])*t+n[3])):o[3]>-1?a(255*o[3]):n[3]>-1?a(255*n[3]):255)+65536*a((o[0]-n[0])*t+n[0])+256*a((o[1]-n[1])*t+n[1])+a((o[2]-n[2])*t+n[2])).toString(16).slice(n[3]>-1||o[3]>-1?1:3):null}},{key:"sbcRip",value:function(t){var e=t.length,i=new Object,a=parseInt,s=Math.round;if(e>9){if(t=t.split(","),t.length<3||t.length>4)return null;i[0]=a(t[0].slice(4)),i[1]=a(t[1]),i[2]=a(t[2]),i[3]=t[3]?parseFloat(t[3]):-1}else{if(8===e||6===e||e<4)return null;e<6&&(t="#"+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+(e>4?t[4]+""+t[4]:"")),t=a(t.slice(1),16),i[0]=t>>16&255,i[1]=t>>8&255,i[2]=255&t,i[3]=9===e||5===e?s((t>>24&255)/255*1e4)/1e4:-1}return i}},{key:"getHexColorFromName",value:function(t){var e=document.createElement("div");e.style.color=t;var i=window.getComputedStyle(document.body.appendChild(e)).color.match(/\d+/g).map(function(t){return parseInt(t,10)});return document.body.removeChild(e),i.length>=3&&"#"+((1<<24)+(i[0]<<16)+(i[1]<<8)+i[2]).toString(16).substr(1)}}],[{key:"bind",value:function(t,e){return function(){return t.apply(e,arguments)}}},{key:"isObject",value:function(t){return t&&"object"===(void 0===t?"undefined":r(t))&&!Array.isArray(t)&&null!==t}},{key:"extend",value:function(t,e){var i=this;"function"!=typeof Object.assign&&function(){Object.assign=function(t){if(void 0===t||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),i=1;i1?(e.shift(),this.addProps(a,e,i)):t[e[0]]=i,t}},{key:"clone",value:function(t){if("[object Array]"===Object.prototype.toString.call(t)){for(var e=[],i=0;i0&&void 0!==arguments[0]?arguments[0]:"#999999",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.6;"#"!==t.substring(0,1)&&(t="#999999");var i=t.replace("#","");i=i.match(new RegExp("(.{"+i.length/3+"})","g"));for(var a=0;a0)return parseInt(t.substring(e+5,t.indexOf(".",e)),10);if(t.indexOf("Trident/")>0){var i=t.indexOf("rv:");return parseInt(t.substring(i+3,t.indexOf(".",i)),10)}var a=t.indexOf("Edge/");return a>0&&parseInt(t.substring(a+5,t.indexOf(".",a)),10)}}]),t}();o.isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),e.default=o},function(t,e,i){"use strict";var a=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=a)},function(t,e,i){"use strict";var a=i(48)("wks"),s=i(32),r=i(2).Symbol,n="function"==typeof r;(t.exports=function(t){return a[t]||(a[t]=n&&r[t]||(n?r:s)("Symbol."+t))}).store=a},function(t,e,i){"use strict";function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var i=0;i2&&void 0!==arguments[2]?arguments[2]:.5;switch(e){case"none":this.addNormalFilter(t);break;case"lighten":this.addLightenFilter(t,{intensity:i});break;case"darken":this.addDarkenFilter(t,{intensity:i});break;case"desaturate":this.addDesaturateFilter(t,{intensity:i})}}},{key:"addShadow",value:function(t,e){var i=e.blur,a=e.top,s=e.left,r=e.opacity,n=t.flood("black",r).composite(t.sourceAlpha,"in").offset(s,a).gaussianBlur(i).merge(t.source);return t.blend(t.source,n)}},{key:"dropShadow",value:function(t,e){var i=e.top,a=e.left,s=e.blur,r=e.opacity;return t.unfilter(!0),(new window.SVG.Filter).size("120%","180%","-5%","-40%"),t.filter(function(t){var e=null;e=n.default.isSafari?t.flood("black",r).composite(t.sourceAlpha,"in").offset(a,i).gaussianBlur(s):t.flood("black",r).composite(t.sourceAlpha,"in").offset(a,i).gaussianBlur(s).merge(t.source),t.blend(t.source,e)}),t.filterer.node.setAttribute("filterUnits","userSpaceOnUse"),t}}]),t}();e.default=o},function(t,e,i){"use strict";var a=t.exports={version:"2.5.7"};"number"==typeof __e&&(__e=a)},function(t,e,i){"use strict";var a=i(11);t.exports=function(t){if(!a(t))throw TypeError(t+" is not an object!");return t}},function(t,e,i){"use strict";var a=i(20),s=i(47);t.exports=i(9)?function(t,e,i){return a.f(t,e,s(1,i))}:function(t,e,i){return t[e]=i,t}},function(t,e,i){"use strict";function a(t){return t&&t.__esModule?t:{default:t}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var i=0;is?a:s,n=t.image,l=0,h=0;void 0===t.width&&void 0===t.height?void 0!==i.fill.image.width&&void 0!==i.fill.image.height?(l=i.fill.image.width+1,h=i.fill.image.height):(l=r+1,h=r):(l=t.width,h=t.height);var c=document.createElementNS(e.globals.svgNS,"pattern");o.default.setAttrs(c,{id:t.patternID,patternUnits:"userSpaceOnUse",width:l+"px",height:h+"px"});var u=document.createElementNS(e.globals.svgNS,"image");c.appendChild(u),u.setAttributeNS("http://www.w3.org/1999/xlink","href",n),o.default.setAttrs(u,{x:0,y:0,preserveAspectRatio:"none",width:l+"px",height:h+"px"}),u.style.opacity=t.opacity,e.globals.dom.elDefs.node.appendChild(c)}},{key:"fillPath",value:function(t,e){var i=this.w,a=this.w.config,s=new o.default(this.ctx),r=new h.default,n=void 0,l=void 0,c=[],u=function(){return"bar"===i.config.chart.type&&i.config.plotOptions.bar.distributed||"heatmap"===i.config.chart.type?e.seriesNumber:e.seriesNumber%i.globals.series.length},d=Array.isArray(a.fill.opacity)?a.fill.opacity[u()]:a.fill.opacity;i.globals.comboCharts?"line"===i.config.series[u()].type?a.stroke.colors instanceof Array?c=a.stroke.colors:c.push(a.stroke.colors):a.fill.colors instanceof Array?c=a.fill.colors:c.push(a.fill.colors):"line"===a.chart.type?a.stroke.colors instanceof Array?c=a.stroke.colors:c.push(a.stroke.colors):a.fill.colors instanceof Array?c=a.fill.colors:c.push(a.fill.colors),void 0!==e.fillColors&&(c=[],e.fillColors instanceof Array?c=e.fillColors.slice():c.push(e.fillColors));var f=h.default.hexToRgba(c[u()],d),p=c[u()];if("pattern"===a.fill.type){var g=void 0===a.fill.pattern.strokeWidth?Array.isArray(a.stroke.width)?a.stroke.width[u]:a.stroke.width:Array.isArray(a.fill.pattern.strokeWidth)?a.fill.pattern.strokeWidth[u]:a.fill.pattern.strokeWidth,x=p;if(a.fill.pattern.style instanceof Array)if(void 0!==a.fill.pattern.style[e.seriesNumber]){var v=s.drawPattern(a.fill.pattern.style[e.seriesNumber],a.fill.pattern.width,a.fill.pattern.height,x,g,d);n=v}else n=f;else n=s.drawPattern(a.fill.pattern.style,a.fill.pattern.width,a.fill.pattern.height,x,g,d)}if("gradient"===a.fill.type){var b=a.fill.gradient.type,m=void 0,y=void 0,w=void 0===a.fill.gradient.opacityFrom?d:a.fill.gradient.opacityFrom,k=void 0===a.fill.gradient.opacityTo?d:a.fill.gradient.opacityTo;if(m=p,y=void 0===a.fill.gradient.gradientToColors||0===a.fill.gradient.gradientToColors.length?"dark"===a.fill.gradient.shade?r.shadeColor(-1*parseFloat(a.fill.gradient.shadeIntensity),p):r.shadeColor(parseFloat(a.fill.gradient.shadeIntensity),p):a.fill.gradient.gradientToColors[e.seriesNumber],a.fill.gradient.inverseColors){var S=m;m=y,y=S}l=s.drawGradient(b,m,y,w,k,e.size,a.fill.gradient.stops)}var A="none";return a.fill.image.src.length>0&&"image"===a.fill.type?e.seriesNumber-1||e.indexOf("NaN")>-1)&&(e="M 0 "+n.globals.gridHeight,a=1),(i.indexOf("undefined")>-1||i.indexOf("NaN")>-1)&&(i="M 0 "+n.globals.gridHeight,a=1),t.plot(e).animate(1,n.globals.easing,r).plot(e).animate(a,n.globals.easing,r).plot(i)}},{key:"showDelayedElements",value:function(){var t=this.w,e=t.config.chart.animations,i=e.speed,a=e.animateGradually.enabled,s=e.animateGradually.delay;if(e.enabled&&!t.globals.resized)for(var r=0;rt.from&&i1)for(var i=t.globals.series.map(function(e,i){return e.length>0&&"bar"!==t.config.series[i].type&&"column"!==t.config.series[i].type?i:-1}),a=0;a1)for(var i=t.config.series.map(function(t,e){return t.data&&t.data.length>0?e:-1}),a=0;a0)for(var a=i.length-1;a>=0;a--)t(i,a,"line");var s=e.globals.dom.baseEl.querySelectorAll(".apexcharts-area-series .apexcharts-series");if(s.length>0)for(var r=s.length-1;r>=0;r--)t(s,r,"area");var n=e.globals.dom.baseEl.querySelectorAll(".apexcharts-bar-series .apexcharts-series");if(n.length>0)for(var o=0;o0)for(var h=0;h0)for(var p=0;p0)for(var m=0;m0&&(o=this.getxAxisTimeScaleLabelsCoords()),s=this.getxAxisTitleCoords(),r=this.getyAxisTitleCoords(),this.isBarHorizontal,e.config.xaxis.labels.show||(o={height:0,width:0}),e.globals.yLabelsCoords=[],e.globals.yTitleCoords=[],e.config.yaxis.map(function(t,i){e.globals.yLabelsCoords.push({width:n[i].width,index:i}),e.globals.yTitleCoords.push({width:r[i].width,index:i})}),this.xAxisHeight=(o.height+s.height)*e.globals.lineHeightRatio+15,this.xAxisWidth=o.width,this.xAxisHeight-s.height>e.config.xaxis.labels.maxHeight&&(this.xAxisHeight=e.config.xaxis.labels.maxHeight),e.config.xaxis.floating&&(this.xAxisHeight=0),i.xAxisLabelsHeight=this.xAxisHeight,i.translateXAxisY=e.globals.rotateXLabels?this.xAxisHeight/8:-4,i.translateXAxisX=e.globals.rotateXLabels&&e.globals.dataXY&&e.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,this.isBarHorizontal&&(i.rotateXLabels=!1,i.translateXAxisY=parseInt(e.config.xaxis.labels.style.fontSize)/1.5*-1),i.translateXAxisY=i.translateXAxisY+e.config.xaxis.labels.offsetY,i.translateXAxisX=i.translateXAxisX+e.config.xaxis.labels.offsetX,this.isBarHorizontal?(this.yAxisWidth=e.globals.yLabelsCoords[0].width+e.globals.yTitleCoords[0].width+15,this.yAxisWidth>e.config.yaxis[0].labels.maxWidth&&(this.yAxisWidth=e.config.yaxis[0].labels.maxWidth)):this.yAxisWidth=this.getTotalYAxisWidth();var l=this.yAxisWidth,h=this.xAxisHeight,c=10;switch(e.config.grid.show||(l=0,h=35),e.config.chart.sparkline.enabled&&(t={height:0,width:0},a=0,h=0,l=0,c=0),e.config.legend.position){case"bottom":i.translateY=c,i.translateX=l,i.gridHeight=i.svgHeight-t.height-h-(e.globals.rotateXLabels?10:15),i.gridWidth=i.svgWidth-a-l;break;case"top":i.translateY=t.height+c,i.translateX=l,i.gridHeight=i.svgHeight-t.height-h-(e.globals.rotateXLabels?10:15),i.gridWidth=i.svgWidth-a-l;break;case"left":i.translateY=c,i.translateX=t.width+l,i.gridHeight=i.svgHeight-h,i.gridWidth=i.svgWidth-t.width-a-l;break;case"right":i.translateY=c,i.translateX=l,i.gridHeight=i.svgHeight-h,i.gridWidth=i.svgWidth-t.width-a-l;break;default:i.translateY=c,i.translateX=l,i.gridHeight=i.svgHeight-t.height-h,i.gridWidth=i.svgWidth-a}var u=0;e.config.chart.scroller.enabled&&e.globals.dataXY&&(u=e.config.chart.scroller.height),i.gridHeight=i.gridHeight-e.config.grid.padding.top-e.config.grid.padding.bottom-u,i.gridWidth=i.gridWidth-e.config.grid.padding.left-e.config.grid.padding.right,i.translateX=i.translateX+e.config.grid.padding.left,i.translateY=i.translateY+e.config.grid.padding.top,this.isBarHorizontal||this.setGridXPosForDualYAxis(r,n),this.setYAxisXPosition(n,r)}},{key:"setGridCoordsForNonAxisCharts",value:function(t){var e=this.w,i=e.globals,a=4*e.config.legend.markers.size+e.config.legend.itemMargin.horizontal,s=15;switch("pie"===e.config.chart.type||"donut"===e.config.chart.type?s+=e.config.plotOptions.pie.offsetY:"radialBar"===e.config.chart.type&&(s+=e.config.plotOptions.radialBar.offsetY),e.config.legend.position){case"bottom":i.gridHeight=i.svgHeight-t.height-35,i.gridWidth=i.gridHeight,i.translateY=s,i.translateX=(i.svgWidth-i.gridWidth)/2;break;case"top":i.gridHeight=i.svgHeight-t.height-35,i.gridWidth=i.gridHeight,i.translateY=t.height+s,i.translateX=(i.svgWidth-i.gridWidth)/2;break;case"left":i.gridWidth=i.svgWidth-t.width-a,i.gridHeight=i.gridWidth,i.translateY=s,i.translateX=t.width+a;break;case"right":i.gridWidth=i.svgWidth-t.width-a,i.gridHeight=i.gridWidth,i.translateY=s,i.translateX=5;break;default:i.gridHeight=i.svgHeight-t.height-30,i.gridWidth=i.gridHeight,i.translateY=s,i.translateX=(i.svgWidth-i.gridWidth)/2}}},{key:"setGridXPosForDualYAxis",value:function(t,e){var i=this.w;i.config.yaxis.map(function(a,s){i.globals.ignoreYAxisIndexes.includes(s)||i.config.yaxis[s].floating||a.opposite&&(i.globals.translateX=i.globals.translateX-(e[s].width+t[s].width)-parseInt(i.config.yaxis[s].labels.style.fontSize)/1.2)})}},{key:"titleSubtitleOffset",value:function(){var t=this.w,e=t.globals,i=10;void 0!==t.config.title.text?i+=t.config.title.margin:i+=5,void 0!==t.config.subtitle.text?i+=t.config.subtitle.margin:i+=5,t.config.legend.show&&"bottom"===t.config.legend.position&&!t.config.legend.floating&&t.config.series.length>1&&(i+=10);var a=this.getMainTitleCoords(),s=this.getSubTitleCoords();e.gridHeight=e.gridHeight-a.height-s.height-i,e.translateY=e.translateY+a.height+s.height+i}},{key:"getTotalYAxisWidth",value:function(){var t=this.w,e=0;return t.globals.yLabelsCoords.map(function(i,a){var s=t.config.yaxis[a].floating;i.width>0&&!s?(e+=i.width,t.globals.ignoreYAxisIndexes.includes(a)&&(e-=i.width)):e+=s?0:5}),t.globals.yTitleCoords.map(function(i,a){var s=t.config.yaxis[a].floating;i.width>0&&!s?(e=e+i.width+parseInt(t.config.yaxis[a].title.style.fontSize),t.globals.ignoreYAxisIndexes.includes(a)&&(e-=i.width)):e+=s?0:5}),e}},{key:"getxAxisTimeScaleLabelsCoords",value:function(){var t=this.w,e=t.globals.timelineLabels.slice(),i=e.map(function(t){return t.value}),a=i.reduce(function(t,e){if(void 0===t)throw new Error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date");return t.length>e.length?t:e}),s=new o.default(this.ctx),r=s.drawText({x:-200,y:-200,text:a,textAnchor:"start",fontSize:t.config.xaxis.labels.style.fontSize,foreColor:"#fff",opacity:0});t.globals.dom.Paper.add(r);var n=r.node.getBoundingClientRect();return 1.05*n.width*i.length>t.globals.gridWidth&&t.config.xaxis.labels.rotate,t.globals.overlappingXLabels=!0,r.node.parentNode.removeChild(r.node),{width:n.width,height:n.height}}},{key:"getxAxisLabelsCoords",value:function(){var t=this.w,e=t.globals.labels.slice(),i="left"!==t.config.legend.position||"right"!==t.config.legend.position||t.config.legend.floating?0:this.lgRect.width,a=e.reduce(function(t,e){return t.length>e.length?t:e}),s=t.globals.xLabelFormatter;a=new h.default(this.ctx).xLabelFormat(s,a);var r=new o.default(this.ctx),n=r.drawText({x:-200,y:-200,text:a,textAnchor:"start",fontSize:t.config.xaxis.labels.style.fontSize,foreColor:"#fff",opacity:0});t.globals.dom.Paper.add(n);var l=n.node.getBoundingClientRect(),c={width:l.width,height:l.height};return c.width*e.length>t.globals.svgWidth-i-this.yAxisWidth&&0!==t.config.xaxis.labels.rotate?this.isBarHorizontal||(t.globals.rotateXLabels=!0,n.attr("transform","rotate("+t.config.xaxis.labels.rotate+" 0 0)"),l=n.node.getBoundingClientRect(),c.height=l.height/1.65):t.globals.rotateXLabels=!1,n.node.parentNode.removeChild(n.node),{width:c.width,height:c.height}}},{key:"setYAxisXPosition",value:function(t,e){var i=this,a=this.w,s=0,r=0,n=0,o=4;this.multipleYs=!1,a.config.yaxis.length>1&&(this.multipleYs=!0),a.config.yaxis.map(function(l,h){var c=t[h].width+e[h].width,u=new f.default(i.ctx),d=u.xPaddingForYAxisTitle(h,{width:t[h].width},{width:e[h].width},l.opposite);if(a.config.yaxis.length>1?c+=Math.abs(d.padd):void 0===l.title.text?c=c+Math.abs(d.padd)+15:c+=Math.abs(d.padd),l.opposite)r=a.globals.gridWidth+a.globals.translateX+o+26+(a.globals.series.length-a.globals.collapsedSeries.length),o+=c,a.globals.translateYAxisX[h]=r-l.labels.offsetX;else{var p=c;a.globals.ignoreYAxisIndexes.includes(h)&&(p=0),s=i.multipleYs?a.globals.translateX-c-n+5+parseInt(a.config.yaxis[h].labels.style.fontSize)/1.2+l.labels.offsetX+5:a.globals.translateX-c+t[h].width+l.labels.offsetX+2,n+=p,a.globals.translateYAxisX[h]=s}})}},{key:"getyAxisLabelsCoords",value:function(){var t=this,e=this.w,i=[],a=10;return e.config.yaxis.map(function(s,r){if(s.labels.show&&e.globals.yAxisScale[r].result.length){var n=s.labels.formatter,l=n(e.globals.yAxisScale[r].niceMax);if(t.isBarHorizontal){a=0;l=e.globals.labels.slice().reduce(function(t,e){return t.length>e.length?t:e}),l=n(l)}var h=new o.default(t.ctx),c=h.drawText({x:0,y:0,text:l,textAnchor:"start",fontSize:s.labels.style.fontSize,foreColor:"#fff",opacity:0});e.globals.dom.Paper.add(c);var u=c.node.getBoundingClientRect();c.node.parentNode.removeChild(c.node),i.push({width:u.width+a,height:u.height})}else i.push({width:0,height:0})}),i}},{key:"getxAxisTitleCoords",value:function(){var t=this.w,e=0,i=0;if(void 0!==t.config.xaxis.title.text){var a=new o.default(this.ctx),s=a.drawText({x:0,y:0,text:t.config.xaxis.title.text,textAnchor:"start",fontSize:t.config.xaxis.title.style.fontSize,foreColor:"#fff",opacity:0});t.globals.dom.Paper.add(s);var r=s.node.getBoundingClientRect();e=r.width,i=r.height,s.node.parentNode.removeChild(s.node)}return{width:e,height:i}}},{key:"getyAxisTitleCoords",value:function(){var t=this,e=this.w,i=[];return e.config.yaxis.map(function(a,s){if(void 0!==a.title.text){var r=new o.default(t.ctx),n=r.drawText({x:0,y:0,text:a.title.text,textAnchor:"middle",fontSize:a.title.style.fontSize,foreColor:"#fff",opacity:0});n.attr("transform","rotate(-90 0 0)"),e.globals.dom.Paper.add(n);var l=n.node.getBoundingClientRect();i.push({width:l.width,height:l.height}),n.node.parentNode.removeChild(n.node)}else i.push({width:0,height:0})}),i}},{key:"getMainTitleCoords",value:function(){var t=this.w,e=0,i=0,a=t.globals.dom.baseEl.querySelector(".apexcharts-title-text");if(null!==a&&!t.config.title.floating){var s=a.getBoundingClientRect();e=s.width,i=s.height+5}return{width:e,height:i}}},{key:"getSubTitleCoords",value:function(){var t=this.w,e=0,i=0,a=t.globals.dom.baseEl.querySelector(".apexcharts-subtitle-text");if(null!==a&&!t.config.subtitle.floating){var s=a.getBoundingClientRect();e=s.width,i=s.height+5}return{width:e,height:i}}},{key:"getLegendsRect",value:function(){var t=this.w,e=t.globals.dom.baseEl.querySelector(".apexcharts-legend"),i=Object.assign({},u.default.getBoundingClientRect(e));return i.height=i.height+t.config.legend.containerMargin.top+t.config.legend.containerMargin.bottom,i.width=i.width+t.config.legend.containerMargin.left+t.config.legend.containerMargin.right,null===e||t.config.legend.floating?this.lgRect={x:0,y:0,height:0,width:0}:this.lgRect=i,this.lgRect}}]),t}();t.exports=p},function(t,e,i){"use strict";function a(t){return t&&t.__esModule?t:{default:t}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var i=0;i0?s:a)(t)}},function(t,e,i){"use strict";var a=i(70),s=i(24);t.exports=function(t){return a(s(t))}},function(t,e,i){"use strict";var a=0,s=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++a+s).toString(36))}},function(t,e,i){"use strict";function a(t){return t&&t.__esModule?t:{default:t}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var i=0;ix.x+x.width+2||e>x.y+x.height+2||t+d3&&void 0!==arguments[3]&&arguments[3],this.w),s=new h.default(this.ctx),r=a.config.dataLabels,n=0,l=0,c=i,u=null;if(r.enabled&&(u=s.group({class:"apexcharts-data-labels"}),t.x instanceof Array))for(var d=0;d0&&(n=o.group({class:"apexcharts-series-markers"})),r.x instanceof Array)for(var c=0;c0){null!==r.y[t]?c+=" w"+(Math.random()+1).toString(36).substring(4):c="apexcharts-nullpoint";var u=a.getMarkerConfig(c,e);s.config.markers.discrete.map(function(t,i){t.i===e&&t.j===h&&(u.pointStrokeColor=t.strokeColor,u.pointFillColor=t.fillColor,u.size=t.size)}),l=o.drawMarker(r.x[t],r.y[t],u),1===i&&0===t&&(h=0),1===i&&1===t&&(h=1),l.attr("rel",h),l.attr("j",h),l.attr("index",e),a.setSelectedPointFilter(l,e,h),a.addEvents(l),n.add(l)}else void 0===s.globals.pointsArray[e]&&(s.globals.pointsArray[e]=[]),s.globals.pointsArray[e].push([r.x[t],r.y[t]])}(c);return n}},{key:"getMarkerConfig",value:function(t,e){var i=this.w,a=this.getMarkerStyle(e),s=i.config.markers.size;return{pSize:s instanceof Array?s[e]:s,pRadius:i.config.markers.radius,pWidth:i.config.markers.strokeWidth,pointStrokeColor:a.pointStrokeColor,pointFillColor:a.pointFillColor,shape:i.config.markers.shape instanceof Array?i.config.markers.shape[e]:i.config.markers.shape,class:t,pointStrokeOpacity:i.config.markers.strokeOpacity,pointFillOpacity:i.config.markers.fillOpacity,seriesIndex:e}}},{key:"addEvents",value:function(t){var e=new h.default(this.ctx);t.node.addEventListener("mouseenter",e.pathMouseEnter.bind(this.ctx,t)),t.node.addEventListener("mouseleave",e.pathMouseLeave.bind(this.ctx,t)),t.node.addEventListener("mousedown",e.pathMouseDown.bind(this.ctx,t)),t.node.addEventListener("touchstart",e.pathMouseDown.bind(this.ctx,t))}},{key:"setSelectedPointFilter",value:function(t,e,i){var a=this.w;if(void 0!==a.globals.selectedDataPoints[e]&&a.globals.selectedDataPoints[e].includes(i)){t.node.setAttribute("selected",!0);var s=a.config.states.active.filter;if("none"!==s){new o.default(this.ctx).applyFilter(t,s.type,s.value)}}}},{key:"getMarkerStyle",value:function(t){var e=this.w,i=e.config.markers.colors;return{pointStrokeColor:e.config.markers.strokeColor,pointFillColor:i instanceof Array?i[t]:i}}}]),t}();t.exports=c},function(t,e,i){"use strict";function a(t){return t&&t.__esModule?t:{default:t}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var r=function(){function t(t,e){for(var i=0;i0&&(this.xaxisLabels=i.globals.timelineLabels.slice()),"top"===i.config.xaxis.position?this.offY=0:this.offY=i.globals.gridHeight+1,this.xaxisFontSize=i.config.xaxis.labels.style.fontSize,this.xaxisForeColors=i.config.xaxis.labels.style.colors,this.yaxis=i.config.yaxis[0]}return r(t,[{key:"drawXaxis",value:function(){var t=this.w,e=new o.default(this.ctx),i=e.group({class:"apexcharts-xaxis"}),a=e.group({class:"apexcharts-xaxis-texts-g",transform:"translate("+t.globals.translateXAxisX+", "+t.globals.translateXAxisY+")"});i.add(a);for(var s=void 0,r=t.globals.padHorizontal,n=[],l=0;l0&&(g=t.globals.timelineLabels[d].position,f=t.globals.timelineLabels[d].value);var x=28;t.globals.rotateXLabels&&(x=22);var v=e.drawText({x:g,y:this.offY+t.config.xaxis.labels.offsetY+x,text:"",textAnchor:"middle",fontSize:this.xaxisFontSize,foreColor:this.xaxisForeColors[d],cssClass:"apexcharts-xaxis-label "+t.config.xaxis.labels.style.cssClass});a.add(v),v.tspan(f);var b=document.createElementNS(t.globals.svgNS,"title");b.textContent=f,v.node.appendChild(b),r+=s}if(void 0!==t.config.xaxis.title.text){var m=e.group({class:"apexcharts-xaxis-title"}),y=e.drawText({x:t.globals.gridWidth/2+t.config.xaxis.title.offsetX,y:this.offY-parseInt(this.xaxisFontSize)+t.globals.xAxisLabelsHeight+t.config.xaxis.title.offsetY,text:t.config.xaxis.title.text,textAnchor:"middle",fontSize:t.config.xaxis.title.style.fontSize,foreColor:t.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text "+t.config.xaxis.title.style.cssClass});m.add(y),i.add(m)}if(t.config.xaxis.axisBorder.show){var w=0;"bar"===t.config.chart.type&&t.globals.dataXY&&(w-=15);var k=e.drawLine(t.globals.padHorizontal+w+t.config.xaxis.axisBorder.offsetX,this.offY,t.globals.gridWidth,this.offY,t.config.xaxis.axisBorder.color);i.add(k)}return i}},{key:"drawXaxisInversed",value:function(t){var e=this.w,i=new o.default(this.ctx),a=i.group({class:"apexcharts-yaxis apexcharts-xaxis-inversed",rel:t}),s=i.group({class:"apexcharts-yaxis-texts-g apexcharts-xaxis-inversed-texts-g"});a.add(s);for(var r=void 0,n=void 0,l=[],c=0;ci.globals.gridWidth)){var s=this.offY+i.config.xaxis.axisTicks.offsetY,r=s+i.config.xaxis.axisTicks.height;if(i.config.xaxis.axisTicks.show){var n=new o.default(this.ctx),l=n.drawLine(t+i.config.xaxis.axisTicks.offsetX,s,a+i.config.xaxis.axisTicks.offsetX,r,i.config.xaxis.axisTicks.color);e.add(l),l.node.classList.add("apexcharts-xaxis-tick")}}}},{key:"getXAxisTicksPositions",value:function(){var t=this.w,e=[],i=this.xaxisLabels.length,a=t.globals.padHorizontal;if(t.globals.timelineLabels.length>0)for(var s=0;s0){var f=a[0].getBBox(),p=a[a.length-1].getBBox();f.x<-25&&a[0].parentNode.removeChild(a[0]),p.x+p.width>t.globals.gridWidth&&a[a.length-1].parentNode.removeChild(a[a.length-1])}if(s.length>0){var g=s[s.length-1].getBBox(),x=s[0].getBBox();g.x<-20&&s[s.length-1].parentNode.removeChild(s[s.length-1]),x.x+x.width>t.globals.gridWidth&&s[0].parentNode.removeChild(s[0]);for(var v=0;v=0;d--){var f=i.globals.yAxisScale[e].result[d];f=u(f);var p=20;i.config.yaxis[e].opposite&&(p*=-1),0===i.config.yaxis.length&&(p=20);var g=a.drawText({x:p,y:c+l/10+i.config.yaxis[e].labels.offsetY+1,text:f,textAnchor:i.config.yaxis[e].opposite?"start":"end",fontSize:s,foreColor:i.config.yaxis[e].labels.style.color,cssClass:"apexcharts-yaxis-label "+i.config.yaxis[e].labels.style.cssClass});o.add(g),c+=h}if(void 0!==i.config.yaxis[e].title.text){var x=a.group({class:"apexcharts-yaxis-title"}),v=0;i.config.yaxis[e].opposite&&(v=i.globals.translateYAxisX[e]);var b=a.drawText({x:v,y:i.globals.gridHeight/2+i.globals.translateY,text:i.config.yaxis[e].title.text,textAnchor:"end",foreColor:i.config.yaxis[e].labels.style.color,fontSize:i.config.yaxis[e].title.style.fontSize,cssClass:"apexcharts-yaxis-title-text "+i.config.yaxis[e].title.style.cssClass});x.add(b),r.add(x)}var m=i.config.yaxis[e].axisBorder;if(m.show){var y=31+m.offsetX;i.config.yaxis[e].opposite&&(y=-31-m.offsetX);var w=a.drawLine(y,i.globals.translateY+m.offsetY-2,y,i.globals.gridHeight+i.globals.translateY+m.offsetY+2,m.color);r.add(w),this.drawAxisTicks(y,l,m,i.config.yaxis[e].axisTicks,e,h,r)}return r}},{key:"drawYaxisInversed",value:function(t){var e=this.w,i=new n.default(this.ctx),a=i.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),s=i.group({class:"apexcharts-xaxis-texts-g",transform:"translate("+e.globals.translateXAxisX+", "+e.globals.translateXAxisY+")"});a.add(s);var r=e.globals.yAxisScale[t].result.length-1,o=e.globals.gridWidth/r+.1,l=o+e.config.xaxis.labels.offsetX,h=e.globals.xLabelFormatter;if(e.config.xaxis.labels.show)for(var c=r;c>=0;c--){var u=e.globals.yAxisScale[t].result[c];u=h(u);var d=i.drawText({x:e.globals.gridWidth+e.globals.padHorizontal-(l-o+e.config.xaxis.labels.offsetX),y:this.xAxisoffX+e.config.xaxis.labels.offsetY+30,text:"",textAnchor:"middle",fontSize:this.xaxisFontSize,cssClass:"apexcharts-xaxis-label "+e.config.xaxis.labels.style.cssClass});s.add(d),d.tspan(u);var f=document.createElementNS(e.globals.svgNS,"title");f.textContent=u,d.node.appendChild(f),l+=o}if(void 0!==e.config.xaxis.title.text){var p=i.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),g=i.drawText({x:e.globals.gridWidth/2,y:this.xAxisoffX+parseInt(this.xaxisFontSize)+parseInt(e.config.xaxis.title.style.fontSize)+20,text:e.config.xaxis.title.text,textAnchor:"middle",fontSize:e.config.xaxis.title.style.fontSize,cssClass:"apexcharts-xaxis-title-text "+e.config.xaxis.title.style.cssClass});p.add(g),a.add(p)}var x=e.config.yaxis[t].axisBorder;if(x.show){var v=i.drawLine(e.globals.padHorizontal+x.offsetX,1+x.offsetY,e.globals.padHorizontal+x.offsetX,e.globals.gridHeight+x.offsetY,x.color);a.add(v)}return a}},{key:"drawAxisTicks",value:function(t,e,i,a,s,r,o){var l=this.w,h=new n.default(this.ctx),c=l.globals.translateY;if(a.show){!0===l.config.yaxis[s].opposite&&(t+=a.width);for(var u=e;u>=0;u--){var d=c+e/10+l.config.yaxis[s].labels.offsetY-1;this.isBarHorizontal&&(d=r*u);var f=h.drawLine(t+i.offsetX-a.width+a.offsetX,d+a.offsetY,t+i.offsetX+a.offsetX,d+a.offsetY,i.color);o.add(f),c+=r}}}},{key:"yAxisTitleRotate",value:function(t,e){var i=this.w,a=new n.default(this.ctx),s={width:0,height:0},r={width:0,height:0},o=i.globals.dom.baseEl.querySelector(" .apexcharts-yaxis[rel='"+t+"'] .apexcharts-yaxis-texts-g");null!==o&&(s=o.getBoundingClientRect());var l=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='"+t+"'] .apexcharts-yaxis-title text");if(null!==l&&(r=l.getBoundingClientRect()),null!==l){var h=this.xPaddingForYAxisTitle(t,s,r,e);l.setAttribute("x",h.xPos)}if(null!==l){var c=a.rotateAroundCenter(l);e?l.setAttribute("transform","rotate(90 "+c.x+" "+c.y+")"):l.setAttribute("transform","rotate(-90 "+c.x+" "+c.y+")")}}},{key:"xPaddingForYAxisTitle",value:function(t,e,i,a){var s=this.w,r=0,n=0,o=20;return a?(n=e.width+s.config.yaxis[t].title.offsetX+o+i.width/2-15,0===r&&(n-=15),r+=1):(n=-1*e.width+s.config.yaxis[t].title.offsetX+o+i.width/2-15,this.isBarHorizontal&&(o=25,n=-1*e.width-s.config.yaxis[t].title.offsetX-o)),{xPos:n,padd:o}}}]),t}();t.exports=o},function(t,e,i){"use strict";function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var i=0;i2&&void 0!==arguments[2])||arguments[2],s=["\0","January","February","March","April","May","June","July","August","September","October","November","December"],r=["","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],n=["","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],o=["","Sun","Mon","Tue","Wed","Thu","Fri","Sat"];t=this.treatAsUtc(t);var l=a?t.getUTCFullYear():t.getFullYear();e=e.replace(/(^|[^\\])yyyy+/g,"$1"+l),e=e.replace(/(^|[^\\])yy/g,"$1"+l.toString().substr(2,2)),e=e.replace(/(^|[^\\])y/g,"$1"+l);var h=(a?t.getUTCMonth():t.getMonth())+1;e=e.replace(/(^|[^\\])MMMM+/g,"$1"+s[0]),e=e.replace(/(^|[^\\])MMM/g,"$1"+r[0]),e=e.replace(/(^|[^\\])MM/g,"$1"+i(h)),e=e.replace(/(^|[^\\])M/g,"$1"+h);var c=a?t.getUTCDate():t.getDate();e=e.replace(/(^|[^\\])dddd+/g,"$1"+n[0]),e=e.replace(/(^|[^\\])ddd/g,"$1"+o[0]),e=e.replace(/(^|[^\\])dd/g,"$1"+i(c)),e=e.replace(/(^|[^\\])d/g,"$1"+c);var u=a?t.getUTCHours():t.getHours();e=e.replace(/(^|[^\\])HH+/g,"$1"+i(u)),e=e.replace(/(^|[^\\])H/g,"$1"+u);var d=u>12?u-12:0===u?12:u;e=e.replace(/(^|[^\\])hh+/g,"$1"+i(d)),e=e.replace(/(^|[^\\])h/g,"$1"+d);var f=a?t.getUTCMinutes():t.getMinutes();e=e.replace(/(^|[^\\])mm+/g,"$1"+i(f)),e=e.replace(/(^|[^\\])m/g,"$1"+f);var p=a?t.getUTCSeconds():t.getSeconds();e=e.replace(/(^|[^\\])ss+/g,"$1"+i(p)),e=e.replace(/(^|[^\\])s/g,"$1"+p);var g=a?t.getUTCMilliseconds():t.getMilliseconds();e=e.replace(/(^|[^\\])fff+/g,"$1"+i(g,3)),g=Math.round(g/10),e=e.replace(/(^|[^\\])ff/g,"$1"+i(g)),g=Math.round(g/10),e=e.replace(/(^|[^\\])f/g,"$1"+g);var x=u<12?"AM":"PM";e=e.replace(/(^|[^\\])TT+/g,"$1"+x),e=e.replace(/(^|[^\\])T/g,"$1"+x.charAt(0));var v=x.toLowerCase();e=e.replace(/(^|[^\\])tt+/g,"$1"+v),e=e.replace(/(^|[^\\])t/g,"$1"+v.charAt(0));var b=-t.getTimezoneOffset(),m=a||!b?"Z":b>0?"+":"-";if(!a){b=Math.abs(b);var y=Math.floor(b/60),w=b%60;m+=i(y)+":"+i(w)}e=e.replace(/(^|[^\\])K/g,"$1"+m);var k=(a?t.getUTCDay():t.getDay())+1;return e=e.replace(new RegExp(n[0],"g"),n[k]),e=e.replace(new RegExp(o[0],"g"),o[k]),e=e.replace(new RegExp(s[0],"g"),s[h]),e=e.replace(new RegExp(r[0],"g"),r[h]),e=e.replace(/\\(.)/g,"$1")}},{key:"getTimeUnitsfromTimestamp",value:function(t,e){var i=this.w;void 0!==i.config.xaxis.min&&(t=i.config.xaxis.min),void 0!==i.config.xaxis.max&&(e=i.config.xaxis.max);var a=new Date(t).getFullYear(),s=new Date(e).getFullYear(),r=new Date(t).getMonth(),n=new Date(e).getMonth(),o=new Date(t).getDate(),l=new Date(e).getDate(),h=new Date(t).getHours(),c=new Date(e).getHours();return{minMinute:new Date(t).getMinutes(),maxMinute:new Date(e).getMinutes(),minHour:h,maxHour:c,minDate:o,maxDate:l,minMonth:r,maxMonth:n,minYear:a,maxYear:s}}},{key:"isLeapYear",value:function(t){return t%4==0&&t%100!=0||t%400==0}},{key:"calculcateLastDaysOfMonth",value:function(t,e,i){return this.determineDaysOfMonths(t,e)-i}},{key:"determineDaysOfYear",value:function(t){var e=365;return this.isLeapYear(t)&&(e=366),e}},{key:"determineRemainingDaysOfYear",value:function(t,e,i){var a=this.daysCntOfYear[e]+i;return e>1&&this.isLeapYear()&&a++,a}},{key:"determineDaysOfMonths",value:function(t,e){var i=30;switch(t=new n.default(this.ctx).monthMod(t),!0){case this.months30.includes(t):2===t&&(i=this.isLeapYear(e)?29:28);break;case this.months31.includes(t):default:i=31}return i}}]),t}();e.default=o},function(t,e,i){"use strict";var a=i(3)("unscopables"),s=Array.prototype;void 0==s[a]&&i(7)(s,a,{}),t.exports=function(t){s[a][t]=!0}},function(t,e,i){"use strict";var a=i(31),s=i(51),r=i(84);t.exports=function(t){return function(e,i,n){var o,l=a(e),h=s(l.length),c=r(n,h);if(t&&i!=i){for(;h>c;)if((o=l[c++])!=o)return!0}else for(;h>c;c++)if((t||c in l)&&l[c]===i)return t||c||0;return!t&&-1}}},function(t,e,i){"use strict";t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,i){"use strict";t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,i){"use strict";var a=i(2).document;t.exports=a&&a.documentElement},function(t,e,i){"use strict";var a=i(26),s=i(10),r=i(13),n=i(7),o=i(12),l=i(73),h=i(28),c=i(79),u=i(3)("iterator"),d=!([].keys&&"next"in[].keys()),f=function(){return this};t.exports=function(t,e,i,p,g,x,v){l(i,e,p);var b,m,y,w=function(t){if(!d&&t in C)return C[t];switch(t){case"keys":case"values":return function(){return new i(this,t)}}return function(){return new i(this,t)}},k=e+" Iterator",S="values"==g,A=!1,C=t.prototype,P=C[u]||C["@@iterator"]||g&&C[g],M=P||w(g),T=g?S?w("entries"):M:void 0,L="Array"==e?C.entries||P:P;if(L&&(y=c(L.call(new t)))!==Object.prototype&&y.next&&(h(y,k,!0),a||"function"==typeof y[u]||n(y,u,f)),S&&P&&"values"!==P.name&&(A=!0,M=function(){return P.call(this)}),a&&!v||!d&&!A&&C[u]||n(C,u,M),o[e]=M,o[k]=f,g)if(b={values:S?M:w("values"),keys:x?M:w("keys"),entries:T},v)for(m in b)m in C||r(C,m,b[m]);else s(s.P+s.F*(d||A),e,b);return b}},function(t,e,i){"use strict";var a=i(80),s=i(40);t.exports=Object.keys||function(t){return a(t,s)}},function(t,e,i){"use strict";t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,e,i){"use strict";var a=i(6),s=i(11),r=i(27);t.exports=function(t,e){if(a(t),s(e)&&e.constructor===t)return e;var i=r.f(t);return(0,i.resolve)(e),i.promise}},function(t,e,i){"use strict";t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,i){"use strict";var a=i(5),s=i(2),r=s["__core-js_shared__"]||(s["__core-js_shared__"]={});(t.exports=function(t,e){return r[t]||(r[t]=void 0!==e?e:{})})("versions",[]).push({version:a.version,mode:i(26)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(t,e,i){"use strict";var a=i(6),s=i(16),r=i(3)("species");t.exports=function(t,e){var i,n=a(t).constructor;return void 0===n||void 0==(i=a(n)[r])?e:s(i)}},function(t,e,i){"use strict";var a,s,r,n=i(18),o=i(69),l=i(42),h=i(25),c=i(2),u=c.process,d=c.setImmediate,f=c.clearImmediate,p=c.MessageChannel,g=c.Dispatch,x=0,v={},b=function(){var t=+this;if(v.hasOwnProperty(t)){var e=v[t];delete v[t],e()}},m=function(t){b.call(t.data)};d&&f||(d=function(t){for(var e=[],i=1;arguments.length>i;)e.push(arguments[i++]);return v[++x]=function(){o("function"==typeof t?t:Function(t),e)},a(x),x},f=function(t){delete v[t]},"process"==i(17)(u)?a=function(t){u.nextTick(n(b,t,1))}:g&&g.now?a=function(t){g.now(n(b,t,1))}:p?(s=new p,r=s.port2,s.port1.onmessage=m,a=n(r.postMessage,r,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScripts?(a=function(t){c.postMessage(t+"","*")},c.addEventListener("message",m,!1)):a="onreadystatechange"in h("script")?function(t){l.appendChild(h("script")).onreadystatechange=function(){l.removeChild(this),b.call(t)}}:function(t){setTimeout(n(b,t,1),0)}),t.exports={set:d,clear:f}},function(t,e,i){"use strict";var a=i(30),s=Math.min;t.exports=function(t){return t>0?s(a(t),9007199254740991):0}},function(t,e,i){"use strict";function a(t){return t&&t.__esModule?t:{default:t}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var i=0;i0&&(this.seriesLen=this.seriesLen+1,this.totalItems+=t[n].length);0===this.seriesLen&&(this.seriesLen=1);var l=s.group({class:"apexcharts-bar-series apexcharts-plot-series"});l.attr("clip-path","url(#gridRectMask"+a.globals.cuid+")");for(var h=0,c=0;h0&&(i.visibleI=i.visibleI+1);var w=0,k=0,S=0;i.yRatio.length>1&&(i.yaxisIndex=m);var A=i.initialPositions();d=A.y,k=A.barHeight,p=A.yDivision,x=A.zeroW,u=A.x,S=A.barWidth,f=A.xDivision,g=A.zeroH,i.horizontal||b.push(u+S/2);for(var C=s.group({class:"apexcharts-datalabels"}),P=0,M=a.globals.dataPoints;P0&&b.push(u+S/2),v.push(d);var P=i.barOptions.distributed?e:n,M=null;if(i.barOptions.colors.ranges.length>0){i.barOptions.colors.ranges.map(function(i,a){t[n][e]>=i.from&&t[n][e]<=i.to&&(M=i.color)})}var T=r.fillPath(y,{seriesNumber:i.barOptions.distributed?P:m,color:M}),L=a.config.stroke.colors[m];i.isNullValue&&(T="none");var z=e/a.config.chart.animations.animateGradually.delay*(a.config.chart.animations.speed/a.globals.dataPoints)/2.4,X=s.renderPaths({i:n,realIndex:m,pathFrom:c,pathTo:h,stroke:L,strokeWidth:w,fill:T,animationDelay:z,initialSpeed:a.config.chart.animations.speed,dataChangeSpeed:a.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-bar-area",id:"apexcharts-bar-area"});i.setSelectedBarFilter(X,m,e),y.add(X);var E=i.calculateBarDataLabels({x:u,y:d,i:n,j:e,series:t,realIndex:m,barHeight:k,barWidth:S,renderedPath:X,visibleSeries:i.visibleI});null!==E&&C.add(E),y.add(C)}(P);a.globals.seriesXvalues[m]=b,a.globals.seriesYvalues[m]=v,l.add(y)}(h,c);return l}},{key:"initialPositions",value:function(){var t=this.w,e=void 0,i=void 0,a=void 0,s=void 0,r=void 0,n=void 0,o=void 0,l=void 0;return this.isHorizontal?(a=t.globals.gridHeight/t.globals.dataPoints,r=a/this.seriesLen,t.globals.dataXY&&(a=t.globals.gridHeight/this.totalItems,r=a/this.seriesLen),r=r*parseInt(this.barOptions.barHeight)/100,l=this.baseLineInvertedY+t.globals.padHorizontal,i=(a-r*this.seriesLen)/2):(s=t.globals.gridWidth/t.globals.dataPoints,n=s/this.seriesLen,t.globals.dataXY?(s=t.globals.gridWidth/(this.totalItems/2),n=s/(this.seriesLen+1)*(parseInt(this.barOptions.columnWidth)/100)):n=n*parseInt(this.barOptions.columnWidth)/100,o=t.globals.gridHeight-this.baseLineY[this.yaxisIndex],e=t.globals.padHorizontal+(s-n*this.seriesLen)/2),{x:e,y:i,yDivision:a,xDivision:s,barHeight:r,barWidth:n,zeroH:o,zeroW:l}}},{key:"drawBarPaths",value:function(t){var e=t.indexes,i=t.barHeight,a=t.strokeWidth,s=t.pathTo,r=t.pathFrom,n=t.zeroW,o=t.x,l=t.y,h=t.yDivision,c=t.elSeries,d=this.w,f=new u.default(this.ctx),p=e.i,g=e.j,x=e.realIndex,v=e.bc;d.globals.dataXY&&(l=(d.globals.seriesX[p][g]-d.globals.minX)/this.invertedXRatio-i);var b=l+i*this.visibleI;s=f.move(n,b),r=f.move(n,b),d.globals.previousPaths.length>0&&(r=this.getPathFrom(x,g,!0)),o=void 0===this.series[p][g]||null===this.series[p][g]?n:n+this.series[p][g]/this.invertedYRatio;var m={barHeight:i,strokeWidth:a,barYPosition:b,x:o,zeroW:n},y=this.barEndingShape(d,m,this.series,p,g);if(s=s+f.line(y.newX,b)+y.path+f.line(n,b+i-a)+f.line(n,b),r=r+f.line(n,b)+y.ending_p_from+f.line(n,b+i-a)+f.line(n,b+i-a)+f.line(n,b),d.globals.dataXY||(l+=h),this.barOptions.colors.backgroundBarColors.length>0&&0===p){v>=this.barOptions.colors.backgroundBarColors.length&&(v=0);var w=this.barOptions.colors.backgroundBarColors[v],k=f.drawRect(0,b-i*this.visibleI,d.globals.gridWidth,i*this.seriesLen,0,w,this.barOptions.colors.backgroundBarOpacity);c.add(k),k.node.classList.add("apexcharts-backgroundBar")}return{pathTo:s,pathFrom:r,x:o,y:l,barYPosition:b}}},{key:"drawColumnPaths",value:function(t){var e=t.indexes,i=t.x,a=t.y,s=t.xDivision,r=t.pathTo,n=t.pathFrom,o=t.barWidth,l=t.zeroH,h=t.strokeWidth,c=t.elSeries,d=this.w,f=new u.default(this.ctx),p=e.i,g=e.j,x=e.realIndex,v=e.bc;d.globals.dataXY&&(i=(d.globals.seriesX[p][g]-d.globals.minX)/this.xRatio-o/2);var b=i+o*this.visibleI;r=f.move(b,l),n=f.move(b,l),d.globals.previousPaths.length>0&&(n=this.getPathFrom(x,g,!0)),a=void 0===this.series[p][g]||null===this.series[p][g]?l:l-this.series[p][g]/this.yRatio[this.yaxisIndex];var m={barWidth:o,strokeWidth:h,barXPosition:b,y:a,zeroH:l},y=this.barEndingShape(d,m,this.series,p,g);if(r=r+f.line(b,y.newY)+y.path+f.line(b+o-h,l)+f.line(b,l),n=n+f.line(b,l)+y.ending_p_from+f.line(b+o-h,l)+f.line(b+o-h,l)+f.line(b,l),d.globals.dataXY||(i+=s),this.barOptions.colors.backgroundBarColors.length>0&&0===p){v>=this.barOptions.colors.backgroundBarColors.length&&(v=0);var w=this.barOptions.colors.backgroundBarColors[v],k=f.drawRect(b-o*this.visibleI,0,o*this.seriesLen,d.globals.gridHeight,0,w,this.barOptions.colors.backgroundBarOpacity);c.add(k),k.node.classList.add("apexcharts-backgroundBar")}return{pathTo:r,pathFrom:n,x:i,y:a,barXPosition:b}}},{key:"getPathFrom",value:function(t,e){for(var i=(arguments.length>2&&void 0!==arguments[2]&&arguments[2],this.w),a=void 0,s=0;s0&&parseInt(r.realIndex)===parseInt(t)&&void 0!==i.globals.previousPaths[s].paths[e]&&(a=i.globals.previousPaths[s].paths[e].d)}return a}},{key:"calculateBarDataLabels",value:function(t){var e=t.x,i=t.y,a=t.i,s=t.j,r=t.realIndex,n=t.series,o=t.barHeight,l=t.barWidth,h=t.visibleSeries,c=t.renderedPath,d=this.w,f=new u.default(this.ctx),p=Array.isArray(this.strokeWidth)?this.strokeWidth[r]:this.strokeWidth,g=e+parseFloat(l*h),x=i+parseFloat(o*h),v=d.config.dataLabels.offsetX,b=d.config.dataLabels.offsetY;d.globals.dataXY&&(g=e+parseFloat(l*(h+1))-p,x=i+parseFloat(o*(h+1))-p);var m=null,y=e,w=i,k=d.config.dataLabels,S=this.barOptions.dataLabels,A=d.globals.gridHeight/d.globals.dataPoints,C=d.globals.gridWidth/d.globals.dataPoints,P=0!==Math.abs(d.globals.minY),M=f.getTextRects(d.globals.series[a][s],parseInt(k.style.fontSize));if(this.isHorizontal){w=x-A+o/2+M.height/2+b-3;var T=d.globals.gridWidth-this.baseLineInvertedY,L=n[a][s]/this.invertedYRatio,z=d.globals.gridWidth-T,X=!!(eY&&0!==Math.abs(this.baseLineY[this.yaxisIndex]));switch(S.position){case"center":w=i+E/2+M.height/2-b,P&&(w=O?i+E/2+M.height/2+b:i+E/2+M.height/2-b);break;case"bottom":w=P?O?i+E+M.height+p+b:i+E-M.height/2+p-b:d.globals.gridHeight-M.height/2-b;break;case"top":w=P&&O?i-M.height/2-b:i+M.height+b}c.attr({cy:i,cx:g,j:s,val:n[a][s],barWidth:l}),m=this.drawCalculatedBarDataLabels({x:y,y:w,val:n[a][s],i:r,j:s,dataLabelsConfig:k})}return m}},{key:"drawCalculatedBarDataLabels",value:function(t){var e=t.x,i=t.y,a=t.val,s=t.i,r=t.j,n=t.dataLabelsConfig,o=this.w,l=new f.default(this.ctx),h=new u.default(this.ctx),c=n.formatter,d=null;if(n.enabled){d=h.group({class:"apexcharts-data-labels"});var p="";a&&(p=c(a,{seriesIndex:s,dataPointIndex:r,globals:o.globals})),l.plotDataLabelsText(e,i,p,s,r,d,n)}return d}},{key:"barEndingShape",value:function(t,e,i,a,s){var r=new u.default(this.ctx);if(this.isHorizontal){var n=null,o="",l=e.x;if(void 0!==i[a][s]||null!==i[a][s]){var h=i[a][s]<0,c=e.barHeight/2-e.strokeWidth;switch(h&&(c=-e.barHeight/2-e.strokeWidth),t.config.chart.stacked||("arrow"===this.barOptions.endingShape?l=e.x-c:"rounded"===this.barOptions.endingShape&&(l=e.x-c/2)),this.barOptions.endingShape){case"flat":n=r.line(l,e.barYPosition+e.barHeight-e.strokeWidth);break;case"arrow":n=r.line(l+c,e.barYPosition+(e.barHeight-e.strokeWidth)/2)+r.line(l,e.barYPosition+e.barHeight-e.strokeWidth),o=r.line(e.zeroW,e.barYPosition+e.barHeight-e.strokeWidth);break;case"rounded":n=r.quadraticCurve(l+c,e.barYPosition+(e.barHeight-e.strokeWidth)/2,l,e.barYPosition+e.barHeight-e.strokeWidth);break;default:n=r.line(l,e.barYPosition+e.barHeight-e.strokeWidth)}}return{path:n,ending_p_from:o,newX:l}}var d=null,f="",p=e.y;if(void 0!==i[a][s]||null!==i[a][s]){var g=i[a][s]<0,x=e.barWidth/2-e.strokeWidth;switch(g&&(x=-e.barWidth/2-e.strokeWidth),t.config.chart.stacked||("arrow"===this.barOptions.endingShape?p+=x:"rounded"===this.barOptions.endingShape&&(p+=x/2)),this.barOptions.endingShape){case"flat":d=r.line(e.barXPosition+e.barWidth-e.strokeWidth,p);break;case"arrow":d=r.line(e.barXPosition+(e.barWidth-e.strokeWidth)/2,p-x)+r.line(e.barXPosition+e.barWidth-e.strokeWidth,p),f=r.line(e.barXPosition+e.barWidth-e.strokeWidth,e.zeroH);break;case"rounded":d=r.quadraticCurve(e.barXPosition+(e.barWidth-e.strokeWidth)/2,p-x,e.barXPosition+e.barWidth-e.strokeWidth,p);break;default:d=r.line(e.barXPosition+e.barWidth-e.strokeWidth,p)}}return{path:d,ending_p_from:f,newY:p}}},{key:"setSelectedBarFilter",value:function(t,e,i){var a=this.w;if(void 0!==a.globals.selectedDataPoints[e]&&a.globals.selectedDataPoints[e].includes(i)){t.node.setAttribute("selected",!0);var s=a.config.states.active.filter;if("none"!==s){new h.default(this.ctx).applyFilter(t,s.type,s.value)}}}}]),t}();e.default=p},function(t,e,i){"use strict";function a(t){return t&&t.__esModule?t:{default:t}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var i=0;ithis.fullAngle?e.endAngle=e.endAngle-(s+o):s+o360&&(l=360);var c=Math.PI*(l-90)/180,u=e.centerX+s*Math.cos(o),d=e.centerY+s*Math.sin(o),f=e.centerX+s*Math.cos(c),p=e.centerY+s*Math.sin(c),g=h.default.polarToCartesian(e.centerX,e.centerY,e.donutSize,l),x=h.default.polarToCartesian(e.centerX,e.centerY,e.donutSize,n),v=a>180?1:0;return"donut"===r.config.chart.type?["M",u,d,"A",s,s,0,v,1,f,p,"L",g.x,g.y,"A",e.donutSize,e.donutSize,0,v,0,x.x,x.y,"L",u,d,"z"].join(" "):"pie"===r.config.chart.type?["M",u,d,"A",s,s,0,v,1,f,p,"L",e.centerX,e.centerY,"L",u,d].join(" "):["M",u,d,"A",s,s,0,v,1,f,p].join(" ")}}]),t}();e.default=p},function(t,e,i){"use strict";function a(t){return t&&t.__esModule?t:{default:t}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var r=function(){function t(t,e){for(var i=0;ir&&(s=Math.floor(y.length/r));var o=!1,l=!1;switch(t.tickInterval){case"half_year":s=7,"year"===i.unit&&(o=!0);break;case"months":s=1,"year"===i.unit&&(o=!0);break;case"months_fortnight":s=15,"year"!==i.unit&&"month"!==i.unit||(o=!0),30===n&&(l=!0);break;case"months_days":s=10,"month"===i.unit&&(o=!0),30===n&&(l=!0);break;case"week_days":s=8,"month"===i.unit&&(o=!0);break;case"days":s=1,"month"===i.unit&&(o=!0);break;case"hours":"day"===i.unit&&(o=!0);break;default:o=!1}if((n%s==0||o)&&!l)return!0}),k=this.formatDates(w),S=this.removeOverlappingTS(k);return e.globals.timelineLabels=S.slice(),new h.default(this.ctx).plotCoords(),w}},{key:"determineInterval",value:function(t){switch(!0){case t>1825:this.tickInterval="years";break;case t>800&&t<=1825:this.tickInterval="half_year";break;case t>180&&t<=800:this.tickInterval="months";break;case t>90&&t<=180:this.tickInterval="months_fortnight";break;case t>60&&t<=90:this.tickInterval="months_days";break;case t>30&&t<=60:this.tickInterval="week_days";break;case t>2&&t<=30:this.tickInterval="days";break;case t<=2:this.tickInterval="hours";break;default:this.tickInterval="days"}}},{key:"generateYearScale",value:function(t){var e=t.firstVal,i=t.currentMonth,a=t.currentYear,s=t.daysWidthOnXAxis,r=t.numberOfYears,n=e.minYear,l=0,h=new o.default(this.ctx);if(e.minDate>1&&e.minMonth>0){var c=h.determineRemainingDaysOfYear(e.minYear,e.minMonth,e.minDate);l=(h.determineDaysOfYear(e.minYear)-c+1)*s,n=e.minYear+1,this.timeScaleArray.push({position:l,value:n,unit:"year",year:n,month:this.monthMod(i+1)})}else 1===e.minDate&&0===e.minMonth&&this.timeScaleArray.push({position:l,value:n,unit:"year",year:a,month:this.monthMod(i+1)});for(var u=n,d=l,f=0;f1){h=(c.determineDaysOfMonths(a+1,e.minYear)-i+1)*r,l=this.monthMod(a+1);var f=s+d,p=this.monthMod(l),g=l;0===l&&(u="year",g=f,p=1,d+=1,f+=d),this.timeScaleArray.push({position:h,value:g,unit:u,year:f,month:p})}else this.timeScaleArray.push({position:h,value:l,unit:u,year:s,month:this.monthMod(a)});for(var x=l+1,v=h,b=0,m=1;bn.determineDaysOfMonths(e+1,i)?(e+=1,f=1,l="month",e):e},c=24-e.minHour,u=c*s,d=e.minDate+1,f=d,p=h(f,i,a);this.timeScaleArray.push({position:u,value:d,unit:l,year:a,month:this.monthMod(p)});for(var g=u,x=0;xl.determineDaysOfMonths(e+1,s)?e+=1:e},u=60-e.minMinute,d=u*r,f=e.minHour+1,p=f+1,g=i,x=c(g,a);this.timeScaleArray.push({position:d,value:f,unit:h,day:g,year:s,month:this.monthMod(x)});for(var v=d,b=0;b=24){p=0,g+=1,h="day";var m=function(t,e){return t>l.determineDaysOfMonths(e+1,s)&&(g=1,e+=1),{month:e,date:g}}(g,x);x=m.month,x=c(g,x)}var y=s+Math.floor(x/12)+0;v=60*r+v;var w=0===p?g:p;this.timeScaleArray.push({position:v,value:w,unit:h,day:g,year:y,month:this.monthMod(x)}),p++}}},{key:"formatDates",value:function(t){var e=this,i=this.w;return t.map(function(t){var a=t.value.toString(),s=new o.default(e.ctx),r=t.year;if(r+="-"+("0"+t.month.toString()).slice(-2),r+="day"===t.unit?"-"+("0"+a).slice(-2):"-01",r+="hour"===t.unit?"T"+("0"+a).slice(-2)+":00:00":"T00:00:00",r=new Date(Date.parse(r)),void 0===i.config.xaxis.labels.format){var n="dd MMM",l=i.config.xaxis.labels.datetimeFormatter;"year"===t.unit&&(n=l.year),"month"===t.unit&&(n=l.month),"day"===t.unit&&(n=l.day),"hour"===t.unit&&(n=l.hour),a=s.formatDate(r,n)}else a=s.formatDate(r,i.config.xaxis.labels.format);return{position:t.position,value:a,unit:t.unit,year:t.year,month:t.month}})}},{key:"removeOverlappingTS",value:function(t){var e=new u.default(this.ctx),i=0,a=t.map(function(a,s){if(s>0){var r=e.getTextRects(t[i].value).width,n=t[i].position;return a.position>n+r+10?(i=s,a):null}return a});return a=a.filter(function(t){return null!==t})}},{key:"monthMod",value:function(t){return t%12}}]),t}();e.default=d},function(t,e,i){"use strict";function a(t){return t&&t.__esModule?t:{default:t}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var r=function(){function t(t,e){for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:null,i=this.ttCtx,a=this.w,s=t-i.xcrosshairsWidth/2,r=a.globals.labels.slice().length;if(null!==e&&(s=a.globals.gridWidth/r*e),"tickWidth"===a.config.xaxis.crosshairs.width||"barWidth"===a.config.xaxis.crosshairs.width?(i.isBarShared,s+i.xcrosshairsWidth>a.globals.gridWidth&&(s=a.globals.gridWidth-i.xcrosshairsWidth),s<0&&(s=0)):null!==e&&(s+=a.globals.gridWidth/r/2),null!==i.xcrosshairs&&(i.xcrosshairs.setAttribute("x",s),i.xcrosshairs.classList.add("active")),i.blxaxisTooltip){var n=s;"tickWidth"!==a.config.xaxis.crosshairs.width&&"barWidth"!==a.config.xaxis.crosshairs.width||(n=s+i.xcrosshairsWidth/2),this.moveXAxisTooltip(n)}}},{key:"moveYCrosshairs",value:function(t){var e=this.ttCtx;null!==e.ycrosshairs&&(o.default.setAttrs(e.ycrosshairs,{y1:t,y2:t}),o.default.setAttrs(e.ycrosshairsHidden,{y1:t,y2:t}))}},{key:"moveXAxisTooltip",value:function(t){var e=this.w,i=this.ttCtx;if(null!==i.xaxisTooltip){i.xaxisTooltip.classList.add("active");var a=i.xaxisOffY+e.config.xaxis.tooltip.offsetY+e.globals.translateY+1;if(t-=i.xaxisTooltip.getBoundingClientRect().width/2,!isNaN(t)){t+=e.globals.translateX;var s=0;s=new o.default(this.ctx).getTextRects(i.xaxisTooltipText.innerHTML),i.xaxisTooltipText.style.minWidth=s.width+"px",i.xaxisTooltip.style.left=t+"px",i.xaxisTooltip.style.top=a+"px"}}}},{key:"moveYAxisTooltip",value:function(t){var e=this.w,i=this.ttCtx;null===i.yaxisTTEls&&(i.yaxisTTEls=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));var a=parseInt(i.ycrosshairsHidden.getAttribute("y1")),s=e.globals.translateY+a,r=i.yaxisTTEls[t].getBoundingClientRect(),n=r.height,o=e.globals.translateYAxisX[t]-2;e.config.yaxis[t].opposite&&(o-=26),s-=n/2,e.globals.ignoreYAxisIndexes.includes(t)?i.yaxisTTEls[t].classList.remove("active"):(i.yaxisTTEls[t].classList.add("active"),i.yaxisTTEls[t].style.top=s+"px",i.yaxisTTEls[t].style.left=o+e.config.yaxis[t].tooltip.offsetX+"px")}},{key:"moveTooltip",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=this.w,s=this.ttCtx,r=s.tooltipRect,n=null!==i?parseInt(i):1,o=parseInt(t)+n+5,l=parseInt(e)+n/2;o>a.globals.gridWidth/2&&(o=o-r.ttWidth-n-15),o>a.globals.gridWidth-r.ttWidth-10&&(o=a.globals.gridWidth-r.ttWidth),o<-20&&(o=-20),a.config.tooltip.followCursor&&(l=s.e.clientY-s.seriesBound.top-r.ttHeight/2),r.ttHeight+l>a.globals.gridHeight&&(l=a.globals.gridHeight-r.ttHeight/2-n),isNaN(o)||(o+=a.globals.translateX,s.tooltip.style.left=o+"px",s.tooltip.style.top=l+"px")}},{key:"moveMarkers",value:function(t,e){var i=this.w,a=this.ttCtx;if(i.config.markers.size>0)for(var s=i.globals.dom.baseEl.querySelectorAll(" .apexcharts-series[data\\:realIndex='"+t+"'] .apexcharts-marker"),r=0;rn.globals.gridWidth||u>n.globals.gridHeight?(e.classList.remove("hovering-zoom"),e.classList.remove("hovering-pan")):n.globals.zoomEnabled?(e.classList.remove("hovering-pan"),e.classList.add("hovering-zoom")):n.globals.panEnabled&&(e.classList.remove("hovering-zoom"),e.classList.add("hovering-pan"));var d=Math.round(c/l);r&&(d=Math.ceil(c/l),d-=1);for(var f=null,p=null,g=[],x=[],v=0;v1?r=this.getFirstActiveXArray(i):n=0;var l=a[r][0],h=i[r][0],c=Math.abs(t-h),u=Math.abs(e-l),d=u+c;return a.map(function(s,r){s.map(function(s,l){var h=Math.abs(e-a[r][l]),f=Math.abs(t-i[r][l]),p=f+h;p0?e:-1}),a=0;a0)for(var s=0;s0?t:[]})}},{key:"getBarsHeight",value:function(t){return[].concat(a(t)).reduce(function(t,e){return t+e.getBBox().height},0)}},{key:"toggleAllTooltipSeriesGroups",value:function(t){var e=this.w,i=this.ttCtx;0===i.allTooltipSeriesGroups.length&&(i.allTooltipSeriesGroups=e.globals.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));for(var a=i.allTooltipSeriesGroups,s=0;s1)throw new Error("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false");e.xaxis.tooltip.enabled=!1,e.yaxis[0].tooltip.enabled=!1,e.chart.zoom.enabled=!1}return"bar"===e.chart.type&&e.tooltip.shared&&("barWidth"===e.xaxis.crosshairs.width&&e.series.length>1&&(console.warn("barWidth is only supported in single series, not multi-series barchart"),e.xaxis.crosshairs.width="tickWidth"),e.plotOptions.bar.horizontal&&(e.states.hover.type="none"),e.tooltip.followCursor||(console.warn("followCursor option in shared columns cannot be turned off"),e.tooltip.followCursor=!0)),Array.isArray(e.stroke.width)&&"line"!==e.chart.type&&"area"!==e.chart.type&&(console.warn("stroke.width option accepts array only for line and area charts. Reverted back to Number"),e.stroke.width=e.stroke.width[0]),e}}]),t}();t.exports=f},function(t,e,i){"use strict";function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var i=0;i=0;i--)e.childNodes[i]instanceof t.SVGElement&&v(e.childNodes[i]);return w.adopt(e).id(w.eid(e.nodeName))}function b(t){return null==t.x&&(t.x=0,t.y=0,t.width=0,t.height=0),t.w=t.width,t.h=t.height,t.x2=t.x+t.width,t.y2=t.y+t.height,t.cx=t.x+t.width/2,t.cy=t.y+t.height/2,t}function m(t){var e=(t||"").toString().match(w.regex.reference);if(e)return e[1]}function y(t){return Math.abs(t)>1e-37?t:0}var w=(this||t).SVG=function(t){if(w.supported)return t=new w.Doc(t),w.parser.draw||w.prepare(),t};if(w.ns="http://www.w3.org/2000/svg",w.xmlns="http://www.w3.org/2000/xmlns/",w.xlink="http://www.w3.org/1999/xlink",w.svgjs="http://svgjs.com/svgjs",w.supported=function(){return!!e.createElementNS&&!!e.createElementNS(w.ns,"svg").createSVGRect}(),!w.supported)return!1;w.did=1e3,w.eid=function(t){return"Svgjs"+l(t)+w.did++},w.create=function(t){var i=e.createElementNS(this.ns,t);return i.setAttribute("id",this.eid(t)),i},w.extend=function(){var t,e,i,a;for(t=[].slice.call(arguments),e=t.pop(),a=t.length-1;a>=0;a--)if(t[a])for(i in e)t[a].prototype[i]=e[i];w.Set&&w.Set.inherit&&w.Set.inherit()},w.invent=function(t){var e="function"==typeof t.create?t.create:function(){this.constructor.call(this,w.create(t.create))};return t.inherit&&(e.prototype=new t.inherit),t.extend&&w.extend(e,t.extend),t.construct&&w.extend(t.parent||w.Container,t.construct),e},w.adopt=function(e){if(!e)return null;if(e.instance)return e.instance;var i;return i="svg"==e.nodeName?e.parentNode instanceof t.SVGElement?new w.Nested:new w.Doc:"linearGradient"==e.nodeName?new w.Gradient("linear"):"radialGradient"==e.nodeName?new w.Gradient("radial"):w[l(e.nodeName)]?new(w[l(e.nodeName)]):new w.Element(e),i.type=e.nodeName,i.node=e,e.instance=i,i instanceof w.Doc&&i.namespace().defs(),i.setData(JSON.parse(e.getAttribute("svgjs:data"))||{}),i},w.prepare=function(){var t=e.getElementsByTagName("body")[0],i=(t?new w.Doc(t):w.adopt(e.documentElement).nested()).size(2,0);w.parser={body:t||e.documentElement,draw:i.style("opacity:0;position:absolute;left:-100%;top:-100%;overflow:hidden").node,poly:i.polyline().node,path:i.path().node,native:w.create("svg")}},w.parser={native:w.create("svg")},e.addEventListener("DOMContentLoaded",function(){w.parser.draw||w.prepare()},!1),w.regex={numberAndUnit:/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,hex:/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,rgb:/rgb\((\d+),(\d+),(\d+)\)/,reference:/#([a-z0-9\-_]+)/i,transforms:/\)\s*,?\s*/,whitespace:/\s/g,isHex:/^#[a-f0-9]{3,6}$/i,isRgb:/^rgb\(/,isCss:/[^:]+:[^;]+;?/,isBlank:/^(\s+)?$/,isNumber:/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,isPercent:/^-?[\d\.]+%$/,isImage:/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,delimiter:/[\s,]+/,hyphen:/([^e])\-/gi,pathLetters:/[MLHVCSQTAZ]/gi,isPathLetter:/[MLHVCSQTAZ]/i,numbersWithDots:/((\d?\.\d+(?:e[+-]?\d+)?)((?:\.\d+(?:e[+-]?\d+)?)+))+/gi,dots:/\./g},w.utils={map:function(t,e){var i,a=t.length,s=[];for(i=0;i1?1:t,new w.Color({r:~~(this.r+(this.destination.r-this.r)*t),g:~~(this.g+(this.destination.g-this.g)*t),b:~~(this.b+(this.destination.b-this.b)*t)})):this}}),w.Color.test=function(t){return t+="",w.regex.isHex.test(t)||w.regex.isRgb.test(t)},w.Color.isRgb=function(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b},w.Color.isColor=function(t){return w.Color.isRgb(t)||w.Color.test(t)},w.Array=function(t,e){t=(t||[]).valueOf(),0==t.length&&e&&(t=e.valueOf()),this.value=this.parse(t)},w.extend(w.Array,{morph:function(t){if(this.destination=this.parse(t),this.value.length!=this.destination.length){for(var e=this.value[this.value.length-1],i=this.destination[this.destination.length-1];this.value.length>this.destination.length;)this.destination.push(i);for(;this.value.length=0;a--)this.value[a]=[this.value[a][0]+t,this.value[a][1]+e];return this},size:function(t,e){var i,a=this.bbox();for(i=this.value.length-1;i>=0;i--)a.width&&(this.value[i][0]=(this.value[i][0]-a.x)*t/a.width+a.x),a.height&&(this.value[i][1]=(this.value[i][1]-a.y)*e/a.height+a.y);return this},bbox:function(){return w.parser.poly.setAttribute("points",this.toString()),w.parser.poly.getBBox()}});for(var k={M:function(t,e,i){return e.x=i.x=t[0],e.y=i.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,e){return e.x=t[0],e.y=t[1],["T",t[0],t[1]]},Z:function(t,e,i){return e.x=i.x,e.y=i.y,["Z"]},A:function(t,e){return e.x=t[5],e.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},S="mlhvqtcsaz".split(""),A=0,C=S.length;A=0;s--)a=this.value[s][0],"M"==a||"L"==a||"T"==a?(this.value[s][1]+=t,this.value[s][2]+=e):"H"==a?this.value[s][1]+=t:"V"==a?this.value[s][1]+=e:"C"==a||"S"==a||"Q"==a?(this.value[s][1]+=t,this.value[s][2]+=e,this.value[s][3]+=t,this.value[s][4]+=e,"C"==a&&(this.value[s][5]+=t,this.value[s][6]+=e)):"A"==a&&(this.value[s][6]+=t,this.value[s][7]+=e);return this},size:function(t,e){var i,a,s=this.bbox();for(i=this.value.length-1;i>=0;i--)a=this.value[i][0],"M"==a||"L"==a||"T"==a?(this.value[i][1]=(this.value[i][1]-s.x)*t/s.width+s.x,this.value[i][2]=(this.value[i][2]-s.y)*e/s.height+s.y):"H"==a?this.value[i][1]=(this.value[i][1]-s.x)*t/s.width+s.x:"V"==a?this.value[i][1]=(this.value[i][1]-s.y)*e/s.height+s.y:"C"==a||"S"==a||"Q"==a?(this.value[i][1]=(this.value[i][1]-s.x)*t/s.width+s.x,this.value[i][2]=(this.value[i][2]-s.y)*e/s.height+s.y,this.value[i][3]=(this.value[i][3]-s.x)*t/s.width+s.x,this.value[i][4]=(this.value[i][4]-s.y)*e/s.height+s.y,"C"==a&&(this.value[i][5]=(this.value[i][5]-s.x)*t/s.width+s.x,this.value[i][6]=(this.value[i][6]-s.y)*e/s.height+s.y)):"A"==a&&(this.value[i][1]=this.value[i][1]*t/s.width,this.value[i][2]=this.value[i][2]*e/s.height,this.value[i][6]=(this.value[i][6]-s.x)*t/s.width+s.x,this.value[i][7]=(this.value[i][7]-s.y)*e/s.height+s.y);return this},equalCommands:function(t){var e,i,a;for(t=new w.PathArray(t),a=this.value.length===t.value.length,e=0,i=this.value.length;a&&eo);return a},bbox:function(){return w.parser.path.setAttribute("d",this.toString()),w.parser.path.getBBox()}}),w.Number=w.invent({create:function(t,e){this.value=0,this.unit=e||"","number"==typeof t?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-3.4e38:3.4e38:"string"==typeof t?(e=t.match(w.regex.numberAndUnit))&&(this.value=parseFloat(e[1]),"%"==e[5]?this.value/=100:"s"==e[5]&&(this.value*=1e3),this.unit=e[5]):t instanceof w.Number&&(this.value=t.valueOf(),this.unit=t.unit)},extend:{toString:function(){return("%"==this.unit?~~(1e8*this.value)/1e6:"s"==this.unit?this.value/1e3:this.value)+this.unit},toJSON:function(){return this.toString()},valueOf:function(){return this.value},plus:function(t){return t=new w.Number(t),new w.Number(this+t,this.unit||t.unit)},minus:function(t){return t=new w.Number(t),new w.Number(this-t,this.unit||t.unit)},times:function(t){return t=new w.Number(t),new w.Number(this*t,this.unit||t.unit)},divide:function(t){return t=new w.Number(t),new w.Number(this/t,this.unit||t.unit)},to:function(t){var e=new w.Number(this);return"string"==typeof t&&(e.unit=t),e},morph:function(t){return this.destination=new w.Number(t),t.relative&&(this.destination.value+=this.value),this},at:function(t){return this.destination?new w.Number(this.destination).minus(this).times(t).plus(this):this}}}),w.Element=w.invent({create:function(t){this._stroke=w.defaults.attrs.stroke,this._event=null,this.dom={},(this.node=t)&&(this.type=t.nodeName,this.node.instance=this,this._stroke=t.getAttribute("stroke")||this._stroke)},extend:{x:function(t){return this.attr("x",t)},y:function(t){return this.attr("y",t)},cx:function(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)},cy:function(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)},move:function(t,e){return this.x(t).y(e)},center:function(t,e){return this.cx(t).cy(e)},width:function(t){return this.attr("width",t)},height:function(t){return this.attr("height",t)},size:function(t,e){var i=u(this,t,e);return this.width(new w.Number(i.width)).height(new w.Number(i.height))},clone:function(t){this.writeDataToDom();var e=v(this.node.cloneNode(!0));return t?t.add(e):this.after(e),e},remove:function(){return this.parent()&&this.parent().removeElement(this),this},replace:function(t){return this.after(t).remove(),t},addTo:function(t){return t.put(this)},putIn:function(t){return t.add(this)},id:function(t){return this.attr("id",t)},inside:function(t,e){var i=this.bbox();return t>i.x&&e>i.y&&t/,"").replace(/<\/svg>$/,"");i.innerHTML=""+t.replace(/\n/,"").replace(/<([\w:-]+)([^<]+?)\/>/g,"<$1$2>")+"";for(var a=0,s=i.firstChild.childNodes.length;a":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)}},w.morph=function(t){return function(e,i){return new w.MorphObj(e,i).at(t)}},w.Situation=w.invent({create:function(t){this.init=!1,this.reversed=!1,this.reversing=!1,this.duration=new w.Number(t.duration).valueOf(),this.delay=new w.Number(t.delay).valueOf(),this.start=+new Date+this.delay,this.finish=this.start+this.duration,this.ease=t.ease,this.loop=0,this.loops=!1,this.animations={},this.attrs={},this.styles={},this.transforms=[],this.once={}}}),w.FX=w.invent({create:function(t){this._target=t,this.situations=[],this.active=!1,this.situation=null,this.paused=!1,this.lastPos=0,this.pos=0,this.absPos=0,this._speed=1},extend:{animate:function(t,e,i){"object"==(void 0===t?"undefined":s(t))&&(e=t.ease,i=t.delay,t=t.duration);var a=new w.Situation({duration:t||1e3,delay:i||0,ease:w.easing[e||"-"]||e});return this.queue(a),this},delay:function(t){var e=new w.Situation({duration:t,delay:0,ease:w.easing["-"]});return this.queue(e)},target:function(t){return t&&t instanceof w.Element?(this._target=t,this):this._target},timeToAbsPos:function(t){return(t-this.situation.start)/(this.situation.duration/this._speed)},absPosToTime:function(t){return this.situation.duration/this._speed*t+this.situation.start},startAnimFrame:function(){this.stopAnimFrame(),this.animationFrame=t.requestAnimationFrame(function(){this.step()}.bind(this))},stopAnimFrame:function(){t.cancelAnimationFrame(this.animationFrame)},start:function(){return!this.active&&this.situation&&(this.active=!0,this.startCurrent()),this},startCurrent:function(){return this.situation.start=+new Date+this.situation.delay/this._speed,this.situation.finish=this.situation.start+this.situation.duration/this._speed,this.initAnimations().step()},queue:function(t){return("function"==typeof t||t instanceof w.Situation)&&this.situations.push(t),this.situation||(this.situation=this.situations.shift()),this},dequeue:function(){return this.stop(),this.situation=this.situations.shift(),this.situation&&(this.situation instanceof w.Situation?this.start():this.situation.call(this)),this},initAnimations:function(){var t,e,i,a=this.situation;if(a.init)return this;for(t in a.animations)for(i=this.target()[t](),Array.isArray(i)||(i=[i]),Array.isArray(a.animations[t])||(a.animations[t]=[a.animations[t]]),e=i.length;e--;)a.animations[t][e]instanceof w.Number&&(i[e]=new w.Number(i[e])),a.animations[t][e]=i[e].morph(a.animations[t][e]);for(t in a.attrs)a.attrs[t]=new w.MorphObj(this.target().attr(t),a.attrs[t]);for(t in a.styles)a.styles[t]=new w.MorphObj(this.target().style(t),a.styles[t]);return a.initialTransformation=this.target().matrixify(),a.init=!0,this},clearQueue:function(){return this.situations=[],this},clearCurrent:function(){return this.situation=null,this},stop:function(t,e){var i=this.active;return this.active=!1,e&&this.clearQueue(),t&&this.situation&&(!i&&this.startCurrent(),this.atEnd()),this.stopAnimFrame(),this.clearCurrent()},reset:function(){if(this.situation){var t=this.situation;this.stop(),this.situation=t,this.atStart()}return this},finish:function(){for(this.stop(!0,!1);this.dequeue().situation&&this.stop(!0,!1););return this.clearQueue().clearCurrent(),this},atStart:function(){return this.at(0,!0)},atEnd:function(){return!0===this.situation.loops&&(this.situation.loops=this.situation.loop+1),"number"==typeof this.situation.loops?this.at(this.situation.loops,!0):this.at(1,!0)},at:function(t,e){var i=this.situation.duration/this._speed;return this.absPos=t,e||(this.situation.reversed&&(this.absPos=1-this.absPos),this.absPos+=this.situation.loop),this.situation.start=+new Date-this.absPos*i,this.situation.finish=this.situation.start+i,this.step(!0)},speed:function(t){return 0===t?this.pause():t?(this._speed=t,this.at(this.absPos,!0)):this._speed},loop:function(t,e){var i=this.last();return i.loops=null==t||t,i.loop=0,e&&(i.reversing=!0),this},pause:function(){return this.paused=!0,this.stopAnimFrame(),this},play:function(){return this.paused?(this.paused=!1,this.at(this.absPos,!0)):this},reverse:function(t){var e=this.last();return e.reversed=void 0===t?!e.reversed:t,this},progress:function(t){return t?this.situation.ease(this.pos):this.pos},after:function(t){var e=this.last(),i=function i(a){a.detail.situation==e&&(t.call(this,e),this.off("finished.fx",i))};return this.target().on("finished.fx",i),this._callStart()},during:function(t){var e=this.last(),i=function(i){i.detail.situation==e&&t.call(this,i.detail.pos,w.morph(i.detail.pos),i.detail.eased,e)};return this.target().off("during.fx",i).on("during.fx",i),this.after(function(){this.off("during.fx",i)}),this._callStart()},afterAll:function(t){var e=function e(i){t.call(this),this.off("allfinished.fx",e)};return this.target().off("allfinished.fx",e).on("allfinished.fx",e),this._callStart()},duringAll:function(t){var e=function(e){t.call(this,e.detail.pos,w.morph(e.detail.pos),e.detail.eased,e.detail.situation)};return this.target().off("during.fx",e).on("during.fx",e),this.afterAll(function(){this.off("during.fx",e)}),this._callStart()},last:function(){return this.situations.length?this.situations[this.situations.length-1]:this.situation},add:function(t,e,i){return this.last()[i||"animations"][t]=e,this._callStart()},step:function(t){if(t||(this.absPos=this.timeToAbsPos(+new Date)),!1!==this.situation.loops){var e,i,a;e=Math.max(this.absPos,0),i=Math.floor(e),!0===this.situation.loops||ithis.lastPos&&r<=s&&(this.situation.once[r].call(this.target(),this.pos,s),delete this.situation.once[r]);return this.active&&this.target().fire("during",{pos:this.pos,eased:s,fx:this,situation:this.situation}),this.situation?(this.eachAt(),1==this.pos&&!this.situation.reversed||this.situation.reversed&&0==this.pos?(this.stopAnimFrame(),this.target().fire("finished",{fx:this,situation:this.situation}),this.situations.length||(this.target().fire("allfinished"),this.situations.length||(this.target().off(".fx"),this.active=!1)),this.active?this.dequeue():this.clearCurrent()):!this.paused&&this.active&&this.startAnimFrame(),this.lastPos=s,this):this},eachAt:function(){var t,e,i,a=this,s=this.target(),r=this.situation;for(t in r.animations)i=[].concat(r.animations[t]).map(function(t){return"string"!=typeof t&&t.at?t.at(r.ease(a.pos),a.pos):t}),s[t].apply(s,i);for(t in r.attrs)i=[t].concat(r.attrs[t]).map(function(t){return"string"!=typeof t&&t.at?t.at(r.ease(a.pos),a.pos):t}),s.attr.apply(s,i);for(t in r.styles)i=[t].concat(r.styles[t]).map(function(t){return"string"!=typeof t&&t.at?t.at(r.ease(a.pos),a.pos):t}),s.style.apply(s,i);if(r.transforms.length){for(i=r.initialTransformation,t=0,e=r.transforms.length;t=0;--e)this[M[e]]=null!=t[M[e]]?t[M[e]]:i[M[e]]},extend:{extract:function(){var t=d(this,0,1),e=d(this,1,0),i=180/Math.PI*Math.atan2(t.y,t.x)-90;return{x:this.e,y:this.f,transformedX:(this.e*Math.cos(i*Math.PI/180)+this.f*Math.sin(i*Math.PI/180))/Math.sqrt(this.a*this.a+this.b*this.b),transformedY:(this.f*Math.cos(i*Math.PI/180)+this.e*Math.sin(-i*Math.PI/180))/Math.sqrt(this.c*this.c+this.d*this.d),skewX:-i,skewY:180/Math.PI*Math.atan2(e.y,e.x),scaleX:Math.sqrt(this.a*this.a+this.b*this.b),scaleY:Math.sqrt(this.c*this.c+this.d*this.d),rotation:i,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f,matrix:new w.Matrix(this)}},clone:function(){return new w.Matrix(this)},morph:function(t){return this.destination=new w.Matrix(t),this},at:function(t){return this.destination?new w.Matrix({a:this.a+(this.destination.a-this.a)*t,b:this.b+(this.destination.b-this.b)*t,c:this.c+(this.destination.c-this.c)*t,d:this.d+(this.destination.d-this.d)*t,e:this.e+(this.destination.e-this.e)*t,f:this.f+(this.destination.f-this.f)*t}):this},multiply:function(t){return new w.Matrix(this.native().multiply(p(t).native()))},inverse:function(){return new w.Matrix(this.native().inverse())},translate:function(t,e){return new w.Matrix(this.native().translate(t||0,e||0))},scale:function(t,e,i,a){return 1==arguments.length?e=t:3==arguments.length&&(a=i,i=e,e=t),this.around(i,a,new w.Matrix(t,0,0,e,0,0))},rotate:function(t,e,i){return t=w.utils.radians(t),this.around(e,i,new w.Matrix(Math.cos(t),Math.sin(t),-Math.sin(t),Math.cos(t),0,0))},flip:function(t,e){return"x"==t?this.scale(-1,1,e,0):"y"==t?this.scale(1,-1,0,e):this.scale(-1,-1,t,null!=e?e:t)},skew:function(t,e,i,a){return 1==arguments.length?e=t:3==arguments.length&&(a=i,i=e,e=t),t=w.utils.radians(t),e=w.utils.radians(e),this.around(i,a,new w.Matrix(1,Math.tan(e),Math.tan(t),1,0,0))},skewX:function(t,e,i){return this.skew(t,0,e,i)},skewY:function(t,e,i){return this.skew(0,t,e,i)},around:function(t,e,i){return this.multiply(new w.Matrix(1,0,0,1,t||0,e||0)).multiply(i).multiply(new w.Matrix(1,0,0,1,-t||0,-e||0))},native:function(){for(var t=w.parser.native.createSVGMatrix(),e=M.length-1;e>=0;e--)t[M[e]]=this[M[e]];return t},toString:function(){return"matrix("+y(this.a)+","+y(this.b)+","+y(this.c)+","+y(this.d)+","+y(this.e)+","+y(this.f)+")"}},parent:w.Element,construct:{ctm:function(){return new w.Matrix(this.node.getCTM())},screenCTM:function(){if(this instanceof w.Nested){var t=this.rect(1,1),e=t.node.getScreenCTM();return t.remove(),new w.Matrix(e)}return new w.Matrix(this.node.getScreenCTM())}}}),w.Point=w.invent({create:function(t,e){var i,a={x:0,y:0};i=Array.isArray(t)?{x:t[0],y:t[1]}:"object"===(void 0===t?"undefined":s(t))?{x:t.x,y:t.y}:null!=t?{x:t,y:null!=e?e:t}:a,this.x=i.x,this.y=i.y},extend:{clone:function(){return new w.Point(this)},morph:function(t,e){return this.destination=new w.Point(t,e),this},at:function(t){return this.destination?new w.Point({x:this.x+(this.destination.x-this.x)*t,y:this.y+(this.destination.y-this.y)*t}):this},native:function(){var t=w.parser.native.createSVGPoint();return t.x=this.x,t.y=this.y,t},transform:function(t){return new w.Point(this.native().matrixTransform(t.native()))}}}),w.extend(w.Element,{point:function(t,e){return new w.Point(t,e).transform(this.screenCTM().inverse())}}),w.extend(w.Element,{attr:function(t,e,i){if(null==t){for(t={},e=this.node.attributes,i=e.length-1;i>=0;i--)t[e[i].nodeName]=w.regex.isNumber.test(e[i].nodeValue)?parseFloat(e[i].nodeValue):e[i].nodeValue;return t}if("object"==(void 0===t?"undefined":s(t)))for(e in t)this.attr(e,t[e]);else if(null===e)this.node.removeAttribute(t);else{if(null==e)return e=this.node.getAttribute(t),null==e?w.defaults.attrs[t]:w.regex.isNumber.test(e)?parseFloat(e):e;"stroke-width"==t?this.attr("stroke",parseFloat(e)>0?this._stroke:null):"stroke"==t&&(this._stroke=e),"fill"!=t&&"stroke"!=t||(w.regex.isImage.test(e)&&(e=this.doc().defs().image(e,0,0)),e instanceof w.Image&&(e=this.doc().defs().pattern(0,0,function(){this.add(e)}))),"number"==typeof e?e=new w.Number(e):w.Color.isColor(e)?e=new w.Color(e):Array.isArray(e)&&(e=new w.Array(e)),"leading"==t?this.leading&&this.leading(e):"string"==typeof i?this.node.setAttributeNS(i,t,e.toString()):this.node.setAttribute(t,e.toString()),!this.rebuild||"font-size"!=t&&"x"!=t||this.rebuild(t,e)}return this}}),w.extend(w.Element,{transform:function(t,e){var i,a,r=this;if("object"!==(void 0===t?"undefined":s(t)))return i=new w.Matrix(r).extract(),"string"==typeof t?i[t]:i;if(i=new w.Matrix(r),e=!!e||!!t.relative,null!=t.a)i=e?i.multiply(new w.Matrix(t)):new w.Matrix(t);else if(null!=t.rotation)g(t,r),i=e?i.rotate(t.rotation,t.cx,t.cy):i.rotate(t.rotation-i.extract().rotation,t.cx,t.cy);else if(null!=t.scale||null!=t.scaleX||null!=t.scaleY){if(g(t,r),t.scaleX=null!=t.scale?t.scale:null!=t.scaleX?t.scaleX:1,t.scaleY=null!=t.scale?t.scale:null!=t.scaleY?t.scaleY:1,!e){var n=i.extract();t.scaleX=1*t.scaleX/n.scaleX,t.scaleY=1*t.scaleY/n.scaleY}i=i.scale(t.scaleX,t.scaleY,t.cx,t.cy)}else if(null!=t.skew||null!=t.skewX||null!=t.skewY){if(g(t,r),t.skewX=null!=t.skew?t.skew:null!=t.skewX?t.skewX:0,t.skewY=null!=t.skew?t.skew:null!=t.skewY?t.skewY:0,!e){var n=i.extract();i=i.multiply((new w.Matrix).skew(n.skewX,n.skewY,t.cx,t.cy).inverse())}i=i.skew(t.skewX,t.skewY,t.cx,t.cy)}else t.flip?("x"==t.flip||"y"==t.flip?t.offset=null==t.offset?r.bbox()["c"+t.flip]:t.offset:null==t.offset?(a=r.bbox(),t.flip=a.cx,t.offset=a.cy):t.flip=t.offset,i=(new w.Matrix).flip(t.flip,t.offset)):null==t.x&&null==t.y||(e?i=i.translate(t.x,t.y):(null!=t.x&&(i.e=t.x),null!=t.y&&(i.f=t.y)));return this.attr("transform",i)}}),w.extend(w.FX,{transform:function(t,e){var i,a,r=this.target();return"object"!==(void 0===t?"undefined":s(t))?(i=new w.Matrix(r).extract(),"string"==typeof t?i[t]:i):(e=!!e||!!t.relative,null!=t.a?i=new w.Matrix(t):null!=t.rotation?(g(t,r),i=new w.Rotate(t.rotation,t.cx,t.cy)):null!=t.scale||null!=t.scaleX||null!=t.scaleY?(g(t,r),t.scaleX=null!=t.scale?t.scale:null!=t.scaleX?t.scaleX:1,t.scaleY=null!=t.scale?t.scale:null!=t.scaleY?t.scaleY:1,i=new w.Scale(t.scaleX,t.scaleY,t.cx,t.cy)):null!=t.skewX||null!=t.skewY?(g(t,r),t.skewX=null!=t.skewX?t.skewX:0,t.skewY=null!=t.skewY?t.skewY:0,i=new w.Skew(t.skewX,t.skewY,t.cx,t.cy)):t.flip?("x"==t.flip||"y"==t.flip?t.offset=null==t.offset?r.bbox()["c"+t.flip]:t.offset:null==t.offset?(a=r.bbox(),t.flip=a.cx,t.offset=a.cy):t.flip=t.offset,i=(new w.Matrix).flip(t.flip,t.offset)):null==t.x&&null==t.y||(i=new w.Translate(t.x,t.y)),i?(i.relative=e,this.last().transforms.push(i),this._callStart()):this)}}),w.extend(w.Element,{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(w.regex.transforms).slice(0,-1).map(function(t){var e=t.trim().split("(");return[e[0],e[1].split(w.regex.delimiter).map(function(t){return parseFloat(t)})]}).reduce(function(t,e){return"matrix"==e[0]?t.multiply(f(e[1])):t[e[0]].apply(t,e[1])},new w.Matrix)},toParent:function(t){if(this==t)return this;var e=this.screenCTM(),i=t.screenCTM().inverse();return this.addTo(t).untransform().transform(i.multiply(e)),this},toDoc:function(){return this.toParent(this.doc())}}),w.Transformation=w.invent({create:function(t,e){if(arguments.length>1&&"boolean"!=typeof e)return this.constructor.call(this,[].slice.call(arguments));if(Array.isArray(t))for(var i=0,a=this.arguments.length;i=0},index:function(t){return[].slice.call(this.node.childNodes).indexOf(t.node)},get:function(t){return w.adopt(this.node.childNodes[t])},first:function(){return this.get(0)},last:function(){return this.get(this.node.childNodes.length-1)},each:function(t,e){var i,a,s=this.children();for(i=0,a=s.length;ia/r?this.height/r:this.width/a,this.x=e,this.y=i,this.width=a,this.height=r)}else t="string"==typeof t?t.match(d).map(function(t){return parseFloat(t)}):Array.isArray(t)?t:"object"==(void 0===t?"undefined":s(t))?[t.x,t.y,t.width,t.height]:4==arguments.length?[].slice.call(arguments):h,this.x=t[0],this.y=t[1],this.width=t[2],this.height=t[3]},extend:{toString:function(){return this.x+" "+this.y+" "+this.width+" "+this.height},morph:function(t,e,i,a){return this.destination=new w.ViewBox(t,e,i,a),this},at:function(t){return this.destination?new w.ViewBox([this.x+(this.destination.x-this.x)*t,this.y+(this.destination.y-this.y)*t,this.width+(this.destination.width-this.width)*t,this.height+(this.destination.height-this.height)*t]):this}},parent:w.Container,construct:{viewbox:function(t,e,i,a){return 0==arguments.length?new w.ViewBox(this):this.attr("viewBox",new w.ViewBox(t,e,i,a))}}}),["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","touchstart","touchmove","touchleave","touchend","touchcancel"].forEach(function(t){w.Element.prototype[t]=function(e){return w.on(this.node,t,e),this}}),w.listeners=[],w.handlerMap=[],w.listenerId=0,w.on=function(t,e,i,a,s){var r=i.bind(a||t.instance||t),n=(w.handlerMap.indexOf(t)+1||w.handlerMap.push(t))-1,o=e.split(".")[0],l=e.split(".")[1]||"*";w.listeners[n]=w.listeners[n]||{},w.listeners[n][o]=w.listeners[n][o]||{},w.listeners[n][o][l]=w.listeners[n][o][l]||{},i._svgjsListenerId||(i._svgjsListenerId=++w.listenerId),w.listeners[n][o][l][i._svgjsListenerId]=r,t.addEventListener(o,r,s||!1)},w.off=function(t,e,i){var a=w.handlerMap.indexOf(t),s=e&&e.split(".")[0],r=e&&e.split(".")[1],n="";if(-1!=a)if(i){if("function"==typeof i&&(i=i._svgjsListenerId),!i)return;w.listeners[a][s]&&w.listeners[a][s][r||"*"]&&(t.removeEventListener(s,w.listeners[a][s][r||"*"][i],!1),delete w.listeners[a][s][r||"*"][i])}else if(r&&s){if(w.listeners[a][s]&&w.listeners[a][s][r]){for(i in w.listeners[a][s][r])w.off(t,[s,r].join("."),i);delete w.listeners[a][s][r]}}else if(r)for(e in w.listeners[a])for(n in w.listeners[a][e])r===n&&w.off(t,[e,r].join("."));else if(s){if(w.listeners[a][s]){for(n in w.listeners[a][s])w.off(t,[s,n].join("."));delete w.listeners[a][s]}}else{for(e in w.listeners[a])w.off(t,e);delete w.listeners[a],delete w.handlerMap[a]}},w.extend(w.Element,{on:function(t,e,i,a){return w.on(this.node,t,e,i,a),this},off:function(t,e){return w.off(this.node,t,e),this},fire:function(e,i){return e instanceof t.Event?this.node.dispatchEvent(e):this.node.dispatchEvent(e=new w.CustomEvent(e,{detail:i,cancelable:!0})),this._event=e,this},event:function(){return this._event}}),w.Defs=w.invent({create:"defs",inherit:w.Container}),w.G=w.invent({create:"g",inherit:w.Container,extend:{x:function(t){return null==t?this.transform("x"):this.transform({x:t-this.x()},!0)},y:function(t){return null==t?this.transform("y"):this.transform({y:t-this.y()},!0)},cx:function(t){return null==t?this.gbox().cx:this.x(t-this.gbox().width/2)},cy:function(t){return null==t?this.gbox().cy:this.y(t-this.gbox().height/2)},gbox:function(){var t=this.bbox(),e=this.transform();return t.x+=e.x,t.x2+=e.x,t.cx+=e.x,t.y+=e.y,t.y2+=e.y,t.cy+=e.y,t}},construct:{group:function(){return this.put(new w.G)}}}),w.Doc=w.invent({create:function(t){t&&(t="string"==typeof t?e.getElementById(t):t,"svg"==t.nodeName?this.constructor.call(this,t):(this.constructor.call(this,w.create("svg")),t.appendChild(this.node),this.size("100%","100%")),this.namespace().defs())},inherit:w.Container,extend:{namespace:function(){return this.attr({xmlns:w.ns,version:"1.1"}).attr("xmlns:xlink",w.xlink,w.xmlns).attr("xmlns:svgjs",w.svgjs,w.xmlns)},defs:function(){if(!this._defs){var t;(t=this.node.getElementsByTagName("defs")[0])?this._defs=w.adopt(t):this._defs=new w.Defs,this.node.appendChild(this._defs.node)}return this._defs},parent:function(){return this.node.parentNode&&"#document"!=this.node.parentNode.nodeName?this.node.parentNode:null},spof:function(){var t=this.node.getScreenCTM();return t&&this.style("left",-t.e%1+"px").style("top",-t.f%1+"px"),this},remove:function(){return this.parent()&&this.parent().removeChild(this.node),this},clear:function(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return delete this._defs,w.parser.draw.parentNode||this.node.appendChild(w.parser.draw),this},clone:function(t){this.writeDataToDom();var e=this.node,i=v(e.cloneNode(!0));return t?(t.node||t).appendChild(i.node):e.parentNode.insertBefore(i.node,e.nextSibling),i}}}),w.extend(w.Element,{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},previous:function(){return this.siblings()[this.position()-1]},forward:function(){var t=this.position()+1,e=this.parent();return e.removeElement(this).add(this,t),e instanceof w.Doc&&e.node.appendChild(e.defs().node),this},backward:function(){var t=this.position();return t>0&&this.parent().removeElement(this).add(this,t-1),this},front:function(){var t=this.parent();return t.node.appendChild(this.node),t instanceof w.Doc&&t.node.appendChild(t.defs().node),this},back:function(){return this.position()>0&&this.parent().removeElement(this).add(this,0),this},before:function(t){t.remove();var e=this.position();return this.parent().add(t,e),this},after:function(t){t.remove();var e=this.position();return this.parent().add(t,e+1),this}}),w.Mask=w.invent({create:function(){this.constructor.call(this,w.create("mask")),this.targets=[]},inherit:w.Container,extend:{remove:function(){for(var t=this.targets.length-1;t>=0;t--)this.targets[t]&&this.targets[t].unmask();return this.targets=[],w.Element.prototype.remove.call(this),this}},construct:{mask:function(){return this.defs().put(new w.Mask)}}}),w.extend(w.Element,{maskWith:function(t){return this.masker=t instanceof w.Mask?t:this.parent().mask().add(t),this.masker.targets.push(this),this.attr("mask",'url("#'+this.masker.attr("id")+'")')},unmask:function(){return delete this.masker,this.attr("mask",null)}}),w.ClipPath=w.invent({create:function(){this.constructor.call(this,w.create("clipPath")),this.targets=[]},inherit:w.Container,extend:{remove:function(){for(var t=this.targets.length-1;t>=0;t--)this.targets[t]&&this.targets[t].unclip();return this.targets=[],this.parent().removeElement(this),this}},construct:{clip:function(){return this.defs().put(new w.ClipPath)}}}),w.extend(w.Element,{clipWith:function(t){return this.clipper=t instanceof w.ClipPath?t:this.parent().clip().add(t),this.clipper.targets.push(this),this.attr("clip-path",'url("#'+this.clipper.attr("id")+'")')},unclip:function(){return delete this.clipper,this.attr("clip-path",null)}}),w.Gradient=w.invent({create:function(t){this.constructor.call(this,w.create(t+"Gradient")),this.type=t},inherit:w.Container,extend:{at:function(t,e,i){return this.put(new w.Stop).update(t,e,i)},update:function(t){return this.clear(),"function"==typeof t&&t.call(this,this),this},fill:function(){return"url(#"+this.id()+")"},toString:function(){return this.fill()},attr:function(t,e,i){return"transform"==t&&(t="gradientTransform"),w.Container.prototype.attr.call(this,t,e,i)}},construct:{gradient:function(t,e){return this.defs().gradient(t,e)}}}),w.extend(w.Gradient,w.FX,{from:function(t,e){return"radial"==(this._target||this).type?this.attr({fx:new w.Number(t),fy:new w.Number(e)}):this.attr({x1:new w.Number(t),y1:new w.Number(e)})},to:function(t,e){return"radial"==(this._target||this).type?this.attr({cx:new w.Number(t),cy:new w.Number(e)}):this.attr({x2:new w.Number(t),y2:new w.Number(e)})}}),w.extend(w.Defs,{gradient:function(t,e){return this.put(new w.Gradient(t)).update(e)}}),w.Stop=w.invent({create:"stop",inherit:w.Element,extend:{update:function(t){return("number"==typeof t||t instanceof w.Number)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new w.Number(t.offset)),this}}}),w.Pattern=w.invent({create:"pattern",inherit:w.Container,extend:{fill:function(){return"url(#"+this.id()+")"},update:function(t){return this.clear(),"function"==typeof t&&t.call(this,this),this},toString:function(){return this.fill()},attr:function(t,e,i){return"transform"==t&&(t="patternTransform"),w.Container.prototype.attr.call(this,t,e,i)}},construct:{pattern:function(t,e,i){return this.defs().pattern(t,e,i)}}}),w.extend(w.Defs,{pattern:function(t,e,i){return this.put(new w.Pattern).update(i).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})}}),w.Shape=w.invent({create:function(t){this.constructor.call(this,t)},inherit:w.Element}),w.Bare=w.invent({create:function(t,e){if(this.constructor.call(this,w.create(t)),e)for(var i in e.prototype)"function"==typeof e.prototype[i]&&(this[i]=e.prototype[i])},inherit:w.Element,extend:{words:function(t){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this.node.appendChild(e.createTextNode(t)),this}}}),w.extend(w.Parent,{element:function(t,e){return this.put(new w.Bare(t,e))}}),w.Symbol=w.invent({create:"symbol",inherit:w.Container,construct:{symbol:function(){return this.put(new w.Symbol)}}}),w.Use=w.invent({create:"use",inherit:w.Shape,extend:{element:function(t,e){return this.attr("href",(e||"")+"#"+t,w.xlink)}},construct:{use:function(t,e){return this.put(new w.Use).element(t,e)}}}),w.Rect=w.invent({create:"rect",inherit:w.Shape,construct:{rect:function(t,e){return this.put(new w.Rect).size(t,e)}}}),w.Circle=w.invent({create:"circle",inherit:w.Shape,construct:{circle:function(t){return this.put(new w.Circle).rx(new w.Number(t).divide(2)).move(0,0)}}}),w.extend(w.Circle,w.FX,{rx:function(t){return this.attr("r",t)},ry:function(t){return this.rx(t)}}),w.Ellipse=w.invent({create:"ellipse",inherit:w.Shape,construct:{ellipse:function(t,e){return this.put(new w.Ellipse).size(t,e).move(0,0)}}}),w.extend(w.Ellipse,w.Rect,w.FX,{rx:function(t){return this.attr("rx",t)},ry:function(t){return this.attr("ry",t)}}),w.extend(w.Circle,w.Ellipse,{x:function(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())},y:function(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())},cx:function(t){return null==t?this.attr("cx"):this.attr("cx",t)},cy:function(t){return null==t?this.attr("cy"):this.attr("cy",t)},width:function(t){return null==t?2*this.rx():this.rx(new w.Number(t).divide(2))},height:function(t){return null==t?2*this.ry():this.ry(new w.Number(t).divide(2))},size:function(t,e){var i=u(this,t,e);return this.rx(new w.Number(i.width).divide(2)).ry(new w.Number(i.height).divide(2))}}),w.Line=w.invent({create:"line",inherit:w.Shape,extend:{array:function(){return new w.PointArray([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])},plot:function(t,e,i,a){return null==t?this.array():(t=void 0!==e?{x1:t,y1:e,x2:i,y2:a}:new w.PointArray(t).toLine(),this.attr(t))},move:function(t,e){return this.attr(this.array().move(t,e).toLine())},size:function(t,e){var i=u(this,t,e);return this.attr(this.array().size(i.width,i.height).toLine())}},construct:{line:function(t,e,i,a){return w.Line.prototype.plot.apply(this.put(new w.Line),null!=t?[t,e,i,a]:[0,0,0,0])}}}),w.Polyline=w.invent({create:"polyline",inherit:w.Shape,construct:{polyline:function(t){return this.put(new w.Polyline).plot(t||new w.PointArray)}}}),w.Polygon=w.invent({create:"polygon",inherit:w.Shape,construct:{polygon:function(t){return this.put(new w.Polygon).plot(t||new w.PointArray)}}}),w.extend(w.Polyline,w.Polygon,{array:function(){return this._array||(this._array=new w.PointArray(this.attr("points")))},plot:function(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new w.PointArray(t))},clear:function(){return delete this._array,this},move:function(t,e){return this.attr("points",this.array().move(t,e))},size:function(t,e){var i=u(this,t,e);return this.attr("points",this.array().size(i.width,i.height))}}),w.extend(w.Line,w.Polyline,w.Polygon,{morphArray:w.PointArray,x:function(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)},y:function(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)},width:function(t){var e=this.bbox();return null==t?e.width:this.size(t,e.height)},height:function(t){var e=this.bbox();return null==t?e.height:this.size(e.width,t)}}),w.Path=w.invent({create:"path",inherit:w.Shape,extend:{morphArray:w.PathArray,array:function(){return this._array||(this._array=new w.PathArray(this.attr("d")))},plot:function(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new w.PathArray(t))},clear:function(){return delete this._array,this},move:function(t,e){return this.attr("d",this.array().move(t,e))},x:function(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)},y:function(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)},size:function(t,e){var i=u(this,t,e);return this.attr("d",this.array().size(i.width,i.height))},width:function(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)},height:function(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}},construct:{path:function(t){return this.put(new w.Path).plot(t||new w.PathArray)}}}),w.Image=w.invent({create:"image",inherit:w.Shape,extend:{load:function(e){if(!e)return this;var i=this,a=new t.Image;return w.on(a,"load",function(){w.off(a);var t=i.parent(w.Pattern);null!==t&&(0==i.width()&&0==i.height()&&i.size(a.width,a.height),t&&0==t.width()&&0==t.height()&&t.size(i.width(),i.height()),"function"==typeof i._loaded&&i._loaded.call(i,{width:a.width,height:a.height,ratio:a.width/a.height,url:e}))}),w.on(a,"error",function(t){w.off(a),"function"==typeof i._error&&i._error.call(i,t)}),this.attr("href",a.src=this.src=e,w.xlink)},loaded:function(t){return this._loaded=t,this},error:function(t){return this._error=t,this}},construct:{image:function(t,e,i){return this.put(new w.Image).load(t).size(e||0,i||e||0)}}}),w.Text=w.invent({create:function(){this.constructor.call(this,w.create("text")),this.dom.leading=new w.Number(1.3),this._rebuild=!0,this._build=!1,this.attr("font-family",w.defaults.attrs["font-family"])},inherit:w.Shape,extend:{x:function(t){return null==t?this.attr("x"):this.attr("x",t)},y:function(t){var e=this.attr("y"),i="number"==typeof e?e-this.bbox().y:0;return null==t?"number"==typeof e?e-i:e:this.attr("y","number"==typeof t.valueOf()?t+i:t)},cx:function(t){return null==t?this.bbox().cx:this.x(t-this.bbox().width/2)},cy:function(t){return null==t?this.bbox().cy:this.y(t-this.bbox().height/2)},text:function(t){if(void 0===t){for(var t="",e=this.node.childNodes,i=0,a=e.length;i=0;e--)null!=i[P[t][e]]&&this.attr(P.prefix(t,P[t][e]),i[P[t][e]]);return this},w.extend(w.Element,w.FX,i)}),w.extend(w.Element,w.FX,{rotate:function(t,e,i){return this.transform({rotation:t,cx:e,cy:i})},skew:function(t,e,i,a){return 1==arguments.length||3==arguments.length?this.transform({skew:t,cx:e,cy:i}):this.transform({skewX:t,skewY:e,cx:i,cy:a})},scale:function(t,e,i,a){return 1==arguments.length||3==arguments.length?this.transform({scale:t,cx:e,cy:i}):this.transform({scaleX:t,scaleY:e,cx:i,cy:a})},translate:function(t,e){return this.transform({x:t,y:e})},flip:function(t,e){return e="number"==typeof t?t:e,this.transform({flip:t||"both",offset:e})},matrix:function(t){return this.attr("transform",new w.Matrix(6==arguments.length?[].slice.call(arguments):t))},opacity:function(t){return this.attr("opacity",t)},dx:function(t){return this.x(new w.Number(t).plus(this instanceof w.FX?0:this.x()),!0)},dy:function(t){return this.y(new w.Number(t).plus(this instanceof w.FX?0:this.y()),!0)},dmove:function(t,e){return this.dx(t).dy(e)}}),w.extend(w.Rect,w.Ellipse,w.Circle,w.Gradient,w.FX,{radius:function(t,e){var i=(this._target||this).type;return"radial"==i||"circle"==i?this.attr("r",new w.Number(t)):this.rx(t).ry(null==e?t:e)}}),w.extend(w.Path,{length:function(){return this.node.getTotalLength()},pointAt:function(t){return this.node.getPointAtLength(t)}}),w.extend(w.Parent,w.Text,w.Tspan,w.FX,{font:function(t,e){if("object"==(void 0===t?"undefined":s(t)))for(e in t)this.font(e,t[e]);return"leading"==t?this.leading(e):"anchor"==t?this.attr("text-anchor",e):"size"==t||"family"==t||"weight"==t||"stretch"==t||"variant"==t||"style"==t?this.attr("font-"+t,e):this.attr(t,e)}}),w.Set=w.invent({create:function(t){Array.isArray(t)?this.members=t:this.clear()},extend:{add:function(){var t,e,i=[].slice.call(arguments);for(t=0,e=i.length;t-1&&this.members.splice(e,1),this},each:function(t){for(var e=0,i=this.members.length;e=0},index:function(t){return this.members.indexOf(t)},get:function(t){return this.members[t]},first:function(){return this.get(0)},last:function(){return this.get(this.members.length-1)},valueOf:function(){return this.members},bbox:function(){if(0==this.members.length)return new w.RBox;var t=this.members[0].rbox(this.members[0].doc());return this.each(function(){t=t.merge(this.rbox(this.doc()))}),t}},construct:{set:function(t){return new w.Set(t)}}}),w.FX.Set=w.invent({create:function(t){this.set=t}}),w.Set.inherit=function(){var t,e=[];for(var t in w.Shape.prototype)"function"==typeof w.Shape.prototype[t]&&"function"!=typeof w.Set.prototype[t]&&e.push(t);e.forEach(function(t){w.Set.prototype[t]=function(){for(var e=0,i=this.members.length;e=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory||(this._memory={})}}),w.get=function(t){var i=e.getElementById(m(t)||t);return w.adopt(i)},w.select=function(t,i){return new w.Set(w.utils.map((i||e).querySelectorAll(t),function(t){return w.adopt(t)}))},w.extend(w.Parent,{select:function(t){return w.select(t,this.node)}});var M="abcdef".split("");if("function"!=typeof t.CustomEvent){var T=function(t,i){i=i||{bubbles:!1,cancelable:!1,detail:void 0};var a=e.createEvent("CustomEvent");return a.initCustomEvent(t,i.bubbles,i.cancelable,i.detail),a};T.prototype=t.Event.prototype,w.CustomEvent=T}else w.CustomEvent=t.CustomEvent;return function(e){for(var i=0,a=["moz","webkit"],s=0;se.length?t:e});i.yAxisScale[0].niceMax=r,i.yAxisScale[0].niceMin=r,a.yaxis[0].labels.formatter=function(t){return t}}if(new y.default(this.ctx).plotCoords(),"heatmap"===e.config.chart.type){i.yAxisScale[0].result.push("");var n=e.globals.gridHeight/e.globals.series.length;a.yaxis[0].labels.offsetY=-n/2}var o=null;if(i.axisCharts){if("back"===a.xaxis.crosshairs.position){new b.default(this.ctx).drawXCrosshairs()}if("back"===a.yaxis[0].crosshairs.position){new b.default(this.ctx).drawYCrosshairs()}if(o=this.core.getCalculatedRatios(),"datetime"===a.xaxis.type){new T.default(this.ctx).calculateTimeScaleTicks()}}this.core.createGridMask();var l=this.core.plotChartType(t,o);return this.core.shiftGraphPosition(),{elGraph:l,xyRatios:o,elInner:e.globals.dom.elGraphical,dimensions:{plot:{left:e.globals.translateX,top:e.globals.translateY,width:e.globals.gridWidth,height:e.globals.gridHeight}}}}},{key:"mount",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.w,i=this,a=new P.default(i.ctx);return new Promise(function(s,r){if(null===i.el||null===t)return r(new Error("Not enough data to display or element not found"));var n=function(){if(i.w.globals.axisCharts){var t=new l.default(i.ctx),a=t.drawYAxisAnnotations(),s=t.drawXAxisAnnotations(),r=t.drawPointAnnotations();e.globals.dom.elGraphical.add(a),e.globals.dom.elGraphical.add(s),e.globals.dom.elGraphical.add(r),e.globals.delayedElements.push({el:s.node,index:0}),e.globals.delayedElements.push({el:a.node,index:0}),e.globals.delayedElements.push({el:r.node,index:0}),t.setOrientations(e.config.annotations.xaxis),t.annotationsBackground()}};if(i.core.drawAxis(e.config.chart.type,t.xyRatios),"back"===e.config.grid.position&&i.core.drawGrid(),"back"===e.config.annotations.position&&n(),new c.default(i.ctx).showDelayedElements(),t.elGraph instanceof Array)for(var o=0;o0){var h=!0,u=!1,d=void 0;try{for(var f,p=e.globals.memory.methodsToExec[Symbol.iterator]();!(h=(f=p.next()).done);h=!0){var g=f.value;g.method(g.params,!1,g.context)}}catch(t){u=!0,d=t}finally{try{!h&&p.return&&p.return()}finally{if(u)throw d}}}s(i)})}},{key:"updateOptions",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=this,s=this.w;if(a.w.config.chart.animations.dynamicAnimation.enabled=i,!e){s.globals.resized=!0;var n=new P.default(a.ctx);a.w.globals.dataChanged=!0,i&&a.w.globals.initialConfig.chart.animations.dynamicAnimation.enabled&&n.getPreviousPaths()}return t&&"object"===(void 0===t?"undefined":r(t))&&(this.checkResponsiveConfig(),this.responsiveConfigOverrided=!0,s.config=O.default.extend(s.config,t)),this.update()}},{key:"updateSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this;i.w.config.chart.animations.dynamicAnimation.enabled=e;var a=new P.default(i.ctx);return i.w.globals.dataChanged=!0,e&&a.getPreviousPaths(),i.w.config.series=t.slice(),this.update()}},{key:"appendData",value:function(t){var e=this,i=new P.default(e.ctx);e.w.globals.dataChanged=!0,i.getPreviousPaths();for(var a=e.w.config.series.slice(),s=0;s1&&void 0!==arguments[1])||arguments[1],i=arguments[2],a=this;i&&(a=i);var s=a.w,r=new l.default(a.ctx),n=s.globals.dom.baseEl.querySelector(".apexcharts-xaxis-annotations"),o=n.childNodes.length+1,h=Object.assign({},G.xAxisAnnotation),c=O.default.extend(h,t);r.addXAxisAnnotation(c,n,o),r.setOrientations([c],o);var u=s.globals.dom.baseEl.querySelector(".apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='"+o+"']"),d=r.addBackgroundToAnno(u,c,o);return n.insertBefore(d.node,u),e&&s.globals.memory.methodsToExec.push({context:a,method:a.addXaxisAnnotation,params:t}),i}},{key:"addYaxisAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments[2],a=this;i&&(a=i);var s=a.w,r=new l.default(a.ctx),n=s.globals.dom.baseEl.querySelector(".apexcharts-yaxis-annotations"),o=n.childNodes.length+1,h=Object.assign({},G.yAxisAnnotation),c=O.default.extend(h,t);r.addYAxisAnnotation(c,n,o);var u=s.globals.dom.baseEl.querySelector(".apexcharts-yaxis-annotations .apexcharts-yaxis-annotation-label[rel='"+o+"']"),d=r.addBackgroundToAnno(u,c,o);return n.insertBefore(d.node,u),e&&s.globals.memory.methodsToExec.push({context:a,method:a.addYaxisAnnotation,params:t}),i}},{key:"addPointAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments[2],a=this;i&&(a=i);var s=a.w,r=new l.default(a.ctx),n=s.globals.dom.baseEl.querySelector(".apexcharts-point-annotations"),o=n.childNodes.length+1,h=Object.assign({},G.pointAnnotation),c=O.default.extend(h,t);r.addPointAnnotation(c,n,o);var u=s.globals.dom.baseEl.querySelector(".apexcharts-point-annotations .apexcharts-point-annotation-label[rel='"+o+"']"),d=r.addBackgroundToAnno(u,c,o);return n.insertBefore(d.node,u),e&&s.globals.memory.methodsToExec.push({context:a,method:a.addPointAnnotation,params:t}),i}},{key:"addText",value:function(t){var e=t.x,i=t.y,a=t.text,s=t.textAnchor,r=t.appendTo,n=void 0===r?".apexcharts-inner":r,o=t.foreColor,l=t.fontSize,h=t.cssClass,c=t.backgroundColor,u=t.borderWidth,d=t.strokeDashArray,f=t.radius,p=t.borderColor,g=t.paddingLeft,x=void 0===g?4:g,v=t.paddingRight,b=void 0===v?4:v,m=t.paddingBottom,y=void 0===m?2:m,w=t.paddingTop,k=void 0===w?2:w,S=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],A=arguments[2],C=this;A&&(C=A);var P=C.w,M=new q.default(C.ctx),T=P.globals.dom.baseEl.querySelector(n),L=M.drawText({x:e,y:i,text:a,textAnchor:s||"start",fontSize:l||"12px",foreColor:o||P.config.chart.foreColor,cssClass:h});T.appendChild(L.node);var z=L.bbox(),X=M.drawRect(z.x-x,z.y-k,z.width+x+b,z.height+y+k,f,c,1,u,p,d);return L.before(X),S&&P.globals.memory.methodsToExec.push({context:C,method:C.addText,params:{x:e,y:i,text:a,textAnchor:s,appendTo:n,foreColor:o,fontSize:l,cssClass:h,backgroundColor:c,borderWidth:u,strokeDashArray:d,radius:f,borderColor:p,paddingLeft:x,paddingRight:b,paddingBottom:y,paddingTop:k}}),A}},{key:"checkResponsiveConfig",value:function(){var t=this.w,e=t.config;if(void 0!==e.responsive)for(var i={},a=0;a0?window.innerWidth:screen.width;if(sm;m++)if((x=e?b(n(p=t[m])[0],p[1]):b(t[m]))===h||x===c)return x}else for(g=v.call(t);!(p=g.next()).done;)if((x=s(g,b,p.value,e))===h||x===c)return x};u.BREAK=h,u.RETURN=c},function(t,e,i){"use strict";t.exports=!i(9)&&!i(41)(function(){return 7!=Object.defineProperty(i(25)("div"),"a",{get:function(){return 7}}).a})},function(t,e,i){"use strict";t.exports=function(t,e,i){var a=void 0===i;switch(e.length){case 0:return a?t():t.call(i);case 1:return a?t(e[0]):t.call(i,e[0]);case 2:return a?t(e[0],e[1]):t.call(i,e[0],e[1]);case 3:return a?t(e[0],e[1],e[2]):t.call(i,e[0],e[1],e[2]);case 4:return a?t(e[0],e[1],e[2],e[3]):t.call(i,e[0],e[1],e[2],e[3])}return t.apply(i,e)}},function(t,e,i){"use strict";var a=i(17);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==a(t)?t.split(""):Object(t)}},function(t,e,i){"use strict";var a=i(12),s=i(3)("iterator"),r=Array.prototype;t.exports=function(t){return void 0!==t&&(a.Array===t||r[s]===t)}},function(t,e,i){"use strict";var a=i(6);t.exports=function(t,e,i,s){try{return s?e(a(i)[0],i[1]):e(i)}catch(e){var r=t.return;throw void 0!==r&&a(r.call(t)),e}}},function(t,e,i){"use strict";var a=i(77),s=i(47),r=i(28),n={};i(7)(n,i(3)("iterator"),function(){return this}),t.exports=function(t,e,i){t.prototype=a(n,{next:s(1,i)}),r(t,e+" Iterator")}},function(t,e,i){"use strict";var a=i(3)("iterator"),s=!1;try{var r=[7][a]();r.return=function(){s=!0},Array.from(r,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!s)return!1;var i=!1;try{var r=[7],n=r[a]();n.next=function(){return{done:i=!0}},r[a]=function(){return n},t(r)}catch(t){}return i}},function(t,e,i){"use strict";t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,i){"use strict";var a=i(2),s=i(50).set,r=a.MutationObserver||a.WebKitMutationObserver,n=a.process,o=a.Promise,l="process"==i(17)(n);t.exports=function(){var t,e,i,h=function(){var a,s;for(l&&(a=n.domain)&&a.exit();t;){s=t.fn,t=t.next;try{s()}catch(a){throw t?i():e=void 0,a}}e=void 0,a&&a.enter()};if(l)i=function(){n.nextTick(h)};else if(!r||a.navigator&&a.navigator.standalone)if(o&&o.resolve){var c=o.resolve(void 0);i=function(){c.then(h)}}else i=function(){s.call(a,h)};else{var u=!0,d=document.createTextNode("");new r(h).observe(d,{characterData:!0}),i=function(){d.data=u=!u}}return function(a){var s={fn:a,next:void 0};e&&(e.next=s),t||(t=s,i()),e=s}}},function(t,e,i){"use strict";var a=i(6),s=i(78),r=i(40),n=i(29)("IE_PROTO"),o=function(){},l=function(){var t,e=i(25)("iframe"),a=r.length;for(e.style.display="none",i(42).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write("