diff --git a/src/main/java/com/fr/demo/SaveReportToDatabase.java b/src/main/java/com/fr/demo/SaveReportToDatabase.java index 49d3e3d..971f379 100644 --- a/src/main/java/com/fr/demo/SaveReportToDatabase.java +++ b/src/main/java/com/fr/demo/SaveReportToDatabase.java @@ -2,14 +2,17 @@ package com.fr.demo; import com.fr.base.operator.common.CommonOperator; import com.fr.chart.activator.ChartBaseActivator; +import com.fr.cluster.engine.activator.standalone.StandaloneModeActivator; import com.fr.config.activator.BaseDBActivator; import com.fr.config.activator.ConfigurationActivator; import com.fr.env.operator.CommonOperatorImpl; +import com.fr.general.I18nResource; import com.fr.module.Module; import com.fr.module.tool.ActivatorToolBox; import com.fr.report.ReportActivator; import com.fr.report.RestrictionActivator; import com.fr.report.module.ReportBaseActivator; +import com.fr.scheduler.SchedulerActivator; import com.fr.store.StateServerActivator; import com.fr.workspace.simple.SimpleWork; @@ -30,15 +33,20 @@ public class SaveReportToDatabase { // 定义报表运行环境,用于执行报表 Module module = ActivatorToolBox.simpleLink(new BaseDBActivator(), new ConfigurationActivator(), + new StandaloneModeActivator(), new StateServerActivator(), + new SchedulerActivator(), new ReportBaseActivator(), new RestrictionActivator(), new ReportActivator(), new ChartBaseActivator()); SimpleWork.supply(CommonOperator.class, new CommonOperatorImpl()); - String envpath= "//Applications//FineReport10_325//webapps//webroot//WEB-INF"; //工程路径 + String envpath = "//Applications//FineReport10_325//webapps//webroot//WEB-INF";//工程路径 SimpleWork.checkIn(envpath); + I18nResource.getInstance(); module.start(); + + // 连接数据库 String driver = "com.mysql.jdbc.Driver"; String url = "jdbc:mysql://review.finedevelop.com:3306/susie"; diff --git a/src/main/java/com/fr/function/ReportCheck.java b/src/main/java/com/fr/function/ReportCheck.java index 92ef31d..1ade144 100644 --- a/src/main/java/com/fr/function/ReportCheck.java +++ b/src/main/java/com/fr/function/ReportCheck.java @@ -4,9 +4,11 @@ package com.fr.function; import com.fr.base.ResultFormula; import com.fr.base.operator.common.CommonOperator; import com.fr.chart.activator.ChartBaseActivator; +import com.fr.cluster.engine.activator.standalone.StandaloneModeActivator; import com.fr.config.activator.BaseDBActivator; import com.fr.config.activator.ConfigurationActivator; import com.fr.env.operator.CommonOperatorImpl; +import com.fr.general.I18nResource; import com.fr.io.TemplateWorkBookIO; import com.fr.json.JSONArray; import com.fr.json.JSONObject; @@ -19,6 +21,7 @@ import com.fr.report.RestrictionActivator; import com.fr.report.cell.CellElement; import com.fr.report.module.ReportBaseActivator; import com.fr.report.report.ResultReport; +import com.fr.scheduler.SchedulerActivator; import com.fr.script.AbstractFunction; import com.fr.stable.WriteActor; import com.fr.store.StateServerActivator; @@ -40,15 +43,20 @@ public class ReportCheck extends AbstractFunction { // 定义报表运行环境,用于执行报表 Module module = ActivatorToolBox.simpleLink(new BaseDBActivator(), new ConfigurationActivator(), + new StandaloneModeActivator(), new StateServerActivator(), + new SchedulerActivator(), new ReportBaseActivator(), new RestrictionActivator(), new ReportActivator(), new ChartBaseActivator()); SimpleWork.supply(CommonOperator.class, new CommonOperatorImpl()); - String envpath= "//Applications//FineReport10_325//webapps//webroot//WEB-INF"; //工程路径 + String envpath = "//Applications//FineReport10_325//webapps//webroot//WEB-INF";//工程路径 SimpleWork.checkIn(envpath); + I18nResource.getInstance(); module.start(); + + try { ResultWorkBook rworkbook = null; // 读取模板 diff --git a/src/main/java/com/fr/io/CreateGenericTemplate.java b/src/main/java/com/fr/io/CreateGenericTemplate.java index 9fd54e5..ba97403 100644 --- a/src/main/java/com/fr/io/CreateGenericTemplate.java +++ b/src/main/java/com/fr/io/CreateGenericTemplate.java @@ -3,11 +3,13 @@ package com.fr.io; import com.fr.base.TableData; import com.fr.base.operator.common.CommonOperator; import com.fr.chart.activator.ChartBaseActivator; +import com.fr.cluster.engine.activator.standalone.StandaloneModeActivator; import com.fr.config.activator.BaseDBActivator; import com.fr.config.activator.ConfigurationActivator; import com.fr.data.impl.DBTableData; import com.fr.data.impl.NameDatabaseConnection; import com.fr.env.operator.CommonOperatorImpl; +import com.fr.general.I18nResource; import com.fr.general.data.TableDataColumn; import com.fr.main.impl.WorkBook; import com.fr.module.Module; @@ -19,6 +21,7 @@ import com.fr.report.cell.TemplateCellElement; import com.fr.report.cell.cellattr.core.group.DSColumn; import com.fr.report.module.ReportBaseActivator; import com.fr.report.worksheet.WorkSheet; +import com.fr.scheduler.SchedulerActivator; import com.fr.store.StateServerActivator; import com.fr.workspace.simple.SimpleWork; @@ -32,15 +35,20 @@ public class CreateGenericTemplate { // 定义报表运行环境,用于执行报表 Module module = ActivatorToolBox.simpleLink(new BaseDBActivator(), new ConfigurationActivator(), + new StandaloneModeActivator(), new StateServerActivator(), + new SchedulerActivator(), new ReportBaseActivator(), new RestrictionActivator(), new ReportActivator(), new ChartBaseActivator()); SimpleWork.supply(CommonOperator.class, new CommonOperatorImpl()); - String envpath= "//Applications//FineReport10_325//webapps//webroot//WEB-INF"; //工程路径 + String envpath = "//Applications//FineReport10_325//webapps//webroot//WEB-INF";//工程路径 SimpleWork.checkIn(envpath); + I18nResource.getInstance(); module.start(); + + WorkBook wb = new WorkBook(); //添加新的模板数据集 TableData td = genericTableData("FRDemo", "SELECT * FROM Equipment"); diff --git a/src/main/java/com/fr/io/ExcelToCpt.java b/src/main/java/com/fr/io/ExcelToCpt.java index 188acf0..5389be4 100644 --- a/src/main/java/com/fr/io/ExcelToCpt.java +++ b/src/main/java/com/fr/io/ExcelToCpt.java @@ -2,9 +2,11 @@ package com.fr.io; import com.fr.base.operator.common.CommonOperator; import com.fr.chart.activator.ChartBaseActivator; +import com.fr.cluster.engine.activator.standalone.StandaloneModeActivator; import com.fr.config.activator.BaseDBActivator; import com.fr.config.activator.ConfigurationActivator; import com.fr.env.operator.CommonOperatorImpl; +import com.fr.general.I18nResource; import com.fr.io.importer.Excel2007ReportImporter; import com.fr.main.TemplateWorkBook; import com.fr.main.impl.WorkBook; @@ -13,6 +15,7 @@ import com.fr.module.tool.ActivatorToolBox; import com.fr.report.ReportActivator; import com.fr.report.RestrictionActivator; import com.fr.report.module.ReportBaseActivator; +import com.fr.scheduler.SchedulerActivator; import com.fr.store.StateServerActivator; import com.fr.workspace.simple.SimpleWork; @@ -27,15 +30,20 @@ public class ExcelToCpt { // 定义报表运行环境,用于执行报表 Module module = ActivatorToolBox.simpleLink(new BaseDBActivator(), new ConfigurationActivator(), + new StandaloneModeActivator(), new StateServerActivator(), + new SchedulerActivator(), new ReportBaseActivator(), new RestrictionActivator(), new ReportActivator(), new ChartBaseActivator()); SimpleWork.supply(CommonOperator.class, new CommonOperatorImpl()); - String envpath= "//Applications//FineReport10_325//webapps//webroot//WEB-INF"; //工程路径 + String envpath = "//Applications//FineReport10_325//webapps//webroot//WEB-INF";//工程路径 SimpleWork.checkIn(envpath); + I18nResource.getInstance(); module.start(); + + File excelFile = new File("//Users//susie//Downloads//aa.xlsx"); // 获取EXCEL文件 FileInputStream a = new FileInputStream(excelFile); diff --git a/src/main/java/com/fr/io/ExcuteDemo.java b/src/main/java/com/fr/io/ExcuteDemo.java index 10849af..742e640 100644 --- a/src/main/java/com/fr/io/ExcuteDemo.java +++ b/src/main/java/com/fr/io/ExcuteDemo.java @@ -2,9 +2,11 @@ package com.fr.io; import com.fr.base.operator.common.CommonOperator; import com.fr.chart.activator.ChartBaseActivator; +import com.fr.cluster.engine.activator.standalone.StandaloneModeActivator; import com.fr.config.activator.BaseDBActivator; import com.fr.config.activator.ConfigurationActivator; import com.fr.env.operator.CommonOperatorImpl; +import com.fr.general.I18nResource; import com.fr.io.exporter.ExcelExporter; import com.fr.main.TemplateWorkBook; import com.fr.main.workbook.ResultWorkBook; @@ -13,6 +15,7 @@ import com.fr.module.tool.ActivatorToolBox; import com.fr.report.ReportActivator; import com.fr.report.RestrictionActivator; import com.fr.report.module.ReportBaseActivator; +import com.fr.scheduler.SchedulerActivator; import com.fr.stable.WriteActor; import com.fr.store.StateServerActivator; import com.fr.workspace.simple.SimpleWork; @@ -28,15 +31,20 @@ public class ExcuteDemo { // 定义报表运行环境,用于执行报表 Module module = ActivatorToolBox.simpleLink(new BaseDBActivator(), new ConfigurationActivator(), + new StandaloneModeActivator(), new StateServerActivator(), + new SchedulerActivator(), new ReportBaseActivator(), new RestrictionActivator(), new ReportActivator(), new ChartBaseActivator()); SimpleWork.supply(CommonOperator.class, new CommonOperatorImpl()); - String envpath= "//Applications//FineReport10_325//webapps//webroot//WEB-INF"; //工程路径 + String envpath = "//Applications//FineReport10_325//webapps//webroot//WEB-INF";//工程路径 SimpleWork.checkIn(envpath); + I18nResource.getInstance(); module.start(); + + // 读取模板 TemplateWorkBook workbook = TemplateWorkBookIO.readTemplateWorkBook("//doc//Primary//Parameter//Parameter.cpt"); /* diff --git a/src/main/java/com/fr/io/ExportApi.java b/src/main/java/com/fr/io/ExportApi.java index 7c39f77..4157630 100644 --- a/src/main/java/com/fr/io/ExportApi.java +++ b/src/main/java/com/fr/io/ExportApi.java @@ -3,9 +3,11 @@ package com.fr.io; import com.fr.base.Parameter; import com.fr.base.operator.common.CommonOperator; import com.fr.chart.activator.ChartBaseActivator; +import com.fr.cluster.engine.activator.standalone.StandaloneModeActivator; import com.fr.config.activator.BaseDBActivator; import com.fr.config.activator.ConfigurationActivator; import com.fr.env.operator.CommonOperatorImpl; +import com.fr.general.I18nResource; import com.fr.io.exporter.CSVExporter; import com.fr.io.exporter.EmbeddedTableDataExporter; import com.fr.io.exporter.ExcelExporter; @@ -22,6 +24,7 @@ import com.fr.module.tool.ActivatorToolBox; import com.fr.report.ReportActivator; import com.fr.report.RestrictionActivator; import com.fr.report.module.ReportBaseActivator; +import com.fr.scheduler.SchedulerActivator; import com.fr.stable.WriteActor; import com.fr.store.StateServerActivator; import com.fr.workspace.simple.SimpleWork; @@ -35,7 +38,9 @@ public class ExportApi { // 定义报表运行环境,用于执行报表 Module module = ActivatorToolBox.simpleLink(new BaseDBActivator(), new ConfigurationActivator(), + new StandaloneModeActivator(), new StateServerActivator(), + new SchedulerActivator(), new ReportBaseActivator(), new RestrictionActivator(), new ReportActivator(), @@ -43,7 +48,10 @@ public class ExportApi { SimpleWork.supply(CommonOperator.class, new CommonOperatorImpl()); String envpath = "//Applications//FineReport10_325//webapps//webroot//WEB-INF";//工程路径 SimpleWork.checkIn(envpath); + I18nResource.getInstance(); module.start(); + + ResultWorkBook rworkbook = null; try { // 未执行模板工作薄 diff --git a/src/main/java/com/fr/io/ExportBatch.java b/src/main/java/com/fr/io/ExportBatch.java index 3123880..07b3e66 100644 --- a/src/main/java/com/fr/io/ExportBatch.java +++ b/src/main/java/com/fr/io/ExportBatch.java @@ -2,9 +2,11 @@ package com.fr.io; import com.fr.base.operator.common.CommonOperator; import com.fr.chart.activator.ChartBaseActivator; +import com.fr.cluster.engine.activator.standalone.StandaloneModeActivator; import com.fr.config.activator.BaseDBActivator; import com.fr.config.activator.ConfigurationActivator; import com.fr.env.operator.CommonOperatorImpl; +import com.fr.general.I18nResource; import com.fr.io.exporter.ExcelExporter; import com.fr.main.TemplateWorkBook; import com.fr.main.workbook.ResultWorkBook; @@ -13,6 +15,7 @@ import com.fr.module.tool.ActivatorToolBox; import com.fr.report.ReportActivator; import com.fr.report.RestrictionActivator; import com.fr.report.module.ReportBaseActivator; +import com.fr.scheduler.SchedulerActivator; import com.fr.stable.StableUtils; import com.fr.stable.WriteActor; import com.fr.store.StateServerActivator; @@ -33,7 +36,9 @@ public class ExportBatch { // 定义报表运行环境,用于执行报表 Module module = ActivatorToolBox.simpleLink(new BaseDBActivator(), new ConfigurationActivator(), + new StandaloneModeActivator(), new StateServerActivator(), + new SchedulerActivator(), new ReportBaseActivator(), new RestrictionActivator(), new ReportActivator(), @@ -41,7 +46,10 @@ public class ExportBatch { SimpleWork.supply(CommonOperator.class, new CommonOperatorImpl()); String envpath = "//Applications//FineReport10_325//webapps//webroot//WEB-INF";//工程路径 SimpleWork.checkIn(envpath); + I18nResource.getInstance(); module.start(); + + // 读取环境下的模板文件 TemplateWorkBook workbook = TemplateWorkBookIO.readTemplateWorkBook( "//doc//Primary//Parameter//Parameter.cpt"); diff --git a/src/main/java/com/fr/io/ExportExcel.java b/src/main/java/com/fr/io/ExportExcel.java index 8e869a8..1b26795 100644 --- a/src/main/java/com/fr/io/ExportExcel.java +++ b/src/main/java/com/fr/io/ExportExcel.java @@ -3,9 +3,11 @@ package com.fr.io; import com.fr.base.Parameter; import com.fr.base.operator.common.CommonOperator; import com.fr.chart.activator.ChartBaseActivator; +import com.fr.cluster.engine.activator.standalone.StandaloneModeActivator; import com.fr.config.activator.BaseDBActivator; import com.fr.config.activator.ConfigurationActivator; import com.fr.env.operator.CommonOperatorImpl; +import com.fr.general.I18nResource; import com.fr.io.exporter.ExcelExporter; import com.fr.io.exporter.LargeDataPageExcelExporter; import com.fr.io.exporter.PageExcel2007Exporter; @@ -21,6 +23,7 @@ import com.fr.report.ReportActivator; import com.fr.report.RestrictionActivator; import com.fr.report.core.ReportUtils; import com.fr.report.module.ReportBaseActivator; +import com.fr.scheduler.SchedulerActivator; import com.fr.stable.WriteActor; import com.fr.store.StateServerActivator; import com.fr.workspace.simple.SimpleWork; @@ -35,15 +38,20 @@ public class ExportExcel { // 定义报表运行环境,用于执行报表 Module module = ActivatorToolBox.simpleLink(new BaseDBActivator(), new ConfigurationActivator(), + new StandaloneModeActivator(), new StateServerActivator(), + new SchedulerActivator(), new ReportBaseActivator(), new RestrictionActivator(), new ReportActivator(), new ChartBaseActivator()); SimpleWork.supply(CommonOperator.class, new CommonOperatorImpl()); - String envpath= "//Applications//FineReport10_325//webapps//webroot//WEB-INF"; //工程路径 + String envpath = "//Applications//FineReport10_325//webapps//webroot//WEB-INF";//工程路径 SimpleWork.checkIn(envpath); + I18nResource.getInstance(); module.start(); + + ResultWorkBook rworkbook = null; try { // 未执行模板工作薄 diff --git a/src/main/java/com/fr/io/ExportReports.java b/src/main/java/com/fr/io/ExportReports.java index 80e5492..46ea413 100644 --- a/src/main/java/com/fr/io/ExportReports.java +++ b/src/main/java/com/fr/io/ExportReports.java @@ -3,9 +3,11 @@ package com.fr.io; import com.fr.base.Parameter; import com.fr.base.operator.common.CommonOperator; import com.fr.chart.activator.ChartBaseActivator; +import com.fr.cluster.engine.activator.standalone.StandaloneModeActivator; import com.fr.config.activator.BaseDBActivator; import com.fr.config.activator.ConfigurationActivator; import com.fr.env.operator.CommonOperatorImpl; +import com.fr.general.I18nResource; import com.fr.io.exporter.PageExcelExporter; import com.fr.main.TemplateWorkBook; import com.fr.main.workbook.PageWorkBook; @@ -16,6 +18,7 @@ import com.fr.report.RestrictionActivator; import com.fr.report.core.ReportUtils; import com.fr.report.module.ReportBaseActivator; import com.fr.report.report.PageReport; +import com.fr.scheduler.SchedulerActivator; import com.fr.stable.PageActor; import com.fr.store.StateServerActivator; import com.fr.workspace.simple.SimpleWork; @@ -30,15 +33,20 @@ public class ExportReports { // 定义报表运行环境,用于执行报表 Module module = ActivatorToolBox.simpleLink(new BaseDBActivator(), new ConfigurationActivator(), + new StandaloneModeActivator(), new StateServerActivator(), + new SchedulerActivator(), new ReportBaseActivator(), new RestrictionActivator(), new ReportActivator(), new ChartBaseActivator()); SimpleWork.supply(CommonOperator.class, new CommonOperatorImpl()); - String envpath= "//Applications//FineReport10_325//webapps//webroot//WEB-INF"; //工程路径 + String envpath = "//Applications//FineReport10_325//webapps//webroot//WEB-INF";//工程路径 SimpleWork.checkIn(envpath); + I18nResource.getInstance(); module.start(); + + // 进行程序的一些必要初始化 try { // 未执行模板工作薄 diff --git a/src/main/java/com/fr/io/JavaPrint.java b/src/main/java/com/fr/io/JavaPrint.java index 23a3e3b..95d357e 100644 --- a/src/main/java/com/fr/io/JavaPrint.java +++ b/src/main/java/com/fr/io/JavaPrint.java @@ -1,8 +1,13 @@ package com.fr.io; import com.fr.base.Parameter; +import com.fr.base.operator.common.CommonOperator; +import com.fr.chart.activator.ChartBaseActivator; +import com.fr.cluster.engine.activator.standalone.StandaloneModeActivator; import com.fr.config.activator.BaseDBActivator; import com.fr.config.activator.ConfigurationActivator; +import com.fr.env.operator.CommonOperatorImpl; +import com.fr.general.I18nResource; import com.fr.main.TemplateWorkBook; import com.fr.module.Module; import com.fr.module.tool.ActivatorToolBox; @@ -10,6 +15,7 @@ import com.fr.print.PrintUtils; import com.fr.report.ReportActivator; import com.fr.report.RestrictionActivator; import com.fr.report.module.ReportBaseActivator; +import com.fr.scheduler.SchedulerActivator; import com.fr.store.StateServerActivator; import com.fr.workspace.simple.SimpleWork; @@ -21,14 +27,19 @@ public class JavaPrint { // 定义报表运行环境,用于执行报表 Module module = ActivatorToolBox.simpleLink(new BaseDBActivator(), new ConfigurationActivator(), + new StandaloneModeActivator(), new StateServerActivator(), + new SchedulerActivator(), new ReportBaseActivator(), new RestrictionActivator(), - new ReportActivator()); - String envpath;//工程路径 - envpath = "//Applications//FineReport10_325//webapps//webroot//WEB-INF"; + new ReportActivator(), + new ChartBaseActivator()); + SimpleWork.supply(CommonOperator.class, new CommonOperatorImpl()); + String envpath = "//Applications//FineReport10_325//webapps//webroot//WEB-INF";//工程路径 SimpleWork.checkIn(envpath); + I18nResource.getInstance(); module.start(); + try { TemplateWorkBook workbook = TemplateWorkBookIO.readTemplateWorkBook("GettingStarted.cpt"); // 参数传值 diff --git a/src/main/java/com/fr/io/SaveReportToDatabase.java b/src/main/java/com/fr/io/SaveReportToDatabase.java index bd44bb7..7f62870 100644 --- a/src/main/java/com/fr/io/SaveReportToDatabase.java +++ b/src/main/java/com/fr/io/SaveReportToDatabase.java @@ -2,14 +2,17 @@ package com.fr.io; import com.fr.base.operator.common.CommonOperator; import com.fr.chart.activator.ChartBaseActivator; +import com.fr.cluster.engine.activator.standalone.StandaloneModeActivator; import com.fr.config.activator.BaseDBActivator; import com.fr.config.activator.ConfigurationActivator; import com.fr.env.operator.CommonOperatorImpl; +import com.fr.general.I18nResource; import com.fr.module.Module; import com.fr.module.tool.ActivatorToolBox; import com.fr.report.ReportActivator; import com.fr.report.RestrictionActivator; import com.fr.report.module.ReportBaseActivator; +import com.fr.scheduler.SchedulerActivator; import com.fr.store.StateServerActivator; import com.fr.workspace.simple.SimpleWork; @@ -40,14 +43,17 @@ public class SaveReportToDatabase { // 定义报表运行环境,用于执行报表 Module module = ActivatorToolBox.simpleLink(new BaseDBActivator(), new ConfigurationActivator(), + new StandaloneModeActivator(), new StateServerActivator(), + new SchedulerActivator(), new ReportBaseActivator(), new RestrictionActivator(), new ReportActivator(), new ChartBaseActivator()); SimpleWork.supply(CommonOperator.class, new CommonOperatorImpl()); - String envpath= "//Applications//FineReport10_325//webapps//webroot//WEB-INF"; //工程路径 + String envpath = "//Applications//FineReport10_325//webapps//webroot//WEB-INF";//工程路径 SimpleWork.checkIn(envpath); + I18nResource.getInstance(); module.start(); File cptfile = new File("//doc//Primary//Parameter//Parameter.cpt"); diff --git a/src/main/java/com/fr/io/SetParameterWindow.java b/src/main/java/com/fr/io/SetParameterWindow.java index aea60a9..1cf3466 100644 --- a/src/main/java/com/fr/io/SetParameterWindow.java +++ b/src/main/java/com/fr/io/SetParameterWindow.java @@ -3,10 +3,12 @@ package com.fr.io; import com.fr.base.background.ColorBackground; import com.fr.base.operator.common.CommonOperator; import com.fr.chart.activator.ChartBaseActivator; +import com.fr.cluster.engine.activator.standalone.StandaloneModeActivator; import com.fr.config.activator.BaseDBActivator; import com.fr.config.activator.ConfigurationActivator; import com.fr.env.operator.CommonOperatorImpl; import com.fr.general.Background; +import com.fr.general.I18nResource; import com.fr.io.exporter.EmbeddedTableDataExporter; import com.fr.main.impl.WorkBook; import com.fr.main.parameter.ReportParameterAttr; @@ -15,6 +17,7 @@ import com.fr.module.tool.ActivatorToolBox; import com.fr.report.ReportActivator; import com.fr.report.RestrictionActivator; import com.fr.report.module.ReportBaseActivator; +import com.fr.scheduler.SchedulerActivator; import com.fr.store.StateServerActivator; import com.fr.workspace.simple.SimpleWork; @@ -28,15 +31,20 @@ public class SetParameterWindow { // 定义报表运行环境,用于执行报表 Module module = ActivatorToolBox.simpleLink(new BaseDBActivator(), new ConfigurationActivator(), + new StandaloneModeActivator(), new StateServerActivator(), + new SchedulerActivator(), new ReportBaseActivator(), new RestrictionActivator(), new ReportActivator(), new ChartBaseActivator()); SimpleWork.supply(CommonOperator.class, new CommonOperatorImpl()); - String envpath= "//Applications//FineReport10_325//webapps//webroot//WEB-INF"; //工程路径 + String envpath = "//Applications//FineReport10_325//webapps//webroot//WEB-INF";//工程路径 SimpleWork.checkIn(envpath); + I18nResource.getInstance(); module.start(); + + WorkBook workbook = (WorkBook) TemplateWorkBookIO .readTemplateWorkBook( "//doc//Primary//Parameter//Parameter.cpt"); diff --git a/src/main/java/com/fr/io/SimpleDemo.java b/src/main/java/com/fr/io/SimpleDemo.java index 2f8f272..1ec7f41 100644 --- a/src/main/java/com/fr/io/SimpleDemo.java +++ b/src/main/java/com/fr/io/SimpleDemo.java @@ -3,10 +3,12 @@ package com.fr.io; import com.fr.base.Style; import com.fr.base.operator.common.CommonOperator; import com.fr.chart.activator.ChartBaseActivator; +import com.fr.cluster.engine.activator.standalone.StandaloneModeActivator; import com.fr.config.activator.BaseDBActivator; import com.fr.config.activator.ConfigurationActivator; import com.fr.env.operator.CommonOperatorImpl; import com.fr.general.FRFont; +import com.fr.general.I18nResource; import com.fr.main.impl.WorkBook; import com.fr.module.Module; import com.fr.module.tool.ActivatorToolBox; @@ -15,6 +17,7 @@ import com.fr.report.RestrictionActivator; import com.fr.report.cell.CellElement; import com.fr.report.elementcase.TemplateElementCase; import com.fr.report.module.ReportBaseActivator; +import com.fr.scheduler.SchedulerActivator; import com.fr.store.StateServerActivator; import com.fr.workspace.simple.SimpleWork; @@ -28,15 +31,20 @@ public class SimpleDemo { // 定义报表运行环境,用于执行报表 Module module = ActivatorToolBox.simpleLink(new BaseDBActivator(), new ConfigurationActivator(), + new StandaloneModeActivator(), new StateServerActivator(), + new SchedulerActivator(), new ReportBaseActivator(), new RestrictionActivator(), new ReportActivator(), new ChartBaseActivator()); SimpleWork.supply(CommonOperator.class, new CommonOperatorImpl()); - String envpath= "//Applications//FineReport10_325//webapps//webroot//WEB-INF"; //工程路径 + String envpath = "//Applications//FineReport10_325//webapps//webroot//WEB-INF";//工程路径 SimpleWork.checkIn(envpath); + I18nResource.getInstance(); module.start(); + + try { WorkBook workbook = (WorkBook) TemplateWorkBookIO .readTemplateWorkBook( diff --git a/src/test/java/WEB-INF/assist/phantomjs/lib/format.js b/src/test/java/WEB-INF/assist/phantomjs/lib/format.js new file mode 100644 index 0000000..f5f077f --- /dev/null +++ b/src/test/java/WEB-INF/assist/phantomjs/lib/format.js @@ -0,0 +1,376 @@ +/*! + * Includes Sizzle.js + * http://sizzlejs.com/ + * + * Copyright 2005, 2012 jQuery Foundation, Inc. and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: 2013-2-4 + */ +(function(a2,aG){var ai,w,aC=typeof aG,l=a2.document,aL=a2.location,bi=a2.jQuery,H=a2.$,aa={},a6=[],s="1.9.1",aI=a6.concat,ao=a6.push,a4=a6.slice,aM=a6.indexOf,z=aa.toString,V=aa.hasOwnProperty,aQ=s.trim,bJ=function(e,b3){return new bJ.fn.init(e,b3,w)},bA=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ac=/\S+/g,C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,br=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,a=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,bh=/^[\],:{}\s]*$/,bk=/(?:^|:|,)(?:\s*\[)+/g,bG=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,aZ=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,bS=/^-ms-/,aV=/-([\da-z])/gi,M=function(e,b3){return b3.toUpperCase() +},bW=function(e){if(l.addEventListener||e.type==="load"||l.readyState==="complete"){bl();bJ.ready()}},bl=function(){if(l.addEventListener){l.removeEventListener("DOMContentLoaded",bW,false);a2.removeEventListener("load",bW,false)}else{l.detachEvent("onreadystatechange",bW);a2.detachEvent("onload",bW)}};bJ.fn=bJ.prototype={jquery:s,constructor:bJ,init:function(e,b5,b4){var b3,b6;if(!e){return this}if(typeof e==="string"){if(e.charAt(0)==="<"&&e.charAt(e.length-1)===">"&&e.length>=3){b3=[null,e,null] +}else{b3=br.exec(e)}if(b3&&(b3[1]||!b5)){if(b3[1]){b5=b5 instanceof bJ?b5[0]:b5;bJ.merge(this,bJ.parseHTML(b3[1],b5&&b5.nodeType?b5.ownerDocument||b5:l,true));if(a.test(b3[1])&&bJ.isPlainObject(b5)){for(b3 in b5){if(bJ.isFunction(this[b3])){this[b3](b5[b3])}else{this.attr(b3,b5[b3])}}}return this}else{b6=l.getElementById(b3[2]);if(b6&&b6.parentNode){if(b6.id!==b3[2]){return b4.find(e)}this.length=1;this[0]=b6}this.context=l;this.selector=e;return this}}else{if(!b5||b5.jquery){return(b5||b4).find(e) +}else{return this.constructor(b5).find(e)}}}else{if(e.nodeType){this.context=this[0]=e;this.length=1;return this}else{if(bJ.isFunction(e)){return b4.ready(e)}}}if(e.selector!==aG){this.selector=e.selector;this.context=e.context}return bJ.makeArray(e,this)},selector:"",length:0,size:function(){return this.length},toArray:function(){return a4.call(this)},get:function(e){return e==null?this.toArray():(e<0?this[this.length+e]:this[e])},pushStack:function(e){var b3=bJ.merge(this.constructor(),e);b3.prevObject=this; +b3.context=this.context;return b3},each:function(b3,e){return bJ.each(this,b3,e)},ready:function(e){bJ.ready.promise().done(e);return this},slice:function(){return this.pushStack(a4.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(b4){var e=this.length,b3=+b4+(b4<0?e:0);return this.pushStack(b3>=0&&b30){return}ai.resolveWith(l,[bJ]);if(bJ.fn.trigger){bJ(l).trigger("ready").off("ready") +}},isFunction:function(e){return bJ.type(e)==="function"},isArray:Array.isArray||function(e){return bJ.type(e)==="array"},isWindow:function(e){return e!=null&&e==e.window},isNumeric:function(e){return !isNaN(parseFloat(e))&&isFinite(e)},type:function(e){if(e==null){return String(e)}return typeof e==="object"||typeof e==="function"?aa[z.call(e)]||"object":typeof e},isPlainObject:function(b5){if(!b5||bJ.type(b5)!=="object"||b5.nodeType||bJ.isWindow(b5)){return false}try{if(b5.constructor&&!V.call(b5,"constructor")&&!V.call(b5.constructor.prototype,"isPrototypeOf")){return false +}}catch(b4){return false}var b3;for(b3 in b5){}return b3===aG||V.call(b5,b3)},isEmptyObject:function(b3){var e;for(e in b3){return false}return true},error:function(e){throw new Error(e)},parseHTML:function(b6,b4,b5){if(!b6||typeof b6!=="string"){return null}if(typeof b4==="boolean"){b5=b4;b4=false}b4=b4||l;var b3=a.exec(b6),e=!b5&&[];if(b3){return[b4.createElement(b3[1])]}b3=bJ.buildFragment([b6],b4,e);if(e){bJ(e).remove()}return bJ.merge([],b3.childNodes)},parseJSON:function(e){if(a2.JSON&&a2.JSON.parse){return a2.JSON.parse(e) +}if(e===null){return e}if(typeof e==="string"){e=bJ.trim(e);if(e){if(bh.test(e.replace(bG,"@").replace(aZ,"]").replace(bk,""))){return(new Function("return "+e))()}}}bJ.error("Invalid JSON: "+e)},parseXML:function(b5){var b3,b4;if(!b5||typeof b5!=="string"){return null}try{if(a2.DOMParser){b4=new DOMParser();b3=b4.parseFromString(b5,"text/xml")}else{b3=new ActiveXObject("Microsoft.XMLDOM");b3.async="false";b3.loadXML(b5)}}catch(b6){b3=aG}if(!b3||!b3.documentElement||b3.getElementsByTagName("parsererror").length){bJ.error("Invalid XML: "+b5) +}return b3},noop:function(){},globalEval:function(e){if(e&&bJ.trim(e)){(a2.execScript||function(b3){a2["eval"].call(a2,b3)})(e)}},camelCase:function(e){return e.replace(bS,"ms-").replace(aV,M)},nodeName:function(b3,e){return b3.nodeName&&b3.nodeName.toLowerCase()===e.toLowerCase()},each:function(b7,b8,b3){var b6,b4=0,b5=b7.length,e=ab(b7);if(b3){if(e){for(;b40&&(b3-1) in b4)}w=bJ(l);var bY={};function ae(b3){var e=bY[b3]={};bJ.each(b3.match(ac)||[],function(b5,b4){e[b4]=true});return e}bJ.Callbacks=function(cc){cc=typeof cc==="string"?(bY[cc]||ae(cc)):bJ.extend({},cc);var b6,b5,e,b7,b8,b4,b9=[],ca=!cc.once&&[],b3=function(cd){b5=cc.memory&&cd;e=true;b8=b4||0;b4=0;b7=b9.length;b6=true;for(;b9&&b8-1){b9.splice(ce,1); +if(b6){if(ce<=b7){b7--}if(ce<=b8){b8--}}}})}return this},has:function(cd){return cd?bJ.inArray(cd,b9)>-1:!!(b9&&b9.length)},empty:function(){b9=[];return this},disable:function(){b9=ca=b5=aG;return this},disabled:function(){return !b9},lock:function(){ca=aG;if(!b5){cb.disable()}return this},locked:function(){return !ca},fireWith:function(ce,cd){cd=cd||[];cd=[ce,cd.slice?cd.slice():cd];if(b9&&(!e||ca)){if(b6){ca.push(cd)}else{b3(cd)}}return this},fire:function(){cb.fireWith(this,arguments);return this +},fired:function(){return !!e}};return cb};bJ.extend({Deferred:function(b4){var b3=[["resolve","done",bJ.Callbacks("once memory"),"resolved"],["reject","fail",bJ.Callbacks("once memory"),"rejected"],["notify","progress",bJ.Callbacks("memory")]],b5="pending",b6={state:function(){return b5},always:function(){e.done(arguments).fail(arguments);return this},then:function(){var b7=arguments;return bJ.Deferred(function(b8){bJ.each(b3,function(ca,b9){var cc=b9[0],cb=bJ.isFunction(b7[ca])&&b7[ca];e[b9[1]](function(){var cd=cb&&cb.apply(this,arguments); +if(cd&&bJ.isFunction(cd.promise)){cd.promise().done(b8.resolve).fail(b8.reject).progress(b8.notify)}else{b8[cc+"With"](this===b6?b8.promise():this,cb?[cd]:arguments)}})});b7=null}).promise()},promise:function(b7){return b7!=null?bJ.extend(b7,b6):b6}},e={};b6.pipe=b6.then;bJ.each(b3,function(b8,b7){var ca=b7[2],b9=b7[3];b6[b7[1]]=ca.add;if(b9){ca.add(function(){b5=b9},b3[b8^1][2].disable,b3[2][2].lock)}e[b7[0]]=function(){e[b7[0]+"With"](this===e?b6:this,arguments);return this};e[b7[0]+"With"]=ca.fireWith +});b6.promise(e);if(b4){b4.call(e,e)}return e},when:function(b6){var b4=0,b8=a4.call(arguments),e=b8.length,b3=e!==1||(b6&&bJ.isFunction(b6.promise))?e:0,cb=b3===1?b6:bJ.Deferred(),b5=function(cd,ce,cc){return function(cf){ce[cd]=this;cc[cd]=arguments.length>1?a4.call(arguments):cf;if(cc===ca){cb.notifyWith(ce,cc)}else{if(!(--b3)){cb.resolveWith(ce,cc)}}}},ca,b7,b9;if(e>1){ca=new Array(e);b7=new Array(e);b9=new Array(e);for(;b4
a";cd=b3.getElementsByTagName("*");cb=b3.getElementsByTagName("a")[0];if(!cd||!cb||!cd.length){return{}}cc=l.createElement("select");b5=cc.appendChild(l.createElement("option"));ca=b3.getElementsByTagName("input")[0];cb.style.cssText="top:1px;float:left;opacity:.5"; +ce={getSetAttribute:b3.className!=="t",leadingWhitespace:b3.firstChild.nodeType===3,tbody:!b3.getElementsByTagName("tbody").length,htmlSerialize:!!b3.getElementsByTagName("link").length,style:/top/.test(cb.getAttribute("style")),hrefNormalized:cb.getAttribute("href")==="/a",opacity:/^0.5/.test(cb.style.opacity),cssFloat:!!cb.style.cssFloat,checkOn:!!ca.value,optSelected:b5.selected,enctype:!!l.createElement("form").enctype,html5Clone:l.createElement("nav").cloneNode(true).outerHTML!=="<:nav>",boxModel:l.compatMode==="CSS1Compat",deleteExpando:true,noCloneEvent:true,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableMarginRight:true,boxSizingReliable:true,pixelPosition:false}; +ca.checked=true;ce.noCloneChecked=ca.cloneNode(true).checked;cc.disabled=true;ce.optDisabled=!b5.disabled;try{delete b3.test}catch(b8){ce.deleteExpando=false}ca=l.createElement("input");ca.setAttribute("value","");ce.input=ca.getAttribute("value")==="";ca.value="t";ca.setAttribute("type","radio");ce.radioValue=ca.value==="t";ca.setAttribute("checked","t");ca.setAttribute("name","t");b9=l.createDocumentFragment();b9.appendChild(ca);ce.appendChecked=ca.checked;ce.checkClone=b9.cloneNode(true).cloneNode(true).lastChild.checked; +if(b3.attachEvent){b3.attachEvent("onclick",function(){ce.noCloneEvent=false});b3.cloneNode(true).click()}for(b6 in {submit:true,change:true,focusin:true}){b3.setAttribute(b7="on"+b6,"t");ce[b6+"Bubbles"]=b7 in a2||b3.attributes[b7].expando===false}b3.style.backgroundClip="content-box";b3.cloneNode(true).style.backgroundClip="";ce.clearCloneStyle=b3.style.backgroundClip==="content-box";bJ(function(){var cf,ci,ch,cg="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",e=l.getElementsByTagName("body")[0]; +if(!e){return}cf=l.createElement("div");cf.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px";e.appendChild(cf).appendChild(b3);b3.innerHTML="
t
";ch=b3.getElementsByTagName("td");ch[0].style.cssText="padding:0;margin:0;border:0;display:none";b4=(ch[0].offsetHeight===0);ch[0].style.display="";ch[1].style.display="none";ce.reliableHiddenOffsets=b4&&(ch[0].offsetHeight===0);b3.innerHTML="";b3.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;"; +ce.boxSizing=(b3.offsetWidth===4);ce.doesNotIncludeMarginInBodyOffset=(e.offsetTop!==1);if(a2.getComputedStyle){ce.pixelPosition=(a2.getComputedStyle(b3,null)||{}).top!=="1%";ce.boxSizingReliable=(a2.getComputedStyle(b3,null)||{width:"4px"}).width==="4px";ci=b3.appendChild(l.createElement("div"));ci.style.cssText=b3.style.cssText=cg;ci.style.marginRight=ci.style.width="0";b3.style.width="1px";ce.reliableMarginRight=!parseFloat((a2.getComputedStyle(ci,null)||{}).marginRight)}if(typeof b3.style.zoom!==aC){b3.innerHTML=""; +b3.style.cssText=cg+"width:1px;padding:1px;display:inline;zoom:1";ce.inlineBlockNeedsLayout=(b3.offsetWidth===3);b3.style.display="block";b3.innerHTML="
";b3.firstChild.style.width="5px";ce.shrinkWrapBlocks=(b3.offsetWidth!==3);if(ce.inlineBlockNeedsLayout){e.style.zoom=1}}e.removeChild(cf);cf=b3=ch=ci=null});cd=cc=b9=b5=cb=ca=null;return ce})();var bw=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,aN=/([A-Z])/g;function ba(b5,b3,b7,b6){if(!bJ.acceptData(b5)){return}var b8,ca,cb=bJ.expando,b9=typeof b3==="string",cc=b5.nodeType,e=cc?bJ.cache:b5,b4=cc?b5[cb]:b5[cb]&&cb; +if((!b4||!e[b4]||(!b6&&!e[b4].data))&&b9&&b7===aG){return}if(!b4){if(cc){b5[cb]=b4=a6.pop()||bJ.guid++}else{b4=cb}}if(!e[b4]){e[b4]={};if(!cc){e[b4].toJSON=bJ.noop}}if(typeof b3==="object"||typeof b3==="function"){if(b6){e[b4]=bJ.extend(e[b4],b3)}else{e[b4].data=bJ.extend(e[b4].data,b3)}}b8=e[b4];if(!b6){if(!b8.data){b8.data={}}b8=b8.data}if(b7!==aG){b8[bJ.camelCase(b3)]=b7}if(b9){ca=b8[b3];if(ca==null){ca=b8[bJ.camelCase(b3)]}}else{ca=b8}return ca}function Z(b5,b3,b6){if(!bJ.acceptData(b5)){return +}var b8,b7,b9,ca=b5.nodeType,e=ca?bJ.cache:b5,b4=ca?b5[bJ.expando]:bJ.expando;if(!e[b4]){return}if(b3){b9=b6?e[b4]:e[b4].data;if(b9){if(!bJ.isArray(b3)){if(b3 in b9){b3=[b3]}else{b3=bJ.camelCase(b3);if(b3 in b9){b3=[b3]}else{b3=b3.split(" ")}}}else{b3=b3.concat(bJ.map(b3,bJ.camelCase))}for(b8=0,b7=b3.length;b81,null,true)},removeData:function(e){return this.each(function(){bJ.removeData(this,e)})}});function by(b5,b4,b6){if(b6===aG&&b5.nodeType===1){var b3="data-"+b4.replace(aN,"-$1").toLowerCase();b6=b5.getAttribute(b3);if(typeof b6==="string"){try{b6=b6==="true"?true:b6==="false"?false:b6==="null"?null:+b6+""===b6?+b6:bw.test(b6)?bJ.parseJSON(b6):b6 +}catch(b7){}bJ.data(b5,b4,b6)}else{b6=aG}}return b6}function N(b3){var e;for(e in b3){if(e==="data"&&bJ.isEmptyObject(b3[e])){continue}if(e!=="toJSON"){return false}}return true}bJ.extend({queue:function(b4,b3,b5){var e;if(b4){b3=(b3||"fx")+"queue";e=bJ._data(b4,b3);if(b5){if(!e||bJ.isArray(b5)){e=bJ._data(b4,b3,bJ.makeArray(b5))}else{e.push(b5)}}return e||[]}},dequeue:function(b7,b6){b6=b6||"fx";var b3=bJ.queue(b7,b6),b8=b3.length,b5=b3.shift(),e=bJ._queueHooks(b7,b6),b4=function(){bJ.dequeue(b7,b6) +};if(b5==="inprogress"){b5=b3.shift();b8--}e.cur=b5;if(b5){if(b6==="fx"){b3.unshift("inprogress")}delete e.stop;b5.call(b7,b4,e)}if(!b8&&e){e.empty.fire()}},_queueHooks:function(b4,b3){var e=b3+"queueHooks";return bJ._data(b4,e)||bJ._data(b4,e,{empty:bJ.Callbacks("once memory").add(function(){bJ._removeData(b4,b3+"queue");bJ._removeData(b4,e)})})}});bJ.fn.extend({queue:function(e,b3){var b4=2;if(typeof e!=="string"){b3=e;e="fx";b4--}if(arguments.length1) +},removeAttr:function(e){return this.each(function(){bJ.removeAttr(this,e)})},prop:function(e,b3){return bJ.access(this,bJ.prop,e,b3,arguments.length>1)},removeProp:function(e){e=bJ.propFix[e]||e;return this.each(function(){try{this[e]=aG;delete this[e]}catch(b3){}})},addClass:function(b9){var b3,e,ca,b6,b4,b5=0,b7=this.length,b8=typeof b9==="string"&&b9;if(bJ.isFunction(b9)){return this.each(function(cb){bJ(this).addClass(b9.call(this,cb,this.className))})}if(b8){b3=(b9||"").match(ac)||[];for(;b5=0){ca=ca.replace(" "+b6+" "," ")}}e.className=b9?bJ.trim(ca):""}}}return this},toggleClass:function(b5,b3){var b4=typeof b5,e=typeof b3==="boolean";if(bJ.isFunction(b5)){return this.each(function(b6){bJ(this).toggleClass(b5.call(this,b6,this.className,b3),b3)})}return this.each(function(){if(b4==="string"){var b8,b7=0,b6=bJ(this),b9=b3,ca=b5.match(ac)||[];while((b8=ca[b7++])){b9=e?b9:!b6.hasClass(b8);b6[b9?"addClass":"removeClass"](b8) +}}else{if(b4===aC||b4==="boolean"){if(this.className){bJ._data(this,"__className__",this.className)}this.className=this.className||b5===false?"":bJ._data(this,"__className__")||""}}})},hasClass:function(e){var b5=" "+e+" ",b4=0,b3=this.length;for(;b4=0){return true}}return false},val:function(b5){var b3,e,b6,b4=this[0];if(!arguments.length){if(b4){e=bJ.valHooks[b4.type]||bJ.valHooks[b4.nodeName.toLowerCase()]; +if(e&&"get" in e&&(b3=e.get(b4,"value"))!==aG){return b3}b3=b4.value;return typeof b3==="string"?b3.replace(ak,""):b3==null?"":b3}return}b6=bJ.isFunction(b5);return this.each(function(b8){var b9,b7=bJ(this);if(this.nodeType!==1){return}if(b6){b9=b5.call(this,b8,b7.val())}else{b9=b5}if(b9==null){b9=""}else{if(typeof b9==="number"){b9+=""}else{if(bJ.isArray(b9)){b9=bJ.map(b9,function(ca){return ca==null?"":ca+""})}}}e=bJ.valHooks[this.type]||bJ.valHooks[this.nodeName.toLowerCase()];if(!e||!("set" in e)||e.set(this,b9,"value")===aG){this.value=b9 +}})}});bJ.extend({valHooks:{option:{get:function(e){var b3=e.attributes.value;return !b3||b3.specified?e.value:e.text}},select:{get:function(e){var b8,b4,ca=e.options,b6=e.selectedIndex,b5=e.type==="select-one"||b6<0,b9=b5?null:[],b7=b5?b6+1:ca.length,b3=b6<0?b7:b5?b6:0;for(;b3=0});if(!e.length){b3.selectedIndex=-1}return e}}},attr:function(b7,b5,b8){var e,b6,b4,b3=b7.nodeType;if(!b7||b3===3||b3===8||b3===2){return}if(typeof b7.getAttribute===aC){return bJ.prop(b7,b5,b8)}b6=b3!==1||!bJ.isXMLDoc(b7);if(b6){b5=b5.toLowerCase();e=bJ.attrHooks[b5]||(L.test(b5)?bZ:a8)}if(b8!==aG){if(b8===null){bJ.removeAttr(b7,b5)}else{if(e&&b6&&"set" in e&&(b4=e.set(b7,b8,b5))!==aG){return b4 +}else{b7.setAttribute(b5,b8+"");return b8}}}else{if(e&&b6&&"get" in e&&(b4=e.get(b7,b5))!==null){return b4}else{if(typeof b7.getAttribute!==aC){b4=b7.getAttribute(b5)}return b4==null?aG:b4}}},removeAttr:function(b4,b6){var e,b5,b3=0,b7=b6&&b6.match(ac);if(b7&&b4.nodeType===1){while((e=b7[b3++])){b5=bJ.propFix[e]||e;if(L.test(e)){if(!bP&&aq.test(e)){b4[bJ.camelCase("default-"+e)]=b4[b5]=false}else{b4[b5]=false}}else{bJ.attr(b4,e,"")}b4.removeAttribute(bP?e:b5)}}},attrHooks:{type:{set:function(e,b3){if(!bJ.support.radioValue&&b3==="radio"&&bJ.nodeName(e,"input")){var b4=e.value; +e.setAttribute("type",b3);if(b4){e.value=b4}return b3}}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(b7,b5,b8){var b4,e,b6,b3=b7.nodeType;if(!b7||b3===3||b3===8||b3===2){return}b6=b3!==1||!bJ.isXMLDoc(b7);if(b6){b5=bJ.propFix[b5]||b5;e=bJ.propHooks[b5]}if(b8!==aG){if(e&&"set" in e&&(b4=e.set(b7,b8,b5))!==aG){return b4 +}else{return(b7[b5]=b8)}}else{if(e&&"get" in e&&(b4=e.get(b7,b5))!==null){return b4}else{return b7[b5]}}},propHooks:{tabIndex:{get:function(b3){var e=b3.getAttributeNode("tabindex");return e&&e.specified?parseInt(e.value,10):aF.test(b3.nodeName)||D.test(b3.nodeName)&&b3.href?0:aG}}}});bZ={get:function(b5,b3){var b6=bJ.prop(b5,b3),e=typeof b6==="boolean"&&b5.getAttribute(b3),b4=typeof b6==="boolean"?bF&&bP?e!=null:aq.test(b3)?b5[bJ.camelCase("default-"+b3)]:!!e:b5.getAttributeNode(b3);return b4&&b4.value!==false?b3.toLowerCase():aG +},set:function(b3,b4,e){if(b4===false){bJ.removeAttr(b3,e)}else{if(bF&&bP||!aq.test(e)){b3.setAttribute(!bP&&bJ.propFix[e]||e,e)}else{b3[bJ.camelCase("default-"+e)]=b3[e]=true}}return e}};if(!bF||!bP){bJ.attrHooks.value={get:function(b4,b3){var e=b4.getAttributeNode(b3);return bJ.nodeName(b4,"input")?b4.defaultValue:e&&e.specified?e.value:aG},set:function(b3,b4,e){if(bJ.nodeName(b3,"input")){b3.defaultValue=b4}else{return a8&&a8.set(b3,b4,e)}}}}if(!bP){a8=bJ.valHooks.button={get:function(b4,b3){var e=b4.getAttributeNode(b3); +return e&&(b3==="id"||b3==="name"||b3==="coords"?e.value!=="":e.specified)?e.value:aG},set:function(b4,b5,b3){var e=b4.getAttributeNode(b3);if(!e){b4.setAttributeNode((e=b4.ownerDocument.createAttribute(b3)))}e.value=b5+="";return b3==="value"||b5===b4.getAttribute(b3)?b5:aG}};bJ.attrHooks.contenteditable={get:a8.get,set:function(b3,b4,e){a8.set(b3,b4===""?false:b4,e)}};bJ.each(["width","height"],function(b3,e){bJ.attrHooks[e]=bJ.extend(bJ.attrHooks[e],{set:function(b4,b5){if(b5===""){b4.setAttribute(e,"auto"); +return b5}}})})}if(!bJ.support.hrefNormalized){bJ.each(["href","src","width","height"],function(b3,e){bJ.attrHooks[e]=bJ.extend(bJ.attrHooks[e],{get:function(b5){var b4=b5.getAttribute(e,2);return b4==null?aG:b4}})});bJ.each(["href","src"],function(b3,e){bJ.propHooks[e]={get:function(b4){return b4.getAttribute(e,4)}}})}if(!bJ.support.style){bJ.attrHooks.style={get:function(e){return e.style.cssText||aG},set:function(e,b3){return(e.style.cssText=b3+"")}}}if(!bJ.support.optSelected){bJ.propHooks.selected=bJ.extend(bJ.propHooks.selected,{get:function(b3){var e=b3.parentNode; +if(e){e.selectedIndex;if(e.parentNode){e.parentNode.selectedIndex}}return null}})}if(!bJ.support.enctype){bJ.propFix.enctype="encoding"}if(!bJ.support.checkOn){bJ.each(["radio","checkbox"],function(){bJ.valHooks[this]={get:function(e){return e.getAttribute("value")===null?"on":e.value}}})}bJ.each(["radio","checkbox"],function(){bJ.valHooks[this]=bJ.extend(bJ.valHooks[this],{set:function(e,b3){if(bJ.isArray(b3)){return(e.checked=bJ.inArray(bJ(e).val(),b3)>=0)}}})});var bH=/^(?:input|select|textarea)$/i,a3=/^key/,bN=/^(?:mouse|contextmenu)|click/,bB=/^(?:focusinfocus|focusoutblur)$/,bu=/^([^.]*)(?:\.(.+)|)$/; +function R(){return true}function X(){return false}bJ.event={global:{},add:function(b6,cb,cg,b8,b7){var b9,ch,ci,b4,cd,ca,cf,b5,ce,e,b3,cc=bJ._data(b6);if(!cc){return}if(cg.handler){b4=cg;cg=b4.handler;b7=b4.selector}if(!cg.guid){cg.guid=bJ.guid++}if(!(ch=cc.events)){ch=cc.events={}}if(!(ca=cc.handle)){ca=cc.handle=function(cj){return typeof bJ!==aC&&(!cj||bJ.event.triggered!==cj.type)?bJ.event.dispatch.apply(ca.elem,arguments):aG};ca.elem=b6}cb=(cb||"").match(ac)||[""];ci=cb.length;while(ci--){b9=bu.exec(cb[ci])||[]; +ce=b3=b9[1];e=(b9[2]||"").split(".").sort();cd=bJ.event.special[ce]||{};ce=(b7?cd.delegateType:cd.bindType)||ce;cd=bJ.event.special[ce]||{};cf=bJ.extend({type:ce,origType:b3,data:b8,handler:cg,guid:cg.guid,selector:b7,needsContext:b7&&bJ.expr.match.needsContext.test(b7),namespace:e.join(".")},b4);if(!(b5=ch[ce])){b5=ch[ce]=[];b5.delegateCount=0;if(!cd.setup||cd.setup.call(b6,b8,e,ca)===false){if(b6.addEventListener){b6.addEventListener(ce,ca,false)}else{if(b6.attachEvent){b6.attachEvent("on"+ce,ca) +}}}}if(cd.add){cd.add.call(b6,cf);if(!cf.handler.guid){cf.handler.guid=cg.guid}}if(b7){b5.splice(b5.delegateCount++,0,cf)}else{b5.push(cf)}bJ.event.global[ce]=true}b6=null},remove:function(b5,cb,ci,b6,ca){var b8,cf,b9,b7,ch,cg,cd,b4,ce,e,b3,cc=bJ.hasData(b5)&&bJ._data(b5);if(!cc||!(cg=cc.events)){return}cb=(cb||"").match(ac)||[""];ch=cb.length;while(ch--){b9=bu.exec(cb[ch])||[];ce=b3=b9[1];e=(b9[2]||"").split(".").sort();if(!ce){for(ce in cg){bJ.event.remove(b5,ce+cb[ch],ci,b6,true)}continue}cd=bJ.event.special[ce]||{}; +ce=(b6?cd.delegateType:cd.bindType)||ce;b4=cg[ce]||[];b9=b9[2]&&new RegExp("(^|\\.)"+e.join("\\.(?:.*\\.|)")+"(\\.|$)");b7=b8=b4.length;while(b8--){cf=b4[b8];if((ca||b3===cf.origType)&&(!ci||ci.guid===cf.guid)&&(!b9||b9.test(cf.namespace))&&(!b6||b6===cf.selector||b6==="**"&&cf.selector)){b4.splice(b8,1);if(cf.selector){b4.delegateCount--}if(cd.remove){cd.remove.call(b5,cf)}}}if(b7&&!b4.length){if(!cd.teardown||cd.teardown.call(b5,e,cc.handle)===false){bJ.removeEvent(b5,ce,cc.handle)}delete cg[ce] +}}if(bJ.isEmptyObject(cg)){delete cc.handle;bJ._removeData(b5,"events")}},trigger:function(b3,ca,b6,ch){var cb,b5,cf,cg,cd,b9,b8,b7=[b6||l],ce=V.call(b3,"type")?b3.type:b3,b4=V.call(b3,"namespace")?b3.namespace.split("."):[];cf=b9=b6=b6||l;if(b6.nodeType===3||b6.nodeType===8){return}if(bB.test(ce+bJ.event.triggered)){return}if(ce.indexOf(".")>=0){b4=ce.split(".");ce=b4.shift();b4.sort()}b5=ce.indexOf(":")<0&&"on"+ce;b3=b3[bJ.expando]?b3:new bJ.Event(ce,typeof b3==="object"&&b3);b3.isTrigger=true; +b3.namespace=b4.join(".");b3.namespace_re=b3.namespace?new RegExp("(^|\\.)"+b4.join("\\.(?:.*\\.|)")+"(\\.|$)"):null;b3.result=aG;if(!b3.target){b3.target=b6}ca=ca==null?[b3]:bJ.makeArray(ca,[b3]);cd=bJ.event.special[ce]||{};if(!ch&&cd.trigger&&cd.trigger.apply(b6,ca)===false){return}if(!ch&&!cd.noBubble&&!bJ.isWindow(b6)){cg=cd.delegateType||ce;if(!bB.test(cg+ce)){cf=cf.parentNode}for(;cf;cf=cf.parentNode){b7.push(cf);b9=cf}if(b9===(b6.ownerDocument||l)){b7.push(b9.defaultView||b9.parentWindow||a2) +}}b8=0;while((cf=b7[b8++])&&!b3.isPropagationStopped()){b3.type=b8>1?cg:cd.bindType||ce;cb=(bJ._data(cf,"events")||{})[b3.type]&&bJ._data(cf,"handle");if(cb){cb.apply(cf,ca)}cb=b5&&cf[b5];if(cb&&bJ.acceptData(cf)&&cb.apply&&cb.apply(cf,ca)===false){b3.preventDefault()}}b3.type=ce;if(!ch&&!b3.isDefaultPrevented()){if((!cd._default||cd._default.apply(b6.ownerDocument,ca)===false)&&!(ce==="click"&&bJ.nodeName(b6,"a"))&&bJ.acceptData(b6)){if(b5&&b6[ce]&&!bJ.isWindow(b6)){b9=b6[b5];if(b9){b6[b5]=null}bJ.event.triggered=ce; +try{b6[ce]()}catch(cc){}bJ.event.triggered=aG;if(b9){b6[b5]=b9}}}}return b3.result},dispatch:function(e){e=bJ.event.fix(e);var b7,b8,cc,b3,b5,cb=[],ca=a4.call(arguments),b4=(bJ._data(this,"events")||{})[e.type]||[],b9=bJ.event.special[e.type]||{};ca[0]=e;e.delegateTarget=this;if(b9.preDispatch&&b9.preDispatch.call(this,e)===false){return}cb=bJ.event.handlers.call(this,e,b4);b7=0;while((b3=cb[b7++])&&!e.isPropagationStopped()){e.currentTarget=b3.elem;b5=0;while((cc=b3.handlers[b5++])&&!e.isImmediatePropagationStopped()){if(!e.namespace_re||e.namespace_re.test(cc.namespace)){e.handleObj=cc; +e.data=cc.data;var b6=((bJ.event.special[cc.origType]||{}).handle||cc.handler);if(b6.apply){b8=b6.apply(b3.elem,ca)}if(b8!==aG){if((e.result=b8)===false){e.preventDefault();e.stopPropagation()}}}}}if(b9.postDispatch){b9.postDispatch.call(this,e)}return e.result},handlers:function(e,b4){var b3,b9,b7,b6,b8=[],b5=b4.delegateCount,ca=e.target;if(b5&&ca.nodeType&&(!e.button||e.type!=="click")){for(;ca!=this;ca=ca.parentNode||this){if(ca.nodeType===1&&(ca.disabled!==true||e.type!=="click")){b7=[];for(b6=0; +b6=0:bJ.find(b3,this,null,[ca]).length}if(b7[b3]){b7.push(b9)}}if(b7.length){b8.push({elem:ca,handlers:b7})}}}}if(b5+~])"+cp+"*"),cP=new RegExp(ck),cQ=new RegExp("^"+cK+"$"),cY={"ID":new RegExp("^#("+b3+")"),"CLASS":new RegExp("^\\.("+b3+")"),"NAME":new RegExp("^\\[name=['\"]?("+b3+")['\"]?\\]"),"TAG":new RegExp("^("+b3.replace("w","w*")+")"),"ATTR":new RegExp("^"+c2),"PSEUDO":new RegExp("^"+ck),"CHILD":new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+cp+"*(even|odd|(([+-]|)(\\d*)n|)"+cp+"*(?:([+-]|)"+cp+"*(\\d+)|))"+cp+"*\\)|)","i"),"needsContext":new RegExp("^"+cp+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+cp+"*((?:-\\d)?\\d*)"+cp+"*\\)|)(?=[^-]|$)","i")},cW=/[\x20\t\r\n\f]*[+~]/,cM=/^[^{]+\{\s*\[native code/,cO=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,b8=/^(?:input|select|textarea|button)$/i,cl=/^h\d$/i,cL=/'|\\/g,ct=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,cs=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,c1=function(e,di){var dh="0x"+di-65536; +return dh!==dh?di:dh<0?String.fromCharCode(dh+65536):String.fromCharCode(dh>>10|55296,dh&1023|56320)};try{cm.call(cI.documentElement.childNodes,0)[0].nodeType}catch(cC){cm=function(dh){var di,e=[];while((di=this[dh++])){e.push(di)}return e}}function cE(e){return cM.test(e+"")}function cz(){var e,dh=[];return(e=function(di,dj){if(dh.push(di+=" ")>cn.cacheLength){delete e[dh.shift()]}return(e[di]=dj)})}function cj(e){e[c5]=true;return e}function cc(dh){var dj=cB.createElement("div");try{return dh(dj) +}catch(di){return false}finally{dj=null}}function cv(dp,dh,dt,dv){var du,dl,dm,dr,ds,dk,dj,e,di,dq;if((dh?dh.ownerDocument||dh:cI)!==cB){cV(dh)}dh=dh||cB;dt=dt||[];if(!dp||typeof dp!=="string"){return dt}if((dr=dh.nodeType)!==1&&dr!==9){return[]}if(!cd&&!dv){if((du=cO.exec(dp))){if((dm=du[1])){if(dr===9){dl=dh.getElementById(dm);if(dl&&dl.parentNode){if(dl.id===dm){dt.push(dl);return dt}}else{return dt}}else{if(dh.ownerDocument&&(dl=dh.ownerDocument.getElementById(dm))&&cF(dh,dl)&&dl.id===dm){dt.push(dl); +return dt}}}else{if(du[2]){b4.apply(dt,cm.call(dh.getElementsByTagName(dp),0));return dt}else{if((dm=du[3])&&dd.getByClassName&&dh.getElementsByClassName){b4.apply(dt,cm.call(dh.getElementsByClassName(dm),0));return dt}}}}if(dd.qsa&&!cZ.test(dp)){dj=true;e=c5;di=dh;dq=dr===9&&dp;if(dr===1&&dh.nodeName.toLowerCase()!=="object"){dk=cf(dp);if((dj=dh.getAttribute("id"))){e=dj.replace(cL,"\\$&")}else{dh.setAttribute("id",e)}e="[id='"+e+"'] ";ds=dk.length;while(ds--){dk[ds]=e+cg(dk[ds])}di=cW.test(dp)&&dh.parentNode||dh; +dq=dk.join(",")}if(dq){try{b4.apply(dt,cm.call(di.querySelectorAll(dq),0));return dt}catch(dn){}finally{if(!dj){dh.removeAttribute("id")}}}}}return dc(dp.replace(cr,"$1"),dh,dt,dv)}cJ=cv.isXML=function(e){var dh=e&&(e.ownerDocument||e).documentElement;return dh?dh.nodeName!=="HTML":false};cV=cv.setDocument=function(e){var dh=e?e.ownerDocument||e:cI;if(dh===cB||dh.nodeType!==9||!dh.documentElement){return cB}cB=dh;co=dh.documentElement;cd=cJ(dh);dd.tagNameNoComments=cc(function(di){di.appendChild(dh.createComment("")); +return !di.getElementsByTagName("*").length});dd.attributes=cc(function(dj){dj.innerHTML="";var di=typeof dj.lastChild.getAttribute("multiple");return di!=="boolean"&&di!=="string"});dd.getByClassName=cc(function(di){di.innerHTML="";if(!di.getElementsByClassName||!di.getElementsByClassName("e").length){return false}di.lastChild.className="e";return di.getElementsByClassName("e").length===2});dd.getByName=cc(function(dj){dj.id=c5+0; +dj.innerHTML="
";co.insertBefore(dj,co.firstChild);var di=dh.getElementsByName&&dh.getElementsByName(c5).length===2+dh.getElementsByName(c5+0).length;dd.getIdNotName=!dh.getElementById(c5);co.removeChild(dj);return di});cn.attrHandle=cc(function(di){di.innerHTML="";return di.firstChild&&typeof di.firstChild.getAttribute!==c9&&di.firstChild.getAttribute("href")==="#"})?{}:{"href":function(di){return di.getAttribute("href",2)},"type":function(di){return di.getAttribute("type") +}};if(dd.getIdNotName){cn.find["ID"]=function(dk,dj){if(typeof dj.getElementById!==c9&&!cd){var di=dj.getElementById(dk);return di&&di.parentNode?[di]:[]}};cn.filter["ID"]=function(dj){var di=dj.replace(cs,c1);return function(dk){return dk.getAttribute("id")===di}}}else{cn.find["ID"]=function(dk,dj){if(typeof dj.getElementById!==c9&&!cd){var di=dj.getElementById(dk);return di?di.id===dk||typeof di.getAttributeNode!==c9&&di.getAttributeNode("id").value===dk?[di]:ch:[]}};cn.filter["ID"]=function(dj){var di=dj.replace(cs,c1); +return function(dl){var dk=typeof dl.getAttributeNode!==c9&&dl.getAttributeNode("id");return dk&&dk.value===di}}}cn.find["TAG"]=dd.tagNameNoComments?function(di,dj){if(typeof dj.getElementsByTagName!==c9){return dj.getElementsByTagName(di)}}:function(di,dm){var dn,dl=[],dk=0,dj=dm.getElementsByTagName(di);if(di==="*"){while((dn=dj[dk++])){if(dn.nodeType===1){dl.push(dn)}}return dl}return dj};cn.find["NAME"]=dd.getByName&&function(di,dj){if(typeof dj.getElementsByName!==c9){return dj.getElementsByName(name) +}};cn.find["CLASS"]=dd.getByClassName&&function(dj,di){if(typeof di.getElementsByClassName!==c9&&!cd){return di.getElementsByClassName(dj)}};db=[];cZ=[":focus"];if((dd.qsa=cE(dh.querySelectorAll))){cc(function(di){di.innerHTML="";if(!di.querySelectorAll("[selected]").length){cZ.push("\\["+cp+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)")}if(!di.querySelectorAll(":checked").length){cZ.push(":checked")}});cc(function(di){di.innerHTML=""; +if(di.querySelectorAll("[i^='']").length){cZ.push("[*^$]="+cp+"*(?:\"\"|'')")}if(!di.querySelectorAll(":enabled").length){cZ.push(":enabled",":disabled")}di.querySelectorAll("*,:x");cZ.push(",.*:")})}if((dd.matchesSelector=cE((ca=co.matchesSelector||co.mozMatchesSelector||co.webkitMatchesSelector||co.oMatchesSelector||co.msMatchesSelector)))){cc(function(di){dd.disconnectedMatch=ca.call(di,"div");ca.call(di,"[s!='']:x");db.push("!=",ck)})}cZ=new RegExp(cZ.join("|"));db=new RegExp(db.join("|"));cF=cE(co.contains)||co.compareDocumentPosition?function(dj,di){var dl=dj.nodeType===9?dj.documentElement:dj,dk=di&&di.parentNode; +return dj===dk||!!(dk&&dk.nodeType===1&&(dl.contains?dl.contains(dk):dj.compareDocumentPosition&&dj.compareDocumentPosition(dk)&16))}:function(dj,di){if(di){while((di=di.parentNode)){if(di===dj){return true}}}return false};cD=co.compareDocumentPosition?function(dj,di){var dk;if(dj===di){cT=true;return 0}if((dk=di.compareDocumentPosition&&dj.compareDocumentPosition&&dj.compareDocumentPosition(di))){if(dk&1||dj.parentNode&&dj.parentNode.nodeType===11){if(dj===dh||cF(cI,dj)){return -1}if(di===dh||cF(cI,di)){return 1 +}return 0}return dk&4?-1:1}return dj.compareDocumentPosition?-1:1}:function(dj,di){var dq,dm=0,dp=dj.parentNode,dl=di.parentNode,dk=[dj],dn=[di];if(dj===di){cT=true;return 0}else{if(!dp||!dl){return dj===dh?-1:di===dh?1:dp?-1:dl?1:0}else{if(dp===dl){return b6(dj,di)}}}dq=dj;while((dq=dq.parentNode)){dk.unshift(dq)}dq=di;while((dq=dq.parentNode)){dn.unshift(dq)}while(dk[dm]===dn[dm]){dm++}return dm?b6(dk[dm],dn[dm]):dk[dm]===cI?-1:dn[dm]===cI?1:0};cT=false;[0,0].sort(cD);dd.detectDuplicates=cT;return cB +};cv.matches=function(dh,e){return cv(dh,null,null,e)};cv.matchesSelector=function(di,dk){if((di.ownerDocument||di)!==cB){cV(di)}dk=dk.replace(ct,"='$1']");if(dd.matchesSelector&&!cd&&(!db||!db.test(dk))&&!cZ.test(dk)){try{var dh=ca.call(di,dk);if(dh||dd.disconnectedMatch||di.document&&di.document.nodeType!==11){return dh}}catch(dj){}}return cv(dk,cB,null,[di]).length>0};cv.contains=function(e,dh){if((e.ownerDocument||e)!==cB){cV(e)}return cF(e,dh)};cv.attr=function(dh,e){var di;if((dh.ownerDocument||dh)!==cB){cV(dh) +}if(!cd){e=e.toLowerCase()}if((di=cn.attrHandle[e])){return di(dh)}if(cd||dd.attributes){return dh.getAttribute(e)}return((di=dh.getAttributeNode(e))||dh.getAttribute(e))&&dh[e]===true?e:di&&di.specified?di.value:null};cv.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)};cv.uniqueSort=function(di){var dj,dk=[],dh=1,e=0;cT=!dd.detectDuplicates;di.sort(cD);if(cT){for(;(dj=di[dh]);dh++){if(dj===di[dh-1]){e=dk.push(dh)}}while(e--){di.splice(dk[e],1)}}return di};function b6(dh,e){var dj=e&&dh,di=dj&&(~e.sourceIndex||cN)-(~dh.sourceIndex||cN); +if(di){return di}if(dj){while((dj=dj.nextSibling)){if(dj===e){return -1}}}return dh?1:-1}function cw(e){return function(di){var dh=di.nodeName.toLowerCase();return dh==="input"&&di.type===e}}function b7(e){return function(di){var dh=di.nodeName.toLowerCase();return(dh==="input"||dh==="button")&&di.type===e}}function c3(e){return cj(function(dh){dh=+dh;return cj(function(di,dm){var dk,dj=e([],di.length,dh),dl=dj.length;while(dl--){if(di[(dk=dj[dl])]){di[dk]=!(dm[dk]=di[dk])}}})})}cH=cv.getText=function(dk){var dj,dh="",di=0,e=dk.nodeType; +if(!e){for(;(dj=dk[di]);di++){dh+=cH(dj)}}else{if(e===1||e===9||e===11){if(typeof dk.textContent==="string"){return dk.textContent}else{for(dk=dk.firstChild;dk;dk=dk.nextSibling){dh+=cH(dk)}}}else{if(e===3||e===4){return dk.nodeValue}}}return dh};cn=cv.selectors={cacheLength:50,createPseudo:cj,match:cY,find:{},relative:{">":{dir:"parentNode",first:true}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:true},"~":{dir:"previousSibling"}},preFilter:{"ATTR":function(e){e[1]=e[1].replace(cs,c1); +e[3]=(e[4]||e[5]||"").replace(cs,c1);if(e[2]==="~="){e[3]=" "+e[3]+" "}return e.slice(0,4)},"CHILD":function(e){e[1]=e[1].toLowerCase();if(e[1].slice(0,3)==="nth"){if(!e[3]){cv.error(e[0])}e[4]=+(e[4]?e[5]+(e[6]||1):2*(e[3]==="even"||e[3]==="odd"));e[5]=+((e[7]+e[8])||e[3]==="odd")}else{if(e[3]){cv.error(e[0])}}return e},"PSEUDO":function(dh){var e,di=!dh[5]&&dh[2];if(cY["CHILD"].test(dh[0])){return null}if(dh[4]){dh[2]=dh[4]}else{if(di&&cP.test(di)&&(e=cf(di,true))&&(e=di.indexOf(")",di.length-e)-di.length)){dh[0]=dh[0].slice(0,e); +dh[2]=di.slice(0,e)}}return dh.slice(0,3)}},filter:{"TAG":function(e){if(e==="*"){return function(){return true}}e=e.replace(cs,c1).toLowerCase();return function(dh){return dh.nodeName&&dh.nodeName.toLowerCase()===e}},"CLASS":function(e){var dh=b5[e+" "];return dh||(dh=new RegExp("(^|"+cp+")"+e+"("+cp+"|$)"))&&b5(e,function(di){return dh.test(di.className||(typeof di.getAttribute!==c9&&di.getAttribute("class"))||"")})},"ATTR":function(di,dh,e){return function(dk){var dj=cv.attr(dk,di);if(dj==null){return dh==="!=" +}if(!dh){return true}dj+="";return dh==="="?dj===e:dh==="!="?dj!==e:dh==="^="?e&&dj.indexOf(e)===0:dh==="*="?e&&dj.indexOf(e)>-1:dh==="$="?e&&dj.slice(-e.length)===e:dh==="~="?(" "+dj+" ").indexOf(e)>-1:dh==="|="?dj===e||dj.slice(0,e.length+1)===e+"-":false}},"CHILD":function(dh,dk,dj,dl,di){var dn=dh.slice(0,3)!=="nth",e=dh.slice(-4)!=="last",dm=dk==="of-type";return dl===1&&di===0?function(dp){return !!dp.parentNode}:function(dv,dt,dy){var dp,dB,dw,dA,dx,ds,du=dn!==e?"nextSibling":"previousSibling",dz=dv.parentNode,dr=dm&&dv.nodeName.toLowerCase(),dq=!dy&&!dm; +if(dz){if(dn){while(du){dw=dv;while((dw=dw[du])){if(dm?dw.nodeName.toLowerCase()===dr:dw.nodeType===1){return false}}ds=du=dh==="only"&&!ds&&"nextSibling"}return true}ds=[e?dz.firstChild:dz.lastChild];if(e&&dq){dB=dz[c5]||(dz[c5]={});dp=dB[dh]||[];dx=dp[0]===de&&dp[1];dA=dp[0]===de&&dp[2];dw=dx&&dz.childNodes[dx];while((dw=++dx&&dw&&dw[du]||(dA=dx=0)||ds.pop())){if(dw.nodeType===1&&++dA&&dw===dv){dB[dh]=[de,dx,dA];break}}}else{if(dq&&(dp=(dv[c5]||(dv[c5]={}))[dh])&&dp[0]===de){dA=dp[1]}else{while((dw=++dx&&dw&&dw[du]||(dA=dx=0)||ds.pop())){if((dm?dw.nodeName.toLowerCase()===dr:dw.nodeType===1)&&++dA){if(dq){(dw[c5]||(dw[c5]={}))[dh]=[de,dA] +}if(dw===dv){break}}}}}dA-=di;return dA===dl||(dA%dl===0&&dA/dl>=0)}}},"PSEUDO":function(dj,di){var e,dh=cn.pseudos[dj]||cn.setFilters[dj.toLowerCase()]||cv.error("unsupported pseudo: "+dj);if(dh[c5]){return dh(di)}if(dh.length>1){e=[dj,dj,"",di];return cn.setFilters.hasOwnProperty(dj.toLowerCase())?cj(function(dm,dp){var dl,dk=dh(dm,di),dn=dk.length;while(dn--){dl=b9.call(dm,dk[dn]);dm[dl]=!(dp[dl]=dk[dn])}}):function(dk){return dh(dk,0,e)}}return dh}},pseudos:{"not":cj(function(e){var dh=[],di=[],dj=cS(e.replace(cr,"$1")); +return dj[c5]?cj(function(dl,dr,dp,dm){var dq,dk=dj(dl,null,dm,[]),dn=dl.length;while(dn--){if((dq=dk[dn])){dl[dn]=!(dr[dn]=dq)}}}):function(dm,dl,dk){dh[0]=dm;dj(dh,null,dk,di);return !di.pop()}}),"has":cj(function(e){return function(dh){return cv(e,dh).length>0}}),"contains":cj(function(e){return function(dh){return(dh.textContent||dh.innerText||cH(dh)).indexOf(e)>-1}}),"lang":cj(function(e){if(!cQ.test(e||"")){cv.error("unsupported lang: "+e)}e=e.replace(cs,c1).toLowerCase();return function(di){var dh; +do{if((dh=cd?di.getAttribute("xml:lang")||di.getAttribute("lang"):di.lang)){dh=dh.toLowerCase();return dh===e||dh.indexOf(e+"-")===0}}while((di=di.parentNode)&&di.nodeType===1);return false}}),"target":function(e){var dh=da.location&&da.location.hash;return dh&&dh.slice(1)===e.id},"root":function(e){return e===co},"focus":function(e){return e===cB.activeElement&&(!cB.hasFocus||cB.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},"enabled":function(e){return e.disabled===false},"disabled":function(e){return e.disabled===true +},"checked":function(e){var dh=e.nodeName.toLowerCase();return(dh==="input"&&!!e.checked)||(dh==="option"&&!!e.selected)},"selected":function(e){if(e.parentNode){e.parentNode.selectedIndex}return e.selected===true},"empty":function(e){for(e=e.firstChild;e;e=e.nextSibling){if(e.nodeName>"@"||e.nodeType===3||e.nodeType===4){return false}}return true},"parent":function(e){return !cn.pseudos["empty"](e)},"header":function(e){return cl.test(e.nodeName)},"input":function(e){return b8.test(e.nodeName)},"button":function(dh){var e=dh.nodeName.toLowerCase(); +return e==="input"&&dh.type==="button"||e==="button"},"text":function(dh){var e;return dh.nodeName.toLowerCase()==="input"&&dh.type==="text"&&((e=dh.getAttribute("type"))==null||e.toLowerCase()===dh.type)},"first":c3(function(){return[0]}),"last":c3(function(e,dh){return[dh-1]}),"eq":c3(function(e,di,dh){return[dh<0?dh+di:dh]}),"even":c3(function(e,di){var dh=0;for(;dh=0;){e.push(dh)}return e}),"gt":c3(function(e,dj,di){var dh=di<0?di+dj:di;for(;++dh1?function(dk,dj,dh){var di=e.length;while(di--){if(!e[di](dk,dj,dh)){return false}}return true}:e[0]}function cX(e,dh,di,dj,dm){var dk,dq=[],dl=0,dn=e.length,dp=dh!=null; +for(;dl-1){dx[dz]=!(du[dz]=dr)}}}}else{dt=cX(dt===du?dt.splice(dn,dt.length):dt);if(dl){dl(null,du,dt,dw)}else{b4.apply(du,dt)}}})}function c6(dm){var dh,dk,di,dl=dm.length,dq=cn.relative[dm[0].type],dr=dq||cn.relative[" "],dj=dq?1:0,dn=cq(function(ds){return ds===dh},dr,true),dp=cq(function(ds){return b9.call(dh,ds)>-1},dr,true),e=[function(du,dt,ds){return(!dq&&(ds||dt!==dg))||((dh=dt).nodeType?dn(du,dt,ds):dp(du,dt,ds)) +}];for(;dj1&&df(e),dj>1&&cg(dm.slice(0,dj-1)).replace(cr,"$1"),dk,dj0,dk=dj.length>0,dh=function(dw,dq,dv,du,dC){var dr,ds,dx,dB=[],dA=0,dt="0",dm=dw&&[],dy=dC!=null,dz=dg,dp=dw||dk&&cn.find["TAG"]("*",dC&&dq.parentNode||dq),dn=(de+=dz==null?1:Math.random()||0.1); +if(dy){dg=dq!==cB&&dq;cb=dl}for(;(dr=dp[dt])!=null;dt++){if(dk&&dr){ds=0;while((dx=dj[ds++])){if(dx(dr,dq,dv)){du.push(dr);break}}if(dy){de=dn;cb=++dl}}if(e){if((dr=!dx&&dr)){dA--}if(dw){dm.push(dr)}}}dA+=dt;if(e&&dt!==dA){ds=0;while((dx=di[ds++])){dx(dm,dB,dq,dv)}if(dw){if(dA>0){while(dt--){if(!(dm[dt]||dB[dt])){dB[dt]=c8.call(du)}}}dB=cX(dB)}b4.apply(du,dB);if(dy&&!dw&&dB.length>0&&(dA+di.length)>1){cv.uniqueSort(du)}}if(dy){de=dn;dg=dz}return dm};return e?cj(dh):dh}cS=cv.compile=function(e,dl){var di,dh=[],dk=[],dj=cG[e+" "]; +if(!dj){if(!dl){dl=cf(e)}di=dl.length;while(di--){dj=c6(dl[di]);if(dj[c5]){dh.push(dj)}else{dk.push(dj)}}dj=cG(e,cU(dk,dh))}return dj};function cy(dh,dk,dj){var di=0,e=dk.length;for(;di2&&(dh=dp[0]).type==="ID"&&e.nodeType===9&&!cd&&cn.relative[dp[1].type]){e=cn.find["ID"](dh.matches[0].replace(cs,c1),e)[0];if(!e){return dj}di=di.slice(dp.shift().value.length) +}dk=cY["needsContext"].test(di)?0:dp.length;while(dk--){dh=dp[dk];if(cn.relative[(dq=dh.type)]){break}if((dn=cn.find[dq])){if((dm=dn(dh.matches[0].replace(cs,c1),cW.test(dp[0].type)&&e.parentNode||e))){dp.splice(dk,1);di=dm.length&&cg(dp);if(!di){b4.apply(dj,cm.call(dm,0));return dj}break}}}}}cS(di,dl)(dm,e,cd,dj,cW.test(di));return dj}cn.pseudos["nth"]=cn.pseudos["eq"];function cR(){}cn.filters=cR.prototype=cn.pseudos;cn.setFilters=new cR();cV();cv.attr=bJ.attr;bJ.find=cv;bJ.expr=cv.selectors;bJ.expr[":"]=bJ.expr.pseudos; +bJ.unique=cv.uniqueSort;bJ.text=cv.getText;bJ.isXMLDoc=cv.isXML;bJ.contains=cv.contains})(a2);var aj=/Until$/,bt=/^(?:parents|prev(?:Until|All))/,an=/^.[^:#\[\.,]*$/,y=bJ.expr.match.needsContext,bx={children:true,contents:true,next:true,prev:true};bJ.fn.extend({find:function(b3){var b6,b5,b4,e=this.length;if(typeof b3!=="string"){b4=this;return this.pushStack(bJ(b3).filter(function(){for(b6=0;b61?bJ.unique(b5):b5);b5.selector=(this.selector?this.selector+" ":"")+b3;return b5},has:function(b5){var b4,b3=bJ(b5,this),e=b3.length;return this.filter(function(){for(b4=0;b4=0:bJ.filter(e,this).length>0:this.filter(e).length>0) +},closest:function(b6,b5){var b7,b4=0,e=this.length,b3=[],b8=y.test(b6)||typeof b6!=="string"?bJ(b6,b5||this.context):0;for(;b4-1:bJ.find.matchesSelector(b7,b6)){b3.push(b7);break}b7=b7.parentNode}}return this.pushStack(b3.length>1?bJ.unique(b3):b3)},index:function(e){if(!e){return(this[0]&&this[0].parentNode)?this.first().prevAll().length:-1}if(typeof e==="string"){return bJ.inArray(this[0],bJ(e))}return bJ.inArray(e.jquery?e[0]:e,this) +},add:function(e,b3){var b5=typeof e==="string"?bJ(e,b3):bJ.makeArray(e&&e.nodeType?[e]:e),b4=bJ.merge(this.get(),b5);return this.pushStack(bJ.unique(b4))},addBack:function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}});bJ.fn.andSelf=bJ.fn.addBack;function aX(b3,e){do{b3=b3[e]}while(b3&&b3.nodeType!==1);return b3}bJ.each({parent:function(b3){var e=b3.parentNode;return e&&e.nodeType!==11?e:null},parents:function(e){return bJ.dir(e,"parentNode")},parentsUntil:function(b3,e,b4){return bJ.dir(b3,"parentNode",b4) +},next:function(e){return aX(e,"nextSibling")},prev:function(e){return aX(e,"previousSibling")},nextAll:function(e){return bJ.dir(e,"nextSibling")},prevAll:function(e){return bJ.dir(e,"previousSibling")},nextUntil:function(b3,e,b4){return bJ.dir(b3,"nextSibling",b4)},prevUntil:function(b3,e,b4){return bJ.dir(b3,"previousSibling",b4)},siblings:function(e){return bJ.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return bJ.sibling(e.firstChild)},contents:function(e){return bJ.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:bJ.merge([],e.childNodes) +}},function(e,b3){bJ.fn[e]=function(b6,b4){var b5=bJ.map(this,b3,b6);if(!aj.test(e)){b4=b6}if(b4&&typeof b4==="string"){b5=bJ.filter(b4,b5)}b5=this.length>1&&!bx[e]?bJ.unique(b5):b5;if(this.length>1&&bt.test(e)){b5=b5.reverse()}return this.pushStack(b5)}});bJ.extend({filter:function(b4,e,b3){if(b3){b4=":not("+b4+")"}return e.length===1?bJ.find.matchesSelector(e[0],b4)?[e[0]]:[]:bJ.find.matches(b4,e)},dir:function(b4,b3,b6){var e=[],b5=b4[b3];while(b5&&b5.nodeType!==9&&(b6===aG||b5.nodeType!==1||!bJ(b5).is(b6))){if(b5.nodeType===1){e.push(b5) +}b5=b5[b3]}return e},sibling:function(b4,b3){var e=[];for(;b4;b4=b4.nextSibling){if(b4.nodeType===1&&b4!==b3){e.push(b4)}}return e}});function aO(b5,b4,e){b4=b4||0;if(bJ.isFunction(b4)){return bJ.grep(b5,function(b7,b6){var b8=!!b4.call(b7,b6,b7);return b8===e})}else{if(b4.nodeType){return bJ.grep(b5,function(b6){return(b6===b4)===e})}else{if(typeof b4==="string"){var b3=bJ.grep(b5,function(b6){return b6.nodeType===1});if(an.test(b4)){return bJ.filter(b4,b3,!e)}else{b4=bJ.filter(b4,b3)}}}}return bJ.grep(b5,function(b6){return(bJ.inArray(b6,b4)>=0)===e +})}function A(e){var b4=d.split("|"),b3=e.createDocumentFragment();if(b3.createElement){while(b4.length){b3.createElement(b4.pop())}}return b3}var d="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|"+"header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",aA=/ jQuery\d+="(?:null|\d+)"/g,J=new RegExp("<(?:"+d+")[\\s/>]","i"),b2=/^\s+/,aD=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,m=/<([\w:]+)/,bX=/\s*$/g,T={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:bJ.support.htmlSerialize?[0,"",""]:[1,"X
","
"]},aS=A(l),j=aS.appendChild(l.createElement("div")); +T.optgroup=T.option;T.tbody=T.tfoot=T.colgroup=T.caption=T.thead;T.th=T.td;bJ.fn.extend({text:function(e){return bJ.access(this,function(b3){return b3===aG?bJ.text(this):this.empty().append((this[0]&&this[0].ownerDocument||l).createTextNode(b3))},null,e,arguments.length)},wrapAll:function(e){if(bJ.isFunction(e)){return this.each(function(b4){bJ(this).wrapAll(e.call(this,b4))})}if(this[0]){var b3=bJ(e,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){b3.insertBefore(this[0])}b3.map(function(){var b4=this; +while(b4.firstChild&&b4.firstChild.nodeType===1){b4=b4.firstChild}return b4}).append(this)}return this},wrapInner:function(e){if(bJ.isFunction(e)){return this.each(function(b3){bJ(this).wrapInner(e.call(this,b3))})}return this.each(function(){var b3=bJ(this),b4=b3.contents();if(b4.length){b4.wrapAll(e)}else{b3.append(e)}})},wrap:function(e){var b3=bJ.isFunction(e);return this.each(function(b4){bJ(this).wrapAll(b3?e.call(this,b4):e)})},unwrap:function(){return this.parent().each(function(){if(!bJ.nodeName(this,"body")){bJ(this).replaceWith(this.childNodes) +}}).end()},append:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){this.appendChild(e)}})},prepend:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){this.insertBefore(e,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(e){if(this.parentNode){this.parentNode.insertBefore(e,this)}})},after:function(){return this.domManip(arguments,false,function(e){if(this.parentNode){this.parentNode.insertBefore(e,this.nextSibling) +}})},remove:function(e,b5){var b4,b3=0;for(;(b4=this[b3])!=null;b3++){if(!e||bJ.filter(e,[b4]).length>0){if(!b5&&b4.nodeType===1){bJ.cleanData(k(b4))}if(b4.parentNode){if(b5&&bJ.contains(b4.ownerDocument,b4)){bs(k(b4,"script"))}b4.parentNode.removeChild(b4)}}}return this},empty:function(){var b3,e=0;for(;(b3=this[e])!=null;e++){if(b3.nodeType===1){bJ.cleanData(k(b3,false))}while(b3.firstChild){b3.removeChild(b3.firstChild)}if(b3.options&&bJ.nodeName(b3,"select")){b3.options.length=0}}return this},clone:function(b3,e){b3=b3==null?false:b3; +e=e==null?b3:e;return this.map(function(){return bJ.clone(this,b3,e)})},html:function(e){return bJ.access(this,function(b6){var b5=this[0]||{},b4=0,b3=this.length;if(b6===aG){return b5.nodeType===1?b5.innerHTML.replace(aA,""):aG}if(typeof b6==="string"&&!al.test(b6)&&(bJ.support.htmlSerialize||!J.test(b6))&&(bJ.support.leadingWhitespace||!b2.test(b6))&&!T[(m.exec(b6)||["",""])[1].toLowerCase()]){b6=b6.replace(aD,"<$1>");try{for(;b4")){ca=b3.cloneNode(true)}else{j.innerHTML=b3.outerHTML;j.removeChild(ca=j.firstChild)}if((!bJ.support.noCloneEvent||!bJ.support.noCloneChecked)&&(b3.nodeType===1||b3.nodeType===11)&&!bJ.isXMLDoc(b3)){b7=k(ca);b8=k(b3);for(b6=0;(b4=b8[b6])!=null;++b6){if(b7[b6]){Q(b4,b7[b6])}}}if(b5){if(e){b8=b8||k(b3);b7=b7||k(ca);for(b6=0;(b4=b8[b6])!=null;b6++){at(b4,b7[b6])}}else{at(b3,ca)}}b7=k(ca,"script");if(b7.length>0){bs(b7,!b9&&k(b3,"script")) +}b7=b8=b4=null;return ca},buildFragment:function(b3,b5,ca,cf){var cb,b7,b9,ce,cg,cd,b4,b8=b3.length,b6=A(b5),e=[],cc=0;for(;cc")+b4[2];cb=b4[0];while(cb--){ce=ce.lastChild}if(!bJ.support.leadingWhitespace&&b2.test(b7)){e.push(b5.createTextNode(b2.exec(b7)[0])) +}if(!bJ.support.tbody){b7=cg==="table"&&!bX.test(b7)?ce.firstChild:b4[1]===""&&!bX.test(b7)?ce:0;cb=b7&&b7.childNodes.length;while(cb--){if(bJ.nodeName((cd=b7.childNodes[cb]),"tbody")&&!cd.childNodes.length){b7.removeChild(cd)}}}bJ.merge(e,ce.childNodes);ce.textContent="";while(ce.firstChild){ce.removeChild(ce.firstChild)}ce=b6.lastChild}}}}if(ce){b6.removeChild(ce)}if(!bJ.support.appendChecked){bJ.grep(k(e,"input"),bV)}cc=0;while((b7=e[cc++])){if(cf&&bJ.inArray(b7,cf)!==-1){continue}b9=bJ.contains(b7.ownerDocument,b7); +ce=k(b6.appendChild(b7),"script");if(b9){bs(ce)}if(ca){cb=0;while((b7=ce[cb++])){if(bz.test(b7.type||"")){ca.push(b7)}}}}ce=null;return b6},cleanData:function(b3,cb){var b5,ca,b4,b6,b7=0,cc=bJ.expando,e=bJ.cache,b8=bJ.support.deleteExpando,b9=bJ.event.special;for(;(b5=b3[b7])!=null;b7++){if(cb||bJ.acceptData(b5)){b4=b5[cc];b6=b4&&e[b4];if(b6){if(b6.events){for(ca in b6.events){if(b9[ca]){bJ.event.remove(b5,ca)}else{bJ.removeEvent(b5,ca,b6.handle)}}}if(e[b4]){delete e[b4];if(b8){delete b5[cc]}else{if(typeof b5.removeAttribute!==aC){b5.removeAttribute(cc) +}else{b5[cc]=null}}a6.push(b4)}}}}}});var aE,bo,E,bg=/alpha\([^)]*\)/i,aT=/opacity\s*=\s*([^)]*)/,bn=/^(top|right|bottom|left)$/,F=/^(none|table(?!-c[ea]).+)/,aY=/^margin/,a9=new RegExp("^("+bA+")(.*)$","i"),W=new RegExp("^("+bA+")(?!px)[a-z%]+$","i"),S=new RegExp("^([+-])=("+bA+")","i"),bj={BODY:"block"},bb={position:"absolute",visibility:"hidden",display:"block"},bC={letterSpacing:0,fontWeight:400},bT=["Top","Right","Bottom","Left"],av=["Webkit","O","Moz","ms"];function b(b5,b3){if(b3 in b5){return b3 +}var b6=b3.charAt(0).toUpperCase()+b3.slice(1),e=b3,b4=av.length;while(b4--){b3=av[b4]+b6;if(b3 in b5){return b3}}return e}function P(b3,e){b3=e||b3;return bJ.css(b3,"display")==="none"||!bJ.contains(b3.ownerDocument,b3)}function p(b8,e){var b9,b6,b7,b3=[],b4=0,b5=b8.length;for(;b41)},show:function(){return p(this,true)},hide:function(){return p(this)},toggle:function(b3){var e=typeof b3==="boolean";return this.each(function(){if(e?b3:P(this)){bJ(this).show()}else{bJ(this).hide()}})}});bJ.extend({cssHooks:{opacity:{get:function(b4,b3){if(b3){var e=E(b4,"opacity");return e===""?"1":e}}}},cssNumber:{"columnCount":true,"fillOpacity":true,"fontWeight":true,"lineHeight":true,"opacity":true,"orphans":true,"widows":true,"zIndex":true,"zoom":true},cssProps:{"float":bJ.support.cssFloat?"cssFloat":"styleFloat"},style:function(b5,b4,cb,b6){if(!b5||b5.nodeType===3||b5.nodeType===8||!b5.style){return +}var b9,ca,cc,b7=bJ.camelCase(b4),b3=b5.style;b4=bJ.cssProps[b7]||(bJ.cssProps[b7]=b(b3,b7));cc=bJ.cssHooks[b4]||bJ.cssHooks[b7];if(cb!==aG){ca=typeof cb;if(ca==="string"&&(b9=S.exec(cb))){cb=(b9[1]+1)*b9[2]+parseFloat(bJ.css(b5,b4));ca="number"}if(cb==null||ca==="number"&&isNaN(cb)){return}if(ca==="number"&&!bJ.cssNumber[b7]){cb+="px"}if(!bJ.support.clearCloneStyle&&cb===""&&b4.indexOf("background")===0){b3[b4]="inherit"}if(!cc||!("set" in cc)||(cb=cc.set(b5,cb,b6))!==aG){try{b3[b4]=cb}catch(b8){}}}else{if(cc&&"get" in cc&&(b9=cc.get(b5,false,b6))!==aG){return b9 +}return b3[b4]}},css:function(b8,b6,b3,b7){var b5,b9,e,b4=bJ.camelCase(b6);b6=bJ.cssProps[b4]||(bJ.cssProps[b4]=b(b8.style,b4));e=bJ.cssHooks[b6]||bJ.cssHooks[b4];if(e&&"get" in e){b9=e.get(b8,true,b3)}if(b9===aG){b9=E(b8,b6,b7)}if(b9==="normal"&&b6 in bC){b9=bC[b6]}if(b3===""||b3){b5=parseFloat(b9);return b3===true||bJ.isNumeric(b5)?b5||0:b9}return b9},swap:function(b7,b6,b8,b5){var b4,b3,e={};for(b3 in b6){e[b3]=b7.style[b3];b7.style[b3]=b6[b3]}b4=b8.apply(b7,b5||[]);for(b3 in b6){b7.style[b3]=e[b3] +}return b4}});if(a2.getComputedStyle){bo=function(e){return a2.getComputedStyle(e,null)};E=function(b6,b4,b8){var b5,b3,ca,b7=b8||bo(b6),b9=b7?b7.getPropertyValue(b4)||b7[b4]:aG,e=b6.style;if(b7){if(b9===""&&!bJ.contains(b6.ownerDocument,b6)){b9=bJ.style(b6,b4)}if(W.test(b9)&&aY.test(b4)){b5=e.width;b3=e.minWidth;ca=e.maxWidth;e.minWidth=e.maxWidth=e.width=b9;b9=b7.width;e.width=b5;e.minWidth=b3;e.maxWidth=ca}}return b9}}else{if(l.documentElement.currentStyle){bo=function(e){return e.currentStyle +};E=function(b5,b3,b8){var b4,b7,b9,b6=b8||bo(b5),ca=b6?b6[b3]:aG,e=b5.style;if(ca==null&&e&&e[b3]){ca=e[b3]}if(W.test(ca)&&!bn.test(b3)){b4=e.left;b7=b5.runtimeStyle;b9=b7&&b7.left;if(b9){b7.left=b5.currentStyle.left}e.left=b3==="fontSize"?"1em":ca;ca=e.pixelLeft+"px";e.left=b4;if(b9){b7.left=b9}}return ca===""?"auto":ca}}}function aJ(e,b4,b5){var b3=a9.exec(b4);return b3?Math.max(0,b3[1]-(b5||0))+(b3[2]||"px"):b4}function aw(b6,b3,e,b8,b5){var b4=e===(b8?"border":"content")?4:b3==="width"?1:0,b7=0; +for(;b4<4;b4+=2){if(e==="margin"){b7+=bJ.css(b6,e+bT[b4],true,b5)}if(b8){if(e==="content"){b7-=bJ.css(b6,"padding"+bT[b4],true,b5)}if(e!=="margin"){b7-=bJ.css(b6,"border"+bT[b4]+"Width",true,b5)}}else{b7+=bJ.css(b6,"padding"+bT[b4],true,b5);if(e!=="padding"){b7+=bJ.css(b6,"border"+bT[b4]+"Width",true,b5)}}}return b7}function u(b6,b3,e){var b5=true,b7=b3==="width"?b6.offsetWidth:b6.offsetHeight,b4=bo(b6),b8=bJ.support.boxSizing&&bJ.css(b6,"boxSizing",false,b4)==="border-box";if(b7<=0||b7==null){b7=E(b6,b3,b4); +if(b7<0||b7==null){b7=b6.style[b3]}if(W.test(b7)){return b7}b5=b8&&(bJ.support.boxSizingReliable||b7===b6.style[b3]);b7=parseFloat(b7)||0}return(b7+aw(b6,b3,e||(b8?"border":"content"),b5,b4))+"px"}function bE(b4){var b3=l,e=bj[b4];if(!e){e=a1(b4,b3);if(e==="none"||!e){aE=(aE||bJ("";var options={};iframeDialog=$(iframeDialog).attr("src",url)[0];var width,height;if(_.isString(feature)){if(feature.split(",").length>2){width=feature.split(",")[0];if(width.indexOf("=")!==-1){width=width.substring(width.indexOf("=")+1,width.length);options.width=parseInt(width)||600 +}height=feature.split(",")[1];if(height.indexOf("=")!==-1){height=height.substring(height.indexOf("=")+1,height.length);options.height=parseInt(height)||400}}options.title=" "}else{$.extend(true,options,feature)}options.contentHtml=iframeDialog;FR.showCustomDialog(options)},doHyperlinkByGet4Reportlet:function(url,para,target,feature,title){if(arguments.length<1){return}var options=arguments[0];if(typeof options==="object"){url=options.url||"";para=options.para||{};target=options.target;feature=options.feature; +title=options.title}para=this._filterHyperLinkPara(para);para={__parameters__:FR.jsonEncode(para),_:new Date().getTime()};var paraURIComponent=this.encodeGetURIPara2Str(para);var para4Post=this.encodePostURIPara(para);if(url.indexOf("?")==-1){url+="?"}this._doHyperlinkByGet(url,paraURIComponent,para4Post,target,feature,title)},doHyperlinkByPost:function(url,para,target,feature,title){if(arguments.length<1){return}var options=arguments[0];if(typeof options==="object"){url=options.url||"";para=options.para||{}; +target=options.target;feature=options.feature;title=options.title}para=this._filterHyperLinkPara(para);if(this.$hyperlinkForm){this.$hyperlinkForm.html("")}else{this.$hyperlinkForm=($("
").appendTo($(document.body))).css({"display":"none","position":"absolute"})}if(target==null){target="formresult"}para=encodeURIComponent(FR.jsonEncode(para));if(target==="_dialog"){var t=new Date().getTime();target=target+t;this.showHyperlinkDialog("",feature,target)}var submitForm=$("
").appendTo(this.$hyperlinkForm); +var input=$('');input.attr("value",para);submitForm.append(input);if(this.shouldGet(target)){this.doHyperlinkActionByGet(this.getTargetUrlByPost(url,para),target,feature,title);return}submitForm.submit()},doHyperlinkActionByGet:function(targetUrl,target,feature,title){if(target&&target==="_dialog"){this.showHyperlinkDialog(targetUrl,feature,target)}else{window.open(targetUrl,target)}},getTargetUrlByPost:function(url,para){var pString="__parameters__="+encodeURIComponent(para); +url+=url.indexOf("?")==-1?"?":"&";return url+pString},shouldPost:function(targetUrl,target){if(target===undefined){return false}return !this.shouldGet()&&targetUrl.length>=2048&&FR.Browser.isIE()},shouldGet:function(target){return false},_filterHyperLinkPara:function(nativePara){var filteredNativePara={};$.each(nativePara,function(pName,pValue){if(!$.isPlainObject(pValue)){filteredNativePara[pName]=pValue}});return filteredNativePara},_processArrayValue:function(value){if(_.isArray(value)&&!FR.isEmptyArray(value)){if(_.isArray(value[0])){value=value.join(";") +}else{value=value.toString()}}return value},encodePostURIPara:function(nativePara){var encodedPara={};$.each(nativePara,function(pName,pValue){pValue=FR._processArrayValue(pValue);encodedPara[encodeURIComponent(pName)]=encodeURIComponent(pValue)});return encodedPara},encodeGetURIPara:function(nativePara){var encodedPara={};$.each(nativePara,function(pName,pValue){pValue=FR._processArrayValue(pValue);encodedPara[encodeURIComponent(encodeURIComponent(pName))]=encodeURIComponent(encodeURIComponent(pValue)) +});return encodedPara},encodeGetURIPara2Str:function(nativePara){var uriComponent="";$.each(nativePara,function(pName,pValue){pValue=FR._processArrayValue(pValue);uriComponent+="&"+encodeURIComponent(encodeURIComponent(pName))+"="+encodeURIComponent(encodeURIComponent(pValue))});return uriComponent},isEmpty:function(value){var result=value===""||value===null||value===undefined;return result},isEmptyObj:function(obj){return _.isEmpty(obj)},toRE:function(str){return str.replace(/\\/g,"\\\\").replace(/\[/g,"\\[").replace(/\]/g,"\\]").replace(/\(/g,"\\(").replace(/\)/g,"\\)").replace(/\{/g,"\\{").replace(/\}/g,"\\}").replace(/\*/g,"\\*").replace(/\|/g,"\\|").replace(/\?/g,"\\?").replace(/\$/g,"\\$").replace(/\^/g,"\\^") +},_executeScriptFromHtml:function(html){var html_script=html.substring(0,500);var html_script_low=html_script.toLowerCase();var begin=html_script_low.indexOf("<"+"script>");if(begin<0){return}var end=html_script_low.indexOf("");html_script=html_script.substring(begin+8,end);try{eval(html_script)}catch(e){}},extend:function(){return function(sb,sp,overrides){if(typeof sp=="object"){overrides=sp;sp=sb;sb=function(){sp.apply(this,arguments)}}if(sp==null){console&&console.log("empty")}var F=function(){},spp=sp.prototype; +F.prototype=spp;sb.prototype=new F();sb.superclass=spp;$.extend(sb.prototype,overrides);return sb}}(),SessionMgr:function(){var sid,cp;$(window).unload(function(){$(window).unbind("unload",arguments.callee);$.ajaxSetup({cache:false});if(sid&&cp&&FR.servletURL&&cp.rtype!="preview"&&cp.rtype!="bi"&&!cp.noClossSession){var closeSession=function(sid){FR.ajax({async:false,url:FR.servletURL,data:{op:"closesessionid",sessionID:sid}})};closeSession(sid)}});return{getSessionID:function(){return sid},getContentPane:function(){return cp +},get:function(){return cp},register:function(id,s){sid=id;cp=s}}}(),CookieInfor:{getCookies:function(){var cookieString=document.cookie;return unescape(cookieString).split(";")},addCookie:function(name,value,temp){var newCookie=name+"="+escape(value);var liveDays=temp?temp:30;var expires=new Date();expires.setDate(expires.getDate()+liveDays);newCookie+=";expires="+expires.toGMTString();document.cookie=newCookie},removeCookie:function(name){var expires=new Date();expires.setTime(expires.getTime()-1); +document.cookie=name+"="+";expires="+expires.toGMTString()},clearCookie:function(){var self=this;var $cookies=this.getCookies();$.each($cookies,function(i){var cookieName=$cookies[i].split("=")[0];self.removeCookie(cookieName)})},getCookieByName:function(name){var $cookies=this.getCookies();var re=new RegExp(name);var value=null;$.each($cookies,function(i){if($cookies[i].match(re)){value=$cookies[i].split(name+"=")[1];return false}});return value}},isCJKEncoded:function(text){var isCJKEncoded=false; +if(FR.isEmpty(text)||typeof text!=="string"){return false}else{var bracketPattern=/\[[^\]]*]/ig;var contentPattern=/^\[[0-9a-f]{2,4}]$/ig;var f=text.match(bracketPattern);if(f===null||FR.isEmpty(f.length)||f.length===0){return false}else{var content="";var index=0;var count=f.length;do{if(index>0&&count>=index){return isCJKEncoded}if(count=128||code===91||code===93){newText+="["+code.toString(16)+"]"}else{newText+=text.charAt(i)}}return newText},cjkDecode:function(text){if(text==null){return""}if(!FR.isCJKEncoded(text)){return text}if(!isNaN(text)||text.indexOf("[")==-1){return text}var newText="";for(var i=0;ii+1){var subText=text.substring(i+1,rightIdx); +if(subText.length>0){ch=String.fromCharCode(eval("0x"+subText))}i=rightIdx}}newText+=ch}return newText},htmlSpaceDecode:function(text){return(text==null)?"":String(text).replace(/ /," ")},htmlEncode:function(text){return(text==null)?"":String(text).replace(/&/g,"&").replace(/\"/g,""").replace(//g,">")},htmlDecode:function(text){return(text==null)?"":String(text).replace(/&/g,"&").replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">").replace(/ /g," ") +},jsonEncode:function(o){var useHasOwn={}.hasOwnProperty?true:false;var m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};var encodeString=function(s){if(/["\\\x00-\x1f]/.test(s)){return'"'+s.replace(/([\x00-\x1f\\"])/g,function(a,b){var c=m[b];if(c){return c}c=b.charCodeAt();return"\\u00"+Math.floor(c/16).toString(16)+(c%16).toString(16)})+'"'}return'"'+s+'"'};var encodeArray=function(o){var a=["["],b,i,l=o.length,v;for(i=0;i");bgImage.css({width:"100%",height:"100%"}); +bgImage.appendTo($dom)}else{$.each(["background-image","background-repeat","filter","background","background-position"],function(idx,item){if(bg[item]!=null){$dom.css(item,bg[item])}})}}else{$.each(["background","background-size","background-image","background-position","background-repeat"],function(idx,item){if(bg[item]!=null){$dom.css(item,bg[item])}})}},ieForFixBackground:function(){return FR.Browser.isIE8Before()},contains:function(p,c){return FR.isAncestor(p,c)?true:((!p||!c)?false:p==c)},isAncestor:function(p,c){if(!p||!c){return false +}if(p.contains&&!(FR.Browser.r.safari||FR.Browser.r.chrome)){try{return p.contains(c)}catch(e){}}if(p.compareDocumentPosition){return !!(p.compareDocumentPosition(c)&16)}else{var parent=c.parentNode;while(parent){if(parent==p){return true}else{if(!parent.tagName||parent.tagName.toUpperCase()=="HTML"){return false}}parent=parent.parentNode}return false}},isNavKeyPress:function(event){if(!event){return false}var safariKeys={63234:37,63235:39,63232:38,63233:40,63276:33,63277:34,63272:46,63273:36,63275:35}; +var k=event.keyCode;k=(FR.Browser.r.safari||FR.Browser.r.chrome)?(safariKeys[k]||k):k;return(k>=33&&k<=40)||k===13||k==FR.keyCode.TAB||k==FR.keyCode.ESCAPE},isSpecialKey:function(e){if(!e){return false}var k=e.keyCode;return(e.type=="keypress"&&e.ctrlKey)||k===9||k===13||k===40||k===27||(k===16)||(k===17)||(k>=18&&k<=20)||(k>=33&&k<=35)||(k>=36&&k<=39)||k===44||(k===13||k===229)},equals:function(v1,v2){if(FR.isNull(v1)||FR.isNull(v2)){return v1==undefined&&v2==undefined||v1==null&&v2==null}if(v1===v2){return true +}else{if(v1 instanceof Date&&v2 instanceof Date){return v1.getTime()===v2.getTime()}else{if($.isArray(v1)){if(v1.length==v2.length){for(var i=0;i=0;i--){var c=abc.charAt(i);col+=(COL_IDS.indexOf(c)+1)*Math.pow(26,len-1-i)}return col},digit2Letter:function(k){var c,abcBuf=""; +if(typeof k!="number"||k===0||isNaN(k)||!isFinite(k)){return abcBuf}for(;k!==0;){c=k%26;if(c===0){c=26}abcBuf=COL_IDS.charAt(c-1)+abcBuf;k=(k-c)/26}return abcBuf},byteLength:function(str){if(FR.isEmpty(str)){return 0}var byteLen=0,len=str.length;for(var i=0;i255?2:1}return byteLen},keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},location:function(callback){callback.call(this,"fail",FR.i18nText("Fine-Engine_Basic_Fail_Location")) +},html:function(ob,content){function transferStr(str){if(FR.isEmpty(str)){return str}return String(str).replace(/&/g,"&").replace(//g,">").replace(/ /g," ").replace(/\'/g,"'").replace(/\"/g,""").replace(/\(/g,"(").replace(/\)/g,")").replace(/<br>/g,"
")}ob.html(transferStr(content));return ob}})})(jQuery);(function(b){var a={};b.shortcut=function(d,c){if(a[d]!=null){throw ("shortcut:["+d+"] has been registed")}a[d]=c;b.extend(c.prototype,{xtype:d}) +};FR.Logger={error:function(f){var g,c;if(f instanceof Error){c=f.stack;g=f.message}else{c="";g=f.toString()}var d={trace:c,message:g};FR.ajax({url:FR.servletURL+"?op=js_log&cmd=log_js_error",type:"POST",data:d})}};FR.createWidget=function(d,j){if(d instanceof b){return new FR.Widget({renderEl:d})}if(d["classType"]){return new (new Function("return "+d["classType"]+";")())(d)}if(!d.type){if(j!==true){var h="config type cannot be null.";FR.Logger.error(new Error(h));return new FR.ErrorMarkWidget({renderEl:d.renderEl,message:h,width:d.width,height:d.height}) +}}var i=d.type.toLowerCase();var c=a[i];try{return new c(d)}catch(g){FR.Logger.error(g);if(j===true){throw g}else{var f=d.widgetName?d.widgetName:d.type;return new FR.ErrorMarkWidget({renderEl:d.renderEl,message:f+FR.i18nText("Fine-Engine_Base_Widget_Error_Mark_Text"),detail:FR.i18nText("Fine-Engine_Detail_Message")+":"+g,width:d.width,height:d.height})}}};b.fn.extend({asComponent:function(c){c=c||{};c.renderEl=b(this);return FR.createWidget(c)}})})(jQuery);if(window._g==null){window._g=FR.SessionMgr.getContentPane +}$.extend(FR,{string2ints:function(h){var b=[];var g=h.split(",");for(var e=0;e1){c=parseInt(f[1])}for(var j=a;j<=c;j++){b.push(j)}}return b}});$.extend(FR,{activeBranches:function(branches,parameters,processid,taskName,serverURL,needClose){if(processid&&taskName){var it={"id":processid,"taskname":taskName}}else{var it=this.getProcessIDAndTaskName();if(!it.processid){FR.Msg.toast(FR.i18nText("Fine-Engine_FS_Task_Has_Been_Closed")); +return}}if(!it){return}if(!$.isArray(branches)){branches=[branches]}if(parameters!=null&&!$.isArray(parameters)){parameters=[parameters]}var data=$.extend(it,{branches:branches});if(parameters){$.each(parameters,function(idx,item){if(item.value.toString().startWith("eval")){var evalValue=item.value.toString().substring(5,item.value.toString().length-1);item.value=eval(evalValue)}});data.parameters=parameters}this.ajax({url:(serverURL?serverURL:FR.servletURL)+"?op=process_exe&cmd=continue",data:data,type:"post",complete:function(res,status){if(res.responseText=="close"){FR.Msg.toast(FR.i18nText("Fine-Engine_FS_Task_Has_Been_Closed")); +return}this.refreshUserTask(it)}.createDelegate(this)})},getProcessIDAndTaskName:function(){var a={};this.ajax({url:FR.servletURL+"?op=process_exe",async:false,data:{sessionID:FR.SessionMgr.getSessionID(),cmd:"values"},complete:function(c,b){a=FR.jsonDecode(c.responseText)}});return a},refreshUserTask:function(b){var a=window.parent;if(!a||!a.FS||!a.FS.Process){location.reload(true);return}a.FS.Process.refreshTask();var c="?op=process_exe&cmd=seejob&taskname="+b.taskname+"&processexecutorid="+b.id+"&processid="+b.processid; +a.FS.tabPane.addItem({"title":FR.i18nText("Fine-Engine_FS_Handle_Affairs")+b.id,src:c})}});$.extend(FR,{logoutApp:function(){}});(function(a){a(document).ready(function(){FR.windowHeight=a(window).height();FR.windowWidth=a(window).width();if(FR.windowHeight===0||FR.windowWidth===0){FR.windowHeight=document.body.clientHeight;FR.windowWidth=document.body.clientWidth}a(window).resize(function(){if(FR.Browser.isIE()){setTimeout(function(){FR.windowHeight=a(window).height();FR.windowWidth=a(window).width(); +if(FR.windowHeight===0||FR.windowWidth===0){FR.windowHeight=document.body.clientHeight;FR.windowWidth=document.body.clientWidth}},0)}else{FR.windowHeight=a(window).height();FR.windowWidth=a(window).width()}});FR.parameterContainerHeight=0;FR.toolbarHeight=0})})($); +if (window.FR == null) { + window.FR = {}; +} + +$.extend(FR, { + /** + * 这里添加一些必须要使用中文的键值对,然后通过FR.plainText(key)进行调用 + */ + chinese : { + + }, + + i18n: {}, + /** + * 根据键获取国际化后的值 + * @param key 键 + * @returns {String} 国际化后的文本 + * @example + * FR.i18nText("Click");//输出结果为"点击" + * FR.i18nText("Sum({}, {}) = 3", 1,2);//输出结果为"Sum(1, 2) = 3" + */ + i18nText: function (key) { + var localeText = FR.i18n[key]; + if (!localeText) { + localeText = key; + } + var len = arguments.length; + if(len > 1){ + for(var i = 1;i1?window.parseInt(d[1]):0;d=window.parseInt(d[0]);if(Math.abs(c-d*60-e)<0.000001){a=b[f];return true}});return a},getLastDateOfMonth:function(){return new Date(this.getFullYear(),this.getMonth(),this.getMonthDays())},getMonthDays:function(c){var b=[31,28,31,30,31,30,31,31,30,31,30,31];var a=this.getFullYear(); +if(typeof c=="undefined"){c=this.getMonth()}if(((0===(a%4))&&((0!==(a%100))||(0===(a%400))))&&c===1){return 29}else{return b[c]}},getWeekNumber:function(){var c=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0);var b=c.getDay();c.setDate(c.getDate()-(b+6)%7+3);var a=c.valueOf();c.setMonth(0);c.setDate(4);return Math.round((a-c.valueOf())/(7*86400000))+1}});(function(){var compileJFmt=function(jfmt,date){var str=jfmt.str,len=jfmt.len,ch=jfmt["char"];switch(ch){case"E":str=len<4?Date._SDN[date.getDay()]:Date._DN[date.getDay()]; +break;case"y":if(len<=3){str=(date.getFullYear()+"").slice(2,4)}else{str=date.getFullYear()}break;case"M":if(len>2){str=len>3?Date._MN[date.getMonth()]:Date._SMN[date.getMonth()]}else{if(len<2){str=date.getMonth()+1}else{str=String.leftPad(date.getMonth()+1+"",2,"0")}}break;case"d":if(len>1){str=String.leftPad(date.getDate()+"",2,"0")}else{str=date.getDate()}break;case"h":var hour=date.getHours()%12;if(hour===0){hour=12}if(len>1){str=String.leftPad(hour+"",2,"0")}else{str=hour}break;case"H":if(len>1){str=String.leftPad(date.getHours()+"",2,"0") +}else{str=date.getHours()}break;case"m":if(len>1){str=String.leftPad(date.getMinutes()+"",2,"0")}else{str=date.getMinutes()}break;case"s":if(len>1){str=String.leftPad(date.getSeconds()+"",2,"0")}else{str=date.getSeconds()}break;case"a":str=date.getHours()<12?Date._NN[0]:Date._NN[1];break;case"z":str=date.getTimezone();break;default:str=jfmt.str;break}return str};FR.parseFmt=function(fmt){if(!fmt){return""}fmt=String(fmt).replace(/y{4,}/g,"%Y").replace(/y{2}/g,"%y").replace(/M{4,}/g,"%b").replace(/M{3}/g,"%B").replace(/M{2}/g,"%X").replace(/M{1}/g,"%x").replace(/a{1}/g,"%p"); +if(new RegExp("d{2,}","g").test(fmt)){fmt=fmt.replace(/d{2,}/g,"%d")}else{fmt=fmt.replace(/d{1}/g,"%e")}if(new RegExp("h{2,}","g").test(fmt)){fmt=fmt.replace(/h{2,}/g,"%I")}else{fmt=fmt.replace(/h{1}/g,"%I")}if(new RegExp("H{2,}","g").test(fmt)){fmt=fmt.replace(/H{2,}/g,"%H")}else{fmt=fmt.replace(/H{1}/g,"%H")}fmt=fmt.replace(/m{2,}/g,"%M").replace(/s{2,}/g,"%S");return fmt};FR.matchDateFormat=function(date,format){if(typeof date!="string"||typeof format!="string"||!date||!format){return false}var zh_yMd="["+String.fromCharCode(24180)+String.fromCharCode(26376)+String.fromCharCode(26085)+"]"; +if(date.match(zh_yMd)){if(format.match(zh_yMd)){date=date.replaceAll(zh_yMd,"-");format=format.replaceAll(zh_yMd,"-");if(date.endWith("-")&&format.endWith("-")){date=date.substring(0,date.length-1);format=format.substring(0,format.length-1)}}else{return false}}else{if(format.match(zh_yMd)){return false}}var isAM=null;if(format.endWith(" a")){format=format.substring(0,format.length-2);if(date.endWith(" am")||date.endWith(" pm")){isAM=date.endWith(" am");date=date.substring(0,date.length-3)}else{return false +}}if(date.replace(/[0-9]/g,"")!=format.replace(/[YyMmDdHhSsa]/g,"")){return false}var formatStr=format;var dateStr=date;var formatArr=[];var dateArr=[];if(format.indexOf(" ")==-1){dateArr=shortMatch(dateStr,formatStr);if(!dateArr){return false}}else{var ff=format.split(" ");var dd=date.split(" ");for(var i=0;i0){var reg=new RegExp(fmt.substring(0,1)+"+");var f=fmt.match(reg).toString();fa.push(f);formatArr.push(f);fmt=fmt.substring(f.length)}var len=0;for(var i=0;i12||str.match(/[d]/)&&parseInt(fm,10)>31||str.match(/[H]/)&&parseInt(fm,10)>23||str.match(/[ms]/)&&parseInt(fm,10)>59}if(formatArr.length!=dateArr.length||dateArr[dateArr.length-1]===""){return false}else{for(var i=0;i2)||ff.length===2&&vv.length!==2||ff.length===4&&vv.length!==4){return false}}var que=["y","M","d","h","H","m","s"];for(var i=0;ique.indexOf(formatArr[j].substring(0,1))){var tmp=formatArr[i];formatArr[i]=formatArr[j];formatArr[j]=tmp;tmp=dateArr[i];dateArr[i]=dateArr[j]; +dateArr[j]=tmp}}}}if(!format.match(/[hHms]/)){var dt="";for(var i=0;i59){return false}if(m<0||m>59){return false}}else{if(h<0||h>23){return false}if(m<0||m>59){return false}}return true}else{if(parts.length===3){h=parts[0];m=parts[1];s=parts[3];if(h<0||h>23){return false}if(m<0||m>59){return false}if(s<0||s>59){return false}}}return true}function inMonthRange(res){var d,m;for(var i=0;i0){var flagch=format.charAt(0),start=0,str=flagch;for(var i=1;i 0) {"; +var regex="";var special=false;var ch="";for(var i=0;i= 0 && m >= 0 && d > 0 && h >= 0 && i >= 0 && s >= 0 && ms >= 0)\n"+"{v = new Date(y, m, d, h, i, s, ms);}\n"+"else if (y >= 0 && m >= 0 && d > 0 && h >= 0 && i >= 0 && s >= 0)\n"+"{v = new Date(y, m, d, h, i, s);}\n"+"else if (y >= 0 && m >= 0 && d > 0 && h >= 0 && i >= 0)\n"+"{v = new Date(y, m, d, h, i);}\n"+"else if (y >= 0 && m >= 0 && d > 0 && h >= 0)\n"+"{v = new Date(y, m, d, h);}\n"+"else if (y >= 0 && m >= 0 && d > 0)\n"+"{v = new Date(y, m, d);}\n"+"else if (y >= 0 && m >= 0)\n"+"{v = new Date(y, m);}\n"+"else if (y >= 0)\n"+"{v = new Date(y);}\n"+"}return (v && (z || o))?\n"+" (z ? v.add(Date.SECOND, (v.getTimezoneOffset() * 60) + (z*1)) :\n"+" v.add(Date.HOUR, (v.getGMTOffset() / 100) + (o / -100))) : v\n"+";}"; +Date.parseRegexes[regexNum]=new RegExp("^"+regex+"$","i");eval(code)};Date.parseDateTime=function(str,fmt){var today=new Date();var y=0;var m=0;var d=1;var a=str.split(/\W+/);if(fmt.toLowerCase()=="%y%x"||fmt.toLowerCase()=="%y%x%d"){var tempStr=a.join("");var yearlength=4;var otherlength=2;a[0]=tempStr.substring(0,yearlength);a[1]=tempStr.substring(yearlength,yearlength+otherlength);a[2]=tempStr.substring(yearlength+otherlength,yearlength+otherlength*2)}var b=fmt.match(/%./g);var i=0,j=0;var hr=0; +var min=0;var sec=0;for(i=0;i29)?1900:2000);break;case"%b":case"%B":for(j=0;j<12;++j){if(Date._MN[j].substr(0,a[i].length).toLowerCase()==a[i].toLowerCase()){m=j;break}}break;case"%H":case"%I":case"%k":case"%l":hr=parseInt(a[i],10);break;case"%P":case"%p":if(/pm/i.test(a[i])&&hr<12){hr+=12 +}else{if(/am/i.test(a[i])&&hr>=12){hr-=12}}break;case"%M":min=parseInt(a[i],10);case"%S":sec=parseInt(a[i],10);break}}if(isNaN(y)){y=today.getFullYear()}if(isNaN(m)){m=today.getMonth()}if(isNaN(d)){d=today.getDate()}if(isNaN(hr)){hr=today.getHours()}if(isNaN(min)){min=today.getMinutes()}if(isNaN(sec)){sec=today.getSeconds()}if(y!==0){return new Date(y,m,d,hr,min,sec)}y=0;m=-1;d=0;for(i=0;i31&&y===0){y=parseInt(a[i],10);(y<100)&&(y+=(y>29)?1900:2000)}else{if(d===0){d=a[i]}}}}}if(y===0){y=today.getFullYear()}if(m!==-1&&d!==0){return new Date(y,m,d,hr,min,sec)}return today};Date.formatCodeToRegex=function(character,currentGroup){switch(character){case"d":return{g:1,c:"d = parseInt(results["+currentGroup+"], 10);\n",s:"(\\d{2})"};case"D":for(var a=[],i=0;i<7;a.push(Date._SDN[i]),++i){}return{g:0,c:null,s:"(?:"+a.join("|")+")"}; +case"j":return{g:1,c:"d = parseInt(results["+currentGroup+"], 10);\n",s:"(\\d{1,2})"};case"l":return{g:0,c:null,s:"(?:"+Date.dayNames.join("|")+")"};case"N":return{g:0,c:null,s:"[1-7]"};case"S":return{g:0,c:null,s:"(?:st|nd|rd|th)"};case"w":return{g:0,c:null,s:"[0-6]"};case"z":return{g:0,c:null,s:"(?:\\d{1,3}"};case"W":return{g:0,c:null,s:"(?:\\d{2})"};case"F":return{g:1,c:"m = parseInt(Date.getMonthNumber(results["+currentGroup+"]), 10);\n",s:"("+Date._MN.join("|")+")"};case"m":return{g:1,c:"m = parseInt(results["+currentGroup+"], 10) - 1;\n",s:"(\\d{2})"}; +case"M":for(var a=[],i=0;i<12;a.push(Date._SMN[i]),++i){}return{g:1,c:"m = parseInt(Date.getMonthNumber(results["+currentGroup+"]), 10);\n",s:"("+a.join("|")+")"};case"n":return{g:1,c:"m = parseInt(results["+currentGroup+"], 10) - 1;\n",s:"(\\d{1,2})"};case"t":return{g:0,c:null,s:"(?:\\d{2})"};case"L":return{g:0,c:null,s:"(?:1|0)"};case"o":case"Y":return{g:1,c:"y = parseInt(results["+currentGroup+"], 10);\n",s:"(\\d{4})"};case"y":return{g:1,c:"var ty = parseInt(results["+currentGroup+"], 10);\n"+"y = ty > Date.y2kYear ? 1900 + ty : 2000 + ty;\n",s:"(\\d{1,2})"}; +case"a":return{g:1,c:"if (results["+currentGroup+"] == 'am') {\n"+"if (h == 12) { h = 0; }\n"+"} else { if (h < 12) { h += 12; }}",s:"(am|pm)"};case"A":return{g:1,c:"if (results["+currentGroup+"] == 'AM') {\n"+"if (h == 12) { h = 0; }\n"+"} else { if (h < 12) { h += 12; }}",s:"(AM|PM)"};case"g":case"G":return{g:1,c:"h = parseInt(results["+currentGroup+"], 10);\n",s:"(\\d{1,2})"};case"h":case"H":return{g:1,c:"h = parseInt(results["+currentGroup+"], 10);\n",s:"(\\d{2})"};case"i":return{g:1,c:"i = parseInt(results["+currentGroup+"], 10);\n",s:"(\\d{2})"}; +case"s":return{g:1,c:"s = parseInt(results["+currentGroup+"], 10);\n",s:"(\\d{2})"};case"u":return{g:1,c:"ms = parseInt(results["+currentGroup+"], 10);\n",s:"(\\d{3})"};case"O":return{g:1,c:["o = results[",currentGroup,"];\n","var sn = o.substring(0,1);\n","var hr = o.substring(1,3)*1 + Math.floor(o.substring(3,5) / 60);\n","var mn = o.substring(3,5) % 60;\n","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))?\n"," (sn + String.leftPad(hr, 2, 0) + String.leftPad(mn, 2, 0)) : null;\n"].join(""),s:"([+\\-]\\d{4})"}; +case"P":return{g:1,c:["o = results[",currentGroup,"];\n","var sn = o.substring(0,1);\n","var hr = o.substring(1,3)*1 + Math.floor(o.substring(4,6) / 60);\n","var mn = o.substring(4,6) % 60;\n","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))?\n"," (sn + String.leftPad(hr, 2, 0) + String.leftPad(mn, 2, 0)) : null;\n"].join(""),s:"([+\\-]\\d{2}:\\d{2})"};case"T":return{g:0,c:null,s:"[A-Z]{1,4}"};case"Z":return{g:1,c:"z = results["+currentGroup+"] * 1;\n"+"z = (-43200 <= z && z <= 50400)? z : null;\n",s:"([+\\-]?\\d{1,5})"}; +case"c":var df=Date.formatCodeToRegex,calc=[];var arr=[df("Y",1),df("m",2),df("d",3),df("h",4),df("i",5),df("s",6),df("P",7)];for(var i=0,l=arr.length;i-1){if(l>=0){return FR._numberFormat(l+"",j.substring(0,m))}else{return FR._numberFormat((-l)+"",j.substr(m+1))}}else{if(+l<0&&j.charAt(0)!=="-"){return FR._numberFormat((-l)+"","-"+j)}}var h=j.split("."),e=h[0]||"",b=h[1]||"";l=this._dealNumberPrecision(l,b); +var i=l.split("."),c=i[0]||"",f=i[1]||"";if(/[%‰]/.test(j)){var g=/[%]/.test(j)?"00":"000";f+=g;c+=f.substr(0,g.length);c=c.charAt(0)==="-"?c.replace(/^-0+/gi,"-"):c.replace(/^0+/gi,"");f=f.substr(g.length).replace(/0+$/gi,"")}var k=FR._dealWithRight(f,b);if(k.leftPlus){c=parseInt(c)+1+"";c=isNaN(c)?"1":c}k=k.num;var d=FR._dealWithLeft(c,e);if(!(/[0-9]/.test(d))){d=d+"0"}if(!(/[0-9]/.test(k))){return d+k}else{return d+"."+k}},_eFormatOld:function(r,d){r=this.numberStringWithoutE(r);var n=d.indexOf("E"); +var l=d.substr(0,n),q=d.substr(n+1);if(/^[0\.-]+$/.test(r)){r=FR._numberFormat(0,l)+"E"+FR._numberFormat(0,q)}else{var b=r<0;if(b){r=r.substr(1)}var h=(l.split(".")[0]||"").length;var o=r.indexOf(".");if(o<0){o=r.length}var j=0;r=r.replace(".","");for(var m=r.length;j="1"){break}}var p=o-j-h;var f=r.substr(j,h);var c=j+h-r.length;if(c>0){for(var g=0;g0&&m<1?"floor":"ceil";var j=Math[o](Math.log(m)/Math.log(10));if(!isFinite(j)){return q.replace(/#/ig,"").replace(/\.e/ig,"E")}m=m/Math.pow(10,j);if(m>0&&m<1){m*=10;j-=1}var l=e(j,q);l>1&&(j-=l-1,m*=Math.pow(10,l-1));j<0&&(k="-",j*=-1);var n=f(q);var p=c(m);m*=Math.pow(10,n);m=Math.round(m);p&&(m/=10,j+=k==="-"?-1:1);m/=Math.pow(10,n);m=m.toFixed(n);j=h(q,j,k);return i+m+"E"+j}function h(n,k,m){k+=""; +if(!/e/ig.test(n)){return k}n=n.split(/e/ig)[1];while(k.length1?i[1].length:0}function e(n,o){if(!/e/ig.test(o)){return 0}var p=o.split(/e/ig)[0].split(".")[0],l,m,k=p.length;var j=0;for(l=0;l4){r.leftPlus=true;var f=q.match(/^[0-9]+/);if(f){var m=f[0];var e=m.length;var g=FR.parseINT(m)+1+"";if(g.length>e){g=g.substr(1)}else{g=String.leftPad(g,e,"0"); +r.leftPlus=false}q=q.replace(/^[0-9]+/,g)}}r.num=q;return r},_dealWithLeft:function(e,k){var h="";var l=e.length-1;var g=-1,s=-1;var m=k.length-1;for(;m>=0;m--){var b=k.charAt(m);var r=e.charAt(l);switch(b){case"0":if(FR.isEmpty(r)){r="0"}s=-1;h=r+h;l--;break;case"#":s=m;h=r+h;l--;break;case",":if(!FR.isEmpty(r)){var d=k.match(/,[#0]+/);if(d){g=d[0].length-1}h=","+h}break;default:h=b+h;break}}if(s>-1){var t=e.substr(0,l+1);h=h.substr(0,s)+t+h.substr(s)}if(g>0){var q=h.match(/[0-9]+,/);if(q){q=q[0]; +var p="",f=q.length-1-g;for(;f>=0;f=f-g){p=q.substr(f,g)+","+p}var o=q.substr(0,f+g);if(!FR.isEmpty(o)){p=o+","+p}}h=h.replace(/[0-9]+,/,p)}return h},object2Number:function(b){if(b==null){return 0}if(typeof b=="number"){return b}else{var c=b+"";if(c.indexOf(".")===-1){return parseInt(c)}else{return parseFloat(c)}}},object2Date:function(c){if(c==null){return new Date()}if(c instanceof Date){return c}else{if(typeof c=="number"){return new Date(c)}else{var d=c+"";d=d.replace(/-/g,"/");var b=new Date(d); +if(!FR.isInvalidDate(b)){return b}return new Date()}}},object2Time:function(c){if(c==null){return new Date()}if(c instanceof Date){return c}else{var d=c+"";d=d.replace(/-/g,"/");var b=new Date(d);if(!FR.isInvalidDate(b)){return b}if(d.indexOf("/")===-1&&d.indexOf(":")!==-1){b=new Date("1970/01/01 "+d);if(!FR.isInvalidDate(b)){return b}}b=FR.str2Date(d,"HH:mm:ss");if(!FR.isInvalidDate(b)){return b}return new Date()}},isInvalidDate:function(b){return b=="Invalid Date"||b=="NaN"},numberStringWithoutE:function(d){if(isNaN(Number(d))){return d +}var g=Number(d).toString().split(/[eE]/);if(g.length===1){return g[0]}var e="",c=Number(d)<0?"-":"",b=g[0].replace(".",""),f=Number(g[1])+1;if(f<0){e=c+"0.";while(f++){e+="0"}return e+b.replace(/^-/,"")}f-=b.length;while(f-->0){e+="0"}return b+e}})})(jQuery); diff --git a/src/test/java/WEB-INF/assist/phantomjs/lib/van-convert.js b/src/test/java/WEB-INF/assist/phantomjs/lib/van-convert.js new file mode 100644 index 0000000..6683041 --- /dev/null +++ b/src/test/java/WEB-INF/assist/phantomjs/lib/van-convert.js @@ -0,0 +1,15 @@ +var system=require("system"),fs=require("fs");var LOG_ERROR=1,LOG_WARN=2,LOG_NOTICE=3,LOG_INFO=4,LOG_DEBUG=5;var EXIT_ERROR=-1,EXIT_NORMAL=0,EXIT_REQUEST=1,EXIT_TIMEOUT=2;var statusMsg,chartType,pageMsg,renderMsg,responseMsg;var CHECK_DELAY=1000*5;var TIMEOUT=0;var INTERVAL=1000*5;var MAX_RENDER_TIME=1000*60*5;var DEFAULT_WIDTH=800;var DEFAULT_HEIGHT=600;var isOSX=/mac/i.test(system.os["name"]);var LOG_LEVEL=LOG_WARN;var LOG_FILE="";var timeLog,renderTimeLog,page,cssStr;var jsName;phantom.onError=phantomErr; +var clog=CLOG(LOG_LEVEL,LOG_FILE);if(system.args.length>=2&&/^(?:[0-9]{1,3}\.){3}[0-9]{1,3}|localhost/.test(system.args[1])){var args=system.args;var address=args[1].split(":");var ip=address[0],port=address[1];args=args.slice(2);if(args.length%2){exit()}for(var i=0,len=args.length;i3){clog.setFile(v)}break;case"t":if(!isNaN(v)){TIMEOUT=+v}break;case"j":jsName=v;break;default:break +}}page=initPage();startServer(ip,port);setTimeout(supervisor,CHECK_DELAY)}else{console.log("example: ./PhantomJS van-convert.js 127.0.0.1:2333");exit()}function initPage(){var a=require("webpage").create();a.onError=pageErr;a.content=''+""+'
'; +a.evaluate(function(){FR={};FR.i18nText=function(c){return c}});a.injectJs("format.js");a.injectJs("vancharts-all.js");if(jsName){var b=jsName.split(",");b.forEach(function(c){a.injectJs(c)})}a.evaluate(shim);cssStr&&a.evaluate(addStyleTag,cssStr);return a}function render(c,b){renderTimeLog=+Date.now();page.onError=function(g,f){renderTimeLog=0;clog.notice("chart type: "+c.option.chartType);b("page error");pageErr(g,f)};page.onConsoleMessage=function(h,g,f){renderTimeLog=0;renderMsg=h;if(h==="done"){clog.log(h,g,f); +window.setTimeout(function(){var j=page.renderBase64("PNG");b(j)},c.time)}else{clog.info(h,g,f)}};var e=c.zoom||1,d=c.width||DEFAULT_WIDTH,a=c.height||DEFAULT_HEIGHT;d*=e;a*=e;page.zoomFactor=(c.scale||1)*e;page.viewportSize={width:d,height:a};page.clipRect={top:0,left:0,width:d,height:a};if(c.js){page.evaluate(function(){if(Date.brokenSetMonth){Date.prototype.setMonth=Date.brokenSetMonth}});page.evaluateJavaScript("function(){"+c.js+"}")}page.evaluate(function(p,h){var g=p.width||DEFAULT_WIDTH;var o=p.height||DEFAULT_HEIGHT; +var j=p.option,n=window;n.chartBg=document.getElementById("bg");n.chartContainer=document.getElementById("container");if(j.geo&&j.borderWidth){g-=2*j.borderWidth;o-=2*j.borderWidth}try{n.vanCharts&&n.vanCharts.clear()}catch(l){}n.chartContainer.innerHTML="";n.chartContainer.style.backgroundImage="";n.chartContainer.style.borderStyle="none";n.chartContainer.style.width=g+"px";n.chartContainer.style.height=o+"px";n.chartBg.style.width=g+"px";n.chartBg.style.height=o+"px";n.chartBg.style.display=""; +if(h&&j["style"]==="gradual"){n.chartBg.style.display="block"}VanCharts.initPaddingScale(j.scale);j["plotOptions"]=j["plotOptions"]||{};j["plotOptions"]["animation"]=false;var m=j.wrapperName;if(m){var f=new window[m]();n.vanCharts=f._exportInit(n.chartContainer,j);console.log("done")}else{n.vanCharts=VanCharts.init(n.chartContainer);n.vanCharts.setOptions(j)}},c,isOSX)}function addCss(b,a){page.onConsoleMessage=function(e,d,c){if(e==="done"){a('{"status": "success"}')}else{clog.error("add css error"); +a('{"status": "css injected error."}')}};cssStr=b.css;page.evaluate(addStyleTag,cssStr)}function addStyleTag(a){(function(){var b=document.createElement("style");b.innerText=a;document.body.appendChild(b);console.log("done")})()}function supervisor(){if(!(INTERVAL>1)){return}if(!(TIMEOUT>1)){return}timeLog=+Date.now();renderTimeLog=0;setInterval(function(){if(Date.now()-renderTimeLog=LOG_DEBUG){e.apply(this,arguments)}},info:function(){if(h>=LOG_INFO){e.apply(this,arguments)}},notice:function(){if(h>=LOG_NOTICE){e.apply(this,arguments) +}},warn:function(){if(h>=LOG_WARN){e.apply(this,arguments)}g&&g.write(c(arguments))},error:function(){if(h>=LOG_ERROR){e.apply(this,arguments)}g&&g.write(c(arguments))},setFile:f,setLevel:b,popAll:function(){var j=a.join("");a=[];return j},flush:function(){g&&g.flush()},close:function(){g&&g.close()}}}function pageErr(c,b){pageMsg=c;var a=["\r\nPAGE ERROR: "+c];if(b&&b.length){a.push("TRACE:");b.forEach(function(d){a.push(" -> "+d.file+": "+d.line+(d["function"]?' (in function "'+d["function"]+'")':"")) +})}clog.notice(a.join("\r\n"));page.close();page=initPage()}function phantomErr(c,b){var a=["\r\nPHANTOM ERROR: "+c];if(b&&b.length){a.push("TRACE:");b.forEach(function(d){a.push(" -> "+(d.file||d.sourceURL)+": "+d.line+(d["function"]?" (in function "+d["function"]+")":""))})}clog.error(a.join("\r\n"));exit(EXIT_ERROR)}function exit(a){switch(a){case EXIT_ERROR:clog.error("Exit with error.");break;case EXIT_TIMEOUT:clog.warn("Exit due to timeout.");break;case EXIT_REQUEST:clog.warn("Exit by request"); +break;default:case EXIT_NORMAL:clog.warn("Exit.");break}clog.warn("exit pid:"+system.pid);clog.warn("chartType:"+chartType);clog.warn("pageMsg:"+pageMsg);clog.warn("renderMsg:"+renderMsg);clog.warn("statusMsg:"+statusMsg);clog.warn("responseMsg:"+responseMsg);clog.close();phantom.exit()}function convertDate(a){return a.replace(/\d{13}/g,dateFun)}function dateFun(b){var a=new Date(+b);return a.getFullYear()+"-"+addZero(a.getMonth()+1)+"-"+addZero(a.getDate())+" "+addZero(a.getHours())+":"+addZero(a.getMinutes())+":"+addZero(a.getSeconds()) +}function addZero(a){return("0"+a).slice(-2)}function shim(){if(!Function.prototype.bind){Function.prototype.bind=function(a){if(typeof this!=="function"){throw new TypeError("Function.prototype.bind -what is trying to be bound is not callable")}var e=Array.prototype.slice.call(arguments,1),d=this,b=function(){},c=function(){return d.apply(this instanceof b&&a?this:a,e.concat(Array.prototype.slice.call(arguments)))};b.prototype=this.prototype;c.prototype=new b();return c}}}; \ No newline at end of file diff --git a/src/test/java/WEB-INF/assist/phantomjs/lib/vancharts-all.js b/src/test/java/WEB-INF/assist/phantomjs/lib/vancharts-all.js new file mode 100644 index 0000000..b2db344 --- /dev/null +++ b/src/test/java/WEB-INF/assist/phantomjs/lib/vancharts-all.js @@ -0,0 +1,1533 @@ +/*! Hammer.JS - v2.0.7 - 2016-04-22 + * http://hammerjs.github.io/ + * + * Copyright (c) 2016 Jorik Tangelder; + * Licensed under the MIT license */ +!function(b,c){var a=c();"function"==typeof define&&define.amd?define("VanCharts",[],function(){return a}):b.VanCharts=a}(this,function(){function firstSeriesHasValidAreaName(t,e){for(var i=0,n=t.length;n>i;i++){if(t[i].name===e&&!t[i].isNull){return !0}}return !1}var requirejs,require,define;!function(t){function e(t,e){return v.call(t,e)}function i(t,e){var i,n,r,a,o,s,h,l,u,c,d,f=e&&e.split("/"),p=g.map,m=p&&p["*"]||{}; +if(t&&"."===t.charAt(0)){if(e){for(t=t.split("/"),o=t.length-1,g.nodeIdCompat&&y.test(t[o])&&(t[o]=t[o].replace(y,"")),t=f.slice(0,f.length-1).concat(t),u=0;u0&&(t.splice(u-1,2),u-=2)}}}t=t.join("/")}else{0===t.indexOf("./")&&(t=t.substring(2))}}if((f||m)&&p){for(i=t.split("/"),u=i.length;u>0;u-=1){if(n=i.slice(0,u).join("/"),f){for(c=f.length;c>0;c-=1){if(r=p[f.slice(0,c).join("/")],r&&(r=r[n])){a=r,s=u; +break}}}if(a){break}!h&&m&&m[n]&&(h=m[n],l=u)}!a&&h&&(a=h,s=l),a&&(i.splice(0,s,a),t=i.join("/"))}return t}function n(e,i){return function(){var n=_.call(arguments,0);return"string"!=typeof n[0]&&1===n.length&&n.push(null),u.apply(t,n.concat([e,i]))}}function r(t){return function(e){return i(e,t)}}function a(t){return function(e){f[t]=e}}function o(i){if(e(p,i)){var n=p[i];delete p[i],m[i]=!0,l.apply(t,n)}if(!e(f,i)&&!e(m,i)){throw new Error("No "+i)}return f[i]}function s(t){var e,i=t?t.indexOf("!"):-1; +return i>-1&&(e=t.substring(0,i),t=t.substring(i+1,t.length)),[e,t]}function h(t){return function(){return g&&g.config&&g.config[t]||{}}}var l,u,c,d,f={},p={},g={},m={},v=Object.prototype.hasOwnProperty,_=[].slice,y=/\.js$/;c=function(t,e){var n,a=s(t),h=a[0];return t=a[1],h&&(h=i(h,e),n=o(h)),h?t=n&&n.normalize?n.normalize(t,r(e)):i(t,e):(t=i(t,e),a=s(t),h=a[0],t=a[1],h&&(n=o(h))),{f:h?h+"!"+t:t,n:t,pr:h,p:n}},d={require:function(t){return n(t)},exports:function(t){var e=f[t];return"undefined"!=typeof e?e:f[t]={} +},module:function(t){return{id:t,uri:"",exports:f[t],config:h(t)}}},l=function(i,r,s,h){var l,u,g,v,_,y,x=[],T=typeof s;if(h=h||i,"undefined"===T||"function"===T){for(r=!r.length&&s.length?["require","exports","module"]:r,_=0;_n;n++){for(var a=0;3>a;a++){for(var o=0,s=0;3>s;s++){o+=t[n][s]*e[s][a]}i[n][a]=o}}return i}function o(t,e){e.fillStyle=t.fillStyle,e.lineCap=t.lineCap,e.lineJoin=t.lineJoin,e.lineWidth=t.lineWidth,e.miterLimit=t.miterLimit,e.shadowBlur=t.shadowBlur,e.shadowColor=t.shadowColor,e.shadowOffsetX=t.shadowOffsetX,e.shadowOffsetY=t.shadowOffsetY,e.strokeStyle=t.strokeStyle,e.globalAlpha=t.globalAlpha,e.arcScaleX_=t.arcScaleX_,e.arcScaleY_=t.arcScaleY_,e.lineScale_=t.lineScale_ +}function s(t){var e,i=1;if(t=String(t),"rgb"==t.substring(0,3)){var n=t.indexOf("(",3),r=t.indexOf(")",n+1),a=t.substring(n+1,r).split(",");e="#";for(var o=0;3>o;o++){e+=L[Number(a[o])]}4===a.length&&"a"===t.substr(3,1)&&(i=a[3])}else{e=t}return{color:e,alpha:i}}function h(t){switch(t){case"butt":return"flat";case"round":return"round";case"square":default:return"square"}}function l(t){this.m_=r(),this.mStack_=[],this.aStack_=[],this.currentPath_=[],this.strokeStyle="#000",this.fillStyle="#000",this.font="12px sans-serif",this.lineWidth=1,this.lineJoin="miter",this.lineCap="butt",this.miterLimit=1*T,this.globalAlpha=1,this.canvas=t; +var e=t.ownerDocument.createElement("div");e.style.width=t.clientWidth+"px",e.style.height=t.clientHeight+"px",e.style.position="absolute",t.appendChild(e),this.element_=e,this.arcScaleX_=1,this.arcScaleY_=1,this.lineScale_=1}function u(t,e,i,n){t.currentPath_.push({type:"bezierCurveTo",cp1x:e.x,cp1y:e.y,cp2x:i.x,cp2y:i.y,x:n.x,y:n.y}),t.currentX_=n.x,t.currentY_=n.y}function c(t){for(var e=0;3>e;e++){for(var i=0;2>i;i++){if(!isFinite(t[e][i])||isNaN(t[e][i])){return !1}}}return !0}function d(t,e,i){if(c(e)&&(t.m_=e,i)){var n=e[0][0]*e[1][1]-e[0][1]*e[1][0]; +t.lineScale_=x(y(n))}}function f(t){this.type_=t,this.x0_=0,this.y0_=0,this.r0_=0,this.x1_=0,this.y1_=0,this.r1_=0,this.colors_=[]}function p(){}var g=Math,m=g.round,v=g.sin,_=g.cos,y=g.abs,x=g.sqrt,T=10,b=T/2,A=Array.prototype.slice,C={init:function(t){if(/MSIE/.test(navigator.userAgent)&&!window.opera){var i=t||document;i.createElement("vancanvas"),i.attachEvent("onreadystatechange",e(this.init_,this,i))}},init_:function(t){if(t.namespaces){if(t.namespaces.g_vml_||t.namespaces.add("g_vml_","urn:schemas-microsoft-com:vml","#default#VML"),t.namespaces.g_o_||t.namespaces.add("g_o_","urn:schemas-microsoft-com:office:office","#default#VML"),!t.styleSheets.ex_canvas_){var e=t.createStyleSheet(); +e.owningElement.id="ex_canvas_",e.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}g_vml_\\:*{behavior:url(#default#VML)}g_o_\\:*{behavior:url(#default#VML)}"}for(var i=t.getElementsByTagName("vancanvas"),n=0;nM;M++){for(var P=0;16>P;P++){L[16*M+P]=M.toString(16)+P.toString(16)}}var w=l.prototype;w.clearRect=function(){this.element_.innerHTML=""},w.beginPath=function(){this.currentPath_=[]},w.moveTo=function(t,e){var i=this.getCoords_(t,e);this.currentPath_.push({type:"moveTo",x:i.x,y:i.y}),this.currentX_=i.x,this.currentY_=i.y},w.lineTo=function(t,e){var i=this.getCoords_(t,e);this.currentPath_.push({type:"lineTo",x:i.x,y:i.y}),this.currentX_=i.x,this.currentY_=i.y +},w.bezierCurveTo=function(t,e,i,n,r,a){var o=this.getCoords_(r,a),s=this.getCoords_(t,e),h=this.getCoords_(i,n);u(this,s,h,o)},w.quadraticCurveTo=function(t,e,i,n){var r=this.getCoords_(t,e),a=this.getCoords_(i,n),o={x:this.currentX_+2/3*(r.x-this.currentX_),y:this.currentY_+2/3*(r.y-this.currentY_)},s={x:o.x+(a.x-this.currentX_)/3,y:o.y+(a.y-this.currentY_)/3};u(this,o,s,a)},w.arc=function(t,e,i,n,r,a){i*=T;var o=a?"at":"wa",s=t+_(n)*i-b,h=e+v(n)*i-b,l=t+_(r)*i-b,u=e+v(r)*i-b;s!=l||a||(s+=0.125); +var c=this.getCoords_(t,e),d=this.getCoords_(s,h),f=this.getCoords_(l,u);this.currentPath_.push({type:o,x:c.x,y:c.y,radius:i,xStart:d.x,yStart:d.y,xEnd:f.x,yEnd:f.y})},w.rect=function(t,e,i,n){this.moveTo(t,e),this.lineTo(t+i,e),this.lineTo(t+i,e+n),this.lineTo(t,e+n),this.closePath()},w.strokeRect=function(t,e,i,n){var r=this.currentPath_;this.beginPath(),this.moveTo(t,e),this.lineTo(t+i,e),this.lineTo(t+i,e+n),this.lineTo(t,e+n),this.closePath(),this.stroke(),this.currentPath_=r},w.fillRect=function(t,e,i,n){var r=this.currentPath_; +this.beginPath(),this.moveTo(t,e),this.lineTo(t+i,e),this.lineTo(t+i,e+n),this.lineTo(t,e+n),this.closePath(),this.fill(),this.currentPath_=r},w.createLinearGradient=function(t,e,i,n){var r=new f("gradient");return r.x0_=t,r.y0_=e,r.x1_=i,r.y1_=n,r},w.createRadialGradient=function(t,e,i,n,r,a){var o=new f("gradientradial");return o.x0_=t,o.y0_=e,o.r0_=i,o.x1_=n,o.y1_=r,o.r1_=a,o},w.drawImage=function(t,e){t.getContext&&(this.element_.innerHTML+=t.getContext("2d").element_.innerHTML);var i,n,r,a,o,s,h,l,u=t.runtimeStyle.width,c=t.runtimeStyle.height; +t.runtimeStyle.width="auto",t.runtimeStyle.height="auto";var d=t.width,f=t.height;if(t.runtimeStyle.width=u,t.runtimeStyle.height=c,3===arguments.length){i=arguments[1],n=arguments[2],o=s=0,h=r=d,l=a=f}else{if(5===arguments.length){i=arguments[1],n=arguments[2],r=arguments[3],a=arguments[4],o=s=0,h=d,l=f}else{if(9!==arguments.length){throw Error("Invalid number of arguments")}o=arguments[1],s=arguments[2],h=arguments[3],l=arguments[4],i=arguments[5],n=arguments[6],r=arguments[7],a=arguments[8]}}var p=this.getCoords_(i,n),v=[],_=10,y=10; +if(v.push(" ','",""),this.element_.insertAdjacentHTML("BeforeEnd",v.join(""))},w.stroke=function(t){var e=[],i=s(t?this.fillStyle:this.strokeStyle),n=i.color,r=i.alpha*this.globalAlpha,a=10,o=10;e.push("u.x)&&(u.x=f.x),(null==l.y||f.yu.y)&&(u.y=f.y))}if(e.push(' ">'),t){if(this.fillStyle&&"object"==typeof this.fillStyle){var p=this.fillStyle,v=0,_={x:0,y:0},y=0,x=1;if("gradient"==p.type_){var b=p.x0_/this.arcScaleX_,A=p.y0_/this.arcScaleY_,C=p.x1_/this.arcScaleX_,L=p.y1_/this.arcScaleY_,M=this.getCoords_(b,A),P=this.getCoords_(C,L),w=P.x-M.x,S=P.y-M.y;v=180*Math.atan2(w,S)/Math.PI,0>v&&(v+=360),0.000001>v&&(v=0) +}else{var M=this.getCoords_(p.x0_,p.y0_),E=u.x-l.x,O=u.y-l.y;_={x:(M.x-l.x)/E,y:(M.y-l.y)/O},E/=this.arcScaleX_*T,O/=this.arcScaleY_*T;var R=g.max(E,O);y=2*p.r0_/R,x=2*p.r1_/R-y}var k=p.colors_;k.sort(function(t,e){return t.offset-e.offset});for(var D=k.length,I=k[0].color,B=k[D-1].color,N=k[0].alpha*this.globalAlpha,G=k[D-1].alpha*this.globalAlpha,F=[],c=0;D>c;c++){var H=k[c];F.push(H.offset*x+y+" "+H.color)}e.push('') +}else{e.push('')}}else{var z=this.lineScale_*this.lineWidth;1>z&&(r*=z),e.push("')}e.push(""),this.element_.insertAdjacentHTML("beforeEnd",e.join(""))},w.fill=function(){this.stroke(!0)},w.closePath=function(){this.currentPath_.push({type:"close"})},w.getCoords_=function(t,e){var i=this.m_; +return{x:T*(t*i[0][0]+e*i[1][0]+i[2][0])-b,y:T*(t*i[0][1]+e*i[1][1]+i[2][1])-b}},w.save=function(){var t={};o(this,t),this.aStack_.push(t),this.mStack_.push(this.m_),this.m_=a(r(),this.m_)},w.restore=function(){o(this.aStack_.pop(),this),this.m_=this.mStack_.pop()},w.translate=function(t,e){var i=[[1,0,0],[0,1,0],[t,e,1]];d(this,a(i,this.m_),!1)},w.rotate=function(t){var e=_(t),i=v(t),n=[[e,i,0],[-i,e,0],[0,0,1]];d(this,a(n,this.m_),!1)},w.scale=function(t,e){this.arcScaleX_*=t,this.arcScaleY_*=e; +var i=[[t,0,0],[0,e,0],[0,0,1]];d(this,a(i,this.m_),!0)},w.transform=function(t,e,i,n,r,o){var s=[[t,e,0],[i,n,0],[r,o,1]];d(this,a(s,this.m_),!0)},w.setTransform=function(t,e,i,n,r,a){var o=[[t,e,0],[i,n,0],[r,a,1]];d(this,o,!0)},w.clip=function(){},w.arcTo=function(){},w.createPattern=function(){return new p},w.measureText=function(t){var e=document.createElement("span");e.style.font=this.font,e.innerHTML=t;var i=document.getElementsByTagName("body")[0];i.appendChild(e);var n=e.offsetWidth;return i.removeChild(e),{width:n+1} +},w.fillText=function(t,e,i){var n=[],r=this.font.split("px")[0].replace(/(^\s+)|(\s+$)/g,""),a=/^\d+$/.test(r)?parseInt(r):0;n.push(''+t," ",""),this.element_.insertAdjacentHTML("BeforeEnd",n.join(""))},f.prototype.addColorStop=function(t,e){e=s(e),this.colors_.push({offset:t,color:e.color,alpha:e.alpha}) +},VanCanvasManager=C,CanvasRenderingContext2D=l,CanvasGradient=f,CanvasPattern=p}(),define("excanvas",function(){}),function(t,e,i,n){function r(t,e,i){return setTimeout(l(t,i),e)}function a(t,e,i){return Array.isArray(t)?(o(t,i[e],i),!0):!1}function o(t,e,i){var r;if(t){if(t.forEach){t.forEach(e,i)}else{if(t.length!==n){for(r=0;r\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",a=t.console&&(t.console.warn||t.console.log); +return a&&a.call(t.console,r,n),e.apply(this,arguments)}}function h(t,e,i){var n,r=e.prototype;n=t.prototype=Object.create(r),n.constructor=t,n._super=r,i&&ct(n,i)}function l(t,e){return function(){return t.apply(e,arguments)}}function u(t,e){return typeof t==pt?t.apply(e?e[0]||n:n,e):t}function c(t,e){return t===n?e:t}function d(t,e,i){return o(m(e),function(e){t.addEventListener?t.addEventListener(e,i,!1):t.attachEvent&&("wheel"==e&&(e="mousewheel"),t.attachEvent("on"+e,i))}),this}function f(t,e,i){o(m(e),function(e){t.removeEventListener?t.removeEventListener(e,i,!1):t.detachEvent&&("wheel"==e&&(e="mousewheel"),t.detachEvent("on"+e,i)) +})}function p(t,e){for(;t;){if(t==e){return !0}t=t.parentNode}return !1}function g(t,e){return t.indexOf(e)>-1}function m(t){return t.trim().split(/\s+/g)}function v(t,e,i){if(t.indexOf&&!i){return t.indexOf(e)}for(var n=0;ni[e] +}):n.sort()),n}function x(t,e){for(var i,r,a=e.charAt(0).toUpperCase()+e.slice(1),o=0;o1&&!i.firstMultiple?i.firstMultiple=S(e):1===r&&(i.firstMultiple=!1);var a=i.firstInput,o=i.firstMultiple,s=o?o.center:a.center,h=e.center=E(n);e.timeStamp=xt(),e.deltaTime=e.timeStamp-a.timeStamp,e.angle=D(s,h),e.distance=k(s,h),P(i,e),e.offsetDirection=R(e.deltaX,e.deltaY); +var l=O(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=l.x,e.overallVelocityY=l.y,e.overallVelocity=yt(l.x)>yt(l.y)?l.x:l.y,e.scale=o?B(o.pointers,n):1,e.rotation=o?I(o.pointers,n):0,e.maxPointers=i.prevInput?e.pointers.length>i.prevInput.maxPointers?e.pointers.length:i.prevInput.maxPointers:e.pointers.length,w(i,e);var u=t.element;p(e.srcEvent.target,u)&&(u=e.srcEvent.target),e.target=u}function P(t,e){var i=e.center,n=t.offsetDelta||{},r=t.prevDelta||{},a=t.prevInput||{};(e.eventType===kt||a.eventType===It)&&(r=t.prevDelta={x:a.deltaX||0,y:a.deltaY||0},n=t.offsetDelta={x:i.x,y:i.y}),e.deltaX=r.x+(i.x-n.x),e.deltaY=r.y+(i.y-n.y) +}function w(t,e){var i,r,a,o,s=t.lastInterval||e,h=e.timeStamp-s.timeStamp;if(e.eventType!=Bt&&(h>Rt||s.velocity===n)){var l=e.deltaX-s.deltaX,u=e.deltaY-s.deltaY,c=O(h,l,u);r=c.x,a=c.y,i=yt(c.x)>yt(c.y)?c.x:c.y,o=R(l,u),t.lastInterval=e}else{i=s.velocity,r=s.velocityX,a=s.velocityY,o=s.direction}e.velocity=i,e.velocityX=r,e.velocityY=a,e.direction=o}function S(t){for(var e=[],i=0;ir;){i+=t[r].clientX,n+=t[r].clientY,r++}return{x:_t(i/e),y:_t(n/e)}}function O(t,e,i){return{x:e/t||0,y:i/t||0}}function R(t,e){return t===e?Nt:yt(t)>=yt(e)?0>t?Gt:Ft:0>e?Ht:zt}function k(t,e,i){i||(i=Xt);var n=e[i[0]]-t[i[0]],r=e[i[1]]-t[i[1]];return Math.sqrt(n*n+r*r)}function D(t,e,i){i||(i=Xt);var n=e[i[0]]-t[i[0]],r=e[i[1]]-t[i[1]];return 180*Math.atan2(r,n)/Math.PI}function I(t,e){return D(e[1],e[0],Yt)+D(t[1],t[0],Yt) +}function B(t,e){return k(e[0],e[1],Yt)/k(t[0],t[1],Yt)}function N(){this.evEl=qt,this.evWin=jt,this.pressed=!1,A.apply(this,arguments)}function G(){this.evEl=$t,this.evWin=te,A.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function F(){this.evTarget=ie,this.evWin=ne,this.started=!1,A.apply(this,arguments)}function H(t,e){var i=_(t.touches),n=_(t.changedTouches);return e&(It|Bt)&&(i=y(i.concat(n),"identifier",!0)),[i,n]}function z(){this.evTarget=ae,this.targetIds={},A.apply(this,arguments) +}function U(t,e){var i=_(t.touches),n=this.targetIds;if(e&(kt|Dt)&&1===i.length){return n[i[0].identifier]=!0,[i,i]}var r,a,o=_(t.changedTouches),s=[],h=this.target;if(a=i.filter(function(t){return p(t.target,h)}),e===kt){for(r=0;r-1&&n.splice(t,1)};setTimeout(r,oe)}}function Y(t){for(var e=t.srcEvent.clientX,i=t.srcEvent.clientY,n=0;n=a&&se>=o){return !0}}return !1}function Z(t,e){this.manager=t,this.set(e)}function q(t){if(g(t,fe)){return fe}var e=g(t,pe),i=g(t,ge);return e&&i?de:e||i?e?pe:ge:g(t,de)?de:ce}function j(){if(!le){return !1}var e={},i=t.CSS&&t.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(n){e[n]=i?t.CSS.supports("touch-action",n):!0}),e}function Q(t){this.options=ct({},this.defaults,t||{}),this.id=T(),this.manager=null,this.options.enable=c(this.options.enable,!0),this.state=ve,this.simultaneous={},this.requireFail=[] +}function K(t){return t&be?"cancel":t&xe?"end":t&ye?"move":t&_e?"start":""}function J(t){return t==zt?"down":t==Ht?"up":t==Gt?"left":t==Ft?"right":""}function $(t,e){var i=e.manager;return i?i.get(t):t}function tt(){Q.apply(this,arguments)}function et(){tt.apply(this,arguments),this.pX=null,this.pY=null}function it(){tt.apply(this,arguments)}function nt(){Q.apply(this,arguments),this._timer=null,this._input=null}function rt(){tt.apply(this,arguments)}function at(){tt.apply(this,arguments)}function ot(){Q.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0 +}function st(t,e){return e=e||{},e.recognizers=c(e.recognizers,st.defaults.preset),new ht(t,e)}function ht(t,e){this.options=ct({},st.defaults,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=C(this),this.touchAction=new Z(this,this.options.touchAction),lt(this,!0),o(this.options.recognizers,function(t){var e=this.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3]) +},this)}function lt(t,e){var i=t.element;if(i.style){var n;o(t.options.cssProps,function(r,a){n=x(i.style,a),e?(t.oldCssProps[n]=i.style[n],i.style[n]=r):i.style[n]=t.oldCssProps[n]||""}),e||(t.oldCssProps={})}}function ut(t,i){var n=e.createEvent("Event");n.initEvent(t,!0,!0),n.gesture=i,i.target.dispatchEvent(n)}var ct,dt=["","webkit","Moz","MS","ms","o"],ft=e.createElement("div"),pt="function",gt="mousedown mouseup pointerdown pointerup MSPointerDown MSPointerUp",mt=function(t){return t.type&&-1!=gt.indexOf(t.type)?void 0:(t.preventDefault?t.preventDefault():t.returnValue=!1,this) +},vt=!t.SVGSVGElement,_t=Math.round,yt=Math.abs,xt=Date.now;ct="function"!=typeof Object.assign?function(t){if(t===n||null===t){throw new TypeError("Cannot convert undefined or null to object")}for(var e=Object(t),i=1;is&&(e.push(t),s=e.length-1):r&(It|Bt)&&(i=!0);var h={pointers:e,changedPointers:[t],pointerType:a,srcEvent:t};if(0>s){var l=t.type;if(l=l.indexOf("wheel")>=0?"wheel":l,-1!=Jt.indexOf(l)){var u=this.manager.handlers[l]&&this.manager.handlers[l].slice(); +if(u&&u.length){for(var c=0;c-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return !!this.simultaneous[t.id]},emit:function(t){function e(e){i.manager.emit(e,t) +}var i=this,n=this.state;xe>n&&e(i.options.event+K(n)),e(i.options.event),t.additionalEvent&&e(t.additionalEvent),n>=xe&&e(i.options.event+K(n))},tryEmit:function(t){return this.canEmit()?this.emit(t):void (this.state=Ae)},canEmit:function(){for(var t=0;ta?Gt:Ft,i=a!=this.pX,n=Math.abs(t.deltaX)):(r=0===o?Nt:0>o?Ht:zt,i=o!=this.pY,n=Math.abs(t.deltaY))),t.direction=r,h&&i&&n>e.threshold&&r&e.direction},attrTest:function(t){return tt.prototype.attrTest.call(this,t)&&(this.state&_e||!(this.state&_e)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY; +var e=J(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),h(it,tt,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[fe]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&_e)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),h(nt,Q,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[ce] +},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,n=t.distancee.time;if(this._input=t,!n||!i||t.eventType&(It|Bt)&&!a){this.reset()}else{if(t.eventType&kt){this.reset(),this._timer=r(function(){this.state=Te,this.tryEmit()},e.time,this)}else{if(t.eventType&It){return Te}}}return Ae},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===Te&&(t&&t.eventType&It?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=xt(),this.manager.emit(this.options.event,this._input))) +}}),h(rt,tt,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[fe]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&_e)}}),h(at,tt,{defaults:{event:"swipe",threshold:10,velocity:0.3,direction:Ut|Vt,pointers:1},getTouchAction:function(){return et.prototype.getTouchAction.call(this)},attrTest:function(t){var e,i=this.options.direction;return i&(Ut|Vt)?e=t.overallVelocity:i&Ut?e=t.overallVelocityX:i&Vt&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&i&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&yt(e)>this.options.velocity&&t.eventType&It +},emit:function(t){var e=J(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),h(ot,Q,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[de]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,n=t.distance1,phantomjs:r} +}),define("utils/ColorUtils",[],function(){function t(t){return String(t).replace(/\s+/g,"")}function e(t,e){return t<=e[0]?t=e[0]:t>=e[1]&&(t=e[1]),t}function i(t,e){if("function"!=typeof e){throw new TypeError}for(var i=t?t.length:0,n=0;i>n;n++){t[n]=e(t[n])}return t}function n(n){if(y[n]&&(n=y[n]),x[n]){return x[n].slice()}if(n=t(n),/^#[\da-f]{3}$/i.test(n)){n=parseInt(n.slice(1),16);var r=(3840&n)<<8,a=(240&n)<<4,o=15&n;n="#"+((1<<24)+(r<<4)+r+(a<<4)+a+(o<<4)+o).toString(16).slice(1)}var r=n.match(b); +if(!r){return x[n]=T,T.slice()}var s,h,l,u=[];if(r[2]){s=r[2].replace("#","").split(""),l=[s[0]+s[1],s[2]+s[3],s[4]+s[5]],u=i(l,function(t){return e(parseInt(t,16),[0,255])})}else{if(r[4]){var c=r[4].split(",");h=c[3],l=c.slice(0,3),u=i(l,function(t){return t=Math.floor(t.indexOf("%")>0?2.55*parseInt(t,0):t),e(t,[0,255])}),"undefined"!=typeof h&&u.push(e(parseFloat(h),[0,1]))}}return 3===u.length&&u.push(1),x[n]=u.slice(),u}function r(t,n){if(n=n||"rgb",t&&(3===t.length||4===t.length)){if(t=i(t,function(t){return t>1?Math.ceil(t):t +}),n.indexOf("hex")>-1){return"#"+((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1)}if(n.indexOf("hs")>-1){var r=i(t.slice(1,3),function(t){return t+"%"});t[1]=r[0],t[2]=r[1]}return n.indexOf("a")>-1?(3===t.length&&t.push(1),t[3]=e(t[3],[0,1]),n+"("+t.slice(0,4).join(", ")+")"):n+"("+t.slice(0,3).join(", ")+")"}}function a(t){for(var i=n(t),a=[],o=0;3>o;o++){var s=i[o];128>=s?a.push(e(s-(255-s)*(255-2*s)/(2*s),[0,255])):a.push(e(s+s*(2*s-255)/(2*(255-s)),[0,255]))}var h=[];for(o=0;3>o;o++){h.push(Math.round(0.65*i[o]+0.35*a[o])) +}return r(h,"rgb")}function o(t,e){var i=n(t);i.length=3;for(var a=0;3>a;a++){i[a]=parseInt(i[a]/e,10)}return r(i,"rgb")}function s(t){var e=n(t);e.length=3;for(var i=0;2>i;i++){e[i]=parseInt(0.95*e[i],10)}return r(e,"rgb")}function h(t,e){var i=n(t);return i[3]=e,r(i,"rgba")}function l(t,e,i,a){var o=n(t),s=d(o[0],o[1],o[2]);s[0]+=e,s[1]+=i,s[2]+=a;var h=u(s[0],s[1],s[2]);return r(h,"rgb")}function u(t,e,i){e=Math.min(1,Math.max(0,e)),i=Math.min(1,Math.max(0,i));var n=0,r=0,a=0;if(0===e){n=r=a=255*i+0.5 +}else{var o=6*(t-Math.floor(t)),s=o-Math.floor(o),h=i*(1-e),l=i*(1-e*s),u=i*(1-e*(1-s));switch(Math.floor(o)){case 0:n=255*i+0.5,r=255*u+0.5,a=255*h+0.5;break;case 1:n=255*l+0.5,r=255*i+0.5,a=255*h+0.5;break;case 2:n=255*h+0.5,r=255*i+0.5,a=255*u+0.5;break;case 3:n=255*h+0.5,r=255*l+0.5,a=255*i+0.5;break;case 4:n=255*u+0.5,r=255*h+0.5,a=255*i+0.5;break;case 5:n=255*i+0.5,r=255*h+0.5,a=255*l+0.5}}var c=[];return c.push(Math.floor(n)),c.push(Math.floor(r)),c.push(Math.floor(a)),c}function c(t,e){t=t||"blue",e=e||1; +for(var i=n(t),a=d(i[0],i[1],i[2]),o=[],s=a[0],h=a[1],l=a[2],c=0;e>c;c++){var f=h*(1-c/e),p=l+c*(1-l)/e;o.push(r(u(s,f,p)))}return o}function d(t,e,i){var n,r,a,o=[3],s=t>e?t:e;i>s&&(s=i);var h=e>t?t:e;if(h>i&&(h=i),a=s/255,r=0!==s?(s-h)/s:0,0===r){n=0}else{var l=(s-t)/(s-h),u=(s-e)/(s-h),c=(s-i)/(s-h);n=t==s?c-u:e==s?2+l-c:4+u-l,n/=6,0>n&&(n+=1)}return o[0]=n,o[1]=r,o[2]=a,o}function f(t){return t&&"string"==typeof t&&-1!=t.indexOf("rgba")?n(t)[3]:1}function p(t){return t&&"string"==typeof t&&-1!=t.indexOf("rgba")?f(t):void 0 +}function g(t){return m(t).hex}function m(t){var e,i,a,o,s=r(n(t),"rgba"),h=/rgba?\((\d{1,3}),(\d{1,3}),(\d{1,3})(,([.\d]+))?\)/,l=s.replace(/\s+/g,"").match(h);return e=(+l[1]).toString(16),e=1===e.length?"0"+e:e,i=(+l[2]).toString(16),i=1===i.length?"0"+i:i,a=(+l[3]).toString(16),a=1===a.length?"0"+a:a,o=+(l[5]?l[5]:1),{hex:"#"+e+i+a,alpha:o}}function v(t,i){if(null==t){return{hex:t,alpha:i}}null==i&&(i=1),i=e(parseFloat(i),[0,1]);var n=m(t);return null!=n.alpha&&(i*=n.alpha),{hex:n.hex,alpha:i} +}function _(t){return y[t]}var y={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#0ff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000",blanchedalmond:"#ffebcd",blue:"#00f",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#0ff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgrey:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#f0f",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#789",lightslategrey:"#789",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#0f0",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#f0f",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#f00",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#fff",whitesmoke:"#f5f5f5",yellow:"#ff0",yellowgreen:"#9acd32"},x={},T=[0,0,0,1],b=/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i,A={hasColorName:_,toColor:r,hsb2rgb:u,rgb2hsb:d,createColorsWithHsb:c,getRGBAColorArray:n,mixColorWithHSB:l,getHighLightColor:a,getColorWithDivider:o,mixColorWithAlpha:h,getColorOpacity:f,getColorOpacityWithoutDefault:p,colorToHex:g,colorToHexAlpha:m,getClickColor:s,getStandardColorAndOpacity:v}; +return window.ColorUtils=A,A}),define("Constants",[],function(){return{BLANK_VALUE_PERCENTAGE:"\xa0\xa0",INSTANCES_KEY:"vancharts_index_",SELECT_ANIMATION:"select",UPDATE_EXIT_ENTER_ANIMATION:"update_exit_enter",CHART_HIDE:"vancharts-chart-hide",EXPORT_HIDE:"vancharts-export-hide",SCALE_EXPAND_ANIMATION:"scale_expand",SCALE_MINIFY_ANIMATION:"scale_minify",GEO:"geographic_co_sys",PLANE:"plane_co_sys",BUTTON:"button",CAROUSEL:"carousel",NO_ARROW:"no_arrow",BAR_CHART:"bar",COLUMN_CHART:"column",LINE_CHART:"line",AREA_CHART:"area",PIE_CHART:"pie",MULTIPIE_CHART:"multiPie",TREEMAP_CHART:"treeMap",SCATTER_CHART:"scatter",BUBBLE_CHART:"bubble",FORCE_BUBBLE_CHART:"forceBubble",GANTT_CHART:"gantt",GAUGE_CHART:"gauge",POINTER_GAUGE:"pointer",POINTER_SEMI_GAUGE:"pointer_semi",SLOT_GAUGE:"slot",THERMOMETER_GAUGE:"thermometer",RING_GAUGE:"ring",RADAR_CHART:"radar",COLUMN_RADAR:"columnRadar",LINE_RADAR:"lineRadar",POINT_MAP:"pointMap",AREA_MAP:"areaMap",HEAT_MAP:"heatMap",LINE_MAP:"lineMap",FUNNEL_CHART:"funnel",WORD_CLOUD_CHART:"wordCloud",STRUCTURE_CHART:"structure",MULTI_CHARTS:"multiCharts",LARGE_CHART_TYPE:{line:!0,area:!0,scatter:!0,bubble:!0,pointMap:!0,areaMap:!0},VANCHART:"vanchart",FULL_SCREEN_ICON:"fullScreen",EXPORT_ICON:"toImage",SORT:"sort",MENU_ICON:"vancharts-icon-menu",REFRESH_ICON:"vancharts-icon-refresh",AXIS_GROUP:"vanchart-axis-group",BOTTOM:"bottom",TOP:"top",LEFT:"left",RIGHT:"right",RIGHT_TOP:"right-top",RIGHT_BOTTOM:"right-bottom",LEFT_TO_RIGHT:"left-to-right",RIGHT_TO_LEFT:"right-to-right",BOTTOM_TO_TOP:"bottom-to-top",TOP_TO_BOTTOM:"top-to-botttom",DISORDER:"disorder",DESCENDING:"descending",ASCENDING:"ascending",CIRCLE:"circle",SQUARE:"square",DIAMOND:"diamond",TRIANGLE:"triangle",STAR:"star",LOCATION:"location",CIRCLE_HOLLOW:"circle_hollow",SQUARE_HOLLOW:"square_hollow",DIAMOND_HOLLOW:"diamond_hollow",TRIANGLE_HOLLOW:"triangle_hollow",NORMAL_ICON:"normal-legend-icon",PIE_ICON:"pie-legend-icon",DONUT_ICON:"donut-legend-icon",BUBBLE_ICON:"bubble-legend-icon",SCATTER_ICON:"scatter-legend-icon",TREEMAP_ICON:"treeMap-legend-icon",NULL_MARKER:"null-marker-legend-icon",DASH_TYPE:{Solid:"none",Dash:"8,6"},SAME_ARC:"sameArc",DIFFERENT_ARC:"differentArc",OUTSIDE:"outside",INSIDE:"inside",CENTER:"center",STYLE_GRADUAL:"gradual",HORIZONTAL_LAYOUT:"horizontal",VERTICAL_LAYOUT:"vertical",POLYGON_RADAR:"polygon",CIRCLE_RADAR:"circle",SIZE_BY_AREA:"area",SIZE_BY_WIDTH:"width",GRADUAL_LIGHTER:"lighter",GRADUAL_DARKER:"darker",STATE_TO_DROP:"to-drop",STATE_DROPPED:"dropped",STATE_TO_SHOW:"to-show",STATE_SHOW:"show",EXPONENTIAL:"exponential",LINEAR:"linear",LOGARITHMIC:"logarithmic",POLYNOMIAL:"polynomial",AXIS_ARROW_PATH:{left:"M-10, 0 L-2, 4 L-6, 0 L-2, -4 L-10, 0",right:"M2,-4 L10,0 L2,4 L6,0 L2,-4",up:"M-4,-2 L0,-10 L4,-2 L0,-6 L-4,-2",down:"M-4, 2 L0, 10, L4, 2 L0, 6 L-4, 2"},DIRECTION_LEFT:2,DIRECTION_RIGHT:4,DIRECTION_UP:8,DIRECTION_DOWN:16,STAGES:{NORMAL:0,SELECT:1,KEEP:2,ZOOM:3},EFFECT_KEY:"__effect__",AUTO_REFRESH:"auto_refresh"} +}),define("utils/vMap",["require"],function(t){function e(t,i){if(this._=Object.create(null),t){var n=this;if(t instanceof e){t.forEach(function(t,e){n.set(t,e)})}else{if(Array.isArray(t)){var r,a=-1,o=t.length;if(1===arguments.length){for(;++a-1||"Netscape"===navigator.appName&&navigator.appVersion.indexOf("Edge")>-1,utils.transPrefix="-webkit-transform" in document.body.style?"-webkit-":"-moz-transform" in document.body.style?"-moz-":"-ms-transform" in document.body.style?"-ms-":"",DIV_CONTAINER=document.createElement("div"),document.body.appendChild(DIV_CONTAINER),isSupportSVG())){var t=document.createElement("canvas"); +t.style.cssText="position: absolute; top: -10000px; left: 0; visibility: hidden;",document.body.appendChild(t),CANVAS_CTX=t.getContext("2d"),SVG_CONTAINER=document.createElementNS("http://www.w3.org/2000/svg","svg"),SVG_CONTAINER.style.width=0,SVG_CONTAINER.style.height=0,document.body.appendChild(SVG_CONTAINER);var e=document.createElementNS("http://www.w3.org/2000/svg","text");SVG_CONTAINER.appendChild(e),SVG_CONTAINER._textNode=e,SVG_CONTAINER.style.visibility="hidden"}}function initPaddingScale(t){return t&&t===SCALE?!1:(SCALE=t||1,!0) +}function pick(){for(var t,e=arguments.length,i=0;e>i;i++){if(t=arguments[i],"undefined"!=typeof t&&null!==t){return t}}return null}function isArray(t){return"[object Array]"===Object.prototype.toString.apply(t)}function toArray(t){return Array.prototype.slice.call(t)}function setTextStyle(t,e){e=cssNormalization(e);for(var i in e){t.style(i,e[i])}}function getTextDimension(t,e,i){return isEmpty(t)?{width:0,height:0}:i?_getHtmlTextDim(t,e):isSupportSVG()?e["writing-mode"]?_getSvgTextDim(t,e):_getCanvasTextDim(t,e):_getHtmlTextDim(t,e,!1) +}function getTextWrapDimension(t,e,i){var n=extend({"white-space":"normal",whiteSpace:"normal","word-wrap":"break-word",wordWrap:"break-word"},e);return _getHtmlTextDim(t,n,i)}function _getHtmlTextDim(t,e,i){isSupportSVG()?(DIV_CONTAINER.style.cssText="",DIV_CONTAINER.style.visibility="hidden",DIV_CONTAINER.style.display=""):(DIV_CONTAINER._hide||(DIV_CONTAINER.style.cssText="visibility:hidden;",DIV_CONTAINER._hide=!0),DIV_CONTAINER.style.writingMode="",DIV_CONTAINER.style.width="",DIV_CONTAINER.style.height=""),DIV_CONTAINER.style.whiteSpace="nowrap",DIV_CONTAINER.style.position="absolute"; +for(var n in e){"function"!=typeof e[n]&&"color"!=n&&(DIV_CONTAINER.style[n]=e[n])}i===!1?DIV_CONTAINER.textContent?DIV_CONTAINER.textContent=t:DIV_CONTAINER.innerText=t:DIV_CONTAINER.innerHTML=t;var r=DIV_CONTAINER.offsetWidth||0,a=DIV_CONTAINER.offsetHeight||0,o={width:r,height:a};return isSupportSVG()&&(DIV_CONTAINER.style.display="none"),o}function _getSvgTextDim(t,e){SVG_CONTAINER.style.display="";var i=SVG_CONTAINER._textNode;i.textContent=t,i.style.cssText="";for(var n in e){"function"!=typeof e[n]&&"color"!=n&&(i.style[n]=e[n]) +}var r=i.getBBox(),a={width:r.width,height:r.height};return SVG_CONTAINER.style.display="none",a}function _getCanvasTextDim(t,e){var i=convertREMtoPX(e.fontSize)+"px",n=e.fontStyle||"",r=e.fontWeight||"",a=e.fontFamily||"",o="italic"===n?5:0;CANVAS_CTX.font=n+" "+r+" "+i+' "'+a+'"';var s=CANVAS_CTX.measureText(t).width+o||0,h=getTextHeight(e);return{width:s,height:h}}function getTextBBoxWithRotation(t,e){e=toRadian(e);var i=t.node(),n=t.styles,r="div"===t.type?i.innerHTML:i.textContent,a=isSupportSVG()?_getCanvasTextDim(r,n):_getHtmlTextDim(r,n),o=Math.abs(Math.cos(e)),s=Math.abs(Math.sin(e)),h=a.width,l=a.height; +return{width:h*o+l*s,height:h*s+l*o}}function setDomBackground(t,e){var i=[];if(e.backgroundColor){if("string"==typeof e.backgroundColor){if(isSupportSVG()){i.push("background-Color:"+e.backgroundColor)}else{var n=ColorUtils.colorToHexAlpha(e.backgroundColor);i.push("background-Color:"+n.hex),i.push("filter:alpha(opacity="+100*n.alpha+")")}}else{if("object"==typeof e.backgroundColor){var r=e.backgroundColor,a=ColorUtils.colorToHex(r.startColor),o=ColorUtils.colorToHex(r.endColor),s="left",h="left top",l="right top",u=1; +r.x1==r.x2&&(s="top",h="left top",l="left bottom",u=0),i.push("background: -ms-linear-gradient("+s+", "+a+", "+o+")"),i.push("background-image: -moz-linear-gradient("+s+", "+a+", "+o+")"),i.push("background-image: -webkit-gradient(linear, "+h+", "+l+", color-stop(0, "+a+"), color-stop(1, "+o+"))"),i.push("filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="+a+", endColorstr="+o+", GradientType="+u+")")}}}e.backgroundImage&&(i.push("background-image:url("+e.backgroundImage+")"),i.push("background-size:100% 100%")),null!=e.borderWidth&&(i.push("border-style:solid"),i.push("border-width:"+e.borderWidth+"px")),null!=e.borderColor&&i.push("border-color:"+e.borderColor),null!=e.borderRadius&&(i.push("border-radius:"+e.borderRadius+"px"),i.push("-moz-border-radius:"+e.borderRadius+"px"),i.push("-webkit-border-radius:"+e.borderRadius+"px"),i.push("-o-border-radius:"+e.borderRadius+"px")),e.shadow&&i.push("box-shadow:1px 1px 2px rgba(0,0,0,0.2)"),t.style.cssText+=i.join(";")+";" +}function getTextHeight(t){var e=t.fontSize||"0.75rem";return convertREMtoPX(e)}function stamp(t){return t._vanchart_id=t._vanchart_id||"vancharts"+ ++lastID,t._vanchart_id}function extend(t){var e,i,n,r;for(i=1,n=arguments.length;n>i;i++){r=arguments[i];for(e in r){t[e]=r[e]}}return t}function domRotate(t,e){var i=[];i.push("transform:rotate("+e+"deg)"),i.push("-ms-transform:rotate("+e+"deg)"),i.push("-webkit-transform:rotate("+e+"deg)"),i.push("-moz-transform:rotate("+e+"deg)"),i.push("-o-transform:rotate("+e+"deg)"); +var n=Math.cos(toRadian(e)),r=Math.sin(toRadian(e));if(!isSupportSVG()){var a=e?["progid:DXImageTransform.Microsoft.Matrix(M11=",n,", M12=",-r,", M21=",r,", M22=",n,", sizingMethod='auto expand')"].join(""):"none";i.push("filter:"+a)}t.style.cssText+=i.join(";")+";"}function splitText(t,e,i,n,r){if(!t){return[]}t+="",n=n||0,i-=2*n;for(var a=[],o=0,s=t.length;s>o;){for(var h=o;getTextDimension(t.substring(h,o+1),e,!1).width=s));){}if(h==o){return["..."]}var l=t.substring(h,o);if(0==r&&o!=s&&o-1>h){var u=t.charAt(o-1),c=t.charAt(o); +if(/[A-Za-z]/.test(u)&&/[A-Za-z]/.test(c)){var d=t.charAt(o-2);l=t.substring(h,o-1),o--," "!==d&&"-"!==d&&(l+="-")}}a.push(l)}return a}function getTextDimensionWithRotation(t,e,i,n){var r=getTextDimension(t,e,i);return getTextDimRotated(r,n)}function getTextDimRotated(t,e){var i=Math.abs(toRadian(e||0)),n=t.width*Math.cos(i)+t.height*Math.sin(i),r=t.width*Math.sin(i)+t.height*Math.cos(i);return{width:n,height:r}}function clone(t){if("object"==typeof t&&null!==t){var e=t;if(isArray(t)){e=[];for(var i=0,n=t.length; +n>i;i++){e[i]=clone(t[i])}}else{e={};for(var r in t){t.hasOwnProperty(r)&&(e[r]=clone(t[r]))}}return e}return t}function cssNormalization(t){var e={};for(var i in t){if(styleToCss[i]&&(e[styleToCss[i]]=t[i]),"color"==i&&(e.color=t[i]),"fontSize"==i){var n=t[i];-1!=n.indexOf("pt")&&(n=4*parseFloat(n)/3,e["font-size"]=n+"px")}}return e}function reformCssArray(t){if(!(t instanceof Array)){return[t,t,t,t]}switch(t.length+""){case"4":return t;case"3":return[t[0],t[1],t[2],t[1]];case"2":return[t[0],t[1],t[0],t[1]]; +case"1":return[t[0],t[0],t[0],t[0]];case"0":return[0,0,0,0]}}function lineSubPixelOpt(t,e){return e%2===0?Math.round(t):Math.round(t-0.5)+0.5}function rectSubPixelOpt(){var t,e,i,n,r;return 2===arguments.length?(t=arguments[0].x,e=arguments[0].y,i=arguments[0].width,n=arguments[0].height,r=arguments[1]):(t=arguments[0],e=arguments[1],i=arguments[2],n=arguments[3],r=arguments[4]),r=r||0,t=lineSubPixelOpt(t,r),e=lineSubPixelOpt(e,r),i=lineSubPixelOpt(i,r),n=lineSubPixelOpt(n,r),{x:t,y:e,width:i,height:n} +}function addArray(t,e){var i=[];if(t&&t.length){for(var n=0,r=t.length;r>n;n++){i.push(t[n])}}if(e&&e.length){for(var n=0,r=e.length;r>n;n++){i.push(e[n])}}return i}function toFront(t){t&&t.parentNode&&t.parentNode.appendChild(t)}function toBack(t){t&&t.parentNode&&t.parentNode.insertBefore(t,t.parentNode.firstChild)}function toFrontOfAll(t){t.ownerSVGElement.appendChild(t)}function toBackOfAll(t){t.ownerSVGElement.appendChild(t,t.ownerSVGElement.firstChild)}function containsRect(t,e){return t.x<=e.x&&t.y<=e.y&&t.x+t.width>=e.x+e.width&&t.y+t.height>=e.y+e.height +}function rectangleOverlapped(t,e){if(!t||!e){return !1}var i=Math.max(t.x,e.x),n=Math.max(t.y,e.y),r=Math.min(t.x+t.width,e.x+e.width),a=Math.min(t.y+t.height,e.y+e.height);return r>=i&&a>=n}function outsideRect(t,e){return !containsRect(t,e)&&!rectangleOverlapped(t,e)}function containsPoint(t,e){if(!t||!e){return !1}var i=pick(e.x||e[0]),n=pick(e.y||e[1]);return t.xi&&t.yn}function isSupportSVG(){return !!window.SVGSVGElement}function makeValueInRange(t,e,i){var n=Math.min(t,e),r=Math.max(t,e),a=r-n; +return((i-n)%a+a)%a+n}function getValueInDomain(t,e){return Math.min(Math.max(t,e[0]),e[1])}function toRadian(t){return Math.PI*(t/180)}function toDegree(t){return 180*t/Math.PI}function getFormatterFunction(formatter){if(null==formatter||""===formatter){return null}if("string"==typeof formatter){var formatterFunc=new Function("return "+formatter)();return"string"==typeof formatterFunc?(eval("var _tmpFunc = "+formatterFunc),_tmpFunc):formatterFunc}return formatter}function format(t,e){e&&e.match&&e.match(/D/)&&(t=isEmpty(t)||isNaN(t)?t:+t),e=getFormatterFunction(e); +try{return"function"==typeof e?e.bind(t)(t):t}catch(i){return t}}function clone(t){if(null==t||"object"!=typeof t){return t}if(t instanceof Date){var e=new Date;return e.setTime(t.getTime()),e}if(t instanceof Array){for(var e=[],i=0,n=t.length;n>i;++i){e[i]=clone(t[i])}return e}if(t instanceof String){return t+""}if(t instanceof Object){var e={};for(var r in t){t.hasOwnProperty(r)&&(e[r]=clone(t[r]))}return e}}function isEmpty(t){var e=""===t||null===t||void 0===t;return e}function isNull(t){return void 0==t||null==t +}function isIE(){return window.ActiveXObject||"ActiveXObject" in window?!0:!1}function hasNotDefined(t){return null===t||void 0===t}function hasDefined(t){return !hasNotDefined(t)}function makeBounds(){var t=0,e=0,i=0,n=0;if(2===arguments.length){var r=arguments[0],a=arguments[1];t=pick(r.x,r[0]),e=pick(r.y,r[1]),i=pick(a.width,a[0]),n=pick(a.height,a[1])}else{4===arguments.length&&(t=arguments[0],e=arguments[1],i=arguments[2],n=arguments[3])}return{x:t,y:e,width:i,height:n}}function distance(t,e){var i=pick(t.x,t[0]),n=pick(t.y,t[1]),r=pick(e.x,e[0]),a=pick(e.y,e[1]),o=i-r,s=n-a; +return Math.sqrt(o*o+s*s)}function isEmptyBounds(t){return t.width<=0||t.height<=0}function log(t,e){return accDiv(newMathLog(e),newMathLog(t))}function newMathLog(t){return 1>t?-Math.log(accDiv(1,t)):Math.log(t)}function getOrder(t){var e=0;if(t>0&&1>t){for(;1>t;){t=accMul(t,10),e--}}else{if(t>=10){for(;t>=10;){t=accDiv(t,10),e++}}}return e}function getPercentValue(t,e){return t?(t+="",-1!=t.indexOf("%")&&(t=parseFloat(t)*e/100),parseFloat(t)):0}function getDecimalPlaces(t){var e=(t+"").match(decimalPlacesRegExp); +return e?(e[1]?e[1].length:0)+(+e[2]||0):0}function accAdd(t,e){if(t%1===0&&e%1===0){return t+e}var i=getDecimalPlaces(t),n=getDecimalPlaces(e),r=Math.pow(10,Math.max(i,n));return(t*r+e*r)/r}function accDiv(t,e){if(t%1===0&&e%1===0){return t/e}var i=t+"",n=e+"",r=-getDecimalPlaces(t);r+=getDecimalPlaces(e);var a=i.replace(decimalRegExp,""),o=n.replace(decimalRegExp,"");return r>0?a/o*Math.pow(10,r):a/o/Math.pow(10,-r)}function accMul(t,e){if(t%1===0&&e%1===0){return t*e}var i=t+"",n=e+"",r=getDecimalPlaces(t); +return r+=getDecimalPlaces(e),i.replace(decimalRegExp,"")*n.replace(decimalRegExp,"")/Math.pow(10,r)}function niceValue(t,e){t=+t,e=e-1||4;var i=t/e,n=0>t;i=Math.abs(i),t=Math.abs(t);var r=parseInt(Math.log(i)/Math.log(10));if(!isFinite(r)){return t}var a=Math.pow(10,r);i!==a&&(r+=1,a=Math.pow(10,r));var o=i/a,s=[0.1,0.2,0.25,0.5,1];s.some(function(t){return t>o?(o=t,!0):void 0}),o=accMul(o,Math.pow(10,r));var h=o*e;return n?-1*h:h}function objectToArray(t){if(t.length){return[].slice.call(t)}var e=[]; +for(var i in t){e.push(t[i])}return e}function date2int(t){if(null==t){return null}"string"==typeof t&&(t=new Date(Date.parse(t.replace(/-|\./g,"/"))));var e=new Date("1970-01-01");return"number"==typeof t?t:t.getTime()-e.getTime()}function int2date(t){var e=new Date("1970-01-01");return t=t||0,new Date(t+e.getTime())}function object2date(t){if(!t){return new Date(void 0)}var e=t;return"string"==typeof e?(e=new Date(Date.parse(e.replace(/[-\/|\.]/g,DATE_DELIMITER))),("Invalid Date"==e||"NaN"==e)&&FR&&FR.str2Date&&(e=FR.str2Date(t,"yyyy-MM-dd HH:mm:ss"))):"number"==typeof e&&(e=new Date(e)),e +}function makeTranslate(t){var e=pick(t.x,t[0]),i=pick(t.y,t[1]);return"translate("+e+","+i+")"}function makeTranslateWithPX(t){var e=pick(t.x,t[0]),i=pick(t.y,t[1]);return"translate("+e+"px,"+i+"px)"}function makeTranslate3d(t){var e=pick(t.x,t[0]),i=pick(t.y,t[1]),n=pick(t.z,t[2],0);return"translate3d("+e+"px,"+i+"px,"+n+"px)"}function isImageMarker(t){var e=Constants.LOCATION+Constants.STAR+Constants.CIRCLE+Constants.SQUARE+Constants.DIAMOND+Constants.TRIANGLE+Constants.CIRCLE_HOLLOW+Constants.SQUARE_HOLLOW+Constants.DIAMOND_HOLLOW+Constants.TRIANGLE_HOLLOW; +return -1==e.indexOf(t)&&hasDefined(t)}function isNullMarker(t){return hasNotDefined(t.symbol)}function getDefaultMarkerSymbol(t){var e=[Constants.CIRCLE,Constants.CIRCLE_HOLLOW,Constants.SQUARE,Constants.SQUARE_HOLLOW,Constants.DIAMOND,Constants.DIAMOND_HOLLOW,Constants.TRIANGLE,Constants.TRIANGLE_HOLLOW];return e[t%e.length]}function splitWords(t){return t=t.trim?t.trim():t.replace(/^\s+|\s+$/g,""),t.split(/\s+/)}function trim(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function removeEvent(t,e,i){t.removeEventListener?t.removeEventListener(e,i,!1):t.attachEvent&&t.detachEvent("on"+e,i) +}function dealFloatPrecision(t){return Math.abs(t)<0.000001?0:t}function getDomWidth(t){var e=t.currentStyle||document.defaultView.getComputedStyle(t);return((t.clientWidth||parseInt(e.width,10))-parseInt(e.paddingLeft,10)-parseInt(e.paddingRight,10)).toFixed(0)-0}function getDomHeight(t){var e=t.currentStyle||document.defaultView.getComputedStyle(t);return((t.clientHeight||parseInt(e.height,10))-parseInt(e.paddingTop,10)-parseInt(e.paddingBottom,10)).toFixed(0)-0}function hasTouch(){var t=window.document; +return t&&void 0!==t.documentElement.ontouchstart}function getArcPoint(t,e){return[t*Math.sin(e),-t*Math.cos(e)]}function getArcByPoint(t,e){return(2*Math.PI-(Math.atan2(e,t)-Math.PI/2))%(2*Math.PI)}function calculateAutoMinMaxAndGap(t,e,i){t>e&&(t=0,e=100);var n=accAdd(e,-t),r=getOrder(n),a=Math.pow(10,r);0>=r?(t=accMul(t,Math.pow(10,1-r)),t=accDiv(Math.floor(t),Math.pow(10,1-r))):t=Math.floor(t/a)*a;for(var o=accMul(accDiv(i,10),a),s=0;n>s;){s=accAdd(o,s)}for(var h=accDiv(s,i);e>t+h*i;){s=accAdd(o,s),h=accDiv(s,i) +}return s=accDiv(s,i),e=accAdd(t,accMul(s,i)),[t,e,s]}function indexOf(t,e){for(var i=0;ii?-1:1,u=l*h/Math.tan(a),c=Math.atan((e-n)/(i-t)),d=u*Math.sin(c),f=u*Math.cos(c),p=(t+i)/2,g=(e+n)/2,m=p+d,v=g+f,_=t-m,y=e-v,x=i-m,T=n-v,b=normalRadian(Math.atan2(y,_)),A=normalRadian(Math.atan2(T,x)); +return b>A&&(A+=DOUBLE_PI),[m,v,h/r,b,A]}function normalRadian(t){return t%=DOUBLE_PI,0>t&&(t+=DOUBLE_PI),t}function formatNum(t,e){var i=Math.pow(10,e||5);return Math.round(t*i)/i}function wrapNum(t,e,i){var n=e[1],r=e[0],a=n-r;return t===n&&i?t:((t-r)%a+a)%a+r}function bind(t,e){var i=Array.prototype.slice;if(t.bind){return t.bind.apply(t,i.call(arguments,1))}var n=i.call(arguments,2);return function(){return t.apply(e,n.length?n.concat(i.call(arguments)):arguments)}}function getParamString(t,e,i){var n=[]; +for(var r in t){n.push(encodeURIComponent(i?r.toUpperCase():r)+"="+encodeURIComponent(t[r]))}return(e&&-1!==e.indexOf("?")?"&":"?")+n.join("&")}function template(t,e){return t.replace(templateRe,function(t,i){var n=e[i];if(void 0===n){throw new Error("No value provided for variable "+t)}return"function"==typeof n&&(n=n(e)),n})}function setOptions(t,e){t.hasOwnProperty("options")||(t.options=t.options?Object.create(t.options):{});for(var i in e){t.options[i]=e[i]}return t.options}function createOptions(t,e){return e.forEach(function(e){if(e){for(var i in e){hasNotDefined(t[i])&&!skipKeys[i]&&(t[i]=e[i]) +}}}),t}function getPrefixed(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}function timeoutDefer(t){var e=+new Date,i=Math.max(0,16-(e-lastTime));return lastTime=e+i,Browser.phantomjs?window.setTimeout(t,i):$T.setTimeout(t,i)}function requestAnimFrame(t,e,i){return i&&requestFn===timeoutDefer?void t.call(e):requestFn.call(window,bind(t,e))}function cancelAnimFrame(t){t&&cancelFn.call(window,t)}function throttle(t,e,i){var n,r,a,o,s;return o=function(){n=!1,r&&(a.apply(i,r),r=!1)},a=function(){n?r=arguments:(t.apply(i,arguments),s=setTimeout(o,e),n=!0) +},a.cancel=function(){clearTimeout(s),n=r=!1},a}function rebind(t,e){for(var i,n=1,r=arguments.length;++n0?",":"")+'"'+t[i]+'"'}return e+"]"}function decodeCategoryArray(categoryArrayStr){return window.JSON?JSON.parse(categoryArrayStr):eval("("+categoryArrayStr+")")}var Browser=require("../dom/Browser"),ColorUtils=require("./ColorUtils"),Constants=require("../Constants"),vMap=require("./vMap"),templateRe=/\{ *([\w_\-]+) *\}/g,DIV_CONTAINER,SVG_CONTAINER,CANVAS_CTX,lastID=0,DOUBLE_PI=2*Math.PI,decimalPlacesRegExp=/(?:\d+)(?:\.(\d+))?(?:[eE]-(\d+))?/,decimalRegExp=/\.|[eE]-\d+/g,skipKeys={minSize:!0,maxSize:!0,name:!0},SCALE=1,DATE_DELIMITER=Browser.phantomjs?"-":"/",styleToCss={color:"fill",font:"font",fontFamily:"font-family",fontSize:"font-size",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",letterSpacing:"letter-spacing",lineHeight:"line-height",quotes:"quotes",textAlign:"text-align",textDecoration:"text-decoration",textIndent:"text-indent",textShadow:"text-shadow",textTransform:"text-transform",whiteSpace:"white-space",wordSpacing:"word-spacing",padding:"padding"},$T={setTimeout:window.setTimeout,clearTimeout:window.clearTimeout,setInterval:window.setInterval,clearInterval:window.clearInterval,requestAnimationFrame:window.requestAnimationFrame||getPrefixed("RequestAnimationFrame"),cancelAnimationFrame:window.cancelAnimationFrame||getPrefixed("CancelAnimationFrame")||getPrefixed("CancelRequestAnimationFrame")}; +for(var k in $T){$T.hasOwnProperty(k)&&$T[k]&&$T[k].bind&&($T[k]=$T[k].bind(window))}!function(){function t(){n=!1}function e(){if(!n){n=!0;for(var t=-1;++t=e&&(t.call(),n=(new Date).getTime())}var n=(new Date).getTime(),r={};return r.value=d(i),r},$T.clearInterval=o?function(t){t&&o(t.value)}:function(t){t&&s(t.value)},Browser.phantomjs&&($T.setTimeout=window.setTimeout) +}();var lastTime=0,requestFn=$T.requestAnimationFrame||timeoutDefer,cancelFn=$T.cancelAnimationFrame||function(t){$T.clearTimeout(t)};d3_dispatch.prototype.on=function(t,e){var i=t.indexOf("."),n="";if(i>=0&&(n=t.slice(i+1),t=t.slice(0,i)),t){return arguments.length<2?this[t].on(n):this[t].on(n,e)}if(2===arguments.length){if(null==e){for(t in this){this.hasOwnProperty(t)&&this[t].on(n,null)}}return this}};var utils={dispatch:dispatch,rebind:rebind,throttle:throttle,requestAnimFrame:requestAnimFrame,cancelAnimFrame:cancelAnimFrame,getParamString:getParamString,template:template,setOptions:setOptions,createOptions:createOptions,formatNum:formatNum,wrapNum:wrapNum,bind:bind,initConst:initConst,initPaddingScale:initPaddingScale,toPng:toPng,getDomWidth:getDomWidth,getDomHeight:getDomHeight,makeTranslate:makeTranslate,makeTranslateWithPX:makeTranslateWithPX,makeTranslate3d:makeTranslate3d,clone:clone,date2int:date2int,int2date:int2date,object2date:object2date,log:log,getOrder:getOrder,getPercentValue:getPercentValue,accAdd:accAdd,accDiv:accDiv,accMul:accMul,dealFloatPrecision:dealFloatPrecision,niceValue:niceValue,isEmpty:isEmpty,isEmptyBounds:isEmptyBounds,objectToArray:objectToArray,toArray:toArray,pick:pick,isNull:isNull,getTextDimension:getTextDimension,getTextHeight:getTextHeight,splitText:splitText,getTextDimensionWithRotation:getTextDimensionWithRotation,getTextDimRotated:getTextDimRotated,isArray:isArray,indexOf:indexOf,cssNormalization:cssNormalization,reformCssArray:reformCssArray,rectSubPixelOpt:rectSubPixelOpt,lineSubPixelOpt:lineSubPixelOpt,addArray:addArray,toFront:toFront,toBack:toBack,toFrontOfAll:toFrontOfAll,toBackOfAll:toBackOfAll,containsRect:containsRect,rectangleOverlapped:rectangleOverlapped,outsideRect:outsideRect,containsPoint:containsPoint,isSupportSVG:isSupportSVG,setTextStyle:setTextStyle,domRotate:domRotate,makeValueInRange:makeValueInRange,getValueInDomain:getValueInDomain,toRadian:toRadian,toDegree:toDegree,getFormatterFunction:getFormatterFunction,format:format,isIE:isIE,hasTouch:hasTouch,hasNotDefined:hasNotDefined,hasDefined:hasDefined,distance:distance,makeBounds:makeBounds,isImageMarker:isImageMarker,isNullMarker:isNullMarker,getDefaultMarkerSymbol:getDefaultMarkerSymbol,removeEvent:removeEvent,getArcPoint:getArcPoint,getTextWrapDimension:getTextWrapDimension,stamp:stamp,splitWords:splitWords,trim:trim,extend:extend,setDomBackground:setDomBackground,getArcByPoint:getArcByPoint,calculateAutoMinMaxAndGap:calculateAutoMinMaxAndGap,hasChn:hasChn,convertREMtoPX:convertREMtoPX,paddingConvertWithScale:paddingConvertWithScale,getDefaultFontSize:getDefaultFontSize,convertToREMUseDefault16PX:convertToREMUseDefault16PX,getComputedStyle:getComputedStyle,camelCase:camelCase,getPlainText:getPlainText,computeArc:computeArc,normalRadian:normalRadian,bindData:bindData,falseFn:falseFn,trueFn:trueFn,emptyFn:emptyFn,calculateFontSizeWithScale:calculateFontSizeWithScale,decodeCategoryArray:decodeCategoryArray,encodeCategoryArray:encodeCategoryArray,getTextBBoxWithRotation:getTextBBoxWithRotation,_mutateMobileFlowFontStyle:_mutateMobileFlowFontStyle,setTimeout:$T.setTimeout,clearTimeout:$T.clearTimeout,setInterval:$T.setInterval,clearInterval:$T.clearInterval,requestAnimationFrame:$T.requestAnimationFrame,cancelAnimationFrame:$T.cancelAnimationFrame}; +return window.VanUtils=utils,utils}),define("utils/QueryUtils",["require"],function(t){function e(t,e){if(t&&t.length&&e){for(var i=0;it;t++){r._initHooks[t].call(this)}}},e},e.include=function(t){return i.extend(this.prototype,t),this},e.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),i="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i),this},e}),define("dom/Evented",["require","../utils/BaseUtils","../utils/Class"],function(t){var e=t("../utils/BaseUtils"),i=t("../utils/Class"),n=i.extend({on:function(t,i,n){if("object"==typeof t){for(var r in t){this._on(r,t[r],i) +}}else{t=e.splitWords(t);for(var a=0,o=t.length;o>a;a++){this._on(t[a],i,n)}}return this},off:function(t,i,n){if(t){if("object"==typeof t){for(var r in t){this._off(r,t[r],i)}}else{t=e.splitWords(t);for(var a=0,o=t.length;o>a;a++){this._off(t[a],i,n)}}}else{delete this._events}return this},_on:function(t,e,i){if(t&&e){this._events=this._events||{};var n=this._events[t];n||(n=[],this._events[t]=n),i===this&&(i=void 0);for(var r={fn:e,ctx:i},a=n,o=0,s=a.length;s>o;o++){if(a[o].fn===e&&a[o].ctx===i){return +}}a.push(r),n.count++}},_off:function(t,i,n){var r,a,o;if(this._events&&(r=this._events[t])){if(!i){for(a=0,o=r.length;o>a;a++){r[a].fn=e.falseFn}return void delete this._events[t]}if(n===this&&(n=void 0),r){for(a=0,o=r.length;o>a;a++){var s=r[a];if(s.ctx===n&&s.fn===i){return s.fn=e.falseFn,this._firingCount&&(this._events[t]=r=r.slice()),void r.splice(a,1)}}}}},fire:function(t,e,i){if(!this.listens(t,i)){return this}var n=e;if(this._events){var r=this._events[t];if(r){this._firingCount=this._firingCount+1||1; +for(var a=0,o=r.length;o>a;a++){var s=r[a];s.fn.call(s.ctx||this,n)}this._firingCount--}}return i&&this._propagateEvent(n),this},listens:function(t,e){var i=this._events&&this._events[t];if(i&&i.length){return !0}if(e){for(var n in this._eventParents){if(this._eventParents[n].listens(t,e)){return !0}}}return !1},once:function(t,i,n){if("object"==typeof t){for(var r in t){this.once(r,t[r],i)}return this}var a=e.bind(function(){this.off(t,i,n).off(t,a,n)},this);return this.on(t,i,n).on(t,a,n)},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[e.stamp(t)]=t,this +},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[e.stamp(t)],this},_propagateEvent:function(t){for(var e in this._eventParents){this._eventParents[e].fire(t.srcEvent.type,t,!0)}}});return n}),define("ComponentLibrary",[],function(){function t(t){return n[t]}function e(t,e){n[t]=e}function i(){return n}var n=Object.create(null),r=["tooltip","tools","title","dTools","geo","rangeLegend","legend","zoom","dataSheet","xAxis","yAxis","polar","angleAxis","radiusAxis","gaugeAxis","value","category","multiCategory","datetime","levelBar","processes","timeAxis","moreLabel","crossLine","plotScroll","pieIndicator"]; +return{TOOLTIP_COMPONENT:"tooltip",TOOLBAR_COMPONENT:"tools",GEO_COMPONENT:"geo",DRILL_TOOLS:"dTools",TITLE_COMPONENT:"title",RANGE_LEGEND_COMPONENT:"rangeLegend",INTERVAL_RANGE_LEGEND:"intervalRangeLegend",GradientRangeLegend:"gradientRangeLegend",LEGEND_COMPONENT:"legend",DATA_SHEET_COMPONENT:"dataSheet",ZOOM_COMPONENT:"zoom",X_AXIS_COMPONENT:"xAxis",Y_AXIS_COMPONENT:"yAxis",POLAR_COMPONENT:"polar",RADIUS_AXIS_COMPONENT:"radiusAxis",ANGLE_AXIS_COMPONENT:"angleAxis",GAUGE_AXIS_COMPONENT:"gaugeAxis",VALUE_AXIS_COMPONENT:"value",CATEGORY_AXIS_COMPONENT:"category",DATE_AXIS_COMPONENT:"datetime",LEVELBAR:"levelBar",PROCESSES:"processes",TIMEAXIS:"timeAxis",MORELABEL_COMPONENT:"moreLabel",MULTI_CATEGORY_AXIS_COMPONENT:"multiCategory",CROSS_LINE:"crossLine",PLOT_SCROLL:"plotScroll",PIE_INDICATOR:"pieIndicator",ComponentsOrder:r,getRegisteredComponents:i,get:t,register:e} +}),define("utils/BoundsManager",["require","./BaseUtils"],function(t){function e(){this.addedBounds=[]}var i=t("./BaseUtils");return e.prototype={constructor:e,addBounds:function(t){this.addedBounds.push(t)},isValidBounds:function(t){return t.width>0&&t.height>0},isOverlapped:function(t){for(var e=0,n=this.addedBounds.length;n>e;e++){if(i.rectangleOverlapped(t,this.addedBounds[e])){return !0}}return !1},isEmpty:function(){return 0===this.addedBounds.length}},e}),define("utils/BezierEasing",["require","./vMap"],function(t){function e(t,e){return 1-3*e+3*t +}function i(t,e){return 3*e-6*t}function n(t){return 3*t}function r(t,r,a){return((e(r,a)*t+i(r,a))*t+n(r))*t}function a(t,r,a){return 3*e(r,a)*t*t+2*i(r,a)*t+n(r)}function o(t,e,i,n,a){var o,s,h=0;do{s=e+(i-e)/2,o=r(s,n,a)-t,o>0?i=s:e=s}while(Math.abs(o)>L&&++ho;++o){var s=a(n,t,i);if(0===s){return n}var h=r(n,t,i)-e;n-=h/s}return n}function h(){for(var e=0;P>e;++e){d[e]=r(e*w,t,i)}}function l(e){for(var n=0,r=1,h=P-1;r!=h&&d[r]<=e;++r){n+=w +}--r;var l=(e-d[r])/(d[r+1]-d[r]),u=n+l*w,c=a(u,t,i);return c>=C?s(e,u):0===c?u:o(e,n,n+w,t,i)}function u(){f=!0,(t!=e||i!=n)&&h()}if(4!==arguments.length){throw new Error("BezierEasing requires 4 arguments.")}for(var c=0;4>c;++c){if("number"!=typeof arguments[c]||isNaN(arguments[c])||!isFinite(arguments[c])){throw new Error("BezierEasing arguments should be integers.")}}if(0>t||t>1||0>i||i>1){throw new Error("BezierEasing x values must be in [0, 1] range.")}var d=S?new Float32Array(P):[],f=!1,p=function(a){return f||u(),t===e&&i===n?a:0===a?0:0.001>1-a?1:r(l(a),e,n) +};p.getControlPoints=function(){return[{x:t,y:e},{x:i,y:n}]};var g=[t,e,i,n],m="BezierEasing("+g+")";return p.toString=function(){return m},p}function h(t){return function(e){return 0>=e?0:e>=1?1:t(e)}}function l(t){return function(e){return 1-t(1-e)}}function u(t){return function(e){return 0.5*(0.5>e?t(2*e):2-t(2-2*e))}}function c(t){return t*t}function d(t){return t*t*t}function f(t){return function(e){return Math.pow(e,t)}}function p(t){return 1-Math.cos(t*T)}function g(t){return Math.pow(2,10*(t-1)) +}function m(t){return 1-Math.sqrt(1-t*t)}function v(t,e){var i;return arguments.length<2&&(e=0.45),arguments.length?i=e/E*Math.asin(1/t):(t=1,i=e/4),function(n){return 1+t*Math.pow(2,-10*n)*Math.sin((n-i)*E/e)}}function _(t){return t||(t=1.70158),function(e){return e*e*((t+1)*e-t)}}function y(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+0.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+0.9375:7.5625*(t-=2.625/2.75)*t+0.984375}var x=t("./vMap"),T=Math.PI/2,b=this,A=4,C=0.001,L=1e-7,M=10,P=11,w=1/(P-1),S="Float32Array" in b; +s.css={ease:s(0.25,0.1,0.25,1),linear:s(0,0,1,1),"ease-in":s(0.42,0,1,1),"ease-out":s(0,0,0.58,1),"ease-in-out":s(0.42,0,0.58,1),swing:s(0.02,0.01,0.47,1),"ease-in-back":s(0.6,-0.28,0.735,0.045),"ease-out-back":s(0.175,0.885,0.32,1.275),"ease-in-quart":s(0.895,0.03,0.685,0.22),"ease-out-quart":s(0.165,0.84,0.44,1),"ease-in-quint":s(0.755,0.05,0.855,0.06),"ease-out-quint":s(0.23,1,0.32,1),"ease-in-quad":s(0.55,0.085,0.68,0.53),"ease-out-quad":s(0.25,0.46,0.45,0.94),"ease-in-out-quad":s(0.455,0.03,0.515,0.955),"ease-out-cubic":s(0.215,0.61,0.355,1)},s.custom={"ease-out":s(0,0,0.16,1.03),"ease-out-quint":s(0.19,1,0.22,1),"ease-out-back":s(0.18,0.89,0.32,1.6)},s.calculateCubicOutT=function(t){return 1-Math.pow(1-t,1/3) +},s.calculateQuadInT=function(t){return Math.sqrt(t)};var E=2*Math.PI,O=function(t){return t},R=function(){return O},k=new x({linear:R,poly:f,quad:function(){return c},cubic:function(){return d},sin:function(){return p},exp:function(){return g},circle:function(){return m},elastic:v,back:_,bounce:function(){return y}}),D=new x({"in":O,out:l,"in-out":u,"out-in":function(t){return u(l(t))}});return s.ease=function(t){var e=t.indexOf("-"),i=e>=0?t.slice(0,e):t,n=e>=0?t.slice(e+1):"in";return i=k.get(i)||R,n=D.get(n)||O,h(n(i.apply(null,Array.prototype.slice.call(arguments,1)))) +},s}),define("vans/VanChartLayout",["require","../Constants","../utils/BaseUtils","../ComponentLibrary","../utils/BoundsManager","../utils/BezierEasing","../utils/QueryUtils"],function(t){function e(t,e){var i=!e;a(t),o(t.seriesOfType(g.WORD_CLOUD_CHART)),i&&(s(t,t.seriesOfType(g.BUBBLE_CHART),g.BUBBLE_CHART),s(t,t.seriesOfType(g.SCATTER_CHART),g.SCATTER_CHART),h(t.seriesOfType(g.BUBBLE_CHART)),h(t.seriesOfType(g.FORCE_BUBBLE_CHART)))}function i(t){for(var e=0,i=t.series.length;i>e;e++){var n=t.series[e]; +n.visible&&(n.doLayout(),n._calculateLabelPos())}var a=new _;for(var o in t.cateMap){var s=t.cateMap[o].filter(function(t){var e=t.series.type,i=e===g.BAR_CHART||e===g.COLUMN_CHART||e===g.AREA_CHART||e===g.LINE_CHART;return t.labelPos&&t.options.dataLabels.autoAdjust&&i});if(s.length){var h=t.baseAxis()&&t.baseAxis().isHorizontal(),l=h?"y":"x";s=s.sort(function(t,e){return t.labelPos[l]-e.labelPos[l]+1});var u=h?s[0].labelPos.y<0:s[0].labelPos.x<0;u&&s.reverse();for(var e=s.length-1;e>=0;e--){var c=s[e]; +c.labelPos=c.series._calculateAutoLabelPos(c,c.labelPos,h,a,u),a.addBounds(m.makeBounds(c.labelPos,c.labelDim))}}}if(t.isMobileFlow()){for(var a=new _,e=0,i=t.series.length;i>e;e++){var n=t.series[e];n.visible&&n.points.forEach(function(t){if(t.labelPos){var e=n.getAbsoluteLabelPos(t.labelPos),i=m.makeBounds(e,t.labelDim);a.isOverlapped(i)?t.labelPos=null:a.addBounds(i)}})}}r(t.seriesOfType(g.PIE_CHART))}function n(t){e(t),c(t)}function r(t){var e=[],i=t.reduce(function(t,i){return i.options.radius||e.push(i),t?Math.min(t,i.chartInfo.radius):i.chartInfo.radius +},0);e.map(function(t){t.adjustRadius(i)})}function a(t){for(var e={},i=t.series,n=0,r=i.length;r>n;n++){var a=i[n],o=a.type;if(!a.isTreeSeries()&&o!=g.WORD_CLOUD_CHART){if(a.isSeriesAccumulated()){if(a._calculatePercentage){a._calculatePercentage()}else{var s=a.getTargetKey();u(a.points,s),l(a.points,s)}}else{a.visible&&a.points.map(function(t){var i=[o,a.stack,t.getCategory()].join("-");e[i]||(e[i]=[]),e[i].push(t)})}}}for(var h in e){var c=e[h],s=c[0].series.getTargetKey();u(c,s),l(c,s)}for(var n=0,r=i.length; +r>n;n++){var d=i[n];d.points.forEach(function(t){d.calculateLabelInfo(t)})}}function o(t){if(t&&t.length){var e=[];t.forEach(function(t){e=e.concat(t.points)}),u(e,t[0].getTargetKey())}}function s(t,e,i){var n,r;if(i==g.BUBBLE_CHART){r="swing",n=function(t,e){return e.radius-t.radius}}else{if(i==g.SCATTER_CHART){var a=t.isInverted();r="exp-in-out",n=function(t,e){return a?t.posY-e.posY:t.posX-e.posX}}}var o=[];e.forEach(function(t){o=o.concat(t.points)}),o.sort(n);var s=o.length;s>0&&o.forEach(function(t,e){t.delayTime=800*y.ease(r)(e/s) +})}function h(t){t.forEach(function(t){t._calculateMinMax4Radius()}),t.forEach(function(t){t._calculateBubbleRadius()})}function l(t,e){if(t&&t.length){var i,n;t.forEach(function(t){var r=t.options,a=t.series,o=a.options.stackByPercent,s=a.stack||o,h=a.getStackAxis(),l=h&&h.isLog()?1:0;if(m.hasDefined(i)||(i=l),m.hasDefined(n)||(n=l),s){var u=o?t.percentage:t.getTargetValue();u>=l?(r[e+"0"]=i,i+=u):(r[e+"0"]=n,n+=u)}else{r[e+"0"]=l}})}}function u(t,e){var i=0;t.filter(function(t){return !t.isNull&&t.visible +}).forEach(function(t){i+=Math.abs(t[e])}),i=i>0?i:1,t.forEach(function(t){var e=t.series,n=e.getTargetKey(),r=e[e.getBaseAxisType()],a=!e.stack&&r&&r.type!=v.CATEGORY_AXIS_COMPONENT;t.percentage=a?1:t.series.isNullValue(t)?0:Math.abs(t[n])/i})}function c(t){t.bounds=t._getDefaultBounds(),v.ComponentsOrder.map(function(e){e in t.components&&t.components[e]&&t.components[e].doLayout()},this),t._initPlotBounds=t.bounds,[v.Y_AXIS_COMPONENT,v.X_AXIS_COMPONENT].forEach(function(e){t.components[e]&&t.components[e].updateAxisClip() +}),p(t),[v.Y_AXIS_COMPONENT,v.X_AXIS_COMPONENT,v.DATA_SHEET_COMPONENT].forEach(function(e){t.components[e]&&t.components[e].updateAxisSizeAndBounds()});var e=!1;[v.Y_AXIS_COMPONENT,v.X_AXIS_COMPONENT].forEach(function(i){e=t.components[i]&&t.components[i].adjustDomain4Radius()||e}),[v.Y_AXIS_COMPONENT,v.X_AXIS_COMPONENT,v.DATA_SHEET_COMPONENT,v.ZOOM_COMPONENT].forEach(function(e){t.components[e]&&t.components[e].fixBoundsByPlot()}),[v.X_AXIS_COMPONENT,v.Y_AXIS_COMPONENT].forEach(function(e){t.components[e]&&t.components[e].dealOnZero() +}),[v.X_AXIS_COMPONENT,v.Y_AXIS_COMPONENT].forEach(function(e){t.components[e]&&t.components[e].updateAxisBounds()}),e&&d(t),i(t)}function d(t){t._initPlotBounds&&(t.bounds=x.merge({},t._initPlotBounds)),t.clipPool={},t.axisSize={left:0,right:0,bottom:0,top:0},[v.Y_AXIS_COMPONENT,v.X_AXIS_COMPONENT,v.DATA_SHEET_COMPONENT].forEach(function(e){t.components[e]&&t.components[e].reCalculateSize()}),[v.Y_AXIS_COMPONENT,v.X_AXIS_COMPONENT].forEach(function(e){t.components[e]&&t.components[e].updateAxisClip() +}),p(t),[v.Y_AXIS_COMPONENT,v.DATA_SHEET_COMPONENT,v.X_AXIS_COMPONENT].forEach(function(e){t.components[e]&&t.components[e].updateAxisSizeAndBounds()}),[v.Y_AXIS_COMPONENT,v.X_AXIS_COMPONENT,v.ZOOM_COMPONENT,v.DATA_SHEET_COMPONENT].forEach(function(e){t.components[e]&&t.components[e].fixBoundsByPlot()}),[v.X_AXIS_COMPONENT,v.Y_AXIS_COMPONENT].forEach(function(e){t.components[e]&&t.components[e].dealOnZero()}),[v.X_AXIS_COMPONENT,v.Y_AXIS_COMPONENT].forEach(function(e){t.components[e]&&t.components[e].updateAxisBounds() +})}function f(t){t._initPlotBounds&&(t.bounds=x.merge({},t._initPlotBounds)),t.clipPool={},t.axisSize={left:0,right:0,bottom:0,top:0},[v.Y_AXIS_COMPONENT,v.X_AXIS_COMPONENT,v.DATA_SHEET_COMPONENT].forEach(function(e){t.components[e]&&t.components[e].reCalculateSize()}),[v.Y_AXIS_COMPONENT,v.X_AXIS_COMPONENT].forEach(function(e){t.components[e]&&t.components[e].updateAxisClip()}),p(t),[v.Y_AXIS_COMPONENT,v.DATA_SHEET_COMPONENT,v.X_AXIS_COMPONENT].forEach(function(e){t.components[e]&&t.components[e].updateAxisSizeAndBounds() +}),[v.Y_AXIS_COMPONENT,v.X_AXIS_COMPONENT,v.ZOOM_COMPONENT,v.DATA_SHEET_COMPONENT].forEach(function(e){t.components[e]&&t.components[e].fixBoundsByPlot()})}function p(t){var e=t.getChartBounds(),i=t.bounds,n=i.x,r=i.y,a=i.width,o=i.height,s=Math.max(t.clipPool[g.LEFT]||0,n),h=Math.max(t.clipPool[g.RIGHT]||0,e.width-(n+a)),l=Math.max(t.clipPool[g.TOP]||0,r),u=Math.max(t.clipPool[g.BOTTOM]||0,e.height-(r+o));i={x:s,y:l,width:e.width-s-h,height:e.height-l-u},t.setPlotBounds(i)}var g=t("../Constants"),m=t("../utils/BaseUtils"),v=t("../ComponentLibrary"),_=t("../utils/BoundsManager"),y=t("../utils/BezierEasing"),x=t("../utils/QueryUtils"); +return{PLANE_SYSTEM_LAYOUT:n,reLayoutPlotBounds:d,calculateBubbleRadius:h,calculateDelayTime:s,calculateSeries:e,calculateSeriesShapes:i,fixCoordinateSystem:c,reLayoutPlotBoundsAfterDealOnZero:f}}),define("ChartLibrary",["require"],function(t){function e(t){return n[t]}function i(t,e){n[t]=e}var n={};return{get:e,register:i}}),define("utils/Point2D",["require","./BaseUtils"],function(t){var e=t("./BaseUtils"),i=function(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e};return i.prototype={clone:function(){return new i(this.x,this.y) +},add:function(t){return this.clone()._add(i.create(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(i.create(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new i(this.x*t.x,this.y*t.y) +},unscaleBy:function(t){return new i(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},distanceTo:function(t){t=i.create(t);var e=t.x-this.x,n=t.y-this.y; +return Math.sqrt(e*e+n*n)},equals:function(t){return t=i.create(t),t.x===this.x&&t.y===this.y},contains:function(t){return t=i.create(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+e.formatNum(this.x)+", "+e.formatNum(this.y)+")"}},i.create=function(t,n,r){return t instanceof i?t:e.isArray(t)?new i(t[0],t[1]):void 0===t||null===t?t:"object"==typeof t&&"x" in t&&"y" in t?new i(t.x,t.y):new i(t,n,r)},i}),define("dom/DomUtils",["require","../utils/BaseUtils","../utils/Point2D","./Browser"],function(t){var e=t("../utils/BaseUtils"),i=t("../utils/Point2D"),n=t("./Browser"),r={get:function(t){return"string"==typeof t?document.getElementById(t):t +},getStyle:function(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!i||"auto"===i)&&document.defaultView){var n=document.defaultView.getComputedStyle(t,null);i=n?n[e]:null}return"auto"===i?null:i},create:function(t,e,i){var n=document.createElement(t);return n.className=e||"",i&&i.appendChild(n),n},remove:function(t){var e=t.parentNode;e&&e.removeChild(t)},empty:function(t){for(;t.firstChild;){t.removeChild(t.firstChild)}},toFront:function(t){t.parentNode.appendChild(t)},toBack:function(t){if(t&&t.parentNode){var e=t.parentNode; +e.insertBefore(t,e.firstChild)}},hasClass:function(t,e){if(void 0!==t.classList){return t.classList.contains(e)}var i=r.getClass(t);return i.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(i)},addClass:function(t,i){if(void 0!==t.classList){for(var n=e.splitWords(i),a=0,o=n.length;o>a;a++){t.classList.add(n[a])}}else{if(!r.hasClass(t,i)){var s=r.getClass(t);r.setClass(t,(s?s+" ":"")+i)}}},removeClass:function(t,i){void 0!==t.classList?t.classList.remove(i):r.setClass(t,e.trim((" "+r.getClass(t)+" ").replace(" "+i+" "," "))) +},setClass:function(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e},getClass:function(t){return void 0===t.className.baseVal?t.className:t.className.baseVal},setOpacity:function(t,e){"opacity" in t.style?t.style.opacity=e:"filter" in t.style&&r._setOpacityIE(t,e)},_setOpacityIE:function(t,e){var i=!1,n="DXImageTransform.Microsoft.Alpha";try{i=t.filters.item(n)}catch(r){if(1===e){return}}e=Math.round(100*e),i?(i.Enabled=100!==e,i.Opacity=e):t.style.filter+=" progid:"+n+"(opacity="+e+")" +},testProp:function(t){for(var e=document.documentElement.style,i=0;ih;h++){var u=s[h];if(u.bounds&&e.containsPoint(u.bounds,t)){return u}}}}},cursor:function(t){this._container.style.cursor=t||"",this.vanchart.bindIEDragCursor&&this.vanchart.bindIEDragCursor()},onContainerMouseOver:function(){},onContainerMouseMove:function(t){var i=this.vanchart.bounds,r=this.vanchart;if(r.chartType()!==n.GANTT_CHART||(r.isResizeEnabled()&&(e.containsPoint(r.resizeBounds,t.containerPoint)?(this.cursor("col-resize"),this._state=u,this.fire("resizeStart",t)):this._state===u&&(this.cursor(),this._state=l,this.fire("resizeEnd",t))),this.fire("over",t),this._state!==u)){var o=r.getComponent(a.LEGEND_COMPONENT); +if(o&&o.bounds&&o.fire(e.containsPoint(o.bounds,t.containerPoint)?"mouseover":"mouseout",t),e.containsPoint(i,t.containerPoint)){if(this.cursor(),!this._highlightShared(t)){this._removeHighlight(t);var s;r.isLargeMode()&&!r.hoverSeries?(s=this._getCanvasClosestPoint(t.containerPoint),s&&(s._events||s.getEvents&&s.on(s.getEvents(),s),r.showTooltip(s,t),r.hoverPoint=s,s.options.click&&this.cursor("pointer"))):r.hoverSeries&&(s=r.hoverSeries.getClosestPoint(t.containerPoint),s&&(r.registerInteractiveTarget(s,s.series.defaultMarker),s.fire("mouseover",t),r.registerInteractiveTarget(s,s.series.defaultMarker),s.options.click&&this.cursor("pointer"))) +}}else{this.removeAllChosen(t)}}},removeAllChosen:function(t){var i=this.vanchart,r=i.components[a.TOOLBAR_COMPONENT],o=r.getToolbarBounds(),s=t?e.containsPoint(o,t.containerPoint)&&r.needTooltip():!1;this._removeHighlight(t);var h=i.hoverPoint;h&&(h.fire("mouseout",t),i.hoverPoint=null,h.series.type===n.LINE_MAP&&i.fire("unchosen")),i.hoverSeries&&(i.hoverSeries.fire("seriesUnChosen",t),i.hoverSeries=null);var l=i.getComponent(a.TOOLTIP_COMPONENT);l&&"vanChartMap"!==i.vanChartType&&!s&&l.immediateHide(),t&&i.cancelLegendHighlight(t.containerPoint) +},_getCanvasClosestPoint:function(t){var e=this.vanchart,i=e.seriesOfType(n.BUBBLE_CHART).concat(e.seriesOfType(n.SCATTER_CHART)),r=e.isMap(),a=e.seriesOfType(n.HEAT_MAP);i=i.concat(a);var o=this.vanchart.bounds;r&&i.reverse();for(var s=i.length-1;s>=0;s--){for(var h=i[s],l=h.points.length-1;l>=0;l--){var u=h.points[l],c=r&&u.options.lnglat?e.latLngToContainerPoint(u.getLatLng()):{x:u.posX+o.x,y:u.posY+o.y},d=c.x-t.x,f=c.y-t.y,p=Math.sqrt(d*d+f*f),g=u.radius||u.options.marker&&u.options.marker.radius||4.5; +if(g>=p&&u.visible){return u}}}},onContainerMouseOut:function(){},onContainerTap:function(t){this.onContainerMouseMove(t);var e=this.vanchart.hoverPoint;e&&e.fire("tap",t)},onContainerPanStart:function(t){if(!this.forceTarget&&!this.vanchart._isEmptyDataChart()){var i=this.vanchart,r=i.renderer,o=t.containerPoint,s=i.bounds;if(i.chartType()===n.GANTT_CHART){return void (e.containsPoint(i.resizeBounds,o)?(this._state=u,this.fire("resizeStart",t)):!this._state&&e.containsPoint(i.panBounds,o)&&(this._state=d,this.fire("pan",t))) +}!this.selectRect&&this._supportCoordinateZoom()&&e.containsPoint(s,o)&&this.pressed&&(this.selectRect=r.rect().style({fill:"rgb(69,114,167)","fill-opacity":0.25}).add(),this.downPos=o,i.hoverPoint&&i.hoverPoint.fire("mouseout"));var h=i.getComponent(a.ZOOM_COMPONENT);this._zoomAsTarget(h,o)&&h._panStart(t,h.centerRect)}},_zoomAsTarget:function(t,i){var n=this.vanchart,r=n.bounds,o=!1,s=n.getComponent(a.DATA_SHEET_COMPONENT);return s&&(o=e.containsPoint(s.bounds,i)),o=o||e.containsPoint(r,i),t&&t.zoomToolEnabled()&&o +},onContainerPanMove:function(t){var i=this.vanchart,r=i.bounds,o=i.options,s=t.containerPoint,h=this.downPos,l=i.isInverted();if(i.chartType()===n.GANTT_CHART){return void (e.containsPoint(this.vanchart.panBounds,s)&&(this._state===u?this.fire("resizeMove",t):this._state===d&&this.fire("pan",t)))}if(this.selectRect){var c=o.zoom.zoomType,f=Math.min(s.x,h.x),p=Math.min(s.y,h.y),g=Math.abs(s.x-h.x),m=Math.abs(s.y-h.y),v=-1!==c.indexOf("x"),_=-1!==c.indexOf("y");l&&(v=-1!==c.indexOf("y"),_=-1!==c.indexOf("x")),v&&!_?(p=r.y,m=r.height):_&&!v&&(f=r.x,g=r.width),this.selectRect.attr({x:f,y:p,width:g,height:m}) +}var y=i.getComponent(a.ZOOM_COMPONENT);y&&y.zoomToolEnabled()&&y._panContainerMove(t)},onContainerPanEnd:function(t){var i=this.vanchart,r=t.containerPoint,o=this.downPos,s=i.components[a.TOOLBAR_COMPONENT];if(i.removeMoreLabel(),i.chartType()===n.GANTT_CHART){return void (this._state===u?(this._state=l,this.fire("resizeEnd",t)):this._state===d&&(this._state=c,this.fire("pan",t)))}this.selectRect&&(e.distance(o,r)>14&&(i.clearAllEffects(),i.dealAxisZoom(o,r),s&&s.showRefreshIconWhenZoom()),this.selectRect.remove(),this.selectRect=null),this.panTarget=null; +var h=i.getComponent(a.ZOOM_COMPONENT);h&&h.zoomToolEnabled()&&h._panEnd()},onContainerWheel:function(t){var i=this.vanchart;if(i.chartType()===n.GANTT_CHART&&e.containsPoint(i.panBounds,t.containerPoint)){var r=t.srcEvent;r.preventDefault?r.preventDefault():event.returnValue=!1,t.wheel=this.normalizeWheel(t.srcEvent),this.fire("wheelMove",t)}},_highlightShared:function(t){var e=this.vanchart.getSharedAxis();if(e&&e.getPointsInCategory){var i=t.containerPoint,n=e.getPointsInCategory(i);if(n&&n.length){return n[0]._onPointMouseOver.call(n[0],t),e.drawHighlightBackground(n),this.vanchart.showSharedTooltip(n[0],t),!0 +}}return !1},_removeHighlight:function(t){var e=this.vanchart,i=e.getSharedAxis(),n=e.hoverPoints;i&&i.removeHighlightBackground&&i.removeHighlightBackground(),n&&n.length&&n[0]._onPointMouseOut.call(n[0],t),e.hoverPoints=null},getEvents:function(){return{mouseover:this.onContainerMouseOver,mousemove:this.onContainerMouseMove,mouseout:this.onContainerMouseOut,tap:this.onContainerTap,panstart:this.onContainerPanStart,panmove:this.onContainerPanMove,panend:this.onContainerPanEnd,wheel:this.onContainerWheel} +},_supportCoordinateZoom:function(){var t=this.vanchart.hoverPoint&&"vanChartForceBubble"===this.vanchart.vanChartType,i=this.vanchart.options;return e.isSupportSVG()&&i.zoom&&i.zoom.zoomType&&!t},destroy:function(){this.hammer.destroy()},_inZoomBar:function(t){var i=this.vanchart.getComponent(a.ZOOM_COMPONENT);return i&&i.bounds&&e.containsPoint(i.bounds,t)},_inChartBounds:function(t){return e.containsPoint(this.vanchart.bounds,t)},_inGradientRangeLegend:function(t){var i=this.vanchart.getComponent(a.RANGE_LEGEND_COMPONENT); +return i&&i.options.continuous&&i.bounds&&e.containsPoint(i.bounds,t)},_inNormalLegend:function(t){var i=this.vanchart.getComponent(a.LEGEND_COMPONENT);return i&&i.bounds&&e.containsPoint(i.bounds,t)},preventDefault:function(t){var r=t.srcEvent,o=r.target||r.srcElement,s=i.getMousePos(r,this._container),h=this.pressed||this._inZoomBar(s),l=this.vanchart.getComponent(a.ZOOM_COMPONENT);if(this.vanchart.chartType()===n.GANTT_CHART){var u=this.vanchart.getComponent(a.LEVELBAR);h=e.containsPoint(this.vanchart.panBounds,s)||u&&e.containsPoint(u.thumbBounds,s) +}return !h&&l&&(h=l.target||this._zoomAsTarget(l,s),h=h&&(Math.abs(t.angle)<45||Math.abs(t.angle)>135)&&Math.abs(t.deltaX)>0),!h&&this._inNormalLegend(s)&&(h=h||this.vanchart.getComponent(a.LEGEND_COMPONENT).hasPages),!h&&this._inGradientRangeLegend(s)&&(h=!0),this.vanchart.isMap()&&(h=this.vanchart._zoomEnabled()&&"A"!==o.nodeName||this._inGradientRangeLegend(s)),h?this.hammer.touchAction.setTouchActionNone():(this.hammer.touchAction.recoverTouchAction(),t.distance>0&&this._defaultScroll(r)),h},_defaultScroll:function(t){var e=p.getConfig("panmove"),i=p.getConfig("context"); +e&&e.apply(i||null,[t,!1,!0])},normalizeWheel:function(t){var e=0,i=0,n=0,r=0;return"detail" in t&&(i=t.detail),"wheelDelta" in t&&(i=-t.wheelDelta/120),"wheelDeltaY" in t&&(i=-t.wheelDeltaY/120),"wheelDeltaX" in t&&(e=-t.wheelDeltaX/120),"axis" in t&&t.axis===t.HORIZONTAL_AXIS&&(e=i,i=0),n=e*o,r=i*o,"deltaY" in t&&(r=t.deltaY),"deltaX" in t&&(n=t.deltaX),(n||r)&&t.deltaMode&&(1===t.deltaMode?(n*=s,r*=s):(n*=h,r*=h)),n&&!e&&(e=1>n?-1:1),r&&!i&&(i=1>r?-1:1),{spinX:e,spinY:i,pixelX:n,pixelY:r}}});return g +}),define("mobile/Gesture",["require","../utils/BaseUtils","../dom/DomUtils","../utils/Point2D"],function(t){function e(t){return t=Math.abs(t),g>t?0:t}function i(t){return Math.sqrt(t.x*t.x+t.y*t.y)}function n(t,e){return t.x*e.x+t.y*e.y}function r(t,e){var r=i(t)*i(e);if(0===r){return 0}var a=n(t,e)/r;return a>1&&(a=1),Math.acos(a)}function a(t,e){return t.x*e.y-e.x*t.y}function o(t,e){var i=r(t,e);return a(t,e)>0&&(i*=-1),180*i/Math.PI}var s=(t("../utils/BaseUtils"),t("../dom/DomUtils")),h=t("../utils/Point2D"),l="touchstart",u="touchmove",c="touchend",d="touchcancel",f=[l,u,c,d],p=["rotate","touchStart","multipointStart","multipointEnd","pinch","swipe","tap","doubleTap","longTap","singleTap","panStart","panMove","panEnd","touchMove","touchEnd"],g=50,m=function(t){this.handler=t,this.dom=t.dom,this.preV={x:null,y:null},this.pinchStartLen=null,this.zoom=1,this.isDoubleTap=!1,this.delta=null,this.last=null,this.now=null,this.tapTimeout=null,this.singleTapTimeout=null,this.longTapTimeout=null,this.swipeTimeout=null,this.x1=this.x2=this.sx2=this.y1=this.y2=this.sy2=null,this.preTapPosition={x:null,y:null},this.element=null,this.startPosition={x:0,y:0},this._domHandler=this.domHandler.bind(this),this.normalizeLeafletTouchAction() +};return m.prototype.normalizeLeafletTouchAction=function(){s.addClass(this.dom,"touch-enable")},m.prototype.recoverLeafletTouchAction=function(){s.removeClass(this.dom,"touch-enable")},m.prototype.initDomHandler=function(){this.addDomEventListener()},m.prototype.addDomEventListener=function(){var t=this;this.recoverLeafletTouchAction(),f.forEach(function(e){return t.dom.addEventListener(e,t._domHandler)})},m.prototype.removeDomEventListener=function(){var t=this;this.normalizeLeafletTouchAction(),f.forEach(function(e){t.dom.removeEventListener(e,t._domHandler) +})},m.prototype.domHandler=function(t){this.recognize(t)},m.prototype.dispatch=function(t){if(t&&t.type&&t.touches){t.touches.forEach(function(t){t.pageX=0|t.x,t.pageY=0|t.y});var e=t;e.changedTouches=[],e.targetTouches=t.touches,e.vanSynth=!0;var i=t.touches[0];e.vanX=i.x,e.vanY=i.y;var n=this.element;if(t.type===l){var r=t.touches[0],a=this.dom.getBoundingClientRect(),o={x:r.x+a.left,y:r.y+a.top};n=document.elementFromPoint(o.x,o.y)}n&&(e.target=n,this.recognize(e))}},m.prototype.recognize=function(t){var e=t.target,i=t.type; +if(this.element=e,i===l){t.vanSynth?this.startPosition=h.create(t.vanX,t.vanY):this.startPosition=s.getMousePos(t,this.dom),t.startPosition=this.startPosition,this.start(t)}else{if(i===u){t.startPosition=this.startPosition,this.move(t)}else{if(i!==c&&i!==d){throw"unrecognized type:"+i}t.startPosition=this.startPosition,this.end(t)}}},m.prototype.start=function(t){if(t.touches){this.now=Date.now(),this.x1=t.touches[0].pageX,this.y1=t.touches[0].pageY,this.x2=this.x1,this.y2=this.y1,this.delta=this.now-(this.last||this.now),this.touchStart(t,this.element),null!==this.preTapPosition.x&&(this.isDoubleTap=this.delta>0&&this.delta<=250&&Math.abs(this.preTapPosition.x-this.x1)<30&&Math.abs(this.preTapPosition.y-this.y1)<30,this.isDoubleTap&&clearTimeout(this.singleTapTimeout)),this.preTapPosition.x=this.x1,this.preTapPosition.y=this.y1,this.last=this.now; +var n=this.preV,r=t.touches.length;if(r>1){this._clientToLocal(t),this._cancelLongTap(),this._cancelSingleTap();var a={x:t.touches[1].pageX-this.x1,y:t.touches[1].pageY-this.y1};n.x=a.x,n.y=a.y,this.pinchStartLen=i(n),this.pinchStartLenX=e(a.x),this.pinchStartLenY=e(a.y),this.element&&this.element.panning===!0&&this.panEnd(t,this.element),this.element.panning="avoid",this.multipointStart(t,this.element)}this._preventTap=!1,this.longTapTimeout=setTimeout(function(){this.longTap(t,this.element),this._preventTap=!0 +}.bind(this),750)}},m.prototype.move=function(t){if(t.touches){t.preventDefault();var e=this.preV,n=t.touches.length,r=t.touches[0].pageX,a=t.touches[0].pageY;if(this.isDoubleTap=!1,n>1){this._preventTap=!0,this._clientToLocal(t);var s=t.touches[1].pageX,h=t.touches[1].pageY,l={x:t.touches[1].pageX-r,y:t.touches[1].pageY-a};null!==e.x&&(this.pinchStartLen>0&&(t.zoom=i(l)/this.pinchStartLen,t.zoomX=this.pinchStartLenX?Math.abs(l.x)/this.pinchStartLenX:1,t.zoomY=this.pinchStartLenY?Math.abs(l.y)/this.pinchStartLenY:1,this.pinch(t,this.element)),t.angle=o(l,e),this.rotate(t,this.element)),e.x=l.x,e.y=l.y,null!==this.x2&&null!==this.sx2?(t.deltaX=(r-this.x2+s-this.sx2)/2,t.deltaY=(a-this.y2+h-this.sy2)/2):(t.deltaX=0,t.deltaY=0),this.sx2=s,this.sy2=h +}else{if(null!==this.x2){t.deltaX=r-this.x2,t.deltaY=a-this.y2;var u=Math.abs(this.x1-this.x2),c=Math.abs(this.y1-this.y2);(u>8||c>8)&&(this._preventTap=!0)}else{t.deltaX=0,t.deltaY=0}this.element&&(this.element.panning===!0?this.panMove(t,this.element):"avoid"!==this.element.panning&&(this.element.panning=!0,this.panStart(t,this.element)))}this.touchMove(t,this.element),this._cancelLongTap(),this.x2=r,this.y2=a}},m.prototype.end=function(t){if(t.changedTouches){this._cancelLongTap();var e=this;t.touches.length<2?(this.multipointEnd(t,this.element),this.sx2=this.sy2=null):this._clientToLocal(t),this.x2&&Math.abs(this.x1-this.x2)>30||this.y2&&Math.abs(this.y1-this.y2)>30?(t.direction=this._swipeDirection(this.x1,this.x2,this.y1,this.y2),this.swipeTimeout=setTimeout(function(){e.swipe(t,e.element) +},0)):(this.tapTimeout=setTimeout(function(){e._preventTap||e.tap(t,e.element),e.isDoubleTap&&(e.doubleTap(t,e.element),e.isDoubleTap=!1)},0),e.isDoubleTap||(e.singleTapTimeout=setTimeout(function(){e.singleTap(t,e.element)},250))),this.element&&this.element.panning&&(this.element.panning===!0?(this.panEnd(t,this.element),this.element.panning=!1):"avoid"===this.element.panning&&0===t.touches.length&&(this.element.panning=!1)),this.touchEnd(t,this.element),this.preV.x=0,this.preV.y=0,this.zoom=1,this.pinchStartLen=this.pinchStartLenX=this.pinchStartLenY=null,this.x1=this.x2=this.y1=this.y2=null +}},m.prototype._clientToLocal=function(t){t.touches[0],t.touches[1]},m.prototype._cancelLongTap=function(){clearTimeout(this.longTapTimeout)},m.prototype._cancelSingleTap=function(){clearTimeout(this.singleTapTimeout)},m.prototype._swipeDirection=function(t,e,i,n){return Math.abs(t-e)>=Math.abs(i-n)?t-e>0?"Left":"Right":i-n>0?"Up":"Down"},m.prototype.dispose=function(){return this.singleTapTimeout&&clearTimeout(this.singleTapTimeout),this.tapTimeout&&clearTimeout(this.tapTimeout),this.longTapTimeout&&clearTimeout(this.longTapTimeout),this.swipeTimeout&&clearTimeout(this.swipeTimeout),this.preV=this.pinchStartLen=this.zoom=this.isDoubleTap=this.delta=this.last=this.now=this.tapTimeout=this.singleTapTimeout=this.longTapTimeout=this.swipeTimeout=this.x1=this.x2=this.y1=this.y2=this.preTapPosition=this.rotate=this.touchStart=this.multipointStart=this.multipointEnd=this.pinch=this.swipe=this.tap=this.doubleTap=this.longTap=this.singleTap=this.pressMove=this.touchMove=this.touchEnd=this.touchCancel=this.twoFingerPressMove=null,this.element=null,this.removeDomEventListener(),null +},p.forEach(function(t){var e=t.toLowerCase();m.prototype[t]=function(t,i){this.handler.dispatchToElement(i,e,t),"panend"===e&&this.handler.end(t)}}),m}),define("mobile/AbstractManager",["require","../utils/Class","../utils/BaseUtils"],function(t){var e=t("../utils/Class"),i=t("../utils/BaseUtils");return e.extend({z:0,initialize:function(t){this.init(t)},init:function(t){this.vanchart=t.vanchart,this.handler=t,this.parent=t},contain:function(t){return i.containsPoint(this.getBoundingRect(),t)},getBoundingRect:function(){},getActions:function(){return{} +}})}),define("mobile/ManagerContainer",["require","../utils/BaseUtils","./AbstractManager"],function(t){var e=(t("../utils/BaseUtils"),t("./AbstractManager"));return e.extend({z:-10,contain:function(){return !0},ontap:function(t){this.handler.fire("forceHide","containerTap")},onpanstart:function(t){t.chart=this.vanchart,this.vanchart.vancharts.trigger("carouselpanstart",t)},onpanmove:function(t){this.vanchart.vancharts.trigger("carouselpanmove",t)},onpanend:function(t){this.vanchart.vancharts.trigger("carouselpanend",t) +}})}),define("mobile/ManagerDom",["require","./AbstractManager"],function(t){function e(t){var e,i=t.srcEvent.target,n=t.type,r=this.vanchart;if(r.force&&(e=r.force.dragFire(t,this.handler.dom)),!e){for(;i&&i!==this.handler.dom&&(e=this.handler.findInteractiveTarget(i),!e||!e.listens(n,!1));){i=i.parentNode}}e&&(e.fire(n,t),t.stop())}var i=t("./AbstractManager");return i.extend({z:0,contain:function(){return !0},fireTargetByEvent:e,ontap:e,onpanstart:e,onpanmove:e,onpanend:e})}),define("utils/Interpolator",["require","./ColorUtils"],function(t){function e(t,e){var i=typeof e; +return("string"===i?g.hasColorName(e)||/^(#|rgb\(|hsl\()/.test(e)?n:a:Array.isArray(e)?h:"object"===i&&isNaN(e)?o:s)(t,e)}function i(t){return 16>t?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function n(t,e){t="none"==t||""==t?e:t,t=g.getRGBAColorArray(t),e=g.getRGBAColorArray(e);var n=t[0],r=t[1],a=t[2],o=e[0]-n,s=e[1]-r,h=e[2]-a;return function(t){return"#"+i(Math.round(n+o*t))+i(Math.round(r+s*t))+i(Math.round(a+h*t))}}function r(t){var e=t.match(/matrix\((\d+\.?\d*|\.?\d+), 0, 0, (\d+\.?\d*|\.?\d+), ([-+]?\d+\.?\d*|\.?\d+), ([-+]?\d+\.?\d*|\.?\d+)\)/); +return e?"translate("+e[3]+"px,"+e[4]+"px)scale("+e[1]+")":t}function a(t,e){var i,n,a,o=m.lastIndex=v.lastIndex=0,h=-1,l=[],u=[];for(t+="",e+="",t=r(t),e=r(e);(i=m.exec(t))&&(n=v.exec(e));){(a=n.index)>o&&(a=e.slice(o,a),l[h]?l[h]+=a:l[++h]=a),(i=i[0])===(n=n[0])?l[h]?l[h]+=n:l[++h]=n:(l[++h]=null,u.push({i:h,x:s(i,n)})),o=v.lastIndex}return on;++n){l[(i=u[n]).i]=i.x(t)}return l.join("")})}function o(t,i){var n,r={},a={};for(n in t){n in i?r[n]=e(t[n],i[n]):a[n]=t[n]}for(n in i){n in t||(a[n]=i[n])}return function(t){for(n in r){a[n]=r[n](t)}return a}}function s(t,e){return t=+t,e=+e,function(i){return t*(1-i)+e*i}}function h(t,i){var n,r=[],a=[],o=t.length,s=i.length,h=Math.min(t.length,i.length);for(n=0;h>n;++n){r.push(e(t[n],i[n]))}for(;o>n;++n){a[n]=t[n]}for(;s>n;++n){a[n]=i[n]}return function(t){for(n=0;h>n;++n){a[n]=r[n](t)}return a +}}function l(t){var e=document.createElementNS("http://www.w3.org/2000/svg","g");return(l=function(t){if(null!=t){e.setAttribute("transform",t);var i=e.transform.baseVal.consolidate()}return new u(i?i.matrix:_)})(t)}function u(t){var e=[t.a,t.b],i=[t.c,t.d],n=d(e),r=c(e,i),a=d(f(i,e,-r))||0;e[0]*i[1]180?d+=360:d-c>180&&(c+=360),r.push({i:n.push(n.pop()+"rotate(",null,")")-2,x:s(c,d)})):d&&n.push(n.pop()+"rotate("+d+")"),f!=p?r.push({i:n.push(n.pop()+"skewX(",null,")")-2,x:s(f,p)}):p&&n.push(n.pop()+"skewX("+p+")"),g[0]!=m[0]||g[1]!=m[1]?(i=n.push(n.pop()+"scale(",null,",",null,")"),r.push({i:i-4,x:s(g[0],m[0])},{i:i-2,x:s(g[1],m[1])})):(1!==m[0]||1!==m[1])&&n.push(n.pop()+"scale("+m+")"),i=r.length,function(t){for(var e,a=-1; +++ae?[e,i]:[i,e]}function i(t,e,i,n,r){var a=i(t[0],t[1]),o=n(e[0],e[1]);return function(t){var e=o(a(t));return r&&g.hasDefined(r[0])&&(e=Math.max(e,r[0])),r&&g.hasDefined(r[1])&&(e=Math.min(e,r[1])),e +}}function n(t,e,i,n){var a=[],o=[],s=0,h=Math.min(t.length,e.length)-1;for(t[h]i;){var r=i+n>>>1;a(t[r],e)>0?n=r:i=r+1}return i}function a(t,e){return e>t?-1:t>e?1:t>=e?0:NaN}function o(t,e){return g.rebind(t,e,"range","rangeRound","interpolate")}function s(t,e,r,a,o){function h(){var s=Math.min(t.length,e.length)>2?n:i; +return u=s(t,e,a,r,o),c=s(e,t,a,r,o),l}function l(t){return u(t)}var u,c;return l.invert=function(t){return c(t)},l.domain=function(e){return arguments.length?(t=e.map(Number),h()):t},l.range=function(t){return arguments.length?(e=t,h()):e},l.minMax=function(t){return arguments.length?(o=t,h()):o},l.rangeRound=function(t){return l.range(t).interpolate(m.interpolateRound)},l.interpolate=function(t){return arguments.length?(r=t,h()):r},l.uninterpolate=function(t){return arguments.length?(a=t,h()):a +},l.copy=function(){return s(t,e,r,a,o)},h()}function h(t,e,i,n){function r(t){return(i?Math.log(0>t?0:t):-Math.log(t>0?0:-t))/Math.log(e)}function a(t){return i?Math.pow(e,t):-Math.pow(e,-t)}function s(e){return t(r(e))}return s.invert=function(e){return a(t.invert(e))},s.domain=function(e){return arguments.length?(i=e[0]>=0,t.domain((n=e.map(Number)).map(r)),s):n},s.base=function(i){return arguments.length?(e=+i,t.domain(n.map(r)),s):e},s.copy=function(){return h(t.copy(),e,i,n)},o(s,t)}function l(t,i){function n(e){return o[((a.get(e)||("range"===i.t?a.set(e,t.push(e)):NaN))-1)%o.length] +}function r(e,i){for(var n=[],r=t.length,a=0;r>a;a++){n.push(e+i*a)}return n}var a,o,s;return n.domain=function(e){if(!arguments.length){return t}t=[],a=new v;for(var r,o=-1,s=e.length;++oe?NaN:e/a+t,[e,e+1/a]},n.copy=function(){return u(t,e,i)},r()}function c(){return s([0,1],[0,1],m.interpolateNumber,m.uninterpolateNumber)}function d(){return h(c().domain([0,1]),10,!0,[1,10])}function f(){return u(0,1,[0,1])}function p(){return l([],{t:"range",a:[[]]})}var g=t("./BaseUtils"),m=t("./Interpolator"),v=t("./vMap");return{linear:c,quantize:f,log:d,quantize:f,ordinal:p}}),define("mobile/findClosestPoint",["require","../utils/BaseUtils","../utils/Scale","../Constants"],function(t){function e(t){var e=t.series.vanchart.isMap()&&t.getLatLng(); +if(e){return t.series.vanchart.latLngToContainerPoint(e)}if(t.rect){var i=t.rect;return{x:i.x+i.width/2,y:i.y+i.height/2}}return null!=t.posX?{x:t.posX,y:t.posY}:null!=t.px?{x:t.px,y:t.py}:void o[t.series.type]}function i(t,i){var n=e(t);return n?(i.x-n.x)*(i.x-n.x)+(i.y-n.y)*(i.y-n.y):Number.MAX_VALUE}function n(t){var e,n=this.vanchart.getSharedAxis(),o=this.vanchart.chartType();if(o===a.GANTT_CHART){var s=this.vanchart.getTimeAxis();e=t.containerPoint.subtract({x:s.bounds.x,y:s.bounds.y+s.tableDims.headerHeight}).subtract({x:s.view.innerPosX,y:s.view.innerPosY}) +}else{e=o===a.RADAR_CHART?this.vanchart.series[0]&&t.containerPoint.subtract(this.vanchart.series[0].getCenter()):this.vanchart.isMap()?t.containerPoint:t.containerPoint.subtract(this.vanchart.bounds)}var h=Number.MAX_VALUE,l=null,u=[];if(n){var c;if(n.getCategoryByPos){c=n.getCategoryByPos(t.containerPoint)}else{var d=n.scale.domain(),f=n._getRange(),p=r.quantize().domain(f).range(d);c=p(n.isHorizontal()?e.x:e.y)}u=this.vanchart.cateMap[c]}else{for(var g=this.vanchart.series,m=g.length-1;m>-1;--m){var v=g[m]; +v.visible&&(u=u.concat(g[m].points))}}if(u&&u.length){for(var m=u.length-1;m>-1;--m){var _=u[m];if(_.isVisible()){var y=i(_,e);h>y&&(h=y,l=_)}}}return l?l:this.handler.getCanvasClosestPoint(t.containerPoint)}var r=(t("../utils/BaseUtils"),t("../utils/Scale")),a=t("../Constants"),o={};return o[a.PIE_CHART]=!0,n.getCenter=e,n}),define("mobile/ManagerHover",["require","../utils/BaseUtils","../Constants","./AbstractManager","../ComponentLibrary","./findClosestPoint","../utils/Scale","../utils/Point2D"],function(t){function e(t,e){return e.yt.y+t.height?"bottom":e.xt.x+t.width?"right":void 0 +}var i=t("../utils/BaseUtils"),n=t("../Constants"),r=t("./AbstractManager"),a=t("../ComponentLibrary"),o=t("./findClosestPoint"),s=t("../utils/Scale"),h=t("../utils/Point2D"),l="CROSS_TIMEOUT_KEY",u=1000,c="EDGE_MOVE_KEY",d=50,f=1,p=n.STAGES;return r.extend({z:10,initialize:function(t){this.init(t),t.__hover=this,this.movingEdge=null,this._hoveredTarget=null,this._pinchStartPlotZoom=1,this._pinchStartCenter={},this._tapPoint=i.throttle(this._tapPoint,250,this)},delayHide:function(t){this.vanchart.vancharts.trigger("hideMobileTooltip",{delay:!0}); +var e=this;this.vanchart.setTimeout(l,function(){e.hideCross()},u)},forceHide:function(t){this.vanchart.setTimeout(c),this.hide(),this.vanchart.vancharts.trigger("hideMobileTooltip",{delay:!1})},getBoundingRect:function(){return this.vanchart.bounds},getPointAbsCenter:function(t){if(t){var e=o.getCenter(t);if(e){if(this._hoveredTarget&&this._hoveredTarget.series.type===n.RADAR_CHART){var i=this._hoveredTarget.series.getCenter();e.x+=i[0],e.y+=i[1]}else{this.vanchart.isMap()||(e.x+=this.vanchart.bounds.x,e.y+=this.vanchart.bounds.y) +}return e}}},_disableAnimation:function(){this.__isAnimation=this.vanchart.renderer.isAnimation,this.vanchart.renderer.isAnimation=!1},_enableAnimation:function(){this.vanchart.renderer.isAnimation=this.__isAnimation},_mutateValueAxis:function(t,e){var i=t.getWholeRange(),n=t._getRange(),r=s.linear().domain(e).range(i),a=[r.invert(n[0]),r.invert(n[1])];t._calculateNiceDomain(null,null,a[0],a[1]),t.fixScaleAndTickData(),t.render()},_mutateCategoryAxis:function(t){t.fixScaleAndTickData(),t.render() +},_mutateSingleAxis:function(t,e){t.isValue()?this._mutateValueAxis(t,e):t.isCategory()&&this._mutateCategoryAxis(t)},_mutateAxisList:function(t,e){for(var i=t.getAxisCount(),n=0;i>n;++n){var r=t.getAxis(n);this._mutateSingleAxis(r,e[n])}},_mutateAllAxes:function(t){var e=t.xDomains,i=t.yDomains;this._mutateAxisList(this.vanchart.components.xAxis,e),this._mutateAxisList(this.vanchart.components.yAxis,i)},_showScroll:function(){var t=this.vanchart.getComponent(a.PLOT_SCROLL);t&&t.show()},_hideScroll:function(){var t=this.vanchart.getComponent(a.PLOT_SCROLL); +t&&t.hide()},mutatePlotByZoomAndOffset:function(){var t=this.vanchart.getComponent(a.PLOT_SCROLL);t.isExist()&&(this._mutateAllAxes(t),this.vanchart.reRenderSeries(),t.render())},onmultipointstart:function(t){var e=t.srcEvent.touches;if(2===e.length){if(this.vanchart.shouldPinch()){this.handler.stage!==p.NORMAL&&this.forceHide("pinch"),t.stop(),this.handler.stage=p.ZOOM,this._disableAnimation();var i=this.handler.getTouchPos(e[0]),n=this.handler.getTouchPos(e[1]);this._pinchStartCenter=i.add(n).divideBy(2).subtract(this.vanchart.bounds).round(),this._pinchStartPlotOffset=this.vanchart.getPlotOffset(),this._pinchStartPlotZoom=this.vanchart.getPlotZoom() +}this._showScroll()}},onpinch:function(t){if(this.handler.stage===p.ZOOM){t.stop();var e=this.vanchart,i=this.vanchart.getComponent(a.PLOT_SCROLL),n=t.srcEvent.zoomX,r=t.srcEvent.zoomY,o=h.create(n,r),s=o.scaleBy(this._pinchStartPlotZoom);s.x=Math.max(1,Math.min(s.x,i.xMaxZoom)),s.y=Math.max(1,Math.min(s.y,i.yMaxZoom));var l=s.unscaleBy(this._pinchStartPlotZoom),u=this._pinchStartCenter.subtract(this._pinchStartPlotOffset).scaleBy(l),c=u.subtract(this._pinchStartCenter).multiplyBy(-1);e.setPlotZoom(s),e.setPlotOffset(c),this.mutatePlotByZoomAndOffset() +}},onmultipointend:function(){this.handler.stage===p.ZOOM&&(this._enableAnimation(),this.handler.stage=p.NORMAL),this._hideScroll()},ontap:function(t){this.handler.stage===p.SELECT?t.stop():(this.highlightByTarget(t),this.moveCrossToHovered(),this.delayHide("tap"))},ontouchstart:function(t){this.handler.stage===p.SELECT&&(t.__forceSelect=!0,this.highlightByTarget(t),this.vanchart.setTimeout(l))},ontouchend:function(t){this.handler.stage===p.SELECT&&(this.moveCrossToHovered(),this.delayHide("touchend")) +},onpanstart:function(t){this._disableAnimation(),this.handler.stage===p.NORMAL?this.scroll(t):this.handler.stage===p.SELECT&&t.stop()},onpanmove:function(t){this.handler.stage===p.NORMAL?this.scroll(t):this.handler.stage===p.SELECT&&(t.stop(),this.edgeMove(t),this.highlightByPos(t))},onpanend:function(t){this._enableAnimation(),this._hideScroll(),this.vanchart.setTimeout(c)},getActions:function(){return{pointSelect:this.pointSelect,pointCancel:this.pointCancel,forceHide:this.forceHide,delayHide:this.delayHide,edgeMove:this.edgeMove,mutatePlot:this.mutatePlotByZoomAndOffset} +},pointCancel:function(){this.hide()},scroll:function(t){var e=t.srcEvent||t,i=this.vanchart.getScrollBounds();i.shouldParentHandle&&"middle"!==i.horizontalEdge||t.stop&&t.stop(),this.vanchart.addPlotOffset(e)&&(this._showScroll(),this.mutatePlotByZoomAndOffset())},hide:function(){this.vanchart.setTimeout(c),this.vanchart.setTimeout(l),this._tapPoint.cancel(),this.handler.stage=p.NORMAL,this.handler.removeAllChosen(),this._hoveredTarget=null,this.hideCross(),this.vanchart.vancharts.trigger("pointCanceled") +},hideCross:function(){var t=this.vanchart.getComponent(a.CROSS_LINE);t&&t.hide()},showCross:function(t,e){if(this.vanchart.hasCrossLine()){var i,n=this.vanchart.getComponent(a.CROSS_LINE);if((i=this.getPointAbsCenter(t))&&t.isPointSupportTooltipShared()){n.setPos(i.x,i.y)}else{var r=e.containerPoint;n.setPos(r.x,r.y)}}},moveCrossToHovered:function(){if(this.vanchart.hasCrossLine()){var t=this.vanchart.getComponent(a.CROSS_LINE),e=this.getPointAbsCenter(this._hoveredTarget);e&&t.setPos(e.x,e.y,!0) +}},findPointByTarget:function(t){var e=t.target;return e&&"point"===e.vanChartType?e:this.findClosestPoint(t)},findPointByPos:function(t){var e;if(t.srcEvent.touches[0]){var i=t.srcEvent.touches[0],n=document.elementFromPoint(i.clientX,i.clientY);e=this.handler.findInteractiveTarget(n)}return e&&"point"===e.vanChartType?e:this.findClosestPoint(t)},findClosestPoint:o,highlightByTarget:function(t){var e=this.findPointByTarget(t);this.highlight(e,t)},highlightByPos:function(t){var e=this.findPointByPos(t); +this.highlight(e,t)},highlight:function(t,e){this.showCross(t,e),this.highlightPoint(t,e)},highlightPoint:function(t,e){t?(e.stop(),(e.__forceSelect||t!==this._hoveredTarget)&&(this.handler.stage=p.SELECT,this._hoveredTarget=t,t.series.fire("tap",e),t.series.type===n.HEAT_MAP&&this.vanchart.showTooltip(t),this._tapPoint(t,e))):this.vanchart.chartType()===n.LINE_MAP&&(this.handler.stage=p.SELECT,e.stop(),this.vanchart.fire("mousemove",e),this.vanchart.hoverPoint!==this._hoveredTarget&&(this._hoveredTarget=this.vanchart.hoverPoint,this._tapPoint(this._hoveredTarget,e))) +},_tapPoint:function(t,e){t&&t._onPointTap(e)},edgeMove:function(t){var i=this,n=this.vanchart,r=n.bounds,a=e(r,t.containerPoint),o=null;if(a){if(a!==this.movingEdge){this.movingEdge=a;var s={deltaX:0,deltaY:0};switch(a){case"top":s.deltaY=f;break;case"bottom":s.deltaY=-f;break;case"left":s.deltaX=f;break;case"right":s.deltaX=-f}o=function(){i.highlightByPos(t),i.scroll(s),n.setTimeout(c,o,d)},o()}return !0}return this.movingEdge=null,n.setTimeout(c),!1}})}),define("mobile/ManagerLegend",["require","./AbstractManager","../ComponentLibrary","../utils/BaseUtils"],function(t){var e=t("./AbstractManager"),i=t("../ComponentLibrary"),n=t("../utils/BaseUtils"); +return e.extend({z:100,_getLegend:function(){return this.vanchart.getComponent(i.LEGEND_COMPONENT)},contain:function(t){var e=this._getLegend();return e?n.containsPoint(e.bounds,t):void 0},onpanstart:function(t){t.stop(),this._getLegend().fire("panstart",t)},onpanmove:function(t){t.stop(),this._getLegend().fire("panmove",t)},onpanend:function(t){t.stop(),this._getLegend().fire("panend",t)}})}),define("mobile/ManagerRangeLegend",["require","./AbstractManager","../ComponentLibrary","../utils/BaseUtils"],function(t){var e=t("./AbstractManager"),i=t("../ComponentLibrary"),n=t("../utils/BaseUtils"); +return e.extend({z:100,_getLegend:function(){return this.vanchart.getComponent(i.RANGE_LEGEND_COMPONENT)},contain:function(t){var e=this._getLegend();return e?n.containsPoint(e.bounds,t):void 0},onpanstart:function(t){t.stop(),this._getLegend().fire("panstart",t)},onpanmove:function(t){t.stop(),this._getLegend().fire("panmove",t)},onpanend:function(t){t.stop(),this._getLegend().fire("panend",t)}})}),define("mobile/Handler",["require","../Constants","../dom/Evented","../utils/BaseUtils","../dom/DomUtils","./Gesture","./ManagerContainer","./ManagerDom","./ManagerHover","./ManagerLegend","./ManagerRangeLegend","../HammerHandler","../utils/Point2D"],function(t){function e(){this.srcEvent.cancelable&&this.srcEvent.preventDefault(),this.cancelBubble=!0 +}var i=t("../Constants"),n=t("../dom/Evented"),r=t("../utils/BaseUtils"),a=t("../dom/DomUtils"),o=t("./Gesture"),s=t("./ManagerContainer"),h=t("./ManagerDom"),l=t("./ManagerHover"),u=t("./ManagerLegend"),c=t("./ManagerRangeLegend"),d=t("../HammerHandler"),f=t("../utils/Point2D"),p=n.extend({initialize:function(t,e){this.vanchart=t,this.dom=e,this.hammer={set:r.emptyFn},this.proxy=new o(this),this.managers=[],this.stage=i.STAGES.NORMAL,this.registerManager(new s(this)),this.registerManager(new h(this)),this.registerManager(new l(this)),this.registerManager(new u(this)),this.registerManager(new c(this)) +},cursor:r.emptyFn,enable:function(){this.proxy.addDomEventListener()},disable:function(){this.proxy.removeDomEventListener()},registerManager:function(t){-1===this.managers.indexOf(t)&&(this.managers.push(t),this.managers.sort(function(t,e){return t.z-e.z}),this.on(t.getActions(),t))},makeEventPacket:function(t,i,n){var r;return r=t.vanSynth?f.create(t.vanX,t.vanY):a.getMousePos(t,this.dom),{type:i,srcEvent:t,target:this.findInteractiveTarget(n),startPosition:t.startPosition,containerPoint:r,stop:e,cancelBubble:!1} +},getTouchPos:function(t){return a.getMousePos(t,this.dom)},findInteractiveTarget:function(t){return t&&this.vanchart.findInteractiveTarget(t)},dispatchToElement:function(t,e,i){for(var n=this.makeEventPacket(i,e,t),r=this.managers.length-1;r>=0;--r){var a=this.managers[r];if(a.contain(n.startPosition)){var o="on"+e;if(a[o]&&a[o](n),n.cancelBubble){break}}}},end:function(t){this.vanchart.vancharts.handleTouchEnd(t)},removeAllChosen:d.prototype.removeAllChosen,_removeHighlight:d.prototype._removeHighlight,getCanvasClosestPoint:d.prototype._getCanvasClosestPoint,destroy:function(){this.proxy.dispose() +}});return p}),define("vector/Layer",["require","../dom/Evented","../utils/BaseUtils"],function(t){var e=t("../dom/Evented"),i=t("../utils/BaseUtils"),n=e.extend({options:{pane:"overlayPane",nonBubblingEvents:[]},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},exitAnimate:function(t){var e=this,i=t._pointLayer;i.remove(e)},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane) +},beforeAdd:function(t){this._renderer=t.getMapRenderer(this)},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var i=this.getEvents();e.on(i,this),this.once("remove",function(){e.off(i,this)},this)}this.onAdd(e)}},_reset:i.falseFn,_project:i.falseFn,_update:i.falseFn,setAttr:i.falseFn});return n}),define("utils/Bounds",["require","./Point2D"],function(t){var e=t("./Point2D"),i=function(t,e){if(t){for(var i=e?[t,e]:t,n=0,r=i.length; +r>n;n++){this.extend(i[n])}}};return i.prototype={extend:function(t){return t=e.create(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new e((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new e(this.min.x,this.max.y)},getTopRight:function(){return new e(this.max.x,this.min.y) +},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var n,r;return t="number"==typeof t[0]||t instanceof e?e.create(t):i.create(t),t instanceof i?(n=t.min,r=t.max):n=r=t,n.x>=this.min.x&&r.x<=this.max.x&&n.y>=this.min.y&&r.y<=this.max.y},intersects:function(t){t=i.create(t);var e=this.min,n=this.max,r=t.min,a=t.max,o=a.x>=e.x&&r.x<=n.x,s=a.y>=e.y&&r.y<=n.y;return o&&s},overlaps:function(t){t=i.create(t);var e=this.min,n=this.max,r=t.min,a=t.max,o=a.x>e.x&&r.xe.y&&r.y24?(isFinite(r)&&(clearTimeout(s),s=l.setTimeout(e,r)),o=0):(o=1,u(e))}function i(){var t=Date.now();for(h=r;h;){t>=h.t&&(h.f=h.c(t-h.t)),h=h.n}return t}function n(){for(var t,e=r,i=1/0;e;){e.f?e=t?t.n=e.n:r=e.n:(e.th&&(i=0),3>h&&(n=Date.now());var l=n+i,c={c:t,t:l,f:!1,n:null};a?a.n=c:r=c,a=c,o||(s=clearTimeout(s),o=1,u(e))};return c.flush=function(){i(),n()},c.getActiveTimer=function(){return h},c}),define("vector/Transition",["require","../utils/BaseUtils","../utils/Timer","../utils/vMap","../utils/Interpolator","../utils/BezierEasing"],function(t){function e(t,e,i,n){var r=t.id,a=t.namespace,i=n(i);return t.elW.node()[a][r].tween.set(e,i),t}function i(t,e,i,n){var r=t[e]||(t[e]={active:0,count:0}),a=r[i]; +if(!a){var l=n.time;a=r[i]={tween:new h,time:l,delay:n.delay,duration:n.duration,ease:n.ease},n=null,++r.count,s(function(n){function h(e){if(r.active>i){return c()}var n=r[r.active];n&&(--r.count,delete r[r.active],n.event&&n.event.interrupt.call(t)),r.active=i,a.event&&a.event.start.call(t),a.tween.forEach(function(e,i){(i=i.call(t))&&m.push(i)}),f=a.ease,d=a.duration,s(function(){return g.c=u(e||1)?o.trueFn:u,1},0,l)}function u(n){if(r.active!==i||!t[e]){return 1}for(var o=n/d,s=f(o),h=m.length; +h>0;){m[--h].call(t,s)}return o>=1?(a.event&&a.event.end.call(t),c()):void 0}function c(){return --r.count?r[i]=void 0:t[e]=void 0,1}var d,f,p=a.delay,g=s.getActiveTimer(),m=[];return g.t=p+l,n>=p?h(n-p):void (g.c=h)},0,l)}}function n(){return ++d}function r(t){return null==t?"__transition__":"__transition_"+t+"__"}function a(t){return t&&(t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView)}var o=t("../utils/BaseUtils"),s=t("../utils/Timer"),h=t("../utils/vMap"),l=t("../utils/Interpolator"),u=t("../utils/BezierEasing"),c=o.isSupportSVG(),d=0,f=function(t,e,a,o){var s=n(),h=r(e); +a=a||{time:Date.now(),ease:u.ease("linear"),delay:0,duration:250},t.node||(t.node=function(){return t}),this.noAnimation=o||!c,o&&(a.time=0),i(t.node(),h,s,a),this.elW=t,this.namespace=h,this.id=s,this.name=e};return o.extend(f.prototype,{setAnimation:function(t){for(var e in t){this[e]&&this[e](t[e])}return this},tween:function(t,e){var i=this.id,n=this.namespace,r=this.elW.node();return arguments.length<2?r[n][i].tween.get(t):(null==e?r[n][i].tween.remove(t):r[n][i].tween.set(t,e),this)},attr:function(t,i){function n(){this.removeAttribute(h) +}function r(){this.removeAttributeNS(h.space,h.local)}function a(t){return null==t?n:(t+="",function(){var e,i=this.getAttribute(h);return i!==t&&(e=s(i,t),function(t){this.setAttribute(h,e(t))})})}function o(t){return null==t?r:(t+="",function(){var e,i=this.getAttributeNS(h.space,h.local);return i!==t&&(e=s(i,t),function(t){this.setAttributeNS(h.space,h.local,e(t))})})}if(arguments.length<2){for(i in t){this.attr(i,t[i])}return this}if(this.noAnimation){return this.elW.attr(t,i),this}var s="transform"==t?l.interpolateTransform:l,h=t; +return e(this,"attr."+t,i,h.local?o:a)},attrTween:function(t,e){function i(t,i){var n=e.call(this,t,i,this.getAttribute(r));return n&&function(t){this.setAttribute(r,n(t))}}function n(t,i){var n=e.call(this,t,i,this.getAttributeNS(r.space,r.local));return n&&function(t){this.setAttributeNS(r.space,r.local,n(t))}}if(arguments.length<2){for(e in t){this.attrTween(e,t[e])}return this}var r=t;if(this.noAnimation){var a=e.call(this.elW.node());return this.elW.attr(r,a(1)),this}return this.tween("attr."+t,r.local?n:i) +},style:function(t,i,n){function r(){this.style.removeProperty(t)}function o(e){return null==e?r:(e+="",function(){var i,r=a(this).getComputedStyle(this,null).getPropertyValue(t);return r!==e&&(i=l(r,e),function(e){try{this.style.setProperty(t,i(e),n)}catch(r){}})})}var s=arguments.length;if(3>s){if("string"!=typeof t){2>s&&(i="");for(n in t){this.style(n,t[n],i)}return this}n=""}return this.noAnimation?(this.elW.style&&this.elW.style(t,i),this):e(this,"style."+t,i,o)},styleTween:function(t,e,i){function n(n,r){var o=e.call(this,n,r,a(this).getComputedStyle(this,null).getPropertyValue(t)); +return o&&function(e){try{this.style.setProperty(t,o(e),i)}catch(n){}}}if(arguments.length<3&&(i=""),this.noAnimation){var r=e.call(this.elW.node());return this.elW.style(t,r(1)),this}return this.tween("style."+t,n)},remove:function(){var t=this.namespace;return this.each("end.transition",function(){var e;this[t].count<2&&(e=this.parentNode)&&e.removeChild(this)})},each:function(t,e){var i=this.elW.node(),n=this.id,r=this.namespace,a=i[r][n];return(a.event||(a.event=o.dispatch("start","end","interrupt"))).on(t,e),this +},ease:function(t){var e=this.id,i=this.namespace,n=this.elW.node();return arguments.length<1?n[i][e].ease:("function"!=typeof t&&(t=u.ease.apply(null,arguments)),n[i][e].ease=t,this)},delay:function(t){var e=this.id,i=this.namespace,n=this.elW.node();return arguments.length<1?n[i][e].delay:(t=+t,n[i][e].delay=t,this)},duration:function(t){var e=this.id,i=this.namespace,n=this.elW.node();return arguments.length<1?n[i][e].duration:(t=Math.max(1,t),n[i][e].duration=t,this)},transition:function(t){var e=this.id,i=this.namespace,n=this.elW.node(),r=n[i][e]; +return new f(this.elW,this.name,{time:r.time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration},this.noAnimation).setAnimation(t)},animate:function(t){return this.setAnimation(t)}}),f.d3_transitionNamespace=r,f.nextTransitionID=n,f}),define("vector/ElementWrapper",["require","../utils/Class","../dom/DomUtils","./Transition","../utils/BaseUtils","../Constants"],function(t){var e=t("../utils/Class"),i=t("../dom/DomUtils"),n=t("./Transition"),r=t("../utils/BaseUtils").isArray,a=t("../Constants"),o=e.extend({initialize:function(t,e){return this.rawElement=t,this.renderer=e,this +},node:function(){return this.rawElement},addTo:function(t){return t=t||this.renderer._container,t.append(this),this},addToBack:function(t){return t=t||this.renderer._container,t=t.node(),t.firstChild?t.insertBefore(this.node(),t.firstChild):t.appendChild(this.node()),this},add:function(){return"div"===this.type?this.addTo(this.renderer._divContainer):this.addTo(this.renderer._container)},append:function(t){return this.node().appendChild(t.node()),t},datum:function(){return arguments.length?(this._datum=arguments[0],this):this._datum +},addClass:function(t){return i.addClass(this.node(),t),this},remove:function(){return i.remove(this.node()),this},removed:function(){return !(this.node().parentNode&&this.node().parentNode.tagName)},isVisible:function(){return !this.removed()&&"none"!=this.node().style.display},setType:function(t){return this.type=t,this},vRotate:function(t,e){return this.renderer.vRotate(this,t,e),this},vMiddle:function(){this.renderer.vMiddle(this)},animate:function(t){if(t){if(r(t)){for(var e=this.transition().setAnimation(t[0]),i=1,n=t.length; +n>i;i++){e=e.transition(t[i])}return this.setTransitionEnd(e,t[n-1].style)}return this.setTransitionEnd(this.transition().setAnimation(t),t.style)}throw new Error("animate para empty")},setTransitionEnd:function(t,e){var i=this,n=this.renderer.vanchart;return ++n.animationCount,i._animating&&--n.animationCount,i._animating=!0,t.each("end",function(){i._animating=!1,e&&i.style(e),n._animationStarted&&(--n.animationCount||(n.animationCount=-1,n.fire("animationEnd")))})},effectTransition:function(){return this.interrupt(a.EFFECT_KEY),new n(this,a.EFFECT_KEY) +},transition:function(t){return new n(this,t,null,!this.renderer.isAnimation)},interrupt:function(t){var e,i=this.node(),r=n.d3_transitionNamespace(t);return(e=i[r])&&e[e.active]&&(--e.count?delete e[e.active]:delete i[r],e.active+=0.5),this},removeTransition:function(t){var e=this.node(),i=n.d3_transitionNamespace(t);return e&&e[i]&&delete e[i],this},removeEffectTransition:function(){return this.removeTransition(a.EFFECT_KEY)}});return o}),define("vector/Renderer",["require","./Layer","../dom/DomUtils","../dom/Browser","../utils/Bounds","../utils/BaseUtils","./ElementWrapper"],function(t){var e=t("./Layer"),i=t("../dom/DomUtils"),n=t("../dom/Browser"),r=t("../utils/Bounds"),a=t("../utils/BaseUtils"),o=t("./ElementWrapper"),s=0,h=e.extend({initialize:function(t,e,i){this.dom=t,this.vanchart=e,this.config=i,this.isSupportSVG=a.isSupportSVG(),this.isAnimation=this.isSupportSVG&&a.pick(this.vanchart.options.plotOptions.animation,!0) +},resize:function(){},remove:function(){i.remove(this._container.node()),i.remove(this._divContainer.node()),this.off("update",this._updatePaths,this)},div:function(t){var e=new o(document.createElement("div"),this).setType("div").style({position:"absolute",left:0,top:0});return e.isHtml=t,e},vgroup:function(){var t=this.div(),e=this.group();return{divG:t,renderG:e,type:"vgroup",attr:function(){return this.divG.attr.apply(this.divG,arguments),this.renderG.attr.apply(this.renderG,arguments),this},style:function(){return this.divG.style.apply(this.divG,arguments),this.renderG.style.apply(this.renderG,arguments),this +},append:function(i){return"div"===i.type&&i.isHtml?t.append(i):"vgroup"===i.type?(t.append(i.divG),e.append(i.renderG)):e.append(i),i},add:function(t){return t?this.renderG.addTo(t):this.renderG.add(),this.divG.add(),this},remove:function(){this.divG.node()&&this.divG.remove(),this.renderG.node()&&this.renderG.remove()},node:function(){return e.node()},vRotate:function(t){isNaN(t)||(this.divG.vRotate(t),this.renderG.vRotate(t))}}},vtext:function(t){return t||!this.isSupportSVG?this.div(t):this.text() +},vtspan:function(t){return t||!this.isSupportSVG?this.div(t):this.tspan()},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&i.addClass(this._container.node(),"leaflet-zoom-animated")),this.dom.appendChild(this._container.node()),this._divContainer&&this.dom.appendChild(this._divContainer.node()),this._update(),this.on("update",this._updatePaths,this)},_update:function(){var t=this.vanchart.getSize();if(this._bounds=new r([0,0],t),this._map){var e=s,i=this._map.containerPointToLayerPoint(t.multiplyBy(-e)).round(); +this._bounds=new r(i,i.add(t.multiplyBy(1+2*e)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom); +var t=this.vanchart._layers;for(var e in t){t[e]._path&&t[e]._reset()}},_onZoomEnd:function(){var t=this.vanchart._layers;for(var e in t){t[e]._path&&t[e]._project()}},_updatePaths:function(){var t=this.vanchart._layers;for(var e in t){t[e]._path&&t[e]._update()}},_updateTransform:function(t,e){var r=this._container.node(),o=this._map.getZoomScale(e,this._zoom),h=i.getPosition(r),l=this._map.getSize().multiplyBy(0.5+s),u=this._map.project(this._center,e),c=this._map.project(t,e),d=c.subtract(u),f=l.multiplyBy(-o).add(h).add(l).subtract(d); +n.any3d?i.setTransform(r,f,o):a.isSupportSVG()?i.setPosition(r,f):(r.style.left="0px",r.style.top="0px")}});return h}),define("vector/SvgRenderer",["require","./Renderer","../dom/DomUtils","../utils/BaseUtils","./ElementWrapper","../utils/ColorUtils"],function(t){function e(t){var e,i;return e=t.match(/translate\(\s*([\d|.|e|-]+)(?:[,\s]*)([\d|.|e|-]*)\s*\)/i),e&&e.shift(),i=t.match(/rotate\(\s*([\d|.|e|-]+[degratun]*)(?:[,\s]*)([\d|.|e|-]*)(?:[,\s]*)([\d|.|e|-]*)\s*\)/i),i=i&&i[1]||0,{translate:e,rotate:i} +}function i(){h||(h=!0,o.include({imageContent:function(t){return this.node().setAttributeNS("http://www.w3.org/1999/xlink","href",t),this},textContent:function(t){return"div"===this.type?this.node().innerHTML=t:this.node().textContent=t,this},attr:function(){return"div"===this.type?this.style.apply(this,arguments):r.attr.apply(null,[this.node()].concat(a.objectToArray(arguments))),this},style:function(t){var i;2===arguments.length?(i={},i[arguments[0]]=arguments[1]):i=arguments[0];var n,r=this.styles,o={},s=this.node(),h="",l=!r; +if(i&&i.color&&(i.fill=i.color),i&&i.fill&&"div"===this.type&&(i.color=i.fill),r){for(n in i){i[n]!==r[n]&&(o[n]=i[n],l=!0)}}if(l){if("div"===this.type){var u={x:"left",y:"top",dx:"margin-left"};for(var c in u){var d;null!=(d=o[c])&&(o[u[c]]=/em/gi.test(d)?d:d+"px",delete o[c])}if(o.transform){var f=e(o.transform.replace(/px/gi,""));f.translate&&(o[a.transPrefix+"transform"]="translate("+f.translate[0]+"px,"+f.translate[1]+"px)")}}r&&(i=a.extend(r,o)),this.styles=i;var p=function(t,e){return"-"+e.toLowerCase() +};for(n in i){h+=n.replace(/([A-Z])/g,p)+":"+i[n]+";"}s.style.cssText=h,i.fill&&(s.style.fill=i.fill)}return this}}))}var n=t("./Renderer"),r=t("../dom/DomUtils"),a=t("../utils/BaseUtils"),o=t("./ElementWrapper"),s=t("../utils/ColorUtils"),h=!1,l=n.extend({_initContainer:function(){i(),this._container=new o(this.create("svg"),this),this.defs=new o(this.create("defs"),this).addTo(this._container),this._divContainer=this.div().style({"white-space":"nowrap","pointer-events":"none"})},resize:function(){var t=this.vanchart.width,e=this.vanchart.height; +this._container.style({width:t+"px",height:e+"px"})},_update:function(){if(!(this._map&&this._map._animatingZoom&&this._bounds)){n.prototype._update.call(this);var t=this._bounds,e=t.getSize(),i=this._container.node();this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,i.setAttribute("width",e.x),i.setAttribute("height",e.y)),r.setPosition(i,t.min),this._map&&i.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},line:function(t){return new o(this.create("line"),this).attr(t) +},rect:function(t){return new o(this.create("rect"),this).attr(t)},circle:function(t){return new o(this.create("circle"),this).attr(t)},path:function(t){return new o(this.create("path"),this).attr(t)},text:function(t){return new o(this.create("text"),this).attr(t)},tspan:function(t){return new o(this.create("tspan"),this).attr(t)},image:function(t){return new o(this.create("image"),this).attr(t)},group:function(t){return new o(this.create("g"),this).attr(t)},mask:function(t){return new o(this.create("mask"),this).attr(t) +},colorGradient:function(t,e,i){i=i||"linearGradient";var n=new o(this.create(i),this);t.id=a.stamp(n),n.attr(t);var r=function(t){if(isNaN(t["stop-opacity"])){var e=s.colorToHexAlpha(t["stop-color"]);t["stop-color"]=e.hex,t["stop-opacity"]=e.alpha}return t};n.stops=[];for(var h=0,l=e.length;l>h;h++){n.stops[h]=new o(this.create("stop"),this).attr(r(e[h])).addTo(n)}return n.addTo(this.defs)},updateColorGradient:function(t,e,i){t.attr(e);for(var n=0,r=i.length;r>n;n++){t.stops[n].attr(i[n])}},createClip:function(t,e){e=e||"rect"; +var i=new o(this.create("clipPath"),this);return i.attr("id",a.stamp(i)),i.setType(e),i[e]=new o(this.create(e),this).attr(t).addTo(i),i.addTo(this.defs),i},clip:function(t,e){t.attr("clip-path","url(#"+a.stamp(e)+")")},updateClip:function(t,e){t&&t[t.type].attr(e)},imagePattern:function(t,e,i){var n=new o(this.create("pattern"),this);return t.id=a.stamp(n),n.attr(t),n.image=new o(this.create("image"),this).addTo(n),n.image.attr(e),n.image.imageContent(i),n.image._imageUrl=i,n.addTo(this.defs),n},updateImagePattern:function(t,e,i,n){t.attr(e),t.image.attr(i),t.image._imageUrl!=n&&(t.image.imageContent(n),t.image._imageUrl=n) +},createDropShadowFilter:function(t,e,i,n,r,s,h){r=r||0,s=s||0,h=h||0;var l=new o(this.create("filter"),this),u=a.stamp(l);return l.attr({id:u,x:"-50%",y:"-50%",width:"200%",height:"200%"}),this.updateDropShadowFilter(l,t,e,i,n,r,s,h),l.feBlend=l.feBlend||new o(this.create("feBlend"),this).addTo(l),l.feBlend.attr({"in":"SourceGraphic",in2:"blurOut",mode:"normal"}),l.addTo(this.defs),l},updateDropShadowFilter:function(t,e,i,n,r,a,s,h){a=a||0,s=s||0,h=h||0,t.feOffset=t.feOffset||new o(this.create("feOffset"),this).addTo(t),t.feOffset.attr({"in":"SourceGraphic",dx:e,dy:i,result:"offOut"}),t.feColorMatrix=t.feColorMatrix||new o(this.create("feColorMatrix"),this).addTo(t),t.feColorMatrix.attr({"in":"offOut",type:"matrix",values:a+" 0 0 0 0 0 "+s+" 0 0 0 0 0 "+h+" 0 0 0 0 0 "+n+" 0",result:"matrixOut"}),t.feGaussianBlur=t.feGaussianBlur||new o(this.create("feGaussianBlur"),this).addTo(t),t.feGaussianBlur.attr({"in":"matrixOut",stdDeviation:r,result:"blurOut"}) +},createInnerShadowFilter:function(t,e,i,n){var r=new o(this.create("filter"),this),s=a.stamp(r);return r.attr({id:s,x:"-50%",y:"-50%",width:"200%",height:"200%"}),r.feComponentTransfer=r.feComponentTransfer||new o(this.create("feComponentTransfer"),this).attr({"in":"SourceAlpha"}).addTo(r),r.feComponentTransfer.feFuncA=r.feComponentTransfer.feFuncA||new o(this.create("feFuncA"),this).attr({type:"table",tableValues:"1 0"}).addTo(r.feComponentTransfer),r.feGaussianBlur=r.feGaussianBlur||new o(this.create("feGaussianBlur"),this).addTo(r),r.feGaussianBlur.attr("stdDeviation",n),r.feOffset=r.feOffset||new o(this.create("feOffset"),this).addTo(r),r.feOffset.attr({dx:t,dy:e,result:"offsetblur"}),r.feFlood=r.feFlood||new o(this.create("feFlood"),this).addTo(r),r.feFlood.attr({"flood-color":"black","flood-opacity":i,result:"color"}),r.feComposite1=r.feComposite1||new o(this.create("feComposite"),this).attr({in2:"offsetblur",operator:"in"}).addTo(r),r.feComposite2=r.feComposite2||new o(this.create("feComposite"),this).attr({in2:"SourceAlpha",operator:"in"}).addTo(r),r.merge=r.merge||new o(this.create("feMerge"),this).addTo(r),r.merge.feMergeNode1=r.merge.feMergeNode1||new o(this.create("feMergeNode"),this).attr("in","SourceGraphic").addTo(r.merge),r.merge.feMergeNode2=r.merge.feMergeNode2||new o(this.create("feMergeNode"),this).addTo(r.merge),r.addTo(this.defs),r +},create:function(t){return document.createElementNS("http://www.w3.org/2000/svg",t)},vRotate:function(t,i,n){var r,o,s,h=t.node();if("div"===t.type){o=t.styles[a.transPrefix+"transform"]||"",o&&(r=e(o.replace(/px/gi,"")),o="",r.translate&&(o="translate("+r.translate[0]+"px,"+r.translate[1]+"px) ")),s="rotate("+i+"deg)",o+=s;var l=a.transPrefix+"transform";t.styles[l]=o,h.style[l]=o}else{var u=a.getTextBBoxWithRotation(t,0),c=u.width/2,d=u.height/2-1;c+=+h.getAttribute("x")||0,d+=+h.getAttribute("y")||0,o=h.getAttribute("transform")||"",o&&(r=e(o),o="",r.translate&&(o="translate("+r.translate[0]+" "+r.translate[1]+") ")),s="rotate("+i+" "+c+" "+d+")",o+=s,n||t.attr("transform",o) +}return t.rotateStr=s,this},vMiddle:function(t){if("div"===t.type){var e=t.node(),i=e.offsetWidth;e.style.marginLeft=-i/2+"px"}else{t.attr("text-anchor","middle")}return this}});return l.include({getEvents:function(){var t=n.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_onZoomStart:function(){this._update()}}),l}),define("utils/PathUtils",["require"],function(t){function e(t){var e=/([clmz]),?([^clmz]*)/gi,i={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},n=/[ahqstv]/gi,a=h; +if(String(t).match(n)&&(a=r),n=/[clmz]/g,a==h&&!String(t).match(n)){var o=String(t).replace(e,function(t,e,n){var r=[],a="m"==e.toLowerCase(),o=i[e];return n.replace(L,function(t){a&&2===r.length&&(o+=r+i["m"==e?"l":"L"],r=[]),r.push(x(t*w))}),o+r});return o}var s,l,u=a(t);o=[];for(var c=0,d=u.length;d>c;c++){s=u[c],l=u[c][0].toLowerCase(),"z"==l&&(l="x");for(var f=1,p=s.length;p>f;f++){l+=x(s[f]*w)+(f!=p-1?",":P)}o.push(l)}return o.join(M)}function i(t){if(!t&&"string"!=typeof t){return null}var e={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},i=[]; +return String(t).replace(f,function(t,n,r){var a=[],o=n.toLowerCase();if(r.replace(p,function(t,e){e&&a.push(+e)}),"m"==o&&a.length>2&&(i.push([n][g](a.splice(0,2))),o="l",n="m"==n?"l":"L"),"r"==o){i.push([n][g](a))}else{for(;a.length>=e[o]&&(i.push([n][g](a.splice(0,e[o]))),e[o]);){}}}),i.toString=n,i}function n(){return this.join(",").replace(C,"$1")}function r(t,e){for(var i=h(t),n=e&&h(e),r={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},l={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},u=(function(t,e,i){var n,r,h={T:1,Q:1}; +if(!t){return["C",e.x,e.y,e.x,e.y,e.x,e.y]}switch(!(t[0] in h)&&(e.qx=e.qy=null),t[0]){case"M":e.X=t[1],e.Y=t[2];break;case"A":t=["C"][g](s[m](0,[e.x,e.y][g](t.slice(1))));break;case"S":"C"==i||"S"==i?(n=2*e.x-e.bx,r=2*e.y-e.by):(n=e.x,r=e.y),t=["C",n,r][g](t.slice(1));break;case"T":"Q"==i||"T"==i?(e.qx=2*e.x-e.qx,e.qy=2*e.y-e.qy):(e.qx=e.x,e.qy=e.y),t=["C"][g](a(e.x,e.y,e.qx,e.qy,t[1],t[2]));break;case"Q":e.qx=t[1],e.qy=t[2],t=["C"][g](a(e.x,e.y,t[1],t[2],t[3],t[4]));break;case"L":t=["C"][g](o(e.x,e.y,t[1],t[2])); +break;case"H":t=["C"][g](o(e.x,e.y,t[1],e.y));break;case"V":t=["C"][g](o(e.x,e.y,e.x,t[1]));break;case"Z":t=["C"][g](o(e.x,e.y,e.X,e.Y))}return t}),c=function(t,e){if(t[e].length>7){t[e].shift();for(var r=t[e];r.length;){f[e]="A",n&&(p[e]="A"),t.splice(e++,0,["C"][g](r.splice(0,6)))}t.splice(e,1),T=_(i.length,n&&n.length||0)}},d=function(t,e,r,a,o){t&&e&&"M"==t[o][0]&&"M"!=e[o][0]&&(e.splice(o,0,["M",a.x,a.y]),r.bx=0,r.by=0,r.x=t[o][1],r.y=t[o][2],T=_(i.length,n&&n.length||0))},f=[],p=[],v="",y="",x=0,T=Math.max(i.length,n&&n.length||0); +T>x;x++){i[x]&&(v=i[x][0]),"C"!=v&&(f[x]=v,x&&(y=f[x-1])),i[x]=u(i[x],r,y),"A"!=f[x]&&"C"==v&&(f[x]="C"),c(i,x),n&&(n[x]&&(v=n[x][0]),"C"!=v&&(p[x]=v,x&&(y=p[x-1])),n[x]=u(n[x],l,y),"A"!=p[x]&&"C"==v&&(p[x]="C"),c(n,x)),d(i,n,r,l,x),d(n,i,l,r,x);var b=i[x],A=n&&n[x],C=b.length,L=n&&A.length;r.x=b[C-2],r.y=b[C-1],r.bx=parseFloat(b[C-4])||r.x,r.by=parseFloat(b[C-3])||r.y,l.bx=n&&(parseFloat(A[L-4])||l.x),l.by=n&&(parseFloat(A[L-3])||l.y),l.x=n&&A[L-2],l.y=n&&A[L-1]}return n?[i,n]:i}function a(t,e,i,n,r,a){var o=1/3,s=2/3; +return[o*t+s*i,o*e+s*n,o*r+s*i,o*a+s*n,r,a]}function o(t,e,i,n){return[t,e,i,n,i,n]}function s(t,e,i,n,r,a,o,h,l,u){var c,d=120*T/180,f=T/180*(+r||0),p=[],m=function(t,e,i){var n=t*y.cos(i)-e*y.sin(i),r=t*y.sin(i)+e*y.cos(i);return{x:n,y:r}};if(u){S=u[0],E=u[1],P=u[2],w=u[3]}else{c=m(t,e,-f),t=c.x,e=c.y,c=m(h,l,-f),h=c.x,l=c.y;var v=(y.cos(T/180*r),y.sin(T/180*r),(t-h)/2),_=(e-l)/2,x=v*v/(i*i)+_*_/(n*n);x>1&&(x=y.sqrt(x),i=x*i,n=x*n);var C=i*i,L=n*n,M=(a==o?-1:1)*y.sqrt(b((C*L-C*_*_-L*v*v)/(C*_*_+L*v*v))),P=M*i*_/n+(t+h)/2,w=M*-n*v/i+(e+l)/2,S=y.asin(((e-w)/n).toFixed(9)),E=y.asin(((l-w)/n).toFixed(9)); +S=P>t?T-S:S,E=P>h?T-E:E,0>S&&(S=2*T+S),0>E&&(E=2*T+E),o&&S>E&&(S-=2*T),!o&&E>S&&(E-=2*T)}var O=E-S;if(b(O)>d){var R=E,k=h,D=l;E=S+d*(o&&E>S?1:-1),h=P+i*y.cos(E),l=w+n*y.sin(E),p=s(h,l,i,n,r,0,o,k,D,[E,R,P,w])}O=E-S;var I=y.cos(S),B=y.sin(S),N=y.cos(E),G=y.sin(E),F=y.tan(O/4),H=4/3*i*F,z=4/3*n*F,U=[t,e],V=[t+H*B,e-z*I],W=[h+H*G,l-z*N],X=[h,l];if(V[0]=2*U[0]-V[0],V[1]=2*U[1]-V[1],u){return[V,W,X][g](p)}p=[V,W,X][g](p).join()[A](",");for(var Y=[],Z=0,q=p.length;q>Z;Z++){Y[Z]=Z%2?m(p[Z-1],p[Z],f).y:m(p[Z],p[Z+1],f).x +}return Y}function h(t){if("string"==typeof t&&(t=i(t)),!t||!t.length){return[["M",0,0]]}var e=[],r=0,a=0,o=0,s=0,h=0;"M"==t[0][0]&&(r=+t[0][1],a=+t[0][2],o=r,s=a,h++,e[0]=["M",r,a]);for(var u,c,d=3===t.length&&"M"===t[0][0]&&"R"===t[1][0].toUpperCase()&&"Z"===t[2][0].toUpperCase(),f=h,p=t.length;p>f;f++){if(e.push(u=[]),c=t[f],c[0]!=v.call(c[0])){switch(u[0]=v.call(c[0]),u[0]){case"A":u[1]=c[1],u[2]=c[2],u[3]=c[3],u[4]=c[4],u[5]=c[5],u[6]=+(c[6]+r),u[7]=+(c[7]+a);break;case"V":u[1]=+c[1]+a;break; +case"H":u[1]=+c[1]+r;break;case"R":for(var m=[r,a][g](c.slice(1)),_=2,y=m.length;y>_;_++){m[_]=+m[_]+r,m[++_]=+m[_]+a}e.pop(),e=e[g](l(m,d));break;case"M":o=+c[1]+r,s=+c[2]+a;default:for(_=1,y=c.length;y>_;_++){u[_]=+c[_]+(_%2?r:a)}}}else{if("R"==c[0]){m=[r,a][g](c.slice(1)),e.pop(),e=e[g](l(m,d)),u=["R"][g](c.slice(-2))}else{for(var x=0,T=c.length;T>x;x++){u[x]=c[x]}}}switch(u[0]){case"Z":r=o,a=s;break;case"H":r=u[1];break;case"V":a=u[1];break;case"M":o=u[u.length-2],s=u[u.length-1];default:r=u[u.length-2],a=u[u.length-1] +}}return e.toString=n,e}function l(t,e){for(var i=[],n=0,r=t.length;r-2*!e>n;n+=2){var a=[{x:+t[n-2],y:+t[n-1]},{x:+t[n],y:+t[n+1]},{x:+t[n+2],y:+t[n+3]},{x:+t[n+4],y:+t[n+5]}];e?n?r-4==n?a[3]={x:+t[0],y:+t[1]}:r-2==n&&(a[2]={x:+t[0],y:+t[1]},a[3]={x:+t[2],y:+t[3]}):a[0]={x:+t[r-2],y:+t[r-1]}:r-4==n?a[3]=a[2]:n||(a[0]={x:+t[n],y:+t[n+1]}),i.push(["C",(-a[0].x+6*a[1].x+a[2].x)/6,(-a[0].y+6*a[1].y+a[2].y)/6,(a[1].x+6*a[2].x-a[3].x)/6,(a[1].y+6*a[2].y-a[3].y)/6,a[2].x,a[2].y])}return i}function u(t,i,n,r,a){var o=a?[["M",t+a,i],["l",n-2*a,0],["a",a,a,0,0,1,a,a],["l",0,r-2*a],["a",a,a,0,0,1,-a,a],["l",2*a-n,0],["a",a,a,0,0,1,-a,-a],["l",0,2*a-r],["a",a,a,0,0,1,a,-a],["z"]]:[["M",t,i],["l",n,0],["l",0,r],["l",-n,0],["z"]]; +return e(o)}function c(t,i,n){return e([["M",t,i],["m",0,-n],["a",n,n,0,1,1,0,2*n],["a",n,n,0,1,1,0,-2*n],["z"]])}function d(t,i,n,r){return e([["M",t,i],["L",n,r]])}var f=/([achlmrqstvz])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,p=/(-?\d*\.?\d*(?:e[\-+]?\d+)?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/gi,g="concat",m="apply",v=String.prototype.toUpperCase,_=Math.max,y=Math,x=y.round,T=y.PI,b=Math.abs,A="split",C=/,?([achlmqrstvxz]),?/gi,L=/-?\d*\.?\d+(?:[eE][\-+]?\d+)?/g,M=" ",P="",w=1; +return{path2vml:e,rectPath:u,linePath:d,circlePath:c}}),define("vector/VmlRenderer",["require","./Renderer","../utils/PathUtils","../utils/BaseUtils","../utils/ColorUtils","./ElementWrapper","../dom/DomUtils"],function(t){function e(t){var e,i;return e=t.match(/translate\(\s*([\d|.|e|-]+)(?:[,\s]*)([\d|.|e|-]*)\s*\)/i),e&&e.shift(),i=t.match(/rotate\(\s*([\d|.|e|-]+[degratun]*)(?:[,\s]*)([\d|.|e|-]*)(?:[,\s]*)([\d|.|e|-]*)\s*\)/i),i=i&&i[1]||0,{translate:e,rotate:i}}function i(){c||(c=!0,s.include({imageContent:function(t){return this.style({src:t}),this +},textContent:function(t){return"div"===this.type?this.node().innerHTML=t:this.node().textContent=t,this},attr:function(){return"div"===this.type?this.style.apply(this,arguments):this.renderer.attr(this,arguments),this},style:function(){var t;return 2===arguments.length?(t={},t[arguments[0]]=arguments[1]):t=arguments[0],this.renderer.style(this,t),this}}))}var n=t("./Renderer"),r=t("../utils/PathUtils"),a=t("../utils/BaseUtils"),o=t("../utils/ColorUtils"),s=t("./ElementWrapper"),h=t("../dom/DomUtils"),l="position:absolute;left:0px;top:0px;width:1px;height:1px;behavior:url(#default#VML);display:inline-block;",u="position:absolute;behavior:url(#default#VML);display:inline-block;",c=!1,d=n.extend({_initContainer:function(){i(); +var t=this.div().style({"white-space":"nowrap",display:"inline-block"});return h.addClass(t.node(),"van-vml"),this.dom.appendChild(t.node()),this._divContainer=t,this._container=t,t},line:function(t){return this._shapeWithPath(t,"line")},rect:function(t){return this._shapeWithPath(t,"rect")},circle:function(t){return this._shapeWithPath(t,"circle")},path:function(t){return this._shapeWithPath(t,"path")},image:function(t){var e=new s(document.createElement("image"),this).setType("image");return e.attr(t),e +},group:function(t){var e=this.div().style({"white-space":"nowrap","pointer-events":"none"});return e.attr(t)},colorGradient:function(t,e,i){return i=i||"linearGradient",{type:i,attrs:t,stops:e,elements:[]}},updateColorGradient:function(t,e,i){t.attrs=e,t.stops=i},_updateGradientFill:function(t,e){var i=t.node(),n=t._fill,r=e.stops,a=e.attrs;if(n){i.removeChild(n),n.on=!0,n.method="none",n.color=r[0]["stop-color"],n.color2=r[r.length-1]["stop-color"];for(var o=[],s=0,h=r.length;h>s;s++){var l=100*r[s].offset+"%"; +o.push(l+" "+r[s]["stop-color"])}n.type="gradient",n.angle=a.x1==a.x2?0:270,i.appendChild(n)}},textContent:function(t,e){},text:function(){return this.vtext(!1)},tspan:function(){return this.vtspan(!1)},_shapeWithPath:function(t,e){var i=new s(this.create("shape"),this).setType(e),n=i.rawElement;return n.style.cssText=l,n.coordsize="1 1",i.attr(t)},create:function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("') +}}catch(t){return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),createClip:function(t,e){return e&&"rect"!=e?void 0:{x:t.x,y:t.y,width:t.width,height:t.height,clipped:[]}},_getClipStr:function(t,e){var i=e.y||0,n=e.x||0;if("div"!=t.type){var r=t.isLineChart?t.node().parentNode.firstChild:t.node(),a=r.style.visibility;r.style.visibility="hidden",r.style.visibility="visible",r.style.visibility=a,i-=r.offsetTop,n-=r.offsetLeft}var o=n+e.width,s=i+e.height; +return"rect("+i+"px "+o+"px "+s+"px "+n+"px)"},clip:function(t,e){if(e){var i;t.node&&(i=t.node())&&(i.style.clip=this._getClipStr(t,e),i.clip="True",e.clipped.indexOf(t)<0&&e.clipped.push(t))}},updateClip:function(t,e){var i=this;t&&(a.extend(t,e),t.clipped.forEach(function(e){var n=e.node();n&&(n.style.clip=i._getClipStr(e,t))}))},imagePattern:function(t,e){},createDropShadowFilter:function(){return{}},createInnerShadowFilter:function(){return{}},attr:function(t,i){if(i&&!(i.length<=0)&&i[0]){var n={},o=t.rawElement; +2===i.length?n[i[0]]=i[1]:n=i[0];var s=t.attrs,h=t.type;if(n=s?a.extend(s,n):a.extend({},n),t.attrs=n,n.transform){var l=e(n.transform);try{l.translate&&(o.style.left=l.translate[0]+"px",o.style.top=l.translate[1]+"px")}catch(u){}l.rotate}if("image"==h){o.style.position="absolute",o.style.left=n.x+"px",o.style.top=n.y+"px",o.style.width=n.width+"px",o.style.height=n.height+"px"}else{if("group"!=h){var c="";"rect"==h?c=r.rectPath(n.x||0,n.y||0,n.width,n.height,n.rx):"line"==h?c=r.linePath(n.x1,n.y1,n.x2,n.y2):"path"==h?c=r.path2vml(n.d):"circle"==h&&(c=r.circlePath(n.cx||0,n.cy||0,n.r)),o.path=c +}}}},style:function(t,i){var n,r=t.styles,s={},h=t.rawElement;if(i&&i.color&&(i.fill=i.color),i&&i.fill&&"div"===t.type&&(i.color=i.fill),r){for(n in i){i[n]!==r[n]&&(s[n]=i[n])}}if("div"===t.type){if(s.transform){var l=e(s.transform.replace(/px/gi,""));l.translate&&(s.transform="",s.x=l.translate[0],s.y=l.translate[1])}var c={x:"left",y:"top",dx:"margin-left"};for(var d in c){var f;null!=(f=s[d])&&(s[c[d]]=/em/gi.test(f)?f:f+"px",delete s[d])}}if(r&&(i=a.extend(r,s)),t.styles=i,"div"===t.type){var p=function(t,e){return"-"+e.toLowerCase() +},g=1;if(/rgba/i.test(i.color)){var m=o.colorToHexAlpha(i.color);i.color=m.hex,g=m.alpha}a.hasDefined(i["fill-opacity"])&&(g*=i["fill-opacity"]),1>g&&(i.filter="progid:DXImageTransform.Microsoft.Alpha(Opacity="+100*g+")");var v="";for(n in i){v+=n.replace(/([A-Z])/g,p)+":"+i[n]+";"}h.style.cssText=v}else{if("group"!=t.type){if("image"==t.type){t.node().src=i.src}else{var _=t._stroke,y=t._fill,x=t.node();x.stroked=!0,x.filled=!!(i.fill&&"none"!=i.fill||"image"==t.type),_||(_=t._stroke=this.create("stroke"),_.style.cssText=u),x.appendChild(_),_.weight=(i["stroke-width"]||0)+"px"; +var T=i.stroke,b=a.hasDefined(i["stroke-opacity"])?i["stroke-opacity"]:1;if(T&&-1!=T.indexOf("rgba")&&(T=o.colorToHexAlpha(T),b*=T.alpha,T=T.hex),_.color=T,_.opacity=i["stroke-width"]?b:0,i["stroke-dasharray"]?_.dashStyle=i["stroke-dasharray"].replace(/( *, *)/g," "):_.dashStyle="","round"==i["stroke-linecap"]&&(_.endcap="round"),x.filled){y||(y=t._fill=this.create("fill"),y.style.cssText=u),x.appendChild(y);var A=i.fill,C=a.hasDefined(i["fill-opacity"])?i["fill-opacity"]:1;-1!=A.indexOf("rgba")&&(A=o.colorToHexAlpha(A),C*=A.alpha,A=A.hex),y.color=A,y.opacity=Math.min(1,Math.max(C,0)) +}else{y&&(x.removeChild(y),t._fill=null)}}}}"display" in i&&(t.node().style.display=i.display),"cursor" in i&&(t.node().style.cursor=i.cursor)},vRotate:function(t,e){e%=360;var i=t.node(),n=a.getTextBBoxWithRotation(t,0),r=a.getTextBBoxWithRotation(t,e),o=n.width,s=n.height,h=r.width,l=r.height;a.domRotate(i,e),i.style.marginLeft=(o-h)/2+"px",i.style.marginTop=(s-l)/2+"px"},vMiddle:function(t){var e=t.node(),i=e.offsetWidth;e.style.marginLeft=-i/2+"px"}});return d}),define("locale/en-us",[],function(){return{_locale:"en_US",startTime:"start",finishTime:"finish",duration:"duration",progress:"progress",emptyDataTip:"No data",fullScreenClose:"Close full screen",fullScreenOpen:"Full screen",menuClose:"Collapse toolbar",menuOpen:"Expand toolbar",refresh:"Refresh",sort:"Sort",toImage:"Export to image"} +}),define("locale/localeText",["require","../utils/BaseUtils","./en-us"],function(t){function e(t){return null!=n[t]?n[t]:t}var i=t("../utils/BaseUtils"),n=t("./en-us"),r="en_US";return e.setLocale=function(i){var n=e.normalizeLocale(i);if(n&&r!==n&&!/^en/.test(n)){try{var a=t("./"+n);e.setCustomLocale(a)}catch(o){}}},e.setCustomLocale=function(t){i.hasDefined(t)&&(i.extend(n,t),r=t._locale)},e.getLocale=function(){return r},e.getTextMap=function(){return n},e.i18nText=function(t){return n[t]},e.normalizeLocale=function(t){return t?t.toLowerCase().replace("_","-"):t +},e}),define("locale/zh-cn",["require"],function(t){return{_locale:"zh_CN",startTime:"\u5f00\u59cb",finishTime:"\u7ed3\u675f",duration:"\u6301\u7eed",progress:"\u8fdb\u5ea6",ganttLevels:[["yyyy[\u5e74]","N"],["yyyy[\u5e74]","N"],["yyyy[\u5e74]","QQQ"],["yyyy[,]N","MM"],["yyyy[,]QQQ","MMM"],["yyyy[,]QQQ","MMM"],["yyyy[\u5e74]MM[\u6708]","www"],["yyyy[\u5e74]MM[\u6708]dd[\u65e5]","eeeeee"],["yyyy[\u5e74]MM[\u6708]","d"],["MMM","d"],["MM[\u6708]dd[\u65e5]","a"],["MM[\u6708]dd[\u65e5]","I"],["MM[\u6708]dd[\u65e5]","H"]],emptyDataTip:"\u6570\u636e\u6ca1\u6709\u5185\u5bb9",fullScreenClose:"\u5173\u95ed\u5168\u5c4f\u5c55\u793a",fullScreenOpen:"\u5168\u5c4f\u5c55\u793a",menuClose:"\u6536\u7f29\u5de5\u5177\u680f",menuOpen:"\u5c55\u5f00\u5de5\u5177\u680f",refresh:"\u5237\u65b0",sort:"\u6392\u5e8f",toImage:"\u5bfc\u51fa"} +}),define("locale/pt-pt",[],function(){return{_locale:"pt-PT",fullScreenClose:"Desativar a exibi\xe7\xe3o em tela cheia",fullScreenOpen:"Exibi\xe7\xe3o em tela cheia",menuClose:"Encolher a barra de ferramentas",menuOpen:"Expandir a barra de ferramentas",refresh:"Refrescar",sort:"Ordenar",toImage:"Exportar imagem"}}),define("chart/map/LatLng",["require","../../utils/BaseUtils"],function(t){var e=t("../../utils/BaseUtils"),i=function(t,e,i){if(isNaN(t)||isNaN(e)){throw new Error("Invalid LatLng object: ("+t+", "+e+")") +}this.lat=+t,this.lng=+e,void 0!==i&&(this.alt=+i)};return i.prototype={equals:function(t,e){if(!t){return !1}t=i.create(t);var n=Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng));return(void 0===e?1e-9:e)>=n},toString:function(t){return"LatLng("+e.formatNum(this.lat,t)+", "+e.formatNum(this.lng,t)+")"},distanceTo:function(t){return L.CRS.Earth.distance(this,i.create(t))},wrap:function(){return L.CRS.Earth.wrapLatLng(this)},clone:function(){return new i(this.lat,this.lng,this.alt)}},i.create=function(t,n,r){return t instanceof i?t:e.isArray(t)&&"object"!=typeof t[0]?3===t.length?new i(t[0],t[1],t[2]):2===t.length?new i(t[0],t[1]):null:void 0===t||null===t?t:"object"==typeof t&&"lat" in t?new i(t.lat,"lng" in t?t.lng:t.lon,t.alt):void 0===n?null:new i(t,n,r) +},i}),define("chart/map/Projection",["require","../../utils/Point2D","../../utils/Bounds","./LatLng"],function(t){var e=t("../../utils/Point2D"),i=t("../../utils/Bounds"),n=t("./LatLng"),r={};return r.LonLat={project:function(t){return new e(t.lng,t.lat)},unproject:function(t){return new n(t.y,t.x)},bounds:i.create([-180,-90],[180,90])},r.SphericalMercator={R:6378137,MAX_LATITUDE:85.0511287798,project:function(t){var i=Math.PI/180,n=this.MAX_LATITUDE,r=Math.max(Math.min(n,t.lat),-n),a=Math.sin(r*i); +return new e(this.R*t.lng*i,this.R*Math.log((1+a)/(1-a))/2)},unproject:function(t){var e=180/Math.PI;return new n((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:function(){var t=6378137*Math.PI;return i.create([-t,-t],[t,t])}()},r.Mercator={R:6378137,R_MINOR:6356752.314245179,bounds:i.create([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var i=Math.PI/180,n=this.R,r=t.lat*i,a=this.R_MINOR/n,o=Math.sqrt(1-a*a),s=o*Math.sin(r),h=Math.tan(Math.PI/4-r/2)/Math.pow((1-s)/(1+s),o/2); +return r=-n*Math.log(Math.max(h,1e-10)),new e(t.lng*i*n,r)},unproject:function(t){for(var e,i=180/Math.PI,r=this.R,a=this.R_MINOR/r,o=Math.sqrt(1-a*a),s=Math.exp(-t.y/r),h=Math.PI/2-2*Math.atan(s),l=0,u=0.1;15>l&&Math.abs(u)>1e-7;l++){e=o*Math.sin(h),e=Math.pow((1-e)/(1+e),o/2),u=Math.PI/2-2*Math.atan(s*e)-h,h+=u}return new n(h*i,t.x*i/r)}},r}),define("chart/map/Transformation",["require","../../utils/Point2D"],function(t){var e=t("../../utils/Point2D"),i=function(t,e,i,n){this._a=t,this._b=e,this._c=i,this._d=n +};return i.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,i){return i=i||1,new e((t.x/i-this._b)/this._a,(t.y/i-this._d)/this._c)}},i}),define("chart/map/CRS",["require","../../utils/Bounds","./LatLng","../../utils/BaseUtils","./Projection","./Transformation"],function(t){var e=t("../../utils/Bounds"),i=t("./LatLng"),n=t("../../utils/BaseUtils"),r=t("./Projection"),a=t("./Transformation"),o={latLngToPoint:function(t,e){var i=this.projection.project(t),n=this.scale(e); +return this.transformation._transform(i,n)},pointToLatLng:function(t,e){var i=this.scale(e),n=this.transformation.untransform(t,i);return this.projection.unproject(n)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite){return null}var i=this.projection.bounds,n=this.scale(t),r=this.transformation.transform(i.min,n),a=this.transformation.transform(i.max,n); +return e.create(r,a)},infinite:!1,wrapLatLng:function(t){var e=this.wrapLng?n.wrapNum(t.lng,this.wrapLng,!0):t.lng,r=this.wrapLat?n.wrapNum(t.lat,this.wrapLat,!0):t.lat,a=t.alt;return new i(r,e,a)}};return o.Simple=n.extend({},o,{projection:r.LonLat,transformation:new a(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var i=e.lng-t.lng,n=e.lat-t.lat;return Math.sqrt(i*i+n*n)},infinite:!0}),o.Earth=n.extend({},o,{wrapLng:[-180,180],R:6371000,distance:function(t,e){var i=Math.PI/180,n=t.lat*i,r=e.lat*i,a=Math.sin(n)*Math.sin(r)+Math.cos(n)*Math.cos(r)*Math.cos((e.lng-t.lng)*i); +return this.R*Math.acos(Math.min(a,1))}}),o.EPSG3857=n.extend({},o.Earth,{code:"EPSG:3857",projection:r.SphericalMercator,transformation:function(){var t=0.5/(Math.PI*r.SphericalMercator.R);return new a(t,0.5,-t,0.5)}()}),o.EPSG900913=n.extend({},o.EPSG3857,{code:"EPSG:900913"}),o.EPSG4326=n.extend({},o.Earth,{code:"EPSG:4326",projection:r.LonLat,transformation:new a(1/180,1,-1/180,0.5)}),o.EPSG3395=n.extend({},o.Earth,{code:"EPSG:3395",projection:r.Mercator,transformation:function(){var t=0.5/(Math.PI*r.Mercator.R); +return new a(t,0.5,-t,0.5)}()}),o}),define("theme/config",["require","../Constants","../utils/QueryUtils","../utils/BaseUtils","../chart/map/CRS","../dom/Browser"],function(t){function e(){var t={pie:{plotOptions:{rotatable:!0,startAngle:0,endAngle:360,borderWidth:1,borderColor:"white",dataLabels:{formatter:{identifier:"{Y}"},enabled:!1,align:"inside"},tooltip:a()},options:{colors:A,style:P,legend:d()}},multiPie:{plotOptions:{borderWidth:1,borderColor:"rgb(255,255,255)",rotatable:!0,gradual:"lighter",innerRadius:0,startAngle:0,endAngle:360,drilldown:!0,tooltip:o(),dataLabels:{formatter:{identifier:"{NAME}"},enabled:!1,align:"inside"}},options:{colors:A,legend:d()}},treeMap:{plotOptions:{borderWidth:1,borderColor:"rgb(255,255,255)",zoom:!0,tooltip:o(),dataLabels:{formatter:{identifier:"{NAME}"},enabled:!1,align:"top"}},options:{colors:A,legend:d()}},bar:{plotOptions:{categoryGap:"20%",gap:"20%",borderRadius:0,borderWidth:1,borderColor:"white",dataLabels:{formatter:{identifier:"{Y}"},enabled:!1,align:"inside"},tooltip:i()},options:{colors:A,style:P,zoom:l(),legend:d(),xAxis:[g()],yAxis:[m()]}},column:{plotOptions:{categoryGap:"20%",gap:"20%",borderRadius:0,borderWidth:1,borderColor:"white",dataLabels:{formatter:{identifier:"{Y}"},enabled:!1,align:"inside"},tooltip:i()},options:{colors:A,style:P,zoom:l(),legend:d(),xAxis:[f()],yAxis:[p()]}},line:{plotOptions:{large:!1,connectNulls:!1,lineWidth:2,step:!1,curve:!1,marker:{radius:4.5},dataLabels:{formatter:{identifier:"{Y}"},enabled:!1,align:"outside"},tooltip:i()},options:{colors:A,zoom:l(),legend:d(),xAxis:[f()],yAxis:[p()]}},area:{plotOptions:{large:!1,connectNulls:!1,lineWidth:2,step:!1,curve:!1,marker:{radius:4.5},dataLabels:{formatter:{identifier:"{Y}"},enabled:!1,align:"outside"},tooltip:i(),fillColor:!0,fillColorOpacity:0.15},options:{colors:A,zoom:l(),legend:d(),xAxis:[f()],yAxis:[p()]}},gauge:{thermometer:{layout:"horizontal",tooltip:n(),percentageLabel:{enabled:!1,useHtml:!1,align:"left",style:{color:C[1],fontSize:12,fontFamily:L,fontWeight:"bold"},formatter:{identifier:"{PERCENT}"}},valueLabel:{enabled:!1,useHtml:!1,align:"left",style:{color:C[1],fontSize:12,fontFamily:L},formatter:{identifier:"{CATEGORY}{VALUE}"}},needle:"#ffffff",slotBackgroundColor:"#eeeeee",thermometerLayout:"vertical"},ring:{layout:"horizontal",tooltip:n(),percentageLabel:{enabled:!1,useHtml:!1,style:{fontSize:24,fontFamily:L,fontWeight:"bold"},formatter:{identifier:"{PERCENT}"}},valueLabel:{enabled:!1,useHtml:!1,style:{color:C[1],fontSize:12,fontFamily:L},formatter:{identifier:"{CATEGORY}{VALUE}"}},clockwise:!1,paneBackgroundColor:"#eeeeee",innerPaneBackgroundColor:"#f4f4f4"},pointer:{layout:"horizontal",tooltip:n(),seriesLabel:{enabled:!1,align:y.BOTTOM,useHtml:!1,style:{color:C[1],fontSize:12,fontFamily:L},formatter:{identifier:"{CATEGORY}"}},valueLabel:{enabled:!1,useHtml:!1,backgroundColor:"#F5F5F7",style:{color:C[1],fontSize:10,fontFamily:L},formatter:{identifier:"{SERIES}{VALUE}"}},needle:"#E5715A",hinge:"#656B6D",hingeBackgroundColor:"#DCF2F9",paneBackgroundColor:"#FCFCFC"},slot:{layout:"horizontal",tooltip:n(),percentageLabel:{enabled:!1,useHtml:!1,style:{fontSize:36,fontFamily:L,fontWeight:"bold",textShadow:"0px 2px 0px rgba(0,0,0,0.08)"},formatter:{identifier:"{PERCENT}"}},valueLabel:{enabled:!1,useHtml:!1,style:{color:C[1],fontSize:12,fontFamily:L},formatter:{identifier:"{CATEGORY}{VALUE}"}},needle:"#ffffff",slotBackgroundColor:"#eeeeee"},options:{colors:A,legend:d(),gaugeAxis:[{type:"value",showLabel:!0,step:1,enableTick:!0,tickColor:"#BBBBBB",tickWidth:1,enableMinorTick:!0,minorTickColor:"#e2e2e2",minorTickWidth:1,labelStyle:{color:C[1],fontFamily:L,fontSize:10}}]}},radar:{plotOptions:{fillColorOpacity:0.15,columnType:!1,marker:{radius:4.5},lineWidth:2,shape:"circle",dataLabels:{formatter:{identifier:"{Y}"},enabled:!1,align:"outside"},tooltip:i()},options:{colors:A,polar:{},legend:d(),angleAxis:[v()],radiusAxis:[_()]}},scatter:{plotOptions:{large:!1,lineWidth:0,curve:!1,marker:{radius:4.5},opacity:1,tooltip:r(),dataLabels:{formatter:{identifier:"{X}{Y}{SIZE}"},enabled:!1,align:"outside"}},options:{colors:A,zoom:l(),legend:d(),rangeLegend:c(),xAxis:[g()],yAxis:[p()]}},bubble:{plotOptions:{large:!1,displayNegative:!0,shadow:!0,minSize:12,maxSize:60,sizeBy:"area",opacity:0.7,tooltip:r(),dataLabels:{formatter:{identifier:"{X}{Y}{SIZE}"},enabled:!1,align:"inside"}},options:{colors:A,zoom:l(),rangeLegend:c(),legend:d(),xAxis:[g()],yAxis:[p()]}},funnel:{plotOptions:{borderColor:"rgb(255,255,255)",borderWidth:1,sort:!0,useSameSlantAngle:!0,dataLabels:{formatter:{identifier:"{VALUE}"},enabled:!1,connectorWidth:1,align:"outside"}},options:{colors:A,legend:d(),style:P}},wordCloud:{plotOptions:{fontFamily:"Microsoft YaHei",maxRotation:0,minRotation:0,tooltip:o(),dataLabels:{enabled:!1}},options:{colors:A,legend:d(),style:P,rangeLegend:c()}},structure:{plotOptions:{layout:"vertical",force:!0,lineColor:"rgb(156,156,156)",lineOpacity:1,borderWidth:1,borderOpacity:1,fillColorOpacity:1,tooltip:o(),dataLabels:{enabled:!1}},options:{colors:A,legend:d(),style:P,rangeLegend:c()}},forceBubble:{plotOptions:{large:!1,displayNegative:!0,shadow:!0,minSize:12,maxSize:60,sizeBy:"area",opacity:1,tooltip:i(),dataLabels:{formatter:{identifier:"{SERIES}"},enabled:!1,align:"inside"}},options:{colors:A,legend:d(),zoom:l(),rangeLegend:c()}},areaMap:{plotOptions:{nullColor:"#cccccc",opacity:0.75,borderColor:"#ffffff",borderWidth:1,borderOpacity:1,tooltip:s(),dataLabels:{formatter:{identifier:"{NAME}"},enabled:!1,align:"inside",useHtml:!0}},options:{geo:{zoom:!0},colors:A,title:h(),rangeLegend:u(),legend:d(),dTools:{style:{fontFamily:L,color:C[1],fontSize:12,fontWeight:""},currentColor:"#62b2ef",backgroundColor:"white",enabled:!1}}},pointMap:{plotOptions:{opacity:1,icon:{iconUrl:"../../doc/example/marker-icon.png",iconSize:[25,41]},dataLabels:{formatter:{identifier:"{NAME}{SERIES}{VALUE}"},enabled:!1,align:"outside",useHtml:!0},tooltip:s()},options:{geo:{zoom:!0},colors:A,title:h(),rangeLegend:u(),legend:d(),dTools:{style:{fontFamily:L,color:C[1],fontSize:12,fontWeight:""},currentColor:"#62b2ef",backgroundColor:"white",enabled:!1}}},heatMap:{plotOptions:{maxOpacity:1,minOpacity:0,radius:15,blur:0.15,dataLabels:{useHtml:!0}},options:{geo:{zoom:!0},colors:A,title:h(),rangeLegend:u(),legend:d()}},lineMap:{plotOptions:{lineWidth:0.5,curveness:0.3,mouseOverColor:"rgb(253,221,49)",opacity:1,dataLabels:{useHtml:!0}},options:{geo:{zoom:!0},colors:A,title:h(),rangeLegend:u(),legend:d()}},gantt:{plotOptions:{newLine:!0,borderWidth:1,borderColor:"white",dataLabels:{formatter:{identifier:"{DURATION}{PROGRESS}"},enabled:!1},tooltip:i()},options:{processes:{resize:!0},levelBar:{enabled:!0},timeAxis:{zoom:!0,showWeekends:!0},colors:A,legend:d()}}}; +return t.MAP_CONFIG=M,t}function i(){return{formatter:{identifier:"{CATEGORY}{SERIES}{VALUE}"},enabled:!0,animation:!0,follow:!1,backgroundColor:"rgba(0,0,0,0.5)",borderColor:null,borderWidth:0,borderRadius:2,shadow:!0,hideDelay:500,shared:!1,padding:5}}function n(){return x.merge(i(),{formatter:{enabled:!1}},!0)}function r(){return x.merge(i(),{formatter:{identifier:"{SERIES}{X}{Y}{SIZE}"}},!0)}function a(){return x.merge(i(),{formatter:{identifier:"{SERIES}{VALUE}"}},!0)}function o(){return x.merge(i(),{formatter:{identifier:"{NAME}{SERIES}{VALUE}",shared:!0}},!0) +}function s(){return x.merge(i(),{formatter:{identifier:"{NAME}{SERIES}{VALUE}{SIZE}",shared:!0}},!0)}function h(){return{align:"center",backgroundColor:null,borderRadius:0,floating:!1,x:0,y:0,text:null,style:{color:C[1],fontSize:18,fontFamily:L},useHtml:!1}}function l(){return{zoomType:"xy",zoomTool:{enabled:!1,resize:!0}}}function u(){return{visible:!0,enabled:!0,borderColor:C[4],borderWidth:0,hiddenColor:C[4],hoverColor:"#293C55",style:{color:C[1],fontFamily:L,fontSize:12},position:"right",floating:!1,x:0,y:0,layout:"vertical",continuous:!0,margin:10} +}function c(){return x.merge(u(),{enabled:!1},!0)}function d(){return{visible:!0,enabled:!1,hiddenColor:C[4],hoverColor:"#293C55",borderRadius:0,borderColor:C[4],borderWidth:0,backgroundColor:null,style:{color:C[1],fontFamily:L,fontSize:12},position:"right",floating:!1,layout:"vertical",x:0,y:0,shadow:!1,margin:10}}function f(){return{type:"category",position:"bottom",onZero:!1,reversed:!1,title:{text:null,align:"center",rotation:0,useHtml:!1,style:{color:C[1],fontFamily:L,fontSize:12}},lineWidth:0.5,lineColor:C[2],showArrow:!1,enableTick:!0,enableMinorTick:!1,minorTickColor:C[2],minorTickWidth:0.5,minorTickLength:2,tickColor:C[2],tickWidth:0.5,tickLength:4,tickPadding:4,gridLineWidth:0,gridLineColor:C[3],showLabel:!0,labelStyle:{color:C[1],fontFamily:L,fontSize:12},labelRotation:0,useHtml:!1} +}function p(){return{type:"value",position:"left",onZero:!1,reversed:!1,title:{text:null,align:"center",rotation:0,useHtml:!1,style:{color:C[1],fontFamily:L,fontSize:12}},lineWidth:0,lineColor:C[2],showArrow:!1,enableTick:!1,enableMinorTick:!1,minorTickColor:C[2],minorTickWidth:0.5,minorTickLength:2,tickColor:C[2],tickWidth:0.5,tickLength:4,tickPadding:4,gridLineWidth:1,gridLineColor:C[3],showLabel:!0,labelStyle:{color:C[1],fontFamily:L,fontSize:12},labelRotation:0,useHtml:!1}}function g(){return x.merge(f(),{type:"value"},!0) +}function m(){return x.merge(p(),{type:"category"},!0)}function v(){return{type:"category",lineWidth:0.5,lineColor:C[2],gridLineWidth:1,gridLineColor:C[3],showLabel:!0,labelStyle:{color:C[1],fontFamily:L,fontSize:12},labelRotation:0,useHtml:!1}}function _(){return x.merge(v(),{type:"value"},!0)}var y=t("../Constants"),x=t("../utils/QueryUtils"),T=(t("../utils/BaseUtils"),t("../chart/map/CRS")),b=t("../dom/Browser"),A=["#63b2ee","#76da91","#f8cb7f","#f89588","#7cd6cf","#9192ab","#7898e1","#efa666","#eddd86","#9987ce"],C=["#231815","#727171","#898989","#B5B5B6","#C9CACA"],L="PingFang SC Light, Lantinghei SC-Extralight, Hiragino Sans GB W3, Microsoft Yahei Font, Helvetica, Arial, sans-serif",M={crs:T.EPSG3857,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:0.1,zoomDelta:0.2,trackResize:!0,dragging:!0,inertia:!b.android23,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:0.2,worldCopyJump:!1,maxBoundsViscosity:0,scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60},P="gradual"; +return e}),define("vans/ChartInterface",["require","../Constants","../ComponentLibrary","../utils/BaseUtils"],function(t){function e(){function t(){function t(){r[a]&&e.showAutoTooltip(r[a]),a=a>=r.length-1?0:a+1}"loop"!==s&&(o&&clearInterval(o),o=setInterval(t,n),s="loop",t())}var e,n,r,a=0,o=0,s=0,h={points:function(t){return"function"==typeof t?(r=t(),e.off(i.AUTO_REFRESH),e.on(i.AUTO_REFRESH,function(){r=t()})):r=t||[],h},chart:function(t){return e=t,h},delay:function(t){return n=t||3000,h},restart:function(){a=0,!o&&t() +},sleep:function(){return o&&(o=clearInterval(o)),s="mouse_sleep",h},status:function(t){return t?s=t:s},wake:function(){t()},destroy:function(){clearInterval(o),r=e=null}};return h}var i=t("../Constants"),n=t("../ComponentLibrary"),r=t("../utils/BaseUtils");return{setMapZoom:function(t){var e=this,i=e.getComponent(n.GEO_COMPONENT),a={};a.zoomLevel=t.zoomLevel,a.viewCenter=t.viewCenter;var o=r.clone(i.options);r.extend(i.options,a),i.doLayout(),i.options=o},openAutoTooltip:function(t,n){t=t||3000; +var r=this,a=r.series,o=r.chartType(),s=r.options,h=s&&s.plotOptions&&s.plotOptions.tooltip&&s.plotOptions.shared,l=function(t,e){t.children&&t.children.forEach(function(t){e.push(t),l(t,e)})},u=function(){var t=[];return h?t=a[0].points:o===i.TREEMAP_CHART||o===i.MULTIPIE_CHART?a[0].points.forEach(function(e){t.push(e),l(e,t)}):a.forEach(function(e){t=t.concat(e.points)}),t},c=n&&n.length?n:u;return this.autoTooltipController=this.autoTooltipController||e(),this.autoTooltipController.chart(r).delay(t).points(c).restart(),{stop:function(){r.autoTooltipController.sleep(),r.autoTooltipController.status("custom_sleep"),r.handler.removeAllChosen({containerPoint:{x:0,y:0}}) +},moveOn:function(){r.autoTooltipController.wake()}}},showAutoTooltip:function(t){if(t.isVisible()){var e=t.series,n=e.vanchart,r=e._getFixedPos(t,{width:0,height:0}),a=this.chartType(),o=r[0],s=r[1];o+=0===o?1:o===this.width?-1:0,s+=0===s?1:s===this.height?-1:0;var h={containerPoint:{x:o,y:s}};a===i.HEAT_MAP||a===i.LINE_MAP?this.fire("mousemove",h):t.listens("mouseover")?t.fire("mouseover",h):t.series.fire("mouseover",h),t.isPointSupportTooltipShared()?n.showSharedTooltip(t,h):n.showTooltip(t,h) +}},switchAutoTooltipStatus:function(t){var e=this.autoTooltipController;e&&"custom_sleep"!==e.status()&&("mouseover"===t?e.sleep():e.wake())},sortChart:function(t){var e,n=this,r=this.getComponent("tools"),a=i.ASCENDING,o=i.DESCENDING;n.orderType=null!=t?t>0?a:o:n.orderType===a?o:a,n.orderData(),r&&(e=r.getIcon(i.SORT))&&e.updateSortIconPath()},setSeriesVisible:function(t){t=t||[];for(var e=this.series,i=e[0].isSeriesAccumulated(),r=this.getComponent(n.LEGEND_COMPONENT),a=r.items,o=i?e[0].points.length:e.length,s=[],h=0,l=0; +o>l;l++){var u=i?e[0].points[l].visible:e[l].visible,c=i?e[0].points[l].name:e[l].name;if(-1===s.indexOf(c)){var d,f=l-h;a.length>=f&&(d=a[f]),-1!==t.indexOf(f)?!u&&r.switchSeriesItemVisible(c,d):u&&r.switchSeriesItemVisible(c,d),s.push(c)}else{h++}}this.reRenderWholePlot(),a.forEach(function(t){t.resetState()})}}}),define("component/LegendIconFactory",["require","../Constants"],function(t){function e(t){return a[t]}function i(t){return o[t]?o[t]:o[r.NORMAL_ICON]}function n(t){return a[t]}var r=t("../Constants"),a={},o={}; +return a[r.PIE_ICON]="M15.795,7.943L7.909,12.5L0.205,8.052C1.756,5.333,4.68,3.5,8.032,3.5C11.338,3.5,14.23,5.287,15.795,7.943z",o[r.PIE_ICON]={width:16,height:16},a[r.TREEMAP_ICON]="M9,12H3c-1.6,0-3-1.4-3-3l0-6c0-1.6,1.3-3,3-3l6,0c1.7,0,3,1.4,3,3v6C12,10.6,10.6,12,9,12z",o[r.TREEMAP_ICON]={width:12,height:12},a[r.DONUT_ICON]="M8.945,11.107c1.671,0,3.181,0.684,4.269,1.786l4.271-4.271c-4.686-4.686-12.284-4.686-16.971,0l4.216,4.216C5.815,11.768,7.302,11.107,8.945,11.107z",o[r.DONUT_ICON]={width:18,height:18},a[r.NORMAL_ICON]="M0,0L12,0L12,12L0,12Z",o[r.NORMAL_ICON]={width:12,height:12},a[r.BUBBLE_ICON]="M6,11.5c-1.47,0-2.851-0.572-3.889-1.611C1.072,8.851,0.5,7.47,0.5,6s0.572-2.851,1.611-3.889C3.149,1.072,4.53,0.5,6,0.5s2.851,0.572,3.889,1.611C10.928,3.149,11.5,4.53,11.5,6s-0.572,2.851-1.611,3.889C8.851,10.928,7.47,11.5,6,11.5z",o[r.BUBBLE_ICON]={width:11,height:11},a[r.NULL_MARKER]="M1,8L1,8c0-0.552,0.448-1,1-1h12c0.552,0,1,0.448,1,1v0c0,0.552-0.448,1-1,1H2C1.448,9,1,8.552,1,8z",o[r.NULL_MARKER]={width:16,height:16},a[r.CIRCLE]="M11,8c0,1.657-1.343,3-3,3S5,9.657,5,8s1.343-3,3-3S11,6.343,11,8z M14,7h-2.142C11.942,7.322,12,7.653,12,8s-0.058,0.678-0.142,1H14c0.552,0,1-0.448,1-1C15,7.448,14.552,7,14,7z M4,8c0-0.347,0.058-0.678,0.142-1H2C1.448,7,1,7.448,1,8c0,0.552,0.448,1,1,1h2.142C4.058,8.678,4,8.347,4,8z",o[r.CIRCLE]={width:16,height:16},a[r.SCATTER_ICON+r.NULL_MARKER]="M0,0L12,0L12,12L0,12Z",o[r.SCATTER_ICON+r.NULL_MARKER]={width:12,height:12},a[r.SCATTER_ICON+r.NORMAL_ICON]="M0,0L12,0L12,12L0,12Z",o[r.SCATTER_ICON+r.NORMAL_ICON]={width:12,height:12},a[r.SCATTER_ICON+r.CIRCLE]="M4,8C2.897,8,1.897,7.551,1.173,6.827S0,5.103,0,4s0.449-2.103,1.173-2.827S2.897,0,4,0s2.103,0.449,2.827,1.173S8,2.897,8,4S7.551,6.103,6.827,6.827S5.103,8,4,8",o[r.SCATTER_ICON+r.CIRCLE]={width:8,height:8},a[r.SQUARE]="M11,11H5V5h6V11z M14,7h-2v2h2c0.552,0,1-0.448,1-1C15,7.448,14.552,7,14,7z M4,7H2C1.448,7,1,7.448,1,8c0,0.552,0.448,1,1,1h2V7z",o[r.SQUARE]={width:16,height:16},a[r.SCATTER_ICON+r.SQUARE]="M0,0h8c0,0,0,3.889,0,8C4,8,0,8,0,8V0z",o[r.SCATTER_ICON+r.SQUARE]={width:8,height:8},a[r.DIAMOND]="M8,11L5,8l3-3l3,3L8,11z M14,7h-2.586l1,1l-1,1H14c0.552,0,1-0.448,1-1C15,7.448,14.552,7,14,7z M3.586,8l1-1H2C1.448,7,1,7.448,1,8c0,0.552,0.448,1,1,1h2.586L3.586,8z",o[r.DIAMOND]={width:16,height:16},a[r.SCATTER_ICON+r.DIAMOND]="M0,4.5L4.502,0l4.5,4.5c0,0,0,0-4.5,4.5C0,4.5,0,4.5,0,4.5z",o[r.SCATTER_ICON+r.DIAMOND]={width:9,height:9},a[r.TRIANGLE]="M5,10l3-5.196L11,10H5z M14,7h-3.577l1.155,2H14c0.552,0,1-0.448,1-1C15,7.448,14.552,7,14,7z M5.577,7H2C1.448,7,1,7.448,1,8c0,0.552,0.448,1,1,1h2.423L5.577,7z",o[r.TRIANGLE]={width:16,height:16},a[r.SCATTER_ICON+r.TRIANGLE]="M4.5,0L9,8c0,0-4.617,0-9,0L4.5,0z",o[r.SCATTER_ICON+r.TRIANGLE]={width:9,height:8},a[r.CIRCLE_HOLLOW]="M4.142,9H2C1.448,9,1,8.552,1,8c0-0.552,0.448-1,1-1h2.142C4.058,7.322,4,7.653,4,8S4.058,8.678,4.142,9zM14,7h-2.142C11.942,7.322,12,7.653,12,8s-0.058,0.678-0.142,1H14c0.552,0,1-0.448,1-1C15,7.448,14.552,7,14,7z M8,7C7.449,7,7,7.449,7,8s0.449,1,1,1s1-0.449,1-1S8.551,7,8,7 M8,5c1.657,0,3,1.343,3,3s-1.343,3-3,3S5,9.657,5,8S6.343,5,8,5L8,5z",o[r.CIRCLE_HOLLOW]={width:16,height:16},a[r.SCATTER_ICON+r.CIRCLE_HOLLOW]="M4,2c1.102,0,2,0.898,2,2S5.102,6,4,6S2,5.102,2,4S2.898,2,4,2 M4,0C1.791,0,0,1.791,0,4s1.791,4,4,4s4-1.791,4-4S6.209,0,4,0",o[r.SCATTER_ICON+r.CIRCLE_HOLLOW]={width:8,height:8},a[r.SQUARE_HOLLOW]="M4,9H2C1.448,9,1,8.552,1,8c0-0.552,0.448-1,1-1h2V9z M14,7h-2v2h2c0.552,0,1-0.448,1-1C15,7.448,14.552,7,14,7z M9,7H7v2h2V7 M11,5v6H5V5H11L11,5z",o[r.SQUARE_HOLLOW]={width:16,height:16},a[r.SCATTER_ICON+r.SQUARE_HOLLOW]="M6,6H2V2h4V6z M8,0H0v8h8V0z",o[r.SCATTER_ICON+r.SQUARE_HOLLOW]={width:8,height:8},a[r.DIAMOND_HOLLOW]="M4.157,9H2C1.448,9,1,8.552,1,8c0-0.552,0.448-1,1-1h2.157l-1,1L4.157,9z M14,7h-2.157l1,1l-1,1H14c0.552,0,1-0.448,1-1C15,7.448,14.552,7,14,7z M8,5.986L5.986,8L8,10.014L10.014,8L8,5.986 M8,4.571L11.429,8L8,11.429L4.571,8L8,4.571L8,4.571z",o[r.DIAMOND_HOLLOW]={width:16,height:16},a[r.SCATTER_ICON+r.DIAMOND_HOLLOW]="M2.121,4.999L5,2.121l2.878,2.878L5,7.879L2.121,4.999z M5,0L0,4.999L5,10l4.999-5.001L5,0z",o[r.SCATTER_ICON+r.DIAMOND_HOLLOW]={width:10,height:10},a[r.TRIANGLE_HOLLOW]="M4.5,9H2C1.448,9,1,8.552,1,8s0.448-1,1-1h3.655L4.5,9z M14,7h-3.655L11.5,9H14c0.552,0,1-0.448,1-1S14.552,7,14,7z M8,6.938L6.232,10h3.536L8,6.938 M8,4.938L11.5,11h-7L8,4.938L8,4.938z",o[r.TRIANGLE_HOLLOW]={width:16,height:16},a[r.SCATTER_ICON+r.TRIANGLE_HOLLOW]="M5.001,3.34L7.402,7.5H2.598L5.001,3.34z M5.001,0.34L0,9h10L5.001,0.34z",o[r.SCATTER_ICON+r.TRIANGLE_HOLLOW]={width:10,height:9},{getLegendIconPath:e,getLegendIconSize:i,hasIcon:n,maxIconSize:18} +}),define("mobile/vanPreprocess",["require","../Constants","../utils/BaseUtils","../ComponentLibrary","../utils/Scale","../component/LegendIconFactory"],function(t){var e=t("../Constants"),i=t("../utils/BaseUtils"),n=t("../ComponentLibrary"),r=t("../utils/Scale"),a=t("../component/LegendIconFactory"),o={};return[e.BAR_CHART,e.COLUMN_CHART,e.LINE_CHART,e.AREA_CHART,e.TREEMAP_CHART,e.SCATTER_CHART,e.BUBBLE_CHART,e.FORCE_BUBBLE_CHART,e.RADAR_CHART,e.POINT_MAP,e.AREA_MAP,e.HEAT_MAP,e.LINE_MAP,e.WORD_CLOUD_CHART,e.STRUCTURE_CHART,e.MULTI_CHARTS].forEach(function(t){o[t]=!0 +}),{isFlowTouchPie:function(t){return t=t||this.options,this.isMobileFlow()&&t.chartType===e.PIE_CHART&&1===t.series.length&&!t.plotOptions.roseType&&!t.series[0].roseType},_mutateOptions:function(t){t.chartType!==e.GANTT_CHART&&(t.crossLine={},t.plotScroll={}),t.zoom&&t.zoom.zoomTool&&(t.zoom._zoomTool=t.zoom.zoomTool,t.zoom.zoomTool={}),t.dTools&&(t.dTools.currentColor="#999",t.dTools.style=t.dTools.style||{},t.dTools.style.color="#1fade5"),t.tools&&(t.tools={enabled:!1}),t.dataSheet&&(t.dataSheet={enabled:!1}),t.moreLabel&&(t.moreLabel={}),this.isFlowTouchPie(t)&&(t.pieIndicator={}); +var n,r=t.legend&&t.legend.enabled&&t.legend.visible?t.legend:null;r&&(r.style._fontSize=r.style._fontSize||r.style.fontSize,n=1.5*i.convertREMtoPX(r.style._fontSize));var o=t.rangeLegend&&t.rangeLegend.enabled&&t.rangeLegend.visible?t.rangeLegend:null;return"portrait"===this.vancharts.getOrientation()?(r&&(r.floating=!1,r.maxHeight=Math.max(n,a.maxIconSize),r.position="bottom"),o&&(o.floating=!1,o.position="bottom")):(r&&(r.floating=!1,r.position="right"),o&&(o.floating=!1,o.position="right")),t +},shouldPinch:function(){return this.yAxis()&&this.xAxis()},flowResize:function(){this.setPlotOffset({x:null,y:null}),this.handler.fire("mutatePlot")},isMobileFlow:function(){return this.vancharts.isMobileFlow()},setPlotZoom:function(t){if(!(t&&t.x>=1&&t.y>=1)){throw t}return t.x=t.x||this._plotZoom.x,t.y=t.y||this._plotZoom.y,this._plotZoom=t,this._plotZoom},getPlotZoom:function(){return{x:this._plotZoom.x,y:this._plotZoom.y}},setPlotOffset:function(t){if(!t){throw t}null==t.x&&(t.x=this._plotOffset.x),null==t.y&&(t.y=this._plotOffset.y); +var e=this.getPlotContentBounds(),i=this.bounds,n=i.width-e.width,r=i.height-e.height;return t.x=Math.max(n,Math.min(t.x,0)),t.y=Math.max(r,Math.min(t.y,0)),this._plotOffset=t,this._plotOffset},getPlotOffset:function(){return{x:this._plotOffset.x,y:this._plotOffset.y}},addPlotOffset:function(t){var e=this.getPlotContentBounds(),i=this.setPlotOffset({x:this._plotOffset.x+t.deltaX,y:this._plotOffset.y+t.deltaY});return i.x!==e.x||i.y!==e.y},getPlotContentBounds:function(){if(!this.__contentBoundsInited){this.__contentBoundsInited=!0; +var t=this.baseAxis();if(t){var e=this.options.zoom&&this.options.zoom._zoomTool,i=t._dataDomain,a=i.length;if(e&&(e.from||e.to)){var o,s,h=this.getComponent(n.ZOOM_COMPONENT)._getValidDomain,l=h(e.from,e.to,i,t.isCategory());if(t.isCategory()){var u=t._getRangeFromDomain(l);o=Math.min(u[0],u[1]),s=a/l.length}else{var c=t._getRange(),d=r.linear().domain(l).range(c);o=Math.min(d(i[0]),d(i[1])),s=Math.abs(i[1]-i[0])/Math.abs(l[1]-l[0])}t.isHorizontal()?(this._plotOffset.x=o,this._plotZoom.x=s):(this._plotOffset.y=o,this._plotZoom.y=s) +}else{if(a>30){var s=a/30.5;t.isHorizontal()?this._plotZoom.x=s:this._plotZoom.y=s}}}}var f=this.bounds,p={x:this._plotOffset.x,y:this._plotOffset.y,width:f.width*this._plotZoom.x,height:f.height*this._plotZoom.y};return p},changeOrientation:function(){},getScrollVisibleBounds:function(){return this.bounds},_checkHandle:function(){return this.handler.stage!==e.STAGES.NORMAL||this.isMap()?!1:!0},getScrollBounds:function(){var t=null,e=null,i=null;if(this._checkHandle()){var n=this.getPlotContentBounds(),r=this.getScrollVisibleBounds(); +r.width=0?"left":n.width+n.x<=r.width?"right":"middle"),r.height=0?"top":n.height+n.y<=r.height?"bottom":"middle"),t=!("middle"===i)}else{t=!1}return{shouldParentHandle:t,horizontalEdge:e,verticalEdge:i}},checkCrossLineFlag:function(){o[this.chartType()]?0===this.series.length||1===this.series.length&&(this.series[0].points.length<=1||"vanChart"===this.vanChartType)?this._hasCrossLine=!1:this._hasCrossLine=!0:this._hasCrossLine=!1},hasCrossLine:function(){return this._hasCrossLine +}}}),define("vans/VanChartLibrary",["require","../Constants"],function(t){function e(t){return r[t]||r[n.VANCHART]}function i(t,e){r[t]=e}var n=t("../Constants"),r={};return{get:e,register:i}}),define("vans/VanChart",["require","./../utils/BaseUtils","./../utils/QueryUtils","../dom/Evented","./VanChartLayout","./../ComponentLibrary","./../ChartLibrary","./../Constants","./../HammerHandler","../mobile/Handler","./../vector/SvgRenderer","./../vector/VmlRenderer","../utils/Point2D","../locale/localeText","../locale/zh-cn","../locale/pt-pt","./../theme/config","./../theme/config","./ChartInterface","../mobile/vanPreprocess","./VanChartLibrary"],function(t){var e=t("./../utils/BaseUtils"),i=t("./../utils/QueryUtils"),n=t("../dom/Evented"),r=t("./VanChartLayout"),a=t("./../ComponentLibrary"),o=t("./../ChartLibrary"),s=t("./../Constants"),h=t("./../HammerHandler"),l=t("../mobile/Handler"),u=t("./../vector/SvgRenderer"),c=t("./../vector/VmlRenderer"),d=t("../utils/Point2D"),f=t("../locale/localeText"); +t("../locale/zh-cn"),t("../locale/pt-pt");var p=4000,g=8,m=function(){return e.paddingConvertWithScale(g)},v=[a.X_AXIS_COMPONENT,a.Y_AXIS_COMPONENT,a.ANGLE_AXIS_COMPONENT],_=n.extend({vanChartType:"vanChart",initialize:function(t,i,n){f.setLocale(t.language),this.wrapDom=i,this.width=e.getDomWidth(i),this.height=e.getDomHeight(i),this._plotZoom={x:1,y:1},this._plotOffset={x:0,y:0},this.vancharts=n,this.series=[],this.components={},this._targets={},this.animationCount=0,this._changeDataState=!1,this.fullScreenChart=null,this.setOptions(t),this._checkValidSize()&&this._init() +},_init:function(){if(!this.__inited){this.__inited=!0;var t=this.wrapDom;this.isMobile()?this.isMobileFlow()?(this.handler=new l(this,t),this.showTooltip=this.showTooltipMobileFlow,this._consoleDone=e.emptyFn):(this.handler=new h(this,t),this.showTooltip=this.showTooltipMobile):this.handler=new h(this,t),this._initDomLayout(this.wrapDom),this.update()}},setOptions:function(t){this.isMobileFlow()&&this._mutateOptions(t),t.series=t.series||[],t.series.forEach(function(t){t.data=t.data||[]}),this._mergeThemeConfig(t); +var e=t.plotOptions;e.inverted&&t.dataSheet&&(t.dataSheet.enabled=!1),this.options=t,this.isLargeMode()&&s.LARGE_CHART_TYPE[this.chartType()]&&(e.animation=!1),e.animation&&this.chartType()===s.MULTI_CHARTS&&Object.keys(s.LARGE_CHART_TYPE).forEach(function(t){e[t]&&e[t].large&&(e.animation=!1)}),this.fullScreenChart&&this.fullScreenChart.setData(t)},_initDomLayout:function(t){this.dom=t,this.renderer=e.isSupportSVG()?new u(t,this):new c(t,this),this.renderer.onAdd(),this.on({animationStart:this._animationStart,animationEnd:this._animationEnd}) +},_animationStart:function(){this._animationStarted=!0,this.animationCount=0,this.removeMoreLabel(),this.series.forEach(function(t){t._removeDataLabels(),t.render()}),this.animationCount||this.fire("animationEnd")},onSeriesRendering:function(){return this._animationStarted},removeMoreLabel:function(){var t=this.getComponent(a.MORELABEL_COMPONENT);t&&t.removeAllMoreLabels()},_animationEnd:function(){this.renderer&&(this._animationStarted=!1,this.series.forEach(function(t){t._animateEnd()}),this._consoleDone()) +},_removeChangeDataState:function(t){this._changeDataState&&(this._changeDataSeries=this._changeDataSeries||[],this._changeDataSeries.push(t),this._changeDataSeries.length>=this.series.length&&(this._changeDataState=!1,this._changeDataSeries=[]))},_needShowMoreLabel:function(){var t=this.options.moreLabel;return this._changeDataState&&t&&t.enabled&&!this.isLargeMode()},_clearMoreLabels:function(){this.series.forEach(function(t){t._clearMoreLabels()})},_initIntermediateState:function(){this.colorMap={},this.orderMap={},this.cateMap={},this.scale=1,this.timeQueue=this.clearTimeQueue(),this.clipPool={},this.axisSize={left:0,right:0,bottom:0,top:0},this.layerMap=this.layerIndex=null +},refresh:function(t){this.setOptions(t),this._checkValidSize()&&this.update()},refreshRestore:function(){var t=this,e=t.components;v.forEach(function(i){e[i]&&t._restoreCategoryAxisBasedSeries(e[i])});var i=this.seriesOfType(s.GAUGE_CHART);i.length==this.series.length&&this.series.sort(function(t,e){return t.index-e.index}),this.seriesOfType(s.PIE_CHART).forEach(function(t){var e=t.points.map(function(t){return t.graphic}),i={};t.options.data.forEach(function(t,e){i[t.x]=e}),t.points.sort(function(t,e){return i[t.x]-i[e.x] +}),t.points.forEach(function(t,i){t.graphic=e[i]})});var n=this.seriesOfType(s.MULTIPIE_CHART);n.length&&n[0].orderData(null),this.update()},orderData:function(){var t=this,e=t.components;v.forEach(function(i){e[i]&&t._orderCategoryAxisBasedSeries(e[i])});var i=this.orderType==s.ASCENDING,n=i?1:-1,r=this.seriesOfType(s.GAUGE_CHART);r.length==this.series.length&&this.series.sort(function(t,e){var i=t.getSeryTotalValue(),r=e.getSeryTotalValue();return(i-r)*n}),this.seriesOfType(s.PIE_CHART).forEach(function(t){var e=t.points.filter(function(t){return t.visible +}).map(function(t){return t.graphic});t.points.sort(function(t,e){return i?t.y-e.y:e.y-t.y});var n=0;t.points.forEach(function(t){t.visible&&(t.graphic=e[n],++n)})});var o=this.seriesOfType(s.MULTIPIE_CHART);o&&o.length&&o[0].orderData(i),this.reRenderSeries(),v.concat([a.ZOOM_COMPONENT,a.DATA_SHEET_COMPONENT,a.POLAR_COMPONENT]).forEach(function(t){e[t]&&e[t].render()})},_restoreCategoryAxisBasedSeries:function(t){for(var i=0,n=t.getAxisCount();n>i;i++){var r=t.getAxis(i),a=r.series;if(r._isBaseAxis()&&r.isCategory()&&this.orderMap&&Object.keys(this.orderMap).length){var o=this.orderMap[r.componentType][i],s={}; +o.forEach(function(t,e){s[t]=e});for(var h=r._dataDomain,l=0,u=a.length;u>l;l++){var c=[],d=a[l],f=!0;d.points.forEach(function(t){c[e.indexOf(h,t.getCategory())]=t.graphic,t.graphic||(f=!1)}),d.points.forEach(function(t){t.graphic=f?c[s[t.getCategory()]]:t.graphic,d.updatePointGraphic(t)})}}}},_orderCategoryAxisBasedSeries:function(t){function i(){for(var t=0,e=u.length;e>t;t++){var i=u[t],n=0;i.points.forEach(function(t){t.visible&&t.series.visible&&(n+=Math.abs(t.getTargetValue()))}),c.push({key:i.category,value:n}) +}c.sort(function(t,e){return(t.value-e.value)*r}),c.forEach(function(t,e){d[t.key]=e,f.push(t.key)})}function n(){for(var t=[],i=-1;++ia;a++){var h=t.getAxis(a);this.orderMap[h.componentType]=this.orderMap[h.componentType]||[],this.orderMap[h.componentType][a]||(this.orderMap[h.componentType][a]=h._dataDomain);var l,u,c=[],d={},f=[];if(h._isBaseAxis()&&h.isCategory()){l=h.series,u=l[0].points;var p=h.isMultiCateAxis&&h.isMultiCateAxis();p?n():i();for(var g=h.getOriginalCategories(),m=0,v=l.length; +v>m;m++){var _=[],y=l[m],x=!0;y.points.forEach(function(t){_[e.indexOf(g,t.getCategory())]=t.graphic,t.graphic||(x=!1)}),y.points.forEach(function(t){t.graphic=x?_[d[t.getCategory()]]:t.graphic,y.updatePointGraphic(t)})}h.setCategories(f)}}},addSeries:function(e){var n=e.type,r=this.options,a=t("./../theme/config")(),o=a[n].plotOptions;i.merge(r,a[n].options,!1),r.plotOptions[n]?r.plotOptions[n]=i.merge(r.plotOptions[n],o,!1):r.plotOptions=i.merge(r.plotOptions,o,!1),r.series.push(e)},_checkValidSize:function(){return this.width&&this.height +},autoRefresh:function(t,n){if(this._checkValidSize()){var r=t.add||[],a=t.remove||[],o=t.update||[],h=t.option||{},l=this,u=l.options,c=u.chartType;if(0!==a.length||0!==r.length||0!==o.length){this._addData=r,this._removeData=a,this._updateData=o;var d={};this.series.forEach(function(t){var e=l._createSeriesKey(c,t.options,n),i=d[e];i?i.push(t):(i=[t],d[e]=i)}),a.forEach(function(t,i){var n=l._createSeriesKey(c,t,i),r=d[n],a=r&&r.length?r[0]:null;a&&(t.data&&t.data.forEach(function(t){var i=a.calculatePointIndex(t); +e.hasDefined(i)&&a.removePoint(i,!1)}),l._removeAllAndHasNoAdd(a.options,i)&&r&&r.splice(0,1))}),r.forEach(function(t,e){var i=l._createSeriesKey(c,t,e),n=d[i],r=n&&n.length?n[0]:null;r?t.data.forEach(function(t){r.addPoint(t)}):l.addSeries(t)}),o.forEach(function(t,i){var n=l._createSeriesKey(c,t,i),r=d[n],a=r&&r.length?r[0]:null;a&&t.data.forEach(function(t){var i=a.calculatePointIndex(t);e.hasDefined(i)&&a.updatePoint(i,t,!1)})});var f=t.changeSeriesKeyOrder||[];f.length>0&&u.series.sort(function(t,i){return e.indexOf(f,l._createSeriesKey(c,t))-e.indexOf(f,l._createSeriesKey(c,i)) +});var p=t.changeCategoryKeyOrder||[];u.series.forEach(function(t,i){var n=t.type||c,r=p[i]||[],a=t.data||[];r.length>0&&a.sort(function(t,i){return e.indexOf(r,l._createPointKey(t,n))-e.indexOf(r,l._createPointKey(i,n))})}),i.merge(this.options,h,!0),this.isMap()&&(this.options.xAxis=this.options.yAxis=this.options.zoom=void 0),this.autoRefreshRender(),this.fullScreenChart&&this.fullScreenChart.charts[0].autoRefreshRender(),this.fire(s.AUTO_REFRESH)}}},_removeAllAndHasNoAdd:function(t,e){if(0===t.data.length){for(var i=this,n=i.options,r=n.chartType,a=i._createSeriesKey(r,t,e),o=i._addData,s=0,h=o.length; +h>s;s++){var l=o[s],u=i._createSeriesKey(r,l,s);if(u===a){return !1}}return !0}return !1},_createSeriesKey:function(t,i,n){var r=i.type||t,a=this.options,o=e.pick(i.name,"Series"+n),h=o+r;if(r===s.GAUGE_CHART){var l=i.style||a.plotOptions.style,u=i.thermometerLayout||a.plotOptions.thermometerLayout||"";h=o+r+l+u}else{if(r===s.RADAR_CHART){var c=i.columnType||a.plotOptions.columnType;c=c?s.COLUMN_RADAR:s.LINE_RADAR,h=o+c}else{if(r===s.PIE_CHART){var d=i.roseType||a.plotOptions.roseType||"";h=o+d}}}return h +},_createPointKey:function(t,i){var n=t.categoryArray?t.x+"-"+e.encodeCategoryArray(t.categoryArray):t.x;switch(i){case s.BAR_CHART:n=t.categoryArray?t.y+"-"+e.encodeCategoryArray(t.categoryArray):t.y;break;case s.WORD_CLOUD_CHART:case s.FUNNEL_CHART:n=t.name;break;case s.SCATTER_CHART:case s.BUBBLE_CHART:n=t.x+"-"+t.y;break;case s.AREA_MAP:case s.POINT_MAP:case s.HEAT_MAP:n=t.lnglat?t.name+"-"+e.encodeCategoryArray(t.lnglat):t.name;break;case s.LINE_MAP:}return n},autoRefreshRender:function(){this._changeDataState&&(this._changeDataSeries=[]),this._changeDataState=!0,this.update() +},update:function(){this._initIntermediateState();for(var t,i,n=this.options,r=this,h=n.series,l=n.chartType,u=a.getRegisteredComponents(),c=a.ComponentsOrder,d=0,f=c.length;f>d;d++){if(t=c[d],i=u[t],t==a.RANGE_LEGEND_COMPONENT&&n[t]){var p=n[t].continuous?a.GradientRangeLegend:a.INTERVAL_RANGE_LEGEND;this.components[t]&&this.components[t].type!=p&&(this.components[t].remove(),this.components[t]=null),i=a.get(p)}if(i){var g=n[t]&&(e.hasNotDefined(n[t].enabled)||n[t].enabled);g||t!=a.TOOLBAR_COMPONENT||(g=!0,n[t]={enabled:!0,hidden:!1}),n[t]&&g?this.components[t]?this.components[t].refresh(n[t],r):this.components[t]=new i(n[t],t,r):this.components[t]&&(this.components[t].remove(),this.components[t]=null,delete this.components[t]) +}}var m,v={},_=[];r.series.forEach(function(t){m=t.type,m==s.GAUGE_CHART&&(m+=t.gaugeType+(t.options.thermometerLayout||"")),m==s.RADAR_CHART&&(m=t.columnType?s.COLUMN_RADAR:s.LINE_RADAR);var e=v[t.name+m];e?e.push(t):(e=[t],v[t.name+m]=e)}),h.forEach(function(t,i){t=e.clone(t),m=t.type||l;var a=e.pick(t.name,"Series"+i),h=o.get(m),u=a+m;if(m==s.GAUGE_CHART){var c=t.style||n.plotOptions.style,d=t.thermometerLayout||n.plotOptions.thermometerLayout||"";h=o.get(c),u=a+m+c+d}else{if(m==s.RADAR_CHART){var f=t.columnType||n.plotOptions.columnType; +f=f?s.COLUMN_RADAR:s.LINE_RADAR,h=o.get(f),u=a+f}}var p=v[u],g=p&&p.length?p[0]:null;g=g?g.refresh(t,i):new h(t,r,i),_.push(g),p&&p.splice(0,1)});for(var y in v){var x=v[y];x&&x.forEach(function(t){t&&t.remove()})}r.series=_;var T=this.components[a.GAUGE_AXIS_COMPONENT];T&&T.initAttributesWithSeries();var b=this.components[a.RANGE_LEGEND_COMPONENT];b&&b.initAttributesWithSeries(),_.forEach(function(t){if(t.type!==s.LINE_MAP||!t.options.large){for(var e=0,i=t.points.length;i>e;e++){t.points[e].refreshPointColor() +}}}),r.layoutComponentsAndCharts(),this.isMobileFlow()&&this.checkCrossLineFlag()},layoutComponentsAndCharts:function(){this.hoverPoint=this.hoverSeries=null,r.PLANE_SYSTEM_LAYOUT(this),this.render()},_getDefaultBounds:function(){var t=this.options&&this.options.padding||this.chartType()===s.TREEMAP_CHART?0:m(),i=this.options&&this.options.borderWidth||0;return t=i+t,e.makeBounds(t,t,Math.max(this.width-2*t,0),Math.max(this.height-2*t,0))},reRenderWholePlot:function(){r.reLayoutPlotBounds(this),r.calculateSeries(this),r.calculateSeriesShapes(this),this.render() +},dealAxisZoom:function(t,e){var i=this.options.zoom.zoomType,n=this.components.xAxis,r=this.components.yAxis;n&&-1!==i.indexOf("x")&&n.axisZoom(t,e),r&&-1!==i.indexOf("y")&&r.axisZoom(t,e),this.reRenderWholePlot()},reCalcValueAxisDataDomain:function(t){for(var e=t===a.X_AXIS_COMPONENT?a.Y_AXIS_COMPONENT:a.X_AXIS_COMPONENT,i=this.components[e]._axisList,n=-1;++ne)}).forEach(function(i){var n=i.getTargetValue();e=Math.max(e,n),t=Math.min(t,n)})}),t>e&&(t=0,e=100),[t,e]},getParentDom:function(){return this.dom},getDivParentDom:function(){return this.wrapDom},isInverted:function(){return !!this.options.plotOptions.inverted},setPlotBounds:function(t){this.bounds=t +},getPlotClipBounds:function(){var t=0,e=0,i=this.bounds.width,n=this.bounds.height,r={},a=[];return this.components.xAxis&&(a=a.concat(this.components.xAxis._axisList)),this.components.yAxis&&(a=a.concat(this.components.yAxis._axisList)),a.forEach(function(t){var e=t.getPosition();t.isOnZero()||r[e]||(r[e]=t.getLineWidth())}),e=r[s.TOP]?Math.ceil(r[s.TOP]/2):0,n-=e,n=r[s.BOTTOM]?n-Math.ceil(r[s.BOTTOM]/2-0.5):n,t=r[s.LEFT]?Math.ceil(r[s.LEFT]/2):0,i-=t,i=r[s.RIGHT]?i-Math.ceil(r[s.RIGHT]/2):i,{x:t+this.bounds.x,y:e+this.bounds.y,width:Math.max(i+1,0),height:Math.max(n+1,0)} +},getChartBounds:function(){return e.makeBounds(0,0,this.width,this.height)},xAxis:function(t){t||(t=0);var e=this.components.xAxis;return e?e.getAxis(t):null},yAxis:function(t){t||(t=0);var e=this.components.yAxis;return e?e.getAxis(t):null},baseAxis:function(){return this.chartType()===s.BAR_CHART?this.yAxis():this.xAxis()},polar:function(t){t||(t=0);var e=this.components.polar;return e?e.getAxis(t):null},angleAxis:function(t){t||(t=0);var e=this.components.angleAxis;return e?e.getAxis(t):null},radiusAxis:function(t){t||(t=0); +var e=this.components.radiusAxis;return e?e.getAxis(t):null},gaugeAxis:function(t){t||(t=0);var e=this.components.gaugeAxis;return e?e.getAxis(t):null},getSharedAxis:function(){for(var t=[this.xAxis(),this.yAxis(),this.angleAxis()],e=0;et.getTargetValue()?e:t:e},0);i.showTooltip(r,e,i.getSharedPoints(t.getCategory())[0])}},showTooltip:e.emptyFn,_showTooltip:function(t,e,i){this.handler.selectRect||this.components[a.TOOLTIP_COMPONENT].showWithPoint(t,e,i)},showTooltipMobile:function(){this._showTooltip.apply(this,arguments);var t=this,e=arguments[1];this.setTimeout("mobileTooltip",function(){t.handler.removeAllChosen(e) +},p)},showTooltipMobileFlow:function(t,e,i){var n=this.components[a.TOOLTIP_COMPONENT].getMobileTextArray(t,e,i);this.__tooltipText=n},hideTooltip:function(){this.hoverPoint=null,this.components[a.TOOLTIP_COMPONENT].hide()},showToolbarTooltip:function(t,e){this.components[a.TOOLTIP_COMPONENT].showWithToolbarIcon(t,e)},set:function(t){"enable" in t&&this.handler&&(t.enable?this.handler.hammer.set({enable:!0}):(this.handler.hammer.set({enable:!1}),this.handler.removeAllChosen({})))},isMap:function(){return"vanChartMap"==this.vanChartType +},chartType:function(){return this.options.chartType},isPointOrAreaOrHeatMap:function(){return this.options.chartType===s.AREA_MAP||this.options.chartType===s.POINT_MAP||this.options.chartType===s.HEAT_MAP},isHeatMap:function(){return this.options.chartType==s.HEAT_MAP},isAreaMap:function(){return this.options.chartType==s.AREA_MAP},isForceBubble:function(){return"vanChartForceBubble"==this.vanChartType},isLargeMode:function(){var t=!1;return this.series&&this.series.length&&this.series.forEach(function(e){t=!!e.options.large||t +}),t=!!this.options.plotOptions.large||t},hasRangeLegend:function(){return !!this.components[a.RANGE_LEGEND_COMPONENT]},seriesOfType:function(t){return this.series.filter(function(e){return e.type==t})},pointsOfType:function(t){var e=[];return this.series.forEach(function(i){i.type==t&&(e=e.concat(i.points))}),e},setTimeout:function(t,e,i){this.timeQueue[t]&&window.clearTimeout(this.timeQueue[t]),i?this.timeQueue[t]=window.setTimeout(e,i):(e&&e(),this.timeQueue[t]=null)},clearTimeQueue:function(){var t=this.timeQueue||{}; +return Object.keys(t).map(function(e){window.clearTimeout(t[e])}),{}},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new d(this.width,this.height),this._sizeChanged=!1),this._size.clone()},isZoomingWithLargeModel:function(){var t,e,i=0,n=this.options.series;for(t=-1;++t100&&this._zooming}});return _.include({render:function(){function t(t){e[t]||(e[t]=i.group().addClass(t).add(),e.isMap()&&e[t].addClass("map-component"))}this.vancharts.endLoading(); +var e=this,i=this.renderer,n=this.getPlotClipBounds();return this.plotClip?i.updateClip(this.plotClip,n):this.plotClip=i.createClip(n),["backGroup","clipSeriesGroup","seriesGroup","seriesTextRenderGroup","frontGroup"].forEach(t),this.isMobileFlow()&&(t("crossLineGroup"),e.seriesTextRenderGroup.attr({"pointer-events":"none","touch-action":"none"}),e.frontGroup.attr({"pointer-events":"none","touch-action":"none"}),e.crossLineGroup.attr({"pointer-events":"none","touch-action":"none"}),t("crossLineGroup"),this.isMap()||i.clip(e.crossLineGroup,e.plotClip)),i.clip(e.clipSeriesGroup,e.plotClip),i.clip(e.seriesTextRenderGroup,e.plotClip),this._addDivClipGroup(n),this.emptyDataRender&&this.emptyDataRender.remove(),this._isEmptyDataChart()?(this._showEmptyDataTip(),void (this.options.toPhantom&&window.console&&console.log("done"))):(this._renderBackground(),this.renderComponents(),void this.renderSeries()) +},_addDivClipGroup:function(t){var e=this;e.seriesTextDivGroup||(e.seriesTextDivGroup=this.renderer.div().add()),e.seriesTextDivGroup.style({clip:"rect("+[t.y,t.x+t.width,t.y+t.height,t.x].join("px ")+"px)"})},_renderBackground:function(){var t=e.makeBounds(0,0,this.width,this.height),i=this.bounds,n=this.options,r=this.renderer,a={backgroundColor:n.backgroundColor,backgroundImage:n.backgroundImage,borderColor:n.borderColor,borderWidth:n.borderWidth,borderRadius:n.borderRadius||0,shadow:n.shadow},o={backgroundColor:n.plotBackgroundColor,backgroundImage:n.plotBackgroundImage,borderColor:n.plotBorderColor,borderWidth:n.plotBorderWidth,borderRadius:n.plotBorderRadius||0,shadow:n.plotShadow}; +a.shadow&&(t.width-=5,t.height-=5),a.backgroundColor||a.backgroundImage||a.borderColor?this.chartBackgroundGroup=this.chartBackgroundGroup||r.group().addTo(this.backGroup):this.chartBackgroundGroup&&(this.chartBackgroundGroup.remove(),this.chartBackgroundGroup=null),o.backgroundColor||o.backgroundImage||o.borderColor?this.plotBackgroundGroup=this.plotBackgroundGroup||this.renderer.group().addTo(this.backGroup):this.plotBackgroundGroup&&(this.plotBackgroundGroup.remove(),this.plotBackgroundGroup=null),n.geo||this._renderRectangleBackground(this.chartBackgroundGroup,a,t),this._renderRectangleBackground(this.plotBackgroundGroup,o,i) +},renderComponents:function(){for(var t in this.components){this.components[t]&&this.components[t].render()}var e=this,i=e.renderer;!e.highlightGroup&&e.plotClip&&i.clip(e.highlightGroup=i.group().addTo(e.backGroup),e.plotClip)},renderSeries:function(){this.getComponent(a.TOOLTIP_COMPONENT).immediateHide(),this.clearAllEffects();var t=this.getSharedAxis();t&&t.removeHighlightBackground&&t.removeHighlightBackground(),this.fire("animationStart"),this._renderTrendLine()},_isEmptyDataChart:function(){return !this.isMap()&&0===this.series.length +},_showEmptyDataTip:function(){this._removeAll(),this.emptyDataRender=VanCharts.showEmptyDataTip({dom:this.wrapDom,emptyDataTip:this.options.emptyDataTip,chartWidth:this.width,chartHeight:this.height,chart:this})},_removeAll:function(){for(var t in this.components){t!==a.TOOLTIP_COMPONENT&&this.components[t]&&this.components[t].remove()}this.linkGroup&&this.linkGroup.remove(),this.chartBackgroundGroup&&this.chartBackgroundGroup.remove(),this.plotBackgroundGroup&&this.plotBackgroundGroup.remove(),this.linkGroup=this.chartBackgroundGroup=this.plotBackgroundGroup=null +},_renderRectangleBackground:function(t,i,n){if(t){var r=i.borderWidth||0,a=this.renderer,o=r/2,s=e.rectSubPixelOpt(n.x+o,n.y+o,Math.max(n.width-r,0),Math.max(n.height-r,0),r);if(s.rx=s.ry=i.borderRadius,i.shadow){var h=e.rectSubPixelOpt(n,1),l=[5,3,1],u=[0.05,0.1,0.15];l.forEach(function(e,n){var r="shadowRect"+n;t[r]=t[r]||a.rect().style({fill:"none",stroke:"black","stroke-width":l[n],"stroke-opacity":u[n]}).addTo(t),t[r].attr(h).attr({rx:i.borderRadius,ry:i.borderRadius,transform:"translate(1, 1)"}) +})}if(i.backgroundColor&&"object"==typeof i.backgroundColor){if(e.isSupportSVG()){var c=i.backgroundColor,d={x1:c.x1,y1:c.y1,x2:c.x2,y2:c.y2},f={offset:"0%","stop-color":c.startColor},p={offset:"100%","stop-color":c.endColor};t.gradientFill?a.updateColorGradient(t.gradientFill,d,[f,p]):t.gradientFill=a.colorGradient(d,[f,p])}else{i.backgroundColor=i.backgroundColor.startColor}}i.backgroundImage&&(t.backgroundImage=t.backgroundImage||a.image().addTo(t),t.backgroundImage.attr(n).attr("preserveAspectRatio","none").imageContent(i.backgroundImage)),(i.backgroundColor||i.borderWidth)&&(t.backgroundColor=t.backgroundColor||a.rect().addTo(t),t.backgroundColor.attr(s).style({fill:i.backgroundColor?"string"==typeof i.backgroundColor?i.backgroundColor:"url(#"+e.stamp(t.gradientFill)+")":"none",stroke:i.borderColor,"stroke-width":e.pick(i.borderWidth,0)})) +}},filterRender:function(){for(var t=0,e=this.series.length;e>t;t++){this.series[t].filterRender()}},cancelLegendHighlight:function(t){var i=this.getComponent(a.LEGEND_COMPONENT);i=i||this.getComponent(a.RANGE_LEGEND_COMPONENT),i&&i.highlighted&&!e.containsPoint(i.bounds,t)&&(i.highlighted=!1,this.highlightTarget=null,this._updateSeriesStyle())},makeLegendHighlight:function(t){this.highlightTarget=t,this._updateSeriesStyle()},_updateSeriesStyle:function(){this.series.forEach(function(t){t.isSupportLegendHighlight()&&(t.useCanvas()?t._canvasRender():(t.drawSeries&&t.drawSeries(),t.getDataToDraw().filter(function(t){return t.isVisible() +}).forEach(function(e){t._updatePointGraphicStyle(e)})))})},reRenderSeries:function(){r.calculateSeries(this,!0),r.calculateSeriesShapes(this),this.renderSeries()},_consoleDone:function(){var t=this.options.geo;t&&(t.tileLayer||t.wmsLayer)||this.options.toPhantom&&window.console&&console.log("done")},removePointGraphics:function(t){t&&t.remove()},registerInteractiveTarget:function(t,i){i&&(this._targets[e.stamp(i.node())]=t),this.activeDataEvents(t)},activeDataEvents:function(t){t._events=null,t.getEvents&&t.on(t.getEvents(),t) +},removeInteractiveTarget:function(t,i){this._targets[e.stamp(i.node())]=null,t._events=null},findInteractiveTarget:function(t){return this._targets[e.stamp(t)]},addCanvasRendererForResize:function(t){this._canvasMap=this._canvasMap||[],this._canvasMap.push(t)},resize:function(){var t=this.wrapDom;if(this.width=e.getDomWidth(t),this.height=e.getDomHeight(t),this._checkValidSize()){this._init(),this._sizeChanged=!0,this.clipPool={},this.axisSize={left:0,right:0,bottom:0,top:0},this.renderer.resize(),this._canvasMap&&this._canvasMap.forEach(function(t){t.resize() +}),this.isMap()&&(this.mapRenderer.resize(),this._onResize(),this.components.geo.resize());var i=this.seriesOfType(s.MULTIPIE_CHART)[0];i&&(i.chartInfo.radius=null);var n=this.getComponent(a.MORELABEL_COMPONENT);n&&n.resize(),this.layoutComponentsAndCharts(),this.isMobileFlow()&&this.flowResize()}},remove:function(){this._animationStarted=!1,this.__inited=!1,this.force&&this.force.endTick(null).stop(),this.force=null,this.clearAllEffects(),this.clearTimeQueue(),this.renderer&&this.renderer.remove(),this.handler&&this.handler.destroy(); +var t=this.getComponent(a.TOOLTIP_COMPONENT);t&&t.remove(),this.emptyDataRender&&this.emptyDataRender.remove(),this.mainRenderer&&this.mainRenderer.remove(),this.animationRenderer&&this.animationRenderer.remove(),this.emptyDataRender=null,this.mainRenderer=null,this.animationRenderer=null,this.largeSeries&&Object.keys(this.largeSeries).map(function(t){this.largeSeries[t]._canvas&&this.largeSeries[t]._canvas.remove(),this.largeSeries[t]=null},this),this.largeSeries=null,this.renderer=this.plotClip=this._leaflet=this.handler=this.chartBackgroundGroup=this.trendLineGroup=this.seriesGroup=this.clipSeriesGroup=this.seriesTextRenderGroup=this.seriesTextDivGroup=null,this._animatingZoom=!1,this.validPoints=[] +},canFireNativePanMove:function(){return !0},isMobile:function(){var t=this.options;return t&&null!=t.mobile?t.mobile:e.hasTouch()},showTooltip:function(){this._showTooltip.apply(this,arguments)}}),_.include(t("./ChartInterface")),_.include(t("../mobile/vanPreprocess")),t("./VanChartLibrary").register(s.VANCHART,_),_}),define("vector/canvasShape/AbstractShape",["require","../../utils/Class"],function(t){var e=t("../../utils/Class");return e.extend({initialize:function(t){this.renderer=t,this.ctx=t.ctx,this.cut=null,this._initialize(t) +},setStyle:function(t){for(var e in this.style){t.hasOwnProperty(e)&&(this.style[e]=t[e])}return this},drawStyle:function(){var t=this.style;return this.renderer.lineWidth(t.lineWidth),this.renderer.strokeStyle(t.strokeStyle),this.renderer.fillStyle(t.fillStyle),this.renderer.beginNewPath(),this},contain:function(){},animate:function(){return this.cut||(this.cut=this.renderer.animation.animate(this.style)),this},delay:function(t){return this.cut.delay(t),this},duration:function(t){return this.cut.duration(t),this +},tween:function(t,e){return this.cut.tween(t,e),this},end:function(t){return this.cut.end(t),this},stop:function(){return this.cut.stop(),this},ease:function(t){return this.cut.ease(t),this},remove:function(){this.cut&&this.cut.stop(),this.needToRemove=!0}})}),define("vector/canvasShape/library",["require"],function(t){var e={};return{register:function(t,i){e[t]=i},shapes:e}}),define("vector/canvasShape/icons",["require","./library","../../Constants"],function(t){function e(t){return n.shapes[o[t]] +}function i(t,i,n){var r=e(t);if(r){var o=new r(i);o.setStyle({x:0,y:0,size:n.width,fillStyle:n.color});for(var s,h=i.ctx,l=-1;s=a[++l];){h[s]=o.style[s]}o.draw(),h.fill(),h.stroke(),i.shape=o,i.ready=!0}}var n=t("./library"),r=t("../../Constants"),a=["lineWidth","strokeStyle","fillStyle"],o={};return o[r.LOCATION]="iconLocation",{render:i,all:o}}),define("vector/canvasShape/Image",["require","./AbstractShape","./library","./icons"],function(t){var e=t("./AbstractShape"),i=t("./library"),n=t("./icons"),r={},a=e.extend({_initialize:function(){this.style={url:null,x:null,y:null,width:0,height:0,radian:0,color:""} +},_load:function(){var t=this.style,e=t.url,i=e+t.color;r[i]||(n.all[e]?r[i]=this._loadIcon(e):r[i]=this._loadImage(e)),this._img=r[i]},_loadImage:function(t){var e=this,i={el:null,ready:!1};return i.el=new Image,i.el.crossOrigin="Anonymous",i.el.onload=function(){i.ready=!0,e.renderer.flush()},i.el.src=t,i},_loadIcon:function(t){var e=this.style,i=e.width,r=e.height,a=this.renderer.dpr,o=document.createElement(window.VAN_CANVAS);o.style.width=i+"px",o.style.height=r+"px",o.width=i*a,o.height=r*a; +var s=o.getContext("2d");s.scale(a,a);var h={el:o,ctx:s,ready:!1};return n.render(t,h,e),h},setStyle:function(t){for(var e in this.style){t.hasOwnProperty(e)&&(this.style[e]=t[e])}return !this._img&&this._load(),this},drawStyle:function(){return this},draw:function(){var t=this.style,e=t.x,i=t.y,n=t.width,r=t.height,a=t.radian;return this._img&&this._img.ready&&null!=e&&null!=i&&(a?(this.ctx.save(),this.ctx.translate(e,i),this.ctx.rotate(a),this.ctx.drawImage(this._img.el,-n/2,-r/2,n,r),this.ctx.restore()):this.ctx.drawImage(this._img.el,e-n/2,i-r/2,n,r)),this +},contain:function(t){var e=this.style,i=t.x-e.x+e.width/2,n=t.y-e.y+e.height/2;return i>0&&i0&&nr){return !1}var g=c(h(f,d));return(g+o-n.startAngle)%o<=n.endAngle-n.startAngle}});return i.register("arc",d),d}),define("vector/canvasShape/Circle",["require","./AbstractShape","./library"],function(t){var e=t("./AbstractShape"),i=t("./library"),n=2*Math.PI,r=e.extend({_initialize:function(){this.style={x:null,y:null,r:null,lineWidth:null,strokeStyle:null,fillStyle:null} +},draw:function(){var t=this.ctx,e=this.style;return t.moveTo(e.r+e.x,e.y),t.arc(e.x,e.y,e.r,0,n),this},contain:function(t){var e=t.x,i=t.y,n=this.style,r=e-n.x,a=i-n.y;return n.r>Math.sqrt(r*r+a*a)}});return i.register("circle",r),r}),define("vector/canvasShape/IconLocation",["require","./AbstractShape","./library"],function(t){function e(t){return +t.toFixed(3)}var i=t("./AbstractShape"),n=t("./library"),r=i.extend({_initialize:function(){this.style={x:null,y:null,size:null,fillStyle:null,lineWidth:1,strokeStyle:"#ffffff"} +},setStyle:function(t){if(i.prototype.setStyle.apply(this,arguments),t.size){var n=t.size/40;this.R=14.5*n,this.r=5.5*n,this.ix=20*n,this.iy=this.R+1,this.l=t.size-this.iy,this.a=Math.acos(this.R/this.l),this.dx=e(this.R*Math.sin(this.a)),this.dy=e(this.R*Math.cos(this.a))}return this},draw:function(){var t=this.ctx,e=this.style,i=e.x,n=e.y,r=this.R,a=this.r,o=this.ix,s=this.iy,h=this.l,l=this.a,u=this.dx,c=this.dy,d=i+o,f=n+s;return t.moveTo(d,f+h),t.lineTo(d-u,f+c),t.arc(d,f,r,Math.PI/2+l,Math.PI/2-l),t.lineTo(d,f+h),t.moveTo(d+a,f),t.arc(d,f,a,2*Math.PI,0,!0),this.renderer.dirty=!0,this +},contain:function(t){var e=this.style,i=t.x-e.x+e.size/2,n=t.y-e.y+e.size/2;return i>0&&i0&&n0&&i0&&n=0&&L>=0&&1>C+L}});return i.register("triangle",r),r}),define("vector/canvasShape/LineEffect",["require","./AbstractShape","./library"],function(t){var e=t("./AbstractShape"),i=t("./library"),n=Math.sin,r=Math.cos,a=Math.asin,o=e.extend({_initialize:function(){this.style={ox:0,oy:0,startAngle:0,endAngle:0,r:0,d:0,fillStyle:null} +},draw:function(){var t=this.ctx,e=this.style,i=e.ox,o=e.oy,s=e.startAngle,h=e.endAngle,l=e.r,u=e.d,c=h-s,d=n(c),f=r(c),p=l-u,g=l+u,m=p*d,v=p*f,_=v-l,y=g*d,x=g*f,T=x-l,b=l*r(s)+i,A=l*n(s)+o,C=l*r(h)+i,L=l*n(h)+o;if(!(u>m)){if(T>=0){return t.moveTo(b,A),t.arc(C,L,u,h,h+Math.PI),void t.lineTo(b,A)}var M=0.5*(m*m+_*_)/-_,P=0.5*(y*y+T*T)/-T,w=r(s),S=n(s),E=l-M,O=E*w+i,R=E*S+o,k=a(m/M),D=s+k;h>D&&(D=s+Math.PI-k);var I=l-P,B=I*w+i,N=I*S+o,G=a(y/P),F=s+G;return t.moveTo(b,A),t.arc(B,N,P,s,F),t.arc(C,L,u,h,h+Math.PI),t.arc(O,R,M,D,s,!0),this +}}});return i.register("lineEffect",o),o}),define("vector/canvasShape/types",["require","./Image","./Arc","./Circle","./IconLocation","./Rect","./Diamond","./Triangle","./LineEffect"],function(t){t("./Image"),t("./Arc"),t("./Circle"),t("./IconLocation"),t("./Rect"),t("./Diamond"),t("./Triangle"),t("./LineEffect")}),define("vector/Cut",["require","../utils/BezierEasing"],function(t){var e=t("../utils/BezierEasing"),i=function(t,e){return function(i){return +t+(+e-+t)*i}},n=function(t,e,n){var r=i(t[e],n); +return function(i){t[e]=r(i)}},r=function(t){if(!t){throw'animation "targets" empty'}null==t.length?this.targets=[t]:this.targets=t,this._needsRemove=!1,this._lastSectionTime=null,this._sections=[],this.onend=null};return r.prototype={step:function(t){this._lastSectionTime||(this._lastSectionTime=t);var e=t-this._lastSectionTime,i=this.targets,n=this._sections[0],r=Math.min(e/n.time,1);if(!(!r>0)){n.easing&&(r=n.easing(r));for(var a=n.tweens,o=i.length,s=0;o>s;s++){for(var h in a){a.hasOwnProperty(h)&&a[h][s](r) +}}return 1===r&&(this._lastSectionTime=t,this._sections.shift(),0===this._sections.length)?(this._needsRemove=!0,"end"):void 0}},_fillTweens:function(t){return this.targets.map(function(e,i){return t(e,i)})},delay:function(t){return this._sections.push({time:t,tweens:{}}),this},duration:function(t){return this._sections.push({time:t,tweens:{}}),this},tween:function(t,e){var i=this._sections.length,r=this._sections[i-1].tweens;return"function"==typeof e?r[t]=this._fillTweens(e):r[t]=this._fillTweens(function(i,r){return n(i,t,e) +}),this},attrTween:function(t,e){return this.tween("attr"+t,function(i,n){var r=+i.getAttribute(t),a=e(i,n,r);return function(e){i.setAttribute(t,a(e))}}),this},attr:function(t,e){return this.attrTween(t,function(t,n,r){return"function"==typeof e?i(r,e.call(null,t,n,r)):i(r,e)}),this},end:function(t){return this.onend=t,this},stop:function(){return this._needsRemove=!0,this},ease:function(t){var i=this._sections.length;return this._sections[i-1].easing="string"==typeof t?e.css[t]:t,this}},r}),define("vector/Animation",["require","./Cut","../utils/BaseUtils"],function(t){var e=t("./Cut"),i=t("../utils/BaseUtils").requestAnimFrame,n=function(){this._initTime=null,this._running=!1,this._cuts=[],this._callback=[],this.onframe=null,this.onend=null +};return n.prototype={_update:function(){var t=(new Date).getTime(),e=this._cuts,i=e.length;if(!e.length){return !1}for(var n=0;i>n;){e[n]._needsRemove?(e[n]=e[i-1],e.pop(),i--):n++}for(var n=0;i>n;n++){var r=e[n].step(t);r&&e[n]["on"+r]&&this._callback.push(e[n]["on"+r])}this.onframe&&this.onframe();for(var a,n=-1;a=this._callback[++n];){a()}return this._callback=[],!0},_startLoop:function(){function t(){e._running&&(e._running=e._update(),i(t))}var e=this;i(t)},frame:function(t){return this.onframe=t,this +},start:function(){return this._running||(this._running=!0,this._startLoop()),this},stop:function(){return this._running=!1,this},clear:function(){return this._running=!1,this._cuts=[],this},animate:function(t){var i=new e(t);return i.animation=this,this._cuts.push(i),this.start(),i}},n}),define("vector/CanvasRenderer",["require","./canvasShape/types","./canvasShape/library","../utils/BaseUtils","./Renderer","../Constants","./Animation","./ElementWrapper"],function(t){t("./canvasShape/types");var e=t("./canvasShape/library"),i=t("../utils/BaseUtils"),n=t("./Renderer"),r=t("../Constants"),a=t("./Animation"),o=t("./ElementWrapper"),s=0,h=2,l=4000,u=50,c=window.Uint8Array||window.Array,d=n.extend({_initContainer:function(){var t=this.dom,e=this.vanchart,i=this.config,n=i||e.bounds; +this.dpr=i&&i.dpr||1,this._container=new o(this._createCanvas(t,n),this),this.ctx=this._container.node().getContext("2d"),this.ctx.scale(this.dpr,this.dpr),this.elements=[],this.ctx.lineCap="round",this.resetFilter(),this.animation=(new a).frame(this.flush.bind(this)),this._needToPaint=!1,this._nowFillStyle=null,this._nowStrokeStyle=null,this._nowLineWidth=null,this._nextFillStyle=null,this._nextStrokeStyle=null,this._nextLineWidth=null},resize:function(){this._setSize({x:this.left,y:this.top,width:this.vanchart.width,height:this.vanchart.height},this._container.node()),this.ctx.scale(this.dpr,this.dpr),this.needFill=this.needStroke=!0 +},marker:function(t,e){switch(t){case r.LOCATION:return this.iconLocation({x:e.x,y:e.y,size:2*e.radius,fillStyle:e.color});case r.SQUARE_HOLLOW:return this.rect({x:e.x-e.radius,y:e.y-e.radius,width:2*e.radius,height:2*e.radius,fillStyle:null,lineWidth:2,strokeStyle:e.color});case r.SQUARE:return this.rect({x:e.x-e.radius,y:e.y-e.radius,width:2*e.radius,height:2*e.radius,fillStyle:e.color});case r.DIAMOND_HOLLOW:return this.diamond({x:e.x,y:e.y,size:e.radius,fillStyle:null,lineWidth:2,strokeStyle:e.color}); +case r.DIAMOND:return this.diamond({x:e.x,y:e.y,size:e.radius,fillStyle:e.color});case r.TRIANGLE_HOLLOW:return this.triangle({x:e.x,y:e.y,size:e.radius,fillStyle:null,lineWidth:2,strokeStyle:e.color});case r.TRIANGLE:return this.triangle({x:e.x,y:e.y,size:e.radius,fillStyle:e.color});case r.CIRCLE_HOLLOW:return this.circle({x:e.x,y:e.y,r:e.radius,fillStyle:null,lineWidth:2,strokeStyle:e.color});default:case r.CIRCLE:return this.circle({x:e.x,y:e.y,r:e.radius,fillStyle:e.color})}},_create:function(t,e){var i=new t(this); +return i.rawElement=i,this.elements.push(i),e&&i.setStyle(e),i},_setSize:function(t,e){var i=this.left=t.x,n=this.top=t.y,r=this.width=t.width,a=this.height=t.height,o=this.dpr;e.style.position="absolute",e.style.left=i+"px",e.style.top=n+"px",e.style.width=r+"px",e.style.height=a+"px",e.width=r*o,e.height=a*o},_createCanvas:function(t,e){var i=document.createElement(window.VAN_CANVAS);return this._setSize(e,i),i.onselectstart=function(){return !1},i.style["-webkit-user-select"]="none",i.style["user-select"]="none",i.style["pointer-events"]="none",i.style["-webkit-touch-callout"]="none",i.style.transform="translateZ(0)",t.appendChild(i),window.VanCanvasManager&&VanCanvasManager.initElement(i),i +},shouldFilter:function(t,e){if(0>t||this.widthe||this.heightr;r++){t[r].needToRemove||n.push(t[r])}this.elements=n,this.flushIdx=0,this._adaptFlush()},_nextBatch:function(){this.flushIdxi;i++){t[i].drawStyle().draw()}this._fillStyle&&this.ctx.fill(),this._strokeStyle&&this.ctx.stroke(),this.flushIdx=i,this._nextBatch()},_adaptFlush:function(){this._time=+new Date,this.ctx.beginPath();for(var t=this.elements,e=t.length,i=this.flushIdx-1;++iu){break}}}this._fill(),this._stroke(),this.flushIdx=i,this._nextBatch() +},_clearWithAlpha:function(){var t=this.width,e=this.height;this.backCtx.drawImage(this._container.node(),0,0,t,e),this.ctx.clearRect(0,0,t,e);var i=this.backContainer.node(),n=this.ctx;n.save(),n.globalAlpha=this.frameAlpha,n.drawImage(i,0,0,t,e),n.restore()},clearAll:function(){this.ctx.clearRect(0,0,this.width,this.height)},beginNewPath:function(){this._needToPaint&&(this._fill(),this._stroke(),this.ctx.beginPath(),this._needToPaint=!1)},_fill:function(){this._nowFillStyle&&(this.ctx.fillStyle=this._nowFillStyle,this.ctx.fill()),this._nowFillStyle=this._nextFillStyle +},_stroke:function(){this._nowStrokeStyle&&(this.ctx.strokeStyle=this._nowStrokeStyle,this.ctx.lineWidth=this._nowLineWidth,this.ctx.stroke()),this._nowStrokeStyle=this._nextStrokeStyle,this._nowLineWidth=this._nextLineWidth},lineWidth:function(t){t&&t!==this._nowLineWidth&&(this._nextLineWidth=t,this._needToPaint=!0)},strokeStyle:function(t){t!==this._nowStrokeStyle&&(this._nextStrokeStyle=t,this._needToPaint=!0)},fillStyle:function(t){t!==this._nowFillStyle&&(this._nextFillStyle=t,this._needToPaint=!0) +},remove:function(){this.animation.clear(),this.ctx=null,this._container.remove()},addBubbleSeries:function(t){var e=this.ctx;e.save();for(var i=0,n=t.points.length;n>i;i++){var r=t.points[i];r.visible&&!r.isNull&&(e.fillStyle=r.color,e.globalAlpha=this.getPointOpacity(r),e.beginPath(),e.arc(r.posX,r.posY,r.radius,0,2*Math.PI),e.fill())}e.restore()},getPointOpacity:function(t){var e=t.series,i=e.vanchart.highlightTarget;if(i){var n=e.name;return n==i||t._rangeItem==i?1:0.3}return t.opacity},addScatterSeries:function(t){var e=this.ctx; +e.save();for(var i=0,n=t.points.length;n>i;i++){var r=t.points[i];if(r.visible&&!r.isNull){var a=r.options.marker,o=a.symbol,s=isNaN(a.radius)?4.5:a.radius,h=a.fillColor||r.color;e.translate(r.posX,r.posY),e.fillStyle=h,e.strokeStyle=h,e.globalAlpha=this.getPointOpacity(r),this._drawMarker(e,o,s),e.translate(-r.posX,-r.posY)}}e.restore()},addSeries:function(t){t.visible&&(t.type==r.SCATTER_CHART?this.addScatterSeries(t):this.addBubbleSeries(t))},_drawMarker:function(t,e,i){-1!=e.indexOf(r.CIRCLE)?(t.beginPath(),t.arc(0,0,i,0,2*Math.PI)):-1!=e.indexOf(r.SQUARE)?(t.beginPath(),t.moveTo(-i,-i),t.lineTo(i,-i),t.lineTo(i,i),t.lineTo(-i,i),t.closePath()):-1!=e.indexOf(r.DIAMOND)?(i=2*i/Math.sqrt(2),t.beginPath(),t.moveTo(-i,0),t.lineTo(0,-i),t.lineTo(i,0),t.lineTo(0,i),t.closePath()):-1!=e.indexOf(r.TRIANGLE)?(t.beginPath(),t.moveTo(-i,i/Math.sqrt(3)),t.lineTo(0,-(2*Math.sqrt(3)/3)*i),t.lineTo(i,i/Math.sqrt(3)),t.closePath()):(t.beginPath(),t.arc(0,0,i,0,2*Math.PI)),-1==e.indexOf("hollow")?t.fill():(t.fillStyle="white",t.lineWidth=2,t.fill(),t.stroke()) +},findTargetByMousePosition:function(t){for(var e,i=this.elements,n=i.length;e=i[--n];){if(e.contain(t)){return e}}}});d.addShape=function(t,e){d.prototype[t]=function(t){return this._create(e,t)}};for(var f in e.shapes){e.shapes.hasOwnProperty(f)&&d.addShape(f,e.shapes[f])}return d}),define("chart/map/LineMapLayer",["require","../../utils/BaseUtils","../../dom/DomUtils","../../utils/ColorUtils","../../Constants","../../vector/Layer","../../dom/Browser"],function(t){function e(t,e,n){function a(t){return y=t,this +}function o(){return y=[],this}function u(t){c(!0,t)}function c(e,i){var a=y.length;if(a&&y[0]&&y[0].series.options.large){y[0].refreshPointColor();var o=r.mixColorWithAlpha(y[0].color,y[0].opacity)}y.map(function(u){var c=u.series,p=c.options.large,m=!u.isNull&&u.visible&&c.visible,v=u.graphic,_=u.options,y=_.from.lnglat[0],x=_.from.lnglat[1],T=_.to.lnglat[0],b=_.to.lnglat[1];if(y!==T||x!==b){var A=n.latLngToContainerPoint([x,y]),C=n.latLngToContainerPoint([b,T]);if(u.ax=A.x,u.ay=A.y,u.bx=C.x,u.by=C.y,u.curveness=_.curveness,0===u.curveness&&(u.curveness=0.01),m){if(p){t.ctx.globalCompositeOperation="lighter",u._color=o +}else{var L=u.opacity;i&&(L*=u.series.name==i||u._rangeItem==i?1:0.3),u._color=r.mixColorWithAlpha(u.color,L)}}if(m&&!v){var M,P;if(u.graphic=t.arc(),u.graphic.point=u,M=f(u.graphic,u),s&&!e&&!p&&c.options.animation&&u.options.lineWidth&&(u.graphic.style.endAngle=M[3],P=u.graphic.animate().duration(h).ease(l).tween("endAngle",M[4])),s&&!p&&m&&u.options.effect&&u.options.effect.enabled){var w=c.points.indexOf(u);P?P.end(g.bind(this,u,a,w)):g(u,a,w)}}else{m&&v?f(u.graphic,u):!m&&v&&(u.graphic.needToRemove=!0,u.graphic=null,d(u)) +}}})}function d(t){t._effect&&(t._effect.stop(),t._effect=null),t._symbol&&(t._symbol.needToRemove=!0,t._symbol=null)}function f(t,e){var n=i.computeArc(e.ax,e.ay,e.bx,e.by,e.curveness);return t.setStyle({x:n[0],y:n[1],r:n[2],startAngle:n[3],endAngle:n[4],lineWidth:e.options.lineWidth,strokeStyle:e._color}),n}function p(){e.clearAll()}function g(t,i,n){if(t.graphic){var r=t.options.effect.period||2000;t._effect=e.animation.animate(t.graphic.style).delay(r/5*n/i).duration(r).tween("track",function(e){return m(e,t) +}).end(g.bind(this,t,i,n))}}function m(t,i){var n=t.startAngle,r=t.endAngle,a=(r-n)/3,o=r-n+a,s=i.options.effect;if(s.symbol){var h=s.symbol,l=s.width,u=s.height,c=window.devicePixelRatio||1;return i._symbol||(i._symbol=e.image({url:h,width:l,height:u})),function(e){var n=v(o*e,t.x,t.y,t.r,t.startAngle,t.endAngle,a,h,l,u,c);i._symbol.setStyle(n||{x:null})}}var d=1.5;return i._symbol||(i._symbol=e.lineEffect({ox:t.x,oy:t.y,r:t.r,d:d,fillStyle:i.color})),function(e){_(i._symbol,o*e,t.x,t.y,t.r,t.startAngle,t.endAngle,a) +}}function v(t,e,i,n,r,a,o,s,h,l,u){var c=t-o+r;if(!(t+r>a)){var d=o+c,f=n*Math.cos(d)+e,p=n*Math.sin(d)+i;return{x:f,y:p,radian:Math.PI+d}}}function _(t,e,i,n,r,a,o,s){var h=e>s?0:s-e,l=o>e+a?s:s-(e+a-o),u=e-s+a,c=t.style;c.ox=i,c.oy=n,c.r=r,c.startAngle=h+u,c.endAngle=l+u}var y=[];return{data:a,clear:o,draw:c,redraw:u,stop:p,removeEffect:d}}var i=t("../../utils/BaseUtils"),n=t("../../dom/DomUtils"),r=t("../../utils/ColorUtils"),a=(t("../../Constants").LINE_MAP,t("../../vector/Layer")),o=t("../../dom/Browser"),s=(Math.SQRT2,i.isSupportSVG()),h=800,l="ease-in-out-quad",u=a.extend({options:{mainRenderer:null,animationRenderer:null,vanchart:null},initialize:function(t){i.setOptions(this,t) +},setData:function(t){return this._pairs=t,this._draw()},addData:function(t){return this._pairs.push(t),this._draw()},setOptions:function(t){return i.setOptions(this,t),this._lineMap&&this._updateOptions(),this._draw()},redraw:function(){return this._lineMap.redraw(this.options.vanchart.highlightTarget),this.options.mainRenderer.flush(),this},removeEffect:function(t){this._lineMap&&this._lineMap.removeEffect(t)},onAdd:function(t){this._map=t,this._lineMap||this._initRenderer(),t.on("moveend",this._reset,this),t.options.zoomAnimation&&o.any3d&&t.on("zoomanim",this._animateZoom,this),t.on(this._events,this),this._reset() +},onRemove:function(t){this.options.pane?(this.getPane().removeChild(this._canvas),this.getPane().removeChild(this._animCanvas)):(t.getPanes().overlayPane.removeChild(this._canvas),t.getPanes().overlayPane.removeChild(this._animCanvas)),t.off("moveend",this._reset,this),t.options.zoomAnimation&&t.off("zoomanim",this._animateZoom,this),t.off(this._events,this)},addTo:function(t){return t.addLayer(this),this},_initRenderer:function(){var t=this._canvas=this.options.mainRenderer._container.node(),i=this._animCanvas=this.options.animationRenderer._container.node(),r=n.TRANSFORM_ORIGIN; +t.style[r]=i.style[r]="50% 50%";var a=this._map.options.zoomAnimation&&o.any3d,s="leaflet-zoom-"+(a?"animated":"hide"),h="leaflet-linemap-layer leaflet-layer ";n.addClass(t,h+s),n.addClass(i,h+s),this._lineMap=e(this.options.mainRenderer,this.options.animationRenderer,this._map)},_updateOptions:function(){},_reset:function(){this._lineMap.stop();var t=this._map.containerPointToLayerPoint([0,0]);n.setPosition(this._canvas,t),n.setPosition(this._animCanvas,t),this._draw()},_draw:function(){return this._map&&this._pairs&&this._pairs.length?(this._lineMap.data(this._pairs).draw(),void this.options.mainRenderer.flush()):void this.options.mainRenderer.flush() +},_animateZoom:function(t){this._lineMap.stop();var e=this._map.getZoomScale(t.zoom),r=this._map._getCenterOffset(t.center)._multiplyBy(-e).subtract(this._map._getMapPanePos());if(n.setTransform){n.setTransform(this._canvas,r,e),n.setTransform(this._animCanvas,r,e)}else{var a=i.makeTranslate(r)+" scale("+e+")";this._canvas.style[n.TRANSFORM]=a,this._animCanvas.style[n.TRANSFORM]=a}},_events:{tap:function(t){var e=this.options.vanchart;e&&e.isMobile()&&this._map.fire("mousemove",t);var i=this.hoverPoint; +i&&i._onPointTap(t)},unchosen:function(){var t=this.options.vanchart,e=this.options.mainRenderer;t.hideTooltip(),this.hoverPoint&&(this.recoverStrokeColor(this.hoverPoint),this.hoverPoint=null),e.flush()},mousemove:function(t){var e=this.options.mainRenderer,i=this.options.vanchart,n=i.handler,r=this,a=e.findTargetByMousePosition(t.containerPoint),o=a&&a.point,s=o&&o.series.options.large;o?(n.removeAllChosen(t),n.lineMapTargetFind=!0,i.showTooltip(o,t),n.cursor(o.series._pointerStyle()),o.mouseOverColor&&!s&&o!==r.hoverPoint&&(a.style.strokeStyle=a.point.mouseOverColor)):(n.lineMapTargetFind=!1,!i.hoverPoint&&i.hideTooltip(),i.handler.cursor("")),s||r.hoverPoint===o||(r.hoverPoint&&r.recoverStrokeColor(r.hoverPoint),r.hoverPoint=o,i.hoverPoint=o,e.flush()) +}},recoverStrokeColor:function(t){t.graphic.style.strokeStyle=t._color}});return function(t){return new u(t)}}),define("chart/map/CanvasLayer",["require","../../utils/BaseUtils","../../dom/DomUtils","../../utils/ColorUtils","../../Constants","../../vector/Layer","../../dom/Browser"],function(t){var e=t("../../utils/BaseUtils"),i=t("../../dom/DomUtils"),n=(t("../../utils/ColorUtils"),t("../../Constants"),t("../../vector/Layer")),r=t("../../dom/Browser");return n.extend({options:{renderer:null,vanchart:null},initialize:function(t){e.setOptions(this,t) +},setOptions:function(t){e.setOptions(this,t),this._draw()},onAdd:function(t){this._map=t,this._initRenderer(),t.on("moveend",this._reset,this),t.options.zoomAnimation&&r.any3d&&t.on("zoomanim",this._animateZoom,this),t.on(this._events,this),this._reset()},onRemove:function(t){this.options.pane?this.getPane().removeChild(this._canvas):t.getPanes().overlayPane.removeChild(this._canvas),t.off("moveend",this._reset,this),t.options.zoomAnimation&&t.off("zoomanim",this._animateZoom,this),t.off(this._events,this) +},setData:function(t){this._points=t,this._draw()},addTo:function(t){return t.addLayer(this),this},_initRenderer:function(){var t=this._canvas=this.options.renderer._container.node(),e=i.TRANSFORM_ORIGIN;t.style[e]="50% 50%";var n=this._map.options.zoomAnimation&&r.any3d,a="leaflet-zoom-"+(n?"animated":"hide"),o="leaflet-linemap-layer leaflet-layer ";i.addClass(t,o+a)},_reset:function(){var t=this._map.containerPointToLayerPoint([0,0]);i.setPosition(this._canvas,t),this._draw()},_draw:function(){this._map&&this._points&&this._points.length&&this._drawPoints(this._points),this.options.renderer.flush() +},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),n=this._map._getCenterOffset(t.center)._multiplyBy(-e).subtract(this._map._getMapPanePos());i.setTransform(this._canvas,n,e)},_events:{tap:function(t){var e=this.options.vanchart;e.isMobile()&&(this._events.mousemove.call(this,t),e.setTimeout("mobileTooltip",function(){e.hideTooltip()},4000));var i=this.hoverPoint;i&&i._onPointTap(t)},mousemove:function(t){var e=this.options.renderer,i=this.options.vanchart,n=this,r=e.findTargetByMousePosition(t.containerPoint),a=r&&r.point; +a&&a.series.options.large;a?(i.handler.removeAllChosen(t),i.handler.canvasMapTargetFind=!0,i.showTooltip(a,t),i.handler.cursor("pointer")):(i.handler.canvasMapTargetFind=!1,i.hoverPoint||i.hideTooltip(),i.handler.cursor("")),n.hoverPoint!=a&&(n.hoverPoint=a)}}})}),define("chart/map/CanvasMapLayer",["require","./CanvasLayer","../../utils/BaseUtils","../../utils/ColorUtils","../../Constants"],function(t){var e=t("./CanvasLayer"),i=(t("../../utils/BaseUtils"),t("../../utils/ColorUtils")),n=t("../../Constants"),r=30; +return e.extend({_drawPoints:function(t){var e=this.options.vanchart,i=this.options.renderer,a=e.hasRangeLegend(),o=i.width,s=i.height,h=t.length,l=h;for(i.elements=[];l--;){var u=t[l],c=u.getLatLng(),d=e.latLngToContainerPoint(c),f=d.x,p=d.y;if(-r>f||f>o+r||-r>p||p>s+r||!a&&i.shouldFilter(f,p)){u.graphic&&(u.graphic.needToRemove=!0,u.graphic=null)}else{if(u.x=d.x,u.y=d.y,u.graphic){i.elements.push(u.graphic);var f=u.x,p=u.y,g=u.options.marker;if(g){var m=g.symbol,v=g.radius;m===n.LOCATION?p-=v:(m===n.SQUARE_HOLLOW||m===n.SQUARE)&&(f-=v,p-=v) +}u.graphic.setStyle({x:f,y:p})}else{u.graphic=this._getGraphic(u,i),u.graphic.point=u}}}var _=null,y=null,x=i.elements;for(_=0,y=length-1;y>_;_+=1,y-=1){var T=x[_];x[_]=x[y],x[y]=T}i.resetFilter()},_getGraphic:function(t,e){if(t.series.type===n.SCATTER_CHART){var r=t.options.marker,a=r.symbol,o=r.radius,s=r.fillColor||t.color;return a===n.LOCATION?e.image({url:n.LOCATION,x:t.x,y:t.y-o,width:2*o,height:2*o,color:t.color}):e.marker(a,{x:t.x,y:t.y,radius:o,color:s})}return e.circle({x:t.x,y:t.y,r:t.radius,fillStyle:i.mixColorWithAlpha(t.color,t.opacity)}) +}})}),function(t,e,i){"undefined"!=typeof module&&module.exports?module.exports=i():"function"==typeof define&&define.amd?define("chart/map/heatmap",i):e[t]=i()}("h337",this,function(){var t={defaultRadius:40,defaultRenderer:"canvas2d",defaultGradient:{0.25:"rgb(0,0,255)",0.55:"rgb(0,255,0)",0.85:"yellow",1:"rgb(255,0,0)"},defaultMaxOpacity:1,defaultMinOpacity:0,defaultBlur:0.85,defaultXField:"x",defaultYField:"y",defaultValueField:"value",plugins:{}},e=function(){var e=function(t){this._coordinator={},this._data=[],this._radi=[],this._min=10,this._max=1,this._xField=t.xField||t.defaultXField,this._yField=t.yField||t.defaultYField,this._valueField=t.valueField||t.defaultValueField,t.radius&&(this._cfgRadius=t.radius) +},i=t.defaultRadius;return e.prototype={_organiseData:function(t,e){var n=t[this._xField],r=t[this._yField],a=this._radi,o=this._data,s=this._max,h=this._min,l=+(t[this._valueField]||1),u=t.radius||this._cfgRadius||i;o[n]||(o[n]=[],a[n]=[]),o[n][r]?o[n][r]+=l:(o[n][r]=l,a[n][r]=u);var c=o[n][r];return c>s?(e?this.setDataMax(c):this._max=c,!1):h>c?(e?this.setDataMin(c):this._min=c,!1):{x:n,y:r,value:l,radius:u,min:h,max:s}},_unOrganizeData:function(){var t=[],e=this._data,i=this._radi;for(var n in e){for(var r in e[n]){t.push({x:n,y:r,radius:i[n][r],value:e[n][r]}) +}}return{min:this._min,max:this._max,data:t}},_onExtremaChange:function(){this._coordinator.emit("extremachange",{min:this._min,max:this._max})},addData:function(){if(arguments[0].length>0){for(var t=arguments[0],e=t.length;e--;){this.addData.call(this,t[e])}}else{var i=this._organiseData(arguments[0],!0);i&&(0===this._data.length&&(this._min=this._max=i.value),this._coordinator.emit("renderpartial",{min:this._min,max:this._max,data:[i]}))}return this},setData:function(t){var e=t.data,i=e.length; +this._data=[],this._radi=[];for(var n=0;i>n;n++){this._organiseData(e[n],!1)}return this._max=t.max,this._min=t.min||0,this._onExtremaChange(),this._coordinator.emit("renderall",this._getInternalData()),this},removeData:function(){},setDataMax:function(t){return this._max=t,this._onExtremaChange(),this._coordinator.emit("renderall",this._getInternalData()),this},setDataMin:function(t){return this._min=t,this._onExtremaChange(),this._coordinator.emit("renderall",this._getInternalData()),this},setCoordinator:function(t){this._coordinator=t +},_getInternalData:function(){return{max:this._max,min:this._min,data:this._data,radi:this._radi}},getData:function(){return this._unOrganizeData()}},e}(),i=function(){function t(t){var i=t.container,n=this.shadowCanvas=document.createElement(window.VAN_CANVAS),r=this.canvas=t.canvas||document.createElement(window.VAN_CANVAS);window.VanCanvasManager&&VanCanvasManager.initElement(r),window.VanCanvasManager&&VanCanvasManager.initElement(n);var a=(this._renderBoundaries=[10000,10000,0,0],t.container.currentStyle||getComputedStyle(t.container)||{}); +r.className="heatmap-canvas",this._width=r.width=n.width=t.width||+a.width.replace(/px/,""),this._height=r.height=n.height=t.height||+a.height.replace(/px/,""),this.shadowCtx=n.getContext("2d"),this.ctx=r.getContext("2d"),r.style.cssText=n.style.cssText="position:absolute;left:0;top:0;",i.style.position="relative",i.appendChild(r),this._palette=e(t),this._templates={},this._setStyles(t)}var e=function(t){var e=t.gradient||t.defaultGradient,i=document.createElement(window.VAN_CANVAS);if(i.getContext){var n=i.getContext("2d"); +i.width=256,i.height=1;var r=n.createLinearGradient(0,0,256,1);for(var a in e){r.addColorStop(a,e[a])}return n.fillStyle=r,n.fillRect(0,0,256,1),n.getImageData(0,0,256,1).data}return{}},i=function(t,e){var i=document.createElement(window.VAN_CANVAS),n=i.getContext("2d"),r=t,a=t;if(i.width=i.height=2*t,1===e){n.beginPath(),n.arc(r,a,t,0,2*Math.PI,!1),n.fillStyle="rgba(0,0,0,1)",n.fill()}else{var o=n.createRadialGradient(r,a,t*e,r,a,t);o.addColorStop(0,"rgba(0,0,0,1)"),o.addColorStop(1,"rgba(0,0,0,0)"),n.fillStyle=o,n.fillRect(0,0,2*t,2*t) +}return i},n=function(t){for(var e=[],i=t.min,n=t.max,r=t.radi,t=t.data,a=Object.keys(t),o=a.length;o--;){for(var s=a[o],h=Object.keys(t[s]),l=h.length;l--;){var u=h[l],c=t[s][u],d=r[s][u];e.push({x:s,y:u,value:c,radius:d})}}return{min:i,max:n,data:e}};return t.prototype={renderPartial:function(t){t.data.length>0&&(this.ctx.getImageData?(this._drawAlpha(t),this._colorize()):this._drawPoints(t))},renderAll:function(t){if(this._clear(),t.data.length>0){var t=n(t);this.ctx.getImageData?(this._drawAlpha(t),this._colorize()):this._drawPoints(t) +}},_drawPoints:function(t){for(var e=this._min=t.min,i=this._max=t.max,t=t.data||[],n=t.length,r=1-this._blur,a=this.ctx;n--;){var o=t[n],s=+o.radius,h=Math.min(o.value,i),l=+o.x,u=+o.y,c=(h-e)/(i-e);c=isNaN(c)?1:c,a.globalAlpha=0.01>c?0.01:c;var d=a.createRadialGradient(l,u,s*r,l,u,s),f=this._gradientConfig;for(var p in f){d.addColorStop(+p,f[p])}a.fillStyle=d,a.beginPath(),a.moveTo(l,u),a.arc(l,u,s,0,2*Math.PI,!1),a.fill()}},_updateGradient:function(t){this._palette=e(t)},updateConfig:function(t){t.gradient&&this._updateGradient(t),this._setStyles(t) +},setDimensions:function(t,e){this._width=t,this._height=e,this.canvas.width=this.shadowCanvas.width=t,this.canvas.height=this.shadowCanvas.height=e},_clear:function(){this.shadowCtx.clearRect(0,0,this._width,this._height),this.ctx.clearRect(0,0,this._width,this._height)},_setStyles:function(t){this._blur=0===t.blur?0:t.blur||t.defaultBlur,this._gradientConfig=t.gradient||t.defaultGradient,t.backgroundColor&&(this.canvas.style.backgroundColor=t.backgroundColor),this._width=this.canvas.width=this.shadowCanvas.width=t.width||this._width,this._height=this.canvas.height=this.shadowCanvas.height=t.height||this._height,this._opacity=255*(t.opacity||0),this._maxOpacity=255*(t.maxOpacity||t.defaultMaxOpacity),this._minOpacity=255*(t.minOpacity||t.defaultMinOpacity),this._useGradientOpacity=!!t.useGradientOpacity +},_drawAlpha:function(t){for(var e=this._min=t.min,n=this._max=t.max,t=t.data||[],r=t.length,a=1-this._blur;r--;){var o,s=t[r],h=s.x,l=s.y,u=s.radius,c=Math.min(s.value,n),d=h-u,f=l-u,p=this.shadowCtx;this._templates[u]?o=this._templates[u]:this._templates[u]=o=i(u,a);var g=(c-e)/(n-e);g=isNaN(g)?1:g,p.globalAlpha=0.01>g?0.01:g,p.drawImage(o,d,f),dthis._renderBoundaries[2]&&(this._renderBoundaries[2]=d+2*u),f+2*u>this._renderBoundaries[3]&&(this._renderBoundaries[3]=f+2*u) +}},_colorize:function(){var t=this._renderBoundaries[0],e=this._renderBoundaries[1],i=this._renderBoundaries[2]-t,n=this._renderBoundaries[3]-e,r=this._width,a=this._height,o=this._opacity,s=this._maxOpacity,h=this._minOpacity,l=this._useGradientOpacity;0>t&&(t=0),0>e&&(e=0),t+i>r&&(i=r-t),e+n>a&&(n=a-e);for(var u=this.shadowCtx.getImageData(t,e,i,n),c=u.data,d=c.length,f=this._palette,p=3;d>p;p+=4){var g=c[p],m=4*g;if(m){var v;v=o>0?o:s>g?h>g?h:g:s,c[p-3]=f[m],c[p-2]=f[m+1],c[p-1]=f[m+2],c[p]=l?f[m+3]:v +}}u.data=c,this.ctx.putImageData(u,t,e),this._renderBoundaries=[1000,1000,0,0]},getValueAt:function(t){var e,i=this.shadowCtx,n=i.getImageData(t.x,t.y,1,1),r=n.data[3],a=this._max,o=this._min;return e=Math.abs(a-o)*(r/255)>>0},getDataURL:function(){return this.canvas.toDataURL()}},t}(),n=function(){var e=!1;return"canvas2d"===t.defaultRenderer&&(e=i),e}(),r={merge:function(){for(var t={},e=arguments.length,i=0;e>i;i++){var n=arguments[i];for(var r in n){t[r]=n[r]}}return t}},a=function(){function i(){var i=this._config=r.merge(t,arguments[0]||{}); +if(this._coordinator=new a,i.plugin){var s=i.plugin;if(!t.plugins[s]){throw new Error("Plugin '"+s+"' not found. Maybe it was not registered.")}var h=t.plugins[s];this._renderer=new h.renderer(i),this._store=new h.store(i)}else{this._renderer=new n(i),this._store=new e(i)}o(this)}var a=function(){function t(){this.cStore={}}return t.prototype={on:function(t,e,i){var n=this.cStore;n[t]||(n[t]=[]),n[t].push(function(t){return e.call(i,t)})},emit:function(t,e){var i=this.cStore;if(i[t]){for(var n=i[t].length,r=0; +n>r;r++){var a=i[t][r];a(e)}}}},t}(),o=function(t){var e=t._renderer,i=t._coordinator,n=t._store;i.on("renderpartial",e.renderPartial,e),i.on("renderall",e.renderAll,e),i.on("extremachange",function(e){t._config.onExtremaChange&&t._config.onExtremaChange({min:e.min,max:e.max,gradient:t._config.gradient||t._config.defaultGradient})}),n.setCoordinator(i)};return i.prototype={addData:function(){return this._store.addData.apply(this._store,arguments),this},removeData:function(){return this._store.removeData&&this._store.removeData.apply(this._store,arguments),this +},setData:function(){return this._store.setData.apply(this._store,arguments),this},setDataMax:function(){return this._store.setDataMax.apply(this._store,arguments),this},setDataMin:function(){return this._store.setDataMin.apply(this._store,arguments),this},configure:function(t){return this._config=r.merge(this._config,t),this._renderer.updateConfig(this._config),this._coordinator.emit("renderall",this._store._getInternalData()),this},repaint:function(){return this._coordinator.emit("renderall",this._store._getInternalData()),this +},getData:function(){return this._store.getData()},getDataURL:function(){return this._renderer.getDataURL()},getValueAt:function(t){return this._store.getValueAt?this._store.getValueAt(t):this._renderer.getValueAt?this._renderer.getValueAt(t):null}},i}(),o={create:function(t){return new a(t)},register:function(e,i){t.plugins[e]=i}};return o}),define("chart/map/HeatMapOverlay",["require","./heatmap","../../vector/Layer","../../dom/DomUtils","../../utils/Point2D","../../utils/BaseUtils","./LatLng"],function(t){var e=t("./heatmap"),i=t("../../vector/Layer"),n=t("../../dom/DomUtils"),r=t("../../utils/Point2D"),a=t("../../utils/BaseUtils"),o=t("./LatLng"),s=i.extend({initialize:function(t){this.cfg=t,this._el=n.create("div","leaflet-zoom-hide"),this._el.style.zIndex=201,this._data=[],this._max=1,this._min=0,this.cfg.container=this._el +},onAdd:function(t){var i=t.getSize();this._map=t,this._width=i.x,this._height=i.y,this._el.style.width=i.x+"px",this._el.style.height=i.y+"px",this._el.style.position="absolute",this._origin=this._map.layerPointToLatLng(new r(0,0)),t.getPanes().overlayPane.appendChild(this._el),this._heatmap||(this._heatmap=e.create(this.cfg)),t.on("moveend",this._reset,this),t.on(this._events,this),this._draw()},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){t.getPanes().overlayPane.removeChild(this._el),t.off("moveend",this._reset,this),t.off(this._events,this) +},_draw:function(){if(this._map){var t=this._map.getPanes().mapPane,e=t._leaflet_pos;a.isSupportSVG()?this._el.style[s.CSS_TRANSFORM]="translate("+-Math.round(e.x)+"px,"+-Math.round(e.y)+"px)":(this._el.style.left=-Math.round(e.x)+"px",this._el.style.bottom=Math.round(e.y)+"px"),this._update()}},_update:function(){var t,e,i,n={max:this._max,min:this._min,data:[]};if(t=this._map.getBounds(),e=this._map.getZoom(),i=Math.pow(2,e),0===this._data.length){return void (this._heatmap&&this._heatmap.setData(n)) +}for(var r=[],a=this.cfg.scaleRadius?i:1,o=0,s=0,h=this.cfg.valueField,l=this._data.length;l--;){var u=this._data[l],c=u[h],d=u.latlng;if(t.contains(d)){o=Math.max(c,o),s=Math.min(c,s);var f=this._map.latLngToContainerPoint(d),p={x:Math.round(f.x),y:Math.round(f.y)};p[h]=c;var g;g=u.radius?u.radius*a:(this.cfg.radius||2)*a,p.radius=g,r.push(p)}}this.cfg.useLocalExtrema&&(n.max=o,n.min=s),n.data=r,this._heatmap.setData(n)},setData:function(t){this._max=a.hasDefined(t.max)?t.max:this._max,this._min=a.hasDefined(t.min)?t.min:this._min; +for(var e=this.cfg.lnglatField||"lnglat",i=this.cfg.valueField||"value",t=t.data,n=t.length,r=[];n--;){var s=t[n].options,h=new o(s[e][1],s[e][0]),l={latlng:h};l[i]=s[i],s.radius&&(l.radius=s.radius),r.push(l)}this._data=r,this._draw()},addData:function(t){if(t.length>0){for(var e=t.length;e--;){this.addData(t[e])}}else{var i=this.cfg.lnglatField||"lnglat",n=this.cfg.valueField||"value",r=t,a=new o(r[i][1],r[i][0]),s={latlng:a};s[n]=r[n],this._max=Math.max(this._max,s[n]),this._min=Math.min(this._min,s[n]),r.radius&&(s.radius=r.radius),this._data.push(s),this._draw() +}},_reset:function(){this._origin=this._map.layerPointToLatLng(new r(0,0));var t=this._map.getSize();(this._width!==t.x||this._height!==t.y)&&(this._width=t.x,this._height=t.y,this._el.style.width=this._width+"px",this._el.style.height=this._height+"px",this._heatmap._renderer.setDimensions(this._width,this._height)),this._draw()},_setCursor:function(t){var e=this._heatmap._renderer&&this._heatmap._renderer.canvas;e&&(e.style.cursor=t)},_events:{tap:function(t){var e=this._map;e.isMobile()&&e.fire("mousemove",t),e.hoverPoint&&e.hoverPoint._onPointTap(t) +},mousemove:function(t){var e=this._map,i=e.handler._getCanvasClosestPoint(t.containerPoint);i?(e.handler.removeAllChosen(t),e.handler.heatMapTargetFind=!0,i._events||i.getEvents&&i.on(i.getEvents(),i),e.showTooltip(i,t),e.hoverPoint=i,this._setCursor(i.series._pointerStyle())):(this._setCursor("inherit"),e.handler.heatMapTargetFind=!1,e.hideTooltip())}}});return s.CSS_TRANSFORM=function(){for(var t=document.createElement("div"),e=["transform","WebkitTransform","MozTransform","OTransform","msTransform"],i=0; +ie;e++){this.addLayer(t[e])}}},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return !!t&&(t in this._layers||this.getLayerId(t) in this._layers)},clearLayers:function(){for(var t in this._layers){this.removeLayer(this._layers[t]) +}return this},invoke:function(t){var e,i,n=Array.prototype.slice.call(arguments,1);for(e in this._layers){i=this._layers[e],i[t]&&i[t].apply(i,n)}return this},onAdd:function(t){for(var e in this._layers){t.addLayer(this._layers[e])}},onRemove:function(t){for(var e in this._layers){t.removeLayer(this._layers[e])}},eachLayer:function(t,e){for(var i in this._layers){t.call(e,this._layers[i])}return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];for(var e in this._layers){t.push(this._layers[e]) +}return t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return i.stamp(t)}});return n}),define("vector/shape/Path",["require","./../Layer","../../dom/Browser","../../utils/BaseUtils"],function(t){var e=t("./../Layer"),i=t("../../dom/Browser"),n=(t("../../utils/BaseUtils"),1200),r="cubic-out",a=300,o="ease",s=1000,h=r,l=e.extend({onAdd:function(){this._path=this._renderer.path().style(this.options),this._reset(),this._path.add()},onRemove:function(){this._path.remove() +},redraw:function(){return this._map&&this._reset(),this},setStyle:function(t){return this.options=t||this.options,this._renderer&&this._path.style(this.options),this},initAnimate:function(){this._path.style({"fill-opacity":0}).animate({style:this.options,duration:n,ease:r})},exitAnimate:function(t,e){var i=t.getCurrentGeo();0==e?this._path.style(i.defaultAreaStyle()):this._path.animate({style:i.defaultAreaStyle(),duration:a,ease:o})},reShowAnimate:function(){this._path.style({"fill-opacity":0}).animate({style:this.options,duration:s,ease:h}) +},_onMouseState:function(t,e,i,n){n.filter="none",this._path.animate({duration:e,ease:i,style:n})},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options["stroke-width"]?this.options["stroke-width"]/2:0)+(i.touch?10:0)},node:function(){return this._path.node()}});return l}),define("chart/map/LatLngBounds",["require","./LatLng"],function(t){var e=t("./LatLng"),i=function(t,e){if(t){for(var i=e?[t,e]:t,n=0,r=i.length;r>n;n++){this.extend(i[n])}}};return i.prototype={extend:function(t){var n,r,a=this._southWest,o=this._northEast; +if(t instanceof e){n=t,r=t}else{if(!(t instanceof i)){return t?this.extend(e.create(t)||i.create(t)):this}if(n=t._southWest,r=t._northEast,!n||!r){return this}}return a||o?(a.lat=Math.min(n.lat,a.lat),a.lng=Math.min(n.lng,a.lng),o.lat=Math.max(r.lat,o.lat),o.lng=Math.max(r.lng,o.lng)):(this._southWest=new e(n.lat,n.lng),this._northEast=new e(r.lat,r.lng)),this},pad:function(t){var n=this._southWest,r=this._northEast,a=Math.abs(n.lat-r.lat)*t,o=Math.abs(n.lng-r.lng)*t;return new i(new e(n.lat-a,n.lng-o),new e(r.lat+a,r.lng+o)) +},getCenter:function(){return new e((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new e(this.getNorth(),this.getWest())},getSouthEast:function(){return new e(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng +},getNorth:function(){return this._northEast.lat},contains:function(t){t="number"==typeof t[0]||t instanceof e?e.create(t):i.create(t);var n,r,a=this._southWest,o=this._northEast;return t instanceof i?(n=t.getSouthWest(),r=t.getNorthEast()):n=r=t,n.lat>=a.lat&&r.lat<=o.lat&&n.lng>=a.lng&&r.lng<=o.lng},intersects:function(t){t=i.create(t);var e=this._southWest,n=this._northEast,r=t.getSouthWest(),a=t.getNorthEast(),o=a.lat>=e.lat&&r.lat<=n.lat,s=a.lng>=e.lng&&r.lng<=n.lng;return o&&s},overlaps:function(t){t=i.create(t); +var e=this._southWest,n=this._northEast,r=t.getSouthWest(),a=t.getNorthEast(),o=a.lat>e.lat&&r.late.lng&&r.lng1?K:-1>t?-K:Math.asin(t)}function i(t){return t[0]}function n(t){return t[1]}function r(t){return t}function a(){return !0}function o(){return 0}function s(t){return t.innerRadius}function h(t){return t.outerRadius}function l(t){return t.startAngle}function u(t){return t.endAngle}function c(t){return t&&t.padAngle +}function d(t,e,i,n){return(t-i)*e-(e-n)*t>0?0:1}function f(t,e,i,n,r){var a=t[0]-e[0],o=t[1]-e[1],s=(r?n:-n)/Math.sqrt(a*a+o*o),h=s*o,l=-s*a,u=t[0]+h,c=t[1]+l,d=e[0]+h,f=e[1]+l,p=(u+d)/2,g=(c+f)/2,m=d-u,v=f-c,_=m*m+v*v,y=i-n,x=u*f-d*c,T=(0>v?-1:1)*Math.sqrt(y*y*_-x*x),b=(x*v-m*T)/_,A=(-x*m-v*T)/_,C=(x*v+m*T)/_,L=(-x*m+v*T)/_,M=b-p,P=A-g,w=C-p,S=L-g;return M*M+P*P>w*w+S*S&&(b=C,A=L),[[b-h,A-l],[b*i/y,A*i/y]]}function p(t,e,i,n){var r=t[0],a=i[0],o=e[0]-r,s=n[0]-a,h=t[1],l=i[1],u=e[1]-h,c=n[1]-l,d=(s*(h-l)-c*(r-a))/(c*o-s*u); +return[r+d*o,h+d*u]}function g(t){return"function"==typeof t?t:function(){return t}}function m(t){function e(e){function i(){a.push("M",h(t(l),u))}for(var n,a=[],l=[],c=-1,d=e.length,f=g(r),p=g(o);++c1&&r.push("H",n[0]),r.join("")}function x(t){for(var e=0,i=t.length,n=t[0],r=[n[0],",",n[1]];++e1){s=e[1],a=t[h],h++,n+="C"+(r[0]+o[0])+","+(r[1]+o[1])+","+(a[0]-s[0])+","+(a[1]-s[1])+","+a[0]+","+a[1]; +for(var l=2;l9&&(r=3*e/Math.sqrt(r),o[s]=r*i,o[s+1]=r*n))}for(s=-1;++s<=h;){r=(t[Math.min(h,s+1)][0]-t[Math.max(0,s-1)][0])/(6*(1+o[s]*o[s])),a.push([r||0,o[s]*r||0])}return a}function B(t){return t.length<3?v(t):t[0]+L(t,I(t))}function N(t){for(var e,i,n,r=-1,a=t.length;++rh?0:1;if(t>o&&(c=o,o=t,t=c),l>=Q){return i(o,u)+(t?i(t,1-u):"")+"Z" +}var c,g,b,A,C,L,M,P,w,S,E,O,R=0,k=0,D=[];if((A=(+T.apply(this,arguments)||0)/2)&&(b=_===tt?Math.sqrt(t*t+o*o):+_.apply(this,arguments),u||(k*=-1),o&&(k=e(b/o*Math.sin(A))),t&&(R=e(b/t*Math.sin(A)))),o){C=o*Math.cos(s+k),L=o*Math.sin(s+k),M=o*Math.cos(h-k),P=o*Math.sin(h-k);var I=Math.abs(h-s-2*k)<=q?0:1;if(k&&d(C,L,M,P)===u^I){var B=(s+h)/2;C=o*Math.cos(B),L=o*Math.sin(B),M=P=null}}else{C=L=0}if(t){w=t*Math.cos(h-R),S=t*Math.sin(h-R),E=t*Math.cos(s+R),O=t*Math.sin(s+R);var N=Math.abs(s-h+2*R)<=q?0:1; +if(R&&d(w,S,E,O)===1-u^N){var G=(s+h)/2;w=t*Math.cos(G),S=t*Math.sin(G),E=O=null}}else{w=S=0}if((c=Math.min(Math.abs(o-t)/2,+v.apply(this,arguments)))>0.001){g=o>t^u?0:1;var F=null==E?[w,S]:null==M?[C,L]:p([C,L],[E,O],[M,P],[w,S]),H=C-F[0],z=L-F[1],U=M-F[0],V=P-F[1],W=1/Math.sin(Math.acos((H*U+z*V)/(Math.sqrt(H*H+z*z)*Math.sqrt(U*U+V*V)))/2),X=Math.sqrt(F[0]*F[0]+F[1]*F[1]);if(null!=M){var Y=Math.min(c,(o-X)/(W+1)),Z=f(null==E?[w,S]:[E,O],[C,L],o,Y,u),j=f([M,P],[w,S],o,Y,u);c===Y?D.push("M",Z[0],"A",Y,",",Y," 0 0,",g," ",Z[1],"A",o,",",o," 0 ",1-u^d(Z[1][0],Z[1][1],j[1][0],j[1][1]),",",u," ",j[1],"A",Y,",",Y," 0 0,",g," ",j[0]):D.push("M",Z[0],"A",Y,",",Y," 0 1,",g," ",j[0]) +}else{D.push("M",C,",",L)}if(null!=E){var J=Math.min(c,(t-X)/(W-1)),$=f([C,L],[E,O],t,-J,u),et=f([w,S],null==M?[C,L]:[M,P],t,-J,u);c===J?D.push("L",et[0],"A",J,",",J," 0 0,",g," ",et[1],"A",t,",",t," 0 ",u^d(et[1][0],et[1][1],$[1][0],$[1][1]),",",1-u," ",$[1],"A",J,",",J," 0 0,",g," ",$[0]):D.push("L",et[0],"A",J,",",J," 0 0,",g," ",$[0])}else{n&&D.push("L",w,",",S)}}else{D.push("M",C,",",L),null!=M&&D.push("A",o,",",o," 0 ",I,",",u," ",M,",",P),n&&D.push("L",w,",",S),null!=E&&D.push("A",t,",",t," 0 ",N,",",1-u," ",E,",",O) +}return r&&D.push("Z"),D.join("")}function i(t,e){return"M0,"+t+"A"+t+","+t+" 0 1,"+e+" 0,"+-t+"A"+t+","+t+" 0 1,"+e+" 0,"+t}var n=!0,r=!0,a=s,m=h,v=o,_=tt,y=l,x=u,T=c;return t.toCenter=function(e){return arguments.length?(n=!!e,t):n},t.closePath=function(e){return arguments.length?(r=!!e,t):r},t.innerRadius=function(e){return arguments.length?(a=g(e),t):a},t.outerRadius=function(e){return arguments.length?(m=g(e),t):m},t.cornerRadius=function(e){return arguments.length?(v=g(e),t):v},t.padRadius=function(e){return arguments.length?(_=e==tt?tt:g(e),t):_ +},t.startAngle=function(e){return arguments.length?(y=g(e),t):y},t.endAngle=function(e){return arguments.length?(x=g(e),t):x},t.padAngle=function(e){return arguments.length?(T=g(e),t):T},t.centroid=function(){var t=(+a.apply(this,arguments)+ +m.apply(this,arguments))/2,e=(+y.apply(this,arguments)+ +x.apply(this,arguments))/2-K;return[Math.cos(e)*t,Math.sin(e)*t]},t};var tt="auto";$.line=function(){return m(r)};var et=new X({linear:v,"linear-closed":_,step:y,"step-before":x,"step-after":T,basis:P,"basis-open":w,"basis-closed":S,bundle:E,cardinal:C,"cardinal-open":b,"cardinal-closed":A,monotone:B}); +et.forEach(function(t,e){e.key=t,e.closed=/-closed$/.test(t)});var it=[0,2/3,1/3,0],nt=[0,1/3,2/3,0],rt=[0,1/6,2/3,1/6];return $.line.radial=function(){var t=m(N);return t.radius=t.x,delete t.x,t.angle=t.y,delete t.y,t},x.reverse=T,T.reverse=x,$.area=function(){return G(r)},$.area.radial=function(){var t=G(N);return t.radius=t.x,delete t.x,t.innerRadius=t.x0,delete t.x0,t.outerRadius=t.x1,delete t.x1,t.angle=t.y,delete t.y,t.startAngle=t.y0,delete t.y0,t.endAngle=t.y1,delete t.y1,t},$.diagonal=function(){function t(t,r){var a=e.call(this,t,r),o=i.call(this,t,r),s=(a.y+o.y)/2,h=[a,{x:a.x,y:s},{x:o.x,y:s},o]; +return h=h.map(n),"M"+h[0]+"C"+h[1]+" "+h[2]+" "+h[3]}var e=F,i=H,n=z;return t.source=function(i){return arguments.length?(e=g(i),t):e},t.target=function(e){return arguments.length?(i=g(e),t):i},t.projection=function(e){return arguments.length?(n=e,t):n},t},$.getMarkerPath=function(t,e){switch(t){case Y.CIRCLE:case Y.CIRCLE_HOLLOW:return $.arc().outerRadius(e)({startAngle:0,endAngle:2*Math.PI});case Y.SQUARE:case Y.SQUARE_HOLLOW:var i=-e+","+-e,n=e+","+-e,r=e+","+e,a=-e+","+e;return"M"+i+"L"+n+"L"+r+"L"+a+"Z"; +case Y.DIAMOND:case Y.DIAMOND_HOLLOW:e=2*e/Math.sqrt(2);var o=-e+",0",s="0,"+-e,h=e+",0",l="0,"+e;return"M"+o+"L"+s+"L"+h+"L"+l+"Z";case Y.TRIANGLE:case Y.TRIANGLE_HOLLOW:var u=Math.sqrt(3),o=-2*e/u+","+e,s="0,"+-e,h=2*e/u+","+e;return"M"+o+"L"+s+"L"+h+"Z";case Y.STAR:e*=1.4;for(var c=V(e),d="",f=-1;++f<5;){var p=f*U(72),g=p+U(36),m=W(p,e,3),v=W(g,c,3),_=f?"L":"M";d+=_+m[0]+","+m[1],d+="L"+v[0]+","+v[1]}return d+="z";case Y.LOCATION:return"M34.75,15.75A14.75,14.75,0,1,0,8.19,24.51L20,40,31.82,24.51h0A14.62,14.62,0,0,0,34.75,15.75ZM20,21.91a5.77,5.77,0,1,1,5.77-5.77A5.77,5.77,0,0,1,20,21.91Z"; +default:return""}},$}),define("vector/shape/CircleMarker",["require","./Path","../../utils/BaseUtils","../../chart/map/LatLng","../../chart/map/LatLngBounds","../../utils/PathGenerator","../../Constants"],function(t){var e=t("./Path"),i=t("../../utils/BaseUtils"),n=t("../../chart/map/LatLng"),r=t("../../chart/map/LatLngBounds"),a=t("../../utils/PathGenerator"),o=t("../../Constants"),s=e.extend({initialize:function(t,e,r){i.setOptions(this,e),this._latlng=n.create(t),this._radius=r,this._circle=a.arc().startAngle(0).endAngle(2*Math.PI).innerRadius(0) +},setLatLng:function(t){return this._latlng=n.create(t),this.redraw(),this.fire("move",{latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this._radius=t,this.redraw()},getRadius:function(){return this._radius},initAnimate:function(t){this._animate(500,t.delayTime)},reShowAnimate:function(){this._animate(300)},_animate:function(t,e){this._path.attr({d:this._circle.outerRadius(0)()}).animate({delay:e||0,ease:"bounce",duration:t,attr:{d:this._circle.outerRadius(this._radius)()}}) +},exitAnimate:function(t,e){var i=this,n=t._pointLayer;0==e?n.removeLayer(i):this._path.animate({ease:"back-in",duration:300,attr:{d:this._circle.outerRadius(0)()}}).remove().each("end",function(){n.removeLayer(i)})},_onMouseState:function(t,e,i,n){var r=this._radius+(t?1:0);this._path.interrupt(o.SELECT_ANIMATION).transition(o.SELECT_ANIMATION).animate({ease:i,duration:e,style:n,attr:{d:this._circle.outerRadius(r)()}})},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds() +},_updateBounds:function(){var t=this._radius,e=this._radiusY||t,i=this._clickTolerance(),n=[t+i,e+i];this._pxBounds=new r(this._point.subtract(n),this._point.add(n))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._path.attr({d:this._circle.outerRadius(this._radius)(),transform:i.makeTranslate(this._point)}),this.setStyle()},_empty:function(){return !this._renderer._bounds.intersects(this._pxBounds)},setAttr:function(t){t!==this._radius&&(this.radius=t,this._update()) +}});return s}),define("chart/map/Marker",["require","./../../vector/Layer","./Icon","../../utils/BaseUtils","./LatLng","../../dom/DomUtils","../../vector/Transition","../../dom/Browser","../../utils/BezierEasing"],function(t){var e=t("./../../vector/Layer"),i=t("./Icon"),n=t("../../utils/BaseUtils"),r=t("./LatLng"),a=t("../../dom/DomUtils"),o=t("../../vector/Transition"),s=t("../../dom/Browser"),h=t("../../utils/BezierEasing"),l=e.extend({options:{icon:new i.Default,interactive:!0,draggable:!1,keyboard:!0,title:"",alt:"",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",nonBubblingEvents:["click","dblclick","mouseover","mouseout","contextmenu"]},initialize:function(t,e){n.setOptions(this,e),this._latlng=r.create(t) +},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var e=this._latlng;return this._latlng=r.create(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng}) +},update:function(){if(this._icon){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},initAnimate:function(t){function e(){var t,e=l._leaflet_pos;return t=h._icon?n[s.ie3d?"makeTranslate":"makeTranslate3d"](e):r,r=t,t}function i(){return function(t){return e()+"scale("+t+")"}}var r,h=this,l=h._icon,u=t.series.vanchart.useFilterRender;s.any3d?u?this._icon.style.transform=e()+"scale(1)":(this._icon.style.transform=e()+"scale(0.01)",this._icon.style["transform-origin"]="bottom",new o(this._icon).delay(t.delayTime||0).ease("back-out").duration(600).styleTween("transform",i)):a.setPosition(this._icon,l._leaflet_pos) +},exitAnimate:function(t){var e=t._pointLayer;e.removeLayer(this)},_onMouseState:function(t){function e(){return function(e){var i=t?1:1+u;return i=t?i+u*e:i-u*e,c+"scale("+i+")"}}var i=this.options.icon.options,r=i.iconSize[1],l=this._icon._leaflet_pos,u=4/r,c=n[s.ie3d?"makeTranslateWithPX":"makeTranslate3d"](l);s.any3d?new o(this._icon).ease(h.custom["ease-out-back"]).duration(300).styleTween("transform",e):a.setPosition(this._icon,l)},_initIcon:function(){var t=this.options,e="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),i=t.icon.createIcon(this._icon),n=!1; +i!==this._icon&&(this._icon&&this._removeIcon(),n=!0,t.title&&(i.title=t.title),t.alt&&(i.alt=t.alt)),a.addClass(i,e),t.keyboard&&(i.tabIndex="0"),this._icon=i,n&&this.getPane().appendChild(this._icon)},_removeIcon:function(){a.remove(this._icon),this._icon=null},_setPos:function(t){a.setPosition(this._icon,t),this._shadow&&a.setPosition(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon.style.zIndex=this._zIndex+t},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round(); +this._setPos(e)},_resetZIndex:function(){this._updateZIndex(0)},node:function(){return this._icon},setStyle:function(t){this._icon&&t&&(t.symbol&&(this._icon.src=t.symbol),this._icon.style.cursor=t.cursor||"")}});return l}),define("vector/shape/ScatterMarker",["require","./Path","../../utils/BaseUtils","../../chart/map/LatLng","../../utils/PathGenerator","../../Constants","../../utils/BezierEasing"],function(t){var e=t("./Path"),i=t("../../utils/BaseUtils"),n=t("../../chart/map/LatLng"),r=t("../../utils/PathGenerator"),a=t("../../Constants"),o=t("../../utils/BezierEasing"),s=e.extend({initialize:function(t,e,r){i.setOptions(this,e),this._latlng=n.create(t),this._marker=r +},setLatLng:function(t){return this._latlng=n.create(t),this.redraw(),this.fire("move",{latlng:this._latlng})},getLatLng:function(){return this._latlng},initAnimate:function(t){this._animate(t.delayTime)},reShowAnimate:function(){this._animate()},_animate:function(t){function e(){var t=a._point?i.makeTranslate(a._point):r;return r=t,t}function n(){return function(t){return e()+"scale("+t+")"}}var r,a=this;this._path.attr({transform:i.makeTranslate(this._point)+"scale(0.01)"}).animate({delay:t||0,ease:"back-out",duration:300,attrTween:{transform:n}}) +},exitAnimate:function(t,e){var n=this,r=t._pointLayer;0==e?r.removeLayer(n):this._path.animate({ease:"back-in",duration:300,attr:{transform:i.makeTranslate(this._point)+"scale(0)"}}).remove().each("end",function(){r.removeLayer(n)})},_onMouseState:function(t){var e=this._marker.symbol||"circle",i=this._marker.radius||4.5;i+=t?2:0,this._path.interrupt(a.SELECT_ANIMATION).transition(a.SELECT_ANIMATION).animate({duration:300,ease:o.custom["ease-out-back"],attr:{d:r.getMarkerPath(e,i)}})},_getMarkerPath:function(){var t=this._marker.symbol||"circle",e=this._marker.radius||4.5; +return r.getMarkerPath(t,e)},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng)},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._path.attr({d:this._getMarkerPath(),transform:i.makeTranslate(this._point)})},_empty:function(){return !this._renderer._bounds.intersects(this._pxBounds)},setAttr:function(t){t&&this._marker&&(t.symbol!==this._marker.symbol||t.radius!==this._marker.radius)&&(this._marker.symbol=t.symbol,this._marker.radius=t.radius,this._update()) +}});return s}),define("vector/shape/TextLayer",["require","../../vector/Layer","../../chart/map/LatLng","../../utils/BaseUtils","../../utils/ColorUtils","../../dom/DomUtils","../Transition","../../utils/BezierEasing"],function(t){var e=t("../../vector/Layer"),i=t("../../chart/map/LatLng"),n=(t("../../utils/BaseUtils"),t("../../utils/ColorUtils")),r=t("../../dom/DomUtils"),a=t("../Transition"),o=t("../../utils/BezierEasing"),s=1.1,h=e.extend({initialize:function(t,e){this._latlng=i.create(t),this._dataPoint=e +},setStyle:function(t){this._latlng=t,this.onRemove(),this.onAdd()},beforeAdd:function(t){this._renderer=t.getMapRenderer(this)},_fontSizeState:function(t,e,i){if(this._text&&this._text.texts){var n=0;if(this._text.texts.forEach(function(r){var o=parseFloat(r.labelStyle.fontSize);n=0.1*o,o=t?o*s:o,new a(r).ease(i).duration(e).style({"font-size":o+"px"})}),n){var r=this._point.y-(t?n:0),o=this._point.x-(t?n:0);new a(this._text).ease(i).duration(e).style({top:r+"px",left:o+"px"})}}},_transformState:function(t){var e=this._point.y-(t?2:0); +new a(this._text).ease(o.custom["ease-out-back"]).duration(300).style({top:e+"px"})},onAdd:function(){this._text=document.createElement("div"),this._text.style.position="absolute",this._text.style.zIndex=1001,this._text.style["pointer-events"]="none",this.getPane().appendChild(this._text);var t=this._dataPoint,e=t.labelContent,i=(t.options.marker,t.series.type,t.series.vanchart),r=i.getLabelLeftTop(t),a=r.top;this._text.texts=[];for(var o=0,s=e.length;s>o;o++){var h=e[o],l=h.dim,u=h.text,c=h.style,d=document.createElement("div"); +d.innerHTML=u,d.style.zIndex=1001,d.style.position="absolute",d.style.left=r.left+"px",d.style.top=a+"px",d.style.whiteSpace="nowrap";for(var f in c){"color"==f&&"inherit"!=c.color?d.style.color=n.colorToHex(c.color):d.style[f]=c[f]}d.labelStyle=c,this._text.appendChild(d),this._text.texts.push(d),a+=l.height+2}this._reset()},onRemove:function(){r.remove(this._text)},getEvents:function(){return{zoomend:this._project,moveend:this._update,viewreset:this._reset}},_reset:function(){this._project(),this._update() +},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng)},_update:function(){this._map&&(this._text.style.left=this._point.x+"px",this._text.style.top=this._point.y+"px")}});return h}),define("chart/map/PosAnimation",["require","../../dom/Evented","../../dom/DomUtils","../../utils/BaseUtils"],function(t){var e=t("../../dom/Evented"),i=t("../../dom/DomUtils"),n=t("../../utils/BaseUtils"),r=e.extend({run:function(t,e,n,r){this.stop(),this._el=t,this._inProgress=!0,this._duration=n||0.25,this._easeOutPower=1/Math.max(r||0.5,0.2),this._startPos=i.getPosition(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate() +},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=n.requestAnimFrame(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,i=1000*this._duration;i>e?this._runFrame(this._easeOut(e/i),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){var n=this._startPos.add(this._offset.multiplyBy(t));e&&n._round(),i.setPosition(this._el,n),this.fire("step")},_complete:function(){n.cancelAnimFrame(this._animId),this._inProgress=!1,this.fire("end") +},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}});return r}),define("vans/VanChartBaseMap",["require","./VanChart","../utils/BaseUtils","../dom/DomUtils","../Constants","../dom/Evented","../dom/Browser","../utils/Point2D","../utils/Bounds","../chart/map/LatLng","../chart/map/LatLngBounds","../chart/map/PosAnimation"],function(t){var e=t("./VanChart"),i=t("../utils/BaseUtils"),n=t("../dom/DomUtils"),r=(t("../Constants"),t("../dom/Evented"),t("../dom/Browser")),a=t("../utils/Point2D"),o=t("../utils/Bounds"),s=t("../chart/map/LatLng"),h=t("../chart/map/LatLngBounds"),l=t("../chart/map/PosAnimation"),u=6,c=e.extend({setView:function(t,e,n){if(e=void 0===e?this._zoom:this._limitZoom(e),t=this._limitCenter(s.create(t),e,this.options.maxBounds),n=n||{},this._stop(),this._loaded&&!n.reset&&n!==!0){void 0!==n.animate&&(n.zoom=i.extend({animate:n.animate},n.zoom),n.pan=i.extend({animate:n.animate,duration:n.duration},n.pan)); +var r=this._zoom!==e?this._tryAnimatedZoom(t,e,n.zoom):this._tryAnimatedPan(t,n.pan);if(r){return clearTimeout(this._sizeTimer),this}}return this._resetView(t,e),this},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},zoomIn:function(t,e){return t=t||(r.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(r.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,i){var n=this.getZoomScale(e),r=this.getSize().divideBy(2),o=t instanceof a?t:this.latLngToContainerPoint(t),s=o.subtract(r).multiplyBy(1-1/n),h=this.containerPointToLatLng(r.add(s)); +return this.setView(h,e,{zoom:i})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():h.create(t);var i=a.create(e.paddingTopLeft||e.padding||[0,0]),n=a.create(e.paddingBottomRight||e.padding||[0,0]),r=e.zoom?e.zoom:this.getBoundsZoom(t,!1,i.add(n));r=isFinite(r)?r:u,r="number"==typeof e.maxZoom?Math.min(e.maxZoom,r):r;var o=n.subtract(i).divideBy(2),s=this.project(t.getSouthWest(),r),l=this.project(t.getNorthEast(),r),c=this.unproject(s.add(l).divideBy(2).add(o),r);return{center:c,zoom:r} +},fitBounds:function(t,e){var i=h.create(t);if(!i.isValid()){throw new Error("Bounds are not valid.")}if(i.isSame()){return this.setView(t[0],u,e)}var n=this._getBoundsCenterZoom(i,e);return this.setView(n.center,n.zoom,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t,e){if(t=a.create(t).round(),e=e||{},!t.x&&!t.y){return this.fire("moveend")}if(e.animate!==!0&&!this.getSize().contains(t)){return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this +}if(this._panAnim||(this._panAnim=new l,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),e.animate!==!1){n.addClass(this._mapPane,"leaflet-pan-anim");var i=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,i,e.duration||0.25,e.easeLinearity)}else{this._rawPanBy(t),this.fire("move").fire("moveend")}return this},setMaxBounds:function(t){return t=h.create(t),t.isValid()?(this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this.off("moveend",this._panInsideMaxBounds)) +},panInsideBounds:function(t,e){this._enforcingBounds=!0;var i=this.getCenter(),n=this._limitCenter(i,this._zoom,h.create(t));return i.equals(n)||this.panTo(n,e),this._enforcingBounds=!1,this},invalidateSize:function(t){if(!this._loaded){return this}t=i.extend({animate:!1,pan:!0},t===!0?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var n=this.getSize(),r=e.divideBy(2).round(),a=n.divideBy(2).round(),o=r.subtract(a);return o.x||o.y?(t.animate&&t.pan?this.panBy(o):(t.pan&&this._rawPanBy(o),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(i.bind(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:n})):this +},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},remove:function(){n.remove(this._mapPane),n.remove(this._controlContainer),this._loaded&&this.fire("unload");for(var t in this._layers){this._layers[t].remove()}return e.prototype.remove.call(this),this},createPane:function(t,e){var i="leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),r=n.create("div",i,e||this._mapPane);return t&&(this._panes[t]=r),r},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint()) +},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds(),e=this.unproject(t.getBottomLeft()),i=this.unproject(t.getTopRight());return new h(e,i)},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=h.create(t),i=a.create(i||[0,0]);var n=this.getZoom()||0,o=this.getMinZoom(),s=this.getMaxZoom(),l=t.getNorthWest(),u=t.getSouthEast(),c=this.getSize().subtract(i),d=this.project(u,n).subtract(this.project(l,n)),f=r.any3d?this.options.zoomSnap:1,p=Math.min(c.x/d.x,c.y/d.y); +return n=this.getScaleZoom(p,n),f&&(n=Math.round(n/(f/100))*(f/100),n=e?Math.ceil(n/f)*f:Math.floor(n/f)*f),Math.max(o,Math.min(s,n))},getPixelBounds:function(t,e){var i=this._getTopLeftPoint(t,e);return new o(i,i.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes +},getContainer:function(){return this._container},getZoomScale:function(t,e){var i=this.options.crs;return e=void 0===e?this._zoom:e,i.scale(t)/i.scale(e)},getScaleZoom:function(t,e){var i=this.options.crs;e=void 0===e?this._zoom:e;var n=i.zoom(t*i.scale(e));return isNaN(n)?1/0:n},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(s.create(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(a.create(t),e)},layerPointToLatLng:function(t){var e=a.create(t).add(this.getPixelOrigin()); +return this.unproject(e)},latLngToLayerPoint:function(t){var e=this.project(s.create(t))._round();return e._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(s.create(t))},distance:function(t,e){return this.options.crs.distance(s.create(t),s.create(e))},containerPointToLayerPoint:function(t){return a.create(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return a.create(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(a.create(t)); +return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(s.create(t)))},mouseEventToContainerPoint:function(t){return n.getMousePos(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=n.get(t);!this.bindIEDragCursor()&&n.addClass(e,"leaflet-grab") +},bindIEDragCursor:function(){var t=!1,e=this.options;if(r.ie&&e.cursor){var i=this._mapDragged?"dragging":"drag";this._container.style.cursor="url("+e.cursor[i]+"), auto",t=!0}return t},addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){function t(t,a){var o=i+t+" "+i+a;e[t+a]=n.create("div",o,r)}var e=this._controlCorners={},i="leaflet-",r=this._controlContainer=n.create("div",i+"control-container",this._container);t("top","left"),t("bottom","right") +},_resetView:function(t,e){n.setPosition(this._mapPane,new a(0,0));var i=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var r=this._zoom!==e;this._moveStart(r)._move(t,e)._moveEnd(r),this.fire("viewreset"),i&&this.fire("load")},_moveStart:function(t){return t&&this.fire("zoomstart"),this.fire("movestart")},_move:function(t,e,i){void 0===e&&(e=this._zoom);var n=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),(n||i&&i.pinch)&&this.fire("zoom",i),this.fire("move",i) +},_moveEnd:function(t){if(t){this.drawAllEffects();var e=this;this.validPoints&&this.setTimeout("zoom_label_update",function(){e._updateNormalLabel()},350),this._adjustMapPaneTranslateAfterZoom(),this.fire("zoomend")}return this.fire("moveend")},_stop:function(){return i.cancelAnimFrame(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){n.setPosition(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds) +},_checkIfLoaded:function(){if(!this._loaded){throw new Error("Set map center and zoom first.")}},_onResize:function(){i.cancelAnimFrame(this._resizeRequest),this._resizeRequest=i.requestAnimFrame(function(){this.invalidateSize({debounceMoveend:!0})},this)},_performZoom:function(){var t=this,e=t.getZoom(),i=this.options.zoomSnap||0;t._stop();var n=this._delta/(4*this.options.wheelPxPerZoomLevel),r=4*Math.log(2/(1+Math.exp(-Math.abs(n))))/Math.LN2,a=i?Math.ceil(r/i)*i:r,o=t._limitZoom(e+(this._delta>0?a:-a))-e; +this._delta=0,this._startTime=null,o&&(this._scrollZoom=!0,"center"===t.options.scrollWheelZoom?t.setZoom(e+o):t.setZoomAround(this._lastMousePos,e+o))},whenReady:function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},_getMapPanePos:function(){return n.getPosition(this._mapPane)||new a(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){var i=t&&void 0!==e?this._getNewPixelOrigin(t,e):this.getPixelOrigin(); +return i.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var i=this.getSize()._divideBy(2);return this.project(t,e)._subtract(i)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,i){var n=this._getNewPixelOrigin(i,e);return this.project(t,e)._subtract(n)},_latLngBoundsToNewLayerBounds:function(t,e,i){var n=this._getNewPixelOrigin(i,e);return o.create([this.project(t.getSouthWest(),e)._subtract(n),this.project(t.getNorthWest(),e)._subtract(n),this.project(t.getSouthEast(),e)._subtract(n),this.project(t.getNorthEast(),e)._subtract(n)]) +},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,i){if(!i){return t}var n=this.project(t,e),r=this.getSize().divideBy(2),a=new o(n.subtract(r),n.add(r)),s=this._getBoundsOffset(a,i,e);return s.round().equals([0,0])?t:this.unproject(n.add(s),e)},_limitOffset:function(t,e){if(!e){return t}var i=this.getPixelBounds(),n=new o(i.min.add(t),i.max.add(t)); +return t.add(this._getBoundsOffset(n,e))},_getBoundsOffset:function(t,e,i){var n=o.create(this.project(e.getNorthEast(),i),this.project(e.getSouthWest(),i)),r=n.min.subtract(t.min),s=n.max.subtract(t.max),h=this._rebound(r.x,-s.x),l=this._rebound(r.y,-s.y);return new a(h,l)},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom(),n=r.any3d?this.options.zoomSnap:1;return n&&(r.any3d?t=Math.round(t/n)*n:(t=t/n*n,t=t>this._zoom?Math.ceil(t):Math.floor(t))),Math.max(e,Math.min(i,t)) +},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){n.removeClass(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._floor();return(e&&e.animate)===!0||this.getSize().contains(i)?(this.panBy(i,e),!0):!1},_nothingToAnimate:function(){return !this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,n){if(this.removeMoreLabel(),this._animatingZoom){return !0 +}if(n=n||{},!this._zoomAnimated||n.animate===!1||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold){return !1}var r=this.getZoomScale(e),a=this._getCenterOffset(t)._divideBy(1-1/r);return n.animate===!0||this.getSize().contains(a)?(i.requestAnimFrame(function(){this._moveStart(!0)._animateZoom(t,e,!0)},this),!0):!1},_animateZoom:function(t,e,r,a){r&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,n.addClass(this._mapPane,"leaflet-zoom-anim")); +var o=this._layersMinZoom;o&&o>e&&(e=o,this._animateToZoom=e),this.fire("zoomanim",{center:t,zoom:e,noUpdate:a}),setTimeout(i.bind(this._onZoomTransitionEnd,this),250)},_onZoomTransitionEnd:function(){this._animatingZoom&&(n.removeClass(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),i.requestAnimFrame(function(){this._moveEnd(!0)},this))},addLayer:function(t){var e=i.stamp(t);return this._layers[e]?this:(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t),this) +},removeLayer:function(t){var e=i.stamp(t);return this._layers[e]?(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return !!t&&i.stamp(t) in this._layers},eachLayer:function(t,e){for(var i in this._layers){t.call(e,this._layers[i])}return this},_addZoomLimit:function(t){(isNaN(t.options.maxZoom)||!isNaN(t.options.minZoom))&&(this._zoomBoundLayers[i.stamp(t)]=t,this._updateZoomLevels()) +},_removeZoomLimit:function(t){var e=i.stamp(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,e=-(1/0);this._getZoomSpan();for(var i in this._zoomBoundLayers){var n=this._zoomBoundLayers[i].options;t=void 0===n.minZoom?t:Math.min(t,n.minZoom),e=void 0===n.maxZoom?e:Math.max(e,n.maxZoom)}this._layersMaxZoom=e===-(1/0)?void 0:e,this._layersMinZoom=t===1/0?void 0:t,void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()1&&(this.series.forEach(function(t){t.remove()}),this.series=[]))},getMapRenderer:function(){var t=this._panes.overlayPane;return this.mapRenderer||(this.mapRenderer=c.isSupportSVG()?new e(t,this):new i(t,this),this.addLayer(this.mapRenderer)),this.mapRenderer},getEvents:function(){return{mousemove:this._onMouseMove,scroll:this._onScroll,panstart:this._onPanStart,panmove:this._onPanMove,panend:this._onPanEnd,wheel:this._onWheelScroll,pinchstart:this._pinchStart,pinchmove:this._onPinch,zoom:this._onZoom} +},registerInteractiveTarget:function(t,e){A.prototype.registerInteractiveTarget.call(this,t,e),t.addEventParent(this)},_zoomEnabled:function(){return this.options.geo.zoom},_onMouseMove:function(t){this.cancelLegendHighlight(t.containerPoint)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onPanStart:function(t){this._zoomEnabled()&&(this._initPos=d.getPosition(this._mapPane),this._startPoint=t.containerPoint,this._mapDragged=!0,this.bindIEDragCursor(),this._stop()) +},_onPanMove:function(t){if(this._zoomEnabled()){c.cancelAnimFrame(this._animRequest);var e=t.containerPoint.subtract(this._startPoint);this._newPos=this._initPos.add(e),this._animRequest=c.requestAnimFrame(function(){this.setMapPanePosition(this._newPos),this.removeMoreLabel()},this,!0),d.addClass(document.body,"leaflet-dragging")}},_onPanEnd:function(){if(this._zoomEnabled()){this.fire("moveend"),this._mapDragged=!1,this.bindIEDragCursor(),d.removeClass(document.body,"leaflet-dragging");var t=this._getMapPanePos(); +Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())}},_pinchStart:function(){L=1},_onPinch:function(t){var e=t.scale,i=this,n=[];if(this._zoomEnabled()&&!(Math.abs(L-e)e?-1:1;i.series.forEach(function(e){var r=e.type===p.POINT_MAP,a=e.type===p.AREA_MAP;if(r||a){var o=e.points;o.forEach(function(e){var a=e.layers||[];a.forEach(function(a){var o=r?e.getLatLng():a.getCenter?a.getCenter():null;o&&n.push({point:e,distance:i.latLngToContainerPoint(o).distanceTo(t.containerPoint)}) +})})}}),n.sort(function(t,e){return t.distance-e.distance}),this.hoverPoint=n.length&&n[0].point,this._pinchZoom=i._limitZoom(i.getZoom()+r*Math.abs(e-1)),this._pinchCenter=this.isMobile()?t.center:t.containerPoint,this._pinchStartTime||(this._pinchStartTime=+new Date);var a=this.options.wheelDebounceTime,o=Math.max(a-(+new Date-this._pinchStartTime),0);clearTimeout(this._pinchTimer),this._pinchTimer=setTimeout(function(){i._stop(),i._pinchStartTime=null,i.setZoomAround(m.create(i._pinchCenter),i._pinchZoom) +},o),L=e}},_onWheelScroll:function(t){if(this._zoomEnabled()){t=t.srcEvent;var e=d.getWheelDelta(t),i=this.options.wheelDebounceTime;this._delta=c.pick(this._delta,0),this._delta+=e,this._lastMousePos=this.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var n=Math.max(i-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(c.bind(this._performZoom,this),n),d.stop(t)}},_animationEnd:function(){this._animationStarted=!1,this._consoleDone(),this.drawAllEffects() +},drawAllEffects:function(){this.validPoints&&this.validPoints.forEach(function(t){var e=t.series;e.drawPointEffect(t)})},_animationStart:function(){this._animationStarted=!0;var t=this;this.animationCount||this.setTimeout("chart_animation_end",function(){t.fire("animationEnd")},250)},_initLayout:function(){var t=this._container;this._fadeAnimated=!this.options.toPhantom&&this.options.fadeAnimation&&f.any3d,d.addClass(t,"leaflet-container"+(f.touch?" leaflet-touch":"")+(f.retina?" leaflet-retina":"")+(f.ielt9?" leaflet-oldie":"")+(f.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":"")); +var e=d.getStyle(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),t.style.zIndex=t.style.zIndex||"0",this._initPanes(),this._initControlPos()},_initPanes:function(){var t=this._panes={};this._mapPane=this.createPane("mapPane",this._container),d.setPosition(this._mapPane,new m(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.options.markerZoomAnimation||d.addClass(t.markerPane,"leaflet-zoom-hide")},layoutComponentsAndCharts:function(){this.initLayerInfo(); +var t=this;t.bounds=t._getDefaultBounds(),o.ComponentsOrder.map(function(e){e in t.components&&t.components[e].doLayout()},this),this.reRenderSeries()},filterRender:function(){this.useFilterRender=!0,this.renderSeries(),this.useFilterRender=!1},_updateSeriesStyle:function(){this.validPoints.forEach(function(t){if(t.layers&&t.visible){var e=t.series._getDynamicStyle(t);t.layers.forEach(function(t){t.setStyle(e)})}})},reRenderWholePlot:function(){var t=this.components[o.LEGEND_COMPONENT];t&&t.render(),this.reRenderSeries() +},refreshRestore:function(){this._initIntermediateState();for(var t in this.components){this.components[t].refresh()}this.series.forEach(function(t,e){t.refresh(t.options,e)});var e=this.components[o.RANGE_LEGEND_COMPONENT];e&&e.initAttributesWithSeries(),this.series.forEach(function(t){if(t.type!==p.LINE_MAP||!t.options.large){for(var e=0,i=t.points.length;i>e;e++){t.points[e].refreshPointColor()}}}),this.layoutComponentsAndCharts()},reRenderSeries:function(){this.hoverPoint=this.hoverSeries=null,this.calculateMapSeries(),this.render() +},calculateMapSeries:function(){var t=this;t.hoverPoint=null,t.hoverSeries=null;var e=t.seriesOfType(p.BUBBLE_CHART);r.calculateBubbleRadius(e),r.calculateDelayTime(t,t.seriesOfType(p.BUBBLE_CHART),p.BUBBLE_CHART),r.calculateDelayTime(t,t.seriesOfType(p.SCATTER_CHART),p.SCATTER_CHART),r.calculateDelayTime(t,t.seriesOfType(p.POINT_MAP),p.BUBBLE_CHART);for(var i={},n={},a=this.series,o=0,s=a.length;s>o;o++){var h=0,l=a[o],u=l.type,d=l.points;d.forEach(function(t){h=c.accAdd(h,Math.abs(t.getTargetValue())) +}),d.forEach(function(t){t.percentage=Math.abs(t.getTargetValue()/h);var e=t.options.lnglat?t.options.lnglat.join("-"):t.name;e+=u;var r=t.isNull?n:i;r[e]=r[e]||[],r[e].push(t)})}for(var f in i){for(var g,m,v=i[f].concat(n[f]||[]),_=v.length;--_>-1;){v[_].options.drilldown&&(g=v[_].options.drilldown,m=v[_].geo)}v.forEach(function(t){t.series.type!==p.LINE_MAP&&(t.points=v,t.options.drilldown||(t.options.drillDown=g,t.geo=m),t.series.calculateLabelInfo(t))})}this.validPoints=this._getMapPoints()},_getMapPoints:function(){var t=this,e={},i=[],n=t.getCurrentGeo(),r=this.getComponent(o.LEGEND_COMPONENT); +return t.series.forEach(function(a,o){var s=a.points,h=a.type;if(h!==p.LINE_MAP){for(var l=0,u=s.length;u>l;l++){var c=s[l];if(t.isMapPointVisible(c)){if(0!==o||!c.isNull||!c.options.drilldown){var d=n.getFeaturesByName(c.name,h);if(d||c.options.lnglat){var f=h==p.AREA_MAP?c.name:n.getDataPointLngLat(c,d&&d[0]).join("-");!e[f]||r&&h==p.BUBBLE_CHART?(i.push(c),e[f]=!0):t.removePointGraphics(c,h,!1)}}}else{t.removePointGraphics(c)}}}}),i.reverse()},isMapPointVisible:function(t){var e=t.series.type,i=this.getComponent(o.RANGE_LEGEND_COMPONENT); +if(i&&t.points&&t.points.length&&e!==p.SCATTER_CHART&&(t=t.points[0]),t.isNull){var n=!1;return e===p.SCATTER_CHART||e===p.POINT_MAP?n=!0:e===p.AREA_MAP&&(n=t.options.drilldown),t&&t.visible&&t.series.visible&&n}return t.isVisible()},defaultDrillUpDataPoint:function(){for(var t=0;t1){for(var r=1;re;e++){t.points[e].refreshPointColor()}}),this.layerIndex++,e=s.geo,this.layerMap[this.layerIndex]={geo:e,series:i,layerIndex:this.layerIndex},this.setComponent(e,o.GEO_COMPONENT)}}}}},_createChildSeriesWhenLoaded:function(t){if(!t.childSeries){var e=[],i=this; +i.parentPoint=t,t.options.drilldown.series.forEach(function(t,n){var r=t.type||i.options.chartType,o=a.get(r);e.push(new o(t,i,n))}),t.childSeries=e}},allowDrillDown:function(t){var e=this.layerMap[this.layerIndex-1];return t.options.drilldown&&t.options.drilldown.series&&(!e||e.drillUpDataPoint!=t)},drillDown:function(t){this.allowDrillDown(t)&&(this._createChildSeriesWhenLoaded(t),this.layerMap[this.layerIndex].drillUpDataPoint=t,this._setNewGeoAndSeries(t.geo,t.childSeries,this.layerIndex+1))},drillUp:function(t){var e=this; +t.series!=e.series&&this._setNewGeoAndSeries(t.geo,t.series,t.layerIndex)},removeAllLayers:function(){for(var t=this,e=0,i=t.series.length;i>e;e++){var n=t.series[e],r=n.type,a=n.points;a.forEach(function(e){t.removePointGraphics(e,r)})}},_setNewGeoAndSeries:function(t,e,i){var n=this;n.removeAllLayers(),this._canvasMapLayer&&this._canvasMapLayer.setData([]),n.series=e,n.validPoints=[];var r=n.getComponent(o.RANGE_LEGEND_COMPONENT);r&&r.initAttributesWithSeries(),e.forEach(function(t){for(var e=0,i=t.points.length; +i>e;e++){t.points[e].refreshPointColor()}});var a=this.layerMap[this.layerIndex]?this.layerMap[this.layerIndex].geo:void 0;this.layerMap[i]={geo:t,series:e,layerIndex:i,drillUpDataPoint:this.defaultDrillUpDataPoint()},this.layerIndex=i,this.layerMap=this.layerMap.slice(0,i+1),a&&a.remove(),this.setComponent(t,o.GEO_COMPONENT),this.layoutComponentsAndCharts()},cancelLegendHighlight:function(t){var e=this.highlightTarget;A.prototype.cancelLegendHighlight.call(this,t),this._lineMapLayer&&e&&this._lineMapLayer.redraw() +},makeLegendHighlight:function(t){A.prototype.makeLegendHighlight.call(this,t),this._lineMapLayer&&this._lineMapLayer.redraw()},getEffectLayer:function(){var t=this;return t._effectLayer||(t._effectLayer=(new _).addTo(t)),t._effectLayer},renderSeries:function(){this.removeMoreLabel(),this.animationCount=0,this.getComponent(o.TOOLTIP_COMPONENT).immediateHide();var t=this,e=(t.series,t.getComponent(o.GEO_COMPONENT));this._pointLayer=this._pointLayer||(new _).addTo(this),t.seriesOfType(p.SCATTER_CHART).concat(t.seriesOfType(p.BUBBLE_CHART)).forEach(function(e){t.activeDataEvents(e) +});var i=[p.SCATTER_CHART,p.BUBBLE_CHART];this.largeSeries=i.reduce(function(t,e){return t[e]&&t[e].points&&t[e].points.forEach(function(t){t&&t.graphic&&t.graphic.remove(),t.graphic=null}),t[e]=t[e]||{visible:!0,type:e},t[e].points=[],t},this.largeSeries||{});var n=this.largeSeries;this.validPoints.forEach(function(i){if(i.series.type!=p.HEAT_MAP){var r=t.isMapPointVisible(i),a=i.series.type;if(i.series.clearPointEffect(i),i.series.options.large&&n[a]){if(!r){return}n[a].points.push(i)}else{if(r){var o=i.series.getStyle(i); +o.cursor=i.series._pointerStyle();var s=e.getFeaturesByName(i.name,a);s=i.options.lnglat?["null"]:s;var h=t.renderer.isAnimation;if(i.layers&&i.layers[0]._map){var l=i.series.reShowPoint(i);i.layers.forEach(function(e,n){e.setLatLng&&e.setLatLng(i.getLatLng(s[n])),e.setStyle(o),t.updatePointLayer(i,e),h&&l&&e.initAnimate&&e.initAnimate(i),t.registerInteractiveTarget(i,e)})}else{i.layers=[],s.forEach(function(n){var r;a==p.AREA_MAP?(r=e.getLayerByFeature(n),r.setStyle(o)):r=t.createPointLayer(n,i,o),i.layers.push(r),h&&r.initAnimate&&r.initAnimate(i),t.registerInteractiveTarget(i,r) +})}}else{t.removePointGraphics(i,a)}}}}),this._renderHeatMap(),this.setTimeout("renderLineMap",function(){t._renderLineMap()},t.options.toPhantom?0:300),this._renderMapOnCanvas(n),t.options.toPhantom?t.updateLabel():t.setTimeout("render map label",function(){t.updateLabel()},800),this.fire("animationStart")},_onZoom:function(){var t=this,e=t.hoverPoint,i=t.getZoom();if(e&&e.geo){var n=e.geo.getZoomListener();if(n&&i>=n){return void t.drillDown(e)}}var r=t.layerMap[t.layerIndex-1];r&&this._scrollZoom&&r.geo.getZoomListener()>i&&t.drillUp(r),this._scrollZoom=!1 +},updateLabel:function(){var t=this._needShowMoreLabel();if(!t||this.layerIndex>0){return void this._updateNormalLabel()}var e=this;e._updateNormalLabel(),t&&this.setTimeout("map_label_timer",function(){e._updateMoreLabels()},350),e._changeDataState=!1},_updateMoreLabels:function(){var t=this;this.validPoints&&this.validPoints.filter(function(t){return t.series.type!==p.LINE_MAP}).forEach(function(e){var i=e.getLatLng();if(t.isMapPointVisible(e)&&i){var n=t.latLngToLayerPoint(i),r=e.points;r.length&&r.forEach(function(t){t.series._showMoreLabel(t,n.x,n.y) +})}})},_removeNormalLabels:function(){var t=this.validPoints.concat(this._getHeatMapPoints()),e=this._textGroup;t.forEach(function(t){t.textLayers&&(t.textLayers.forEach(function(t){e.removeLayer(t)}),t.textLayers=null)})},_updateNormalLabel:function(){this._fixConflictLabel();var t=this,e=t.getCurrentGeo(),i=this.validPoints.concat(this._getHeatMapPoints());this._textGroup=this._textGroup||(new _).addTo(t);var n=this._textGroup;i.forEach(function(i){var r=i.series.type,a=e.getFeaturesByName(i.name,r); +a=i.options.lnglat?["null"]:a;var o=i.options.dataLabels&&i.options.dataLabels.enabled;o&&i.labelPos&&i.labelContent&&a?a.forEach(function(e,n){i.labelPos[n]&&(i.textLayers=i.textLayers||[],i.textLayers[n]?i.textLayers[n].setStyle(i.getLatLng(e)):i.textLayers[n]=new b(i.getLatLng(e),i).addTo(t._textGroup))}):i.textLayers&&(i.textLayers.forEach(function(t){n.removeLayer(t)}),i.textLayers=null)});var r=new g;if(t.isMobileFlow()){var a=t._textGroup._layers;a&&Object.keys(a).forEach(function(t){var e=a[t]; +if(e){var i=e._text;if(i){for(var n=i.offsetLeft,o=i.offsetTop,s=i.children,h=0;hr;r++){t[r].points.forEach(function(t){if(!t.options.lnglat){var r=n.getFeaturesByName(t.name,p.HEAT_MAP); +t.options.lnglat=n.getDataPointLngLat(t,r&&r[0])}!t.isNull&&t.visible&&t.options.lnglat?i.push(t):e.removePointGraphics(t,p.HEAT_MAP)})}}return i},_renderHeatMap:function(){var t=this.seriesOfType(p.HEAT_MAP),e=this.getComponent(o.RANGE_LEGEND_COMPONENT);if(t&&t.length&&e){var i={min:e._getMin(),max:e._getMax(),data:this._getHeatMapPoints()};if(!this._heatMapOverlay){var n=t[0].options,r={maxOpacity:n.maxOpacity,minOpacity:n.minOpacity,radius:n.radius,blur:n.blur,gradient:e._getGradient(),valueField:"value"}; +this._heatMapOverlay=new l(r).addTo(this)}this._heatMapOverlay.setData(i)}},removePointGraphics:function(t,e,i){if(t){e=e||t.series.type;var n=this;e===p.LINE_MAP&&(this._lineMapLayer.removeEffect(t),t.remove()),t.layers&&(t.layers.forEach(function(e){n.removeInteractiveTarget(t,e);var r=n.useFilterRender;e.exitAnimate&&e.exitAnimate(n,r?!1:!!i)}),e!=p.AREA_MAP&&(t.layers=null));var r=this._textGroup;t.textLayers&&r&&(t.textLayers.forEach(function(t){r.removeLayer(t)}),t.textLayers=null,t.labelPos=null),t.series.clearPointEffect(t) +}},_renderLineMap:function(){var t=this.seriesOfType(p.LINE_MAP),e=t.reduce(function(t,e){return t.concat(e.points)},[]);if(!t.length||!e.length){return void (this._lineMapLayer&&this._lineMapLayer.setData([]))}if(!this._lineMapLayer){var i=this,r=this.getSize(),a={width:r.x,height:r.y,x:0,y:0,dpr:window.devicePixelRatio||1},o=this.mainRenderer=new n(this._panes.overlayPane,this,a),h=this.animationRenderer=new n(this._panes.overlayPane,this,a);o.onAdd(),h.onAdd(),this.addCanvasRendererForResize(o),this.addCanvasRendererForResize(h),this._lineMapLayer=s({mainRenderer:o,animationRenderer:h,vanchart:i}).addTo(this) +}this._lineMapLayer.setData(e)},_renderMapOnCanvas:function(t){var e=t[p.SCATTER_CHART].points.concat(t[p.BUBBLE_CHART].points);if(!e.length){return void (this._canvasMapLayer&&this._canvasMapLayer.options.renderer&&this._canvasMapLayer.options.renderer.clearAll())}for(var i,r,a=e.length,o=0;a>o;o++){r=e[o],r.originalColor?r.color=r.originalColor:r.originalColor=r.color,!i&&(i=r.color),r.color=i}if(!this._canvasMapLayer){var s=this,l=this.getSize(),u={width:l.x,height:l.y,x:0,y:0,dpr:window.devicePixelRatio||1},c=this.mapCanvasRenderer=new n(this._panes.overlayPane,this,u); +c.onAdd(),this.addCanvasRendererForResize(this.mapCanvasRenderer),this._canvasMapLayer=new h({renderer:c,vanchart:s}).addTo(this)}this._canvasMapLayer.setData(e)},_getMaxMinMapPaneTranslateY:function(){var t=[90,0],e=[-90,0],i=[0,0],n=-1*this.latLngToLayerPoint(t).y,r=this.height-this.latLngToLayerPoint(e).y,a=this.height/2-this.latLngToLayerPoint(i).y;return this._getMapPaneHeight()>this.height?[r,n]:[a]},setMapPanePosition:function(t,e){if(this.getCurrentGeo()._isImageMap()){return void d.setPosition(this._mapPane,t) +}var i=e||this._getMaxMinMapPaneTranslateY();if(2===i.length){var n=i[0],r=i[1];t.y=Math.min(r,Math.max(n,t.y))}else{t.y=i[0]}d.setPosition(this._mapPane,t),this.mapTrans=t},_getMapPaneHeight:function(){return 256*Math.pow(2,this._zoom)},_adjustMapPaneTranslateAfterZoom:function(){var t=this.mapTrans||new m(0,0),e=this._getMaxMinMapPaneTranslateY();if(2===e.length){var i=e[0],n=e[1];if(n>=t.y&&t.y>=i&&n^0>i){return}}this.setMapPanePosition(t,e),this.fire("zoom")},isPanMovingAtTheBoundary:function(t){if(!this._zoomEnabled()){return !0 +}var e=t.direction,i=e===p.DIRECTION_UP,n=e===p.DIRECTION_DOWN,r=this.mapTrans?this.mapTrans.y:0,a=this._getMaxMinMapPaneTranslateY(),o=this._getMapPaneHeight()>this.height;return o&&i&&r===a[0]||n&&r===a[1]||!o&&(i||n)}});return t("./VanChartLibrary").register(p.POINT_MAP,P),t("./VanChartLibrary").register(p.AREA_MAP,P),t("./VanChartLibrary").register(p.LINE_MAP,P),t("./VanChartLibrary").register(p.HEAT_MAP,P),P}),define("utils/QuadTree",[],function(){function t(t){return t[0]}function e(t){return t[1] +}function i(t){return"function"==typeof t?t:function(){return t}}function n(n,u,c,d,f){function p(t){function e(t,e,i,r,a,o,s,h){if(!isNaN(i)&&!isNaN(r)){if(t.leaf){var u=t.x,c=t.y;if(null!=u){if(l(u-i)+l(c-r)<0.01){n(t,e,i,r,a,o,s,h)}else{var d=t.point;t.x=t.y=t.point=null,n(t,d,u,c,a,o,s,h),n(t,e,i,r,a,o,s,h)}}else{t.x=i,t.y=r,t.point=e}}else{n(t,e,i,r,a,o,s,h)}}}function n(t,i,n,r,a,s,h,l){var u=0.5*(a+h),c=0.5*(s+l),d=n>=u,f=r>=c,p=f<<1|d;t.leaf=!1,t=t.nodes[p]||(t.nodes[p]=o()),d?a=u:h=u,f?s=c:l=c,e(t,i,n,r,a,s,h,l) +}var r,a,p,_,y,x,T,b,A,C=i(m),L=i(v);if(null!=u){x=u,T=c,b=d,A=f}else{if(b=A=-(x=T=1/0),a=[],p=[],y=t.length,g){for(_=0;y>_;++_){r=t[_],r.xb&&(b=r.x),r.y>A&&(A=r.y),a.push(r.x),p.push(r.y)}}else{for(_=0;y>_;++_){var M=+C(r=t[_],_),P=+L(r,_);x>M&&(x=M),T>P&&(T=P),M>b&&(b=M),P>A&&(A=P),a.push(M),p.push(P)}}}var w=b-x,S=A-T;w>S?A=T+w:b=x+S;var E=o();if(E.add=function(t){e(E,t,+C(t,++_),+L(t,_),x,T,b,A)},E.visit=function(t){s(t,E,x,T,b,A)},E.find=function(t){return h(E,t[0],t[1],x,T,b,A) +},_=-1,null==u){for(;++_a||c>o||n>d||r>f)){if(p=t.point){var p,g=e-t.x,m=i-t.y,v=g*g+m*m;if(h>v){var _=Math.sqrt(h=v);n=e-_,r=i-_,a=e+_,o=i+_,s=p}}for(var y=t.nodes,x=0.5*(u+d),T=0.5*(c+f),b=e>=x,A=i>=T,C=A<<1|b,L=C+4; +L>C;++C){if(t=y[3&C]){switch(3&C){case 0:l(t,u,c,x,T);break;case 1:l(t,x,c,d,T);break;case 2:l(t,u,T,x,f);break;case 3:l(t,x,T,d,f)}}}}}(t,n,r,a,o),s}var l=Math.abs;return n}),define("vans/ForceLayout",["require","../utils/QuadTree","../utils/Timer","../utils/BaseUtils"],function(t){function e(t,e,i){for(var n;e;){if(n=t[c.stamp(e)]){return n}if(e===i){return null}e=e.parentNode}}function i(){return{mouseover:o,mouseout:s,panstart:r,panmove:n,panend:a}}function n(t,e,i){var n=i.containerPoint.x-e.currentPoint.x,r=i.containerPoint.y-e.currentPoint.y; +e.currentPoint=i.containerPoint,t.px+=n,t.py+=r,e.resume()}function r(t,e,i){t.fixed|=2,e.panTarget=t,e.currentPoint=i.containerPoint}function a(t,e){t.fixed&=-7,e.panTarget=null}function o(t){t.fixed|=4,t.px=t.x,t.py=t.y}function s(t){t.fixed&=-5}function h(t,e,i){var n=0,r=0;if(t.charge=0,!t.leaf){for(var a,o=t.nodes,s=o.length,l=-1;++ls*s/L){if(A>h){var l=e.charge/h;t.px-=a*l,t.py-=o*l}return !0}if(e.point&&h&&A>h){var l=e.pointCharge/h;t.px-=a*l,t.py-=o*l}}return !e.charge}}var n,r,a,o,s,g,m,v={},_=[1,1],y=0.9,x=d,T=f,b=-30,A=p,C=0.1,L=0.64,M=[],P=[],w=1,S={}; +return v.tick=function(){if((n*=0.99)<0.005){return n=0,g&&g(),!0}var e,i,r,a,u,c,d=M.length;if(v._distanceTick(),(a=n*C)&&(u=_[0]/2,c=_[1]/2,i=-1,a)){for(;++it;++t){e=P[t],i=e.source,o=e.target,l=o.x-i.x,u=o.y-i.y,(s=l*l+u*u)&&(s=n*a[t]*((s=Math.sqrt(s))-r[t]*w)/s,l*=s,u*=s,o.x-=l*(h=i.weight/(o.weight+i.weight)),o.y-=u*h,i.x+=l*(h=1-h),i.y+=u*h) +}},v.nodes=function(t){return arguments.length?(M=t,v):M},v.links=function(t){return arguments.length?(P=t,v):P},v.eachTick=function(t){return arguments.length?(s=t,v):s},v.endTick=function(t){return arguments.length?(g=t,v):g},v.size=function(t){return arguments.length?(_=t,v):_},v.scale=function(t){return arguments.length?(w=t,v):w},v.linkDistance=function(t){return arguments.length?(x="function"==typeof t?t:+t,v):x},v.distance=v.linkDistance,v.linkStrength=function(t){return arguments.length?(T="function"==typeof t?t:+t,v):T +},v.friction=function(t){return arguments.length?(y=+t,v):y},v.charge=function(t){return arguments.length?(b="function"==typeof t?t:+t,v):b},v.chargeDistance=function(t){return arguments.length?(A=t*t,v):Math.sqrt(A)},v.gravity=function(t){return arguments.length?(C=+t,v):C},v.theta=function(t){return arguments.length?(L=t*t,v):Math.sqrt(L)},v.alpha=function(t){return arguments.length?(t=+t,n?n=t>0?t:0:t>0&&(n=t,u(v.tick)),v):n},v.start=function(){return v.preparePara(),v.resume()},v.simulateForce=function(){for(v.preparePara(),v.alpha(0.1); +v.alpha()>=0.005;){v.tick()}return g&&g(),v},v.simpleSimulateForce=function(){v.preparePara();for(var t=0.1,e=0.005,i=2,n=2,r=0.5,a=0.02,o=0.9,s=t;s>=e;s-=s>0.07?0.001:0.0005){var h,l,u,c,d,f=M.length;if((u=s*a)&&(c=_[0]/2,d=_[1]/2,h=-1,u)){for(;++hh;h++){for(var p=M[h],m=0;f>m;m++){var y=M[m];if(y!==p){var c=p.x-y.x,d=p.y-y.y,x=Math.sqrt(c*c+d*d),T=p.radius+y.radius+(p.series.cluster===y.series.cluster?i:n);T>x&&(x=(x-T)/x*r,p.x-=c*=x,p.y-=d*=x,y.x+=c,y.y+=d)}}}}return g&&g(),v},v.preparePara=function(){function t(t,n){if(!i){for(i=[],l=0;s>l;++l){i[l]=[]}for(l=0;h>l;++l){var r=P[l];i[r.source.index].push(r.target),i[r.target.index].push(r.source)}}for(var a,o=i[e],l=-1,u=o.length;++le;++e){(n=M[e]).index=e,n.weight=0}for(e=0;h>e;++e){n=P[e],"number"==typeof n.source&&(n.source=M[n.source]),"number"==typeof n.target&&(n.target=M[n.target]),++n.source.weight,++n.target.weight}for(e=0;s>e;++e){n=M[e],isNaN(n.x)&&(n.x=t("x",l)),isNaN(n.y)&&(n.y=t("y",u)),isNaN(n.px)&&(n.px=n.x),isNaN(n.py)&&(n.py=n.y)}if(r=[],"function"==typeof x){for(e=0;h>e;++e){r[e]=+x.call(this,P[e],e)}}else{for(e=0;h>e;++e){r[e]=x}}if(a=[],"function"==typeof T){for(e=0; +h>e;++e){a[e]=+T.call(this,P[e],e)}}else{for(e=0;h>e;++e){a[e]=T}}if(o=[],"function"==typeof b){for(e=0;s>e;++e){o[e]=+b.call(this,M[e],e)}}else{for(e=0;s>e;++e){o[e]=b}}return v},v.resume=function(){return v.alpha(0.1)},v.stop=function(){return v.alpha(0)},v.registerDragTarget=function(t,e){m||(m=i()),S[c.stamp(e.node())]=t},v.dragFire=function(t,i){if(m){var n,r=t.srcEvent,a=t.type||r.type,o="panstart"===a||"panmove"===a||"panend"===a;if(o&&v.panTarget){n=v.panTarget}else{var s=r.target||r.srcElement; +n=e(S,s,i)}return n&&m[a]?(m[a](n,v,t),n):void 0}},v};return g}),define("vans/VanChartForceBubble",["require","./VanChart","./../utils/BaseUtils","./../Constants","./ForceLayout","../utils/QuadTree","./VanChartLibrary"],function(t){function e(t){return function(e){var i=e.series.cluster;if(i&&i!==e){var n=e.x-i.x,r=e.y-i.y,a=Math.sqrt(n*n+r*r),o=e.radius+i.radius;a!=o&&(a=(a-o)/a*t,e.x-=n*=a,e.y-=r*=a,i.x+=n,i.y+=r)}}}function i(t,e,i){var n=s(e);return function(e){var r=e.radius+i+Math.max(h,l),a=e.x-r,o=e.x+r,s=e.y-r,u=e.y+r; +n.visit(function(i,n,r,c,d){if(i.point&&i.point!==e){var f=e.x-i.point.x,p=e.y-i.point.y,g=Math.sqrt(f*f+p*p),m=e.radius+i.point.radius+(e.series.cluster===i.point.series.cluster?h:l);m>g&&(g=(g-m)/g*t,e.x-=f*=g,e.y-=p*=g,i.point.x+=f,i.point.y+=p)}return n>o||a>c||r>u||s>d})}}var n=t("./VanChart"),r=t("./../utils/BaseUtils"),a=t("./../Constants"),o=t("./ForceLayout"),s=t("../utils/QuadTree"),h=2,l=4,u=500,c=n.extend({vanChartType:"vanChartForceBubble",renderSeries:function(){function t(t){s._animationStarted&&t.alpha<0.05&&n.prototype._animationEnd.bind(s)(); +var r=e(10*t.alpha*t.alpha),a=i(0.5,l,s.maxRadius);l.forEach(function(t){r(t)}),l.forEach(function(t){a(t)}),s._updateGraphics()}function a(){s._updateGraphics(),n.prototype._animationEnd.bind(s)()}n.prototype.renderSeries.call(this);var s=this,h=s.bounds,l=this.nodes=[];this.maxRadius=0;var u=s.renderer.isAnimation;s.force&&s.force.stop(),s.force=s.force||o(),this.series.forEach(function(t){var e;t.points.forEach(function(t){t.isVisible()&&(t.x=t._posX,t.y=t._posY,u&&s.force.registerDragTarget(t,t.graphic),l.push(t),s.maxRadius=Math.max(s.maxRadius,t.radius),e=e||t,e=t.radius>e.radius?t:e) +}),t.cluster=e}),s.force.nodes(l).size([h.width,h.height]).gravity(0.05).charge(0).eachTick(t),r.isSupportSVG()?u?s.force.start():s.force.simulateForce():s.force.endTick(a).simpleSimulateForce()},_updateGraphics:function(){var t=this;t.nodes&&t.nodes.forEach(function(e){if(e._posX=e.x,e._posY=e.y,t._calculateLabelPos(e),e.textGraphic){var i=e._isChosen,n=e.series._labelTrans(e);e.textGraphic&&e.textGraphic.interrupt(a.SELECT_ANIMATION).attr("transform","translate("+n.x+","+n.y+") scale("+(i?1.1:1)+")") +}e.graphic&&e.graphic.attr(e.series.getPointUpdateAnimationAttr(e))})},_animationEnd:function(){},validPosXY:function(t,e,i){return t=+t,t>e&&i>t?t:void 0},dealAxisZoom:function(t,e){var i=this,n=i.bounds;i.force&&i.force.stop();var a=i._calculateZoomParas(t,e),o=a.shiftX,s=a.shiftY,h=a.scale;i.nodes.forEach(function(t){t.radius*=h;var e=t.x+o,r=t.y+s;e-=n.width/2,r-=n.height/2,t.x=e*h+n.width/2-o,t.y=r*h+n.height/2-s,i._calculateLabelPos(t),i._updatePointTextGraphic(t);var a=t.series,l=a.getPointUpdateAnimationAttr(t); +t.graphic.animate({duration:u,ease:"back-out",attr:l})}),this.scale=h*r.pick(this.scale,1)},refreshRestore:function(){this.scale=1,this.update()},_calculateLabelPos:function(t){if(t.labelContent&&t.labelDim){var e=t.radius;t.labelDim.width>2*e||t.labelDim.height>2*e?t.labelPos=null:t.labelPos={x:-t.labelDim.width/2+t.x,y:-t.labelDim.height/2+t.y}}},orderData:function(){},_updatePointTextGraphic:function(t){t.textGraphic?t.labelPos?t.textGraphic.interrupt(a.SELECT_ANIMATION).attr("transform",r.makeTranslate(t.series._labelTrans(t))):(t.textGraphic.remove(),t.textGraphic=null):t.series._createTextGraphic(t) +}});return t("./VanChartLibrary").register(a.FORCE_BUBBLE_CHART,c),c}),define("vans/CloudLayout",["require","./../utils/BaseUtils"],function(t){function e(t){return t.text}function i(){return"serif"}function n(){return"normal"}function r(t){return Math.sqrt(t.value)}function a(){return 30*(~~(6*Math.random())-3)}function o(){return 1}function s(t,e,i,n,r){if(!e.sprite){var a=t.context,o=t.ratio;a.clearRect(0,0,(v<<5)/o,_/o);var s=0,h=0,l=0,u=i.length;for(--n;++n>5<<5,d=~~Math.max(Math.abs(y+x),Math.abs(y-x))}else{c=c+31>>5<<5}if(d>l&&(l=d),s+c>=v<<5&&(s=0,h+=l,l=0),h+d>=_&&!r){break}a.translate((s+(c>>1))/o,(h+(d>>1))/o),e.rotate&&a.rotate(e.rotate*m),a.fillText(e.text,0,0),e.padding&&!r&&(a.lineWidth=2*e.padding,a.strokeText(e.text,0,0)),a.restore(),e.width=c,e.height=d,e.xoff=s,e.yoff=h,e.x1=c>>1,e.y1=d>>1,e.x0=-e.x1,e.y0=-e.y1,e.hasText=!0,s+=c +}if(!r){for(var b=a.getImageData(0,0,(v<<5)/o,_/o).data,A=[];--n>=0;){if(e=i[n],e.hasText){for(var c=e.width,C=c>>5,d=e.y1-e.y0,L=0;d*C>L;L++){A[L]=0}if(s=e.xoff,null==s){return}h=e.yoff;for(var M=0,P=-1,w=0;d>w;w++){for(var L=0;c>L;L++){var S=C*w+(L>>5),E=b[(h+w)*(v<<5)+(s+L)<<2]?1<<31-L%32:0;A[S]|=E,M|=E}M?P=w:(e.y0++,d--,w--,h++)}e.y1=e.y0+P,e.sprite=A.slice(0,(e.y1-e.y0)*C)}}}}}function h(t,e,i){i>>=5;for(var n,r=t.sprite,a=t.width>>5,o=t.x-(a<<4),s=127&o,h=32-s,l=t.y1-t.y0,u=(t.y+t.y0)*i+(o>>5),c=0; +l>c;c++){n=0;for(var d=0;a>=d;d++){if((n<d?(n=r[c*a+d])>>>s:0))&e[u+d]){return !0}}u+=i}return !1}function l(t,e){var i=t[0],n=t[1];e.x+e.x0n.x&&(n.x=e.x+e.x1),e.y+e.y1>n.y&&(n.y=e.y+e.y1)}function u(t,e){return t.x+t.x1>e[0].x&&t.x+t.x0e[0].y&&t.y+t.y0>5)/n,a=A[1]/n;i.clearRect(0,0,r,a);var o=new Image;o.onload=function(){i.drawImage(o,0,0,r,a);var t=i.getImageData(0,0,r,a).data;i.clearRect(0,0,r,a);for(var n=t.length,s=[],h=0;n>h;h+=4){s[h/4]=t[h+3]?0:1}e(s)},o.src=R +}function x(t){t.width=t.height=1;var e=t.getContext("2d"),i=k?1:Math.sqrt(e.getImageData(0,0,1,1).data.length>>2);return t.width=(v<<5)/i,t.height=_/i,e.fillStyle=e.strokeStyle="red",e.textAlign="center",{context:e,ratio:i}}function T(t,e){for(var i=t.x+t.x0,n=t.x+t.x1,r=t.y+t.y0,a=t.y+t.y1,o=0,s=e.length;s>o;o++){var h=e[o],l=h.x+h.x0,u=h.x+h.x1,c=h.y+h.y0,d=h.y+h.y1,f=Math.max(i,l),p=Math.min(n,u),g=Math.max(r,c),m=Math.min(a,d);if(p>f&&m>g){return !0}}return !1}function b(t,e,i){if(A[0]<=0||A[1]<=0){return !0 +}for(var n,r,a,o=e.x,s=e.y,l=Math.sqrt(A[0]*A[0]+A[1]*A[1]),c=O(A),d=G()<0.5?1:-1,f=-d;n=c(f+=d);){if(r=~~n[0],a=~~n[1],0!==r||0!==a){if(Math.min(Math.abs(r),Math.abs(a))>=l){break}if(e.x=o+r,e.y=s+a,!(e.x+e.x0<0||e.y+e.y0<0||e.x+e.x1>A[0]||e.y+e.y1>A[1])){if(k){if(!i||!T(e,i)){return !0}}else{if((!i&&!R||!h(e,t,A[0]))&&(!i||u(e,i))){for(var p,g=e.sprite,m=e.width>>5,v=A[0]>>5,_=e.x-(m<<4),y=127&_,x=32-y,b=e.y1-e.y0,C=(e.y+e.y0)*v+(_>>5),L=0;b>L;L++){p=0;for(var M=0;m>=M;M++){t[C+M]|=p<M?(p=g[L*m+M])>>>y:0) +}C+=v}return delete e.sprite,!0}}}}}return !1}var A=[256,256],C=e,L=i,M=r,P=n,w=n,S=a,E=o,O=c,R=null,k=!g.isSupportSVG(),D=null,I=[],B=1/0,N=null,G=Math.random,F={},H=f;return F.canvas=function(t){return arguments.length?(H=p(t),F):H},F.start=function(){function e(t){k?n(t):(N&&g.clearInterval(N),N=g.setInterval(i,0),i(t))}function i(t){function e(){return n.hasText&&b(a,n,o)?(c.push(n),o?l(o,n):o=[{x:n.x+n.x0,y:n.y+n.y0},{x:n.x+n.x1,y:n.y+n.y1}],n.x-=A[0]>>1,n.y-=A[1]>>1,!0):!1}a=t?t:a;for(var i=Date.now(); +Date.now()-i>1,n.y=A[1]*(G()+0.5)>>1,s(r,n,f,u,k),!e()&&100>h&&e()}u>=h&&(F.stop(),D(c))}function n(t){for(;++u>1,e.y=A[1]*(G()+0.5)>>1;var i=g.getTextDimension(e.text,{fontSize:e.size+"px",fontFamily:e.fontFamily},!1);e.height=i.height,e.y0=-e.height>>1,e.y1=-e.y0,e.width=i.width,e.x0=-e.width>>1,e.x1=-e.x0,b(a,e,o)&&(c.push(e),o?o.push({x:e.x,y:e.y,x0:e.x0,y0:e.y0,x1:e.x1,y1:e.y1}):o=[{x:e.x,y:e.y,x0:e.x0,y0:e.y0,x1:e.x1,y1:e.y1}],e.x-=A[0]>>1,e.y-=A[1]>>1,e.x-=e.width>>1,e.y-=e.height>>1) +}u>=h&&(F.stop(),D(c))}var r=x(H()),a=t()?m(r,e):k?[]:d((A[0]>>5)*A[1]),o=null,h=I.length,u=-1,c=[],f=I.map(function(t,e){return t.text=C.call(this,t,e),t.font=L.call(this,t,e),t.style=P.call(this,t,e),t.weight=w.call(this,t,e),t.rotate=S.call(this,t,e),t.size=~~M.call(this,t,e),t.padding=E.call(this,t,e),t}).sort(function(t,e){return e.size-t.size});return t()||e(),F},F.stop=function(){return N&&(g.clearInterval(N),N=null),F},F.timeInterval=function(t){return arguments.length?(B=null==t?1/0:t,F):B +},F.words=function(t){return arguments.length?(I=t,F):I},F.path=function(t){return arguments.length?(R=t,F):R},F.renderFun=function(t){return arguments.length?(D=t,F):D},F.size=function(t){return arguments.length?(A=[+t[0],+t[1]],F):A},F.font=function(t){return arguments.length?(L=p(t),F):L},F.fontStyle=function(t){return arguments.length?(P=p(t),F):P},F.fontWeight=function(t){return arguments.length?(w=p(t),F):w},F.rotate=function(t){return arguments.length?(S=p(t),F):S},F.text=function(t){return arguments.length?(C=p(t),F):C +},F.spiral=function(t){return arguments.length?(O=y[t]||t,F):O},F.fontSize=function(t){return arguments.length?(M=p(t),F):M},F.padding=function(t){return arguments.length?(E=p(t),F):E},F.random=function(t){return arguments.length?(G=t,F):G},F};var y}),define("vans/VanChartWordCloud",["require","./VanChart","./../Constants","./../utils/BaseUtils","../utils/Scale","./CloudLayout","./VanChartLibrary"],function(t){var e=t("./VanChart"),i=t("./../Constants"),n=t("./../utils/BaseUtils"),r=t("../utils/Scale"),a=t("./CloudLayout"),o=800,s=e.extend({vanChartType:"vanChartWordCloud",dealAxisZoom:function(t,e){var i=this,r=i.series,a=i._calculateZoomParas(t,e),o=a.shiftX,s=a.shiftY,h=a.scale; +r.forEach(function(t){t.points.forEach(function(e){if(e.word){var i=e.word.x,n=e.word.y;e.word.x=(i+o)*h-o,e.word.y=(n+s)*h-s,e.word.size*=h,t._drawUpdatePoints(e)}})}),this.scale=h*n.pick(this.scale,1)},_getTranslate:function(){var t=this.bounds;return[t.x+t.width/2,t.y+t.height/2]},_animationStart:function(){this._animationStarted=!0,this.animationCount=0,this.removeMoreLabel()},renderSeries:function(){function t(t){e.group||(e.group=s.group().addTo(e.clipSeriesGroup)),e.group.attr("transform",n.makeTranslate(e._getTranslate())); +var r=e.seriesOfType(i.WORD_CLOUD_CHART);if(r&&r.length){var a=r[0];e.registerInteractiveTarget(a,e.group),a._removeDataLabels();var h=o/parseFloat(t.length),l=0;v.forEach(function(e){var i=e.word;-1!=t.indexOf(i)&&(e.delayTime=l,l+=h,e.labelDim=n.getTextDimension(i.text,{fontSize:i.size+"px",fontFamily:i.fontFamily},!1)),a.drawPoint(e)}),e.setTimeout("effect",function(){v.forEach(function(t){a.drawPointEffect(t)})},800)}e.options.toPhantom&&window.console&&console.log("done")}this.fire("animationStart"); +var e=this,s=e.renderer,h=e.options.plotOptions,l=e.bounds,u=l.width,c=l.height,d=h.minRotation,f=h.maxRotation,p=h.fontFamily,g=h.minFontSize,m=h.maxFontSize,v=e.pointsOfType(i.WORD_CLOUD_CHART).filter(function(t){return !t.isNull}).sort(function(t,e){return Math.abs(e.value)-Math.abs(t.value)});if(0!==v.length){g=n.hasDefined(g)?g:10,m=n.hasDefined(m)?m:e._calculateNiceMaxFontSize(u,c,v[0].name,p),e.minFontSize=Math.min(parseFloat(g),parseFloat(m)),e.maxFontSize=Math.max(parseFloat(g),parseFloat(m)); +var _=r.linear().domain([Math.abs(v[v.length-1].value),Math.abs(v[0].value)]).range([e.minFontSize,e.maxFontSize]),y=a().size([u,c]).words(v.filter(function(t){return t.visible}).map(function(t){var i={text:t.name,size:_(Math.abs(t.value))*e.scale,point:t,fontFamily:p};return t.word=i,i})).path(h.path).padding(5).rotate(function(){return d+Math.random()*(f-d)}).font(p).fontSize(function(t){return t.size}).renderFun(t);y.start()}},_consoleDone:function(){},_calculateNiceMaxFontSize:function(t,e,i,r){for(var a={min:0,max:100},o=function(){return a.max-a.min>2 +},s={fontSize:a.max+"px",fontFamily:r},h=n.getTextDimension(i,s,!1);o()&&(h.width>t||h.height>e);){var l=Math.ceil(a.min+(a.max-a.min)/2);s.fontSize=l+"px";var u=n.getTextDimension(i,s,!1);u.width>t||u.height>e?(a.max=l,h=u):a.min=l}return o()?a.max:a.min}});return t("./VanChartLibrary").register(i.WORD_CLOUD_CHART,s),s}),define("vans/TreeMapLayout",["require","../utils/BaseUtils"],function(t){function e(t,e){return m.rebind(t,e,"sort","children","value"),t.nodes=t,t.links=s,t}function i(t,e){for(var i=[t]; +null!=(t=i.pop());){if(e(t),(r=t.children)&&(n=r.length)){for(var n,r;--n>=0;){i.push(r[n])}}}}function n(t,e){for(var i=[t],n=[];null!=(t=i.pop());){if(n.push(t),(a=t.children)&&(r=a.length)){for(var r,a,o=-1;++o=0;){e=r[a],e.z+=i,e.m+=i,i+=e.s+(n+=e.c)}}function f(t,e,i){return t.a.parent===e.parent?t.a:i}function p(t){return{x:t.x,y:t.y,dx:t.dx,dy:t.dy}}function g(t,e){var i=t.x+e[3],n=t.y+e[0],r=t.dx-e[1]-e[3],a=t.dy-e[0]-e[2];return 0>r&&(i+=r/2,r=0),0>a&&(n+=a/2,a=0),{x:i,y:n,dx:r,dy:a} +}var m=t("../utils/BaseUtils"),v=function(){function t(i){var r,a=[i],o=[];for(i.depth=0;null!=(r=a.pop());){if(o.push(r),(u=s.call(t,r,r.depth))&&(l=u.length)){for(var l,u,c;--l>=0;){a.push(c=u[l]),c.parent=r,c.depth=r.depth+1}h&&(r.value=0),r.children=u}else{h&&(r.value=+h.call(t,r,r.depth)||0),delete r.children}}return n(i,function(t){var i,n;e&&(i=t.children)&&i.sort(e),h&&(n=t.parent)&&(n.value+=t.value)}),o}var e=o,s=r,h=a;return t.sort=function(i){return arguments.length?(e=i,t):e},t.children=function(e){return arguments.length?(s=e,t):s +},t.value=function(e){return arguments.length?(h=e,t):h},t.revalue=function(e){return h&&(i(e,function(t){t.children&&(t.value=0)}),n(e,function(e){var i;e.children||(e.value=+h.call(t,e,e.depth)||0),(i=e.parent)&&(i.value+=e.value)})),e},t},_=function(){function t(t,e){var s=g.call(this,t,e),h=s[0],l=r(h);if(n(l,a),l.parent.m=-l.z,i(l,o),y){i(h,p)}else{var u=h,c=h,d=h;i(h,function(t){t.xc.x&&(c=t),t.depth>d.depth&&(d=t)});var f=m(u,c)/2-u.x,v=_[0]/(c.x+m(c,u)/2+f),x=_[1]/(d.depth||1); +i(h,function(t){t.x=(t.x+f)*v,t.y=t.depth*x})}return s}function r(t){for(var e,i={A:null,children:[t]},n=[i];null!=(e=n.pop());){for(var r,a=e.children,o=0,s=a.length;s>o;++o){n.push((a[o]=r={_:a[o],parent:e,children:(r=a[o].children)&&r.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:o}).a=r)}}return i.children[0]}function a(t){var e=t.children,i=t.parent.children,n=t.i?i[t.i-1]:null;if(e.length){d(t);var r=(e[0].z+e[e.length-1].z)/2;n?(t.z=n.z+m(t._,n._),t.m=t.z-r):t.z=r}else{n&&(t.z=n.z+m(t._,n._)) +}t.parent.A=s(t,n,t.parent.A||i[0])}function o(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function s(t,e,i){if(e){for(var n,r=t,a=t,o=e,s=r.parent.children[0],h=r.m,d=a.m,p=o.m,g=s.m;o=u(o),r=l(r),o&&r;){s=l(s),a=u(a),a.a=t,n=o.z+p-r.z-h+m(o._,r._),n>0&&(c(f(o,t,i),t,n),h+=n,d+=n),p+=o.m,h+=r.m,g+=s.m,d+=a.m}o&&!u(a)&&(a.t=o,a.m+=p-d),r&&!l(s)&&(s.t=r,s.m+=h-g,i=t)}return i}function p(t){t.x*=_[0],t.y=t.depth*_[1]}var g=v().sort(null).value(null),m=h,_=[1,1],y=null;return t.separation=function(e){return arguments.length?(m=e,t):m +},t.size=function(e){return arguments.length?(y=null==(_=e)?p:null,t):y?null:_},t.nodeSize=function(e){return arguments.length?(y=null==(_=e)?null:p,t):y?_:null},e(t,g)},y=function(){function t(t,e){for(var i,n,r=-1,a=t.length;++re?0:e),i.area=isNaN(n)||0>=n?0:n}}function i(e){var n=e.children;if(n&&n.length){var o,s,h,l=d(e),u=[],c=n.slice(),f=1/0,p="slice"===m?l.dx:"dice"===m?l.dy:"slice-dice"===m?1&e.depth?l.dy:l.dx:Math.min(l.dx,l.dy);for(t(c,l.dx*l.dy/e.value),u.area=0; +(h=c.length)>0;){u.push(o=c[h-1]),u.area+=o.area,"squarify"!==m||(s=r(u,p))<=f?(c.pop(),f=s):(u.area-=u.pop().area,a(u,p,l,!1),p=Math.min(l.dx,l.dy),u.length=u.area=0,f=1/0)}u.length&&(a(u,p,l,!0),u.length=u.area=0),n.forEach(i)}}function n(e){var i=e.children;if(i&&i.length){var r,o=d(e),s=i.slice(),h=[];for(t(s,o.dx*o.dy/e.value),h.area=0;r=s.pop();){h.push(r),h.area+=r.area,null!=r.z&&(a(h,r.z?o.dx:o.dy,o,!s.length),h.length=h.area=0)}i.forEach(n)}}function r(t,e){for(var i,n=t.area,r=0,a=1/0,o=-1,s=t.length; +++oi&&(a=i),i>r&&(r=i))}return n*=n,e*=e,n?Math.max(e*r*_/n,n/(e*a*_)):1/0}function a(t,e,i,n){var r,a=-1,o=t.length,s=i.x,h=i.y,u=e?l(t.area/e):0;if(e==i.dx){for((n||u>i.dy)&&(u=i.dy);++ai.dx)&&(u=i.dx);++a=i;){e[i]=g*h.calculateQuadInT(n/r),n+=Math.pow(2,-i),i++}return e}function n(t){if(0===t){return[0]}for(var e=[],i=0;t>=i;){e[i]=g*h.calculateQuadInT(i/t),i++}return e}function r(t,e){return e-t.source.level}var a=t("./VanChart"),o=t("./../Constants"),s=t("./../utils/BaseUtils"),h=t("./../utils/BezierEasing"),l=t("./../utils/BoundsManager"),u=t("./TreeMapLayout").treeLayout,c=t("./ForceLayout"),d=t("../utils/Scale"),f=t("../utils/PathGenerator"),p=t("../dom/EventObject"),g=1200,m=300,v=500,_=h.css["ease-in-quad"],y=h.css.swing,x=2,T=a.extend({vanChartType:"vanChartStructure",dealAxisZoom:function(t,e){var i=this,n=i.bounds,r=i._horizontalLayout(),a=i._radialLayout(),o=i._calculateZoomParas(t,e),h=o.shiftX,l=o.shiftY,u=o.scale; +i.nodes.forEach(function(t){var e=t.posX+h,a=t.posY+l;e-=n.width/2,a-=n.height/2,t.posX=e*u+n.width/2-h,t.posY=a*u+n.height/2-l,t.x=r?t.posY:t.posX,t.y=r?t.posX:t.posY,t.radius*=u,t.labelPos=i._labelPos(t);var o=i._nodeAttrs(t),c={transform:s.makeTranslate(t.labelPos)},d={transform:s.makeTranslateWithPX(t.labelPos)},f="translate("+t.posX+","+t.posY+")";t.graphic.animate({duration:v,attr:{transform:f}}),t.graphic.nodeGraphic.animate({duration:v,attr:o}),t.textGraphic&&t.textGraphic.animate({duration:v,attr:c,style:d}) +}),i.edges.forEach(function(t){var e=a?i._forceLinkAttrs(t):{d:i._treeLinkPath(t)};t.linkGraphic.animate({duration:v,attr:e})}),i._forceDragEnabled()&&i.force.scale(u),this.scale=u*s.pick(this.scale,1)},renderSeries:function(){this.fire("animationStart");var t=this,e=t.renderer,i=t.bounds,n=t.seriesOfType(o.STRUCTURE_CHART);t.nodes&&n&&n.length&&(t.layout=t.options.plotOptions.layout,t.animation=t.options.plotOptions.animation,t.lineWidth=t.options.plotOptions.lineWidth,s.hasNotDefined(t.lineWidth)&&(t.lineWidth=null),t.linkGroup||(t.linkGroup=e.group().addTo(t.clipSeriesGroup),t.nodeGroup=e.group().addTo(t.clipSeriesGroup)),t.linkGroup.attr("transform",s.makeTranslate(i)),t.nodeGroup.attr("transform",s.makeTranslate(i)),t.groupTrans=null,t.registerInteractiveTarget(n[0],t.linkGroup),t._radialLayout()?t._forceRenderer():t._treeRenderer(),this.animationCount||this.fire("animationEnd")) +},_animationStart:function(){this._animationStarted=!0,this.animationCount=0,this.removeMoreLabel(),this.series.forEach(function(t){t._removeDataLabels()})},_forceDragEnabled:function(){return this.animation&&this._radialLayout()&&this.options.plotOptions.force},_treeDragEnabled:function(){return this.animation&&!this._radialLayout()&&this.options.plotOptions.force},_verticalLayout:function(){return"vertical"===this.layout},_horizontalLayout:function(){return"horizontal"===this.layout},_radialLayout:function(){return"radial"===this.layout +},_validPosition:function(t,e,i,n){return Math.min(n-i,Math.max(t,e))},_forceRenderer:function(){function t(t){return f*Math.pow(2,-t.source.level)}function n(){r(!0)}function r(t){t&&o.force._distanceTick();var i=t?o.ancestor.x-p:0,n=t?o.ancestor.y-g:0;l.forEach(function(t){t.x-=i,t.y-=n,t.labelPos=o._labelPos(t),e(t,o.maxLevel);var r=t.radius,a=t.radius,l=t.radius,u=t.radius;t.hasValidDataLabel()&&(r=Math.max(r,t.x-t.labelPos.x),a=Math.max(a,t.labelPos.x+t.labelDim.width-t.x),l=Math.max(l,t.y-t.labelPos.y),u=Math.max(u,t.labelPos.y+t.labelDim.height-t.y)),t.x=o._validPosition(t.x,r,a,h.width),t.y=o._validPosition(t.y,l,u,h.height),t.labelPos=o._labelPos(t),t.posX=t.x,t.posY=t.y,t.graphic&&t.graphic.attr("transform",s.makeTranslate(t)),t.textGraphic&&t.textGraphic.attr("transform",s.makeTranslate(t.labelPos)).style("transform",s.makeTranslateWithPX(t.labelPos)) +}),u.forEach(function(t){t.linkGraphic&&t.linkGraphic.attr("x1",t.source.x).attr("y1",t.source.y).attr("x2",t.target.x).attr("y2",t.target.y)})}function a(){r(!1)}var o=this,h=o.bounds,l=o.nodes,u=o.edges,d=o.maxLevel,f=Math.min(h.width,h.height)/4,p=h.width/2,g=h.height/2;o.force&&o.force.stop(),o.force=c().nodes(l).links(u).size([h.width,h.height]).linkDistance(t).gravity(0).charge(function(t){return -100*t.level/d}).eachTick(n),o.force.simulateForce();var m=i(d);o._rendererNodes(m),o._renderLabels(m),o._renderForceLink(m),o.force.eachTick(a) +},_renderForceLink:function(t){var e=this,i=e.renderer;e.edges.forEach(function(n){n.linkGraphic&&n.linkGraphic.remove(),n.linkGraphic=null;var a=e._forceLinkAttrs(n),o=e.options.plotOptions,s={fill:"none",stroke:o.lineColor,"stroke-opacity":o.lineOpacity,"stroke-width":null==e.lineWidth?r(n,e.maxLevel):e.lineWidth};if(n.linkGraphic=i.line(a).style(s).addTo(e.linkGroup),n.linkGraphic.datum(n),e.animation){var h=t[n.source.level],l=t[n.target.level],u=h/g,c=l/g,f=_(u),p=_(c),m=d.linear().domain([0,1]).range([u,c]),v=d.linear().domain([f,p]).range([0,1]); +n.linkGraphic.attr("x2",a.x1).attr("y2",a.y1).animate({delay:h,ease:"linear",duration:l-h,attrTween:{x2:function(){return function(t){return a.x1+(a.x2-a.x1)*v(_(m(t)))}},y2:function(){return function(t){return a.y1+(a.y2-a.y1)*v(_(m(t)))}}}})}})},_forceLinkAttrs:function(t){return{x1:t.source.x,x2:t.target.x,y1:t.source.y,y2:t.target.y}},_treeRenderer:function(){var t=this,e=t.bounds,i=t.maxLevel,r=t._verticalLayout()?[e.width,e.height]:[e.height,e.width],a=u().size(r),o=a.nodes(t.ancestor).reverse(); +t._adjustTreeSize(a,r,o,i);var s=n(i);t._rendererNodes(s),t._renderLabels(s),t._renderTreeLink()},_adjustTreeSize:function(t,i,n,r){var a=this,s=a._verticalLayout(),h=0,l=i[0],u=0,c=i[1];n.forEach(function(t){var i=e(t,r);i+=t.options.borderWidth||0;var n=t.options.dataLabels,a=t.labelDim;if(n&&n.enabled){var d=a.width,f=a.height,p=n.align==o.OUTSIDE;s?(h=Math.min(h,t.x-d/2),l=Math.max(l,t.x+d/2),u=Math.min(u,t.y-(p?f+x+i:f/2)),c=Math.max(c,t.y+(p?0:f/2))):(h=Math.min(h,t.x-(p?0:f/2)),l=Math.max(l,t.x+(p?i+x+f:f/2)),u=Math.min(u,t.y-d/2),c=Math.max(c,t.y+d/2)) +}h=Math.min(h,t.x-i),l=Math.max(l,t.x+i),u=Math.min(u,t.y-i),c=Math.max(c,t.y+i)}),h=-h,l-=i[0],u=-u,c-=i[1],i=[i[0]-h-l,i[1]-u-c],t.size(i),t.nodes(a.ancestor).reverse(),n.forEach(function(t){t.x=t.x+h,t.y=t.y+u})},_treeLinkPath:function(t){var e=this,i=e.maxLevel,n=e._verticalLayout()?function(t){return[t.x,t.y]}:function(t){return[t.y,t.x]};if(e.lineWidth){var a=f.diagonal().projection(n);return a(t)}var o=t.source,s=t.target,h=r(t,i),l=h/2,u=o.x,c=o.y,d=s.x,p=s.y,g=(c+p)/2,m=u-l,v=Math.min(d-0.25,d-l+0.5),_=u+l,y=Math.max(d+0.25,d+l-0.5),x=[{x:m,y:c},{x:m,y:g},{x:v,y:g},{x:v,y:p},{x:y,y:p},{x:y,y:g},{x:_,y:g},{x:_,y:c}]; +return x=x.map(n),"M"+x[0]+"C"+x[1]+" "+x[2]+" "+x[3]+"L"+x[4]+"C"+x[5]+" "+x[6]+" "+x[7]},_renderTreeLink:function(){var t,e=this,i=e.renderer,n=e.bounds,r=e.options.plotOptions;t=null==e.lineWidth?{fill:r.lineColor,"fill-opacity":r.lineOpacity}:{fill:"none",stroke:r.lineColor,"stroke-opacity":r.lineOpacity,"stroke-width":e.lineWidth};var a=n.width,h=n.height,l=0,u=0;e.edges.forEach(function(n){n.linkGraphic&&n.linkGraphic.remove(),n.linkGraphic=null,n.linkGraphic=i.path().addTo(e.linkGroup),n.linkGraphic.attr("d",e._treeLinkPath(n)).style(t),n.linkGraphic.datum(n); +var r=n.source,o=n.target;a=Math.min(a,r.posX),h=Math.min(h,r.posY),l=Math.max(l,r.posX),u=Math.max(u,r.posY),a=Math.min(a,o.posX),h=Math.min(h,o.posY),l=Math.max(l,o.posX),u=Math.max(u,o.posY)});var c=e.lineWidth||1,d=e.layout===o.HORIZONTAL_LAYOUT;if(e.animation&&s.isSupportSVG()){var f={x:a-(d?0:c/2),y:h-(d?c/2:0),width:l-a+(d?0:c)+1,height:u-h+(d?c:0)+1};e.linkGroup.clipG?i.updateClip(e.linkGroup.clipG,f):(e.linkGroup.clipG=i.createClip(f),i.clip(e.linkGroup,e.linkGroup.clipG));var p=e._verticalLayout()?"height":"width",m={}; +m[p]=f[p],e.linkGroup.clipG.rect.attr(p,0).animate({ease:_,duration:g,attr:m})}},_rendererNodes:function(t){var i=this,n=i.renderer,r=i.maxLevel;i.nodes.forEach(function(a){function o(){var t=new p(i.getEvents());return t.vanchart=i,t}function s(t,e){e&&i.registerInteractiveTarget(t,e)}a._events=null,a.graphic&&a.graphic.remove(),a.graphic=null;var h=(e(a,r),t[a.level]);a.posX=parseInt(i._horizontalLayout()?a.y:a.x),a.posY=parseInt(i._horizontalLayout()?a.x:a.y);var l=i._nodeAttrs(a),u=a.series.getStyle(a); +a.graphic=n.group().attr("transform","translate("+a.posX+","+a.posY+")").addTo(i.nodeGroup),a.options.image?a.graphic.nodeGraphic=n.image(l).imageContent(a.options.image).addTo(a.graphic):a.graphic.nodeGraphic=n.circle(l).style(u).addTo(a.graphic),s(a,a.graphic),s(o(),a.graphic.nodeGraphic),a.graphic.attr("transform","translate("+a.posX+","+a.posY+") scale(0.01)").animate([{delay:h,ease:y,duration:m/2,attr:{transform:"translate("+a.posX+","+a.posY+") scale(1.5)"}},{ease:y,duration:m/2,attr:{transform:"translate("+a.posX+","+a.posY+") scale(1)"}}]),i._forceDragEnabled()&&i.force.registerDragTarget(a,a.graphic) +})},_nodeAttrs:function(t){var e=t.radius;return t.options.image?{preserveAspectRatio:"none",x:-e,y:-e,width:2*e,height:2*e}:{cx:0,cy:0,r:e}},_labelPos:function(t){if(t.labelDim){var e=t.options.dataLabels,i=t.labelDim,n=e.align==o.INSIDE;return n?{x:t.posX-i.width/2,y:t.posY-i.height/2}:{x:t.posX-i.width/2,y:t.posY-t.radius-x-i.height}}},_animationEnd:function(){this._animationStarted=!1,this._consoleDone()},_renderLabels:function(t){var e=new l,i=this,n=this._needShowMoreLabel(),r=this.isMobileFlow(); +i.nodes&&i.nodes.forEach(function(a){a.textGraphic&&a.textGraphic.remove(),a.textGraphic=null;var o=a.options.dataLabels,h=a.series;if(o&&o.enabled){var l=i._labelPos(a);if(o.autoAdjust&&(l=h._calculateAutoLabelPos(a,l,i._horizontalLayout(),e)),l){var u=s.makeBounds(l,a.labelDim);r&&e.isOverlapped(u)?a.labelPos=null:(a.labelPos=l,e.addBounds(u))}a.labelPos&&(h._createTextGraphic(a),a.textGraphic.style("opacity",0).animate({delay:t[a.level],duration:0,style:{opacity:1}}))}n&&s.setTimeout(function(){h._showMoreLabel(a) +},t[a.level])})},_onPanStart:function(t){var e=this,i=e.vanchart;i.groupTrans=i.groupTrans||i.bounds,i.currentPoint=t.containerPoint},_onPanMove:function(t){var e=this,i=e.vanchart,n=t.containerPoint.x-i.currentPoint.x,r=t.containerPoint.y-i.currentPoint.y;i.groupTrans.x+=n,i.groupTrans.y+=r,i.currentPoint=t.containerPoint,i.removeMoreLabel();var a=s.makeTranslate(i.groupTrans);i.linkGroup.attr("transform",a),i.nodeGroup.attr("transform",a),i.ancestor.series.textGraphicGroup&&i.ancestor.series.textGraphicGroup.attr("transform",a) +},_onPanEnd:function(t){var e=this,i=e.vanchart;i.handler.panTarget=null},getEvents:function(){var t=this;return t._treeDragEnabled()?{panstart:t._onPanStart,panmove:t._onPanMove,panend:t._onPanEnd}:{}}});return t("./VanChartLibrary").register(o.STRUCTURE_CHART,T),T}),define("dateUnits/dateFormat",["require"],function(t){function e(t,e,i){var n=""+Math.abs(t),r=e-n.length,a=t>=0;return(a?i?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+n}function i(t,i,n,r){var a=r;"string"==typeof r&&(a=function(){return this[r]() +}),t&&(f[t]=a),i&&(f[i[0]]=function(){return e(a.apply(this,arguments),i[1],i[2])})}function n(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function r(t){var e,i,r=t.match(c);for(e=0,i=r.length;i>e;e++){f[r[e]]?r[e]=f[r[e]]:r[e]=n(r[e])}return function(e){var n,a="";for(n=0;i>n;n++){a+=r[n] instanceof Function?r[n].call(e,t):r[n]}return a}}function a(t,e){return d[e]=d[e]||r(e),d[e](t)}function o(t,e){return t=t.toString().split("e"),t=Math.round(+(t[0]+"e"+(t[1]?+t[1]-e:-e))),t=t.toString().split("e"),+(t[0]+"e"+(t[1]?+t[1]+e:e)) +}function s(t,e){return o(e.get(t),-2)+u.duration[t]}function h(t,e){return null==p[e]&&("string"==typeof u.duration[e]?p[e]=s.bind(null,e):p[e]=u.duration[e]),p[e](t)}function l(t){for(var e in t){"_"!==e.charAt(0)&&("base"===e?t.base(i,u):u[e]=t[e])}}var u={duration:{year:"years",month:"months",day:"days",hour:"hours",minute:"minutes",second:"seconds"},halfYears:["H1","H2"],quarters:"Q1_Q2_Q3_Q4".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),meridiem:["am","pm"],qDay:"0h~6h_6h~12h_12h~18h_18h~24h".split("_")},c=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w{1,3}|wo|W[o|W]?|Q{2,3}|Qo?|[yY]{2,6}|gg(ggg?)?|GG(GGG?)?|e{2,6}|E{1,6}|a|A|hh?|HH?H?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,d={},f={},p={},g=i; +return g("y",0,0,function(){var t=this.year();return 9999>=t?""+t:"+"+t}),g(0,["yy",2],0,function(){return this.year()%100}),g(0,["yyyy",4],0,"year"),g("Y",0,0,function(){var t=this.year();return 9999>=t?""+t:"+"+t}),g(0,["YY",2],0,function(){return this.year()%100}),g(0,["YYYY",4],0,"year"),g(0,["yyyyy",5],0,"year"),g(0,["yyyyyy",6,!0],0,"year"),g("N",0,0,function(){return u.halfYears[this.halfYear()-1]}),g("Q",["QQ",2],0,"quarter"),g("QQQ",0,0,function(){return u.quarters[this.quarter()-1]}),g("M",["MM",2],"Mo",function(){return this.month()+1 +}),g("MMM",0,0,function(){return u.monthsShort[this.month()]}),g("MMMM",0,0,function(){return u.months[this.month()]}),g("MMMMM",0,0,function(){return u.months[this.month()]}),g("w",["ww",2],0,"week"),g("www",0,0,function(){return"Week"+this.week()}),g("e",["ee",2],0,"day"),g("eee",0,0,function(){return u.weekdaysShort[this.day()]}),g("eeee",0,0,function(){return u.weekdays[this.day()]}),g("eeeeee",0,0,function(){return u.weekdaysMin[this.day()]}),g("EEEEE",0,0,function(){return u.weekdays[this.day()] +}),g("d",["dd",2],0,"date"),g("a",0,0,function(){return u.meridiem[this.meridiem()-1]}),g("I",0,0,function(){return u.qDay[this.qDay()-1]}),g("H",["HH",2],0,"hour"),g("h",["hh",2],0,"hour"),g("HHH",0,0,function(){return this.hour()+"h"}),g("m",["mm",2],0,"minute"),g("s",["ss",2],0,"second"),{formatDate:a,formatDuration:h,setLocale:l}}),define("dateUnits/dateDuration",["require","./dateFormat"],function(t){var e=t("./dateFormat").formatDuration,i=1000,n=60*i,r=60*n,a=24*r,o=365*a,s=30*a,h=function(t){this._ms=+t +},l=(h.prototype={valueOf:function(){return this._ms},as:function(t){return e(this,t)},get:function(t){var e=this._ms;switch(t){case"millisecond":break;case"second":e/=i;break;case"hour":e/=r;break;case"minute":e/=n;break;case"day":e/=a;break;case"month":e/=s;break;case"year":e/=o;break;default:throw new Error("Unknown unit "+t)}return e}},function(t){return new h(t)});return l}),define("dateUnits/dateUnits",["require","./dateFormat","./dateDuration"],function(t){function e(t,e,i){var n=Math.floor((t-e)/(i-e+1)),r=t-(i-e+1)*n; +return{c:n,r:r}}function i(t){return t%4===0&&t%100!==0||t%400===0}function n(t){return i(t)?366:365}function r(t){var e=new Date(t,0,4).getDay()||7;return 4-e}function a(t){var e=r(t),i=r(t+1);return(n(t)-e+i)/7}var o=t("./dateFormat"),s=t("./dateDuration"),h=o.formatDate,l=86400000,u="halfHour",c="tenMinute",d="fiveMinute",f="halfMinute",p="tenSecond",g="year",m="month",v="halfYear",_="quarter",y="week",x="day",T="date",b="meridiem",A="qDay",C="hour",L="minute",M="second",P="millisecond",w=[u,c,d,f,p],S=[g,m,v,_,y,x,T,b,A,C,L,M,P],E={}; +w.map(function(t){E[t+"s"]=t}),S.map(function(t){E[t+"s"]=t});var O=function(t){this._d=t},R=O.prototype={valueOf:function(){return +this._d},year:function(t){return null!=t?(this._d.setFullYear(t),this):this._d.getFullYear()},month:function(t){return null!=t?(this._d.setMonth(t),this):this._d.getMonth()},halfYear:function(t){if(null!=t){var i=e(t,1,2);return i.c&&this.year(this.year()+i.c),this.month(1===i.r?0:6),this}return this.month()<6?1:2},quarter:function(t){if(null!=t){var i=e(t,1,4);return i.c&&this.year(this.year()+i.c),this.month(3*(i.r-1)),this +}return Math.ceil((this.month()+1)/3)},dayOfYear:function(){return Math.floor((this._d-new Date(this.year(),0,1))/l)+1},weekOfYear:function(){var t=Math.floor((this.dayOfYear()-(this.day()||7)+10)/7),e=this.year();return 1>t?(e-=1,t=a(e)):t>a(e)&&(t-=a(e),e+=1),{week:t,year:e}},week:function(){return this.weekOfYear().week},day:function(t){if(null!=t){var e=t-(this.day()||7);return this._d.setDate(this.date()+e),this}return this._d.getDay()},date:function(t){return null!=t?(this._d.setDate(t),this):this._d.getDate() +},meridiem:function(t){if(null!=t){var i=e(t,1,2);return i.c&&this.date(this.date()+i.c),this.hours(1===i.r?0:12),this}return this.hours()<12?1:2},qDay:function(t){if(null!=t){var i=e(t,1,4);return i.c&&this.date(this.date()+i.c),this.hour(6*(i.r-1)),this}return Math.ceil((this.hour()+1)/6)},hour:function(t){return null!=t?(this._d.setHours(t),this):this._d.getHours()},minute:function(t){return null!=t?(this._d.setMinutes(t),this):this._d.getMinutes()},second:function(t){return null!=t?(this._d.setSeconds(t),this):this._d.getSeconds() +},millisecond:function(t){return null!=t?(this._d.setMilliseconds(t),this):this._d.getMilliseconds()},_roundMinute:function(t){var e=Math.floor(this._d.getMinutes()/t)*t;this._d.setMinutes(e)},_roundSecond:function(t){var e=Math.floor(this._d.getSeconds()/t)*t;this._d.setSeconds(e)},startOf:function(t){switch(t=E[t]||t){case g:this.month(0);case v:case _:case m:this.date(1);case y:case x:case T:this.hours(0);case C:case b:case A:this.minutes(0);case L:case u:case c:case d:this.seconds(0);case M:case f:case p:this.milliseconds(0); +break;default:throw t+" error"}switch(t){case y:this.day(1);break;case _:case v:case b:case A:this[t](this[t]());break;case u:this._roundMinute(30);break;case c:this._roundMinute(10);break;case d:this._roundMinute(5);break;case f:this._roundSecond(30);break;case p:this._roundSecond(10)}return this},endOf:function(t){return t&&t!==P&&"milliseconds"!==t?this.add(1,t).startOf(t).add(-1,P):this},add:function(t,e){switch(e=E[e]||e){case v:this.add(6*t,m);break;case _:this.add(3*t,m);break;case y:this.add(7*t,T); +break;case b:this.add(12*t,C);break;case A:this.add(6*t,C);break;case u:this.add(30*t,L);break;case c:this.add(10*t,L);break;case d:this.add(5*t,L);break;case f:this.add(30*t,M);break;case p:this.add(10*t,M);break;default:e===x&&(e=T);var i=this.get(e);this[e](i+t)}return this},isWeekend:function(){var t=this.day();return 6===t||0===t}};S.map(function(t){R[t+"s"]=R[t]}),R.get=function(t){return this[t]()},R.format=function(t){return h(this,t)};var k=function(t){var e;return e=t instanceof O?new Date(t._d):t?new Date(t):new Date,new O(e) +};return k.isLeapYear=i,k.daysInYear=n,k.firstWeekOffset=r,k.weeksInYear=a,k.setLocale=o.setLocale,k.duration=s,k}),define("mobile/ManagerGantt",["require","./AbstractManager","../Constants"],function(t){var e=t("./AbstractManager"),i=t("../Constants");return e.extend({z:11,getBoundingRect:function(){return this.vanchart.panBounds},onpanstart:function(t){this.handler.stage===i.STAGES.NORMAL&&(this._scroll(t),this.deltaX=t.srcEvent.deltaX,this.deltaY=t.srcEvent.deltaY,t.deltaX=this.deltaX,t.deltaY=this.deltaY,this.handler.fire("pan",t)) +},onpanmove:function(t){this.handler.stage===i.STAGES.NORMAL&&(this._scroll(t),this.deltaX+=t.srcEvent.deltaX,this.deltaY+=t.srcEvent.deltaY,t.deltaX=this.deltaX,t.deltaY=this.deltaY,this.handler.fire("pan",t))},onpanend:function(t){this.handler.stage===i.STAGES.NORMAL&&(t.deltaX=this.deltaX,t.deltaY=this.deltaY,this.handler.fire("pan",t))},_scroll:function(t){var e=(t.srcEvent||t,this.vanchart.getScrollBounds());e.shouldParentHandle&&"middle"!==e.handleH||"middle"!==e.handleV||t.stop&&t.stop()}}) +}),define("chart/Point",["require","../utils/BaseUtils","../utils/ColorUtils","../Constants","../ComponentLibrary","../dom/Evented"],function(t){var e=t("../utils/BaseUtils"),i=t("../utils/ColorUtils"),n=t("../Constants"),r=t("../ComponentLibrary"),a=t("../dom/Evented"),o="rgb(138, 138, 138)",s=a.extend({vanChartType:"point",initialize:function(t,e){this.series=e,this.refresh(t||{})},refresh:function(t){var i=this.series,a=i.vanchart;this.originalColor=t.color,this.originalMarkerFillColor=t.marker&&t.marker.fillColor,t=this.options=e.createOptions(t,[i.options]); +var o=i.isSeriesAccumulated(),s=i.type===n.BAR_CHART?t.y:t.x,h=i.name;if(this.category=o?h:s,this.seriesName=o?s:h,this.value=this.getTargetValue(),this.originalValue=this.options[this.series.getTargetKey()],this.name=e.pick(this.options.x,this.options.name),this.categoryArray=e.isArray(t.categoryArray)?t.categoryArray.map(function(t){return t}):[this.category],this.categoryArrayStr=e.encodeCategoryArray(this.categoryArray),i.type===n.LINE_MAP&&(this.from={name:t.from.name},this.to={name:t.to.name}),this.x=t.x,this.y=t.y,this.size=t.size,this.visible=!0,this.isNull=i.isNullValue(this),this.points=o?i.points:a.registerPointsPara(this),t.drilldown&&t.drilldown.geo){var l=r.get(r.GEO_COMPONENT); +this.geo=new l(t.drilldown.geo,r.GEO_COMPONENT,a)}e.calculateFontSizeWithScale(t.dataLabels&&t.dataLabels.style),e.calculateFontSizeWithScale(t.tooltip&&t.tooltip.style),this.jsonHyperlink=t.jsonHyperlink,this.drillUpLink=t.drillUpLink,this.hyperlink=t.hyperlink},refreshPointColor:function(){var t=this,a=t.options,s=t.series,h=s.vanchart;if(!s.isTreeSeries()){var l,u=a.opacity,c=a.opacity;l=s.type===n.STRUCTURE_CHART?this.level:s.isSeriesAccumulated()?e.pick(a.x,a.name,s.options.name):s.name;var d=h.getDefaultSeriesColor(l),f=d; +if(a.marker&&(a.marker=e.clone(a.marker),f=a.marker.fillColor||f),s.type!==n.LINE_MAP||!s.options.large){var p=h.getComponent(r.RANGE_LEGEND_COMPONENT);if(p){var g=h.isMap(),m=h.series[0],v=m?m.points:[],_=0===s.index||!firstSeriesHasValidAreaName(v,t.name);d=p.getColorWithSize(this.getTargetValue(),s.options.large),f=d,this.visible=g&&!_?this.visible:!!d}}f=s.originalColor||f,f=s.originalMarkerFillColor||f,d=this.originalColor||s.originalColor||d,f=this.originalColor||f,f=this.originalMarkerFillColor||f,s.type!==n.BUBBLE_CHART&&s.type!==n.FORCE_BUBBLE_CHART||p||(t.getTargetValue()<0&&t.options.displayNegative?d=a.color||o:t.getTargetValue()<0&&(d=null)); +var y;d&&(y=i.getStandardColorAndOpacity(d,u),d=y.hex,u=y.alpha),f&&(y=i.getStandardColorAndOpacity(f,c),f=y.hex,c=y.alpha);var x=a.marker;x&&(x.fillColor=f,x.fillColorOpacity=c,x.radius=isNaN(x.radius)?4.5:x.radius,x.symbol=x.symbol||s.marker&&s.marker.symbol||""),d&&(this.color=d,this.opacity=u,this.mouseOverColor=this.options.mouseOverColor||i.getHighLightColor(d),this.clickColor=i.getClickColor(d),this.clickOpacity=0.95*u),this.borderColor=this.options.borderColor,this.borderOpacity=this.options.borderOpacity +}},getTargetValue:function(){var t=this.options[this.series.getTargetKey()],e=this.series.vanchart,i=e.getComponent(r.GEO_COMPONENT),n=e.getComponent(r.LEGEND_COMPONENT);return i&&n?t:isNaN(+t)||""==t?this.series.isNullValue(this)?0:t:+t},getLatLng:function(t){var e=this.options.lnglat;if(!e){var i=this.series.vanchart.getCurrentGeo();t||(t=i.getFeaturesByName(this.name,this.series.type),t=t&&t[0]),t&&(e=i.getDataPointLngLat(this,t))}return e?[e[1],e[0]]:null},getStackPointPreSufPoint:function(t){for(var e,i,n=t.series,r=[n.type,n.stack,t.category].join("-"),a=!1,o=0,s=t.points.length; +s>o;o++){var h=t.points[o],l=h.series,u=[l.type,l.stack,h.category].join("-");if(h==t){a=!0}else{if(u==r&&h.isVisible()){if(a){i=h;break}e=h}}}return{pre:e,suf:i}},_mapPointOnMouseState:function(t,e,i,n){var r=this,a=r.series,o=a.vanchart;o.isMapPointVisible(r)&&r.layers&&r.layers&&r.layers.forEach(function(r){r._onMouseState(t,e,i,n)})},getCategory:function(){var t=this.series,e=t.isMultiCategoryAxisBased();return e?this.categoryArrayStr:this.category}});return s.include({isPointSupportTooltipShared:function(){var t=this,e=t.options,i=e.tooltip,n=this.series,r=n.vanchart,a=r.getSharedAxis(); +return i&&i.shared&&t.points&&a&&n.supportTooltipShared()},_onPointMouseOver:function(t){var e=this,i=(e.options,this.series),n=i.vanchart,r=n.hoverPoint,a=n.hoverSeries,o=n.hoverPoints,s=n.getSharedAxis();if(r!==e){var h=this.isPointSupportTooltipShared(),l=o&&o.length&&e.getCategory()==o[0].getCategory();if(!(h&&l&&i.defaultMarker)){if(i.isTreeSeries()){return i.fire("pointMouseOver",e),void i.vanchart.showTooltip(e,t)}if(r&&r.fire("mouseout",t),h){var u=n.getValidPointsPara(e.getCategory());o&&o.length&&o[0]!=u[0]&&(o[0]._onPointMouseOut.call(o[0],t),o[0].series.defaultMarker&&o[0].points.forEach(function(t){t.series.fire("pointMouseOut",t) +})),u.reduce(function(t,e){return e.series._onPointMouseOver.call(e,e),t?e.getTargetValue()>t.getTargetValue()?e:t:e},0),s&&u.length&&s.drawHighlightBackground(u),i.vanchart.showSharedTooltip(e,t),n.hoverPoints=u}else{n.handler._removeHighlight(t),i.vanchart.showTooltip(e,t),i.fire("pointMouseOver",e),a!=e.series&&(a&&a.fire("seriesUnChosen",t),e.series.fire("mouseover",t)),n.hoverSeries=e.series,n.hoverPoint=e}}}},_onPointMouseMove:function(t){var e=this,i=e.options,n=this.series,r=n.vanchart,a=r.getSharedAxis(),o=i.tooltip&&i.tooltip.shared&&e.points&&a&&e.series.supportTooltipShared(); +o?r.showSharedTooltip(r.hoverPoints&&r.hoverPoints[0],t):r.showTooltip(r.hoverPoint,t)},_onPointMouseOut:function(t){var i=this,n=i.options.tooltip,r=this.series,a=r.vanchart,o=a.getSharedAxis();return r.isTreeSeries()?void r.fire("pointMouseOut",i):(n&&n.shared&&i.points&&i.points.length&&o?i.points.forEach(function(i){var n=t&&!e.containsPoint(a.bounds,t.containerPoint)||a.isMobile(),r=i.graphic||i.series.defaultMarker&&n;r&&i.series.fire("pointMouseOut",i)}):i.series.fire("pointMouseOut",i),void r.vanchart.hideTooltip()) +},_onPointTap:function(t){var e=this,i=this.series,n=i.vanchart,r=n.hoverPoint,a=n.isMap()?n.isMapPointVisible(e):e.isVisible();if(a){n.isMobileFlow&&t.stop&&t.stop(),!n.isMobileFlow()&&i.isTreeSeries()&&i.allowDrillDown(e)&&i.onPointTap(e);var o=t.srcEvent,s=o.touches&&(o.touches.length?o.touches[0]:o.changedTouches[0]);s&&(o.clientX=s.clientX,o.clientY=s.clientY),n.isMobile()&&(e.fire("mouseover",t),e===r&&e.fire("mousemove",t)),e.onClick(o),n.allowDrillDown&&n.allowDrillDown(e)&&(n.isMobileFlow()?n.vancharts.holdDrillDownPoint(e):n.drillDown(e)) +}},hasValidDataLabel:function(){var t=this,e=t.labelPos&&!isNaN(t.labelPos.x)&&!isNaN(t.labelPos.y)&&t.options.dataLabels&&t.options.dataLabels.enabled;return t.series.visible&&!t.isNull&&t.visible&&e},clearPointEffect:function(){var t=this;e.clearInterval(t.effectInterval),t.effectGraphic&&t.effectGraphic.remove(),t.effectGraphic=null,t.effectInterval=null,t.series&&t.series.type===n.TREEMAP_CHART&&t.graphic&&t.graphic.interrupt(n.SCALE_EXPAND_ANIMATION)&&t.graphic.interrupt(n.SCALE_MINIFY_ANIMATION),t.children&&t.children.forEach(function(t){t.clearPointEffect() +})},isVisible:function(){var t=this;return t&&t.visible&&t.series.visible&&!t.isNull},getEffectTime:function(){var t=this;return e.isSupportSVG()&&t.isVisible()&&t.options.effect&&t.options.effect.enabled?t.series._getEffectTime(t):0},hasEffect:function(){return this.getEffectTime()>0},autoLabelColor:function(t){var e=this,i=e.options,r=e.series;t=t||i.dataLabels;var a=t.align,o=a===n.TOP||a===n.BOTTOM||a===n.OUTSIDE;return r.type===n.BUBBLE_CHART||r.type===n.TREEMAP_CHART||r.type===n.FORCE_BUBBLE_CHART||r.columnType?o=!1:(r.type===n.SCATTER_CHART||r.type===n.POINT_MAP)&&(o=!0),o?i.marker&&i.marker.fillColor||e.color:"#ffffff" +},_onPointPress:function(t){var e=this,i=this.series,n=i.vanchart,r=n.hoverPoint;r&&i.onPointPress.call(e,t)},_onPointPressUp:function(t){var e=this,i=this.series,n=i.vanchart,r=n.hoverPoint;r&&(i.onPointPressUp.call(e,t),r._onPointTap(t))},onClick:function(t){var i=this,n=i.series,r=n.vanchart,a=r.vancharts,o=a.doHyperlink;if(o){var s=e.extend({event:t},i);e.getFormatterFunction(o)(s)}var h=i.options,l=h.click||h.onClick;if(l){var u=e.extend({tooltipText:r.__tooltipText,event:t},i);r.allowDrillDown&&r.allowDrillDown(i)&&(u.allowDrillType="down"),e.getFormatterFunction(l).call(u,t); +var c=r.wrapDom,d=r.vancharts.fullScreenFather;if(!d||document.body.contains(c)||r.isMobile()){return}var f=window.FR&&"string"==typeof l&&l.indexOf("doHyperlink")>=0&&window.$(".fr-ui-core-menu").length;if(f){var p=window.$(".fr-ui-core-menu")[0],g=c;for(p.style.color=e.isIE()?"black":"initial";"BODY"!==g.tagName;){g=g.parentNode}g.appendChild(p)}}},getEvents:function(){return{mouseover:this._onPointMouseOver,mouseout:this._onPointMouseOut,mousemove:this._onPointMouseMove,tap:this._onPointTap,press:this._onPointPress,pressup:this._onPointPressUp} +},remove:function(){this.visible=!1,this.graphic&&this.graphic.remove(),this.textGraphic&&this.textGraphic.remove(),this.leadLine&&this.leadLine.remove(),this.moreLabelG&&this.moreLabelG.remove(),this.clearPointEffect(),this.graphic=this.textGraphic=this.moreLabelG=this.leadLine=null},removeTextGraphic:function(){this.textGraphic&&(this.textGraphic.remove(),this.textGraphic=null),this.leadLine&&(this.leadLine.remove(),this.leadLine=null)},clearChild:function(){var t=this;if(t.parent){var i=t.parent.children; +i&&i.splice(e.indexOf(i,t),1)}if(t.children){for(var n=t.children.length;--n>-1;){t.children[n].clearChild()}}t.remove()},getTooltipRect:function(){var t=this.series.vanchart.getComponent(r.TOOLTIP_COMPONENT);return t?t._tooltipRect:void 0}}),s}),define("component/FormattedText",["require","../utils/BaseUtils","../Constants","../ComponentLibrary"],function(t){function e(t,e,i){var n=t.options,r=h.format(n.x,e.XFormat),a=h.format(n.y,e.YFormat),o="-"==n.size?"-":h.format(n.size,e.sizeFormat),s=""; +return(-1!=i.indexOf(g)||-1!=i.indexOf(m))&&(s="(",-1!=i.indexOf(g)?(s+=r,-1!=i.indexOf(m)&&(s=s+","+a),s+=")"):(s+=a,s+=")"),s+=l.BLANK_VALUE_PERCENTAGE),-1!=i.indexOf(_)&&"-"!=o&&(s+=o),s}function i(t,e){var i=t&&(t.nameLabelContent||t.valueLabelContent);if(i&&"funnel"==e.series.type){return n(e,t)}var r=0,a=0;if(t&&t.length){for(var o=0,s=t.length;s>o;o++){var h=t[o].dim;r=Math.max(r,h.width),a+=h.height}a+=(s-1)*I}return{width:r,height:a}}function n(t,e){var i=0,n=0,r=0;if(e.nameLabelContent){var a=e.nameLabelContent.dim; +i+=a.width,n=Math.max(n,a.height)}if(e.valueLabelContent){var a=e.valueLabelContent.dim;i+=a.width,n=Math.max(n,a.height)}if(e.nameLabelContent&&e.valueLabelContent){var o=t.series,s=o.vanchart,h=s.bounds;r=h.width*c,i+=r}return{width:i,height:n,nameValueGap:r}}function r(t,e){if(!t){return""}if("object"==typeof t){var i="",n=t.identifier,r=h.format(h.pick(e.category,""),t.categoryFormat),a=h.format(h.pick(e.seriesName,""),t.seriesFormat);if((-1!=n.indexOf(p)||-1!=n.indexOf(f))&&(i+=-1!=n.indexOf(p)&&-1!=n.indexOf(f)?r+" "+a:-1!=n.indexOf(p)?r:a),!e.isNull&&-1!=n.indexOf(x)||-1!=n.indexOf(T)){h.isEmpty(i)||(i+=":"); +var o=h.format(e[e.series.getTargetKey()],t.valueFormat),s=h.format(e.percentage,t.percentFormat);i+=-1!=n.indexOf(x)&&-1!=n.indexOf(T)?o+" "+s:-1!=n.indexOf(x)?o:s}return i}return h.getFormatterFunction(t).call(e)}function a(t,e){if(!t){return[]}if("object"==typeof t){var i=[],n=t.identifier,r=h.format(e.category,t.categoryFormat),a=h.format(e.seriesName,t.seriesFormat),o=h.format(e.originalValue,t.valueFormat),s=h.format(e.percentage,t.percentFormat);return -1!=n.indexOf(p)&&i.push(r),-1!=n.indexOf(f)&&i.push(a),-1!=n.indexOf(x)&&i.push(o),-1!=n.indexOf(T)&&i.push(s),i +}return[h.getFormatterFunction(t).call(e)]}function o(){function t(t,e){return e=e||t&&t.options&&t.options.dataLabels,e&&e.enabled&&e.formatter&&t.isVisible()}function n(e,n){if(!t(e,n)){return e.labelDim={width:0,height:0},void (e.labelContent=[])}n=n||e.options.dataLabels;var r=n.formatter;e.labelContent="object"==typeof r?s(e,n):a(e,n),e.labelDim=i(e.labelContent,e)}function r(t,e){return e=e||t.options.dataLabels,e.style||h.calculateFontSizeWithScale({fontSize:"0.75rem",fontFamily:"Verdana",textShadow:"1px 1px 1px rgba(0,0,0,0.15)",color:t.autoLabelColor(e)}) +}function a(t,e){e=e||t.options.dataLabels;var i=e.formatter,n="";try{n=h.getFormatterFunction(i).call(t)}catch(a){}var o=e.style||r(t),s=h.getTextDimension(n,o,e.useHtml);return e.useHtml&&(s.width=isNaN(parseFloat(e.labelWidth))?s.width:parseFloat(e.labelWidth),s.height=isNaN(parseFloat(e.labelHeight))?s.height:parseFloat(e.labelHeight)),[{text:n,style:o,dim:s}]}function o(t,e){return e=e||t.options.dataLabels,e.style||h.calculateFontSizeWithScale({color:t.autoLabelColor(e),fontSize:"0.75rem",fontFamily:"Verdana",textShadow:"1px 1px 1px rgba(0,0,0, 0.15)",fontWeight:"bold"}) +}function s(t,e){var i=t.series,n=i.type;return i.vanchart.isMap()?A(t,e):n==l.BUBBLE_CHART||n==l.SCATTER_CHART?u(t):n==l.FUNNEL_CHART?c(t):d(t,e)}function u(t){var i=t.options.dataLabels,n=i.formatter,a=n.identifier,s=[];if(-1!=a.indexOf(y)){var l=i.style||o(t),u=h.getTextDimension(t.options.description,l,i.useHtml);s.push({text:t.options.description,style:l,dim:u})}if(-1!=a.indexOf(f)){var c=h.format(t.seriesName,n.seriesFormat),d=i.style||o(t),p=h.getTextDimension(c,d,i.useHtml);s.push({text:c,style:d,dim:p}) +}if(-1!=a.indexOf(g)||-1!=a.indexOf(m)||-1!=a.indexOf(_)){var v=e(t,n,a),x=i.style||r(t),T=h.getTextDimension(v,x,i.useHtml);s.push({text:v,style:x,dim:T})}return s}function c(t){var e=t.options.dataLabels,i=e.formatter,n=i.identifier;if(e.align==l.INSIDE){return d(t)}var a=t.series,s=[];if(-1!=n.indexOf(v)){var u=h.format(t.name,i.nameFormat),c=o(t),f=h.getTextDimension(u,c,e.useHtml);s.nameLabelContent={text:u,style:c,dim:f},a.maxNameLabelWidth||(a.maxNameLabelWidth=0),a.maxNameLabelWidth=Math.max(a.maxNameLabelWidth,f.width) +}if(-1!=n.indexOf(x)||-1!=n.indexOf(T)||-1!=n.indexOf(b)){var p=[];-1!=n.indexOf(x)&&p.push(h.format(t.originalValue,i.valueFormat)),-1!=n.indexOf(T)&&p.push(h.format(t.percentage,i.percentFormat)),-1!=n.indexOf(b)&&p.push(h.format(t.arrivalRate,i.arrivalRateFormat));var g=p.join(l.BLANK_VALUE_PERCENTAGE),m=r(t),_=h.getTextDimension(g,m,e.useHtml);s.valueLabelContent={text:g,style:m,dim:_},a.maxValueLabelWidth||(a.maxValueLabelWidth=0),a.maxValueLabelWidth=Math.max(a.maxValueLabelWidth,_.width)}return s +}function d(t,e){function i(t){return t.map(n).filter(a)}function n(e){if(-1!==d.indexOf(e)){var i=O[e][0],n=O[e][1],r=u._formatValue?u._formatValue(t,i):t[i],a=c[n]||u._getLabelFormatFn&&u._getLabelFormatFn(i),o=h.format(r,a);return u._postLabel?u._postLabel(o,i):o}return null}function a(t){return null!==t}function s(i,n,r){if(n.length){var a=n.join(l.BLANK_VALUE_PERCENTAGE),o=r(t,e),s=h.getTextDimension(a,o,e.useHtml);i.push({text:a,style:o,dim:s})}}e=e||t.options.dataLabels;var u=t.series,c=e.formatter,d=c.identifier,g=[v,p,f],m=[x,T,b,E],_=o,y=r; +u.type===l.TREEMAP_CHART?(m.unshift(g.shift()),y=_):u.type===l.GANTT_CHART&&(g=[],m=[L,f,M,P,w,S]);var A=[];return s(A,i(g),_),s(A,i(m),y),A}function A(t,e){if(!t||t.isNull||!e||!e.enabled){return{}}var i=e.formatter,n=e.useHtml,a=t.series.type,s=(a==l.SCATTER_CHART||a==l.POINT_MAP?l.OUTSIDE:l.INSIDE,[]);if("object"==typeof i){var u=i.identifier;if(-1!=u.indexOf(v)){var c=h.format(t.name,i.nameFormat),d=o(t,e),p=h.getTextDimension(c,d,n);s.push({text:c,style:d,dim:p})}var g="",m=-1!=u.indexOf(f),y=-1!=u.indexOf(x)||-1!=u.indexOf(_),b=-1!=u.indexOf(T),A=h.format(t.seriesName,i.seriesFormat),C=h.format(t.originalValue,i.valueFormat),L=h.format(t.percentage,i.percentFormat); +if(m&&(g+=A,(y||b)&&(g+=":")),y&&(g+=C,b&&(g+=" ")),b&&(g+=L),g){var d=r(t,e),p=h.getTextDimension(g,d,n);s.push({text:g,style:d,dim:p})}}return s}return n}function s(){function t(t){var e=t.options.tooltip;return e&&e.enabled&&t.isVisible()}function i(e){var i=e.options.tooltip;return t(e)&&i.shared}function n(e){var i=e.series,n=i.type,a=e.options.tooltip,o=a.formatter,u=i.vanchart.isMobileFlow();if(!u&&!t(e)&&!a.shared){return""}if("object"!=typeof o&&u){a.formatter=i.getDefaultTooltipFormatter() +}else{if("object"!=typeof o){try{return h.getFormatterFunction(o).call(e)}catch(d){return""}}}var f;switch(n){case l.BUBBLE_CHART:case l.SCATTER_CHART:f=i.vanchart.isMap()?y:r;break;case l.TREEMAP_CHART:f=s;break;case l.GANTT_CHART:f=c;break;case l.LINE_MAP:f=N;break;default:f=y}return f(e,a)}function r(t,e){var i=(t.series,e.formatter),n=e.style,r=i.identifier,s="";return s+=a(t,r,n,i),s+=o(t,r,n,i)}function a(t,e,i,n){var r="";if(-1!=e.indexOf(f)){var a=h.format(t.seriesName,n.seriesFormat);a=I(a),r+=(i?"":k)+a+"",r+="
" +}return r}function o(t,i,n,r){var a="";if(-1!=i.indexOf(g)||-1!=i.indexOf(m)||-1!=i.indexOf(_)){var o=e(t,r,i);a+=(n?"":D)+o+""}return a}function s(t,e){var i=e.style,n=e.formatter,r=n.identifier,a="";if(e.shared){if(-1!=r.indexOf(v)){for(var o,s=t,h=[t.name];(o=s.parent)&&o.depth;){s=o,h.unshift(o.name)}a+=(i?"":R)+h.join(" / ")+"
"}a+=B(t,r,i,n)}else{a+=b(t,r,i,n),a+=B(t,r,i,n)}return a}function c(t,e){function i(e){if(-1!==a.indexOf(e)){var i=O[e][0],n=O[e][1],s=o._formatValue?o._formatValue(t,i):t[i],l=r[n]||o._getTooltipFormatFn&&o._getTooltipFormatFn(i),u=h.format(s,l); +return o._postTooltip?o._postTooltip(u,i):u}return null}var n=e.style,r=e.formatter,a=r.identifier,o=t.series,s=[L,f,M,P,w,S],l="";return s.map(function(t){var e=i(t);null!=e&&(l+=(n?"":k)+e+"
")}),l}function y(t,e){var n=t.series,r=n.vanchart,a=t.points,o=e.formatter,s=o.identifier,h=e.style,l="";if(e.shared&&a&&a.length){var c=r.isMap(),f=r.getComponent(u.RANGE_LEGEND_COMPONENT);l+=b(t,s,h,o),a.filter(i).forEach(function(t){var e=c&&f?a[0].color:t.color,i=t.options.tooltip;l+='',l+=B(t,s,h,i.formatter),l+="
" +})}else{l+=b(t,s,h,o),l+=B(t,s,h,o)}return l}function b(t,e,i,n){var r="",a=t.series.type;return a===l.MULTIPIE_CHART?-1!=e.indexOf(f)&&(r=h.format(t.seriesName,n.seriesFormat)):(-1!=e.indexOf(p)&&(r=h.format(t.category,n.categoryFormat)),-1!=e.indexOf(v)&&a!==l.WORD_CLOUD_CHART&&(r=h.format(t.name,n.nameFormat))),r&&(r=I(r),r=(i?"":R)+r+"",r+="
"),r}function I(t){return t?(t+"").replace(//g,">"):t}function B(t,e,i,n){var r="",a=t.series.type,o=t.isNull?"":t.originalValue,s=t.isNull?"":t.percentage; +a===l.STRUCTURE_CHART&&"-"===o&&(o="");var u,c=h.format(o,n.valueFormat),d=h.format(s,n.percentFormat),p=h.format(t.level,n.levelFormat),g={};g[_]=c,g[x]=c,g[T]=d,g[E]=p,a===l.MULTIPIE_CHART||a===l.WORD_CLOUD_CHART?-1!=e.indexOf(v)&&(u=h.format(t.name,n.nameFormat)):-1!=e.indexOf(f)&&(u=h.format(t.seriesName,n.seriesFormat));var m=[x,T,E];(a==l.BUBBLE_CHART||a==l.SCATTER_CHART)&&(m=[_,T,E]);var y=m.filter(function(t){return -1!==e.indexOf(t)&&!h.isEmpty(g[t])}).map(function(t){return g[t]}).join(" "); +return u&&y&&(u+=":"),u=I(u),u&&(r+=(i?"":k)+u+""),y&&(r+=(i?"":D)+y+""),r}function N(t,e){if(e&&e.enabled){var i=e.formatter,n="";if("object"==typeof i){var r=e.style,a=i.identifier;n+=G(t,a,r,i),n+=F(t,a,r,i)}else{n=h.getFormatterFunction(i).call(t)}return n}}function G(t,e,i,n){var r="";if(-1!=e.indexOf(f)){var a=h.format(t.seriesName,n.seriesFormat);r+=(i?"":k)+a+"",r+="
"}return r}function F(t,e,i,n){var r="",a=function(t){return -1!==e.indexOf(t) +},o=[],s=t.options;a(A)&&s.from.name&&o.push(s.from.name),a(C)&&s.to.name&&o.push(s.to.name),o.length&&(r+=(i?"":k)+o.join("\u2192")+" ");var l=[];if(a(x)){var u=h.format(t[t.series.getTargetKey()],n.valueFormat);u&&l.push(u)}if(a(T)){var c=h.format(t.percentage,n.percentFormat);c&&l.push(c)}return l.length&&(r+=(i?"":D)+l.join("  ")+""),r}return n}var h=t("../utils/BaseUtils"),l=t("../Constants"),u=t("../ComponentLibrary"),c=0.02,d=h.isSupportSVG(),f="{SERIES}",p="{CATEGORY}",g="{X}",m="{Y}",v="{NAME}",_="{SIZE}",y="{DESCRIPTION}",x="{VALUE}",T="{PERCENT}",b="{ARRIVALRATE}",A="{FROM.NAME}",C="{TO.NAME}",L="{PROCESSES}",M="{STARTTIME}",P="{FINISHTIME}",w="{DURATION}",S="{PROGRESS}",E="{LEVEL}",O={}; +["name","category","processes","startTime","finishTime","duration","progress","level","arrivalRate"].map(function(t){var e="{"+t.toUpperCase()+"}";O[e]=[t,t+"Format"]}),O[x]=["originalValue","valueFormat"],O[f]=["seriesName","seriesFormat"],O[T]=["percentage","percentFormat"];var R='',k='',D='',I=2; +return{calculateSingleLineLabelContent:r,createMultiLineLabelContent:a,calculateTextDim:i,dataLabelGenerator:o(),tooltipGenerator:s()}}),define("chart/Series",["require","../utils/BaseUtils","../utils/QueryUtils","../utils/ColorUtils","../Constants","./Point","../dom/Evented","../utils/BezierEasing","../utils/PathGenerator","../ComponentLibrary","../vector/CanvasRenderer","../component/FormattedText"],function(t){var e=t("../utils/BaseUtils"),i=t("../utils/QueryUtils"),n=t("../utils/ColorUtils"),r=t("../Constants"),a=t("./Point"),o=t("../dom/Evented"),s=t("../utils/BezierEasing"),h=t("../utils/PathGenerator"),l=t("../ComponentLibrary"),u=t("../vector/CanvasRenderer"),c=t("../component/FormattedText"),d=600,f="quad-out",p=o.extend({vanChartType:"series",initialize:function(t,e,i){this.vanchart=e,this.points=[],this.refresh(t,i) +},refresh:function(t,a){var o=this.vanchart,s=t.type||o.options.chartType,h=o.options.plotOptions,l=[t,h[s],h];this.minSize=i.queryList(l,"minSize"),this.maxSize=i.queryList(l,"maxSize"),this.originalColor=t.color,this.originalMarkerFillColor=t.marker&&t.marker.fillColor,this.interpolate=this._getSeriesInterpolate(l),t=this.options=e.createOptions(t,[h[s],h]),this.type=s,this.stack=t.stack,this.index=a,this.className="vancharts-series-"+a,this.name=e.pick(t.name,r.BLANK_VALUE_PERCENTAGE),this.visible=e.pick(t.visible,!0),this.state=this.visible?r.STATE_SHOW:r.STATE_DROPPED; +var u;if(!this.isSeriesAccumulated()&&this.type!==r.STRUCTURE_CHART){var c=this.options.color||o.getDefaultSeriesColor(this.name),d=t.opacity;u=n.getStandardColorAndOpacity(c,d),c=u.hex,d=u.alpha;var f=this.options.fillColor;f=f===!0?c:f;var p=+t.fillColorOpacity;p=isNaN(p)?this._getDefaultFillColorOpacity():p,u=n.getStandardColorAndOpacity(f,p),f=u.hex,p=u.alpha;var g=t.marker=e.clone(t.marker);if(e.hasDefined(g)){var m=this._getMarkerColorAlpha();g.fillColor=m.markerColor,g.fillColorOpacity=m.markerOpacity,this.type===r.SCATTER_CHART&&e.isNullMarker(g)&&(t.marker.symbol=e.getDefaultMarkerSymbol(a)) +}this.color=c,this.opacity=d,this.fillColor=f,this.fillColorOpacity=p,this.marker=g}if(e.hasDefined(this.options.startAngle)){var v=this.options.startAngle,_=this.options.endAngle;v>_&&(v-=360),v===_&&(_=v+360),this.startAngle=e.toRadian(v),this.endAngle=e.toRadian(_)}this._bindAxis();var y=this._loadData?this._loadData(t.data):t.data||[];return this.isTreeSeries()||this._dealData(y),this},_dealData:function(t){var e=[],i=this,n={},r=this.vanchart,o=this.type;this.points.forEach(function(t){var e=i._getPointKey(t); +n[e]=n[e]||[],n[e].push(t)});var s,h,l,u;for(s=0,h=t.length;h>s;s++){l=i._getPointKey(t[s]),u=n[l];var c=null;if(u){for(var d=0,f=u.length;f>d;d++){if(c=u[d]){u[d]=null;break}}c&&(c._lastValue=c.options[i.getTargetKey()],c._lastPercent=c.percentage,c._lastArrivalRate=c.arrivalRate,c.childSeries=null,c.geo=null,c.refresh(t[s]))}c||(c=new a(t[s],this)),e.push(c)}for(l in n){n[l]&&n[l].forEach(function(t){r.removePointGraphics(t,o)})}this.options.sort&&(e=e.sort(function(t,e){return Math.abs(e.getTargetValue())-Math.abs(t.getTargetValue()) +}));var p=this.points=e;if(this.isSeriesAccumulated()){for(s=-1,h=p.length;++sa?s>n:n>s;s+=a){var h={x:i.x,y:s};if(!r.isOverlapped(e.makeBounds(h,o))){return h}}}function s(t,n,a,o){for(var s=t;0>a?s>n:n>s;s+=a){var h={x:s,y:i.y};if(!r.isOverlapped(e.makeBounds(h,o))){return h +}}}var h,l=3,u=t.labelDim,c=this.vanchart.bounds;if(n){var d,f;e.hasDefined(a)?a?(d=Math.max(0,i.y),f=c.height-u.height,h=o(d,f,l,u)):(f=0,d=Math.min(i.y,c.height-u.height),h=o(d,f,-l,u)):(d=Math.max(0,i.y),f=c.height-u.height,h=o(d,f,l,u),h||(f=0,d=Math.min(i.y,c.height-u.height),h=o(d,f,-l,u)))}else{var p,g;e.hasDefined(a)?a?(p=Math.max(0,i.x),g=c.width-u.width,h=s(p,g,l,u)):(g=0,p=Math.min(i.x,c.width-u.width),h=s(p,g,-l,u)):(p=Math.max(0,i.x),g=c.width-u.width,h=s(p,g,l,u),h||(g=0,p=Math.min(i.x,c.width-u.width),h=s(p,g,-l,u))) +}return h?h:i},_getArcPoint:function(t,e){return[this._dealWithFloat(t*Math.sin(e)),this._dealWithFloat(-t*Math.cos(e))]},_getNormalTrendLineXYValues:function(t){var e=[],i=[],n=this.vanchart.isInverted()?"posY":"posX",a=this.vanchart.isInverted()?r.LEFT:r.BOTTOM;return t.points.sort(function(t,e){return t[n]-e[n]}),t.points.forEach(function(t){t.isNull||(e.push(t.posX),i.push(t.posY))}),[e,i,a]},_getSeriesInterpolate:function(t){var e=i.queryList(t,"step"),n=i.queryList(t,"curve"),r=t[0],a="linear"; +return r.step||e&&!r.curve?a="step-after":(r.curve||n&&!r.step)&&(a="cardinal"),a},_getAngle:function(t,e){return e=e||{x:0,y:0},Math.atan2(t.y-e.y,t.x-e.x)/(Math.PI/180)},_getBackgroundColor:function(){var t=this.vanchart.options,e="string"==typeof t.plotBackgroundColor,i="string"==typeof t.backgroundColor,r=e?t.plotBackgroundColor:i?t.backgroundColor:"white";return n.colorToHex(r)},getSeryTotalValue:function(){var t=0;return this.points.forEach(function(e){t+=e.getTargetValue()}),t},getLegendKey:function(t){return this.isSeriesAccumulated()?t.name:this.name +},calculateLabelInfo:function(t){c.dataLabelGenerator(t)},_getPercentValue:function(t,e){return t?(t+="",-1!==t.indexOf("%")&&(t=parseFloat(t)*e/100),parseFloat(t)):0},isSupportLegendHighlight:function(){return !0},isSeriesAccumulated:function(){return !1},isTreeSeries:function(){return !1},addPoint:function(t,e){var i=this._getOriginSerData(),n=this.vanchart;i.push(t),e&&n.update()},removePoint:function(t,e){if(!(0>t)){var i=this,n=this.vanchart,r=this._getOriginSerData(),a=n.series.indexOf(i);r.splice(t,1),i.options.data.splice(t,1),n._removeAllAndHasNoAdd(i.options,a)&&(i.remove(),n.series.splice(a,1),n.options.series.splice(a,1)),e&&n.update() +}},updatePoint:function(t,e,i){if(!(0>t)){var n=this.vanchart,r=this._getOriginSerData();r[t]=e,i&&n.update()}},calculatePointIndex:function(t){var i=this,n=this.vanchart,a=-1,o=0,s=this._getOriginSerData(),h=e.clone,l=function(t){if(t.lnglat){return t}var e=n.getCurrentGeo(),r=e.getFeaturesByName(t.name,i.type),a=e.getDataPointLngLat({options:t,series:i},r&&r[0]),o=h(t);return o.lnglat=a,a&&o},u=i.type===r.LINE_MAP;if(u&&(!l(t.from)||!l(t.to))){return -1}for(var c,d,f=function(t){if(u){var e=h(t); +return e.from=l(t.from),e.to=l(t.to),e.from&&e.to&&e}return t};on?[]:i[n].data}});return p.include({getClosestPoint:function(){return null},getDefaultTooltipFormatter:function(){return{categoryFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}",changedPercentFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '#.##%') : arguments[0]}",changedValueFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}",identifier:"{CATEGORY}{SERIES}{VALUE}",percentFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '#.##%') : arguments[0]}",seriesFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}",valueFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}"} +},getTooltipPos:function(t,e,i){var n;if(t.options.tooltip.follow){var r=i.containerPoint;n=[r.x+10,r.y+10]}else{n=this._getFixedPos(t,e)}if(n){var a=this.vanchart.getChartBounds(),o=a.y,s=a.x,h=a.y+a.height,l=a.x+a.width,u=n[0],c=n[1];return s>u?u+=s-u:u+e.width>l&&(u-=u+e.width-l),o>c?c+=o-c:c+e.height>h&&(c-=c+e.height-h),[u,c]}},getFillFilter:function(t){return t},filterRender:function(){this.useCanvas()?this._canvasRender():this._svgFilterRender()},render:function(){this.useCanvas()?this._canvasRender():this._svgRender() +},useCanvas:e.falseFn,_createGroup:function(t,e){return t.group().addTo(e.clipSeriesGroup)},_svgRender:function(){this.initialAnimationMoving=!this.group;var t=this.vanchart,i=t.renderer;this.group||(this.group=this._createGroup(i,t).attr("transform",e.makeTranslate(this._getTranslate())).attr("class",this.className+" "+this.type),t.isMobile()||this.group.style("cursor",this._pointerStyle())),this.type===r.GAUGE_CHART?this.group.animate({duration:d,ease:f,attr:{transform:e.makeTranslate(this._getTranslate())}}):this.group.attr("transform",e.makeTranslate(this._getTranslate())),this.drawSeries&&this.drawSeries(),this.drawPoints() +},_svgFilterRender:function(){var t=this;t.getDataToDraw().forEach(function(e){e.isVisible()?(e.graphic&&e.graphic.style({display:"inline"}),e.textGraphic||t._createTextGraphic(e),e.effectGraphic||t.drawPointEffect(e)):(e.graphic&&e.graphic.style({display:"none"}),e.textGraphic&&e.textGraphic.remove(),e.textGraphic=null,t.clearPointEffect(e))})},_canvasRender:function(){this._canvas||(this._canvas=new u(this.vanchart.dom,this.vanchart),this._canvas.onAdd()),this._canvas.clearAll(),this._canvas.addSeries(this) +},_pointerStyle:function(){var t=this.points.filter(function(t){return !t.isNull});return t[0]&&(t[0].options.onClick||this.vanchart.options.hyperLink)?"pointer":""},getDataToDraw:function(){return this.points},getTextDataToDraw:function(){return this.getDataToDraw()},updatePointGraphic:function(){},_updateMarkerPointGraphic:function(t){var e=t.graphic,i=t.options.marker;e&&(e.strokePath&&e.strokePath.remove(),e.fillPath&&e.fillPath.remove(),e.markerPath&&e.markerPath.remove(),e.image&&e.image.remove(),e.strokePath=e.fillPath=e.markerPath=e.image=null,this._createMarker(i,e)) +},drawPoints:function(){var t=this,e=t.vanchart,i=this._getPointGraphicGroup();i&&e.registerInteractiveTarget(this,i),this.initialAnimationMoving&&this.initialAnimation&&this.initialAnimation();for(var n=this._calculateAnimationDelay(),r=t.getDataToDraw(),a=0,o=r.length;o>a;a++){t.drawPoint(r[a],n)}},_drawEffectPoints:function(){var t=this;t.getTextDataToDraw().forEach(function(e){t.drawPointEffect(e)})},drawPointEffect:function(t){var i=t.series;i.clearPointEffect(t);var n=t.getEffectTime();n&&(i.effectAnimation(t),t.effectInterval=e.setInterval(function(){i.effectAnimation(t) +},n))},clearPointEffect:function(t){t.clearPointEffect()},effectAnimation:function(){},_drawUpdatePoints:function(t,e){this._updatePointGraphicStyle(t),this.vanchart.isZoomingWithLargeModel()?t.graphic.attr(this.getPointUpdateAnimationAttr(t,e).attr):t.graphic.animate(this.getPointUpdateAnimationAttr(t,e)),this.vanchart.registerInteractiveTarget(t,t.graphic)},_drawEnterPoints:function(t){var e=this,i=e._getPointGraphicGroup(),n=t.graphic=this._createPointGraphic(t);e._updatePointGraphicStyle(t);var r=e.reShowPoint(t),a=r&&e.getPointReShowAttr?e.getPointReShowAttr:e.getPointInitAttr,o=r&&e.getPointReShowStyle?e.getPointReShowStyle:e.getPointInitStyle,s=r&&e.getPointReShowAnimationAttr?e.getPointReShowAnimationAttr:e.getPointInitAnimationAttr; +t.hasEffect()?n.addTo(i):n.addToBack(i),n.attr(a?a.call(e,t):{}).style(o?o.call(e,t):{}).animate(s?s.call(e,t):{}),e.vanchart.registerInteractiveTarget(t,n)},_drawExitPoints:function(t){var e=t.series;e.getPointDropAnimationAttr?t.graphic.animate(e.getPointDropAnimationAttr(t)).remove():t.graphic.remove()},drawPoint:function(t,e){e=e||0;var i=t.isVisible(),n=t.graphic&&t.graphic.isVisible();this.clearPointEffect(t),i===n?t.graphic&&this._drawUpdatePoints(t,e):i&&!n?t.graphic&&!t.graphic.removed()?(t.graphic.style("display","inline"),this._drawUpdatePoints(t,e)):this._drawEnterPoints(t):!i&&n&&this._drawExitPoints(t) +},_getEffectTime:function(t){return e.hasNotDefined(t.options.effect)||isNaN(t.options.effect.period)?t.series.getDefaultEffectTime():t.options.effect.period},_getPointEffectGroup:function(t){var e=t.series,i=e.vanchart.renderer;return t.effectGraphic=t.effectGraphic||i.group().addTo(e._getPointGraphicGroup()).style("pointer-events","none")},_createPointGraphic:function(t){var e=this.getPointGraphicKey(t),i=this.vanchart.renderer;return i[e]()},getStyle:function(t){var e=t.options,i=t.series;return{fill:i.getFillFilter(t.color,t),"fill-opacity":e.image?1:t.opacity,stroke:t.borderColor,"stroke-opacity":t.borderOpacity,"stroke-width":e.borderWidth,filter:"none"} +},_getDynamicStyle:function(t){var e=this.getStyle(t),i=this.vanchart.highlightTarget;if(null!=i&&this.isSupportLegendHighlight()){var n=this.getLegendKey(t),r=n==i||t._rangeItem==i?1:0.3;e["fill-opacity"]=e["stroke-opacity"]=r}return e},_updatePointGraphicStyle:function(t,e){e=e||t.series._getDynamicStyle(t),t.graphic&&t.graphic.style(e)},_createMarker:function(t,i){var n=t.symbol,a=this.vanchart.renderer;if(i=i||a.group(),e.isImageMarker(n)){var o=t.width,s=t.height;i.image=a.image({preserveAspectRatio:"none",x:-o/2,y:-s/2,width:o,height:s}).imageContent(n).addTo(i) +}else{var h=this._isHollowMarker(n),l=this.type===r.LINE_CHART;h&&l?(i.strokePath=a.path().addTo(i),i.fillPath=a.path().addTo(i)):i.markerPath=a.path().addTo(i)}return i},_updateMarker:function(t,i,n){i=i||t.graphic,n=n||t.options.marker;var a=n.fillColorOpacity,o=this.vanchart.highlightTarget;if(e.hasDefined(o)){var s=this.getLegendKey(t);a=s==o||t._rangeItem==o?1:0.3}var l=n.symbol,u=this._getBackgroundColor();if(!e.isImageMarker(l)){var c=this._isHollowMarker(l),d=this.type===r.LINE_CHART;c&&d?(i.strokePath.attr({d:h.getMarkerPath(l,n.radius+2)}).style({fill:n.fillColor,"fill-opacity":a,stroke:u,"stroke-width":2}),i.fillPath.attr({d:h.getMarkerPath(l,n.radius-1)}).style({fill:u})):c?i.markerPath.attr({d:h.getMarkerPath(l,n.radius)}).style({stroke:n.fillColor,"stroke-opacity":a,"stroke-width":2,fill:u}):(i.markerPath.attr({d:h.getMarkerPath(l,n.radius)}),d?i.markerPath.style({fill:n.fillColor,"fill-opacity":a,"stroke-width":2,stroke:u}):i.markerPath.style({fill:n.fillColor,"fill-opacity":a,"stroke-width":0})) +}},_onMarkerPressed:function(t){if(t.graphic){var i=t.options.marker,n=i.symbol,a={fill:t.clickColor,"fill-opacity":t.clickOpacity};if(!e.isImageMarker(n)){var o=this._isHollowMarker(n),s=this.type===r.LINE_CHART;o&&s?t.graphic.strokePath.style(a):t.graphic.markerPath.style(a)}}},_onMarkerState:function(t,i){function n(t,e){t.interrupt(r.SELECT_ANIMATION).transition(r.SELECT_ANIMATION).animate({duration:300,ease:s.custom["ease-out-back"],attr:{d:h.getMarkerPath(o,e)}})}var a=t.options.marker,o=a.symbol,l=5; +if(t.graphic){if(l=2,e.isImageMarker(o)){var u=a.width+(i?4:0),c=a.height+(i?4:0);t.graphic.image.interrupt(r.SELECT_ANIMATION).transition(r.SELECT_ANIMATION).animate({duration:300,ease:s.custom["ease-out-back"],attr:{x:-u/2,y:-c/2,width:u,height:c}})}else{var d=a.radius+(i?2:0),f=this._isHollowMarker(o),p=this.type===r.LINE_CHART;f&&p?(n(t.graphic.strokePath,d+2),n(t.graphic.fillPath,d-1)):n(t.graphic.markerPath,d)}}var g=t.series,m=0,v=0;if(g.type===r.RADAR_CHART){var _=g._getArcPoint(l,t.radian); +m=_[0],v=_[1]}else{v=-l;var y=t.options,x=y.dataLabels,T=x.align;T===r.BOTTOM&&(v=l)}g._labelTransformState(t,m,v,i,300,s.custom["ease-out-back"])},removeDefaultMarker:function(){var t=this;t.defaultMarker&&t.defaultMarker.remove(),t.defaultMarker=null},_onMarkerMouseOver:function(t){var e=t.series;if(e._onMarkerState(t,!0),!t.graphic){var i=this._getDefaultMarker(t);e.defaultMarker=e.defaultMarker||this._createMarker(i).addTo(this.group),e.defaultMarker.attr("transform","translate("+t.posX+","+t.posY+") scale(0.01)"),this._updateMarker(t,e.defaultMarker,i),e.defaultMarker.interrupt(r.SELECT_ANIMATION).transition(r.SELECT_ANIMATION).animate({duration:300,ease:"ease",attr:{transform:"translate("+t.posX+","+t.posY+") scale(1.5)"}}) +}},_onMarkerMouseOut:function(t){var e=t.series;e._onMarkerState(t,!1),!t.graphic&&e.defaultMarker&&(e.defaultMarker.animate({duration:300,ease:"ease",attr:{transform:"translate("+t.posX+","+t.posY+") scale(0.01)"}}).remove(),e.defaultMarker=null)},_getDefaultMarker:function(t){return{symbol:r.CIRCLE,fillColor:t.options.marker.fillColor,fillColorOpacity:t.options.marker.fillColorOpacity,radius:4.5,enabled:!0}},_calculateAnimationDelay:function(){return 0},_isHollowMarker:function(t){return t&&-1!==t.indexOf("hollow") +},_animateEnd:function(){this._showLabels(),this._drawEffectPoints()},_showLabels:function(){var t=this,e=t.vanchart;t._updateDataLabels(),e._needShowMoreLabel()&&t.getTextDataToDraw().forEach(function(e){e.visible&&t.visible&&t._showMoreLabel(e)}),e._removeChangeDataState(t)},_showMoreLabel:function(t,i,n){if(0!==t.depth||this.type!==r.MULTIPIE_CHART){var a=this,o=a.vanchart,s=t.points,h=o.getComponent(l.MORELABEL_COMPONENT);if(!o.isMobileFlow()&&a.type!==r.GANTT_CHART){var u=t._lastValue||0,c=t._lastArrivalRate||0,d=function(t){var e=t.gaugeType; +return e===r.POINTER_SEMI_GAUGE||e===r.POINTER_GAUGE||o.isPointOrAreaOrHeatMap()},f=e.accAdd(+t.options[a.getTargetKey()],-u);if(0===f||isNaN(f)){return void (s&&t===s[s.length-1]&&d(a)&&h.showWithPoint(t,i,n))}t.changedValue=f;var p=f/u;if(t.changedPercent=isFinite(p)?p:0>p?"-\u221e":"\u221e",a.type===r.FUNNEL_CHART&&(t.changedArrivalRate=e.accAdd(t.arrivalRate,c)),d(a)){return h.collectPoint(t),void (t===s[s.length-1]&&h.showWithPoint(t,i,n))}h.collectPoint(t),h.showWithPoint(t,i,n)}}},calcMoreLabelPosition:function(t,e){return{startX:t.x+t.width/2,centerY:t.y-e.height/2,direction:"top"} +},hasChangedPointWithChangeDataState:function(){for(var t=this.points.filter(function(t){return !t.isNull}),e=!1,i=0;ip;p++){var m,v=o[p],_=v.dim,y=v.text,x=v.style;switch(t.options.dataLabels._align){case r.LEFT:m=0;break;case r.RIGHT:m=t.labelDim.width-_.width; +break;case r.CENTER:default:m=(t.labelDim.width-_.width)/2}u.tspans.push(a.vtspan(h).style({width:s.labelWidth+"px",height:s.labelHeight+"px","margin-top":-f+"px","line-height":s.labelHeight+"px","text-align":"center",overflow:"hidden"}).attr("y",c).attr("x",0).attr("dy",0.85*_.height-f).attr("dx",m-d).textContent(y).style(x).addTo(u)),c+=_.height+2}t.textGraphic=l.append(u),t.labelPos.startPos&&(t.leadLine=l.append(this._getLeadLine(t)))}},_labelTrans:function(t){return{x:t.labelPos.x+t.labelDim.width/2,y:t.labelPos.y+t.labelDim.height/2} +},_labelFontSizeState:function(t,e,i,n){if(t.labelPos){var a=t.series._labelTrans(t),o=e?1.1:1;if(t.textGraphic){var s="div"===t.textGraphic.type?{duration:i,ease:n,style:{transform:"translate("+a.x+"px,"+a.y+"px)scale("+o+")"}}:{duration:i,ease:n,attr:{transform:"translate("+a.x+","+a.y+")scale("+o+")"}};t.textGraphic&&t.textGraphic.interrupt(r.SELECT_ANIMATION).transition(r.SELECT_ANIMATION).animate(s)}}},_labelTransformState:function(t,i,n,r,a,o){if(!this.vanchart.onSeriesRendering()&&t.labelPos){var s=t.series._labelTrans(t); +r&&(s={x:s.x+i,y:s.y+n}),t.textGraphic&&t.textGraphic.animate({duration:a,ease:o,attr:{transform:e.makeTranslate(s)},style:{transform:"translate("+s.x+"px,"+s.y+"px)"}})}},_outSideLabelColorState:function(t,e,i,n){var r=t.labelContent,a=r.length;t.textGraphic&&t.textGraphic.tspans&&t.textGraphic.tspans.forEach(function(o,s){if(a>s){var h=r[s].style;o.animate({duration:i,ease:n,style:{color:e?t.mouseOverColor:h.color,fill:e?t.mouseOverColor:h.color}})}})},_getChosenPointLeadLinePath:function(t,e,i){function n(t){return{x:t.x+e,y:t.y+i} +}var r=t.labelPos,a={startPos:n(r.startPos),midPos:n(r.midPos),endPos:n(r.endPos)};return this._getLeadLinePathWithPos(a)},_leadLineState:function(t,e,i,n,a,o){var s=t.series,h=t.labelPos,l=t.options,u=l.dataLabels;if(h&&h.startPos){var c=h,d=u.connectorColor||t.color;n&&(d=t.mouseOverColor),t.leadLine&&t.leadLine.transition(r.SELECT_ANIMATION).animate({duration:a||100,ease:o||"ease",attr:{d:n?this._getChosenPointLeadLinePath(t,e,i):s._getLeadLinePathWithPos(c)},style:{stroke:d}})}},_getLeadLine:function(t){return this.vanchart.renderer.path().attr("d",this._getLeadLinePath(t)).style({fill:"none",stroke:t.options.dataLabels.connectorColor||t.color,"stroke-width":t.options.dataLabels.connectorWidth||0}) +},_getLeadLinePath:function(t){return this._getLeadLinePathWithPos(t.labelPos)},_getLeadLinePathWithPos:function(t){var e=t.startPos,i=t.midPos,n=t.endPos,r=this._dealWithFloat;return"M"+r(e.x)+","+r(e.y)+"L"+r(i.x)+","+r(i.y)+"L"+r(n.x)+","+r(n.y)},_dealWithFloat:function(t){return Math.abs(t)<0.000001?0:t},_getPointGraphicGroup:function(){return this.group},_getPointTextLabelGroup:function(){if(this.textGraphicGroup){this.textGraphicGroup.attr("transform",e.makeTranslate(this._getTranslate()))}else{var t=this.vanchart,i=t.seriesTextRenderGroup,n=t.seriesTextDivGroup; +this.textGraphicGroup=t.renderer.vgroup(),i.append(this.textGraphicGroup.renderG),n.append(this.textGraphicGroup.divG),this.textGraphicGroup.attr("transform",e.makeTranslate(this._getTranslate()))}return this.textGraphicGroup},_getTranslate:function(){return this.vanchart.bounds},getEvents:function(){return{mouseover:this._onSeriesMouseOver,mouseout:this._onSeriesMouseOut,seriesUnChosen:this._seriesUnChosen,pointMouseOver:this._onPointMouseOver,pointMouseOut:this._onPointMouseOut,tap:this._onSeriesTap} +},_onPointMouseOver:function(t){t.graphic&&t.graphic.style("cursor",t.onClick?"pointer":"")},_seriesUnChosen:function(t){this._onSeriesMouseOut&&this._onSeriesMouseOut(t)},_onSeriesMouseOver:function(t){var e=this,i=e.vanchart,n=i.hoverSeries,r=i.hoverPoint;n!=e&&(n&&n.fire("seriesUnChosen",t),i.hoverSeries=e);var a=e.getClosestPoint(t.containerPoint);a&&a!=r&&(r&&r.fire("mouseout",t),i.registerInteractiveTarget(a,a.series.defaultMarker),a.fire("mouseover",t),i.registerInteractiveTarget(a,a.series.defaultMarker)) +},_onSeriesTap:function(t){this.vanchart&&this.vanchart.isMobile()&&this.fire("mouseover",t)},getPressedStyle:function(){return null},onPointPress:function(){var t=this,e=t.series,i=e.getPressedStyle(t);i&&t.graphic&&t.graphic.style(i)},onPointPressUp:function(){var t=this,e=t.series,i=e.getHighLightStyle&&e.getHighLightStyle(t);i&&t.graphic&&t.graphic.style(i)},remove:function(){var t=this,e=t.vanchart;this.points.forEach(function(i){e.removePointGraphics(i,t.type,!1)}),this._canvas&&this._canvas.remove(),this.textGraphicGroup&&this.textGraphicGroup.remove(),this.group&&this.group.remove(),this.textGraphicGroup=this._canvas=this.group=null +},reShowPoint:function(t){var e=t.series,i=e.vanchart,n=i.getComponent(l.LEGEND_COMPONENT);return n&&n.items&&n.reShowPoint(t)},updateDelay:function(t){var e=this,i=e.vanchart,n=i.getComponent(l.LEGEND_COMPONENT);if(n&&n.showSeries(e)){for(var r=i.seriesOfType(e.type),a=0,o=r.length;o>a;a++){if(n.toDropSeries(r[a])){return t||150}}}return 0}}),p.include({toFrontPosition:function(){var t=this.group.node();t&&!this._toFront&&(this._nextSibling=t.nextSibling,this._toFront=!0,e.toFront(t))},resetPosition:function(){var t=this.group.node(); +t&&this._nextSibling&&this._toFront&&(this._toFront=!1,t.parentNode.insertBefore(t,this._nextSibling))},getGroupTrans:function(){return[0,0]},getAbsoluteLabelPos:function(t){var e=t.x,i=t.y,n=this.getGroupTrans();return{x:e+n[0],y:i+n[1]}}}),p}),define("chart/gantt/GanttSeries",["require","../Series","../../utils/BaseUtils","../../Constants","../../utils/BezierEasing","../../locale/localeText","../../ChartLibrary"],function(t){function e(t){return t.format("YYYY-MM-dd")}function i(t){return t.format("YYYY-MM-dd HH:mm") +}function n(t){return 100*t+"%"}function r(t){return t.map(function(t){return t.name}).join(" ")}var a=t("../Series"),o=t("../../utils/BaseUtils"),s=t("../../Constants"),h=t("../../utils/BezierEasing"),l=t("../../locale/localeText"),u=2,c=0.1,d=3,f=1200,p=h.css["ease-out-cubic"],g=150,m=h.css["ease-in-back"],v=250,_=h.custom["ease-out-quint"],y=900,x=h.custom["ease-out-quint"],T=100,b="ease-out-in",A=7,C=function(t,e){for(var i in t){if(t[i]!==e[i]){return !1}}for(var i in e){if(!(i in t)){return !1 +}}return !0},L=o.isSupportSVG(),M=a.extend({doLayout:function(){var t=this,e=t.vanchart,i=e.getTimeAxis(),n=i.scale,r=e.getProcesses(),a=(r.procMap,r.cateMap),s=r.tableDims.rowHeight,h=e.options.plotOptions.newLine,l=this._getSeriesOffsetAndHeight(s,h);this.updateMovePos(),this.getDataToDraw().forEach(function(t){var e=t.options,i=e.borderWidth,r=e.processesId,h=n(+t.startTime),c=n(+t.finishTime),d={};d.x=h,d.y=a[r]*s+l.offset,d.width=c-h,d.height=l.height,d=o.rectSubPixelOpt(d,i),d.rx=d.ry=u,t.rect=d,t.initRect={x:d.x,y:d.y,width:0,height:d.height},t.leftRect={x:d.x,y:d.y,width:d.width*t.progress,height:d.height},t.rightRect={x:d.x+t.leftRect.width,y:d.y,width:d.width*(1-t.progress),height:d.height} +})},updateMovePos:function(){var t=this.vanchart.getTimeAxis(),e=t.getMovePos(),i=!1;return this._pos&&this._pos.x===e.pos.x||(i=!0),this._pos&&C(this._pos,e.pos)||(this._pos=e.pos),this._bounds&&C(this._bounds,e.bounds)||(this._bounds=e.bounds,i=!0),i},_getSeriesOffsetAndHeight:function(t,e){var i=0,n=t*c,r=this._getVisibles(),a=e?r.length:1,o=e?r.indexOf(this.index):0;return i=t*(1-c*(a+1))/a,n+=o*(i+t*c),{height:i,offset:n}},_getVisibles:function(){return this.vanchart.seriesOfType(this.type).filter(function(t){return t.visible +}).map(function(t){return t.index})},getDataToDraw:function(){var t=this.vanchart.getProcesses().procMap,e=this.points.filter(function(e){return t[e.options.processesId]&&!e.isNull});return e},isNullValue:o.falseFn,_getTranslate:function(){return[0,0]},_labelTrans:function(t){return{x:t.labelPos.x+t.labelDim.width/2+this._pos.x,y:t.labelPos.y+t.labelDim.height/2}},_calculateLabelPos:function(){this.getDataToDraw().forEach(function(t){var e=t.options.dataLabels;if(e&&e.enabled){var i=t.rect,n=t.labelDim,r=i.width*t.progress,a={y:i.y+i.height/2-n.height/2}; +e.align===s.RIGHT?a.x=i.x+r-n.width-d:a.x=i.x+r/2-n.width/2,t.labelPos=a}})},getFillFilter:function(t,e){var i,n=this.vanchart.renderer,r={x1:0,y1:0,x2:1,y2:0},a=this.cullRect(e.leftRect),s=this.cullRect(e.rightRect);i=a.width+s.width?a.width/(a.width+s.width):1;var h=[{offset:i,"stop-color":t},{offset:i,"stop-color":t,"stop-opacity":"0.5"}];return e.colorGradient?n.updateColorGradient(e.colorGradient,r,h):e.colorGradient=n.colorGradient(r,h),"url(#"+o.stamp(e.colorGradient)+")"},getPointGraphicKey:function(){return"rect" +},getPointInitAttr:function(t){return this.cullRect(t.initRect)},_calculateAnimationDelay:function(){return this.updateDelay(g)},getPointInitAnimationAttr:function(t){return{ease:p,duration:f,attr:this.cullRect(t.rect)}},getPointReShowAnimationAttr:function(t){return{ease:x,duration:y,attr:this.cullRect(t.rect)}},getPointUpdateAnimationAttr:function(t,e){return{delay:e||0,ease:_,duration:v,attr:this.cullRect(t.rect)}},getPointDropAnimationAttr:function(t){return{ease:m,duration:g,attr:this.cullRect(t.initRect)} +},_onPointMouseOver:function(t){var e=t.series,i=e.getHighLightStyle(t);e._onState(t,i,!0)},_onPointMouseOut:function(t){var e=t.series,i=e.getStyle(t);e._onState(t,i,!1)},_onState:function(t,e,i){var n=t.series;t.graphic.interrupt(s.SELECT_ANIMATION).transition(s.SELECT_ANIMATION).animate({duration:T,ease:b,style:e}),n._labelFontSizeState(t,i,T,h.css.ease)},getHighLightStyle:function(t){return{stroke:t.mouseOverColor,fill:t.series.getFillFilter(t.mouseOverColor,t),"fill-opacity":t.opacity,"stroke-width":6,"stroke-opacity":0===t.opacity?0:0.35} +},getPressedStyle:function(t){return{stroke:t.clickColor,fill:t.series.getFillFilter(t.clickColor,t),"fill-opacity":t.clickOpacity}},_formatFn:function(t){switch(t){case"processes":return r;case"startTime":case"finishTime":return this.vanchart.getTimeAxis().initLeveli;i++){t.movePoint(e[i])}}},movePoint:function(t){if(t.graphic){t.graphic.style({fill:this.getFillFilter(t.color,t)});var e=this.cullRect(t.rect);t.graphic.attr(e)}t.textGraphic&&t.textGraphic.attr("transform",o.makeTranslate(this._labelTrans(t)))},cullRect:function(t){var e=this._pos,i=this._bounds,n=t.x+e.x,r=n+t.width; +0>n&&(n=-u),r>i.width&&(r=i.width+u);var a,o;return n>r?(a=-1,o=0):(a=n,o=r-n),{x:a,y:t.y,width:o,height:t.height,rx:t.rx||0,ry:t.ry||0}}});return M.prototype._getLabelFormatFn=M.prototype._formatFn,M.prototype._getTooltipFormatFn=M.prototype._formatFn,L||(u=0,M.include({getFillFilter:function(t){return t},movePoint:function(t){t.graphic&&this._updateAttr(t),t.textGraphic&&t.textGraphic.attr("transform",o.makeTranslate(this._labelTrans(t)))},_drawUpdatePoints:function(t){this._updatePointGraphicStyle(t),this._updateAttr(t),this.vanchart.registerInteractiveTarget(t,t.graphic) +},_drawEnterPoints:function(t){var e=this,i=e._getPointGraphicGroup(),n=this.vanchart.renderer,r=t.graphic=n.group();r.outerRect=n.rect(),r.leftRect=n.rect(),r.rightRect=n.rect(),this._updateAttr(t);var a=e.getStyle(t);this._updatePointGraphicStyle(t,a),r.append(r.outerRect),r.append(r.leftRect),r.append(r.rightRect),i.append(r),e.vanchart.registerInteractiveTarget(t,r)},_updateAttr:function(t){var e=t.graphic;e.outerRect.attr(this.cullRect(t.rect)),e.leftRect.attr(this.cullRect(t.leftRect)),e.rightRect.attr(this.cullRect(t.rightRect)) +},_drawExitPoints:function(t){t.graphic.remove()},_updatePointGraphicStyle:function(t,e){var i=e||t.series._getDynamicStyle(t);t.graphic.outerRect.style({"stroke-width":(i["stroke-width"]||0)+1,stroke:i.stroke}),i["stroke-width"]=0,t.graphic.leftRect.style(o.clone(i)),i["fill-opacity"]=i["fill-opacity"]||1,i["fill-opacity"]*=0.5,t.graphic.rightRect.style(i)},_onPointMouseOver:function(t){var e=t.series,i=e.getHighLightStyle(t);e._updatePointGraphicStyle(t,i)},_onPointMouseOut:function(t){var e=t.series,i=e.getStyle(t); +e._updatePointGraphicStyle(t,i)}})),t("../../ChartLibrary").register(s.GANTT_CHART,M),M}),define("component/Base",["require","../utils/BaseUtils","../utils/ColorUtils","../Constants","../dom/Evented","../utils/QueryUtils","./LegendIconFactory","../utils/Class","ComponentLibrary"],function(t){var e=t("../utils/BaseUtils"),i=t("../utils/ColorUtils"),n=t("../Constants"),r=t("../dom/Evented"),a=(t("../utils/QueryUtils"),t("./LegendIconFactory"),t("../utils/Class"),t("ComponentLibrary")),o=4.5,s=8,h=function(){return e.paddingConvertWithScale(s) +},l=r.extend({initialize:function(t,e,i){this.componentType=e,this.vanchart=i,this.refresh(t)},refresh:function(t){this.options=t||this.options,t=this.options,e.extend(this,{isFloat:t.floating,_floatX:this._getPercentValue(t.x,this.vanchart.width),_floatY:this._getPercentValue(t.y,this.vanchart.height)}),e.calculateFontSizeWithScale(t.style),this._refresh&&this._refresh(t)},createComponentGroup:function(){return this.vanchart.renderer.group().addTo(this.getComponentParentGroup())},getComponentParentGroup:function(){return this.isFloat?this.vanchart.frontGroup:this.vanchart.backGroup +},useHtmlLabel:function(){return this.options.useHtml||!e.isSupportSVG()},_getLegendType:function(t){var i=t.options.marker,r="";switch(t.type){case n.MULTIPIE_CHART:case n.PIE_CHART:var a=t.options.innerRadius;return a&&parseFloat(a)>0?n.DONUT_ICON:n.PIE_ICON;case n.RADAR_CHART:if(t.options.columnType){return n.NORMAL_ICON}break;case n.FORCE_BUBBLE_CHART:case n.BUBBLE_CHART:return n.BUBBLE_ICON;case n.TREEMAP_CHART:return n.TREEMAP_ICON;case n.LINE_MAP:return n.NULL_MARKER;default:r=n.NORMAL_ICON +}return t.type==n.POINT_MAP&&t.options.icon?t.options.icon.iconUrl:(t.options.image&&e.isSupportSVG()?r=t.options.image:i&&(r=i.symbol?i.symbol:n.NULL_MARKER,t.type!=n.SCATTER_CHART||e.isImageMarker(r)||(r=n.SCATTER_ICON+r)),r)},_getPercentValue:function(t,e){return t?(t+="",-1!=t.indexOf("%")&&(t=parseFloat(t)*e/100),parseFloat(t)):0},_setComponentBounds:function(t,e){this.isFloat||this.options&&this.options.onZero?this._updateFloatBounds(t,e):this._updateComponentBounds(t,e)},isHorizontal:function(){var t=this.getPosition(); +return t==n.TOP||t==n.BOTTOM},isVertical:function(){return !this.isHorizontal()},getPosition:function(){return this.options.position},_updateFloatBounds:function(t,e){e=Math.ceil(e);var i=this.vanchart.bounds,r=this._floatX,a=this._floatY,o=i.x+i.width-r,s=i.y+i.height-a;switch(t){case n.TOP:this.bounds={x:r,y:a,width:o,height:e};break;case n.BOTTOM:this.bounds={x:r,y:a,width:o,height:e};break;case n.LEFT:this.bounds={x:r,y:a,width:e,height:s};break;case n.RIGHT_TOP:case n.RIGHT_BOTTOM:case n.RIGHT:this.bounds={x:r,y:a,width:e,height:s} +}if(this.options.onZero){var h=this.getStandardAxis();h&&Math.abs(h._domain[0])<0.000001?this._clipPlotBounds(t,e):this._clipPlotBoundsWhileFloat(t)}},getStandardAxis:function(){var t=this.componentType===a.X_AXIS_COMPONENT?a.Y_AXIS_COMPONENT:a.X_AXIS_COMPONENT,e=0;if(t=this.vanchart.getComponent(t),this.options.onZero===!0){for(var i=t.getAxisCount();i--;){if(/^standard/.test(t.getAxis(i).alignAxisId)){e=i;break}}}else{e=this.options.onZero}return t.getAxis(e)},_updateComponentBounds:function(t,e){e=Math.ceil(e); +var i=this.vanchart.bounds,r=i.x,a=i.y,o=i.width,s=i.height;switch(t){case n.TOP:this.bounds={x:r,y:a,width:o,height:e};break;case n.BOTTOM:this.bounds={x:r,y:a+s-e,width:o,height:e};break;case n.LEFT:this.bounds={x:r,y:a,width:e,height:s};break;case n.RIGHT_TOP:case n.RIGHT_BOTTOM:case n.RIGHT:this.bounds={x:r+o-e,y:a,width:e,height:s}}this.vanchart.setPlotBounds(i),this._clipPlotBounds(t,e)},_clipPlotBounds:function(t,e){e=Math.ceil(e);var i=this.vanchart.bounds,r=i.x,a=i.y,o=i.width,s=i.height; +switch(t){case n.TOP:i={x:r,y:a+e,width:o,height:s-e};break;case n.BOTTOM:i={x:r,y:a,width:o,height:s-e};break;case n.LEFT:i={x:r+e,y:a,width:o-e,height:s};break;case n.RIGHT_TOP:case n.RIGHT_BOTTOM:case n.RIGHT:i={x:r,y:a,width:o-e,height:s}}this.vanchart.setPlotBounds(i)},_clipPlotBoundsWhileFloat:function(t){var e=this.vanchart.bounds,i=e.x,r=e.y,a=e.width,o=e.height;switch(t){case n.TOP:e={x:i,y:r,width:a,height:o};break;case n.BOTTOM:e={x:i,y:r,width:a,height:o-h()};break;case n.LEFT:e={x:i+h(),y:r,width:a-h(),height:o}; +break;case n.RIGHT_TOP:case n.RIGHT_BOTTOM:case n.RIGHT:e={x:i+h(),y:r,width:a-h(),height:o}}this.vanchart.setPlotBounds(e)},_clipPlotBoundsWhileFloat:function(t){var e=this.vanchart.bounds,i=e.x,r=e.y,a=e.width,o=e.height;switch(t){case n.TOP:e={x:i,y:r,width:a,height:o};break;case n.BOTTOM:e={x:i,y:r,width:a,height:o-h()};break;case n.LEFT:e={x:i+h(),y:r,width:a-h(),height:o};break;case n.RIGHT_TOP:case n.RIGHT_BOTTOM:case n.RIGHT:e={x:i+h(),y:r,width:a-h(),height:o}}this.vanchart.setPlotBounds(e) +},_recordForPlotBounds:function(t,e){e=Math.ceil(e),t===n.RIGHT_TOP&&(t=n.RIGHT),t===n.RIGHT_BOTTOM&&(t=n.RIGHT),this.vanchart.clipPool[t]=Math.max(this.vanchart.clipPool[t]||0,e)},_getBackgroundColor:function(){var t=this.option,e="string"==typeof t.plotBackgroundColor,n="string"==typeof t.backgroundColor,r=e?t.plotBackgroundColor:n?t.backgroundColor:"white";return i.colorToHex(r)},_maxHeight:function(t){var e=this.vanchart.height;return t||this.options.maxHeight?this._getPercentValue(this.options.maxHeight,e):e +},_maxWidth:function(t){var e=this.vanchart.width;return t||this.options.maxWidth?this._getPercentValue(this.options.maxWidth,e):e},_getTickContent:function(t,i){return i?e.format(t,i):t},getDefaultMarkerRadius:function(){return o},getPlotBounds:function(){return this.vanchart.bounds},getChartBounds:function(){return this.vanchart.getChartBounds()},getParentDom:function(){return this.vanchart.getParentDom()},getDivParentDom:function(){return this.vanchart.getDivParentDom()},getTooltipComponent:function(){return this.vanchart.components.tooltip +},remove:function(){},_bindData:e.bindData,invisible:function(){return e.hasDefined(this.options.visible)&&this.options.visible===!1},_innerClip:function(t){var i=this,n=i.bounds,r=i.vanchart,a=r.renderer,o=e.makeBounds(0,0,n.width,n.height);if(this._clip?a.updateClip(this._clip,o):this._clip=a.createClip(o),"vgroup"===t.type){var s=0,h=0,l=h+o.width,u=s+o.height;t.divG.style({clip:"rect("+s+"px "+l+"px "+u+"px "+h+"px)"}),a.clip(t.renderG,this._clip)}else{a.clip(t,this._clip)}}});return l}),define("chart/gantt/defaultValues",["require"],function(t){return{PADDING:"0.25rem",WEEKEND_COLOR:"rgba(169, 195, 200, 0.1)",OUTLINE:{fill:"none",stroke:"rgba(207, 207, 207, 1)","stroke-width":1},TWEENLINE:{fill:"none",stroke:"rgba(207, 207, 207, 0.6)","stroke-width":1},INNERLINE:{fill:"none",stroke:"rgba(207, 207, 207, 0.6)","stroke-width":0.5},MINUS_PATH:{size:[7.5,7.5],graphics:[{fill:"#F2F2F2",d:"M0,12.7c2,0,3.6,1.6,3.6,3.6S2,19.9,0,19.9s-3.6-1.6-3.6-3.6S-2,12.7,0,12.7z"},{fill:"#727171",d:"M0,20c-2.1,0-3.8-1.7-3.8-3.8s1.7-3.7,3.8-3.7s3.8,1.7,3.8,3.8S2.1,20,0,20z M0,12.8c-1.9,0-3.4,1.5-3.4,3.4 s1.5,3.4,3.4,3.4s3.4-1.5,3.4-3.4S1.9,12.8,0,12.8z M2.1,16h-4.3v0.3h4.3V16z"}]},PLUS_PATH:{size:[7.5,7.5],graphics:[{fill:"#F2F2F2",d:"M0,12.7c2,0,3.6,1.6,3.6,3.6S2,19.9,0,19.9s-3.6-1.6-3.6-3.6S-2,12.7,0,12.7z"},{fill:"#727171",d:"M0,20c-2.1,0-3.8-1.7-3.8-3.8s1.7-3.7,3.8-3.7s3.8,1.7,3.8,3.8S2.1,20,0,20z M0,12.8c-1.9,0-3.4,1.5-3.4,3.4 s1.5,3.4,3.4,3.4s3.4-1.5,3.4-3.4S1.9,12.8,0,12.8z M2.1,16H0.2v-1.9h-0.3V16h-2v0.3h2v2h0.3v-2h1.9C2.1,16.3,2.1,16,2.1,16z"}]},THUMB_PATH:{size:[4.6,7.1],graphics:[{fill:"#F2F2F2",d:"M-0.008,13.717h-2.1v4.5l2.2,2.2l0,0l2.1-2.2v-4.5H-0.008"},{fill:"#727171",d:"M-0.008,20.617l-2.3-2.4v-4.7h4.6v4.7L-0.008,20.617z M-2.008,18.117l2,2l2-2v-4.3h-4V18.117z"}]}} +}),define("chart/gantt/levelDomain",["require"],function(t){function e(t){return l[t][0]}function i(t){return l[t][1]}function n(t,e){return u*t*Math.pow(2,e)}var r=1000,a=60*r,o=60*a,s=24*o,h=181*s,l=[["year","halfYear"],["year","halfYear"],["year","quarter"],["halfYear","month"],["quarter","month"],["quarter","month"],["month","week"],["week","day"],["month","date"],["month","date"],["date","meridiem"],["date","qDay"],["date","hour"],["meridiem","hour"],["hour","halfHour"],["hour","tenMinute"],["halfHour","fiveMinute"],["halfHour","fiveMinute"],["halfHour","minute"],["tenMinute","minute"],["minute","halfMinute"],["minute","tenSecond"]],u=3/h; +return{r0:u,LEN:l.length,Ratio:n,upUnit:e,subUnit:i}}),define("chart/gantt/helper",["require"],function(t){function e(t,e,i,n,r,a,o){return o||(o=e.append(t.line().style(i))),o.attr({x1:n,y1:a,x2:r,y2:a})}function i(t,e,i,n,r,a,o){return o||(o=e.append(t.line().style(i))),o.attr({x1:a,y1:n,x2:a,y2:r})}function n(t,e,i,n,r,a,o,s){return s||(s=e.append(t.rect().style(i))),s.attr({x:n,y:r,width:a,height:o})}function r(t,e,i,n){function r(t,a,o,s,h){i&&i(t,a,o,s,h);var l,u=t[e];u&&(l=u.length)&&u.map(function(e,i){r(e,a+1,l,i,t) +}),n&&n(t,a,o,s,h)}r(t,0,0,0,null)}function a(t){return t.reduce(function(t,e){return t+e},0)}function o(t,e){var i=a(t);return t.map(function(t){return t/i*e})}function s(t){return t=+t,isNaN(t)?0:0>t?0:t>1?1:t}return{lineH:e,lineV:i,rect:n,traverse:r,sum:a,distribValues:o,getValidProgress:s}}),define("chart/gantt/LevelBar",["require","../../component/Base","../../Constants","../../utils/BaseUtils","../../ComponentLibrary","./defaultValues","../../dom/EventObject","./levelDomain","./helper"],function(t){var e=t("../../component/Base"),i=t("../../Constants"),n=t("../../utils/BaseUtils"),r=t("../../ComponentLibrary"),a=t("./defaultValues"),o=t("../../dom/EventObject"),s=t("./levelDomain").LEN,h=t("./helper"),l=(h.lineV,h.lineH),u=a.MINUS_PATH,c=a.PLUS_PATH,d=a.THUMB_PATH,f=d.size[0],p=12,g=12,m=64,v=m-f,_=v/(s-1),y=e.extend({doLayout:function(){this._setComponentBounds(i.BOTTOM,p); +var t=this.vanchart.bounds;this.bounds={x:t.x,y:t.y+t.height,height:p,width:t.width}},render:function(){if(!this.group){var t=this.vanchart.renderer;this.group=t.group().add(),this.group.attr("transform",n.makeTranslate(this.bounds)).attr("class","level-bar"),this._bar(t),this._slider(t)}},isEnabled:function(){return this.enabled&&this.vanchart.getTimeAxis().isZoomEnabled()},setLevel:function(t){null!=t&&(this.enabled=!0,this._setThumbLevel(t))},_setThumbLevel:function(t){var e=f/2+_*t;this.thumbG.attr("transform",n.makeTranslate({x:e,y:-17})),this.updateThumbBounds(e) +},updateThumbBounds:function(t){var e=this.bounds,i=d.size[0],n=d.size[1];this.thumbBounds={x:e.x+this._getLineStartX()+t-i/2,y:e.y+(p-n)/2,width:i,height:n}},_bar:function(t){this.group.append(t.rect().attr({x:0,y:0,width:this.bounds.width,height:this.bounds.height}).style({stroke:"none",fill:this._gradient(t)}))},_gradient:function(t){if(!n.isSupportSVG()){return"rgb(220, 220, 220)"}var e={x1:0,y1:0,x2:0,y2:1},i=[{offset:"0%","stop-color":"rgb(220, 220, 220)"},{offset:"75%","stop-color":"rgb(181, 181, 181)"},{offset:"100%","stop-color":"rgb(137, 137, 137)"}],r=t.colorGradient(e,i); +return"url(#"+n.stamp(r)+")"},_slider:function(t){var e=this.group.append(t.group());e.attr("transform",n.makeTranslate({x:this._getLineStartX(),y:p/2})),l(t,e,{fill:"none",stroke:"#727171","stroke-width":0.5},0,m,0),this.minusG=this._getIconGroup(t,u,-u.size[0]/2),this.plusG=this._getIconGroup(t,c,m+c.size[0]/2),this.thumbG=this._getIconGroup(t,d,m/2),["minus","plus","thumb"].map(function(t){var i=this[t+"G"];e.append(i);var n=new o(this.iconEvents(t));n.control=this,this.vanchart.registerInteractiveTarget(n,i) +},this)},_getLineStartX:function(){return this.bounds.width-m-g},eventsMap:{minus:["tap"],plus:["tap"],thumb:["panstart","panmove","panend"]},iconEvents:function(t){var e=this.eventsMap[t],i={};return e.map(function(e){i[e]=this["on"+t+e]},this),i},onminustap:function(t){this.control._changeLevel(-1)},onplustap:function(t){this.control._changeLevel(1)},onthumbpanstart:function(t){},onthumbpanmove:function(t){var e=this.control,i=e.bounds,n=t.containerPoint,r=n.x-i.x-e._getLineStartX()-f/2;r=Math.min(Math.max(0,r),v); +var a=Math.round(r/_);e._changeToLevel(a)},onthumbpanend:function(t){},_changeToLevel:function(t){this.isEnabled()&&(this.vanchart.changeToLevel(t),this._setThumbLevel(this.vanchart.getTimeAxis().getLevel()))},_changeLevel:function(t){var e=this.vanchart.getTimeAxis().getLevel()+t;this._changeToLevel(e)},_getIconGroup:function(t,e,i){var r=t.group();return r.attr("transform",n.makeTranslate({x:i,y:-17})),r.append(t.path().attr(e.graphics[0])),r.append(t.path().attr(e.graphics[1])),r}});return r.register(r.LEVELBAR,y),y +}),define("chart/gantt/Table",["require","../../component/Base"],function(t){var e=t("../../component/Base");return e.extend({_getHeader:function(){return this.options.header},_getBody:function(){return this.options.body}})}),define("chart/gantt/ScrollbarItem",["require","../../dom/Evented","../../utils/BaseUtils","../../utils/QueryUtils"],function(t){var e=t("../../dom/Evented"),i=t("../../utils/BaseUtils"),n=t("../../utils/QueryUtils"),r=(i.isSupportSVG(),12),a="rgba(233, 233, 233, 0.6)",o="rgba(207, 207, 207, 0.6)",s=0.5,h=6,l="rgba(160, 160, 160, 0.6)",u="rgba(88, 88, 88, 0.6)",c=e.extend({initialize:function(t){var e=this.opt=n.merge(t,{backgroundSize:r,backgroundColor:a,backgroundStroke:o,barColor:l,barHoverColor:u,barSize:h}); +e.length=Math.max(0,e.length),e.barLength=Math.max(0,e.barLength);var c=e.backgroundSize,d=e.barSize,f=e.barSize/2;this.pos={x:0,y:0};var p=e.manager.vanchart,g=e.manager.renderer;this.group=e.group.append(g.group()),this.group.style("transition","opacity 0.3s"),this.group.attr("transform",i.makeTranslate([e.x,e.y]));var m,v,_,y,x;"x"===e.dir?(m=this.opt.length,v=c,_=this.opt.barLength,y=d,x="y"):(m=c,v=this.opt.length,_=d,y=this.opt.barLength,x="x"),this.background=this.group.append(g.rect().attr({width:m,height:v}).style({fill:e.backgroundColor,stroke:e.backgroundStroke,"stroke-width":s})); +var T={rx:f,ry:f,width:_,height:y};T[x]=(c-d)/2,this.bar=this.group.append(g.rect().attr(T).style("fill",e.barColor)),p.registerInteractiveTarget(this,this.bar)},show:function(t){t=this._over||t,this.opt.length<=this.opt.barLength&&(t=!1),t!==this._showed&&(this._showed=t,this.group.style("display",t?"":"none"))},remove:function(){this.group.remove()},setPos:function(t,e){(t!==this.opt.x||e!==this.opt.y)&&(this.group.attr("transform",i.makeTranslate([t,e])),this.opt.x=t,this.opt.y=e)},setSize:function(t,e){if(t!==this.opt.length||e!==this.opt.barLength){if((e>t||0>t||0>e)&&(t=e=0),this.opt.length=t,this.opt.barLength=e,0===t){this.show(!1) +}else{var i="x"===this.opt.dir?"width":"height";this.background.attr(i,t),this.bar.attr(i,e)}}},setPct:function(t){this.setBarPos(this._getRemainLength()*t)},getBarPos:function(){return this.pos[this.opt.dir]},setBarPos:function(t){t=Math.max(0,Math.min(t,this._getRemainLength())),this.getBarPos()!==t&&(this.pos[this.opt.dir]=t,this.bar.attr("transform",i.makeTranslate(this.pos)))},_getRemainLength:function(){return this.opt.length-this.opt.barLength},getEvents:function(){return{mouseover:this.onMouseOver,mouseout:this.onMouseOut,panstart:this.onPanStart,panmove:this.onPanMove,panend:this.onPanEnd} +},onMouseOver:function(){this._over=!0,this.bar.style({fill:this.opt.barHoverColor})},onMouseOut:function(){this._over=!1,this.bar.style({fill:this.opt.barColor})},onPanStart:function(t){this.initPos=this.getBarPos(),this.initPointPos=t.containerPoint},onPanMove:function(t){var e=t.containerPoint[this.opt.dir]-this.initPointPos[this.opt.dir];this.opt.manager["on"+this.opt.dir]((this.initPos+e)/this._getRemainLength())},onPanEnd:function(){this.opt.manager.vanchart.handler.panTarget=null}});return c.SIZE=r,c +}),define("chart/gantt/Scrollbar",["require","../../dom/Evented","../../utils/BaseUtils","./ScrollbarItem"],function(t){function e(t){return +t.toFixed(3)}var i=t("../../dom/Evented"),n=t("../../utils/BaseUtils"),r=t("./ScrollbarItem"),a=20;return i.extend({initialize:function(t){this.view=t.view,this.vanchart=t.view.vanchart,this.renderer=t.view.renderer||this.vanchart.renderer,this.group=t.group,this.options=t,this.options.autoHide=t.autoHide!==!1,this.x=this.y=0,this._isScrollX(t)&&(this.barX=this._barBottom()),this._isScrollY(t)&&(this.barY=this._barRight()); +var e=t.onChangeName||"innerChange",i=t.onResizeName||"resize",n=t.onOverName||"mouseover",r=t.onOutName||"mouseout";this.view.on(e,this.setPos,this).on(i,this.setSize,this),t.autoHide&&(this.barX&&this.barX.show(!1),this.barY&&this.barY.show(!1),this.view.on(n,this.onover,this),this.view.on(r,this.onout,this))},onover:function(){this.show(!0)},onout:function(){this.show(!1)},show:function(t){this.barX&&this.barX.show(t),this.barY&&this.barY.show(t)},setPos:function(t){if(this.barX&&null!=t.x){var e=t.x/(this.options.width-this.options.innerWidth); +this.barX.setPct(e)}if(this.barY&&null!=t.y){var i=t.y/(this.options.height-this.options.innerHeight);this.barY.setPct(i)}},setSize:function(t){if(t.scrollX=this.options.scrollX,t.scrollY=this.options.scrollY,this.options.scrollX){var e=this._isScrollX(t);if(e&&!this.barX&&(this.barX=this._barBottom()),!e&&this.barX&&(this.barX.remove(),this.barX=null),e&&this.barX){var i=this._getLengths(t,"width");this.barX.setPos(0,t.height-r.SIZE),this.barX.setSize(i.length,i.barLength)}}if(this.options.scrollY){var a=this._isScrollY(t); +if(a&&!this.barY&&(this.barY=this._barBottom()),!a&&this.barY&&(this.barY.remove(),this.barX=null),a&&this.barY){var i=this._getLengths(t,"height");this.barY.setPos(t.width-r.SIZE,0),this.barY.setSize(i.length,i.barLength)}}n.extend(this.options,t)},_barBottom:function(){var t=this._getLengths(this.options,"width");return this._bar("x",0,this.options.height-r.SIZE,t.length,t.barLength)},_barRight:function(){var t=this._getLengths(this.options,"height");return this._bar("y",this.options.width-r.SIZE,0,t.length,t.barLength) +},_getLengths:function(t,e){var i=t[e],n="width"===e?t.innerWidth:t.innerHeight,o=i-(this._isScrollBoth(t)?r.SIZE:0);return{length:o,barLength:Math.max(i/n*o,a)}},_bar:function(t,e,i,a,o){var s={manager:this,group:this.group,x:e,y:i,length:a,barLength:o,dir:t};return this.options.barStyle&&(s=n.extend(s,this.options.barStyle)),new r(s)},onx:function(t){this.fire("scrollX",{initiator:this,x:t*(this.options.width-this.options.innerWidth)})},ony:function(t){this.fire("scrollY",{initiator:this,y:t*(this.options.height-this.options.innerHeight)}) +},_isScrollX:function(t){return t.scrollX&&e(t.width)a?a:this._moveInnerPos.yn?n:this._moveInnerPos.xthis.model.bounds.y+this.model.tableDims.headerHeight},_shouldXMove:function(t){return i.containsPoint(this.model.bounds,t)},onScrollX:function(t){this.moveInner(t)},onScrollY:function(t){this.moveInner(t)},_setInnerPos:function(t){var e,n;t&&(null!=t.x&&(e=t.x),null!=t.y&&(n=t.y)),null==e&&(e=this.innerPosX),null==n&&(n=this.innerPosY),e=c(d(this.model.bounds.width-this._getInnerWidth(),e),0),n=c(d(this.visibleBodyHeight-this.innerBodyHeight,n),0),(e!==this.innerPosX||n!==this.innerPosY)&&(this._showShadow&&this._showShadow(0!==e),this._canMoveX()?this._getGroup("inner-body").attr("transform",i.makeTranslate([e,n])):this._getGroup("inner-body").attr("transform",i.makeTranslate([0,n])),this.innerPosX=e,this.innerPosY=n,this.fire("innerChange",{x:e,y:n})) +},_canMoveX:function(){return !0},isViewScrollAtTheBoundary:function(t){var e=this.innerPosX,i=this.innerPosY,n=this.getViewScrollBoundary(),r=t.direction;return e===n.left&&r===a.DIRECTION_LEFT||e===n.right&&r===a.DIRECTION_RIGHT||i===n.top&&r===a.DIRECTION_UP||i===n.bottom&&r===a.DIRECTION_DOWN},getViewScrollBoundary:function(){return{left:this.model.bounds.width-this._getInnerWidth(),right:0,top:this.visibleBodyHeight-this.innerBodyHeight,bottom:0}},onresizeStart:function(t){this._initX=this.model.bounds.x,this._initWidth=this.model.bounds.width,this._initPointX=t.containerPoint.x +},onresizeMove:function(){this._setInnerPos(),this.update(),this._fireResize()},_fireResize:function(){this.fire("resize",{width:this.model.bounds.width,height:this.visibleBodyHeight,innerWidth:this._getInnerWidth(),innerHeight:this.innerBodyHeight})},onover:function(t){i.containsPoint(this.model.bounds,t.containerPoint)?this.fire("mouseover"):this.fire("mouseout")}})}),define("chart/gantt/ProcessesView",["require","./TableView","../../utils/BaseUtils","./Scrollbar","../../dom/DomUtils","./helper","./defaultValues"],function(t){var e=t("./TableView"),i=(t("../../utils/BaseUtils"),t("./Scrollbar"),t("../../dom/DomUtils").toBack),n=t("./helper"),r=t("./defaultValues"),a=n.lineV,o=n.lineH,s=n.rect,h=n.traverse,l=n.sum,u=r.OUTLINE,c=r.INNERLINE,d=r.TWEENLINE; +return e.extend({className:"processesGroup",update:function(){var t=this.renderer,e=this.model.bounds;t.updateClip(this.clip,{width:e.width,height:e.height}),this._header(),this._body(),this._outline()},_getInnerWidth:function(){return l(this.model.tableDims.widths)},_header:function(){var t=this.renderer,e=this._getGroup(),i=this.model.tableDims.widths,n=this.model.tableDims.headerHeight,r=this.model._getHeader(),h=this._getGroup("header");h||(h=this._addGroup("header",e),this._headerEles={},this._headerEles.gs=[]); +var l=a.bind(null,t,h),u=o.bind(null,t,h),c=s.bind(null,t,h),f=this._headerEles.gs,p=-1,g=0;i.map(function(t,e){f[++p]=c({fill:this._getOptionsColor(r[e])},g,0,t,n,f[p]),e&&(f[++p]=l(d,0,n,g,f[p])),f[++p]=this._drawText(h,r[e].style,n/2,g+t/2,r[e].text,f[p]),g+=t},this);var m=d["stroke-width"]/2;f[++p]=u(d,0,g,n-m,f[p])},_body:function(){this._bodyEles||this._prepareBody();var t=this.renderer,e=this._getGroup("inner-body-back"),n=this._bodyEles.gs,r=-1,l=a.bind(null,t,e),u=o.bind(null,t,e),f=s.bind(null,t,e),p=this.model._getBody(),g=this.model.tableDims.widths,m=[],v=g.reduce(function(t,e,i){return m[i]=t,t+e +},0),_=this.model.tableDims.rowNum,y=this.model.tableDims.rowHeight,x=0,T=g.map(function(){return 0}),b=this._drawText.bind(this);h(this.model._getCateRoot(),"categories",null,function(t,i,a,o){if(i){var s=i-1,h=T[s],l=x+1;if(a-1>o){++x;var f=1===i?d:c;n[++r]=u(f,m[s],v,y*x,n[r]);for(var _=T.length;--_>=s;){T[_]=x}}var A=t.name;null!=A&&""!==A&&(n[++r]=b(e,p[s].style,y*(h+l)/2,m[s]+g[s]/2,A,n[r]))}}),++x;for(var A=x;_>=A;){var C=A===x?d:c;n[++r]=u(C,0,v,y*A,n[r]),++A}var L=0,M=this.innerBodyHeight; +g.map(function(a,o){p[o]&&(++r,n[r]||(n[r]=e.append(t.rect()),n[r].style({fill:this._getOptionsColor(p[o])}),i(n[r].node())),f(null,L,0,a,M,n[r])),o&&(n[++r]=l(d,0,M,L,n[r])),L+=a},this)},_outline:function(){var t=this.renderer,e=this._getGroup(),i=this.model.bounds;if(!this._outlineEles){var n=u["stroke-width"]/2,r=a.bind(null,t,e,u),s=o.bind(null,t,e,u);r(0,i.height,n),s(0,this.vanchart.bounds.width,n),s(0,this.vanchart.bounds.width,i.height-n)}this._outlineEles=a(t,e,c,0,i.height,i.width-c["stroke-width"]/2,this._outlineEles) +},_scrollbar:function(){this._buildScrollbar({scrollX:!0,scrollY:!1})},_drawText:function(t,e,i,n,r,a){return a||(a=t.append(this.renderer.text().style(e).textContent(r))),a.attr({x:n,y:i,dy:".35em","margin-top":"-0.5em"}).vMiddle(),a},onresizeMove:function(t){var i=this.model.bounds,n=t.containerPoint.x-this._initPointX;i.width=this._initWidth+n||0,this.model.expandPanelWidth(i.width),e.prototype.onresizeMove.call(this)}})}),define("chart/gantt/Processes",["require","./Table","../../utils/BaseUtils","../../ComponentLibrary","./ProcessesView","./helper","./defaultValues"],function(t){var e=t("./Table"),i=t("../../utils/BaseUtils"),n=t("../../ComponentLibrary"),r=t("./ProcessesView"),a=t("./helper"),o=a.traverse,s=a.sum,h=a.distribValues,l=t("./defaultValues").PADDING,u=0,c=3,d=i.getTextDimension,f=Math.max,p=e.extend({_refresh:function(){u=i.paddingConvertWithScale(l) +},doLayout:function(){},getInitPanelDims:function(){return this.tableDims=this._calcTableDims(),{width:this._calcPanelWidth(),headerHeight:this.tableDims.headerHeight,rowHeight:this.tableDims.rowHeight,rowNum:this.tableDims.rowNum}},setPanelDims:function(t){this.tableDims.headerHeight=t.headerHeight,this.tableDims.rowNum=t.rowNum,this.bounds={x:t.x,y:t.y,width:t.pWidth,height:t.height}},_calcPanelWidth:function(){var t,e,i=s(this.tableDims.widths);if(t=this.options.width){var n=this.vanchart.bounds; +e=n.width*t,e>i&&this.expandPanelWidth(e)}else{e=i}return e},expandPanelWidth:function(t){t<=s(this.tightWidths)||(this.tableDims.widths=h(this.tableDims.widths,t))},_calcTableDims:function(){var t=this._getHeader(),e=this._getBody(),i=this._getCateRoot(),n=this._calcHeaderDim(t),r=this._calcRowDim(n.widths,e,i);return{headerHeight:n.height,rowHeight:r.height,widths:r.widths,rowNum:r.num}},_calcHeaderDim:function(t){if(!t||!t.length){return{height:0,widths:[]}}var e=0,i=t.map(function(t){var i=d(t.text,t.style,!1); +return e=f(e,i.height*c),i.width+2*u});return{height:e,widths:i}},_calcRowDim:function(t,e,i){var n=this.procMap={},r=this.cateMap={},a=0,s=0;return o(i,"categories",function(i,o,h,l,u){if(o){var p=o-1,g=d(i.name,e[p].style,!1);t[p]=f(t[p],g.width);var m=i.categories;m&&m.length>1||(a=f(a,g.height*c),r[i.processesId]=s),m&&m.length||++s,n[i.processesId]={options:i,parent:n[u.processesId]}}}),t=t.map(function(t){return t+2*u}),this.tightWidths=t.slice(),{num:s,height:a,widths:t}},_getCateRoot:function(){return this.options +},render:function(){Object.keys(this.procMap).length&&(this.view||(this.view=new r(this,this.vanchart)),this.view.render())}});return n.register(n.PROCESSES,p),p}),define("chart/gantt/TimeAxisView",["require","./TableView","../../utils/BaseUtils","./helper","./defaultValues"],function(t){var e=t("./TableView"),i=t("../../utils/BaseUtils"),n=t("./helper"),r=n.lineV,a=n.lineH,o=n.rect,s=n.sum,h=t("./defaultValues"),l=h.OUTLINE,u=h.INNERLINE,c=h.TWEENLINE,d=i.getTextDimension,f=i.bindData;return e.extend({className:"timeaxisGroup",initialize:function(){e.prototype.initialize.apply(this,arguments); +var t=this.vanchart;this.on("innerChange",function(e){t.fire("moveSeries",e)}),this.on("resize",function(){t.fire("updateSeries")})},update:function(){var t=this.renderer,e=this.model.bounds;this._getGroup().attr("transform",i.makeTranslate(e)),t.updateClip(this.clip,{width:e.width,height:e.height}),this.moveInner(),this._outline()},updateInner:function(){this.moveInner(),this._fireResize()},moveInner:function(t){this._setInnerPos(t);var e=-this.innerPosX,i=-this.innerPosX+this.model.bounds.width,n=this._getHeaderViewModel(e,i); +this._header(n),this._body(n)},_canMoveX:function(){return !1},_getHeaderViewModel:function(t,e){return this._centerEdgeText(this.model.getHeaderViewModel(t,e))},_centerEdgeText:function(t){return this._checkTextBounds("left",t.upTexts),this._checkTextBounds("left",t.subTexts),this._checkTextBounds("right",t.upTexts),this._checkTextBounds("right",t.subTexts),t},_checkTextBounds:function(t,e){if(e&&e.length){var i,n,r,a,o=0,s=this.model.bounds.width;if("left"===t){if(a=e[0],a.right<=o&&(a=e[1]),!a){return +}i=o,n=i,r=Math.min(a.right,s)}else{if(a=e[e.length-1],a.left>=s&&(a=e[e.length-2]),!a){return}i=s,n=Math.max(a.left,o),r=i}a.left<=i&&i<=a.right&&(a.width||(a.width=d(a.content,a.style).width),r-n>=a.width?a.x=(n+r)/2:a.x=-100)}},_header:function(t){var e=this.renderer,i=this._getGroup(),n=this.model,r=n.bounds.width,h=n.tableDims.heights,l=s(h),d=n._getHeader();this._headerEles||(this._headerEles={upLines:[],upTexts:[],subLines:[],subTexts:[]},this._headerEles.gs=[]);var p=this._headerEles.gs,g=-1,m=this._headerEles; +p[++g]=o(e,i,{fill:this._getOptionsColor(d[0])},0,0,r,h[0],p[g]),p[++g]=o(e,i,{fill:this._getOptionsColor(d[1])},0,h[0],r,h[1],p[g]);var v=c["stroke-width"]/2;p[++g]=a(e,i,c,0,r,h[0]-v,p[g]),p[++g]=a(e,i,c,0,r,l-v,p[g]);var _=this._getGroup("header")||this._addGroup("header",i);t&&(["upLines","subLines"].map(function(i){var n=f(m[i],t[i]);n.exit.map(function(t){t.remove()});var r=n.enter.map(function(t){return _.append(e.line().datum(t).style(u))});m[i]=r.concat(n.update).map(function(t){return t.attr(t.datum()) +})}),["upTexts","subTexts"].map(function(i){var n=f(m[i],t[i]);n.exit.map(function(t){t.remove()});var r=n.enter.map(function(t){return _.append(e.text().datum(t).style(t.style))});m[i]=r.concat(n.update).map(function(t){var e=t.datum();return e.ele=t,t.textContent(e.content).attr({x:e.x,y:e.y,dy:".35em","margin-top":"-0.5em"}).vMiddle(),t})}))},_body:function(t){if(this._bodyEles||(this._prepareBody(),this._shadow()),t){this._bodyData={hLines:[],vLines:t.subLines,rects:t.weekendsWidths};var e=this._bodyEles,i=this._bodyData,n=this.renderer,r=this._getGroup("inner-body-back"),a=this.model.tableDims.rowHeight,o=this.model.tableDims.rowNum,s=this.innerBodyHeight,l=f(e.rects,i.rects); +l.exit.map(function(t){t.remove()});var c=l.enter.map(function(t){return r.append(n.rect().datum(t).style({fill:h.WEEKEND_COLOR}))});e.rects=c.concat(l.update).map(function(t){var e=t.datum();return t.attr({x:e.from,y:0,width:e.to-e.from,height:s})});var l=f(e.vLines,i.vLines);l.exit.map(function(t){t.remove()});var c=l.enter.map(function(t){return r.append(n.line().datum(t).style(u))});e.vLines=c.concat(l.update).map(function(t){var e=t.datum();return t.attr({x1:e.x1,y1:0,x2:e.x2,y2:s})});for(var d=0; +++d<=o;){i.hLines.push({x1:0,y1:d*a,x2:this.vanchart.bounds.width,y2:d*a})}var l=f(e.hLines,i.hLines);l.exit.map(function(t){t.remove()});var c=l.enter.map(function(t){return r.append(n.line().datum(t).style(u))});e.hLines=c.concat(l.update).map(function(t){return t.attr(t.datum())})}},_outline:function(){var t=this.renderer,e=this._getGroup(),n=this.model.bounds,o=r.bind(null,t,e,l),s=l["stroke-width"]/2;if(!this._outlineEles){var h=a.bind(null,t,e,l);h(0,this.vanchart.bounds.width,s),h(0,this.vanchart.bounds.width,n.height-s) +}var u=n.width-s;i.isSupportSVG()||(u=Math.floor(u)),this._outlineEles=o(0,n.height,u,this._outlineEles)},_scrollbar:function(){this._buildScrollbar({scrollX:!0,scrollY:!0})},_shadow:function(){var t={x1:0,y1:0,x2:1,y2:0},e=[{offset:"0%","stop-color":"rgb(62, 62, 62)","stop-opacity":"0.2"},{offset:"75%","stop-color":"rgb(62, 62, 62)","stop-opacity":"0"}],n=this.renderer.colorGradient(t,e),r="url(#"+i.stamp(n)+")";this._shadowRect=this._getGroup("body").append(this.renderer.rect()).style("transition","opacity 0.2s").attr({x:0,y:0,width:10,height:this.model.bounds.height,fill:r}),this._showShadow(!1) +},_showShadow:function(t){t!==this._shadowShowed&&(this._shadowShowed=t,this._shadowRect.style("opacity",t?"1":"0"))},onresizeMove:function(t){var i=this.model.bounds,n=this._initPointX-t.containerPoint.x;i.x=this._initX-n,i.width=this._initWidth+n||0,e.prototype.onresizeMove.call(this)}})}),define("chart/gantt/levelText",["require","../../locale/localeText"],function(t){function e(t){return o.map(function(e,i){var n=t[i];return n&&2===n.length?n:e})}function i(){var t=a.getTextMap().ganttLevels; +return t&&t.length?s.levels===t?s.merged:(s.levels=t,s.merged=e(t),s.merged):o}function n(t,e){return t.format(i()[e][0])}function r(t,e){return t.format(i()[e][1])}var a=t("../../locale/localeText"),o=[["yyyy","N"],["yyyy","N"],["yyyy","QQQ"],["N[,]yyyy","MMM"],["QQQ[,]yyyy","MMM"],["QQQ[,]yyyy","MMM"],["MMM[,]yyyy","www"],["d[,]MMM[,]yyyy","eee"],["MMM[,]yyyy","d"],["MMM","d"],["d[,]MMM","a"],["d[,]MMM","I"],["d[,]MMM","HHH"],["a","H"],["H","H:mm"],["H","m"],["H:mm","m"],["H:mm","m"],["H:mm","m"],["H:mm","m"],["H:mm","s"],["H:mm","s"]],s={levels:null,merged:null}; +return{getUpText:n,getSubText:r}}),define("chart/gantt/TimeAxis",["require","./Table","../../utils/BaseUtils","../../ComponentLibrary","./TimeAxisView","./levelDomain","../../dateUnits/dateUnits","../../utils/Scale","./helper","./levelText","./levelText","./defaultValues"],function(t){function e(t,e,i,n){n.add(1,e);var r=(n-i)*t;return r}var i=t("./Table"),n=t("../../utils/BaseUtils"),r=t("../../ComponentLibrary"),a=t("./TimeAxisView"),o=t("./levelDomain"),s=t("../../dateUnits/dateUnits"),h=t("../../utils/Scale"),l=t("./helper"),u=l.sum,c=l.distribValues,d=t("./levelText").getUpText,f=t("./levelText").getSubText,p=t("./defaultValues").PADDING,g=0,m=3,v=o.upUnit,_=o.subUnit,y=o.LEN,x=o.Ratio,T=n.getTextDimension,b=n.getTextHeight,A=n.object2date,C=n.isEmpty,L=Math.max,M=Math.min,P=i.extend({_refresh:function(){g=n.paddingConvertWithScale(p),this.lastScale=this.scale,this.scale=h.linear() +},doLayout:function(){},getInitPanelDims:function(){return this.tableDims=this._calcTableDims(),{headerHeight:u(this.tableDims.heights)}},setPanelDims:function(t){var e=t.headerHeight;this.tableDims.headerHeight=e,this.tableDims.rowHeight=t.rowHeight,this.tableDims.rowNum=t.rowNum;var i=u(this.tableDims.heights);e>i&&(this.tableDims.heights=c(this.tableDims.heights,e)),this.bounds={x:t.x+t.pWidth,y:t.y,width:t.tWidth,height:t.height}},_calcTableDims:function(){var t=this._getHeaderHeights();return{heights:t} +},_getHeaderHeights:function(){return this._getHeader().map(function(t){return b(t.style)*m})},calcSeries:function(t,e,i){var n=Number.MAX_VALUE,r=0,a={},o={},h={},u=[];t.map(function(t){t.points.map(function(t){var c=t.options,d=A(c.startTime),f=A(c.finishTime),p=A(c.markTime);if(isNaN(d.getTime())||isNaN(f.getTime())){return void (t.isNull=!0)}var g=t.options.processesId;if(null!=e[g]){var m=i[g];if(h[m]=h[m]||[],h[m].push(t),t.rowNum=m,t.progress=l.getValidProgress(c.progress),c.tooltip.follow=!0,!t.processes){var v=g,_=e[v]; +for(t.processes=[_.options];_=_.parent;){t.processes.unshift(_.options)}}C(t.options.id)||(o[c.id]=t);var y=a[g]=a[g]||{min:Number.MAX_VALUE,max:0};p&&!isNaN(p.getTime())&&(u.push(t),y.min=M(y.min,p),y.max=L(y.max,p)),y.min=M(y.min,d,f),y.max=L(y.max,d,f),n=M(y.min,n),r=L(y.max,r),t.startTime=s(d),t.finishTime=s(f),t.markTime=s(p),t.duration=s.duration(f-d)}})}),this.domainMap=a,this.dateDomain=[n,r],this.idMap=o,this.rowMap=h,this.markArray=u,n>r&&(this.dateDomain=[])},render:function(){if(this.dateDomain.length){if(this.view){this.view.render() +}else{this.view=new a(this,this.vanchart),this.view.render();var t=this._calcFirstViewMovement();this.view.moveInner({x:t})}}},getMovePos:function(){var t,e=this.view;if(e){t={x:e.innerPosX,y:e.innerPosY}}else{var i=this._calcFirstViewMovement();i=Math.min(Math.max(this.bounds.width-this.innerWidth,i),0),t={x:i,y:0}}return{pos:t,bounds:this.bounds}},_calcFirstViewMovement:function(){var t=s(this.dateDomain[0]),e=_(this.level),i=+t.startOf(e),n=+t.add(-1,e);return this.scale(n)-this.scale(i)},renderContent:function(){this.dateDomain.length&&this.view.updateInner() +},calcScale:function(){if(this.dateDomain.length){var t=this.dateDomain,e=this._getEm(),i=this.getLevel(),n=x(e,i),r=v(i),a=_(i),o=s(t[0]),h=s(t[1]),l=s(o).startOf(a).add(-1,a),u=s(h).endOf(a).add(1,a),c=s(l).startOf(r),d=(u-l)*n;this.scale.domain([l,u]).range([0,d]),this.innerWidth=Math.max(d,this.bounds.width),this.ratio=n,this.uu=r,this.su=a,this.uInit=c,this.sInit=l}},getHeaderViewModel:function(t,i){function n(t){if(l){var e=S[S.length-1];C.isWeekend()&&!t?(!e||e&&e.finish)&&S.push({from:M,finish:!1}):e&&!e.finish&&(e.to=M,e.finish=!0) +}}for(var r={upLines:[],upTexts:[],subLines:[],subTexts:[],weekendsWidths:[]},a=this.tableDims.heights,o=u(a),h=this._getHeader(),l=this.shouldShowWeekends(),c=this.getLevel(),p=this.ratio,g=this.uu,m=this.su,v=this.sInit,_=this.scale.invert(t),y=this.scale.invert(i),x=s(_).startOf(m),T=s(y).add(1,m).startOf(m),b=s(x).startOf(g),A=s(b),C=s(x),L=(A-v)*p-t,M=(C-v)*p-t,P=e.bind(null,p,g,v,A),w=e.bind(null,p,m,v,C),S=r.weekendsWidths=[];T>=C;){n();var E,O;C>=A&&(r.upLines.push({x1:L,y1:0,x2:L,y2:a[0]}),E=d(A,c),O=P()-t,r.upTexts.push({style:h[0].style,left:L,right:O,x:(O+L)/2,y:a[0]/2,content:E}),L=O),r.subLines.push({x1:M,y1:a[0],x2:M,y2:o}),E=f(C,c),O=w()-t,r.subTexts.push({style:h[1].style,left:M,right:O,x:(O+M)/2,y:a[0]+a[1]/2,content:E}),M=O +}return n(!0),r},getLevel:function(){if(null==this.level){if(!this.dateDomain.length){return}var t=this.setLevel(this.options.zoomLevel);t||this.setLevel(this._guessLevel()),this.initLevel=this.level}return this.level},setLevel:function(t){return null==t||0>t||t>y-1?!1:(this.level=t,!0)},_guessLevel:function(){for(var t=this.dateDomain,e=this._getEm(),i=this.bounds.width,n=i/(t[1]-t[0]),r=y;--r>-1;){var a=x(e,r);if(n>a){break}}return Math.max(0,r)},_getEm:function(){var t=this._getHeader(),e=s(),i=T(d(e,0),t[0].style).width+2*g,n=6*T(f(e,0),t[1].style).width,r=n/6; +return i>n&&(r=i/6),r},isZoomEnabled:function(){return this.options.zoom},shouldShowWeekends:function(){return this.level>6&&this.options.showWeekends}});return r.register(r.TIMEAXIS,P),P}),define("chart/gantt/Link",["require","../../vans/VanChart","../../utils/PathGenerator","../../Constants","../../utils/BaseUtils"],function(t){function e(t){var e=t.links,n=t.idMap,r=[];return e.filter(function(t){return t.type&&m[t.type.toLowerCase()]&&t.lineWidth&&n[t.from]&&n[t.from].isVisible()&&n[t.to]&&n[t.to].isVisible() +}).forEach(function(e){var n=i(e,t);n&&r.push(n[0],n[1])},this),r}function i(t,e){var i=n(t,e);if(i){var r={d:i.line},a={fill:"none",stroke:t.lineColor,"stroke-width":t.lineWidth,"stroke-dasharray":h.DASH_TYPE[t.dashStyle||"Solid"]},o={d:i.arrow},s={fill:t.lineColor,stroke:"none"};return[{attr:r,style:a},{attr:o,style:s}]}}function n(t,e){function i(){var t=Math.min(L,P),i=Math.max(C,M);return e.rowMap[T].every(function(e){if(e===b||e===A){return !0}var n=Math.max(t,e.rect.x),r=Math.min(i,e.rect.x+e.rect.width); +return n>r})}var n=e.idMap,o=t.type.toLowerCase(),s=r(o,0,n[t.from],e),h=r(o,1,n[t.to],e),l=s[1],u=h[0],c=l[0],g=u[0],m=e.bounds,v=c,_=g;if(v>_&&(v=g,_=c),!(v>=m.x+m.width||_<=m.x)){var y=d,x=[null,(l[1]+u[1])/2];if(l[1]===u[1]){var T=n[t.from].rowNum,b=n[t.from],A=n[t.to],C=b.rect.x,L=b.rect.x+b.rect.width,M=A.rect.x,P=A.rect.x+A.rect.width,w="fs"===o&&M>L||"sf"===o&&C>P;w&&i()?(h=[s[0],h[1]],s=[]):x=[l[0],l[1]-n[t.from].rect.height/2-p],y=f}else{switch(o){case"fs":c>g&&(x[0]=g);break;case"ff":g>c&&(y=f); +break;case"ss":c>g&&(y=f);break;case"sf":default:g>c&&(x[0]=g)}}var S=s;return null!=x[0]&&S.push(x),S=S.concat(h),{line:y(S),arrow:a(h[1],o.charAt(1))}}}function r(t,e,i,n){var r=t.charAt(e),a=i.rect,o=n.pos,s=n.bounds,h=[s.x,s.width],l=a.y+a.height/2,c=Math.max(a.height/2,2*g),d=[o.x+("s"===r?a.x:a.x+a.width),l];d[0]=u(d[0],h);var f,p=[d[0]+("s"===r?-c:c),l];return f=e?[p,d]:[d,p]}function a(t,e){var i="M"+t[0]+","+t[1]+"l",n=g;return"s"===e&&(i+="-"),i+=n+","+n+"v-"+2*n+"z"}var o=t("../../vans/VanChart"),s=t("../../utils/PathGenerator"),h=t("../../Constants"),l=t("../../utils/BaseUtils"),u=l.getValueInDomain,c=l.bindData,d=s.line().interpolate("step-before"),f=s.line().interpolate("step-after"),p=2,g=3,m={}; +m.fs=m.ff=m.sf=m.ss=!0,o.include({removeLinks:function(){this._linksGroup=null},renderLinks:function(){var t=this.options.plotOptions.links||[];this._linksGroup||(this._linksGroup=this.renderer.group().addTo(this.clipSeriesGroup),this._linkEls=[]);var i=this.getTimeAxis(),n=i.getMovePos(),r=this.getProcesses().tableDims.rowHeight,a=e({links:t,idMap:i.idMap,rowMap:i.rowMap,pos:n.pos,bounds:{x:-r,y:0,width:n.bounds.width+2*r,height:n.bounds.height}}),o=this._linksGroup,s=this.renderer,h=c(this._linkEls,a); +h.exit.map(function(t){t.remove()});var l=h.enter.map(function(t){return o.append(s.path().datum(t))});this._linkEls=l.concat(h.update).map(function(t){var e=t.datum();return t.attr(e.attr).style(e.style)})}})}),define("chart/gantt/Mark",["require","../../vans/VanChart","../../utils/PathGenerator","../../Constants","../../utils/BaseUtils"],function(t){var e=t("../../vans/VanChart"),i=t("../../utils/PathGenerator"),n=(t("../../Constants"),t("../../utils/BaseUtils")),r=i.getMarkerPath,a=n.makeTranslate,o=n.bindData; +e.include({removeMarks:function(){this._marksGroup=null},renderMarks:function(){this._marksGroup||(this._marksGroup=this.renderer.group().addTo(this.clipSeriesGroup),this._imageMarkEls=[],this._markEls=[]);var t=this.getTimeAxis(),e=t.getMovePos(),i=this.getProcesses().tableDims.rowHeight,s=e.pos,h={x:-i,y:0,width:e.bounds.width+2*i,height:e.bounds.height},l=t.markArray,u=t.scale,c=this._marksGroup,d=this.renderer,f=[],p=[];l.forEach(function(t){if(t.visible&&t.series.visible){var e=t.rect.height,i=u(t.markTime)+s.x,r=t.rect.y+0.5*e; +if(!(i-1){var r=t("../../dateUnits/locale/"+n);s.setLocale(r)}this.on("moveSeries",a.isSupportSVG()?this.moveSeries:a.throttle(this.moveSeries,50,this)),this.on("updateSeries",this.updateSeriesTextDivGroup),i.prototype.initialize.apply(this,arguments),this.handler&&this.handler.on("resizeEnd",this.onResizeEnd,this),this.isMobileFlow()&&this.handler&&this.handler.registerManager(new h(this.handler)) +},moveSeries:function(t){this.moveSeriesTextDivGroup(t),this.renderLinks(),this.renderMarks(),this.series.forEach(function(t){t.movePoints()})},refresh:function(t){if(this.width&&this.height){if(this.getTimeAxis()){this.remove(),this.removeLinks(),this.removeMarks();var e=this;e.panBounds=e.backGroup=e.processesGroup=e.timeaxisGroup=e.frontGroup=e.seriesTextDivGroupWrapper=null,r.ComponentsOrder.map(function(t){t in e.components&&(e.components[t].remove(),e.components[t]=null)}),e.components={};var n=this.fullScreenChart; +this.initialize(t,this.wrapDom,this.vancharts),n&&(this.fullScreenChart=n,this.fullScreenChart.setData(this.options))}else{i.prototype.refresh.call(this,t)}}},resize:function(){this._sizeChanged=!0,this.refresh(this.options)},layoutComponentsAndCharts:function(){var t=this;t.bounds=t._getDefaultBounds(),r.ComponentsOrder.map(function(e){e in t.components&&t.components[e].doLayout()});var e=this.getProcesses(),i=this.getTimeAxis();if(!this.panBounds){var a=this._calcDims(e,i);this.panBounds=this._calcPanBounds(a),this.resizeBounds=this._calcResizeBounds(a),e.setPanelDims(a),i.setPanelDims(a) +}i.calcSeries(this.series,e.procMap,e.cateMap),i.calcScale(),n.calculateSeries(this),n.calculateSeriesShapes(this),this.render()},render:function(){this.vancharts.endLoading();var t=this,e=this.renderer;if(this._isEmptyDataChart()){return this._showEmptyDataTip(),void (this.options.toPhantom&&window.console&&console.log("done"))}this.emptyDataGroup&&this.emptyDataGroup.remove(),["backGroup","processesGroup","timeaxisGroup","frontGroup"].forEach(function(i){if(!t[i]){var n=t[i]=e.group().addClass(i).add(); +if("processesGroup"===i||"timeaxisGroup"===i){var r=i+"-body";n=t[r]=n.append(e.group().addClass(r)),r=i+"-inner-body",t[r]=n.append(e.group().addClass(r))}}});var i=t["timeaxisGroup-inner-body"];["clipSeriesGroup","seriesGroup","seriesTextRenderGroup"].forEach(function(n){t[n]||(t[n]=i.append(e.group().addClass(n)))}),this._addSeriesTextDivGroup(),this._renderBackground(),this.renderSeries(),this.renderLinks(),this.renderMarks(),this.renderComponents();var n=this.getComponent(d);n&&n.setLevel(this.getTimeAxis().getLevel()) +},_addSeriesTextDivGroup:function(){var t=this;t.seriesTextDivGroupWrapper||(t.seriesTextDivGroupWrapper=this.renderer.div().add(),t.seriesTextDivGroup=this.renderer.div(),t.seriesTextDivGroupWrapper.append(t.seriesTextDivGroup)),this.updateSeriesTextDivGroup()},updateSeriesTextDivGroup:function(){var t=this.getTimeAxis(),e={x:t.bounds.x,y:t.bounds.y+t.tableDims.headerHeight,width:t.bounds.width,height:t.bounds.height-t.tableDims.headerHeight};this.seriesTextDivGroupWrapper.style({left:e.x+"px",top:e.y+"px",clip:"rect("+[0,e.width,e.height,0].join("px ")+"px)"}) +},moveSeriesTextDivGroup:function(t){this.seriesTextDivGroup.style("transform","translate(0px,"+t.y+"px)")},_isPanMovingAtTheBoundary:function(t){var e=t.containerPoint,i=this.getComponent(r.LEVELBAR),n=a.containsPoint(this.panBounds,e),o=i&&a.containsPoint(i.thumbBounds,e);if(!n&&!o){return !0}var s=this.getComponent(r.TIMEAXIS),h=this.getComponent(r.PROCESSES),l=s.view.isViewScrollAtTheBoundary(t),u=h.view.isViewScrollAtTheBoundary(t);return l&&u},changeToLevel:function(t){var e=this.getTimeAxis(),i=e.getLevel(); +t!==i&&(e.setLevel(t),e.calcScale(),e.renderContent(),this.reRenderWholePlot())},reRenderWholePlot:function(){n.calculateSeriesShapes(this),this.renderSeries(),this.renderLinks(),this.renderMarks(),this.getComponent(r.LEGEND_COMPONENT).render()},_calcDims:function(t,e){var i=this.bounds,n=i.width,r=t.getInitPanelDims(),a=r.width,o=r.headerHeight,s=e.getInitPanelDims(),h=n-a;o=f(o,s.headerHeight);var l=r.rowHeight*r.rowNum,u=i.height-o,c=r.rowNum;return u>l&&r.rowHeight>0&&(c=Math.floor(u/r.rowHeight)),{x:i.x,y:i.y,pWidth:a,tWidth:h,height:i.height,headerHeight:o,rowHeight:r.rowHeight,rowNum:c} +},getProcesses:function(){return this.getComponent(u)},getTimeAxis:function(){return this.getComponent(c)},isResizeEnabled:function(){return this.getComponent(u).options.resize},_calcPanBounds:function(t){return{x:t.x,y:t.y,width:t.pWidth+t.tWidth,height:t.height}},_calcResizeBounds:function(t){return{x:t.x+t.pWidth-p/2,y:t.y,width:p,height:t.height}},onResizeEnd:function(){this.resizeBounds.x=this.getTimeAxis().bounds.x-p/2},onScrollY:function(t){this.fire("moveY",t)},addPlotOffset:a.falseFn,getPlotContentBounds:function(){var t=this.getTimeAxis(); +return{x:t.view.innerPosX,y:t.view.innerPosY,width:t.innerWidth,height:t.view.innerBodyHeight}},getScrollVisibleBounds:function(){var t=this.getTimeAxis();return{x:t.bounds.x,y:t.bounds.y+t.tableDims.headerHeight,width:t.bounds.width,height:t.view.visibleBodyHeight}},getDefaultTooltipFormatter:function(){return{durationFormat:"function(d) {return d.as('day')}",finishTimeFormat:"",identifier:"{PROCESSES}{SERIES}{STARTTIME}{FINISHTIME}{DURATION}{PROGRESS}",progressFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '#.##%') : arguments[0]}",seriesFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}",startTimeFormat:""} +}});return t("../../vans/VanChartLibrary").register(e.GANTT_CHART,g),g}),define("utils/LoadingUtils",[],function(){function t(t,e){if(e=e||"loading-div-id",e+=" loading-div-id",!i[e]&&!document.getElementById(e)){var n=document.createElement("div"),r=document.createElement("div");n.id=e,n.style.position="absolute",n.style.width="100%",n.style.height="100%",n.style.left=0,n.style.top=0,n.style.zIndex=9999,(void 0!=r.style.animation||void 0!=r.style.webkitAnimation)&&(r.style.left="50%",r.style.top="50%",r.className="loader-inner ball-scale-ripple-multiple",r.innerHTML="
"),n.appendChild(r),t.appendChild(n),i[e]=n +}}function e(t,e){if(e=e||"loading-div-id",e+=" loading-div-id",i[e]){t.removeChild(i[e]),i[e]=null}else{var n=document.getElementById(e);n&&t.removeChild(n)}}var i={};return{startLoading:t,endLoading:e}}),define("component/Tooltip",["require","./Base","../utils/BaseUtils","../Constants","../utils/ColorUtils","../ComponentLibrary","./FormattedText"],function(t){var e=t("./Base"),i=t("../utils/BaseUtils"),n=(t("../Constants"),t("../utils/ColorUtils")),r=t("../ComponentLibrary"),a=t("./FormattedText"),o=0.4,s=e.extend({_gCssText:"position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:2000;-webkit-user-select:none;-moz-user-select:none;-o-user-select:none;user-select:none;pointer-events:none;",_style:function(t){if(!t){return"" +}var e=[];if(t.animation&&!t.follow){var r="left "+o+"s,top "+o+"s";e.push("transition:"+r),e.push("-moz-transition:"+r),e.push("-webkit-transition:"+r),e.push("-o-transition:"+r)}if(t.style){var a=i.cssNormalization(t.style);for(var s in a){"color"==s?e.push(s+":"+n.colorToHex(a[s])):e.push(s+":"+a[s])}}var h=function(t){if(i.isSupportSVG()){return t}var e=n.colorToHexAlpha(t);return"#"+("0"+(255*e.alpha|0).toString(16)).slice(-2)+e.hex.replace("#","")};if(t.backgroundColor){if("string"==typeof t.backgroundColor){if(i.isSupportSVG()){e.push("background-Color:"+t.backgroundColor) +}else{var l=h(t.backgroundColor);e.push("filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="+l+", endColorstr="+l+", GradientType=0)")}}else{if("object"==typeof t.backgroundColor){var u=t.backgroundColor,c=h(u.startColor),d=h(u.endColor),f="left",p="left top",g="right top",m=1;u.x1==u.x2&&(f="top",p="left top",g="left bottom",m=0),e.push("background: -ms-linear-gradient("+f+", "+c+", "+d+")"),e.push("background-image: -moz-linear-gradient("+f+", "+c+", "+d+")"),e.push("background-image: -webkit-gradient(linear, "+p+", "+g+", color-stop(0, "+c+"), color-stop(1, "+d+"))"),e.push("filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="+c+", endColorstr="+d+", GradientType="+m+")") +}}}null!=t.borderWidth&&e.push("border-width:"+t.borderWidth+"px"),null!=t.borderColor&&e.push("border-color:"+t.borderColor),null!=t.borderRadius&&(e.push("border-radius:"+t.borderRadius+"px"),e.push("-moz-border-radius:"+t.borderRadius+"px"),e.push("-webkit-border-radius:"+t.borderRadius+"px"),e.push("-o-border-radius:"+t.borderRadius+"px")),t.shadow&&e.push("box-shadow:1px 1px 2px rgba(0,0,0,0.2)");var v=t.padding;return null!=v&&void 0!=v&&(v=i.reformCssArray(v),e.push("padding:"+v[0]+"px "+v[1]+"px "+v[2]+"px "+v[3]+"px")),e=e.join(";")+";" +},doLayout:function(t){this._tDom||(t=t||this.vanchart.getDivParentDom(),this._tDom=document.createElement("div"),this._hiddenDom=document.createElement("div"),this._tDom.onselectstart=function(){return !1},this._tDom.style.position="absolute",this._hiddenDom.style.visibility="hidden",t.appendChild(this._tDom),t.appendChild(this._hiddenDom),this._tooltipHideTick=null)},remove:function(){var t=this.vanchart.getDivParentDom();this._tDom&&t&&t.contains(this._tDom)&&(t.removeChild(this._tDom),t.removeChild(this._hiddenDom)),this._tDom=null +},showWithToolbarIcon:function(t,e){var i=t.toolbar,n=i.options.tooltip,r=this.calculateTooltipDivDim(n,e),a=t.toolbar.calcToolbarTipPos(t,r);this._show(a,n,e)},showWithPoint:function(t,e,n){var r=this.vanchart.getChartBounds();if(t&&t.options.tooltip&&t.series.vanchart.renderer&&(e?i.containsPoint(r,e.containerPoint):!0)){var o=n||t,s=o.options.tooltip,h=t.series,l=a.tooltipGenerator(o),u=this.calculateTooltipDivDim(s,l),c=h.getTooltipPos(t,u,e);c&&(this._show(c,s,l),this._tooltipRect=i.makeBounds(c,u)) +}},getMobileTextArray:function(t,e,n){if(t&&t.options.tooltip&&t.series.vanchart.renderer){var r=n||t,o=r.options.tooltip.style;if(o){o=i.extend({},o),delete o.FONT_SCALE;var s=o.fontSize;s&&(-1!==s.indexOf("pt")&&(s=4*parseFloat(s)/3),o.fontSize=0|parseFloat(s)),o.color&&(o.textFill=o.color)}var h=a.tooltipGenerator(r);return h=h.replace(/
|
/g,"\n"),h=h.replace(/<[^<>]+>/g,""),h=h.replace(/● /g,""),h=h.replace(/ /g," "),h.split("\n").filter(function(t){return t}).map(function(t){return[{style:o,text:t}] +})}},_getTooltipText:function(){var t=window.navigator.userAgent,e=t.indexOf("MSIE ");return t.indexOf("Trident/7.0")>0||t.indexOf("Edge/")>0||e>0&&10===parseInt(t.substring(e+5,t.indexOf(".",e)),10)?function(t){t+="";for(var e,i="",n=!0,r=-1,a=t.length;++r"===e&&(n=!0),i+=e}return i}:function(t){return t}}(),_show:function(t,e,i){t&&e&&i&&!this.vanchart.isMouseDown&&(clearTimeout(this._tooltipHideTick),this._tDom.innerHTML=this._getTooltipText(i),this._tDom.style.cssText=this._gCssText+this._style(e)+"left:"+t[0]+"px;top:"+t[1]+"px;") +},hide:function(){clearTimeout(this._tooltipHideTick),this._tooltipHideTick=setTimeout(function(){this._tDom&&(this._tDom.style.display="none")}.bind(this),400)},immediateHide:function(){this._tDom.style.display="none"},calculateTooltipDivDim:function(t,e){t=t||"";var n=this._hiddenDom;n.innerHTML=this._getTooltipText(e),n.style.cssText=this._gCssText+this._style(t)+"visibility:hidden;";var r=i.getComputedStyle(n,"width height border-left-width padding-left",function(t){return t=Math.ceil(window.parseFloat(t)),isNaN(t)?0:t +}),a=r.width+2*r.borderLeftWidth+2*r.paddingLeft,o=r.height+2*r.borderLeftWidth+2*r.paddingLeft;return{width:a+2,height:o}},render:function(){}});return r.register(r.TOOLTIP_COMPONENT,s),s}),define("Carousel",["require","./utils/BaseUtils","./utils/QueryUtils","./dom/DomUtils","./dom/Browser","./utils/ColorUtils","./utils/PathUtils","./Constants","./utils/BezierEasing","./vector/SvgRenderer","./vector/VmlRenderer","./component/Tooltip"],function(t){function e(t){return t&&t[0]?null==t[0].mobile?d.hasTouch():t[0].mobile:d.hasTouch() +}function i(t){var e=t.title;return e.text&&e.useHtml?d.getPlainText(e.text):e.text||""}function n(t,e){Object.keys(e).map(function(i){"string"==typeof e[i]&&(t.style[i]=e[i])})}function r(t){var e=m.getRGBAColorArray(t),i=m.rgb2hsb(e[0],e[1],e[2]);return m.toColor(m.hsb2rgb(i[0],0.85*i[1],100*(i[2]+0.15)/115),"hex")}function a(t){var e=m.getRGBAColorArray(t),i=m.rgb2hsb(e[0],e[1],e[2]);return m.toColor(m.hsb2rgb(i[0],0.75*i[1],100*(i[2]+0.25)/125),"hex")}function o(t,e){var i=t.className.split(" "); +-1===i.indexOf(e)&&(t.className+=" "+e)}function s(t,e){var i=t.className.split(" "),n=i.indexOf(e);-1!==n&&(i.splice(n,n),t.className=i.join(" "))}function h(t,e,i){if(d.isSupportSVG()){var n=""+S[e]+"";t.innerHTML=n,t.querySelector("g").setAttribute("fill",i),e===_.RADAR_CHART&&t.querySelector("g").setAttribute("stroke",i)}else{t.innerHTML=''}}function l(t,e){if(d.isSupportSVG()){t.style.background=e,t.innerHTML='' +}else{var i=c("shape");i.path=v.circlePath(15,15,15),i.stroked="False",i.fillcolor=e;var n=c("fill");n.color=e,n.opacity=0.5,i.appendChild(n),t.appendChild(i);var r=c("shape");r.path=/vanchart-arrow-left/.test(t.className)?"m19,22 l9,15 l19,9 e":"m11,22 l21,15 l11,9 e",r.filled="False",r.strokecolor="#ffffff",t.appendChild(r),M.on(t,"mouseover",function(){n.opacity=0.2}),M.on(t,"mouseout",function(){n.opacity=0.5})}}function u(t){var e=c("shape");e.style.width="100%",e.style.height="100%",e.coordsize="10 10",e.path=v.circlePath(5,5,5),e.stroked="False",e.fillcolor="#7f7f7f"; +var i=c("fill");i.color="#7f7f7f",i.opacity=0.5,e.appendChild(i),t.appendChild(e)}function c(t){var e=x.prototype.create(t);return e.style.cssText=O,e.coordsize="1 1",e}var d=t("./utils/BaseUtils"),f=t("./utils/QueryUtils"),p=t("./dom/DomUtils"),g=t("./dom/Browser"),m=t("./utils/ColorUtils"),v=t("./utils/PathUtils"),_=t("./Constants"),y=t("./utils/BezierEasing"),x=(t("./vector/SvgRenderer"),t("./vector/VmlRenderer")),T=t("./component/Tooltip"),b=3.4375,A=4000,C={type:_.BUTTON,color:"#7f7f7f",interval:1000,style:{fontSize:"16px",color:"#ffffff"}},L={borderWidth:1,borderColor:"#000000",borderRadius:2,backgroundColor:"rgba(255, 255, 255, 0.5)",padding:5,shadow:!0,animation:!0,style:{fontSize:"12px",fontFamily:"MicrosoftYaHei, sans-serif",color:"#515151"}},M=window.VanHammer,P=g.ie||g.edge,w=function(t){function c(){return e(t.options.options) +}function g(){Pt._show.apply(Pt,d.toArray(arguments)),c()&&(st&&window.clearTimeout(st),st=window.setTimeout(function(){Pt.immediateHide()},A))}function v(e,i){return x(e,i),z(e,t.charts[i],yt[i],i)}function x(t,e){var n=i(t),r=ct[e];r&&(r.mText&&(r.mText.textContent?r.mText.textContent=n:r.mText.innerText=n,$(r)),r._title=n)}function w(i,o,s){i&&i.switchStyle||j();var h=i.options,u=f.merge(d.clone(C),i.switchStyle,!0);d.isSupportSVG()||u.style.color&&(u.style.color=m.colorToHex(u.style.color));var c=u.color,g=e(h); +lt=s,ht=u.type,Tt=h.length,at=a(c),ut=ut||p.create("div","vanchart-menu",s),pt=pt||p.create("div","vanchart-cc",s),s.style.overflow="hidden",Pt.doLayout(s),o.splice(Tt).map(function(t){t.remove()}),ct.splice(Tt).map(function(t){p.remove(t)}),yt.splice(Tt).map(function(t){p.remove(t)}),xt=xt>=Tt?0:xt;var v=E(),y=O();switch(ht){case _.CAROUSEL:case _.NO_ARROW:ut.style.bottom=0,ut.style.height="18px",ut.style.width=v+"px",ut.mWrap=ut.mWrap||p.create("div","vanchart-menu-wrap",ut),pt.style.cssText="top:0;bottom: 18px;left:"+-xt*v+"px;width:"+Tt*v+"px;height:"+y+"px;"; +var x=ot=u.interval;if(t.isMobileFlow()||(Mt.dom&&(M.off(s,g?"touchstart":"mouseover",Z),M.off(s,g?"touchend":"mouseout",q)),Mt.dom=M.on(s,g?"touchstart":"mouseover",Z).on(s,g?"touchend":"mouseout",q)),j(x),_.NO_ARROW===ht){return k(h,o)}dt=dt||p.create("div","vanchart-arrow-wrap",s),ft=ft||p.create("div","vanchart-arrow-wrap",s),dt.style.left=ft.style.right=0,dt.style.textAlign=ft.style.textAlign="left";var T=dt.arrowLeft=dt.arrowLeft||p.create("div","vanchart-arrow vanchart-arrow-left",dt),b=ft.arrowRight=ft.arrowRight||p.create("div","vanchart-arrow vanchart-arrow-right",ft); +return l(T,c),l(b,c),Mt.left&&Mt.left.off("tap"),Mt.left=Mt.left||new M(T),Mt.left.on("tap",function(t){t.preventDefault(),j(x);var e=(Tt+xt-1)%Tt;W(e,_.LEFT),X(e)}),Mt.right&&Mt.right.off("tap"),Mt.right=Mt.right||new M(b),Mt.right.on("tap",function(t){t.preventDefault(),j(x);var e=(xt+1)%Tt;W(e,_.RIGHT),X(e)}),k(h,o);case _.BUTTON:default:var A=r(c),L="width:100%;top:0;z-index:1;background-color:"+c+";filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="+A+", endColorstr="+m.colorToHex(c)+", GradientType=0);"; +L+="background-image: -webkit-gradient(linear, left top, left bottom, from("+A+"), to("+c+"));",L+="background-image: -moz-linear-gradient(top"+A+", "+c+");",L+="background-image: -webkit-linear-gradient(top"+A+", "+c+");",L+="background-image: linear-gradient(to bottom"+A+", "+c+");",ut.style.cssText=L,n(ut,u.style),Ct=d.getTextHeight(u.style);var P=S();return pt.style.cssText="top:"+P+"px;bottom: 0;left:"+-xt*v+"px;width:"+Tt*v+"px;height:"+y+"px;",B(h,o,u.style.color,a(c))}}function S(){return Ct*b +}function E(){return d.getDomWidth(lt)}function O(){return d.getDomHeight(lt)-(ht===_.BUTTON?S():18)}function R(){var t=E()/Tt;return wt&&7==document.documentMode&&(t-=2*Ct+1),t}function k(t,e){var i=E(),n=O();gt=gt||p.create("div","vanchart-chart",pt),gt.style.width=i+"px",gt.style.marginLeft=-i+"px",gt.style.height=n+"px";var r=t.map(function(t,i){return D(t,i),z(t,e[i],yt[i],i)});return vt=vt||p.create("div","vanchart-chart",pt),vt.style.width=i+"px",vt.style.marginRight=-i+"px",vt.style.height=n+"px",r +}function D(t,e){var n=i(t),r=ct[e];if(!yt[e]){if(yt[e]=p.create("div","vanchart-chart",pt),ct[e]=r=p.create("div","vanchart-menu-dot",ut.mWrap),!d.isSupportSVG()){r.style.background="none";var a=p.create("div","vanchart-menu-dot-ie",r);u(a)}e||o(r,"van-on")}yt[e].style.height=O()+"px",r._title=n,r.i=e,M.on(r,"mouseover",function(){I(r)}),M.on(r,"mouseout",function(){Pt.immediateHide()}),new M(r).on("tap",function(t){t.preventDefault(),c()&&I(r),W(e),X(e)})}function I(t){var e=Pt.calculateTooltipDivDim(L,t._title),i=[lt.clientWidth/2-(Tt-1)/2*16+16*t.i-e.width/2,lt.clientHeight-18-e.height]; +i[0]=Math.min(Math.max(i[0],0),lt.clientWidth-e.width),g(i,L,t._title)}function B(t,e,i,n){return t.map(function(t,r){return N(t,r,i,n),z(t,e[r],yt[r],r)})}function N(t,e,n,r){var a=i(t),o=ct[e];yt[e]||(yt[e]=p.create("div","vanchart-chart",pt),yt[e].style.height=O()+"px",ct[e]=o=p.create("div","vanchart-menu-btn",ut),o.mIcon=p.create("span","vanchart-menu-icon",o),o.mText=p.create("span","vanchart-menu-text",o),d.isSupportSVG()||o.insertAdjacentHTML("afterBegin",''),e||(o.style.background=r)),yt[e].style.height=O()+"px",h(o.mIcon,t.chartType,n); +var s=R();o.style.width=s+"px",0!==o.offsetTop&&(s-=1,o.style.width=s+"px"),o.mText.textContent=a,o.mText.innerText=a,o._title=a,o.i=e,$(o),M.on(o,"mouseover",function(){o.style.background=r,H(o)}),M.on(o,"mouseout",function(){xt!==e&&(o.style.background=""),Pt.immediateHide()}),new M(o).on("tap",function(t){t.preventDefault(),c()&&H(o),G(e),X(e)})}function G(t){ct[t]&&(ct[xt].style.background="",ct[t].style.background=at)}function F(t){var e=t._title,i=t.mText,n=d.getComputedStyle(i,"font-size font-family"),r=d.getTextDimension(e,n,!0).width; +return r>i.scrollWidth}function H(t){var e=!1;if(e=d.isSupportSVG()&&!P?t.scrollWidth>t.clientWidth:F(t),e||""===t.mText.innerHTML){var i=Pt.calculateTooltipDivDim(L,t._title),n=[lt.clientWidth*(t.i+0.5)/Tt-i.width/2,t.offsetHeight];n[0]=Math.min(Math.max(n[0],0),lt.clientWidth-i.width),g(n,L,t._title)}}function z(e,i,n,r){n.style.width=E()+"px",n.style.overflow="hidden";var a,o=n;return r===Tt-1?(mt?mt.style.cssText="width:"+E()+"px;height:"+O()+"px;":mt=U(n),o=mt):0===r&&(_t?_t.style.cssText="width:"+E()+"px;height:"+O()+"px;":_t=U(n),o=_t),o.style.width=E()+"px",o.style.height=O()+"px",a=t._initSingle(e,i,o),r!==xt&&a.set({enable:!1}),a +}function U(t){var e=p.create("div","vanchart-chart-wrap",t);return e.style.cssText="width:"+E()+"px;height:"+O()+"px;",e}function V(){yt[0].appendChild(_t),yt[Tt-1].appendChild(mt)}function W(t,e){var i;e===_.RIGHT&&xt===Tt-1&&0===t?(yt[0].appendChild(_t),gt&>.appendChild(mt),pt.style.left=E()+"px",i=pt.clientWidth):e===_.LEFT&&0===xt&&t===Tt-1?(yt[Tt-1].appendChild(mt),vt&&vt.appendChild(_t),pt.style.left=-Tt*E()+"px",i=pt.clientWidth):V()}function X(e){s(ct[xt],"van-on"),t.charts[xt]&&t.charts[xt].set({enable:!1}),o(ct[e],"van-on"),t.charts[e]&&t.charts[e].set({enable:!0}); +var i=E(),n=y.css.swing;Y(pt,"left",-e*i+"px",500,n),xt=e}function Y(t,e,i,n,r){function a(){c=+new Date-f,c>=n?(u=h,t.style[e]=u+l,Lt=null):(u=o+(h-o)*r(c/n),t.style[e]=u+l,At=d.requestAnimFrame(a))}d.cancelAnimFrame(At);var o=parseFloat(t.style[e])||0,s=i.match(/([\d.E-]+)(.*)/i),h=+s[1],l=s[2],u=o,c=0,f=+new Date;a(),Lt=function(){d.cancelAnimationFrame(At),t.style[e]=h+l}}function Z(){j()}function q(){j(ot)}function j(e){d.clearInterval(bt),t.shouldCarouselRun()&&e&&(bt=d.setInterval(function(){return document.body.contains(lt)?void K(1):void d.clearInterval(bt) +},e))}function Q(t){j(),K(t),j(ot)}function K(t){t=t||1;var e=1===t?_.RIGHT:_.LEFT,i=xt+t,n=(0>i?i+Tt:i)%Tt;W(n,e),G(n),X(n)}function J(t){t=Math.abs(t)%Tt||0,j(),W(t,t>xt?_.RIGHT:_.LEFT),G(t),X(t),j(ot)}function $(t){R()<=22+3*Ct&&(t.mText.innerHTML="",t.mText.style.marginLeft=0,wt||(t.style.padding=0))}function tt(t){return 0>t?1:t>0?-1:0}function et(){var t=St-Et*-E();Math.abs(t)>kt?(Ot=Et+tt(t),Ot=Math.max(0,Math.min(Ot,Tt-1))):Ot=Et}function it(t){pt&&(Et=t.chartIndex,St=parseFloat(pt.style.left),Rt=t.srcEvent.deltaX) +}function nt(t){if(!(0>Et)){var e=t.srcEvent.deltaX,i=E(),n=-i*(Tt-1);St+=e,St=Math.max(n,Math.min(St,0)),pt.style.left=St+"px",et(St),e&&(Rt=e)}}function rt(t){0>Et||0>Ot||(Ot-Et!==tt(Rt)&&(Ot=Et),G(Ot),X(Ot),Et=Ot=-1)}var at,ot,st,ht=null,lt=null,ut=null,ct=[],dt=null,ft=null,pt=null,gt=null,mt=null,vt=null,_t=null,yt=[],xt=0,Tt=0,bt=null,At=null,Ct=0,Lt=null,Mt={left:null,right:null,dom:null},Pt=new T({},_.TOOLBAR_COMPONENT,{}),wt=/MSIE 7/.test(navigator.userAgent),St=0,Et=-1,Ot=-1,Rt=0,kt=80; +return{init:w,refresh:v,onlyRefreshTitle:x,switchChartAndRestTimer:Q,showIndexChartAndRestTimer:J,getIndex:function(){return xt},stop:function(){Lt&&Lt(),Z(),V()},resume:function(){q()},panstart:it,panmove:nt,panend:rt,removeCarouselInterval:Z}},S={};S[_.PIE_CHART]=' ',S[_.BAR_CHART]=' ',S[_.COLUMN_CHART]=' ',S[_.LINE_CHART]='',S[_.AREA_CHART]=' ',S[_.GAUGE_CHART]=' ',S[_.RADAR_CHART]=' ',S[_.SCATTER_CHART]=' ',S[_.BUBBLE_CHART]=S[_.FORCE_BUBBLE_CHART]=' ',S[""]=S[_.MULTI_CHARTS]=' ',S[_.MULTIPIE_CHART]=' ',S[_.AREA_MAP]=S[_.HEAT_MAP]=S[_.POINT_MAP]=S[_.LINE_MAP]='',S[_.TREEMAP_CHART]=' ',S[_.FUNNEL_CHART]=' ',S[_.GANTT_CHART]=' ',S[_.STRUCTURE_CHART]='',S[_.WORD_CLOUD_CHART]=''; +var E={};E[_.PIE_CHART]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWBAMAAAA2mnEIAAAAMFBMVEUAAAD///////////////////////////////////////////////////////////87TQQwAAAAD3RSTlMAEM/vv4Bgr59AcFAg348jFhddAAAAjElEQVQY02MAArGSDx6JDGDAav//w//PASAmo/5/IPv/JwEgW/g/mP1fEcjWh7I/AVX/h7L/L2AQhrMvMOTD2b8Z6uHsfwz+ULZK1ByG/2B25smtLfYQ9hewLEQNRACoFwZ+AM2EgW9Au2DAkIEVzg6AuO0/xG1wRYpgv0CEBaB+/A/2I8Tv/zVAfgcA4kmspsM258YAAAAASUVORK5CYII=",E[_.BAR_CHART]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWBAMAAAA2mnEIAAAAElBMVEUAAAD///////////////////8+Uq06AAAABXRSTlMAQIAgEDB5ccoAAAA+SURBVBjTY0AGoqGhgTjZBICjoKCgCFw9SAMm20hJSUkZlwFwNWAgANELBgrobEdBMDDAZQZEPRQI4GQjAwAQhxXw9o2YjgAAAABJRU5ErkJggg==",E[_.COLUMN_CHART]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWBAMAAAA2mnEIAAAAG1BMVEUAAAD////////////////////////////////rTT7CAAAACHRSTlMAgEC/IGCPMNAZ/cwAAAAuSURBVBjTY4ADRSEEW6KRALvYDMHWaCbAtmgiwHZSgbOBiG5skJcDRRgcRYEMADB5J9shBWGXAAAAAElFTkSuQmCC",E[_.LINE_CHART]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAMAAADzapwJAAAAM1BMVEUAAAD///////////////////////////////////////////////////////////////+3leKCAAAAEHRSTlMA74C/IM9AEN+vYDCfcFCP7HfXwgAAAG9JREFUGNPNjzsOxDAIRA0Yf+J1du5/2siKIQ1dmlA9PQ2gSa8nHznSBIo0gOgGlAPdm+M4HQuK4Qn8jEU88QdoZw6MZ0+lQ/Li5muDFpYGrokpu9UbJjUmtqaqdQeqAN2aYln7hx41nbwzLDN9Yi4tRQMa2y+S7gAAAABJRU5ErkJggg==",E[_.AREA_CHART]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAAgklEQVR42mL4DwQMtACjBg8zg4FCBhRbiMPg+f8hIIFqBiMZCgMGFBuMxVAQeE+q4UD1AnCDgVT/f9zgPlgxcYaC4uc8Ayws/xMG5wkZDjX0Pdix/0kD8/EY6gAzlByDsRqOzcfkGIySDHEFIyMFGWEClC7AJslIqyw9avAQNhggwABVPsGVrLOsUQAAAABJRU5ErkJggg==",E[_.GAUGE_CHART]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWBAMAAAA2mnEIAAAAMFBMVEUAAAD///////////////////////////////////////////////////////////87TQQwAAAAD3RSTlMAgL9A3zAQn89wII/vr2A5/8HrAAAAnUlEQVQY02NAA5kq/52mQZjZ/0FgG4jJ6v/fXbDk/5cAIDvmvzJDKIPR/6MMDGz+HxkYjBkY5L8kMLD/FwCzGf8XMKz/xABmM+j/Ytj/GUjPBGL73wz9DUBaEIg5fjAAlYPYIA0M/ydA2ZxA9gMgfQaI+f5D1NyFqOm/AHUh7w+G/b+g7PXfGeK/Q9n1XxmYtKDsRQoMbHAvJTAQAQCj4DRASabatgAAAABJRU5ErkJggg==",E[_.RADAR_CHART]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAMAAADzapwJAAAAM1BMVEUAAAD///////////////////////////////////////////////////////////////+3leKCAAAAEHRSTlMAEO+A32DPr7+fQFAwIHCP1A0rdQAAAMpJREFUGNOFUFlyRCEIlEXcfdz/tAHxVSr5mOmyQJu2UdI39Mob/pOjcuOK9KeQmbPJbd3CS3oqblWQVpiqnEx00tYnjlXqemlo+ISqZHhwBN25AOih0aQDGxhNuI2QbmGh16ByKSLT9w/FAw6aar0v89zItKMhqzJan3tf8i4qe3aWvHxLE81LQ5IKZU7nImu2Y3gvhcQjvBGsLHTat9srTZ0n+V8Ap4fuYd+h4rxCMkNp6YIEwhZwNfkdeWG+fxIfxQsQfdHTB/wA4h0GZUKWX6QAAAAASUVORK5CYII=",E[_.SCATTER_CHART]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAAgUlEQVR42mJgGAVA8P//fwFaGFoAxP8ZaWCwAZByGHRhCPYuEKyntsH7oQb/x6WGhUyzF0LpCyMnoRtAkw+6uAMQnwdFIrlhfB5Ko6d3BSA2IDuMgS6aD8T9eDICeV6mNBzn/0eA+dQ0GB1QxeVMtExSDTQJCljBDMQKI7t6AggwAFyzgSCZYutPAAAAAElFTkSuQmCC",E[_.BUBBLE_CHART]=E[_.FORCE_BUBBLE_CHART]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAAnUlEQVR42mJgGAVQwEiswv///ysAqQQodwIjI+MHqrgAaPD7/wiwn1qGOvxHA1QLM1JdzEKC2YbIYUz31AANNgFqG9oPDar3TFR2sAGUFoCnUSCeD4oUKG1AposNgHg9ECdgTUpQEEBpuNzHYfB9Sg3GBwzINZdQ5H0YlEFhgJZd/0P5BhQXm9CckgBNfyDvbwAWiw9GaxWqAIAAAwA2evfwKvysMwAAAABJRU5ErkJggg==",E[""]=E[_.MULTI_CHARTS]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAMAAADzapwJAAAAM1BMVEUAAAD///////////////////////////////////////////////////////////////+3leKCAAAAEHRSTlMAQL/PMBBwgCDvn49gUN+vfvzE8AAAAGJJREFUGNPdjUEOgDAIBFkordpW+f9rNdqUQ3mBeyBhMiwURBNFYQu4HsK60E1aUNAlA+7sUgpQmdXMZh/vDORyPs8cJ+l4T7dEjhsPB8DE+bh0LD4IJkRO3K7Agj/xTzjKDUJoCsaJEKt8AAAAAElFTkSuQmCC",E[_.MULTIPIE_CHART]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAMAAADzapwJAAAAe1BMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////NgkbwAAAAKHRSTlMAMpkDn0AnIBSz24Dmv4dKOhoQCuzKrJqMLfnyuaZ5dGZaUkIN0pRsCVisMQAAAOZJREFUGNN90dtygyAUhWHWEhA0Gg8xappz0pb3f8LKdkrTXvS/45s9DHtQL8G6TP0qcxYKS3n2gm0UVX9ugblPatFca63IsX4AfdLtB0nF2BbIhHPcNVkV6jBo8Txqj2bkfheCCmG3eA08ZfhC/RYii483GZ9BDkF4qSBLYGE8NDeJw4mUx+DGlU2ssdY9ZeWrFl7bkHcI48gicUHdCFt4+sRHTrCRHcoT33+GL3Cy+wxPVvHlh4Hcfy/fwXi9nL0ntTfo1JqDmSrGqglxxeQw57Iszwbx4lSWYy3/+2td27ad4D99Ae8gE70h03waAAAAAElFTkSuQmCC",E[_.AREA_MAP]=E[_.HEAT_MAP]=E[_.POINT_MAP]=E[_.LINE_MAP]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAA5ElEQVR42mJgGHHg////AkDsAMQK1DZ4/38IeE/QcJACIDYgwlAHqIH/kQxvAOLz2BTPB0kA8X1CLoC6FtlgOEBXiA76QWGIx1cO/7GDfpCCAqjzcYH76MEC4hNQr8CAyys4QANUIzqAmbEe7kMcCkkF76HxooCeDqkB1mNLMtQAAdhyznkqGHwfawoikDKIBQ64EnwA1Ob9aLFNLFBgIDK7CpAQByDHNMD0s+AymJGR8QDUgngiyqIHQHwQiPlJLcHeIwXRe7QI+w/1mQLOMCZU7iKxQWXIfVoU7uS5blADgAADACOwXahZ5pbvAAAAAElFTkSuQmCC",E[_.TREEMAP_CHART]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAAOUlEQVR42mL8DwQMRABGIAAqnclAJGBioBEYNXjU4FGDh5XBLEDMRyuD1YhUe3Y08kYNHqQGAwQYAL9YCMfrIWhGAAAAAElFTkSuQmCC",E[_.FUNNEL_CHART]="iVBORw0KGgoAAAANSUhEUgAAABcAAAAXBAMAAAASBMmTAAAAKlBMVEUAAAD///////////////////////////////////////////////////+Gu8ovAAAADXRSTlMAQMCAIGAw0FAQ8HCwS1BQUgAAAHVJREFUGNNjwA2Y78LAZQYGDjjnKgMDC5xzDahuLYxzAcjRhXEKgJxEQShIAHIcYRwHIGcvTFkAkOML40wActih7DsgJ3Aj7ETYehPsuloIRwHT3UlKYNAAZMKMuzUBzGFEGAZxKkJ/LojjAOWwGhsbW2CYCwC1z2uuESf9qgAAAABJRU5ErkJggg==",E[_.GANTT_CHART]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAMAAADzapwJAAAAeFBMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////GqOSsAAAAJ3RSTlMABOgQCPvZzN3OhMOofnrCZD03jzDs0ryWiXNsXyUjDd9TUkQqHhgfRKpZAAAAmElEQVQY043P2Q6DIBRF0SsiKMrgXKfamf//w1qxQJo0uh73y8kBmEMDYxyA9SI1WrGB310+R9o4ie7mZW1zeXU5bBuaLKhQfQ4HBB7bgKOGbOJuqL45007G8p3MahJvLmVfLcXAjtncE8BEE3NrZXOhfXv5gXxgzaEH/nu2qZQyXUiajUqNavpdQ5wxVuafXEWWJoJzwYo3Z10TfT0w3LEAAAAASUVORK5CYII=",E[_.STRUCTURE_CHART]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAMAAADzapwJAAAAhFBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8g2+bRAAAAK3RSTlMAA/v3JXcSB9yNRSycF/Dsu7akmJSCTTMOC9HEwKWIWTof4taqoH1wZ1Ydf35d9gAAAO1JREFUGNNVUAlygzAMlA+wMZAQroTc6d3q///rYkHcahikWe+sdkVSitbhOQ2vOyu4/KUyZj4+0ft+gc9sNJdCnBrmSuCCNfuDkDPMHCIlbzS/k1MoUIzhG+D5s/UlKjr6wp6XHJhsHysVxh8K1b3vxJV4bTfM277LV5fSc88aywqalORZHRiGiW2UTfAFGErP9pVbnhz1wvZxT7rSnhEVS6+WqMzGiE7h8TiBzV1Z+fYTUwHcejan2mZDmCN/MPQ2NVEbu+g5oiPkNLQauaBTEvkKtR2mm/R0/3MR7/n9Nhz+xPifP0GL93SGVL8LLRIgop0Y4gAAAABJRU5ErkJggg==",E[_.WORD_CLOUD_CHART]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAACMUlEQVRIS7VUQXLaQBCckcRBXEAXqnY4YP8AvyDJD8IL4rwgzgvivCD2D+AFkBeYvCD4BSEHraq4gE+6UJpUU1plAYkCV3lPQhp6erp7lumNDr8RLl0MnGXZeyJ65wgVRbEIguDZGLP0SV4MnKbpPTN/q5n0q4g8uPevBmbmD8aY+Wq1Gm632xkRDUSkwjsCzrLsKgzDbq/XW9Tp7xg74PV63c3z/DcRJSLSPWJcFkyJCBriLKMoGh02aJLCNToCttaOiegTEY2iKFpiPFVd9/v9G5+5BzxR1SUzg+WtqmoQBDfOxEoKa+2GiOYi8hFAcD8Mw00TY5+h16wy0AdWInoUkTsAQxrHNM9zSITzqKrDMhV3zLwoigJ1SMoQ04oIjPyf4zRNF8zcEZFrfLDWIjpfVPW7i5eqwtCfDXGrSO0BY3RVfYJpRAQASDIpzRwQ0QsRdcCKmSGbO8vD5dgDxo8yk7dEhHHHqgqAqao+E9GsZDoREdTAh6vS8F2KjDEgsjsnF8QlhZk/w1hV/YNm7Xb7OkmSjTflL5AhoicRGZ0ELnO9RlEcxwmArLVz3BNoZIwZO2BsnLUW0k1dbSNjay3S8cPPsHuGici3D+yezwGGiQPoe2AWRu4gx2gEw5n5XlWh+18R2W1uLePSROz/i7//fgyRGAAWRbEzEs3jOB5DskZgb733suklB00r7evkqmUMfVW1GwTBuC6j7nur1Zo13YIX38d17M5mfO6fT9X9A37JPSaAohB+AAAAAElFTkSuQmCC"; +var O="position:absolute;width:1px;height:1px;behavior:url(#default#VML);";return w}),define("ShowEmptyInterface",["require","./utils/BaseUtils","./vector/SvgRenderer","./vector/VmlRenderer","./locale/localeText","./dom/DomUtils"],function(t){function e(t){var e=t.dom,s=t.emptyDataTip,h=t.chartWidth||200,l=t.chartHeight||200,u=t.chart;if(e&&s&&s.enabled){u||(i.initConst(),u={options:{plotOptions:{animation:!0}}},u.getSize=function(){return[h,l]}),t.language&&a.setLocale(t.language);var c=document.createElement("div"); +c.style.cssText+=";position:absolute;width:100%;height:100%;left:0;top:0;pointer-events:none",c.onselectstart=c.onmousemove=c.ondrag=i.falseFn,e.appendChild(c);var d=i.isSupportSVG()?new n(c,u):new r(c,u);d.onAdd();var f=10,p=5,g=d.group().add();d.clip(g,d.createClip({x:0,y:0,width:h,height:l}));var m=s.emptyDataImage;if(m){var v=m.width,_=m.height,y=m.src;return d.image().addTo(g).attr({width:v,height:_,x:(h-v)/2,y:(l-_)/2,preserveAspectRatio:"none"}).imageContent(y),d}var x=[{d:"M108.5,47.4l-7.7,57.2c-10.7,9.4-25.9,15-41.4,15c-14.1,0.1-27.7-4.8-38.5-13.8l11.8-86.5c0.7-5.3,5.6-9,11-8.3c0,0,0.1,0,0.1,0L85.5,17L108.5,47.4z",fill:"#fff"},{d:"M108.5,47.4l-16.4-2c-5.6-0.8-9.4-5.9-8.6-11.4L85.7,17L108.5,47.4z",fill:"#F4F4F4"},{d:"M6.2,29.7C1.6,31.5-0.7,36.6,1,41.2L2.1,44l20,52.8l10.5-77L8.7,28.8L6.2,29.7z",fill:"#979797"},{d:"M71.4,14.5C69.7,9.9,64.6,7.6,60,9.3l-7.6,2.9l19.3,2.7L71.4,14.5z",fill:"#979797"},{d:"M53,74.6c-1.2,3.4-1,7.2,0.6,10.4l2.9-1.4c-0.9-2.5-0.8-5.3,0.1-7.8c1.6-4.2,4.2-5.2,4.2-5.2l-2.2-2.9C58.7,67.6,55,69.1,53,74.6z",fill:"#DDDDDD"},{d:"M91.4,79.2c0-13.2-10.7-23.9-24-23.9c-13.2,0-24,10.7-24,23.9c0,13.2,10.7,23.9,24,23.9c4.7,0,9.2-1.4,13.2-3.9l6.4,7.6l2.7-2.2l-6.3-7.5C88.4,92.5,91.3,86,91.4,79.2z M67.4,98c-10.4,0-18.9-8.4-18.9-18.8s8.5-18.8,18.9-18.8s18.9,8.4,18.9,18.8C86.3,89.6,77.9,98,67.4,98C67.4,98,67.4,98,67.4,98z",fill:"#DDDDDD"},{d:"M105.3,118.4l-8.9-10.2l-0.6-0.7l-2-2.4c-0.8-1-2.3-1.1-3.3-0.2c0,0,0,0,0,0l-3.1,2.7c-1,0.8-1.1,2.3-0.2,3.3c0,0,0,0,0,0l0.9,1.1l0.7,0.8l10,11.4c0.8,1,2.3,1.1,3.3,0.2c0,0,0,0,0,0l3.1-2.7C106,120.8,106.1,119.4,105.3,118.4z",fill:"#DDDDDD"},{d:"M59.9,0c-21,0-40.6,10.9-51.5,28.8l24.3-9.2v-0.1c0.8-5.4,5.8-9.2,11.2-8.4l8.4,1.2l7.6-2.9c4.6-1.7,9.7,0.6,11.5,5.1l0.1,0.4l13,1.8l0.8,0.1l23.1,30.6l-0.1,0.9l-7.4,55c-1.7,1.4-3.5,2.8-5.3,4.1l0.6,0.7c1.6-1.2,3.1-2.3,4.6-3.6l0,0C113.1,93.1,120.1,77,120,60.1c0.2-33-26.5-60-59.7-60.1C60.2,0,60,0,59.9,0z",fill:"#DDDDDD"},{d:"M59.5,118.2c-14,0.1-27.5-4.6-38.4-13.4c0.1-0.4,0.1-0.7,0.2-1.3l0.9-6.6l-20-52.5C0.7,49.6,0,55,0,60.4c-0.2,17.5,7.5,34.2,20.9,45.4l0,0c10.8,9,24.4,13.8,38.4,13.7c10.1,0,20.1-2.4,29.2-6.8l-0.7-0.8C79,116,69.3,118.2,59.5,118.2z",fill:"#DDDDDD"}],T=120,b=125,A=T,C=b+f; +s.content=s.content||[];var L=s.content.map(function(t){var e=a.i18nText("emptyDataTip"),n=i.convertToREMUseDefault16PX(t.style),r=i.getTextDimension(e,n,!1);return A=Math.max(A,r.width),{text:e,style:n,width:r.width,height:r.height}}),M=d.group().attr("transform","translate("+(A-T)/2+",0)").addTo(g);x.forEach(function(t){var e=d.path().addTo(M);e.attr({d:t.d,fill:t.fill})}),L.forEach(function(t,e,i){var n=(A-t.width)/2,r=C;C+=t.height+(e===i.length-1?0:p);var a=d.text().addTo(g);a.textContent(t.text).style(t.style).attr({dy:0.85*t.height,transform:"translate("+n+","+r+")"}) +});var P=(h-A)/2,w=(l-C)/2;return g.attr("transform","translate("+P+","+w+")"),c.remove=function(){d&&d.remove(),c&&o.remove(c),c=null},c}}var i=t("./utils/BaseUtils"),n=t("./vector/SvgRenderer"),r=t("./vector/VmlRenderer"),a=t("./locale/localeText"),o=t("./dom/DomUtils");return e}),define("VanCharts",["require","./vans/VanChart","./vans/VanChartMap","./vans/VanChartForceBubble","./vans/VanChartWordCloud","./vans/VanChartStructure","./chart/gantt/Gantt","./utils/BaseUtils","./Constants","./utils/LoadingUtils","./Carousel","./vans/VanChartLibrary","./dom/Evented","./utils/TouchEventHelper","./ShowEmptyInterface"],function(t){function e(t){p.initConst(); +var e=t.getAttribute(g.INSTANCES_KEY);e||(e=g.INSTANCES_KEY+C++,t.setAttribute(g.INSTANCES_KEY,e));var n=L[e]||new i(t);return L[e]=n,s(),n}function i(t){this.dom=t,this.charts=[],this.carousel=v&&v(this),this.dom.style.cssText+=";overflow:hidden;-ms-user-select:none;-webkit-user-select:none;-moz-user-select:none;-o-user-select:none;user-select:none;",this.dom.onselectstart=this.dom.ondrag=function(){return !1},this._isMobileFlow=null,this._drillDownPoint=null,this._drillUpPoint=null,this._shouldCarouselRun=!0,this._orientation=null,this._setOrientationByBrowser(),this.emitter=new y,this._registerEvent() +}function n(t){p.initPaddingScale(t)}function r(){var t,e;try{e=window.top.document,t=window.top;var i=e.fullscreenElement||e.mozFullScreenElement||e.webkitFullscreenElement||e.msFullscreenElement;if(i){for(t=window,e=t.document;t.parent&&t!==t.parent&&!t.parent.document.contains(i);){t=t.parent,e=t.document}}}catch(n){t=window,e=t.document}return{w:t,d:e}}function a(t,n){var a=t.options,s=r(),h=s.w,l=s.d,u=l.body,c=3330;if(null==n){for(var d,f=-1,g=document.body.children.length;++f1?this.charts[this.carousel.getIndex()]:this.charts[0]},shouldCarouselRun:function(){return this._shouldCarouselRun},_interactive:function(t){this.charts.forEach(function(e){t?e.handler.enable():e.handler.disable() +})},_registerEvent:function(){var t=this;this.on("enable",function(e){if(t.isMobileFlow()&&(t.charts.length>1&&(t._shouldCarouselRun=!1,t.carousel.stop()),t._interactive(!0),e&&e.x>0&&e.y>0)){var i=t.getChartNow().handler.proxy;if(t.charts.length>1){var n=t.dom.getBoundingClientRect(),r=i.dom.getBoundingClientRect(),a=r.top-n.top;a>0&&(e.y-=a)}i.dispatch({type:"touchstart",touches:[e]}),i.dispatch({type:"touchend",touches:[e]})}}),this.on("disable",function(){t.isMobileFlow()&&(t.getChartNow().handler.fire("pointCancel"),t._interactive(!1),t.charts.length>1&&(t._shouldCarouselRun=!0,t.carousel.resume())) +}),this.on("pointCancel",function(){t.isMobileFlow()&&(t._drillDownPoint=null,t.getChartNow().handler.fire("pointCancel"))}),this.on("orientationChange",function(e){t.isMobileFlow()&&(e?(e=e.toLowerCase(),e=e.indexOf(b)?b:A,t._orientation=e):t._setOrientationByBrowser(),t.getChartNow().changeOrientation(t.getOrientation()))}),this.on("carouselpanstart",function(e){t.isMobileFlow()&&(e.chartIndex=t.charts.indexOf(e.chart),t.carousel.panstart(e))}),this.on("carouselpanmove",function(e){t.isMobileFlow()&&t.carousel.panmove(e) +}),this.on("carouselpanend",function(e){t.isMobileFlow()&&t.carousel.panend(e)}),this.on("drill",function(e){e&&e.type&&(clearTimeout(t._drillTimeout),t._drillTimeout=setTimeout(function(){if("down"===e.type.toLowerCase()){var i=t._drillDownPoint;i&&(i.series.drillDown?i.series.drillDown(i):i.series.vanchart&&i.series.vanchart.drillDown(i),t._drillDownPoint=null)}else{var i=t._drillUpPoint;i&&i.drillUpDataPoint&&(i.drillUpDataPoint.series.vanchart.drillUp(i),t._drillUpPoint=null)}},0))}),this.on("sort",function(e){var i=e.order; +switch(i){case 0:t.eachVanChart(function(t){t.clearAllEffects(),t.refreshRestore()});break;case 1:case -1:t.eachVanChart(function(t){t.sortChart(i)})}})},holdDrillDownPoint:function(t){this._drillDownPoint=t},holdDrillUpPoint:function(t){this._drillUpPoint=t},__devZoom:function(t,e){var i=this.charts[0];t=t||{x:200,y:200},e=e||{x:1.5,y:1},i.handler.__hover.onmultipointstart({stop:function(){},srcEvent:{touches:[{pageX:t.x,pageY:t.y},{pageX:t.x,pageY:t.y}]}}),i.handler.__hover.onpinch({stop:function(){},srcEvent:{zoomX:e.x,zoomY:e.y}}),i.handler.__hover.onmultipointend() +},handleTouchEnd:function(t){if("Up"===t.direction||"Down"===t.direction){var e=this.getScrollBounds();e.shouldNativeHandle&&(delete e.shouldParentHandle,this.trigger(T,e))}},getScrollBounds:function(){var t=(this.options,this.getChartNow().getScrollBounds());return t.shouldParentHandle&&"middle"!==t.verticalEdge&&(t.shouldNativeHandle=!0),t},setOptions:function(t){null==this.isMobileFlow()&&(this._isMobileFlow=this._checkMobileFlow(t)),this.isMobileFlow()&&(p.initPaddingScale(0.85),p.calculateFontSizeWithScale=p._mutateMobileFlowFontStyle,t&&t.switchStyle&&t.switchStyle.type===g.CAROUSEL&&(t.switchStyle.type=g.NO_ARROW)),this.options=t||this.options,t&&p.isArray(t.options)?this.charts=this.carousel.init(t,this.charts,this.dom):this.charts=[this._initSingle(t,this.charts[0],this.dom)] +},_checkMobileFlow:function(t){if(t){if(t=t.options?t.options[0]:t,!t){return !1}var e=null==t.mobile?p.hasTouch():t.mobile;return e&&"flow"===t.reportType}},isMobileFlow:function(){return this._isMobileFlow},_setOrientationByBrowser:function(){return this._orientation=window.orientation?A:b},getOrientation:function(){return this._orientation},showLightBox:function(t){a(t)},hideLightBox:function(t,e){o(t,e)},_initSingle:function(t,e,i){var n=_.get(t.chartType);return e&&e.vanChartType===n.prototype.vanChartType?(e._changeDataState=!0,e.refresh(t),e):(e&&e.remove(),new n(t,i,this)) +},setData:function(t,e){t.add||t.update||t.remove?this.setAutoRefreshData(t,e):null!=e?this.charts[e]=this.carousel.refresh(t,e):this.setOptions(t)},setAutoRefreshData:function(t,e){return e=e||0,this.charts[e]?(this.carousel.onlyRefreshTitle(t.option,e),void this.charts[e].autoRefresh(t,e)):void (window.console&&window.console.warn&&console.warn("setAutoRefreshData index:",e,"exceeds the number of chart."))},eachVanChart:function(t){this.charts&&this.charts.forEach(function(e){t.call(null,e)})},refreshRestore:function(){this.eachVanChart(function(t){t.refreshRestore() +})},resize:function(t){this.isMobileFlow()?(this._setOrientationByBrowser(),t=this.options,this.setOptions(t),this.charts.forEach(function(t){t.resize()})):t?this.setOptions(t):(t=this.options,p.isArray(t.options)&&this.setOptions(t),this.charts.forEach(function(t){t.resize()}))},getChart:function(t){return this.charts[t]},clear:function(){clearTimeout(this._drillTimeout),this.carousel&&this.carousel.removeCarouselInterval();for(var t=0,e=this.charts.length;e>t;t++){this.charts[t]&&this.charts[t].remove(),this.charts[t]=null +}this.charts=[]},startLoading:function(){this.dom&&m.startLoading(this.dom,this.dom.getAttribute(g.INSTANCES_KEY))},endLoading:function(){this.dom&&m.endLoading(this.dom,this.dom.getAttribute(g.INSTANCES_KEY))}},window.VanCharts={version:"8.5.0",buildTime:"2019-7-25 10:15:07 GMT+0800 (GMT+08:00)",showLightBox:a,hideLightBox:o,init:e,initPaddingScale:n,acceptPoint:l,instances:L,bindTouchEventListener:u,unifiedSwitchCarouselChart:c,simulatePanStart:d,showEmptyDataTip:t("./ShowEmptyInterface"),hideFullScreenChart:h} +}),define("chart/Bar",["require","../utils/BaseUtils","../utils/ColorUtils","../Constants","../utils/BezierEasing","./Series","../ComponentLibrary","../dom/Browser","../ChartLibrary","../ChartLibrary"],function(t){var e=t("../utils/BaseUtils"),i=t("../utils/ColorUtils"),n=t("../Constants"),r=t("../utils/BezierEasing"),a=t("./Series"),o=t("../ComponentLibrary"),s=(t("../dom/Browser"),1200),h=r.css["ease-out-cubic"],l=150,u=r.css["ease-in-back"],c=250,d=r.custom["ease-out"],f=900,p=r.custom["ease-out-quint"],g=600,m=r.css["ease-out-cubic"],v=100,_="ease-out-in",y=6,x=0.35,T=1,b=3,A=1,C=1,L=a.extend({doLayout:function(){var t=this.getSeriesOffsetAndWidth(),i=this,r=i.vanchart,a=i.type==n.COLUMN_CHART,s=r.isInverted(),h="x",l="y"; +a||(h="y",l="x");var u=a&&!s||!a&&s,c=i[h+"Axis"],d=i[l+"Axis"],f=d.getZeroPos(),p=0;c.isOnZero()&&(p=c.options.lineWidth);var g=this.getAxisLineWidth(o.X_AXIS_COMPONENT),m=this.getAxisLineWidth(o.Y_AXIS_COMPONENT);this.points.forEach(function(n){var r=n.options,o=c.scale(c.getAxisValue(r[h],n));if(!isNaN(o)){var v=r[l+"0"];v=d.isLog()&&v>1?v-1:v;var _=d.scale(v),y=d.scale(d.getAxisValue(r[l],n)+r[l+"0"]-(d.isLog()?1:0));_===1/0&&(_=d.scale.range()[0]);var x,T,b,A;x=o+t.offset-t.width/2,T=Math.min(_,y),b=t.width,A=Math.abs(_-y),T===f?(T+=p/2,A-=p/2):T+A===f&&(A-=p/2); +var L=C+(u?g:m)/2;T=A>L?T:u?T-L:T,A=Math.max(A,L);var M={};u?(M.x=x,M.y=T,M.width=b,M.height=A):(M.x=T,M.y=x,M.width=A,M.height=b),n.rect=e.rectSubPixelOpt(M,r.borderWidth),n.rect.rx=n.rect.ry=n.options.borderRadius,n.isNull||i._calculateAnimationInitRect(n,a,s)}})},getSeriesOffsetAndWidth:function(){var t=this,i=t.options,n=0,r={},a=0,o=0,s=this.vanchart.seriesOfType(this.type),h=this.getBaseAxisType();s.forEach(function(e){e[h]==t[h]&&e.visible&&(e.stack&&!r[e.stack]?(n++,r[e.stack]=!0,t.stack&&t.stack==e.stack&&(a=n-1)):e.stack||(n++,t==e&&(a=n-1))),e[h]==t[h]&&(o+=e.points.length) +});var l=t[h],u=0,c=0;if(l.isCategory()){var d=i.categoryGap,f=i.gap,p=l.getTickLength();d=e.getPercentValue(d,p);var g,m=(p-d)/n,v=d/2+m*(a+0.5);parseFloat(f)>=0?(g=e.getPercentValue(f,m),c=v,u=m-g):(g=Math.abs(e.getPercentValue(f,p-d)),u=(p-d-g)/n,c=d/2+u*(a+0.5)+0.5*g,u+=g)}else{var _=l._getRange();_=Math.abs(_[1]-_[0]),u=_/o/3,c=0}return{width:e.hasDefined(i.width)?i.width:Math.max(u,A),offset:c}},_getPointKey:function(t){return this.isMultiCategoryAxisBased()?e.encodeCategoryArray(t.categoryArray):this.type===n.BAR_CHART?t.y:t.x +},getTargetKey:function(){return this.type===n.BAR_CHART?"x":"y"},getBaseAxisType:function(){return this.type===n.COLUMN_CHART?"xAxis":"yAxis"},getTrendLineXYValues:function(t){for(var e=[],i=[],r=t.points,a=t.type===n.COLUMN_CHART?t.yAxis:t.xAxis,o=t.type===n.COLUMN_CHART?t.xAxis:t.yAxis,s=o.isHorizontal(),h=a.isAxisReversed(),l=[],u=0,c=r.length;c>u;u++){var d=r[u];!d.isNull&&d.rect&&l.push(d.rect)}return l.sort(function(t,e){return s?t.x-e.x:t.y-e.y}),l.forEach(function(t){var n,r;s?(n=t.x+t.width/2,r=h?t.y+t.height:t.y):(n=h?t.x:t.x+t.width,r=t.y+t.height/2),e.push(n),i.push(r) +}),[e,i,o.getPosition()]},_calculateAnimationInitRect:function(t,e,i){var r,a,o=e?"y":"x",s=t.options,h=t.series[o+"Axis"],l=h.getAxisValue(s[o],t),u=h.getStartPos(),c=l>=0,d=e&&!i||!e&&i;d?c^h.isAxisReversed()?(r=n.BOTTOM_TO_TOP,a={x:t.rect.x,y:u,width:t.rect.width,height:0}):(r=n.TOP_TO_BOTTOM,a={x:t.rect.x,y:t.rect.y,width:t.rect.width,height:0}):c^h.isAxisReversed()?(r=n.LEFT_TO_RIGHT,a={x:t.rect.x,y:t.rect.y,width:0,height:t.rect.height}):(r=n.RIGHT_TO_LEFT,a={x:t.rect.x+t.rect.width,y:t.rect.y,width:0,height:t.rect.height}),t.location=r,t.initRect=a +},_calculateLabelPos:function(){var t=this;t.points.forEach(function(e){if(e.isVisible()){var i=e.options.dataLabels;i&&i.enabled&&(e.labelPos=t._calculateAlignLabelPos(e,i.align))}})},_calculateAlignLabelPos:function(t,e){var i=t.labelDim,r=t.rect,a=t.location===n.TOP_TO_BOTTOM||t.location===n.BOTTOM_TO_TOP,o=t.location===n.BOTTOM_TO_TOP||t.location===n.LEFT_TO_RIGHT,s=r.x+r.width/2,h=r.y+r.height/2;if(i){var l,u;switch(e){case n.CENTER:l=s-i.width/2,u=h-i.height/2;break;case n.INSIDE:a?(l=s-i.width/2,u=o?r.y+b:r.y+r.height-b-i.height):(u=h-i.height/2,l=o?r.x+r.width-b-i.width:r.x+b); +break;case n.OUTSIDE:a?(l=s-i.width/2,u=o?r.y-b-i.height:r.y+r.height+b):(u=h-i.height/2,l=o?r.x+r.width+b:r.x-b-i.width)}return{x:l,y:u}}},calcMoreLabelPosition:function(t,e){var i=this.type===n.COLUMN_CHART,r=this.vanchart.isInverted(),a=this.vanchart.bounds,o=0,s=0,h="top";return i&&!r||!i&&r?(o=t.rect.x+t.rect.width/2,s=t.rect.y):(o=t.rect.x+t.rect.width,s=t.rect.y+t.rect.height/2,h="right"),{startX:o+a.x,startY:s+a.y,direction:h}}});return L.include({_getFixedPos:function(t,e){var i,r,a=this.vanchart.bounds,o=t.rect,s=this._findMostFarthestStackColumn(t); +return 0===t.initRect.height?(i=a.x+o.x+o.width+T,t.location===n.BOTTOM_TO_TOP?(o=s.BOTTOM_TO_TOP,r=a.y+o.y):(o=s.TOP_TO_BOTTOM,r=a.y+o.y+o.height)):(r=a.y+o.y+o.height+T,t.location===n.LEFT_TO_RIGHT?(o=s.LEFT_TO_RIGHT,i=a.x+o.x+o.width-e.width):(o=s.RIGHT_TO_LEFT,i=a.x+o.x-e.width)),[i,r]},_findMostFarthestStackColumn:function(t){var e=t.rect,i=this,n={RIGHT_TO_LEFT:e,LEFT_TO_RIGHT:e,BOTTOM_TO_TOP:e,TOP_TO_BOTTOM:e},r=t.points.filter(function(t,e){return i.vanchart.series[e].visible&&t.rect});if(!this.stack||r.length<2||!t.isPointSupportTooltipShared()){return n +}var a=r.map(function(t){return t}).sort(function(t,e){return t.rect.x-e.rect.x}),o=r.map(function(t){return t}).sort(function(t,e){return t.rect.y-e.rect.y});return n={RIGHT_TO_LEFT:a.shift().rect,LEFT_TO_RIGHT:a.pop().rect,BOTTOM_TO_TOP:o.shift().rect,TOP_TO_BOTTOM:o.pop().rect}},getPointGraphicKey:function(){return"rect"},getFillFilter:function(t,r){if(e.isSupportSVG()){var a=this,o=r.options,s=a.vanchart,h=s.renderer;if(o.image){var l,u,c=r.rect;switch(r.location){case n.BOTTOM_TO_TOP:l=c.x,u=c.y+c.height%o.imageHeight; +break;case n.TOP_TO_BOTTOM:case n.LEFT_TO_RIGHT:l=c.x,u=c.y;break;case n.RIGHT_TO_LEFT:l=c.x+c.width%o.imageWidth,u=c.y}var d={x:l,y:u,width:o.imageWidth,height:o.imageHeight,patternUnits:"userSpaceOnUse"},f={x:0,y:0,width:o.imageWidth,height:o.imageHeight};return r.imagePattern?h.updateImagePattern(r.imagePattern,d,f,r.options.image):r.imagePattern=h.imagePattern(d,f,r.options.image),"url(#"+e.stamp(r.imagePattern)+")"}if(s.options.style===n.STYLE_GRADUAL){var p,g,m,v;switch(p=g=m=v="0%",r.location){case n.BOTTOM_TO_TOP:g="100%"; +break;case n.TOP_TO_BOTTOM:v="100%";break;case n.LEFT_TO_RIGHT:m="100%";break;case n.RIGHT_TO_LEFT:p="100%"}var _={x1:p,y1:g,x2:m,y2:v},y={offset:"0%","stop-color":t},x={offset:"100%","stop-color":i.getColorWithDivider(t,0.9)};return r.colorGradient?h.updateColorGradient(r.colorGradient,_,[y,x]):r.colorGradient=h.colorGradient(_,[y,x]),"url(#"+e.stamp(r.colorGradient)+")"}}return t},_calculateAnimationDelay:function(){return this.stack?0:this.updateDelay(l)},_getStackExitPointDropRect:function(t){var e=t.getStackPointPreSufPoint(t),i=e.pre,r=e.suf; +if(!i&&!r){return t.initRect}var a=(i?i:r).rect;switch(t.location){case n.BOTTOM_TO_TOP:return{x:a.x,y:i?a.y:a.y+a.height,width:a.width,height:0};case n.TOP_TO_BOTTOM:return{x:a.x,y:i?a.y+a.height:a.y,width:a.width,height:0};case n.LEFT_TO_RIGHT:return{x:i?a.x+a.width:a.x,y:a.y,width:0,height:a.height};case n.RIGHT_TO_LEFT:return{x:i?a.x:a.x+a.width,y:a.y,width:0,height:a.height}}},_getStackReShowPointInitRect:function(t){var e=t.getStackPointPreSufPoint(t),i=e.pre,r=e.suf;if(!i&&!r){return t.initRect +}var a=(i?i:r).graphic.node(),o=parseFloat(a.getAttribute("x")),s=parseFloat(a.getAttribute("y")),h=parseFloat(a.getAttribute("width")),l=parseFloat(a.getAttribute("height"));switch(t.location){case n.BOTTOM_TO_TOP:return{x:o,y:i?s:s+l,width:h,height:0};case n.TOP_TO_BOTTOM:return{x:o,y:i?s+l:s,width:h,height:0};case n.LEFT_TO_RIGHT:return{x:i?o+h:o,y:s,width:0,height:l};case n.RIGHT_TO_LEFT:return{x:i?o:o+h,y:s,width:0,height:l}}},getPointInitAttr:function(t){return t.initRect},getPointReShowAttr:function(t){var e=t.series; +return e.stack?e._getStackReShowPointInitRect(t):t.initRect},getPointInitAnimationAttr:function(t){return{ease:h,duration:s,attr:t.rect}},getPointReShowAnimationAttr:function(t){return t.series.stack?{ease:m,duration:g,attr:t.rect}:{ease:p,duration:f,attr:t.rect}},getPointUpdateAnimationAttr:function(t,e){return t.series.stack?{ease:m,duration:g,attr:t.rect}:{delay:e,ease:d,duration:c,attr:t.rect}},getPointDropAnimationAttr:function(t){var e=t.series;return e.stack?{ease:m,duration:g,attr:e._getStackExitPointDropRect(t)}:{ease:u,duration:l,attr:t.initRect} +},_onPointMouseOver:function(t){var e=t.series,i=e.getHighLightStyle(t);e._onState(t,i,!0)},_onPointMouseOut:function(t){var e=t.series,i=e.getStyle(t);e._onState(t,i,!1)},_onState:function(t,e,i){var a=t.series;t.graphic&&t.graphic.interrupt(n.SELECT_ANIMATION).transition(n.SELECT_ANIMATION).animate({duration:v,ease:_,style:e});var o=t.options,s=o.dataLabels,h=s.align;if(h===n.OUTSIDE){var l=0,u=0;if(i){switch(t.location){case n.BOTTOM_TO_TOP:u-=3;break;case n.TOP_TO_BOTTOM:u+=3;break;case n.LEFT_TO_RIGHT:l+=3; +break;case n.RIGHT_TO_LEFT:l-=3}}a._labelTransformState(t,l,u,i,v,_)}else{a._labelFontSizeState(t,i,v,r.css.ease)}},effectAnimation:function(t){function e(){return l.rect().addTo(u).attr(c).style(d)}function i(t){return 0.5*f*t}function r(t){return 0>t?0:t}function a(t,e,n){t.style(d).effectTransition().delay(e).ease("linear").duration(n).styleTween("stroke-opacity",function(){return function(t){return 0.8*(1-t)}}).styleTween("stroke-width",function(){return i}).attrTween("x",function(){return function(t){return c.x-i(t)/2+1 +}}).attrTween("y",function(){return function(t){return c.y-i(t)/2+1}}).attrTween("width",function(){return function(t){return r(c.width+i(t)-2)}}).attrTween("height",function(){return function(t){return r(c.height+i(t)-2)}})}var o=t.options,s=t.series,h=s.vanchart,l=h.renderer;if(!o.image){var u=s._getPointEffectGroup(t),c=t.rect,d={fill:"none",stroke:t.color,"stroke-opacity":0,"stroke-width":0},f=t.location===n.BOTTOM_TO_TOP||t.location===n.TOP_TO_BOTTOM?c.width:c.height,p=u.firstG=u.firstG||e(),g=u.secondG=u.secondG||e(),m=u.thirdG=u.thirdG||e(),v=s._getEffectTime(t),_=v/s.getDefaultEffectTime(); +a(p,0,1600*_),a(g,600*_,1600*_),a(m,1200*_,1600*_)}},getDefaultEffectTime:function(){return 2800},getHighLightStyle:function(t){return{stroke:t.mouseOverColor,fill:t.series.getFillFilter(t.mouseOverColor,t),"fill-opacity":t.opacity,"stroke-width":y,"stroke-opacity":0===t.opacity?0:x}},getPressedStyle:function(t){return{stroke:t.clickColor,fill:t.series.getFillFilter(t.clickColor,t),"fill-opacity":t.clickOpacity,"stroke-width":y,"stroke-opacity":0===t.opacity?0:x}},getAxisLineWidth:function(t){var e=this.vanchart.getComponent(t); +return e.options[0].lineWidth}}),t("../ChartLibrary").register(n.BAR_CHART,L),t("../ChartLibrary").register(n.COLUMN_CHART,L),L}),define("chart/PieSeries",["require","../utils/BaseUtils","./Series","../utils/PathGenerator","../utils/Interpolator","../Constants","../utils/BezierEasing","../utils/BoundsManager"],function(t){var e=t("../utils/BaseUtils"),i=t("./Series"),n=t("../utils/PathGenerator"),r=t("../utils/Interpolator"),a=1.1,o=t("../Constants"),s=t("../utils/BezierEasing"),h=t("../utils/BoundsManager"),l=2,u=[0.9,0.85,0.8,0.75,0.7,0.65,0.6,0.55,0.5],c="right-top",d="right-bottom",f="left-top",p="left-bottom",g=Math.PI/180; +return{calcOutsideLabel:function(t,e,i,n){var r=this,a={};if(t.map(function(t){var e=r.getLocByArc(r.getCenterAngle(t));a[e]=a[e]||[],!t.isNull&&a[e].push(t)}),n){return a=r.ignoreMin(a,n),r.placeOutSideLabels(a,n),n}n=Math.min(i[0]-e.x,e.x+e.width-i[0],i[1]-e.y,e.y+e.height-i[1]);for(var o=0,s=u.length;s>o;o++){var h=n*u[o],l=r.ignoreMin(a,h);if(r.placeOutSideLabels(l,h),r.testWithinBounds(l,i,e)){break}}return h},calculateInsideLabelBounds:function(t){var i=this;if(t.map(function(e,n){var r=t[n],a=i.getCenterPoint(r),o=a[0]-r.labelDim.width/2,s=a[1]-r.labelDim.height/2; +r.labelPos={x:o,y:s}}),this.vanchart.isMobileFlow()){var n=new h;t.map(function(t){if(t.labelPos){var i=e.makeBounds(t.labelPos,t.labelDim);n.isOverlapped(i)?t.labelPos=null:n.addBounds(i)}})}},calculateLeadLineStartPos:function(t){var e=this;t.map(function(t){var i=e._getOuterRadius(t),n=e.getCenterAngle(t);t.labelPos&&(t.labelPos.startPos={x:(i+1)*Math.sin(n),y:(i+1)*Math.cos(n+Math.PI)})})},getCenterAngle:function(t){var i=this.chartInfo.rotate||0,n=i+(this._getStartAngle(t)+this._getEndAngle(t))/2; +return e.makeValueInRange(0,2*Math.PI,n)},getCenterRadius:function(t){var e=this._getInnerRadius(t),i=this._getOuterRadius(t);return e+(i-e)/2},getCenterPoint:function(t){var e=this.getCenterAngle(t),i=this.getCenterRadius(t);return this._getArcPoint(i,e)},getLocByArc:function(t){return t%=2*Math.PI,ti;i++){var a=e[i].labelDim;r+=a.height}if(r>1.2*t){var o=r-1.2*t;for(e.sort(function(t,e){return t.value-e.value}),i=0,n=e.length;n>i&&!(0>o);i++){var s=e[i].labelDim.height;o-=s}e=e.slice(i,e.length)}var h=this;return e.sort(function(t,e){return h.getCenterAngle(t)-h.getCenterAngle(e)}),e},placeOutSideLabels:function(t,e){var i=this;Object.keys(t).map(function(n){i.findNiceBounds(!0,t[n],e,n)||i.findNiceBounds(!1,t[n],e,n)})},findNiceBounds:function(t,e,i,n){var r,a,o=1.2*i,s=0.1*i,h=this._getStartAndEndAngle(n),l=t?h.endAngle:h.startAngle,u=t?g:-g; +e.map(function(t){t.labelPos=null});for(var f=0,p=e.length;p>f;f++){var m=t?f:p-f-1,v=t?Math.max:Math.min,_=e[m],y=_.labelDim,x=this.getCenterAngle(_);x=a?v(x,a):x;for(var T=!1,b=x;t?l>=b:b>=l;b+=u){var A=o*Math.sin(b),C=o*Math.cos(b+Math.PI),L=this._getLabelBounds(n,A,C,s,y);if(r?!this._isOverlapOrShadow(r,L):!0){T=!0,a=b;break}}if(!T){return !1}var M,P={x:A,y:C};M=n==c||n==d?{x:A+s,y:C}:{x:A-s,y:C},r=L,_.labelPos={x:L.x,y:L.y,midPos:P,endPos:M}}return !0},_getStartAndEndAngle:function(t){switch(t){case c:return{startAngle:0,endAngle:Math.PI/2}; +case d:return{startAngle:Math.PI/2,endAngle:Math.PI};case p:return{startAngle:Math.PI,endAngle:3*Math.PI/2};case f:return{startAngle:3*Math.PI/2,endAngle:2*Math.PI}}},_getLabelBounds:function(t,e,i,n,r){var a,o;return a=t==c||t==d?e+n+l:e-n-l-r.width,o=i-r.height/2,{x:a,y:o,width:r.width,height:r.height}},_isOverlapOrShadow:function(t,i){var n=Math.max(t.y,i.y),r=Math.min(t.y+t.height/2,i.y+i.height/2),a=Math.max(t.y+t.height/2,i.y+i.height/2),o=Math.min(t.y+t.height,i.y+i.height);return e.rectangleOverlapped(t,i)||r>=n||o>=a +},testWithinBounds:function(t,i,n){for(var r in t){var a,o,s,h,l;switch(o=s=0,r){case c:case d:s=n.y-i[1],h=n.width+n.x-i[0],l=n.height;break;case p:case f:o=n.x-i[0],s=n.y-i[1],h=-o,l=n.height}a={x:o,y:s,width:h,height:l};for(var u=0;u1&&t.options.tooltip&&t.options.tooltip.shared +},_onPointState:function(t,e,i,h){if(this.isFlowTouch()){t.graphic.style(i)}else{var l=this,u=n.arc(),c=l._getStartAngle(t),d=l._getEndAngle(t),f=l._getInnerRadius(t),p=l._getOuterRadius(t),g=l._changeInnerRadius(t)?a:1,m=p*a,v=p,_=f*g,y=f,x=400;e&&(m=p,v=p*a,x=300,_=f,y=f*g);var T=r(m,v),b=r(_,y),A={startAngle:c,endAngle:d,innerRadius:f};t.graphic.style(i).interrupt(o.SELECT_ANIMATION).transition(o.SELECT_ANIMATION).animate({ease:s.css["ease-out-back"],duration:x,attr:h,attrTween:{d:function(){return function(t){return u.outerRadius(T(t)).innerRadius(b(t))(A) +}}}})}},_chosenPointLabelTrans:function(t){var e=this;if(t.labelPos&&t.textGraphic){var i=t.options,n=i.dataLabels,r=n.align,s=e._labelTrans(t),h=e.getCenterAngle(t);if(r===o.INSIDE){var l=e._changeInnerRadius(t)?a:1,u=e._getInnerRadius(t)*l,c=e._getOuterRadius(t)*a,d=u+(c-u)/2;s=e._getArcPoint(d,h)}else{if(r===o.OUTSIDE){var f=this._chosenPointOutsideLabelTranslate(t);s={x:s.x+f[0],y:s.y+f[1]}}}return s}},_chosenPointOutsideLabelTranslate:function(t){var e=this,i=e.getCenterAngle(t),n=e._getOuterRadius(t)*(a-1),r=e._getArcPoint(n,i),o=r[0],s=r[1]; +return[o,s]},_onTextState:function(t,i){this.isFlowTouch()&&(i=!1);var n=this;if(t.labelPos&&t.textGraphic){t._isChosen=i;var r=t.options,a=r.dataLabels,h=a.align,l=i?this._chosenPointLabelTrans(t):n._labelTrans(t),u=i?300:400,c=s.css["ease-out-back"],d="div"===t.textGraphic.type?{duration:u,ease:c,style:{transform:"translate("+e.pick(l.x||l[0])+"px,"+e.pick(l.y||l[1])+"px)"}}:{duration:u,ease:c,attr:{transform:e.makeTranslate(l)}};if(t.textGraphic&&t.textGraphic.transition(o.SELECT_ANIMATION).animate(d),h===o.OUTSIDE){var f=this._chosenPointOutsideLabelTranslate(t); +n._outSideLabelColorState(t,i,u,c),n._leadLineState(t,f[0],f[1],i,u,c)}return l}},_getInnerRadius:function(t){return t.innerRadius},_getOuterRadius:function(t){return t.outerRadius},_getStartAngle:function(t){return t.startAngle},_getEndAngle:function(t){return t.endAngle},_getPositionInPie:function(t){var e=t.x-this.chartInfo.centerX,i=t.y-this.chartInfo.centerY;return{x:e,y:i}},_isRotatable:function(){return e.isSupportSVG()&&this.options.rotatable},onPanStart:function(t){this._isRotatable()&&(t.stop&&t.stop(),this.initPos=t.containerPoint,this.initRotate=e.toDegree(this.chartInfo.rotate)) +},onPanMove:function(t){if(this._isRotatable()){t.stop&&t.stop(),this.vanchart.removeMoreLabel();var i=this._getAngle(this._getPositionInPie(this.initPos)),n=this._getAngle(this._getPositionInPie(t.containerPoint)),r=n-i+this.initRotate;this._getPointGraphicGroup().attr("transform","rotate("+r+")"),this.chartInfo.rotate=e.toRadian(r),this._calculateLabelPosWhenRadiusFixed(),this._rotateLabels()}},onPanEnd:function(t){t.stop&&t.stop(),this.vanchart.handler.panTarget=null},getEvents:function(){return e.extend(i.prototype.getEvents.call(this),{panstart:this.onPanStart,panmove:this.onPanMove,panend:this.onPanEnd}) +},_rotateLabels:function(){var t=this;t.getDataToDraw().forEach(function(i){if(i.textGraphic&&!i.labelPos){i.textGraphic.remove(),i.leadLine&&i.leadLine.remove(),i.textGraphic=null,i.leadLine=null}else{if(i.textGraphic&&i.labelPos){if(i.textGraphic.interrupt(o.SELECT_ANIMATION).attr("transform",e.makeTranslate(i._isChosen?t._chosenPointLabelTrans(i,!0):t._labelTrans(i))),i.labelPos.startPos){if(i.leadLine){var n=i._isChosen?function(){var e=t._chosenPointOutsideLabelTranslate(i);return t._getChosenPointLeadLinePath(i,e[0],e[1]) +}():t._getLeadLinePath(i);i.leadLine.interrupt(o.SELECT_ANIMATION).attr("d",n)}else{i.leadLine=t._getLeadLine(i)}}}else{!i.textGraphic&&i.labelPos&&t._createTextGraphic(i)}}})},isPanMovingAtTheBoundary:function(){return !1}}}),define("EffectHelper",["require","./Constants","./utils/BaseUtils","./utils/PathGenerator","./utils/BezierEasing","./vector/Transition","./vector/shape/Path","./vector/shape/LayerGroup","./dom/Browser"],function(t){function e(t,e){function i(){var t=l();return function(e){return c.makeTranslate3d({x:t.x,y:t.y-25*e}) +}}function n(){var t=l();return function(e){return c.makeTranslate3d({x:t.x,y:t.y-25*(1-e)})}}function r(){return(new g).addTo(_)._path.style(d).attr("d",v)}function a(t,e,i){t.style(d).attr("transform",A),t.effectTransition().delay(e).ease("linear").duration(i).attrTween("transform",function(){return function(t){return b+"scale("+(x+1.4*x*t)+")"}}).styleTween("fill-opacity",function(){return function(t){return 0.6*(1-t)}})}var o=e.series,s=o.vanchart,h=o._getEffectTime(e),l=function(){var t=e.getLatLng(),i=t&&s.latLngToLayerPoint(t)||{x:0,y:0}; +return{x:i.x,y:i.y}};new p({node:function(){return t._icon}},u.EFFECT_KEY).ease(f.css["ease-out-quint"]).duration(0.25*h).styleTween("transform",i).transition().ease(f.css["ease-in-quint"]).duration(0.25*h).styleTween("transform",n).transition().ease(f.css["ease-out-quint"]).duration(0.25*h).styleTween("transform",i).transition().ease(f.css["ease-in-quint"]).duration(0.25*h).styleTween("transform",n);var d={"fill-opacity":0,fill:e.color},_=e.effectGraphic=e.effectGraphic||(new m).addTo(s.getEffectLayer()),y=e.options.icon.iconSize,x=y[0]/90,T=l(),b=c.makeTranslate({x:T.x,y:T.y}),A=b+" scale("+x+")",C=_.firstG=_.firstG||r(),L=_.secondG=_.secondG||r(),M=_.thirdG=_.thirdG||r(),P=h/o.getDefaultEffectTime(); +a(C,0,2000*P),a(L,600*P,2000*P),a(M,1200*P,2000*P)}function i(t,e,i){var n=r(t,e,i);t.graphic.interrupt(u.SCALE_EXPAND_ANIMATION).transition(u.SCALE_EXPAND_ANIMATION).ease(f.css["ease-out-quad"]).duration(0.5*n.period).attrTween("filter",n.firstTweenFun).attr("transform",n.translate+"scale(1.05)"),t.graphic.interrupt(u.SCALE_MINIFY_ANIMATION).transition(u.SCALE_MINIFY_ANIMATION).ease(f.css["ease-in-quad"]).delay(0.5*n.period).duration(0.5*n.period).attrTween("filter",n.secondTweenFun).attr("transform",n.translate+"scale(1)") +}function n(t,e){var i=r(e);t._path.style("filter",null).effectTransition().ease(f.css["ease-out-quad"]).duration(0.5*i.period).attrTween("filter",i.firstTweenFun).style("fill-opacity",0.5).transition().ease(f.css["ease-in-quad"]).duration(0.5*i.period).attrTween("filter",i.secondTweenFun).style("fill-opacity",1)}function r(t,e,i){function n(){return function(t){return s&&s.updateDropShadowFilter&&s.updateDropShadowFilter(h.effectShadowFilter,3*t,3*t,0.75*t,5*t,91/255,91/255,91/255),l}}function r(){return function(t){return s&&s.updateDropShadowFilter&&s.updateDropShadowFilter(h.effectShadowFilter,3*(1-t),3*(1-t),0.75*(1-t),5*(1-t),91/255,91/255,91/255),l +}}var a=t.series,o=a.vanchart,s=o.renderer,h=t.graphic||t;h.effectShadowFilter=h.effectShadowFilter||s.createDropShadowFilter(3,3,0.75,5,91/255,91/255,91/255);var l="url(#"+c.stamp(h.effectShadowFilter)+")",u=a._getEffectTime(t),d=isNaN(e)||isNaN(i)?"":c.makeTranslate({x:e,y:i});return{period:u,translate:d,firstTweenFun:n,secondTweenFun:r}}function a(t,e){o(t,null,e)}function o(t,e,i){function n(e){return a({outerRadius:t.radius+e*t.radius*1.5})}var r={"fill-opacity":0,stroke:"none",fill:t.color},a=d.arc().innerRadius(t.radius).startAngle(0).endAngle(360); +l(t,{isMap:i,initStyle:r,pathFun:n,trans:e})}function s(t,e){function i(t){return t*o*2.5}function n(t){return d.getMarkerPath(a,o+i(t)/2-1)}var r=t.options.marker;if(r&&r.symbol){var a=r.symbol,o=r.radius;if(c.isImageMarker(a)){return}var s={fill:"none",stroke:r.fillColor,"stroke-width":0,"stroke-opacity":0};l(t,{isMap:e,initStyle:s,opacityKey:"stroke-opacity",pathFun:n,borderFun:i})}else{h(t,e)}}function h(t,e){function i(t){return o({outerRadius:t*r*3.5})}var n=t.options.marker,r=n.radius,a={"fill-opacity":0,stroke:"none",fill:n.fillColor},o=d.arc().innerRadius(0).startAngle(0).endAngle(360); +l(t,{isMap:e,initStyle:a,pathFun:i})}function l(t,e){function i(t,i,n){t.style(h).effectTransition().delay(i).ease("linear").duration(n).styleTween("stroke-width",function(){return e.borderFun}).styleTween(e.opacityKey||"fill-opacity",function(){return function(t){return 0.3*(1-t)}}).attrTween("d",function(){return e.pathFun})}var n,r,a=t.series,o=a.vanchart,s=o.renderer,h=e.initStyle,l=e.trans||{x:t.posX,y:t.posY};if(e.isMap){var u=t.getLatLng();l=u&&o.latLngToLayerPoint(u)||{x:0,y:0},n=t.effectGraphic=t.effectGraphic||(new m).addTo(o.getEffectLayer()),r=function(){return(new g).addTo(n)._path.style(h).attr("transform",c.makeTranslate(l)) +}}else{n=a._getPointEffectGroup(t).attr("transform",c.makeTranslate(l)),r=function(){return s.path().addTo(n).style(h)}}var d=n.firstG=n.firstG||r(),f=n.secondG=n.secondG||r(),p=n.thirdG=n.thirdG||r(),v=a._getEffectTime(t),_=v/a.getDefaultEffectTime();i(d,0,1600*_),i(f,440*_,1600*_),i(p,880*_,1600*_)}var u=t("./Constants"),c=t("./utils/BaseUtils"),d=t("./utils/PathGenerator"),f=t("./utils/BezierEasing"),p=t("./vector/Transition"),g=t("./vector/shape/Path"),m=t("./vector/shape/LayerGroup"),v=(t("./dom/Browser"),"M-56,0a56,16 0 1,0 112,0a56,16 0 1,0 -112,0"); +return{MARKER_EFFECT_TIME:2560,markerEffectAnimation:s,bubbleEffectAnimation:a,AREA_STYLE_EFFECT_TIME:2000,areaStyleEffectAnimation:i,areaMapEffectAnimation:n,POINT_MAP_EFFECT_TIME:3200,pointMapEffectAnimation:e,forceBubbleEffectAnimation:o}}),define("chart/Pie",["require","../Constants","../utils/BaseUtils","../utils/ColorUtils","./Series","./PieSeries","../utils/BoundsManager","../utils/BezierEasing","../EffectHelper","../utils/PathGenerator","../utils/Interpolator","../ChartLibrary"],function(t){function e(){function t(a){var o=a.map(function(i,n){var a=+e.call(t,i,n); +return r+=a,a}),s=i,h=n-s,l=h/r;a.forEach(function(t,e){t.startAngle=isNaN(s)?0:s,t.endAngle=s+=isNaN(o[e]*l)?0:o[e]*l,Math.abs(t.endAngle-t.startAngle)<_&&(t.endAngle=t.startAngle)})}var e=Number,i=0,n=2*Math.PI,r=0;return t.value=function(i){return arguments.length?(e=i,t):e},t.startAngle=function(e){return arguments.length?(i=e,t):i},t.endAngle=function(e){return arguments.length?(n=e,t):n},t}var i=t("../Constants"),n=t("../utils/BaseUtils"),r=t("../utils/ColorUtils"),a=t("./Series"),o=t("./PieSeries"),s=(t("../utils/BoundsManager"),t("../utils/BezierEasing")),h=t("../EffectHelper"),l=t("../utils/PathGenerator"),u=t("../utils/Interpolator"),c=2*Math.PI,d=1.1,f=3,p=1000,g="bounce",m=s.css.swing,v=400,_=1e-7,y=a.extend({isFlowTouch:function(){return this.vanchart.isFlowTouchPie() +},_getAxisTypes:function(){return[]},doLayout:function(){var t=this._calculateSeriesBounds(),n=this;if(!t&&!this.options.radius&&!this.options.center){throw new Error("pie has no bounds")}var r,a,o;t?(o=this.options.radius||Math.min(t.width/2,t.height/2),r=t.x+t.width/2,a=t.y+t.height/2,this.bounds=t):(o=this.options.radius,r=this._getPercentValue(this.options.center[0],this.vanchart.width),a=this._getPercentValue(this.options.center[1],this.vanchart.height));var s=this.chartInfo&&this.chartInfo.rotate||0; +this.chartInfo={radius:o,centerX:r,centerY:a,rotate:s};var h=e().value(function(t){return n.options.roseType==i.SAME_ARC?1:Math.abs(t.getTargetValue())}).startAngle(n.startAngle).endAngle(n.endAngle),l=this.points.filter(function(t){return t.isVisible()}),u=this;l.forEach(function(t){t.lastShape=u._getArcData(t)}),h(l)},_getFixedPos:function(t,e){var i=(this.vanchart.bounds,t.series.chartInfo),n=i.centerX,r=i.centerY,a=this.getCenterAngle(t),o=t.outerRadius*d,s=o*Math.sin(a)+n,h=o*Math.cos(a+Math.PI)+r; +return a=Math.PI&&a<3*Math.PI/2?s-=e.width:a>=3*Math.PI/2&&c>a&&(h-=e.height,s-=e.width),[s,h]},_calculateLabelPos:function(){for(var t=this.options.roseType,e=this.points.filter(function(t){return t.visible}),n=[],r=[],a=0,o=e.length;o>a;a++){var s=e[a],h=s.options.dataLabels;s.visible&&h&&h.enabled&&(h.align==i.OUTSIDE?n.push(s):r.push(s))}this._calculateOutsideLabelBounds(n),this._shouldCalcRadius()&&(r.length&&!n.length||!r.length&&!n.length)&&(this.chartInfo.radius=this.chartInfo.radius/d-f); +var l=this.options.innerRadius||0,u=this.chartInfo.radius;if(l&&(l="string"==typeof l&&-1!=l.indexOf("%")?parseFloat(l)*u/100:parseFloat(l)),this.chartInfo.innerRadius=l,this.points.forEach(function(t){t.innerRadius=l}),t){var c=u-l,p=0;e.forEach(function(t){p=Math.max(p,Math.abs(t.getTargetValue()))});var g=c/p;(isNaN(g)||!isFinite(g))&&(g=0),e.forEach(function(t){t.outerRadius=l+g*Math.abs(t.getTargetValue())})}else{this.points.forEach(function(t){t.outerRadius=u})}this.calculateLeadLineStartPos(n),this.calculateInsideLabelBounds(r) +},adjustRadius:function(t){this.chartInfo.radius!==t&&(this.chartInfo.seriesMinRadius=t,this.chartInfo.radius=t,this._calculateLabelPos())},_calculateLabelPosWhenRadiusFixed:function(){for(var t=this.points.filter(function(t){return t.visible}),e=[],n=[],r=0,a=t.length;a>r;r++){var o=t[r],s=o.options.dataLabels;s&&s.enabled&&(s.align==i.OUTSIDE?e.push(o):n.push(o))}this._calculateLabelBoundsForFixed([this.chartInfo.centerX,this.chartInfo.centerY],this.chartInfo.radius,e),this.calculateLeadLineStartPos(e),this.calculateInsideLabelBounds(n) +},_calculateOutsideLabelBounds:function(t){if(t.length){t.forEach(function(t){t.labelPos=null});var e=this.chartInfo,i=e.radius,n=[e.centerX,e.centerY];this._shouldCalcRadius()?this.chartInfo.radius=this.calcOutsideLabel(t,this.bounds,n):this.calcOutsideLabel(t,this.bounds,n,i)}},_shouldCalcRadius:function(){return !this.options.radius&&!this.chartInfo.seriesMinRadius},_calculateLabelBoundsForFixed:function(t,e,i){var n=this.chartInfo,e=n.radius,t=[n.centerX,n.centerY];this.calcOutsideLabel(i,this.bounds,t,e) +},_calculateSeriesBounds:function(){for(var t=this.vanchart.seriesOfType(i.PIE_CHART),e=this.vanchart.bounds,n=0,r=0,a=t.length;a>r;r++){t[r].options.center&&t[r].options.radius&&n++}for(var o=e.width/Math.max(1,t.length-n),r=0,a=t.length;a>r;r++){if(t[r]==this&&!this.options.center){return{x:e.x+r*o,y:e.y,width:o,height:e.height}}}},_getTranslate:function(){return[this.chartInfo.centerX,this.chartInfo.centerY]},_getArcData:function(t){return n.hasDefined(t.startAngle)?{startAngle:t.startAngle,endAngle:t.endAngle,outerRadius:t.outerRadius,innerRadius:t.series.chartInfo.innerRadius}:void 0 +},calcMoreLabelPosition:function(t,e){var i=t.series.chartInfo,n=i.centerX,r=i.centerY,a=this.getCenterAngle(t),o=t.series.chartInfo.innerRadius+(t.outerRadius-t.series.chartInfo.innerRadius)/2,s=this._getArcPoint(o,a);return{startX:n+s[0],startY:r+s[1],direction:"top"}},effectAnimation:function(t){h.areaStyleEffectAnimation(t)},getDefaultEffectTime:function(){return h.AREA_STYLE_EFFECT_TIME},getHighLightStyle:function(t){return{fill:t.series.getFillFilter(t.mouseOverColor||t.color,t),"fill-opacity":t.opacity,stroke:t.borderColor||t.mouseOverColor||t.color,"stroke-width":t.options.borderWidth,"stroke-opacity":t.borderOpacity} +},getPressedStyle:function(t){return{fill:t.series.getFillFilter(t.clickColor,t),"fill-opacity":t.clickOpacity,stroke:t.borderColor||t.mouseOverColor||t.color,"stroke-width":t.options.borderWidth,"stroke-opacity":t.borderOpacity}},getAttrs:function(t){var e=l.arc().innerRadius(t.innerRadius);return{d:e(this._getArcData(t))}},getPointGraphicKey:function(){return"path"},_calculateAnimationDelay:function(){for(var t=0,e=0,i=0,n=this.points.length;n>i;i++){var r=this.points[i];r.visible&&r.series.visible&&t++,r.graphic&&e++ +}return e==t?0:1},_createGroup:function(t,e){return t.group().addTo(e.seriesGroup)},getPointInitAnimationAttr:function(t){var e=t.series,i=l.arc();return{ease:e.initialAnimationMoving?s.css["ease-out-cubic"]:g,duration:p,attrTween:{d:function(){var n;if(e.initialAnimationMoving){n={startAngle:t.startAngle-c,endAngle:t.endAngle-c,outerRadius:0,innerRadius:0}}else{var r=e.getPreVisiblePoint(t);if("first"==r){n={startAngle:e.startAngle,endAngle:e.startAngle,outerRadius:t.outerRadius}}else{if(r.lastShape){var a=Math.abs(r.lastShape.endAngle-r.endAngle),o=t.startAngle+a; +n={startAngle:o,endAngle:o,outerRadius:t.outerRadius}}else{n={startAngle:t.startAngle,endAngle:t.endAngle,outerRadius:t.outerRadius,innerRadius:t.innerRadius}}}}var s=u(n,e._getArcData(t));return this._current_=s(1),function(t){return i(s(t))}}}}},getPointUpdateAnimationAttr:function(t,e){var n=t.series,r=n.vanchart,a=l.arc(),o=g,s=p;return(r.orderType===i.DESCENDING||r.orderType==i.ASCENDING)&&(o=m,s=v),{ease:o,duration:s,attrTween:{d:function(){var e=n._getArcData(t),i=this._current_||e,r=u(i,e); +return this._current_=r(1),function(t){return a(r(t))}}}}},getPointDropAnimationAttr:function(t){var e=t.series,i=(e.options,e.startAngle),n=l.arc();return{ease:g,duration:p,attrTween:{d:function(){var r=this._current_,a=e.getPreVisiblePoint(t),o=i;if("first"!=a&&a.lastShape){var s=Math.abs(a.lastShape.endAngle-a.endAngle);o=t.startAngle+s}var h=e._getArcData(t);h.startAngle=h.endAngle=o;var l=u(r,h);return this._current_=l(1),function(t){return n(l(t))}}}}},getPreVisiblePoint:function(t){for(var e=t.series.points,i="first",n=0,r=e.length; +r>n;n++){if(e[n]==t){return i}e[n].visible&&(i=e[n])}return i},getFillFilter:function(t,e){var a=this,o=a.vanchart.options;if(o.style==i.STYLE_GRADUAL&&n.isSupportSVG()){var a=this,s=a.vanchart,h=s.renderer,l={cx:"0%",cy:"0%",r:Math.max(e.outerRadius,0)+"px",gradientUnits:"userSpaceOnUse"},u={offset:e.innerRadius/Math.max(e.outerRadius,1)*100+"%","stop-color":r.getColorWithDivider(t,0.8)},c={offset:"100%","stop-color":t};return e.colorGradient?h.updateColorGradient(e.colorGradient,l,[u,c]):e.colorGradient=h.colorGradient(l,[u,c],"radialGradient"),"url(#"+n.stamp(e.colorGradient)+")" +}return t},_onPointMouseOver:function(t){this._onState(t,!0)},_onPointMouseOut:function(t){this._onState(t,!1)},_onState:function(t,e){var i=this,n=e?i.getHighLightStyle(t):i.getStyle(t);i._onPointState(t,e,n),i._onTextState(t,e)},_getPointGraphicGroup:function(){return this.pathGroup||(this.pathGroup=this.vanchart.renderer.group().addTo(this.group)),this.pathGroup},_getPointTextLabelGroup:function(){return this.textLabelGroup||(this.textLabelGroup=this.vanchart.renderer.vgroup().add(),this.group.append(this.textLabelGroup.renderG)),this.textLabelGroup.divG.attr("transform",n.makeTranslate(this._getTranslate())),this.textLabelGroup +},isSeriesAccumulated:function(){return !0},getDefaultTooltipFormatter:function(){return{categoryFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}",changedPercentFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '#.##%') : arguments[0]}",changedValueFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}",identifier:"{SERIES}{VALUE}",percentFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '#.##%') : arguments[0]}",seriesFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}",valueFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}"} +},getGroupTrans:function(){return[this.chartInfo.centerX,this.chartInfo.centerY]}});return y.include(o),t("../ChartLibrary").register(i.PIE_CHART,y),y}),define("chart/Line",["require","../Constants","../utils/BaseUtils","../utils/QueryUtils","./Series","../utils/Class","../utils/BezierEasing","../utils/ColorUtils","../dom/DomUtils","../EffectHelper","../utils/PathGenerator","../vector/Animation","../ChartLibrary","../ChartLibrary"],function(t){var e=t("../Constants"),i=t("../utils/BaseUtils"),n=(t("../utils/QueryUtils"),t("./Series")),r=t("../utils/Class"),a=t("../utils/BezierEasing"),o=t("../utils/ColorUtils"),s=t("../dom/DomUtils"),h=t("../EffectHelper"),l=t("../utils/PathGenerator"),u=(t("../vector/Animation"),2),c=1200,d=a.css["ease-out-cubic"],f=250,p=0.35,g=a.css.swing,m=Math.tan(0.01),v="band_mouse_over",_=function(t){var e=t.indexFromLeft/(t.series.points.length-1)||0; +return c*a.calculateCubicOutT(e)},y=function(t){return isFinite(t)&&!isNaN(t)},x=n.extend({doLayout:function(){var t,e=this,i=e.vanchart,n=e.xAxis,r=e.yAxis,a=e.options.connectNulls,o=n.scale.rangeBand?n.scale.rangeBand()/2:0,s=i.isInverted(),h=s?"posY":"posX",u=r.getStartPosValue(),c=[-Math.max(i.width,i.height)/m,void 0];n.scale.minMax&&n.scale.minMax(c),r.scale.minMax&&r.scale.minMax(c);var d=[];if(this.options.large){var f={},p={};e.points.forEach(function(e){t=e.options;var i=n.scale(n.getAxisValue(t.x,e))+o,a=r.scale(r.getAxisValue(t.y,e)+t.y0-u),h=r.scale(t.y0); +y(a)||(e.isNull=!0),s?(e.posX=a,e.posY=i,e.posX0=h):(e.posX=i,e.posY=a,e.posY0=h),f[parseInt(e.posX)]&&p[parseInt(e.posY)]||(f[parseInt(e.posX)]=!0,p[parseInt(e.posY)]=!0,d.push(e))},this)}else{d=e.points}e.points=d;var g=!0,v=[];e.y0=Number.MAX_VALUE,e.y=-Number.MAX_VALUE,d.forEach(function(i,l){if(t=i.options,this.options.large){c=i.posX,d=i.posY}else{var c=n.scale(n.getAxisValue(t.x,i))+o,d=r.scale(r.getAxisValue(t.y,i)+t.y0-u),f=r.scale(t.y0);y(d)||(i.isNull=!0),s?(i.posX=d,i.posY=c,i.posX0=f):(i.posX=c,i.posY=d,i.posY0=f) +}i.indexFromLeft=l,(!a||a&&!i.isNull)&&(v.length>0&&(g=g&&v[v.length-1][h]<=c),v.push(i)),Math.abs(t.y0)e.y&&(e.y=Math.abs(t.y+t.y0))},this),g||(v.sort(function(t,e){return t[h]-e[h]}),v.forEach(function(t,e){t.indexFromLeft=e}));var _=l.line().interpolate(e.interpolate).x(function(t){return t.posX}).y(function(t){return t.posY}).defined(function(t){return !t.isNull}),x=l.area().interpolate(e.interpolate);x=s?x.y(function(t){return t.posY}).x0(function(t){var i=e._getPreviousStackingPoint(t); +return i?i.posX:t.posX0}).x1(function(t){return t.posX}):x.x(function(t){return t.posX}).y0(function(t){var i=e._getPreviousStackingPoint(t);return i?i.posY:t.posY0}).y1(function(t){return t.posY}),x=x.defined(function(t){return !t.isNull}),this.linePath=_(v),this.areaPath=x(v),this.dataBands=this._calculateDataBands()},_getPreviousStackingPoint:function(t){var e=t.series.stack,n=i.hasDefined(e)&&e!==!1;if(n){for(var r=t.points,a=0,o=r.length;o>a;a++){var s=r[a].series;if(s.stack==t.series.stack&&s.visible&&r[a+1]==t){return r[a] +}}}},_calculateDataBands:function(){var t,i,n=this.vanchart.bounds,r=this,a=this.options.bands||[],o=r.color,s=r.opacity,h=r.fillColor,l=r.fillColorOpacity,u=r.yAxis,c=u.scale.domain(),d=u.isHorizontal(),f=n.width,p=n.height,g=[],m=this.type===e.LINE_CHART,v=this.vanchart.isInverted(),_=0,y=f,x=0,T=p;if(m&&(v?(t=r.points.sort(function(t,e){return t.posY-e.posY}),i=t.length,_=0,y=f,x=t[0]?t[0].posY-1:0,T=t[i-1]?t[i-1].posY+1:f):(t=r.points.sort(function(t,e){return t.posX-e.posX}),i=t.length,_=t[0]?t[0].posX-1:0,y=t[i-1]?t[i-1].posX+1:f,x=0,T=p)),g.push({clipBounds:{x:_,y:x,width:y-_,height:T-x},color:o,fillColor:h,fillColorOpacity:l}),!a||!a.length){return g +}for(var b=0,i=a.length;i>b;b++){var A=Math.max(c[0],a[b].from),C=Math.min(c[1],a[b].to);A=u.scale(A),C=u.scale(C);var L={x:0,y:Math.min(A,C),width:f,height:Math.abs(A-C)};d&&(L={x:Math.min(A,C),y:0,width:Math.abs(A-C),height:p}),g.push({clipBounds:L,color:a[b].color||o,opacity:a[b].opacity||s,fillColor:a[b].fillColor||h,fillColorOpacity:a[b].fillColorOpacity||l})}return g},_getFixedPos:function(t){var e=t.options.marker.radius||4.5,i=this.vanchart.bounds,n=i.x+t.posX+e,r=i.y+t.posY+e;return[n,r] +},_calculateLabelPos:function(){var t=this,i=this.vanchart.isInverted(),n=(t.points.length,this.vanchart.bounds);t.points.forEach(function(t,r){var a=t.options.dataLabels;if(a&&a.enabled){var o,s,h=a.align==e.TOP,l=t.labelDim,c=u;if(!l){return}var d=t.options.marker;d&&d.symbol&&(c+=d.radius||4.5),i?(o=h?t.posX+c:t.posX-c-l.width,s=t.posY-l.height/2,0>=s?s=t.posY:s+l.height>=n.height&&(s=t.posY-l.height)):(o=t.posX-l.width/2,s=h?t.posY-c-l.height:t.posY+c,0>=o?o=t.posX:o+l.width>=n.width&&(o=t.posX-l.width)),t.labelPos={x:o,y:s} +}})},getTrendLineXYValues:function(t){return this._getNormalTrendLineXYValues(t)},getAttrs:function(t){return{transform:i.makeTranslate([t.posX,t.posY])}},calcMoreLabelPosition:function(t){var e=this.vanchart.bounds;return{startX:t.posX+e.x,startY:t.posY+e.y,direction:"top"}},calcMoreLabelStartPosition:function(t,e,i,n){var r="top";return 0>e-n&&(r="bottom"),{startX:t,startY:e,direction:r}},effectAnimation:function(t){h.markerEffectAnimation(t)},getDefaultEffectTime:function(){return h.MARKER_EFFECT_TIME +},getHighLightStyle:function(){},getDataToDraw:function(){var t=this;return this.points.filter(function(e){var i=e.options.marker&&e.options.marker.symbol;return !i&&e.graphic&&t._drawExitPoints(e),i})},getTextDataToDraw:function(){return this.points},_updatePointGraphicStyle:function(t){this._updateMarker(t)},updatePointGraphic:function(t){this._updateMarkerPointGraphic(t)},_createPointGraphic:function(t){return t.graphic=this._createMarker(t.options.marker)},onPointPress:function(){var t=this,e=t.series; +e._onMarkerPressed(t)},onPointPressUp:function(){var t=this,e=t.series;e._updateMarker(t)},_onPointMouseOver:function(t){t.series._onMarkerMouseOver(t)},_onPointMouseOut:function(t){t.series._onMarkerMouseOut(t)},getPointInitAttr:function(t){return{transform:"translate("+t.posX+","+t.posY+") scale(0.01)"}},getPointInitAnimationAttr:function(t){var e=function(){return"translate("+t.posX+","+t.posY+") "};return[{delay:this.initialAnimationMoving?_(t):0,ease:"swing",duration:150,attrTween:{transform:function(){return function(t){return e()+"scale("+1.5*t+")" +}}}},{duration:150,ease:"swing",attrTween:{transform:function(){return function(t){return e()+"scale("+(1.5-0.5*t)+")"}}}}]},getPointUpdateAnimationAttr:function(t){return{ease:g,duration:f,attr:{transform:"translate("+t.posX+","+t.posY+")"}}},getClosestPoint:function(t){var e,i=this.vanchart.isInverted(),n=i?"y":"x",r=i?"posY":"posX",a=Number.MAX_VALUE,o=this.vanchart.hoverSeries,s=this.vanchart.bounds,h=s[n]-(i?t.y:t.x);return o.points.forEach(function(t){var i=Math.abs(t[r]+h);a>i&&!t.isNull&&(e=t,a=i) +}),e},_onSeriesMouseOver:function(t){n.prototype._onSeriesMouseOver.call(this,t),this.dataBandsGraphic.forEach(function(t){t._onSeriesMouseOver()}),this.toFrontPosition()},_onSeriesMouseOut:function(t){},_seriesUnChosen:function(t){this.vanchart.switchAutoTooltipStatus("mouseout"),this.resetPosition(),this.dataBandsGraphic.forEach(function(t){t._onSeriesMouseOut()})},drawPoints:function(){n.prototype.drawPoints.call(this);for(var t=this.dataBandsGraphic.length-1;t>=0;t--){this.dataBandsGraphic[t].toBack() +}},drawSeries:function(){var t,e,i=this,n=(this.vanchart,this.dataBands);for(i.removeDefaultMarker(),this.dataBandsGraphic=this.dataBandsGraphic||[],t=n.length,e=this.dataBandsGraphic.length;e>t;t++){this.dataBandsGraphic[t].remove(),this.dataBandsGraphic[t]=null}for(t=0,e=n.length;e>t;t++){this.dataBandsGraphic[t]?this.dataBandsGraphic[t].refresh(n[t]):this.dataBandsGraphic[t]=new T(n[t],i)}this.dataBandsGraphic.length=n.length}}),T=r.extend({initialize:function(t,e){this.series=e,this.refresh(t) +},refresh:function(t){this.options=t,this.render()},render:function(){var t=this.options,n=this.series,r=n.group,a=n.vanchart,o=a.renderer,s=this._getLineStyle(n,t),h=this._getAreaStyle(n,t),l=i.isSupportSVG(),u=t.clipBounds,p=n.type===e.AREA_CHART,m=!this.linePath||this.linePath.removed();if(this.clipRect?o.updateClip(this.clipRect,u):this.clipRect=o.createClip({x:u.x,y:u.y,width:u.width,height:u.height}),!n.visible){return this.linePath&&this.linePath.remove(),this.areaPath&&this.areaPath.remove(),void (this.linePath=this.areaPath=null) +}this.linePath=this.linePath||o.path().attr("d",n.linePath).addTo(r),this.linePath.style(s),this.linePath.isLineChart=!0,o.clip(this.linePath,this.clipRect),p&&(this.areaPath=this.areaPath||o.path().attr("d",n.areaPath),this.areaPath.style(h).addTo(r),this.areaPath.isLineChart=!0,o.clip(this.areaPath,this.clipRect));var v=this._isSetAnimation();m?(this.linePath.attr("d",n.linePath),this.areaPath&&this.areaPath.attr("d",n.areaPath),l&&this.clipRect.rect.attr(a.isInverted()?"height":"width",0).animate({ease:d,duration:v?c:0,attr:u})):l?(this.linePath.animate({ease:g,duration:f,attr:{d:n.linePath}}),this.areaPath&&this.areaPath.animate({ease:g,duration:f,attr:{d:n.areaPath}}),this.clipRect.rect.animate({ease:g,duration:v?c:0,attr:u})):(this.linePath.attr("d",n.linePath),o.clip(this.linePath,this.clipRect),this.areaPath&&(this.areaPath.attr("d",n.areaPath),o.clip(this.areaPath,this.clipRect))) +},toBack:function(){s.toBack(this.linePath&&this.linePath.node()),s.toBack(this.areaPath&&this.areaPath.node())},_isSetAnimation:function(){return this.series.options.animation},_getAreaStyle:function(t,n){var r,a,o=t.vanchart.highlightTarget;return i.hasDefined(o)?(r=n.fillColor,a=o==t.name?1:0.3):(r=this._getFillFilter(n.fillColor,t),a=t.vanchart.options.style==e.STYLE_GRADUAL?1:n.fillColorOpacity),{fill:r,"fill-opacity":a}},_getLineStyle:function(t,e){var n=e.opacity,r=t.vanchart.highlightTarget; +return i.hasDefined(r)&&(n=r==t.name?1:0.3),{fill:"none",stroke:e.color,"stroke-width":t.options.lineWidth,"stroke-opacity":n}},_getFillFilter:function(t,n){if(i.isSupportSVG()){var r=n.vanchart,a=r.renderer,o=n.vanchart.options;if(o.style==e.STYLE_GRADUAL){var s,h,l,u;s=h=l=u="0%";var c=Math.abs(n.y)/Math.abs(n.y-n.y0)||0;r.isInverted()===!0?(s=100*(1-c)+"%",l="100%"):h=100*c+"%";var d={x1:s,y1:h,x2:l,y2:u},f={offset:"0%","stop-color":t,"stop-opacity":0},p={offset:"100%","stop-color":t,"stop-opacity":0.8}; +return this.colorGradient?a.updateColorGradient(this.colorGradient,d,[f,p]):this.colorGradient=a.colorGradient(d,[f,p]),"url(#"+i.stamp(this.colorGradient)+")"}}return t},_onSeriesMouseOver:function(){var t=this.series.options.lineWidth;this.linePath&&this.linePath.style({stroke:o.getHighLightColor(this.options.color),"stroke-width":0===t?0:t+1}),this.series.type==e.AREA_CHART&&this.areaPath.interrupt(v).transition(v).animate({duration:200,ease:a.custom["ease-out-back"],style:{fill:this._getFillFilter(o.getHighLightColor(this.options.fillColor),this.series),"fill-opacity":0===this.options.fillColorOpacity?0:this.options.fillColorOpacity+p},attr:{d:this.series.areaPath}}) +},_onSeriesMouseOut:function(){this.linePath&&this.linePath.style(this._getLineStyle(this.series,this.options)),this.areaPath&&this.areaPath.animate({duration:200,ease:a.custom["ease-out-back"],style:this._getAreaStyle(this.series,this.options),attr:{d:this.series.areaPath}})},remove:function(){this.linePath&&this.linePath.remove(),this.areaPath&&this.areaPath.remove(),this.clipRect&&this.clipRect.remove(),this.linePath=this.areaPath=this.clipRect=null}});return t("../ChartLibrary").register(e.LINE_CHART,x),t("../ChartLibrary").register(e.AREA_CHART,x),x +}),define("chart/Radar",["require","./Series","../utils/BaseUtils","../utils/QueryUtils","../utils/BoundsManager"],function(t){var e=t("./Series"),i=t("../utils/BaseUtils"),n=(t("../utils/QueryUtils"),t("../utils/BoundsManager"),e.extend({refresh:function(t,i){return e.prototype.refresh.call(this,t,i),this.columnType=this.options.columnType,this.stack=this.columnType?"radar-column"+this.options.stack:this.options.stack,this},_getAxisTypes:function(){return["angleAxis","radiusAxis","polar"]},getBaseAxisType:function(){return"angleAxis" +},_bindAxis:function(){var t=this,e=t.options,i=t.vanchart;t._getAxisTypes().forEach(function(n){if(i[n]){var r=i[n](e.polar);r&&(r.series.push(t),t[n]=r)}})},_getDefaultFillColorOpacity:function(){return this.options.columnType?1:0.15},_getTranslate:function(){return this.getCenter()},getCenter:function(){return this.polar&&this.polar.center},getRadius:function(){return this.polar&&this.polar.radius},doLayout:function(){var t=this,e=t.polar,i=e.radiusAxis,n=e.angleAxis,r=(this.getCenter(),this.getRadius(),n.piece),a=i.scale,o=n.scale,s=i.indicator,h=function(t){return isNaN(a(t))?0:a(t) +};t.points.sort(function(t,e){return o(t.category)-o(e.category)});var l;t.points.forEach(function(e){l=e.options;var n=e.category,a=l.y0,u=e.value+l.y0;e.innerRadius=s?t._cateValueScale(n,a):h(a),e.outerRadius=s?t._cateValueScale(n,u):h(u),e.animateInitRadius=i.getStartPos(),e.radian=o(e.category)*r;var c=t._getArcPoint(e.outerRadius,e.radian);e.posX=c[0],e.posY=c[1],this._calcLabelPos(e)},this),t.pathSegment=t._getPathSegment(t.points,t.options.connectNulls)},_calculateLabelPos:function(){},getTargetKey:function(){return"y" +},_createGroup:function(t,e){return t.group().addTo(e.seriesGroup)},_getPathSegment:function(t,e){var i=this,n=i.polar,r=n.angleAxis,a=r.scale;t=[].concat(t),t.sort(function(t,e){return a(t.category)-a(e.category)});var o=[],s=[];if(e){o.push(s),t.forEach(function(t){t.isNull||s.push([t.posX,t.posY])})}else{for(var h=0,l=t.length,u=l-1;u>0;u--){var c=t[u],d=t[u-1];!c.isNull&&d.isNull&&(h=u)}for(var u=0;l>u;u++){var f=t[(u+h)%l];f.isNull&&s.length?(s.length>1&&o.push(s),s=[]):f.isNull||s.push([f.posX,f.posY]) +}s.length&&o.push(s)}return o},_getRadarSeriesPath:function(t,e,n){var r="",a=[];if(1===t.length){a=t[0];var o=a.length==this.angleAxis.getCategoryCount()||e;n=!o&&n,r=n?"M0,0":"";for(var s=0,h=a.length;h>s;s++){var l=s||n?"L":"M";r+=l+i.dealFloatPrecision(a[s][0])+","+i.dealFloatPrecision(a[s][1])}r+=o||n?"Z":""}else{t.forEach(function(t){r+=n?"M0,0":"",t.forEach(function(t,e){r+=(e||n?"L":"M")+i.dealFloatPrecision(t[0])+","+i.dealFloatPrecision(t[1])}),r+=n?"Z":""})}return r},_getInitPathSegment:function(t){var e=[]; +return t.forEach(function(t){var i=[];e.push(i),t.forEach(function(){i.push([0,0])})}),e},_cateValueScale:function(t,e){var i,n=this,r=n.radiusAxis,a=r._cateScale;return r._cateDomain.forEach(function(e){e.name===t&&(i=e.domain)}),a.domain(i),isNaN(a(e))?0:a(e)}}));return n}),define("chart/LineRadar",["require","../utils/BaseUtils","../dom/DomUtils","../utils/ColorUtils","../utils/BezierEasing","../EffectHelper","../utils/Interpolator","../Constants","./Radar","../ChartLibrary"],function(t){var e=t("../utils/BaseUtils"),i=t("../dom/DomUtils"),n=t("../utils/ColorUtils"),r=t("../utils/BezierEasing"),a=t("../EffectHelper"),o=t("../utils/Interpolator"),s=t("../Constants"),h=t("./Radar"),l=400,u="back-out",c=200,d="back-out",f=250,p="back-in",g="radar-top",m="radar-bottom",v="radar-left",_="radar-right",y=8,x=h.extend({columnType:!1,_calcLabelPos:function(t){var e=this.polar.angleAxis._getPolarPosition(t.category),i=this._getArcPoint(t.outerRadius+y,t.radian),n=t.labelDim; +switch(e){case g:t.labelPos={x:-n.width/2,y:i[1]-n.height};break;case _:t.labelPos={x:i[0],y:i[1]-n.height/2};break;case m:t.labelPos={x:-n.width/2,y:i[1]};break;case v:t.labelPos={x:i[0]-n.width,y:i[1]-n.height/2}}},drawPoints:function(){h.prototype.drawPoints.call(this),i.toBack(this.radarPath&&this.radarPath.node())},drawSeries:function(){var t=this,e=t.vanchart,i=e.renderer;t.removeDefaultMarker();var n=t.fillColor&&t.fillColorOpacity,r=this._getRadarPathStyle();t.visible?(this.radarPath=this.radarPath||i.path().addTo(t.group),this.radarPath.style(r),this.radarPath.animate({duration:l,ease:u,attrTween:{d:function(){for(var e=this._pathSegment_&&t.pathSegment&&this._pathSegment_.length===t.pathSegment.length,i=this._pathSegment_,r=0,a=i?i.length:0; +a>r&&e;r++){i[r].length!==t.pathSegment[r].length&&(e=!1)}var s=e?this._pathSegment_:t._getInitPathSegment(t.pathSegment),h=o.interpolateArray(s,t.pathSegment);return this._pathSegment_=t.pathSegment,function(e){return t._getRadarSeriesPath(h(e),t.options.connectNulls,n)}}}})):(this.radarPath&&this.radarPath.animate({duration:f,ease:p,attrTween:{d:function(){var e=t._getInitPathSegment(t.pathSegment),i=o.interpolateArray(t.pathSegment,e);return function(e){return t._getRadarSeriesPath(i(e),t.options.connectNulls,n) +}}}}).remove(),this.radarPath=null)},_getRadarPathStyle:function(){var t=this,i=t.fillColor&&t.fillColorOpacity,n=t.fillColorOpacity,r=t.opacity,a=t.vanchart.highlightTarget;return e.hasDefined(a)&&(n=a==t.name?1:0.3,r=a==t.name?1:0.3),{fill:i?t.fillColor:"none","fill-opacity":n,stroke:t.color,"stroke-width":t.options.lineWidth,"stroke-opacity":r}},_getFillHighLightStyle:function(){var t=this,e=t.fillColor&&t.fillColorOpacity;return{fill:e?n.getHighLightColor(t.fillColor):"none","fill-opacity":0===t.fillColorOpacity?0:t.fillColorOpacity+0.35} +},_getStrokeHighLightStyle:function(){var t=this;return{stroke:n.getHighLightColor(t.color),"stroke-width":t.options.lineWidth+1,"stroke-opacity":t.opacity}},_getStrokeStyle:function(){var t=this;return{stroke:t.color,"stroke-width":t.options.lineWidth,"stroke-opacity":t.opacity}},getStyle:function(){return{}},effectAnimation:function(t){a.markerEffectAnimation(t)},getDefaultEffectTime:function(){return a.MARKER_EFFECT_TIME},_createPointGraphic:function(t){return t.graphic=this._createMarker(t.options.marker) +},_updatePointGraphicStyle:function(t){this._updateMarker(t)},getDataToDraw:function(){return this.points.filter(function(t){return t.options.marker&&t.options.marker.symbol})},getTextDataToDraw:function(){return this.points},onPointPress:function(){var t=this,e=t.series;e._onMarkerPressed(t)},onPointPressUp:function(){var t=this,e=t.series;e._updateMarker(t)},_calculateLabelPos:function(){},_getFixedPos:function(t){var e,i,n=isNaN(t.options.marker.radius)?4.5:t.options.marker.radius,r=this.getCenter(); +return e=r[0]+t.posX+n,i=r[1]+t.posY+n,[e,i]},calcMoreLabelPosition:function(t,e){var i=this.getCenter(),n=t.posX+i[0],r=t.posY+i[1];return{startX:n,startY:r,direction:"top"}},_onSeriesMouseOver:function(t){h.prototype._onSeriesMouseOver.call(this,t);var e=this,i=e.fillColor&&e.fillColorOpacity;e.radarPath&&e.radarPath.style(e._getStrokeHighLightStyle()).animate({duration:200,ease:r.custom["ease-out-back"],style:e._getFillHighLightStyle()}).attr({d:e._getRadarSeriesPath(e.pathSegment,e.options.connectNulls,i)}),this.toFrontPosition() +},_onSeriesMouseOut:function(){var t=this;t.radarPath&&t.radarPath.style(t._getStrokeStyle()).animate({duration:200,ease:r.custom["ease-out-back"],style:t._getRadarPathStyle()})},_seriesUnChosen:function(){this.resetPosition()},_onPointMouseOver:function(t){t.series._onMarkerMouseOver(t)},_onPointMouseOut:function(t){t.series._onMarkerMouseOut(t)},getPointInitAttr:function(t){return{transform:"translate("+t.posX+","+t.posY+") scale(0.01)"}},getPointInitAnimationAttr:function(t){return{delay:l,duration:c,ease:d,attr:{transform:"translate("+t.posX+","+t.posY+") scale(1)"}} +},getPointUpdateAnimationAttr:function(t){return{ease:u,duration:l,attr:{transform:"translate("+t.posX+","+t.posY+") scale(1)"}}},getPointDropAnimationAttr:function(){return{ease:p,duration:f,attr:{transform:"translate(0,0) scale(0.01)"}}},updatePointGraphic:function(t){this._updateMarkerPointGraphic(t)},getClosestPoint:function(t){var e,i=this.getCenter(),n=Number.MAX_VALUE;return this.points.forEach(function(r){var a=r.posX+i[0]-t.x,o=r.posY+i[1]-t.y,s=Math.sqrt(a*a+o*o);n>s&&!r.isNull&&(e=r,n=s) +}),e}});return t("../ChartLibrary").register(s.LINE_RADAR,x),x}),define("chart/ColumnRadar",["require","../EffectHelper","../utils/Interpolator","../utils/PathGenerator","../Constants","./Radar","../ChartLibrary"],function(t){var e=t("../EffectHelper"),i=t("../utils/Interpolator"),n=t("../utils/PathGenerator"),r=t("../Constants"),a=t("./Radar"),o=600,s="cubic-out",h=500,l="back-out",u=100,c="ease-out-in",d=6,f=0.35,p="radar-top",g="radar-bottom",m="radar-left",v="radar-right",_=8,y=a.extend({columnType:!0,_calcLabelPos:function(t){var e=this.polar.angleAxis._getPolarPosition(t.category),i=this._getArcPoint(t.outerRadius-_,t.radian),n=t.labelDim; +switch(e){case p:t.labelPos={x:-n.width/2,y:i[1]};break;case v:t.labelPos={x:i[0]-n.width,y:i[1]-n.height/2};break;case g:t.labelPos={x:-n.width/2,y:i[1]-n.height};break;case m:t.labelPos={x:i[0],y:i[1]-n.height/2}}},effectAnimation:function(t){e.areaStyleEffectAnimation(t)},getDefaultEffectTime:function(){return e.AREA_STYLE_EFFECT_TIME},getStyle:function(t){return{fill:t.color,"fill-opacity":t.opacity,stroke:t.borderColor,"stroke-width":t.options.borderWidth,"stroke-opacity":1}},getHighLightStyle:function(t){return{stroke:t.mouseOverColor||t.color,fill:t.color,"fill-opacity":1,"stroke-width":d,"stroke-opacity":f} +},getPressedStyle:function(t){return{fill:t.clickColor,"fill-opacity":t.clickOpacity}},getPointGraphicKey:function(){return"path"},_getRadarColumnPath:function(t,e,i){var r=0.375*this.polar.angleAxis.piece,a=i-r,o=i+r,s=n.arc().innerRadius(t).outerRadius(e).startAngle(a).endAngle(o);return s()},getPointInitAnimationAttr:function(t){var e=t.series,n=i(t.animateInitRadius,t.innerRadius),r=i(t.animateInitRadius,t.outerRadius);return e._pointAnimateAttr(l,h,t,n,r)},getPointReShowAnimationAttr:function(t){var e=t.series,n=t.getStackPointPreSufPoint(t),r=n.pre,a=n.suf,h=t.animateInitRadius; +r?h=r._lastOuterRadius_:a&&(h=a._lastInnerRadius_);var l=i(h,t.innerRadius),u=i(h,t.outerRadius);return e._pointAnimateAttr(s,o,t,l,u)},getPointUpdateAnimationAttr:function(t){var e=this,n=i(t._lastInnerRadius_||t.animateInitRadius,t.innerRadius),r=i(t._lastOuterRadius_||t.animateInitRadius,t.outerRadius);return e._pointAnimateAttr(s,o,t,n,r)},getPointDropAnimationAttr:function(t){var e=this,n=t.getStackPointPreSufPoint(t),r=n.pre,a=n.suf,h=t.animateInitRadius;r?h=r.outerRadius:a&&(h=a.innerRadius); +var l=i(t.innerRadius,h),u=i(t.outerRadius,h);return e._pointAnimateAttr(s,o,t,l,u)},_pointAnimateAttr:function(t,e,i,n,r){var a=i.series;return{ease:t,duration:e,attrTween:{d:function(){return function(t){return i._lastInnerRadius_=n(t),i._lastOuterRadius_=r(t),a._getRadarColumnPath(i._lastInnerRadius_,i._lastOuterRadius_,i.radian)}}}}},_onPointMouseOver:function(t){var e=t.series,i=e.getHighLightStyle(t);e._onState(t,!0,i)},_onPointMouseOut:function(t){var e=t.series,i=e.getStyle(t);e._onState(t,!1,i) +},_onState:function(t,e,i){var n=t.series;t.graphic.animate({duration:u,ease:c,style:i}),n._labelFontSizeState(t,e,u,c)},_getFixedPos:function(t,e){var i=t.radian,n=this.getCenter(),r=t.posX+n[0],a=t.posY+n[1];return i=Math.PI&&i<3*Math.PI/2?r-=e.width:i>=3*Math.PI/2&&i<2*Math.PI&&(a-=e.height,r-=e.width),[r,a]},calcMoreLabelPosition:function(t,e){var i=t.innerRadius+(t.outerRadius-t.innerRadius)/2,n=this._getArcPoint(i,t.radian),r=this.getCenter(),a=n[0]+r[0],o=n[1]+r[1]; +return{startX:a,startY:o,direction:"top"}}});return t("../ChartLibrary").register(r.COLUMN_RADAR,y),y}),define("chart/Bubble",["require","./Series","../utils/BaseUtils","../Constants","../utils/QueryUtils","../ComponentLibrary","../EffectHelper","../utils/BezierEasing","../ChartLibrary"],function(t){var e=t("./Series"),i=t("../utils/BaseUtils"),n=t("../Constants"),r=(t("../utils/QueryUtils"),t("../ComponentLibrary"),t("../EffectHelper")),a=t("../utils/BezierEasing"),o=500,s=500,h=300,l=300,u=200,c=a.custom["ease-out-back"],d=a.css["ease-out"],f=e.extend({doLayout:function(){this._calculateBubblePosition() +},useCanvas:function(){return this.vanchart.chartType()!==n.FORCE_BUBBLE_CHART&&this.options.large},getTargetKey:function(){return"size"},isNullValue:function(t){var e=t.options;return this.vanchart.isMap()?"-"==e.size||i.hasNotDefined(e.size):"-"==e.x||"-"==e.y||"-"==e.size||i.hasNotDefined(e.size)},_getPointKey:function(t){var e=t.options||t;return this.vanchart.isMap()?t.name:""+e.x+e.y},_calculateLabelPos:function(){},_calculateMinMax4Radius:function(){for(var t=this,e=t.points,i=Number.MAX_VALUE,n=-Number.MAX_VALUE,r=0,a=e.length; +a>r;r++){var o=e[r],s=o.getTargetValue();o.visible&&!o.isNull&&(0>s&&!o.options.displayNegative||o.options.minSize||o.options.maxSize||(n=Math.max(n,isNaN(s)?0:Math.abs(s)),i=Math.min(i,isNaN(s)?0:Math.abs(s))))}t.seriesAbsMinValue=i,t.seriesAbsMaxValue=n},_calculateBubbleRadius:function(){var t=this,e=t.options,r=Math.max(t.maxSize,t.minSize),a=Math.min(t.minSize,t.maxSize),o=e.sizeBy==n.SIZE_BY_AREA,s=this.seriesAbsMaxValue,h=this.seriesAbsMinValue;if(!this._sizeByCurrentSeries()){var l=this._calculateChartMinMax(); +s=i.pick(l.max,l[1]),h=i.pick(l.min,l[0])}var u=s-h,c=o?(r*r-a*a)/u:(r-a)/u;c=isFinite(c)?c:0;var d=i.pick(this.vanchart.scale,1);this.points.forEach(function(t){var e=c*(Math.abs(t.value)-h),i=o?Math.sqrt(a*a+e):a+e;if(t.options.minSize||t.options.maxSize){var n=isNaN(t.options.minSize)?t.options.maxSize:t.options.minSize;i=o?2*Math.sqrt(n):n}i=t.getTargetValue()<0&&!t.options.displayNegative?0:i,t.radius=i/2*d})},_sizeByCurrentSeries:function(){return i.hasDefined(this.options.minSize)&&i.hasDefined(this.options.maxSize) +},_calculateChartMinMax:function(){var t=this.vanchart.seriesOfType(this.type),e=Number.MAX_VALUE,i=-e;return t.forEach(function(t){t._sizeByCurrentSeries()||(e=Math.min(e,t.seriesAbsMinValue),i=Math.max(i,t.seriesAbsMaxValue))}),{min:e,max:i}},_calculateBubblePosition:function(){var t=this.vanchart.isInverted(),e=this.xAxis,i=this.yAxis;this.points.forEach(function(n){var r=n.options,a=e.scale.rangeBand?e.scale.rangeBand()/2:0,o=e.scale(e.getAxisValue(r.x))+a,s=i.scale(i.getAxisValue(r.y));n.posX=t?s:o,n.posY=t?o:s; +var h=n.labelDim&&!n.isNull&&!(n.getTargetValue()<0&&!r.displayNegative);h&&r.dataLabels&&r.dataLabels.enabled&&(n.labelPos={x:n.posX-n.labelDim.width/2,y:n.posY-n.labelDim.height/2})})},getTrendLineXYValues:function(t){return this._getNormalTrendLineXYValues(t)},_getFixedPos:function(t){var e,i=this.vanchart,n=i.bounds,r=t.radius||0;if(i.isMap()){var a=t.getLatLng();if(!a){return}e=i.latLngToContainerPoint(a)}else{e={x:n.x+t.posX,y:n.y+t.posY}}return r=(r+1)/1.414,[e.x+r,e.y+r]},calcMoreLabelPosition:function(t,e){var i=this.vanchart.bounds,n=t.posX,r=t.posY; +return{startX:n+i.x,startY:r+i.y,direction:"top"}},getPointGraphicKey:function(){return"circle"},effectAnimation:function(t){r.bubbleEffectAnimation(t,this.vanchart.isMap())},getDefaultEffectTime:function(){return r.MARKER_EFFECT_TIME},getPointInitAttr:function(t){return{transform:i.makeTranslate([t.posX,t.posY]),r:0}},getPointInitAnimationAttr:function(t){return{delay:t.delayTime||0,ease:"bounce",duration:o,attr:{r:t.radius}}},getPointReShowAnimationAttr:function(t){return{ease:"bounce",duration:l,attr:{r:t.radius}} +},getPointUpdateAnimationAttr:function(t){return{ease:"back-out",duration:s,attr:{r:t.radius,transform:i.makeTranslate({x:t.posX,y:t.posY})}}},getPointDropAnimationAttr:function(){return{ease:"back-in",duration:h,attr:{r:0}}},_getShadowFilter:function(){var t=this,e=t.vanchart,n=e.renderer;return e.bubbleShadowFilter=e.bubbleShadowFilter||n.createDropShadowFilter(0,0,0.2,2),"url(#"+i.stamp(e.bubbleShadowFilter)+")"},getStyle:function(t){var e=t.series,n={stroke:t.mouseOverColor,"stroke-opacity":0,"stroke-width":0,fill:t.color,"fill-opacity":t.opacity}; +return t.options.shadow&&!i.isMS&&(n.filter=e._getShadowFilter()),n},getHighLightStyle:function(t){return{stroke:t.mouseOverColor,"stroke-opacity":0.35,"stroke-width":6,fill:t.mouseOverColor,"fill-opacity":t.opacity+0.35}},getPressedStyle:function(t){return{stroke:t.mouseOverColor,"stroke-opacity":0.35,"stroke-width":6,fill:t.clickColor,"fill-opacity":t.clickOpacity}},_onPointMouseOver:function(t){var e=t.series,i=e.getHighLightStyle(t);e._onState(t,!0,c,i)},_onPointMouseOut:function(t){var e=t.series,i=e.getStyle(t); +e._onState(t,!1,d,i)},_onState:function(t,e,i,r){t._isChosen=e;var a=t.series,o=a.vanchart;a.vanchart.isLargeMode()||(o.isMap()?(t._mapPointOnMouseState(e,u,i,r),t.textLayers&&t.textLayers.forEach(function(t){t._fontSizeState(e,u,c)})):(t.graphic.interrupt(n.SELECT_ANIMATION).transition(n.SELECT_ANIMATION).animate({ease:i,duration:u,style:r,attr:{r:t.radius+(e?1:0)}}),a._labelFontSizeState(t,e,u,i)))},getDefaultTooltipFormatter:function(){return this.vanchart.isMap()?{areaNameFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}",changedPercentFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '#.##%') : arguments[0]}",changedValueFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}",identifier:"{NAME}{SERIES}{VALUE}{SIZE}",percentFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '#.##%') : arguments[0]}",seriesFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}",valueFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}"}:{XFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}",YFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}",changedPercentFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '#.##%') : arguments[0]}",changedValueFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}",identifier:"{SERIES}{X}{Y}{SIZE}",seriesFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}",sizeFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}"} +}});return t("../ChartLibrary").register(n.BUBBLE_CHART,f),f}),define("chart/Scatter",["require","./Series","../utils/BaseUtils","../Constants","../utils/QueryUtils","../ComponentLibrary","../EffectHelper","../utils/PathGenerator","../ChartLibrary"],function(t){var e=t("./Series"),i=t("../utils/BaseUtils"),n=t("../Constants"),r=(t("../utils/QueryUtils"),t("../ComponentLibrary"),t("../EffectHelper")),a=t("../utils/PathGenerator"),o=300,s=500,h=2,l=e.extend({doLayout:function(){var t=this.vanchart.isInverted(),e=this.xAxis,n=this.yAxis; +this.points.forEach(function(r){var a=e.scale.rangeBand?e.scale.rangeBand()/2:0,o=e.scale(e.getAxisValue(r.options.x))+a,s=n.scale(n.getAxisValue(r.options.y));if(r.posX=t?s:o,r.posY=t?o:s,r.labelDim){var l=r.options.marker,u=i.isImageMarker(l.symbol)?l.height/2:l.radius;r.labelPos={x:r.posX-r.labelDim.width/2,y:r.posY-u-h-r.labelDim.height}}});var r=this,o=a.line().interpolate(r.interpolate).x(function(t){return t.posX}).y(function(t){return t.posY}).defined(function(t){return !t.isNull});this.points.sort(function(t,e){return t.posX-e.posX +}),this.linePath=o(this.points)},useCanvas:function(){return this.options.large},getTargetKey:function(){return"size"},isNullValue:function(t){var e=t.options;return this.vanchart.isMap()?"-"==e.size||i.hasNotDefined(e.size):"-"==e.x||"-"==e.y||i.hasNotDefined(e.y)},_calculateLabelPos:function(t){},getTrendLineXYValues:function(t){return this._getNormalTrendLineXYValues(t)},_getFixedPos:function(t){var e,i=this.vanchart,n=i.bounds,r=t.options.marker&&t.options.marker.radius||0;if("vanChartMap"==i.vanChartType){var a=t.getLatLng(); +if(!a){return}e=i.latLngToContainerPoint(a)}else{e={x:n.x+t.posX,y:n.y+t.posY}}return r=(r+1)/1.414,[e.x+r,e.y+r]},_animateEnd:function(){this._showLabels(),this._drawEffectPoints();var t=this,e=t.vanchart,n=e.renderer;t.group||(t.group=t._createGroup(n,e).attr("transform",i.makeTranslate(t._getTranslate())).attr("class",t.className+" "+t.type)),t.visible&&t.linePath&&(t.lineGraphic=t.lineGraphic||n.path({d:t.linePath}).addTo(t.group),t.lineGraphic.style({fill:"none","pointer-events":"none","stroke-width":t.options.lineWidth,stroke:t.color})) +},calcMoreLabelPosition:function(t,e){var i=this.vanchart.bounds,n=t.posX+i.x,r=t.posY+i.y;return{startX:n,startY:r,direction:"top"}},effectAnimation:function(t){r.markerEffectAnimation(t,this.vanchart.isMap())},getDefaultEffectTime:function(){return r.MARKER_EFFECT_TIME},_getPointKey:function(t){var e=t.options||t;return this.vanchart.isMap()?t.name:""+e.x+e.y},getAttrs:function(t){return{transform:i.makeTranslate({x:t.posX,y:t.posY})}},_updatePointGraphicStyle:function(t){this._updateMarker(t)},updatePointGraphic:function(t){this._updateMarkerPointGraphic(t) +},_createPointGraphic:function(t){return t.graphic=this._createMarker(t.options.marker)},getPointInitAttr:function(t){return{transform:"translate("+t.posX+","+t.posY+") scale(0.01)"}},getPointInitAnimationAttr:function(t){return{delay:t.delayTime,ease:"back-out",duration:o,attr:{transform:"translate("+t.posX+","+t.posY+") scale(1)"}}},getPointReShowAnimationAttr:function(t){return{ease:"back-out",duration:o,attr:{transform:"translate("+t.posX+","+t.posY+") scale(1)"}}},getPointUpdateAnimationAttr:function(t){return{ease:"back-out",duration:s,attr:{transform:"translate("+t.posX+","+t.posY+") scale(1)"}} +},getPointDropAnimationAttr:function(t){return{ease:"back-in",duration:o,attr:{transform:"translate("+t.posX+","+t.posY+") scale(0)"}}},drawSeries:function(){var t=this;t.visible&&t.lineGraphic&&t.lineGraphic.animate({duration:s,ease:"back-out",attr:{d:t.linePath}}),t.visible||(t.lineGraphic&&t.lineGraphic.remove(),t.lineGraphic=null)},getStyle:function(t){var e=t.options.marker;if(i.isImageMarker(e.symbol)){return{symbol:e.symbol}}var n=this._isHollowMarker(e.symbol);return n?{"fill-opacity":0,fill:"white",stroke:e.fillColor,"stroke-opacity":e.fillColorOpacity,"stroke-width":2}:{fill:e.fillColor,"fill-opacity":e.fillColorOpacity,stroke:"none"} +},_onPointMouseOver:function(t){var e=t.series;e.vanchart.isLargeMode()||(e.vanchart.isMap()?e._onMapPointState(t,!0):e._onMarkerMouseOver(t))},_onPointMouseOut:function(t){var e=t.series;e.vanchart.isLargeMode()||(e.vanchart.isMap()?e._onMapPointState(t,!1):e._onMarkerMouseOut(t))},_onMapPointState:function(t,e){t._mapPointOnMouseState(e),t.textLayers&&t.textLayers.forEach(function(t){t._transformState(e)})},getDefaultTooltipFormatter:function(){return this.vanchart.isMap()?{areaNameFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}",changedPercentFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '#.##%') : arguments[0]}",changedValueFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}",identifier:"{NAME}{SERIES}{VALUE}{SIZE}",percentFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '#.##%') : arguments[0]}",seriesFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}",valueFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}"}:{XFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}",YFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}",changedPercentFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '#.##%') : arguments[0]}",changedValueFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}",identifier:"{SERIES}{X}{Y}{SIZE}",seriesFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}",sizeFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}"} +}});return t("../ChartLibrary").register(n.SCATTER_CHART,l),l}),define("chart/Gauge",["require","../Constants","../utils/BaseUtils","./Series","../utils/QueryUtils","../utils/BoundsManager","../utils/ColorUtils","../component/FormattedText","../utils/BezierEasing"],function(t){var e=t("../Constants"),i=t("../utils/BaseUtils"),n=t("./Series"),r=(t("../utils/QueryUtils"),t("../utils/BoundsManager"),t("../utils/ColorUtils")),a=t("../component/FormattedText"),o=t("../utils/BezierEasing"),s=i.isSupportSVG(),h=n.extend({DEFAULT_PADDING:5,LINE_GAP:0.3,VERTICAL_GAP:0.3,HORIZONTAL_GAP:0.8,ANIMATION_TIME:1200,EASE_TYPE:"cubic-out",CHOSEN_EASE:o.css.ease,CHOSEN_TIME:200,OUT_EASE:o.css["ease-out"],OUT_TIME:900,refresh:function(t,e){return n.prototype.refresh.call(this,t,e),t=this.options,this.gaugeType=t.style,this.center=null,t.center&&(this.center=[this._getPercentValue(t.center[0],this.vanchart.width),this._getPercentValue(t.center[1],this.vanchart.height)]),i.calculateFontSizeWithScale(t.seriesLabel&&t.seriesLabel.style),i.calculateFontSizeWithScale(t.valueLabel&&t.valueLabel.style),i.calculateFontSizeWithScale(t.percentageLabel&&t.percentageLabel.style),this +},getBaseAxisType:function(){return"gaugeAxis"},doLayout:function(){var t=this._calculateGaugeBounds(),e=this,i=e.options;if(!t&&!i.radius&&!e.center){throw new Error("gauge has no bounds")}this.bounds=t,this._calculatePercentage(),e.defaultBands=(i.bands||[]).concat(e._getDefaultBands(e.gaugeAxis.scale.domain())),e.points.forEach(function(t){var i=e._getColorFromBands(t.getTargetValue(),e.defaultBands);i&&(i=r.getStandardColorAndOpacity(i),t.color=i.hex,t.opacity=i.alpha),t.mouseOverColor=r.getHighLightColor(t.color),t.clickColor=r.getClickColor(t.color) +}),this._doLayout()},_doLayout:function(){this._dealPercentLabel(),this._dealValueLabel(),this._fixCenterAndRadius()},calculateLabelInfo:function(t){},_createGroup:function(t,e){return t.group().addTo(e.seriesGroup)},_getAxisTypes:function(){return["gaugeAxis"]},getDataToDraw:function(){return[]},_calculatePercentage:function(){if(this.points.length){var t=this.gaugeAxis,e=t.scale.domain(),i=this.points;i.forEach(function(t){t.points=i,t.percentage=(t.value-e[0])/(e[1]-e[0])})}},_calculateLabelPos:function(){},_getTranslate:function(){return[Math.round(this.centerX),Math.round(this.centerY)] +},_validPoint:function(){var t=this.points.filter(function(t){return !t.isNull});return t[0]||this.points[0]},_dealSeriesLabel:function(){var t=this,e=t.options;if(t.seriesLabelContent="",t.seriesLabelDim={width:0,height:0},e.seriesLabel&&e.seriesLabel.enabled){var i=e.seriesLabel.style,n=t._validPoint();a.dataLabelGenerator(n,e.seriesLabel);var r=n.labelContent,o=n.labelDim;t.seriesLabelContent=r&&r[0]?r[0].text:"",t.seriesLabelStyle=i,t.seriesLabelDim=o}},_dealPercentLabel:function(){var t=this,e=t.options,n=e.percentageLabel; +t.percentageLabelContent="",t.percentageLabelDim={width:0,height:0};var r=t.points[0];if(r&&!r.isNull&&n&&n.enabled){var o=i.clone(n.style);o.color||(o.color=r.color),a.dataLabelGenerator(r,n);var s=r.labelContent,h=r.labelDim;t.percentageLabelContent=s&&s[0]?s[0].text:"",t.percentageLabelStyle=o,t.percentageLabelDim=h}},_dealValueLabel:function(){var t=this,e=t.options,n=e.valueLabel,r=n.style,o=n.useHtml,s=n.formatter;if(t.valueLabelContent="",t.valueLabelDim={width:0,height:0},n&&n.enabled){for(var h=[],l=0,u=t.points.length; +u>l;l++){var c=t.points[l];if(!c.isNull){var d=a.calculateSingleLineLabelContent(s,c),f=i.getTextDimension(d,r,o);h.push({labelContent:d,labelDim:f,labelStyle:i.extend({},r)})}}t.valueLabelContent=h}},_getDefaultBands:function(t){var e=this.options.color,n=[];if(e){n.push({from:t[0],to:t[1],color:e})}else{var r=t[0],a=t[1],o=i.accDiv(a-r,3),s=i.accAdd(r,o),h=i.accAdd(s,o),l=this.vanchart.options.colors;n=[{from:r,to:s,color:l[0]},{from:s,to:h,color:l[1]},{from:h,to:a,color:l[2]}]}return n},_getColorFromBands:function(t,e){if(e&&e.length){for(var i=0,n=e.length; +n>i;i++){var r=e[i],a=Math.min(r.from,r.to),o=Math.max(r.from,r.to);if(t>=a&&o>=t){return r.color}}}},_calculateGaugeBounds:function(){for(var t=this.vanchart.seriesOfType(e.GAUGE_CHART),i=this.vanchart.bounds,n=0,r=0,a=t.length;a>r;r++){t[r].center&&t[r].options.radius&&n++}for(var o=this.options.layout==e.HORIZONTAL_LAYOUT,s=o?"width":"height",h=i[s]/Math.max(1,t.length-n),r=0,a=t.length;a>r;r++){if(t[r]==this&&!this.center){return o?{x:i.x+r*h,y:i.y,width:h,height:i.height}:{x:i.x,y:i.y+r*h,width:i.width,height:h} +}}return{x:0,y:0,width:0,height:0}},_getFixedPos:function(t,e){var i,n,r=t.series,a=r.gaugeType;return"pointer_semi"==a?(i=r.centerX-e.width/2,n=r.centerY+0.14*r.radius+10):(i=r.centerX+r.radius+10,n=r.centerY-e.height/2),[i,n]},_animateEnd:function(){},_getPointTextLabelGroup:function(){if(!this.textGraphicGroup){var t=this.vanchart,e=(t.seriesTextRenderGroup,t.seriesTextDivGroup);this.textGraphicGroup=t.renderer.vgroup(),this.textGraphicGroup.renderG.addTo(this.group),e.append(this.textGraphicGroup.divG) +}return this.textGraphicGroup.divG.attr("transform",i.makeTranslate(this._getTranslate())),this.textGraphicGroup},_drawGaugeLabels:function(t){var e=this,i=e.vanchart;e._removeNormalLabels(t),e._drawNormalLabels(t),e.updateLastLabelPos&&e.updateLastLabelPos(),i._needShowMoreLabel()&&e.visible&&e._drawDiffMoreLabels(),i._removeChangeDataState(e)},_drawDiffMoreLabels:function(){var t=this,e=this.points[0];e&&!e.isNull&&this._showMoreLabel(e,t.centerX,t.centerY)},_removeNormalLabels:function(t){for(var e=t.labels||[],i=0,n=e.length; +n>i;i++){e[i]&&e[i].remove(),e[i]=null}this._drawExitValueLabel&&this._drawExitValueLabel()},_drawNormalLabels:function(t){var e=this,n=e.options,a=e.vanchart,o=a.renderer;if(t.labels=[],e.seriesLabelContent&&e._drawLabel(t,e.seriesLabelContent,e.seriesLabelPos,e.seriesLabelStyle,n.seriesLabel.useHtml),e.percentageLabelContent&&e._drawLabel(t,e.percentageLabelContent,e.percentageLabelPos,e.percentageLabelStyle,n.percentageLabel.useHtml,e.animateLabelPara()),e.valueLabelContent&&e.valueLabelContent.length){if(e.valueLabelBackground){var s=i.rectSubPixelOpt(e.valueLabelBackground,0); +s.rx=s.rx=0.02*e.radius;var h=e.options.valueLabel;e.valueLabelBackgroundRect=e.valueLabelBackgroundRect||o.rect().addTo(t),e.valueLabelBackgroundRect.attr(s).style({fill:h.backgroundColor,"fill-opacity":r.getColorOpacity(h.backgroundColor),filter:"url(#"+i.stamp(e.innerFilter)+")"}),e.lastValueLabelG=e.valueLabelG;var l=e.valueLabelG=o.group().addTo(t);e.clipRect?o.updateClip(e.clipRect,e.valueLabelBackground):e.clipRect=o.createClip(e.valueLabelBackground),o.clip(l,e.clipRect)}for(var u=e.isPointerGauge(),c=0,d=e.valueLabelContent.length; +d>c;c++){var f=e.valueLabelContent[c];e._drawLabel(t,f.labelContent,f.labelPos,f.labelStyle,n.valueLabel.useHtml,e.animateLabelPara(),l,u)}}else{e.valueLabelBackgroundRect&&e.valueLabelBackgroundRect.remove(),e.valueLabelBackgroundRect=null}},animateLabelPara:function(){},_drawLabel:function(t,e,n,r,a,o,h,l){if(n){var u=this,c=u.vanchart,d=c.renderer,f=i.getTextHeight(r),p=d.vtext(a).attr({x:n.x,y:n.y,dy:0.85*f}).textContent(e).style(r).addTo(a?t:h||t);if(l?(u.valueLabels=u.valueLabels||[],u.valueLabels.push(p)):t.labels.push(p),s&&o&&o.enabled){if(!u.hasChangedPointWithChangeDataState()&&!u.initialAnimationMoving){return +}p.attr(o.initAttr||{}).style(o.initStyle||{}).animate({ease:u.EASE_TYPE,duration:u.ANIMATION_TIME,style:{opacity:1,transform:i.makeTranslateWithPX({x:0,y:0})},attr:{transform:i.makeTranslate({x:0,y:0})}})}}},_onState:function(t,i,n){var r=this;t&&t.interrupt(e.SELECT_ANIMATION).transition(e.SELECT_ANIMATION).animate({ease:i?r.CHOSEN_EASE:r.OUT_EASE,duration:i?r.CHOSEN_TIME:r.OUT_TIME,style:n})},isPointerGauge:function(){return !1},_onSinglePointerTap:function(t){if(this.vanchart.isMobileFlow()){var e=this.points[0]; +this.vanchart.showTooltip(e,t),e._onPointTap(t)}else{this.vanchart&&this.vanchart.isMobile()&&this.fire("mousemove",t),this.points&&1===this.points.length&&this.points[0].onClick(t.srcEvent)}},_onSeriesMouseOver:function(t){(this.points&&1===this.points.length||this.isSupportSharedTooltip())&&this.vanchart.showTooltip(this.points[0],t)},_onSeriesMouseOut:function(){this.vanchart.hideTooltip()},getClosestPoint:function(){return 1===this.points.length?this.points[0]:null},_getStroke:function(t){return i.isSupportSVG()?"url(#"+i.stamp(t)+")":t +},getEvents:function(){return{pointMouseOver:this._onPointMouseOver,pointMouseOut:this._onPointMouseOut,mousemove:this._onSeriesMouseOver,mouseout:this._onSeriesMouseOut,tap:this._onSinglePointerTap,press:this.onSeriesPress,pressup:this.onSeriesPressUp}},isSupportLegendHighlight:function(){return !1},isSeriesAccumulated:function(){return !0},isSupportSharedTooltip:function(){var t=this.vanchart.options.plotOptions.tooltip||{};return !!this.options.tooltip.shared||!!t.shared}});return h}),define("chart/PointerGauge",["require","../Constants","../utils/BaseUtils","../utils/ColorUtils","../utils/BoundsManager","../utils/PathGenerator","../utils/Interpolator","../utils/Scale","./Gauge","../ChartLibrary","../ChartLibrary"],function(t){var e=t("../Constants"),i=t("../utils/BaseUtils"),n=t("../utils/ColorUtils"),r=t("../utils/BoundsManager"),a=t("../utils/PathGenerator"),o=t("../utils/Interpolator"),s=t("../utils/Scale"),h=t("./Gauge"),l=150,u=90,c=900,d=0.07,f=0.16,p=0.055,g=0.11,m=1,v=h.extend({gaugeType:e.POINTER_GAUGE,_doLayout:function(){this._dealSeriesLabel(),this._dealValueLabel(),this.isGaugeSeriesStylePointer()?this._fixPointerCenter():this._fixPointerSemiCenter() +},isGaugeSeriesStylePointer:function(){return this.options.style===e.POINTER_GAUGE},_drawDiffMoreLabels:function(){var t=this,e=t.points;e.forEach(function(e){t._showMoreLabel(e,t.centerX,t.centerY)})},getDataToDraw:function(){return this.points},_fixPointerCenter:function(){var t=this,i=t.options,n=i.radius,r=t.center,a=i.seriesLabel.align||e.BOTTOM;if(r){t.centerX=r[0],t.centerY=r[1],t.radius=n}else{var o,s=t.bounds,h=(1+m)*t.seriesLabelDim.height,l=s.height-h,u=s.x+s.width/2,c=s.y+s.height/2;n=n||Math.min(s.width,l)/2-t.DEFAULT_PADDING,a===e.BOTTOM?c+n+h>s.y+s.height?(o=s.height-(2*n+h),o>=0&&(c=s.y+n+o/2)):c-=h/2:c-n-h=0&&(c=s.y+n+h+o/2)):c+=h/2,t.centerX=u,t.centerY=c,t.radius=n +}if(t.seriesLabelContent){var d=t.seriesLabelDim;t.seriesLabelPos={x:-d.width/2,y:a===e.BOTTOM?n+m*d.height:-n-(1+m)*d.height}}t.valueLabelContent&&this._dealValueLabelContent(t,n)},_fixPointerSemiCenter:function(){var t=this,i=t.options,n=i.radius,r=i.seriesLabel.align;if(t.center){t.centerX=t.center[0],t.centerY=t.center[1],t.radius=n}else{var a=t.bounds,o=(1+m)*t.seriesLabelDim.height,s=a.height-o;n=n||Math.min(a.width/2,s/1.14)-t.DEFAULT_PADDING;var h,l=a.x+a.width/2,u=a.y+a.height/2+n/2;r===e.BOTTOM?u+0.14*n+o>a.y+a.height?(h=a.height-(1.14*n+o),h>=0&&(u=a.y+n+h/2)):u-=o/2+0.07*n:u-n-o=0&&(u=a.y+n+o+h/2)):u+=o/2-0.07*n,t.centerX=l,t.centerY=u,t.radius=n +}if(t.seriesLabelContent){var c=t.seriesLabelDim;t.seriesLabelPos={x:-c.width/2,y:r===e.BOTTOM?0.14*n+m*c.height:-n-(1+m)*c.height}}t.valueLabelContent&&this._dealSemiValueLabelContent(t,n)},_dealValueLabelContent:function(t,e){for(var n=t.options,r=t.gaugeAxis,a=r.options,o=r.scale.domain(),h=s.linear().domain(o).range([i.toRadian(-150),i.toRadian(150)]),l=i.getTextHeight(a.labelStyle),u=f*e+l/2,c=u,d=n.valueLabel.style,p=n.valueLabel.useHtml,g=i.getTextDimension("m",d,p).width,m=this._getPointerTickBoundsManager(r,e,h,l),v=m.heightBoundsManager,_=m.widthBoundsManager,y=0,x=u,T=Number.MAX_VALUE,b=0,A=t.valueLabelContent.length; +A>b;b++){var C=t.valueLabelContent[b],L=Math.min(-C.labelDim.width/2-g/4,T),M={x:L,y:x,width:2*Math.abs(L),height:u+g*(2+this.LINE_GAP)-x},P=C.labelContent,w=!1;if(!t._boundsInCircle(M)){break}if(v.isOverlapped(M)){break}for(;_.isOverlapped(M)&&P.length;){P=P.substr(0,Math.floor(0.9*P.length));var S=i.getTextDimension(P+"...",d,p);L=Math.min(-S.width/2-g/4,T),M={x:L,y:x,width:2*Math.abs(L),height:u+g*(1+this.LINE_GAP)-x},w=!0}w&&(C.labelContent=P+"...",C.labelDim=i.getTextDimension(C.labelContent,d,p),L=Math.min(-C.labelDim.width/2-g/4,T)),C.labelPos={x:-C.labelDim.width/2,y:u+g/2},u+=g*(1+this.LINE_GAP),T=L,y++ +}t.valueLabelContent.length=y;var E=g*(y+1+this.LINE_GAP*(y-1)),O=this._calculateMaxBackgroundHeight(v.addedBounds,Math.abs(T)),R=O?(O-c-E)/2:0;for(R=Math.max(R,0),b=0;y>b;b++){C=t.valueLabelContent[b],C.labelPos.y+=R}t.valueLabelBackground={x:T,y:x+R,width:2*Math.abs(T),height:E}},_drawExitValueLabel:function(){function t(t){t&&t.remove()}var e=this;e.vanchart;e.valueLabels=e.valueLabels||[];var n=e.options.valueLabel&&e.options.valueLabel.useHtml;if(e.hasChangedPointWithChangeDataState()&&!n&&e.valueLabels.length>0){var r=i.rectSubPixelOpt(e.valueLabelBackground,0).width; +e.valueLabels.forEach(function(n){n.animate({ease:e.EASE_TYPE,duration:c,style:{opacity:1,transform:i.makeTranslateWithPX({x:r,y:0})},attr:{transform:i.makeTranslate({x:r,y:0})}}).each("end",function(){t(e.lastValueLabelG)})})}else{e.valueLabels.forEach(function(t){t.remove()}),t(e.lastValueLabelG)}e.valueLabels=[]},isPointerGauge:function(){return !0},_dealSemiValueLabelContent:function(t,e){var n,r,a,o=t.options,h=t.gaugeAxis,l=h.options,u=h.scale.domain(),c=s.linear().domain(u).range([i.toRadian(-90),i.toRadian(90)]),d=o.valueLabel.style,f=o.valueLabel.useHtml,p=i.getTextHeight(d),m=i.getTextHeight(l.labelStyle),v=g*e+m/2,_=-v-p,y=this._getPointerTickBoundsManager(h,e,c,m),x=y.heightBoundsManager,T=y.widthBoundsManager,b=0,A=_,C=Number.MAX_VALUE; +for(n=0,r=t.valueLabelContent.length;r>n;n++){a=t.valueLabelContent[n],A-=p*(1+this.LINE_GAP);var L=Math.min(-a.labelDim.width/2-p/4,C),M={x:L,y:A,width:2*Math.abs(L),height:_-A},P=a.labelContent,w=!1;if(!t._boundsInCircle(M)){A+=p*(1+this.LINE_GAP);break}if(x.isOverlapped(M)){A+=p*(1+this.LINE_GAP);break}for(;T.isOverlapped(M)&&P.length;){P=P.substr(0,Math.floor(0.9*P.length));var S=i.getTextDimension(P+"...",d,f);L=Math.min(-S.width/2-p/4,C),M={x:L,y:A,width:2*Math.abs(L),height:_-A},w=!0}w&&(a.labelContent=P+"...",a.labelDim=i.getTextDimension(a.labelContent,d,f),L=Math.min(-a.labelDim.width/2-p/4,C)),C=L,b++ +}t.valueLabelContent.length=b;var E=p*(b+1+this.LINE_GAP*(b-1)),O=this._calculateMaxBackgroundHeight(x.addedBounds,Math.abs(C)),R=O?-(O-v-E)/2:0;for(R=Math.min(R,0),n=0;b>n;n++){a=t.valueLabelContent[n],a.labelPos={x:-a.labelDim.width/2,y:A+p/2+n*p*(1+this.LINE_GAP)+R}}t.valueLabelBackground={x:C,y:A+R,width:2*Math.abs(C),height:E}},_calculateMaxBackgroundHeight:function(t,e){var i=this.isGaugeSeriesStylePointer();t=t.filter(function(t){return i?t.y>=0:t.y<=0});var n,r,a,o,s,h,l=t.length;for(n=-1; +++n0&&r.xr.x+r.width&&(!h||h>r.x+r.width)&&(h=r.x+r.width,o=r)}}}if(!o&&!a&&i){for(n=-1;++n0&&(!s||s>=r.x)?(s=r.x,o=r):r.x<0&&(!h||h<=r.x+r.width)&&(h=r.x+r.width,a=r)}}if(!o&&!a){return null}var u=a?i?a.y:-a.height-a.y:Number.MAX_VALUE,c=o?i?o.y:-o.height-o.y:Number.MAX_VALUE;return Math.min(u,c)},_boundsInCircle:function(t){for(var e=this.radius,i=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x,y:t.y+t.height},{x:t.x+t.width,y:t.y+t.height}],n=0; +4>n;n++){var r=i[n],a=Math.abs(r.x),o=Math.abs(r.y);if(Math.pow(a*a+o*o,0.5)>e){return !1}}return !0},_getPointerTickBoundsManager:function(t,e,i,n){var a=new r,o=new r,s=0.84*e,h=t.tickData,l=this,u=0.5*n;h.forEach(function(t){var e=i(t.tickValue),n=l._getPointerTickCenter(t,s,i);l._addToBoundsManager(e,{x:n.x-t.tickDim.width/2-u,y:n.y-t.tickDim.height/2-u,width:t.tickDim.width+u,height:t.tickDim.height+u},a,o)});var c=t.getMinorTickData()||[],d=0.85*e,f=0.1*e;return c.forEach(function(t){var e,n,r=i(t),s=l._getArcPoint(d,r); +r-Math.PI/4&&t3*Math.PI/4)&&n.addBounds(e),i.addBounds(e)},_getPointerTickCenter:function(t,e,i){var n,r,a,o=i(t.tickValue),s=this._getArcPoint(e,o),h=s[0],l=s[1],u=t.tickDim,c=Math.atan(u.width/u.height);return Math.abs(o)=c&&o<=Math.PI-c?(n=u.width/2,r=h-n,a=l-n*l/h):o>=c-Math.PI&&-c>=o?(n=u.width/2,r=h+n,a=l+n*l/h):(n=u.height/2,r=h-n*h/l,a=l-n),{x:r,y:a} +},animateLabelPara:function(){var t=this;return{enabled:!0,initStyle:{transform:i.makeTranslateWithPX({x:-t.valueLabelBackground.width,y:0})},initAttr:{transform:i.makeTranslate({x:-t.valueLabelBackground.width,y:0})}}},drawSeries:function(){var t=this,e=t.vanchart,i=e.renderer,n=t.group;this.backgruondPath||(this.backgruondPath=i.path().addTo(n),this.hingePath=i.path().addTo(n),this.labelGroup=this._getPointTextLabelGroup(),this.axisGroup=this.labelGroup,this.needleGroup=i.group().addTo(n),this.pointerHingePath=i.path().addTo(n)),e.registerInteractiveTarget(this,n),this.labelGroup=this._getPointTextLabelGroup(),this.dropFilter||(this.dropFilter=i.createDropShadowFilter(0,2,0.1,2),this.innerFilter=i.createInnerShadowFilter(0,2,0.1,2)),this.isGaugeSeriesStylePointer()?this._drawPointer(180,f,d):this._drawPointer(98,g,p) +},onSeriesPress:function(){var t=a.arc().startAngle(0).endAngle(2*Math.PI).innerRadius(0),e=this.isGaugeSeriesStylePointer(),i=e?f:g,n=e?d:p;t.outerRadius(i*this.radius*1.25),this.hingePath.attr("d",t()),t.outerRadius(n*this.radius*1.25),this.pointerHingePath.attr("d",t())},onSeriesPressUp:function(){var t=a.arc().startAngle(0).endAngle(2*Math.PI).innerRadius(0),e=this.isGaugeSeriesStylePointer(),i=e?f:g,n=e?d:p;t.outerRadius(i*this.radius),this.hingePath.attr("d",t()),t.outerRadius(n*this.radius),this.pointerHingePath.attr("d",t()) +},_getScale:function(){var t=this,e=this.isGaugeSeriesStylePointer()?l:u,n=t.gaugeAxis.scale.domain();return s.linear().domain(n).range([i.toRadian(-e),i.toRadian(e)])},getStyle:function(t){var e=t.options;return{fill:e.needle,"fill-opacity":n.getColorOpacity(e.needle)}},getHighLightStyle:function(t){var e=t.options;return{fill:n.getHighLightColor(e.needle)}},getPointGraphicKey:function(){return"path"},_getPointGraphicGroup:function(){return this.needleGroup},getPointInitAnimationAttr:function(t){var e=t.series,n=e._getScale(),r=t._lastPercent; +return{duration:e.ANIMATION_TIME,ease:e.EASE_TYPE,attrTween:{d:function(){var a=n.domain(),s=a.length,h=i.hasDefined(r)?a[0]+(a[s-1]-a[0])*r:a[0];this._current_=i.getValueInDomain(t.value,n.domain());var l=o(h,this._current_);return function(t){return e._getArrowPath(l(t))}}}}},getPointUpdateAnimationAttr:function(t){return this.getPointInitAnimationAttr(t)},_getArrowPath:function(t){var e=this._getScale()(t),i=this.radius,n=this._getArcPoint(0.9*i,e),r=this._getArcPoint(0.02*i,e+Math.PI/2),a=this._getArcPoint(0.02*i,e-Math.PI/2); +return"M"+n[0]+","+n[1]+"L"+r[0]+","+r[1]+"L"+a[0]+","+a[1]+"Z"},_drawPointer:function(t,e,r){var o=this,s=o.options,h=o.radius,l=a.arc().startAngle(0).endAngle(2*Math.PI).innerRadius(0),u=a.arc().startAngle(i.toRadian(-t)).endAngle(i.toRadian(t)).innerRadius(0).outerRadius(h).toCenter(!1);o.backgruondPath.attr("d",u()).style({fill:s.paneBackgroundColor,"fill-opacity":n.getColorOpacity(s.paneBackgroundColor),filter:"url(#"+i.stamp(o.dropFilter)+")"}),l.outerRadius(e*h),o.hingePath.attr("d",l()).style({fill:s.hingeBackgroundColor,"fill-opacity":n.getColorOpacity(s.hingeBackgroundColor),filter:"url(#"+i.stamp(o.innerFilter)+")"}),this._drawPointerTicks(),this._drawGaugeLabels(o.labelGroup),l.outerRadius(r*h),o.pointerHingePath.attr("d",l()).style({fill:s.hinge,"fill-opacity":n.getColorOpacity(s.hinge),filter:"url(#"+i.stamp(o.dropFilter)+")"}) +},_drawPointerTicks:function(){var t=this,e=t.defaultBands,n=t.vanchart,r=t.gaugeAxis,a=n.renderer,o=this.axisGroup,s=r.getTickData(),h=r.getMinorTickData(),l=r.options,u=l.labelStyle,c=l.useHtml,d=0.95*t.radius,f=0.84*t.radius,p=this._getScale();this.ticks=this.ticks||[];var g,m,v,_=r._bindData(this.ticks,s,function(t){return p(t.tickValue)});_.exit.map(function(t){t.text&&t.text.remove(),t.remove()}),g=_.enter.map(function(t){var e=o.append(a.line().datum(t));return i.hasDefined(t.tickContent)&&(e.text=o.append(a.vtext(c))),e +}),this.ticks=g=g.concat(_.update);var y,x,T,b;for(m=0,v=g.length;v>m;m++){var A=g[m],C=A.datum();y=p(C.tickValue),x=t._getArcPoint(d,y),T=t._getArcPoint(d-0.1*t.radius,y),b=t._getColorFromBands(C.tickValue,e),A.attr("x1",x[0]).attr("y1",x[1]).attr("x2",T[0]).attr("y2",T[1]).style({stroke:b,"stroke-width":1});var L=t._getPointerTickCenter(C,f,p);A.text&&A.text.textContent(C.tickContent).style(i.clone(u)).attr({x:L.x-C.tickDim.width/2,y:L.y-C.tickDim.height/2,dy:".85em"})}for(this.minorTics=this.minorTics||[],_=r._bindData(this.minorTics,h),g=[],m=0,v=_.exit.length; +v>m;m++){_.exit[m].remove()}for(m=0,v=_.enter.length;v>m;m++){g.push(o.append(a.line().datum(_.enter[m])))}for(this.minorTics=g=g.concat(_.update),m=0,v=g.length;v>m;m++){var M=g[m],P=M.datum();y=p(P),x=t._getArcPoint(d,y),T=t._getArcPoint(d-0.05*t.radius,y),b=t._getColorFromBands(P,e),M.attr("x1",x[0]).attr("y1",x[1]).attr("x2",T[0]).attr("y2",T[1]).style({stroke:b,"stroke-width":1})}},_onPointMouseOver:function(t){var e=t.series,i=e.getHighLightStyle(t);e._onState(t.graphic,!0,i)},_onPointMouseOut:function(t){var e=t.series,i=e.getStyle(t); +e._onState(t.graphic,!0,i)}});return t("../ChartLibrary").register(e.POINTER_GAUGE,v),t("../ChartLibrary").register(e.POINTER_SEMI_GAUGE,v),v}),define("chart/SlotGauge",["require","../Constants","../utils/ColorUtils","../utils/BaseUtils","../utils/PathGenerator","../utils/Scale","./Gauge","../utils/Interpolator","../component/FormattedText","../ChartLibrary"],function(t){var e=t("../Constants"),i=t("../utils/ColorUtils"),n=t("../utils/BaseUtils"),r=t("../utils/PathGenerator"),a=t("../utils/Scale"),o=t("./Gauge"),s=t("../utils/Interpolator"),h=t("../component/FormattedText"),l=o.extend({gaugeType:e.SLOT_GAUGE,_getFixedPos:function(t,e){var i=t.series,n=i.centerX+1.08*i.radius+10,r=i.centerY-e.height/2; +return[n,r]},_dealValueLabel:function(){var t=this,e=t.options,i=t.points[0],r=e.valueLabel,a=r.useHtml,o=r.formatter;if(t.valueLabelContent="",i&&!i.isNull&&r&&r.enabled){for(var s=h.createMultiLineLabelContent(o,i),l=r.style,u=[],c=0,d=s.length;d>c;c++){u.push({labelContent:s[c],labelStyle:l,labelDim:n.getTextDimension(s[c],l,a)})}t.valueLabelContent=u}},_fixCenterAndRadius:function(){var t=this,e=t.options,i=e.radius;if(t.center){t.centerX=t.center[0],t.centerY=t.center[1],t.radius=i}else{var r=t.bounds; +i||(i=Math.min(r.width/2,r.height/2),i=i/1.08-t.DEFAULT_PADDING);var a=r.x+r.width/2,o=r.y+r.height/2;t.centerX=a,t.centerY=o,t.radius=i}if(t.percentageLabelContent&&t.valueLabelContent&&t.valueLabelContent.length>0){t.percentageLabelPos={x:-t.percentageLabelDim.width/2,y:-t.percentageLabelDim.height*(1+t.LINE_GAP)};for(var s=0,h=0,l=t.valueLabelContent.length;l>h;h++){var u=t.valueLabelContent[h];u.labelPos={x:-u.labelDim.width/2,y:s},s+=u.labelDim.height*(1+t.LINE_GAP)}}else{if(t.percentageLabelContent){t.percentageLabelPos={x:-t.percentageLabelDim.width/2,y:-t.percentageLabelDim.height/2} +}else{if(t.valueLabelContent&&t.valueLabelContent.length>0){for(var c=n.getTextHeight(e.valueLabel.style),d=t.valueLabelContent.length,f=c*d+c*(d-1)/2,s=-f/2,h=0;d>h;h++){var u=t.valueLabelContent[h];u.labelPos={x:-u.labelDim.width/2,y:s},s+=c*(1+t.LINE_GAP)}}}}},drawSeries:function(){var t=this,e=t.options,o=t.points[0],h=t.vanchart,l=h.renderer,u=t.group;this.backgruondPath||(this.backgruondPath=l.path().addTo(u)),this.slotBackground||(this.slotBackground=l.path().addTo(u),this.needlePath=l.circle().addTo(u)),this.labelGroup=this._getPointTextLabelGroup(),this.innderShadow||(this.innderShadow=l.createInnerShadowFilter(0,2,0.05,0),this.dropShadow=l.createDropShadowFilter(0,2,0.05,0)); +var c=r.arc().startAngle(n.toRadian(-135)).endAngle(n.toRadian(135)).innerRadius(0).outerRadius(t.radius).toCenter(!1).closePath(!1),d=r.arc().startAngle(n.toRadian(-135)).endAngle(n.toRadian(135)).innerRadius(0).outerRadius(t.radius).toCenter(!1).closePath(!1),f=t.gaugeAxis.scale.domain(),p=a.linear().domain(f).range([n.toRadian(-135),n.toRadian(135)]);if(t.backgruondPath.attr("d",d()).style({fill:"none",stroke:e.slotBackgroundColor,"stroke-linecap":"round","stroke-width":0.16*t.radius,filter:"url(#"+n.stamp(this.innderShadow)+")"}),!o||o.isNull){t.slotBackground&&(t.slotBackground.remove(),t.needlePath.remove(),t.slotBackground=t.needlePath=null),t._removeNormalLabels(this.labelGroup) +}else{var g=p(f[0]),m=p(n.getValueInDomain(o.value,f)),v=n.toDegree(m-g),_=(t._getColorFromBands(f[0],t.defaultBands),o.color);t.slotBackground.style({fill:"none",stroke:i.colorToHex(_),"stroke-linecap":"round","stroke-width":0.16*t.radius});var y=this._getArcPoint(t.radius,g);if(t.needlePath.attr("cx",y[0]).attr("cy",y[1]).attr("r",0.048*t.radius).style({fill:e.needle,"fill-opacity":i.getColorOpacity(e.needle),filter:"url(#"+n.stamp(this.dropShadow)+")"}),t.vanchart.renderer.isAnimation){t.slotBackground.animate({duration:t.ANIMATION_TIME,ease:t.EASE_TYPE,attrTween:{d:function(){this._lastRadian_=this._lastRadian_||g; +var t=s(this._lastRadian_,m);return this._lastRadian_=m,function(e){return c.endAngle(t(e))()}}}}),t.needlePath.animate({duration:t.ANIMATION_TIME,ease:t.EASE_TYPE,attrTween:{transform:function(){this._lastRotate_=this._lastRotate_||0;var t=s(this._lastRotate_,v);return this._lastRotate_=v,function(e){return"rotate("+t(e)+")"}}}})}else{var x=c.endAngle(m)(),T=t._getArcPoint(t.radius,m),b=T[0],A=T[1],C=0.008*t.radius;if(Math.abs(m-g)<0.000001){var c="a"+C+","+C+" 0 1,0 ";x="M"+(b-C)+","+A+c+2*C+",0 "+c+2*-C+",0 " +}t.slotBackground.attr("d",x),t.needlePath.attr({cx:T[0],cy:T[1]})}}this._drawGaugeLabels(this.labelGroup)},_onSeriesMouseOver:function(t){o.prototype._onSeriesMouseOver.call(this,t);var e=this.points[0];if(e){var n=i.getHighLightColor(e.color),r=i.getHighLightColor(this.options.needle);this._onState(this.slotBackground,!0,{stroke:i.colorToHex(n)}),this._onState(this.needlePath,!0,{fill:r})}},_onSeriesMouseOut:function(t){o.prototype._onSeriesMouseOut.call(this,t);var e=this.points[0];e&&(this._onState(this.slotBackground,!1,{stroke:e.color}),this._onState(this.needlePath,!1,{fill:e.options.needle})) +},onSeriesPress:function(){var t=this.points[0];if(t){var e=i.getColorWithDivider(t.color,1/0.95),n=i.getColorWithDivider(this.options.needle,1/0.95);this.slotBackground.style({stroke:i.colorToHex(e)}),this.needlePath.style({fill:n})}},onSeriesPressUp:function(){this._onSeriesMouseOver()},getDefaultTooltipFormatter:function(){return{categoryFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}",changedPercentFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '#.##%') : arguments[0]}",changedValueFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}",identifier:"{CATEGORY}{VALUE}",percentFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '#.##%') : arguments[0]}",seriesFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}",valueFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}"} +}});return t("../ChartLibrary").register(e.SLOT_GAUGE,l),l}),define("chart/RingGauge",["require","../Constants","../utils/ColorUtils","../utils/BaseUtils","./Gauge","../utils/PathGenerator","../utils/Interpolator","../ChartLibrary"],function(t){var e=t("../Constants"),i=t("../utils/ColorUtils"),n=t("../utils/BaseUtils"),r=t("./Gauge"),a=t("../utils/PathGenerator"),o=t("../utils/Interpolator"),s=r.extend({gaugeType:e.RING_GAUGE,_fixCenterAndRadius:function(){var t,e,i=this,n=i.options,r=n.radius;if(i.center){t=i.center[0],e=i.center[1] +}else{var a=i.bounds;r=r||Math.min(a.width/2,a.height/2)-i.DEFAULT_PADDING,t=a.x+a.width/2,e=a.y+a.height/2}i.centerX=t,i.centerY=e,i.radius=r;var o=0,s=i.valueLabelContent?i.valueLabelContent[0]:null;i.percentageLabelContent&&s?o=i.percentageLabelDim.height*(1+i.LINE_GAP)+s.labelDim.height:i.percentageLabelContent?o=i.percentageLabelDim.height:s&&(o=s.labelDim.height);var h=-o/2;i.percentageLabelContent&&(i.percentageLabelPos={x:-i.percentageLabelDim.width/2,y:h},h+=i.percentageLabelDim.height*(1+i.LINE_GAP)),s&&(s.labelPos={x:-s.labelDim.width/2,y:h}) +},drawSeries:function(){var t=this,e=t.options,r=t.vanchart,s=r.renderer,h=t.group;if(this.backgruondPath||(this.backgruondPath=s.path().addTo(h)),this.ringPath||(this.ringPath=s.path().addTo(h)),this.innerBackgroundPath||(this.innerBackgroundPath=s.path().addTo(h),this.innerStroke=s.path().addTo(h),this.outerStroke=s.path().addTo(h)),this.labelGroup=this._getPointTextLabelGroup(),!this.colorGradient){var l={x1:"0%",y1:"0%",x2:"0%",y2:"100%"},u={offset:"0%","stop-color":"#ffffff"},c={offset:"100%","stop-color":"#dddddd"}; +this.colorGradient=s.colorGradient(l,[u,c]),u["stop-color"]="#dddddd",c["stop-color"]="#ffffff",this.clickedGradient=s.colorGradient(l,[u,c]),n.isSupportSVG()||(this.colorGradient="#ffffff",this.clickedGradient="#dddddd")}var d=a.arc().startAngle(0).endAngle(2*Math.PI).innerRadius(0).outerRadius(t.radius),f=t.gaugeAxis.scale.domain(),p=(t._getColorFromBands(f[0],t.defaultBands),0.8*t.radius),g=p+2,m=p-1.5;this.backgruondPath.attr("d",d()).style({fill:e.paneBackgroundColor,"fill-opacity":i.getColorOpacity(e.paneBackgroundColor)}); +var v=t.points[0];if(v&&!v.isNull){var _=a.arc().startAngle(0).innerRadius(0).outerRadius(t.radius),y=v.color,x=Math.max(v.percentage,0),T=2*Math.PI*x*(e.clockwise?1:-1);this.ringPath.style({fill:i.colorToHex(y),"fill-opacity":i.getColorOpacity(y)}),this.ringPath.animate({duration:t.ANIMATION_TIME,ease:t.EASE_TYPE,attrTween:{d:function(){this._lastRadian_=this._lastRadian_||0;var t=o(this._lastRadian_,T);return this._lastRadian_=T,function(e){return _.endAngle(t(e))()}}}})}else{this.ringPath&&(this.ringPath.remove(),this.ringPath=null) +}this.innerBackgroundPath.attr("d",d.outerRadius(p)()).style({fill:e.innerPaneBackgroundColor,"fill-opacity":i.getColorOpacity(e.innerPaneBackgroundColor)}),this.outerStroke.attr("d",d.outerRadius(g)()).style({fill:"none",stroke:"#000000","stroke-opacity":0.05,"stroke-width":4}),this.innerStroke.attr("d",d.outerRadius(m)()).style({fill:"none",stroke:this._getStroke(this.colorGradient),"stroke-width":3}),this._drawGaugeLabels(this.labelGroup)},_onSeriesMouseOver:function(t){r.prototype._onSeriesMouseOver.call(this,t); +var e=this.points[0];e&&(this._onState(this.innerStroke,!0,{stroke:this._getStroke(this.colorGradient)}),this._onState(this.ringPath,!0,{fill:e.mouseOverColor}))},_onSeriesMouseOut:function(t){r.prototype._onSeriesMouseOut.call(this,t);var e=this.points[0];e&&(this._onState(this.innerStroke,!1,{stroke:this._getStroke(this.colorGradient)}),this._onState(this.ringPath,!1,{fill:e.color}))},onSeriesPress:function(){var t=this.points[0];t&&(this.innerStroke.style({stroke:this._getStroke(this.clickedGradient)}),this.ringPath.style({fill:t.clickColor})) +},onSeriesPressUp:function(){this._onSeriesMouseOver()},getDefaultTooltipFormatter:function(){return{categoryFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}",changedPercentFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '#.##%') : arguments[0]}",changedValueFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}",identifier:"{CATEGORY}{VALUE}",percentFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '#.##%') : arguments[0]}",seriesFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}",valueFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}"} +}});return t("../ChartLibrary").register(e.RING_GAUGE,s),s}),define("chart/ThermometerGauge",["require","../Constants","../utils/ColorUtils","../utils/BaseUtils","../utils/Scale","./Gauge","../ChartLibrary"],function(t){var e,i=t("../Constants"),n=t("../utils/ColorUtils"),r=t("../utils/BaseUtils"),a=t("../utils/Scale"),o=t("./Gauge"),s=6,h=4,l=4,u=5,c=0.001,d=o.extend({gaugeType:i.THERMOMETER_GAUGE,_drawDiffMoreLabels:function(){function t(t,e){return t-e/2}var e=this.points[0];if(e&&!e.isNull){var n=this.gaugeAxis.scale.domain(),r=this.options.thermometerLayout===i.VERTICAL_LAYOUT,o=a.linear().domain(n).range(r?[this.radius,-this.radius]:[-this.radius,this.radius]),s=o(e.y),h=r?0-2*u+10:s,l=r?s:0-2*u+10,c=this,d=c.centerX,f=c.centerY; +this._showMoreLabel(e,h+d,l+f,t,t)}},_fixCenterAndRadius:function(){var t=this,e=t.gaugeAxis,n=e.options,a=t.valueLabelContent?t.valueLabelContent[0]:null;t.tickUsedWidth=n.tickColor?l+s:n.minorTickColor?l+h:0,t.axisTickLabelGap=t.tickUsedWidth||e.getTickHeight()?l:0,t.percentageOneLineHeight=0,t.valueOneLineHeight=0,t.percentageLabelContent&&(t.percentageOneLineHeight=r.getTextHeight(t.percentageLabelStyle)),a&&(t.valueOneLineHeight=r.getTextHeight(a.labelStyle));var o=t.options.thermometerLayout===i.HORIZONTAL_LAYOUT?this._fixHorizontalThermometerCenter():this._fixVerticalThermometerCenter(),u=o.centerX,c=o.centerY,d=o.radius; +if(t.percentageLabelContent&&(t.percentageLabelPos.x-=u,t.percentageLabelPos.y-=c,t.percentageLabelPos.y=Math.min(t.percentageLabelPos.y,d-t.percentageLabelDim.height)),a){a.labelPos.x-=u,a.labelPos.y-=c;var f=d-a.labelDim.height-a.labelPos.y;0>f&&(a.labelPos.y+=f,t.percentageLabelContent&&(t.percentageLabelPos.y+=f))}t.centerX=u,t.centerY=c,t.radius=d},_fixHorizontalThermometerCenter:function(){var t,e,n,r=this,a=r.options,o=r.gaugeAxis,s=a.percentageLabel,h=a.valueLabel,l=r.valueLabelContent?r.valueLabelContent[0]:null,c=r.options.radius,d=this._getThermometerSize(); +if(r.center){t=r.center[0],e=r.center[1],n=e}else{var f=r.bounds;n=f.y+(f.height-d)/2,t=f.x+f.width/2,c=c||f.width/2-o.getMaxTickWidth()-r.DEFAULT_PADDING}return(r.percentageLabelContent||l)&&(r.percentageLabelContent&&l&&s.align===i.TOP&&h.align===i.TOP?(r.center&&(n-=r.percentageOneLineHeight*(1+r.LINE_GAP),n-=r.valueOneLineHeight*(1+r.HORIZONTAL_GAP),n-=o.getTickHeight()+r.tickUsedWidth+r.axisTickLabelGap+u),r.percentageLabelPos={x:-r.percentageLabelDim.width/2+t,y:n},n+=r.percentageOneLineHeight*(1+r.LINE_GAP),l.labelPos={x:-l.labelDim.width/2+t,y:n},n+=r.valueOneLineHeight*(1+r.HORIZONTAL_GAP)):(r.percentageLabelContent&&s.align===i.TOP&&(r.center&&(n-=r.percentageOneLineHeight*(1+r.HORIZONTAL_GAP),n-=o.getTickHeight()+r.tickUsedWidth+r.axisTickLabelGap+u),r.percentageLabelPos={x:-r.percentageLabelDim.width/2+t,y:n},n+=r.percentageOneLineHeight*(1+r.HORIZONTAL_GAP)),l&&h.align===i.TOP&&(r.center&&(n-=r.valueOneLineHeight*(1+r.HORIZONTAL_GAP),n-=o.getTickHeight()+r.tickUsedWidth+r.axisTickLabelGap+u),l.labelPos={x:-l.labelDim.width/2+t,y:n},n+=r.valueOneLineHeight*(1+r.HORIZONTAL_GAP)))),r.center?n=e+5:(n+=o.getTickHeight()+r.tickUsedWidth+r.axisTickLabelGap+2*u,e=n-5),(r.percentageLabelContent||l)&&(r.percentageLabelContent&&l&&s.align===i.BOTTOM&&h.align===i.BOTTOM?(n+=r.percentageOneLineHeight*r.HORIZONTAL_GAP,r.percentageLabelPos={x:-r.percentageLabelDim.width/2+t,y:n},n+=r.percentageOneLineHeight*(1+r.LINE_GAP),l.labelPos={x:-l.labelDim.width/2+t,y:n}):(r.percentageLabelContent&&s.align===i.BOTTOM&&(n+=r.percentageOneLineHeight*r.HORIZONTAL_GAP,r.percentageLabelPos={x:-r.percentageLabelDim.width/2+t,y:n}),l&&h.align===i.BOTTOM&&(n+=r.valueOneLineHeight*r.HORIZONTAL_GAP,l.labelPos={x:-l.labelDim.width/2+t,y:n}))),{centerX:t,centerY:e,radius:c} +},_fixVerticalThermometerCenter:function(){var t,e,n,o=this,s=o.options,h=o.gaugeAxis,l=s.percentageLabel,c=s.valueLabel,d=s.radius,f=o.points[0],p=h.scale.domain(),g=o.valueLabelContent?o.valueLabelContent[0]:null,m=this._getThermometerSize();if(o.center){t=o.center[0],e=o.center[1],n=t-2*u}else{var v=o.bounds;n=v.x+(v.width-m)/2,e=v.y+v.height/2,d=d||v.height/2-h.getTickHeight()-o.DEFAULT_PADDING}var _=a.linear().domain(p).range([d,-d]),y=e+_(r.getValueInDomain(f.value,p));return o.percentageLabelDim&&(y-=o.percentageLabelDim.height/3),(o.percentageLabelContent||g)&&(o.percentageLabelContent&&g&&l.align===i.LEFT&&c.align===i.LEFT?(o.center||(n+=Math.max(o.percentageLabelDim.width,g.labelDim.width),t=n+u),o.percentageLabelPos={x:n-o.percentageLabelDim.width,y:y},g.labelPos={x:n-g.labelDim.width,y:y+o.percentageLabelDim.height*(1+o.LINE_GAP)},n+=o.LINE_GAP*Math.max(o.percentageLabelDim.height,g.labelDim.height)):(o.percentageLabelContent&&l.align===i.LEFT&&(o.center&&(n-=o.percentageLabelDim.width+o.LINE_GAP*o.percentageLabelDim.height),o.percentageLabelPos={x:n,y:y},n+=o.percentageLabelDim.width+o.LINE_GAP*o.percentageLabelDim.height),g&&c.align===i.LEFT&&(o.center&&(n-=g.labelDim.width+o.LINE_GAP*g.labelDim.height),g.labelPos={x:n,y:y},n+=g.labelDim.width+o.LINE_GAP*g.labelDim.height))),o.center?n=t-u:t=n+u,n+=2*u+o.tickUsedWidth+o.axisTickLabelGap+h.getMaxTickWidth(),(o.percentageLabelContent||g)&&(o.percentageLabelContent&&g&&l.align===i.RIGHT&&c.align===i.RIGHT?(n+=o.LINE_GAP*Math.max(o.percentageLabelDim.height,g.labelDim.height),o.percentageLabelPos={x:n,y:y},g.labelPos={x:n,y:y+o.percentageLabelDim.height*(1+o.LINE_GAP)}):(o.percentageLabelContent&&l.align===i.RIGHT&&(o.percentageLabelPos={x:n+o.LINE_GAP*o.percentageLabelDim.height,y:y}),g&&c.align===i.RIGHT&&(g.labelPos={x:n+o.LINE_GAP*g.labelDim.height,y:y}))),{centerX:t,centerY:e,radius:d} +},_getThermometerSize:function(){var t=this,e=t.options,n=e.valueLabel,r=t.gaugeAxis,a=t.valueLabelContent?t.valueLabelContent[0]:null,o=e.percentageLabel;if(t.options.thermometerLayout==i.HORIZONTAL_LAYOUT){var s=0;return t.percentageLabelContent&&a?o.align==n.align&&(s+=t.percentageOneLineHeight+t.valueOneLineHeight,s+=t.LINE_GAP*t.percentageOneLineHeight,s+=t.HORIZONTAL_GAP*(n.align==i.TOP?t.valueOneLineHeight:t.percentageOneLineHeight)):t.percentageLabelContent?s+=(1+t.HORIZONTAL_GAP)*t.percentageOneLineHeight:a&&(s+=(1+t.HORIZONTAL_GAP)*t.valueOneLineHeight),s+=2*u+t.tickUsedWidth+t.axisTickLabelGap+r.getTickHeight() +}var h=0;return t.percentageLabelContent&&a?o.align==n.align?(h+=Math.max(t.percentageLabelDim.width,a.labelDim.width),h+=t.VERTICAL_GAP*Math.max(t.percentageLabelDim.height,a.labelDim.height)):(h+=t.percentageLabelDim.width+a.labelDim.width,h+=t.VERTICAL_GAP*(t.percentageLabelDim.height+a.labelDim.height)):t.percentageLabelContent?h+=t.percentageLabelDim.width+t.VERTICAL_GAP*t.percentageLabelDim.height:a&&(h+=a.labelDim.width+t.VERTICAL_GAP*a.labelDim.height),h+=r.getMaxTickWidth(),h+=2*u+t.tickUsedWidth+t.axisTickLabelGap +},animateLabelPara:function(){var t=this,n=t.points[0],o=t.gaugeAxis,s=o.scale.domain(),h=t.options.thermometerLayout===i.VERTICAL_LAYOUT,l=r.getValueInDomain(n.value,s),u=t.radius,c=a.linear().domain(s).range([0,2*u]),d=h?c(l):-u;e=d,d-=this._lastShiftLength||0;var f=h?{x:0,y:d}:{x:d,y:0};return{enabled:!0,initAttr:{transform:r.makeTranslate(f)},initStyle:{opacity:0}}},updateLastLabelPos:function(){this._lastShiftLength=e},_fillFilter:function(t,e){var a=this,o=a.vanchart,s=o.renderer,h=a.options.thermometerLayout===i.VERTICAL_LAYOUT; +if(r.isSupportSVG()){var l=t,u=n.mixColorWithHSB(l,0,-0.1,0.1);if(e){var c=n.getStandardColorAndOpacity(l).alpha;1>c&&(u=n.mixColorWithAlpha(u,c))}var d="0%",f="0%";h?f="100%":d="100%";var p={offset:"0%","stop-color":h?l:u},g={offset:"100%","stop-color":h?u:l},m={x1:"0%",y1:"0%",x2:d,y2:f};return this.colorGradient?s.updateColorGradient(this.colorGradient,m,[p,g]):this.colorGradient=s.colorGradient(m,[p,g]),"url(#"+r.stamp(this.colorGradient)+")"}return t},_clickEndColor:function(t){return n.getColorWithDivider(t.color,1/0.95) +},_mouseOverEndColor:function(t){return n.getColorWithDivider(t.mouseOverColor,1/0.95)},drawSeries:function(){var t=this,e=t.options,o=t.points[0],s=t.vanchart,h=s.renderer,l=t.group,d=t.gaugeAxis,f=d.scale.domain(),p=t.options.thermometerLayout===i.VERTICAL_LAYOUT,g=r.getValueInDomain(o.value,f),m=t.radius;this.backgruondLine||(this.backgruondLine=h.line().addTo(l),this.axisGroup=h.group().addTo(l)),this.thermometerLine||(this.thermometerLine=h.line().addTo(l),this.needlePath=h.circle().addTo(l)),this.labelGroup=this._getPointTextLabelGroup(); +var v=a.linear().domain(f).range([-m,m]),_="x1",y="y1",x="x2",T="y2",b="cx",A="cy",C=v(g),L=-m;p&&(_="y1",y="x1",x="y2",T="x2",b="cy",A="cx",L=m,C=v.range([m,-m])(g));var M=r.pick(t.thermometerLine.node()._lastX_,L);if(t.thermometerLine.node()._lastX_=C,t.backgruondLine.attr(_,-m).attr(y,0).attr(x,m).attr(T,c).style({fill:"none",stroke:e.slotBackgroundColor,"stroke-width":2*u,"stroke-linecap":"round"}),o.isNull){this.thermometerLine&&(this.thermometerLine.remove(),this.needlePath.remove(),this.thermometerLine=this.needlePath=null) +}else{t.thermometerLine.attr(_,L).attr(y,0).attr(T,c).attr(x,M).style({stroke:t._fillFilter(o.color,!0),"stroke-width":2*u,"stroke-linecap":"round"}),t.needlePath.attr("r",0.9*u).attr(b,M).attr(A,0).style({fill:e.needle,"fill-opacity":n.getColorOpacity(e.needle),"stroke-width":0.6*u,stroke:t._needleStrokeColor(o)});var P={};P[x]=C,t.thermometerLine.animate({duration:t.ANIMATION_TIME,ease:t.EASE_TYPE,attr:P}),P={},P[b]=C,t.needlePath.animate({duration:t.ANIMATION_TIME,ease:t.EASE_TYPE,attr:P})}this._drawGaugeLabels(this.labelGroup),this._drawThermometerTicks(v) +},_needleStrokeColor:function(t){return n.mixColorWithHSB(t.color,0,0.1,-0.1)},_drawThermometerTicks:function(t){var e,n,a,o,s,h=this,l=(h.options.bands,h.vanchart),c=h.gaugeAxis,d=l.renderer,f=this.labelGroup,p=c.getTickData(),g=c.getMinorTickData(),m=c.options,v=m.labelStyle,_=m.useHtml,y="x1",x="y1",T="x2",b="y2",A=-9,C=-15,L=-13,M=-(u+h.tickUsedWidth+h.axisTickLabelGap),P=function(t,e){return{x:e-t.tickDim.width/2,y:M-0.85*t.tickDim.height,dy:"0.85em"}};for(h.options.thermometerLayout===i.VERTICAL_LAYOUT&&(y="y1",x="x1",T="y2",b="x2",A=9,C=15,L=13,M=-M,P=function(t,e){return{x:M,y:e-t.tickDim.height/2,dy:".85em"} +}),this.ticks=this.ticks||[],e=c._bindData(this.ticks,p,function(e){return t(e.tickValue)}),e.exit.map(function(t){t.text&&t.text.remove(),t.remove()}),s=e.enter.map(function(t){var e=f.append(d.line().datum(t));return r.hasDefined(t.tickContent)&&(e.text=f.append(d.vtext(_))),e}),this.ticks=s=s.concat(e.update),n=0,a=s.length;a>n;n++){var w=s[n],S=w.datum();o=r.lineSubPixelOpt(t(S.tickValue),1),w.attr(y,o).attr(x,A).attr(T,o).attr(b,C).style({stroke:m.tickColor,"stroke-width":m.tickColor?m.tickWidth:0}),w.text&&w.text.textContent(S.tickContent).style(v).attr(P(S,o)) +}for(this.minorTics=this.minorTics||[],e=c._bindData(this.minorTics,g),s=[],n=0,a=e.exit.length;a>n;n++){e.exit[n].remove()}for(n=0,a=e.enter.length;a>n;n++){s.push(f.append(d.line().datum(e.enter[n])))}for(this.minorTics=s=s.concat(e.update),n=0,a=s.length;a>n;n++){var E=s[n],O=E.datum();o=r.lineSubPixelOpt(t(O),1),E.attr(y,o).attr(x,A).attr(T,o).attr(b,L).style({stroke:m.minorTickColor,"stroke-width":m.minorTickColor?m.minorTickWidth:0})}},_getFixedPos:function(t,e){var n,r,a,o=t.series,h=o.options,c=o.options.thermometerLayout,d=o.percentageLabelContent,f=o.valueLabelContent; +if(c===i.HORIZONTAL_LAYOUT){n=o.centerX-e.width/2;var p=o.centerY;r=p+u+10,d&&d.length&&h.percentageLabel.align===i.BOTTOM&&(r=p+o.percentageLabelPos.y+o.percentageLabelDim.height+10),f&&f.length&&h.valueLabel.align===i.BOTTOM&&(a=o.valueLabelContent[0],r=p+a.labelPos.y+a.labelDim.height+10)}else{r=o.centerY-e.height/2;var g=o.gaugeAxis.getMaxTickWidth(),m=o.centerX;n=m+u+l+s+l+g+10,d&&d.length&&h.percentageLabel.align===i.RIGHT&&(n=m+o.percentageLabelPos.x+o.percentageLabelDim.width+10),f&&f.length&&h.valueLabel.align===i.RIGHT&&(a=o.valueLabelContent[0],n=Math.max(n,m+a.labelPos.x+a.labelDim.width+10)) +}return[n,r]},_onSeriesMouseOver:function(t){o.prototype._onSeriesMouseOver.call(this,t);var e=this,i=this.points[0];i&&(e._onState(e.thermometerLine,!0,{stroke:e._fillFilter(e._mouseOverEndColor(i))}),e._onState(e.needlePath,!0,{stroke:n.getHighLightColor(this._needleStrokeColor(i)),fill:n.getHighLightColor(e.options.needle)}))},_onSeriesMouseOut:function(t){o.prototype._onSeriesMouseOut.call(this,t);var e=this,i=e.points[0];i&&(e._onState(e.thermometerLine,!1,{stroke:e._fillFilter(i.color,!0)}),e._onState(e.needlePath,!1,{stroke:this._needleStrokeColor(i),fill:this.options.needle})) +},onSeriesPress:function(){var t=this.points[0];t&&(this.thermometerLine.style("stroke",this._fillFilter(this._clickEndColor(t))),this.needlePath.style({stroke:n.getClickColor(t.color),fill:n.getClickColor(this.options.needle)}))},onSeriesPressUp:function(){this._onSeriesMouseOver()},getDefaultTooltipFormatter:function(){return{categoryFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}",changedPercentFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '#.##%') : arguments[0]}",changedValueFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}",identifier:"{CATEGORY}{VALUE}",percentFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '#.##%') : arguments[0]}",seriesFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}",valueFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}"} +}});return t("../ChartLibrary").register(i.THERMOMETER_GAUGE,d),d}),define("chart/TreeSeries",["require","./Series","../utils/BaseUtils","../utils/QueryUtils","../Constants","./Point","../dom/Evented"],function(t){var e=t("./Series"),i=t("../utils/BaseUtils"),n=(t("../utils/QueryUtils"),t("../Constants")),r=t("./Point"),a=(t("../dom/Evented"),e.extend({refresh:function(t,i){return e.prototype.refresh.call(this,t,i),this._refresh(),this._initChildren(),this},_initChildren:function(){this.traverseInitData(this.visitBefore,null),this.points=this.root.children,this.root.options.tooltip=null +},_getPointKey:function(t){return t.name},getTargetKey:function(){return"value"},_getChildrenKey:function(){return"children"},traverseData:function(t,e,i){function n(o,s,h,l){o.children||(o.children=o.options[a._getChildrenKey()]);var u=o.children;if(o.parent=h,o.depth=s,o.level=s,o.height=0,o.ancestor=l,e&&e.call(a,o),u&&(c=u.length)){for(var c,d=-1;++dp;p++){var m,v=!1;s.children.length&&s.children.forEach(function(t){var e=o._getPointKey(t);i.hasDefined(e)&&e==o._getPointKey(d[p])&&(t._lastValue=t.options[o.getTargetKey()],t.refresh(d[p]),v=!0,m=t,f.push(t))}),v||(m=new r(d[p],o),f.push(m)),0===l&&(c=m),m.index=p,a(m,d[p],l+1,s,c),s.height=Math.max(s.height,m.visible?m.height+1:0) +}for(var _=0,y=s.children.length;y>_;){-1===i.indexOf(f,s.children[_])?(s.children[_].clearChild(),y--):_++}o.type===n.TREEMAP_CHART&&0===s.children.length&&f.length&&(s.remove(),s.visible=!0),s.children=f}else{for(var g=s.children.length;--g>-1;){s.children[g].clearChild()}}e&&e.call(o,s)}var o=this,s={children:this.options.data,name:this.name};this.root?this.root.refresh(s):this.root=new r(s,o),a(this.root,s,0,null,null)},visitBefore:function(t){1===t.depth&&(t.color=this.vanchart.getDefaultSeriesColor(t.name)) +},visitAfter:function(){},drawPoint:function(t,e){e=e||0;var i=t.isVisible(),n=t.graphic&&t.graphic.isVisible();i===n?t.graphic&&this._drawUpdatePoints(t,e):i&&!n?this._drawEnterPoints(t):!i&&n&&this._drawExitPoints(t)},_calculatePercentage:function(t,e){var i=0;t.forEach(function(t){i+=Math.abs(t[e])}),i=i>0?i:1,t.forEach(function(t){t.percentage=Math.abs(t[e])/i})},_onPointMouseOver:function(t){var e=t.series,i=e.vanchart,n=i.hoverPoint;n&&this._onPointMouseOut(n),t.depth&&(e.onPointMouseOver(t),i.hoverPoint=t) +},_onPointMouseOut:function(t){var e=t.series;e.onPointMouseOut(t),e.vanchart.hideTooltip()},isSeriesAccumulated:function(){return !0},getLegendKey:function(t){for(var e=t;e&&e.parent!=this.root;){e=e.parent}return e?e.name:""},isTreeSeries:function(){return !0}}));return a}),define("chart/MultiPie",["require","../Constants","../utils/BaseUtils","../utils/Scale","./TreeSeries","./PieSeries","../utils/QueryUtils","../utils/ColorUtils","../utils/BoundsManager","./Point","../utils/BezierEasing","../EffectHelper","../utils/PathGenerator","../utils/Interpolator","../ChartLibrary"],function(t){var e=t("../Constants"),i=t("../utils/BaseUtils"),n=t("../utils/Scale"),r=t("./TreeSeries"),a=t("./PieSeries"),o=t("../utils/QueryUtils"),s=t("../utils/ColorUtils"),h=(t("../utils/BoundsManager"),t("./Point"),t("../utils/BezierEasing")),l=t("../EffectHelper"),u=t("../utils/PathGenerator"),c=t("../utils/Interpolator"),d=2/3,f=15,p=5,g=2*Math.PI,m=1.1,v=1e-10,_=1000,y=400,x="bounce",T=(h.css.swing,h.css.swing),b=r.extend(a).extend({isFlowTouch:function(){return !1 +},arc:u.arc().startAngle(function(t){return t.x}).endAngle(function(t){return t.x+t.dx}).innerRadius(function(t){return t.y}).outerRadius(function(t){return t.y+t.dy}),_refresh:function(){this.chartInfo={rotate:0},this.sx=n.linear(),this.sy=n.linear()},visitAfter:function(t){var e=t.children,i=t.options.value;if(i=isNaN(i)?0:i,t.chSum=i,e&&(n=e.length)){var n,r=0,a=-1;for(this._calculatePercentage(e,"value");++a1?h*(1-d)/(s-1):0,o=s>1?h*d:h),n(t,c,p,p,a,l,o)},_setColor:function(t,i,n){if(t&&i&&n){if(t.options.color){t.color=t.options.color}else{var r,a,o=s.getRGBAColorArray(t.ancestor.color),h=s.rgb2hsb(o[0],o[1],o[2]),l=(t.depth-1)/n;i===e.GRADUAL_LIGHTER?(r=-h[1]*l,a=(1-h[2])*l):(r=(1-h[1])*l,a=-h[2]*l),t.color=s.mixColorWithHSB(t.ancestor.color,0,r,a)}if(t.options.mouseOverColor){t.mouseOverColor=t.options.mouseOverColor}else{var r,a;i===e.GRADUAL_LIGHTER?(r=0.1,a=-0.05):(r=-0.1,a=0.05),t.mouseOverColor=s.mixColorWithHSB(t.options.tooltip&&t.options.tooltip.enabled&&t.options.tooltip.shared?t.ancestor.color:t.color,0,r,a) +}var u=s.getStandardColorAndOpacity(t.color,t.options.opacity);t.color=u.hex,t.opacity=u.alpha}},_calculateLabelPos:function(){var t=this,i=[],n=[];t.nodes.map(function(r){r.labelPos=null;var a=r.options,o=t.drilldownNow;r.name&&r.depth&&(o?r!==o.parent:!0)&&a.dataLabels&&a.dataLabels.enabled&&(a.dataLabels.align===e.OUTSIDE?this.needShowOutsidePointDataLabel(r)&&i.push(r):r.dx&&r.dy&&r.dx>=v&&n.push(r))},t);var r=t.chartInfo;t.calcOutsideLabel(i,r.bounds,r.center,r.radius),t.calculateLeadLineStartPos(i),t.calculateInsideLabelBounds(n) +},needShowOutsidePointDataLabel:function(t){var e=this.drilldownNow;if(!e){return !0}if(t===e){return !0}for(var i=!1;t.parent;){if(t=t.parent,t===e){i=!0;break}}return i},_getInnerRadius:function(t){return t.y},_getOuterRadius:function(t){return t.y+t.dy},_getStartAngle:function(t){return t.x},_getEndAngle:function(t){return t.x+t.dx},_getPositionInPie:function(t){var e=t.x-this.chartInfo.center[0],i=t.y-this.chartInfo.center[1];return{x:e,y:i}},_getFixedPos:function(t,e){var i=this.chartInfo.center[0],n=this.chartInfo.center[1],r=this.getCenterAngle(t),a=(t.y+t.dy)*m,o=a*Math.sin(r)+i,s=a*Math.cos(r+Math.PI)+n; +return r=Math.PI&&r<3*Math.PI/2?o-=e.width:r>=3*Math.PI/2&&g>r&&(s-=e.height,o-=e.width),[o,s]},drillDown:function(t){function i(t){var e=t.children,n=t;if(e&&(r=e.length)){for(var r,a=-1;++an.depth&&(n=o)}}return n}this.vanchart.clearAllEffects(),this.drilldownNow=t;var n,r,a=this.chartInfo.radius,s=this.chartInfo.innerRadius;if(t.depth){var h=t.ancestor.parent.height;if(0===t.height){n=[t.parent._y,t._y,t._y+t._dy],r=[0,f,a]}else{if(t.height+t.depth!==h){var l=i(t); +n=[t.parent._y,t._y,t._y+t._dy,l._y+l._dy,a],r=[0,f,a/2,a,a]}else{n=[t.parent._y,t._y,t._y+t._dy,a],r=[0,f,a/2,a]}}}else{n=[0,s,a],r=[0,s,a]}var u=t.depth+t.height;this.sx.domain([t._x,t._x+t._dx]),this.sy.domain(n).range(r),this.nodes.map(function(t){t.depth&&t.dataLabels&&t.dataLabels.enabled&&t.dataLabels._align===e.OUTSIDE&&(t.depth===u?t.dataLabels.align=e.OUTSIDE:t.dataLabels.align=e.INSIDE,o.merge(t,this.calculateLabelInfo(t),!0)),t.x=this.safeAngle(t._x),t.dx=this.safeAngle(t._x+t._dx)-t.x,t.y=this.safeRadius(t._y),t.dy=this.safeRadius(t._y+t._dy)-t.y,t===this.drilldownNow.parent&&(t.dx=this.safeAngle(7)) +},this),this._calculateLabelPos(),this.drawDrillDown(t)},safeAngle:function(t){return Math.max(this.startAngle,Math.min(this.endAngle,this.sx(t)))},safeRadius:function(t){return Math.max(0,this.sy(t))},_getTranslate:function(){return this.chartInfo.center},calcMoreLabelPosition:function(t){var e=this.chartInfo.center[0],i=this.chartInfo.center[1],n=t.rotate||0,r=n+t.x+t.dx/2,a=t.y+t.dy/2,o=this._getArcPoint(a,r);return{startX:o[0]+e,startY:o[1]+i,direction:"top"}},effectAnimation:function(t,e){l.areaStyleEffectAnimation(t,e) +},getDefaultEffectTime:function(){return l.AREA_STYLE_EFFECT_TIME},getStyle:function(t){return{display:t.name||!t.depth?"":"none",fill:t.color,"fill-opacity":t.depth?t.opacity:0,stroke:t.options.borderColor,"stroke-opacity":t.options.borderOpacity,"stroke-width":t.options.borderWidth}},getAttrs:function(t){return{d:this.arc(t)}},getPointGraphicKey:function(){return"path"},getChartNodes:function(){return this.nodes},getCenter:function(){return this.center},getRadius:function(){return this.radius},getDrilldown:function(){return this.options.drilldown +},_getPointGraphicGroup:function(){return this.wrapGroup||(this.wrapGroup=this.group.append(this.vanchart.renderer.group()),this.drawRing()),this.wrapGroup},drawRing:function(){this.ringPath||(this.ringPath=this.group.append(this.vanchart.renderer.path()),this.ringPath.attr({d:u.arc().startAngle(0).endAngle(2*Math.PI).innerRadius(f).outerRadius(f+p)()}).style({display:"none",fill:"rgba(0,0,0,0.1)","pointer-events":"none"}))},drawDrillDown:function(t){var e=this,n=e.vanchart.renderer.isAnimation;e._removeDataLabels(); +var r=e.arc;if(n){var a=0;e.nodes.filter(function(t){return t.graphic}).map(function(i){i.graphic.transition().ease("cubic-in-out").each("start",function(){++a}).duration(_).style("fill",i.color).attrTween("d",function(){var t=c(i._view,{x:i.x,y:i.y,dx:i.dx,dy:i.dy});return function(e){var n=t(e);return i._view=n,r(n)}}).attrTween("opacity",function(){return function(t){return i.depth&&i._view.y+i._view.dy>=f?1:0}}).each("end",function(){i.graphic&&i.graphic.attr("opacity",i.depth&&i.dx&&i.y+i.dy>f?1:0),--a||(e._animateEnd(),e.ringPath.style("display",t&&t.depth?"":"none")) +})}),t.depth||e.ringPath.transition().style("display","none")}else{e.nodes.map(function(t){t.graphic.attr({d:r(t),opacity:t.depth&&t.dx&&t.y+t.dy>f?1:0})}),e._animateEnd(t),i.isSupportSVG()||e.root.graphic.style({fill:"rgba(0,0,0,0)"}),e.ringPath.style("display",t.depth?"":"none")}},_animateEnd:function(){this.vanchart.renderer&&(this.ordered=this.orderType,this._showLabels(),this._drawEffectPoints())},_isOrderChanged:function(){return this.ordered!==this.orderType},initialAnimation:function(){this.wrapGroup.animate({duration:_,ease:h.css["ease-out-cubic"],attrTween:{transform:function(){var t=c(-360,0),e=c(0,1); +return function(i){var n=t(i),r=e(i);return"rotate("+n+")scale("+r+")"}}}})},getPointUpdateAnimationAttr:function(t){var e=this.arc,i=this._isOrderChanged(),n=i?T:x,r=i?y:_;return t.graphic.attr("opacity",t.depth?1:0),this.ringPath.style("display",this.drilldownNow.depth?"":"none"),{ease:n,duration:r,attrTween:{d:function(){var i=c(t._view,{x:t.x,y:t.y,dx:t.dx,dy:t.dy});return function(n){var r=i(n);return t._view=r,e(r)}}}}},getPointInitAnimationAttr:function(t){var e,i,n=t.series;i=n.initialAnimationMoving?{x:t.x,y:t.y,dx:t.dx,dy:t.dy}:{x:t.x1,y:t.y1,dx:t.dx1,dy:t.dy1},e=n.arc(i),t._view=i; +var r={d:e,opacity:t.depth?1:0};return n.initialAnimationMoving?{attr:r}:(t.graphic.attr(r),n.getPointUpdateAnimationAttr(t))},getPointDropAnimationAttr:function(t){return this.getPointUpdateAnimationAttr(t)},onPointMouseOver:function(t){this._onState(t,!0)},onPointMouseOut:function(t){this._onState(t,!1)},_onState:function(t,e){if(t.options.tooltip&&t.options.tooltip.shared){for(var i,n=t;(i=n.parent)&&i.depth&&i.y+i.dy!==f;){n=i,i.series._onSingleState(i,e)}}t.series._onSingleState(t,e)},_onSingleState:function(t,e){var n=t.series,r=n.options.animation,a={},o={}; +t.depth&&t._view.y1+t._view.dy1===f?o={opacity:e?1:0}:a={"fill-opacity":e?1:t.opacity,fill:e?t.mouseOverColor:t.color},r?(n._onPointState(t,e,a,o),n._onTextState(t,e)):(t.graphic.attr(o).style(a),t.depth||i.isSupportSVG()||t.graphic.style("fill","rgba(0,0,0,0)"))},allowDrillDown:function(t){if(!this.getDrilldown()){return !1}if(this.drilldownNow===t){return !1}for(var e,i=t;(e=i.parent)&&e.depth;){if(i=e,!e.name){return !1}}return !0},onPointTap:function(t){this.drillDown(t)},isSupportLegendHighlight:function(){return !1 +},getDefaultTooltipFormatter:function(){return{changedPercentFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '#.##%') : arguments[0]}",changedValueFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}",identifier:"{NAME}{SERIES}{VALUE}",nameFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}",percentFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '#.##%') : arguments[0]}",seriesFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}",valueFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}"} +}});return b.prototype._calculateLabelPosWhenRadiusFixed=b.prototype._calculateLabelPos,t("../ChartLibrary").register(e.MULTIPIE_CHART,b),b}),define("chart/TreeMap",["require","../Constants","../utils/BaseUtils","./TreeSeries","../utils/QueryUtils","../utils/ColorUtils","../utils/BoundsManager","./Point","../EffectHelper","../vans/TreeMapLayout","../utils/Scale","../utils/Interpolator","../dom/DomUtils","../ChartLibrary"],function(t){var e=t("../Constants"),i=t("../utils/BaseUtils"),n=t("./TreeSeries"),r=(t("../utils/QueryUtils"),t("../utils/ColorUtils")),a=(t("../utils/BoundsManager"),t("./Point"),t("../EffectHelper")),o=t("../vans/TreeMapLayout").treemapLayout,s=t("../utils/Scale"),h=t("../utils/Interpolator"),l=t("../dom/DomUtils"),u=6,c=800,d="out-bounce",f=1000,p=800,g=100,m=n.extend({nodes:[],root:null,zoomNow:null,sx:null,sy:null,zoom:null,_refresh:function(){this.sx=s.linear(),this.sy=s.linear() +},visitBefore:function(t){this._setColor(t)},visitAfter:function(t){var e=t.children,i=t.options.value;if(i=isNaN(i)?0:i,t.chSum=i,e&&(n=e.length)){var n,r=0,a=-1;for(this._calculatePercentage(e,"value");++a1&&!t.options.children&&(t.options.color?t.color=t.options.color:t.color=t.ancestor.color,t.options.mouseOverColor?t.mouseOverColor=t.options.mouseOverColor:t.options.color?t.mouseOverColor=r.getHighLightColor(t.options.color):t.mouseOverColor=t.ancestor.mouseOverColor,t.options.clickColor?t.clickColor=t.options.clickColor:t.options.color?t.clickColor=r.getClickColor(t.options.color):t.clickColor=t.ancestor.clickColor); +var e=r.getStandardColorAndOpacity(t.color,t.options.opacity);t.color=e.hex,t.opacity=e.alpha,t.borderColor=t.options.borderColor,t.borderOpacity=t.options.borderOpacity},_calculateLabelPos:function(){},_calcLabelPos:function(t){var n=t.options.dataLabels;if(n&&n.enabled){switch(n.align){case e.CENTER:n._align=e.CENTER,t.labelPos={x:t.x+(t.dx-t.labelDim.width)/2,y:t.y+(t.dy-t.labelDim.height)/2};break;case e.TOP:default:n._align=e.LEFT,t.labelPos={x:t.x+u,y:t.y+u}}var r={x:t.x,y:t.y,width:t.dx,height:t.dy},a={x:t.labelPos.x,y:t.labelPos.y,width:t.labelDim.width,height:t.labelDim.height}; +i.containsRect(r,a)||(t.labelPos=null)}},calcMoreLabelPosition:function(t){var e=this.vanchart.bounds,i=t.x+t.dx/2+e.x,n=t.y+t.dy/2+e.y;return{startX:i,startY:n,direction:"top"}},effectAnimation:function(t){a.areaStyleEffectAnimation(t,t.x+t.dx/2,t.y+t.dy/2)},getDefaultEffectTime:function(){return a.AREA_STYLE_EFFECT_TIME},getPointGraphicKey:function(){return"rect"},_getFixedPos:function(t){var e=this.vanchart.bounds,i=e.x+t.x+t.dx,n=e.y+t.y;return[i,n]},zoomTo:function(t){t=this.zoomNow===t.parent?this.root:t.parent; +var e=this.sx.domain([t.x,t.x+t.dx]),i=this.sy.domain([t.y,t.y+t.dy]),n=this.vanchart.bounds,r=n.width/t.dx,a=n.height/t.dy;this.nodes.map(function(t){t.dx=r*t._dx,t.dy=a*t._dy,t.x=e(t._x),t.y=i(t._y),this._calcLabelPos(t),t.clearPointEffect()},this),(r>1||a>1)&&t.children&&t.children.forEach(function(t){l.toFront(t.graphic.node())}),this.vanchart.fire("animationStart"),this.zoomNow=t},getChartNodes:function(){return this.nodes},getZoom:function(){return this.options.zoom},_getPointGraphicGroup:function(){return this.pathGroup||(this.pathGroup=this.group.append(this.vanchart.renderer.group())),this.pathGroup +},initialAnimation:function(){var t=this._getPointGraphicGroup(),e=this.vanchart.bounds,i=e.width/2,n=e.height/2;t.animate({duration:c,ease:d,attrTween:{transform:function(){var t=h(0,1);return function(e){var r=t(e);return"matrix("+r+",0,0,"+r+","+(i-r*i)+","+(n-r*n)+")"}}}})},_pointExpandAttr:function(t){return{x:-t.dx/2,y:-t.dy/2,width:t.dx,height:t.dy,transform:"translate("+(t.x+t.dx/2)+","+(t.y+t.dy/2)+")"}},_pointContractAttr:function(t){return{x:0,y:0,width:0,height:0,transform:"translate("+t.vanishPos[0]+","+t.vanishPos[1]+")"} +},getPointInitAttr:function(t){return this.initialAnimationMoving?this._pointExpandAttr(t):this._pointContractAttr(t)},getPointUpdateAnimationAttr:function(t){var e=this;return t.visible?{ease:"quad-in-out",duration:f,attr:this._pointExpandAttr(t)}:e.getPointDropAnimationAttr(t)},getPointInitAnimationAttr:function(t){return this.initialAnimationMoving?{}:this.getPointUpdateAnimationAttr(t)},getPointDropAnimationAttr:function(t){return{ease:"quad-in-out",duration:p,attr:{width:0,height:0,transform:"translate("+t.vanishPos[0]+","+t.vanishPos[1]+")"}} +},onPointMouseOver:function(t){t.series._onState.call(t,!0)},onPointMouseOut:function(t){t.series._onState.call(t,!1)},_onState:function(t){var i=this,n=i.series,r={fill:t?i.mouseOverColor:i.color,"stroke-width":i.options.borderWidth+(t?1:0)},a=n._pointExpandAttr(i);t&&(a={x:a.x-1,y:a.y-1,width:a.width+2,height:a.height+2}),l.toFront(i.graphic.node()),i.graphic.interrupt(e.SELECT_ANIMATION).transition(e.SELECT_ANIMATION).animate({duration:g,ease:"ease",style:r,attr:a}),n._labelFontSizeState(i,t,g,"ease") +},allowDrillDown:function(t){return t.series.getZoom()},drillDown:function(t){this.onPointTap(t)},onPointTap:function(t){t.series.zoomTo(t)},getDefaultTooltipFormatter:function(){return{changedPercentFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '#.##%') : arguments[0]}",changedValueFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}",identifier:"{NAME}{SERIES}{VALUE}",nameFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}",percentFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '#.##%') : arguments[0]}",seriesFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}",valueFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}"} +}});t("../ChartLibrary").register(e.TREEMAP_CHART,m)}),define("chart/Funnel",["require","./Series","../utils/BaseUtils","../Constants","../utils/QueryUtils","../utils/BezierEasing","../EffectHelper","../component/FormattedText","../utils/ColorUtils","../ChartLibrary"],function(t){var e=t("./Series"),i=t("../utils/BaseUtils"),n=t("../Constants"),r=(t("../utils/QueryUtils"),t("../utils/BezierEasing")),a=t("../EffectHelper"),o=t("../component/FormattedText"),s=t("../utils/ColorUtils"),h=0.03,l=0.05,u=0.03,c=0.05,d=u+c,f=0.4,p=6,g=0.35,m=400,v=400,_=r.css["ease-out-quart"],y=500,x=r.css.swing,T=500,b=r.css.swing,A=r.css.ease,C=300,L=e.extend({_getAxisTypes:function(){return[] +},getTargetKey:function(){return"value"},_getPointKey:function(t){return t.name},_calculatePercentage:function(){var t,e=this.points.filter(function(t){return t._bottomPoint=null,!t.isNull&&t.visible}),i=e.length;e.forEach(function(n,r){t?(t._bottomPoint=n,n.percentage=Math.abs(n.value/(t.value||1)),n.arrivalRate=Math.abs(n.value/(e[0].value||1))):n.percentage=n.arrivalRate=1,n.delayTime=m*Math.sqrt(r/i),t=n})},calculateLabelInfo:function(){},_outSideSpecialLabel:function(t){var e=t.labelContent; +return e&&(e.nameLabelContent||e.valueLabelContent)},doLayout:function(){var t=this;t.points.forEach(function(t){o.dataLabelGenerator(t)}),this._calculatePosAndSize()},_calculateTotalValue:function(t,e){var i=0;return this.points.filter(t).forEach(function(t){i+=Math.abs(t[e])}),i},_calculateSeriesMaxValue:function(t,e){var i=0;return this.points.filter(t).forEach(function(t){i=Math.max(i,Math.abs(t[e]))}),i},_calculatePosAndSize:function(){var t=this,e=t.vanchart,i=e.bounds,n=function(t){return !t.isNull&&t.visible +},r=t.getTargetKey(),a=i.width,o=i.height,s=a*(1-2*h),u=o*(1-2*l),c=t._calculateTotalLabelSize();s-=c.useWidth>0?c.useWidth+i.width*d:0,t.useCurveConnectorLine=!1;var f,p=t.points.filter(n),g=p.length;if(!(1>g)){var m=p[0],v=p[g-1],_=m.labelDim?m.labelDim.height:0,y=v.labelDim?v.labelDim.height:0;if(t.options.useSameSlantAngle){var x=t._calculateTotalValue(n,r),T=Math.abs(m[r])*u/x,b=Math.abs(v[r])*u/x,A=Math.max(0,_-T)/2;u-=A,u-=Math.max(0,y-b)/2,p.forEach(function(e){e.posX=Math.round(A*s/2/u),e.width=Math.round(s-2*e.posX),e.posY=Math.round(A),e.height=Math.round(Math.abs(e[r])*u/x),A+=e.height,t._calculateInsideLabelPos(e,f),f=e +})}else{var C=t._calculateSeriesMaxValue(n,r),L=u/g,M=Math.max(0,_-L)/2;u-=M,u-=Math.max(0,y-L)/2,p.forEach(function(e,i){e.width=Math.round(s*Math.abs(e[r])/C),e.posX=Math.round((s-e.width)/2),e.posY=Math.round(M+i*L),e.height=Math.round(L),t._calculateInsideLabelPos(e,f),f=e})}t._calculateOutSideLabelPos(n,c.useWidth,c.useHeight)}},_calculateInsideLabelPos:function(t,e){var i=t.options.dataLabels;i&&i.enabled&&(i.align==n.INSIDE?t.labelPos={x:t.posX+t.width/2-t.labelDim.width/2,y:t.posY+t.height/2-t.labelDim.height/2}:e&&(this.useCurveConnectorLine=this.useCurveConnectorLine||t.height+e.heightg){var a=t.labelContent,o=t.labelDim,h=o.height,l=r.useCurveConnectorLine?g:t.posY+t.height/2-h/2,c=t._bottomPoint,d=((c?c.width:0)-t.width)/4,m={x:p,y:l+h/2},v={x:p-s,y:l+h/2},_={x:t.posX+t.width+d,y:t.posY+t.height/2}; +if(t.labelPos={x:p,y:l,endPos:m,midPos:v,startPos:_},g+=t.labelDim.height+f,r._outSideSpecialLabel(t)){var y=a.nameLabelContent,x=a.valueLabelContent,T=o.nameValueGap,b=Math.min(e,r.maxValueLabelWidth);if(y){var A=y.dim,C=y.text,L=e-T-b;C=r._omitLabel(C,L,y.style),y.text=C,y.x=0,y.y=(h-A.height)/2}if(x){var M=x.dim,P=x.text;P=r._omitLabel(P,b,x.style),x.text=P,x.x=e-b,x.y=(h-M.height)/2}}}})},_omitLabel:function(t,e,n){for(var r=i.getTextDimension(t,n,!1),a=!1;r.width-e>0.000001&&t.length;){t=t.substr(0,Math.floor(0.9*t.length)),r=i.getTextDimension(t+"...",n,!1),a=!0 +}return a&&t&&(t+="..."),t},_calculateTotalLabelSize:function(){var t=this,e=t.vanchart,i=e.bounds,r=0,a=0;return t.points.filter(function(t){return !t.isNull&&t.visible&&t.options.dataLabels&&t.options.dataLabels.enabled}).forEach(function(e){e.options.dataLabels.align==n.OUTSIDE&&(r=+t.maxNameLabelWidth||+t.maxValueLabelWidth?Math.max(r,(t.maxNameLabelWidth||0)+(t.maxValueLabelWidth||0)+e.labelDim.nameValueGap):Math.max(r,e.labelDim.width),a+=e.labelDim.height)}),r=Math.min(r,i.width*f),{useWidth:r,useHeight:a} +},_calculateLabelPos:function(){},_getFixedPos:function(t){var e=t.series._getTranslate();return[e[0]+t.posX+t.width/2,e[1]+t.posY+t.height/2]},calcMoreLabelPosition:function(t,e){var i=t.series._getTranslate(),n=t.posX+t.width/2,r=t.posY+t.height/2;return{startX:i[0]+n,startY:i[1]+r,direction:"top"}},getFillFilter:function(t,e){var r=e.series,a=r.vanchart,o=a.options;if(o.style==n.STYLE_GRADUAL&&i.isSupportSVG()){var h=a.renderer,l={x1:"0%",y1:"0%",x2:"100%",y2:"0%"},u={offset:"0%","stop-color":s.getColorWithDivider(t,0.9)},c={offset:"100%","stop-color":t}; +return e.colorGradient?h.updateColorGradient(e.colorGradient,l,[u,c]):e.colorGradient=h.colorGradient(l,[u,c]),"url(#"+i.stamp(e.colorGradient)+")"}return t},_getPointPath:function(t,e){var i=t._bottomPoint,n=e?1:0,r=-t.width/2-n+","+(-t.height/2-n),a=t.width/2+n+","+(-t.height/2-n);if(i){var o=i.width/2+n+","+(t.height/2+n),s=-i.width/2-n+","+(t.height/2+n);return"M"+r+"L"+a+"L"+o+"L"+s+"Z"}var h="0,"+(t.height/2+n);return"M"+r+"L"+a+"L"+h+"L"+h+"Z"},getPointGraphicKey:function(){return"path"},getHighLightStyle:function(t){return{stroke:t.mouseOverColor,fill:t.series.getFillFilter(t.mouseOverColor||t.color,t),"fill-opacity":t.opacity,"stroke-width":(t.options.borderWidth||0)+p,"stroke-opacity":0===t.opacity?0:t.borderOpacity||0+g} +},getPressedStyle:function(t){return{stroke:t.clickColor||t.color,fill:t.series.getFillFilter(t.clickColor,t),"fill-opacity":t.clickOpacity,"stroke-width":p,"stroke-opacity":0===t.opacity?0:g}},effectAnimation:function(t){a.areaStyleEffectAnimation(t,t.posX+t.width/2,t.posY+t.height/2)},getDefaultEffectTime:function(){return a.AREA_STYLE_EFFECT_TIME},getPointInitAttr:function(t){return{transform:"translate("+(t.posX+t.width/2)+","+(t.posY+t.height/2)+") scale(0.01)"}},_pointNormalAttr:function(t){return{d:t.series._getPointPath(t),transform:"translate("+(t.posX+t.width/2)+","+(t.posY+t.height/2)+") scale(1)"} +},getPointInitAnimationAttr:function(t){var e=t.series;return{delay:t.delayTime,ease:_,duration:v,attr:e._pointNormalAttr(t)}},getPointReShowAnimationAttr:function(t){var e=t.series;return{ease:b,duration:T,attr:e._pointNormalAttr(t)}},getPointUpdateAnimationAttr:function(t){var e=t.series;return{ease:x,duration:y,attr:e._pointNormalAttr(t)}},_onPointMouseOver:function(t){var e=t.series,i=e.getHighLightStyle(t);e._onState(t,!0,i)},_onPointMouseOut:function(t){var e=t.series,i=e.getStyle(t);e._onState(t,!1,i) +},_onState:function(t,e,i){var r=t.series;t.graphic.interrupt(n.SELECT_ANIMATION).transition(n.SELECT_ANIMATION).animate({duration:C,ease:A,style:i,attr:{d:r._getPointPath(t,e)}});var a=t.options,o=a.dataLabels,s=o.align;s==n.INSIDE?r._labelFontSizeState(t,e,C,A):(r._leadLineState(t,2,0,e,C,A),r._labelTransformState(t,2,0,e,C,A),r._outSideSpecialLabel(t)?r._specialLabelColorState(t,e,C,A):r._outSideLabelColorState(t,e,C,A))},_getTranslate:function(){var t=this.vanchart.bounds;return[t.x+t.width*h,t.y+t.height*l] +},_updateDataLabels:function(){var t=this;t.getTextDataToDraw().forEach(function(e){t._outSideSpecialLabel(e)?t._createOutSideTextGraphic(e):t._createTextGraphic(e)})},_createOutSideTextGraphic:function(t){var e=t.series,n=t.options.dataLabels,r=function(t){return e.visible&&!t.isNull&&t.visible&&t.labelPos&&!isNaN(t.labelPos.x)&&!isNaN(t.labelPos.y)&&n&&n.enabled};if(r(t)){var a=e.vanchart,o=a.renderer,s=t.labelContent,h=n.useHtml,l=this._getPointTextLabelGroup(),u=o.vtext(h).attr("transform",i.makeTranslate(e._labelTrans(t))).style({"pointer-events":"none"}),c=t.labelDim.width/2,d=t.labelDim.height/2,f=function(t){if(t){var e=t.dim,i=t.text,r=t.style; +return o.vtspan(h).style({width:n.labelWidth+"px",height:n.labelHeight+"px"}).attr("y",t.y).attr("x",t.x).attr("dy",0.85*e.height-d).attr("dx",-c).textContent(i).style(r).addTo(u)}};u.nameSpan=f(s.nameLabelContent),u.valueSpan=f(s.valueLabelContent),t.textGraphic=l.append(u),t.labelPos.startPos&&(t.leadLine=l.append(this._getLeadLine(t)))}},_specialLabelColorState:function(t,e,i,n){function r(r,a){if(a&&r){var o=a.style;r.animate({duration:i,ease:n,style:{color:e?t.mouseOverColor:o.color,fill:e?t.mouseOverColor:o.color}}) +}}var a=t.labelContent;t.textGraphic&&r(t.textGraphic.nameSpan,a.nameLabelContent),t.textGraphic&&r(t.textGraphic.valueSpan,a.valueLabelContent)},isSeriesAccumulated:function(){return !0},getDefaultTooltipFormatter:function(){return{categoryFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}",changedPercentFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '#.##%') : arguments[0]}",changedValueFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}",identifier:"{NAME}{VALUE}",nameFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}",percentFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '#.##%') : arguments[0]}",valueFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}"} +}});return t("../ChartLibrary").register(n.FUNNEL_CHART,L),L}),define("chart/WordCloud",["require","./Series","../Constants","../utils/BezierEasing","../EffectHelper","../utils/BaseUtils","../ChartLibrary"],function(t){var e=t("./Series"),i=t("../Constants"),n=t("../utils/BezierEasing"),r=(t("../EffectHelper"),t("../utils/BaseUtils")),a=400,o=n.css["ease-out-back"],s=600,h=n.css["ease-out-quart"],l=1000,u=n.css["ease-out-cubic"],c=1200,d=n.css["ease-out-cubic"],f=300,p=n.css["ease-out-quart"],g=e.extend({isNullValue:function(t){var e=t.options.value; +return"-"==e||r.hasNotDefined(e)||r.hasNotDefined(t.name)},getTargetKey:function(){return"value"},_getPointKey:function(t){return t.name},doLayout:function(){},_calculateLabelPos:function(){},_getFixedPos:function(t,e){var i=t.word,n=t.labelDim,a=t.series._getTranslate(),o=n.width/2,s=n.height/2,h=r.toRadian(i.rotate),l=h===Math.PI/2?s:o*Math.cos(h)-s*Math.sin(h),u=o*Math.sin(h)+s*Math.cos(h),c=0.35*n.height*Math.cos(h),d=0.35*n.height*Math.sin(h);return r.isSupportSVG()?[a[0]+i.x+l+d,a[1]+i.y+u-c]:[a[0]+i.x+n.width,a[1]+i.y+n.height] +},_getTranslate:function(){var t=this.vanchart.bounds;return[t.x+t.width/2,t.y+t.height/2]},effectAnimation:function(t){var e=t.word,i=t.series,r=i._getEffectTime(t);t.graphic.style("text-shadow","rgba(91,91,91,0.75) 0px 0px 0px").effectTransition().ease(n.css["ease-out-quint"]).duration(0.5*r).style("font-size",1.2*e.size+"px").style("text-shadow","rgba(91,91,91,0.75) 3px 3px 5px").transition().ease(n.css["ease-in-quint"]).duration(0.5*r).style("font-size",e.size+"px").style("text-shadow","rgba(91,91,91,0.75) 0px 0px 0px") +},getDefaultEffectTime:function(){return 2000},calcMoreLabelPosition:function(t,e){var i=t.series._getTranslate(),n=r.isSupportSVG(),a=t.word,o=t.labelDim,s="top",h=this._calcNiceMoreLabelPos(t,a.rotate),l=h.top;l.y-e.height<0&&(l=h.bottom,s="bottom");var u=i[0]+a.x+o.width/2,c=i[1]+a.y;return c-e.height<0&&(c=i[1]+a.y+o.height,s="bottom"),{startX:n?l.x:u,startY:n?l.y:c,direction:s}},_calcNiceMoreLabelPos:function(t,e){var i=t.series._getTranslate(),n=t.word,r=t.labelDim,a=0.86*r.height,o=r.width,s=n.x+i[0],h=n.y+i[1]; +if(0===a||0===o){return{top:{x:s,y:h},bottom:{x:s,y:h}}}var l=Math.PI,u=function(t){return t*l/180},c=20;e=u(e);var d=Math.atan(a/o*2)||0,f=[0,d,l-d,l],p=o/2,g=Math.sqrt(a*a+o*o/4),m=f.map(function(t,i){var n=i%3?g:p;return t-=e,{x:Math.round(n*Math.cos(t)),y:Math.round(n*Math.sin(t))}}).sort(function(t,e){return e.y-t.y}),v=function(t,e){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}},_=function(t){return{x:t.x+s,y:h-t.y}},y=m[0].y-m[1].y>c?m[0]:v(m[0],m[1]),x=m[3].y-m[2].y<-c?m[3]:v(m[3],m[2]);return{top:_(y),bottom:_(x)} +},_getPointGraphicGroup:function(){return this.vanchart.group},_createPointGraphic:function(t){var e=this.getPointGraphicKey(t),i=this.vanchart.renderer;return t.graphic=i[e](),t.graphic.textContent(t.word.text),t.graphic},getPointGraphicKey:function(){return"text"},getStyle:function(t){var e=t.word;return e?{"font-size":e.size+"px","font-family":e.fontFamily,fill:t.color,"text-shadow":"","stroke-width":0,"stroke-opacity":1,"fill-opacity":t.opacity,filter:""}:{}},getHighLightStyle:function(t){var e=t.word,i=1.15*parseFloat(e.size); +return{"font-size":i+"px",fill:t.mouseOverColor}},_onPointMouseOver:function(t){e.prototype._onPointMouseOver.call(this,t);var n=t.series,a=n.getHighLightStyle(t),o=n.vanchart;o.renderer;t.effectInterval&&(r.clearInterval(t.effectInterval),t.graphic.interrupt()),t.graphic.interrupt(i.SELECT_ANIMATION).transition(i.SELECT_ANIMATION).animate({duration:f,ease:p,style:a})},_onPointMouseOut:function(t){var e=t.series,n=e.getStyle(t);t.graphic.interrupt(i.SELECT_ANIMATION).transition(i.SELECT_ANIMATION).animate({duration:f,ease:p,style:n}),e.drawPointEffect(t) +},getPointInitAttr:function(t){var e=t.word;return e?{"text-anchor":"middle",transform:"translate("+[e.x,e.y]+")rotate("+e.rotate+")"}:{}},getPointInitStyle:function(){return{"font-size":"0.1px","fill-opacity":1}},getPointReShowStyle:function(){return{"font-size":"0.1px","fill-opacity":0}},getPointInitAnimationAttr:function(t){var e=t.word;return{delay:t.delayTime||0,ease:o,duration:a,style:{"font-size":e.size+"px","fill-opacity":1}}},getPointReShowAnimationAttr:function(t){var e=t.word;return{ease:d,duration:c,style:{"font-size":e.size+"px","fill-opacity":1}} +},getPointUpdateAnimationAttr:function(t){var e=t.word;return{ease:h,duration:s,style:{"font-size":e.size+"px"},attr:{transform:"translate("+[e.x,e.y]+")rotate("+e.rotate+")"}}},getPointDropAnimationAttr:function(t){return{ease:u,duration:l,style:{"fill-opacity":0}}},isSeriesAccumulated:function(){return !0},getDefaultTooltipFormatter:function(){return{categoryFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}",changedPercentFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '#.##%') : arguments[0]}",changedValueFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}",identifier:"{CATEGORY}{NAME}{VALUE}",nameFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}",percentFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '#.##%') : arguments[0]}",valueFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}"} +}});return t("../ChartLibrary").register(i.WORD_CLOUD_CHART,g),g}),define("chart/Structure",["require","./Series","./Point","../Constants","../utils/BezierEasing","../EffectHelper","../utils/BaseUtils","../ChartLibrary"],function(t){var e=t("./Series"),i=t("./Point"),n=t("../Constants"),r=t("../utils/BezierEasing"),a=(t("../EffectHelper"),t("../utils/BaseUtils")),o=300,s=r.custom["ease-out-back"],h=e.extend({getTargetKey:function(){return"value"},_getPointKey:function(t,e,i){return e=t.parent||e,i=t.level||i||0,(e?e.name:"")+t.name+i +},isNullValue:function(t){return !1},_dealData:function(t){function e(t,r,o,s){var c,d=n._getPointKey(r,t,o),f=s[d];if(f?(f._lastValue=f[n.getTargetKey()],f.moreLabelG&&f.moreLabelG.remove(),f.moreLabelG=null,f.refresh(r),c=f,s[d]=null):c=new i(r,n),c.level=o,u=Math.max(o,u),t&&(c.parent=t,t.children=t.children||[],-1==a.indexOf(t.children,c)&&t.children.push(c)),h.push(c),t&&l.push({source:t,target:c}),r.children){var s={};c.children&&c.children.forEach(function(t){s[n._getPointKey(t)]=t}),r.children.forEach(function(t){e(c,t,o+1,s) +});for(var d in s){s[d]&&s[d].clearChild()}}return c}var n=this,r=n.vanchart,o=t[0],s=r.ancestor;if(r.nodes&&r.nodes.forEach(function(t){t._events=null,t.graphic&&t.graphic.remove(),t.textGraphic&&t.textGraphic.remove(),t.textGraphic=t.graphic=null}),r.edges&&r.edges.forEach(function(t){t.linkGraphic&&t.linkGraphic.remove(),t.linkGraphic=null}),o){var h=[],l=[],u=0,c={};s&&(c[n._getPointKey(s)]=s),s=e(null,o,0,c);for(var d in c){c[d]&&c[d].remove()}r.ancestor=s,r.maxLevel=u,r.nodes=h,r.edges=l,n.points=h +}},doLayout:function(){},_calculateLabelPos:function(){},_getFixedPos:function(t,e){var i=this.vanchart,n=i.bounds,r=(t.radius+1)/1.414;return[n.x+t.posX+r,n.y+t.posY+r]},calcMoreLabelPosition:function(t){var e=this.vanchart.bounds,i=t.posX+e.x,n=t.posY+e.y;return{startX:i,startY:n,direction:"top"}},getStyle:function(t){var e=t.options;return{fill:t.color,"fill-opacity":e.fillColorOpacity,stroke:t.borderColor||t.color,"stroke-opacity":t.borderOpacity,"stroke-width":e.borderWidth}},getHighLightStyle:function(t){var e=t.options; +return{fill:t.mouseOverColor||t.color,"fill-opacity":e.fillColorOpacity,"stroke-width":e.borderWidth,"stroke-opacity":t.borderOpacity,stroke:t.borderColor||t.color}},getPressedStyle:function(t){var e=t.options;return{fill:t.clickColor||t.color,"fill-opacity":e.fillColorOpacity,"stroke-width":e.borderWidth,"stroke-opacity":t.borderOpacity,stroke:t.borderColor||t.color}},_onPointMouseOver:function(t){e.prototype._onPointMouseOver.call(this,t);var i=t.series,n=i.getHighLightStyle(t);i._onState(t,!0,n) +},_onPointMouseOut:function(t){var e=t.series,i=e.getStyle(t);e._onState(t,!1,i)},_onState:function(t,e,i){var r=e?2:0,a=t.radius,h={r:a+r};t.options.image&&(h={x:-a-r,y:-a-r,width:2*(a+r),height:2*(a+r)}),t.graphic.nodeGraphic.interrupt(n.SELECT_ANIMATION).transition(n.SELECT_ANIMATION).animate({duration:o,ease:s,attr:h,style:i});var l=t.options,u=l.dataLabels,c=u.align;c==n.INSIDE?t.series._labelFontSizeState(t,e,o,s):t.series._labelTransformState(t,0,-2,e,o,s)},getDefaultTooltipFormatter:function(){return{changedPercentFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '#.##%') : arguments[0]}",changedValueFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}",identifier:"{NAME}{SERIES}{VALUE}",nameFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}",percentFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '#.##%') : arguments[0]}",seriesFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}",valueFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}"} +}});return t("../ChartLibrary").register(n.STRUCTURE_CHART,h),h}),define("chart/ForceBubble",["require","./Bubble","../Constants","../utils/BaseUtils","../EffectHelper","../ChartLibrary"],function(t){var e=t("./Bubble"),i=t("../Constants"),n=t("../utils/BaseUtils"),r=t("../EffectHelper"),a=e.extend({_calculateBubblePosition:function(){},_getFixedPos:function(t){var e=t.radius||0,i=this.vanchart.bounds,n=i.x+t.x+e,r=i.y+t.y+e;return[n,r]},_getAxisTypes:function(){return[]},getTargetKey:function(){return"y" +},calcMoreLabelPosition:function(t){var e=this.vanchart.bounds,i=t.x+e.x,n=t.y+e.y;return{startX:i,startY:n,direction:"top"}},isNullValue:function(t){var e=t.options;return"-"==e.x||"-"==e.y},_getPointKey:function(t){return""+(t.options?t.options.x:t.x)},effectAnimation:function(t){r.forceBubbleEffectAnimation(t,t)},getPointInitAttr:function(t){return{r:t.radius,transform:n.makeTranslate({x:0,y:0})}},getPointInitAnimationAttr:function(t){return{}},getPointReShowAnimationAttr:function(t){return{}},getPointUpdateAnimationAttr:function(t){return{r:t.radius,transform:n.makeTranslate({x:t.x,y:t.y})} +},remove:function(){this.points.forEach(function(t){t.graphic&&(t.graphic.remove(),t.graphic=null)}),this.textGraphicGroup&&this.textGraphicGroup.remove(),this.group&&this.group.remove(),this.textGraphicGroup=this._canvas=this.group=null}});return t("../ChartLibrary").register(i.FORCE_BUBBLE_CHART,a),a}),define("chart/Map",["require","../Constants","../utils/BaseUtils","./Series","../EffectHelper","../vector/ElementWrapper","../ChartLibrary","../ChartLibrary","../ChartLibrary"],function(t){var e=t("../Constants"),i=t("../utils/BaseUtils"),n=t("./Series"),r=t("../EffectHelper"),a=t("../vector/ElementWrapper"),o=300,s="ease",h=n.extend({initialize:function(t,e,i){n.prototype.initialize.call(this,t,e,i),this.on(this.getEvents(),this) +},getTargetKey:function(){return"value"},_getPointKey:function(t){return t.name},effectAnimation:function(t){var i=this.type===e.POINT_MAP?r.pointMapEffectAnimation:r.areaMapEffectAnimation;t.layers&&t.layers.forEach(function(e){i(e,t)})},clearPointEffect:function(t){var i=t.layers;t.clearPointEffect();var n=this.type===e.POINT_MAP;i&&i.forEach(function(t){var e=n?new a(t._icon):t._path;e&&e.removeEffectTransition()})},getDefaultEffectTime:function(){return this.type===e.POINT_MAP?r.POINT_MAP_EFFECT_TIME:r.AREA_STYLE_EFFECT_TIME +},_getFixedPos:function(t){var i=t.series.vanchart,n=t.series.type,r=t.getLatLng();if(r){var a=i.latLngToContainerPoint(r);if(n===e.AREA_MAP){var o=0,s=0;return t.options.dataLabels&&t.labelDim&&t.labelPos&&(o=t.labelDim.width/2,s=t.labelDim.height/2),[a.x+o,a.y+s]}return[a.x,a.y]}},getHighLightStyle:function(t){return{stroke:t.borderColor,fill:t.mouseOverColor,"fill-opacity":t.opacity,"stroke-width":t.options.borderWidth+1,"stroke-opacity":t.borderOpacity,filter:this._getShadowFilter()}},getStyle:function(t){var e=t.series.vanchart.getCurrentGeo(); +return t.isNull?e.defaultAreaStyle():n.prototype.getStyle.call(this,t)},_getShadowFilter:function(){var t=this,e=t.vanchart,n=e.mapRenderer;return e.mapShadowFilter=e.mapShadowFilter||n.createDropShadowFilter(0,1,0.5,2),"url(#"+i.stamp(e.mapShadowFilter)+")"},_onPointMouseOver:function(t){var e=this.getHighLightStyle(t);this._onState(t,!0,e)},_onPointMouseOut:function(t){var e=this.getStyle(t);this._onState(t,!1,e)},_onState:function(t,i,n){var r=t.series;t._mapPointOnMouseState(i,o,s,n),t.textLayers&&t.textLayers.forEach(function(t){r.type===e.POINT_MAP?t._transformState(i):t._fontSizeState(i,o,s) +})},getDefaultTooltipFormatter:function(){return{areaNameFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}",changedPercentFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '#.##%') : arguments[0]}",changedValueFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}",identifier:"{NAME}{SERIES}{VALUE}{SIZE}",percentFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '#.##%') : arguments[0]}",seriesFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}",valueFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}"} +}});return t("../ChartLibrary").register(e.POINT_MAP,h),t("../ChartLibrary").register(e.AREA_MAP,h),t("../ChartLibrary").register(e.HEAT_MAP,h),h}),define("chart/map/LineMapDataNormalizer",["require","../../utils/BaseUtils"],function(t){function e(t,e){var i=t.name||t,n=e.getFeaturesByName(i);return n&&n.length?n.map(function(t){return{name:i,lnglat:t.geometry.coordinates}}):void 0}function i(t,e,i,r){if(t&&e){var a=0,o=t[0]||t;do{var s=0,h=e[0]||e;do{var l={};n(l,i),l.from=o,l.to=h,r.push(l)}while(h=e[++s]) +}while(o=t[++a])}}var n=t("../../utils/BaseUtils").extend;return function(t,n){n._loadGeo();for(var r,a=[],o=-1;r=t[++o];){var s,h,l=r.from&&r.from.lnglat,u=r.to&&r.to.lnglat;l&&u?a.push(r):(s=l?r.from:e(r.from,n),h=u?r.to:e(r.to,n),i(s,h,r,a))}return a}}),define("chart/LineMap",["require","../Constants","../utils/BaseUtils","../utils/QueryUtils","../ComponentLibrary","./Series","./map/LineMapDataNormalizer","../ChartLibrary"],function(t){var e=t("../Constants"),i=t("../utils/BaseUtils"),n=(t("../utils/QueryUtils"),t("../ComponentLibrary")),r=t("./Series"),a=t("./map/LineMapDataNormalizer"),o=6,s=Math.PI,h=r.extend({doLayout:i.emptyFn,_calculateLabelPos:i.emptyFn,_loadData:function(t){var e=this.vanchart.getComponent(n.GEO_COMPONENT); +return a(t,e)},useCanvas:i.trueFn,getTargetKey:function(){return"value"},_getPointKey:function(t){return t=t.options||t,t.from.lnglat.join()+t.to.lnglat.join()},_getFixedPos:function(t,e){var n=i.computeArc(t.ax,t.ay,t.bx,t.by,t.curveness),r=(n[3]+n[4])/2;r%=2*s;var a=n[2]+o,h=a*Math.cos(r)+n[0],l=a*Math.sin(r)+n[1];return s/2>=r||(s>=r?h-=e.width:1.5*s>=r?(h-=e.width,l-=e.height):l-=e.height),[h,l]},remove:function(){r.prototype.remove.call(this),this.points=[]},isSupportLegendHighlight:function(){return !1 +},getDefaultTooltipFormatter:function(){return{changedPercentFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '#.##%') : arguments[0]}",changedValueFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}",fromFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}",identifier:"{FROM.NAME}{TO.NAME}{SERIES}{VALUE}",percentFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '#.##%') : arguments[0]}",seriesFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}",toFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}",valueFormat:"function(){return window.FR ? FR.contentFormat(arguments[0], '') : arguments[0]}"} +}});return t("../ChartLibrary").register(e.LINE_MAP,h),h}),define("component/BaseAxis",["require","../Constants","../utils/BaseUtils","../utils/QueryUtils","../ComponentLibrary","../utils/Scale","../vans/VanChartLayout","./Base","../utils/BezierEasing"],function(t){var e=t("../Constants"),i=t("../utils/BaseUtils"),n=t("../utils/QueryUtils"),r=t("../ComponentLibrary"),a=t("../utils/Scale"),o=t("../vans/VanChartLayout"),s=t("./Base"),h=t("../utils/BezierEasing"),l=400,u=h.css.swing,c=4,d=function(){return i.paddingConvertWithScale(c) +},f=4,p=8,g=function(){return i.paddingConvertWithScale(p)},m=5,v=4,_=100,y=5,x="main",T="minor",b=15,A=s.extend({labelRotation:0,_refresh:function(){this.series=[],this.isRangePoints=!0,this.piece=null,this.forecast=[0,0],this._zoomDomain=this._dataDomain=this._domain=this._tickStart=this._step=0,this.initScale();var t=this.options,e=t.title;i.calculateFontSizeWithScale(t.labelStyle),i.calculateFontSizeWithScale(e&&e.style),t.plotLines&&t.plotLines.length&&t.plotLines.forEach(function(t){i.calculateFontSizeWithScale(t&&t.label&&t.label.style) +}),t.tickPadding=isNaN(t.tickPadding)?6:t.tickPadding,t.tickLength=t.enableTick?isNaN(t.tickLength)?4:t.tickLength:0,t.minorTickLength=t.enableMinorTick?isNaN(t.minorTickLength)?2:t.minorTickLength:0},_calculateSize:function(t){var e=this.options;this.tickLabelLength=this._getTickLabelLength(t);var i=this.labelLength=this._getAxisTitleLength();i+=i>0?g():0;var n=this.tickLabelLength+i,r=this.isHorizontal(),a=r?this._maxHeight:this._maxWidth,o=r?e.maxHeight:e.maxWidth;n=o?Math.min(a.call(this,o),n):n,this._size=0===this.series.length?0:Math.round(n) +},offsetDataSheetClipPoolSize:function(){var t=this.getPosition(),i=this.vanchart,n=i.clipPool,a=this.isValue(),o=i.getComponent(r.DATA_SHEET_COMPONENT);a&&o&&t===e.LEFT&&n[t]&&(n[t]-=this._size)},_recordAxisSize:function(){this.isOnZero()||(this.vanchart.axisSize[this.getPosition()]+=this._size)},calculateDomainFromData:function(t,e){if(!t){var i=this.series;if(this.byPercent=!1,!this._isBaseAxis()){for(var n=0,a=i.length;a>n&&!this.byPercent;n++){this.byPercent=i[n].options.stackByPercent}}t=this._getDomainFromData(e) +}this.indicator&&this._calculateCateDomainData(),this._dataDomain=t;var o=this.vanchart.getComponent(r.ZOOM_COMPONENT),s=this._zoomDomain||o&&o.getZoomInitDomain(this);if(this._isBaseAxis()&&s){var h,l;if(h=this.options.min,l=this.options.max,h=parseFloat(s[0]||h),l=parseFloat(s[1]||l),!isNaN(h)&&!isNaN(l)){var u=h;h=Math.min(h,l),l=Math.max(u,l)}this._calculateNiceDomain(this._dataDomain[0],this._dataDomain[1],isNaN(h)?null:h,isNaN(l)?null:l)}else{var c=this.options;this._calculateNiceDomain(this._dataDomain[0],this._dataDomain[1],c.min,c.max) +}this._calculateDateFormat&&this._calculateDateFormat()},_calculateNiceDomain:function(t,e,i,n){var r=this.options;return r.log?this._calculateLogNiceDomain(t,e,i,n):this.byPercent?this._calculatePercentValueDomain(t,e,i,n):this._calculateValueNiceDomain(t,e,i,n)},isBaseAxisOnZoomOnly:function(){var t=this.vanchart.options,e=t.zoom&&t.zoom.zoomType;return this._isBaseAxis()&&e===this.componentType.substr(0,1)},calculateDomainFromZoom:function(){var t=this._zoomDomain,e=this.options;if(this._isBaseAxis()){this._calculateNiceDomain(this._dataDomain[0],this._dataDomain[1],t[0],t[1]),this.isBaseAxisOnZoomOnly()&&this.vanchart.reCalcValueAxisDataDomain(this.componentType) +}else{var n=i.hasDefined(e.min)?Math.max(e.min,t[0]):t[0],a=i.hasDefined(e.max)?Math.min(e.max,t[1]):t[1];if(n>a){return}var o=this.type===r.VALUE_AXIS_COMPONENT&&i.hasNotDefined(e.min),s=this.isLog()?1:0;if(n=o?Math.min(s,n):n,this.alignAxisId&&!/^standard/.test(this.alignAxisId)){var h=(t[0]-this._domain[0])/(this._domain[1]-this._domain[0]),l=(t[1]-this._domain[0])/(this._domain[1]-this._domain[0]);n=this._firstCalcDomain[0]+(this._firstCalcDomain[1]-this._firstCalcDomain[0])*h,a=this._firstCalcDomain[0]+(this._firstCalcDomain[1]-this._firstCalcDomain[0])*l,this._domain=[n,a] +}else{this._calculateNiceDomain.apply(this,[t[0],t[1],n,a])}}},isCategory:function(){return this.type===r.CATEGORY_AXIS_COMPONENT},isValue:function(){return this.type===r.VALUE_AXIS_COMPONENT},zoomRefresh:function(t){this._zoomDomain=t,this.calculateDomainFromZoom()},axisZoom:function(t,e){var n,a,o=this.type===r.DATE_AXIS_COMPONENT,s=o?1000:1e-11,h=this.vanchart.bounds;this.isHorizontal()?(n=Math.min(t.x,e.x)-h.x,a=Math.max(t.x,e.x)-h.x,n=Math.max(n,0),a=Math.min(a,h.width)):(n=Math.min(t.y,e.y)-h.y,a=Math.max(t.y,e.y)-h.y,n=Math.max(n,0),a=Math.min(a,h.height)); +var l=this.scale.invert(n),u=this.scale.invert(a);o&&(l=i.date2int(l),u=i.date2int(u)),Math.abs(l-u)=15&&(r=Math.round(2*(r-y))),n=Math.max(n-v,0)+y,r=Math.max(r-_,0)+y+(this.showArrow()?b:0),t[e.LEFT]=Math.max(t[e.LEFT]||0,n),t[e.RIGHT]=Math.max(t[e.RIGHT]||0,r)}else{t[e.TOP]=Math.max(t[e.TOP]||0,r),t[e.BOTTOM]=Math.max(t[e.BOTTOM]||0,n)}this.offsetDataSheetClipPoolSize() +}},updateAxisSizeAndBounds:function(){this._setComponentBounds(this.getPosition(),this._size)},fixScaleAndTickData:function(){this.scale.domain(this._domain).range(this._getRange()),this._updateOriginTickData(),this._calculateTickPosAndStep()},_alignByZeroValue:function(t){var e=Date.now()+""+100000*Math.random();if(t.forEach(function(t,i){0===i?t.axis.alignAxisId="standard"+e:t.axis.alignAxisId=e}),t.length<2){return t}var i=t[0].axis;return !i||null==i.options.max&&null==i.options.min?this._dealAutoDomainOnZero(t):this._forceUpdateAxisDomain(t) +},_dealAutoDomainOnZero:function(t){var e=0,i=0,n=t.map(function(t){var n=t.axis._dataDomain,r=n[0],a=n[1];a*r>=0&&(a=Math.max(0,a),r=Math.min(0,r));var o=a-r,s=Math.abs(r/o),h=Math.abs(a/o);return e=Math.max(e,s),i=Math.max(i,h),[s,h]});i/=i+e,e/=i+e;var r=0,a=0,o=n.map(function(n,o){var s=t[o].axis,h=s._dataDomain[0],l=s._dataDomain[1],u=n[0],c=n[1];l*h>=0&&(l=Math.max(0,l),h=Math.min(0,h));var d=l,f=h;u>e&&(d=f*i/(i-1)),c>i&&(f=-d*e/(e+1));for(var p=s.options.tickInterval||s._linearTickInterval(f,d),g=0,m=0,v=0,_=0; +l>=g;){g+=p,v++}for(;m>=h;){m-=p,_++}return r=Math.max(v,r),a=Math.max(_,a),{domain:[m,g],tickInterval:p,positiveTickCount:v,negativeTickCount:_,axis:s}});return o.map(function(t){var e,i=t.domain,n=t.tickInterval,o=t.positiveTickCount,s=t.negativeTickCount,h=t.axis,l=i[0],u=i[1];for(e=o;r>e;e++){u+=n}for(e=s;a>e;e++){l-=n}h._domain=[l,u],h._tickStart=l,h._step=n,h.scale.domain([l,u])}),t},_forceUpdateAxisDomain:function(t){var n=t[0].axis,r=n.getZeroPos(),a=n._getTickValues(),o=this;return t.forEach(function(t,s){function h(){if(0===d){c=i.niceValue(p||c,g.length) +}else{if(0===c){d=i.niceValue(f||d,m.length)}else{var t=0!==p?i.niceValue(p/n._domain[1],g.length):i.niceValue(f/n._domain[0],m.length);c=i.accMul(n._domain[1],t),d=i.accMul(n._domain[0],t)}}}function l(){var t,n=u.scale(0),a=n-r,s=c-d,h=u._getRange();h=Math.abs(h[0]-h[1]),t=a*s/h;var l,f=1,p=u.vanchart.options.chartType!==e.BAR_CHART,g=o.vanchart.isInverted(),m=u.options.reversed;l=p&&!g&&m||g&&!m||!p&&!m,f=l?f:-f,c=i.accAdd(c,t*f),d=i.accAdd(d,t*f),Math.abs(d-0)<0.000001&&(d=0),Math.abs(c-0)<0.000001&&(c=0) +}if(0!==s){var u=t.axis,c=u._firstCalcDomain?u._firstCalcDomain[1]:u._domain[1],d=u._firstCalcDomain?u._firstCalcDomain[0]:u._domain[0],f=u._firstCalcDomain?u._firstCalcDomain[2]:d,p=u._firstCalcDomain?u._firstCalcDomain[3]:c,g=a.filter(function(t){return t>=0}),m=a.filter(function(t){return 0>=t});l(),h(),u._firstCalcDomain||(u._firstCalcDomain=[d,c,f,p]),u._calculateNiceDomain(d,c,d,c),u.scale.domain([d,c]).range(u._getRange())}}),t},_classifyAxis:function(t){function e(t){for(var e,i=0,n=t.length; +n>i;i++){e={axis:t[i],index:i},t[i].alignAxisId?/^stand/.test(t[i].alignAxisId)?a.push(e):o.push(e):s.push(e)}}function n(t){var e=h.options.onZero,n=e===!0?0:e;e!==!0&&t.forEach(function(t,e){var i={axis:t,index:e};return e===n?void a.unshift(i):void (0===t.series.length?s.push(i):o.push(i))}),e===!0&&t.forEach(function(t,e){var n={axis:t,index:e},r=t.options;0===t.series.length?s.push(n):i.hasDefined(r.tickInterval)||i.hasDefined(r.min)||i.hasDefined(r.max)?a.push(n):o.push(n)}),a.length||(o=r(o)) +}function r(t){function e(t,e){return t.axis.tickData.length-e.axis.tickData.length}if(!t.length){return t}for(var i=[],n=[],r=[],a=0,o=t.length;o>a;a++){Math.abs(0-t[a].axis._domain[0])<0.000001?n.push(t[a]):Math.abs(0-t[a].axis._domain[1])<0.000001?r.push(t[a]):i.push(t[a])}return i.sort(e),n.sort(e),r.sort(e),i.concat(r.concat(n))}var a=[],o=[],s=[],h=this;return e(t),a.length||o.length||(s=[],n(t)),{preset:a,nonPreset:o,nonSeries:s}},_reassembleAxis:function(t){var e=t.nonPreset.concat(t.preset.concat(t.nonSeries)); +return e.sort(function(t,e){return t.index-e.index}),e.map(function(t){return t.axis})},_dealOnZeroDetail:function(t){var e=this.vanchart.getComponent(t)._axisList;if("value"===e[0].options.type){var i=this._classifyAxis(e);i.preset.length>0&&i.nonPreset.unshift(i.preset.shift()),i.nonPreset.forEach(function(t,e){var n=!!t.axis.options.reversed,r=!!i.nonPreset[0].axis.options.reversed;n!==r&&(i.preset.push(t),i.nonPreset.splice(e,1))}),i.nonPreset.forEach(function(t,e){var n=t.axis.options,r=i.nonPreset[0].axis.options; +0!==n.gridLineWidth&&0!==e&&(r.gridLineWidth=r.gridLineWidth||1,r.gridLineColor=r.gridLineColor||n.gridLineColor,n.gridLineWidth=0)}),i.nonPreset=this._alignByZeroValue(i.nonPreset),e=this._reassembleAxis(i),this.vanchart.getComponent(t)._axisList=e,o.reLayoutPlotBoundsAfterDealOnZero(this.vanchart)}},dealOnZero:function(){var t=this.options,e=this.componentType===r.X_AXIS_COMPONENT?r.Y_AXIS_COMPONENT:r.X_AXIS_COMPONENT;t.onZero&&this._dealOnZeroDetail(e)},updateAxisBounds:function(){var t=this.options; +if(!t.onZero){return !1}var i,n,r,a,o=this.getStandardAxis(),s=o.getZeroPos(),h=this.vanchart.bounds;this.isHorizontal()?(i=h.x,n=s+h.y-(this.getPosition()===e.TOP?this.bounds.height:0),r=h.width,a=this.bounds.height,n+a>h.y+h.height&&(a-=h.height-s)):(i=s+h.x-(this.getPosition()===e.LEFT?this.bounds.width:0),n=h.y,r=this.bounds.width,a=h.height,i+r>h.x+h.width&&(r-=h.width-s)),0>a&&(a=0),0>r&&(r=0),this.bounds={x:i,y:n,width:r,height:a}},_getTickLabelLength:function(t){var e=this.options,i=0,n=0,r=this.isHorizontal(); +if(e.showLabel&&(i=isNaN(+e.tickPadding)?d():e.tickPadding),e.enableTick&&(i+=isNaN(+e.tickLength)?f:e.tickLength),t){t.forEach(function(t){var e=t.tickDim;n=Math.max(n,r?e.height:e.width)})}else{for(var a=this.alignAxisId?this._getTickValuesAlignByAxis():this._getTickValues(),o=0,s=a.length;s>o;o++){var h=this._getTickDim(this._getTickContent(a[o],e.formatter));n=Math.max(r?h.height:h.width,n)}}var l=d();return i+(e.showLabel?n+l:0)},_getTickDim:function(t){var e=this.options,n=e.useHtml,r=e.labelRotation||0,a=e.labelStyle||{}; +return i.getTextDimensionWithRotation(t,a,n,r)},_updateOriginTickData:function(){var t=this.alignAxisId?this._getTickValuesAlignByAxis():this._getTickValues(),e=this;this._calculateLabelRotation(t),this.tickData=[];for(var i=0,n=t.length;n>i;i++){var r=t[i];this.tickData.push(e._calculateSingleTickData(r,r))}this._setInitPeriod()},_setInitPeriod:function(){if(!this._initPeriod){var t=this.tickData;this._initPeriod=t.length>1?[t[0].tickValue,t[1].tickValue]:0}},getPeriodSize:function(){var t=this.scale,e=this._initPeriod; +return i.isArray(e)?Math.abs(t(e[0])-t(e[1])):t.rangeBand()},_calculateLabelRotation:function(t){var e=this.options,i=e.formatter;isNaN(e.labelRotation)?e.autoRotate?this.labelRotation=this.getLabelAutoRotation(t,e,i):this.labelRotation=0:this.labelRotation=e.labelRotation},_calculateSingleTickData:function(t,e,a){a=a||{};var o=this.options,s=o.formatter,h=o.useHtml,l=o.labelStyle||{},u=i.extend({writingMode:"tb-rl","writing-mode":"tb-rl","-webkit-writing-mode":"vertical-rl"},l),c=this._getTickContent(e,s); +this.type===r.CATEGORY_AXIS_COMPONENT&&c&&(c=(c+"").trim());var d,f,p=l,g=this.labelRotation;return 90===Math.abs(g)&&i.hasChn(c)&&(g=360,p=u),d=i.getTextDimension(c,p,h),f=i.getTextDimRotated(d,g),h&&(f.width=isNaN(parseFloat(o.labelWidth))?f.width:parseFloat(o.labelWidth),f.height=isNaN(parseFloat(o.labelHeight))?f.height:parseFloat(o.labelHeight)),n.merge({tickValue:t,tickContent:c,tickDim:f,tickRectDim:d,labelRotation:g},a)},_isBaseAxis:function(){return this.series.length?this.componentType===this.series[0].getBaseAxisType():!1 +},getLabelAutoRotation:function(){return 0},_getAxisTitleLength:function(){var t=this.options.title;if(!t||i.isEmpty(t.text)){return 0}var e,n;return this.titleRotation=t.rotation,i.hasChn(t.text)&&90===Math.abs(t.rotation)&&(this.titleRotation=360,t.style=i.extend({writingMode:"tb-rl","writing-mode":"tb-rl","-webkit-writing-mode":"vertical-rl"},t.style)),e=i.getTextDimension(t.text,t.style,t.useHtml),n=i.getTextDimRotated(e,this.titleRotation),this.titleRectDim=e,this.titleDim=n,this.isHorizontal()?n.height:n.width +},getAxisTitleBounds:function(){var t=this.bounds,i=this.tickLabelLength+g(),n=this.labelLength,r=this.getPosition(),a=t.x,o=t.y,s=t.width,h=t.height;switch(r){case e.LEFT:a+=s-i-n,s-=i;break;case e.BOTTOM:o+=i,h-=i;break;case e.RIGHT:a+=i,s-=i;break;case e.TOP:o+=h-i-n,h-=i}return{x:a,y:o,width:Math.max(s,0),height:Math.max(h,0)}},getTickLength:function(){var t=this.scale.range();return Math.abs(t[0]-t[1])/Math.max(this.tickData.length,1)},adjustDomain4Radius:function(){if(this.type===r.VALUE_AXIS_COMPONENT||this.type===r.DATE_AXIS_COMPONENT){var t=this._domain,n=this.type===r.DATE_AXIS_COMPONENT,o=this._getRange(),s=this._dataDomain,h=Math.max((t[0]+"").length,(t[1]+"").length); +n&&(t=[i.int2date(t[0]),i.int2date(t[1])]);var l=this.options.log?a.log().base(this.options.log):a.linear();l.domain(t).range(o);var u=this,c=this._isBaseAxis(),d=this.componentType===r.X_AXIS_COMPONENT?"x":"y",f=Number.MAX_VALUE,p=-Number.MAX_VALUE;if(this.series.map(function(t){if(t.visible&&((t.type===e.BUBBLE_CHART||t.type===e.SCATTER_CHART)&&t.points.map(function(t){var e=l(u.getAxisValue(t[d],t));if(t.visible&&!t.isNull&&!isNaN(e)){var n=i.pick(t.radius,t.options.marker&&t.options.marker.radius); +f=Math.min(f,e-n),p=Math.max(p,e+n)}}),t.type===e.COLUMN_CHART||t.type===e.BAR_CHART||t.type===e.LINE_CHART||t.type===e.AREA_CHART)){var n=t.points;if(!n.length){return}var r,a=l(s[0]),o=l(s[1]),h=Math.min(a,o),g=Math.max(a,o);t.type===e.COLUMN_CHART||t.type===e.BAR_CHART?r=c?t.getSeriesOffsetAndWidth().width/2:0:n[0]&&(r=n[0].options.marker&&n[0].options.marker.radius||t.options.lineWidth),isNaN(h)||(f=Math.min(f,h-r)),isNaN(g)||(p=Math.max(p,g+r))}}),f===Number.MAX_VALUE||p===-Number.MAX_VALUE){return +}var g=l.invert(f),m=l.invert(p);n&&(g=i.date2int(g),m=i.date2int(m)),this.calculateDomainFromData([Math.min(Math.min(g,m),s[0]),Math.max(Math.max(g,m),s[1])]);var v=Math.max((this._domain[0]+"").length,(this._domain[1]+"").length);if(v>h){return !0}}},getWholeRange:function(){var t=this.vanchart.getPlotContentBounds(),e=t.x,i=t.x+t.width,n=t.y,r=t.y+t.height;return this.isHorizontal()?this.isAxisReversed()?[i,e]:[e,i]:this.isAxisReversed()?[n,r]:[r,n]},_getRange:function(){return this._getPlotRange() +},_getPlotRange:function(){var t=this.vanchart.bounds,e=0,i=t.width,n=0,r=t.height;return this.isHorizontal()?this.isAxisReversed()?[i,e]:[e,i]:this.isAxisReversed()?[n,r]:[r,n]},_getPlotBands:function(){var t=this.options.plotBands,e=this.scale,n=!(!e.rangeBand||!e.rangeBand());if("string"==typeof t){var r=t;t=[];for(var a=this._getTickValuesWithEndValue(),o=n?-1:0,s=a.length-1;s>o;s-=2){t.push({color:r,from:n?a[s]:a[s-1],to:a[s]})}}else{t=t||[];for(var h=[],l=0,u=t.length;u>l;l++){var c=t[l];i.hasDefined(c.from)&&i.hasDefined(c.to)&&h.push(c) +}t=h}return t},_getTickValuesWithEndValue:function(){var t=this._getTickValues(),e=this._domain[1],n=this.type===r.DATE_AXIS_COMPONENT;if(t.length){var a=t[t.length-1];n?i.date2int(a)a&&t.push(e)}return t},getTickData:function(){return this.tickData},getMinorTickData:function(){var t=this.getTickData(),e=[],n=this.options,r=this._step;if(this.options.enableMinorTick&&this.tickData.length){var a,o,s,h=t.length;if(this.isCategory()){var l=Math.round(this.getTickLength()/5),u=t.sort(function(t,e){return t.tickPos-e.tickPos +}),c=this.isRangePoints?h-1:h;for(a=0;c>a;a++){for(var d=u[a].tickPos,f=1;5>f;f++){e.push(d+l*f)}}}else{var p=n.minorTickInterval?n.minorTickInterval:r/5;for(a=0;h-1>a;a++){var g=t[a].tickValue,m=t[a+1].tickValue;for(o=g instanceof Date&&m instanceof Date,g=o?i.date2int(g):g,m=o?i.date2int(m):m,s=i.accAdd(g,p);m>s;s=i.accAdd(s,p)){e.push(o?i.int2date(s):s)}}var v=t[h-1].tickValue,_=this.scale.domain()[1];if(o=v instanceof Date&&_ instanceof Date,v=o?i.date2int(v):v,_=o?i.date2int(_):_,_>v){for(s=v+p; +_>=s;s+=p){e.push(o?i.int2date(s):s)}}var y=t[0].tickValue,x=this.scale.domain()[0];if(o=y instanceof Date&&x instanceof Date,y=o?i.date2int(y):y,x=o?i.date2int(x):x,y>x){for(s=y-p;s>=x;s-=p){e.push(o?i.int2date(s):s)}}}}return e},getMaxTickWidth:function(){var t=0;return this.options.showLabel?(this.tickData.forEach(function(e){t=Math.max(t,e.tickDim.width)}),t):t},getTickHeight:function(){return this.options.labelStyle&&this.options.showLabel?i.getTextHeight(this.options.labelStyle):0},_calculateTickPosAndStep:function(){var t,e=this.options,n=this.scale,r=this.getTickLength(),a=n.rangeBand?n.rangeBand()/2:0,o=this.getTickData(); +if(o.forEach(function(t){t.tickPos=n(t.tickValue),t.tickLabelPos=t.tickPos+a}),e.showLabel){if(e.step){t=0,o.forEach(function(i){t++%e.step&&(i.tickContent="")})}else{var s,h=this.isHorizontal(),l=1,u=1,c=Math.abs(Math.abs(this.labelRotation)-(h?0:90)),d=c>=15&&90!==c;s=i.toRadian(c);var f,p,g,m,v=-1,_=Math.sin(s);o.forEach(function(t){if(""!==t.tickContent){if(d){m=t.tickRectDim.height,p=Math.abs(t.tickPos-f),g=(m+v)/2,p*_>g||-1===v?(l=1,f=t.tickPos,v=m):(l++,u=Math.max(u,l))}else{var e=h?t.tickDim.width:t.tickDim.height; +r&&(u=Math.max(u,Math.ceil(e/r)))}}}),t=0,o.forEach(function(e){t++%u&&(e.tickContent="")})}}else{o.forEach(function(t){t.tickContent=""})}},_getAxisOriginPoint:function(){var t,i,n=this.bounds,r=this.getPosition();switch(r){case e.TOP:t=n.x,i=n.y+n.height;break;case e.BOTTOM:t=n.x,i=n.y;break;case e.LEFT:t=n.x+n.width,i=n.y;break;case e.RIGHT:t=n.x,i=n.y}return{x:t,y:i}},getPosition:function(){var t=this.componentType===r.X_AXIS_COMPONENT?"bottom":"left",i=this.options.position||t;if(!this.vanchart.isInverted()){return i +}switch(i){case e.TOP:return e.RIGHT;case e.RIGHT:return e.BOTTOM;case e.BOTTOM:return e.LEFT;case e.LEFT:return e.TOP}},isAxisReversed:function(){return this.componentType===r.X_AXIS_COMPONENT&&this.vanchart.isInverted()?!this.options.reversed:this.options.reversed},isOnZero:function(){return this.options.onZero},getLineWidth:function(){return this.options.lineWidth},showArrow:function(){return this.options.showArrow},getTitleAlign:function(){var t=this.options.title;if(!t){return null}var i=t.align||"center"; +if(this.vanchart.isInverted()){switch(i){case e.TOP:return e.RIGHT;case e.RIGHT:return e.BOTTOM;case e.BOTTOM:return e.LEFT;case e.LEFT:return e.TOP}}return i},_calculateLogNiceDomain:function(t,e,n,r){var a=this.options,o=a.log,s=parseInt(i.pick(a.tickInterval,1));t=t>=1?1:t,t=0>=t?1:t,n=0>=n?1:n,r=n>=r?void 0:r,t=i.pick(n,t),e=i.pick(r,e),t=Math.pow(o,Math.floor(i.log(o,t))),e=Math.pow(o,Math.ceil(i.log(o,e))),this._domain=[t,e],this._tickStart=t,this._step=s},_calculatePercentValueDomain:function(t,e,n,r){var a=this.options,o=i.pick(n,0),s=i.pick(r,1),h=i.pick(a.tickInterval,0.25); +this._domain=[o,s],this.vanchart.isMobileFlow()?(this._tickStart=0,this._step=h):(this._tickStart=o,this._step=h)},_calculateValueNiceDomain:function(t,e,n,a){var o=this.type===r.VALUE_AXIS_COMPONENT&&!this._isBaseAxis()||"gaugeAxis"===this.componentType,s=this.options,h=i.hasDefined(n),l=i.hasDefined(a);o&&(t>0?t=0:0>e&&(e=0)),t=h?n:t,e=l?a:e,t>=e&&(e=t+_*(this.type===r.DATE_AXIS_COMPONENT?1000:1));var u=s.tickInterval||this._linearTickInterval(t,e),c=this._linearNiceDomain(t,e,u);t=h?n:c[0],e=l?a:c[1],t>=e&&(e=t+_*(this.type===r.DATE_AXIS_COMPONENT?1000:1)); +var d=c[0];if(h){var f=i.accMul(Math.ceil(i.accDiv(i.accAdd(n,-d),u)),u);d=i.accAdd(d,f)}this._domain=[t,e],this._tickStart=d,this._step=u,this._extendDomainWithForecastRange(h,l)},_extendDomainWithForecastRange:function(t,e){var n=this._isBaseAxis(),r="category"===this.options.type,a=function(t){return t.some(function(t){return t.options.trendLine&&t.options.trendLine.enable===!0})}(this.series);return n&&a&&!r?(t||(this._domain[0]=i.accAdd(this._domain[0],i.accMul(this.forecast[0],this._step)),this._tickStart=i.accAdd(this._tickStart,i.accMul(this.forecast[0],this._step))),void (e||(this._domain[1]=i.accAdd(this._domain[1],i.accMul(this.forecast[1],this._step))))):!1 +},_linearTickInterval:function(t,e,i){i=i||this._getDefaultTickCount();var n=e-t,a=Math.pow(10,Math.floor(Math.log(n/i)/Math.LN10)),o=i/n*a;return 0.15>=o?a*=10:0.35>=o?a*=5:0.75>=o&&(a*=2),this.type===r.DATE_AXIS_COMPONENT&&(a=Math.max(a,1000)),a},_linearNiceDomain:function(t,e,n){return t=i.accMul(Math.floor(t/n),n),e=i.accMul(Math.ceil(e/n),n),[t,e]},_getDefaultTickCount:function(){return this.vanchart.options.chartType===e.RADAR_CHART?v:m},getIndexByPosition:function(t){var e,n=this.getPlotBounds(),a=this.scale,o=a(this.isAxisReversed()?a.domain()[a.domain().length-1]:a.domain()[0]); +e=this.isHorizontal()?t[0]-n.x-o:t[1]-n.y-o;var s;switch(this.type){case r.DATE_AXIS_COMPONENT:s=i.date2int(a.invert(e));break;default:s=a.invert(e)}return s=Math.round(s)},_valueInDomain:function(){return !0},render:function(){this.lastScale=this.scale&&this.scale.copy();var t=this.vanchart,e=t.renderer;this.axisGroup||(e.clip(this.clipAxisGroup=this.createComponentGroup(),t.plotClip),this.axisGroup=this.createComponentGroup());var i=this.bounds,n={x:i.x,y:i.y,width:i.width,height:i.height};return this.isHorizontal()?(n.x=0,n.width=t.width,n.yt.bounds.x+t.bounds.width&&this.options.onZero&&(n.width=t.bounds.x+t.bounds.width-n.x),n.width<0&&(n.width=0)),this.axisGroupClip?e.updateClip(this.axisGroupClip,n):(this.axisGroupClip=e.createClip(n),e.clip(this.axisGroup,this.axisGroupClip)),this.clipBounds=n,this.axisLineGroup||(this.axisLineGroup=e.group().addTo(t.seriesGroup)),0===this.series.length?void this.remove():(this._drawPlotBands(),this._drawGridLine(),this.isNeedDrawAxis()&&(this._drawTickLine(),this._drawTickLabel(),this._drawAxisLine(),this._drawAxisTitle(),this._drawPlotLines()),void (this._lastSharedPoints&&this.drawHighlightBackground(this._lastSharedPoints))) +},isLog:function(){return this.options.log},isNeedDrawAxis:function(){var t=this.options.onZero,e=t===!0?0:t,i=this.componentType===r.X_AXIS_COMPONENT?r.Y_AXIS_COMPONENT:r.X_AXIS_COMPONENT,n=!0;return t?(i=this.vanchart[i](e),(i.options.min>0||i.options.max<0)&&(n=!1),n):n},getZeroPos:function(){switch(this.type){case r.VALUE_AXIS_COMPONENT:return this.isLog()?this.scale(1):this.scale(0);case r.DATE_AXIS_COMPONENT:return this.scale(i.int2date(0));case r.CATEGORY_AXIS_COMPONENT:return 0}},_drawPlotBands:function(){var t,e,n,r,a,o=this._getPlotBands(),s=this.scale,h=s.rangeBand,c=h?s.rangeBand():0,d=this.vanchart.renderer,f=this.vanchart.bounds,p=this,g=p.isHorizontal(),m=0,v=0,_=f.width,y=f.height; +for(this.plotBandsGroup||(this.plotBandsGroup=d.group().addTo(this.clipAxisGroup),this.plotBands=[]),this.plotBandsGroup.attr({transform:i.makeTranslate(f)}),t=o.length;tt;t++){var x=o[t],T=s(x.from),b=s(x.to);n=Math.min(T,b),r=Math.max(T+c,b+c),n=Math.max(g?m:v,n),r=Math.min(g?_:y,r),a=g?{x:n,y:v,width:Math.max(r-n,0),height:y}:{x:m,y:n,width:_,height:Math.max(r-n,0)},this.plotBands[t]=this.plotBands[t]||d.rect(a).addTo(this.plotBandsGroup),this.plotBands[t].style({fill:x.color}).animate({duration:l,ease:u,attr:a}) +}},_drawAxisLine:function(){var t=this.options,n=t.lineWidth,r=t.lineColor,a=this.getPlotBounds(),o=this._getAxisOriginPoint(),s="x1",h="y1",l="x2",u="y2",c=a.width,d=this.vanchart.renderer;if(this.isHorizontal()||(s="y1",h="x1",l="y2",u="x2",c=a.height),o.y<=a.y&&this.isHorizontal()&&this.options.onZero||o.x>=a.x+a.width&&this.isVertical()&&this.options.onZero){return this.axisLine&&this.axisLine.remove(),this.arrowGroup&&this.arrowGroup.remove(),this.axisLine=null,this.arrowGroup=null,!1}var f=i.lineSubPixelOpt(0,n); +this.axisLine||(this.axisLine=d.line().addTo(this.axisLineGroup));var p={};if(p[s]=0,p[l]=c,p[h]=p[u]=f,p.transform=i.makeTranslate(o),this.axisLine.attr(p).style({stroke:r,"stroke-width":n}),this.showArrow()){this.arrowGroup||(this.arrowGroup=d.group().addTo(this.axisLineGroup));var g=this.arrowGroup.line||d.line().addTo(this.arrowGroup),m=this.arrowGroup.path||d.path().addTo(this.arrowGroup);this.arrowGroup.line=g,this.arrowGroup.path=m;var v,_,y=this.isAxisReversed(),x=6;this.isHorizontal()?(y?(v=[o.x,o.y],x*=-1,_="left"):(v=[o.x+a.width,o.y],_="right"),this.arrowGroup.attr("transform",i.makeTranslate(v)),g.attr({x1:0,y1:f,x2:x,y2:f}).style({stroke:r,"stroke-width":n}),m.attr({d:e.AXIS_ARROW_PATH[_]}).style({fill:r})):(y?(v=[o.x,o.y+a.height],x*=-1,_="down"):(v=o,_="up"),this.arrowGroup.attr("transform",i.makeTranslate(v)),g.attr({x1:f,y1:0,x2:f,y2:-x}).style({stroke:r,"stroke-width":n}),m.attr({d:e.AXIS_ARROW_PATH[_]}).style({fill:r})) +}else{this.arrowGroup&&this.arrowGroup.remove()}},_drawGridLine:function(){var t=this.options,n=this.getPlotBounds(),a=this.getTickData(),o=this.scale,s=this.lastScale||o,h=t.gridLineColor,c=t.gridLineWidth;0===c&&(h="");var d=i.lineSubPixelOpt(0,c),f=this.vanchart.renderer,p="x1",g="y1",m="x2",v="y2",_=n.height;this.isHorizontal()||(p="y1",g="x1",m="y2",v="x2",_=n.width),this.gridLinesGroup||(this.gridLinesGroup=f.group().addTo(this.clipAxisGroup),this.gridLines=[]),this.gridLinesGroup.attr("transform",i.makeTranslate(n)); +var y,x,T,b,A,C=this.getPosition(),L=C===e.TOP||C===e.BOTTOM,M=this.type===r.CATEGORY_AXIS_COMPONENT?[{tickPos:L?n.width:n.height-1}]:[],P=this._bindData(this.gridLines,a.concat(M),function(t){return t.tickValue}),w=[];for(y=0,x=P.exit.length;x>y;y++){b=P.exit[y].datum(),C=o(b.tickValue),T={},T[p]=C,T[m]=C,P.exit[y].animate({duration:l,ease:u,attr:T,style:{opacity:0}}).remove()}for(y=0,x=P.enter.length;x>y;y++){b=P.enter[y],A=f.line().style({stroke:h,"stroke-width":c}).addTo(this.gridLinesGroup); +var S=s(b.tickValue)+d;C=b.tickPos+d,S=isNaN(S)?C:S,A.attr(p,S).attr(m,S).attr(g,0).attr(v,_),T={},T[p]=T[m]=C,T[g]=0,T[v]=_,A.animate({attr:T,duration:l,ease:u}),A.datum(b),w.push(A)}for(w=w.concat(P.update),y=0,x=w.length;x>y;y++){A=w[y].style({stroke:h,"stroke-width":c}),b=A.datum(),C=b.tickPos+d,T={},T[p]=T[m]=C,T[g]=0,T[v]=_,A.animate({attr:T,duration:l,ease:u})}this.gridLines=w},_drawTickLine:function(){var t=this.vanchart.renderer,e=this.options;this.tickLinesGroup||(this.tickLinesGroup=t.group().addTo(this.axisGroup),this.tickLines={},this.tickLines[x]=[],this.tickLines[T]=[]); +var n=e.enableTick?e.tickLength||0:0,r=e.tickWidth||1,a=e.tickColor,o=i.lineSubPixelOpt(0,r),s=e.enableMinorTick?e.minorTickLength||0:0,h=e.minorTickColor,l=e.minorTickWidth||1,u=i.lineSubPixelOpt(0,l);this._drawMainTickLine({det:o,tickWidth:r,tickLength:n,tickColor:a}),this._drawMinorTickLine({det:u,tickWidth:l,tickLength:s,tickColor:h})},_drawMainTickLine:function(t){var e=this.getTickData();if(this.isCategory()&&!this.isRangePoints){var i=this.options.reversed,n=this._getRange(),r=[{tickPos:n[i?0:1]}]; +e=i?r.concat(e):e.concat(r)}this.tickLines[x]=this._drawTickLineWithData(this.tickLines[x],e,t)},_drawMinorTickLine:function(t){var e=this.getMinorTickData();this.tickLines[T]=this._drawTickLineWithData(this.tickLines[T],e,t)},_drawTickLineWithData:function(t,n,a){var o=this.vanchart.isMobileFlow()&&this.isCategory(),s=this.isHorizontal();if(o){var h=this.vanchart.bounds;n=n.filter(function(t){return s?t.tickPos>=0&&t.tickPos<=h.width:t.tickPos>=0&&t.tickPos<=h.height})}var l=this._getAxisOriginPoint(),u=this.getPosition(),c=this.vanchart.renderer,d=this,f=d.options.lineWidth||0,p=u===e.TOP||u===e.LEFT?-1:1,g="x1",m="y1",v="x2",_="y2"; +this.isHorizontal()||(g="y1",m="x1",v="y2",_="x2");var y,x,T=d._bindData(t,n,a.keyFunction),b=[];for(y=0,x=T.exit.length;x>y;y++){T.exit[y].remove()}for(y=0,x=T.enter.length;x>y;y++){b.push(c.line().datum(T.enter[y]).addTo(d.tickLinesGroup))}for(b=b.concat(T.update),y=0,x=b.length;x>y;y++){var A,C=b[y].datum(),L={};A=i.hasDefined(C.tickPos)?C.tickPos:d.type===r.CATEGORY_AXIS_COMPONENT?C:d.scale(C);var M=l.x,P=l.y;d.isHorizontal()||(M=l.y,P=l.x);var w="function"==typeof a.tickLengthFuc?a.tickLengthFuc(C):a.tickLength; +w+=w>0?f/2:0,L[g]=A+a.det+M,L[v]=L[g],L[m]=P,L[_]=(p*w||0)+P,b[y].attr(L).style({stroke:a.tickColor,"stroke-width":a.tickWidth})}return b},_drawPlotLines:function(){function t(t){return{stroke:t.color,"stroke-width":t.width,"stroke-dasharray":t.dataArray}}function n(t){return f.text().textContent(t.text).style(t.style).attr({x:t.textX,y:t.textY,"text-anchor":"left",dy:0.85*t.textDim.height})}function a(t,e){e._textG&&(e._textG.remove(),e._textG=null),t.text&&t.textDim&&(e._textG=n(t).addTo(e))}var o=this.options.plotLines||[],s=this.vanchart.bounds,h=this.scale,l=this.type===r.DATE_AXIS_COMPONENT,u=[],c=this,f=this.vanchart.renderer; +o.forEach(function(t){if(!i.isEmpty(t.value)){var n=h(l?i.object2date(t.value):t.value)+(h.rangeBand?h.rangeBand()/2:0);if(!isNaN(n)){var r,a,o,f,p=i.lineSubPixelOpt(n,t.width);if(c.isHorizontal()){if(0>n||n>s.width){return}r=a=p,o=0,f=s.height}else{if(0>n||n>s.height){return}r=0,a=s.width,o=f=p}var g,m,v,_;if(t.label&&t.label.text&&t.label.style){_=t.label.style,v=t.label.text;var y=t.label.align,x=i.getTextDimension(v,_,t.label.useHtml);switch(y){case e.TOP:g=r-x.width,m=o;break;case e.BOTTOM:g=r-x.width,m=f-x.height; +break;case e.LEFT:g=r,m=o-x.height-d();break;case e.RIGHT:g=a-x.width,m=f-x.height-d()}}u.push({color:t.color,line:{x1:r,y1:o,x2:a,y2:f},width:t.width,dataArray:e.DASH_TYPE[t.dashStyle],text:v,textDim:x,style:_,textX:g,textY:m})}}}),this.plotLinesGroup||(this.plotLinesGroup=f.group().addTo(this.vanchart.frontGroup),this.plotLines=[]),this.plotLinesGroup.attr("transform",i.makeTranslate(s));var p,g,m,v=this._bindData(this.plotLines,u);for(this.plotLines=[],p=0,g=v.exit.length;g>p;p++){v.exit[p].remove() +}for(p=0,g=v.enter.length;g>p;p++){m=v.enter[p],_=f.group(),this.plotLines.push(_),_._lineG=_.append(f.line(m.line).style(t(m))),a(m,_),_.addTo(this.plotLinesGroup)}for(p=0,g=v.update.length;g>p;p++){var _=v.update[p];m=_.datum(),_._lineG.attr(m.line).style(t(m)),a(m,_),this.plotLines.push(_)}},_drawTickLabel:function(){this._drawSvgTickLabel()},_drawSvgTickLabel:function(){var t=this.vanchart,e=t.renderer,i=this.getTickData().filter(function(t){return""!==t.tickContent});if(this.tickLabelsGroup||(this.tickLabelsGroup=e.vgroup().add(),this.axisGroup.append(this.tickLabelsGroup.renderG),this.tickLabels=[]),this.options.useHtml){this.tickLabelsGroup.style({width:this.vanchart.width+"px",height:this.vanchart.height+"px"}); +var n="rect("+this.clipBounds.y+"px, "+(this.clipBounds.x+this.clipBounds.width)+"px, "+(this.clipBounds.y+this.clipBounds.height)+"px, "+this.clipBounds.x+"px )";this.tickLabelsGroup.attr("clip",n)}this.tickLabels=this._drawSvgTickLabelWithData(this.tickLabels,i)},_drawSvgTickLabelWithData:function(t,e,n){var r=this,a=this.vanchart,o=a.renderer,s=n?this._getLabelStartPos(n):0,h=this.scale,c=this.lastScale||h,d=this.options,f=d.labelStyle,p=d.useHtml,g=this.vanchart.isMobileFlow()&&this.isCategory(),m=this.isHorizontal(),v=this; +if(g){var _=this.vanchart.bounds;e=e.filter(function(t){var e=v._getLabelAttr(h,t,s);if(m){var i=e._x-_.x,n=t.tickDim.width;return i+n>=0&&i<=_.width}var r=e._y-_.y,a=t.tickDim.height;return r+a>=0&&r<=_.height})}var y,x,T,b,A=this._bindData(t,e,function(t){return t.tickValue}),C=[],L={duration:l,ease:u,style:{opacity:0}};for(y=0,x=A.exit.length;x>y;y++){T=A.exit[y].datum(),b=h(T.tickValue),A.exit[y].animate(i.extend({},L,r.isHorizontal()?{x:b}:{y:b})).remove()}var M,P,w;for(y=0,x=A.enter.length; +x>y;y++){T=A.enter[y],M=this._getLabelAttr(c,T,s),P=this.tickLabelsGroup.append(o.vtext(p).textContent(T.tickContent).style({opacity:0})),w=T.labelRotation%360?P.vRotate(T.labelRotation,!0).rotateStr:"",M.transform+=w,P.attr(M),P.datum(T),C.push(P)}for(C=C.concat(A.update),y=0,x=C.length;x>y;y++){P=C[y],T=P.datum(),P.textContent(T.tickContent).style(f),M=this._getLabelAttr(h,T,s);var S=this._valueInDomain(T.tickValue)?1:0;S=this.alignAxisId?1:S,this.useHtmlLabel()?(P.attr(M).style({opacity:S}),P.vRotate(T.labelRotation)):(w=T.labelRotation%360?P.vRotate(T.labelRotation,!0).rotateStr:"",M.transform+=w,P.animate({ease:u,duration:l,attr:M,style:{opacity:S}})) +}return C},_getLabelAttr:function(t,n,r){var a,o,s=this._getAxisOriginPoint(),h=t.rangeBand?t.rangeBand()/2*(n.length||1):0,l=t(n.tickValue)+h,u=this.options,c=this.isHorizontal(),d=u.enableTick?u.tickLength:0,f=u.tickPadding+d||0,p=n.labelRotation||0,g=u.useHtml,m=this.getPosition(),v=m===e.TOP||m===e.LEFT?-1:1,_=n.tickRectDim,y=n.tickDim,x=0,T=0,b=0,A=0.85*_.height,C=i.toRadian(p);360===p&&(b=g||i.isMS?0:0.85*_.width/2,A=0,o="tb-rl"),c?(a=Math.abs(p%90)<15?0:p>0?1:-1,T+=v*(y.height-_.height)/2,x+=v*a*(y.width-Math.abs(_.height*Math.sin(C)))/2,m===e.TOP?(T-=_.height,T-=r):T+=r,T+=v*f,x+=s.x+l-_.width/2,T+=s.y):(a=Math.abs(p%90)>85?0:p>0?1:-1,x+=v*(y.width-_.width)/2,T+=v*a*(y.height-_.height*Math.cos(C))/2,m===e.LEFT?(x-=_.width,x-=r):x+=r,x+=v*f,x+=s.x,T+=s.y+l-_.height/2); +var L=g?"px":"",M="translate("+x+L+" "+T+L+")",P={_x:x,_y:T,transform:M,dy:A,dx:b,writingMode:o,"writing-mode":o};return g&&o&&(P["-webkit-writing-mode"]="vertical-rl"),P},_drawAxisTitle:function(){var t=this.options,n=t.title;if(!n||i.isEmpty(n.text)){return this.titleGroup&&this.titleGroup.remove(),void (this.titleGroup=null)}var r=this.vanchart.renderer,a=this.axisGroup,o=n.useHtml,s=this.titleRotation,h=this.getTitleAlign(),l=n.text,u=n.style,c=this.titleDim,d=this.titleRectDim,f=this.getAxisTitleBounds(); +this.titleGroup||(this.titleGroup=r.vgroup().add(),a.append(this.titleGroup.renderG)),this.titleGroup.attr({transform:i.makeTranslate(f)});var p=this.titleGroup;p.text&&p.text.remove(),p.text=p.append(r.vtext(o));var g=0,m=0,v=0,_=0.85*d.height;switch(h){case e.TOP:m=0;break;case e.BOTTOM:m=f.height-c.height;break;case e.LEFT:g=0;break;case e.RIGHT:g=f.width-c.width;break;case e.CENTER:default:this.isHorizontal()?g=(f.width-c.width)/2:m=(f.height-c.height)/2}360===this.titleRotation?(v=o?0:i.isMS?"0.2ex":0.85*d.width/2,_=0):(g+=(c.width-d.width)/2,m+=(c.height-d.height)/2),p.text.textContent(l).attr({x:g,y:m,dy:_,dx:v}).style(u),s%360&&p.text.vRotate(s) +},remove:function(){this.axisGroup&&this.axisGroup.remove(),this.clipAxisGroup&&this.clipAxisGroup.remove(),this.axisGroup=this.clipAxisGroup=null,this.axisLineGroup&&this.axisLineGroup.remove(),this.axisLineGroup=null,this.axisLine&&this.axisLine.remove(),this.axisLine=null,this.gridLinesGroup&&this.gridLinesGroup.remove(),this.gridLinesGroup=null,this.gridLines&&this.gridLines.forEach(function(t){t&&t.remove(),t=null}),this.gridLines=null,this.plotLinesGroup&&this.plotLinesGroup.remove(),this.plotLinesGroup=null,this.plotLines&&this.plotLines.forEach(function(t){t&&t.remove(),t=null +}),this.plotLines=null,this.tickLabelsGroup&&this.tickLabelsGroup.remove(),this.tickLabelsGroup=null,this.tickLabels=null,this.cateTickLabelsGroup&&this.cateTickLabelsGroup.remove(),this.cateTickLabelsGroup=null,this.cateTickLabels=null},isPointWithinDataDomain:function(t){var e=this.options.type,n=this._domain;switch(e){case r.DATE_AXIS_COMPONENT:return i.date2int(t.category)>=n[0]&&i.date2int(t.category)<=n[1];case r.VALUE_AXIS_COMPONENT:return parseFloat(t.category)>=n[0]&&parseFloat(t.category)<=n[1]; +default:return n.indexOf(t.getCategory())>=0}},_getContinuousTickValues:function(t){t="function"==typeof t?t:function(t){return t};var e=this.options,n=e.min,r=e.max,a=e.tickInterval,o=i.hasDefined(n),s=i.hasDefined(r),h=i.hasDefined(a),l=[],u=this._tickStart,c=this._domain[1],d=this._step,f=!0;h&&(o?u=n:s&&(c=r,f=!1));var p=f?u:c,g=f?"push":"unshift";for(d*=f?1:-1;f?c>=p:p>=u;p=i.accAdd(p,d)){l[g](t(p))}return l}});return A}),define("component/CategoryAxis",["require","./Base","./BaseAxis","../utils/BaseUtils","../Constants","../ComponentLibrary","../utils/Scale","../utils/BezierEasing"],function(t){var e=(t("./Base"),t("./BaseAxis")),i=t("../utils/BaseUtils"),n=t("../Constants"),r=t("../ComponentLibrary"),a=t("../utils/Scale"),o=t("../utils/BezierEasing"),s=2.5,h=function(){return i.paddingConvertWithScale(s) +},l=e.extend({type:r.CATEGORY_AXIS_COMPONENT,initScale:function(){this.lastScale=this.scale,this.scale=a.ordinal()},calculateDomainFromData:function(){this._dataDomain=this._getDomainFromData();var t=this.vanchart.getComponent(r.ZOOM_COMPONENT);this._zoomDomain=this._zoomDomain||t&&t.getZoomDomain(this),this._domain=this._zoomDomain||this._dataDomain},calculateDomainFromZoom:function(){this._domain=this._zoomDomain,this.isBaseAxisOnZoomOnly()&&this.vanchart.reCalcValueAxisDataDomain(this.componentType) +},_getStartAndEndTick:function(){return[this._domain[0],this._domain[this._domain.length-1]]},_getDomainFromData:function(){var t=this.options,e=this.series,i=this,r={},a=t.categories||[];return a.forEach(function(t){r[t]=!0}),e.forEach(function(t){this.getTrendLineForecast(t);for(var e=0,o=t.points.length;o>e;e++){var s=t.points[e].getCategory();r[s]||(r[s]=!0,a.push(s))}(t.type!==n.AREA_CHART||this.isMultiCateAxis())&&(i.isRangePoints=!1)},this),this.isMultiCateAxis()&&a.length&&(a=this.resortDataDomain(a)),this.addTrendLineCategories(a) +},setCategories:function(t){var e=this._dataDomain;this._dataDomain=this.addTrendLineCategories(t);var i=this.vanchart.getComponent(r.ZOOM_COMPONENT);if(this._isBaseAxis()&&i&&i.zoomToolEnabled()){i.updateRangeLeftAndRight(this,e,t);var n=i&&i.getZoomDomain(this);this._zoomDomain=n,this.calculateDomainFromZoom()}else{this._domain=this._dataDomain,this._zoomDomain=null}this.fixScaleAndTickData()},addTrendLineCategories:function(t){function e(t,e){return Array.apply(null,Array(t)).map(e)}if(this.forecast&&(this.forecast[0]||this.forecast[1])){var i=0; +t=e(-this.forecast[0],function(){return Array(2+i++).join(" ")}).concat(t).concat(e(this.forecast[1],function(){return Array(2+i++).join(" ")}))}return t},getOriginalCategories:function(){return this.forecast&&(this.forecast[0]||this.forecast[1])?this._dataDomain.slice(-this.forecast[0],this._dataDomain.length-this.forecast[1]):this._dataDomain},updateAxisSizeAndBounds:function(){this._updateOriginTickData(),this._calculateSize(this.tickData),this._setComponentBounds(this.getPosition(),this._size) +},_getTickValuesWithEndValue:function(){return this._getTickValues()},fixScaleAndTickData:function(){this.scale.domain(this._dataDomain),this.isRangePoints?this.scale.rangePoints(this._getRange()):this.scale.rangeBands(this._getRange()),this._updateOriginTickData(),this._calculateTickPosAndStep()},_getRange:function(){var t=this._getPlotRange();if(this._dataDomain.length==this._domain.length){return t}var e,n=Math.abs(t[1]-t[0]);e=this.isRangePoints?n/Math.max(this._domain.length-1,1):n/this._domain.length; +var r=i.indexOf(this._dataDomain,this._domain[0]),a=this._dataDomain.length-i.indexOf(this._dataDomain,this._domain[this._domain.length-1])-1;if(!(this.isAxisReversed()^this.isHorizontal())){var o=r;r=a,a=o}var s=-r*e,h=n+a*e;return this.isHorizontal()?this.isAxisReversed()?[h,s]:[s,h]:this.isAxisReversed()?[s,h]:[h,s]},_getRangeFromDomain:function(t){var e,n=this._getPlotRange(),r=Math.abs(n[1]-n[0]);e=this.isRangePoints?r/Math.max(t.length-1,1):r/t.length;var a=i.indexOf(this._dataDomain,t[0]),o=this._dataDomain.length-i.indexOf(this._dataDomain,t[t.length-1])-1; +if(!(this.isAxisReversed()^this.isHorizontal())){var s=a;a=o,o=s}var h=-a*e,l=r+o*e;return this.isHorizontal()?this.isAxisReversed()?[l,h]:[h,l]:this.isAxisReversed()?[h,l]:[l,h]},_getPlotRange:function(){return this.vanchart.isMobileFlow()?this.getWholeRange():e.prototype._getPlotRange.call(this)},getLabelAutoRotation:function(t,e,n){if(e.autoRotate&&!e.labelRotation){var r,a,o=this.vanchart.isInverted(),s=t.reduce(function(t,e){return i.getTextDimension(t).width>i.getTextDimension(e).width?t:e}),l=this._getTickContent(s,n),u=i.getTextDimensionWithRotation(l,e.labelStyle,e.useHtml,e.labelRotation),c=Math.max.apply(null,this._getPlotRange())/this._domain.length-h(); +o?(r=u.height,a=u.width):(r=u.width,a=u.height);var d=Math.sqrt(r*r+a*a);if(a>c){return -90}if(r>c){var f=Math.acos(c/d),p=Math.atan(a/r),g=f+p;return -i.toDegree(g)}}},getCategoryCount:function(){return this._dataDomain.length},indexOfLabel:function(t){return i.indexOf(this._dataDomain,t)},getTickLength:function(){var t=this.scale.domain(),e=this.scale.rangeExtent(),i=Math.abs(e[1]-e[0]);return this.isRangePoints&&t.length<=1?i:this.isRangePoints?i/(t.length-1):this.scale.rangeBand()},_getTickValues:function(){return this._domain +},getCategories:function(){return this._dataDomain},axisZoom:function(t,e){var n,r,o=this.vanchart.bounds;this.isHorizontal()?(n=Math.min(t.x,e.x)-o.x,r=Math.max(t.x,e.x)-o.x):(n=Math.min(t.y,e.y)-o.y,r=Math.max(t.y,e.y)-o.y);var s=this.scale.domain(),h=this._getRange(),l=a.quantize().domain(h).range(s),u=i.indexOf(this._dataDomain,l(n)),c=i.indexOf(this._dataDomain,l(r));this.zoomRefresh(this._dataDomain.slice(Math.min(u,c),Math.max(u,c)+1))},getIndexByPosition:function(t){return this._getIndexByXYCoordinate(t) +},_getIndexByXYCoordinate:function(t){var e,i=this.getPlotBounds(),n=this.scale,r=this.isHorizontal(),a=this.isAxisReversed()^!r,o=n(a?n.domain()[n.domain().length-1]:n.domain()[0]);e=r?t[0]-i.x-o:t[1]-i.y-o;var s,h=this.getCategories();if(h.length>1){var l=Math.abs(n(n.domain()[1])-n(n.domain()[0]));s=a?h.length-1-e/l:e/l}else{s=0}return s=this.isRangePoints?Math.round(s):a?Math.ceil(s):Math.floor(s)},getPointsInCategory:function(t){var e=this.vanchart.bounds,i=this.scale.domain(),n=this._getRange(),r=a.quantize().domain(n).range(i),o=r(this.isHorizontal()?t.x-e.x:t.y-e.y); +return this.vanchart.getValidPointsPara(o)},drawHighlightBackground:function(t){if(!this.vanchart.onSeriesRendering()){var e=t[0].getCategory(),r="line";t.map(function(t){var e=t.series;(e.type===n.BAR_CHART||e.type===n.COLUMN_CHART)&&(r="band")}),this._lastSharedPoints=t;var a=this.getPlotBounds(),s=this.isHorizontal(),h=this.scale,l=h.rangeBand?h.rangeBand():0,u=h(e),c=u+l,d=this.vanchart.renderer,f="x",p="y",g="width",m="height",v=a.height,_="x1",y="x2",x="y1",T="y2";switch(s||(f="y",p="x",g="height",m="width",v=a.width,_="y1",y="y2",x="x1",T="x2"),r){case"band":var b={}; +b[f]=u,b[p]=0,b[g]=Math.abs(u-c),b[m]=v,this.highlightBand||(this.highlightBand=d.rect().attr(b).style({fill:"rgb(98,179,240)","fill-opacity":0.2}).addTo(this.vanchart.highlightGroup)),this.highlightBand.attr("transform",i.makeTranslate(a)).animate({duration:250,ease:o.css.ease,attr:b}),this.highlightLine&&this.highlightLine.remove(),this.highlightLine=null;break;case"line":default:l&&(u=(u+c)/2);var A={};A[_]=u,A[x]=0,A[y]=u,A[T]=v,this.highlightLine||(this.highlightLine=d.line().attr(A).style({stroke:"rgb(140,140,140)","stroke-width":1}).addTo(this.vanchart.highlightGroup)),this.highlightLine.attr("transform",i.makeTranslate(a)).animate({duration:250,ease:o.css.ease,attr:A}),this.highlightBand&&this.highlightBand.remove(),this.highlightBand=null +}}},removeHighlightBackground:function(){this.highlightBand&&this.highlightBand.remove(),this.highlightLine&&this.highlightLine.remove(),this.highlightBand=null,this.highlightLine=null},isMultiCateAxis:function(){return !1}});return r.register(r.CATEGORY_AXIS_COMPONENT,l),l}),define("component/ValueAxis",["require","./BaseAxis","../utils/BaseUtils","../ComponentLibrary","../utils/Scale"],function(t){var e=t("./BaseAxis"),i=t("../utils/BaseUtils"),n=t("../ComponentLibrary"),r=t("../utils/Scale"),a=e.extend({type:n.VALUE_AXIS_COMPONENT,initScale:function(){this.lastScale=this.scale,this.scale=this.options.log?r.log().base(this.options.log):r.linear() +},getAxisValue:function(t,e){return"-"===t?0:this.byPercent?e.percentage:+t},_valueInDomain:function(t){var e=this.scale.domain();return t>=Math.min(e[0],e[1])&&t<=Math.max(e[0],e[1])},_getDomainFromData:function(t){for(var e=Number.MAX_VALUE,i=-e,n=!0,r=this.series,a={},o=!1,s=0,h=r.length;h>s&&!o;s++){o=r[s].visible}for(var s=0,h=r.length;h>s;s++){(r[s].visible||!o)&&(this._getSeriesValue(a,r[s],t),this.getTrendLineForecast(r[s]))}var l=0;for(var u in a){var c=a[u];l=c[1]-c[0]||0;for(var d=0,f=c.length; +f>d;d++){isNaN(c[d])||this.options.log&&c[d]<=0||(e=Math.min(e,c[d]),i=Math.max(i,c[d]),n=!1)}}return l=Math.abs(l),this._isBaseAxis()&&l&&this.forecast&&(e+=l*this.forecast[0],i+=l*this.forecast[1]),n&&(e=0,i=100),[e,i]},_getSeriesValue:function(t,e,r){var a=e.name||"",o=e.getBaseAxisType(),s=this.vanchart.components[o]._axisList[e.options[o]||0],h=this.componentType==n.X_AXIS_COMPONENT?"x":"y",l=i.hasNotDefined(e.stack)||e.stack===!1||this._isBaseAxis();if(l){t[a]=t[a]||[],e.points.forEach(function(e){var i=r?s.isPointWithinDataDomain(e):!0; +!e.isNull&&e.visible&&i&&t[a].push(e.options[h])})}else{var u=e.stack+e.type+"STACK_POSITIVE",c=e.stack+e.type+"STACK_NEGATIVE";t[u]=t[u]||[],t[c]=t[c]||[],e.points.forEach(function(e,i){var n=r?s.isPointWithinDataDomain(e):!0;if(!e.isNull&&e.visible&&n){var a=+e.options[h];a>0?null!=t[u][i]&&void 0!=t[u][i]?t[u][i]+=a:t[u][i]=a:null!=t[c][i]&&void 0!=t[c][i]?t[c][i]+=a:t[c][i]=a}})}},getStartPos:function(){return this.scale(this.getStartPosValue())},getStartPosValue:function(){var t=this.options; +return t.log&&1!==t.log?1:0},_getTickValues:function(){var t=[];if(this.options.log){for(var e,i=0;(e=this._tickStart*Math.pow(this.options.log,i))<=this._domain[1];){t.push(e),i+=this._step}}else{t=this._getContinuousTickValues()}return t},_getTickValuesAlignByAxis:function(){var t,e=this.componentType;this.vanchart.getComponent(e)._axisList.forEach(function(e){/^standard/.exec(e.alignAxisId)&&(t=e)});var i=t._getRange();if(t.scale.range(i),t==this){return this._getTickValues()}var n,r=t._getTickValues(),a=[]; +this.scale.range(i);for(var o=0,s=r.length;s>o;o++){n=this.scale.invert(t.scale(r[o])),(Math.abs(0-n)<0.000001||Math.abs(0-r[o])<0.000001)&&(n=0),Math.abs(n)>1&&n%1!==0&&(n=Math.floor(100*n)/100),a.push(n)}return this._normalizeTicks(a)},_normalizeTicks:function(t){var e,n=-1,r=t.length-1;if(t.length<3){return t.map(function(t){return Math.abs(t)>1?Math.round(t):t})}for(;++n=0;){t.unshift(i.accAdd(o,i.accMul(a-n,-e)))}for(n=a;++n=t?e="Dss":o>=t?e="Dmm:ss":s>=t?e="Dhh:mm":h>=t?e="Ddd-hh":l>=t?e="DMM-dd":u>=t&&(e="Dyyyy-MM"),this.dateFormat=e},_getTickContent:function(t,e){function n(t){return window.FR&&window.FR.contentFormat(t,r)||t +}var r=this.dateFormat;return e=e||n,i.format(t,e)},initScale:function(){this.lastScale=this.scale,this.scale=r.linear()},_getStartAndEndTick:function(){return[i.int2date(this._domain[0]),i.int2date(this._domain[1])]},_getTickValues:function(){return this._getContinuousTickValues(i.int2date)},_valueInDomain:function(t){var e=this.scale.domain();return t>=Math.min(e[0],e[1])&&t<=Math.max(e[0],e[1])},_getDomainFromData:function(){for(var t=Math.ceil(Number.MAX_VALUE),e=-t,n=this.series,r=!1,a=0,o=0,s=n.length; +s>o;o++){var h=n[o],l=h[this.componentType];if(l==this&&h.visible){this.getTrendLineForecast(n[o]);var u=h.points;u.length>1&&(a=this.getValueFromData(u[1])-this.getValueFromData(u[0])||0);for(var o=0,s=u.length;s>o;o++){var c=this.getValueFromData(u[o]);c.getTime&&(r=!0,c=i.date2int(c),t=Math.min(t,c),e=Math.max(e,c))}}}return this._isBaseAxis()&&a&&this.forecast&&(t+=a*this.forecast[0],e+=a*this.forecast[1]),r||(t=e=(new Date).getTime()),e=t>=e?t+1000:e,[t,e]},getValueFromData:function(t){var e=this.componentType==n.X_AXIS_COMPONENT?0:1,r=this.componentType==n.X_AXIS_COMPONENT?"x":"y",a=i.isArray(t)?t[e]:t[r]; +return i.object2date(a)}});return n.register(n.DATE_AXIS_COMPONENT,c),c}),define("component/MultiCategoryAxis",["require","../utils/BaseUtils","./CategoryAxis","../Constants","../ComponentLibrary","../utils/BoundsManager"],function(t){var e=t("../utils/BaseUtils"),i=t("./CategoryAxis"),n=t("../Constants"),r=t("../ComponentLibrary"),a=t("../utils/BoundsManager"),o="LAST_MAIN_TICK_LINE",s=4,h=function(){return e.paddingConvertWithScale(s)},l=4,u=function(){return e.paddingConvertWithScale(l)},c=4,d="main",f=e.decodeCategoryArray,p=e.encodeCategoryArray,g=i.extend({_updateOriginTickData:function(){var t=this._getTickValues(); +this._calculateLabelRotation(t[0]),this.tickData=[];for(var e=-1;++e=0;){t(e[r])}}else{for(r=-1;++r=0; +){for(var a=t[r],s=-1;++st){return r}var a=[],o=s[t],h=o.length;for(i=-1;++i=0;n--){if(t[n].axisIndex=n,this._axisList[n]&&this._axisList[n].type!=t[n].type&&(this._axisList[n].remove(),this._axisList[n]=null),this._axisList[n]){this._axisList[n].refresh(t[n])}else{var l,u=t[n].type||r.VALUE_AXIS_COMPONENT;u==r.VALUE_AXIS_COMPONENT?l=o:u==r.CATEGORY_AXIS_COMPONENT?l=a:u==r.DATE_AXIS_COMPONENT?l=s:u===r.MULTI_CATEGORY_AXIS_COMPONENT&&(l=h),this._axisList[n]=new l(t[n],this.componentType,this.vanchart) +}}},doLayout:function(){for(var t=this._axisList.length,e=t-1;e>=0;e--){this._axisList[e].calculateDomainFromData(),this._axisList[e]._calculateSize(),this._axisList[e]._recordAxisSize()}},reCalculateSize:function(){for(var t=this._axisList.length,e=t-1;e>=0;e--){this._axisList[e]._calculateSize(),this._axisList[e]._recordAxisSize()}},updateAxisClip:function(){for(var t={},e=this._axisList.length,i=e-1;i>=0;i--){this._axisList[i].updateClipBounds(t)}this._recordForPlotBounds(n.LEFT,t[n.LEFT]||0),this._recordForPlotBounds(n.RIGHT,t[n.RIGHT]||0),this._recordForPlotBounds(n.TOP,t[n.TOP]||0),this._recordForPlotBounds(n.BOTTOM,t[n.BOTTOM]||0) +},updateAxisSizeAndBounds:function(){for(var t=this._axisList.length,e=t-1;e>=0;e--){this._axisList[e].updateAxisSizeAndBounds()}},adjustDomain4Radius:function(){for(var t=!1,e=this._axisList.length,i=e-1;i>=0;i--){t=this._axisList[i].adjustDomain4Radius()||t}return t},fixBoundsByPlot:function(){for(var t=this.vanchart.bounds,e={},r=0,a=this._axisList.length;a>r;r++){var o=this._axisList[r],s=o.getPosition();o.isOnZero()?(s==n.TOP||s==n.BOTTOM?o.bounds.width=t.width:o.bounds.height=t.height,o.fixScaleAndTickData()):(e[s]=e[s]||[],e[s].push(o)) +}for(var s in e){for(var h=e[s],l=s==n.TOP||s==n.BOTTOM,r=0,u=h.length;u>r;r++){var o=h[r],c=o.bounds,d=h[r-1]&&h[r-1].bounds||t;if(l){var f=s==n.TOP?d.y-c.height:d.y+d.height;o.bounds=i.makeBounds(d.x,f,d.width,c.height)}else{var p=s==n.LEFT?d.x-c.width:d.x+d.width;o.bounds=i.makeBounds(p,d.y,c.width,d.height)}o.fixScaleAndTickData()}}},getAxis:function(t){return t>=this._axisList.length&&(t=0),this._axisList[t]},getAxisCount:function(){return this._axisList.length},axisZoom:function(t,e){this._axisList.forEach(function(i){i.axisZoom(t,e) +})},dealOnZero:function(){this._axisList.forEach(function(t){t.dealOnZero()})},updateAxisBounds:function(){this._axisList.forEach(function(t){t.updateAxisBounds()})},render:function(){for(var t=0,e=this._axisList.length;e>t;t++){this._axisList[t].render()}},remove:function(){for(var t=0,e=this._axisList.length;e>t;t++){this._axisList[t].remove()}}});return r.register(r.X_AXIS_COMPONENT,l),r.register(r.Y_AXIS_COMPONENT,l),l}),define("component/GaugeAxis",["require","../Constants","./Axis","../ComponentLibrary"],function(t){var e=(t("../Constants"),t("./Axis")),i=t("../ComponentLibrary"),n=e.extend({initAttributesWithSeries:function(){for(var t=this._axisList.length,e=t-1; +e>=0;e--){var i=this._axisList[e];i.calculateDomainFromData(),i.scale.domain(i._domain),i._updateOriginTickData(),i.options.showLabel||i.tickData.forEach(function(t){t.tickContent=""})}},doLayout:function(){},render:function(){}});return i.register(i.GAUGE_AXIS_COMPONENT,n),n}),define("component/LegendItem",["require","../dom/Evented","../Constants","../utils/BaseUtils","./LegendIconFactory","../ComponentLibrary"],function(t){var e=t("../dom/Evented"),i=t("../Constants"),n=t("../utils/BaseUtils"),r=t("./LegendIconFactory"),a=(t("../ComponentLibrary"),4),o=function(){return n.paddingConvertWithScale(a) +},s=0.2,h=e.extend({initialize:function(t,e){this.legendX=0,this.legendY=0,this.legend=t,this.state=i.STATE_SHOW,this.refresh(e)},refresh:function(t){this.options=t,t.renderItem=this},render:function(){var t=this.legend,e=t.vanchart,a=e.renderer,h=t.options.style;this.graphic||(this.graphic=t.legendItemsGroup.append(a.group()),this.options.isTrendLine||this.graphic.style({cursor:"pointer"})),e.registerInteractiveTarget(this,this.graphic);var l=this.graphic,u=this.options,c=u.visible?u.color:u.hiddenColor,d=r.getLegendIconSize(u.legendIconType),f=n.getTextDimension(u.itemName,h,t.options.useHtml),p=t.lineHeightMap&&t.lineHeightMap[this.lineIndex]||Math.max(d.height,f.height); +this.graphic.attr({transform:n.makeTranslate([this.legendX,Math.round(this.legendY+p/2)])}),r.hasIcon(u.legendIconType)?(l.image&&l.image.remove(),l.image=null,l.path=l.path||a.path().addTo(l),l.path.attr("d",r.getLegendIconPath(u.legendIconType)).attr("transform",n.makeTranslate([0,-d.height/2])).style({fill:c,"fill-opacity":u.opacity}),u.series.type==i.BUBBLE_CHART&&l.path.style("stroke",c).style("stroke-width",1)):(l.path&&l.path.remove(),l.path=null,l.image=l.image||a.image().addTo(l),l.image.attr({x:0,y:-d.height/2,width:12,height:12,preserveAspectRatio:"none"}).imageContent(u.legendIconType)); +var g=n.isSupportSVG()?{dy:"0.32em"}:{};l.text&&l.text.remove(),l.text=null,l.text=l.append(a.vtext()),l.text.style({cursor:this.options.isTrendLine?"default":"pointer","white-space":"nowrap"}).style(h).style({fill:u.visible?h.color:u.hiddenColor});var m=0;l.text.spans=this.labels.map(function(e){l.text.append(a.vtspan().attr("y",m).style("margin-top","-0.7em").attr(g).attr("x",d.width+o()).textContent(e)),m+=t.textHeight*(1+s)})},_isCorrespondingSeriesLarge:function(){return this.options.series.options.large +},_getCorrespondingSeriesType:function(){return this.options.series.type},getEvents:function(){var t,e=this._isCorrespondingSeriesLarge()&&i.LARGE_CHART_TYPE[this._getCorrespondingSeriesType()];return t=this.options.isTrendLine?{}:e?{tap:this.onTap}:{mouseover:this.onMouseOver,mouseout:this.onMouseOut,tap:this.onTap}},onMouseOver:function(){this.legend.options.hover?n.getFormatterFunction(this.legend.options.hover)():(this.graphic&&this.graphic.text&&this.graphic.text.style({fill:this.options.hoverColor}),this.legend.options.highlight&&(this.legend.highlighted=!0,this.legend.vanchart.makeLegendHighlight(this.options.itemName))),this.legend.fire("mouseover") +},onMouseOut:function(t){var e=this,i=e.legend,n=e.options,r=n.visible?i.options.style.color:n.hiddenColor;this.graphic&&this.graphic.text&&this.graphic.text.style({fill:r}),this.legend.fire("mouseout")},onTap:function(){return this.legend.options.click?void n.getFormatterFunction(this.legend.options.click)():(this.legend.switchSeriesItemVisible(this.options.bindName,this),this.legend.vanchart.reRenderWholePlot(),void this.resetState())},resetState:function(){this.state=this.state==i.STATE_TO_SHOW?i.STATE_SHOW:this.state,this.state=this.state==i.STATE_TO_DROP?i.STATE_DROPPED:this.state +},remove:function(){this.graphic&&this.graphic.remove(),this.graphic=null}});return h}),define("component/Legend",["require","./Base","../utils/BaseUtils","../Constants","./LegendIconFactory","./LegendItem","../dom/Evented","../utils/BezierEasing","../ComponentLibrary","../chart/gantt/Scrollbar","../dom/DomUtils"],function(t){var e=t("./Base"),i=t("../utils/BaseUtils"),n=t("../Constants"),r=t("./LegendIconFactory"),a=t("./LegendItem"),o=t("../dom/Evented"),s=t("../utils/BezierEasing"),h=t("../ComponentLibrary"),l=t("../chart/gantt/Scrollbar"),u=t("../dom/DomUtils"),c=4,d=function(){return i.paddingConvertWithScale(c) +},f=4,p=function(){return i.paddingConvertWithScale(f)},g=12,m=10,v=function(){return i.paddingConvertWithScale(m)},_=0.2,y=0.6,x=120,T=function(){return i.paddingConvertWithScale(x)},b="rgb(67,67,72)",A="rgb(204,204,204)",C=e.extend({isFlowBottom:function(){return this.vanchart.isMobileFlow()&&"bottom"===this.options.position},doLayout:function(){return this.items=this.items||[],this.invisible()?void this.remove():(this.yPanEnabled=!1,this.hasPages=!1,this._updateLegendItems(),void this._layoutLegendItemBounds()) +},_updateLegendItems:function(){var t,e,i=this.vanchart.series,o={},s={},h=this,l=this.vanchart,u=[],c=l.isLargeMode(),d=l.chartType()===n.POINT_MAP,f={};for(t=-1;++tt;t++){var g=i[t],m=g.type;if(m!=n.GAUGE_CHART){if(g.isSeriesAccumulated()){var v=m===n.PIE_CHART?"x":"name",_={}; +g.options.data.forEach(function(t,e){_[t[v]]=e});var y=g.points.slice().sort(function(t,e){return _[t[v]]-_[e[v]]});y.map(function(t){var e=h._itemBindName(t);if(!o[e]){var i={color:l.getDefaultSeriesColor(e),opacity:f[e].useSerOpacity?f[e].opacity:1,bindName:e,itemName:e,visible:t.visible};h._mergeCommonLegendAttr(g,i),o[e]=!0,u.push(i)}})}else{var x;o[g.name]||(x={color:g.color,opacity:g.opacity,bindName:g.name,itemName:g.name,visible:g.visible},h._mergeCommonLegendAttr(g,x),o[g.name]=x,u.push(x)),g.options.trendLine&&!s[g.name]&&(x={isTrendLine:!0,color:g.options.trendLine.color,opacity:g.opacity,bindName:g.name,itemName:g.options.trendLine.name,visible:g.visible},h._mergeCommonLegendAttr(g,x),x.legendIconType=n.NULL_MARKER,o[g.name].pairLegendOpt=x,x.pairLegendOpt=o[g.name],s[g.name]=x,u.push(x)) +}}}for(t=u.length,e=this.items.length;e>t;t++){this.items[t].remove(),this.items[t]=null}for(t=0,e=u.length;e>t;t++){c&&d&&!r.hasIcon(u[t].legendIconType)&&(u[t].legendIconType="scatter-legend-iconcircle"),this.items[t]?this.items[t].refresh(u[t]):this.items[t]=new a(h,u[t])}this.items.length=u.length},_mergeCommonLegendAttr:function(t,e){var n=this.options,r=n.hiddenColor,a=n.hoverColor||n.style.color;i.extend(e,{series:t,hiddenColor:r,hoverColor:a,legendIconType:this._getLegendType(t),lineIndex:0}) +},_layoutLegendItemBounds:function(){var t=this.options,e=t.position||n.RIGHT;if(this.items.length){if(this.textHeight=i.getTextHeight(t.style),e===n.TOP||e===n.BOTTOM){this._layoutHorizontalLegendItemBounds(e)}else{var r=0;if((e===n.RIGHT||e===n.RIGHT_TOP)&&!this.isFloat){var a=this.vanchart.getComponent(h.TOOLBAR_COMPONENT);a&&0!=a.options.hidden&&(r=37+2*d())}this._layoutVerticalLegendItemBounds(e,r)}}},_layoutVerticalLegendItemBounds:function(t,e){for(var a=this._maxWidth(),o=this.options.style,s=0,h=d(),l=this.options.borderWidth||0,u=0,c=this.items.length; +c>u;u++){var f=this.items[u],g=f.options,m=r.getLegendIconSize(g.legendIconType),v=a-p()-m.width-2*d(),x=this._getTextUsedWidth(g.itemName,o,v);s=Math.max(x+p()+m.width,s),f.labels=i.splitText(g.itemName,o,v,0,!1),f.legendX=d()+l/2,f.legendY=h,h+=Math.max(this.textHeight*f.labels.length+this.textHeight*_*(f.labels.length-1),m.height)+y*this.textHeight}h-=y*this.textHeight;var T=2*d()+s,b=h+d(),A=this.vanchart.bounds.height-(this.isFloat?0:2*d());A-=Math.max(0,e-this.vanchart.bounds.y),this.yPanEnabled=this.hasPages=Math.abs(0-a)<0.000001?!1:b-d()>A,this.vanchart.isMobileFlow()&&(this.hasPages=!1,this.maxYPan=Math.min(0,A-(b-d()))),this.hasPages&&(this._calculatePagesTransMap(A),T=Math.max(T,this._getPageButtonWidth(this.pageCount)),this.maxYPan=this.translateMap[this.translateMap.length-1]); +var C=(T>a?a:T)+(this.isFloat?0:2*d());this._setComponentBounds(t,C);var L=this.bounds.x+(this.isFloat?0:d()),M=this.bounds.y+(this.isFloat?0:d()),P=this.bounds.width-(this.isFloat?0:2*d()),w=this.bounds.height-(this.isFloat?0:2*d());w-=Math.max(0,e-this.vanchart.bounds.y);var S=Math.min(b,w);M=Math.max(e,M),this.isFloat||t!=n.RIGHT_BOTTOM?this.isFloat||t!=n.RIGHT&&t!=n.LEFT||(M+=Math.round((w-S)/2)):M=Math.round(this.bounds.y+this.bounds.height-S-d()),this.bounds={x:L,y:M,width:Math.max(0,P),height:Math.max(0,S)} +},_calculatePagesTransMap:function(t){t-=g+d(),this.pageIndex=this.pageIndex||0,this.translateMap=[0];for(var e=0,i=0,n=this.items.length;n>i;i++){var r=this.items[i].legendY;r-e>t&&(e=r-y*this.textHeight,this.translateMap.push(-r))}return this.pageCount=this.translateMap.length,t},_getPageButtonWidth:function(t){var e={fontFamily:this.options.style.fontFamily||"Verdana",fontSize:"14px"},n=t+"/"+t,r=i.getTextDimension(n,e,!1);return 2*g+r.width},_getTextUsedWidth:function(t,e,n){var r=i.getTextDimension(t,e,!1); +return n&&ne;e++){o=this.items[e].options,s=r.getLegendIconSize(o.legendIconType),h=i.getTextDimension(o.itemName,u,!1);var x=s.width+p()+h.width;g=Math.max(g,x),m+=x+v()}m-=v();var b=!1;this.isFlowBottom()&&(b=c>=m,f=m);var A=!this.isFlowBottom()&&m>=f;this.lineHeightMap={};var C=0,L=d();if(A){var M=Math.floor((f+v())/(Math.min(g,T())+v())); +M=Math.min(M,this.items.length);var P=Math.round((f+v())/M),w=!1;A=this.items.length>M;var S=-1;for(e=0,n=this.items.length;n>e;e++){a=this.items[e],o=a.options,s=r.getLegendIconSize(o.legendIconType);var E=P-p()-s.width-v();a.labels=i.splitText(o.itemName,u,E,0,!1),w=w||a.labels.length>1,e%M===0&&(L+=C,C=0,S++,this.lineHeightMap[S]=0),a.legendX=d()+e%M*P,a.legendY=L,a.lineIndex=S,C=Math.max(C,Math.max(this.textHeight*a.labels.length+this.textHeight*_*(a.labels.length-1),s.height)+y*this.textHeight),this.lineHeightMap[S]=Math.max(this.lineHeightMap[S]||0,this.textHeight,s.height) +}}else{var O=0;for(e=0,n=this.items.length;n>e;e++){a=this.items[e],o=a.options,s=r.getLegendIconSize(o.legendIconType),h=i.getTextDimension(o.itemName,u,!1),a.labels=[o.itemName],a.legendX=d()+O,a.legendY=L,a.lineIndex=0,O=a.legendX+s.width+p()+h.width+v(),C=Math.max(C,Math.max(this.textHeight*a.labels.length+this.textHeight*_*(a.labels.length-1),s.height)+y*this.textHeight),this.lineHeightMap[0]=Math.max(this.lineHeightMap[0]||0,this.textHeight,s.height)}this._innerWidth=O-v()}L+=C-y*this.textHeight; +var R=Math.round(L)+d(),k=this._maxHeight();this.yPanEnabled=k>=0&&R>k,this.maxYPan=-R+k;var D=(this.yPanEnabled?k:R)+2*d();this._setComponentBounds(t,D);var I=this.bounds.x+d(),B=this.bounds.y+d(),N=this.bounds.height-2*d()+2*(this.options.borderWidth||0),G=this.bounds.width-2*d()+2*(this.options.borderWidth||0),F=f+2*d();this.isFlowBottom()?b?(F=this._horizontalCenterLayout(u),I+=(G-F)/2):F=c:w||A||(F=this._horizontalCenterLayout(u),I+=(G-F)/2),this.bounds={x:I,y:B,width:Math.max(0,F),height:Math.max(0,N)} +},_horizontalCenterLayout:function(t){for(var e=d(),n=0,a=this.items.length;a>n;n++){var o=this.items[n],s=o.options;o.legendX=e,e+=r.getLegendIconSize(s.legendIconType).width,e+=p(),e+=i.getTextDimension(s.itemName,t,!1).width,e+=v()}return e+d()-v()},render:function(){if(this.invisible()||!this.items.length){return this.legendGroup&&this.legendGroup.remove(),void (this.legendGroup=null)}var t=this.bounds,e=this,r=e.vanchart,a=r.renderer;this.legendGroup||(this.legendGroup=this.createComponentGroup(),this.backgroundGroup=a.group().addTo(this.legendGroup),this.clipGroup=a.group().addTo(this.legendGroup),this.legendItemsGroup=a.group().addTo(this.clipGroup),r.registerInteractiveTarget(this,this.legendGroup)),this.legendGroup.attr("transform",i.makeTranslate(t)); +var o=this.options.position;o===n.TOP||o===n.BOTTOM?0===parseFloat(this.options.maxHeight)&&(this.options.borderWidth=0):0===parseFloat(this.options.maxWidth)&&(this.options.borderWidth=0),r._renderRectangleBackground(this.backgroundGroup,this.options,i.makeBounds(0,0,t.width,t.height));for(var s=0,h=this.items.length;h>s;s++){this.items[s].render()}var l={x:0,y:0,width:t.width,height:t.height};e._buildScrollbar(),this.hasPages?(l.height=Math.max(0,l.height-g),this.pageButton=this.pageButton||new L(e),this.pageButton.refresh()):this.pageButton&&(this.pageButton.remove(),this.pageButton=null),this.verticalClip?(i.isSupportSVG()&&this.verticalClip.rect.rawElement.height.baseVal.value!==l.height&&this.resetLegendScroll(),a.updateClip(this.verticalClip,l)):(this.verticalClip=a.createClip(l),a.clip(this.clipGroup,this.verticalClip)),r._changeDataState&&this.resetLegendScroll() +},_buildScrollbar:function(){var t=this;if(t.scrollbar&&t.scrollbar.remove(),this.vanchart.isMobileFlow()){var e=4,i="rgba(61,77,102,0.3)",n="rgba(61,77,102,0.1)",r="rgba(61,77,102,0.03)",a={backgroundSize:e,backgroundColor:r,backgroundStroke:"none",barColor:n,barHoverColor:i,barSize:e};this.isFlowBottom()&&this._innerWidth>t.bounds.width?t.scrollbar=new l({scrollX:!0,scrollY:!1,view:t,group:t.legendGroup,width:t.bounds.width,height:t.bounds.height+e,innerWidth:this._innerWidth,barStyle:a}):t.yPanEnabled&&t.maxYPan&&(t.scrollbar=new l({scrollX:!1,scrollY:!0,view:t,group:t.legendGroup,width:t.bounds.width+e,height:t.bounds.height,innerHeight:t.bounds.height-t.maxYPan,barStyle:a})) +}else{t.yPanEnabled&&t.maxYPan&&(t.scrollbar=new l({scrollX:!1,scrollY:!0,view:t,group:t.legendGroup,width:t.bounds.width,height:t.bounds.height,innerHeight:t.bounds.height-t.maxYPan}),t.scrollbar.on("scrollY",this.onScrollY,this))}},getEvents:function(){return{wheel:this.onWheel,mouseout:this.mouseOut,mouseover:this.mouseOver,panstart:this.onPanStart,panmove:this.onPanMove,panend:this.onPanEnd}},mouseOut:function(){this.highlighted&&this.vanchart.cancelLegendHighlight()},mouseOver:function(){},onWheel:function(t){var e=t.srcEvent; +u.preventDefault(e),this.moveLegendY(u.getWheelDelta(e))},onPanStart:function(t){this.currentX=t.containerPoint.x,this.currentY=t.containerPoint.y,this.vanchart.isMobileFlow()&&this.scrollbar&&this.scrollbar.show(!0)},onPanMove:function(t){var e=t.containerPoint.x-this.currentX,i=t.containerPoint.y-this.currentY;this.isFlowBottom()?this.moveLegendX(e):this.moveLegendY(i),this.currentX=t.containerPoint.x,this.currentY=t.containerPoint.y},onPanEnd:function(){this.vanchart.handler.panTarget=null,this.vanchart.isMobileFlow()&&this.scrollbar&&this.scrollbar.show(!1) +},onScrollY:function(t){var e=t.y-(this.legendItemsGroup.currentY||0);this.moveLegendY(e)},moveLegendX:function(t){if(this._innerWidth>this.bounds.width){var e=this.legendItemsGroup.__movedX||0;e+=t,e=Math.max(this.bounds.width-this._innerWidth,Math.min(e,0)),this.legendItemsGroup.__movedX=e,this.legendItemsGroup.attr("transform",i.makeTranslate([e,0])),this.fire("innerChange",{x:e,y:0})}},moveLegendY:function(t){var e=0;if(this.yPanEnabled&&(e=t+(this.legendItemsGroup.currentY||0),e=Math.max(this.maxYPan,Math.min(0,e))),this.hasPages&&this.pageButton){for(var n=this.translateMap.length-1,r=0,a=this.translateMap.length-1; +a>r;r++){var o=this.translateMap[r],s=this.translateMap[r+1];o>=e&&e>s&&(n=r)}this.pageIndex!=n&&(this.pageIndex=n,this.pageButton.updatePage())}this.legendItemsGroup.currentY=e,this.legendItemsGroup.attr("transform",i.makeTranslate([0,this.legendItemsGroup.currentY])),this.fire("innerChange",{x:0,y:e})},resetLegendScroll:function(){this.legendItemsGroup.currentY=0,this.legendItemsGroup.attr("transform","translate(0,0)"),this.hasPages&&this.pageButton&&0!==this.pageIndex&&(this.pageIndex=0,this.pageButton.updatePage()) +},remove:function(){this.legendGroup&&this.legendGroup.remove(),this.verticalClip&&this.verticalClip.remove&&this.verticalClip.remove(),this.legendGroup=this.verticalClip=null,this.items&&(this.items.length=0)},_itemBindName:function(t){var e=t.series;return e.isSeriesAccumulated()?t.name:e.name},reShowPoint:function(t){var e=this._itemBindName(t);return this._stateName(e,n.STATE_TO_SHOW)},showSeries:function(t){return this._stateName(t.name,n.STATE_SHOW)},toDropSeries:function(t){return this._stateName(t.name,n.STATE_TO_DROP) +},_stateName:function(t,e){for(var i=0,n=this.items.length;n>i;i++){var r=this.items[i];if(r.state==e&&r.options.bindName==t){return !0}}return !1},isPanMovingAtTheBoundary:function(t){var e=t.direction,i=this.legendItemsGroup.currentY,r=this.maxYPan,a=e===n.DIRECTION_UP,o=e===n.DIRECTION_DOWN;return this.hasPages&&(a||o)?a&&i===r||o&&0===i:!1},contains:function(t){var e=this.bounds;return e&&i.containsPoint(this.scrollbar?{x:e.x,y:e.y,width:e.width-12,height:e.height}:e,t)},switchSeriesItemVisible:function(t,e){for(var r=function(t,e){var i=t.children; +if(i&&i.length){for(var n=0,a=i.length;a>n;n++){i[n].visible=e,r(i[n],e)}}},a=this,o=this.vanchart.series,s={},l=0,u=o.length;u>l;l++){var c=o[l];c.isSeriesAccumulated()?c.points.map(function(i){a._itemBindName(i)==t&&(i.visible=!i.visible,c.type===n.MULTIPIE_CHART&&r(i,i.visible),e&&(e.state=i.visible?n.STATE_TO_SHOW:n.STATE_TO_DROP))}):c.name===t&&(c.visible=!c.visible,e&&(e.state=c.visible?n.STATE_TO_SHOW:n.STATE_TO_DROP),c._getAxisTypes().forEach(function(t){var e=c[t];!e||e._isBaseAxis()||s[i.stamp(e)]||(s[i.stamp(e)]=!0,e.calculateDomainFromData(),e.componentType===h.X_AXIS_COMPONENT||e.componentType===h.Y_AXIS_COMPONENT?e.adjustDomain4Radius():e.fixScaleAndTickData()) +}))}e&&(e.options.visible=!e.options.visible,e.options.pairLegendOpt&&(e.options.pairLegendOpt.visible=e.options.visible,e.options.pairLegendOpt.renderItem.render(),e.options.pairLegendOpt.renderItem.onMouseOut()))}}),L=o.extend({initialize:function(t){this.legend=t},refresh:function(){var t=this.legend,e=t.vanchart,n=e.renderer,r=t.bounds,a=t._getPageButtonWidth(t.pageCount),o=r.height,s=o-g,h=(r.width-a)/2;this.pageGroup||(this.pageGroup=n.group().addTo(t.legendGroup),e.registerInteractiveTarget(this,this.pageGroup),this.leftButton=n.path().style({cursor:"pointer"}).addTo(this.pageGroup),this.rightButton=n.path().style({cursor:"pointer"}).addTo(this.pageGroup),this.pageText=n.text().style({fontFamily:t.options.style.fontFamily||"Verdana",fontSize:"14px"}).addTo(this.pageGroup)); +var l=a-g,u=h+(a-l)/2,c=h+(a+l)/2,d=h+a/2;this.pageGroup.attr("transform",i.makeTranslate([0,s])),this.leftButton.attr("d",this._prePageButtonPath(u)),this.rightButton.attr("d",this._nextPageButtonPath(c)),this.pageText.attr({x:d,y:"-.14em",dy:".85em"}).attr("text-anchor","middle"),this.updatePage()},remove:function(){this.pageGroup&&(this.pageGroup.remove(),this.pageGroup=null)},updatePage:function(){var t=this.legend,e=t.pageIndex,i=t.pageCount;this.leftButton.style({fill:0>=e?A:b}),this.rightButton.style({fill:i-1>e?b:A}); +var n=e+1+"/"+i;this.pageText.textContent(n),this.pageText.vMiddle()},_prePageButtonPath:function(t){var e=12,i=0,n=t-e/2,r=e/2*Math.sqrt(3),a=t+e/2,o=r;return"M"+t+","+i+"L"+n+","+r+"L"+a+","+o+"Z"},_nextPageButtonPath:function(t){var e=12,i=0,n=t-e/2,r=i,a=t+e/2,o=i,s=t,h=e/2*Math.sqrt(3);return"M"+n+","+r+"L"+a+","+o+"L"+s+","+h+"Z"},onTap:function(t){var e=t.srcEvent,i=e.target||e.srcElement,n=this.legend;if(this.leftButton.node()==i){if(n.pageIndex<=0){return}n.pageIndex--}else{if(this.rightButton.node()==i){if(n.pageIndex==n.pageCount-1){return +}n.pageIndex++}}var r=n.translateMap[n.pageIndex];n.legendItemsGroup.animate({duration:500,ease:s.css.swing,attr:{transform:"translate(0,"+r+")"}}),n.legendItemsGroup.currentY=r,n.fire("innerChange",{x:0,y:r}),this.updatePage()},getEvents:function(){return{tap:this.onTap}}});return h.register(h.LEGEND_COMPONENT,C),C}),define("component/Zoom",["require","./Base","../utils/BaseUtils","../Constants","../ComponentLibrary","../utils/Scale","../utils/PathGenerator","../ComponentLibrary"],function(t){var e=t("./Base"),i=t("../utils/BaseUtils"),n=t("../Constants"),r=t("../ComponentLibrary"),a=t("../utils/Scale"),o=t("../utils/PathGenerator"),s=30,h=10,l=10,u=25,c="none",d="left-to-right",f="right-to-left",p=1e-7,g=4,m=function(){return i.paddingConvertWithScale(g) +},v=e.extend({_refresh:function(){this.rangeLeftTop=this.rangeRightBottom=null},doLayout:function(){this.byAxisType=this.vanchart.chartType()==n.BAR_CHART?"yAxis":"xAxis",this.byAxis=this.vanchart[this.byAxisType](),!this.vanchart.components[r.DATA_SHEET_COMPONENT]&&this.calcZoomControlsSize()},fixBoundsByPlot:function(){if(this.zoomToolEnabled()){for(var t,e=this.vanchart.components[this.byAxisType],r=e.getAxisCount(),a=0;r>a;a++){var o=e.getAxis(a),s=o.getPosition();(s==n.BOTTOM||s==n.LEFT)&&(t=o) +}t=t||this.byAxis;var h=this.vanchart.bounds;t.isHorizontal()?this.bounds=i.makeBounds(h.x,this.bounds.y,h.width,this.bounds.height):this.bounds=i.makeBounds(this.bounds.x,h.y,this.bounds.width,h.height)}},initToolDomain:function(t){var e=this.options.zoomTool;e.from=i.hasDefined(e.from)&&""!==e.from?e.from:null,e.to=i.hasDefined(e.to)&&""!==e.to?e.to:null,t.type===r.DATE_AXIS_COMPONENT&&(e.from=null==e.from?e.from:i.date2int(i.object2date(e.from)),e.to=null==e.to?e.to:i.date2int(i.object2date(e.to))),t.type===r.CATEGORY_AXIS_COMPONENT&&t.isMultiCateAxis()&&(e.from=i.encodeCategoryArray(e.from),e.to=i.encodeCategoryArray(e.to)) +},getZoomInitDomain:function(t){var e=this.byAxis;if(this.zoomToolEnabled()&&e&&e._isBaseAxis()&&t==e){var i=this.options.zoomTool;return this.initToolDomain(e),[i.from,i.to]}},getZoomDomain:function(t){var e=this.byAxis,n=t.isCategory()?e._dataDomain:e._domain;if(this.zoomToolEnabled()&&e._isBaseAxis()&&t==e){var r=this.options.zoomTool;this.initToolDomain(e);var a=i.pick(this.rangeLeftTop,r.from,n[0]),o=i.pick(this.rangeRightBottom,r.to,n[n.length-1]);return this._getValidDomain(a,o,n,e.isCategory()) +}},getMinAndMaxPos:function(){var t=this.getZoomDomain(this.byAxis),e=this.axisScale,i=e(t[0]),n=e(t[t.length-1]);return[Math.min(i,n),Math.max(i,n)+(e.rangeBand?e.rangeBand()-p:0)]},updateRangeLeftAndRight:function(t,e,n){var r=i.indexOf(e,this.rangeLeftTop),a=i.indexOf(e,this.rangeRightBottom),o=n.slice(Math.min(r,a),Math.max(r,a)+1);t.isAxisReversed()^t.isHorizontal()?(this.rangeLeftTop=o[0],this.rangeRightBottom=o[o.length-1]):(this.rangeLeftTop=o[o.length-1],this.rangeRightBottom=o[0])},_getValidDomain:function(t,e,n,r){var a; +if(r){var o=n.length-1,s=0;return t=i.indexOf(n,t),e=i.indexOf(n,e),t=Math.min(Math.max(t,s),o),e=Math.min(Math.max(e,s),o),t>e&&(a=e,e=t,t=a),n.slice(t,e+1)}return t=parseFloat(t),e=parseFloat(e),t>e&&(a=e,e=t,t=a),[t,e]},zoomToolEnabled:function(){var t=this.options;return this.vanchart.series.length&&t&&t.zoomTool&&t.zoomTool.enabled&&i.isSupportSVG()},calcZoomControlsSize:function(){if(!this.zoomToolEnabled()){return !1}var t=this.vanchart.getComponent(r.DATA_SHEET_COMPONENT),e=this.vanchart.bounds,i=this.byAxis.isHorizontal(),a=m(),o=i?e.height:e.width,c=(o-2*a)/22.3; +s=l>c?l:c>u?u:0|c,h=Math.ceil(s/3),this._setComponentBounds(i?n.BOTTOM:n.LEFT,s+2*a),i?(this.bounds.y+=a+t&&t.bounds?t.bounds.height:0,this.bounds.height-=2*a):(this.bounds.x+=a,this.bounds.width-=2*a)},_getAxisScale:function(){var t=this.byAxis,e=t.scale.copy();if(t.type==r.CATEGORY_AXIS_COMPONENT){e.rangeBand?e.rangeBands(t._getPlotRange()):e.range(t._getPlotRange())}else{var i=t._dataDomain,n=this.getZoomDomain(t),a=Math.min(i[0],n[0]),o=Math.max(i[1],n[1]);e.domain([a,o])}return e},render:function(){if(this.remove(),!this.zoomBarGroup&&this.zoomToolEnabled()){this.axisScale=this._getAxisScale(); +var t=this,e=t.bounds,n=t.vanchart,r=(n.renderer,this.getMinAndMaxPos()),a=this.byAxis.isVertical(),o=r[0],s=r[1];this.zoomBarGroup||(this.zoomBarGroup=this.createComponentGroup().attr("transform",i.makeTranslate(e)).style("cursor",a?"ns-resize ":"ew-resize"),n.registerInteractiveTarget(this,this.zoomBarGroup)),this._createLines(),this.leftTopRect=this._createSideRect(a,o,!0),this.rightBottomRect=this._createSideRect(a,s,!1),this.centerRect=this._createCenterRect(a,o,s),this.leftTopButton=this._createButton(a,o,!0),this.rightBottomButton=this._createButton(a,s,!1); +var l=this.leftTopButton.pos,u=this.rightBottomButton.pos;this.rangeLeftTop=this._getValueByPosition(l),this.rangeRightBottom=this._getValueByPosition(u+h)}},_createLines:function(){var t=this.axisScale,e=this.byAxisType,n=this.vanchart,h=n.renderer,l=(n.series,t.rangeBand?t.rangeBand()/2:0),u=n.cateMap,c=[],d=Number.MAX_VALUE,f=-Number.MAX_VALUE,p=this.byAxis.isHorizontal(),g=this.byAxis.type===r.DATE_AXIS_COMPONENT;for(var m in u){var v=u[m];if(v[0].series[e]){var _=0;v.forEach(function(t){_+=+t.getTargetValue()||0 +})}v[0].isNull||c.push({x:t(g?i.date2int(i.object2date(m)):m)+l,y:_}),d=Math.min(d,_),f=Math.max(f,_)}var y=p?[s,0]:[0,s],x=a.linear().domain([d,f]).range(y),T=o.line().interpolate("linear").x(function(t){return p?t.x:x(t.y)}).y(function(t){return p?x(t.y):t.x});c.sort(function(t,e){return t.x-e.x}),this._line=this._line||h.path().style({fill:"none",stroke:"black","stroke-width":1}),this._line.attr("d",T(c)).addTo(this.zoomBarGroup),this._innerClip(this._line)},_createSideRect:function(t,e,i){var n=this.vanchart.renderer,r="x",a="y",o="width",h="height",l=this.bounds.width; +t&&(r="y",a="x",o="height",h="width",l=this.bounds.height);var u,c;return i?(u=0,c=e):(u=e,c=Math.abs(l-u)),n.rect().attr(r,u).attr(a,0).attr(o,c).attr(h,s).style({fill:"rgba(220,221,221,0.4)"}).addTo(this.zoomBarGroup)},_createCenterRect:function(t,e,i){var n=this.vanchart.renderer,r="x",a="y",o="width",l="height";return t&&(r="y",a="x",o="height",l="width"),n.rect().attr(r,e+h).attr(a,0).attr(o,i-e-2*h).attr(l,s).style({fill:"rgba(255,255,255,0)",stroke:"#29ABE2","stroke-width":1}).addTo(this.zoomBarGroup) +},_createButton:function(t,e,i){e=i?e:e-h;var n,r=this.vanchart.renderer,a=r.group().attr("transform",this._getButtonTranslate(t,e)),o={fill:"#FFFFFF",stroke:"#7ADAF4","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round","stroke-miterlimit":10};n=i?t?this.buttonPathGenerator(s,h,h/3,[0,0,1,1]):this.buttonPathGenerator(h,s,h/3,[0,1,1,0]):t?this.buttonPathGenerator(s,h,h/3,[1,1,0,0]):this.buttonPathGenerator(h,s,h/3,[1,0,0,1]),r.path().attr("d",n).style({fill:"#29ABE2"}).addTo(a);var l="x1",u="y1",c="x2",d="y2",f=Math.ceil(s/4),p=s-f; +t&&(l="y1",u="x1",c="y2",d="x2");var g=o["stroke-width"]=Math.floor(h/5)||1,m=h>=5,v=m?(h-2*g)/3:(h-g)/2,_=m?(h-2*g)/3*2+g:0;return r.line().attr(l,v).attr(u,f).attr(c,v).attr(d,p).style(o).addTo(a),m&&r.line().attr(l,_).attr(u,f).attr(c,_).attr(d,p).style(o).addTo(a),a.pos=e,a.addTo(this.zoomBarGroup),a},buttonPathGenerator:function(t,e,i,n){function r(t){return t.join(",")}function a(t){var e=o[t],i=s[2*t+1],a="";return a=n[t]?"L"+r(e)+"L"+r(i):"Q"+r(e)+","+r(i),a+"L"+r(s[2*t+2])}var o=[[0,0],[t,0],[t,e],[0,e]],s=[[0,i],[i,0],[t-i,0],[t,i],[t,e-i],[t-i,e],[i,e],[0,e-i],[0,i]],h="M"+r(s[0])+a(0)+a(1)+a(2)+a(3)+"z"; +return h},_findDraggingTarget:function(t){for(var e,i=t.srcEvent,n=i.target||i.srcElement,r=this.byAxis.isHorizontal()?t.containerPoint.x-this.bounds.x:t.containerPoint.y-this.bounds.y,a=this._resizeable();n;){var o=this.leftTopButton.pos-r,s=r-(this.rightBottomButton.pos+h);if(o>0&&10>o&&a&&(e=this.leftTopButton),s>0&&10>s&&a&&(e=this.rightBottomButton),e){break}if(n==this.leftTopButton.node()&&a?e=this.leftTopButton:n==this.rightBottomButton.node()&&a?e=this.rightBottomButton:(n==this.centerRect.node()||n==this.zoomBarGroup.node())&&(e=this.centerRect),e){break +}n=n.parentNode}return e},_panStart:function(t,e){this.target=e||this._findDraggingTarget(t),this.target&&(this.downPos=this.byAxis.isHorizontal()?t.containerPoint.x:t.containerPoint.y,this.initPos=this.target.pos,this.initTranslate=0,this.vanchart._zooming=!0)},_panContainerMove:function(t){if(this.target){var e=this.byAxis.isHorizontal()?t.containerPoint.x:t.containerPoint.y,i=e=0&&this.rightBottomButton.pos+h+n<=i){var s=this.leftTopButton.pos+n;this.leftTopButton.pos=s,this.leftTopButton.attr("transform",this._getButtonTranslate(o,s)),this.leftTopRect.attr(a,s);var l=this.rightBottomButton.pos+n;this.rightBottomButton.pos=l,this.rightBottomButton.attr("transform",this._getButtonTranslate(o,l)),this.rightBottomRect.attr(r,l+h).attr(a,i-(l+h)),this.centerRect.attr(r,s+h)}return this.initTranslate>0?d:f +},_getValueByPosition:function(t){var e=this.byAxis,n=this.axisScale;switch(e.type){case r.CATEGORY_AXIS_COMPONENT:for(var a=n.domain(),o=n.range(),s=0,h=o.length-1;h>s;s++){if(t>=o[s]&&t=o[s+1]){return a[s+1]}}return o[0]>o[o.length-1]?a[0]:a[a.length-1];case r.DATE_AXIS_COMPONENT:return i.date2int(this.axisScale.invert(t));default:return this.axisScale.invert(t)}},_getButtonTranslate:function(t,e){var i=t?[0,e]:[e,0];return"translate("+i+")"},_zoomRefresh:function(t){var e,n=this.leftTopButton.pos,a=this.rightBottomButton.pos+h,o=this._getValueByPosition(n),s=this._getValueByPosition(a),l=this.vanchart,u=this.byAxis,p=u._dataDomain,g=i.indexOf,m=l.getComponent(r.DATA_SHEET_COMPONENT); +if(u.isCategory()){if(t==c){e=this._getValidDomain(o,s,p,!0)}else{var v=g(p,this.rangeLeftTop)-g(p,this.rangeRightBottom);if(v=Math.abs(v)+1,t==d&&s!=this.rangeRightBottom){if(u.isAxisReversed()^u.isHorizontal()){var _=g(p,s),y=_-v+1;o=p[y],s=p[_],e=p.slice(y,_+1)}else{var y=g(p,s),_=y+v-1;o=p[_],s=p[y],e=p.slice(y,_+1)}}else{if(t==f&&o!=this.rangeLeftTop){if(u.isAxisReversed()^u.isHorizontal()){var y=g(p,o),_=y+v-1;o=p[y],s=p[_],e=p.slice(y,_+1)}else{var _=g(p,o),y=_-v+1;o=p[_],s=p[y],e=p.slice(y,_+1) +}}else{o=this.rangeLeftTop,s=this.rangeRightBottom}}}(this.rangeLeftTop!=o||this.rangeRightBottom!=s)&&(this.rangeLeftTop=o,this.rangeRightBottom=s,u.zoomRefresh(e),u.fixScaleAndTickData(),u.render(),m&&m.zoomRefresh(),l.reRenderSeries())}else{e=this._getValidDomain(o,s,p,!1),this.rangeLeftTop=o,this.rangeRightBottom=s,u.zoomRefresh(e),u.fixScaleAndTickData(),u.render(),l.reRenderSeries()}},_panEnd:function(){this.target=null,this.vanchart._zooming=!1},_resizeable:function(){return this.options&&this.options.zoomTool&&this.options.zoomTool.resize +},getEvents:function(){return{panstart:this._panStart,panmove:i.throttle(this._panMove,16,this),panend:this._panEnd}},remove:function(){this.zoomBarGroup&&this.zoomBarGroup.remove(),this.zoomBarGroup=null},isPanMovingAtTheBoundary:function(t){var e=t.direction,i=e===n.DIRECTION_LEFT,r=e===n.DIRECTION_RIGHT,a=e===n.DIRECTION_UP,o=e===n.DIRECTION_DOWN,s=this.byAxis.isHorizontal(),l=this.leftTopButton.pos,u=this.rightBottomButton.pos,c=this.bounds[s?"width":"height"],d=function(t,e){return Math.abs(t-e)<1e-7 +},f=d(l,0),p=d(l,u-h),g=d(u,c-h);if(s){switch(this.target){case this.leftTopButton:return i&&f||r&&p;case this.rightBottomButton:return i&&p||r&&g;case this.centerRect:return i&&f||r&&g}}else{switch(this.target){case this.leftTopButton:return a&&f||o&&p;case this.rightBottomButton:return a&&p||o&&g;case this.centerRect:return a&&f||o&&g}}return !1}});return t("../ComponentLibrary").register(r.ZOOM_COMPONENT,v),v}),define("component/ToolbarIcon",["require","./Base","../utils/BaseUtils","../Constants","../dom/Evented","../locale/localeText"],function(t){function e(){return{fill:"black","fill-opacity":0.05} +}function i(){return{fill:"black","fill-opacity":0.1}}function n(){return{fill:"black","fill-opacity":0}}function r(){return{fill:"black","fill-opacity":0.05}}var a=2,o=32,s=(t("./Base"),t("../utils/BaseUtils")),h=t("../Constants"),l=t("../dom/Evented"),u=t("../locale/localeText").i18nText,c=l.extend({initialize:function(t,e,i,n){this.iconType=t,this.toolbar=e,this.visible=n,this.pos=i,this.currentPos={x:i.x,y:i.y}},render:function(){var t=this.toolbar,i=t.vanchart,r=i.renderer,s=this;this.iconG||(this.iconG=r.group().style({cursor:"pointer"}).addTo(t.toolbarGroup)),i.registerInteractiveTarget(this,this.iconG),this.iconG.attr("transform","translate("+s.pos.x+","+s.pos.y+")").style({display:this.visible?"":"none"}),this.iconG.rect=this.iconG.rect||r.rect().attr("width",o).attr("height",o).attr("rx",a).attr("ry",a).addTo(this.iconG),this.iconG.rect.style(t.hidden?n():e()),this.iconG.path=this.iconG.path||this._getIconPathGraphic(i,r,s) +},_getIconPathGraphic:function(t,e,i){switch(this.iconType){case h.REFRESH_ICON:return e.path().attr("d",i.getRefreshIconPath()).style({fill:"#FF9933"}).addTo(this.iconG);case h.SORT:return t.orderType===h.ASCENDING?e.path().attr("d",i.getDecreaseIconPath()).style({fill:"#33CCFF"}).addTo(this.iconG):e.path().attr("d",i.getIncreaseIconPath()).style({fill:"#33CCFF"}).addTo(this.iconG);case h.EXPORT_ICON:return e.path().attr("d",i.getExportIconPath()).style({fill:"#6666CC"}).addTo(this.iconG);case h.FULL_SCREEN_ICON:return t.vancharts.fullScreenFather?e.path().attr("d",i.getMinIconPath()).style({fill:"#33CC66"}).addTo(this.iconG):e.path().attr("d",i.getMaxIconPath()).style({fill:"#33CC66"}).addTo(this.iconG); +case h.MENU_ICON:return e.path().attr("d",i.getMenuIconPath()).style({"stroke-width":2,stroke:"#AAAAAA"}).addTo(this.iconG)}},refreshMove:function(t,e){var i=this.pos,n=this.currentPos,r=n.x-t,a=r+e;this.iconG.animate({ease:"circle-out",duration:220,attr:{transform:"translate("+r+","+i.y+")"}}).transition({ease:"circle-in",duration:220,attr:{transform:"translate("+a+","+i.y+")"}}),this.currentPos.x=a},refreshMoveWithoutAnimation:function(t,e){var i=this.currentPos.x-t+e;this.iconG.attr("transform","translate("+i+","+this.pos.y+")"),this.currentPos.x=i +},showIcon:function(){this.visible=!0,arguments.length?this._iconAnimation(arguments[0],arguments[1]):this.iconG.style({display:""})},hideIcon:function(){this.visible=!1,arguments.length?this._iconAnimation(arguments[0],arguments[1]):(this.iconG.style({display:"none"}),this.iconG.attr("transform","translate("+this.pos.x+","+this.pos.y+")"),this.currentPos.x=this.pos.x)},_iconAnimation:function(t,i){var r=this.iconG,a=this.pos,o=this.visible;s.isSupportSVG()?s.setTimeout(function(){r.style({display:""}); +var i=4*t,s=a.x-i;r.animate([{ease:"circle-out",duration:100,attr:{transform:"translate("+s+","+a.y+")"}},{ease:"circle-in",duration:100,attr:{transform:"translate("+a.x+","+a.y+")"}}]).each("end",function(){r.style({display:o?"":"none"})}),r.rect.style(o?n():e()).animate({ease:"linear",duration:200,style:o?e():n()})},i):(r.attr("transform","translate("+a.x+","+a.y+")").style({display:o?"":"none"}),r.rect.style(o?e():n())),this.currentPos.x=this.pos.x},onMouseOver:function(){this.iconG.rect.style(this.toolbar.hidden?r():i()); +var t=this.toolbar,e=t.vanchart,n="",a=this;if(t.needTooltip()){switch(a.iconType){case h.REFRESH_ICON:n=u("refresh");break;case h.SORT:n=u("sort");break;case h.EXPORT_ICON:n=u("toImage");break;case h.FULL_SCREEN_ICON:n=u(e.vancharts.fullScreenFather?"fullScreenClose":"fullScreenOpen");break;case h.MENU_ICON:n=u(t.hidden?"menuOpen":"menuClose")}n&&e.showToolbarTooltip(a,n)}},onMouseOut:function(){this.iconG.rect.style(this.toolbar.hidden?n():e()),this.toolbar.vanchart.hideTooltip()},onTap:function(){var t=this.toolbar,e=t.vanchart,i=this,n=e.getDivParentDom(); +switch(e.hideTooltip(),i.iconType){case h.REFRESH_ICON:e.clearAllEffects(),e.refreshRestore(),i.hideIcon();break;case h.SORT:e.orderType=e.orderType===h.ASCENDING?h.DESCENDING:h.ASCENDING,i.updateSortIconPath(),t.refreshEnabled()&&t.refreshIcon.showIcon(),e.orderData();break;case h.EXPORT_ICON:var r=this.toolbar.options.toImage;r&&r.imageUrl&&s.toPng(r.imageUrl);break;case h.FULL_SCREEN_ICON:e.vancharts.fullScreenFather?e.vancharts.hideLightBox(n,e.vancharts.fullScreenFather):e.vancharts.showLightBox(e); +break;case h.MENU_ICON:t.showOrHide()}},updateSortIconPath:function(){this.iconG.path.attr({d:this[this.toolbar.vanchart.orderType===h.ASCENDING?"getDecreaseIconPath":"getIncreaseIconPath"]()})},getEvents:function(){return{mouseover:this.onMouseOver,mouseout:this.onMouseOut,tap:this.onTap}},getMaxIconPath:function(){return"M24,8v6.5L21.5,12l-3,3L17,13.5l3-3L17.5,8H24z M15,18.5l-3,3l2.5,2.5H8v-6.5l2.5,2.5l3-3L15,18.5z"},getMinIconPath:function(){return"M15,17v6.5L12.5,21l-3,3L8,22.5l3-3L8.5,17H15z M24,9.5l-3,3l2.5,2.5H17V8.5l2.5,2.5l3-3L24,9.5z" +},getIncreaseIconPath:function(){return"M8,20h16v2H8V20z M10,16h2v3h-2V16z M13,14h2v5h-2V14z M16,12h2v7h-2V12z M19,9h2v10h-2V9z"},getDecreaseIconPath:function(){return"M8,20h16v2H8V20z M10,9h2v10h-2V9z M13,12h2v7h-2V12z M16,15h2v4h-2V15z M19,16h2v3h-2V16z"},getExportIconPath:function(){return"M22,8H8v16h16V10L22,8z M16,10h2v4h-2V10z M22,22H10V10h1v5h9v-5h1.171L22,10.829V22z"},getRefreshIconPath:function(){return"M21.656,10.344C20.209,8.896,18.209,8,16,8c-3.43,0-6.354,2.158-7.492,5.19l1.873,0.703C11.234,11.619,13.428,10,16,10c1.657,0,3.156,0.672,4.243,1.757L18,14h6V8L21.656,10.344z M16,22c-1.657,0-3.156-0.671-4.243-1.757L14,18H8v6l2.344-2.344C11.791,23.104,13.791,24,16,24c3.43,0,6.354-2.158,7.492-5.19l-1.873-0.703C20.766,20.381,18.572,22,16,22z" +},getMenuIconPath:function(){return"M8,10L24,10 M8,15L24,15 M8,20L24,20"}});return c}),define("component/ToolBar",["require","./Base","../utils/BaseUtils","../utils/QueryUtils","../Constants","./ToolbarIcon","../ComponentLibrary"],function(t){var e=t("./Base"),i=t("../utils/BaseUtils"),n=t("../utils/QueryUtils"),r=t("../Constants"),a=t("./ToolbarIcon"),o=t("../ComponentLibrary"),s=32,h=1,l=5,u=[r.GANTT_CHART,r.TREEMAP_CHART,r.WORD_CLOUD_CHART,r.FUNNEL_CHART,r.STRUCTURE_CHART,r.SCATTER_CHART,r.BUBBLE_CHART,r.FORCE_BUBBLE_CHART,r.AREA_MAP,r.POINT_MAP,r.LINE_MAP,r.HEAT_MAP],c=e.extend({doLayout:function(){var t=this.options,e=t.hidden; +t.tooltip=t.tooltip||{},n.merge(t.tooltip,this.getDefaultToolbarTooltipOption());var i=this.sortEnable()?["sort","toImage","fullScreen"]:["toImage","fullScreen"],o=[r.REFRESH_ICON];i.forEach(function(e){t[e]&&t[e].enabled&&o.push(e)}),e&&o.push(r.MENU_ICON);var u=s+h,c=o.length*u+l;if(this.startX=this.vanchart.width-c,!this.toolbarGroup){this.toolbarIcons=[],this.hidden=e;for(var d=0,f=o.length;f>d;d++){var p={x:d*u,y:l},g=o[d],m=!e;g===r.MENU_ICON?this.menuIcon=new a(g,this,p,!0):g===r.REFRESH_ICON?this.refreshIcon=new a(g,this,p,!1):this.toolbarIcons.push(new a(g,this,p,m)) +}this.isFloat=!0}},sortEnable:function(){var t,e=!0,i=this.vanchart.options,n=i.series;return i.chartType&&(t=i.chartType),n&&n.forEach(function(i){if(i.type){if(t&&t!=i.type){return void (e=!1)}t=i.type}}),e&&-1==u.indexOf(t)},render:function(){this.vanchart.renderer;return this.toolbarGroup?void this.toolbarGroup.attr("transform",i.makeTranslate([this.startX,0])):(this.toolbarGroup=this.createComponentGroup().attr("transform",i.makeTranslate([this.startX,0])),this.toolbarIcons.forEach(function(t){t.render() +}),this.menuIcon&&this.menuIcon.render(),void (this.refreshIcon&&this.refreshIcon.render()))},showOrHide:function(){this.hidden?this.show():this.hide(),this.hidden=!this.hidden},hide:function(){var t,e=this.toolbarIcons,i=e.length,n=[];for(t=0;i>t;t++){n.push(100+80*t)}for(t=0;i>t;t++){var r=i-t;e[t].hideIcon(r,n[t])}var a=4*(i+1),o=4*(i+1)+33*i;this.refreshIcon.visible&&this.refreshIcon.refreshMove(a,o)},show:function(){var t,e=[0],i=this.toolbarIcons,n=i.length;for(t=0;n-1>t;t++){e.push(100+80*t) +}for(t=0;n>t;t++){var r=n-t;i[t].showIcon(r,e[t])}var a=4*(n+1)+33*n,o=4*(n+1);this.refreshIcon.visible&&this.refreshIcon.refreshMove(a,o)},showRefreshIconWhenZoom:function(){if(!this.refreshIcon.visible&&this.refreshEnabled()){if(this.menuIcon){if(this.hidden){var t=this.toolbarIcons.length,e=4*(t+1),i=4*(t+1)+33*t;this.refreshIcon.refreshMoveWithoutAnimation(e,i),this.refreshIcon.showIcon()}else{this.refreshIcon.showIcon()}}else{this.refreshIcon.showIcon()}}},refreshEnabled:function(){return !(this.options.refresh&&this.options.refresh.enabled===!1) +},getToolBarInitWidth:function(){return this.options.enabled?this.options.hidden?s+l:this.toolbarIcons.length*(s+h)-h+l:0},remove:function(){this.toolbarGroup&&this.toolbarGroup.remove(),this.toolbarGroup=null},getDefaultToolbarTooltipOption:function(){return{enabled:!0,content:{menuOpen:"",menuClose:"",sort:"",toImage:"",refresh:"",fullScreenOpen:"",fullScreenClose:""},style:{fontSize:"12pt",fontFamily:"Microsoft Yahei",color:"rgb(255,255,255)"},borderRadius:2,borderWidth:0,backgroundColor:"rgba(0,0,0,.3)",padding:5,animation:!0} +},getToolbarBounds:function(){var t=this.menuIcon?s:0,e=t,i=[this.refreshIcon].concat(this.toolbarIcons);i.forEach(function(i){i.visible&&(t+=s+h),e+=s+h});var n=this.startX+e-t;return{x:n,y:l,width:t,height:s}},calcToolbarTipPos:function(t,e){var i=this.getToolbarBounds(),n=i.x+i.width,r=t.currentPos.x+this.startX,a=i.y+i.height+2*h,o=r+e.width>n?r+s-e.width:r;return[o,a]},needTooltip:function(){var t=this.options;return t&&t.tooltip&&t.tooltip.enabled},getIcon:function(t){for(var e,i,n=-1,r=this.toolbarIcons; +++np;p++){i.push({from:e.accAdd(u,e.accMul(f,d[p-1])),to:e.accAdd(u,e.accMul(f,d[p])),color:s[p-1]})}}else{for(var p=0;a>p;p++){i.push({from:e.accAdd(u,e.accMul(c,a-p-1)),to:e.accAdd(u,e.accMul(c,a-p)),color:s[p]})}}}this.items=this.items||[];for(var g=i.length,m=this.items.length,v=g;m>v;v++){this.items[v].graphic&&this.items[v].graphic.remove(),this.items[v]=null}for(var _=t.formatter,y=0;g>y;y++){var x=this.items[y]||new r(this.getItemEvents());this.items[y]=x;var T=i[y];x.from=T.from,x.to=T.to,x.color=T.color,x.label=this._getIntervalLabelContent(T.from,T.to,_),x.visible=!0,x.hiddenColor=t.hiddenColor,x.hoverColor=t.hoverColor,x.points=[],x.legend=this +}this.items.length=g;var b=this,A=this.vanchart.series;this.items.sort(function(t,e){var i=Math.min(t.from,t.to),n=Math.min(e.from,e.to);return b.isHorizontal()?i-n:n-i});for(var p=0,C=A.length;C>p;p++){var L=A[p],M=L.getTargetKey(),P=L.points;P.forEach(function(t){var e=t[M],i=b._getPointItem(e);i&&(i.points.push(t),t._rangeItem=i)})}},_getMin:function(){if(this.items){var t=this.isHorizontal()?0:this.items.length-1;return this.items[t].from}},_getMax:function(){if(this.items){var t=this.isHorizontal()?this.items.length-1:0; +return this.items[t].to}},_getGradient:function(){if(this.items){for(var t={0:"white"},e=this._getMin(),i=this._getMax(),n=i-e,r=this.items.length-1;r>=0;r--){var a=this.items[r];t[(a.to-e)/n]=a.color}return t}},_getIntervalLabelContent:function(t,i,n){return n?e.format({from:t,to:i},n):t+"-"+i},_getPointItem:function(t){for(var e=0,i=this.items.length;i>e;e++){var n=this.items[e],r=Math.min(n.from,n.to),a=Math.max(n.from,n.to);if(t>=r&&a>=t){return n}}},calculateHorizontalDim:function(){var t=this.items.length,i=0,n=0; +if(t>0){var r=e.getTextDimension(this.items[0].label,this.options.style,this.options.useHtml),a=e.getTextDimension(this.items[t-1].label,this.options.style,this.options.useHtml),o=Math.max(0,r.width-d,a.width-d);i=t*d+(t-1)*p()+o,n=l+2*c()+2*r.height}return{width:i,height:n}},calculateVerticalDim:function(){var t=this.items.length,i=0,n=0,r=this.options.style,a=this;return this.items.forEach(function(t){var o=e.getTextDimension(t.label,r,a.options.useHtml);i=Math.max(i,o.width),n=Math.max(0,o.height-d) +}),{width:i+l+c(),height:t*d+(t-1)*p()+n}},getColorWithSize:function(t){var e=this._getPointItem(t);return e&&e.color},renderBody:function(t,e){this.isHorizontal()?this._renderHorizontalInterval(t,e):this._renderVerticalInterval(t,e)},_renderHorizontalInterval:function(t,i){var n=this.items,r=(i.width-n.length*d-(n.length-1)*p())/2;t.attr("transform",e.makeTranslate([r,h()])),this._absX=i.x+r,this._absY=i.y+h();var a=this.options.style,o=this.vanchart,s=o.renderer,u=this.useHtmlLabel(),f=0,g=this; +n.forEach(function(i,n){i.graphic=i.graphic||t.append(s.vgroup().style({cursor:"pointer"}));var r=i.graphic;o.registerInteractiveTarget(i,u?r.divG:r.renderG);var h=i.label,m=e.getTextDimension(h,a,g.options.useHtml),v=m.height,_=v+c(),y=_+l+c();r.rect=r.rect||r.append(s.rect()),r.rect.style(g._getItemIconStyle(i)).attr("rx",2).attr("ry",2).attr("x",f).attr("y",_).attr("width",d).attr("height",l);var x=f+d/2-m.width/2,T=n%2===0?0:y;g._renderItemLabel(i,r,x,T,m,n),f+=d+p()})},_renderVerticalInterval:function(t,i){var n=this.items,r=this.vanchart,a=(i.height-n.length*d-(n.length-1)*p())/2; +t.attr("transform",e.makeTranslate([h(),a])),this._absX=i.x+h(),this._absY=i.y+a;var o=this.options.style,s=this.vanchart.renderer,u=this.useHtmlLabel(),f=0,g=this;n.forEach(function(i,n){i.graphic=i.graphic||t.append(s.vgroup().style({cursor:"pointer"}));var a=i.graphic;r.registerInteractiveTarget(i,u?a.divG:a.renderG);var h=e.getTextDimension(i.label,o,u);a.rect=a.rect||a.append(s.rect()),a.rect.style(g._getItemIconStyle(i)).attr("rx",2).attr("ry",2).attr("x",0).attr("y",f).attr("width",l).attr("height",d); +var m=Math.round(l+c()),v=Math.round(f+d/2-h.height/2);g._renderItemLabel(i,a,m,v,h,n),f+=d+p()})},_renderItemLabel:function(t,i,n,r,a,o){var s=this,h=s.vanchart,l=h.renderer,u=s.options,c=t.label,d=u.style,f=this.useHtmlLabel(),p=t.visible?d.color:t.hiddenColor;d=e.extend({},d),d.color=p,i.text=i.text||i.append(l.vtext(f)),i.text.textContent(c).attr("dy",".88em").attr("transform",e.makeTranslate({x:n,y:r})).style(d)},_getItemIconStyle:function(t){return{fill:t.visible?t.color:t.hiddenColor,"fill-opacity":1,stroke:"none"} +},getItemEvents:function(){return{mouseover:this.onItemMouseOver,mousemove:this.onItemMouseMove,mouseout:this.onItemMouseOut,tap:this.onItemTap}},onItemMouseOver:function(t){var e=this,i=e.legend,r=e.graphic&&e.graphic.text;i.useHtmlLabel()?r.style("color",n.colorToHex(e.hoverColor)):r.style({fill:e.hoverColor}),this.legend.options.highlight&&(this.legend.highlighted=!0,this.legend.vanchart.makeLegendHighlight(e))},onItemMouseMove:function(t){},onItemMouseOut:function(t){var e=this,i=e.legend,r=i.options,a=e.graphic&&e.graphic.text,o=r.style.color,s=e.visible?o:e.hiddenColor; +i.useHtmlLabel()?a.style("color",n.colorToHex(s)):a.style({fill:s})},onItemTap:function(t){var r=this,a=r.legend,o=a.options,s=a.vanchart;if(o.click){return void e.getFormatterFunction(o.click)()}var h=r.graphic&&r.graphic.text,l=r.graphic&&r.graphic.rect;r.visible=!r.visible;var u=o.style.color,c=r.visible?r.color:r.hiddenColor,d=r.visible?u:r.hiddenColor;if(l.style({fill:c}),a.useHtmlLabel()?h.style("color",n.colorToHex(d)):h.style({fill:d}),r.points&&r.points.length>0){var f="vanChartMap"==s.vanChartType; +r.points.forEach(function(t){var e=t.series.type===i.LINE_MAP;if((!f||f&&t.points&&t.points[0]==t||e)&&(t.visible=r.visible,f&&!e)){for(var n=t.points,a=1,o=n.length;o>a;a++){n[a].visible=t.visible}}}),s.filterRender()}}});return o.register(o.INTERVAL_RANGE_LEGEND,g),g}),define("component/GradientRangeLegend",["require","../utils/BaseUtils","../Constants","../utils/ColorUtils","./RangeLegend","../ComponentLibrary","../utils/Scale","../utils/Interpolator"],function(t){var e=t("../utils/BaseUtils"),i=t("../Constants"),n=t("../utils/ColorUtils"),r=t("./RangeLegend"),a=t("../ComponentLibrary"),o=t("../utils/Scale"),s=t("../utils/Interpolator"),h=10,l=Array.apply(null,new Array(h)).map(function(t,e){return 1*e/h +}),u=8,c=function(){return e.paddingConvertWithScale(u)},d=15,f=100,p=15,g=10,m=4,v=function(){return e.paddingConvertWithScale(m)},_="M7.236,10H13c1.105,0,2-0.895,2-2V2c0-1.105-0.895-2-2-2L2.618,0C1.875,0,1.391,0.782,1.724,1.447l3.724,7.447C5.786,9.572,6.479,10,7.236,10z",y="M7.236,0L13,0c1.105,0,2,0.895,2,2v6c0,1.105-0.895,2-2,2H2.618c-0.743,0-1.227-0.782-0.894-1.447l3.724-7.447C5.786,0.428,6.479,0,7.236,0z",x="M0,7.236V13c0,1.105,0.895,2,2,2h6c1.105,0,2-0.895,2-2V2.618c0-0.743-0.782-1.227-1.447-0.894L1.106,5.447C0.428,5.786,0,6.479,0,7.236z",T="M10,7.236V13c0,1.105-0.895,2-2,2H2c-1.105,0-2-0.895-2-2L0,2.618c0-0.743,0.782-1.227,1.447-0.894l7.447,3.724C9.572,5.786,10,6.479,10,7.236z",b=r.extend({type:a.GradientRangeLegend,_getTrackLength:function(){return this._trackLength +},_getAvailableLength:function(){return this.vanchart.isMobileFlow()?this.isHorizontal()?this.vanchart.bounds.width:this.vanchart.bounds.height:f},initAttributesWithSeries:function(){var t=this.options,i=t.range||{};this.valueAndColors=i.color||this._getDefaultValueAndColors();var n=i.min,r=i.max;if(e.hasNotDefined(n)&&e.hasNotDefined(r)){var a=this.vanchart.getChartMinMaxValue(),h=e.calculateAutoMinMaxAndGap(a[0],a[1],Math.max(2,this.valueAndColors.length-1));n=h[0],r=h[1]}this.min=e.pick(i.min,n),this.max=e.pick(i.max,r),this.valueAndColors.sort(function(t,e){return t[0]-e[0] +});for(var u=[],c=[],d=0,f=this.valueAndColors.length;f>d;d++){u[d]=this.valueAndColors[d][0],c[d]=this.valueAndColors[d][1]}var p=o.quantize().domain([this.min,this.max]).range(l);this.largeValueScale=function(t){return this.min===this.max?0:p(t)},this.valueScale=o.linear().domain([this.min,this.max]).range([0,1]),this.colorScale=o.linear().domain(u).range(c).interpolate(s.interpolate).interpolate(s.interpolate)},_getMin:function(){return this.min},_getMax:function(){return this.max},_getGradient:function(){var t={}; +return this.valueAndColors.forEach(function(e){t[e[0]]=e[1]}),t},_getDefaultValueAndColors:function(){var t=n.createColorsWithHsb(this.vanchart.options.colors[0],3);return[[0,t[2]],[0.5,t[1]],[1,t[0]]]},calculateHorizontalDim:function(){var t=e.getTextDimension(this._getGradientMinLabelContent(),this.options.style,this.options.useHtml),i=e.getTextDimension(this._getGradientMaxLabelContent(),this.options.style,this.options.useHtml),n=Math.max(t.width,i.width,g),r=0;this.vanchart.isMobileFlow()?(r=this.vanchart.width-2*c(),this._trackLength=r-2*n-2*c()):(r=f+2*n,this._trackLength=f); +var a=d+p+v()+t.height;return{width:r,height:a}},calculateVerticalDim:function(){var t=e.getTextDimension(this._getGradientMinLabelContent(),this.options.style,this.options.useHtml),i=e.getTextDimension(this._getGradientMaxLabelContent(),this.options.style,this.options.useHtml),n=d+p+v()+Math.max(t.width,i.width),r=2*Math.max(t.height/2,g/2),a=0;return this.vanchart.isMobileFlow()?(a=this.vanchart.height-2*c(),this._trackLength=a-2*r-2*c()):(a=f+2*r,this._trackLength=f),{width:n,height:a}},getColorWithSize:function(t,e){return t>=this.min&&t<=this.max?this.colorScale(this[e?"largeValueScale":"valueScale"](t)):null +},_getGradientMinLabelContent:function(){return this._getGradientLabelWithFormatter(this.min)},_getGradientMaxLabelContent:function(){return this._getGradientLabelWithFormatter(this.max)},_getGradientLabelWithFormatter:function(t){var i=this.options.formatter;return i?e.format(t,i):t},_getGradientLabelContent:function(t){return this._getGradientLabelWithFormatter(this._gradientScale(t))},_gradientScale:function(t){var i=this._getTrackLength();this.isHorizontal()||(t=i-t);var n=t/i*100|0,r=e.accDiv(e.accAdd(this.max,-this.min),100),a=e.accMul(r,n); +return a=e.accAdd(a,this.min)},_getBarBackgroundStyle:function(){return{fill:"#eaeaea","stroke-width":0}},_getGradientFillColor:function(t,i){var n={x1:"0%",y1:t?"0%":"100%",x2:t?"100%":"0%",y2:"0%"},r=[];return this.valueAndColors.forEach(function(t){var e=t[0],i=t[1];r.push({offset:e,"stop-color":i})}),this._bar.colorGradient?i.updateColorGradient(this._bar.colorGradient,n,r):this._bar.colorGradient=i.colorGradient(n,r),"url(#"+e.stamp(this._bar.colorGradient)+")"},_updateHorizontalGradientClipRect:function(){var t=this,e=t.vanchart,i=e.renderer,n={x:this.minPos,y:0,width:this.maxPos-this.minPos,height:d}; +this._bar.clipG?i.updateClip(this._bar.clipG,n):(this._bar.clipG=i.createClip(n),i.clip(this._bar,this._bar.clipG))},_updateVerticalGradientClipRect:function(){var t=this,e=t.vanchart,i=e.renderer,n={x:0,y:this.minPos,width:d,height:this.maxPos-this.minPos};this._bar.clipG?i.updateClip(this._bar.clipG,n):(this._bar.clipG=i.createClip(n),i.clip(this._bar,this._bar.clipG))},renderBody:function(t,i){this.minPos=0,this.maxPos=this._getTrackLength();var n=this,r=n.vanchart,a=r.renderer,o=(r.bounds,n.isHorizontal()),s=this._getTrackLength(),h=o?(i.width-s)/2:c(),l=o?c():(i.height-this._getTrackLength())/2; +t.attr("transform",e.makeTranslate([h,l])),this._absX=i.x+h,this._absY=i.y+l,this._barBackground=this._barBackground||t.append(a.rect()),this._bar=this._bar||t.append(a.rect()),this._minButton=this._minButton||t.append(a.path().style({cursor:"pointer"})),this._maxButton=this._maxButton||t.append(a.path().style({cursor:"pointer"})),this._minLabel=this._minLabel||t.append(a.vtext(this.useHtmlLabel())),this._maxLabel=this._maxLabel||t.append(a.vtext(this.useHtmlLabel()));var u={rx:2,ry:2,x:0,y:0,width:o?s:d,height:o?d:s}; +this._barBackground.style(this._getBarBackgroundStyle()).attr(u),this._bar.attr(u).style({fill:this._getGradientFillColor(o,a),"stroke-width":0}),e.isSupportSVG()||a._updateGradientFill(this._bar,this._bar.colorGradient),this._minButton.attr("d",o?x:_),this._maxButton.attr("d",o?T:y),this._minLabel.attr("dy",".85em").style(this.options.style),this._maxLabel.attr("dy",".85em").style(this.options.style),this._updateMax(),this._updateMin()},_updateMin:function(){this.isHorizontal()?this._updateHorizontalMinBar():this._updateVerticalMinBar() +},_updateMax:function(){this.isHorizontal()?this._updateHorizontalMaxBar():this._updateVerticalMaxBar()},_updateVerticalMinBar:function(){this._minButton.attr("transform","translate("+d+","+this.maxPos+")").style({fill:this.colorScale((this._getTrackLength()-this.maxPos)/this._getTrackLength())});var t=this._getGradientLabelContent(this.maxPos),i=e.getTextDimension(t,this.options.style,!0),n=Math.round(d+p+v()),r=Math.round(this.maxPos+g/2-i.height/2);this._minLabel.textContent(t).attr("transform",e.makeTranslate({x:n,y:r})),this._updateVerticalGradientClipRect() +},_updateHorizontalMinBar:function(){var t=this.minPos-g;this._minButton.attr("transform","translate("+t+","+d+")").style({fill:this.colorScale(this.minPos/this._getTrackLength())});var i=this._getGradientLabelContent(this.minPos),n=e.getTextDimension(i,this.options.style,!0),r=Math.round(this.minPos-n.width),a=Math.round(d+p+v());this._minLabel.textContent(i).attr("transform",e.makeTranslate({x:r,y:a})),this._updateHorizontalGradientClipRect()},_updateVerticalMaxBar:function(){var t=this.minPos-g; +this._maxButton.attr("transform","translate("+d+","+t+")").style({fill:this.colorScale((this._getTrackLength()-this.minPos)/this._getTrackLength())});var i=this._getGradientLabelContent(this.minPos),n=e.getTextDimension(i,this.options.style,!0),r=Math.round(d+p+v()),a=Math.round(this.minPos-g/2-n.height/2);this._maxLabel.textContent(i).attr("transform",e.makeTranslate({x:r,y:a})),this._updateVerticalGradientClipRect()},_updateHorizontalMaxBar:function(){this._maxButton.attr("transform","translate("+this.maxPos+","+d+")").style({fill:this.colorScale(this.maxPos/this._getTrackLength())}); +var t=this._getGradientLabelContent(this.maxPos),i=Math.round(this.maxPos),n=Math.round(d+p+v());this._maxLabel.textContent(t).attr("transform",e.makeTranslate({x:i,y:n})),this._updateHorizontalGradientClipRect()},getEvents:function(){return{panstart:this._panStart,panmove:this._panMove,panend:this._panEnd}},_panStart:function(t){if(this.options.panStart){return void e.getFormatterFunction(this.options.panStart)()}var n=this.options.position;this.currentX=t.containerPoint.x,this.currentY=t.containerPoint.y,this.eventTarget=n==i.TOP||n==i.BOTTOM?this._findHorizontalTarget():this._findVerticalTarget() +},_findHorizontalTarget:function(){var t=(this.maxPos-this.minPos)/5;return this.currentXthis._absX+this.maxPos-t?this._maxButton:void 0},_findVerticalTarget:function(){var t=(this.maxPos-this.minPos)/5;return this.currentYthis._absY+this.maxPos-t?this._minButton:void 0},_panMove:function(t){this.eventTarget==this._minButton?this._minButtonMove(this.currentX,this.currentY,t.containerPoint.x,t.containerPoint.y):this.eventTarget==this._maxButton&&this._maxButtonMove(this.currentX,this.currentY,t.containerPoint.x,t.containerPoint.y) +},_minButtonMove:function(t,e,i,n){var r=0;if(this.isHorizontal()){var a=this.minPos;this.minPos+=Math.round(i-t),this.minPos=Math.max(this.minPos,0),this.minPos=Math.min(this.minPos,this.maxPos),r=this.minPos-a}else{var a=this.maxPos;this.maxPos+=Math.round(n-e),this.maxPos=Math.min(this.maxPos,this._getTrackLength()),this.maxPos=Math.max(this.maxPos,this.minPos),r=this.maxPos-a}Math.abs(r)>=1&&(this.currentX=i,this.currentY=n,this._updateMin(),this.refreshPoints())},_maxButtonMove:function(t,e,i,n){var r=0; +if(this.isHorizontal()){var a=this.maxPos;this.maxPos+=Math.round(i-t),this.maxPos=Math.min(this.maxPos,this._getTrackLength()),this.maxPos=Math.max(this.maxPos,this.minPos),r=this.maxPos-a}else{var a=this.minPos;this.minPos+=Math.round(n-e),this.minPos=Math.max(this.minPos,0),this.minPos=Math.min(this.minPos,this.maxPos),r=this.minPos-a}Math.abs(r)>=1&&(this.currentX=i,this.currentY=n,this._updateMax(),this.refreshPoints())},_panEnd:function(t){this.eventTarget=null},refreshPoints:function(){for(var t,e=this._gradientScale(this.minPos),n=this._gradientScale(this.maxPos),r=this.vanchart,a=r.series,o=!1,s="vanChartMap"==r.vanChartType,h=0,l=a.length; +l>h;h++){var u=a[h];u.points.forEach(function(r){var a=r.series.type===i.LINE_MAP;if(!s||s&&r.points&&r.points[0]==r||a){var h=r.visible,l=r.getTargetValue();if(r.visible=l>=e&&n>=l||l>=n&&e>=l,o=o||h!=r.visible,s&&!a){t=r.points;for(var u=1,c=t.length;c>u;u++){t[u].visible=r.visible}}}})}o&&r.filterRender()},isPanMovingAtTheBoundary:function(t){var e=t.direction,n=e===i.DIRECTION_LEFT,r=e===i.DIRECTION_RIGHT,a=e===i.DIRECTION_UP,o=e===i.DIRECTION_DOWN,s=this.isHorizontal(),h=this.eventTarget,l=this._maxButton,u=this._minButton,c=this.maxPos,d=this.minPos,f=d===c; +if(s){switch(h){case l:return n&&f||r&&c===this._getTrackLength();case u:return n&&0===d||r&&f}}else{switch(h){case l:return a&&0===d||o&&f;case u:return a&&f||o&&c===this._getTrackLength()}}return !1}});return a.register(a.GradientRangeLegend,b),b}),define("component/Polar",["require","../Constants","../utils/BaseUtils","./Base","../ComponentLibrary"],function(t){var e=(t("../Constants"),t("../utils/BaseUtils")),i=t("./Base"),n=(t("../ComponentLibrary"),i.extend({_refresh:function(){this.series=[] +},_isBaseAxis:function(){return !0},doLayout:function(){var t=this.options,i=t.radius,n=t.center;if(!n||0===n.length){var r=this.vanchart.bounds;n=[r.width/2+r.x,r.height/2+r.y]}this.setCenter(n),e.hasDefined(i)?this.setRadius(i):this.radius=null;var a=this.vanchart.options.plotOptions,o=this.options.shape||a.radar&&a.radar.shape||a.shape;this.shape=o||this.shape},setRadius:function(t){t&&(this.radius=this._getPercentValue(t,Math.min(this.vanchart.width,this.vanchart.height)/2))},setCenter:function(t){t&&(this.center=[],this.center[0]=this._getPercentValue(t[0],this.vanchart.width),this.center[1]=this._getPercentValue(t[1],this.vanchart.height)) +},render:function(){var t=this.vanchart.renderer,e=this.radiusAxis,i={d:e._getRadiusGridPath(e.scale.domain()[1])};this.clip?t.updateClip(this.clip,i):this.clip=t.createClip(i,"path"),this.radiusAxis.render(),this.angleAxis.render()}}));return n}),define("component/AngleAxis",["require","./CategoryAxis","../utils/BaseUtils","../utils/Scale","../utils/PathGenerator","../utils/BoundsManager"],function(t){var e=t("./CategoryAxis"),i=t("../utils/BaseUtils"),n=t("../utils/Scale"),r=t("../utils/PathGenerator"),a=t("../utils/BoundsManager"),o=8,s=function(){return i.paddingConvertWithScale(o) +},h="radar-top",l="radar-bottom",u="radar-left",c="radar-right",d=e.extend({_refresh:function(t){this.series=[],this.piece=null,this.initScale(),this.refreshPolar(t)},refreshPolar:function(t){this.polar=this.vanchart.polar(t.axisIndex),this.polar.angleAxis=this},doLayout:function(){this.calculateDomainFromData(),this.scale.domain(this._dataDomain).rangePoints([0,this._dataDomain.length-1]),this.piece=2*Math.PI/Math.max(this._dataDomain.length,1),this._updateOriginTickData(),this._updatePolarBounds(),this._calculateTickData() +},fixScaleAndTickData:function(){this.scale.domain(this._dataDomain).rangePoints([0,this._dataDomain.length-1]),this._updateOriginTickData(),this._calculateTickData()},_calculateTickData:function(){var t,e=this.polar.radius,i=this.options;this.isBreakLabels&&(t=this._getTestBoundsAndRadius().testBounds),i.step&&this.tickData.forEach(function(t,e){e%i.step&&(t.tickContent="")}),this.tickData.map(function(i){this._getCateLabelBounds(e,i,t)},this)},_getTestBoundsAndRadius:function(){var t=this.vanchart.bounds,e=this.polar.center,i=[e[1]-t.y,t.x+t.width-e[0],t.y+t.height-e[1],e[0]-t.x],n=Math.min.apply(null,i); +n-=s();var r={x:-i[3],y:-i[0],width:t.width,height:t.height};return{testBounds:r,radius:n}},_updatePolarBounds:function(){if(!this.polar.radius){var t=this._getTestBoundsAndRadius(),e=t.radius,i=t.testBounds;this.options.showLabel&&(this._testRadius(e,i)||(e=this._findNiceRadius(i),this._testRadius(e,i))),this.polar.setRadius(e)}},getIndexByPosition:function(t){return this._getIndexByPolarCoordinate(t)},_getIndexByPolarCoordinate:function(t){var e=this.polar.center,n=this.polar.radius,r=this.isAxisReversed(),a=t[0]-e[0],o=e[1]-t[1]; +if(a*a+o*o>n*n){return -1}var s,h=i.getArcByPoint(a,o),l=this.getCategories();if(l.length>1){var u=2*Math.PI/l.length;s=r?l.length-1-h/u:h/u}else{s=0}return s=Math.round(s),s%=l.length},getAngleGridLineData:function(){var t=[],e=this.polar.angleAxis,n=e.scale.domain(),r=this;return n.forEach(function(n){var a=e.scale(n)*e.piece,o=r.polar.radius;t.push(i.getArcPoint(o,a))}),t=t.length?t:[i.getArcPoint(this.polar.radius,0)]},getCateAngleGridLineData:function(){var t=this.getAngleGridLineData(),e=this.polar.angleAxis.scale.domain(); +return t.map(function(t,i){return{name:e[i],pos:t}})},_testRadius:function(t,e){for(var n=0,r=this.tickData.length;r>n;n++){var a=this.tickData[n],o=this._getCateLabelBounds(t,a);if(!i.containsRect(e,o)){return !1}}return !0},_getCateLabelBounds:function(t,e,n){var r,a=e.tickValue,o=e.tickRectDim,d=this.scale.domain(),f=d.indexOf(a),p=i.getArcPoint(t+s(),f*this.piece),g=this.options,m=this._getPolarPosition(a),v=i.extend({width:"","white-space":"","text-align":""},g.labelStyle);switch(m){case h:r={style:v,x:-o.width/2,y:-t-0.65*o.height-s()}; +break;case c:if(r={style:v,x:p[0],y:p[1]-o.height/2},n&&this.isBreakLabels&&r.x+o.width>n.x+n.width){var _=n.x+n.width-p[0],y=i.extend({width:_+"px","white-space":"normal","text-align":"left"},g.labelStyle);o=i.getTextWrapDimension(e.tickContent,y),r={style:y,x:p[0],y:p[1]-o.height/2}}break;case l:r={style:v,x:-o.width/2,y:t+s()};break;case u:if(r={style:v,x:p[0]-o.width,y:p[1]-o.height/2},n&&this.isBreakLabels&&r.x0&&n>i?c:i==n?l:i>n?u:void 0},_findNiceRadius:function(t){var e=[-t.y,t.width+t.x,t.height+t.y,-t.x],i=Math.min.apply(null,e),n=i,r=this.scale.domain(),a=this;return this.tickData.forEach(function(t){if(t.tickContent){var i,o=t.tickValue,s=t.tickDim,d=r.indexOf(o),f=a._getPolarPosition(o); +switch(f){case h:i=e[0]-s.height;break;case c:i=(e[1]-s.width)/Math.abs(Math.sin(d*a.piece));break;case l:i=e[2]-s.height;break;case u:i=(e[3]-s.width)/Math.abs(Math.sin(d*a.piece))}n=Math.min(n,i)}}),2*i/3>n&&(n=2*i/3,this.options.labelRotation||this.options.useHtml||(this.isBreakLabels=!0)),n-s()},getCategoryByPos:function(t){var e=this.polar.center,r=this.polar.radius,a=t.x-e[0],o=e[1]-t.y;if(a*a+o*o>r*r){return null}var s=i.getArcByPoint(a,o),h=this.scale.domain(),l=this.scale.rangeExtent(),u=n.quantize().domain(l).range(h),c=h.length,d=Math.round(s/(2*Math.PI)*c)%c,f=u(d); +return f},getPointsInCategory:function(t){var e=this.getCategoryByPos(t);return this.vanchart.getValidPointsPara(e)},render:function(){var t=this.vanchart,e=t.renderer;return this.axisGroup||(this.axisGroup=e.vgroup().add(t.backGroup)),0===this.series.length?void this.remove():(this.axisGroup.attr("transform",i.makeTranslate(this.polar.center)),this._drawAxisLine(this.axisGroup),this._drawGridLine(this.axisGroup),void this._drawTickLabel(this.axisGroup))},_drawAxisLine:function(t){var e=this.vanchart.renderer,i=this.polar.radiusAxis,n=this,r=n.options.lineWidth,a=n.options.lineColor,o=i.scale.domain()[1]; +this.axisLine||(this.axisLine=t.append(e.path())),this.axisLine.attr({d:i._getRadiusGridPath(o)}).style({fill:"none",stroke:a,"stroke-width":r})},_drawGridLine:function(t){var e=this.vanchart.renderer,i=this.polar.radiusAxis.options,n=i.lineWidth,r=i.lineColor;this.gridLinesGroup||(this.gridLinesGroup=t.append(e.group()),this.gridLines=[]);var a=this.gridLinesGroup,o=this.getAngleGridLineData(),s=this._bindData(this.gridLines,o);s.exit.map(function(t){t.remove()});var h=s.enter.map(function(t){return a.append(e.line()).datum(t) +});this.gridLines=h.concat(s.update).map(function(t){var e=t.datum();return t.style({stroke:r,"stroke-width":n}).attr({x1:0,y1:0,x2:e[0],y2:e[1]})})},_drawTickLabel:function(t){this._drawSvgTickLabel(t)},_drawSvgTickLabel:function(t){for(var e=this.vanchart.renderer,i=this,n=i.options,r=this.isBreakLabels,o=n.useHtml||r,s=[],h=i.tickData,l=new a,u=0;ud&&!c;d++){c=n[d].visible}n.forEach(function(t){if(t.visible||!c){var n=!(i.hasNotDefined(t.stack)||e._isBaseAxis());t.points.forEach(function(t){var e=t.category,i=t.value;!t.isNull&&t.visible&&(n?(u[e]=u[e]||[0,0],i>=0?u[e][1]+=i:u[e][0]+=i):(u[e]=u[e]||[h,l],u[e][0]=Math.min(u[e][0],i),u[e][1]=Math.max(u[e][1],i)))})}});for(key in u){this._cateDataDomain.push({useIndicator:!1,name:key,domain:u[key]})}var p=function(t){s&&(t[0]>0?t[0]=0:t[1]<0&&(t[1]=0))};t&&t.forEach(function(t){var i=t.name,n=t.domain[0],r=t.domain[1]; +e._cateDataDomain.forEach(function(t){if(i===t.name){if(null==n&&null==r){return}if(null!=n&&null!=r&&n>=r){return}var e=t.domain[0],a=t.domain[1],o=n||(s&&e>0?0:e),h=r||(s&&0>a?0:a),l=!1,u=!1;n&&(l=!0),r&&(u=!0),l&&!u?h=o>=h?o+100:h:u&&!l&&(o=o>h?h-100:o),t.useIndicator=!0,t.domain=[o,h]}})}),this._cateDataDomain.forEach(function(t){t.useIndicator||p(t.domain)}),this._calculateCateNiceDomain(),this._updateCategoryTickData()},_calculateCateNiceDomain:function(){var t=this,e=t.series;e.vanchart;this._cateTickStart=[],this._cateStep=[],this._cateDomain=[]; +var i=!1,n=this._getDefaultTickCount();if(this._cateDataDomain.forEach(function(e){var r,a,o,s=e.name,h=e.domain,l=e.useIndicator;e.useIndicator?(i=!0,o=h[0],a=[h[0],h[1]],r=parseFloat((h[1]-h[0])/n)):(r=t._linearTickInterval(h[0],h[1]),a=t._linearNiceDomain(h[0],h[1],r),o=a[0]),t._cateTickStart.push(o),t._cateDomain.push({useIndicator:l,name:s,domain:a}),t._cateStep.push(r)}),!i){var r=this._getCateTickValues().map(function(t){return t.labels.length});n=Math.max.apply(Math,r)}this._cateDomain.forEach(function(e,i){var r=e.domain[0],a=e.domain[1],o=e.useIndicator; +o||(_step=Math.ceil((a-r)/n),e.domain[1]=r+_step*n,t._cateStep[i]=_step)})},_updateCategoryTickData:function(){var t=this,e=this._getCateTickValues();this.cateTickData=[];for(var i=0,n=e.length;n>i;i++){for(var r=e[i].name,a=e[i].labels,o=[],s=0,h=a.length;h>s;s++){o.push(t._labelInfoFormatter(a[s]))}t.cateTickData.push({name:r,tickData:o})}},_labelInfoFormatter:function(t){var e=this,n=this.options,a=n.formatter,o=n.useHtml,s=n.labelStyle||{},h=i.extend({writingMode:"tb-rl","writing-mode":"tb-rl","-webkit-writing-mode":"vertical-rl"},s),l=e._getTickContent(t,a); +e.type===r.CATEGORY_AXIS_COMPONENT&&(l=l.trim());var u,c,d=s,f=e.options.labelRotation;return 90===Math.abs(f)&&i.hasChn(l)&&(f=360,d=h),u=i.getTextDimension(l,d,o),c=i.getTextDimRotated(u,f),o&&(c.width=isNaN(parseFloat(n.labelWidth))?c.width:parseFloat(n.labelWidth),c.height=isNaN(parseFloat(n.labelHeight))?c.height:parseFloat(n.labelHeight)),{tickValue:t,tickContent:l,tickDim:c,tickRectDim:u,labelRotation:f}},_getCateTickValues:function(){if(!this._cateDataDomain){return[]}var t=[],e=this;return this._cateDomain.forEach(function(n,r){for(var a=[],o=e._cateTickStart[r],s=e._cateStep[r],h=n.domain[1]; +h>=o;o=i.accAdd(o,s)){a.push(o)}t.push({name:n.name,labels:a})}),t},fixScaleAndTickData:function(){this.scale.domain(this._domain).range([0,this.polar.radius]),this._updateOriginTickData()},getRadiusPlotBands:function(){var t=this._getPlotBands(),e=[],i=this;return t.forEach(function(t){e.push({path:i._getRadiusPlotBandsPath(t.from,t.to),color:t.color})}),e},_getRadiusPlotBandsPath:function(t,e){var i=this.polar.shape;if(i===n.POLYGON_RADAR){return this._getRadiusGridPath(Math.min(t,e))+this._getRadiusGridPath(Math.max(t,e),!0) +}var r=a.arc().startAngle(0).endAngle(2*Math.PI);return r.innerRadius(this.scale(Math.min(t,e))).outerRadius(this.scale(Math.max(t,e)))()},getPlotLines:function(){var t=this.options.plotLines||[],e=this,i=[];return t.forEach(function(t){var r,a,o;t.label&&t.label.text&&t.label.style&&(r=t.label.text,a=t.label.style,o=t.label.align),i.push({color:t.color,value:t.value,width:t.width,dataArray:n.DASH_TYPE[t.dashStyle],text:r,baseY:-e.scale(t.value),textAnchor:o==n.LEFT?"end":"start",style:a})}),i},_getRadiusGridPath:function(t,e){var i=this._getRadiusGridData(t,e); +return this._getRadiusGridPathByData(i)},_getRadiusGridData:function(t,e,r){var a=r||this.scale,o=this.polar.angleAxis,s=this.polar.shape;if(s===n.POLYGON_RADAR){var h=[],l=o.scale,u=l.domain();return u.forEach(function(e){var n=l(e)*o.piece,r=a(t);h.push(i.getArcPoint(r,n))}),e&&h.reverse(),h}return a(t)},_getRadiusGridPathByData:function(t){if(i.isArray(t)){var e="";if(t.length){for(var n=0,r=t.length;r>n;n++){var o=n?"L":"M";e+=o+i.dealFloatPrecision(t[n][0])+","+i.dealFloatPrecision(t[n][1])}e+="Z" +}return e}var s=a.arc().startAngle(0).endAngle(2*Math.PI).innerRadius(0);return s.outerRadius(t)()},render:function(){var t=this.vanchart,e=t.renderer;return this.axisGroup||(this.axisGroup=e.vgroup().add(t.backGroup),this.ticksLabelGroup=e.vgroup().add(t.backGroup),e.clip(this.axisGroup.renderG,this.polar.clip)),0===this.series.length?void this.remove():(this.axisGroup.attr("transform",i.makeTranslate(this.polar.center)),this.ticksLabelGroup.attr("transform",i.makeTranslate(this.polar.center)),this._drawPlotBands(this.axisGroup),this.indicator?this._drawCateGridLine(this.axisGroup):this._drawGridLine(this.axisGroup),this._drawPlotLines(),void this._drawTickLabel(this.ticksLabelGroup)) +},_drawGridLine:function(t){var e=this.vanchart.renderer,i=this,n=i.lastScale||i.scale,r=i.options,a=i.getTickData(),s=r.gridLineColor,h=r.gridLineWidth;this.gridLinesGroup||(this.gridLinesGroup=t.append(e.group()),this.gridLines=[]);var l=this.gridLinesGroup,u=this._bindData(this.gridLines,a);u.exit.map(function(t){var e=t.datum(),r=i._getRadiusGridData(e.tickValue,!1,n),a=i._getRadiusGridData(e.tickValue);t.animate({attrTween:{d:function(){var t=o(r,a);return function(e){return i._getRadiusGridPathByData(t(e)) +}}}}).remove()});var c=u.enter.map(function(t){return l.append(e.path()).datum(t)});this.gridLines=c.concat(u.update).map(function(t){var e=t.datum(),r=i._getRadiusGridData(e.tickValue);t.style({fill:"none",stroke:s,"stroke-width":h,opacity:1});var a=i._getRadiusGridData(e.tickValue,!1,n);return t.animate({attrTween:{d:function(){var t=o(a,r);return function(e){return i._getRadiusGridPathByData(t(e))}}}}),t})},_drawCateGridLine:function(t){var e=this.vanchart.renderer,i=this,n=i.lastScale||i._cateScale,r=i.options,a=i.cateTickData[0].tickData,s=r.gridLineColor,h=r.gridLineWidth,l=i._cateDomain[0].domain; +this.gridLinesGroup||(this.gridLinesGroup=t.append(e.group()),this.gridLines=[]);var u=this.gridLinesGroup,c=this._bindData(this.gridLines,a);c.exit.map(function(t){var e=t.datum(),r=i._getRadiusGridData(e.tickValue,!1,n),a=i._getRadiusGridData(e.tickValue,!1,n);t.animate({attrTween:{d:function(){var t=o(r,a);return function(e){return i._getRadiusGridPathByData(t(e))}}}}).remove()});var d=c.enter.map(function(t){return u.append(e.path()).datum(t)});this.gridLines=d.concat(c.update).map(function(t){var e=t.datum(); +n.domain(l);var r=i._getRadiusGridData(e.tickValue,!1,n);t.style({fill:"none",stroke:s,"stroke-width":h,opacity:1});var a=i._getRadiusGridData(e.tickValue,!1,n);return t.animate({attrTween:{d:function(){var t=o(a,r);return function(e){return i._getRadiusGridPathByData(t(e))}}}}),t})},_drawPlotLines:function(){var t=this.vanchart.renderer,e=this.getPlotLines();this.plotLinesGroup||(this.plotLinesGroup=t.vgroup().add(this.vanchart.frontGroup),this.plotLines=[]),this.plotLinesGroup.attr("transform",i.makeTranslate(this.polar.center)); +var n=this.plotLinesGroup,r=this._bindData(this.plotLines,e);r.exit.map(function(t){t.text&&t.text.remove(),t.remove()});var a=r.enter.map(function(e){var i=n.append(t.path().datum(e));return e.text&&(i.text=n.append(t.vtext())),i});this.plotLines=a.concat(r.update).map(function(t){var e=t.datum(),i=this._getRadiusGridPath(e.value);return t.style({fill:"none",stroke:e.color,"stroke-width":e.width,"stroke-dasharray":e.dataArray}).animate({attr:{d:i}}),t.text&&t.text.textContent(e.text).style(e.style).attr({y:e.baseY}),t +},this)},_drawPlotBands:function(t){var e=this.vanchart.renderer,i=this.getRadiusPlotBands();this.plotBandsGroup||(this.plotBandsGroup=t.append(e.group()),this.plotBands=[]);var n=this.plotBandsGroup,r=this._bindData(this.plotBands,i);r.exit.map(function(t){t.remove()});var a=r.enter.map(function(t){return n.append(e.path()).datum(t)});this.plotBands=a.concat(r.update).map(function(t){var e=t.datum();return t.style("fill",e.color).animate({attr:{d:e.path}}),t},this)},_drawTickLabel:function(t){this.indicator?this._drawCateSvgTickLabel(t):this._drawSvgTickLabel(t) +},_drawSvgTickLabel:function(t){var e=this.vanchart.renderer,n=this,r=n.scale,a=n.lastScale||n.scale,o=n.options,s=o.showLabel?n.getTickData().slice(0,-1):[],h=o.labelStyle,u=o.useHtml,c=this._bindData(this.tickLabels||[],s,function(t){return t.tickValue});this.tickLabels=[],this.tickLabelsGroup||(this.tickLabelsGroup=t.append(e.vgroup()));var d=this.tickLabelsGroup;if(c.exit.map(function(t){t.remove()}),o.showLabel){var f=c.enter.map(function(t){return d.append(e.vtext(u).datum(t))});this.tickLabels=f.concat(c.update).map(function(t){var e=t.datum(); +t.textContent(e.tickContent).style(i.clone(h));var n=-(e.tickRectDim.width+e.tickDim.width)/2-l(),o=-r(e.tickValue)-(e.tickRectDim.height+e.tickDim.height)/2,s={transform:"translate("+n+" "+o+")",dy:"0.85em"};if(u){t.attr(s),t.vRotate(e.labelRotation)}else{var c=e.labelRotation%360?t.vRotate(e.labelRotation).rotateStr:"";s.transform+=c;var d=-(e.tickRectDim.width+e.tickDim.width)/2-l(),f=-a(e.tickValue)-(e.tickRectDim.height+e.tickDim.height)/2,p={transform:"translate("+d+" "+f+")",dy:"0.85em"};p.transform+=c,t.attr(p).animate({attr:s}) +}return t})}},_drawCateSvgTickLabel:function(t){var e=this.vanchart.renderer,i=this,n=i.lastScale||i._cateScale,r=i.options,a=(i.getTickData().slice(0,-1),r.labelStyle),o=r.useHtml;this.cateTickLabelsGroup||(this.cateTickLabelsGroup=t.append(e.vgroup()),this.cateTickLabels=[],this._cateDataDomain.forEach(function(){i.cateTickLabels.push([])}));var s=this.cateTickLabelsGroup,h=function(t,e){var i=t>=0?"RIGHT":"LEFT",n=e>=0?"BOTTOM":"TOP";return i+"_"+n},u=function(t,e,i,n,r,a,o){var s=l(),h=(n+a)/2,u=(r+o)/2; +switch(t){case"LEFT_TOP":_x=e+s,_y=i+s;break;case"RIGHT_TOP":_x=e-h-s,_y=i+s;break;case"RIGHT_BOTTOM":_x=e+-h-s,_y=i-u-s;break;case"LEFT_BOTTOM":_x=e+s,_y=i-u-s}return{x:_x,y:_y}},c=this.series[0].angleAxis.getCateAngleGridLineData(),d=(this.cateTickData.map(function(t){return t.tickData.length}),n.domain()),f=n.range();this.cateTickData.forEach(function(t,l){var d,f=t.name,p=i._bindData(i.cateTickLabels[l],t.tickData,function(t){return t.tickValue});c.forEach(function(t){t.name==f&&(d=t.pos)}),p.exit.map(function(t){t.remove() +});var g=d[0],m=d[1],v=h(g,m);if(r.showLabel){var _=p.enter.map(function(t){return s.append(e.vtext(o).datum(t))});i.cateTickLabels[l]=_.concat(p.update).map(function(t,e,r){var s=t.datum();t.textContent(s.tickContent).style(a),n.domain(i._cateDomain[l].domain),n.range([0,g]);var h=n(s.tickValue);n.range([0,m]);var c=n(s.tickValue),d=u(v,h,c,s.tickRectDim.width,s.tickRectDim.height,s.tickDim.width,s.tickDim.height),f=d.x,p=d.y,_={transform:"translate("+f+" "+p+")",dy:"0.85em"};if(o){t.attr(_),t.vRotate(s.labelRotation) +}else{var y=s.labelRotation%360?t.vRotate(s.labelRotation).rotateStr:"";_.transform+=y;var x=f,T=p,b={transform:"translate("+x+" "+T+")",dy:"0.85em"};b.transform+=y,t.attr(b).animate({attr:_})}return t})}}),n.range(f).domain(d)}});return u}),define("component/PolarAxis",["require","./Base","../utils/BaseUtils","../Constants","./Axis","./Polar","./AngleAxis","./RadiusAxis","../ComponentLibrary"],function(t){var e=(t("./Base"),t("../utils/BaseUtils")),i=(t("../Constants"),t("./Axis")),n=t("./Polar"),r=t("./AngleAxis"),a=t("./RadiusAxis"),o=t("../ComponentLibrary"),s=i.extend({_refresh:function(){this._axisList=this._axisList||[]; +var t=this.options;t=e.isArray(t)?t:[t];for(var i=t.length,s=i;s=0;s--){if(t[s].axisIndex=s,this._axisList[s]&&this._axisList[s].type!=t[s].type&&(this._axisList[s].remove(),this._axisList[s]=null),this._axisList[s]){this._axisList[s].refresh(t[s])}else{var h;if(this.componentType===o.POLAR_COMPONENT){h=n}else{var l=t[s].type||o.VALUE_AXIS_COMPONENT;l==o.VALUE_AXIS_COMPONENT?h=a:l==o.CATEGORY_AXIS_COMPONENT&&(h=r) +}this._axisList[s]=new h(t[s],this.componentType,this.vanchart)}}},doLayout:function(){for(var t=this._axisList.length,e=t-1;e>=0;e--){this._axisList[e].doLayout()}},render:function(){this._axisList.map(function(t){t.componentType===o.POLAR_COMPONENT&&t.render()})}});return o.register(o.RADIUS_AXIS_COMPONENT,s),o.register(o.ANGLE_AXIS_COMPONENT,s),o.register(o.POLAR_COMPONENT,s),s}),define("component/Title",["require","./Base","../utils/BaseUtils","../Constants","../ComponentLibrary"],function(t){var e=t("./Base"),i=t("../utils/BaseUtils"),n=t("../Constants"),r=t("../ComponentLibrary"),a=8,o=function(){return i.paddingConvertWithScale(a) +},s=e.extend({doLayout:function(){var t=this.options;if(t.text){var e,a=this.vanchart.bounds,s=a.width,h=a.height;if(this.isFloat){s-=this._floatX-a.x,h-=this._floatY-a.y}else{var l=this.vanchart.components[r.TOOLBAR_COMPONENT];this.initBarWidth=l&&l.getToolBarInitWidth()||0,s-=this.initBarWidth,"center"===t.align&&(s-=this.initBarWidth)}if(s-=2*o(),h-=2*o(),e=i.getTextDimension(t.text,t.style,t.useHtml),e.width>s){var u=i.clone(t.style);u.width=Math.max(s,0)+"px",e=i.getTextWrapDimension(t.text,u,t.useHtml) +}else{e.width+=0.5}e.height=Math.min(this._maxHeight(),h,e.height);var c=2*o(),d=Math.min(this._maxHeight(),h+c,e.height+c);if(this.isFloat){this.bounds={x:this._floatX,y:this._floatY,width:e.width+2*o(),height:d}}else{var f=this.vanchart.getComponent("xAxis")||this.vanchart.getComponent("yAxis")?0.5*o():0;this._setComponentBounds(n.TOP,0===d?0:d+f),this.bounds.height=d}var p=(d-e.height)/2;if(this.isFloat){this.textBounds={x:o(),y:p,width:e.width,height:e.height}}else{var g;switch(t.align){case"right":g=s-e.width; +break;case"center":g=this.bounds.width/2-e.width/2;break;case"left":default:g=this.bounds.x+o()}this.textBounds={x:g,y:p,width:e.width,height:e.height}}if(t.useHtml){this.labels=[],this.labels.push({text:t.text,dim:e,style:t.style})}else{var m=i.splitText(t.text,t.style,this.textBounds.width);this.labels=m.map(function(e){return{text:e,dim:i.getTextDimension(e,t.style,t.useHtml),style:t.style}})}}},render:function(){if(!this.textBounds||this.textBounds.width<0||this.textBounds.height<0){return void this.remove() +}var t=this.vanchart,e=t.renderer;this.titleGroup||(this.titleGroup=e.vgroup(),this.titleGroup.renderG.addTo(this.isFloat?t.frontGroup:t.backGroup),this.titleGroup.divG.add(),this.titleGroup.divG.style("pointer-events","auto")),this.titleGroup.attr("transform",i.makeTranslate([this.bounds.x,this.bounds.y])),this._innerClip(this.titleGroup),this.drawBackground(this.titleGroup.renderG),this.drawTitle(this.titleGroup)},drawBackground:function(t){var e=this.options,i=this.bounds;e.backgroundColor&&this.vanchart._renderRectangleBackground(t,e,{x:0,y:0,width:i.width,height:i.height}) +},drawTitle:function(t){this.text&&(this.text.remove(),this.text=null);var e=this.vanchart.renderer,r=this.options,a=this.textBounds,o=r.useHtml,s=r.align,h=e.vtext(o).attr({transform:i.makeTranslate([a.x,a.y]),width:a.width+"px","text-align":s,"white-space":"normal"});this.text=h;var l=o?{}:i.isMS?{dy:"1em"}:{"dominant-baseline":"central",dy:a.height/this.labels.length/2},u=0;this.labels.map(function(t){var i,r=t.dim;switch(s){case n.LEFT:i=0;break;case n.RIGHT:i=a.width-r.width;break;case n.CENTER:default:i=(a.width-r.width)/2 +}h.append(e.vtspan(o).attr({y:u,x:0,dx:i}).attr(l).textContent(t.text).style(t.style)),u+=r.height}),t.append(h)},remove:function(){this.titleGroup&&this.titleGroup.remove(),this._clip&&this._clip.remove&&this._clip.remove(),this.titleGroup=this._clip=null}});return r.register(r.TITLE_COMPONENT,s),s}),define("utils/GeoUtils",["require","./Bounds"],function(t){function e(t,e,i){t&&u.hasOwnProperty(t.type)&&u[t.type](t,e,i)}function i(t,e,i){for(var n,r=-1,a=t.length;++ri;i++){var o=a[i].properties.center;o&&(o[0]*=e,o[1]*=e)}var s=r(t);for(i=0,n=s.length;n>i;i++){s[i][0]*=e,s[i][1]*=e}}function o(t,e){void 0==e&&(e=!0);var i=new s(r(t,e));return[[i.min.x,i.min.y],[i.max.x,i.max.y]]}var s=t("./Bounds"),h=function(t,e){if(!e){return !0}var i=t[0],n=t[1],r=e[0],a=e[1],o=e[2],s=e[3]; +return i>=r&&o>=i&&n>=a&&s>=n},l={Feature:function(t,i,n){var r=n&&t.properties&&t.properties.bbox;e(t.geometry,i,r)},FeatureCollection:function(t,i,n){for(var r=t.features,a=-1,o=r.length;++ar;r++){e=i[r].style.zIndex,i[r]!==this._container&&e&&(n=t(n,+e))}isFinite(n)&&(this.options.zIndex=n+t(-1,1),this._updateZIndex()) +},_updateOpacity:function(){if(this._map&&!r.ielt9){n.setOpacity(this._container,this.options.opacity);var t=+new Date,e=!1,a=!1;for(var o in this._tiles){var s=this._tiles[o];if(s.current&&s.loaded){var h=Math.min(1,(t-s.loaded)/200);n.setOpacity(s.el,h),1>h?e=!0:(s.active&&(a=!0),s.active=!0)}}a&&!this._noPrune&&this._pruneTiles(),e&&(i.cancelAnimFrame(this._fadeFrame),this._fadeFrame=i.requestAnimFrame(this._updateOpacity,this))}},_initContainer:function(){this._container||(this._container=n.create("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container)) +},_updateLevels:function(){var t=this._tileZoom,e=this.options.maxZoom;if(void 0!==t){for(var r in this._levels){this._levels[r].el.children.length||r===t?this._levels[r].el.style.zIndex=e-Math.abs(t-r):(n.remove(this._levels[r].el),this._removeTilesAtZoom(r),delete this._levels[r])}var a=this._levels[t],o=this._map;return a||(a=this._levels[t]={},a.el=n.create("div","leaflet-tile-container leaflet-zoom-animated",this._container),a.el.style.zIndex=e,a.origin=o.project(o.unproject(o.getPixelOrigin()),t).round(),a.zoom=t,this._setZoomTransform(a,o.getCenter(),o.getZoom()),i.falseFn(a.el.offsetWidth)),this._level=a,a +}},_pruneTiles:function(){if(this._map){var t,e,i=this._map.getZoom();if(i>this.options.maxZoom||in?this._retainParent(r,o,s,n):!1)},_retainChildren:function(t,e,i,n){for(var r=2*t; +2*t+2>r;r++){for(var o=2*e;2*e+2>o;o++){var s=new a(r,o);s.z=i+1;var h=this._tileCoordsToKey(s),l=this._tiles[h];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),n>i+1&&this._retainChildren(r,o,i+1,n))}}},_resetView:function(t){var e=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_setView:function(t,e,i,n){var r=Math.round(e);(void 0!==this.options.maxZoom&&r>this.options.maxZoom||void 0!==this.options.minZoom&&r1){return void this._setView(t,i)}for(var f=r.min.y;f<=r.max.y;f++){for(var p=r.min.x;p<=r.max.x;p++){var g=new a(p,f);if(g.z=this._tileZoom,this._isValidTile(g)){var m=this._tiles[this._tileCoordsToKey(g)];m?m.current=!0:h.push(g)}}}if(h.sort(function(t,e){return t.distanceTo(s)-e.distanceTo(s)}),0!==h.length){this._loading||(this._loading=!0,this.fire("loading")); +var v=document.createDocumentFragment();for(p=0;pi.max.x)||!e.wrapLat&&(t.yi.max.y)){return !1}}if(!this.options.bounds){return !0}var n=this._tileCoordsToBounds(t);return s.create(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t)) +},_tileCoordsToBounds:function(t){var e=this._map,i=this.getTileSize(),n=t.scaleBy(i),r=n.add(i),a=e.unproject(n,t.z),o=e.unproject(r,t.z);return this.options.noWrap||(a=e.wrapLatLng(a),o=e.wrapLatLng(o)),new s(a,o)},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),i=new a(+e[0],+e[1]);return i.z=+e[2],i},_removeTile:function(t){var e=this._tiles[t];e&&(n.remove(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)})) +},_initTile:function(t){n.addClass(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+1+"px",t.style.height=e.y+1+"px",t.onselectstart=i.falseFn,t.onmousemove=i.falseFn,r.ielt9&&this.options.opacity<1&&n.setOpacity(t,this.options.opacity),r.android&&!r.android23&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,e){var r=this._getTilePos(t),a=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),i.bind(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&i.requestAnimFrame(i.bind(this._tileReady,this,t,null,o)),n.setPosition(o,r),this._tiles[a]={el:o,coords:t,current:!0},e.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t}) +},_tileReady:function(t,e,a){if(this._map){e&&this.fire("tileerror",{error:e,tile:a,coords:t});var o=this._tileCoordsToKey(t);a=this._tiles[o],a&&(a.loaded=+new Date,this._map._fadeAnimated?(n.setOpacity(a.el,0),i.cancelAnimFrame(this._fadeFrame),this._fadeFrame=i.requestAnimFrame(this._updateOpacity,this)):(a.active=!0,this._map.options.toPhantom||this._pruneTiles()),e||(n.addClass(a.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:a.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),this._map.options.toPhantom?window.console&&console.log("done"):r.ielt9||!this._map._fadeAnimated?i.requestAnimFrame(this._pruneTiles,this):setTimeout(i.bind(this._pruneTiles,this),250))) +}},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new a(this._wrapX?i.wrapNum(t.x,this._wrapX):t.x,this._wrapY?i.wrapNum(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new o(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles){if(!this._tiles[t].loaded){return !1}}return !0}});return h}),define("chart/map/layer/TileLayer",["require","./GridLayer","../../../utils/BaseUtils","../../../dom/DomUtils","../CRS","../../../dom/Browser"],function(t){var e=t("./GridLayer"),i=t("../../../utils/BaseUtils"),n=t("../../../dom/DomUtils"),r=t("../CRS"),a=t("../../../dom/Browser"),o="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=",s=e.extend({options:{minZoom:0,maxZoom:18,maxNativeZoom:null,minNativeZoom:null,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(t,e){this._url=t,e=i.setOptions(this,e),e.detectRetina&&a.retina&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom++):(e.zoomOffset++,e.maxZoom--),e.minZoom=Math.max(0,e.minZoom)),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")) +},setUrl:function(t,e){return this._url=t,e||this.redraw(),this},createTile:function(t,e){var n=document.createElement("img");return VanHammer.on(n,"load",i.bind(this._tileOnLoad,this,e,n)),VanHammer.on(n,"error",i.bind(this._tileOnError,this,e,n)),this.options.crossOrigin&&(n.crossOrigin=""),n.alt="",n.setAttribute("role","presentation"),n.src=this.getTileUrl(t),n},getTileUrl:function(t){var e={r:a.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var n=this._globalTileRange.max.y-t.y; +this.options.tms&&(e.y=n),e["-y"]=n}return i.template(this._url,i.extend(e,this.options))},_tileOnLoad:function(t,e){a.ielt9?setTimeout(i.bind(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,i){var n=this.options.errorTileUrl;n&&(e.src=n),t(i,e)},getTileSize:function(){var t=this._map,i=e.prototype.getTileSize.call(this),n=this._tileZoom+this.options.zoomOffset,r=this.options.minNativeZoom,a=this.options.maxNativeZoom;return null!==r&&r>n?i.divideBy(t.getZoomScale(r,n)).round():null!==a&&n>a?i.divideBy(t.getZoomScale(a,n)).round():i +},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom,i=this.options.zoomReverse,n=this.options.zoomOffset,r=this.options.minNativeZoom,a=this.options.maxNativeZoom;return i&&(t=e-t),t+=n,null!==r&&r>t?r:null!==a&&t>a?a:t},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles){this._tiles[t].coords.z!==this._tileZoom&&(e=this._tiles[t].el,e.onload=i.falseFn,e.onerror=i.falseFn,e.complete||(e.src=o,n.remove(e))) +}}});return s.WMS=s.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var n=i.extend({},this.defaultWmsParams);for(var r in e){r in this.options||(n[r]=e[r])}e=i.setOptions(this,e),n.width=n.height=e.tileSize*(e.detectRetina&&a.retina?2:1),this.wmsParams=n},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version); +var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,s.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToBounds(t),n=this._crs.project(e.getNorthWest()),a=this._crs.project(e.getSouthEast()),o=(this._wmsVersion>=1.3&&this._crs===r.EPSG4326?[a.y,n.x,n.y,a.x]:[n.x,a.y,a.x,n.y]).join(","),h=s.prototype.getTileUrl.call(this,t);return h+i.getParamString(this.wmsParams,h,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+o},setParams:function(t,e){return i.extend(this.wmsParams,t),e||this.redraw(),this +}}),s}),define("chart/map/layer/Control",["require","../../../utils/Class","../../../utils/BaseUtils","../../../dom/DomUtils"],function(t){var e=t("../../../utils/Class"),i=t("../../../utils/BaseUtils"),n=t("../../../dom/DomUtils"),r=e.extend({options:{position:"bottomleft"},initialize:function(t){i.setOptions(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container +},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),r=t._controlCorners[i];return n.addClass(e,"leaflet-control"),-1!==i.indexOf("bottom")?r.insertBefore(e,r.firstChild):r.appendChild(e),this},remove:function(){return this._map?(n.remove(this._container),this.onRemove&&this.onRemove(this._map),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}});return r.Attribution=r.extend({options:{position:"bottomright",prefix:""},initialize:function(t){i.setOptions(this,t),this._attributions={} +},onAdd:function(t){return t.attributionControl=this,this._container=n.create("div","leaflet-control-attribution"),this._update(),this._container},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[]; +for(var e in this._attributions){this._attributions[e]&&t.push(e)}var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(" | ")}}}),r.Zoom=r.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"-",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=n.create("div",e+" leaflet-bar"),r=this.options;return this._zoomInButton=this._createButton(r.zoomInText,r.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(r.zoomOutText,r.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i.style.position="absolute",i.style.left=r._topLeft.x+"px",i.style.top=r._topLeft.y+"px",i.style["z-index"]=800,i.style["pointer-events"]="auto",i +},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1)) +},_createButton:function(t,e,i,r,a){var o=n.create("a",i,r);return o.innerHTML=t,o.href="#",o.title=e,o.setAttribute("role","button"),o.setAttribute("aria-label",e),VanHammer.on(o,"mousedown dblclick",n.stopPropagation).on(o,"click",n.stop).on(o,"click",a.bind(this)).on(o,"click",this._refocusOnMap.bind(this)),o},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";n.removeClass(this._zoomInButton,e),n.removeClass(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMinZoom())&&n.addClass(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMaxZoom())&&n.addClass(this._zoomInButton,e) +}}),r}),define("chart/map/layer/FeatureGroup",["require","./../../../vector/shape/LayerGroup","../LatLngBounds"],function(t){var e=t("./../../../vector/shape/LayerGroup"),i=t("../LatLngBounds"),n=e.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),e.prototype.addLayer.call(this,t),this)},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.removeEventParent(this),e.prototype.removeLayer.call(this,t),this):this},setStyle:function(t){return this.invoke("setStyle",t) +},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new i;for(var e in this._layers){var n=this._layers[e];t.extend(n.getBounds?n.getBounds():n.getLatLng())}return t}});return n}),define("utils/LineUtils",["require","./Point2D"],function(t){var e=t("./Point2D");return{simplify:function(t,e){if(!e||!t.length){return t.slice()}var i=e*e;return t=this._reducePoints(t,i),t=this._simplifyDP(t,i)},pointToSegmentDistance:function(t,e,i){return Math.sqrt(this._sqClosestPointOnSegment(t,e,i,!0)) +},closestPointOnSegment:function(t,e,i){return this._sqClosestPointOnSegment(t,e,i)},_simplifyDP:function(t,e){var i=t.length,n=typeof Uint8Array!=void 0+""?Uint8Array:Array,r=new n(i);r[0]=r[i-1]=1,this._simplifyDPStep(t,r,e,0,i-1);var a,o=[];for(a=0;i>a;a++){r[a]&&o.push(t[a])}return o},_simplifyDPStep:function(t,e,i,n,r){var a,o,s,h=0;for(o=n+1;r-1>=o;o++){s=this._sqClosestPointOnSegment(t[o],t[n],t[r],!0),s>h&&(a=o,h=s)}h>i&&(e[a]=1,this._simplifyDPStep(t,e,i,n,a),this._simplifyDPStep(t,e,i,a,r)) +},_reducePoints:function(t,e){for(var i=[t[0]],n=1,r=0,a=t.length;a>n;n++){this._sqDist(t[n],t[r])>e&&(i.push(t[n]),r=n)}return a-1>r&&i.push(t[a-1]),i},clipSegment:function(t,e,i,n,r){var a,o,s,h=n?this._lastCode:this._getBitCode(t,i),l=this._getBitCode(e,i);for(this._lastCode=l;;){if(!(h|l)){return[t,e]}if(h&l){return !1}a=h||l,o=this._getEdgeIntersection(t,e,a,i,r),s=this._getBitCode(o,i),a===h?(t=o,h=s):(e=o,l=s)}},_getEdgeIntersection:function(t,i,n,r,a){var o,s,h=i.x-t.x,l=i.y-t.y,u=r.min,c=r.max; +return 8&n?(o=t.x+h*(c.y-t.y)/l,s=c.y):4&n?(o=t.x+h*(u.y-t.y)/l,s=u.y):2&n?(o=c.x,s=t.y+l*(c.x-t.x)/h):1&n&&(o=u.x,s=t.y+l*(u.x-t.x)/h),new e(o,s,a)},_getBitCode:function(t,e){var i=0;return t.xe.max.x&&(i|=2),t.ye.max.y&&(i|=8),i},_sqDist:function(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n},_sqClosestPointOnSegment:function(t,i,n,r){var a,o=i.x,s=i.y,h=n.x-o,l=n.y-s,u=h*h+l*l;return u>0&&(a=((t.x-o)*h+(t.y-s)*l)/u,a>1?(o=n.x,s=n.y):a>0&&(o+=h*a,s+=l*a)),h=t.x-o,l=t.y-s,r?h*h+l*l:new e(o,s) +},clipPolygon:function(t,e,i){var n,r,a,o,s,h,l,u,c,d=[1,4,2,8];for(r=0,l=t.length;l>r;r++){t[r]._code=this._getBitCode(t[r],e)}for(o=0;4>o;o++){for(u=d[o],n=[],r=0,l=t.length,a=l-1;l>r;a=r++){s=t[r],h=t[a],s._code&u?h._code&u||(c=this._getEdgeIntersection(h,s,u,e,i),c._code=this._getBitCode(c,e),n.push(c)):(h._code&u&&(c=this._getEdgeIntersection(h,s,u,e,i),c._code=this._getBitCode(c,e),n.push(c)),n.push(s))}t=n}return t}}}),define("chart/map/layer/GeoJSON",["require","./FeatureGroup","../../../utils/BaseUtils","../../../utils/Point2D","../../../utils/Bounds","../LatLng","../LatLngBounds","../Marker","../../../vector/shape/Path","../../../utils/LineUtils"],function(t){var e=t("./FeatureGroup"),i=t("../../../utils/BaseUtils"),n=t("../../../utils/Point2D"),r=t("../../../utils/Bounds"),a=t("../LatLng"),o=t("../LatLngBounds"),s=(t("../Marker"),t("../../../vector/shape/Path")),h=t("../../../utils/LineUtils"),l=e.extend({initialize:function(t,e){i.setOptions(this,e),this._layers={},this._featureLayerMap={},t&&this.addData(t) +},addData:function(t){var e,n,r,a=i.isArray(t)?t:t.features;if(a){for(e=0,n=a.length;n>e;e++){r=a[e],(r.geometries||r.geometry||r.features||r.coordinates)&&this.addData(r)}return this}var o=this.options;if(o.filter&&!o.filter(t)){return this}var s=this.geometryToLayer(t,o);return s?(s.options=s.properties||i.extend({},this.options),this._featureLayerMap[i.stamp(t)]=s,this.addLayer(s)):this},getLayerByFeature:function(t){return this._featureLayerMap[i.stamp(t)]},geometryToLayer:function(t,n){var r,a,o,s="Feature"===t.type?t.geometry:t,h=s?s.coordinates:null,l=[],d=n&&n.coordsToLatLng||this.coordsToLatLng; +if(!h&&!s){return null}switch(s.type){case"Polygon":case"MultiPolygon":return r=this.coordsToLatLngs(h,"Polygon"===s.type?1:2,d),new c(r,n);case"LineString":r=this.coordsToLatLngs(h,0,d);var f=new u(r,n);return f.properties=i.extend({fill:"none","fill-opacity":1,"stroke-width":1,stroke:"white","stroke-opacity":1},t.properties),f;case"GeometryCollection":for(a=0,o=s.geometries.length;o>a;a++){var p=this.geometryToLayer({geometry:s.geometries[a],type:"Feature",properties:t.properties},n);p&&l.push(p) +}return new e(l)}},coordsToLatLng:function(t){return new a(t[1],t[0],t[2])},coordsToLatLngs:function(t,e,i){for(var n,r=[],a=0,o=t.length;o>a;a++){n=e?this.coordsToLatLngs(t[a],e-1,i):(i||this.coordsToLatLng)(t[a]),r.push(n)}return r},latLngToCoords:function(t){return void 0!==t.alt?[t.lng,t.lat,t.alt]:[t.lng,t.lat]},latLngsToCoords:function(t,e,i){for(var n=[],r=0,a=t.length;a>r;r++){n.push(e?l.latLngsToCoords(t[r],e-1,i):l.latLngToCoords(t[r]))}return !e&&i&&n.push(n[0]),n},asFeature:function(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t} +}}),u=s.extend({initialize:function(t,e){i.setOptions(this,e),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return !this._latlngs.length},closestLayerPoint:function(t){for(var e,i,n=1/0,r=null,a=h._sqClosestPointOnSegment,o=0,s=this._parts.length;s>o;o++){for(var l=this._parts[o],u=1,c=l.length;c>u;u++){e=l[u-1],i=l[u];var d=a(t,e,i,!0);n>d&&(n=d,r=a(t,e,i))}}return r&&(r.distance=Math.sqrt(n)),r +},getCenter:function(){if(!this._map){throw new Error("Must add layer to map before using getCenter()")}var t,e,i,n,r,a,o,s=this._rings[0],h=s.length;if(!h){return null}for(t=0,e=0;h-1>t;t++){e+=s[t].distanceTo(s[t+1])/2}if(0===e){return this._map.layerPointToLatLng(s[0])}for(t=0,n=0;h-1>t;t++){if(r=s[t],a=s[t+1],i=r.distanceTo(a),n+=i,n>e){return o=(n-e)/i,this._map.layerPointToLatLng([a.x-o*(a.x-r.x),a.y-o*(a.y-r.y)])}}},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=a.create(t),e.push(t),this._bounds.extend(t),this.redraw() +},_setLatLngs:function(t){this._bounds=new o,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return u._flat(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],i=u._flat(t),n=0,r=t.length;r>n;n++){i?(e[n]=a.create(t[n]),this._bounds.extend(e[n])):e[n]=this._convertLatLngs(t[n])}return e},_project:function(){var t=new r;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t);var e=this._clickTolerance(),i=new n(e,e);this._bounds.isValid()&&t.isValid()&&(t.min._subtract(i),t.max._add(i),this._pxBounds=t) +},_projectLatlngs:function(t,e,i){var n,r,o=t[0] instanceof a,s=t.length;if(o){for(r=[],n=0;s>n;n++){r[n]=this._map.latLngToLayerPoint(t[n]),i.extend(r[n])}e.push(r)}else{for(n=0;s>n;n++){this._projectLatlngs(t[n],e,i)}}},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t)){if(this.options.noClip){return void (this._parts=this._rings)}var e,i,n,r,a,o,s,l=this._parts;for(e=0,n=0,r=this._rings.length;r>e;e++){for(s=this._rings[e],i=0,a=s.length; +a-1>i;i++){o=h.clipSegment(s[i],s[i+1],t,i,!0),o&&(l[n]=l[n]||[],l[n].push(o[0]),(o[1]!==s[i+1]||i===a-2)&&(l[n].push(o[1]),n++))}}}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,i=0,n=t.length;n>i;i++){t[i]=h.simplify(t[i],e)}},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._updatePoly()},_updatePoly:function(t){this._path.attr("d",this.pointsToPath(this._parts,t))},pointsToPath:function(t,e){var i,n,r,a,o,s,h=""; +for(i=0,r=t.length;r>i;i++){for(o=t[i],n=0,a=o.length;a>n;n++){s=o[n],h+=(n?"L":"M")+s.x+" "+s.y}h+=e?"z":""}return h||"M0 0"},_containsPoint:function(t,e){var i,n,r,a,o,s,l=this._clickTolerance();if(!this._pxBounds.contains(t)){return !1}for(i=0,a=this._parts.length;a>i;i++){for(s=this._parts[i],n=0,o=s.length,r=o-1;o>n;r=n++){if((e||0!==n)&&h.pointToSegmentDistance(t,s[r],s[n])<=l){return !0}}}return !1}});u._flat=function(t){return !i.isArray(t[0])||"object"!=typeof t[0][0]&&"undefined"!=typeof t[0][0] +};var c=u.extend({isEmpty:function(){return !this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map){throw new Error("Must add layer to map before using getCenter()")}var t,e,i,n,r,a,o,s,h,l=this._rings[0],u=l.length;if(!u){return null}for(a=o=s=0,t=0,e=u-1;u>t;e=t++){i=l[t],n=l[e],r=i.y*n.x-n.y*i.x,o+=(i.x+n.x)*r,s+=(i.y+n.y)*r,a+=3*r}return h=0===a?l[0]:[o/a,s/a],this._map.layerPointToLatLng(h)},_convertLatLngs:function(t){var e=u.prototype._convertLatLngs.call(this,t),i=e.length; +return i>=2&&e[0] instanceof a&&e[0].equals(e[i-1])&&e.pop(),e},_setLatLngs:function(t){u.prototype._setLatLngs.call(this,t),u._flat(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return u._flat(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options["stroke-width"],i=new n(e,e);if(t=new r(t.min.subtract(i),t.max.add(i)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t)){if(this.options.noClip){return void (this._parts=this._rings) +}for(var a,o=0,s=this._rings.length;s>o;o++){a=h.clipPolygon(this._rings[o],t,!0),a.length&&this._parts.push(a)}}},_updatePath:function(){this._updatePoly(!0)},_containsPoint:function(t){var e,i,n,r,a,o,s,h,l=!1;if(!this._pxBounds.contains(t)){return !1}for(r=0,s=this._parts.length;s>r;r++){for(e=this._parts[r],a=0,h=e.length,o=h-1;h>a;o=a++){i=e[a],n=e[o],i.y>t.y!=n.y>t.y&&t.x<(n.x-i.x)*(t.y-i.y)/(n.y-i.y)+i.x&&(l=!l)}}return l||u.prototype._containsPoint.call(this,t,!0)}});return l}),define("utils/getJson",["require","./BaseUtils"],function(t){function e(t){var e=t.responseType; +return e&&"text"!==e?t.response:t.responseText}function i(t){return 1===t.length?function(e,i){t(null==e?i:null)}:t}function n(t,n,r,o){function s(){var t,i=c.status;(!i&&e(c)||i>=200&&300>i||304===i)&&(t=r.call(h,c),o(t))}var h={},l=a.dispatch("beforesend","progress","load","error"),u={},c=new XMLHttpRequest,d=null;return !this.XDomainRequest||"withCredentials" in c||!/^(http(s)?:)?\/\//.test(t)||(c=new XDomainRequest),"onload" in c?c.onload=c.onerror=s:c.onreadystatechange=function(){c.readyState>3&&s() +},h.header=function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?u[t]:(null==e?delete u[t]:u[t]=e+"",h)},h.mimeType=function(t){return arguments.length?(n=null==t?null:t+"",h):n},h.responseType=function(t){return arguments.length?(d=t,h):d},h.response=function(t){return r=t,h},["get","post"].forEach(function(t){h[t]=function(){return h.send.apply(h,[t].concat(a.toArray(arguments)))}}),h.send=function(e,i,r){if(2===arguments.length&&"function"==typeof i&&(r=i,i=null),c.open(e,t,!1),null==n||"accept" in u||(u.accept=n+",*/*"),c.setRequestHeader){for(var a in u){c.setRequestHeader(a,u[a]) +}}return null!=n&&c.overrideMimeType&&c.overrideMimeType(n),null!=d&&(c.responseType=d),null!=r&&h.on("error",r).on("load",function(t){r(null,t)}),l.beforesend.call(h,c),c.send(null==i?null:i),h},h.abort=function(){return c.abort(),h},a.rebind(h,l,"on"),null==o?h:h.get(i(o))}function r(t){return JSON.parse(t.responseText)}var a=t("./BaseUtils");return function(t,e){return n(t,"application/json",r,e)}}),define("component/Geo",["require","./Base","../utils/BaseUtils","../utils/QueryUtils","../utils/GeoUtils","../Constants","../ComponentLibrary","../chart/map/layer/ImageOverlay","../chart/map/layer/TileLayer","../chart/map/layer/Control","../chart/map/layer/GeoJSON","../utils/getJson","../chart/map/CRS","../chart/map/LatLngBounds"],function(t){function e(t){var e; +return t&&"object"==typeof t?e=t:window.FR&&window.FR.ajax?FR.ajax({type:"POST",url:t,dataType:"json",async:!1,cache:!1,success:function(t){e=t}}):f(t,function(t){e=t}),e}var i=t("./Base"),n=t("../utils/BaseUtils"),r=t("../utils/QueryUtils"),a=t("../utils/GeoUtils"),o=t("../Constants"),s=t("../ComponentLibrary"),h={},l=t("../chart/map/layer/ImageOverlay"),u=t("../chart/map/layer/TileLayer"),c=t("../chart/map/layer/Control"),d=t("../chart/map/layer/GeoJSON"),f=t("../utils/getJson"),p=t("../chart/map/CRS"),g=t("../chart/map/LatLngBounds"),m="Point",v="LineString",_="MultiLineString",y=i.extend({_refresh:function(){this._loaded=!1; +var t=n.stamp(this.vanchart);h[t]=h[t]||{}},doLayout:function(){this._loadGeo();var t,e=this.vanchart,i=this.options;n.hasDefined(i.zoomListener)?t=i.zoomListener:n.hasDefined(i.zoomLevel)&&(t=i.zoomLevel);var r=i.viewCenter?[i.viewCenter[1],i.viewCenter[0]]:null,a=!isNaN(+t);if(a&&r){e.setView(r,t)}else{var o=this._getFitBounds();a?(e.fitBounds(o,{animate:!1,zoom:t}),r=e.getCenter(),e.setView(r,t),r=e.getCenter()):r?e.fitBounds(o,{animate:!1}):(e.fitBounds(o,{animate:!1}),r=e.getCenter()),r&&e.panTo(r,{animate:!1}) +}this._topLeft={x:0,y:e.bounds.y}},render:function(){var t=this.options,e=this.jsonData,i=n.stamp(this.vanchart),r=t.tileLayer||this.vanchart.options.geo.tileLayer,a=t.attribution||this.vanchart.options.geo.attribution||"",o=t.wmsUrl||this.vanchart.options.geo.wmsUrl,s=t.wmsLayer||this.vanchart.options.geo.wmsLayer,d=this._imageBackgroundLayer||this._tileLayer||this._wmsLayer;if(this._imageBackgroundLayer=this._tileLayer=this._wmsLayer=null,this._isImageMap()&&(t.imageUrl||e.imageString)){var f=t.imageUrl||"data:image/"+e.imageSuffix+";base64,"+e.imageString,p=e.imageWidth,g=e.imageHeight,m=[[0,0],[g*this.scale,p*this.scale]],v=d&&d._url===f,_=this._imageBackgroundSize&&p===this._imageBackgroundSize[0]&&g===this._imageBackgroundSize[1]; +_&&v?this._imageBackgroundLayer=d:(this._imageBackgroundSize=[p,g],this._imageBackgroundLayer=new l(f,m).addTo(this.vanchart))}else{r?(this._attribution=h[i][a]||(new c.Attribution).addAttribution(a),h[i][a]=this._attribution,this._tileLayer=h[i][r]||new u(r,t.tileLayerOptions||{}),h[i][r]=this._tileLayer,h[i][r].addTo(this.vanchart),h[i][a].addTo(this.vanchart)):o&&(this._wmsLayer=h[i][o]||new u.WMS(o,{layers:s.join(",")}),h[i][o]=this._wmsLayer,h[i][o].addTo(this.vanchart))}this.renderAreaFeatures(),t.control&&(t._topLeft=this._topLeft,this._zoomControl=this._zoomControl||new c.Zoom(t).addTo(this.vanchart)); +var y=this._imageBackgroundLayer||this._tileLayer||this._wmsLayer;d&&d!=y&&this.vanchart.removeLayer(d)},needsNullArea:function(){var t=this.vanchart;return t.isAreaMap()||t.isHeatMap()||t.seriesOfType(o.AREA_MAP).length},renderAreaFeatures:function(){if(this.needsNullArea()){var t=this.defaultAreaStyle();this.geoJsonLayer=this.geoJsonLayer||new d(this.jsonData,t),this.geoJsonLayer.addTo(this.vanchart)}},getLayerByFeature:function(t){return this.geoJsonLayer.getLayerByFeature(t)},defaultAreaStyle:function(){var t=this.vanchart.options.plotOptions,e=[t[o.AREA_MAP],t]; +return{fill:n.pick(r.queryList(e,"nullColor"),"#cccccc"),"fill-opacity":n.pick(r.queryList(e,"opacity"),0.75),"stroke-width":n.pick(r.queryList(e,"borderWidth"),1),stroke:n.pick(r.queryList(e,"borderColor"),"#ffffff"),"stroke-opacity":n.pick(r.queryList(e,"borderOpacity"),1)}},geoName:function(){return this.options.name},_loadGeo:function(){if(this._loaded||this._dataUrl==this.options.data){return this._loaded=!0,void this._checkCRS()}this._loaded=!0,this._dataUrl=this.options.data,this.geoJsonLayer&&this.geoJsonLayer.remove(),this.geoJsonLayer=null; +var t=this.options,i=this,n=this.vanchart;i._validPointName={},i._validAreaName={},i._extendedLineFeature=[],t.data?i.jsonData=e(t.data):i.jsonData={};for(var r=i.jsonData&&i.jsonData.features||[],o=0,s=r.length;s>o;o++){var h=r[o],l=h.geometry;l.type==m?(i._validPointName[h.properties.name]=i._validPointName[h.properties.name]||[],i._validPointName[h.properties.name].push(h)):l.type==v||l.type==_?i._extendedLineFeature.push(h):(i._validAreaName[h.properties.name]=i._validAreaName[h.properties.name]||[],i._validAreaName[h.properties.name].push(h)) +}if(this.scale=1,this._isImageMap()){var u=n.width,c=n.height,d=u/i.jsonData.imageWidth,f=c/i.jsonData.imageHeight;this.scale=Math.min(d,f),a.scaleGeo(i.jsonData,i.scale)}this._checkCRS()},getDataPointLngLat:function(t,e){if(!e||t.options.lnglat){return t.options.lnglat}var i=t.series&&t.series.type==o.AREA_MAP?e.properties.center:e.geometry.coordinates;if(!i){if(this._isImageMap()){var n=this.jsonData.imageWidth*this.scale,r=0,s=this.jsonData.imageHeight*this.scale,h=0,l=a.getAllPoints(e);l.forEach(function(t){isNaN(t[0])||isNaN(t[1])||(n=Math.min(n,t[0]),r=Math.max(r,t[0]),s=Math.min(s,t[1]),h=Math.max(h,t[1])) +}),i=[(r+n)/2,(h+s)/2]}else{var u=a.bounds(e),c=(u[0][0]+u[1][0])/2,d=(u[0][1]+u[1][1])/2;i=[c,d]}}return i},getZoomListener:function(){return this.options.zoomListener||this.options.zoomLevel},getFeaturesByName:function(t,e){return this._loadGeo(),this._validAreaName&&this._validPointName?e==o.AREA_MAP?this._validAreaName[t]:this._validPointName[t]:void 0},_isImageMap:function(){return this.jsonData&&this.jsonData.imageWidth},_checkCRS:function(){this.vanchart.options.crs=this._isImageMap()?p.Simple:p.EPSG3857 +},_getFitBounds:function(){function t(t){var a=t.lnglat||t.options.lnglat;if(!a){var o=i.getFeaturesByName(t.name,t.series.type);a=i.getDataPointLngLat(t,o&&o[0])}a&&(e=!1,n=Math.min(n,a[0]),r=Math.max(r,a[0]),s=Math.min(s,a[1]),h=Math.max(h,a[1]))}var e=!0,i=this,n=180,r=-180,s=90,h=-90;if(this._isImageMap()){n=this.jsonData.imageWidth*this.scale,r=0,s=this.jsonData.imageHeight*this.scale,h=0}else{for(var l=this.vanchart.series,u=0,c=l.length;c>u;u++){l[u].visible&&l[u].type!=o.AREA_MAP&&(l[u].type===o.LINE_MAP?l[u].points.forEach(function(e){t(e.options.from),t(e.options.to) +}):l[u].points.forEach(t))}if(e&&this.jsonData&&this.jsonData.features.length){var d=a.bounds(this.jsonData),f=d[0],p=d[1];return[[f[1],f[0]],[p[1],p[0]]]}}return[[Math.min(s,h),Math.min(n,r)],[Math.max(h,s),Math.max(r,n)]]},remove:function(){if(this.geoJsonLayer&&this.geoJsonLayer.remove(),this.geoJsonLayer){var t=this.geoJsonLayer.options;this.geoJsonLayer.eachLayer(function(e){e.options=n.extend({},t)},this)}this._imageBackgroundLayer&&this.vanchart.removeLayer(this._imageBackgroundLayer),this._attribution&&this._attribution.remove(),this._tileLayer&&this._tileLayer.remove(),this._wmsLayer&&this._wmsLayer.remove(),this._imageBackgroundLayer=this._attribution=this._tileLayer=this._wmsLayer +},resize:function(){if(this._isImageMap()){var t=(this.options,this.jsonData),e=this.scale,i=this.vanchart,n=i.width,r=i.height,s=n/t.imageWidth,h=r/t.imageHeight;if(this.scale=Math.min(s,h),a.scaleGeo(t,this.scale/e),this._imageBackgroundLayer){var l=[[0,0],[t.imageHeight*this.scale,t.imageWidth*this.scale]];this._imageBackgroundLayer.setBounds(g.create(l))}this.geoJsonLayer&&(this.geoJsonLayer.remove(),this.geoJsonLayer=null,i.validPoints.forEach(function(t){t.series.type==o.AREA_MAP&&(t.layers=null) +}))}}});return s.register(s.GEO_COMPONENT,y),y}),define("component/DrillTools",["require","./Base","../utils/BaseUtils","../utils/ColorUtils","../Constants","../ComponentLibrary"],function(t){var e=t("./Base"),i=t("../utils/BaseUtils"),n=t("../utils/ColorUtils"),r=t("../Constants"),a=t("../ComponentLibrary"),o=0.417,s=0.583,h=0.25,l=0.333,u=0.1665,c=8,d=function(){return i.paddingConvertWithScale(c)},f=e.extend({_refresh:function(){this.iconData=[]},doLayout:function(){i.calculateFontSizeWithScale(this.options&&this.options.style); +var t=i.getTextDimension("test",this.options.style),e=t.height*(2*u+1);this._setComponentBounds(r.TOP,e+d()),this.bounds.height=e},getBookMarkPath:function(t){var e=this.options.style,n=t.layerIndex,r=i.getTextDimension(t.geo.geoName(),e),a=(0===n?o:s)+h;a=r.height*a+r.width;var c=r.height*l,d=(1+2*u)*r.height,f=[0,0],p=[a,0],g=[a+c,d/2],m=[a,d],v=[0,d];return"M"+f+"L"+p+"L"+g+"L"+m+"L"+v+"Z"},isCurrent:function(t){var e=this.iconData[this.iconData.length-1];return e.series==t.series},textColor:function(t){return this.isCurrent(t)?this.options.currentColor:this.options.style.color +},mouseOverColor:function(t){var e;if(!(e=this.options.mouseOverColor)){var i=this.textColor(t),r=n.getRGBAColorArray(i),a=n.rgb2hsb(r[0],r[1],r[2]),o=n.hsb2rgb(a[0],a[1]/2,(a[2]+1)/2);e=n.toColor(o,"rgb")}return e},leftPadding:function(t){return 0===t.layerIndex?o:s},calculateExitAnimation:function(t){for(var e=600,i=0,n=t.length;n>i;i++){t[i].time=e,e=Math.max(e-100,0)}var r=0;for(i=n-1;i>=0;i--){t[i].time?(t[i].delay=r,r+=200):t[i].delay=0}},getMarkPos:function(t){for(var e=0,i=0;i=0;a--){var o=this.iconData[a];if(this.drillItems[a]){var s=this.drillItems[a]; +s.datum(o),s.path.attr({d:t.getBookMarkPath(o)}),s.text.style(i.extend({},this.options.style)).attr(t._getTextAttr(o)).style({fill:this.textColor(o)}).textContent(o.geo.geoName())}else{o.aniStart=this.getMarkAnimationStartPos(o),o.aniEnd=this.getMarkPos(o),this.drillItems[a]=this._createItem(o)}}var h=this.drillItems.splice(this.iconData.length,this.drillItems.length);this.calculateExitAnimation(h);for(var a=0,l=h.length;l>a;a++){var o=h[a];o.animate({duration:o.time,delay:o.delay,ease:"quad-in",attr:{transform:i.makeTranslate([o.datum().aniStart,0]),opacity:0}}).remove() +}this.drillItems.length=this.iconData.length},_createItem:function(t){var e=this,n=e.vanchart,r=n.renderer,a=this.options,o=r.group().style({cursor:"pointer"}).datum(t);return o.path=r.path({d:e.getBookMarkPath(t)}).style({fill:a.backgroundColor,filter:"url(#"+i.stamp(this.shadow)+")"}).addTo(o),o.text=r.text().attr(e._getTextAttr(t)).style(a.style).style({fill:this.textColor(t)}).textContent(t.geo.geoName()).addTo(o),o.attr("transform",i.makeTranslate([t.aniStart,0])).addTo(this.dToolsGroup).animate({duration:500,ease:"cubic-out",attr:{transform:i.makeTranslate([t.aniEnd,0])}}),i.toBack(o.node()),o +},_findDrillTarget:function(t){for(var e,i=t.srcEvent,n=i.target||i.srcElement;n;){for(var r=this.drillItems.length-1;r>=0;r--){this.drillItems[r].node()==n&&(e=this.drillItems[r])}if(e||n==this.dToolsGroup.node()){break}n=n.parentNode}return e},onTap:function(t){var e=this.vanchart,n=e.vancharts,r=this._findDrillTarget(t),o=this.drillItems.indexOf(r),s=this.vanchart.layerMap[o],h=t.srcEvent,l=h.touches&&(h.touches.length?h.touches[0]:h.changedTouches[0]);if(l&&(h.clientX=l.clientX,h.clientY=l.clientY),r&&s){if(s=r.datum(),s.geo){var u=n.doHyperlink; +if(u){var c={event:t.srcEvent,linkKey:a.DRILL_TOOLS,vanchart:e,name:s.geo.geoName()};i.getFormatterFunction(u)(c)}}if(s.drillUpDataPoint){var d=i.getFormatterFunction(this.options.click);d&&d(i.extend({allowDrillType:"up"},s.drillUpDataPoint,{event:t.srcEvent,linkKey:a.DRILL_TOOLS,vanchart:e,name:s.geo.geoName()}),t.srcEvent),t.stop&&t.stop(),e.handler.fire("delayHide","dTools")}e.isMobileFlow()?n.holdDrillUpPoint(s):e.drillUp(s)}},onMouseOver:function(t){var e=this._findDrillTarget(t);e&&e.text.style({fill:this.mouseOverColor(e.datum())}) +},onMouseOut:function(t){var e=this._findDrillTarget(t);e&&e.text.style({fill:this.textColor(e.datum())})},getEvents:function(){return{tap:this.onTap,mouseover:this.onMouseOver,mouseout:this.onMouseOut}},remove:function(){this.dToolsGroup&&this.dToolsGroup.remove(),this.dToolsGroup=null,this.iconData=this.drillItems=[]},_getTextAttr:function(t){var e=this.options,n=i.getTextDimension(t.geo.geoName(),e.style).height;return{x:this.leftPadding(t)*n,y:u*n,dy:"0.85em"}}});return a.register(a.DRILL_TOOLS,f),f +}),define("component/DataSheet",["require","./Base","../utils/BaseUtils","../Constants","./LegendIconFactory","../ComponentLibrary","../utils/BezierEasing","../utils/QueryUtils"],function(t){var e=t("./Base"),i=t("../utils/BaseUtils"),n=t("../Constants"),r=t("./LegendIconFactory"),a=t("../ComponentLibrary"),o=t("../utils/BezierEasing"),s=t("../utils/QueryUtils"),h=400,l=o.css.swing,u=8,c=function(){return i.paddingConvertWithScale(u)},d=4,f=function(){return i.paddingConvertWithScale(d)},p=2,g=function(){return i.paddingConvertWithScale(p) +},m=18,v={color:"#666666",fontSize:"14px",fontFamily:"Verdana"},_=e.extend({doLayout:function(){this._recordForPlotBounds(n.LEFT,Math.round(this.getSeriesNameLength()))},reCalculateSize:function(){this.doLayout()},updateAxisSizeAndBounds:function(){this.maxCateLineHeight=this.maxSeriesLineHeight=null,this._setComponentBounds(n.BOTTOM,this._calculateLineHeight()),this.vanchart.components[a.ZOOM_COMPONENT]&&this.vanchart.getComponent(a.ZOOM_COMPONENT).calcZoomControlsSize()},_calculateLineHeight:function(){this.calculateShowText(); +var t=this._categoryStyle(),e=0,n=Math.ceil(i.getTextHeight(this._seriesStyle())),r=this.options.borderWidth;this.maxCateLineHeight=this._getTextPadding()*(this.maxCateLine+1)+this.maxCateLine*Math.ceil(i.getTextHeight(t))+2*r,this.maxSeriesLineHeight=[];for(var a=0,o=this.seriesNames.length;o>a;a++){var s=this.maxSeriesLine[a],h=s*n+(s+1)*this._getTextPadding()+2*r;this.maxSeriesLineHeight[a]=Math.max(h,this.maxValueLineHeight[a]),e+=this.maxSeriesLineHeight[a]}return this.sheetHeight=Math.ceil(this.maxCateLineHeight+e)+2*r,this.sheetHeight +},calculateShowText:function(){var t=this._getTextPadding();this.maxCateLine=0,this.maxValueLineHeight=[],this.showTextMap=this.showTextMap||{};var e=this.vanchart.xAxis(),n=e._dataDomain,r=e._domain,a=this._categoryStyle(),o=i.getTextHeight(a)+t,h=this.vanchart.bounds.width/r.length,l=this,u=this.options.borderWidth;n.forEach(function(n){var s=i.splitText(l._getTickContent(n,e.options.formatter),a,h-2*u,t);if(l.maxCateLineHeight){var c=Math.min(parseInt(l.maxCateLineHeight/o,10),s.length);s=s.slice(0,c) +}-1!=i.indexOf(r,n)&&(l.maxCateLine=Math.max(l.maxCateLine,s.length)),l.showTextMap[n]=l.showTextMap[n]||{},l.showTextMap[n].categoryArray=s});var c=this.vanchart.series;c.forEach(function(e,n){for(var r,a=e.points,o=0,c=a.length;c>o;o++){var d=a[o],f=d.options[e.getTargetKey()],p=d.category;r=d.options.dataSheet||{},i.calculateFontSizeWithScale(r.style),r=s.merge(r,l.options);var g=r.formatter,m=l._valueStyle(r.style),v=r.borderWidth,_=Math.ceil(i.getTextHeight(m))+t,y=d.isNull?"-":l._getTickContent(f,g),x=i.splitText(y,m,h-2*u,t); +if(l.maxSeriesLineHeight&&l.maxSeriesLineHeight[n]){var T=Math.min(parseInt(l.maxSeriesLineHeight[n]/_,10),x.length);x=x.slice(0,T)}l.showTextMap[p].value=l.showTextMap[p].value||[],l.showTextMap[p].value[n]=l.showTextMap[p].value[n]||{},l.showTextMap[p].value[n].valueArray=x,l.showTextMap[p].value[n].dataSheet=r;var b=x.length*_+t+2*v;l.maxValueLineHeight[n]=Math.max(l.maxValueLineHeight[n]||0,b)}});for(var d=-1;++ds){var d=i.splitText(n.name,o,s,u);e.maxSeriesLine.push(d.length),e.seriesNames.push(d),h=s}else{e.maxSeriesLine.push(1),e.seriesNames.push([n.name]),h=Math.max(a+2*t,h)}var f=e._getLegendType(n);e.seriesIconType.push(f),l=Math.max(l,r.getLegendIconSize(f).width)}),this.maxSeriesWidth=Math.ceil(h+2*g()+l),this.maxSeriesWidth+c()},_categoryStyle:function(){var t=this.vanchart.xAxis(),e=t?t.options.labelStyle:v;return i.calculateFontSizeWithScale(e) +},_seriesStyle:function(){var t=this.vanchart.getComponent(a.LEGEND_COMPONENT),e=t?t.options.style:v;return i.calculateFontSizeWithScale(e)},_valueStyle:function(t){return i.calculateFontSizeWithScale(t||this.options.style)},_getTextPadding:function(){return f()},render:function(){if(this.remove(),this.vanchart.series.length){this.calculateShowText();var t=this.vanchart,e=this.bounds,n=t.renderer,r={x:this.maxSeriesWidth,y:0,width:e.width-this.maxSeriesWidth,height:e.height};this.animationClip=n.createClip(r),this.dataSheetGroup=this.createComponentGroup().attr("transform",i.makeTranslate(this.bounds)),this.borderGroup=n.group().addTo(this.dataSheetGroup),this.animationGroup=n.group().addTo(this.dataSheetGroup),n.clip(this.animationGroup,this.animationClip),n.clip(this.borderGroup,this.animationClip),this._drawBaseTable(),this._drawTableContent() +}},_drawBaseTable:function(){var t=this.options,e=this.maxSeriesWidth,i=this.maxCateLineHeight,n=this.vanchart,r=n.renderer,a=this.dataSheetGroup,o=t.borderWidth,s=this.bounds.width,h=this.bounds.height-o,l={fill:"none",stroke:t.borderColor,"stroke-width":t.borderWidth},u="M"+e+",0L"+s+",0L"+s+" "+h+"L0,"+h+"L0,"+i+"L"+e+","+i+"Z";r.path().attr("d",u).style(l).addTo(a),this._drawSeries()},_drawTableContent:function(){var t=this.vanchart,e=t.xAxis(),n=e._domain,r=e._dataDomain,a=this.getPlotBounds().width,o=a/n.length; +e.isAxisReversed()&&(r=r.slice().reverse(),n=n.slice().reverse());for(var s=-i.indexOf(r,n[0])*o+this.maxSeriesWidth,h=0,l=r.length;l>h;h++){var u=this.showTextMap[r[h]],c=s+o*h;this._drawCategory(u,c,o),this._drawValues(u,c,o)}},zoomRefresh:function(){this.calculateShowText(),this._drawTableContent()},_drawCategory:function(t,e,n){var r=t.categoryArray,a=this.vanchart.renderer;t._category=t._category||[];for(var o,s,u=this._categoryStyle(),c=i.getTextHeight(u),d=this._getTextPadding(),f=this.options,p=this._getStartY(r,u,this.maxCateLineHeight),g=f.borderWidth,m=e+g/2,v=g,_=0; +_s;s++){t.value.push({valueArray:[""]})}}for(var c,d,f=0;fv;v++){for(var y=n[v],x=this.maxSeriesLineHeight[v],T=u+this._getStartY(y,d,x)+0.85*f+h/2,b=g[v],A=0; +Aa;a++){var h=n[a],l=h.options.trendLine;if(l&&h.visible){var u;switch(l.type){case r.LINEAR:u=i.linear;break;case r.LOGARITHMIC:u=i.logarithmic;break;case r.POLYNOMIAL:u=i.polynomial;break;default:case r.EXPONENTIAL:u=i.exponential +}var c=h.getTrendLineXYValues(h),d=h[h.getBaseAxisType()],f=d.getPeriodSize();if(!(c[0].length<=1)){var p,g,m=e(c[2]);m?(g=c[0],p=c[1]):(p=c[0],g=c[1]);var v=u(p,g,this.extendXs(p,l.period,f)),_=o.line().interpolate("cardinal");m&&_.x(function(t){return t[1]}).y(function(t){return t[0]});var y={d:_(v),trendLine:l};t.push(y)}}}this.trendLines=t},extendXs:function(t,e,i){function n(t,e){return Array.apply(null,Array(t)).map(e)}return e&&2===e.length&&t.length>1?n(-e[0],function(e,n){return t[0]-(n+1)*i +}).reverse().concat(t).concat(n(e[1],function(e,n){return t[t.length-1]+(n+1)*i})):t},linear:function(t,e,n){var r,a,o,s,h=i(t,e);return r=n[0],o=h[0]*r+h[1],a=n[n.length-1],s=h[0]*a+h[1],[[r,o],[a,s]]},logarithmic:function(t,e,n){var r=[],a=[],o=Math.min.apply(null,n);t.map(function(t,i){0>=o&&(t+=-o+1),r.push(Math.log(t)),a.push(e[i])});var s=i(r,a);return n.map(function(t){var e=t;return 0>=o&&(t+=-o+1),[e,s[0]*Math.log(t)+s[1]]})},exponential:function(t,e,n){var r=[],a=[],o=Math.min.apply(null,e); +t.map(function(t,i){0>=o&&(e[i]+=-o+1),r.push(t),a.push(Math.log(e[i]))});var s=i(r,a),h=s[0];return s[0]=Math.exp(s[1]),s[1]=h,n.map(function(t){var e=s[0]*Math.exp(t*s[1]);return 0>=o&&(e-=-o+1),[t,e]})},polynomial:function(t,e,i){var n=Math.min(t.length-1,6);n++;for(var r,a=[],o=[],s=0;n>s;s++){a[s]=[],o[s]=[]}var s,h,l,u,c=[],d=[],f=[];for(s=0;n>s;s++){for(h=0;hu;u++){r*=t[h]}a[s][h]=r}}for(s=0;n>s;s++){for(l=0;n>l;l++){for(r=0,h=0;hs;s++){for(r=0,h=0;hs;s++){o[s][0]=o[s][0]/o[0][0]}for(s=1;n>s;s++){for(h=s;n>h;h++){var p=0;for(l=0;s>l;l++){p+=o[l][h]*o[s][l]}if(o[s][h]=o[s][h]-p,h+1!=n){var g=0;for(l=0;s>l;l++){g+=o[l][s]*o[h+1][l]}o[h+1][s]=(o[h+1][s]-g)/o[s][s]}}}for(d[0]=c[0],s=1;n>s;s++){for(r=0,h=0;s>h;h++){r+=o[s][h]*d[h]}d[s]=c[s]-r}for(f[n-1]=d[n-1]/o[n-1][n-1],s=n-2;s>=0;s--){for(r=0,h=s+1;n>h;h++){r+=o[s][h]*f[h]}f[s]=(d[s]-r)/o[s][s]}return i.map(function(t){return[t,f.reduce(function(e,i,n){return e+i*Math.pow(t,n) +},0)]})},_renderTrendLine:function(){this.calcTrendLines();var t=this.trendLines,e=this.bounds,i=this.renderer;if(!this.trendLineGroup){if(!this.trendLines||!this.trendLines.length){return}this.trendLineGroup=this.seriesGroup.append(i.group()),i.clip(this.trendLineGroup,this.plotClip)}this.trendLineGroup.trendLines=this.trendLineGroup.trendLines||[];for(var a=this.trendLineGroup.trendLines,o=0,s=t.length;s>o;o++){var h=t[o],l={d:h.d},u={fill:"none",stroke:h.trendLine.color,"stroke-width":h.trendLine.width,"stroke-dasharray":r.DASH_TYPE[h.trendLine.dashStyle]}; +a[o]?a[o].attr(l).style(u):a[o]=i.path(l).style(u).addTo(this.trendLineGroup),a[o].attr("transform",n.makeTranslate(e))}for(var o=t.length;oa-h/2-E?(u=C,!0):a+h/2+E>e?(u=b,!0):!1},d=function(){return 0>o-s/2-E?(u=A,!0):o+s/2+E>n?(u=T,!0):!1};switch(r){case T:0>o-s-E&&(r=A),r=c()?u+"_"+r:r;break;case A:o+s+E>n&&(r=T),r=c()?u+"_"+r:r;break;case b:0>a-h-E&&(r=C),r=d()?r+"_"+l:r;break;case C:a+h+E>e&&(r=b),r=d()?r+"_"+l:r}return t.direction=r,t},_show:function(t){var e,n,r=this,a=this.options,o=this.renderer,s=o._container,h=o._divContainer,l=i.isSupportSVG()?a.useHtml:!0,u=t.direction||"top"; +this.vanchart.isMap()&&(t=this._considerMapPane(t));var c=this.calculateTranslate(t);e=o.group().addTo(s),this.svgMoreLabels.push(e),e.attr({transform:"translate("+c[0]+","+c[1]+")"}),this.renderSvgBorder(e,o,u),l?(n=o.div().addTo(h),n.style({left:c[0]+"px",top:c[1]+"px"}),this.divMoreLabels.push(n),this.renderHtmlContent(n,o)):this.renderSvgContent(e,o);var d=S+this.getMoreLabelDuration();this.vanchart.setTimeout("moreLabel_remove_timer",function(){r.removeAllMoreLabels()},d),this.resetContentArray() +},borderPathGenerator:function(t,e,i,n,r,a){function o(t){return t.join(",")}function s(t){var e=[w,P,L,M],n=g[t],r=m[2*t+1];return e[t]===i?"L"+o(n)+"L"+o(r):"Q"+o(n)+","+o(r)}function h(t){var e=[T,C,A,b],i=m[2*t+1],n=m[2*t+2];if(e[t]===f){var r,s,h,l,u=[(i[0]+n[0])/2,(i[1]+n[1])/2],c=u[0],d=u[1];switch(t){case 0:r=-1,h=0,s=0,l=-1;break;case 1:r=0,h=-1,s=1,l=0;break;case 2:r=1,h=0,s=0,l=1;break;case 3:r=0,h=1,s=-1,l=0}var p=[c+r*a,d+h*a],g=[c+s*a,d+l*a],v=[c-r*a,d-h*a];return"L"+o(p)+"L"+o(g)+"L"+o(v)+"L"+o(n) +}return"L"+o(n)}t+=n,e+=n;var l,u=r,c={top:"bottom",left:"right",bottom:"top",right:"left"},d=!!c[i],f=d&&c[i];if(d){var p="top"===i||"bottom"===i;l=Math.min(t-(p?2*a:0),e-(p?0:2*a))/2}else{l=Math.min(t,e)/2}u>l&&(u=l);var g=[[0,0],[t,0],[t,e],[0,e]],m=[[0,u],[u,0],[t-u,0],[t,u],[t,e-u],[t-u,e],[u,e],[0,e-u],[0,u]],v="M"+o(m[0])+s(0)+h(0)+s(1)+h(1)+s(2)+h(2)+s(3)+h(3);return v},renderSvgBorder:function(t,e,n){var r=this.options,a=r.borderWidth,o=this.moreLabelWidth,s=this.moreLabelHeight,h=r.borderRadius||O,l=this.borderPathGenerator(o,s,n,a,h,E),u=this.getMoreLabelDuration(),c=e.path().addTo(t),d=this._createMoreLabelShadow(e),y=this.getSvgTransformOrigin(o,s,n),x=function(t,e){var n="translate("+e[0]+","+e[1]+")",r="translate("+-e[0]+","+-e[1]+")",a=n+" scale("+t+") "+r; +return i.isSupportSVG()?a:"scale("+t+")"},T="string"==typeof r.backgroundColor?r.backgroundColor||"rgba(0,0,0,0)":this._createGradientBackground(e,r.backgroundColor);c.attr({d:l,transform:x(1,y),filter:r.shadow?d:"none"}).style({fill:T,stroke:r.borderColor,"stroke-width":r.borderWidth}),this.hasAniamtion&&c.attr("transform",x(0,y)).transition().ease(v).duration(f).attr("transform",x(1,y)).transition().ease(_).delay(f+p+u+g).duration(m).attr("transform",x(0,y))},_createMoreLabelShadow:function(t){return this.borderShadow=this.borderShadow||t.createDropShadowFilter(0,0,4,2),"url(#"+i.stamp(this.borderShadow)+")" +},_createGradientBackground:function(t,e){var n=function(t){return 100*t+"%"},r=n(e.x1),a=n(e.x2),o=n(e.y1),s=n(e.y2),h={x1:r,y1:o,x2:a,y2:s},l={offset:"0%","stop-color":u.colorToHex(e.startColor)},c={offset:"100%","stop-color":u.colorToHex(e.endColor)};return this.backgourndColorGradient=this.backgourndColorGradient||t.colorGradient(h,[l,c]),"url(#"+i.stamp(this.backgourndColorGradient)+")"},getSvgTransformOrigin:function(t,e,i){var n=t/2,r=e/2,a=[n,e];switch(i){case T:a=[n,e];break;case A:a=[n,0]; +break;case C:a=[0,r];break;case b:a=[t,r];break;case L:a=[t,e];break;case P:a=[t,0];break;case M:a=[0,e];break;case w:a=[0,0]}return a},renderSvgContent:function(t,e){var n=this.contentArray,r=i.isSupportSVG()?{dy:"0.32em"}:{},a=this.options,o=this.getMoreLabelDuration(),s=e.group().addTo(t);n.forEach(function(t){var n=e.group().attr({transform:i.makeTranslate([t.x+a.borderWidth,a.borderWidth+t.y+0.65*t.height])}).addTo(s),o=e.text().attr(r).addTo(n);t.data.forEach(function(t){e.tspan().style(t.style).textContent(t.content).addTo(o) +})}),this.hasAniamtion&&s.attr("fill-opacity",0).transition().ease(y).delay(f).duration(p).attr("fill-opacity",1).transition().ease(x).delay(f+p+o).duration(g).attr("fill-opacity",0)},renderHtmlContent:function(t,e){var n=this.contentArray,r=this.getMoreLabelDuration();n.forEach(function(n){var r=n.height,a=e.div().style({top:n.y+"px",left:n.x+"px"}).addTo(t),o=0;n.data.forEach(function(t){var n=t.dim,s=i.clone(t.style);s.display="inline-block",s.top=r-n.height+"px",s.left=o+"px",e.div().style(s).textContent(t.content).addTo(a),o+=n.width +})}),this.hasAniamtion&&t.style("opacity",0).transition().style({opacity:1}).delay(f).duration(p).ease(y).transition().style({opacity:0}).delay(f+p+r).duration(g).ease(x)},collectPoint:function(t){var e=this.options,n=e.formatter,r=t.series,a=r.vanchart,o=a.bounds,s=function(t,e){return to.x+o.width||eo.y+o.height};if(r.calcMoreLabelPosition){var h=r.calcMoreLabelPosition(t,{width:0,height:0});if(s(h.startX,h.startY)){return}}if("object"!=typeof n){try{var l=i.getFormatterFunction(n).call(t); +return void (l&&this.pointsContentArray.push({point:t,seriesMap:[{type:"series",content:l}],changedValueMap:[],valueMap:[],categoryMap:[]}))}catch(u){return}}""!==n.identifier&&this.calculateContent(n,t)},getMoreLabelDuration:function(){var t=this.options.duration;return i.hasDefined(t)?1000*t:3000},layoutContent:function(){var t=this;1===this.pointsContentArray.length?this.onePointMoreLabelLayout(this.pointsContentArray[0]):this.pointsContentArray.forEach(function(e,i,n){i===n.length-1?t.morePointsMoreLabelLayout(e,!0):t.morePointsMoreLabelLayout(e) +}),this.calculateContentDim()},calculateTranslate:function(t){var e=0,i=0,n=t.startX,r=t.startY,a=this.moreLabelWidth,o=this.moreLabelHeight;switch(t.direction){case T:e=n-a/2,i=r-o-E;break;case A:e=n-a/2,i=r+E;break;case C:e=n+E,i=r-o/2;break;case b:e=n-a-E,i=r-o/2;break;case L:e=n-a,i=r-o;break;case P:e=n-a,i=r;break;case M:e=n,i=r-o;break;case w:e=n,i=r}return[e,i]},onePointMoreLabelLayout:function(t){function i(){var t,e,i;x.forEach(function(n){var r=n.type,a=n.content;"x"===r?t=a+"":"y"===r?e=a+"":("size"===r||"value"===r)&&(i=a) +});var n=[],s=[];A&&a(n,y[0].content,_),(1===A&&C||2===A)&&a(n,"/",v),2===A&&a(n,y[1].content,_);var h=C&&null!=i?""+i:"";t&&e?h+=" ("+t+","+e+")":(t||e)&&(h+=" ("+(t||e)+")"),h&&a(n,h,m),r(n),L&&s.push(o(T," ",m)),r(s)}function n(){var t=[],e=[],i=[];A+C>2?(t.push(o(y,"/",_)),e.push(o(x,"/",g))):(A&&t.push(o(y,"/",_)),1===A&&1===C&&t.push({content:"/",style:v}),C&&t.push(o(x,"/",g))),L&&i.push(o(T," ",m)),t.length&&s.contentArray.push({data:t}),e.length&&s.contentArray.push({data:e}),i.length&&s.contentArray.push({data:i}) +}function r(t){t.length&&s.contentArray.push({data:t})}function a(t,e,i){t.push({content:e,style:i})}function o(t,e,i){var n,r=t.length;return 1===r?n=t[0].content:2===r&&(n=t[0].content+e+t[1].content),n?{content:n,style:i}:void 0}var s=this,h=t.point,l=h.series,u=l.type,c=l.vanchart,d=this._getContentStyle(),f=d.plus,p=d.minus,g=d.numerical,m=d.text,v=d.delimiter,_=h.changedValue>0?f:p,y=t.changedValueMap,x=t.valueMap,T=t.seriesMap,b=t.categoryMap;T=b.concat(T);var A=y.length,C=x.length,L=T.length; +c.isMap()||u!==e.BUBBLE_CHART&&u!==e.SCATTER_CHART?n():i()},morePointsMoreLabelLayout:function(t,e){function i(t,e){var i=e?" ":"";switch(t.length){case 2:i+=t[0].content+"/"+t[1].content;break;case 1:i+=t[0].content}return i}function n(t,e,i){t.push({content:e,style:i})}var r=this,a=t.point,o=a.series,s=o.vanchart,h=this._getContentStyle(),l=h.plus,u=h.minus,c=h.numerical,d=h.text,f=h.delimiter,p=a.changedValue>0?l:u,g=t.changedValueMap,m=t.valueMap,v=t.seriesMap,_=t.categoryMap,y=s.isPointOrAreaOrHeatMap()?a.name:a.category,x=g.length,T=m.length,b=v.length,A=_.length,C=[],L=i(g),M=i(m,!0),P=i(v,!0); +x&&n(C,L,p),1===x&&(T||b)&&n(C,"/",f),T&&n(C,M,c),b&&n(C,P,d),C.length&&r.contentArray.push({data:C}),e&&A&&y&&r.contentArray.push({data:[{content:y,style:d}]})},_getContentStyle:function(){if(this.moreLabelStyle){return this.moreLabelStyle}var t=this.options.style,e=t.custom;e&&(e=i.calculateFontSizeWithScale(e)),["plus","minus","numerical","text"].forEach(function(e){t[e]=i.calculateFontSizeWithScale(t[e])});var n=e?e:t.plus,r=e?e:t.minus,a=e?e:t.numerical,o=e?e:t.text,s=e?e:{fontSize:t.plus.fontSize,fontFamily:t.plus.fontFamily,color:"#1515151"}; +return this.moreLabelStyle={plus:n,minus:r,numerical:a,text:o,delimiter:s},this.moreLabelStyle},calculateContent:function(t,n){function r(t){for(var e,i=t,n=[t.name];(e=i.parent)&&e.depth;){i=e,n.unshift(e.name)}return n.join(" / ")}var a=n.series,o=a.vanchart,s=a.type,h=[],l=[],u=[],c=[],d=function(t,e){if(e){var i={type:t,content:e};switch(k[t]){case"changedValue":h.push(i);break;case"value":l.push(i);break;case"series":o.isPointOrAreaOrHeatMap()&&"name"===t||"category"===t?c.push(i):u.push(i)}}}; +t.identifier.substring(1).split("$").forEach(function(a){var o,h=D[a][0],l=D[a][1];o=s===e.TREEMAP_CHART&&"name"===h?r(n):i.format(n["size"==h?"value":h],t[l]),"changedValue"===h&&o>0&&(o="+"+o),d(h,o)}),this.pointsContentArray.push({point:n,changedValueMap:h,valueMap:l,seriesMap:u,categoryMap:c})},resetContentArray:function(){this.pointsContentArray=[],this.contentArray=[]},calculateContentDim:function(){var t=d,e=c,n=0,r=e,a=this.options.borderWidth,o=this.options.useHtml;this.contentArray.forEach(function(a){var s=0,h=0; +a.data.forEach(function(t){var e=i.getTextDimension(t.content,t.style,o);e.height=o?e.height:parseFloat(t.style.fontSize),t.dim=e,s+=e.width,h=Math.max(e.height||0,h)}),a.x=e,a.y=r,a.width=s,a.height=h,n=Math.max(s,n),r+=h+t}),this.moreLabelWidth=n+2*e,this.moreLabelHeight=r-t+e+2*a},render:function(){},getDefaultMoreLabelOptions:function(){return{style:{plus:{color:"#FF4848",fontSize:"22px",fontFamily:"Akrobat,Helvetica"},minus:{color:"#1CBE91",fontSize:"22px",fontFamily:"Akrobat,Helvetica"},numerical:{color:"#151515",fontSize:"12px",fontFamily:"Helvetica,Akrobat"},text:{color:"#151515",fontSize:"12px",fontFamily:"Microsoft YaHei, PingFang SC"}},duration:3000,borderWidth:1,borderColor:"#000",shadow:!1,useHtml:!1} +},_considerMapPane:function(t){var e=this.vanchart._getMapPanePos();return t.startX+=e.x,t.startY+=e.y,t}});return a.register(a.MORELABEL_COMPONENT,I),I}),define("mobile/CrossLine",["require","../component/Base","../utils/BaseUtils","../ComponentLibrary"],function(t){var e=t("../component/Base"),i=t("../utils/BaseUtils"),n=t("../ComponentLibrary"),r="#98B4CD",a={fill:"none",stroke:r,"stroke-width":1},o=e.extend({doLayout:function(){},render:function(){if(!this.group){this.group=this.vanchart.crossLineGroup; +var t=this.vanchart.renderer;this.group.style("display","none"),this._vLine=t.line({x1:0,y1:0,x2:0,y2:2000}).style(a),this._hLine=t.line({x1:0,y1:0,x2:2000,y2:0}).style(a),this._vLine.name="v",this._hLine.name="h",this.group.append(this._vLine),this.group.append(this._hLine)}},show:function(){this.group&&this.group.style("display","")},hide:function(){this.group&&this.group.style("display","none")},setPos:function(t,e,i){this.group&&(this._translateLine(this._vLine,[t,0],i),this._translateLine(this._hLine,[0,e],i),this.show()) +},_translateLine:function(t,e,n){n?t.interrupt(t.name).transition(t.name).ease("ease").duration(250).attr("transform",i.makeTranslate(e)):t.interrupt(t.name).attr("transform",i.makeTranslate(e))}});return n.register(n.CROSS_LINE,o),o}),define("mobile/PlotScroll",["require","../dom/Evented","../component/Base","../utils/BaseUtils","../chart/gantt/ScrollbarItem","../ComponentLibrary"],function(t){function e(t){return +t.toFixed(3)}var i=t("../dom/Evented"),n=t("../component/Base"),r=t("../utils/BaseUtils"),a=t("../chart/gantt/ScrollbarItem"),o=t("../ComponentLibrary"),s=20,h=4,l="rgba(61,77,102,0.3)",u=i.extend({initialize:function(t){this.vanchart=t.vanchart,this.renderer=this.vanchart.renderer,this.group=t.group,this.options=t,this.x=this.y=0,this.barX=this._barBottom(),this.barY=this._barRight() +},show:function(t){this.barX&&this.barX.show(t),this.barY&&this.barY.show(t)},setPos:function(t){if(this.barX&&null!=t.x){var e=t.x/(this.options.width-this.options.innerWidth)||0;this.barX.setPct(e)}if(this.barY&&null!=t.y){var i=t.y/(this.options.height-this.options.innerHeight)||0;this.barY.setPct(i)}},setSize:function(t){var e=this._getLengths(t,"width");this.barX.setPos(0,this._getBarY()),this.barX.setSize(e.length,e.barLength);var e=this._getLengths(t,"height");this.barY.setPos(this._getBarX(),0),this.barY.setSize(e.length,e.barLength),r.extend(this.options,t) +},_barBottom:function(){var t=this._getLengths(this.options,"width");return this._bar("x",0,this._getBarY(),t.length,t.barLength)},_barRight:function(){var t=this._getLengths(this.options,"height");return this._bar("y",this._getBarX(),0,t.length,t.barLength)},_getBarX:function(){return this.options.width-h-1},_getBarY:function(){return this.options.height-h-1},_getLengths:function(t,e){var i=t[e],n="width"===e?t.innerWidth:t.innerHeight,r=i;return{length:r,barLength:Math.max(i/n*r,s)}},_bar:function(t,e,i,n,r){var o=new a({manager:this,group:this.group,x:e,y:i,length:n,barLength:r,dir:t,backgroundSize:h,backgroundColor:"none",backgroundStroke:"none",barColor:l,barHoverColor:l,barSize:h}); +return n===r&&o.show(!1),o},onx:function(t){this.fire("scrollX",{initiator:this,x:t*(this.options.width-this.options.innerWidth)})},ony:function(t){this.fire("scrollY",{initiator:this,y:t*(this.options.height-this.options.innerHeight)})},_isScrollX:function(t){return t.scrollX&&e(t.width)r;++r){var a=t.getAxis(r);i.push(a._domain),n=Math.max(n,this._getMaxZoom(a))}return{domains:i,maxZoom:n}},updateInitState:function(){this.__inited=!0; +var t=this._getAxisInfo(this.vanchart.components.xAxis),e=this._getAxisInfo(this.vanchart.components.yAxis);this.xDomains=t.domains,this.yDomains=e.domains,this.xMaxZoom=t.maxZoom,this.yMaxZoom=e.maxZoom},render:function(){if(this.vanchart.shouldPinch()){this.__inited||this.updateInitState();var t=this.vanchart,e=t.bounds,i=t.getPlotContentBounds();t.axisSize;if(!this.scroll){var n=t.renderer;this.group=n.group({"class":"van-plot-scroll"}).add(),this.group.attr("transform",r.makeTranslate([e.x,e.y])),this.scroll=new u({vanchart:t,group:this.group,width:e.width,height:e.height,innerWidth:e.width,innerHeight:e.height}),this.hide() +}this.scroll.setSize({width:e.width,height:e.height,innerWidth:i.width,innerHeight:i.height}),this.scroll.setPos(i)}}});return o.register(o.PLOT_SCROLL,c),c}),define("mobile/ManagerPie",["require","../utils/BaseUtils","./AbstractManager","../ComponentLibrary"],function(t){function e(t){var e=(t.startAngle+t.endAngle)/2;return -e}function i(t,e,i){if(!(t.length<=1)){null==i&&(i=o);var n;return t.some(function(t){var r=t.startAngle+e,a=t.endAngle+e,s=a-r;return r=(r%o+o)%o,a=r+s,i>=r&&a>=i?(n=t,!0):void 0 +}),n}}var n=t("../utils/BaseUtils"),r=t("./AbstractManager"),a=t("../ComponentLibrary"),o=2*Math.PI,s="PIE_ROTATE_ANI";return r.extend({initialize:function(){r.prototype.initialize.apply(this,arguments);var t=this;this.vanchart.setTimeout("firstPieRotation",function(){t._rotateToFirstSector(),t.vanchart.resize()},1),this._lastSector=null},z:20,getBoundingRect:function(){return this.vanchart.bounds},_getPieSeries:function(){return this.vanchart.series[0]},_moveStart:function(){var t=this._getPieSeries(); +t._removeDataLabels(),this.vanchart.getComponent(a.PIE_INDICATOR).show()},_moveEnd:function(){this._reshowLabel(),this.vanchart.getComponent(a.PIE_INDICATOR).hide()},_reshowLabel:function(){var t=this._getPieSeries();t._calculateLabelPosWhenRadiusFixed(),t._rotateLabels()},_rotatePie:function(t){var e=this._getPieSeries();e._getPointGraphicGroup().interrupt(s),e._getPointGraphicGroup().attr("transform","rotate("+t+")"),e.chartInfo.rotate=n.toRadian(t)},_rotatePieTransition:function(t,e){var i=this._getPieSeries(); +i._getPointGraphicGroup().interrupt(s).transition(s).ease("ease").duration(100).attr("transform","rotate("+t+")").each("end",function(){i.chartInfo.rotate=n.toRadian(t),e&&e()})},_findSectorByTapPos:function(t){var e=this._getPieSeries(),r=e._getAngle(e._getPositionInPie(t.containerPoint)),a=n.toRadian(r);return a=(a+Math.PI/2+o)%o,i(e.points,e.chartInfo.rotate,a)},ontap:function(t){t.stop();var i=t.target||this._findSectorByTapPos(t);if(i){i.fire("tap",t);var r=this,a=e(i);r._moveStart(),this._rotatePieTransition(n.toDegree(a),function(){r._moveEnd() +})}},onpanstart:function(t){if(t.target){t.stop(),this._lastSector=null;var e=this._getPieSeries();this._moveStart(),e.initPos=t.containerPoint,e.initRotate=n.toDegree(e.chartInfo.rotate)}},onpanmove:function(t){var e=this._getPieSeries();if(e.initPos){t.stop();var n=e._getAngle(e._getPositionInPie(e.initPos)),r=e._getAngle(e._getPositionInPie(t.containerPoint)),a=r-n+e.initRotate;this._rotatePie(a);var s=i(e.points,e.chartInfo.rotate,o);this._lastSector!==s&&(this._lastSector=s,s&&s.fire("tap",t)) +}},onpanend:function(t){var r=this._getPieSeries();if(r.initPos){t.stop();var a=i(r.points,r.chartInfo.rotate,o);if(a){var s=this,h=e(a);this._rotatePieTransition(n.toDegree(h),function(){s._moveEnd()})}else{this._moveEnd()}r.initPos=r.initRotate=this.vanchart.handler.panTarget=null}},_rotateToFirstSector:function(){var t=this._getPieSeries(),i=t.points[0];if(i){var r=e(i);this._rotatePie(n.toDegree(r)),t._removeDataLabels(),this._reshowLabel()}}})}),define("mobile/PieIndicator",["require","../component/Base","../utils/BaseUtils","../ComponentLibrary","./ManagerPie"],function(t){function e(t){return -Math.sqrt(t*t-h/2*(h/2)) +}function i(t){var i=e(t),n=[[0,i+s],[-h/2,i],[-h/2,i-10],[h/2,i-10],[h/2,i]],r=n.join(" L");return"M"+r+"Z"}var n=t("../component/Base"),r=t("../utils/BaseUtils"),a=t("../ComponentLibrary"),o=t("./ManagerPie"),s=16,h=20,l="rgba(255, 255, 255, 0.6)",u=5,c="pieIndicatorAnimation",d=n.extend({doLayout:function(){this.group&&(this.group.remove(),this.group=null)},show:function(){this.group&&this.group.interrupt(c).transition(c).duration(0).style("opacity",1)},hide:function(){this.group&&this.group.interrupt(c).transition(c).delay(500).ease("ease").duration(200).style("opacity",0) +},render:function(){var t=this.vanchart.series;if(1===t.length&&(this.__manager||(this.__manager=new o(this.vanchart.handler),this.vanchart.handler.registerManager(this.__manager)),!this.group)){var e=this.vanchart.renderer;this.group=e.group({"class":"pie-indicator"}).add();var n=t[0].chartInfo,a=n.radius;this.group.style({opacity:0,transform:r.makeTranslateWithPX([n.centerX,n.centerY])}),this.clip=e.createClip({r:a},"circle"),e.clip(this.group,this.clip);var s=i(a);this.ringMask=e.mask();var h=r.stamp(this.ringMask); +this.ringMask.attr("id",h),this.ringMask.append(e.circle({r:a+u,fill:"white"})),this.ringMask.append(e.path({d:s,fill:"black"})),this.pointer=e.path({d:s}).style({fill:l}),this.group.append(this.ringMask),this.group.append(this.pointer)}}});return a.register(a.PIE_INDICATOR,d),d}),define("FullChartTypes",["require","./VanCharts","./Carousel","./chart/Bar","./chart/Pie","./chart/Line","./chart/LineRadar","./chart/ColumnRadar","./chart/Bubble","./chart/Scatter","./chart/PointerGauge","./chart/SlotGauge","./chart/RingGauge","./chart/ThermometerGauge","./chart/MultiPie","./chart/TreeMap","./chart/Funnel","./chart/WordCloud","./chart/Structure","./chart/ForceBubble","./chart/Map","./chart/LineMap","./chart/gantt/Gantt","./component/Tooltip","./component/Axis","./component/GaugeAxis","./component/Legend","./component/Zoom","./component/ToolBar","./component/IntervalRangeLegend","./component/GradientRangeLegend","./component/Polar","./component/PolarAxis","./component/Title","./component/Geo","./component/DrillTools","./component/DataSheet","./component/TrendLine","./component/MoreLabel","./mobile/CrossLine","./mobile/PlotScroll","./mobile/PieIndicator"],function(t){t("./VanCharts"),t("./Carousel"),t("./chart/Bar"),t("./chart/Pie"),t("./chart/Line"),t("./chart/LineRadar"),t("./chart/ColumnRadar"),t("./chart/Bubble"),t("./chart/Scatter"),t("./chart/PointerGauge"),t("./chart/SlotGauge"),t("./chart/RingGauge"),t("./chart/ThermometerGauge"),t("./chart/MultiPie"),t("./chart/TreeMap"),t("./chart/Funnel"),t("./chart/WordCloud"),t("./chart/Structure"),t("./chart/ForceBubble"),t("./chart/Map"),t("./chart/LineMap"),t("./chart/gantt/Gantt"),t("./component/Tooltip"),t("./component/Axis"),t("./component/GaugeAxis"),t("./component/Legend"),t("./component/Zoom"),t("./component/ToolBar"),t("./component/IntervalRangeLegend"),t("./component/GradientRangeLegend"),t("./component/Polar"),t("./component/PolarAxis"),t("./component/Title"),t("./component/Geo"),t("./component/DrillTools"),t("./component/DataSheet"),t("./component/TrendLine"),t("./component/MoreLabel"),t("./mobile/CrossLine"),t("./mobile/PlotScroll"),t("./mobile/PieIndicator") +});var VanCharts=require("VanCharts");return require("./Carousel"),require("./chart/Bar"),require("./chart/Pie"),require("./chart/Line"),require("./chart/LineRadar"),require("./chart/ColumnRadar"),require("./chart/TreeMap"),require("./chart/Bubble"),require("./chart/ForceBubble"),require("./chart/Scatter"),require("./chart/MultiPie"),require("./chart/PointerGauge"),require("./chart/SlotGauge"),require("./chart/RingGauge"),require("./chart/ThermometerGauge"),require("./chart/Map"),require("./chart/Funnel"),require("./chart/WordCloud"),require("./chart/LineMap"),require("./chart/Structure"),require("./component/Tooltip"),require("./component/Axis"),require("./component/GaugeAxis"),require("./component/Legend"),require("./component/Zoom"),require("./component/ToolBar"),require("./component/IntervalRangeLegend"),require("./component/GradientRangeLegend"),require("./component/Polar"),require("./component/PolarAxis"),require("./component/Title"),require("./component/Geo"),require("./component/DrillTools"),require("./component/DataSheet"),require("./component/TrendLine"),require("./component/MoreLabel"),require("./mobile/CrossLine"),require("./mobile/PlotScroll"),require("./mobile/PieIndicator"),VanCharts +}); \ No newline at end of file diff --git a/src/test/java/WEB-INF/assist/phantomjs/phantomjs-linux32/ChangeLog b/src/test/java/WEB-INF/assist/phantomjs/phantomjs-linux32/ChangeLog new file mode 100644 index 0000000..a15f835 --- /dev/null +++ b/src/test/java/WEB-INF/assist/phantomjs/phantomjs-linux32/ChangeLog @@ -0,0 +1,401 @@ +Please see also http://phantomjs.org/releases.html. + +2016-01-23: Version 2.1.0 + + New features + + * Upgraded Qt to 5.5.1 (issue #13377) + * Added support for SSL Client Authentication (issue #11275) + * Added support for context menu event (issue #11429) + * Allow remote debugging to use random port assigned by the OS (issue #13432) + + Improvements + + * Allow outer context to access arbitrary URLs (issue #11217) + * Fixed --local-storage-path and localStoragePath config option (issue #11596) + * Restored --local-url-access=no regression (issue #13412) + * Fixed an issue with loading JS modules contains a last-line comment (issue #12868) + * Fixed an issue with returning binary content in WebServer module (issue #13026) + * Fixed encoded URL loading on Windows (issue #12953) + * Fixed building with GCC 5 (issue #13518) + * Fixed file upload (issue #12506) + * Fixed latest OS detection (issue #13829) + +2015-01-23: Version 2.0.0 + + New features + + * Switched to Qt 5 and updated WebKit (issue 10448) + * Implemented clearing of memory cache (issue 10357) + * Added support for HTTP header change for every request (issue 11299) + + Improvements + + * Fixed rendering of CJK text by always linking the codecs (issue 10249) + * Ensured onResourceReceived is still fired on an error (issue 11163) + * Fixed possible crash in handling network requests (issue 11252) + * Removed hardcoded GhostDriver launching message (issue 12681) + * Allowed disk cache more than 2 GB (issue 12303) + + Examples + + * Netsniff example should exit when fails to load (issue 11333) + +2014-01-25: Version 1.9.7 + + * Reverted to GhostDriver 1.1.0 instead of 1.1.1 (issue 11915) + * Fixed another warning of obsolete userSpaceScaleFactor on OS X 10.9 (issue 11612) + +2014-01-20: Version 1.9.6 + + * Updated GhostDriver to version 1.1.1 (issue 11877, 11893) + +2014-01-19: Version 1.9.3 + + * Fixed CoreText performance note on OS X 10.9 (issue 11418) + * Fixed warning of obsolete userSpaceScaleFactor on OS X 10.9 (issue 11612) + +2013-09-06: Version 1.9.2 + + * Fixed graphical artifacts with transparent background on Windows (issue 11276, 11007, 11366) + * Updated GhostDriver to version 1.0.4 (issue 11452) + +2013-06-04: Version 1.9.1 + + Critical bug fixes: + + * Fixed problems with specifying proxy server (issue 10811, 11117) + * Fixed UTF-8 encoding with system.stdout and system.stderr (issue 11162) + * Ensured that onResourceReceived will be always invoked (issue 11163) + * Fixed module loading from an absolute path on Windows (issue 11165) + * Fixed typo in the command-line option for setting the cache size (11219) + * Fixed possible crash when handling network requests (issue 11252, 11338) + +2013-03-20: Version 1.9.0 "Sakura" + + New features + + * Added spawn and execFile to execute external programs (issue 10219) + * Added the ability to abort network requests (issue 10230) + * Added system access to stdin, stdout, and stderr (issue 10333) + * Added support for custom CA certificates location (issue 10916) + * Added seek function to the File stream (issue 10937) + * Implemented file read for a specified number of bytes (issue 10938) + * Added a callback to handle network error (issue 10954, 10997) + * Added custom encoding support when opening a page (issue 11043) + * Implemented require.stub() support for a factory function (issue 11044) + * Added page loading indicator and progress (issue 11091) + * Added a timeout option for network requests (issue 11129) + + Improvements + + * Fixed the build on FreeBSD (issue 10597) + * Ensured a consistent 72 dpi for Linux headless rendering (issue 10659) + * Fixed possible PDF error due to invalid CreationDate field (issue 10663) + * Fixed crash when uploading non existing files (issue 10941) + * Improved the autocomplete internal of the interactive/REPL mode (issue 10943) + * Fixed possible crash when accessing inline frames (issue 10947) + * Changed Linux binary package setup to be built on CentOS 5 (issue 10963) + * Extended SSL ignore setting to synchronous XHR (issue 10985) + * Added convenient constants for modifier keys (issue 11056) + * Fixed incorrect date handling in the cookies (issue 11068) + * Updated GhostDriver to version 1.0.3 (issue 11146) + + Examples + + * Fixed invalid data URI in the netsniff example (issue 10740) + * Implemented a new weather example (issue 10794) + * Fixed rendering issues in render_multi_url (issue 11021) + * Fixed proper event sequence in page_events example (issue 11028) + * Miscellanous tweaks (issue 11082) + +2013-03-02: Version 1.8.2 + + Critical bug fixes: + + * Fixed possible PDF error due to invalid CreationDate field (issue 663) + * Fixed crash when uploading non existing files (issue 941) + * Fixed possible crash when accessing inline frames (issue 947) + * Extended SSL ignore setting to synchronous XHR (issue 985) + * Fixed incorrect date handling in the cookies (issue 1068) + +2013-01-06: Version 1.8.1 + + Critical bug fix: + + * Mac OS X: Fix possible crash when using some TrueType fonts (issue 690) + +2012-12-21: Version 1.8.0 "Blue Winter Rose" + + New features + + * Integrated GhostDriver as the WebDriver implementation (issue 49) + * Added an option to specify the SSL protocol (issue 174) + * Added encoding support for WebServer's response (issue 505) + * Added process ID (PID) to the System module (issue 769) + * Added properties to obtain page and frame title (issue 799) + * Added page navigation methods (issue 808) + * Added support for modifier keys in keyboard events (issue 835) + * Added onFilePicker callback for more generic file upload API (issue 843) + * Added the ability to set the page content and location (issue 909) + + Improvements + + * Fixed date parsing in ISO8601 format (issue 187, 267) + * Fixed window.location (issue 530, 632) + * Deregistered multiple callback handler (issue 807) + * Fixed sending of double-click events (issue 848) + * Increases maximum number of redirects (issue 849) + * Fixed keycodes sent for lowercase characters (issue 852) + * Fixed a regression in table row page break (issue 880) + * Completed the CoffeeScript version of the examples (issue 907) + * Updated Qt to version 4.8.4 (issue 918) + * Fixed potential hang in some example scripts (issue 922) + +2012-09-22: Version 1.7.0 "Blazing Star" + + New features + + * Added a module system modelled after CommonJS/Node.js (issue 47) + * Added support for window pop-up (issue 151) + * Static build on Linux (issue 413) + * Added run-time detection of SSL support (issue 484) + * Added more events support (issue 492, 712) + * Added support for disabling automatic proxy detection (issue 580) + * Provided page closing callback (issue 678) + * Added methods to access URL, frames URL, frame Content (issue 758) + * Added more cookies-related API (issue 761) + + Improvements + + * Refactored command-line options handling (issue 55) + * Improved the workflow for producing release builds (issue 599) + * Improved cookies API and implementation (issue 603, 761) + * Improved frame switching API (issue 654) + * Fixed iframe handling regression (issue 683) + * Fixed OS version number with Windows 8 and Mountain Lion (issue 684, 688) + * Fixed HAR navigation info in the netsniff example (issue 733) + * Fixed compile warnings with Visual Studio (issue 744) + * Removed hacks for static linking on Windows (issue 753) + * Added ICO image handling on Windows (issue 779) + * Fixed font antialiasing on Windows (issue 785) + * Improved Jasmine test runner for Jasmine 1.2 (issue 792) + +2012-07-22: Version 1.6.1 + + Bug fixes + + * Don't build the deploy in debug mode (issue 599) + * Fixed building on Windows (issue 424) + * Fixed remote inspector when building statically (issue 430) + +2012-06-20: Version 1.6.0 "Lavender" + + New features + + * Added support for passing arguments to WebPage's evaluate (issue 132) + * Added callbacks for JavaScript onConfirm and onPrompt (issue 133) + * Added stack trace when error occurs (issue 166) + * Added support for local storage path and quota (issue 300) + * Added initial support for cookies handling (issue 354) + * Added support for header footer when printing the page (issue 410, 512) + * Added headers support in the loading request (issue 452) + * Added support to render the web page as base64-encoded string (issue 547) + * Added hooks for navigation event (issue 562) + * Added command-line option to show debug messages (issue 575) + * Added support for the zoom factor for web page rendering (issue 579) + * Added crash reporter for Mac OS X and Linux, based on Google Breakpad (issue 576) + * Added 'os' object to the system module (issue 585) + * Added support for asynchronous evaluation (issue 593) + + Improvements + + * Fixed remote debugging to work on Mac OS X and Windows (issue 430) + * Fixed web server getting the dropped connection for empty response (issue 451) + * Fixed text rendered as boxes (squares) on headless Linux (issue 460) + * Updated Qt to version 4.8.2 (issue 495) + * Updated CoffeeScript compiler to version 1.3.3 (issue 496) + * Fixed the build script to detect and use MAKEFLAGS (issue 503) + * Fixed the build script to properly pass Qt config flags (issue 507) + * Changed Info.plist to be embedded in Mac OS X executable (issue 528) + * Fixed wrong module require in the imagebin example (issue 536) + * Fixed example scripts to exit with the right exit code (issue 544) + * Fixed build failure with glib 2.31.0+ (issue 559) + * Fixed error handler failures in some cases (issue 589) + * Fixed Twitter-related examples to work with the new site (issue 609) + +2012-03-20: Version 1.5.0 "Ghost Flower" + + New features + + * Added interactive mode, also known as REPL (issue 252) + * Added setting for web security, to allow cross domain XHR (issue 28) + * Added error handler for WebPage object (issue 166) + * Added support for custom HTTP header in the network request (issue 77) + * Added support for read write encoding in the file system module (issue 367) + * Added remote debugging support on Linux (issue 6) + * Added support for proxy authentication (issue 105) + * Added System module, to retrieve environment variables (issue 271) and arguments (issue 276) + * Added fs.readLink function (issue 329) + * Added support for reading and writing binary data (issue 400) + * Added support to retrieve request data in the WebServer? module (issue 340) + * Added support for individual top/bottom/left/right print margins (issue 388) + * Added command-line option --help (issue 347) + * Added short command-line options -v and -h (issue 408) + * Removed support for Flash and other plugins (issue 418) + + Bug fixes + + * Fixed multiple console.log arguments (issue 36) + * Fixed file upload (issue 307) + * Fixed the web server instance to be asynchronous (issue 326) and still support Keep Alive (issue 416) + * Workaround Qt 4.8.0 crash due to empty URL scheme (issue 365) + * Fixed a Content-Type problem where POST does not work (issue 337) + * Fixed reading body request in the web server even without specific Content-Type (issue 439) + * Fixed Jasmine test runner with Jasmine 1.1 (issue 402) + * Fixed request URL formatting in the web server (issue 437) + * Don't display debugging and warning messages (issue 323) + +2011-12-31: Version 1.4.1 + + Bug fixes + + * Fix setting the proxy type (issue 266) + * Workaround for file upload regression (issue 307) + * Fix extraneous messsages in non-debug mode (issue 323) + +2011-12-22: Version 1.4.0 "Glory of the Snow" + + New features + + * Added embedded HTTP server (issue 115) + * Added convenient build script for Linux (issue 197) + * Added support for SOCKS5 proxy (issue 266) + * Updated CoffeeScript compiler to version 1.2 (issue 312) + + Bug fixes + + * Fix potential crash in QUrl with Qt 4.8 (issue 304) + * Fix bug in CookieJar with QSettings and string (PyPhantomJS issue 10) + * Prevent showing the icon on Mac OS X Dock (issue 281) + + Examples + + * Added a new example to detect browsers sniffing (issue 263) + * Added HTTP server example (issue 115) + +2011-09-23: Version 1.3.0 "Water Lily" + + Bug fixes + + * Fixed open() and POST method, without specifying the finished handler + * Fixed script execution warning dialog (issue 165) + * Added WebPage.release() to free the web page from memory (issue 154) + * Added special handling of about:blank (issue 235) + * Made a separate network access manager for each page (issue 190) + + New features + + * Introduced file system API based on CommonJS Filesystem proposal (issue 129) + * Added support for persistent cookies (issue 91) + * Added event handling, currently only for mouse events (issue 234) + * Added page scroll position (issue 162) + * Added HTTP authentication support (issue 45) + * Added callback for page initialization (issue 143) + * Added support to specify script and output encoding (issue 186) + * Added option to allow local content to do cross-domain access (issue 28) + * Added support to apply configurations from a JSON file (issue 180) + * Added a convenient WebPage initialization construction (issue 206) + * Added option to limit the size of disk cache (issue 220) + + Examples + + * Added a new example on using Modernizr to detect features (issue 144) + * Fixed pizza.js example to use Mobile Yelp (issue 200) + * Fixed netsniff.coffee example due to wrong indentation (issue 225) + * Added an example to show live network traffic (issue 227) + * Added an example demonstrating different output encodings (issue 186) + +2011-06-21: Version 1.2.0 "Birds of Paradise" + + Version 1.2.0 is a major update. It introduces a whole set of new API. + + Bug fixes + + * Fixed rendering a very large web page (issue 54) + * Fixed reporting of CoffeeScript compile error (issue 125) + + New features + + * Added callback for console message (issue 12) + * Improved security model via WebPage object (issue 41) + * Added support for POST, HEAD, PUT, and DELETE (issue 88) + * Scripts filename is now passed as phantom.scriptName + * Added callback to capture resource requests and responses (issue 2) + * Added the ability to load external JavaScript (issue 32) + + Examples + + * Ported examples to use WebPage object + * Added a new example to upload an image to imagebin.org + * Added a new example to show HTTP POST feature + * Added a new example to sniff network traffic and save it in HAR format + + +2011-04-27: Version 1.1.0 "Cherry Blossom" + + Fixed the script loading to use UTF-8 encoding (Yasuhiro Matsumoto). + + Added check for system proxy setting (Yasuhiro Matsumoto). + + Fixed building with Cygwin and Qt 4.5 (John Dalton). + + Added a new example: driver for QUnit tests (Łukasz Korecki). + + Fixed issue #20: problem with JPG transparent color (Alessandro Portale). + + Fixed issue #9: ignore first line starting with #! (Matthias, aka fourplusone). + + Fixed issue #7: support for file upload for form submission (Matthias, aka fourplusone). + + Fixed issue #35: support for disabling images loading (Ariya Hidayat). + + Fixed issue #14: enable or disable plugins (Ariya Hidayat). + + Added a new example: using Canvas to produce the color wheel (Ariya Hidayat). + + Added support for rasterizing as GIF image (Ariya Hidayat). + + Added support for CoffeeScript (Ariya Hidayat). + + Fixed issue #19: option for setting the proxy (Clint Berry, Ariya Hidayat). + + Python implementation using PyQt (James Roe). + + Fixed issue #17: Specify paper size for PDF export (Alessandro Portale). + + Fixed issue #60: Win32 and OS/2 icon files (Salvador Parra Camacho). + + Added clipping rectangle to the render function (Wouter de Bie). + + Added an example on sychronous waiting (Gabor Torok). + + Added command line option to use disk cache (Jon Turner). + + Added text extracting example (Weston Ruter). + + Fixed issue #93: Build with Qt < 4.7 (Ariya Hidayat). + + Ported all examples to CoffeeScript (Robert Gieseke). + +2011-01-17: Version 1.0.0 + + Initial launch. + + The API is centralized at the 'phantom' object (as child of + window object) which has the properties: args, content, + loadStatus, state, userAgent, version, viewportSize, and + the following functions: exit, open, render, sleep. + + Several examples are included, among others: web page rasterizer, + weather service, headless test framework driver, and many others. diff --git a/src/test/java/WEB-INF/assist/phantomjs/phantomjs-linux32/LICENSE.BSD b/src/test/java/WEB-INF/assist/phantomjs/phantomjs-linux32/LICENSE.BSD new file mode 100644 index 0000000..d5dfdd1 --- /dev/null +++ b/src/test/java/WEB-INF/assist/phantomjs/phantomjs-linux32/LICENSE.BSD @@ -0,0 +1,22 @@ +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/src/test/java/WEB-INF/assist/phantomjs/phantomjs-linux32/README.md b/src/test/java/WEB-INF/assist/phantomjs/phantomjs-linux32/README.md new file mode 100644 index 0000000..3c9578c --- /dev/null +++ b/src/test/java/WEB-INF/assist/phantomjs/phantomjs-linux32/README.md @@ -0,0 +1,29 @@ +# [PhantomJS](http://phantomjs.org) - Scriptable Headless WebKit + +PhantomJS ([phantomjs.org](http://phantomjs.org)) is a headless WebKit scriptable with JavaScript. The latest [stable release](http://phantomjs.org/release-2.0.html) is version 2.0. + +**Note**: Please **do not** create a GitHub pull request **without** reading the [Contribution Guide](https://github.com/ariya/phantomjs/blob/master/CONTRIBUTING.md) first. Failure to do so may result in the rejection of the pull request. + +## Use Cases + +- **Headless web testing**. Lightning-fast testing without the browser is now possible! +- **Page automation**. [Access and manipulate](http://phantomjs.org/page-automation.html) web pages with the standard DOM API, or with usual libraries like jQuery. +- **Screen capture**. Programmatically [capture web contents](http://phantomjs.org/screen-capture.html), including CSS, SVG and Canvas. Build server-side web graphics apps, from a screenshot service to a vector chart rasterizer. +- **Network monitoring**. Automate performance analysis, track [page loading](http://phantomjs.org/network-monitoring.html) and export as standard HAR format. + +## Features + +- **Multiplatform**, available on major operating systems: Windows, Mac OS X, Linux, and other Unices. +- **Fast and native implementation** of web standards: DOM, CSS, JavaScript, Canvas, and SVG. No emulation! +- **Pure headless (no X11) on Linux**, ideal for continuous integration systems. Also runs on Amazon EC2, Heroku, and Iron.io. +- **Easy to install**: [Download](http://phantomjs.org/download.html), unpack, and start having fun in just 5 minutes. + +## Questions? + +- Explore the complete [documentation](http://phantomjs.org/documentation/). +- Read tons of [user articles](http://phantomjs.org/buzz.html) on using PhantomJS. +- Join the [mailing-list](http://groups.google.com/group/phantomjs) and discuss with other PhantomJS fans. + +PhantomJS is free software/open source, and is distributed under the [BSD license](http://opensource.org/licenses/BSD-3-Clause). It contains third-party code, see the included `third-party.txt` file for the license information on third-party code. + +PhantomJS is created and maintained by [Ariya Hidayat](http://ariya.ofilabs.com/about) (Twitter: [@ariyahidayat](http://twitter.com/ariyahidayat)), with the help of [many contributors](https://github.com/ariya/phantomjs/contributors). Follow the official Twitter stream [@PhantomJS](http://twitter.com/PhantomJS) to get the frequent development updates. diff --git a/src/test/java/WEB-INF/assist/phantomjs/phantomjs-linux32/bin/phantomjs b/src/test/java/WEB-INF/assist/phantomjs/phantomjs-linux32/bin/phantomjs new file mode 100644 index 0000000..2091c11 Binary files /dev/null and b/src/test/java/WEB-INF/assist/phantomjs/phantomjs-linux32/bin/phantomjs differ diff --git a/src/test/java/WEB-INF/assist/phantomjs/phantomjs-linux32/third-party.txt b/src/test/java/WEB-INF/assist/phantomjs/phantomjs-linux32/third-party.txt new file mode 100644 index 0000000..48f74c4 --- /dev/null +++ b/src/test/java/WEB-INF/assist/phantomjs/phantomjs-linux32/third-party.txt @@ -0,0 +1,36 @@ +This document contains the list of Third Party Software included with +PhantomJS, along with the license information. + +Third Party Software may impose additional restrictions and it is the +user's responsibility to ensure that they have met the licensing +requirements of PhantomJS and the relevant license of the Third Party +Software they are using. + +Qt - http://qt-project.org/ +License: GNU Lesser General Public License (LGPL) version 2.1. +Reference: http://qt-project.org/doc/qt-4.8/lgpl.html. + +WebKit - http://www.webkit.org/ +License: GNU Lesser General Public License (LGPL) version 2.1 and BSD. +Reference: http://www.webkit.org/coding/lgpl-license.html and +http://www.webkit.org/coding/bsd-license.html. + +Mongoose - https://github.com/cesanta/mongoose +License: MIT +Reference: https://github.com/cesanta/mongoose/commit/abbf27338ef554cce0281ac157aa71a9c1b82a55 + +OpenSSL - http://www.openssl.org/ +License: OpenSSL License, SSLeay License. +Reference: http://www.openssl.org/source/license.html. + +Linenoise - https://github.com/tadmarshall/linenoise +License: BSD. +Reference: https://github.com/tadmarshall/linenoise/blob/master/linenoise.h. + +QCommandLine - http://xf.iksaif.net/dev/qcommandline.html +License: GNU Lesser General Public License (LGPL) version 2.1. +Reference: http://dev.iksaif.net/projects/qcommandline/repository/revisions/master/entry/COPYING + +wkhtmlpdf - http://code.google.com/p/wkhtmltopdf/ +License: GNU Lesser General Public License (LGPL) +Reference: http://code.google.com/p/wkhtmltopdf/ diff --git a/src/test/java/WEB-INF/assist/phantomjs/phantomjs-linux64/ChangeLog b/src/test/java/WEB-INF/assist/phantomjs/phantomjs-linux64/ChangeLog new file mode 100644 index 0000000..a15f835 --- /dev/null +++ b/src/test/java/WEB-INF/assist/phantomjs/phantomjs-linux64/ChangeLog @@ -0,0 +1,401 @@ +Please see also http://phantomjs.org/releases.html. + +2016-01-23: Version 2.1.0 + + New features + + * Upgraded Qt to 5.5.1 (issue #13377) + * Added support for SSL Client Authentication (issue #11275) + * Added support for context menu event (issue #11429) + * Allow remote debugging to use random port assigned by the OS (issue #13432) + + Improvements + + * Allow outer context to access arbitrary URLs (issue #11217) + * Fixed --local-storage-path and localStoragePath config option (issue #11596) + * Restored --local-url-access=no regression (issue #13412) + * Fixed an issue with loading JS modules contains a last-line comment (issue #12868) + * Fixed an issue with returning binary content in WebServer module (issue #13026) + * Fixed encoded URL loading on Windows (issue #12953) + * Fixed building with GCC 5 (issue #13518) + * Fixed file upload (issue #12506) + * Fixed latest OS detection (issue #13829) + +2015-01-23: Version 2.0.0 + + New features + + * Switched to Qt 5 and updated WebKit (issue 10448) + * Implemented clearing of memory cache (issue 10357) + * Added support for HTTP header change for every request (issue 11299) + + Improvements + + * Fixed rendering of CJK text by always linking the codecs (issue 10249) + * Ensured onResourceReceived is still fired on an error (issue 11163) + * Fixed possible crash in handling network requests (issue 11252) + * Removed hardcoded GhostDriver launching message (issue 12681) + * Allowed disk cache more than 2 GB (issue 12303) + + Examples + + * Netsniff example should exit when fails to load (issue 11333) + +2014-01-25: Version 1.9.7 + + * Reverted to GhostDriver 1.1.0 instead of 1.1.1 (issue 11915) + * Fixed another warning of obsolete userSpaceScaleFactor on OS X 10.9 (issue 11612) + +2014-01-20: Version 1.9.6 + + * Updated GhostDriver to version 1.1.1 (issue 11877, 11893) + +2014-01-19: Version 1.9.3 + + * Fixed CoreText performance note on OS X 10.9 (issue 11418) + * Fixed warning of obsolete userSpaceScaleFactor on OS X 10.9 (issue 11612) + +2013-09-06: Version 1.9.2 + + * Fixed graphical artifacts with transparent background on Windows (issue 11276, 11007, 11366) + * Updated GhostDriver to version 1.0.4 (issue 11452) + +2013-06-04: Version 1.9.1 + + Critical bug fixes: + + * Fixed problems with specifying proxy server (issue 10811, 11117) + * Fixed UTF-8 encoding with system.stdout and system.stderr (issue 11162) + * Ensured that onResourceReceived will be always invoked (issue 11163) + * Fixed module loading from an absolute path on Windows (issue 11165) + * Fixed typo in the command-line option for setting the cache size (11219) + * Fixed possible crash when handling network requests (issue 11252, 11338) + +2013-03-20: Version 1.9.0 "Sakura" + + New features + + * Added spawn and execFile to execute external programs (issue 10219) + * Added the ability to abort network requests (issue 10230) + * Added system access to stdin, stdout, and stderr (issue 10333) + * Added support for custom CA certificates location (issue 10916) + * Added seek function to the File stream (issue 10937) + * Implemented file read for a specified number of bytes (issue 10938) + * Added a callback to handle network error (issue 10954, 10997) + * Added custom encoding support when opening a page (issue 11043) + * Implemented require.stub() support for a factory function (issue 11044) + * Added page loading indicator and progress (issue 11091) + * Added a timeout option for network requests (issue 11129) + + Improvements + + * Fixed the build on FreeBSD (issue 10597) + * Ensured a consistent 72 dpi for Linux headless rendering (issue 10659) + * Fixed possible PDF error due to invalid CreationDate field (issue 10663) + * Fixed crash when uploading non existing files (issue 10941) + * Improved the autocomplete internal of the interactive/REPL mode (issue 10943) + * Fixed possible crash when accessing inline frames (issue 10947) + * Changed Linux binary package setup to be built on CentOS 5 (issue 10963) + * Extended SSL ignore setting to synchronous XHR (issue 10985) + * Added convenient constants for modifier keys (issue 11056) + * Fixed incorrect date handling in the cookies (issue 11068) + * Updated GhostDriver to version 1.0.3 (issue 11146) + + Examples + + * Fixed invalid data URI in the netsniff example (issue 10740) + * Implemented a new weather example (issue 10794) + * Fixed rendering issues in render_multi_url (issue 11021) + * Fixed proper event sequence in page_events example (issue 11028) + * Miscellanous tweaks (issue 11082) + +2013-03-02: Version 1.8.2 + + Critical bug fixes: + + * Fixed possible PDF error due to invalid CreationDate field (issue 663) + * Fixed crash when uploading non existing files (issue 941) + * Fixed possible crash when accessing inline frames (issue 947) + * Extended SSL ignore setting to synchronous XHR (issue 985) + * Fixed incorrect date handling in the cookies (issue 1068) + +2013-01-06: Version 1.8.1 + + Critical bug fix: + + * Mac OS X: Fix possible crash when using some TrueType fonts (issue 690) + +2012-12-21: Version 1.8.0 "Blue Winter Rose" + + New features + + * Integrated GhostDriver as the WebDriver implementation (issue 49) + * Added an option to specify the SSL protocol (issue 174) + * Added encoding support for WebServer's response (issue 505) + * Added process ID (PID) to the System module (issue 769) + * Added properties to obtain page and frame title (issue 799) + * Added page navigation methods (issue 808) + * Added support for modifier keys in keyboard events (issue 835) + * Added onFilePicker callback for more generic file upload API (issue 843) + * Added the ability to set the page content and location (issue 909) + + Improvements + + * Fixed date parsing in ISO8601 format (issue 187, 267) + * Fixed window.location (issue 530, 632) + * Deregistered multiple callback handler (issue 807) + * Fixed sending of double-click events (issue 848) + * Increases maximum number of redirects (issue 849) + * Fixed keycodes sent for lowercase characters (issue 852) + * Fixed a regression in table row page break (issue 880) + * Completed the CoffeeScript version of the examples (issue 907) + * Updated Qt to version 4.8.4 (issue 918) + * Fixed potential hang in some example scripts (issue 922) + +2012-09-22: Version 1.7.0 "Blazing Star" + + New features + + * Added a module system modelled after CommonJS/Node.js (issue 47) + * Added support for window pop-up (issue 151) + * Static build on Linux (issue 413) + * Added run-time detection of SSL support (issue 484) + * Added more events support (issue 492, 712) + * Added support for disabling automatic proxy detection (issue 580) + * Provided page closing callback (issue 678) + * Added methods to access URL, frames URL, frame Content (issue 758) + * Added more cookies-related API (issue 761) + + Improvements + + * Refactored command-line options handling (issue 55) + * Improved the workflow for producing release builds (issue 599) + * Improved cookies API and implementation (issue 603, 761) + * Improved frame switching API (issue 654) + * Fixed iframe handling regression (issue 683) + * Fixed OS version number with Windows 8 and Mountain Lion (issue 684, 688) + * Fixed HAR navigation info in the netsniff example (issue 733) + * Fixed compile warnings with Visual Studio (issue 744) + * Removed hacks for static linking on Windows (issue 753) + * Added ICO image handling on Windows (issue 779) + * Fixed font antialiasing on Windows (issue 785) + * Improved Jasmine test runner for Jasmine 1.2 (issue 792) + +2012-07-22: Version 1.6.1 + + Bug fixes + + * Don't build the deploy in debug mode (issue 599) + * Fixed building on Windows (issue 424) + * Fixed remote inspector when building statically (issue 430) + +2012-06-20: Version 1.6.0 "Lavender" + + New features + + * Added support for passing arguments to WebPage's evaluate (issue 132) + * Added callbacks for JavaScript onConfirm and onPrompt (issue 133) + * Added stack trace when error occurs (issue 166) + * Added support for local storage path and quota (issue 300) + * Added initial support for cookies handling (issue 354) + * Added support for header footer when printing the page (issue 410, 512) + * Added headers support in the loading request (issue 452) + * Added support to render the web page as base64-encoded string (issue 547) + * Added hooks for navigation event (issue 562) + * Added command-line option to show debug messages (issue 575) + * Added support for the zoom factor for web page rendering (issue 579) + * Added crash reporter for Mac OS X and Linux, based on Google Breakpad (issue 576) + * Added 'os' object to the system module (issue 585) + * Added support for asynchronous evaluation (issue 593) + + Improvements + + * Fixed remote debugging to work on Mac OS X and Windows (issue 430) + * Fixed web server getting the dropped connection for empty response (issue 451) + * Fixed text rendered as boxes (squares) on headless Linux (issue 460) + * Updated Qt to version 4.8.2 (issue 495) + * Updated CoffeeScript compiler to version 1.3.3 (issue 496) + * Fixed the build script to detect and use MAKEFLAGS (issue 503) + * Fixed the build script to properly pass Qt config flags (issue 507) + * Changed Info.plist to be embedded in Mac OS X executable (issue 528) + * Fixed wrong module require in the imagebin example (issue 536) + * Fixed example scripts to exit with the right exit code (issue 544) + * Fixed build failure with glib 2.31.0+ (issue 559) + * Fixed error handler failures in some cases (issue 589) + * Fixed Twitter-related examples to work with the new site (issue 609) + +2012-03-20: Version 1.5.0 "Ghost Flower" + + New features + + * Added interactive mode, also known as REPL (issue 252) + * Added setting for web security, to allow cross domain XHR (issue 28) + * Added error handler for WebPage object (issue 166) + * Added support for custom HTTP header in the network request (issue 77) + * Added support for read write encoding in the file system module (issue 367) + * Added remote debugging support on Linux (issue 6) + * Added support for proxy authentication (issue 105) + * Added System module, to retrieve environment variables (issue 271) and arguments (issue 276) + * Added fs.readLink function (issue 329) + * Added support for reading and writing binary data (issue 400) + * Added support to retrieve request data in the WebServer? module (issue 340) + * Added support for individual top/bottom/left/right print margins (issue 388) + * Added command-line option --help (issue 347) + * Added short command-line options -v and -h (issue 408) + * Removed support for Flash and other plugins (issue 418) + + Bug fixes + + * Fixed multiple console.log arguments (issue 36) + * Fixed file upload (issue 307) + * Fixed the web server instance to be asynchronous (issue 326) and still support Keep Alive (issue 416) + * Workaround Qt 4.8.0 crash due to empty URL scheme (issue 365) + * Fixed a Content-Type problem where POST does not work (issue 337) + * Fixed reading body request in the web server even without specific Content-Type (issue 439) + * Fixed Jasmine test runner with Jasmine 1.1 (issue 402) + * Fixed request URL formatting in the web server (issue 437) + * Don't display debugging and warning messages (issue 323) + +2011-12-31: Version 1.4.1 + + Bug fixes + + * Fix setting the proxy type (issue 266) + * Workaround for file upload regression (issue 307) + * Fix extraneous messsages in non-debug mode (issue 323) + +2011-12-22: Version 1.4.0 "Glory of the Snow" + + New features + + * Added embedded HTTP server (issue 115) + * Added convenient build script for Linux (issue 197) + * Added support for SOCKS5 proxy (issue 266) + * Updated CoffeeScript compiler to version 1.2 (issue 312) + + Bug fixes + + * Fix potential crash in QUrl with Qt 4.8 (issue 304) + * Fix bug in CookieJar with QSettings and string (PyPhantomJS issue 10) + * Prevent showing the icon on Mac OS X Dock (issue 281) + + Examples + + * Added a new example to detect browsers sniffing (issue 263) + * Added HTTP server example (issue 115) + +2011-09-23: Version 1.3.0 "Water Lily" + + Bug fixes + + * Fixed open() and POST method, without specifying the finished handler + * Fixed script execution warning dialog (issue 165) + * Added WebPage.release() to free the web page from memory (issue 154) + * Added special handling of about:blank (issue 235) + * Made a separate network access manager for each page (issue 190) + + New features + + * Introduced file system API based on CommonJS Filesystem proposal (issue 129) + * Added support for persistent cookies (issue 91) + * Added event handling, currently only for mouse events (issue 234) + * Added page scroll position (issue 162) + * Added HTTP authentication support (issue 45) + * Added callback for page initialization (issue 143) + * Added support to specify script and output encoding (issue 186) + * Added option to allow local content to do cross-domain access (issue 28) + * Added support to apply configurations from a JSON file (issue 180) + * Added a convenient WebPage initialization construction (issue 206) + * Added option to limit the size of disk cache (issue 220) + + Examples + + * Added a new example on using Modernizr to detect features (issue 144) + * Fixed pizza.js example to use Mobile Yelp (issue 200) + * Fixed netsniff.coffee example due to wrong indentation (issue 225) + * Added an example to show live network traffic (issue 227) + * Added an example demonstrating different output encodings (issue 186) + +2011-06-21: Version 1.2.0 "Birds of Paradise" + + Version 1.2.0 is a major update. It introduces a whole set of new API. + + Bug fixes + + * Fixed rendering a very large web page (issue 54) + * Fixed reporting of CoffeeScript compile error (issue 125) + + New features + + * Added callback for console message (issue 12) + * Improved security model via WebPage object (issue 41) + * Added support for POST, HEAD, PUT, and DELETE (issue 88) + * Scripts filename is now passed as phantom.scriptName + * Added callback to capture resource requests and responses (issue 2) + * Added the ability to load external JavaScript (issue 32) + + Examples + + * Ported examples to use WebPage object + * Added a new example to upload an image to imagebin.org + * Added a new example to show HTTP POST feature + * Added a new example to sniff network traffic and save it in HAR format + + +2011-04-27: Version 1.1.0 "Cherry Blossom" + + Fixed the script loading to use UTF-8 encoding (Yasuhiro Matsumoto). + + Added check for system proxy setting (Yasuhiro Matsumoto). + + Fixed building with Cygwin and Qt 4.5 (John Dalton). + + Added a new example: driver for QUnit tests (Łukasz Korecki). + + Fixed issue #20: problem with JPG transparent color (Alessandro Portale). + + Fixed issue #9: ignore first line starting with #! (Matthias, aka fourplusone). + + Fixed issue #7: support for file upload for form submission (Matthias, aka fourplusone). + + Fixed issue #35: support for disabling images loading (Ariya Hidayat). + + Fixed issue #14: enable or disable plugins (Ariya Hidayat). + + Added a new example: using Canvas to produce the color wheel (Ariya Hidayat). + + Added support for rasterizing as GIF image (Ariya Hidayat). + + Added support for CoffeeScript (Ariya Hidayat). + + Fixed issue #19: option for setting the proxy (Clint Berry, Ariya Hidayat). + + Python implementation using PyQt (James Roe). + + Fixed issue #17: Specify paper size for PDF export (Alessandro Portale). + + Fixed issue #60: Win32 and OS/2 icon files (Salvador Parra Camacho). + + Added clipping rectangle to the render function (Wouter de Bie). + + Added an example on sychronous waiting (Gabor Torok). + + Added command line option to use disk cache (Jon Turner). + + Added text extracting example (Weston Ruter). + + Fixed issue #93: Build with Qt < 4.7 (Ariya Hidayat). + + Ported all examples to CoffeeScript (Robert Gieseke). + +2011-01-17: Version 1.0.0 + + Initial launch. + + The API is centralized at the 'phantom' object (as child of + window object) which has the properties: args, content, + loadStatus, state, userAgent, version, viewportSize, and + the following functions: exit, open, render, sleep. + + Several examples are included, among others: web page rasterizer, + weather service, headless test framework driver, and many others. diff --git a/src/test/java/WEB-INF/assist/phantomjs/phantomjs-linux64/LICENSE.BSD b/src/test/java/WEB-INF/assist/phantomjs/phantomjs-linux64/LICENSE.BSD new file mode 100644 index 0000000..d5dfdd1 --- /dev/null +++ b/src/test/java/WEB-INF/assist/phantomjs/phantomjs-linux64/LICENSE.BSD @@ -0,0 +1,22 @@ +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/src/test/java/WEB-INF/assist/phantomjs/phantomjs-linux64/README.md b/src/test/java/WEB-INF/assist/phantomjs/phantomjs-linux64/README.md new file mode 100644 index 0000000..3c9578c --- /dev/null +++ b/src/test/java/WEB-INF/assist/phantomjs/phantomjs-linux64/README.md @@ -0,0 +1,29 @@ +# [PhantomJS](http://phantomjs.org) - Scriptable Headless WebKit + +PhantomJS ([phantomjs.org](http://phantomjs.org)) is a headless WebKit scriptable with JavaScript. The latest [stable release](http://phantomjs.org/release-2.0.html) is version 2.0. + +**Note**: Please **do not** create a GitHub pull request **without** reading the [Contribution Guide](https://github.com/ariya/phantomjs/blob/master/CONTRIBUTING.md) first. Failure to do so may result in the rejection of the pull request. + +## Use Cases + +- **Headless web testing**. Lightning-fast testing without the browser is now possible! +- **Page automation**. [Access and manipulate](http://phantomjs.org/page-automation.html) web pages with the standard DOM API, or with usual libraries like jQuery. +- **Screen capture**. Programmatically [capture web contents](http://phantomjs.org/screen-capture.html), including CSS, SVG and Canvas. Build server-side web graphics apps, from a screenshot service to a vector chart rasterizer. +- **Network monitoring**. Automate performance analysis, track [page loading](http://phantomjs.org/network-monitoring.html) and export as standard HAR format. + +## Features + +- **Multiplatform**, available on major operating systems: Windows, Mac OS X, Linux, and other Unices. +- **Fast and native implementation** of web standards: DOM, CSS, JavaScript, Canvas, and SVG. No emulation! +- **Pure headless (no X11) on Linux**, ideal for continuous integration systems. Also runs on Amazon EC2, Heroku, and Iron.io. +- **Easy to install**: [Download](http://phantomjs.org/download.html), unpack, and start having fun in just 5 minutes. + +## Questions? + +- Explore the complete [documentation](http://phantomjs.org/documentation/). +- Read tons of [user articles](http://phantomjs.org/buzz.html) on using PhantomJS. +- Join the [mailing-list](http://groups.google.com/group/phantomjs) and discuss with other PhantomJS fans. + +PhantomJS is free software/open source, and is distributed under the [BSD license](http://opensource.org/licenses/BSD-3-Clause). It contains third-party code, see the included `third-party.txt` file for the license information on third-party code. + +PhantomJS is created and maintained by [Ariya Hidayat](http://ariya.ofilabs.com/about) (Twitter: [@ariyahidayat](http://twitter.com/ariyahidayat)), with the help of [many contributors](https://github.com/ariya/phantomjs/contributors). Follow the official Twitter stream [@PhantomJS](http://twitter.com/PhantomJS) to get the frequent development updates. diff --git a/src/test/java/WEB-INF/assist/phantomjs/phantomjs-linux64/bin/phantomjs b/src/test/java/WEB-INF/assist/phantomjs/phantomjs-linux64/bin/phantomjs new file mode 100644 index 0000000..d72e801 Binary files /dev/null and b/src/test/java/WEB-INF/assist/phantomjs/phantomjs-linux64/bin/phantomjs differ diff --git a/src/test/java/WEB-INF/assist/phantomjs/phantomjs-linux64/third-party.txt b/src/test/java/WEB-INF/assist/phantomjs/phantomjs-linux64/third-party.txt new file mode 100644 index 0000000..48f74c4 --- /dev/null +++ b/src/test/java/WEB-INF/assist/phantomjs/phantomjs-linux64/third-party.txt @@ -0,0 +1,36 @@ +This document contains the list of Third Party Software included with +PhantomJS, along with the license information. + +Third Party Software may impose additional restrictions and it is the +user's responsibility to ensure that they have met the licensing +requirements of PhantomJS and the relevant license of the Third Party +Software they are using. + +Qt - http://qt-project.org/ +License: GNU Lesser General Public License (LGPL) version 2.1. +Reference: http://qt-project.org/doc/qt-4.8/lgpl.html. + +WebKit - http://www.webkit.org/ +License: GNU Lesser General Public License (LGPL) version 2.1 and BSD. +Reference: http://www.webkit.org/coding/lgpl-license.html and +http://www.webkit.org/coding/bsd-license.html. + +Mongoose - https://github.com/cesanta/mongoose +License: MIT +Reference: https://github.com/cesanta/mongoose/commit/abbf27338ef554cce0281ac157aa71a9c1b82a55 + +OpenSSL - http://www.openssl.org/ +License: OpenSSL License, SSLeay License. +Reference: http://www.openssl.org/source/license.html. + +Linenoise - https://github.com/tadmarshall/linenoise +License: BSD. +Reference: https://github.com/tadmarshall/linenoise/blob/master/linenoise.h. + +QCommandLine - http://xf.iksaif.net/dev/qcommandline.html +License: GNU Lesser General Public License (LGPL) version 2.1. +Reference: http://dev.iksaif.net/projects/qcommandline/repository/revisions/master/entry/COPYING + +wkhtmlpdf - http://code.google.com/p/wkhtmltopdf/ +License: GNU Lesser General Public License (LGPL) +Reference: http://code.google.com/p/wkhtmltopdf/ diff --git a/src/test/java/WEB-INF/assist/phantomjs/phantomjs-macos/ChangeLog b/src/test/java/WEB-INF/assist/phantomjs/phantomjs-macos/ChangeLog new file mode 100644 index 0000000..a15f835 --- /dev/null +++ b/src/test/java/WEB-INF/assist/phantomjs/phantomjs-macos/ChangeLog @@ -0,0 +1,401 @@ +Please see also http://phantomjs.org/releases.html. + +2016-01-23: Version 2.1.0 + + New features + + * Upgraded Qt to 5.5.1 (issue #13377) + * Added support for SSL Client Authentication (issue #11275) + * Added support for context menu event (issue #11429) + * Allow remote debugging to use random port assigned by the OS (issue #13432) + + Improvements + + * Allow outer context to access arbitrary URLs (issue #11217) + * Fixed --local-storage-path and localStoragePath config option (issue #11596) + * Restored --local-url-access=no regression (issue #13412) + * Fixed an issue with loading JS modules contains a last-line comment (issue #12868) + * Fixed an issue with returning binary content in WebServer module (issue #13026) + * Fixed encoded URL loading on Windows (issue #12953) + * Fixed building with GCC 5 (issue #13518) + * Fixed file upload (issue #12506) + * Fixed latest OS detection (issue #13829) + +2015-01-23: Version 2.0.0 + + New features + + * Switched to Qt 5 and updated WebKit (issue 10448) + * Implemented clearing of memory cache (issue 10357) + * Added support for HTTP header change for every request (issue 11299) + + Improvements + + * Fixed rendering of CJK text by always linking the codecs (issue 10249) + * Ensured onResourceReceived is still fired on an error (issue 11163) + * Fixed possible crash in handling network requests (issue 11252) + * Removed hardcoded GhostDriver launching message (issue 12681) + * Allowed disk cache more than 2 GB (issue 12303) + + Examples + + * Netsniff example should exit when fails to load (issue 11333) + +2014-01-25: Version 1.9.7 + + * Reverted to GhostDriver 1.1.0 instead of 1.1.1 (issue 11915) + * Fixed another warning of obsolete userSpaceScaleFactor on OS X 10.9 (issue 11612) + +2014-01-20: Version 1.9.6 + + * Updated GhostDriver to version 1.1.1 (issue 11877, 11893) + +2014-01-19: Version 1.9.3 + + * Fixed CoreText performance note on OS X 10.9 (issue 11418) + * Fixed warning of obsolete userSpaceScaleFactor on OS X 10.9 (issue 11612) + +2013-09-06: Version 1.9.2 + + * Fixed graphical artifacts with transparent background on Windows (issue 11276, 11007, 11366) + * Updated GhostDriver to version 1.0.4 (issue 11452) + +2013-06-04: Version 1.9.1 + + Critical bug fixes: + + * Fixed problems with specifying proxy server (issue 10811, 11117) + * Fixed UTF-8 encoding with system.stdout and system.stderr (issue 11162) + * Ensured that onResourceReceived will be always invoked (issue 11163) + * Fixed module loading from an absolute path on Windows (issue 11165) + * Fixed typo in the command-line option for setting the cache size (11219) + * Fixed possible crash when handling network requests (issue 11252, 11338) + +2013-03-20: Version 1.9.0 "Sakura" + + New features + + * Added spawn and execFile to execute external programs (issue 10219) + * Added the ability to abort network requests (issue 10230) + * Added system access to stdin, stdout, and stderr (issue 10333) + * Added support for custom CA certificates location (issue 10916) + * Added seek function to the File stream (issue 10937) + * Implemented file read for a specified number of bytes (issue 10938) + * Added a callback to handle network error (issue 10954, 10997) + * Added custom encoding support when opening a page (issue 11043) + * Implemented require.stub() support for a factory function (issue 11044) + * Added page loading indicator and progress (issue 11091) + * Added a timeout option for network requests (issue 11129) + + Improvements + + * Fixed the build on FreeBSD (issue 10597) + * Ensured a consistent 72 dpi for Linux headless rendering (issue 10659) + * Fixed possible PDF error due to invalid CreationDate field (issue 10663) + * Fixed crash when uploading non existing files (issue 10941) + * Improved the autocomplete internal of the interactive/REPL mode (issue 10943) + * Fixed possible crash when accessing inline frames (issue 10947) + * Changed Linux binary package setup to be built on CentOS 5 (issue 10963) + * Extended SSL ignore setting to synchronous XHR (issue 10985) + * Added convenient constants for modifier keys (issue 11056) + * Fixed incorrect date handling in the cookies (issue 11068) + * Updated GhostDriver to version 1.0.3 (issue 11146) + + Examples + + * Fixed invalid data URI in the netsniff example (issue 10740) + * Implemented a new weather example (issue 10794) + * Fixed rendering issues in render_multi_url (issue 11021) + * Fixed proper event sequence in page_events example (issue 11028) + * Miscellanous tweaks (issue 11082) + +2013-03-02: Version 1.8.2 + + Critical bug fixes: + + * Fixed possible PDF error due to invalid CreationDate field (issue 663) + * Fixed crash when uploading non existing files (issue 941) + * Fixed possible crash when accessing inline frames (issue 947) + * Extended SSL ignore setting to synchronous XHR (issue 985) + * Fixed incorrect date handling in the cookies (issue 1068) + +2013-01-06: Version 1.8.1 + + Critical bug fix: + + * Mac OS X: Fix possible crash when using some TrueType fonts (issue 690) + +2012-12-21: Version 1.8.0 "Blue Winter Rose" + + New features + + * Integrated GhostDriver as the WebDriver implementation (issue 49) + * Added an option to specify the SSL protocol (issue 174) + * Added encoding support for WebServer's response (issue 505) + * Added process ID (PID) to the System module (issue 769) + * Added properties to obtain page and frame title (issue 799) + * Added page navigation methods (issue 808) + * Added support for modifier keys in keyboard events (issue 835) + * Added onFilePicker callback for more generic file upload API (issue 843) + * Added the ability to set the page content and location (issue 909) + + Improvements + + * Fixed date parsing in ISO8601 format (issue 187, 267) + * Fixed window.location (issue 530, 632) + * Deregistered multiple callback handler (issue 807) + * Fixed sending of double-click events (issue 848) + * Increases maximum number of redirects (issue 849) + * Fixed keycodes sent for lowercase characters (issue 852) + * Fixed a regression in table row page break (issue 880) + * Completed the CoffeeScript version of the examples (issue 907) + * Updated Qt to version 4.8.4 (issue 918) + * Fixed potential hang in some example scripts (issue 922) + +2012-09-22: Version 1.7.0 "Blazing Star" + + New features + + * Added a module system modelled after CommonJS/Node.js (issue 47) + * Added support for window pop-up (issue 151) + * Static build on Linux (issue 413) + * Added run-time detection of SSL support (issue 484) + * Added more events support (issue 492, 712) + * Added support for disabling automatic proxy detection (issue 580) + * Provided page closing callback (issue 678) + * Added methods to access URL, frames URL, frame Content (issue 758) + * Added more cookies-related API (issue 761) + + Improvements + + * Refactored command-line options handling (issue 55) + * Improved the workflow for producing release builds (issue 599) + * Improved cookies API and implementation (issue 603, 761) + * Improved frame switching API (issue 654) + * Fixed iframe handling regression (issue 683) + * Fixed OS version number with Windows 8 and Mountain Lion (issue 684, 688) + * Fixed HAR navigation info in the netsniff example (issue 733) + * Fixed compile warnings with Visual Studio (issue 744) + * Removed hacks for static linking on Windows (issue 753) + * Added ICO image handling on Windows (issue 779) + * Fixed font antialiasing on Windows (issue 785) + * Improved Jasmine test runner for Jasmine 1.2 (issue 792) + +2012-07-22: Version 1.6.1 + + Bug fixes + + * Don't build the deploy in debug mode (issue 599) + * Fixed building on Windows (issue 424) + * Fixed remote inspector when building statically (issue 430) + +2012-06-20: Version 1.6.0 "Lavender" + + New features + + * Added support for passing arguments to WebPage's evaluate (issue 132) + * Added callbacks for JavaScript onConfirm and onPrompt (issue 133) + * Added stack trace when error occurs (issue 166) + * Added support for local storage path and quota (issue 300) + * Added initial support for cookies handling (issue 354) + * Added support for header footer when printing the page (issue 410, 512) + * Added headers support in the loading request (issue 452) + * Added support to render the web page as base64-encoded string (issue 547) + * Added hooks for navigation event (issue 562) + * Added command-line option to show debug messages (issue 575) + * Added support for the zoom factor for web page rendering (issue 579) + * Added crash reporter for Mac OS X and Linux, based on Google Breakpad (issue 576) + * Added 'os' object to the system module (issue 585) + * Added support for asynchronous evaluation (issue 593) + + Improvements + + * Fixed remote debugging to work on Mac OS X and Windows (issue 430) + * Fixed web server getting the dropped connection for empty response (issue 451) + * Fixed text rendered as boxes (squares) on headless Linux (issue 460) + * Updated Qt to version 4.8.2 (issue 495) + * Updated CoffeeScript compiler to version 1.3.3 (issue 496) + * Fixed the build script to detect and use MAKEFLAGS (issue 503) + * Fixed the build script to properly pass Qt config flags (issue 507) + * Changed Info.plist to be embedded in Mac OS X executable (issue 528) + * Fixed wrong module require in the imagebin example (issue 536) + * Fixed example scripts to exit with the right exit code (issue 544) + * Fixed build failure with glib 2.31.0+ (issue 559) + * Fixed error handler failures in some cases (issue 589) + * Fixed Twitter-related examples to work with the new site (issue 609) + +2012-03-20: Version 1.5.0 "Ghost Flower" + + New features + + * Added interactive mode, also known as REPL (issue 252) + * Added setting for web security, to allow cross domain XHR (issue 28) + * Added error handler for WebPage object (issue 166) + * Added support for custom HTTP header in the network request (issue 77) + * Added support for read write encoding in the file system module (issue 367) + * Added remote debugging support on Linux (issue 6) + * Added support for proxy authentication (issue 105) + * Added System module, to retrieve environment variables (issue 271) and arguments (issue 276) + * Added fs.readLink function (issue 329) + * Added support for reading and writing binary data (issue 400) + * Added support to retrieve request data in the WebServer? module (issue 340) + * Added support for individual top/bottom/left/right print margins (issue 388) + * Added command-line option --help (issue 347) + * Added short command-line options -v and -h (issue 408) + * Removed support for Flash and other plugins (issue 418) + + Bug fixes + + * Fixed multiple console.log arguments (issue 36) + * Fixed file upload (issue 307) + * Fixed the web server instance to be asynchronous (issue 326) and still support Keep Alive (issue 416) + * Workaround Qt 4.8.0 crash due to empty URL scheme (issue 365) + * Fixed a Content-Type problem where POST does not work (issue 337) + * Fixed reading body request in the web server even without specific Content-Type (issue 439) + * Fixed Jasmine test runner with Jasmine 1.1 (issue 402) + * Fixed request URL formatting in the web server (issue 437) + * Don't display debugging and warning messages (issue 323) + +2011-12-31: Version 1.4.1 + + Bug fixes + + * Fix setting the proxy type (issue 266) + * Workaround for file upload regression (issue 307) + * Fix extraneous messsages in non-debug mode (issue 323) + +2011-12-22: Version 1.4.0 "Glory of the Snow" + + New features + + * Added embedded HTTP server (issue 115) + * Added convenient build script for Linux (issue 197) + * Added support for SOCKS5 proxy (issue 266) + * Updated CoffeeScript compiler to version 1.2 (issue 312) + + Bug fixes + + * Fix potential crash in QUrl with Qt 4.8 (issue 304) + * Fix bug in CookieJar with QSettings and string (PyPhantomJS issue 10) + * Prevent showing the icon on Mac OS X Dock (issue 281) + + Examples + + * Added a new example to detect browsers sniffing (issue 263) + * Added HTTP server example (issue 115) + +2011-09-23: Version 1.3.0 "Water Lily" + + Bug fixes + + * Fixed open() and POST method, without specifying the finished handler + * Fixed script execution warning dialog (issue 165) + * Added WebPage.release() to free the web page from memory (issue 154) + * Added special handling of about:blank (issue 235) + * Made a separate network access manager for each page (issue 190) + + New features + + * Introduced file system API based on CommonJS Filesystem proposal (issue 129) + * Added support for persistent cookies (issue 91) + * Added event handling, currently only for mouse events (issue 234) + * Added page scroll position (issue 162) + * Added HTTP authentication support (issue 45) + * Added callback for page initialization (issue 143) + * Added support to specify script and output encoding (issue 186) + * Added option to allow local content to do cross-domain access (issue 28) + * Added support to apply configurations from a JSON file (issue 180) + * Added a convenient WebPage initialization construction (issue 206) + * Added option to limit the size of disk cache (issue 220) + + Examples + + * Added a new example on using Modernizr to detect features (issue 144) + * Fixed pizza.js example to use Mobile Yelp (issue 200) + * Fixed netsniff.coffee example due to wrong indentation (issue 225) + * Added an example to show live network traffic (issue 227) + * Added an example demonstrating different output encodings (issue 186) + +2011-06-21: Version 1.2.0 "Birds of Paradise" + + Version 1.2.0 is a major update. It introduces a whole set of new API. + + Bug fixes + + * Fixed rendering a very large web page (issue 54) + * Fixed reporting of CoffeeScript compile error (issue 125) + + New features + + * Added callback for console message (issue 12) + * Improved security model via WebPage object (issue 41) + * Added support for POST, HEAD, PUT, and DELETE (issue 88) + * Scripts filename is now passed as phantom.scriptName + * Added callback to capture resource requests and responses (issue 2) + * Added the ability to load external JavaScript (issue 32) + + Examples + + * Ported examples to use WebPage object + * Added a new example to upload an image to imagebin.org + * Added a new example to show HTTP POST feature + * Added a new example to sniff network traffic and save it in HAR format + + +2011-04-27: Version 1.1.0 "Cherry Blossom" + + Fixed the script loading to use UTF-8 encoding (Yasuhiro Matsumoto). + + Added check for system proxy setting (Yasuhiro Matsumoto). + + Fixed building with Cygwin and Qt 4.5 (John Dalton). + + Added a new example: driver for QUnit tests (Łukasz Korecki). + + Fixed issue #20: problem with JPG transparent color (Alessandro Portale). + + Fixed issue #9: ignore first line starting with #! (Matthias, aka fourplusone). + + Fixed issue #7: support for file upload for form submission (Matthias, aka fourplusone). + + Fixed issue #35: support for disabling images loading (Ariya Hidayat). + + Fixed issue #14: enable or disable plugins (Ariya Hidayat). + + Added a new example: using Canvas to produce the color wheel (Ariya Hidayat). + + Added support for rasterizing as GIF image (Ariya Hidayat). + + Added support for CoffeeScript (Ariya Hidayat). + + Fixed issue #19: option for setting the proxy (Clint Berry, Ariya Hidayat). + + Python implementation using PyQt (James Roe). + + Fixed issue #17: Specify paper size for PDF export (Alessandro Portale). + + Fixed issue #60: Win32 and OS/2 icon files (Salvador Parra Camacho). + + Added clipping rectangle to the render function (Wouter de Bie). + + Added an example on sychronous waiting (Gabor Torok). + + Added command line option to use disk cache (Jon Turner). + + Added text extracting example (Weston Ruter). + + Fixed issue #93: Build with Qt < 4.7 (Ariya Hidayat). + + Ported all examples to CoffeeScript (Robert Gieseke). + +2011-01-17: Version 1.0.0 + + Initial launch. + + The API is centralized at the 'phantom' object (as child of + window object) which has the properties: args, content, + loadStatus, state, userAgent, version, viewportSize, and + the following functions: exit, open, render, sleep. + + Several examples are included, among others: web page rasterizer, + weather service, headless test framework driver, and many others. diff --git a/src/test/java/WEB-INF/assist/phantomjs/phantomjs-macos/LICENSE.BSD b/src/test/java/WEB-INF/assist/phantomjs/phantomjs-macos/LICENSE.BSD new file mode 100644 index 0000000..d5dfdd1 --- /dev/null +++ b/src/test/java/WEB-INF/assist/phantomjs/phantomjs-macos/LICENSE.BSD @@ -0,0 +1,22 @@ +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/src/test/java/WEB-INF/assist/phantomjs/phantomjs-macos/README.md b/src/test/java/WEB-INF/assist/phantomjs/phantomjs-macos/README.md new file mode 100644 index 0000000..3c9578c --- /dev/null +++ b/src/test/java/WEB-INF/assist/phantomjs/phantomjs-macos/README.md @@ -0,0 +1,29 @@ +# [PhantomJS](http://phantomjs.org) - Scriptable Headless WebKit + +PhantomJS ([phantomjs.org](http://phantomjs.org)) is a headless WebKit scriptable with JavaScript. The latest [stable release](http://phantomjs.org/release-2.0.html) is version 2.0. + +**Note**: Please **do not** create a GitHub pull request **without** reading the [Contribution Guide](https://github.com/ariya/phantomjs/blob/master/CONTRIBUTING.md) first. Failure to do so may result in the rejection of the pull request. + +## Use Cases + +- **Headless web testing**. Lightning-fast testing without the browser is now possible! +- **Page automation**. [Access and manipulate](http://phantomjs.org/page-automation.html) web pages with the standard DOM API, or with usual libraries like jQuery. +- **Screen capture**. Programmatically [capture web contents](http://phantomjs.org/screen-capture.html), including CSS, SVG and Canvas. Build server-side web graphics apps, from a screenshot service to a vector chart rasterizer. +- **Network monitoring**. Automate performance analysis, track [page loading](http://phantomjs.org/network-monitoring.html) and export as standard HAR format. + +## Features + +- **Multiplatform**, available on major operating systems: Windows, Mac OS X, Linux, and other Unices. +- **Fast and native implementation** of web standards: DOM, CSS, JavaScript, Canvas, and SVG. No emulation! +- **Pure headless (no X11) on Linux**, ideal for continuous integration systems. Also runs on Amazon EC2, Heroku, and Iron.io. +- **Easy to install**: [Download](http://phantomjs.org/download.html), unpack, and start having fun in just 5 minutes. + +## Questions? + +- Explore the complete [documentation](http://phantomjs.org/documentation/). +- Read tons of [user articles](http://phantomjs.org/buzz.html) on using PhantomJS. +- Join the [mailing-list](http://groups.google.com/group/phantomjs) and discuss with other PhantomJS fans. + +PhantomJS is free software/open source, and is distributed under the [BSD license](http://opensource.org/licenses/BSD-3-Clause). It contains third-party code, see the included `third-party.txt` file for the license information on third-party code. + +PhantomJS is created and maintained by [Ariya Hidayat](http://ariya.ofilabs.com/about) (Twitter: [@ariyahidayat](http://twitter.com/ariyahidayat)), with the help of [many contributors](https://github.com/ariya/phantomjs/contributors). Follow the official Twitter stream [@PhantomJS](http://twitter.com/PhantomJS) to get the frequent development updates. diff --git a/src/test/java/WEB-INF/assist/phantomjs/phantomjs-macos/bin/phantomjs b/src/test/java/WEB-INF/assist/phantomjs/phantomjs-macos/bin/phantomjs new file mode 100644 index 0000000..36204c5 Binary files /dev/null and b/src/test/java/WEB-INF/assist/phantomjs/phantomjs-macos/bin/phantomjs differ diff --git a/src/test/java/WEB-INF/assist/phantomjs/phantomjs-macos/third-party.txt b/src/test/java/WEB-INF/assist/phantomjs/phantomjs-macos/third-party.txt new file mode 100644 index 0000000..48f74c4 --- /dev/null +++ b/src/test/java/WEB-INF/assist/phantomjs/phantomjs-macos/third-party.txt @@ -0,0 +1,36 @@ +This document contains the list of Third Party Software included with +PhantomJS, along with the license information. + +Third Party Software may impose additional restrictions and it is the +user's responsibility to ensure that they have met the licensing +requirements of PhantomJS and the relevant license of the Third Party +Software they are using. + +Qt - http://qt-project.org/ +License: GNU Lesser General Public License (LGPL) version 2.1. +Reference: http://qt-project.org/doc/qt-4.8/lgpl.html. + +WebKit - http://www.webkit.org/ +License: GNU Lesser General Public License (LGPL) version 2.1 and BSD. +Reference: http://www.webkit.org/coding/lgpl-license.html and +http://www.webkit.org/coding/bsd-license.html. + +Mongoose - https://github.com/cesanta/mongoose +License: MIT +Reference: https://github.com/cesanta/mongoose/commit/abbf27338ef554cce0281ac157aa71a9c1b82a55 + +OpenSSL - http://www.openssl.org/ +License: OpenSSL License, SSLeay License. +Reference: http://www.openssl.org/source/license.html. + +Linenoise - https://github.com/tadmarshall/linenoise +License: BSD. +Reference: https://github.com/tadmarshall/linenoise/blob/master/linenoise.h. + +QCommandLine - http://xf.iksaif.net/dev/qcommandline.html +License: GNU Lesser General Public License (LGPL) version 2.1. +Reference: http://dev.iksaif.net/projects/qcommandline/repository/revisions/master/entry/COPYING + +wkhtmlpdf - http://code.google.com/p/wkhtmltopdf/ +License: GNU Lesser General Public License (LGPL) +Reference: http://code.google.com/p/wkhtmltopdf/ diff --git a/src/test/java/WEB-INF/assist/phantomjs/phantomjs-windows/ChangeLog b/src/test/java/WEB-INF/assist/phantomjs/phantomjs-windows/ChangeLog new file mode 100644 index 0000000..a15f835 --- /dev/null +++ b/src/test/java/WEB-INF/assist/phantomjs/phantomjs-windows/ChangeLog @@ -0,0 +1,401 @@ +Please see also http://phantomjs.org/releases.html. + +2016-01-23: Version 2.1.0 + + New features + + * Upgraded Qt to 5.5.1 (issue #13377) + * Added support for SSL Client Authentication (issue #11275) + * Added support for context menu event (issue #11429) + * Allow remote debugging to use random port assigned by the OS (issue #13432) + + Improvements + + * Allow outer context to access arbitrary URLs (issue #11217) + * Fixed --local-storage-path and localStoragePath config option (issue #11596) + * Restored --local-url-access=no regression (issue #13412) + * Fixed an issue with loading JS modules contains a last-line comment (issue #12868) + * Fixed an issue with returning binary content in WebServer module (issue #13026) + * Fixed encoded URL loading on Windows (issue #12953) + * Fixed building with GCC 5 (issue #13518) + * Fixed file upload (issue #12506) + * Fixed latest OS detection (issue #13829) + +2015-01-23: Version 2.0.0 + + New features + + * Switched to Qt 5 and updated WebKit (issue 10448) + * Implemented clearing of memory cache (issue 10357) + * Added support for HTTP header change for every request (issue 11299) + + Improvements + + * Fixed rendering of CJK text by always linking the codecs (issue 10249) + * Ensured onResourceReceived is still fired on an error (issue 11163) + * Fixed possible crash in handling network requests (issue 11252) + * Removed hardcoded GhostDriver launching message (issue 12681) + * Allowed disk cache more than 2 GB (issue 12303) + + Examples + + * Netsniff example should exit when fails to load (issue 11333) + +2014-01-25: Version 1.9.7 + + * Reverted to GhostDriver 1.1.0 instead of 1.1.1 (issue 11915) + * Fixed another warning of obsolete userSpaceScaleFactor on OS X 10.9 (issue 11612) + +2014-01-20: Version 1.9.6 + + * Updated GhostDriver to version 1.1.1 (issue 11877, 11893) + +2014-01-19: Version 1.9.3 + + * Fixed CoreText performance note on OS X 10.9 (issue 11418) + * Fixed warning of obsolete userSpaceScaleFactor on OS X 10.9 (issue 11612) + +2013-09-06: Version 1.9.2 + + * Fixed graphical artifacts with transparent background on Windows (issue 11276, 11007, 11366) + * Updated GhostDriver to version 1.0.4 (issue 11452) + +2013-06-04: Version 1.9.1 + + Critical bug fixes: + + * Fixed problems with specifying proxy server (issue 10811, 11117) + * Fixed UTF-8 encoding with system.stdout and system.stderr (issue 11162) + * Ensured that onResourceReceived will be always invoked (issue 11163) + * Fixed module loading from an absolute path on Windows (issue 11165) + * Fixed typo in the command-line option for setting the cache size (11219) + * Fixed possible crash when handling network requests (issue 11252, 11338) + +2013-03-20: Version 1.9.0 "Sakura" + + New features + + * Added spawn and execFile to execute external programs (issue 10219) + * Added the ability to abort network requests (issue 10230) + * Added system access to stdin, stdout, and stderr (issue 10333) + * Added support for custom CA certificates location (issue 10916) + * Added seek function to the File stream (issue 10937) + * Implemented file read for a specified number of bytes (issue 10938) + * Added a callback to handle network error (issue 10954, 10997) + * Added custom encoding support when opening a page (issue 11043) + * Implemented require.stub() support for a factory function (issue 11044) + * Added page loading indicator and progress (issue 11091) + * Added a timeout option for network requests (issue 11129) + + Improvements + + * Fixed the build on FreeBSD (issue 10597) + * Ensured a consistent 72 dpi for Linux headless rendering (issue 10659) + * Fixed possible PDF error due to invalid CreationDate field (issue 10663) + * Fixed crash when uploading non existing files (issue 10941) + * Improved the autocomplete internal of the interactive/REPL mode (issue 10943) + * Fixed possible crash when accessing inline frames (issue 10947) + * Changed Linux binary package setup to be built on CentOS 5 (issue 10963) + * Extended SSL ignore setting to synchronous XHR (issue 10985) + * Added convenient constants for modifier keys (issue 11056) + * Fixed incorrect date handling in the cookies (issue 11068) + * Updated GhostDriver to version 1.0.3 (issue 11146) + + Examples + + * Fixed invalid data URI in the netsniff example (issue 10740) + * Implemented a new weather example (issue 10794) + * Fixed rendering issues in render_multi_url (issue 11021) + * Fixed proper event sequence in page_events example (issue 11028) + * Miscellanous tweaks (issue 11082) + +2013-03-02: Version 1.8.2 + + Critical bug fixes: + + * Fixed possible PDF error due to invalid CreationDate field (issue 663) + * Fixed crash when uploading non existing files (issue 941) + * Fixed possible crash when accessing inline frames (issue 947) + * Extended SSL ignore setting to synchronous XHR (issue 985) + * Fixed incorrect date handling in the cookies (issue 1068) + +2013-01-06: Version 1.8.1 + + Critical bug fix: + + * Mac OS X: Fix possible crash when using some TrueType fonts (issue 690) + +2012-12-21: Version 1.8.0 "Blue Winter Rose" + + New features + + * Integrated GhostDriver as the WebDriver implementation (issue 49) + * Added an option to specify the SSL protocol (issue 174) + * Added encoding support for WebServer's response (issue 505) + * Added process ID (PID) to the System module (issue 769) + * Added properties to obtain page and frame title (issue 799) + * Added page navigation methods (issue 808) + * Added support for modifier keys in keyboard events (issue 835) + * Added onFilePicker callback for more generic file upload API (issue 843) + * Added the ability to set the page content and location (issue 909) + + Improvements + + * Fixed date parsing in ISO8601 format (issue 187, 267) + * Fixed window.location (issue 530, 632) + * Deregistered multiple callback handler (issue 807) + * Fixed sending of double-click events (issue 848) + * Increases maximum number of redirects (issue 849) + * Fixed keycodes sent for lowercase characters (issue 852) + * Fixed a regression in table row page break (issue 880) + * Completed the CoffeeScript version of the examples (issue 907) + * Updated Qt to version 4.8.4 (issue 918) + * Fixed potential hang in some example scripts (issue 922) + +2012-09-22: Version 1.7.0 "Blazing Star" + + New features + + * Added a module system modelled after CommonJS/Node.js (issue 47) + * Added support for window pop-up (issue 151) + * Static build on Linux (issue 413) + * Added run-time detection of SSL support (issue 484) + * Added more events support (issue 492, 712) + * Added support for disabling automatic proxy detection (issue 580) + * Provided page closing callback (issue 678) + * Added methods to access URL, frames URL, frame Content (issue 758) + * Added more cookies-related API (issue 761) + + Improvements + + * Refactored command-line options handling (issue 55) + * Improved the workflow for producing release builds (issue 599) + * Improved cookies API and implementation (issue 603, 761) + * Improved frame switching API (issue 654) + * Fixed iframe handling regression (issue 683) + * Fixed OS version number with Windows 8 and Mountain Lion (issue 684, 688) + * Fixed HAR navigation info in the netsniff example (issue 733) + * Fixed compile warnings with Visual Studio (issue 744) + * Removed hacks for static linking on Windows (issue 753) + * Added ICO image handling on Windows (issue 779) + * Fixed font antialiasing on Windows (issue 785) + * Improved Jasmine test runner for Jasmine 1.2 (issue 792) + +2012-07-22: Version 1.6.1 + + Bug fixes + + * Don't build the deploy in debug mode (issue 599) + * Fixed building on Windows (issue 424) + * Fixed remote inspector when building statically (issue 430) + +2012-06-20: Version 1.6.0 "Lavender" + + New features + + * Added support for passing arguments to WebPage's evaluate (issue 132) + * Added callbacks for JavaScript onConfirm and onPrompt (issue 133) + * Added stack trace when error occurs (issue 166) + * Added support for local storage path and quota (issue 300) + * Added initial support for cookies handling (issue 354) + * Added support for header footer when printing the page (issue 410, 512) + * Added headers support in the loading request (issue 452) + * Added support to render the web page as base64-encoded string (issue 547) + * Added hooks for navigation event (issue 562) + * Added command-line option to show debug messages (issue 575) + * Added support for the zoom factor for web page rendering (issue 579) + * Added crash reporter for Mac OS X and Linux, based on Google Breakpad (issue 576) + * Added 'os' object to the system module (issue 585) + * Added support for asynchronous evaluation (issue 593) + + Improvements + + * Fixed remote debugging to work on Mac OS X and Windows (issue 430) + * Fixed web server getting the dropped connection for empty response (issue 451) + * Fixed text rendered as boxes (squares) on headless Linux (issue 460) + * Updated Qt to version 4.8.2 (issue 495) + * Updated CoffeeScript compiler to version 1.3.3 (issue 496) + * Fixed the build script to detect and use MAKEFLAGS (issue 503) + * Fixed the build script to properly pass Qt config flags (issue 507) + * Changed Info.plist to be embedded in Mac OS X executable (issue 528) + * Fixed wrong module require in the imagebin example (issue 536) + * Fixed example scripts to exit with the right exit code (issue 544) + * Fixed build failure with glib 2.31.0+ (issue 559) + * Fixed error handler failures in some cases (issue 589) + * Fixed Twitter-related examples to work with the new site (issue 609) + +2012-03-20: Version 1.5.0 "Ghost Flower" + + New features + + * Added interactive mode, also known as REPL (issue 252) + * Added setting for web security, to allow cross domain XHR (issue 28) + * Added error handler for WebPage object (issue 166) + * Added support for custom HTTP header in the network request (issue 77) + * Added support for read write encoding in the file system module (issue 367) + * Added remote debugging support on Linux (issue 6) + * Added support for proxy authentication (issue 105) + * Added System module, to retrieve environment variables (issue 271) and arguments (issue 276) + * Added fs.readLink function (issue 329) + * Added support for reading and writing binary data (issue 400) + * Added support to retrieve request data in the WebServer? module (issue 340) + * Added support for individual top/bottom/left/right print margins (issue 388) + * Added command-line option --help (issue 347) + * Added short command-line options -v and -h (issue 408) + * Removed support for Flash and other plugins (issue 418) + + Bug fixes + + * Fixed multiple console.log arguments (issue 36) + * Fixed file upload (issue 307) + * Fixed the web server instance to be asynchronous (issue 326) and still support Keep Alive (issue 416) + * Workaround Qt 4.8.0 crash due to empty URL scheme (issue 365) + * Fixed a Content-Type problem where POST does not work (issue 337) + * Fixed reading body request in the web server even without specific Content-Type (issue 439) + * Fixed Jasmine test runner with Jasmine 1.1 (issue 402) + * Fixed request URL formatting in the web server (issue 437) + * Don't display debugging and warning messages (issue 323) + +2011-12-31: Version 1.4.1 + + Bug fixes + + * Fix setting the proxy type (issue 266) + * Workaround for file upload regression (issue 307) + * Fix extraneous messsages in non-debug mode (issue 323) + +2011-12-22: Version 1.4.0 "Glory of the Snow" + + New features + + * Added embedded HTTP server (issue 115) + * Added convenient build script for Linux (issue 197) + * Added support for SOCKS5 proxy (issue 266) + * Updated CoffeeScript compiler to version 1.2 (issue 312) + + Bug fixes + + * Fix potential crash in QUrl with Qt 4.8 (issue 304) + * Fix bug in CookieJar with QSettings and string (PyPhantomJS issue 10) + * Prevent showing the icon on Mac OS X Dock (issue 281) + + Examples + + * Added a new example to detect browsers sniffing (issue 263) + * Added HTTP server example (issue 115) + +2011-09-23: Version 1.3.0 "Water Lily" + + Bug fixes + + * Fixed open() and POST method, without specifying the finished handler + * Fixed script execution warning dialog (issue 165) + * Added WebPage.release() to free the web page from memory (issue 154) + * Added special handling of about:blank (issue 235) + * Made a separate network access manager for each page (issue 190) + + New features + + * Introduced file system API based on CommonJS Filesystem proposal (issue 129) + * Added support for persistent cookies (issue 91) + * Added event handling, currently only for mouse events (issue 234) + * Added page scroll position (issue 162) + * Added HTTP authentication support (issue 45) + * Added callback for page initialization (issue 143) + * Added support to specify script and output encoding (issue 186) + * Added option to allow local content to do cross-domain access (issue 28) + * Added support to apply configurations from a JSON file (issue 180) + * Added a convenient WebPage initialization construction (issue 206) + * Added option to limit the size of disk cache (issue 220) + + Examples + + * Added a new example on using Modernizr to detect features (issue 144) + * Fixed pizza.js example to use Mobile Yelp (issue 200) + * Fixed netsniff.coffee example due to wrong indentation (issue 225) + * Added an example to show live network traffic (issue 227) + * Added an example demonstrating different output encodings (issue 186) + +2011-06-21: Version 1.2.0 "Birds of Paradise" + + Version 1.2.0 is a major update. It introduces a whole set of new API. + + Bug fixes + + * Fixed rendering a very large web page (issue 54) + * Fixed reporting of CoffeeScript compile error (issue 125) + + New features + + * Added callback for console message (issue 12) + * Improved security model via WebPage object (issue 41) + * Added support for POST, HEAD, PUT, and DELETE (issue 88) + * Scripts filename is now passed as phantom.scriptName + * Added callback to capture resource requests and responses (issue 2) + * Added the ability to load external JavaScript (issue 32) + + Examples + + * Ported examples to use WebPage object + * Added a new example to upload an image to imagebin.org + * Added a new example to show HTTP POST feature + * Added a new example to sniff network traffic and save it in HAR format + + +2011-04-27: Version 1.1.0 "Cherry Blossom" + + Fixed the script loading to use UTF-8 encoding (Yasuhiro Matsumoto). + + Added check for system proxy setting (Yasuhiro Matsumoto). + + Fixed building with Cygwin and Qt 4.5 (John Dalton). + + Added a new example: driver for QUnit tests (Łukasz Korecki). + + Fixed issue #20: problem with JPG transparent color (Alessandro Portale). + + Fixed issue #9: ignore first line starting with #! (Matthias, aka fourplusone). + + Fixed issue #7: support for file upload for form submission (Matthias, aka fourplusone). + + Fixed issue #35: support for disabling images loading (Ariya Hidayat). + + Fixed issue #14: enable or disable plugins (Ariya Hidayat). + + Added a new example: using Canvas to produce the color wheel (Ariya Hidayat). + + Added support for rasterizing as GIF image (Ariya Hidayat). + + Added support for CoffeeScript (Ariya Hidayat). + + Fixed issue #19: option for setting the proxy (Clint Berry, Ariya Hidayat). + + Python implementation using PyQt (James Roe). + + Fixed issue #17: Specify paper size for PDF export (Alessandro Portale). + + Fixed issue #60: Win32 and OS/2 icon files (Salvador Parra Camacho). + + Added clipping rectangle to the render function (Wouter de Bie). + + Added an example on sychronous waiting (Gabor Torok). + + Added command line option to use disk cache (Jon Turner). + + Added text extracting example (Weston Ruter). + + Fixed issue #93: Build with Qt < 4.7 (Ariya Hidayat). + + Ported all examples to CoffeeScript (Robert Gieseke). + +2011-01-17: Version 1.0.0 + + Initial launch. + + The API is centralized at the 'phantom' object (as child of + window object) which has the properties: args, content, + loadStatus, state, userAgent, version, viewportSize, and + the following functions: exit, open, render, sleep. + + Several examples are included, among others: web page rasterizer, + weather service, headless test framework driver, and many others. diff --git a/src/test/java/WEB-INF/assist/phantomjs/phantomjs-windows/LICENSE.BSD b/src/test/java/WEB-INF/assist/phantomjs/phantomjs-windows/LICENSE.BSD new file mode 100644 index 0000000..d5dfdd1 --- /dev/null +++ b/src/test/java/WEB-INF/assist/phantomjs/phantomjs-windows/LICENSE.BSD @@ -0,0 +1,22 @@ +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/src/test/java/WEB-INF/assist/phantomjs/phantomjs-windows/README.md b/src/test/java/WEB-INF/assist/phantomjs/phantomjs-windows/README.md new file mode 100644 index 0000000..3c9578c --- /dev/null +++ b/src/test/java/WEB-INF/assist/phantomjs/phantomjs-windows/README.md @@ -0,0 +1,29 @@ +# [PhantomJS](http://phantomjs.org) - Scriptable Headless WebKit + +PhantomJS ([phantomjs.org](http://phantomjs.org)) is a headless WebKit scriptable with JavaScript. The latest [stable release](http://phantomjs.org/release-2.0.html) is version 2.0. + +**Note**: Please **do not** create a GitHub pull request **without** reading the [Contribution Guide](https://github.com/ariya/phantomjs/blob/master/CONTRIBUTING.md) first. Failure to do so may result in the rejection of the pull request. + +## Use Cases + +- **Headless web testing**. Lightning-fast testing without the browser is now possible! +- **Page automation**. [Access and manipulate](http://phantomjs.org/page-automation.html) web pages with the standard DOM API, or with usual libraries like jQuery. +- **Screen capture**. Programmatically [capture web contents](http://phantomjs.org/screen-capture.html), including CSS, SVG and Canvas. Build server-side web graphics apps, from a screenshot service to a vector chart rasterizer. +- **Network monitoring**. Automate performance analysis, track [page loading](http://phantomjs.org/network-monitoring.html) and export as standard HAR format. + +## Features + +- **Multiplatform**, available on major operating systems: Windows, Mac OS X, Linux, and other Unices. +- **Fast and native implementation** of web standards: DOM, CSS, JavaScript, Canvas, and SVG. No emulation! +- **Pure headless (no X11) on Linux**, ideal for continuous integration systems. Also runs on Amazon EC2, Heroku, and Iron.io. +- **Easy to install**: [Download](http://phantomjs.org/download.html), unpack, and start having fun in just 5 minutes. + +## Questions? + +- Explore the complete [documentation](http://phantomjs.org/documentation/). +- Read tons of [user articles](http://phantomjs.org/buzz.html) on using PhantomJS. +- Join the [mailing-list](http://groups.google.com/group/phantomjs) and discuss with other PhantomJS fans. + +PhantomJS is free software/open source, and is distributed under the [BSD license](http://opensource.org/licenses/BSD-3-Clause). It contains third-party code, see the included `third-party.txt` file for the license information on third-party code. + +PhantomJS is created and maintained by [Ariya Hidayat](http://ariya.ofilabs.com/about) (Twitter: [@ariyahidayat](http://twitter.com/ariyahidayat)), with the help of [many contributors](https://github.com/ariya/phantomjs/contributors). Follow the official Twitter stream [@PhantomJS](http://twitter.com/PhantomJS) to get the frequent development updates. diff --git a/src/test/java/WEB-INF/assist/phantomjs/phantomjs-windows/bin/phantomjs.exe b/src/test/java/WEB-INF/assist/phantomjs/phantomjs-windows/bin/phantomjs.exe new file mode 100644 index 0000000..c644886 Binary files /dev/null and b/src/test/java/WEB-INF/assist/phantomjs/phantomjs-windows/bin/phantomjs.exe differ diff --git a/src/test/java/WEB-INF/assist/phantomjs/phantomjs-windows/third-party.txt b/src/test/java/WEB-INF/assist/phantomjs/phantomjs-windows/third-party.txt new file mode 100644 index 0000000..48f74c4 --- /dev/null +++ b/src/test/java/WEB-INF/assist/phantomjs/phantomjs-windows/third-party.txt @@ -0,0 +1,36 @@ +This document contains the list of Third Party Software included with +PhantomJS, along with the license information. + +Third Party Software may impose additional restrictions and it is the +user's responsibility to ensure that they have met the licensing +requirements of PhantomJS and the relevant license of the Third Party +Software they are using. + +Qt - http://qt-project.org/ +License: GNU Lesser General Public License (LGPL) version 2.1. +Reference: http://qt-project.org/doc/qt-4.8/lgpl.html. + +WebKit - http://www.webkit.org/ +License: GNU Lesser General Public License (LGPL) version 2.1 and BSD. +Reference: http://www.webkit.org/coding/lgpl-license.html and +http://www.webkit.org/coding/bsd-license.html. + +Mongoose - https://github.com/cesanta/mongoose +License: MIT +Reference: https://github.com/cesanta/mongoose/commit/abbf27338ef554cce0281ac157aa71a9c1b82a55 + +OpenSSL - http://www.openssl.org/ +License: OpenSSL License, SSLeay License. +Reference: http://www.openssl.org/source/license.html. + +Linenoise - https://github.com/tadmarshall/linenoise +License: BSD. +Reference: https://github.com/tadmarshall/linenoise/blob/master/linenoise.h. + +QCommandLine - http://xf.iksaif.net/dev/qcommandline.html +License: GNU Lesser General Public License (LGPL) version 2.1. +Reference: http://dev.iksaif.net/projects/qcommandline/repository/revisions/master/entry/COPYING + +wkhtmlpdf - http://code.google.com/p/wkhtmltopdf/ +License: GNU Lesser General Public License (LGPL) +Reference: http://code.google.com/p/wkhtmltopdf/ diff --git a/src/test/java/WEB-INF/assist/phantomjs/phantomjs-winxp/bin/phantomjs.exe b/src/test/java/WEB-INF/assist/phantomjs/phantomjs-winxp/bin/phantomjs.exe new file mode 100644 index 0000000..fb599db Binary files /dev/null and b/src/test/java/WEB-INF/assist/phantomjs/phantomjs-winxp/bin/phantomjs.exe differ diff --git a/src/test/java/WEB-INF/reportlets/demo.cpt b/src/test/java/WEB-INF/reportlets/demo.cpt new file mode 100644 index 0000000..51f8b80 --- /dev/null +++ b/src/test/java/WEB-INF/reportlets/demo.cpt @@ -0,0 +1,43 @@ + + + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
diff --git a/src/test/java/com/fr/demo/ModuleStartTest.java b/src/test/java/com/fr/demo/ModuleStartTest.java new file mode 100644 index 0000000..44d5080 --- /dev/null +++ b/src/test/java/com/fr/demo/ModuleStartTest.java @@ -0,0 +1,80 @@ +package com.fr.demo; + +import com.fr.base.operator.common.CommonOperator; +import com.fr.chart.activator.ChartBaseActivator; +import com.fr.cluster.engine.activator.standalone.StandaloneModeActivator; +import com.fr.config.activator.BaseDBActivator; +import com.fr.config.activator.ConfigurationActivator; +import com.fr.env.operator.CommonOperatorImpl; +import com.fr.general.FRLogger; +import com.fr.general.I18nResource; +import com.fr.io.TemplateWorkBookIO; +import com.fr.log.FineLoggerFactory; +import com.fr.log.LogHandler; +import com.fr.main.impl.WorkBook; +import com.fr.module.Module; +import com.fr.module.tool.ActivatorToolBox; +import com.fr.report.ReportActivator; +import com.fr.report.RestrictionActivator; +import com.fr.report.module.ReportBaseActivator; +import com.fr.scheduler.SchedulerActivator; +import com.fr.store.StateServerActivator; +import com.fr.workspace.simple.SimpleWork; +import junit.framework.TestCase; +import org.junit.Assert; + +public class ModuleStartTest extends TestCase { + final TestLogAppender logAppender = new TestLogAppender(); + + @Override + protected void setUp() throws Exception { + LogHandler logHandler = new LogHandler() { + @Override + public TestLogAppender getHandler() { + return logAppender; + } + }; + FineLoggerFactory.registerLogger(FRLogger.getLogger()); + FineLoggerFactory.getLogger().addLogAppender(logHandler); + } + + public void testModuleStartAndShutdown() { + for (int i = 0; i < 2; i++) { + Module module = initModule(); + SimpleWork.supply(CommonOperator.class, new CommonOperatorImpl()); + SimpleWork.checkIn(ModuleStartTest.class.getResource("../../../WEB-INF").getPath()); + I18nResource.getInstance(); + + module.start(); + WorkBook workbook = null; + try { + workbook = (WorkBook) TemplateWorkBookIO + .readTemplateWorkBook("//demo.cpt"); + } catch (Exception e) { + FineLoggerFactory.getLogger().error(e.getMessage(), e); + } + Assert.assertNotNull(workbook); + module.stop(); + } + Assert.assertEquals(logAppender.getErrorList().size(), 0); + + } + + private Module initModule() { + Module module = ActivatorToolBox.simpleLink(new BaseDBActivator(), + new ConfigurationActivator(), + new StandaloneModeActivator(), + new StateServerActivator(), + new SchedulerActivator(), + new ReportBaseActivator(), + new RestrictionActivator(), + new ReportActivator(), + new ChartBaseActivator()); + return module; + } + + @Override + protected void tearDown() throws Exception { + logAppender.close(); + } +} \ No newline at end of file diff --git a/src/test/java/com/fr/demo/TestLogAppender.java b/src/test/java/com/fr/demo/TestLogAppender.java new file mode 100644 index 0000000..4b636dd --- /dev/null +++ b/src/test/java/com/fr/demo/TestLogAppender.java @@ -0,0 +1,51 @@ +package com.fr.demo; + + +import com.fr.third.apache.log4j.AppenderSkeleton; +import com.fr.third.apache.log4j.Level; +import com.fr.third.apache.log4j.spi.LoggingEvent; + +import java.util.ArrayList; +import java.util.List; + +/** + * Created by Administrator on 2017/7/18 0018. + */ +public class TestLogAppender extends AppenderSkeleton { + private List errorList = new ArrayList(); + + public TestLogAppender() { + this.layout = new com.fr.third.apache.log4j.PatternLayout("%d{HH:mm:ss} %t %p [%c] %m%n"); + } + + protected void append(LoggingEvent event) { + this.subAppend(event); + } + + public boolean requiresLayout() { + return true; + } + + public synchronized void close() { + if (this.closed) { + return; + } + errorList.clear(); + this.closed = true; + + } + + public void subAppend(LoggingEvent event) { + Level level = event.getLevel(); + String msg = this.layout.format(event); + System.out.println(msg); + if (Level.ERROR.equals(level)) { + errorList.add(msg); + } + } + + public List getErrorList() { + return errorList; + } +} +