From f054076290f909a77e7e05f9bf271cf9125d9d00 Mon Sep 17 00:00:00 2001 From: thinkinggis Date: Wed, 20 Nov 2019 14:14:30 +0800 Subject: [PATCH] docs(docs): add api --- docs/API/L7.en.md | 3 +- docs/API/L7.zh.md | 71 +++- docs/API/Scene.zh.md | 4 +- docs/API/component/control.en.md | 3 +- docs/API/component/control.zh.md | 2 +- docs/API/component/marker.en.md | 2 +- docs/API/component/marker.zh.md | 2 +- docs/API/component/popup.zh.md | 2 +- docs/API/layer.zh.md | 4 - docs/API/layer/heatmap.en.md | 4 + docs/API/layer/heatmap.zh.md | 4 + docs/API/layer/imagelayer.en.md | 4 + docs/API/layer/imagelayer.zh.md | 4 + docs/API/{ => layer}/layer.en.md | 2 +- docs/API/layer/layer.zh.md | 368 ++++++++++++++++++ docs/API/layer/linelayer.en.md | 4 + docs/API/layer/linelayer.zh.md | 4 + docs/API/layer/pointlayer.en.md | 4 + docs/API/layer/pointlayer.zh.md | 4 + docs/API/layer/polygonlayer.en.md | 4 + docs/API/layer/polygonlayer.zh.md | 4 + docs/API/source/geojson.en.md | 27 ++ docs/API/source/geojson.zh.md | 27 ++ docs/API/source/source.en.md | 298 ++++++++++++++ docs/API/source/source.zh.md | 298 ++++++++++++++ examples/gallery/basic/index.en.md | 2 +- examples/gallery/basic/index.zh.md | 2 +- gatsby-config.js | 39 +- package.json | 2 +- .../services/shader/ShaderModuleService.ts | 2 +- .../src/shaders/{light.glsl => light2.glsl} | 6 +- packages/core/src/shaders/projection.glsl | 2 +- .../src/heatmap/shaders/hexagon_3d_vert.glsl | 2 +- packages/layers/src/point/models/extrude.ts | 4 +- .../src/point/shaders/extrude3_vert.glsl | 33 ++ .../src/point/shaders/extrude_vert.glsl | 20 +- site/css/home.css | 24 +- site/js/g2plot.js | 32 -- site/locale.json | 9 +- site/pages/index.zh.tsx | 12 +- yarn.lock | 234 +++++------ 41 files changed, 1346 insertions(+), 232 deletions(-) delete mode 100644 docs/API/layer.zh.md create mode 100644 docs/API/layer/heatmap.en.md create mode 100644 docs/API/layer/heatmap.zh.md create mode 100644 docs/API/layer/imagelayer.en.md create mode 100644 docs/API/layer/imagelayer.zh.md rename docs/API/{ => layer}/layer.en.md (73%) create mode 100644 docs/API/layer/layer.zh.md create mode 100644 docs/API/layer/linelayer.en.md create mode 100644 docs/API/layer/linelayer.zh.md create mode 100644 docs/API/layer/pointlayer.en.md create mode 100644 docs/API/layer/pointlayer.zh.md create mode 100644 docs/API/layer/polygonlayer.en.md create mode 100644 docs/API/layer/polygonlayer.zh.md create mode 100644 docs/API/source/geojson.en.md create mode 100644 docs/API/source/geojson.zh.md create mode 100644 docs/API/source/source.en.md create mode 100644 docs/API/source/source.zh.md rename packages/core/src/shaders/{light.glsl => light2.glsl} (75%) create mode 100644 packages/layers/src/point/shaders/extrude3_vert.glsl delete mode 100644 site/js/g2plot.js diff --git a/docs/API/L7.en.md b/docs/API/L7.en.md index fc4302c64b..ee28caf482 100644 --- a/docs/API/L7.en.md +++ b/docs/API/L7.en.md @@ -2,5 +2,6 @@ title: Introduction order: 0 redirect_from: - - /en/docs/api/ + - /en/docs/api --- +# An open source large-scale geospatial data visualization analysis development framework powered by WebGL \ No newline at end of file diff --git a/docs/API/L7.zh.md b/docs/API/L7.zh.md index 7978e8db8e..17a728d969 100644 --- a/docs/API/L7.zh.md +++ b/docs/API/L7.zh.md @@ -2,5 +2,74 @@ title: 简介 order: 0 redirect_from: - - /zh/docs/api/ + - /zh/docs/api --- + +# L7 地理空间数据可视分析引擎 + +L7 是由蚂蚁金服 AntV 数据可视化团队推出的基于 WebGL 的开源大规模地理空间数据可视分析开发框架。L7 中的 L 代表 Location,7 代表世界七大洲,寓意能为全球位置数据提供可视分析的能力。L7 以图形符号学为理论基础,将抽象复杂的空间数据转化成 2D、3D 符号,通过颜色、大小、体积、纹理等视觉变量实现丰富的可视化表达。 + + + +## 核心特性 + +### 数据驱动可视化展示 + +数据驱动,从数到形,支持丰富的地图可视化类型,更好洞察数据。 + +### 2D,3D 一体化的海量数据高性能渲染 + +百万级空间数据实时,动态渲染。 + +### 简单灵活的数据接入 + +支持CSV,JSON,geojson等数据格式接入,可以根据需求自定义数据格式,无需复杂的空间数据转换。 + +### 多地图底图支持,支持离线内网部署 + +高德地图国内合法合规的地理底图,Mapbox 满足国际化业务需求。 + +## 支持丰富的图表类型 + +### 点图层 + + - 气泡图 + - 散点图 + - 符号地图 + - 3D柱状地图 + - 聚合地图 + - 复合图表地图 + - 自定义Marker + +### 线图层 + +- 路径地图 +- 弧线,支持2D弧线、3D弧线以及大圆航线 +- 等值线 + +### 面图层 + +- 填充图 +- 3D填充图 + +### 热力图 + +- 经典热力图 +- 蜂窝热力图 +- 网格热力图 + +### 栅格地图 +- 图片 +- Raster + +## L7 2.0 Roadmap + +![L7 Road Map](https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*3j9HTLTQT2MAAAAAAAAAAABkARQnAQ) + + +更多技术细节,详细进展,请关注 [GitHub](https://github.com/antvis/L7),欢迎大家来给点点 Star,让更多人看到这个开源的项目。 \ No newline at end of file diff --git a/docs/API/Scene.zh.md b/docs/API/Scene.zh.md index 345f9e5dc7..3cb697b653 100644 --- a/docs/API/Scene.zh.md +++ b/docs/API/Scene.zh.md @@ -40,14 +40,14 @@ const scene = new L7.Scene({ pitch: 0, zoom: 12, maxZoom:20, - minZoom:0, + minZoom:0 }); ``` #### 根据map 实例创建Sence -_L7 基于高德地图3D模式开发的,因此传入Map实例 __viewModes需要设置成3d_
_ +L7 基于高德地图3D模式开发的,因此传入Map实例 __viewModes需要设置成3d_
_ ```javascript var mapinstance = new AMap.Map('map',{ center: [ 120.19382669582967, 30.258134 ], diff --git a/docs/API/component/control.en.md b/docs/API/component/control.en.md index 7a0a3ee170..04aea5ea1f 100644 --- a/docs/API/component/control.en.md +++ b/docs/API/component/control.en.md @@ -1,5 +1,5 @@ --- -title: Map Control +title: sControl order: 1 --- # control @@ -15,6 +15,7 @@ const baseControl = new L7.Control.Base(option); #### option +  position: `string` 控件位置支持是个方位 `bottomright, topright, bottomleft, topleft` diff --git a/docs/API/component/control.zh.md b/docs/API/component/control.zh.md index d97551fcdb..16d9950e31 100644 --- a/docs/API/component/control.zh.md +++ b/docs/API/component/control.zh.md @@ -1,5 +1,5 @@ --- -title: 地图组件 +title: Control order: 3 --- # control diff --git a/docs/API/component/marker.en.md b/docs/API/component/marker.en.md index b2ca8d9cd4..5adbea840f 100644 --- a/docs/API/component/marker.en.md +++ b/docs/API/component/marker.en.md @@ -1,5 +1,5 @@ --- -title: Map Marker +title: Marker order: 3 --- diff --git a/docs/API/component/marker.zh.md b/docs/API/component/marker.zh.md index b7fe0782aa..5adbea840f 100644 --- a/docs/API/component/marker.zh.md +++ b/docs/API/component/marker.zh.md @@ -1,5 +1,5 @@ --- -title: 地图标注 +title: Marker order: 3 --- diff --git a/docs/API/component/popup.zh.md b/docs/API/component/popup.zh.md index 3d2c0cf7a3..e3fa32bfbe 100644 --- a/docs/API/component/popup.zh.md +++ b/docs/API/component/popup.zh.md @@ -1,5 +1,5 @@ --- -title: 地图信息框 +title: popup order: 0 --- # popup diff --git a/docs/API/layer.zh.md b/docs/API/layer.zh.md deleted file mode 100644 index 663bb41031..0000000000 --- a/docs/API/layer.zh.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: 图层 -order: 2 ---- diff --git a/docs/API/layer/heatmap.en.md b/docs/API/layer/heatmap.en.md new file mode 100644 index 0000000000..c092214c9a --- /dev/null +++ b/docs/API/layer/heatmap.en.md @@ -0,0 +1,4 @@ +--- +title: HeatmapLayer +order: 5 +--- \ No newline at end of file diff --git a/docs/API/layer/heatmap.zh.md b/docs/API/layer/heatmap.zh.md new file mode 100644 index 0000000000..c092214c9a --- /dev/null +++ b/docs/API/layer/heatmap.zh.md @@ -0,0 +1,4 @@ +--- +title: HeatmapLayer +order: 5 +--- \ No newline at end of file diff --git a/docs/API/layer/imagelayer.en.md b/docs/API/layer/imagelayer.en.md new file mode 100644 index 0000000000..7563898fbc --- /dev/null +++ b/docs/API/layer/imagelayer.en.md @@ -0,0 +1,4 @@ +--- +title: ImageLayer +order: 5 +--- \ No newline at end of file diff --git a/docs/API/layer/imagelayer.zh.md b/docs/API/layer/imagelayer.zh.md new file mode 100644 index 0000000000..7563898fbc --- /dev/null +++ b/docs/API/layer/imagelayer.zh.md @@ -0,0 +1,4 @@ +--- +title: ImageLayer +order: 5 +--- \ No newline at end of file diff --git a/docs/API/layer.en.md b/docs/API/layer/layer.en.md similarity index 73% rename from docs/API/layer.en.md rename to docs/API/layer/layer.en.md index 5d1690ca09..dc3ba34e41 100644 --- a/docs/API/layer.en.md +++ b/docs/API/layer/layer.en.md @@ -1,4 +1,4 @@ --- title: Map Layer -order: 2 +order: 0 --- diff --git a/docs/API/layer/layer.zh.md b/docs/API/layer/layer.zh.md new file mode 100644 index 0000000000..ebb2e535f5 --- /dev/null +++ b/docs/API/layer/layer.zh.md @@ -0,0 +1,368 @@ +--- +title: Layer +order: 0 +--- +# Layer + + +## 简介 +L7 Layer 接口设计遵循图形语法,在可视表达上 + +语法示例 + +```javascript +new Layer(option) +.source() +.color() +.size() +.shape() +.style() + +``` + + +## 构造函数 + + +## 配置项 + +### visable +图层是否可见   {bool } default true + +### zIndex + 图层绘制顺序,数值越小优先绘制,可以控制图层绘制的上下层级 {int}   default 0 +### minZoom +图层显示最小缩放等级,(0-18)   {number}  default 0 + +### maxZoom + 图层显示最大缩放等级 (0-18)   {number}  default 18 + + +## 鼠标事件 + +beta版当前不支持,正式版会支持 + +```javascript +layer.on('click', (ev)=>{}); // 鼠标左键点击图层事件 +layer.on('dblclick', (ev)=>{}); // 鼠标左键双击图层事件 +layer.on('mousemove', (ev)=>{}); // 鼠标在图层上移动时触发 +layer.on('mouseover', (ev)=>{}); // 鼠标移入图层要素内时触发 +layer.on('mouseout', (ev)=>{}); // 鼠标移出图层要素时触发 +layer.on('mouseup', (ev)=>{}); // 鼠标在图层上单击抬起时触发 +layer.on('mousedown', (ev)=>{}); // 鼠标在图层上单击按下时触发 +layer.on('mouseleave', (ev)=>{}); // 鼠标离开图层要素 +layer.on('rightclick', (ev)=>{}); // 鼠标右键图层要素 + +``` + + +## 方法 + +### source +数据源为layer设置数据 source(data,config) + +- data {geojson|json|csv} + + +      源数据 + +- config  可选 数据源配置项 + - parser 数据解析,默认是解析层geojson + - transforms [transform,transform ]  数据处理转换 可设置多个 + + parser和 transforms [见source文档](https://www.yuque.com/antv/l7/source) + +```javascript +layer.source(data, { + parser: { + type: 'csv', + x: 'lng', + y: 'lat' + }, + transforms:[ + { + type: 'map', + callback:function(item){ + const [x, y] = item.coordinates; + item.lat = item.lat*1; + item.lng = item.lng*1; + item.v = item.v *1; + item.coordinates = [x*1,y*1]; + return item; + } + + }, + { + type: 'hexagon', + size: 6000, + field:'v', + method:'sum' + } + ] + }) +``` + +### + +### scale + + +#### scale('field', scaleConfig) + +(field: string, scaleConfig: object) + +为指定的数据字段进行列定义,返回 layer 实例。 + + + +- `field` 字段名。 + +- `scaleConfig` 列定义配置,对象类型,可配置的属性如下: + +```javascript +{ + type: {string} // 指定数据类型,可声明的类型为:identity、linear、cat、time、timeCat、log、pow +} + +``` + +### size +将数据值映射到图形的大小上的方法。 + +**注意:** 不同图层的 size 的含义有所差别: + +- point 图形的 size 影响点的半径大小和高度; + +- line, arc, path 中的 size 影响线的粗细,和高度; + +- polygon size 影响的是高度 + + + +```javascript +pointLayer.size(10); // 常量 +pointLayer.size('type'); // 使用字段映射到大小 +pointLayer.size('type', [ 0, 10 ]); // 使用字段映射到大小,并指定最大值和最小值 +pointLayer.size('type', (type) => { // 回调函数 + if(type === 'a') { + return 10; + } + return 5; +}); +``` + + +#### size(value) +传入数字常量,如 `pointLayer.size(20)` + +#### size(field) +根据 field 字段的值映射大小,使用默认的`最大值 max:10` 和`最小值 min: 1`。 + +#### size(field, callback) +使用回调函数控制图形大小。 + +- `callback`: function 回调函数。 + +```javascript +pointLayer.size('age', (value) => { + if(value === 1) { + return 5; + } + return 10; +}); +``` + +### color + +将数据值映射到图形的颜色上的方法。 + +```javascript +layer.color('red'); // 常量颜色 +layer.color('type'); // 对 type 字段进行映射,使用内置的颜色 +layer.color('type', [ 'red', 'blue' ]) // 指定颜色 +layer.color('type', (type) => { // 通过回调函数 + if (type === 'a') { + return 'red'; + } + return 'blue'; +}); +layer.color('type*value', (type, value) => { //多个参数,通过回调函数 + if (type === 'a' && value > 100) { + return 'red'; + } + return 'blue'; +}); +``` + + +#### color(value) +参数:`value` :string +只支持接收一个参数,value 可以是: + +- 映射至颜色属性的数据源字段名,如果数据源中不存在这个字段名的话,则按照常量进行解析,这个时候会使用 L7 默认提供的颜色。 + +- 也可以直接指定某一个具体的颜色值 color,如 '#fff', 'white','rgba(255,0,0,0.5)' ,rgb(255,0,1) 等。 + + +示例 +```javascript +layer.color('name') // 映射数据字段 +layer.color('white') // 指定颜色 +``` + + +#### color(field, colors) +参数: + +- `field`: stringfield 为映射至颜色属性的数据源字段名,也支持指定多个参数。 + +-  `colors`: string | array | function + + +colors 的参数有以下情况: 如果为空,即未指定颜色的数组,那么使用内置的全局的颜色;如果需要指定颜色,则需要以数组格式传入,那么分类的颜色按照数组中的颜色确定。对于颜色的分配顺序。 + +```javascript +layer.color('name'); // 使用默认的颜色 +layer.color('name', [ 'red', 'blue' ]); // 使用传入的指定颜色 +``` + +- colors 如果是回调函数,则该回调函数的参数为对应字段的数值,具体使用如下,当 color 映射为多个字段时,参数按照字段声明的顺序传入: + + + +```javascript +layer.color('gender', (value) => { + if(value === 1) { + return 'red' + } + return 'blue'; +}); +layer.color('gender*age', (gender, age) => { + if(age === 20 && gender ==' 男' ) { + return 'red' + } + return 'blue'; +}); +``` + +### shape +将数据值映射到图形的形状上的方法。 + +#### shape(shape) +参数`shape` string + +只支持接收一个参数,指定几何图像对象绘制的形状。下表列出了不同的 图层 几何图形对象支持的 shape 形状 + +| layer类型 | shape类型 | 备注 | +| --- | --- | --- | +| point | 2d:point,circle, square, triangle,hexagon,image,text 3d:circle,triangle,hexagon,square | | +| line | line,arc, arc3d, greatcircle | | +| polygon | fill,line, extrude | | + + +#### shape(field, shapes) + +#### shape(field, callback) + + +### style + +用于配置几何体显示图像属性目前支持以下属性,其他属性会逐步开放 + +- fill + +- opacity  设置透明度 + +- stroke 线填充颜色 + +- strokeWidth 线的宽度 + + +```javascript +layer.style({ + fill:'red', + opacity:0.8, + stroke:'white' +}) +``` + + + + +### filter + +2.0 beta 版本还为支持,正式版本支持 + +数据过滤 + +#### filter(field,callback) +参数: +- field 数据源字段名,根据源数据字段过滤数据,也支持指定多个参数。 + +- callback 回调函数,回调函数的参数为对应字段的数值,具体使用如下,当 filter 映射为多个字段时,参数按照字段声明的顺序传入.显示数据返回true ,需要过滤掉的返回false + + +```javascript + +layer.filter('gender',(gender)=>{ + if(gender==="男") + return true; // 显示男性的数据 + else + return false; // 非男性将过滤掉 +}) +layer.filter('gender*age',(gender,age)=>{ + if(gender === '男' && age < 20) // 根据年龄和性别过滤数据 + return true; + else + return false; +}) +``` + +### active + + +开启或者关闭 shape 对于鼠标 hover 时的响应效果,L7 默认为各个 shape 内置了 active 效果 。 + +```javascript +layer.active(false); // 关闭默认响应 +layer.active(true); // 开启默认响应 +layer.active({fill:'red'}); +``` + + + +### show +图层显示 + +```javascript +layer.show(); +``` + + +### hide + +图层隐藏 + +```javascript +layer.hide(); +``` + + +### fitBounds + +缩放到图层范围 + +```javascript +layer.fitBounds() +``` + +### setActive + +- id 要素ID,一般来自 click,和 mousemove事件返回值 +- color 指定高亮颜色 + +设置指定要素的 + +```javascript +layer.setActive(id,color) +``` diff --git a/docs/API/layer/linelayer.en.md b/docs/API/layer/linelayer.en.md new file mode 100644 index 0000000000..c78c99b653 --- /dev/null +++ b/docs/API/layer/linelayer.en.md @@ -0,0 +1,4 @@ +--- +title: LineLayer +order: 2 +--- \ No newline at end of file diff --git a/docs/API/layer/linelayer.zh.md b/docs/API/layer/linelayer.zh.md new file mode 100644 index 0000000000..c78c99b653 --- /dev/null +++ b/docs/API/layer/linelayer.zh.md @@ -0,0 +1,4 @@ +--- +title: LineLayer +order: 2 +--- \ No newline at end of file diff --git a/docs/API/layer/pointlayer.en.md b/docs/API/layer/pointlayer.en.md new file mode 100644 index 0000000000..029939baf5 --- /dev/null +++ b/docs/API/layer/pointlayer.en.md @@ -0,0 +1,4 @@ +--- +title: PointLayer +order: 1 +--- \ No newline at end of file diff --git a/docs/API/layer/pointlayer.zh.md b/docs/API/layer/pointlayer.zh.md new file mode 100644 index 0000000000..029939baf5 --- /dev/null +++ b/docs/API/layer/pointlayer.zh.md @@ -0,0 +1,4 @@ +--- +title: PointLayer +order: 1 +--- \ No newline at end of file diff --git a/docs/API/layer/polygonlayer.en.md b/docs/API/layer/polygonlayer.en.md new file mode 100644 index 0000000000..8f3fc671ac --- /dev/null +++ b/docs/API/layer/polygonlayer.en.md @@ -0,0 +1,4 @@ +--- +title: PolygonLayer +order: 3 +--- \ No newline at end of file diff --git a/docs/API/layer/polygonlayer.zh.md b/docs/API/layer/polygonlayer.zh.md new file mode 100644 index 0000000000..8f3fc671ac --- /dev/null +++ b/docs/API/layer/polygonlayer.zh.md @@ -0,0 +1,4 @@ +--- +title: PolygonLayer +order: 3 +--- \ No newline at end of file diff --git a/docs/API/source/geojson.en.md b/docs/API/source/geojson.en.md new file mode 100644 index 0000000000..d6949d2fc5 --- /dev/null +++ b/docs/API/source/geojson.en.md @@ -0,0 +1,27 @@ +--- +title: geojson +order: 1 +--- + + +# geojson 数据介绍 + + +## 简介 + +GeoJSON是一种对各种地理数据结构进行编码的格式。GeoJSON对象可以表示几何、特征或者特征集合。GeoJSON支持下面几何类型:点、线、面、多点、多线、多面和几何集合。GeoJSON里的特征包含一个几何对象和其他属性,特征集合表示一系列特征。 + +[geojson详细文档]() + +## Geojson相关的JS库 + +### 地理统计分析工具 + +[turfjs](http://turfjs.org/):  地理数据计算,处理,统计,分析的Javascript 库 + + +### 在线工具: + +[http://geojson.io/](http://geojson.io/)    可以在线查看,绘制,修改GeoJSON数据 + +[https://mapshaper.org/](https://mapshaper.org/) 可以查看较大的geojson,还能够简化GeoJSON数据 diff --git a/docs/API/source/geojson.zh.md b/docs/API/source/geojson.zh.md new file mode 100644 index 0000000000..d6949d2fc5 --- /dev/null +++ b/docs/API/source/geojson.zh.md @@ -0,0 +1,27 @@ +--- +title: geojson +order: 1 +--- + + +# geojson 数据介绍 + + +## 简介 + +GeoJSON是一种对各种地理数据结构进行编码的格式。GeoJSON对象可以表示几何、特征或者特征集合。GeoJSON支持下面几何类型:点、线、面、多点、多线、多面和几何集合。GeoJSON里的特征包含一个几何对象和其他属性,特征集合表示一系列特征。 + +[geojson详细文档]() + +## Geojson相关的JS库 + +### 地理统计分析工具 + +[turfjs](http://turfjs.org/):  地理数据计算,处理,统计,分析的Javascript 库 + + +### 在线工具: + +[http://geojson.io/](http://geojson.io/)    可以在线查看,绘制,修改GeoJSON数据 + +[https://mapshaper.org/](https://mapshaper.org/) 可以查看较大的geojson,还能够简化GeoJSON数据 diff --git a/docs/API/source/source.en.md b/docs/API/source/source.en.md new file mode 100644 index 0000000000..5487b1d723 --- /dev/null +++ b/docs/API/source/source.en.md @@ -0,0 +1,298 @@ +--- +title: Source +order: 0 +--- + + +# Source + + +### 概述 + +source 地理数据处理模块,主要包含数据解析(parser),和数据处理(transform); + +**parser:** + +不同数据类型处理成统一数据格式。矢量数据包括 GeoJON, CSV,Json等不同数据格式,栅格数据,包括Raster,Image数据。将来还会支持瓦片格式数据。 + +**transform** + +数据转换,数据统计,网格布局,数据聚合等数据操作。 + + +## API + +### parser + +空间数据分矢量数据和栅格数据两大类 + +- 矢量数据 支持 csv,geojson,json 三种数据类型 + +- 栅格数据 支持 image,Raster + + + +#### geojson + +[geojson](https://www.yuque.com/antv/l7/dm2zll) 数据为默认数据格式,可以 + +不需要设置parser 参数 + +```javascript +layer.source(data) +``` + + +#### json + +json 不是标准的地理数据结构,因此需要设置对应的经纬度字段 + +**点数据** + +x: 经度字段 + +y: 纬度字段 + +```javascript + +const data = [{ + lng:112.345, + lat:30.455, + value: 10 + },{ +  lng:114.345, + lat:31.455, + value: 10 +  } +] + +layer.source( + data, + { + parser: { + type:'json', + x:'lng', + y:'lat', + } +}) +``` + +**线段数据** + + type: json + +这里的直线表示有两个点组成的线段,主要绘制弧线的时候比较常用,只需指定线段的起始点坐标 + + x:经度字段 起点经度 + y:纬度字段 起点纬度 + x1:经度字段 终点经度 + y1:纬度字段 终点纬度 + +```javascript +const data = [{ + lng1:112.345, + lat1:30.455, +   lng2:112.345, + lat2:30.455, + value: 10 + },{ +  lng1:114.345, + lat1:31.455, +   lng2:112.345, + lat2:30.455, + value: 10 +  } +]; + +layer.source( + data, + { + parser:{ + type:'json', + x:'lng1', + y:'lat1' , +     x1:'lng1', + y1:'lat2' , + } + } +}) +``` + +**面数据** + +需要指定coordinates 字段, coordinates据格式 + +**注意面数据 coord  是三层数据结构** + +```javascript + +[ { + type: "Polygon", + 'geometryCoord': [ + [ + [ + 115.1806640625, + 30.637912028341123 + ], + [ + 114.9609375, + 29.152161283318915 + ], + [ + 117.79541015625001, + 27.430289738862594 + ], + [ + 118.740234375, + 29.420460341013133 + ], + [ + 117.46582031249999, + 31.50362930577303 + ], + [ + 115.1806640625, + 30.637912028341123 + ] + ] + ] + } + ] + + layer.source(data,{ + parser:{ + type:'json', + coordinates:'geometryCoord' + } + }) +``` + + + + +#### csv +点,线数据配置项同json数据类型 + +```javascript +layer.source( + data, + { + parser:{ + type:'csv', + x:'lng1', + y:'lat1' , +     x1:'lng1', + y1:'lat2' , + } +}) +``` + +**栅格数据类型**** + +#### image + 根据图片的经纬度范围,将图片添加到地图上。 配置项 + +-  type: image +-  extent: 图像的经纬度范围 [] + +```javascript +layer.source('https://gw.alipayobjects.com/zos/rmsportal/FnHFeFklTzKDdUESRNDv.jpg',{ + parser:{ + type:'image', + extent: [ 121.1680, 30.2828, 121.3840, 30.4219 ] + } + + }) +``` +  + +#### raster +栅格数据类型,主要表示遥感数据类型data 栅格数据的二维矩阵数据parser 配置项 + +- type  raster +- width  数据宽度二维矩阵 columns  +- height 数据高度 +- min 数据最大值 +- max 数据最小值 +- extent 经纬度范围 + +```javascript + source(values, { + parser: { + type: 'raster', + width: n, + height: m, + min: 0, + max: 8000, + extent: [ 73.482190241, 3.82501784112, 135.106618732, 57.6300459963 ] + } + }) +``` + + +### transforms +目前支持三种数据处理方法 map,grid,hexagon transform配置项 + +- type 数据处理类型 +-  tansform cfg  数据处理配置项 + + +#### map +数据处理,支持自定义callback函数 + +- callback:function 回调函数 + +```javascript + layer.source(data, { + transforms:[ + { + type: 'map', + callback:function(item){ + const [x, y] = item.coordinates; + item.lat = item.lat*1; + item.lng = item.lng*1; + item.v = item.v *1; + item.coordinates = [x*1,y*1]; + return item; + } + + }, +``` + + +#### grid + +生成方格网布局,根据数据字段统计,主要在网格热力图中使用 + +-  type: 'grid', +-  size: 网格半径 +-  field: 数据统计字段 +-  method:聚合方法  count,max,min,sum,mean5个统计维度 + +```javascript + layer.source(data, { + transforms:[ + { + type: 'grid', + size: 15000, + field:'v', + method:'sum' + } + ] + } +``` + + +#### hexagon +生成六边形网格布局,根据数据字段统计 + +-  type: 'hexagon', +-  size: 网格半径 +-  field: 数据统计字段 +-  method:聚合方法  count,max,min,sum,mean5个统计维度 + + +``` + + + diff --git a/docs/API/source/source.zh.md b/docs/API/source/source.zh.md new file mode 100644 index 0000000000..e094d1f6a9 --- /dev/null +++ b/docs/API/source/source.zh.md @@ -0,0 +1,298 @@ +--- +title: Source +order: 0 +--- + + +# Source + + +### 概述 + +source 地理数据处理模块,主要包含数据解析(parser),和数据处理(transform); + +**parser:** + +不同数据类型处理成统一数据格式。矢量数据包括 GeoJON, CSV,Json等不同数据格式,栅格数据,包括Raster,Image数据。将来还会支持瓦片格式数据。 + +**transform:** + +数据转换,数据统计,网格布局,数据聚合等数据操作。 + + +## API + +### parser + +空间数据分矢量数据和栅格数据两大类 + +- 矢量数据 支持 csv,geojson,json 三种数据类型 + +- 栅格数据 支持 image,Raster + + + +#### geojson + +[geojson](https://www.yuque.com/antv/l7/dm2zll) 数据为默认数据格式,可以 + +不需要设置parser 参数 + +```javascript +layer.source(data); +``` + + +#### json + +json 不是标准的地理数据结构,因此需要设置对应的经纬度字段 + +**点数据** + +x: 经度字段 + +y: 纬度字段 + +```javascript + +const data = [{ + lng:112.345, + lat:30.455, + value: 10 + },{ +  lng:114.345, + lat:31.455, + value: 10 +  } +] + +layer.source( + data, + { + parser: { + type:'json', + x:'lng', + y:'lat', + } +}) +``` + +**线段数据** + + type: json + +这里的直线表示有两个点组成的线段,主要绘制弧线的时候比较常用,只需指定线段的起始点坐标 + + x:经度字段 起点经度 + y:纬度字段 起点纬度 + x1:经度字段 终点经度 + y1:纬度字段 终点纬度 + +```javascript +const data = [{ + lng1:112.345, + lat1:30.455, +   lng2:112.345, + lat2:30.455, + value: 10 + },{ +  lng1:114.345, + lat1:31.455, +   lng2:112.345, + lat2:30.455, + value: 10 +  } +]; + +layer.source( + data, + { + parser:{ + type:'json', + x:'lng1', + y:'lat1' , +     x1:'lng1', + y1:'lat2' , + } + } +}) +``` + +**面数据** + +需要指定coordinates 字段, coordinates据格式 + +**注意面数据 coord  是三层数据结构** + +```javascript + +[ { + type: "Polygon", + 'geometryCoord': [ + [ + [ + 115.1806640625, + 30.637912028341123 + ], + [ + 114.9609375, + 29.152161283318915 + ], + [ + 117.79541015625001, + 27.430289738862594 + ], + [ + 118.740234375, + 29.420460341013133 + ], + [ + 117.46582031249999, + 31.50362930577303 + ], + [ + 115.1806640625, + 30.637912028341123 + ] + ] + ] + } + ]; + + layer.source(data,{ + parser:{ + type:'json', + coordinates:'geometryCoord' + } + }); +``` + + + + +#### csv +点,线数据配置项同json数据类型 + +```javascript +layer.source( + data, + { + parser:{ + type:'csv', + x:'lng1', + y:'lat1' , +     x1:'lng1', + y1:'lat2' , + } +}) +``` + +**栅格数据类型**** + +#### image + 根据图片的经纬度范围,将图片添加到地图上。 配置项 + +-  type: image +-  extent: 图像的经纬度范围 [] + +```javascript +layer.source('https://gw.alipayobjects.com/zos/rmsportal/FnHFeFklTzKDdUESRNDv.jpg',{ + parser:{ + type:'image', + extent: [ 121.1680, 30.2828, 121.3840, 30.4219 ] + } + }); +``` +  + +#### raster +栅格数据类型,主要表示遥感数据类型data 栅格数据的二维矩阵数据parser 配置项 + +- type  raster +- width  数据宽度二维矩阵 columns  +- height 数据高度 +- min 数据最大值 +- max 数据最小值 +- extent 经纬度范围 + +```javascript + source(values, { + parser: { + type: 'raster', + width: n, + height: m, + min: 0, + max: 8000, + extent: [ 73.482190241, 3.82501784112, 135.106618732, 57.6300459963 ] + } + }); +``` + + +### transforms + +目前支持三种数据处理方法 map,grid,hexagon transform配置项 + +- type 数据处理类型 +-  tansform cfg  数据处理配置项 + + +#### map +数据处理,支持自定义callback函数 + +- callback:function 回调函数 + +```javascript + layer.source(data, { + transforms:[ + { + type: 'map', + callback:function(item){ + const [x, y] = item.coordinates; + item.lat = item.lat*1; + item.lng = item.lng*1; + item.v = item.v *1; + item.coordinates = [x*1,y*1]; + return item; + } + } + ] + }); +``` + + +#### grid + +生成方格网布局,根据数据字段统计,主要在网格热力图中使用 + +-  type: 'grid', +-  size: 网格半径 +-  field: 数据统计字段 +-  method:聚合方法  count,max,min,sum,mean5个统计维度 + +```javascript + layer.source(data, { + transforms:[ + { + type: 'grid', + size: 15000, + field:'v', + method:'sum' + } + ], + }) +``` + + +#### hexagon +生成六边形网格布局,根据数据字段统计 + +-  type: 'hexagon', +-  size: 网格半径 +-  field: 数据统计字段 +-  method:聚合方法  count,max,min,sum,mean5个统计维度 + +``` + + + diff --git a/examples/gallery/basic/index.en.md b/examples/gallery/basic/index.en.md index 49d0b7d4f7..c779938cb0 100644 --- a/examples/gallery/basic/index.en.md +++ b/examples/gallery/basic/index.en.md @@ -2,5 +2,5 @@ title: Gallery order: 0 redirect_from: - - /en/examples/ + - /en/examples --- diff --git a/examples/gallery/basic/index.zh.md b/examples/gallery/basic/index.zh.md index b86df30c9c..71b6406985 100644 --- a/examples/gallery/basic/index.zh.md +++ b/examples/gallery/basic/index.zh.md @@ -2,5 +2,5 @@ title: Gallery order: 0 redirect_from: - - /zh/examples/ + - /zh/examples --- diff --git a/gatsby-config.js b/gatsby-config.js index 72c7e7c49b..603cd773ef 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -40,13 +40,6 @@ module.exports = { // target: '_blank', ], docs: [ - { - slug: 'specification', - title: { - zh: '简介', - en: 'Introduction', - }, - }, { slug: 'manual/tutorial', title: { @@ -55,7 +48,7 @@ module.exports = { }, }, { - slug: 'API/L7', + slug: 'api/l7', title: { zh: '简介', en: 'Introduction', @@ -63,13 +56,37 @@ module.exports = { order:0, }, { - slug: 'API/component', + slug: 'api/scene', title: { - zh: '组件', - en: 'Component', + zh: 'Scene', + en: 'Scene', }, order:1, }, + { + slug: 'api/layer', + title: { + zh: 'Layer', + en: 'layer', + }, + order:2, + }, + { + slug: 'api/source', + title: { + zh: 'source', + en: 'source', + }, + order:3, + }, + { + slug: 'api/component', + title: { + zh: 'Component', + en: 'Component', + }, + order:4, + }, ], examples: [ { diff --git a/package.json b/package.json index c0d244a216..f623386425 100644 --- a/package.json +++ b/package.json @@ -109,7 +109,7 @@ "start": "NODE_ENV=site npm run site:develop", "build_site": "NODE_ENV=site npm run site:build", "site:develop": "gatsby develop --open -H 0.0.0.0", - "site:build": "npm run site:clean && gatsby build --prefix-paths", + "site:build": "npm run site:clean && NODE_ENV=site gatsby build --prefix-paths", "site:clean": "gatsby clean", "site:deploy": "NODE_ENV=site npm run site:build && gh-pages -d public", "site:publish": "gh-pages -d public", diff --git a/packages/core/src/services/shader/ShaderModuleService.ts b/packages/core/src/services/shader/ShaderModuleService.ts index 3c9713a261..f35163ab03 100644 --- a/packages/core/src/services/shader/ShaderModuleService.ts +++ b/packages/core/src/services/shader/ShaderModuleService.ts @@ -5,7 +5,7 @@ import { IModuleParams, IShaderModuleService } from './IShaderModuleService'; import common from '../../shaders/common.glsl'; import decode from '../../shaders/decode.glsl'; -import light from '../../shaders/light.glsl'; +import light from '../../shaders/light2.glsl'; import lighting from '../../shaders/lighting.glsl'; import pickingFrag from '../../shaders/picking.frag.glsl'; import pickingVert from '../../shaders/picking.vert.glsl'; diff --git a/packages/core/src/shaders/light.glsl b/packages/core/src/shaders/light2.glsl similarity index 75% rename from packages/core/src/shaders/light.glsl rename to packages/core/src/shaders/light2.glsl index 24877a711c..a22101d161 100644 --- a/packages/core/src/shaders/light.glsl +++ b/packages/core/src/shaders/light2.glsl @@ -7,17 +7,17 @@ float calc_lighting(vec4 pos) { vec3 worldPos = vec3(pos * u_ModelMatrix); - vec3 worldNormal = vec3(vec4(a_Normal,1.0)); + vec3 worldNormal = a_Normal; // //cal light weight vec3 viewDir = normalize(u_CameraPosition - worldPos); - vec3 lightDir = normalize(vec3(1, 10.5, 12)); + vec3 lightDir = normalize(reverse_offset_normal(vec3(1, 10.5, 12))); vec3 halfDir = normalize(viewDir+lightDir); // //lambert float lambert = dot(worldNormal, lightDir); //specular - float specular = pow( max(0.0, dot(worldNormal, halfDir)), 32.0); + float specular = pow(max(0.0, dot(worldNormal, halfDir)), 32.0); //sum to light weight float lightWeight = ambientRatio + diffuseRatio * lambert + specularRatio * specular; diff --git a/packages/core/src/shaders/projection.glsl b/packages/core/src/shaders/projection.glsl index aaa9a53e66..4f792e549e 100644 --- a/packages/core/src/shaders/projection.glsl +++ b/packages/core/src/shaders/projection.glsl @@ -67,7 +67,7 @@ vec3 project_offset_normal(vec3 vector) { // reverse Y vec3 reverse_offset_normal(vec3 vector) { if (u_CoordinateSystem == COORDINATE_SYSTEM_P20) { - return vector * vec3(1.0,-1.0, 1.0); + return vector * vec3(1.0, -1.0, 1.0); } return vector; } diff --git a/packages/layers/src/heatmap/shaders/hexagon_3d_vert.glsl b/packages/layers/src/heatmap/shaders/hexagon_3d_vert.glsl index 856b39be1b..a2f1f722f1 100644 --- a/packages/layers/src/heatmap/shaders/hexagon_3d_vert.glsl +++ b/packages/layers/src/heatmap/shaders/hexagon_3d_vert.glsl @@ -21,7 +21,7 @@ void main() { mat2 rotationMatrix = mat2(cos(u_angle), sin(u_angle), -sin(u_angle), cos(u_angle)); vec2 offset =(vec2(a_Position.xy * u_radius * rotationMatrix * u_coverage)); vec2 lnglat = unProjectFlat(a_Pos.xy + offset); - vec4 project_pos = project_position(vec4(lnglat, a_Position.z * a_Size, 1.0)); + vec4 project_pos = project_position(vec4(lnglat, a_Position.z * project_pixel(a_Size), 1.0)); float lightWeight = calc_lighting(project_pos); v_color =vec4(a_Color.rgb*lightWeight, a_Color.w); diff --git a/packages/layers/src/point/models/extrude.ts b/packages/layers/src/point/models/extrude.ts index 0b7495f7b1..d7a7a8e477 100644 --- a/packages/layers/src/point/models/extrude.ts +++ b/packages/layers/src/point/models/extrude.ts @@ -8,8 +8,8 @@ import { } from '@l7/core'; import BaseModel from '../../core/baseModel'; import { PointExtrudeTriangulation } from '../../core/triangulation'; +import pointExtrudeVert from '../shaders/extrude3_vert.glsl'; import pointExtrudeFrag from '../shaders/extrude_frag.glsl'; -import pointExtrudeVert from '../shaders/extrude_vert.glsl'; interface IPointLayerStyleOptions { opacity: number; } @@ -24,7 +24,7 @@ export default class ExtrudeModel extends BaseModel { public buildModels(): IModel[] { return [ this.layer.buildLayerModel({ - moduleName: 'pointExtrude', + moduleName: 'pointExtrude2', vertexShader: pointExtrudeVert, fragmentShader: pointExtrudeFrag, triangulation: PointExtrudeTriangulation, diff --git a/packages/layers/src/point/shaders/extrude3_vert.glsl b/packages/layers/src/point/shaders/extrude3_vert.glsl new file mode 100644 index 0000000000..2c76fdf178 --- /dev/null +++ b/packages/layers/src/point/shaders/extrude3_vert.glsl @@ -0,0 +1,33 @@ +precision highp float; + +#define ambientRatio 0.5 +#define diffuseRatio 0.3 +#define specularRatio 0.2 + +attribute vec3 a_Position; +attribute vec3 a_Pos; +attribute vec4 a_Color; +attribute vec3 a_Size; +attribute vec3 a_Normal; + +uniform mat4 u_ModelMatrix; +varying vec4 v_color; + +#pragma include "projection" + +#pragma include "light" + +void main() { + vec3 size = a_Size * a_Position; + + vec2 offset = project_pixel(size.xy); + + vec4 project_pos = project_position(vec4(a_Pos.xy, 0, 1.0)); + vec4 pos = vec4(project_pos.xy + offset, project_pixel(size.z), 1.0); + + float lightWeight = calc_lighting(pos); + v_color =vec4(a_Color.rgb * lightWeight, a_Color.w); + + gl_Position = project_common_position_to_clipspace(pos); + +} diff --git a/packages/layers/src/point/shaders/extrude_vert.glsl b/packages/layers/src/point/shaders/extrude_vert.glsl index 76bc46b138..8b5ba21f5c 100644 --- a/packages/layers/src/point/shaders/extrude_vert.glsl +++ b/packages/layers/src/point/shaders/extrude_vert.glsl @@ -24,24 +24,8 @@ void main() { vec4 project_pos = project_position(vec4(a_Pos.xy, 0, 1.0)); vec4 pos = vec4(project_pos.xy + offset, project_pixel(size.z), 1.0); - float lightWeight = calc_lighting(pos); - -// vec3 worldPos = vec3(pos * u_ModelMatrix); - -// vec3 worldNormal = vec3(vec4(a_Normal,1.0)); -// // //cal light weight -// vec3 viewDir = normalize(u_CameraPosition - worldPos); - -// vec3 lightDir = normalize(vec3(1, -10.5, 12)); - -// vec3 halfDir = normalize(viewDir+lightDir); -// // //lambert -// float lambert = dot(worldNormal, lightDir); -// //specular -// float specular = pow( max(0.0, dot(worldNormal, halfDir)), 32.0); -// //sum to light weight -// float lightWeight = ambientRatio + diffuseRatio * lambert + specularRatio * specular; - +// float lightWeight = calc_lighting(pos); + v_color =vec4(a_Color.rgb*lightWeight, a_Color.w); gl_Position = project_common_position_to_clipspace(pos); diff --git a/site/css/home.css b/site/css/home.css index 834043ddc3..fc6eda07df 100644 --- a/site/css/home.css +++ b/site/css/home.css @@ -5,14 +5,28 @@ height: 100px !important; } .cover-image { - margin-top: 40px; - margin-left: 30px; - max-height: 600px; + margin-top: 60px; + height: 300px; + } -@media only screen and (max-height: 800px) { +@media only screen and (max-height: 599) and (max-width: 800px) { .cover-image { margin-top: 40px; - margin-left: 270px; + margin-left: 260px; max-height: 400px; } } +@media only screen and (min-height: 599px) and (min-width:800px) { + .cover-image { + margin-top: 40px; + margin-left: 10px; + height: 600px; + } +} +@media only screen and (max-height: 599px) and (min-width:800px) { + .cover-image { + margin-top: 40px; + margin-left: 10px; + height: 600px; + } +} diff --git a/site/js/g2plot.js b/site/js/g2plot.js deleted file mode 100644 index f03f8c5ecf..0000000000 --- a/site/js/g2plot.js +++ /dev/null @@ -1,32 +0,0 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("moment")):"function"==typeof define&&define.amd?define(["moment"],e):"object"==typeof exports?exports.g2plot=e(require("moment")):t.g2plot=e(t.moment)}(window,(function(t){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=87)}([function(t,e,i){"use strict";i.r(e);var n=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},r=function(t,e){return!!n(t)&&t.indexOf(e)>-1},a={}.toString,o=function(t,e){return a.call(t)==="[object "+e+"]"},s=function(t){return Array.isArray?Array.isArray(t):o(t,"Array")},u=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e};var l=function(t,e){if(t)if(s(t))for(var i=0,n=t.length;i-1;)C.call(t,a,1);return t},A=Array.prototype.splice,L=function(t,e){if(!n(t))return[];for(var i=t?e.length:0,r=i-1;i--;){var a=void 0,o=e[i];i!==r&&o===a||(a=o,A.call(t,o,1))}return t},T=function(t,e,i){if(!s(t)&&!y(t))return t;var n=i;return l(t,(function(t,i){n=e(n,t,i)})),n},I=function(t,e){var i=[];if(!n(t))return i;for(var r=-1,a=[],o=t.length;++re[r])return 1;if(t[r]i?i:t},tt=function(t,e){var i=e.toString(),n=i.indexOf(".");if(-1===n)return Math.round(t);var r=i.substr(n+1).length;return r>20&&(r=20),parseFloat(t.toFixed(r))},et=function(t){return o(t,"Number")},it=function(t){return et(t)&&t%1!=0},nt=function(t){return et(t)&&t%2==0},rt=Number.isInteger?Number.isInteger:function(t){return et(t)&&t%1==0},at=function(t){return et(t)&&t<0},ot=1e-5;function st(t,e,i){return void 0===i&&(i=ot),Math.abs(t-e)0},ct=function(t,e){if(s(t)){var i,n,r=t[0];return i=p(e)?e(t[0]):t[0][e],l(t,(function(t){(n=p(e)?e(t):t[e])>i&&(r=t,i=n)})),r}},ht=function(t,e){if(s(t)){var i,n,r=t[0];return i=p(e)?e(t[0]):t[0][e],l(t,(function(t){(n=p(e)?e(t):t[e])e?(n&&(clearTimeout(n),n=null),s=l,o=t.apply(r,a),n||(r=a=null)):n||!1===i.trailing||(n=setTimeout(u,c)),o};return l.cancel=function(){clearTimeout(n),s=0,n=r=a=null},l},ge=function(t){return n(t)?Array.prototype.slice.call(t):[]},ve={},ye=function(t){return ve[t=t||"g"]?ve[t]+=1:ve[t]=1,t+ve[t]},me=function(){},xe=function(t){return t};function _e(t){return f(t)?0:n(t)?t.length:Object.keys(t).length}var be=function(){function t(){this.map={}}return t.prototype.has=function(t){return void 0!==this.map[t]},t.prototype.get=function(t,e){var i=this.map[t];return void 0===i?e:i},t.prototype.set=function(t,e){this.map[t]=e},t.prototype.clear=function(){this.map={}},t.prototype.delete=function(t){delete this.map[t]},t.prototype.size=function(){return Object.keys(this.map).length},t}();i.d(e,"contains",(function(){return r})),i.d(e,"includes",(function(){return r})),i.d(e,"difference",(function(){return h})),i.d(e,"find",(function(){return m})),i.d(e,"findIndex",(function(){return x})),i.d(e,"firstValue",(function(){return _})),i.d(e,"flatten",(function(){return b})),i.d(e,"flattenDeep",(function(){return S})),i.d(e,"getRange",(function(){return w})),i.d(e,"pull",(function(){return O})),i.d(e,"pullAt",(function(){return L})),i.d(e,"reduce",(function(){return T})),i.d(e,"remove",(function(){return I})),i.d(e,"sortBy",(function(){return j})),i.d(e,"union",(function(){return B})),i.d(e,"uniq",(function(){return E})),i.d(e,"valuesOfKey",(function(){return F})),i.d(e,"head",(function(){return R})),i.d(e,"last",(function(){return N})),i.d(e,"startsWith",(function(){return z})),i.d(e,"endsWith",(function(){return H})),i.d(e,"filter",(function(){return c})),i.d(e,"every",(function(){return G})),i.d(e,"some",(function(){return Y})),i.d(e,"group",(function(){return X})),i.d(e,"groupBy",(function(){return V})),i.d(e,"groupToMap",(function(){return q})),i.d(e,"getWrapBehavior",(function(){return U})),i.d(e,"wrapBehavior",(function(){return Z})),i.d(e,"number2color",(function(){return $})),i.d(e,"parseRadius",(function(){return K})),i.d(e,"clamp",(function(){return J})),i.d(e,"fixedBase",(function(){return tt})),i.d(e,"isDecimal",(function(){return it})),i.d(e,"isEven",(function(){return nt})),i.d(e,"isInteger",(function(){return rt})),i.d(e,"isNegative",(function(){return at})),i.d(e,"isNumberEqual",(function(){return st})),i.d(e,"isOdd",(function(){return ut})),i.d(e,"isPositive",(function(){return lt})),i.d(e,"maxBy",(function(){return ct})),i.d(e,"minBy",(function(){return ht})),i.d(e,"mod",(function(){return pt})),i.d(e,"toDegree",(function(){return dt})),i.d(e,"toInteger",(function(){return gt})),i.d(e,"toRadian",(function(){return yt})),i.d(e,"forIn",(function(){return mt})),i.d(e,"has",(function(){return xt})),i.d(e,"hasKey",(function(){return _t})),i.d(e,"hasValue",(function(){return Mt})),i.d(e,"keys",(function(){return d})),i.d(e,"isMatch",(function(){return g})),i.d(e,"values",(function(){return bt})),i.d(e,"lowerCase",(function(){return wt})),i.d(e,"lowerFirst",(function(){return kt})),i.d(e,"substitute",(function(){return Ct})),i.d(e,"upperCase",(function(){return Pt})),i.d(e,"upperFirst",(function(){return Ot})),i.d(e,"getType",(function(){return Lt})),i.d(e,"isArguments",(function(){return Tt})),i.d(e,"isArray",(function(){return s})),i.d(e,"isArrayLike",(function(){return n})),i.d(e,"isBoolean",(function(){return It})),i.d(e,"isDate",(function(){return Dt})),i.d(e,"isError",(function(){return jt})),i.d(e,"isFunction",(function(){return p})),i.d(e,"isFinite",(function(){return Et})),i.d(e,"isNil",(function(){return f})),i.d(e,"isNull",(function(){return Bt})),i.d(e,"isNumber",(function(){return et})),i.d(e,"isObject",(function(){return u})),i.d(e,"isObjectLike",(function(){return v})),i.d(e,"isPlainObject",(function(){return y})),i.d(e,"isPrototype",(function(){return Rt})),i.d(e,"isRegExp",(function(){return Nt})),i.d(e,"isString",(function(){return D})),i.d(e,"isType",(function(){return o})),i.d(e,"isUndefined",(function(){return zt})),i.d(e,"isElement",(function(){return Ht})),i.d(e,"requestAnimationFrame",(function(){return Gt})),i.d(e,"clearAnimationFrame",(function(){return Yt})),i.d(e,"augment",(function(){return qt})),i.d(e,"clone",(function(){return Ut})),i.d(e,"debounce",(function(){return Zt})),i.d(e,"memoize",(function(){return Qt})),i.d(e,"deepMix",(function(){return Jt})),i.d(e,"each",(function(){return l})),i.d(e,"extend",(function(){return te})),i.d(e,"indexOf",(function(){return ee})),i.d(e,"isEmpty",(function(){return ne})),i.d(e,"isEqual",(function(){return ae})),i.d(e,"isEqualWith",(function(){return oe})),i.d(e,"map",(function(){return se})),i.d(e,"mapValues",(function(){return le})),i.d(e,"mix",(function(){return Vt})),i.d(e,"assign",(function(){return Vt})),i.d(e,"get",(function(){return ce})),i.d(e,"set",(function(){return he})),i.d(e,"pick",(function(){return fe})),i.d(e,"throttle",(function(){return de})),i.d(e,"toArray",(function(){return ge})),i.d(e,"toString",(function(){return St})),i.d(e,"uniqueId",(function(){return ye})),i.d(e,"noop",(function(){return me})),i.d(e,"identity",(function(){return xe})),i.d(e,"size",(function(){return _e})),i.d(e,"Cache",(function(){return be}))},function(t,e,i){"use strict";i.r(e),i.d(e,"__extends",(function(){return r})),i.d(e,"__assign",(function(){return a})),i.d(e,"__rest",(function(){return o})),i.d(e,"__decorate",(function(){return s})),i.d(e,"__param",(function(){return u})),i.d(e,"__metadata",(function(){return l})),i.d(e,"__awaiter",(function(){return c})),i.d(e,"__generator",(function(){return h})),i.d(e,"__exportStar",(function(){return p})),i.d(e,"__values",(function(){return f})),i.d(e,"__read",(function(){return d})),i.d(e,"__spread",(function(){return g})),i.d(e,"__spreadArrays",(function(){return v})),i.d(e,"__await",(function(){return y})),i.d(e,"__asyncGenerator",(function(){return m})),i.d(e,"__asyncDelegator",(function(){return x})),i.d(e,"__asyncValues",(function(){return _})),i.d(e,"__makeTemplateObject",(function(){return b})),i.d(e,"__importStar",(function(){return M})),i.d(e,"__importDefault",(function(){return S})); -/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. -Licensed under the Apache License, Version 2.0 (the "License"); you may not use -this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - -THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - -See the Apache Version 2.0 License for specific language governing permissions -and limitations under the License. -***************************************************************************** */ -var n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)};function r(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var a=function(){return(a=Object.assign||function(t){for(var e,i=1,n=arguments.length;i=0;s--)(r=t[s])&&(o=(a<3?r(o):a>3?r(e,i,o):r(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o}function u(t,e){return function(i,n){e(i,n,t)}}function l(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function c(t,e,i,n){return new(i||(i=Promise))((function(r,a){function o(t){try{u(n.next(t))}catch(t){a(t)}}function s(t){try{u(n.throw(t))}catch(t){a(t)}}function u(t){t.done?r(t.value):new i((function(e){e(t.value)})).then(o,s)}u((n=n.apply(t,e||[])).next())}))}function h(t,e){var i,n,r,a,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(r=(r=o.trys).length>0&&r[r.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}}}function d(t,e){var i="function"==typeof Symbol&&t[Symbol.iterator];if(!i)return t;var n,r,a=i.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(n=a.next()).done;)o.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return o}function g(){for(var t=[],e=0;e1||s(t,e)}))})}function s(t,e){try{(i=r[t](e)).value instanceof y?Promise.resolve(i.value.v).then(u,l):c(a[0][2],i)}catch(t){c(a[0][3],t)}var i}function u(t){s("next",t)}function l(t){s("throw",t)}function c(t,e){t(e),a.shift(),a.length&&s(a[0][0],a[0][1])}}function x(t){var e,i;return e={},n("next"),n("throw",(function(t){throw t})),n("return"),e[Symbol.iterator]=function(){return this},e;function n(n,r){e[n]=t[n]?function(e){return(i=!i)?{value:y(t[n](e)),done:"return"===n}:r?r(e):e}:r}}function _(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,i=t[Symbol.asyncIterator];return i?i.call(t):(t=f(t),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(i){e[i]=t[i]&&function(e){return new Promise((function(n,r){(function(t,e,i,n){Promise.resolve(n).then((function(e){t({value:e,done:i})}),e)})(n,r,(e=t[i](e)).done,e.value)}))}}}function b(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function M(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}function S(t){return t&&t.__esModule?t:{default:t}}},function(t,e,i){"use strict";e.__esModule=!0;var n=i(88);e.addEventListener=n.default;var r=i(89);e.createDom=r.default;var a=i(49);e.getHeight=a.default;var o=i(90);e.getOuterHeight=o.default;var s=i(91);e.getOuterWidth=s.default;var u=i(92);e.getRatio=u.default;var l=i(26);e.getStyle=l.default;var c=i(50);e.getWidth=c.default;var h=i(93);e.modifyCSS=h.default},function(t,e,i){window,t.exports=function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=19)}([function(t,e,i){var n;n=function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=40)}([function(t,e,i){var n=i(16),r=i(1);t.exports=function(t,e){if(t)if(r(t))for(var i=0,a=t.length;i-1}},function(t,e,i){var n=i(2);t.exports=function(t){return n(t,"String")}},function(t,e){function i(t,e){for(var i in e)e.hasOwnProperty(i)&&"constructor"!==i&&void 0!==e[i]&&(t[i]=e[i])}t.exports=function(t,e,n,r){return e&&i(t,e),n&&i(t,n),r&&i(t,r),t}},function(t,e,i){var n=i(0),r=i(4);t.exports=function(t,e){if(!r(t))return t;var i=[];return n(t,(function(t,n){e(t,n)&&i.push(t)})),i}},function(t,e){var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=function(t){return"object"===(void 0===t?"undefined":i(t))&&null!==t}},function(t,e,i){var n=i(4);t.exports=function(t){return n(t)?Array.prototype.slice.call(t):[]}},function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.setMatrixArrayType=function(t){e.ARRAY_TYPE=t},e.toRadian=function(t){return t*n},e.equals=function(t,e){return Math.abs(t-e)<=i*Math.max(1,Math.abs(t),Math.abs(e))};var i=e.EPSILON=1e-6;e.ARRAY_TYPE="undefined"!=typeof Float32Array?Float32Array:Array,e.RANDOM=Math.random;var n=Math.PI/180},function(t,e){var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=function(t){var e=void 0===t?"undefined":i(t);return null!==t&&"object"===e||"function"===e}},function(t,e,i){var n=i(18),r=i(5);t.exports=function(t,e){var i=n(e),a=i.length;if(r(t))return!a;for(var o=0;oi?i:t}},function(t,e){t.exports=parseInt},function(t,e,i){var n=i(89);n.translate=function(t,e,i){var r=new Array(9);return n.fromTranslation(r,i),n.multiply(t,r,e)},n.rotate=function(t,e,i){var r=new Array(9);return n.fromRotation(r,i),n.multiply(t,r,e)},n.scale=function(t,e,i){var r=new Array(9);return n.fromScaling(r,i),n.multiply(t,r,e)},t.exports=n},function(t,e,i){var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=i(1);t.exports=function t(e){if("object"!==(void 0===e?"undefined":n(e))||null===e)return e;var i=void 0;if(r(e)){i=[];for(var a=0,o=e.length;a1&&(n*=M=Math.sqrt(M),r*=M);var S=n*n,w=r*r,k=(o===s?-1:1)*Math.sqrt(Math.abs((S*w-S*b*b-w*_*_)/(S*b*b+w*_*_)));y=k*n*b/r+(e+u)/2,m=k*-r*_/n+(i+l)/2,g=Math.asin(((i-m)/r).toFixed(9)),v=Math.asin(((l-m)/r).toFixed(9)),g=ev&&(g-=2*Math.PI),!s&&v>g&&(v-=2*Math.PI)}var C=v-g;if(Math.abs(C)>h){var P=v,O=u,A=l;v=g+h*(s&&v>g?1:-1),f=t(u=y+n*Math.cos(v),l=m+r*Math.sin(v),n,r,a,0,s,O,A,[v,P,y,m])}C=v-g;var L=Math.cos(g),T=Math.sin(g),I=Math.cos(v),D=Math.sin(v),j=Math.tan(C/4),E=4/3*n*j,B=4/3*r*j,F=[e,i],R=[e+E*T,i-B*L],N=[u+E*D,l-B*I],z=[u,l];if(R[0]=2*F[0]-R[0],R[1]=2*F[1]-R[1],c)return[R,N,z].concat(f);for(var H=[],G=0,Y=(f=[R,N,z].concat(f).join().split(",")).length;G7){t[e].shift();for(var n=t[e];n.length;)l[e]="A",o&&(c[e]="A"),t.splice(e++,0,["C"].concat(n.splice(0,6)));t.splice(e,1),f=Math.max(i.length,o&&o.length||0)}},v=function(t,e,n,r,a){t&&e&&"M"===t[a][0]&&"M"!==e[a][0]&&(e.splice(a,0,["M",r.x,r.y]),n.bx=0,n.by=0,n.x=t[a][1],n.y=t[a][2],f=Math.max(i.length,o&&o.length||0))};f=Math.max(i.length,o&&o.length||0);for(var y=0;y180),0,u,e+i*Math.sin(-r*o)]]}else a=[["M",t,e],["m",0,-n],["a",i,n,0,1,1,0,2*n],["a",i,n,0,1,1,0,-2*n],["z"]];return a}t.exports=function(t){if(!(t=n(t))||!t.length)return[["M",0,0]];var e=[],i=0,o=0,s=0,u=0,l=0,c=void 0,h=void 0;"M"===t[0][0]&&(s=i=+t[0][1],u=o=+t[0][2],l++,e[0]=["M",i,o]);for(var p,f,d=3===t.length&&"M"===t[0][0]&&"R"===t[1][0].toUpperCase()&&"Z"===t[2][0].toUpperCase(),g=l,v=t.length;g2&&(n.push([i].concat(o.splice(0,2))),s="l",i="m"===i?"l":"L"),"o"===s&&1===o.length&&n.push([i,o[0]]),"r"===s)n.push([i].concat(o));else for(;o.length>=e[s]&&(n.push([i].concat(o.splice(0,e[s]))),e[s]););})),n}},function(t,e){t.exports=function(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(t,e,i){var n=i(8);t.exports=function(t){return n(t).toLowerCase()}},function(t,e,i){var n=i(8);t.exports=function(t){return n(t).toUpperCase()}},function(t,e){var i={}.toString;t.exports=function(t){return i.call(t).replace(/^\[object /,"").replace(/\]$/,"")}},function(t,e){var i=Object.prototype;t.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||i)}},function(t,e,i){var n=i(3),r=i(1),a=i(38);t.exports=function(t,e){if(!e)return{0:t};if(!n(e)){var i=r(e)?e:e.replace(/\s+/g,"").split("*");e=function(t){for(var e="_",n=0,r=i.length;n]*>/,a={tr:document.createElement("tbody"),tbody:i,thead:i,tfoot:i,td:n,th:n,"*":document.createElement("div")};t.exports=function(t){var e=r.test(t)&&RegExp.$1;e in a||(e="*");var i=a[e];t=t.replace(/(^\s*)|(\s*$)/g,""),i.innerHTML=""+t;var n=i.childNodes[0];return i.removeChild(n),n}},function(t,e){t.exports=function(t,e){if(t&&t.getBoundingClientRect){var i=t.getBoundingClientRect(),n=document.documentElement.clientTop,r=document.documentElement.clientLeft;return{top:i.top-n,bottom:i.bottom-n,left:i.left-r,right:i.right-r}}return e||null}},function(t,e){t.exports=function(t,e){var i=this.getStyle(t,"height",e);return"auto"===i&&(i=t.offsetHeight),parseFloat(i)}},function(t,e){t.exports=function(t,e){var i=this.getHeight(t,e),n=parseFloat(this.getStyle(t,"borderTopWidth"))||0,r=parseFloat(this.getStyle(t,"paddingTop"))||0,a=parseFloat(this.getStyle(t,"paddingBottom"))||0;return i+n+(parseFloat(this.getStyle(t,"borderBottomWidth"))||0)+r+a}},function(t,e){t.exports=function(t,e){var i=this.getWidth(t,e),n=parseFloat(this.getStyle(t,"borderLeftWidth"))||0,r=parseFloat(this.getStyle(t,"paddingLeft"))||0,a=parseFloat(this.getStyle(t,"paddingRight"))||0;return i+n+(parseFloat(this.getStyle(t,"borderRightWidth"))||0)+r+a}},function(t,e){t.exports=function(){return window.devicePixelRatio?window.devicePixelRatio:2}},function(t,e,i){var n=i(5);t.exports=function(t,e,i){try{return window.getComputedStyle?window.getComputedStyle(t,null)[e]:t.currentStyle[e]}catch(t){return n(i)?null:i}}},function(t,e){t.exports=function(t,e){var i=this.getStyle(t,"width",e);return"auto"===i&&(i=t.offsetWidth),parseFloat(i)}},function(t,e){t.exports=function(t,e){if(t)for(var i in e)e.hasOwnProperty(i)&&(t.style[i]=e[i]);return t}},function(t,e){t.exports=function(t){return(window.requestAnimationFrame||window.webkitRequestAnimationFrame||function(t){return setTimeout(t,16)})(t)}},function(t,e,i){t.exports={contains:i(9),difference:i(54),find:i(55),firstValue:i(56),flatten:i(57),flattenDeep:i(58),getRange:i(59),merge:i(60),pull:i(61),pullAt:i(19),reduce:i(62),remove:i(63),sortBy:i(64),union:i(65),uniq:i(20),valuesOfKey:i(66)}},function(t,e,i){var n=i(12),r=i(9);t.exports=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return n(t,(function(t){return!r(e,t)}))}},function(t,e,i){var n=i(3),r=i(7),a=i(17);t.exports=function(t,e){var i=void 0;if(n(e)&&(i=e),r(e)&&(i=function(t){return a(t,e)}),i)for(var o=0;o1&&void 0!==arguments[1]?arguments[1]:[];if(n(e))for(var r=0;r-1;)n.call(t,s,1);return t}},function(t,e,i){var n=i(1),r=i(7),a=i(0);t.exports=function(t,e,i){if(!n(t)&&!r(t))return t;var o=i;return a(t,(function(t,i){o=e(o,t,i)})),o}},function(t,e,i){var n=i(4),r=i(19);t.exports=function(t,e){var i=[];if(!n(t))return i;for(var a=-1,o=[],s=t.length;++ae[n])return 1;if(t[n]1){var n=e[0].charAt(0);e.splice(1,0,e[0].substr(1)),e[0]=n}a(e,(function(t,i){isNaN(t)||(e[i]=+t)})),t[i]=e})),t):void 0}},function(t,e,i){var n=i(1);t.exports=function(t){var e=0,i=0,r=0,a=0;return n(t)?1===t.length?e=i=r=a=t[0]:2===t.length?(e=r=t[0],i=a=t[1]):3===t.length?(e=t[0],i=a=t[1],r=t[2]):(e=t[0],i=t[1],r=t[2],a=t[3]):e=i=r=a=t,{r1:e,r2:i,r3:r,r4:a}}},function(t,e,i){var n=i(75);t.exports={clamp:i(21),fixedBase:i(76),isDecimal:i(77),isEven:i(78),isInteger:i(79),isNegative:i(80),isNumberEqual:n,isOdd:i(81),isPositive:i(82),maxBy:i(83),minBy:i(84),mod:i(85),snapEqual:n,toDegree:i(86),toInt:i(22),toInteger:i(22),toRadian:i(87)}},function(t,e){t.exports=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e-5;return Math.abs(t-e)20&&(r=20),parseFloat(t.toFixed(r))}},function(t,e,i){var n=i(6);t.exports=function(t){return n(t)&&t%1!=0}},function(t,e,i){var n=i(6);t.exports=function(t){return n(t)&&t%2==0}},function(t,e,i){var n=i(6),r=Number.isInteger?Number.isInteger:function(t){return n(t)&&t%1==0};t.exports=r},function(t,e,i){var n=i(6);t.exports=function(t){return n(t)&&t<0}},function(t,e,i){var n=i(6);t.exports=function(t){return n(t)&&t%2!=0}},function(t,e,i){var n=i(6);t.exports=function(t){return n(t)&&t>0}},function(t,e,i){var n=i(1),r=i(3),a=i(0);t.exports=function(t,e){if(n(t)){var i=t[0],o=void 0;o=r(e)?e(t[0]):t[0][e];var s=void 0;return a(t,(function(t){(s=r(e)?e(t):t[e])>o&&(i=t,o=s)})),i}}},function(t,e,i){var n=i(1),r=i(3),a=i(0);t.exports=function(t,e){if(n(t)){var i=t[0],o=void 0;o=r(e)?e(t[0]):t[0][e];var s=void 0;return a(t,(function(t){(s=r(e)?e(t):t[e])=0;return i?a?2*Math.PI-r:r:a?r:2*Math.PI-r},n.vertical=function(t,e,i){return i?(t[0]=e[1],t[1]=-1*e[0]):(t[0]=-1*e[1],t[1]=e[0]),t},t.exports=n},function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.forEach=e.sqrLen=e.sqrDist=e.dist=e.div=e.mul=e.sub=e.len=void 0,e.create=a,e.clone=function(t){var e=new r.ARRAY_TYPE(2);return e[0]=t[0],e[1]=t[1],e},e.fromValues=function(t,e){var i=new r.ARRAY_TYPE(2);return i[0]=t,i[1]=e,i},e.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t},e.set=function(t,e,i){return t[0]=e,t[1]=i,t},e.add=function(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t},e.subtract=o,e.multiply=s,e.divide=u,e.ceil=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t},e.floor=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t},e.min=function(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t},e.max=function(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t},e.round=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t},e.scale=function(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t},e.scaleAndAdd=function(t,e,i,n){return t[0]=e[0]+i[0]*n,t[1]=e[1]+i[1]*n,t},e.distance=l,e.squaredDistance=c,e.length=h,e.squaredLength=p,e.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t},e.inverse=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t},e.normalize=function(t,e){var i=e[0],n=e[1],r=i*i+n*n;return r>0&&(r=1/Math.sqrt(r),t[0]=e[0]*r,t[1]=e[1]*r),t},e.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]},e.cross=function(t,e,i){var n=e[0]*i[1]-e[1]*i[0];return t[0]=t[1]=0,t[2]=n,t},e.lerp=function(t,e,i,n){var r=e[0],a=e[1];return t[0]=r+n*(i[0]-r),t[1]=a+n*(i[1]-a),t},e.random=function(t,e){e=e||1;var i=2*r.RANDOM()*Math.PI;return t[0]=Math.cos(i)*e,t[1]=Math.sin(i)*e,t},e.transformMat2=function(t,e,i){var n=e[0],r=e[1];return t[0]=i[0]*n+i[2]*r,t[1]=i[1]*n+i[3]*r,t},e.transformMat2d=function(t,e,i){var n=e[0],r=e[1];return t[0]=i[0]*n+i[2]*r+i[4],t[1]=i[1]*n+i[3]*r+i[5],t},e.transformMat3=function(t,e,i){var n=e[0],r=e[1];return t[0]=i[0]*n+i[3]*r+i[6],t[1]=i[1]*n+i[4]*r+i[7],t},e.transformMat4=function(t,e,i){var n=e[0],r=e[1];return t[0]=i[0]*n+i[4]*r+i[12],t[1]=i[1]*n+i[5]*r+i[13],t},e.rotate=function(t,e,i,n){var r=e[0]-i[0],a=e[1]-i[1],o=Math.sin(n),s=Math.cos(n);return t[0]=r*s-a*o+i[0],t[1]=r*o+a*s+i[1],t},e.angle=function(t,e){var i=t[0],n=t[1],r=e[0],a=e[1],o=i*i+n*n;o>0&&(o=1/Math.sqrt(o));var s=r*r+a*a;s>0&&(s=1/Math.sqrt(s));var u=(i*r+n*a)*o*s;return u>1?0:u<-1?Math.PI:Math.acos(u)},e.str=function(t){return"vec2("+t[0]+", "+t[1]+")"},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]},e.equals=function(t,e){var i=t[0],n=t[1],a=e[0],o=e[1];return Math.abs(i-a)<=r.EPSILON*Math.max(1,Math.abs(i),Math.abs(a))&&Math.abs(n-o)<=r.EPSILON*Math.max(1,Math.abs(n),Math.abs(o))};var n,r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}(i(15));function a(){var t=new r.ARRAY_TYPE(2);return r.ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0),t}function o(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t}function s(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[1],t}function u(t,e,i){return t[0]=e[0]/i[0],t[1]=e[1]/i[1],t}function l(t,e){var i=e[0]-t[0],n=e[1]-t[1];return Math.sqrt(i*i+n*n)}function c(t,e){var i=e[0]-t[0],n=e[1]-t[1];return i*i+n*n}function h(t){var e=t[0],i=t[1];return Math.sqrt(e*e+i*i)}function p(t){var e=t[0],i=t[1];return e*e+i*i}e.len=h,e.sub=o,e.mul=s,e.div=u,e.dist=l,e.sqrDist=c,e.sqrLen=p,e.forEach=(n=a(),function(t,e,i,r,a,o){var s,u=void 0;for(e||(e=2),i||(i=0),s=r?Math.min(r*e+i,t.length):t.length,u=i;u1?0:r<-1?Math.PI:Math.acos(r)},e.str=function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]},e.equals=function(t,e){var i=t[0],n=t[1],a=t[2],o=e[0],s=e[1],u=e[2];return Math.abs(i-o)<=r.EPSILON*Math.max(1,Math.abs(i),Math.abs(o))&&Math.abs(n-s)<=r.EPSILON*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(a-u)<=r.EPSILON*Math.max(1,Math.abs(a),Math.abs(u))};var n,r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}(i(15));function a(){var t=new r.ARRAY_TYPE(3);return r.ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function o(t){var e=t[0],i=t[1],n=t[2];return Math.sqrt(e*e+i*i+n*n)}function s(t,e,i){var n=new r.ARRAY_TYPE(3);return n[0]=t,n[1]=e,n[2]=i,n}function u(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t[2]=e[2]-i[2],t}function l(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[1],t[2]=e[2]*i[2],t}function c(t,e,i){return t[0]=e[0]/i[0],t[1]=e[1]/i[1],t[2]=e[2]/i[2],t}function h(t,e){var i=e[0]-t[0],n=e[1]-t[1],r=e[2]-t[2];return Math.sqrt(i*i+n*n+r*r)}function p(t,e){var i=e[0]-t[0],n=e[1]-t[1],r=e[2]-t[2];return i*i+n*n+r*r}function f(t){var e=t[0],i=t[1],n=t[2];return e*e+i*i+n*n}function d(t,e){var i=e[0],n=e[1],r=e[2],a=i*i+n*n+r*r;return a>0&&(a=1/Math.sqrt(a),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a),t}function g(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}e.sub=u,e.mul=l,e.div=c,e.dist=h,e.sqrDist=p,e.len=o,e.sqrLen=f,e.forEach=(n=a(),function(t,e,i,r,a,o){var s,u=void 0;for(e||(e=3),i||(i=0),s=r?Math.min(r*e+i,t.length):t.length,u=i;u1?1:l<0?0:l)/2,h=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],p=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],f=0,d=0;d<12;d++){var g=c*h[d]+c,v=o(g,t,i,r,s),y=o(g,e,n,a,u),m=v*v+y*y;f+=p[d]*Math.sqrt(m)}return c*f},u=function(t,e,i,n,r,a,o,s){if(!(Math.max(t,i)Math.max(r,o)||Math.max(e,n)Math.max(a,s))){var u=(t-i)*(a-s)-(e-n)*(r-o);if(u){var l=((t*n-e*i)*(r-o)-(t-i)*(r*s-a*o))/u,c=((t*n-e*i)*(a-s)-(e-n)*(r*s-a*o))/u,h=+l.toFixed(2),p=+c.toFixed(2);if(!(h<+Math.min(t,i).toFixed(2)||h>+Math.max(t,i).toFixed(2)||h<+Math.min(r,o).toFixed(2)||h>+Math.max(r,o).toFixed(2)||p<+Math.min(e,n).toFixed(2)||p>+Math.max(e,n).toFixed(2)||p<+Math.min(a,s).toFixed(2)||p>+Math.max(a,s).toFixed(2)))return{x:l,y:c}}}},l=function(t,e,i){return e>=t.x&&e<=t.x+t.width&&i>=t.y&&i<=t.y+t.height},c=function(t,e,i,n){return null===t&&(t=e=i=n=0),null===e&&(e=t.y,i=t.width,n=t.height,t=t.x),{x:t,y:e,width:i,w:i,height:n,h:n,x2:t+i,y2:e+n,cx:t+i/2,cy:e+n/2,r1:Math.min(i,n)/2,r2:Math.max(i,n)/2,r0:Math.sqrt(i*i+n*n)/2,path:r(t,e,i,n),vb:[t,e,i,n].join(" ")}},h=function(t,e,i,r,a,o,s,u){n(t)||(t=[t,e,i,r,a,o,s,u]);var l=function(t,e,i,n,r,a,o,s){for(var u=[],l=[[],[]],c=void 0,h=void 0,p=void 0,f=void 0,d=0;d<2;++d)if(0===d?(h=6*t-12*i+6*r,c=-3*t+9*i-9*r+3*o,p=3*i-3*t):(h=6*e-12*n+6*a,c=-3*e+9*n-9*a+3*s,p=3*n-3*e),Math.abs(c)<1e-12){if(Math.abs(h)<1e-12)continue;(f=-p/h)>0&&f<1&&u.push(f)}else{var g=h*h-4*p*c,v=Math.sqrt(g);if(!(g<0)){var y=(-h+v)/(2*c);y>0&&y<1&&u.push(y);var m=(-h-v)/(2*c);m>0&&m<1&&u.push(m)}}for(var x=u.length,_=x,b=void 0;x--;)b=1-(f=u[x]),l[0][x]=b*b*b*t+3*b*b*f*i+3*b*f*f*r+f*f*f*o,l[1][x]=b*b*b*e+3*b*b*f*n+3*b*f*f*a+f*f*f*s;return l[0][_]=t,l[1][_]=e,l[0][_+1]=o,l[1][_+1]=s,l[0].length=l[1].length=_+2,{min:{x:Math.min.apply(0,l[0]),y:Math.min.apply(0,l[1])},max:{x:Math.max.apply(0,l[0]),y:Math.max.apply(0,l[1])}}}.apply(null,t);return c(l.min.x,l.min.y,l.max.x-l.min.x,l.max.y-l.min.y)},p=function(t,e,i,n,r,a,o,s,u){var l=1-u,c=Math.pow(l,3),h=Math.pow(l,2),p=u*u,f=p*u,d=t+2*u*(i-t)+p*(r-2*i+t),g=e+2*u*(n-e)+p*(a-2*n+e),v=i+2*u*(r-i)+p*(o-2*r+i),y=n+2*u*(a-n)+p*(s-2*a+n);return{x:c*t+3*h*u*i+3*l*u*u*r+f*o,y:c*e+3*h*u*n+3*l*u*u*a+f*s,m:{x:d,y:g},n:{x:v,y:y},start:{x:l*t+u*i,y:l*e+u*n},end:{x:l*r+u*o,y:l*a+u*s},alpha:90-180*Math.atan2(d-v,g-y)/Math.PI}},f=function(t,e,i){if(!function(t,e){return t=c(t),e=c(e),l(e,t.x,t.y)||l(e,t.x2,t.y)||l(e,t.x,t.y2)||l(e,t.x2,t.y2)||l(t,e.x,e.y)||l(t,e.x2,e.y)||l(t,e.x,e.y2)||l(t,e.x2,e.y2)||(t.xe.x||e.xt.x)&&(t.ye.y||e.yt.y)}(h(t),h(e)))return i?0:[];for(var n=~~(s.apply(0,t)/8),r=~~(s.apply(0,e)/8),a=[],o=[],f={},d=i?0:[],g=0;g=0&&O<=1&&A>=0&&A<=1&&(i?d++:d.push({x:P.x,y:P.y,t1:O,t2:A}))}}return d};t.exports=function(t,e){return function(t,e,i){t=a(t),e=a(e);for(var n=void 0,r=void 0,o=void 0,s=void 0,u=void 0,l=void 0,c=void 0,h=void 0,p=void 0,d=void 0,g=[],v=0,y=t.length;v=3&&(3===t.length&&e.push("Q"),e=e.concat(t[1])),2===t.length&&e.push("L"),e.concat(t[t.length-1])}))}(t,e,n));else{var a=[].concat(t);"M"===a[0]&&(a[0]="L");for(var o=0;o<=n-1;o++)r.push(a)}return r}t.exports=function(t,e){if(1===t.length)return t;var i=t.length-1,r=e.length-1,a=i/r,o=[];if(1===t.length&&"M"===t[0][0]){for(var s=0;s=0;f--)u=s[f].index,"add"===s[f].type?t.splice(u,0,[].concat(t[u])):t.splice(u,1)}if((a=t.length)0)){t[a]=e[a];break}r=n(r,t[a-1],1)}t[a]=["Q"].concat(r.reduce((function(t,e){return t.concat(e)}),[]));break;case"T":t[a]=["T"].concat(r[0]);break;case"C":if(r.length<3){if(!(a>0)){t[a]=e[a];break}r=n(r,t[a-1],2)}t[a]=["C"].concat(r.reduce((function(t,e){return t.concat(e)}),[]));break;case"S":if(r.length<2){if(!(a>0)){t[a]=e[a];break}r=n(r,t[a-1],1)}t[a]=["S"].concat(r.reduce((function(t,e){return t.concat(e)}),[]));break;default:t[a]=e[a]}return t}},function(t,e,i){var n={lc:i(106),lowerCase:i(33),lowerFirst:i(107),substitute:i(108),uc:i(109),upperCase:i(34),upperFirst:i(110)};t.exports=n},function(t,e,i){t.exports=i(33)},function(t,e,i){var n=i(8);t.exports=function(t){var e=n(t);return e.charAt(0).toLowerCase()+e.substring(1)}},function(t,e){t.exports=function(t,e){return t&&e?t.replace(/\\?\{([^{}]+)\}/g,(function(t,i){return"\\"===t.charAt(0)?t.slice(1):void 0===e[i]?"":e[i]})):t}},function(t,e,i){t.exports=i(34)},function(t,e,i){var n=i(8);t.exports=function(t){var e=n(t);return e.charAt(0).toUpperCase()+e.substring(1)}},function(t,e,i){var n=i(2),r={getType:i(35),isArray:i(1),isArrayLike:i(4),isBoolean:i(112),isFunction:i(3),isNil:i(5),isNull:i(113),isNumber:i(6),isObject:i(16),isObjectLike:i(13),isPlainObject:i(7),isPrototype:i(36),isType:n,isUndefined:i(114),isString:i(10),isRegExp:i(115),isDate:i(116),isArguments:i(117),isError:i(118)};t.exports=r},function(t,e,i){var n=i(2);t.exports=function(t){return n(t,"Boolean")}},function(t,e){t.exports=function(t){return null===t}},function(t,e){t.exports=function(t){return void 0===t}},function(t,e,i){var n=i(2);t.exports=function(t){return n(t,"RegExp")}},function(t,e,i){var n=i(2);t.exports=function(t){return n(t,"Date")}},function(t,e,i){var n=i(2);t.exports=function(t){return n(t,"Arguments")}},function(t,e,i){var n=i(2);t.exports=function(t){return n(t,"Error")}},function(t,e,i){var n=i(3),r=i(14),a=i(11);t.exports=function(t){for(var e=r(arguments),i=1;ie?(n&&(clearTimeout(n),n=null),s=l,o=t.apply(r,a),n||(r=a=null)):n||!1===i.trailing||(n=setTimeout(u,c)),o};return l.cancel=function(){clearTimeout(n),s=0,n=r=a=null},l}},function(t,e){var i,n=(i={},function(t){return i[t=t||"g"]?i[t]+=1:i[t]=1,t+i[t]});t.exports=n}])},t.exports=n()},function(t,e,i){"use strict";i.r(e),i.d(e,"__extends",(function(){return r})),i.d(e,"__assign",(function(){return a})),i.d(e,"__rest",(function(){return o})),i.d(e,"__decorate",(function(){return s})),i.d(e,"__param",(function(){return u})),i.d(e,"__metadata",(function(){return l})),i.d(e,"__awaiter",(function(){return c})),i.d(e,"__generator",(function(){return h})),i.d(e,"__exportStar",(function(){return p})),i.d(e,"__values",(function(){return f})),i.d(e,"__read",(function(){return d})),i.d(e,"__spread",(function(){return g})),i.d(e,"__spreadArrays",(function(){return v})),i.d(e,"__await",(function(){return y})),i.d(e,"__asyncGenerator",(function(){return m})),i.d(e,"__asyncDelegator",(function(){return x})),i.d(e,"__asyncValues",(function(){return _})),i.d(e,"__makeTemplateObject",(function(){return b})),i.d(e,"__importStar",(function(){return M})),i.d(e,"__importDefault",(function(){return S})); -/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. -Licensed under the Apache License, Version 2.0 (the "License"); you may not use -this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - -THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - -See the Apache Version 2.0 License for specific language governing permissions -and limitations under the License. -***************************************************************************** */ -var n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)};function r(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var a=function(){return(a=Object.assign||function(t){for(var e,i=1,n=arguments.length;i=0;s--)(r=t[s])&&(o=(a<3?r(o):a>3?r(e,i,o):r(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o}function u(t,e){return function(i,n){e(i,n,t)}}function l(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function c(t,e,i,n){return new(i||(i=Promise))((function(r,a){function o(t){try{u(n.next(t))}catch(t){a(t)}}function s(t){try{u(n.throw(t))}catch(t){a(t)}}function u(t){t.done?r(t.value):new i((function(e){e(t.value)})).then(o,s)}u((n=n.apply(t,e||[])).next())}))}function h(t,e){var i,n,r,a,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(r=(r=o.trys).length>0&&r[r.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}}}function d(t,e){var i="function"==typeof Symbol&&t[Symbol.iterator];if(!i)return t;var n,r,a=i.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(n=a.next()).done;)o.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return o}function g(){for(var t=[],e=0;e1||s(t,e)}))})}function s(t,e){try{(i=r[t](e)).value instanceof y?Promise.resolve(i.value.v).then(u,l):c(a[0][2],i)}catch(t){c(a[0][3],t)}var i}function u(t){s("next",t)}function l(t){s("throw",t)}function c(t,e){t(e),a.shift(),a.length&&s(a[0][0],a[0][1])}}function x(t){var e,i;return e={},n("next"),n("throw",(function(t){throw t})),n("return"),e[Symbol.iterator]=function(){return this},e;function n(n,r){e[n]=t[n]?function(e){return(i=!i)?{value:y(t[n](e)),done:"return"===n}:r?r(e):e}:r}}function _(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,i=t[Symbol.asyncIterator];return i?i.call(t):(t=f(t),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(i){e[i]=t[i]&&function(e){return new Promise((function(n,r){!function(t,e,i,n){Promise.resolve(n).then((function(e){t({value:e,done:i})}),e)}(n,r,(e=t[i](e)).done,e.value)}))}}}function b(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function M(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}function S(t){return t&&t.__esModule?t:{default:t}}},function(t,e,i){"use strict";e.__esModule=!0;var n=function(){function t(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.height=n,this.width=i,this.x=this.minX=t,this.y=this.minY=e;var r=this.maxX=t+i,a=this.maxY=e+n;this.tl={x:t,y:e},this.tr={x:r,y:e},this.bl={x:t,y:a},this.br={x:r,y:a},this.bottom=0,this.left=this.x,this.right=0,this.top=this.y}return t.fromRange=function(e,i,n,r){return new t(e,i,n-e,r-i)},t.prototype.equals=function(t){return this.x===t.x&&this.y===t.y&&this.width===t.width&&this.height===t.height},t}();e.default=n},function(t,e,i){"use strict";e.__esModule=!0;var n=i(1),r=i(0),a=i(9),o=i(4),s={matrix:"matrix",path:"path",points:"points",lineDash:"lineDash"},u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isShape=!0,e}return n.__extends(e,t),e.prototype.createPath=function(t){},e.prototype.afterPath=function(t){},e.prototype.isPointInPath=function(t,e){return!1},e.prototype.drawInner=function(t){var e=this.attrs;this.createPath(t);var i=t.globalAlpha;if(this.hasFill()){var n=e.fillOpacity;r.isNil(n)||1===n?t.fill():(t.globalAlpha=n,t.fill(),t.globalAlpha=i)}if(this.hasStroke()&&this.attrs.lineWidth>0){var a=e.strokeOpacity;r.isNil(a)||1===a||(t.globalAlpha=a),t.stroke()}this.afterPath(t)},e.prototype.isHitBox=function(){return!0},e.prototype.isHit=function(t,e){var i=[t,e,1];if(this.invert(i),this.isHitBox()){var n=this.getBBox();if(n&&!o.box(n.minX,n.maxX,n.minY,n.maxY,i[0],i[1]))return!1}var r=this.attrs.clip;return r?(r.invert(i,this.get("canvas")),!!r.isPointInPath(i[0],i[1])&&this.isPointInPath(i[0],i[1])):this.isPointInPath(i[0],i[1])},e.prototype.calculateBox=function(){return null},e.prototype.getHitLineWidth=function(){var t=this.attrs,e=t.lineAppendWidth||0;return(t.lineWidth||0)+e},e.prototype.clearTotalMatrix=function(){this.cfg.totalMatrix=null,this.cfg.region=null},e.prototype.clearBBox=function(){this.cfg.box=null,this.cfg.region=null},e.prototype.getBBox=function(){var t=this.get("box");return t||(t=this.calculateBox())&&this.set("box",t),t},e.prototype.clone=function(){var t=null,i=this.attrs,n={};return r.each(i,(function(t,e){s[e]&&r.isArray(i[e])?n[e]=function(t){for(var e=[],i=0;i1){var r=e[0].charAt(0);e.splice(1,0,e[0].substr(1)),e[0]=r}n.each(e,(function(t,i){isNaN(t)||(e[i]=+t)})),t[i]=e})),t):void 0}},function(t,e,i){"use strict";e.__esModule=!0;var n=i(0),r=i(2),a=function(t,e,i,n){return{x:Math.cos(n)*i+t,y:Math.sin(n)*i+e}},o=function(t,e,i,n){var r,a;return n?ti&&(r=2*Math.PI-t+e,a=t-i):(r=t-e,a=i-t),r>a?i:e};e.nearAngle=function(t,e,i,r){var a=0;return i-e>=2*Math.PI&&(a=2*Math.PI),e=n.mod(e,2*Math.PI),i=n.mod(i,2*Math.PI)+a,t=n.mod(t,2*Math.PI),r?e>=i?t>i&&ti?t:o(t,e,i,!1):e<=i?ee||t=0,l=u?i.toUpperCase():i,c=t,d=e.endPoint,y=c[1],m=c[2];switch(l){default:break;case"M":s=u?p(y,m,d):{x:y,y:m},this.command="M",this.params=[d,s],this.subStart=s,this.endPoint=s;break;case"L":s=u?p(y,m,d):{x:y,y:m},this.command="L",this.params=[d,s],this.subStart=e.subStart,this.endPoint=s,this.endTangent=function(){return[s.x-d.x,s.y-d.y]},this.startTangent=function(){return[d.x-s.x,d.y-s.y]};break;case"H":s=u?p(y,0,d):{x:y,y:d.y},this.command="L",this.params=[d,s],this.subStart=e.subStart,this.endPoint=s,this.endTangent=function(){return[s.x-d.x,s.y-d.y]},this.startTangent=function(){return[d.x-s.x,d.y-s.y]};break;case"V":s=u?p(0,y,d):{x:d.x,y:y},this.command="L",this.params=[d,s],this.subStart=e.subStart,this.endPoint=s,this.endTangent=function(){return[s.x-d.x,s.y-d.y]},this.startTangent=function(){return[d.x-s.x,d.y-s.y]};break;case"Q":u?(r=p(y,m,d),a=p(c[3],c[4],d)):(r={x:y,y:m},a={x:c[3],y:c[4]}),this.command="Q",this.params=[d,r,a],this.subStart=e.subStart,this.endPoint=a,this.endTangent=function(){return[a.x-r.x,a.y-r.y]},this.startTangent=function(){return[d.x-r.x,d.y-r.y]};break;case"T":a=u?p(y,m,d):{x:y,y:m},"Q"===e.command?(r=f(e.params[1],d),this.command="Q",this.params=[d,r,a],this.subStart=e.subStart,this.endPoint=a,this.endTangent=function(){return[a.x-r.x,a.y-r.y]},this.startTangent=function(){return[d.x-r.x,d.y-r.y]}):(this.command="TL",this.params=[d,a],this.subStart=e.subStart,this.endPoint=a,this.endTangent=function(){return[a.x-d.x,a.y-d.y]},this.startTangent=function(){return[d.x-a.x,d.y-a.y]});break;case"C":u?(r=p(y,m,d),a=p(c[3],c[4],d),o=p(c[5],c[6],d)):(r={x:y,y:m},a={x:c[3],y:c[4]},o={x:c[5],y:c[6]}),this.command="C",this.params=[d,r,a,o],this.subStart=e.subStart,this.endPoint=o,this.endTangent=function(){return[o.x-a.x,o.y-a.y]},this.startTangent=function(){return[d.x-r.x,d.y-r.y]};break;case"S":u?(a=p(y,m,d),o=p(c[3],c[4],d)):(a={x:y,y:m},o={x:c[3],y:c[4]}),"C"===e.command?(r=f(e.params[2],d),this.command="C",this.params=[d,r,a,o],this.subStart=e.subStart,this.endPoint=o,this.endTangent=function(){return[o.x-a.x,o.y-a.y]},this.startTangent=function(){return[d.x-r.x,d.y-r.y]}):(this.command="SQ",this.params=[d,a,o],this.subStart=e.subStart,this.endPoint=o,this.endTangent=function(){return[o.x-a.x,o.y-a.y]},this.startTangent=function(){return[d.x-a.x,d.y-a.y]});break;case"A":var x=y,_=m,b=c[3],M=c[4],S=c[5];s=u?p(c[6],c[7],d):{x:c[6],y:c[7]},this.command="A";var w=function(t,e,i,r,a,o,s){var u=n.mod(n.toRadian(s),2*Math.PI),l=t.x,c=t.y,h=e.x,p=e.y,f=Math.cos(u)*(l-h)/2+Math.sin(u)*(c-p)/2,d=-1*Math.sin(u)*(l-h)/2+Math.cos(u)*(c-p)/2,y=f*f/(a*a)+d*d/(o*o);y>1&&(a*=Math.sqrt(y),o*=Math.sqrt(y));var m=a*a*(d*d)+o*o*(f*f),x=Math.sqrt((a*a*(o*o)-m)/m);i===r&&(x*=-1),isNaN(x)&&(x=0);var _=x*a*d/o,b=x*-o*f/a,M=(l+h)/2+Math.cos(u)*_-Math.sin(u)*b,S=(c+p)/2+Math.sin(u)*_+Math.cos(u)*b,w=v([1,0],[(f-_)/a,(d-b)/o]),k=[(f-_)/a,(d-b)/o],C=[(-1*f-_)/a,(-1*d-b)/o],P=v(k,C);return g(k,C)<=-1&&(P=Math.PI),g(k,C)>=1&&(P=0),0===r&&P>0&&(P-=2*Math.PI),1===r&&P<0&&(P+=2*Math.PI),[t,M,S,a,o,w,P,u,r]}(d,s,M,S,x,_,b);this.params=w;var k=e.subStart;this.subStart=k,this.endPoint=s;var C=w[5]%(2*Math.PI);n.isNumberEqual(C,2*Math.PI)&&(C=0);var P=w[6]%(2*Math.PI);n.isNumberEqual(P,2*Math.PI)&&(P=0);var O=.001;this.startTangent=function(){0===S&&(O*=-1);var t=w[3]*Math.cos(C-O)+w[1],e=w[4]*Math.sin(C-O)+w[2];return[t-k.x,e-k.y]},this.endTangent=function(){var t=w[6];t-2*Math.PI<1e-4&&(t=0);var e=w[3]*Math.cos(C+t+O)+w[1],i=w[4]*Math.sin(C+t-O)+w[2];return[d.x-e,d.y-i]};break;case"Z":this.command="Z",this.params=[d,e.subStart],this.subStart=e.subStart,this.endPoint=e.subStart}},t.prototype.isInside=function(t,e,i){var n=this.command,a=this.params,o=this.box;if(o&&!r.box(o.minX,o.maxX,o.minY,o.maxY,t,e))return!1;switch(n){default:break;case"M":return!1;case"TL":case"L":case"Z":return r.line(a[0].x,a[0].y,a[1].x,a[1].y,i,t,e);case"SQ":case"Q":return r.quadraticline(a[0].x,a[0].y,a[1].x,a[1].y,a[2].x,a[2].y,i,t,e);case"C":return r.cubicline(a[0].x,a[0].y,a[1].x,a[1].y,a[2].x,a[2].y,a[3].x,a[3].y,i,t,e);case"A":var s=a,u=s[1],h=s[2],p=s[3],f=s[4],d=s[5],g=s[6],v=s[7],y=s[8],m=p>f?p:f,x=p>f?1:p/f,_=p>f?f/p:1;s=[t,e,1];var b=[1,0,0,0,1,0,0,0,1];return c.translate(b,b,[-u,-h]),c.rotate(b,b,-v),c.scale(b,b,[1/x,1/_]),l.transformMat3(s,s,b),r.arcline(0,0,m,d,d+g,1-y,i,s[0],s[1])}return!1},t.prototype.draw=function(t){var e,i,n,r=this.command,a=this.params;switch(r){default:break;case"M":t.moveTo(a[1].x,a[1].y);break;case"TL":case"L":t.lineTo(a[1].x,a[1].y);break;case"SQ":case"Q":e=a[1],i=a[2],t.quadraticCurveTo(e.x,e.y,i.x,i.y);break;case"C":e=a[1],i=a[2],n=a[3],t.bezierCurveTo(e.x,e.y,i.x,i.y,n.x,n.y);break;case"A":var o=a,s=o[1],u=o[2],l=o[3],c=o[4],h=o[5],p=o[6],f=o[7],d=o[8],g=l>c?l:c,v=l>c?1:l/c,y=l>c?c/l:1;t.translate(s,u),t.rotate(f),t.scale(v,y),t.arc(0,0,g,h,h+p,1-d),t.scale(1/v,1/y),t.rotate(-f),t.translate(-s,-u);break;case"Z":t.closePath()}},t.prototype.getBBox=function(t){var e,i,n,r,l=t/2,c=this.params;switch(this.command){default:case"M":case"Z":break;case"TL":case"L":this.box=u.default.fromRange(Math.min(c[0].x,c[1].x)-l,Math.min(c[0].y,c[1].y)-l,Math.max(c[0].x,c[1].x)+l,Math.max(c[0].y,c[1].y)+l);break;case"SQ":case"Q":for(n=0,r=(i=o.extrema(c[0].x,c[1].x,c[2].x)).length;nw&&(w=P)}var O=s.yExtrema(m,d,g),A=1/0,L=-1/0,T=[_,b];for(n=2*-Math.PI;n<=2*Math.PI;n+=Math.PI){var I=O+n;1===x?_L&&(L=D)}this.box=u.default.fromRange(S-l,A-l,w+l,L+l)}},t}();e.default=y},function(t,e,i){"use strict";e.__esModule=!0;var n=i(5),r=i(7),a=Math.PI,o=Math.sin,s=Math.cos,u=Math.atan2,l=10,c=a/3;function h(t,e,i,n,r,h,p){var f,d,g,v,y,m,x;if(!e.fill){var _=e.arrowLength||l,b=e.arrowAngle?e.arrowAngle*a/180:c;x=u(n-h,i-r),y=Math.abs(e.lineWidth*s(x))/2,m=Math.abs(e.lineWidth*o(x))/2,p&&(y=-y,m=-m),f=r+_*s(x+b/2),d=h+_*o(x+b/2),g=r+_*s(x-b/2),v=h+_*o(x-b/2),t.beginPath(),t.moveTo(f-y,d-m),t.lineTo(r-y,h-m),t.lineTo(g-y,v-m),t.moveTo(r-y,h-m),t.lineTo(r+y,h+m),t.moveTo(r,h),t.stroke()}}function p(t,e,i,a,o,s,u){var l=u?e.startArrow:e.endArrow,c=l.d,h=0,p=o-i,f=s-a,d=Math.atan(p/f);0===f&&p<0?h=Math.PI:p>0&&f>0?h=Math.PI/2-d:p<0&&f<0?h=-Math.PI/2-d:p>=0&&f<0?h=-d-Math.PI/2:p<=0&&f>0&&(h=Math.PI/2-d);var g=function(t){var e,i=[],a=n.parsePath(t.path);if(Array.isArray(a)&&0!==a.length&&("M"===a[0][0]||"m"===a[0][0])){for(var o=a.length,s=0;s0?c=function(t,e){if(e.onFrame)return t;var i=e.delay,n=Object.prototype.hasOwnProperty;return r.each(e.toAttrs,(function(e,a){r.each(t,(function(t){i=0&&y=0&&a<=1&&h.push(a);else{var p=l*l-4*u*c;n.isNumberEqual(p,0)?h.push(-l/(2*u)):p>0&&(o=(-l-(s=Math.sqrt(p)))/(2*u),(a=(-l+s)/(2*u))>=0&&a<=1&&h.push(a),o>=0&&o<=1&&h.push(o))}return h},e.len=function(t,e,i,r,a,o,s,l,c){n.isNil(c)&&(c=1);for(var h=(c=c>1?1:c<0?0:c)/2,p=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],f=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],d=0,g=0;g<12;g++){var v=h*p[g]+h,y=u(v,t,i,a,s),m=u(v,e,r,o,l),x=y*y+m*m;d+=f[g]*Math.sqrt(x)}return h*d},e.projectPoint=function(t,e,i,n,r,a,o,u,l,c){return s(t,e,i,n,r,a,o,u,l,c,!0)}},function(t,e,i){"use strict";e.__esModule=!0;var n=i(0),r="\t\n\v\f\r   ᠎              \u2028\u2029",a=new RegExp("([a-z])["+r+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+r+"]*,?["+r+"]*)+)","ig"),o=new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+r+"]*,?["+r+"]*","ig"),s=function(t){if(!t)return null;if(typeof t==typeof[])return t;var e={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},i=[];return String(t).replace(a,(function(n,r,a){var s=[],u=r.toLowerCase();if(a.replace(o,(function(t,e){e&&s.push(+e)})),"m"===u&&s.length>2&&(i.push([r].concat(s.splice(0,2))),u="l",r="m"===r?"l":"L"),"o"===u&&1===s.length&&i.push([r,s[0]]),"r"===u)i.push([r].concat(s));else for(;s.length>=e[u]&&(i.push([r].concat(s.splice(0,e[u]))),e[u]););return t})),i};e.parsePathString=s;var u=function(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};e.catmullRomToBezier=u;var l=function(t,e,i,n,r){var a=[];if(null===r&&null===n&&(n=i),t=+t,e=+e,i=+i,n=+n,null!==r){var o=Math.PI/180,s=t+i*Math.cos(-n*o),u=t+i*Math.cos(-r*o);a=[["M",s,e+i*Math.sin(-n*o)],["A",i,i,0,+(r-n>180),0,u,e+i*Math.sin(-r*o)]]}else a=[["M",t,e],["m",0,-n],["a",i,n,0,1,1,0,2*n],["a",i,n,0,1,1,0,-2*n],["z"]];return a},c=function(t){if(!(t=s(t))||!t.length)return[["M",0,0]];var e,i,n=[],r=0,a=0,o=0,c=0,h=0;"M"===t[0][0]&&(o=r=+t[0][1],c=a=+t[0][2],h++,n[0]=["M",r,a]);for(var p=3===t.length&&"M"===t[0][0]&&"R"===t[1][0].toUpperCase()&&"Z"===t[2][0].toUpperCase(),f=void 0,d=void 0,g=h,v=t.length;g1&&(i*=M=Math.sqrt(M),n*=M);var S=i*i,w=n*n,k=(a===o?-1:1)*Math.sqrt(Math.abs((S*w-S*b*b-w*_*_)/(S*b*b+w*_*_)));d=k*i*b/n+(t+s)/2,g=k*-n*_/i+(e+u)/2,h=Math.asin(((e-g)/n).toFixed(9)),p=Math.asin(((u-g)/n).toFixed(9)),h=tp&&(h-=2*Math.PI),!o&&p>h&&(p-=2*Math.PI)}var C=p-h;if(Math.abs(C)>v){var P=p,O=s,A=u;p=h+v*(o&&p>h?1:-1),s=d+i*Math.cos(p),u=g+n*Math.sin(p),m=f(s,u,i,n,r,0,o,O,A,[p,P,d,g])}C=p-h;var L=Math.cos(h),T=Math.sin(h),I=Math.cos(p),D=Math.sin(p),j=Math.tan(C/4),E=4/3*i*j,B=4/3*n*j,F=[t,e],R=[t+E*T,e-B*L],N=[s+E*D,u-B*I],z=[s,u];if(R[0]=2*F[0]-R[0],R[1]=2*F[1]-R[1],l)return[R,N,z].concat(m);for(var H=[],G=0,Y=(m=[R,N,z].concat(m).join().split(",")).length;G7){t[e].shift();for(var a=t[e];a.length;)s[e]="A",r&&(u[e]="A"),t.splice(e++,0,["C"].concat(a.splice(0,6)));t.splice(e,1),i=Math.max(n.length,r&&r.length||0)}},y=function(t,e,a,o,s){t&&e&&"M"===t[s][0]&&"M"!==e[s][0]&&(e.splice(s,0,["M",o.x,o.y]),a.bx=0,a.by=0,a.x=t[s][1],a.y=t[s][2],i=Math.max(n.length,r&&r.length||0))};i=Math.max(n.length,r&&r.length||0);for(var m=0;m1?1:u<0?0:u)/2,c=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],h=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],p=0,f=0;f<12;f++){var d=l*c[f]+l,g=y(d,t,i,r,o),v=y(d,e,n,a,s),m=g*g+v*v;p+=h[f]*Math.sqrt(m)}return l*p},x=function(t,e,i,n,r,a,o,s){if(!(Math.max(t,i)Math.max(r,o)||Math.max(e,n)Math.max(a,s))){var u=(t-i)*(a-s)-(e-n)*(r-o);if(u){var l=((t*n-e*i)*(r-o)-(t-i)*(r*s-a*o))/u,c=((t*n-e*i)*(a-s)-(e-n)*(r*s-a*o))/u,h=+l.toFixed(2),p=+c.toFixed(2);if(!(h<+Math.min(t,i).toFixed(2)||h>+Math.max(t,i).toFixed(2)||h<+Math.min(r,o).toFixed(2)||h>+Math.max(r,o).toFixed(2)||p<+Math.min(e,n).toFixed(2)||p>+Math.max(e,n).toFixed(2)||p<+Math.min(a,s).toFixed(2)||p>+Math.max(a,s).toFixed(2)))return{x:l,y:c}}}},_=function(t,e,i){return e>=t.x&&e<=t.x+t.width&&i>=t.y&&i<=t.y+t.height},b=function(t,e,i,n,r){if(r)return[["M",+t+ +r,e],["l",i-2*r,0],["a",r,r,0,0,1,r,r],["l",0,n-2*r],["a",r,r,0,0,1,-r,r],["l",2*r-i,0],["a",r,r,0,0,1,-r,-r],["l",0,2*r-n],["a",r,r,0,0,1,r,-r],["z"]];var a=[["M",t,e],["l",i,0],["l",0,n],["l",-i,0],["z"]];return a.parsePathArray=v,a};e.rectPath=b;var M=function(t,e,i,n){return null===t&&(t=e=i=n=0),null===e&&(e=t.y,i=t.width,n=t.height,t=t.x),{x:t,y:e,width:i,w:i,height:n,h:n,x2:t+i,y2:e+n,cx:t+i/2,cy:e+n/2,r1:Math.min(i,n)/2,r2:Math.max(i,n)/2,r0:Math.sqrt(i*i+n*n)/2,path:b(t,e,i,n),vb:[t,e,i,n].join(" ")}},S=function(t,e,i,r,a,o,s,u){n.isArray(t)||(t=[t,e,i,r,a,o,s,u]);var l=function(t,e,i,n,r,a,o,s){for(var u,l,c,h,p=[],f=[[],[]],d=0;d<2;++d)if(0===d?(l=6*t-12*i+6*r,u=-3*t+9*i-9*r+3*o,c=3*i-3*t):(l=6*e-12*n+6*a,u=-3*e+9*n-9*a+3*s,c=3*n-3*e),Math.abs(u)<1e-12){if(Math.abs(l)<1e-12)continue;(h=-c/l)>0&&h<1&&p.push(h)}else{var g=l*l-4*c*u,v=Math.sqrt(g);if(!(g<0)){var y=(-l+v)/(2*u);y>0&&y<1&&p.push(y);var m=(-l-v)/(2*u);m>0&&m<1&&p.push(m)}}for(var x,_=p.length,b=_;_--;)x=1-(h=p[_]),f[0][_]=x*x*x*t+3*x*x*h*i+3*x*h*h*r+h*h*h*o,f[1][_]=x*x*x*e+3*x*x*h*n+3*x*h*h*a+h*h*h*s;return f[0][b]=t,f[1][b]=e,f[0][b+1]=o,f[1][b+1]=s,f[0].length=f[1].length=b+2,{min:{x:Math.min.apply(0,f[0]),y:Math.min.apply(0,f[1])},max:{x:Math.max.apply(0,f[0]),y:Math.max.apply(0,f[1])}}}.apply(null,t);return M(l.min.x,l.min.y,l.max.x-l.min.x,l.max.y-l.min.y)},w=function(t,e,i,n,r,a,o,s,u){var l=1-u,c=Math.pow(l,3),h=Math.pow(l,2),p=u*u,f=p*u,d=t+2*u*(i-t)+p*(r-2*i+t),g=e+2*u*(n-e)+p*(a-2*n+e),v=i+2*u*(r-i)+p*(o-2*r+i),y=n+2*u*(a-n)+p*(s-2*a+n);return{x:c*t+3*h*u*i+3*l*u*u*r+f*o,y:c*e+3*h*u*n+3*l*u*u*a+f*s,m:{x:d,y:g},n:{x:v,y:y},start:{x:l*t+u*i,y:l*e+u*n},end:{x:l*r+u*o,y:l*a+u*s},alpha:90-180*Math.atan2(d-v,g-y)/Math.PI}},k=function(t,e,i){if(!function(t,e){return t=M(t),e=M(e),_(e,t.x,t.y)||_(e,t.x2,t.y)||_(e,t.x,t.y2)||_(e,t.x2,t.y2)||_(t,e.x,e.y)||_(t,e.x2,e.y)||_(t,e.x,e.y2)||_(t,e.x2,e.y2)||(t.xe.x||e.xt.x)&&(t.ye.y||e.yt.y)}(S(t),S(e)))return i?0:[];for(var n=~~(m.apply(0,t)/8),r=~~(m.apply(0,e)/8),a=[],o=[],s={},u=i?0:[],l=0;l=0&&k<=1&&C>=0&&C<=1&&(i?u+=1:u.push({x:b.x,y:b.y,t1:k,t2:C}))}}return u};function C(t,e){var i=[],n=[];return t.length&&function t(e,r){if(1===e.length)i.push(e[0]),n.push(e[0]);else{for(var a=[],o=0;o=3&&(3===t.length&&e.push("Q"),e=e.concat(t[1])),2===t.length&&e.push("L"),e.concat(t[t.length-1])}))}(t,e,i));else{var r=[].concat(t);"M"===r[0]&&(r[0]="L");for(var a=0;a<=i-1;a++)n.push(r)}return n}(t[r],t[r+1],n))}),[]);return u.unshift(t[0]),"Z"!==e[n]&&"z"!==e[n]||u.push("Z"),u};var P=function(t,e){if(t.length!==e.length)return!1;var i=!0;return n.each(t,(function(t,n){if(t!==e[n])return i=!1,!1})),i};function O(t,e,i){var n=null,r=i;return e=0;u--)o=a[u].index,"add"===a[u].type?t.splice(o,0,[].concat(t[o])):t.splice(o,1)}var h=r-(n=t.length);if(n0)){t[n]=e[n];break}i=A(i,t[n-1],1)}t[n]=["Q"].concat(i.reduce((function(t,e){return t.concat(e)}),[]));break;case"T":t[n]=["T"].concat(i[0]);break;case"C":if(i.length<3){if(!(n>0)){t[n]=e[n];break}i=A(i,t[n-1],2)}t[n]=["C"].concat(i.reduce((function(t,e){return t.concat(e)}),[]));break;case"S":if(i.length<2){if(!(n>0)){t[n]=e[n];break}i=A(i,t[n-1],1)}t[n]=["S"].concat(i.reduce((function(t,e){return t.concat(e)}),[]));break;default:t[n]=e[n]}return t}},function(t,e,i){"use strict";e.__esModule=!0;var n=i(40);e.Arc=n.default;var r=i(41);e.Circle=r.default;var a=i(42);e.Dom=a.default;var o=i(43);e.Ellipse=o.default;var s=i(44);e.Fan=s.default;var u=i(45);e.Image=u.default;var l=i(46);e.Line=l.default;var c=i(16);e.Marker=c.default;var h=i(47);e.Path=h.default;var p=i(48);e.Polygon=p.default;var f=i(49);e.Polyline=f.default;var d=i(50);e.Rect=d.default;var g=i(51);e.Text=g.default},function(t,e,i){"use strict";e.__esModule=!0;var n=i(0).createDom('').getContext("2d");e.default=function(t,e,i){return i.createPath(n),n.isPointInPath(t,e)}},function(t,e,i){"use strict";e.__esModule=!0;var n=i(1),r=i(0),a=i(5),o=i(3),s=i(7),u=i(4),l=i(2),c=i(37),h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="marker",e.canFill=!0,e.canStroke=!0,e}return n.__extends(e,t),e.prototype.getDefaultAttrs=function(){return{path:null,x:0,y:0,lineWidth:1}},e.prototype.isPointInPath=function(t,e){var i=this.attrs,n=i.x,r=i.y,a=i.radius,o=this.getHitLineWidth();return u.circle(n,r,a+o/2,t,e)},e.prototype.calculateBox=function(){var t=this.attrs,e=t.x,i=t.y,n=t.radius,r=this.getHitLineWidth()/2+n;return l.default.fromRange(e-r,i-r,e+r,i+r)},e.prototype._getPath=function(){var t,e=this.attrs,i=e.x,n=e.y,a=e.radius,o=e.symbol||"circle";return(t=r.isFunction(o)?o:c.default.get(o))?t(i,n,a):(console.warn(t+" symbol is not exist."),null)},e.prototype.createPath=function(t){var e=this.cfg.segments;if(!e||this.cfg.hasUpdate){var i,n=a.parsePath(this._getPath());for(t.beginPath(),e=[],o=0;o=0&&f<_?(p=M,_=f):(g=[o(t,i,s,S),o(e,n,u,S)],y=r.squaredDistance(b,g),S<=1&&y<_?(p=S,_=y):x*=.5)}return h?{x:o(t,i,s,p),y:o(e,n,u,p)}:Math.sqrt(_)}e.at=o,e.pointDistance=s,e.extrema=function(t,e,i){var r=t+i-2*e;if(n.isNumberEqual(r,0))return[.5];var a=(t-e)/r;return a<=1&&a>=0?[a]:[]},e.projectPoint=function(t,e,i,n,r,a,o,u){return s(t,e,i,n,r,a,o,u,!0)}},function(t,e,i){"use strict";e.__esModule=!0;var n=i(1),r=i(0),a=i(9),o=i(2),s=i(14),u={},l="_INDEX";function c(t,e,i){for(var n,r=t.length-1;r>=0;r--){var a=t[r];if(a.cfg.visible&&a.cfg.capture&&!a.destroyed&&!a.removed&&(a.isGroup?n=a.getShape(e,i):a.isHit(e,i)&&(n=a)),n)break}return n}var h=function(t){function e(e){void 0===e&&(e={});var i=t.call(this,e)||this;return i.isGroup=!0,i.type="group",i.canFill=!0,i.canStroke=!0,i.set("children",[]),i.set("tobeRemoved",[]),i._beforeRenderUI(),i._renderUI(),i._bindUI(),i}return n.__extends(e,t),e.prototype._beforeRenderUI=function(){},e.prototype._renderUI=function(){},e.prototype._bindUI=function(){},e.prototype.addShape=function(t,e){var i=this.get("canvas");e=e||{};var n=u[t];if(n||(n=r.upperFirst(t),u[t]=n),e.attrs&&i){var a=e.attrs;if("text"===t){var o=i.get("fontFamily");o&&(a.fontFamily=a.fontFamily?a.fontFamily:o)}}e.canvas=i,e.type=t;var l=new s[n](e);return this.add(l),l},e.prototype.addGroup=function(t,i){var n,a=this.get("canvas");if(i=r.mix({},i),r.isFunction(t))i?(i.canvas=a,i.parent=this,n=new t(i)):n=new t({canvas:a,parent:this}),this.add(n);else if(r.isObject(t))t.canvas=a,n=new e(t),this.add(n);else{if(void 0!==t)return!1;n=new e,this.add(n)}return n},e.prototype.renderBack=function(t,e){var i=this.get("backShape"),n=this.getBBox();return r.mix(e,{x:n.x-t[3],y:n.y-t[0],width:n.width+t[1]+t[3],height:n.height+t[0]+t[2]}),i?i.attr(e):i=this.addShape("rect",{zIndex:-1,attrs:e}),this.set("backShape",i),this.sort(),i},e.prototype.removeChild=function(e,i){if(arguments.length>=2)this.contain(e)&&e.remove(i);else{if(1===arguments.length){if(!r.isBoolean(e))return this.contain(e)&&e.remove(!0),this;i=e}0===arguments.length&&(i=!0),t.prototype.remove.call(this,i)}return this},e.prototype.add=function(t){var e=this,i=e.get("children");if(r.isArray(t))r.each(t,(function(t){var i=t.get("parent");i&&i.removeChild(t,!1),e._setCfgProperty(t)})),e.cfg.children=i.concat(t);else{var n=t,a=n.get("parent");a&&a.removeChild(n,!1),e._setCfgProperty(n),i.push(n)}return e},e.prototype._setCfgProperty=function(t){var e=this.cfg;t.set("parent",this),t.set("canvas",e.canvas),e.timeline&&t.set("timeline",e.timeline)},e.prototype.contain=function(t){return this.get("children").indexOf(t)>-1},e.prototype.getChildByIndex=function(t){return this.get("children")[t]},e.prototype.getFirst=function(){return this.getChildByIndex(0)},e.prototype.getLast=function(){var t=this.get("children").length-1;return this.getChildByIndex(t)},e.prototype.getBBox=function(){var t=1/0,e=-1/0,i=1/0,n=-1/0,a=this.get("children");return a.length>0?r.each(a,(function(r){if(r.get("visible")){var a=r.getBBox();if(!a)return!0;var o=a.tl,s=a.tr,u=a.bl,l=a.br,c=[o.x,o.y,1],h=[u.x,u.y,1],p=[s.x,s.y,1],f=[l.x,l.y,1];r.apply(c),r.apply(h),r.apply(p),r.apply(f);var d=Math.min(c[0],h[0],p[0],f[0]),g=Math.max(c[0],h[0],p[0],f[0]),v=Math.min(c[1],h[1],p[1],f[1]),y=Math.max(c[1],h[1],p[1],f[1]);de&&(e=g),vn&&(n=y)}})):(t=0,e=0,i=0,n=0),new o.default(t,i,e-t,n-i)},e.prototype.getCount=function(){return this.get("children").length},e.prototype.sort=function(){var t,e=this.get("children");return r.each(e,(function(t,e){return t[l]=e,t})),e.sort((t=function(t,e){return t.get("zIndex")-e.get("zIndex")},function(e,i){var n=t(e,i);return 0===n?e[l]-i[l]:n})),this},e.prototype.findById=function(t){return this.find((function(e){return e.get("id")===t}))},e.prototype.find=function(t){if(r.isString(t))return this.findById(t);var e=this.get("children"),i=null;return r.each(e,(function(e){if(t(e)?i=e:e.find&&(i=e.find(t)),i)return!1})),i},e.prototype.findAll=function(t){var e=this.get("children"),i=[],n=[];return r.each(e,(function(e){t(e)&&i.push(e),e.findAllBy&&(n=e.findAllBy(t),i=i.concat(n))})),i},e.prototype.findBy=function(t){var e=this.get("children"),i=null;return r.each(e,(function(e){if(t(e)?i=e:e.findBy&&(i=e.findBy(t)),i)return!1})),i},e.prototype.findAllBy=function(t){var e=this.get("children"),i=[],n=[];return r.each(e,(function(e){t(e)&&i.push(e),e.findAllBy&&(n=e.findAllBy(t),i=i.concat(n))})),i},e.prototype.getShape=function(t,e,i){var n,r=this.attrs.clip,a=this.cfg.children;if(r){var o=[t,e,1];r.invert(o,this.get("canvas")),r.isPointInPath(o[0],o[1])&&(n=c(a,t,e))}else n=c(a,t,e);return n},e.prototype.clearTotalMatrix=function(){if(this.get("totalMatrix")){this.setSilent("totalMatrix",null);for(var t=this.cfg.children,e=0;e=0;i--)e[i].remove(!0,t);return this.cfg.children=[],this}},e.prototype.destroy=function(){this.destroyed||(this.clear(),t.prototype.destroy.call(this))},e.prototype.clone=function(){var t=this.cfg.children,i=new e;return r.each(t,(function(t){i.add(t.clone())})),i},e}(a.default);e.default=h},function(t,e,i){"use strict";e.__esModule=!0;var n=i(1),r=i(2);e.BBox=r.default;var a=i(20);e.Canvas=a.default;var o=i(9);e.Element=o.default;var s=i(10);e.Event=s.default;var u=i(18);e.Group=u.default;var l=i(7);e.PathSegment=l.default;var c=i(3);e.Shape=c.default;var h=i(13);e.PathUtil=h;var p=i(14);e.Shapes=p;var f=i(52);e.version=f.version,n.__exportStar(i(14),e),n.__exportStar(i(53),e)},function(t,e,i){"use strict";e.__esModule=!0;var n=i(1),r=i(0),a=i(21),o=i(10),s=i(39),u=i(18),l=["click","mousedown","mouseup","dblclick","contextmenu","mouseenter","mouseleave","mouseover","mouseout","mousemove","wheel"],c=null,h=null,p=null,f=function(t){function e(e){var i=t.call(this,n.__assign({eventEnable:!0,width:null,height:null,widthCanvas:null,heightCanvas:null,widthStyle:null,heightStyle:null,containerDOM:null,canvasDOM:null,pixelRatio:null,renderer:"canvas"},e))||this;return i._setGlobalParam(),i._setContainer(),i._initPainter(),i._scale(),i.get("eventEnable")&&i.registerEvent(),i}return n.__extends(e,t),e.prototype._scale=function(){if("svg"!==this.cfg.renderType){var t=this.get("pixelRatio");this.scale(t,t)}},e.prototype._setGlobalParam=function(){var t=this.get("renderer")||"canvas";"svg"===t?this.set("pixelRatio",1):this.get("pixelRatio")||this.set("pixelRatio",r.getRatio()),this.cfg.renderType=t;var e=a[t];this.cfg.renderer=e,this.cfg.canvas=this;var i=new s.default(this);this.cfg.timeline=i},e.prototype._setContainer=function(){var t=this.get("containerId"),e=this.get("containerDOM");e||(e=document.getElementById(t),this.set("containerDOM",e)),r.modifyCSS(e,{position:"relative"})},e.prototype._initPainter=function(){var t=this.get("containerDOM"),e=new this.cfg.renderer.painter(t);this.cfg.painter=e,this.cfg.canvasDOM=this.cfg.el=e.canvas,this.changeSize(this.get("width"),this.get("height"))},e.prototype._resize=function(){var t=this.get("canvasDOM"),e=this.get("widthCanvas"),i=this.get("heightCanvas"),n=this.get("widthStyle"),r=this.get("heightStyle");t.style.width=n,t.style.height=r,t.setAttribute("width",e),t.setAttribute("height",i)},e.prototype.getWidth=function(){var t=this.get("pixelRatio");return this.get("width")*t},e.prototype.getHeight=function(){var t=this.get("pixelRatio");return this.get("height")*t},e.prototype.changeSize=function(t,e){var i=this.get("pixelRatio"),n=t*i,r=e*i;this.set("widthCanvas",n),this.set("heightCanvas",r),this.set("widthStyle",t+"px"),this.set("heightStyle",e+"px"),this.set("width",t),this.set("height",e),this._resize()},e.prototype.getPointByClient=function(t,e){var i=this.get("el"),n=this.get("pixelRatio")||1,r=i.getBoundingClientRect();return{x:(t-r.left)*n,y:(e-r.top)*n}},e.prototype.getClientByPoint=function(t,e){var i=this.get("el").getBoundingClientRect(),n=this.get("pixelRatio")||1;return{clientX:t/n+i.left,clientY:e/n+i.top}},e.prototype.draw=function(){this.cfg.painter.draw(this)},e.prototype.getShape=function(e,i,n){return 3===arguments.length&&this.cfg.renderer.getShape?this.cfg.renderer.getShape.call(this,e,i,n):t.prototype.getShape.call(this,e,i)},e.prototype.getRenderer=function(){return this.cfg.renderType},e.prototype._drawSync=function(){this.cfg.painter.drawSync(this)},e.prototype.destroy=function(){var e=this.cfg,i=e.containerDOM,n=e.canvasDOM;n&&i&&i.removeChild(n),e.timeline.stop(),t.prototype.destroy.call(this)},e.prototype.registerEvent=function(){var t=this,e=this.get("el");r.each(l,(function(i){e.addEventListener(i,(function(e){t._triggerEvent(i,e)}),!1)})),e.addEventListener("touchstart",(function(e){r.isEmpty(e.targetTouches)||t._triggerEvent("touchstart",e)}),!1),e.addEventListener("touchmove",(function(e){r.isEmpty(e.targetTouches)||t._triggerEvent("touchmove",e)}),!1),e.addEventListener("touchend",(function(e){r.isEmpty(e.changedTouches)||t._triggerEvent("touchend",e)}),!1)},e.prototype._getEmitter=function(t,e){if(t){if(!r.isEmpty(t.getEvents()))return t;var i=t.get("parent");if(i&&!e.propagationStopped)return this._getEmitter(i,e)}},e.prototype._getEventObj=function(t,e,i,n){var r=new o.default(t,e,!0,!0);return r.x=i.x,r.y=i.y,r.clientX=e.clientX,r.clientY=e.clientY,r.target=n,r.currentTarget=this._getEmitter(n,r),r},e.prototype._getClientXY=function(t,e){return"touchstart"===t||"touchmove"===t?[e.targetTouches[0].clientX,e.targetTouches[0].clientY]:"touchend"===t?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[e.clientX,e.clientY]},e.prototype._triggerEvent=function(t,e){var i=this._getClientXY(t,e),n=i[0],r=i[1],a=this.getPointByClient(n,r),o=this.getShape(a.x,a.y,e),s=this.get("el");if(p&&"svg"===this.getRenderer()&&(o=this.getShape(a.x,a.y)),"mousemove"===t){if(c&&c!==o&&(this._emitEvent("mouseout",e,a,c),this._emitEvent("mouseleave",e,a,c),p&&this._emitEvent("dragleave",e,a,c),c.destroyed||c.removed||(s.style.cursor=c.attr("cursor")||"default")),p&&(this._emitEvent("drag",e,a,p),this._emitEvent("mousemove",e,a,o||this)),o)p||(h===o?(p=o,h=null,this._emitEvent("dragstart",e,a,o)):this._emitEvent("mousemove",e,a,o)),c!==o&&(this._emitEvent("mouseenter",e,a,o),this._emitEvent("mouseover",e,a,o),p&&this._emitEvent("dragenter",e,a,o));else{var u=this._getEventObj("mousemove",e,a,this);this.emit("mousemove",u)}c=o}else this._emitEvent(t,e,a,o||this),p||"mousedown"!==t||(h=o),"mouseup"===t&&(h=null,p&&(p.cfg.capture=!0,this._emitEvent("dragend",e,a,p),p=null,this._emitEvent("drop",e,a,o||this)));o&&!o.destroyed&&(s.style.cursor=o.attr("cursor")||"default")},e.prototype._emitEvent=function(t,e,i,n){var r=this._getEventObj(t,e,i,n),a=this._getEmitter(n,e);return a&&a.emit(t,r),a},e}(u.default);e.default=f},function(t,e,i){"use strict";e.__esModule=!0;var n=i(22);e.canvas=n;var r=i(25);e.svg=r},function(t,e,i){"use strict";e.__esModule=!0;var n=i(23);e.painter=n.default},function(t,e,i){"use strict";e.__esModule=!0;var n=i(0),r=i(24),a=["fillStyle","font","globalAlpha","lineCap","lineWidth","lineJoin","miterLimit","shadowBlur","shadowColor","shadowOffsetX","shadowOffsetY","strokeStyle","textAlign","textBaseline","lineDash","lineDashOffset"],o=function(){function t(t){if(!t)return null;var e=n.uniqueId("canvas_"),i=n.createDom('');return t.appendChild(i),this.type="canvas",this.canvas=i,this.context=i.getContext("2d"),this}return t.prototype.beforeDraw=function(){var t=this.canvas;this.context&&this.context.clearRect(0,0,t.width,t.height)},t.prototype.draw=function(t){var e=this;e.animateHandler?e.toDraw=!0:function i(){e.animateHandler=n.requestAnimationFrame((function(){e.animateHandler=void 0,e.toDraw&&i()})),e.beforeDraw();try{e._drawGroup(t)}catch(t){console.warn("error in draw canvas, detail as:"),console.warn(t)}finally{e.toDraw=!1}}()},t.prototype.drawSync=function(t){this.beforeDraw(),this._drawGroup(t)},t.prototype._drawGroup=function(t){if(!t.removed&&!t.destroyed&&t.cfg.visible){var e=t.cfg.children,i=null;this.setContext(t);for(var n=0;n-1){var s=i[o];"fillStyle"===o&&(s=r.parseStyle(s,t,e)),"strokeStyle"===o&&(s=r.parseStyle(s,t,e)),"lineDash"===o&&e.setLineDash?n.isArray(s)?e.setLineDash(s):n.isString(s)&&e.setLineDash(s.split(" ")):e[o]=s}},t}();e.default=o},function(t,e,i){"use strict";e.__esModule=!0;var n=i(0),r=/[MLHVQTCSAZ]([^MLHVQTCSAZ]*)/gi,a=/[^\s\,]+/gi,o=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,s=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,u=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,l=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;function c(t,e){var i=t.match(l);n.each(i,(function(t){t=t.split(":"),e.addColorStop(t[0],t[1])}))}e.parsePath=function(t){return t=t||[],n.isArray(t)?t:n.isString(t)?(t=t.match(r),n.each(t,(function(e,i){if((e=e.match(a))[0].length>1){var r=e[0].charAt(0);e.splice(1,0,e[0].substr(1)),e[0]=r}n.each(e,(function(t,i){isNaN(t)||(e[i]=+t)})),t[i]=e})),t):void 0},e.parseStyle=function(t,e,i){if(n.isString(t)){if("("===t[1]||"("===t[2]){if("l"===t[0])return function(t,e,i){var r,a,s=o.exec(t),u=n.mod(n.toRadian(parseFloat(s[1])),2*Math.PI),l=s[2],h=e.getBBox(),p=h.maxX,f=h.maxY;u>=0&&u<.5*Math.PI?(r={x:h.x,y:h.y},a={x:p,y:f}):.5*Math.PI<=u&&u');return t.appendChild(i),this.type="svg",this.canvas=i,this.context=new r.default(i),this.toDraw=!1,this}return t.prototype.draw=function(t){var e=this;e.animateHandler?e.toDraw=!0:function i(){e.animateHandler=n.requestAnimationFrame((function(){e.animateHandler=void 0,e.toDraw&&i()}));try{e._drawChildren(t)}catch(t){console.warn("error in draw canvas, detail as:"),console.warn(t)}finally{e.toDraw=!1}}()},t.prototype.drawSync=function(t){this._drawChildren(t)},t.prototype._drawGroup=function(t,e){var i=t.cfg;t.removed||t.destroyed||(i.tobeRemoved&&(n.each(i.tobeRemoved,(function(t){t.parentNode&&t.parentNode.removeChild(t)})),i.tobeRemoved=[]),this._drawShape(t,e),i.children&&i.children.length>0&&this._drawChildren(t))},t.prototype._drawChildren=function(t){var e,i=t.cfg.children;if(i)for(var n=0;ns?1:0,p=Math.abs(u-s)>Math.PI?1:0,f=i.rs,d=i.re,g=e(s,i.rs,a),v=e(u,i.rs,a);i.rs>0?(o.push("M "+c.x+","+c.y),o.push("L "+v.x+","+v.y),o.push("A "+f+","+f+",0,"+p+","+(1===h?0:1)+","+g.x+","+g.y),o.push("L "+l.x+" "+l.y)):(o.push("M "+a.x+","+a.y),o.push("L "+l.x+","+l.y)),o.push("A "+d+","+d+",0,"+p+","+h+","+c.x+","+c.y),i.rs>0?o.push("L "+v.x+","+v.y):o.push("Z"),r.el.setAttribute("d",o.join(" "))},t.prototype._updateText=function(t){var e=t.attrs,i=t.cfg.attrs,n=t.cfg.el;for(var r in this._setFont(t),e)if(e[r]!==i[r]){if("text"===r){this._setText(t,""+e[r]);continue}if("fillStyle"===r||"strokeStyle"===r){this._setColor(t,r,e[r]);continue}if("matrix"===r){this._setTransform(t);continue}s[r]&&n.setAttribute(s[r],e[r])}t.cfg.attrs=Object.assign({},t.attrs),t.cfg.hasUpdate=!1},t.prototype._setFont=function(t){var e=t.get("el"),i=t.attrs,n=i.fontSize;e.setAttribute("alignment-baseline",u[i.textBaseline]||"baseline"),e.setAttribute("text-anchor",l[i.textAlign]||"left"),n&&+n<12&&(i.matrix=[1,0,0,0,1,0,0,0,1],t.transform([["t",-i.x,-i.y],["s",+n/12,+n/12],["t",i.x,i.y]]))},t.prototype._setText=function(t,e){var i=t.cfg.el,r=t.attrs.textBaseline||"bottom";if(e)if(~e.indexOf("\n")){var a=t.attrs.x,o=e.split("\n"),s=o.length-1,u="";n.each(o,(function(t,e){0===e?"alphabetic"===r?u+=''+t+"":"top"===r?u+=''+t+"":"middle"===r?u+=''+t+"":"bottom"===r?u+=''+t+"":"hanging"===r&&(u+=''+t+""):u+=''+t+""})),i.innerHTML=u}else i.innerHTML=e;else i.innerHTML=""},t.prototype._setClip=function(t,e){var i=t.cfg.el;if(e)if(i.hasAttribute("clip-path"))e.cfg.hasUpdate&&this._updateShape(e);else{this._createDom(e),this._updateShape(e);var n=this.context.addClip(e);i.setAttribute("clip-path","url(#"+n+")")}else i.removeAttribute("clip-path")},t.prototype._setColor=function(t,e,i){var n=t.cfg.el,r=this.context;if(i)if(i=i.trim(),/^[r,R,L,l]{1}[\s]*\(/.test(i))(a=r.find("gradient",i))||(a=r.addGradient(i)),n.setAttribute(s[e],"url(#"+a+")");else if(/^[p,P]{1}[\s]*\(/.test(i)){var a;(a=r.find("pattern",i))||(a=r.addPattern(i)),n.setAttribute(s[e],"url(#"+a+")")}else n.setAttribute(s[e],i);else n.setAttribute(s[e],"none")},t.prototype._setShadow=function(t){var e=t.cfg.el,i=t.attrs,n={dx:i.shadowOffsetX,dy:i.shadowOffsetY,blur:i.shadowBlur,color:i.shadowColor};if(n.dx||n.dy||n.blur||n.color){var r=this.context.find("filter",n);r||(r=this.context.addShadow(n)),e.setAttribute("filter","url(#"+r+")")}else e.removeAttribute("filter")},t}();e.default=c},function(t,e,i){"use strict";e.__esModule=!0;var n=i(0),r=i(28),a=i(29),o=i(30),s=i(31),u=i(32),l=function(){function t(t){var e=document.createElementNS("http://www.w3.org/2000/svg","defs"),i=n.uniqueId("defs_");e.id=i,t.appendChild(e),this.children=[],this.defaultArrow={},this.el=e,this.canvas=t}return t.prototype.find=function(t,e){for(var i=this.children,n=null,r=0;r'})),i}var u=function(){function t(t){this.cfg={};var e,i,o,u,l,c,h,p=null,f=n.uniqueId("gradient_");return"l"===t.toLowerCase()[0]?function(t,e){var i,a,o=r.exec(t),u=n.mod(n.toRadian(parseFloat(o[1])),2*Math.PI),l=o[2];u>=0&&u<.5*Math.PI?(i={x:0,y:0},a={x:1,y:1}):.5*Math.PI<=u&&u';e.innerHTML=i},t}();e.default=o},function(t,e,i){"use strict";e.__esModule=!0;var n=i(0),r=function(){function t(t,e){this.cfg={};var i=document.createElementNS("http://www.w3.org/2000/svg","marker"),r=n.uniqueId("marker_");i.setAttribute("id",r);var a=document.createElementNS("http://www.w3.org/2000/svg","path");a.setAttribute("stroke","none"),a.setAttribute("fill",t.stroke||"#000"),i.appendChild(a),i.setAttribute("overflow","visible"),i.setAttribute("orient","auto-start-reverse"),this.el=i,this.child=a,this.id=r;var o=t["marker-start"===e?"startArrow":"endArrow"];return this.stroke=t.stroke||"#000",!0===o?this._setDefaultPath(e,a):this._setMarker(t.lineWidth,a),this}return t.prototype.match=function(){return!1},t.prototype._setDefaultPath=function(t,e){var i=this.el;e.setAttribute("d","M0,0 L6,3 L0,6 L3,3Z"),i.setAttribute("refX","3"),i.setAttribute("refY","3")},t.prototype._setMarker=function(t,e){var i=this.el,r=this.cfg.path,a=this.cfg.d;n.isArray(r)&&(r=r.map((function(t){return t.join(" ")})).join("")),e.setAttribute("d",r),i.appendChild(e),a&&i.setAttribute("refX",""+a/t)},t.prototype.update=function(t){var e=this.child;e.attr?e.attr("fill",t):e.setAttribute("fill",t)},t}();e.default=r},function(t,e,i){"use strict";e.__esModule=!0;var n=i(0),r=function(){function t(t){this.type="clip",this.cfg={};var e=document.createElementNS("http://www.w3.org/2000/svg","clipPath");this.el=e,this.id=n.uniqueId("clip_"),e.id=this.id;var i=t.cfg.el;return e.appendChild(i.cloneNode(!0)),this.cfg=t,this}return t.prototype.match=function(){return!1},t.prototype.remove=function(){var t=this.el;t.parentNode.removeChild(t)},t}();e.default=r},function(t,e,i){"use strict";e.__esModule=!0;var n=i(0),r=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,a=function(){function t(t){this.cfg={};var e=document.createElementNS("http://www.w3.org/2000/svg","pattern");e.setAttribute("patternUnits","userSpaceOnUse");var i=document.createElementNS("http://www.w3.org/2000/svg","image");e.appendChild(i);var a=n.uniqueId("pattern_");e.id=a,this.el=e,this.id=a,this.cfg=t;var o=r.exec(t)[2];i.setAttribute("href",o);var s=new Image;function u(){e.setAttribute("width",""+s.width),e.setAttribute("height",""+s.height)}return o.match(/^data:/i)||(s.crossOrigin="Anonymous"),s.src=o,s.complete?u():(s.onload=u,s.src=s.src),this}return t.prototype.match=function(t,e){return this.cfg===e},t}();e.default=a},function(t,e,i){"use strict";e.__esModule=!0;var n=i(1),r=i(0);function a(t){return 1===t[0]&&0===t[1]&&0===t[3]&&1===t[4]&&0===t[6]&&0===t[7]}function o(t){return 0===t[1]&&0===t[3]&&0===t[6]&&0===t[7]}function s(t,e){a(e)||(o(e)?(t[0]*=e[0],t[4]*=e[4]):r.mat3.multiply(t,t,e))}var u=function(t){function e(e){void 0===e&&(e={});var i=t.call(this,e)||this;return i.canFill=!1,i.canStroke=!1,i.attrs={},i.attrs={opacity:1,fillOpacity:1,strokeOpacity:1,matrix:[1,0,0,0,1,0,0,0,1]},i.attr(n.__assign({},i.getDefaultAttrs(),i.cfg.attrs)),i.cfg.attrs={},i}return n.__extends(e,t),e.prototype.getDefaultAttrs=function(){return{}},e.prototype.attr=function(){for(var t=[],e=0;e2*Math.PI&&(t=t/180*Math.PI),this.transform([["t",-e,-i],["r",t],["t",e,i]])},e.prototype.move=function(t,e){var i=this.get("x")||0,n=this.get("y")||0;return this.translate(t-i,e-n),this.set("x",t),this.set("y",e),this},e.prototype.transform=function(t){var e=this,i=this.attrs.matrix;return r.each(t,(function(t){switch(t[0]){case"t":e.translate(t[1],t[2]);break;case"s":e.scale(t[1],t[2]);break;case"r":e.rotate(t[1]);break;case"m":e.attr("matrix",r.mat3.multiply([],i,t[1])),e.clearTotalMatrix()}})),this},e.prototype.setTransform=function(t){return this.attr("matrix",[1,0,0,0,1,0,0,0,1]),this.transform(t)},e.prototype.getMatrix=function(){return this.attr("matrix")},e.prototype.setMatrix=function(t){return this.attr("matrix",t),this.clearTotalMatrix(),this},e.prototype.apply=function(t,e){var i;return i=e?this._getMatrixByRoot(e):this.attr("matrix"),r.vec3.transformMat3(t,t,i),this},e.prototype._getMatrixByRoot=function(t){t=t||this;for(var e=this,i=[];e!==t;)i.unshift(e),e=e.get("parent");i.unshift(e);var n=[1,0,0,0,1,0,0,0,1];return r.each(i,(function(t){r.mat3.multiply(n,t.attr("matrix"),n)})),n},e.prototype.getTotalMatrix=function(){var t=this.cfg.totalMatrix;if(!t){t=[1,0,0,0,1,0,0,0,1];var e=this.cfg.parent;e&&s(t,e.getTotalMatrix()),s(t,this.attr("matrix")),this.cfg.totalMatrix=t}return t},e.prototype.clearTotalMatrix=function(){},e.prototype.invert=function(t){var e=this.getTotalMatrix();if(o(e))t[0]/=e[0],t[1]/=e[4];else{var i=r.mat3.invert([],e);i&&r.vec3.transformMat3(t,t,i)}return this},e.prototype.resetTransform=function(t){var e=this.attr("matrix");a(e)||t.transform(e[0],e[1],e[3],e[4],e[6],e[7])},e}(i(34).default);e.default=u},function(t,e,i){"use strict";e.__esModule=!0;var n=i(1),r=i(35),a=i(0),o=i(10),s=["click","mousedown","mouseup","dblclick","contextmenu","mouseover","mouseout","mousemove","wheel","touchstart","touchend","touchmove","dragstart","drag","dragend","dragenter","dragleave","drop"],u=function(t){function e(e){void 0===e&&(e={});var i=t.call(this)||this;return i.destroyed=!1,i.removed=!1,i.cfg=n.__assign({canvas:null,capture:!0,context:null,parent:null,visible:!0,zIndex:0},e,i.getDefaultCfg()),i}return n.__extends(e,t),e.prototype.emit=function(e,i){for(var n=[],r=2;r=0){var a=this.cfg.parent;!a||a.removed||a.destroyed||a.emit.apply(a,[e,i].concat(n))}},e.prototype.set=function(t,e){return"zIndex"===t&&this._beforeSetZIndex&&this._beforeSetZIndex(e),"loading"===t&&this._beforeSetLoading&&this._beforeSetLoading(e),this.cfg[t]=e,this},e.prototype.setSilent=function(t,e){this.cfg[t]=e},e.prototype.get=function(t){return this.cfg[t]},e.prototype.show=function(){return this.cfg.visible=!0,this},e.prototype.hide=function(){return this.cfg.visible=!1,this},e.prototype.remove=function(t,e){var i=this.cfg,n=i.parent,r=i.el;return n&&!n.destroyed&&a.pull(n.get("children"),this),r&&(e?n&&n.cfg.tobeRemoved.push(r):r.parentNode.removeChild(r)),(t||void 0===t)&&this.destroy(),this},e.prototype.destroy=function(){this.destroyed||(this.off(),this.cfg={},this.destroyed=!0)},e.prototype.getParent=function(){return this.cfg.parent},e.prototype.getDefaultCfg=function(){return{}},e.prototype.toFront=function(){var t=this.cfg,e=t.parent;if(e){var i=e.cfg.children,n=t.el,r=i.indexOf(this);i.splice(r,1),i.push(this),n&&(n.parentNode.removeChild(n),t.el=null)}},e.prototype.toBack=function(){var t=this.cfg,e=t.parent;if(e){var i=e.cfg.children,n=t.el,r=i.indexOf(this);if(i.splice(r,1),i.unshift(this),n){var a=n.parentNode;a.removeChild(n),a.insertBefore(n,a.firstChild)}}},e.prototype._beforeSetZIndex=function(t){var e=this.cfg.parent;this.cfg.zIndex=t,a.isNil(e)||e.sort();var i=this.cfg.el;if(i){var n=e.cfg.children,r=n.indexOf(this),o=i.parentNode;o.removeChild(i),r===n.length-1?o.appendChild(i):o.insertBefore(i,o.childNodes[r])}return t},e.prototype._beforeSetLoading=function(t){},e.prototype.setZIndex=function(t){return this.cfg.zIndex=t,this._beforeSetZIndex(t)},e.prototype.clone=function(){return a.clone(this)},e.prototype.getBBox=function(){},e}(r.default);e.default=u},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){this._events={}}return t.prototype.on=function(t,e,i){return this._events[t]||(this._events[t]=[]),this._events[t].push({callback:e,once:!!i}),this},t.prototype.once=function(t,e){return this.on(t,e,!0),this},t.prototype.emit=function(t){for(var e=[],i=1;if.length?(p=s.parsePathString(a[h]),f=s.parsePathString(u[h]),f=s.fillPathByDiff(f,p),f=s.formatPath(f,p),e.fromAttrs.path=f,e.toAttrs.path=p):e.pathFormatted||(p=s.parsePathString(a[h]),f=s.parsePathString(u[h]),f=s.formatPath(f,p),e.fromAttrs.path=f,e.toAttrs.path=p,e.pathFormatted=!0),r[h]=[];for(var d=0;d0){for(var o=n.animators.length-1;o>=0;o--)if((t=n.animators[o]).destroyed)a.removeAnimator(o);else{if(!t.get("pause").isPaused)for(var s=(e=t.get("animators")).length-1;s>=0;s--)i=e[s],u(t,i,r)&&(e.splice(s,1),i.callback&&i.callback());0===e.length&&a.removeAnimator(o)}n.canvas.draw()}}))},t.prototype.addAnimator=function(t){this.animators.push(t)},t.prototype.removeAnimator=function(t){this.animators.splice(t,1)},t.prototype.isAnimating=function(){return!!this.animators.length},t.prototype.stop=function(){this.timer&&this.timer.stop()},t.prototype.stopAllAnimations=function(){this.animators.forEach((function(t){t.stopAnimate()})),this.animators=[],this.canvas.draw()},t.prototype.getTime=function(){return this.current},t}();e.default=l},function(t,e,i){"use strict";e.__esModule=!0;var n=i(1),r=i(3),a=i(6),o=i(8),s=i(4),u=i(2);function l(t,e,i){return t+e*Math.cos(i)}function c(t,e,i){return t+e*Math.sin(i)}var h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.canStroke=!0,e.type="arc",e}return n.__extends(e,t),e.prototype.getDefaultAttrs=function(){return{x:0,y:0,r:0,startAngle:0,endAngle:0,clockwise:!1,lineWidth:1,startArrow:!1,endArrow:!1}},e.prototype.isPointInPath=function(t,e){var i=this.attrs,n=i.x,r=i.y,a=i.r,o=i.startAngle,u=i.endAngle,l=i.clockwise,c=this.getHitLineWidth();return!!this.hasStroke()&&s.arcline(n,r,a,o,u,l,c,t,e)},e.prototype.calculateBox=function(){var t=this.attrs,e=t.x,i=t.y,n=t.r,r=t.startAngle,o=t.endAngle,s=t.clockwise,l=this.getHitLineWidth(),c=l/2,h=a.box(e,i,n,r,o,s);return new u.default(h.x-c,h.y-c,h.width+l,h.height+l)},e.prototype.getStartTangent=function(){var t=this.attrs,e=t.x,i=t.y,n=t.startAngle,r=t.r,a=t.clockwise,o=Math.PI/180;a&&(o*=-1);var s=[],u=l(e,r,n+o),h=c(i,r,n+o),p=l(e,r,n),f=c(i,r,n);return s.push([u,h]),s.push([p,f]),s},e.prototype.getEndTangent=function(){var t=this.attrs,e=t.x,i=t.y,n=t.endAngle,r=t.r,a=t.clockwise,o=Math.PI/180,s=[];a&&(o*=-1);var u=l(e,r,n+o),h=c(i,r,n+o),p=l(e,r,n),f=c(i,r,n);return s.push([p,f]),s.push([u,h]),s},e.prototype.createPath=function(t){var e=this.attrs,i=e.x,n=e.y,r=e.r,a=e.startAngle,o=e.endAngle,s=e.clockwise;(t=t||this.get("context")).beginPath(),t.arc(i,n,r,a,o,s)},e.prototype.afterPath=function(t){var e=this.attrs;if(t=t||this.get("context"),e.startArrow){var i=this.getStartTangent();o.addStartArrow(t,e,i[0][0],i[0][1],i[1][0],i[1][1])}if(e.endArrow){var n=this.getEndTangent();o.addEndArrow(t,e,n[0][0],n[0][1],n[1][0],n[1][1])}},e}(r.default);e.default=h},function(t,e,i){"use strict";e.__esModule=!0;var n=i(1),r=i(3),a=i(4),o=i(2),s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.canFill=!0,e.canStroke=!0,e.type="circle",e}return n.__extends(e,t),e.prototype.getDefaultAttrs=function(){return{x:0,y:0,r:0,lineWidth:1}},e.prototype.isPointInPath=function(t,e){var i=this.attrs,n=i.x,r=i.y,o=i.r,s=this.getHitLineWidth(),u=this.hasFill(),l=this.hasStroke();return u&&l?a.circle(n,r,o,t,e)||a.arcline(n,r,o,0,2*Math.PI,!1,s,t,e):u?a.circle(n,r,o,t,e):!!l&&a.arcline(n,r,o,0,2*Math.PI,!1,s,t,e)},e.prototype.calculateBox=function(){var t=this.attrs,e=t.x,i=t.y,n=t.r,r=this.getHitLineWidth()/2+n;return o.default.fromRange(e-r,i-r,e+r,i+r)},e.prototype.createPath=function(t){var e=this.attrs,i=e.x,n=e.y,r=e.r;t.beginPath(),t.arc(i,n,r,0,2*Math.PI,!1),t.closePath()},e}(r.default);e.default=s},function(t,e,i){"use strict";e.__esModule=!0;var n=i(1),r=i(3),a=i(4),o=i(2),s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.canFill=!0,e.canStroke=!0,e.type="dom",e}return n.__extends(e,t),e.prototype.isPointInPath=function(t,e){if(!this.cfg.el)return!1;var i=this.cfg.el.getBBox();return a.box(i.x,i.x+i.width,i.y,i.y+i.height,t,e)},e.prototype.calculateBox=function(){var t=this.attrs,e=t.x,i=t.y,n=t.width,r=t.height,a=this.getHitLineWidth()/2;return new o.default(e-a,i-a,n,r)},e}(r.default);e.default=s},function(t,e,i){"use strict";e.__esModule=!0;var n=i(1),r=i(0),a=i(3),o=i(4),s=i(2),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.canFill=!0,e.canStroke=!0,e.type="ellipse",e}return n.__extends(e,t),e.prototype.getDefaultAttrs=function(){return{x:0,y:0,rx:1,ry:1,lineWidth:1}},e.prototype.isPointInPath=function(t,e){var i=this.attrs,n=this.hasFill(),a=this.hasStroke(),s=i.x,u=i.y,l=i.rx,c=i.ry,h=this.getHitLineWidth(),p=l>c?l:c,f=l>c?1:l/c,d=l>c?c/l:1,g=[t,e,1],v=[1,0,0,0,1,0,0,0,1];r.mat3.scale(v,v,[f,d]),r.mat3.translate(v,v,[s,u]);var y=r.mat3.invert([],v);return r.vec3.transformMat3(g,g,y),n&&a?o.circle(0,0,p,g[0],g[1])||o.arcline(0,0,p,0,2*Math.PI,!1,h,g[0],g[1]):n?o.circle(0,0,p,g[0],g[1]):!!a&&o.arcline(0,0,p,0,2*Math.PI,!1,h,g[0],g[1])},e.prototype.calculateBox=function(){var t=this.attrs,e=t.x,i=t.y,n=t.rx,r=t.ry,a=this.getHitLineWidth(),o=n+a/2,u=r+a/2;return s.default.fromRange(e-o,i-u,e+o,i+u)},e.prototype.createPath=function(t){var e=this.attrs,i=e.x,n=e.y,a=e.rx,o=e.ry;t=t||this.get("context");var s=a>o?a:o,u=a>o?1:a/o,l=a>o?o/a:1,c=[1,0,0,0,1,0,0,0,1];r.mat3.scale(c,c,[u,l]),r.mat3.translate(c,c,[i,n]),t.beginPath(),t.save(),t.transform(c[0],c[1],c[3],c[4],c[6],c[7]),t.arc(0,0,s,0,2*Math.PI),t.restore(),t.closePath()},e}(a.default);e.default=u},function(t,e,i){"use strict";e.__esModule=!0;var n=i(1),r=i(0),a=i(6),o=i(3),s=i(4),u=i(2),l=i(6),c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.canFill=!0,e.canStroke=!0,e.type="fan",e}return n.__extends(e,t),e.prototype.getDefaultAttrs=function(){return{x:0,y:0,rs:0,re:0,startAngle:0,endAngle:0,clockwise:!1,lineWidth:1}},e.prototype.isPointInPath=function(t,e){var i=this,n=i.hasFill(),o=i.hasStroke(),u=i.attrs,l=u.x,c=u.y,h=u.rs,p=u.re,f=u.startAngle,d=u.endAngle,g=u.clockwise,v=[t-l,e-c],y=r.vec2.angleTo([1,0],v);function m(){var t=a.nearAngle(y,f,d,g);if(r.isNumberEqual(y,t)){var e=r.vec2.squaredLength(v);if(h*h<=e&&e<=p*p)return!0}return!1}function x(){var n=i.getHitLineWidth(),r={x:Math.cos(f)*h+l,y:Math.sin(f)*h+c},a={x:Math.cos(f)*p+l,y:Math.sin(f)*p+c},o={x:Math.cos(d)*h+l,y:Math.sin(d)*h+c},u={x:Math.cos(d)*p+l,y:Math.sin(d)*p+c};return!!(s.line(r.x,r.y,a.x,a.y,n,t,e)||s.line(o.x,o.y,u.x,u.y,n,t,e)||s.arcline(l,c,h,f,d,g,n,t,e)||s.arcline(l,c,p,f,d,g,n,t,e))}return n&&o?m()||x():n?m():!!o&&x()},e.prototype.calculateBox=function(){var t=this.attrs,e=t.x,i=t.y,n=t.rs,r=t.re,a=t.startAngle,o=t.endAngle,s=t.clockwise,c=this.getHitLineWidth(),h=l.box(e,i,n,a,o,s),p=l.box(e,i,r,a,o,s),f=Math.min(h.minX,p.minX),d=Math.min(h.minY,p.minY),g=Math.max(h.maxX,p.maxX),v=Math.max(h.maxY,p.maxY),y=c/2;return u.default.fromRange(f-y,d-y,g+y,v+y)},e.prototype.createPath=function(t){var e=this.attrs,i=e.x,n=e.y,r=e.rs,a=e.re,o=e.startAngle,s=e.endAngle,u=e.clockwise,l={x:Math.cos(o)*r+i,y:Math.sin(o)*r+n},c={x:Math.cos(o)*a+i,y:Math.sin(o)*a+n},h={x:Math.cos(s)*r+i,y:Math.sin(s)*r+n};(t=t||this.get("context")).beginPath(),t.moveTo(l.x,l.y),t.lineTo(c.x,c.y),t.arc(i,n,a,o,s,u),t.lineTo(h.x,h.y),t.arc(i,n,r,s,o,!u),t.closePath()},e}(o.default);e.default=c},function(t,e,i){"use strict";e.__esModule=!0;var n=i(1),r=i(0),a=i(3),o=i(4),s=i(2),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="image",e}return n.__extends(e,t),e.prototype.getDefaultAttrs=function(){return{x:0,y:0,img:null,width:0,height:0,sx:null,sy:null,swidth:null,sheight:null}},e.prototype.isPointInPath=function(t,e){var i=this.attrs;if(this.get("toDraw")||!i.img)return!1;this.cfg.attrs&&this.cfg.attrs.img===i.img||this._setAttrImg();var n=i.x,r=i.y,a=i.width,s=i.height;return o.rect(n,r,a,s,t,e)},e.prototype.isHitBox=function(){return!1},e.prototype.calculateBox=function(){var t=this.attrs;return this.cfg.attrs&&this.cfg.attrs.img===t.img||this._setAttrImg(),new s.default(t.x,t.y,t.width,t.height)},e.prototype._beforeSetLoading=function(t){var e=this.get("canvas");return!1===t&&!0===this.get("toDraw")&&(this.cfg.loading=!1,e.draw()),t},e.prototype._setAttrImg=function(){var t=this,e=t.attrs,i=e.img;if(!r.isString(i))return i instanceof Image?(e.width||t.attr("width",i.width),e.height||t.attr("height",i.height),i):i instanceof HTMLElement&&r.isString(i.nodeName)&&"CANVAS"===i.nodeName.toUpperCase()?(e.width||t.attr("width",Number(i.getAttribute("width"))),e.height||t.attr("height",Number(i.getAttribute("height"))),i):i instanceof ImageData?(e.width||t.attr("width",i.width),e.height||t.attr("height",i.height),i):null;var n=new Image;n.onload=function(){if(t.get("destroyed"))return!1;t.attr("imgSrc",i),t.attr("img",n);var e=t.get("callback");e&&e.call(t),t.set("loading",!1)},n.src=i,n.crossOrigin="Anonymous",t.set("loading",!0)},e.prototype.drawInner=function(t){this.cfg.hasUpdate&&this._setAttrImg(),this.get("loading")?this.set("toDraw",!0):(this._drawImage(t),this.cfg.hasUpdate=!1)},e.prototype._drawImage=function(t){var e=this.attrs,i=e.x,n=e.y,a=e.img,o=e.width,s=e.height,u=e.sx,l=e.sy,c=e.swidth,h=e.sheight;this.set("toDraw",!1);var p=a;if(p instanceof ImageData&&((p=new Image).src=a),p instanceof Image||p instanceof HTMLImageElement&&r.isString(p.nodeName)&&"CANVAS"===p.nodeName.toUpperCase()){if(r.isNil(u)||r.isNil(l)||r.isNil(c)||r.isNil(h))return void t.drawImage(p,i,n,o,s);if(!(r.isNil(u)||r.isNil(l)||r.isNil(c)||r.isNil(h)))return void t.drawImage(p,u,l,c,h,i,n,o,s)}},e}(a.default);e.default=u},function(t,e,i){"use strict";e.__esModule=!0;var n=i(1),r=i(3),a=i(8),o=i(11),s=i(4),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.canStroke=!0,e.type="line",e}return n.__extends(e,t),e.prototype.getDefaultAttrs=function(){return{x1:0,y1:0,x2:0,y2:0,lineWidth:1,startArrow:!1,endArrow:!1}},e.prototype.isPointInPath=function(t,e){var i=this.attrs,n=i.x1,r=i.y1,a=i.x2,o=i.y2,u=this.getHitLineWidth();return!!this.hasStroke()&&s.line(n,r,a,o,u,t,e)},e.prototype.calculateBox=function(){var t=this.attrs,e=t.x1,i=t.y1,n=t.x2,r=t.y2,a=this.getHitLineWidth();return o.box(e,i,n,r,a)},e.prototype.createPath=function(t){var e=this.attrs,i=e.x1,n=e.y1,r=e.x2,a=e.y2;(t=t||this.get("context")).beginPath(),t.moveTo(i,n),t.lineTo(r,a)},e.prototype.afterPath=function(t){var e=this.attrs,i=e.x1,n=e.y1,r=e.x2,o=e.y2;t=t||this.get("context"),e.startArrow&&a.addStartArrow(t,e,r,o,i,n),e.endArrow&&a.addEndArrow(t,e,i,n,r,o)},e.prototype.getPoint=function(t){var e=this.attrs;return{x:o.at(e.x1,e.x2,t),y:o.at(e.y1,e.y2,t)}},e}(r.default);e.default=u},function(t,e,i){"use strict";e.__esModule=!0;var n=i(1),r=i(0),a=i(3),o=i(7),s=i(5),u=i(8),l=i(13),c=i(12),h=i(15),p=i(2),f=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.canFill=!0,e.canStroke=!0,e.type="path",e}return n.__extends(e,t),e.prototype.getDefaultAttrs=function(){return{path:null,lineWidth:1,startArrow:!1,endArrow:!1}},e.prototype.isPointInPath=function(t,e){var i=this,n=i.get("segments"),a=i.hasFill(),o=i.hasStroke();function s(){if(!r.isEmpty(n)){for(var a=i.getHitLineWidth(),o=0,s=n.length;on&&(n=s),r.yo&&(o=u)}})),i===1/0||a===1/0?new p.default(0,0,0,0):new p.default(i,a,n-i,o-a)},e.prototype._setTcache=function(){var t,e,i,n,a=0,o=0,s=[],u=this.cfg.curve;u&&(r.each(u,(function(t,e){i=u[e+1],n=t.length,i&&(a+=c.len(t[n-2],t[n-1],i[1],i[2],i[3],i[4],i[5],i[6]))})),r.each(u,(function(r,l){i=u[l+1],n=r.length,i&&((t=[])[0]=o/a,e=c.len(r[n-2],r[n-1],i[1],i[2],i[3],i[4],i[5],i[6]),o+=e,t[1]=o/a,s.push(t))})),this.cfg.tCache=s)},e.prototype._calculateCurve=function(){var t=this.attrs.path;this.cfg.curve=l.pathTocurve(t)},e.prototype.getStartTangent=function(){var t,e,i,n,a=this.get("segments");if(a.length>1)if(t=a[0].endPoint,e=a[1].endPoint,i=a[1].startTangent,n=[],r.isFunction(i)){var o=i();n.push([t.x-o[0],t.y-o[1]]),n.push([t.x,t.y])}else n.push([e.x,e.y]),n.push([t.x,t.y]);return n},e.prototype.getEndTangent=function(){var t,e,i,n,a=this.get("segments"),o=a.length;if(o>1)if(t=a[o-2].endPoint,e=a[o-1].endPoint,i=a[o-1].endTangent,n=[],r.isFunction(i)){var s=i();n.push([e.x-s[0],e.y-s[1]]),n.push([e.x,e.y])}else n.push([t.x,t.y]),n.push([e.x,e.y]);return n},e.prototype.getPoint=function(t){var e,i,n=this.cfg.tCache;n||(this._calculateCurve(),this._setTcache(),n=this.cfg.tCache);var a=this.cfg.curve;if(!n)return a?{x:a[0][1],y:a[0][2]}:null;r.each(n,(function(n,r){t>=n[0]&&t<=n[1]&&(e=(t-n[0])/(n[1]-n[0]),i=r)}));var o=a[i];if(r.isNil(o)||r.isNil(i))return null;var s=o.length,u=a[i+1];return{x:c.at(o[s-2],u[1],u[3],u[5],1-e),y:c.at(o[s-1],u[2],u[4],u[6],1-e)}},e.prototype.createPath=function(t){var e=this.get("segments");if(r.isArray(e)){(t=t||this.get("context")).beginPath();for(var i=e.length,n=0;n=3&&a.push(n[0]),o.polyline(a,r,t,e)}return n&&r?s.default(t,e,i)||a():n?s.default(t,e,i):!!r&&a()},e.prototype.calculateBox=function(){var t=this.attrs.points,e=this.getHitLineWidth();if(!t||0===t.length)return null;var i=1/0,n=1/0,a=-1/0,o=-1/0;r.each(t,(function(t){var e=t[0],r=t[1];ea&&(a=e),ro&&(o=r)}));var s=e/2;return u.default.fromRange(i-s,n-s,a+s,o+s)},e.prototype.createPath=function(t){var e=this.attrs.points;e.length<2||((t=t||this.get("context")).beginPath(),r.each(e,(function(e,i){0===i?t.moveTo(e[0],e[1]):t.lineTo(e[0],e[1])})),t.closePath())},e}(a.default);e.default=l},function(t,e,i){"use strict";e.__esModule=!0;var n=i(1),r=i(0),a=i(3),o=i(8),s=i(11),u=i(4),l=i(2),c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.canStroke=!0,e.type="polyline",e.tCache=null,e}return n.__extends(e,t),e.prototype.getDefaultAttrs=function(){return{points:null,lineWidth:1,startArrow:!1,endArrow:!1,tCache:null}},e.prototype.isPointInPath=function(t,e){var i=this.attrs;if(this.hasStroke()){var n=i.points;if(n.length<2)return!1;var r=i.lineWidth;return u.polyline(n,r,t,e)}return!1},e.prototype.calculateBox=function(){var t=this.attrs,e=this.getHitLineWidth(),i=t.points;if(!i||0===i.length)return null;var n=1/0,a=1/0,o=-1/0,s=-1/0;r.each(i,(function(t){var e=t[0],i=t[1];eo&&(o=e),is&&(s=i)}));var u=e/2;return l.default.fromRange(n-u,a-u,o+u,s+u)},e.prototype._setTcache=function(){var t,e,i=this.attrs.points,n=0,a=0,o=[];i&&0!==i.length&&(r.each(i,(function(t,e){i[e+1]&&(n+=s.len(t[0],t[1],i[e+1][0],i[e+1][1]))})),n<=0||(r.each(i,(function(r,u){i[u+1]&&((t=[])[0]=a/n,e=s.len(r[0],r[1],i[u+1][0],i[u+1][1]),a+=e,t[1]=a/n,o.push(t))})),this.tCache=o))},e.prototype.createPath=function(t){var e,i,n=this.attrs.points;if(!(n.length<2)){for((t=t||this.get("context")).beginPath(),t.moveTo(n[0][0],n[0][1]),i=1,e=n.length-1;i=n[0]&&t<=n[1]&&(e=(t-n[0])/(n[1]-n[0]),i=r)})),{x:s.at(n[i][0],n[i+1][0],e),y:s.at(n[i][1],n[i+1][1],e)}},e}(a.default);e.default=c},function(t,e,i){"use strict";e.__esModule=!0;var n=i(1),r=i(3),a=i(5),o=i(4),s=i(15),u=i(2),l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.canFill=!0,e.canStroke=!0,e.type="rect",e}return n.__extends(e,t),e.prototype.getDefaultAttrs=function(){return{x:0,y:0,width:0,height:0,radius:0,lineWidth:1}},e.prototype.isPointInPath=function(t,e){var i=this,n=i.hasFill(),r=i.hasStroke();function a(){var n=i.attrs,r=n.x,a=n.y,s=n.width,u=n.height,l=n.radius,c=i.getHitLineWidth();if(0===l){var h=c/2;return o.line(r-h,a,r+s+h,a,c,t,e)||o.line(r+s,a-h,r+s,a+u+h,c,t,e)||o.line(r+s+h,a+u,r-h,a+u,c,t,e)||o.line(r,a+u+h,r,a-h,c,t,e)}return o.line(r+l,a,r+s-l,a,c,t,e)||o.line(r+s,a+l,r+s,a+u-l,c,t,e)||o.line(r+s-l,a+u,r+l,a+u,c,t,e)||o.line(r,a+u-l,r,a+l,c,t,e)||o.arcline(r+s-l,a+l,l,1.5*Math.PI,2*Math.PI,!1,c,t,e)||o.arcline(r+s-l,a+u-l,l,0,.5*Math.PI,!1,c,t,e)||o.arcline(r+l,a+u-l,l,.5*Math.PI,Math.PI,!1,c,t,e)||o.arcline(r+l,a+l,l,Math.PI,1.5*Math.PI,!1,c,t,e)}return n&&r?s.default(t,e,i)||a():n?s.default(t,e,i):!!r&&a()},e.prototype.calculateBox=function(){var t=this.attrs,e=t.x,i=t.y,n=t.width,r=t.height,a=this.getHitLineWidth()/2;return u.default.fromRange(e-a,i-a,e+n+a,i+r+a)},e.prototype.createPath=function(t){var e=this.attrs,i=e.x,n=e.y,r=e.width,o=e.height,s=e.radius;if((t=t||this.get("context")).beginPath(),0===s)t.rect(i,n,r,o);else{var u=a.parseRadius(s);t.moveTo(i+u.r1,n),t.lineTo(i+r-u.r2,n),0!==u.r2&&t.arc(i+r-u.r2,n+u.r2,u.r2,-Math.PI/2,0),t.lineTo(i+r,n+o-u.r3),0!==u.r3&&t.arc(i+r-u.r3,n+o-u.r3,u.r3,0,Math.PI/2),t.lineTo(i+u.r4,n+o),0!==u.r4&&t.arc(i+u.r4,n+o-u.r4,u.r4,Math.PI/2,Math.PI),t.lineTo(i,n+u.r1),0!==u.r1&&t.arc(i+u.r1,n+u.r1,u.r1,Math.PI,1.5*Math.PI),t.closePath()}},e}(r.default);e.default=l},function(t,e,i){"use strict";e.__esModule=!0;var n=i(1),r=i(0),a=i(3),o=i(4),s=i(2),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.canFill=!0,e.canStroke=!0,e.type="text",e}return n.__extends(e,t),e.prototype.getDefaultAttrs=function(){return{x:0,y:0,text:null,lineHeight:1,lineWidth:1,lineCount:1,fontSize:12,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",textAlign:"start",textBaseline:"bottom",textArr:null}},e.prototype.isPointInPath=function(t,e){var i=this.getBBox();if(this.hasFill()||this.hasStroke())return o.box(i.x,i.maxX,i.minY,i.maxY,t,e)},e.prototype.initTransform=function(){var t=this.attrs.fontSize;t&&+t<12&&this.transform([["t",-1*this.attrs.x,-1*this.attrs.y],["s",+t/12,+t/12],["t",this.attrs.x,this.attrs.y]])},e.prototype._assembleFont=function(){var t=this.attrs,e=t.fontSize,i=t.fontFamily,n=t.fontWeight,r=t.fontStyle,a=t.fontVariant;t.font=[r,a,n,e+"px",i].join(" ")},e.prototype._setAttrText=function(){var t=this.attrs,e=t.text,i=null;if(r.isString(e)&&-1!==e.indexOf("\n")){var n=(i=e.split("\n")).length;t.lineCount=n}t.textArr=i},e.prototype._getTextHeight=function(){var t=this.attrs,e=t.lineCount,i=1*t.fontSize;return e>1?i*e+this._getSpaceingY()*(e-1):i},e.prototype.isHitBox=function(){return!1},e.prototype.calculateBox=function(){var t=this.attrs,e=this.cfg;e.attrs&&!e.hasUpdate||(this._assembleFont(),this._setAttrText()),t.textArr||this._setAttrText();var i=t.x,n=t.y,r=this.measureText();if(!r)return new s.default(i,n,0,0);var a=this._getTextHeight(),o=t.textAlign,u=t.textBaseline,l=this.getHitLineWidth(),c={x:i,y:n-a};o&&("end"===o||"right"===o?c.x-=r:"center"===o&&(c.x-=r/2)),u&&("top"===u?c.y+=a:"middle"===u&&(c.y+=a/2)),this.set("startPoint",c);var h=l/2;return s.default.fromRange(c.x-h,c.y-h,c.x+r+h,c.y+a+h)},e.prototype._getSpaceingY=function(){var t=this.attrs,e=t.lineHeight,i=1*t.fontSize;return e?e-i:.14*i},e.prototype.drawInner=function(t){var e=this.attrs,i=this.cfg;i.attrs&&!i.hasUpdate||(this._assembleFont(),this._setAttrText()),t.font=e.font;var n=e.text;if(!r.isNil(n)){var a=e.textArr,o=e.x,s=e.y;if(t.beginPath(),this.hasStroke()){var u=e.strokeOpacity;r.isNil(u)||1===u||(t.globalAlpha=u),a?this._drawTextArr(t,!1):t.strokeText(n,o,s),t.globalAlpha=1}if(this.hasFill()){var l=e.fillOpacity;r.isNil(l)||1===l||(t.globalAlpha=l),a?this._drawTextArr(t,!0):t.fillText(n,o,s)}i.hasUpdate=!1}},e.prototype._drawTextArr=function(t,e){var i,n=this.attrs.textArr,a=this.attrs.textBaseline,o=1*this.attrs.fontSize,s=this._getSpaceingY(),u=this.attrs.x,l=this.attrs.y,c=this.getBBox(),h=c.maxY-c.minY;r.each(n,(function(n,r){i=l+r*(s+o)-h+o,"middle"===a&&(i+=h-o-(h-o)/2),"top"===a&&(i+=h-o),e?t.fillText(n,u,i):t.strokeText(n,u,i)}))},e.prototype.measureText=function(){var t,e=this.attrs,i=e.text,n=e.font,a=e.textArr,o=0;if(!r.isNil(i)){var s=document.createElement("canvas").getContext("2d");return s.save(),s.font=n,a?r.each(a,(function(e){t=s.measureText(e).width,o>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):(e=c.exec(t))?b(parseInt(e[1],16)):(e=h.exec(t))?new k(e[1],e[2],e[3],1):(e=p.exec(t))?new k(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=f.exec(t))?M(e[1],e[2],e[3],e[4]):(e=d.exec(t))?M(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=g.exec(t))?A(e[1],e[2]/100,e[3]/100,1):(e=v.exec(t))?A(e[1],e[2]/100,e[3]/100,e[4]):y.hasOwnProperty(t)?b(y[t]):"transparent"===t?new k(NaN,NaN,NaN,0):null}function b(t){return new k(t>>16&255,t>>8&255,255&t,1)}function M(t,e,i,n){return n<=0&&(t=e=i=NaN),new k(t,e,i,n)}function S(t){return t instanceof a||(t=_(t)),t?new k((t=t.rgb()).r,t.g,t.b,t.opacity):new k}function w(t,e,i,n){return 1===arguments.length?S(t):new k(t,e,i,null==n?1:n)}function k(t,e,i,n){this.r=+t,this.g=+e,this.b=+i,this.opacity=+n}function C(){return"#"+O(this.r)+O(this.g)+O(this.b)}function P(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function O(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function A(t,e,i,n){return n<=0?t=e=i=NaN:i<=0||i>=1?t=e=NaN:e<=0&&(t=NaN),new I(t,e,i,n)}function L(t){if(t instanceof I)return new I(t.h,t.s,t.l,t.opacity);if(t instanceof a||(t=_(t)),!t)return new I;if(t instanceof I)return t;var e=(t=t.rgb()).r/255,i=t.g/255,n=t.b/255,r=Math.min(e,i,n),o=Math.max(e,i,n),s=NaN,u=o-r,l=(o+r)/2;return u?(s=e===o?(i-n)/u+6*(i0&&l<1?0:s,new I(s,u,l,t.opacity)}function T(t,e,i,n){return 1===arguments.length?L(t):new I(t,e,i,null==n?1:n)}function I(t,e,i,n){this.h=+t,this.s=+e,this.l=+i,this.opacity=+n}function D(t,e,i){return 255*(t<60?e+(i-e)*t/60:t<180?i:t<240?e+(i-e)*(240-t)/60:e)}n(a,_,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:m,formatHex:m,formatHsl:function(){return L(this).formatHsl()},formatRgb:x,toString:x}),n(k,w,r(a,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new k(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new k(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:C,formatHex:C,formatRgb:P,toString:P})),n(I,T,r(a,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new I(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new I(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,i=this.l,n=i+(i<.5?i:1-i)*e,r=2*i-n;return new k(D(t>=240?t-240:t+120,r,n),D(t,r,n),D(t<120?t+240:t-120,r,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var j=Math.PI/180,E=180/Math.PI,B=.96422,F=1,R=.82521,N=4/29,z=6/29,H=3*z*z,G=z*z*z;function Y(t){if(t instanceof V)return new V(t.l,t.a,t.b,t.opacity);if(t instanceof $)return K(t);t instanceof k||(t=S(t));var e,i,n=Z(t.r),r=Z(t.g),a=Z(t.b),o=q((.2225045*n+.7168786*r+.0606169*a)/F);return n===r&&r===a?e=i=o:(e=q((.4360747*n+.3850649*r+.1430804*a)/B),i=q((.0139322*n+.0971045*r+.7141733*a)/R)),new V(116*o-16,500*(e-o),200*(o-i),t.opacity)}function W(t,e,i,n){return 1===arguments.length?Y(t):new V(t,e,i,null==n?1:n)}function V(t,e,i,n){this.l=+t,this.a=+e,this.b=+i,this.opacity=+n}function q(t){return t>G?Math.pow(t,1/3):t/H+N}function X(t){return t>z?t*t*t:H*(t-N)}function U(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Z(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Q(t,e,i,n){return 1===arguments.length?function(t){if(t instanceof $)return new $(t.h,t.c,t.l,t.opacity);if(t instanceof V||(t=Y(t)),0===t.a&&0===t.b)return new $(NaN,0=1?(i=1,e-1):Math.floor(i*e),r=t[n],a=t[n+1],o=n>0?t[n-1]:2*r-a,s=n180||i<-180?i-360*Math.round(i/360):i):ht(isNaN(t)?e:t)}function dt(t,e){var i=e-t;return i?pt(t,i):ht(isNaN(t)?e:t)}var gt=function t(e){var i=function(t){return 1==(t=+t)?dt:function(e,i){return i-e?function(t,e,i){return t=Math.pow(t,i),e=Math.pow(e,i)-t,i=1/i,function(n){return Math.pow(t+n*e,i)}}(e,i,t):ht(isNaN(e)?i:e)}}(e);function n(t,e){var n=i((t=w(t)).r,(e=w(e)).r),r=i(t.g,e.g),a=i(t.b,e.b),o=dt(t.opacity,e.opacity);return function(e){return t.r=n(e),t.g=r(e),t.b=a(e),t.opacity=o(e),t+""}}return n.gamma=t,n}(1);function vt(t){return function(e){var i,n,r=e.length,a=new Array(r),o=new Array(r),s=new Array(r);for(i=0;ia&&(r=e.slice(a,r),s[o]?s[o]+=r:s[++o]=r),(i=i[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,u.push({i:o,x:kt(i,n)})),a=Ot.lastIndex;return a180?e+=360:e-t>180&&(t+=360),a.push({i:i.push(r(i)+"rotate(",null,n)-2,x:kt(t,e)})):e&&i.push(r(i)+"rotate("+e+n)}(a.rotate,o.rotate,s,u),function(t,e,i,a){t!==e?a.push({i:i.push(r(i)+"skewX(",null,n)-2,x:kt(t,e)}):e&&i.push(r(i)+"skewX("+e+n)}(a.skewX,o.skewX,s,u),function(t,e,i,n,a,o){if(t!==i||e!==n){var s=a.push(r(a)+"scale(",null,",",null,")");o.push({i:s-4,x:kt(t,i)},{i:s-2,x:kt(e,n)})}else 1===i&&1===n||a.push(r(a)+"scale("+i+","+n+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,u),a=o=null,function(t){for(var e,i=-1,n=u.length;++i=0&&e._call.call(null,t),e=e._next;--a}function x(){c=(l=p.now())+h,a=o=0;try{m()}finally{a=0,function(){for(var t,e,i=n,a=1/0;i;)i._call?(a>i._time&&(a=i._time),t=i,i=i._next):(e=i._next,i._next=null,i=t?t._next=e:n=e);r=t,b(a)}(),c=0}}function _(){var t=p.now(),e=t-l;e>u&&(h-=e,l=t)}function b(t){a||(o&&(o=clearTimeout(o)),t-c>24?(t<1/0&&(o=setTimeout(x,t-p.now()-h)),s&&(s=clearInterval(s))):(s||(l=p.now(),s=setInterval(_,u)),a=1,f(x)))}v.prototype=y.prototype={constructor:v,restart:function(t,e,i){if("function"!=typeof t)throw new TypeError("callback is not a function");i=(null==i?d():+i)+(null==e?0:+e),this._next||r===this||(r?r._next=this:n=this,r=this),this._call=t,this._time=i,b()},stop:function(){this._call&&(this._call=null,this._time=1/0,b())}};var M=function(t,e,i){var n=new v;return e=null==e?0:+e,n.restart((function(i){n.stop(),t(i+e)}),e,i),n},S=function(t,e,i){var n=new v,r=e;return null==e?(n.restart(t,e,i),n):(e=+e,i=null==i?d():+i,n.restart((function a(o){o+=r,n.restart(a,r+=e,i),t(o)}),e,i),n)};i.d(e,"now",(function(){return d})),i.d(e,"timer",(function(){return y})),i.d(e,"timerFlush",(function(){return m})),i.d(e,"timeout",(function(){return M})),i.d(e,"interval",(function(){return S}))}])},function(t,e,i){"use strict";i.r(e);var n=i(10);n.translate=function(t,e,i){var r=new Array(9);return n.fromTranslation(r,i),n.multiply(t,r,e)},n.rotate=function(t,e,i){var r=new Array(9);return n.fromRotation(r,i),n.multiply(t,r,e)},n.scale=function(t,e,i){var r=new Array(9);return n.fromScaling(r,i),n.multiply(t,r,e)},n.transform=function(t,e){for(var i=[].concat(t),r=0,a=e.length;r=0;return i?r?2*Math.PI-n:n:r?n:2*Math.PI-n},a.vertical=function(t,e,i){return i?(t[0]=e[1],t[1]=-1*e[0]):(t[0]=-1*e[1],t[1]=e[0]),t};var s=a,u=i(83),l=function(t,e){var i=t?Object(o.clone)(t):[1,0,0,0,1,0,0,0,1];return Object(o.each)(e,(function(t){switch(t[0]){case"t":r.translate(i,i,[t[1],t[2]]);break;case"s":r.scale(i,i,[t[1],t[2]]);break;case"r":r.rotate(i,i,t[1]);break;case"m":r.multiply(i,i,t[1]);break;default:return!1}})),i};i.d(e,"mat3",(function(){return r})),i.d(e,"vec2",(function(){return s})),i.d(e,"vec3",(function(){return u})),i.d(e,"transform",(function(){return l}))},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=n.__importStar(i(0)),a=n.__importDefault(i(124)),o=i(6),s=n.__importDefault(i(12)),u=function(){function t(t,e){this.containerDOM="string"==typeof t?document.getElementById(t):t,this.forceFit=r.isNil(e.forceFit)?r.isNil(e.width)&&r.isNil(e.height):e.forceFit,this.renderer=e.renderer||"canvas",this.pixelRatio=e.pixelRatio||null,this.width=e.width,this.height=e.height,this.canvasController=new a.default({containerDOM:this.containerDOM,plot:this}),this.width=this.canvasController.width,this.height=this.canvasController.height,this.canvas=this.canvasController.canvas,this.layers=[],this.destroyed=!1,this.createLayers(e)}return t.prototype.destroy=function(){this.eachLayer((function(t){t.destroy()})),this.canvasController.destroy(),this.layers=[],this.destroyed=!0},t.prototype.repaint=function(){this.canvasController.canvas.draw()},t.prototype.updateConfig=function(t,e){if(void 0===e&&(e=!1),e)this.eachLayer((function(e){e instanceof s.default&&e.updateConfig(t)}));else{var i=this.layers[0];i instanceof s.default&&i.updateConfig(t)}t.width&&(this.width=t.width),t.height&&(this.height=t.height),this.canvasController.updateCanvasSize()},t.prototype.changeData=function(t,e){if(void 0===e&&(e=!1),e)this.eachLayer((function(e){e instanceof s.default&&e.changeData(t)}));else{var i=this.layers[0];i instanceof s.default&&i.changeData(t)}},t.prototype.bindStateManager=function(t,e){this.eachLayer((function(i){i instanceof s.default&&i.bindStateManager(t,e)}))},t.prototype.setActive=function(t,e){this.eachLayer((function(i){i instanceof s.default&&i.setActive(t,e)}))},t.prototype.setSelected=function(t,e){this.eachLayer((function(i){i instanceof s.default&&i.setSelected(t,e)}))},t.prototype.setDisable=function(t,e){this.eachLayer((function(i){i instanceof s.default&&i.setDisable(t,e)}))},t.prototype.setNormal=function(t){this.eachLayer((function(e){e instanceof s.default&&e.setNormal(t)}))},t.prototype.getLayer=function(t){return void 0===t&&(t=0),this.layers[t]},t.prototype.render=function(){this.eachLayer((function(t){return t.render()}))},t.prototype.eachLayer=function(t){r.each(this.layers,t)},t.prototype.addLayer=function(t){r.findIndex(this.layers,(function(e){return e===t}))<0&&this.layers.push(t)},t.prototype.createLayers=function(t){if(t.layers);else if(t.type){var e=new(o.getPlotType(t.type))(r.deepMix({},t,{canvas:this.canvasController.canvas,x:0,y:0,width:this.width,height:this.height}));this.addLayer(e)}},t}();e.default=u},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n={};e.registerPlotType=function(t,e){n[t.toLowerCase()]=e},e.getPlotType=function(t){return n[t.toLowerCase()]}},function(t,e,i){"use strict";i.r(e);var n={};i.r(n),i.d(n,"Base",(function(){return Ot})),i.d(n,"Html",(function(){return Yt})),i.d(n,"Canvas",(function(){return Wt}));var r={};i.r(r),i.d(r,"Base",(function(){return qt})),i.d(r,"Circle",(function(){return Xt})),i.d(r,"Helix",(function(){return Ut})),i.d(r,"Line",(function(){return Zt}));var a={};i.r(a),i.d(a,"Annotation",(function(){return xe})),i.d(a,"Line",(function(){return _e})),i.d(a,"Text",(function(){return be})),i.d(a,"Arc",(function(){return Me})),i.d(a,"Region",(function(){return Se})),i.d(a,"Image",(function(){return we})),i.d(a,"Html",(function(){return ke})),i.d(a,"DataMarker",(function(){return Ce})),i.d(a,"DataRegion",(function(){return Pe}));var o={};i.r(o),i.d(o,"registerShapeFactory",(function(){return ze})),i.d(o,"registerShape",(function(){return He})),i.d(o,"getShapeFactory",(function(){return Ge}));var s,u=i(3),l=i(0),c=i(48),h=i(1),p=i(2),f={},d=function(t){return f[t.toLowerCase()]},g=function(t,e){if(d(t))throw new Error("Theme type '"+t+"' existed.");f[t.toLowerCase()]=e},v='"-apple-system", BlinkMacSystemFont, "Segoe UI", Roboto,"Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",SimSun, "sans-serif"',y={area:{lineWidth:0,fill:"#1890FF",fillOpacity:.6},hollowArea:{fill:"#fff",stroke:"#1890FF",fillOpacity:0,lineWidth:2},box:{stroke:"#1890FF",lineWidth:1,fill:null},edge:{stroke:"#1890FF",lineWidth:1,fill:null},interval:{lineWidth:0,fill:"#1890FF",fillOpacity:.85},hollowInterval:{fill:"#fff",stroke:"#1890FF",fillOpacity:0,lineWidth:2},kline:{fill:"#1890FF",lineWidth:1,stroke:"#1890FF"},line:{stroke:"#1890FF",lineWidth:2,fill:null},polygon:{lineWidth:0,fill:"#1890FF",fillOpacity:1},hollowPolygon:{fill:"#fff",stroke:"#1890FF",fillOpacity:0,lineWidth:2},point:{lineWidth:1,fill:"#1890FF",radius:4},hollowPoint:{fill:"#fff",lineWidth:1,stroke:"#1890FF",radius:3},text:{fill:"#1890FF",textAlign:"center",textBaseline:"middle"}},m=function(t){var e=t.fillOpacity||t.opacity||1;return{fillOpacity:l.clamp(e-.15,.1,1),strokeOpacity:l.clamp(e-.15,.1,1)}},x=function(t){return{lineWidth:(t.lineWidth||1)+1}},_=function(t){var e=t.fillOpacity||t.opacity||1;return{fillOpacity:l.clamp(e-.15,.1,1)}},b=function(t){var e=t.fill||t.fillStyle,i=t.size||t.radius;return{radius:i+1,shadowBlur:i,shadowColor:e,stroke:e,strokeOpacity:1,lineWidth:1}},M=function(t){var e=t.stroke||t.strokeStyle,i=t.size||t.radius;return{radius:i+1,shadowBlur:i,shadowColor:e,stroke:e,strokeOpacity:1,lineWidth:1}},S={autoRotateLabel:!0,autoHideLabel:!1,autoRotateTitle:!0,showTitle:!1,gridType:"line",title:{textStyle:{fontSize:12,fill:"#ccc",textBaseline:"middle",fontFamily:v,textAlign:"center"},offset:20},label:{offset:16,textStyle:{fill:"#545454",fontSize:12,lineHeight:16,textBaseline:"middle",fontFamily:v}},line:{lineWidth:1,stroke:"#BFBFBF"},tickLine:{lineWidth:1,stroke:"#BFBFBF",length:4,alignWithLabel:!0},grid:{stroke:"#E9E9E9",lineWidth:1,lineDash:[3,3]}},w={showTitle:!1,textStyle:{fill:"#8C8C8C",fontSize:12,textAlign:"start",textBaseline:"middle",lineHeight:20,fontFamily:v},unSelectedColor:"#bfbfbf",titleStyle:{fill:"#333",textBaseline:"top",textAlign:"start",fontFamily:v},flipPage:!0},k={pixelRatio:null,defaultColor:"#1890FF",padding:[20,20,95,80],fontFamily:v,colors:["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#E8684A","#6DC8EC","#9270CA","#FF9D4D","#269A99","#FF99C3"],colors_20:["#5B8FF9","#BDD2FD","#5AD8A6","#BDEFDB","#5D7092","#C2C8D5","#F6BD16","#FBE5A2","#E8684A","#F6C3B7","#6DC8EC","#B6E3F5","#9270CA","#D3C6EA","#FF9D4D","#FFD8B8","#269A99","#AAD8D8","#FF99C3","#FFD6E7"],shapes:{point:["hollowCircle","hollowSquare","hollowDiamond","hollowBowtie","hollowTriangle","hollowHexagon","cross","tick","plus","hyphen","line"],line:["line","dash","dot"],area:["area"]},sizes:[1,10],opacities:[.1,.9],backgroundStyle:{fill:"rgba(255,255,255,0)"},axis:{top:l.deepMix({},S,{position:"top",grid:null}),bottom:l.deepMix({},S,{position:"bottom",grid:null}),left:l.deepMix({},S,{position:"left",label:{offset:8},line:null,tickLine:null}),right:l.deepMix({},S,{position:"right",label:{offset:8},line:null,tickLine:null}),circle:l.deepMix({},S,{label:{offset:8,textStyle:{textBaseline:"alphabetic"}}}),radius:l.deepMix({},S,{label:{offset:12},gridType:"arc"}),helix:l.deepMix({},S,{label:null,grid:null})},label:{offset:20,textStyle:{fill:"#545454",fontSize:12,textBaseline:"middle",fontFamily:v}},treemapLabels:{offset:10,textStyle:{fill:"#fff",fontSize:12,textBaseline:"top",fontStyle:"bold",fontFamily:v}},innerLabels:{textStyle:{fill:"#fff",fontSize:12,textBaseline:"middle",fontFamily:v}},thetaLabels:{labelHeight:14,offset:30,labelLine:{lineWidth:1}},defaultLegendPosition:"bottom",legend:{right:l.deepMix({},w,{position:"right",layout:"vertical",itemMarginBottom:8,textStyle:{lineHeight:0}}),left:l.deepMix({},w,{position:"left",layout:"vertical",itemMarginBottom:8}),top:l.deepMix({},w,{position:"top",layout:"horizontal",itemDistance:10}),bottom:l.deepMix({},w,{position:"bottom",layout:"horizontal"}),html:{position:"bottom",layout:"horizontal",showTitle:!1,unSelectedColor:"#bfbfbf",backgroundStyle:{height:"auto",width:"auto",position:"absolute",overflow:"auto",fontSize:"12px",fontFamily:v,lineHeight:"20px",color:"#8C8C8C"},titleStyle:{marginBottom:"4px"},listStyle:{listStyleType:"none",margin:0,padding:0},itemStyle:{cursor:"pointer",marginBottom:"5px",marginRight:"24px"},markerStyle:{width:"9px",height:"9px",borderRadius:"50%",display:"inline-block",marginRight:"8px",verticalAlign:"middle"}},margin:[0,24,24,24],legendMargin:24},tooltip:(s={useHtml:!0},s["g2-tooltip"]={position:"absolute",visibility:"hidden",zIndex:8,transition:"visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1), left 0.4s cubic-bezier(0.23, 1, 0.32, 1), top 0.4s cubic-bezier(0.23, 1, 0.32, 1)",backgroundColor:"rgba(255, 255, 255, 0.9)",boxShadow:"0px 0px 10px #aeaeae",borderRadius:"3px",color:"rgb(87, 87, 87)",fontSize:"12px",fontFamily:v,lineHeight:"20px",padding:"10px 10px 6px 10px"},s["g2-tooltip-title"]={marginBottom:"4px"},s["g2-tooltip-list"]={margin:0,listStyleType:"none",padding:0},s["g2-tooltip-list-item"]={marginBottom:"4px"},s["g2-tooltip-marker"]={width:"5px",height:"5px",borderRadius:"50%",display:"inline-block",marginRight:"8px"},s["g2-tooltip-value"]={display:"inline-block",float:"right",marginLeft:"30px"},s),tooltipMarker:{symbol:function(t,e,i){return[["M",t,e],["m",-i,0],["a",i,i,0,1,0,2*i,0],["a",i,i,0,1,0,2*-i,0]]},stroke:"#fff",shadowBlur:10,shadowOffsetX:0,shadowOffSetY:0,shadowColor:"rgba(0,0,0,0.09)",lineWidth:2,radius:4},tooltipCrosshairsRect:{type:"rect",rectStyle:{fill:"#CCD6EC",opacity:.3}},tooltipCrosshairsLine:{lineStyle:{stroke:"rgba(0, 0, 0, 0.25)",lineWidth:1}},annotation:{line:{line:{style:{stroke:"rgba(0, 0, 0, .65)",lineDash:[2,2],lineWidth:1}},text:{position:"start",autoRotate:!0,style:{fill:"rgba(0, 0, 0, .45)",fontSize:12,textAlign:"start",fontFamily:v,textBaseline:"bottom"}}},text:{top:!0,style:{fill:"rgba(0,0,0,.5)",fontSize:12,textBaseline:"middle",textAlign:"start",fontFamily:v}},region:{top:!1,style:{lineWidth:0,fill:"#000",fillOpacity:.04}},html:{alignX:"middle",alignY:"middle"},dataRegion:{region:{style:{lineWidth:0,fill:"#000000",opacity:.04}},text:{style:{textAlign:"center",textBaseline:"bottom",fontSize:12,fill:"rgba(0, 0, 0, .65)"}}},dataMarker:{top:!0,direction:"upward",autoAdjust:!0,text:{display:!0,style:{fill:"rgba(0, 0, 0, .65)",opacity:1,fontSize:12,textAlign:"start"}},line:{display:!0,lineLength:20,style:{stroke:"#A3B1BF",lineWidth:1}},point:{display:!0,style:{r:3,fill:"#FFFFFF",stroke:"#1890FF",lineWidth:2}}}},shape:{area:{area:{default:y.area,active:m},smooth:{default:y.area,active:m},line:{default:y.hollowArea,active:x},smoothLine:{default:y.hollowArea,active:x}},box:{box:{default:y.box,active:x}},edge:{line:{default:y.edge,active:x},vhv:{default:y.edge,active:x},smooth:{default:y.edge,active:x},arc:{default:y.edge,active:x}},interval:{rect:{default:y.interval,active:_},hollowInterval:{default:y.hollowInterval,active:x},line:{default:y.hollowInterval,active:x},tick:{default:y.hollowInterval,active:x},funnel:{default:y.interval,active:_},pyramid:{default:y.interval,active:_},"top-line":{default:y.interval,active:_}},kline:{kline:{default:y.kline,active:m}},line:{line:{default:y.line,active:x},dot:{default:y.line,active:x},dash:{default:y.line,active:x},smooth:{default:y.line,active:x},hv:{default:y.line,active:x},vh:{default:y.line,active:x},hvh:{default:y.line,active:x},vhv:{default:y.line,active:x}},polygon:{polygon:{default:y.polygon,active:_},hollow:{default:y.hollowPolygon,active:x}},point:{circle:{default:y.point,active:b},square:{default:y.point,active:b},bowtie:{default:y.point,active:b},diamond:{default:y.point,active:b},hexagon:{default:y.point,active:b},triangle:{default:y.point,active:b},triangleDown:{default:y.point,active:b},hollowCircle:{default:y.hollowPoint,active:M},hollowSquare:{default:y.hollowPoint,active:M},hollowBowtie:{default:y.hollowPoint,active:M},hollowDiamond:{default:y.hollowPoint,active:M},hollowHexagon:{default:y.hollowPoint,active:M},hollowTriangle:{default:y.hollowPoint,active:M},hollowTriangleDown:{default:y.hollowPoint,active:M},cross:{default:y.hollowPoint,active:M},tick:{default:y.hollowPoint,active:M},plus:{default:y.hollowPoint,active:M},hyphen:{default:y.hollowPoint,active:M},line:{default:y.hollowPoint,active:M},rect:{default:y.point,active:b},image:{default:y.point,active:b},path:{default:y.point,active:b}},text:{text:{default:y.text,active:function(t){return{stroke:t.fill||t.fillStyle,strokeOpacity:1,lineWidth:1}}}}}};g("default",k);var C={version:"3.6.0-beta.4",renderer:"canvas",width:640,height:480,pixelRatio:null,animate:!0,widthRatio:{column:.5,rose:.9999999,multiplePie:1/1.3},theme:d("default"),setTheme:function(t){var e={};e=l.isObject(t)?t:d(t)?d(t):d("default"),l.deepMix(C.theme,e)}},P=C,O=C.setTheme,A=C.version,L=i(21),T=i.n(L),I=function(t){function e(e){var i=t.call(this)||this;return i.cfg={},i.destroyed=!1,i.cfg=Object(h.__assign)({visible:!0},e),i}return Object(h.__extends)(e,t),e.prototype.get=function(t){return this.cfg[t]},e.prototype.set=function(t,e){return this.cfg[t]=e,this},e.prototype.show=function(){this.get("visible")||(this.set("visible",!0),this.changeVisible(!0))},e.prototype.hide=function(){this.get("visible")&&(this.set("visible",!1),this.changeVisible(!1))},e.prototype.destroy=function(){this.cfg={},this.off(),this.destroyed=!0},e}(T.a),D=i(4),j=i(15);function E(t){var e,i=t.start,n=t.end,r=t.width,a=t.height;if(t.isPolar){var o=t.startAngle,s=t.endAngle,l=t.getCenter(),c=t.getRadius();(e=new u.Shapes.Fan({attrs:{x:l.x,y:l.y,rs:0,re:c+200,startAngle:o,endAngle:o}})).endState={endAngle:s}}else e=new u.Shapes.Rect({attrs:{x:i.x-200,y:n.y-200,width:t.isTransposed?r+400:0,height:t.isTransposed?0:a+400}}),t.isTransposed?e.endState={height:a+400}:e.endState={width:r+400};return e.set("isClip",!0),e}function B(t,e,i){var n;t.apply(e);var r=e[0],a=e[1];if("x"===i){t.transform([["t",-r,-a],["s",.01,1],["t",r,a]]);var o=t.getMatrix();n=D.mat3.transform(o,[["t",-r,-a],["s",100,1],["t",r,a]])}else if("y"===i){t.transform([["t",-r,-a],["s",1,.01],["t",r,a]]);o=t.getMatrix();n=D.mat3.transform(o,[["t",-r,-a],["s",1,100],["t",r,a]])}else if("xy"===i){t.transform([["t",-r,-a],["s",.01,.01],["t",r,a]]);o=t.getMatrix();n=D.mat3.transform(o,[["t",-r,-a],["s",100,100],["t",r,a]])}return n}function F(t,e,i){var n=t.id,r=function(t,e,i){return{delay:l.isFunction(t.delay)?t.delay(e,i):t.delay,easing:l.isFunction(t.easing)?t.easing(e,i):t.easing,duration:l.isFunction(t.duration)?t.duration(e,i):t.duration,callback:t.callback}}(i,t.get("index"),n),a=r.easing,o=r.delay,s=r.duration,u=r.callback;t.animate(e,s,a,u,o)}function R(t,e,i,n,r){var a,o,s=function(t){return{start:t.start,end:t.end,width:t.getWidth(),height:t.getWidth()}}(i),l=s.start,c=s.end,h=s.width,p=s.height,f=new u.Shapes.Rect({attrs:{x:l.x,y:c.y,width:h,height:p}});"y"===r?(a=l.x+h/2,o=n.yl.x?n.x:l.x,o=l.y+p/2):"xy"===r&&(i.isPolar?(a=i.getCenter().x,o=i.getCenter().y):(a=(l.x+c.x)/2,o=(l.y+c.y)/2));var d=B(f,[a,o,1],r);f.set("isClip",!0),f.set("canvas",t.get("canvas")),t.attr("clip",f),e.callback=function(){t.attr("clip",null),f.remove()},F(f,{matrix:d},e)}function N(t,e){var i,n,r=function(t){if(l.isEmpty(t))return null;var e=t[0].x,i=t[0].x,n=t[0].y,r=t[0].y;return l.each(t,(function(t){e=e>t.x?t.x:e,i=it.y?t.y:n,r=r0?i.maxX:i.minX,(i.minY+i.maxY)/2,1],"x")},e)}function G(t,e,i){var n,r;if(i.isPolar&&"point"!==t.name)n=i.getCenter().x,r=i.getCenter().y;else{var a=t.getBBox();n=(a.minX+a.maxX)/2,r=(a.minY+a.maxY)/2}F(t,{matrix:B(t,[n,r,1],"xy")},e)}function Y(t,e){if("path"===t.get("type")){var i=j.c(t.attr("path"));t.attr("path",[i[0]]),F(t,{path:i},e)}}function W(t,e,i,n,r){var a,o=E(i),s=t.get("canvas");n?(o.attr("startAngle",n),o.attr("endAngle",n),a={endAngle:r}):a=o.endState,o.set("canvas",s),t.attr("clip",o),t.setSilent("animating",!0),e.callback=function(){t&&!t.get("destroyed")&&(t.attr("clip",null),t.setSilent("cacheShape",null),t.setSilent("animating",!1),o.remove())},F(o,a,e)}function V(t,e){var i=l.isNil(t.attr("fillOpacity"))?1:t.attr("fillOpacity"),n=l.isNil(t.attr("strokeOpacity"))?1:t.attr("strokeOpacity");t.attr("fillOpacity",0),t.attr("strokeOpacity",0),F(t,{fillOpacity:i,strokeOpacity:n},e)}function q(t,e,i){var n=N(t,i);W(t,e,i,n.startAngle,n.endAngle)}var X={enter:{clipIn:W,zoomIn:G,pathIn:Y,scaleInY:z,scaleInX:H,fanIn:q,fadeIn:V},leave:{lineWidthOut:function(t,e){e.callback=function(){return t.remove()},F(t,{lineWidth:0,opacity:0},e)},zoomOut:function(t,e,i){var n,r;if(i.isPolar&&"point"!==t.name)n=i.getCenter().x,r=i.getCenter().y;else{var a=t.getBBox();n=(a.minX+a.maxX)/2,r=(a.minY+a.maxY)/2}var o=[n,r,1];t.apply(o);var s={transform:[["t",-n,-r],["s",.01,.01],["t",n,r]]};e.callback=function(){return t.remove()},F(t,s,e)},pathOut:function(t,e){if("path"===t.get("type")){var i={path:[j.c(t.attr("path"))[0]]};e.callback=function(){return t.remove()},F(t,i,e)}},fadeOut:function(t,e){e.callback=function(){return t.remove()},F(t,{fillOpacity:0,strokeOpacity:0},e)},fadeIn:V},appear:{clipIn:W,zoomIn:G,pathIn:Y,scaleInY:z,scaleInX:H,fanIn:q,fadeIn:V,groupWaveIn:function(t,e,i){var n=E(i);n.set("canvas",t.get("canvas")),t.attr("clip",n),e.callback=function(){t.attr("clip",null),n.remove()};var r=n.endState;F(n,r,e)},groupScaleInX:function(t,e,i,n){R(t,e,i,n,"x")},groupScaleInY:function(t,e,i,n){R(t,e,i,n,"y")},groupScaleInXY:function(t,e,i,n){R(t,e,i,n,"xy")}},update:{fadeIn:V,fanIn:q}},U={appear:{duration:450,easing:"easeQuadOut"},update:{duration:450,easing:"easeQuadInOut"},enter:{duration:400,easing:"easeQuadInOut",delay:100},leave:{duration:350,easing:"easeQuadIn"}},Z={line:{appear:function(){return X.appear.groupWaveIn},enter:function(){return X.enter.clipIn},leave:function(){return X.leave.lineWidthOut}},path:{appear:function(){return X.appear.groupWaveIn},enter:function(){return X.enter.clipIn},leave:function(){return X.leave.lineWidthOut}},area:{appear:function(){return X.appear.groupWaveIn},enter:function(){return X.enter.fadeIn},leave:function(){return X.leave.fadeOut},cfg:{appear:{duration:500,easing:"easeQuadOut"},update:{duration:450,easing:"easeQuadInOut"},enter:{duration:600,delay:150,easing:"easeQuadInOut"},leave:{easing:"easeQuadOut",duration:350}}},polygon:{appear:function(){return X.appear.fadeIn},enter:function(){return X.enter.zoomIn},leave:function(){return X.leave.zoomOut}},edge:{appear:function(){return X.appear.pathIn},enter:function(){return X.enter.pathIn},leave:function(){return X.leave.pathOut}},interval:{appear:function(t){var e;return t.isPolar?(e=X.appear.groupScaleInXY,t.isTransposed&&(e=X.appear.groupWaveIn)):e=t.isTransposed?X.appear.groupScaleInX:X.appear.groupScaleInY,e},enter:function(t){return t.isRect||t.isTransposed||"theta"===t.type?X.enter.fadeIn:X.enter.zoomIn},leave:function(){return X.leave.fadeOut},update:function(t){if("theta"===t.type)return X.update.fanIn}},point:{appear:function(){return X.appear.zoomIn},enter:function(){return X.enter.zoomIn},leave:function(){return X.leave.zoomOut}},text:{appear:function(){return X.appear.zoomIn},enter:function(){return X.enter.zoomIn},leave:function(){return X.leave.zoomOut}},kline:{appear:function(){return X.appear.groupWaveIn},enter:function(){return X.enter.clipIn},leave:function(){return X.leave.lineWidthOut}},box:{appear:function(){return X.appear.groupWaveIn},enter:function(){return X.enter.clipIn},leave:function(){return X.leave.lineWidthOut}},heatmap:null,label:{appear:function(){return X.appear.fadeIn},enter:function(){return X.enter.fadeIn},leave:function(){return X.leave.fadeOut},cfg:{appear:{duration:900}}},"axis-label":{enter:function(){return X.appear.fadeIn},leave:function(){return X.leave.fadeOut},update:function(t){if(t.isPolar)return X.appear.fadeIn}},"axis-ticks":{enter:function(){return X.appear.fadeIn},leave:function(){return X.leave.fadeOut},update:function(t){if(t.isPolar)return X.appear.fadeIn}},"axis-grid":{enter:function(){return X.appear.fadeIn},leave:function(){return X.leave.fadeOut},update:function(t){if(t.isPolar)return X.appear.fadeIn}},"axis-grid-rect":{enter:function(){return X.appear.fadeIn},leave:function(){return X.leave.fadeOut},update:function(){return X.leave.fadeIn}}};Z.Action=X,Z.defaultCfg=U,Z.getAnimation=function(t,e,i){var n=this[t];if(n){var r=n[i];if(l.isFunction(r))return r(e)}return!1},Z.getAnimateCfg=function(t,e){var i=U[e];return this[t]&&this[t].cfg&&this[t].cfg[e]?l.deepMix({},i,this[t].cfg[e]):i},Z.registerAnimation=function(t,e,i){this.Action[t]||(this.Action[t]={}),this.Action[t][e]=i};var Q=Z;function $(t,e){var i=[];if(!1===t.get("animate"))return[];var n=t.get("children");return l.each(n,(function(t){if(t.isGroup)i=i.concat($(t,e));else if(t.isShape&&t.id){var n=t.id;(n=n.split("-")[0])===e&&i.push(t)}})),i}function K(t,e,i,n){return n?Q.Action[i][n]:Q.getAnimation(t,e,i)}function J(t,e,i){if(!1===i||l.isObject(i)&&!1===i[e])return null;var n=Q.getAnimateCfg(t,e);return i&&i[e]?l.deepMix({},n,i[e]):n}var tt={execAnimation:function(t,e){var i=e,n=t.get("panelGroup"),r=t.get("backgroundGroup"),a=t.get("id"),o=t.get("canvas"),s=o.get(a+"caches")||[];0===s.length&&(i=!1);var u,c=$(n,a),h=$(r,a),p=c.concat(h);if(o.setSilent(a+"caches",function(t){var e={};return l.each(t,(function(t){if(t.id&&!t.get("isClip")){var i=t.id;e[i]={id:i,type:t.get("type"),attrs:l.clone(t.attr()),name:t.name,index:t.get("index"),animateCfg:t.get("animateOptions"),coord:t.get("coord")}}})),e}(p)),i)u=function(t,e,i){var n,r,a=!1,o=[],s=[];return l.each(e,(function(e){var i=t[e.id];i?(e.setSilent("cacheShape",i),o.push(e),delete t[e.id]):s.push(e)})),l.each(t,(function(t){var e=t.name,o=t.coord,s=t.id,u=t.attrs,c=t.index,h=t.type;if(!(r=J(e,"leave",t.animateCfg)))return!0;if(n=K(e,o,"leave",r.animation),l.isFunction(n)){var p=i.addShape(h,{attrs:u,index:c});if(p.id=s,p.name=e,o&&"label"!==e){var f=p.getMatrix(),d=D.mat3.multiply([],f,o.matrix);p.setMatrix(d)}a=!0,n(p,r,o)}})),l.each(o,(function(t){var e=t.name;if(!(r=J(e,"update",t.get("animateOptions"))))return!0;var i=t.get("coord"),o=t.get("cacheShape").attrs;if(!l.isEqual(o,t.attr())){if(n=K(e,i,"update",r.animation),l.isFunction(n))n(t,r,i);else{var s=l.clone(t.attr());t.attr(o),t.animate(s,r.duration,r.easing,(function(){t.setSilent("cacheShape",null)}))}a=!0}})),l.each(s,(function(t){var e=t.name,i=t.get("coord");if(!(r=J(e,"enter",t.get("animateOptions"))))return!0;n=K(e,i,"enter",r.animation),l.isFunction(n)&&(n(t,r,i),a=!0)})),a}(s,p,o);else{var f,d,g=t.get("elements"),v=t.get("coord");l.each(g,(function(t){var e=t.get("type"),i=t.get("animateOptions");if(!1!==i){if(!(f=J(e,"appear",i)))return!0;if(d=K(e,v,"appear",f.animation),l.isFunction(d))if(0===d.name.indexOf("group")){var n=t.getYScale(),r=v.convertPoint({x:0,y:n.scale(t.getYMinValue())}),o=t.get("container");d&&d(o,f,v,r)}else{var s=$(t.get("container"),a);l.each(s,(function(t){t.name===e?d(t,f,v):"label"===t.name&&(f=J("label","appear",null),d=K(t.name,v,"appear",f.animation),l.isFunction(d)&&d(t,f,v))}))}}})),u=!0}u||o.draw()}},et=i(14),it=.5,nt=.5,rt=function(){function t(t){var e=t.xField,i=t.yField,n=t.adjustNames,r=void 0===n?["x","y"]:n;this.adjustNames=r,this.xField=e,this.yField=i}return t.prototype.isAdjust=function(t){return this.adjustNames.indexOf(t)>=0},t.prototype.getAdjustRange=function(t,e,i){var n,r,a=this.yField,o=i.indexOf(e),s=i.length;return!a&&this.isAdjust("y")?(n=0,r=1):s>1?(n=i[0===o?0:o-1],r=i[o===s-1?s-1:o+1],0!==o?n+=(e-n)/2:n-=(r-e)/2,o!==s-1?r-=(r-e)/2:r+=(e-i[s-2])/2):(n=0===e?0:e-.5,r=0===e?1:e+.5),{pre:n,next:r}},t.prototype.adjustData=function(t,e){var i=this,n=this.getDimValues(e);l.each(t,(function(t,e){l.each(n,(function(n,r){i.adjustDim(r,n,t,e)}))}))},t.prototype.groupData=function(t,e){return l.each(t,(function(t){void 0===t[e]&&(t[e]=0)})),l.groupBy(t,e)},t.prototype.adjustDim=function(t,e,i,n){},t.prototype.getDimValues=function(t){var e=this.xField,i=this.yField,n={},r=[];if(e&&this.isAdjust("x")&&r.push(e),i&&this.isAdjust("y")&&r.push(i),r.forEach((function(e){n[e]=l.valuesOfKey(t,e).sort((function(t,e){return t-e}))})),!i&&this.isAdjust("y")){n.y=[0,1]}return n},t}(),at={},ot=function(t){return at[t.toLowerCase()]},st=function(t,e){if(ot(t))throw new Error("Adjust type '"+t+"' existed.");at[t.toLowerCase()]=e},ut=function(t){function e(e){var i=t.call(this,e)||this;i.cacheMap={},i.adjustDataArray=[],i.mergeData=[];var n=e.marginRatio,r=void 0===n?it:n,a=e.dodgeRatio,o=void 0===a?nt:a,s=e.dodgeBy;return i.marginRatio=r,i.dodgeRatio=o,i.dodgeBy=s,i}return Object(h.__extends)(e,t),e.prototype.process=function(t){var e=l.clone(t),i=l.flatten(e),n=this.dodgeBy,r=n?l.group(i,n):e;return this.cacheMap={},this.adjustDataArray=r,this.mergeData=i,this.adjustData(r,i),this.adjustDataArray=[],this.mergeData=[],e},e.prototype.adjustDim=function(t,e,i,n){var r=this,a=this.getDistribution(t),o=this.groupData(i,t);return l.each(o,(function(i,o){var s;s=1===e.length?{pre:e[0]-1,next:e[0]+1}:r.getAdjustRange(t,parseFloat(o),e),l.each(i,(function(e){var i=e[t],o=a[i],u=o.indexOf(n);e[t]=r.getDodgeOffset(s,u,o.length)}))})),[]},e.prototype.getDodgeOffset=function(t,e,i){var n=this.dodgeRatio,r=this.marginRatio,a=t.pre,o=t.next,s=o-a,u=s*n/i,l=r*u;return(a+o)/2+(.5*(s-i*u-(i-1)*l)+((e+1)*u+e*l)-.5*u-.5*s)},e.prototype.getDistribution=function(t){var e=this.adjustDataArray,i=this.cacheMap,n=i[t];return n||(n={},l.each(e,(function(e,i){var r=l.valuesOfKey(e,t);r.length||r.push(0),l.each(r,(function(t){n[t]||(n[t]=[]),n[t].push(i)}))})),i[t]=n),n},e}(rt);var lt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(h.__extends)(e,t),e.prototype.process=function(t){var e=l.clone(t),i=l.flatten(e);return this.adjustData(e,i),e},e.prototype.adjustDim=function(t,e,i){var n=this,r=this.groupData(i,t);return l.each(r,(function(i,r){return n.adjustGroup(i,t,parseFloat(r),e)}))},e.prototype.getAdjustOffset=function(t){var e,i=t.pre,n=t.next,r=.05*(n-i);return(n-r-(e=i+r))*Math.random()+e},e.prototype.adjustGroup=function(t,e,i,n){var r=this,a=this.getAdjustRange(e,i,n);return l.each(t,(function(t){t[e]=r.getAdjustOffset(a)})),t},e}(rt),ct=l.Cache,ht=function(t){function e(e){var i=t.call(this,e)||this,n=e.adjustNames,r=void 0===n?["y"]:n,a=e.height,o=void 0===a?NaN:a,s=e.size,u=void 0===s?10:s,l=e.reverseOrder,c=void 0!==l&&l;return i.adjustNames=r,i.height=o,i.size=u,i.reverseOrder=c,i}return Object(h.__extends)(e,t),e.prototype.process=function(t){var e=this.yField,i=this.reverseOrder,n=e?this.processStack(t):this.processOneDimStack(t);return i?this.reverse(n):n},e.prototype.reverse=function(t){return t.slice(0).reverse()},e.prototype.processStack=function(t){var e=this.xField,i=this.yField,n=this.reverseOrder?this.reverse(t):t,r=new ct,a=new ct;return n.map((function(t){return t.map((function(t){var n,o=l.get(t,e,0),s=l.get(t,i),u=o.toString();if(s=l.isArray(s)?s[1]:s,!l.isNil(s)){var c=s>=0?r:a;c.has(u)||c.set(u,0);var p=c.get(u),f=s+p;return c.set(u,f),Object(h.__assign)(Object(h.__assign)({},t),((n={})[i]=[p,f],n))}return t}))}))},e.prototype.processOneDimStack=function(t){var e=this,i=this.xField,n=this.height,r=this.reverseOrder,a=r?this.reverse(t):t,o=new ct;return a.map((function(t){return t.map((function(t){var r,a=e.size,s=t[i],u=2*a/n;o.has(s)||o.set(s,u/2);var l=o.get(s);return o.set(s,l+u),Object(h.__assign)(Object(h.__assign)({},t),((r={}).y=l,r))}))}))},e}(rt),pt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(h.__extends)(e,t),e.prototype.process=function(t){var e=l.flatten(t),i=this.xField,n=this.yField,r=this.getXValuesMaxMap(e),a=Math.max.apply(Math,Object.keys(r).map((function(t){return r[t]})));return l.map(t,(function(t){return l.map(t,(function(t){var e,o,s=t[n],u=t[i];if(l.isArray(s)){var c=(a-r[u])/2;return Object(h.__assign)(Object(h.__assign)({},t),((e={})[n]=l.map(s,(function(t){return c+t})),e))}var p=(a-s)/2;return Object(h.__assign)(Object(h.__assign)({},t),((o={})[n]=[p,s+p],o))}))}))},e.prototype.getXValuesMaxMap=function(t){var e=this,i=this.xField,n=this.yField,r=l.groupBy(t,(function(t){return t[i]}));return l.mapValues(r,(function(t){return e.getDimMaxValue(t,n)}))},e.prototype.getDimMaxValue=function(t,e){var i=l.map(t,(function(t){return l.get(t,e,[])})),n=l.flatten(i);return Math.max.apply(Math,n)},e}(rt);st("Dodge",ut),st("Jitter",lt),st("Stack",ht),st("Symmetric",pt);var ft,dt=i(20),gt=i(9),vt=/^(?:(?!0000)[0-9]{4}([-/.]+)(?:(?:0?[1-9]|1[0-2])\1(?:0?[1-9]|1[0-9]|2[0-8])|(?:0?[13-9]|1[0-2])\1(?:29|30)|(?:0?[13578]|1[02])\1(?:31))|(?:[0-9]{2}(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)([-/.]?)0?2\2(?:29))(\s+([01]|([01][0-9]|2[0-3])):([0-9]|[0-5][0-9]):([0-9]|[0-5][0-9]))?$/;!function(t){t.Linear="linear",t.Cat="cat",t.Time="time"}(ft||(ft={}));var yt=function(){function t(t){this.defs={},this.defs=t}return t.prototype.createScale=function(t,e){var i,n=this.defs[t];if(!e||!e.length){if(n&&n.type)i=new(Object(et.getScale)(n.type))(n);else i=new(Object(et.getScale)("identity"))({field:t.toString(),values:[t]});return i}var r=l.firstValue(e,t);if(l.isNumber(t)||l.isNil(r)&&!n){i=new(Object(et.getScale)("identity"))({field:t.toString(),values:[t]})}else{var a=l.get(n,"type",this._getDefaultType(t,e)),o=this._getScaleCfg(a,t,e);n&&l.mix(o,n),i=new(Object(et.getScale)(a))(o)}return i},t.prototype._getDefaultType=function(t,e){var i=ft.Linear,n=l.firstValue(e,t);return l.isArray(n)&&(n=n[0]),vt.test(n)?i=ft.Time:l.isString(n)&&(i=ft.Cat),i},t.prototype._getScaleCfg=function(t,e,i){var n=l.valuesOfKey(i,e),r={field:e,values:n};if("cat"!==t&&"timeCat"!==t&&"time"!==t){var a=l.getRange(n),o=a.min,s=a.max;r.min=o,r.max=s,r.nice=!0}return"time"===t&&(r.nice=!1),r},t}(),mt=function(){function t(t){void 0===t&&(t={}),this.type="rect",this.actions=[],this.cfg={},this.options={},l.mix(this,t),this.options=t}return t.prototype.reset=function(t){return this.type=t.type||"rect",this.actions=t.actions||[],this.cfg=t.cfg,this.options.type=this.type,this.options.actions=this.actions,this.options.cfg=this.cfg,this},t.prototype.createCoord=function(t,e){var i,n,r=this.type,a=this.cfg,o=Object(h.__assign)({start:t,end:e},a);return"theta"===r?(i=Object(dt.getCoordinate)("polar"),this._hasAction("transpose")||this.transpose(),(n=new i(o)).type=r):n=new(i=Object(dt.getCoordinate)(r))(o),this._execActions(n),n},t.prototype.rotate=function(t){var e=t*Math.PI/180;return this.actions.push(["rotate",e]),this},t.prototype.reflect=function(t){return void 0===t&&(t="y"),this.actions.push(["reflect",t]),this},t.prototype.scale=function(t,e){return this.actions.push(["scale",t,e]),this},t.prototype.transpose=function(){return this.actions.push(["transpose"]),this},t.prototype._execActions=function(t){l.each(this.actions,(function(e){var i=e[0];t[i](e[1],e[2])}))},t.prototype._hasAction=function(t){var e=this.actions,i=!1;return l.each(e,(function(e){if(t===e[0])return i=!0,!1})),i},t}(),xt=(i(52),function(t){function e(e){var i=t.call(this)||this;return i.cfg=Object(h.__assign)({id:null,canvas:null,container:null,group:null,capture:!0,offsetX:0,offsetY:0,visible:!0,zIndex:1},e),i.destroyed=!1,i}return Object(h.__extends)(e,t),e.prototype.get=function(t){return this.cfg[t]},e.prototype.set=function(t,e){return this.cfg[t]=e,this},e.prototype.destroy=function(){this.off(),this.destroyed=!0},e}(T.a)),_t=function(){function t(t){this.bitmap={},this.xGap=1,this.yGap=8,t&&l.mix(this,t)}return t.prototype.hasGap=function(t){for(var e=!0,i=this.bitmap,n=Math.round(t.minX),r=Math.round(t.maxX),a=Math.round(t.minY),o=Math.round(t.maxY),s=n;s<=r;s+=1)if(i[s]){if(s===n||s===r){for(var u=a;u<=o;u++)if(i[s][u]){e=!1;break}}else if(i[s][a]||i[s][o]){e=!1;break}}else i[s]={};return e},t.prototype.fillGap=function(t){for(var e=this.bitmap,i=Math.round(t.minX),n=Math.round(t.maxX),r=Math.round(t.minY),a=Math.round(t.maxY),o=i;o<=n;o+=1)e[o]||(e[o]={});for(o=i;o<=n;o+=this.xGap){for(var s=r;s<=a;s+=this.yGap)e[o][s]=!0;e[o][a]=!0}if(1!==this.yGap)for(o=r;o<=a;o+=1)e[i][o]=!0,e[n][o]=!0;if(1!==this.xGap)for(o=i;o<=n;o+=1)e[o][r]=!0,e[o][a]=!0},t.prototype.destroy=function(){this.bitmap={}},t}();function bt(t,e,i,n){var r=t.getBBox(),a=r.width,o=r.height,s={x:e,y:i,textAlign:"center"};switch(n){case 0:s.y-=o+1,s.x+=1,s.textAlign="left";break;case 1:s.y-=o+1,s.x-=1,s.textAlign="right";break;case 2:s.y+=o+1,s.x-=1,s.textAlign="right";break;case 3:s.y+=o+1,s.x+=1,s.textAlign="left";break;case 5:s.y-=2*o+2;break;case 6:s.y+=2*o+2;break;case 7:s.x+=a+1,s.textAlign="left";break;case 8:s.x-=a+1,s.textAlign="right"}return t.attr(s),t.getBBox()}var Mt=100;function St(t,e,i){void 0===i&&(i=Mt);var n,r=t.attr("x"),a=t.attr("y"),o=t.getBBox(),s=Math.sqrt(o.width*o.width+o.height*o.height),u=1,l=0,c=0,h=function(t){var e=.1*t;return[e*Math.cos(e),e*Math.sin(e)]};if(e.hasGap(o))return e.fillGap(o),!0;for(var p=!1,f=0,d={};Math.min(Math.abs(l),Math.abs(c))n.width||i.height>n.height)&&r.push(t[a]);for(a=0;a',itemTpl:'
{text}
',items:null,lineGroup:null,shapes:null,useHtml:!1},e))||this}return Object(h.__extends)(e,t),e.prototype.render=function(){this.clear(),this._init(),this.emit("beforerender"),this.draw(),this.emit("afterrender")},e.prototype.draw=function(t){void 0===t&&(t=!0),this._dryDraw(),t&&this.get("canvas").draw()},e.prototype.clear=function(){var t=this.get("group"),e=this.get("container");t&&!t.destroyed&&t.clear(),e&&(e.innerHTML="")},e.prototype.destroy=function(){t.prototype.destroy.call(this);var e=this.get("group"),i=this.get("container");e&&!e.destroyed&&e.destroy(),i&&(i.innerHTML="")},e.prototype._init=function(){if(!this.get("group")){var t=this.get("canvas").addGroup({id:"label-group"});this.set("group",t)}},e.prototype._dryDraw=function(){var t=this,e=this.get("items"),i=this.getLabels(),n=i.length;l.each(e,(function(e,r){if(r=e.length;r-=1)i[r].remove();this._adjustLabels(),this.drawLines()},e.prototype.changeLabel=function(t,e){if(t)if(t.tagName){var i=this._createDom(e);t.innerHTML=i.innerHTML,this._setCustomPosition(e,t)}else t.id=e.id,t.attr("text",e.text),t.attr("x")===e.x&&t.attr("y")===e.y||(t.resetMatrix(),e.textStyle.rotate&&(t.rotateAtStart(e.textStyle.rotate),delete e.textStyle.rotate),t.attr(e))},e.prototype.show=function(){var t=this.get("group"),e=this.get("container");t&&t.show(),e&&(e.style.opacity=1)},e.prototype.hide=function(){var t=this.get("group"),e=this.get("container");t&&t.hide(),e&&(e.style.opacity=0)},e.prototype.drawLines=function(){var t=this,e=this.get("lineGroup");!e||e.destroyed?(e=this.get("group").addGroup(),this.set("lineGroup",e)):e.clear(),l.each(this.get("items"),(function(i){t._lineToLabel(i,e)}))},e.prototype._lineToLabel=function(t,e){if(t.labelLine){var i=l.isBoolean(t.labelLine)?{}:t.labelLine,n=void 0===t.capture?this.get("capture"):t.capture,r=i.path;if(r&&l.isFunction(i.path)&&(r=i.path(t)),!r){var a=t.start;r=[["M",a.x,a.y],["L",t.x,t.y]]}var o=t.color;o||(o=t.textStyle&&t.textStyle.fill?t.textStyle.fill:"#000");var s=e.addShape("path",{capture:n,attrs:l.mix({path:r,stroke:o,fill:null},i)});s.name=this.get("name"),s.id=t.id&&t.id.replace("glabel","glabelline"),s.set("coord",this.get("coord"))}},e.prototype._adjustLabels=function(){var t=this.get("type"),e=this.getLabels(),i=this.get("shapes"),n=kt[t];n&&n(e,i)},e.prototype.getLabels=function(){var t=this.get("container");if(t)return l.toArray(t.childNodes);var e=this.get("group").get("children");return l.filter(e,(function(t){return t.isShape}))},e.prototype._createText=function(t){var e,i=t,n=this.get("container"),r=void 0===i.capture?this.get("capture"):i.capture;if(!i.useHtml&&!i.htmlTemplate){var a=this.get("name"),o=i.origin,s=this.get("group");delete i.origin;var u=i.rotate;return i.textStyle&&(i.textStyle.rotate&&(u=i.textStyle.rotate,delete i.textStyle.rotate),i=l.mix({x:i.x,y:i.y,textAlign:i.textAlign,text:i.text},i.textStyle)),e=s.addShape("text",{capture:r,attrs:i}),u&&(Math.abs(u)>2*Math.PI&&(u=u/180*Math.PI),e.transform([["t",-i.x,-i.y],["r",u],["t",i.x,i.y]])),e.setSilent("origin",o||i),e.name=a,this.get("appendInfo")&&e.setSilent("appendInfo",this.get("appendInfo")),e}n||(n=this._initHtmlContainer());var c=this._createDom(i);n.appendChild(c),this._setCustomPosition(i,c)},e.prototype._initHtmlContainer=function(){var t=this.get("container");if(!t){var e=this.get("containerTpl"),i=this.get("canvas").get("el").parentNode;t=p.createDom(e),i.style.position="relative",i.appendChild(t),this.set("container",t)}return t},e.prototype._createDom=function(t){var e=this.get("itemTpl"),i=l.substitute(e,{text:t.text});return p.createDom(i)},e.prototype._setCustomPosition=function(t,e){var i=t.textAlign||"left",n=t.y,r=t.x,a=p.getOuterWidth(e);n-=p.getOuterHeight(e)/2,"center"===i?r-=a/2:"right"===i&&(r-=a),e.style.top=parseInt(n,10)+"px",e.style.left=parseInt(r,10)+"px"},e}(xt),Pt=Ct,Ot=function(t){function e(e){return t.call(this,Object(h.__assign)({x:0,y:0,items:null,titleContent:null,showTitle:!0,panelRange:null,inPanel:!0,crosshairs:null},e))||this}return Object(h.__extends)(e,t),e.prototype.isContentChange=function(t,e){var i=this.get("titleContent"),n=this.get("items"),r=!(t===i&&n.length===e.length);return r||l.each(e,(function(t,e){var i=n[e],a=Object.keys(t);if(r=a.some((function(e){return!l.isObject(t[e])&&t[e]!==i[e]})))return!1})),r},e.prototype.setContent=function(t,e){return this.set("items",e),this.set("titleContent",t),this.render(),this},e.prototype.setPosition=function(t,e,i){this.set("x",t),this.set("y",e)},e.prototype.setMarkers=function(t,e){var i=this.get("markerGroup"),n=this.get("frontgroundGroup");i?i.clear():(i=n.addGroup({zIndex:1,capture:!1}),this.set("markerGroup",i)),l.each(t,(function(t){i.addShape("marker",{color:t.color,attrs:l.mix({fill:t.color,symbol:"circle",shadowColor:t.color},e,{x:t.x,y:t.y})})})),this.set("markerItems",t)},e.prototype.clearMarkers=function(){var t=this.get("markerGroup");t&&t.clear()},e.prototype.render=function(){},e.prototype.clear=function(){},e.prototype.show=function(){this.set("visible",!0)},e.prototype.hide=function(){this.set("visible",!1)},e}(xt),At=function(t){function e(e){var i=t.call(this,Object(h.__assign)({type:null,plot:null,panelRange:null,rectStyle:{fill:"#CCD6EC",opacity:.3},lineStyle:{stroke:"rgba(0, 0, 0, 0.25)",lineWidth:1},isTransposed:!1},e))||this;return i._init_(),i.render(),i}return Object(h.__extends)(e,t),e.prototype._init_=function(){var t,e=this.get("plot");t="rect"===this.get("type")?e.addGroup({zIndex:0}):e.addGroup(),this.set("container",t)},e.prototype._addLineShape=function(t,e){var i=this.get("container").addShape("line",{attrs:t,capture:!1});return this.set("crossLineShape"+e,i),i},e.prototype._renderHorizontalLine=function(t,e){var i=l.mix(this.get("lineStyle"),this.get("style")),n=l.mix({x1:e?e.bl.x:t.get("width"),y1:0,x2:e?e.br.x:0,y2:0},i);this._addLineShape(n,"X")},e.prototype._renderVerticalLine=function(t,e){var i=l.mix(this.get("lineStyle"),this.get("style")),n=l.mix({x1:0,y1:e?e.bl.y:t.get("height"),x2:0,y2:e?e.tl.y:0},i);this._addLineShape(n,"Y")},e.prototype._renderBackground=function(t,e){var i=l.mix(this.get("rectStyle"),this.get("style")),n=this.get("container"),r=l.mix({x:e?e.tl.x:0,y:e?e.tl.y:t.get("height"),width:e?e.br.x-e.bl.x:t.get("width"),height:e?Math.abs(e.tl.y-e.bl.y):t.get("height")},i),a=n.addShape("rect",{attrs:r,capture:!1});return this.set("crosshairsRectShape",a),a},e.prototype._updateRectShape=function(t){var e,i=this.get("crosshairsRectShape"),n=this.get("isTransposed"),r=t[0],a=t[t.length-1],o=n?"y":"x",s=n?"height":"width",u=r[o];if(t.length>1&&r[o]>a[o]&&(u=a[o]),this.get("width"))i.attr(o,u-this.get("crosshairs").width/2),i.attr(s,this.get("width"));else if(l.isArray(r.point[o])&&!r.size){var c=r.point[o][1]-r.point[o][0];i.attr(o,r.point[o][0]),i.attr(s,c)}else e=3*r.size/4,i.attr(o,u-e),1===t.length?i.attr(s,3*r.size/2):i.attr(s,Math.abs(a[o]-r[o])+2*e)},e.prototype.render=function(){var t=this.get("canvas"),e=this.get("panelRange"),i=this.get("isTransposed");switch(this.clear(),this.get("type")){case"x":this._renderHorizontalLine(t,e);break;case"y":this._renderVerticalLine(t,e);break;case"cross":this._renderHorizontalLine(t,e),this._renderVerticalLine(t,e);break;case"rect":this._renderBackground(t,e);break;default:i?this._renderHorizontalLine(t,e):this._renderVerticalLine(t,e)}},e.prototype.show=function(){this.get("container").show()},e.prototype.hide=function(){this.get("container").hide()},e.prototype.clear=function(){var t=this.get("container");this.set("crossLineShapeX",null),this.set("crossLineShapeY",null),this.set("crosshairsRectShape",null),t.clear()},e.prototype.destroy=function(){var e=this.get("container");t.prototype.destroy.call(this),e.remove()},e.prototype.setPosition=function(t,e,i){var n=this.get("crossLineShapeX"),r=this.get("crossLineShapeY"),a=this.get("crosshairsRectShape");r&&!r.get("destroyed")&&r.move(t,0),n&&!n.get("destroyed")&&n.move(0,e),a&&!a.get("destroyed")&&this._updateRectShape(i)},e}(xt),Lt='"-apple-system", "BlinkMacSystemFont", "Segoe UI", Roboto, "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", SimSun, "sans-serif"',Tt=((wt={})["g2-tooltip"]={position:"absolute",visibility:"hidden",zIndex:8,transition:"visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1), left 0.4s cubic-bezier(0.23, 1, 0.32, 1), top 0.4s cubic-bezier(0.23, 1, 0.32, 1)",backgroundColor:"rgba(255, 255, 255, 0.9)",boxShadow:"0px 0px 10px #aeaeae",borderRadius:"3px",color:"rgb(87, 87, 87)",fontSize:"12px",fontFamily:Lt,lineHeight:"20px",padding:"10px 10px 6px 10px"},wt["g2-tooltip-title"]={marginBottom:"4px"},wt["g2-tooltip-list"]={margin:0,listStyleType:"none",padding:0},wt["g2-tooltip-list-item"]={marginBottom:"4px"},wt["g2-tooltip-marker"]={width:"5px",height:"5px",borderRadius:"50%",display:"inline-block",marginRight:"8px"},wt["g2-tooltip-value"]={display:"inline-block",float:"right",marginLeft:"30px"},wt),It=20;function Dt(t,e,i,n,r,a){var o=t,s=e,u=0,l=0,c=20;if(a){var h=a.getBBox();u=h.width,l=h.height,o=h.x,s=h.y,c=5}switch(i){case"inside":o=o+u/2-n/2,s=s+l/2-r/2;break;case"top":o=o+u/2-n/2,s=s-r-c;break;case"left":o=o-n-c,s=s+l/2-r/2;break;case"right":o=o+u+c,s=s+l/2-r/2;break;case"bottom":default:o=o+u/2-n/2,s=s+l+c}return[o,s]}function jt(t,e,i,n,r,a){var o=t,s=e;return o+i+It>r?o=(o-=i+It)<0?0:o:o+It<0?o=It:o+=It,s+n+It>a?s=(s-=n+It)<0?0:s:s+It<0?s=It:s+=It,[o,s]}function Et(t,e,i,n,r,a){var o=t,s=e;return o+i>r.tr.x&&(o-=i+2*It),or.bl.y&&(s-=n+2*It),s\n
\n
    \n ',itemTpl:'
  • \n \n {name}{value}
  • ',htmlContent:null,follow:!0,enterable:!1},e))||this,n=Tt;if(i.style=Gt(n,e),i._init_(),i.get("items")&&i.render(),i.get("crosshairs")){var r=i.get("frontgroundGroup"),a=new At(l.mix({plot:r,panelRange:i.get("panelRange"),canvas:i.get("canvas")},i.get("crosshairs")));a.hide(),i.set("crosshairGroup",a)}return i}return Object(h.__extends)(e,t),e.prototype._init_=function(){var t,e=this.get("containerTpl"),i=this.get("canvas").get("el").parentNode;if(this.get("htmlContent"))t=this._getHtmlContent();else if(/^\#/.test(e)){var n=e.replace("#","");t=document.getElementById(n)}else t=p.createDom(e);this.set("container",t),p.modifyCSS(t,this.style[Bt]),i.appendChild(t),i.style.position="relative"},e.prototype.render=function(){if(this.clear(),this.get("htmlContent")){var t=this.get("canvas").get("el").parentNode,e=this._getHtmlContent();t.appendChild(e),p.modifyCSS(e,this.style[Bt]),this.set("container",e)}else this._renderTpl()},e.prototype._renderTpl=function(){var t=this,e=this.get("showTitle"),i=this.get("titleContent"),n=this.get("container"),r=Ht(n,Ft),a=Ht(n,Rt),o=this.get("items");r&&e&&(p.modifyCSS(r,this.style[Ft]),r.innerHTML=i),a&&(p.modifyCSS(a,this.style[Rt]),l.each(o,(function(e,i){a.appendChild(t._addItem(e,i))})))},e.prototype.clear=function(){var t=this.get("container");if(t&&this.get("htmlContent"))t.remove();else{var e=Ht(t,Ft),i=Ht(t,Rt);e&&(e.innerHTML=""),i&&(i.innerHTML="")}},e.prototype.show=function(){var e=this.get("container");e.style.visibility="visible",e.style.display="block";var i=this.get("crosshairGroup");i&&i.show();var n=this.get("markerGroup");n&&n.show(),t.prototype.show.call(this),this.get("canvas").draw()},e.prototype.hide=function(){var e=this.get("container");e.style.visibility="hidden",e.style.display="none";var i=this.get("crosshairGroup");i&&i.hide();var n=this.get("markerGroup");n&&n.hide(),t.prototype.hide.call(this),this.get("canvas").draw()},e.prototype.destroy=function(){var e=this.get("container"),i=this.get("containerTpl");e&&!/^\#/.test(i)&&e.parentNode.removeChild(e);var n=this.get("crosshairGroup");n&&n.destroy();var r=this.get("markerGroup");r&&r.remove(),t.prototype.destroy.call(this)},e.prototype._addItem=function(t,e){var i=this.get("itemTpl"),n=l.substitute(i,l.mix({index:e},t)),r=p.createDom(n);p.modifyCSS(r,this.style["g2-tooltip-list-item"]);var a=Ht(r,Nt);a&&p.modifyCSS(a,this.style[Nt]);var o=Ht(r,zt);return o&&p.modifyCSS(o,this.style[zt]),r},e.prototype._getHtmlContent=function(){var t=this.get("htmlContent")(this.get("titleContent"),this.get("items"));return l.isElement(t)?t:p.createDom(t)},e.prototype.setPosition=function(e,i,n){var r,a=e,o=i,s=this.get("container"),u=this.get("canvas").get("el"),c=p.getWidth(u),h=p.getHeight(u),f=s.clientWidth,d=s.clientHeight,g=a,v=o,y=this.get("prePosition")||{x:0,y:0};if(this.get("enterable")?(r=[a,o-=s.clientHeight/2],y&&a-y.x>0?a-=s.clientWidth+1:a+=1):this.get("position")?(a=(r=Dt(a,o,this.get("position"),f,d,n))[0],o=r[1]):(a=(r=jt(a,o,f,d,c,h))[0],o=r[1]),this.get("inPanel")){var m=this.get("panelRange"),x=this.get("panelGroup").attr("clip");a=(r=Et(a,o,f,d,x?x.getBBox():m,this.get("enterable")))[0],o=r[1]}var _=this.get("markerItems");l.isEmpty(_)||(g=_[0].x,v=_[0].y),this.set("prePosition",r),this.get("follow")&&(s.style.left=a+"px",s.style.top=o+"px");var b=this.get("crosshairGroup");if(b){var M=this.get("items");b.setPosition(g,v,M)}t.prototype.setPosition.call(this,a,o)},e}(Ot),Wt=function(t){function e(e){var i=t.call(this,Object(h.__assign)({backgroundStyle:{x:0,y:0,width:100,height:100,fill:"rgba(255, 255, 255, 0.9)",radius:4,stroke:"#e2e2e2",lineWidth:1},titleStyle:{fontFamily:Lt,text:"",textBaseline:"top",fontSize:12,fill:"rgb(87, 87, 87)",lineHeight:20,padding:20},markerStyle:{radius:4},nameStyle:{fontFamily:Lt,fontSize:12,fill:"rgb(87, 87, 87)",textBaseline:"middle",textAlign:"start",padding:8},valueStyle:{fontFamily:Lt,fontSize:12,fill:"rgb(87, 87, 87)",textBaseline:"middle",textAlign:"start",padding:30},padding:{top:20,right:20,bottom:20,left:20},itemGap:10,animationDuration:200},e))||this;if(i.get("crosshairs")){var n=i.get("frontgroundGroup"),r=new At(l.mix({plot:n,panelRange:i.get("panelRange"),canvas:i.get("canvas")},i.get("crosshairs")));r.hide(),i.set("crosshairGroup",r)}return i._init_(),i.get("items")&&i.render(),i}return Object(h.__extends)(e,t),e.prototype._init_=function(){var t=this.get("padding"),e=this.get("frontgroundGroup"),i=e.addGroup({capture:!1});this.set("markerGroup",i);var n=e.addGroup();n.hide(),this.set("container",n);var r=n.addShape("rect",{attrs:l.mix({},this.get("backgroundStyle"))});this.set("board",r);var a=this.get("titleStyle");if(this.get("showTitle")){var o=n.addShape("text",{attrs:l.mix({x:t.left,y:t.top},a)});this.set("titleShape",o),o.name="tooltip-title"}var s=n.addGroup();s.move(t.left,t.top+a.lineHeight+a.padding),this.set("itemsGroup",s)},e.prototype.render=function(){var t=this;this.clear();var e=this.get("container"),i=this.get("board"),n=this.get("showTitle"),r=this.get("titleContent"),a=this.get("titleShape"),o=this.get("itemsGroup"),s=this.get("items"),u=this.get("padding");a&&n&&a.attr("text",r);var c=this.get("itemGap"),h=0;l.each(s,(function(e){var i=t._addItem(e);i.move(0,h),o.add(i);var n=i.getBBox().height;h+=n+c}));var p=e.getBBox(),f=p.width+u.right,d=p.height+u.bottom;i.attr("width",f),i.attr("height",d),this._alignToRight(f)},e.prototype.clear=function(){var t=this.get("titleShape"),e=this.get("itemsGroup"),i=this.get("board");t&&(t.text=""),e.clear(),i.attr("width",0),i.attr("height",0)},e.prototype.show=function(){this.get("container").show();var e=this.get("crosshairGroup");e&&e.show();var i=this.get("markerGroup");i&&i.show(),t.prototype.show.call(this),this.get("canvas").draw()},e.prototype.hide=function(){this.get("container").hide();var e=this.get("crosshairGroup");e&&e.hide();var i=this.get("markerGroup");i&&i.hide(),t.prototype.hide.call(this),this.get("canvas").draw()},e.prototype.destroy=function(){var e=this.get("container"),i=this.get("crosshairGroup");i&&i.destroy();var n=this.get("markerGroup");n&&n.remove(),t.prototype.destroy.call(this),e.remove()},e.prototype.setPosition=function(e,i,n){var r,a=e,o=i,s=this.get("container"),u=this.get("canvas").get("el"),c=p.getWidth(u),h=p.getHeight(u),f=s.getBBox(),d=f.width,g=f.height,v=a,y=o;if(this.get("position")?(a=(r=Dt(a,o,this.get("position"),d,g,n))[0],o=r[1]):(a=(r=jt(a,o,d,g,c,h))[0],o=r[1]),this.get("inPanel")){var m=this.get("panelRange"),x=this.get("panelGroup").attr("clip");a=(r=Et(a,o,d,g,x?x.getBBox():m,this.get("enterable")))[0],o=r[1]}var _=this.get("markerItems");l.isEmpty(_)||(v=_[0].x,y=_[0].y);var b=Object(D.transform)([1,0,0,0,1,0,0,0,1],[["t",a,o]]);s.stopAnimate(),s.animate({matrix:b},this.get("animationDuration"));var M=this.get("crosshairGroup");if(M){var S=this.get("items");M.setPosition(v,y,S)}t.prototype.setPosition.call(this,a,o)},e.prototype._addItem=function(t){var e=new u.Group,i=this.get("markerStyle").radius;if(t.marker){var n=l.mix({},t.marker,{x:t.marker.radius/2,y:0});e.addShape("marker",{attrs:n}),i=t.marker.radius}var r=this.get("nameStyle");e.addShape("text",{attrs:l.mix({x:i+r.padding,y:0,text:t.name},r)});var a=this.get("valueStyle");return e.addShape("text",{attrs:l.mix({x:e.getBBox().width+a.padding,y:0,text:t.value},a)}),e},e.prototype._alignToRight=function(t){var e=this,i=this.get("itemsGroup").get("children");l.each(i,(function(i){var n=i.get("children")[2];if(n){var r=n.getBBox().width,a=t-r-2*e.get("padding").right;n.attr("x",a)}}))},e}(Ot),Vt={title:{textStyle:{fontSize:12,fill:"#595959",textBaseline:"middle",fontFamily:Lt,textAlign:"center"},offset:20},label:{textStyle:{fontSize:12,fill:"#ccc",textBaseline:"middle",fontFamily:Lt},offset:10,offsetX:0,offsetY:0},grid:{lineWidth:1,stroke:"#C0D0E0"}},qt=function(t){function e(e){var i=t.call(this,Object(h.__assign)({type:"base",id:null,line:{lineWidth:1,stroke:"#C0D0E0"},tickLine:{lineWidth:1,stroke:"#C0D0E0",length:5},subTickCount:0,subTickLine:null,grid:null,label:null,title:null,autoRotateLabel:!0,autoHideLabel:!1,autoRotateTitle:!0,gridType:"line",ticks:[],labelItems:[],gridPoints:[]},e))||this;return i._processTicks(),i}return Object(h.__extends)(e,t),e.prototype.render=function(){this.get("line")&&this._renderLine(),this.get("tickLine")&&this._renderTicks(),this.get("grid")&&this._renderGrid(),this.get("label")&&this._renderLabels(),this.get("title")&&(this.set("title",l.deepMix({},Vt.title,this.get("title"))),this.renderTitle())},e.prototype.destroy=function(){if(!this.destroyed){t.prototype.destroy.call(this);var e=this.get("gridGroup");e&&e.remove();var i=this.get("labelRenderer");i&&i.destroy(),this.get("group").destroy(),this.destroyed=!0}},e.prototype.clear=function(){var t=this.get("group");if(!t.get("destroyed")&&t.get("children").length){var e=this.get("gridGroup");e&&e.clear();var i=this.get("labelRenderer");i&&i.clear(),this.get("group").clear()}},e.prototype.parseTick=function(t,e,i){return{text:t,value:e/(i-1)}},e.prototype.addLabel=function(t,e,i,n){var r=this.get("theme")||{},a=this.get("label"),o=a;if(l.isFunction(o)){var s=a(t.text,i,n);o=s?l.deepMix({},r.label,s):null}if(o){o=l.deepMix({text:t.text},Vt.label,o);var u=this.getSideVector(o.offset,e,i),c={x:e.x+u[0]+o.offsetX,y:e.y+u[1]+o.offsetY};o.x=c.x,o.y=c.y,o.point=c,o.textAlign=this.getTextAnchor(u),l.isNil(e.rotate)||(o.rotate=e.rotate),o.useHtml&&(o.text=o.htmlTemplate),this.get("labelItems").push(o)}},e.prototype.getTextAnchor=function(t){return Math.abs(t[1]/t[0])>=1?"center":t[0]>0?"start":"end"},e.prototype.getMaxLabelWidthOrHeight=function(t,e){var i=t.getLabels(),n=0;return l.each(i,(function(t){var i=t.getBBox()[e];n0){var s=e.value-r[a-1].value;s/=t.get("subTickCount")+1;for(var u=1;u<=i;u++){var l={text:"",value:a?r[a-1].value+u*s:u*s},c=t.getTickPoint(l.value),h=void 0;h=o&&o.length?o.length:Math.floor(.6*n.length),t._addTickItem(u-1,c,h,"sub")}}}))}},e.prototype._parseTicks=function(t){void 0===t&&(t=[]);for(var e=t.length,i=0;i=0;r--){var a=e[r],o=a.x,s=a.y,u=a.radius,c=a.flag;r===e.length-1?n.push(["M",o,s]):n.push(["A",u,u,0,0,1===c?0:1,o,s])}}else{l.each(t,(function(t,e){var i=t.x,r=t.y;0===e?n.push(["M",i,r]):n.push(["L",i,r])}));for(var h=e.length-1;h>=0;h--)n.push(["L",e[h].x,e[h].y]);n.push(["Z"])}return{fill:i,path:n}},e}(xt),Xt=function(t){function e(e){return void 0===e&&(e={}),t.call(this,Object(h.__assign)({type:"circle",startAngle:-Math.PI/2,endAngle:3*Math.PI/2},e))||this}return Object(h.__extends)(e,t),e.prototype.parseTick=function(t,e,i){return{text:t,value:e/i}},e.prototype.getTickPoint=function(t){var e=this.get("startAngle"),i=e+(this.get("endAngle")-e)*t;return this._getCirclePoint(i)},e.prototype.getSideVector=function(t,e){var i=this.get("center"),n=[e.x-i.x,e.y-i.y];if(!l.isNil(t)){var r=D.vec2.length(n);D.vec2.scale(n,n,t/r)}return n},e.prototype.getSidePoint=function(t,e){var i=this.getSideVector(e,t);return{x:t.x+i[0],y:t.y+i[1]}},e.prototype.getTickEnd=function(t,e){var i=this.get("tickLine"),n=l.isNil(e)?i.length:e;return this.getSidePoint(t,n)},e.prototype.getTextAnchor=function(t){var e;return l.isNumberEqual(t[0],0)?e="center":t[0]>0?e="left":t[0]<0&&(e="right"),e},e.prototype.getLinePath=function(){var t=this.get("center"),e=t.x,i=t.y,n=this.get("radius"),r=n,a=this.get("startAngle"),o=this.get("endAngle"),s=this.get("inner"),u=[];if(Math.abs(o-a)===2*Math.PI)u=[["M",e,i],["m",0,-r],["a",n,r,0,1,1,0,2*r],["a",n,r,0,1,1,0,-2*r],["z"]];else{var l=this._getCirclePoint(a),c=this._getCirclePoint(o),h=Math.abs(o-a)>Math.PI?1:0,p=a>o?0:1;if(s){var f=this.getSideVector(s*n,l),d=this.getSideVector(s*n,c),g={x:f[0]+e,y:f[1]+i},v={x:d[0]+e,y:d[1]+i};u=[["M",g.x,g.y],["L",l.x,l.y],["A",n,r,0,h,p,c.x,c.y],["L",v.x,v.y],["A",n*s,r*s,0,h,Math.abs(p-1),g.x,g.y]]}else u=[["M",e,i],["L",l.x,l.y],["A",n,r,0,h,p,c.x,c.y],["L",e,i]]}return u},e.prototype.addLabel=function(e,i,n,r){var a=l.get(this.get("label"),"offset",5),o=this.getSidePoint(i,a);t.prototype.addLabel.call(this,e,o,n,r)},e.prototype.autoRotateLabels=function(){var t=this.get("ticks"),e=this.get("labelRenderer");if(e&&t.length>12){var i=this.get("radius"),n=this.get("startAngle"),r=this.get("endAngle")-n,a=r/(t.length-1),o=Math.sin(a/2)*i*2,s=this.getMaxLabelWidthOrHeight(e,"width");l.each(e.getLabels(),(function(e,i){var a=t[i].value*r+n,u=a%(2*Math.PI);sMath.PI&&(a-=Math.PI),a-=Math.PI/2,e.attr("textAlign","center")):u>Math.PI/2?a-=Math.PI:ur.x)&&(s=!0);var u=D.vec2.vertical([],o,s);return D.vec2.scale([],u,t*i)},e.prototype.getAxisVector=function(){var t=this.get("start"),e=this.get("end");return[e.x-t.x,e.y-t.y]},e.prototype.getLinePath=function(){var t=this.get("start"),e=this.get("end");return[["M",t.x,t.y],["L",e.x,e.y]]},e.prototype.getTickEnd=function(t,e){var i=this.getSideVector(e);return{x:t.x+i[0],y:t.y+i[1]}},e.prototype.getTickPoint=function(t){var e=this.get("start"),i=this.get("end"),n=i.x-e.x,r=i.y-e.y;return{x:e.x+n*t,y:e.y+r*t}},e.prototype.renderTitle=function(){var t=this.get("title"),e=this.get("autoRotateTitle"),i=this.getTickPoint(.5),n=t.offset?t.offset:20,r=this.get("labelRenderer");if(r){var a="bottom"===(p=this.get("position"))||"top"===p?"height":"width";n+=this.getMaxLabelWidthOrHeight(r,a)+l.get(this.get("label"),"offset",5)}var o=t.textStyle,s=l.mix({},o);if(t.text){var u=this.getAxisVector();if(e&&l.isNil(t.rotate)){var c=0;if(!l.isNumberEqual(u[1],0)){var h=[u[0],u[1]];c=D.vec2.angleTo(h,[1,0],!0)}s.rotate=c*(180/Math.PI)}else l.isNil(t.rotate)||(s.rotate=t.rotate/180*Math.PI);var p,f=this.getSideVector(n),d=void 0;d="start"===(p=t.position)?{x:this.get("start").x+f[0],y:this.get("start").y+f[1]}:"end"===p?{x:this.get("end").x+f[0],y:this.get("end").y+f[1]}:{x:i.x+f[0],y:i.y+f[1]},s.x=d.x,s.y=d.y,s.text=t.text;var g=this.get("group").addShape("Text",{zIndex:2,attrs:s});g.name="axis-title",this.get("appendInfo")&&g.setSilent("appendInfo",this.get("appendInfo"))}},e.prototype.autoRotateLabels=function(){var t=this.get("labelRenderer"),e=this.get("title");if(t){var i=t.getLabels(),n=this.get("label").offset,r=e&&e.offset?e.offset:20;if(r<0)return;var a,o=this.getAxisVector(),s=void 0;if(l.isNumberEqual(o[0],0)&&e&&e.text)(s=this.getMaxLabelWidthOrHeight(t,"width"))>r-n-12&&(a=-1*Math.acos((r-n-12)/s));else if(l.isNumberEqual(o[1],0)&&i.length>1){var u=Math.abs(this._getAvgLabelLength(t));(s=this.getMaxLabelWidthOrHeight(t,"width"))>u&&(a=Math.asin(1.25*(r-n-12)/s))}if(a){var c=this.get("factor");l.each(i,(function(t){t.rotateAtStart(a),l.isNumberEqual(o[1],0)&&(c>0?t.attr("textAlign","left"):t.attr("textAlign","right"))}))}}},e.prototype.autoHideLabels=function(){var t,e,i=this.get("labelRenderer");if(i){var n=this.get("tickItems"),r=i.getLabels(),a=this.getAxisVector();if(r.length<2)return;if(l.isNumberEqual(a[0],0)){var o=this.getMaxLabelWidthOrHeight(i,"height")+8,s=Math.abs(this._getAvgLabelHeightSpace(i));o>s&&(t=o,e=s)}else if(l.isNumberEqual(a[1],0)&&r.length>1){var u=this.getMaxLabelWidthOrHeight(i,"width")+8,c=Math.abs(this._getAvgLabelLength(i));u>c&&(t=u,e=c)}if(t&&e){var h=Math.ceil(t/e);if(l.each(r,(function(t,e){e%h!=0&&(t.set("visible",!1),t.attr("text",""))})),n){var p=l.filter(n,(function(t,e){return r[e].get("visible")}));l.size(p)>0&&(this.set("tickItems",p),l.remove(this.get("group").get("children"),(function(t){return"axis-ticks"===t.name})),this._renderTicks())}}}},e.prototype._getAvgLabelLength=function(t){var e=t.getLabels();return e[1].attr("x")-e[0].attr("x")},e.prototype._getAvgLabelHeightSpace=function(t){var e=t.getLabels();return e[1].attr("y")-e[0].attr("y")},e}(qt),Qt=function(t){function e(e){var i=t.call(this,Object(h.__assign)({type:"base",title:null,items:null,formatter:null,offsetX:0,offsetY:0},e))||this;return i.init(),i.render(),i.bindEvents(),i}return Object(h.__extends)(e,t),e.prototype.render=function(){this.renderTitle(),this.renderItems()},e.prototype.getWidth=function(){return this.get("container").getBBox().width},e.prototype.getHeight=function(){return this.get("container").getBBox().height},e.prototype.getBBox=function(){return this.get("container").getBBox()},e.prototype.moveTo=function(t,e){this.get("container").move(t,e),this.set("x",t),this.set("y",e)},e.prototype.draw=function(){this.get("canvas").draw()},e.prototype.formatterValue=function(t){return(this.get("formatter")||l.identity).call(this,t)},e}(xt),$t=8,Kt=2*$t,Jt=2*Kt,te={fill:"#fff",shadowBlur:10,shadowColor:"rgba(0,0,0,0.65)",radius:2},ee={fill:"#333",textAlign:"center",textBaseline:"middle",stroke:"#fff",lineWidth:5,fontFamily:Lt},ie={fill:"#D9D9D9"},ne={fill:"rgb(64, 141, 251)"},re={fill:"#333",textBaseline:"top",textAlign:"start",fontFamily:Lt},ae=function(t){function e(e){var i=t.call(this)||this;i.onMouseMove=function(t){var e=t.clientX,n=t.clientY;i.updateSliderStatus(e,n)},i.onMouseUp=function(){i.clearAllEvents&&i.clearAllEvents(),i.currentTarget=void 0};var n=e.layout,r=e.sliderType,a=e.sliderSize,o=e.operational,s=e.width,u=e.height,l=e.textStyle,c=e.min,h=e.max,p=e.range,f=e.formatter;i.layout=n,i.sliderType=r;var d=a||[],g=d[0],v=void 0===g?$t:g,y=d[1],m=void 0===y?Kt:y;return i.sliderSize=[v,m],i.operational=o,i.width=s,i.height=u,i.min=c,i.max=h,i.range=p,i.textStyle=l,i.formatter=f,i.initialSlider(),i}return Object(h.__extends)(e,t),e.prototype.setBackground=function(t){this.backgroundGroup&&this.backgroundGroup.destroy();var e=t.group,i=(t.background,t.frontend);this.backgroundGroup=e,this.backgroundGroup.set("zIndex",0),this.operational&&this.rangeSliderShape&&i&&i.attr("clip",this.rangeSliderShape),this.add(this.backgroundGroup),this.sort()},e.prototype.isHorizontal=function(){return"horizontal"===this.layout},e.prototype.initialSlider=function(){if(this.operational){this.rangeSliderShape=this.createRangeSliderShape(),this.rangeSliderShape.set("zIndex",1),this.minSliderGroup=this.createMinSliderGroup(),this.minSliderGroup.set("zIndex",2),this.maxSliderGroup=this.createMaxSliderGroup(),this.maxSliderGroup.set("zIndex",2);var t=this.range,e=t[0],i=t[1];this.renderUIWithRange(e,i)}this.bindEvent()},e.prototype.getSliderCursor=function(){return this.isHorizontal()?"ew-resize":"ns-resize"},e.prototype.createMinSliderGroup=function(){var t=this.addGroup();return this.minSliderShape=this.createSliderButton(t,!0),this.minTextShape=this.createSliderText(t,!0),t},e.prototype.createMaxSliderGroup=function(){var t=this.addGroup();return this.maxSliderShape=this.createSliderButton(t,!1),this.maxTextShape=this.createSliderText(t,!1),t},e.prototype.createRangeSliderShape=function(){return this.addShape("rect",{attrs:{fill:"#fff",fillOpacity:0,cursor:"move"}})},e.prototype.getRectButtonAttribute=function(t){var e=this.sliderSize,i=e[0],n=e[1];return this.isHorizontal()?{x:t?-i:0,y:this.height/2-n/2,width:i,height:n}:{x:this.width/2-n/2,y:t?0:-i,width:n,height:i}},e.prototype.getCircleButtonAttribute=function(t){return this.isHorizontal()?{x:0,y:this.height/2,r:Jt/2}:{x:this.width/2,y:0,r:Jt/2}},e.prototype.createSliderButton=function(t,e){var i="rect"===this.sliderType?this.getRectButtonAttribute(e):"circle"===this.sliderType?this.getCircleButtonAttribute(e):{},n=Object(h.__assign)(Object(h.__assign)(Object(h.__assign)({},i),te),{cursor:this.getSliderCursor()});return t.addShape(this.sliderType,{attrs:n})},e.prototype.getRectTextAttribute=function(t){var e=this.sliderSize,i=e[0],n=e[1];return this.isHorizontal()?{x:t?-i/2:i/2,y:this.height/2+n/2+4,textAlign:"center",textBaseline:"top"}:{x:this.width/2+n/2+4,y:t?i/2:-i/2,textAlign:"left",textBaseline:"middle"}},e.prototype.getCircleTextAttribute=function(t){return this.isHorizontal()?{x:0,y:this.height/2+Jt/2+4,textAlign:"center",textBaseline:"top"}:{x:this.width/2+Jt/2+4,y:0,textAlign:"left",textBaseline:"middle"}},e.prototype.createSliderText=function(t,e){var i="rect"===this.sliderType?this.getRectTextAttribute(e):"circle"===this.sliderType?this.getCircleTextAttribute(e):{},n=Object(h.__assign)(Object(h.__assign)(Object(h.__assign)({},this.textStyle),i),{text:""});return t.addShape("text",{attrs:n})},e.prototype.bindEvent=function(){this.operational&&this.on("mousedown",this.onMouseDown)},e.prototype.onMouseDown=function(t){this.currentTarget=t.target;var e=t.event;e.stopPropagation(),e.preventDefault();var i=e.clientX,n=e.clientY;this.pos=this.isHorizontal()?i:n,this.bindCanvasEvents()},e.prototype.bindCanvasEvents=function(){var t=this.get("canvas").get("containerDOM"),e=p.addEventListener(t,"mousemove",this.onMouseMove),i=p.addEventListener(t,"mouseup",this.onMouseUp),n=p.addEventListener(t,"mouseleave",this.onMouseUp);this.clearAllEvents=function(){e.remove(),i.remove(),n.remove()}},e.prototype.isDragMin=function(){return this.currentTarget===this.minSliderShape},e.prototype.isDragMax=function(){return this.currentTarget===this.maxSliderShape},e.prototype.isDragAll=function(){return this.currentTarget===this.rangeSliderShape},e.prototype.updateSliderStatus=function(t,e){var i=this,n=this.isHorizontal()?this.width:this.height,r=this.isHorizontal()?1:-1,a=this.range,o=a[0],s=a[1],u=this.pos,l=this.isHorizontal()?t:e,c=(l-u)/n*r,h=[o,s];this.isDragAll()?h=c>=0&&s+c>1?[o+(1-s),1]:c<0&&o+c<0?[0,s-o]:[o+c,s+c]:(this.isDragMin()&&(h[0]=this.getNewRange(o,c)),this.isDragMax()&&(h[1]=this.getNewRange(s,c)),h[1]1?1:i<0?0:i},e.prototype.getValue=function(t){var e=this.min+(this.max-this.min)*t;return Number(e.toFixed(e>1?0:2))},e}(u.Group),oe=function(t){function e(e){var i=e.backgroundStyle,n=e.fillStyle,r=e.textStyle,a=e.titleStyle,o=Object(h.__rest)(e,["backgroundStyle","fillStyle","textStyle","titleStyle"]),s=e.layout,u=void 0===s?"horizontal":s,l={width:"horizontal"===u?156:16,height:"horizontal"===u?16:156};return t.call(this,Object(h.__assign)(Object(h.__assign)({titleDistance:16,layout:"horizontal",operational:!0,handleIcon:"rect",backgroundStyle:Object(h.__assign)(Object(h.__assign)({},ie),i),fillStyle:Object(h.__assign)(Object(h.__assign)({},ne),n),textStyle:Object(h.__assign)(Object(h.__assign)({},ee),r),titleStyle:Object(h.__assign)(Object(h.__assign)({},re),a),width:156,height:16},l),o))||this}return Object(h.__extends)(e,t),e.prototype.init=function(){var t=this.get("container");this.set("canvas",t.get("canvas"));var e=t.addGroup();this.set("legendGroup",e);var i=e.addGroup();this.set("itemsGroup",i),e.translate(this.get("offsetX"),this.get("offsetY"))},e.prototype.renderTitle=function(){if(this.isShowTitle()){var t=this.get("title"),e=this.get("legendGroup"),i=this.get("titleStyle"),n=e.addShape("text",{attrs:Object(h.__assign)({x:0,y:0,text:t},i)});n.name="legend-title",this.set("titleShape",n)}},e.prototype.renderItems=function(){this.renderSlider()},e.prototype.bindEvents=function(){this.isOperational()},e.prototype.clear=function(){var t=this.get("container");t&&!t.destroyed&&t.clear()},e.prototype.destroy=function(){t.prototype.destroy.call(this);var e=this.get("container");e&&!e.destroyed&&(e.get("parent")&&e.remove(!0),e.destroy())},e.prototype.isHorizontal=function(){return"horizontal"===this.get("layout")},e.prototype.isOperational=function(){return this.get("operational")},e.prototype.isShowTitle=function(){return!!this.get("title")},e.prototype.getSliderConfig=function(){return{layout:this.get("layout"),sliderType:this.get("handleIcon"),sliderSize:this.get("handleSize"),sliderStyle:this.get("handleStyle"),operational:this.isOperational(),width:this.get("width"),height:this.get("height"),min:l.head(this.get("items")).value,max:l.last(this.get("items")).value,range:this.get("range")||[0,1],textStyle:Object(h.__assign)({},this.get("textStyle")),formatter:this.formatterValue}},e.prototype.renderSlider=function(){var t=this,e=this.get("itemsGroup"),i=new ae(this.getSliderConfig());if(i.setBackground(this.createBackgroundGroup()),this.isShowTitle()){var n=this.get("titleDistance"),r=this.get("titleShape").getBBox().height;i.translate(0,n+r)}i.on("sliderchange",(function(e){var i=e.value,n=(e.range,new u.Event("itemfilter",e,!0,!0));n.range=i,t.emit("itemfilter",n)})),e.add(i),this.set("slider",i)},e}(Qt),se=(function(t){function e(e){return t.call(this,Object(h.__assign)({type:"size-legend"},e))||this}Object(h.__extends)(e,t),e.prototype.getBackgroundShapeAttr=function(){var t=this.get("width"),e=this.get("height"),i=t/2,n=e/2;return{points:"rect"===this.get("handleIcon")?this.isHorizontal()?[[0,e],[0,e-4],[t,0],[t,e]]:[[0,0],[t,0],[t,e],[t-4,e]]:this.isHorizontal()?[[0,n+2],[0,n-2],[t,n-2],[t,n+2]]:[[i+2,0],[i-2,0],[i-2,e],[i+2,e]]}},e.prototype.createBackgroundGroup=function(){var t=this.getBackgroundShapeAttr(),e=this.get("backgroundStyle"),i=this.get("fillStyle"),n=new u.Polygon({attrs:Object(h.__assign)(Object(h.__assign)({},t),e)}),r=new u.Polygon({attrs:Object(h.__assign)(Object(h.__assign)(Object(h.__assign)({},t),e),i)}),a=new u.Group;return this.isOperational()?(a.add(n),a.add(r)):a.add(r),{group:a,background:n,frontend:r}}}(oe),function(t){function e(e){return t.call(this,Object(h.__assign)({type:"color-legend"},e))||this}Object(h.__extends)(e,t),e.prototype.calculatePercent=function(t){var e=l.head(t).value,i=l.last(t).value-e;return l.map(t,(function(t){return Object(h.__assign)(Object(h.__assign)({},t),{percentage:(Number(t.value)-e)/i})}))},e.prototype.isSegment=function(){return!!this.get("isSegment")},e.prototype.getOperationalGroup=function(){var t,e=this.get("width"),i=this.get("height"),n=this.calculatePercent(this.get("items")),r=this.get("backgroundStyle"),a="";this.isHorizontal()?(a+="l (0) ",l.each(n,(function(e){t=gt.colorUtil.toRGB(e.color),a+=e.percentage+":"+t+" "}))):(a+="l (90) ",l.each(n,(function(e){t=gt.colorUtil.toRGB(e.color),a+=1-e.percentage+":"+t+" "})));var o=new u.Rect({attrs:Object(h.__assign)({x:0,y:0,width:e,height:i,strokeOpacity:0},r)}),s=new u.Rect({attrs:{x:0,y:0,width:e,height:i,fill:a,strokeOpacity:0}}),c=new u.Group;return this.isOperational()?(c.add(o),c.add(s)):c.add(s),{group:c,background:o,frontend:s}},e.prototype.getUnOperationalGroup=function(){var t,e=this,i=this.get("width"),n=this.get("height"),r=this.calculatePercent(this.get("items")),a=this.get("textStyle"),o=new u.Group,s="",c=[],p=r.length;this.isHorizontal()?(s+="l (0) ",l.each(r,(function(u,l){if(0!==l&&l!==p-1&&(c.push(["M",u.percentage*i,0]),c.push(["L",u.percentage*i,n])),t=gt.colorUtil.toRGB(r[l].color),e.isSegment()&&l>0){var f=gt.colorUtil.toRGB(r[l-1].color);s+=u.percentage+":"+f+" "}s+=u.percentage+":"+t+" ",o.addShape("text",{attrs:Object(h.__assign)(Object(h.__assign)({x:u.percentage*i,y:n+4,text:""+e.formatterValue(u.value)},a),{textBaseline:"top",textAlign:"center"})})}))):(s+="l (90) ",l.each(r,(function(u,l){if(0!==l&&l!==p-1&&(c.push(["M",0,n-u.percentage*n]),c.push(["L",i,n-u.percentage*n])),t=gt.colorUtil.toRGB(r[l].color),s+=1-u.percentage+":"+t+" ",e.isSegment()&&l>0){var f=gt.colorUtil.toRGB(r[l-1].color);s+=1-u.percentage+":"+f+" "}o.addShape("text",{attrs:Object(h.__assign)(Object(h.__assign)({x:i+4,y:(1-u.percentage)*n,text:""+e.formatterValue(u.value)},a),{textAlign:"start",textBaseline:"middle"})})})));var f=o.addShape("rect",{attrs:{x:0,y:0,width:i,height:n,fill:s,strokeOpacity:0}});return o.addShape("path",{attrs:{path:c,lineWidth:1,stroke:"#fff"}}),{group:o,background:f,frontend:void 0}},e.prototype.createBackgroundGroup=function(){return this.isOperational()?this.getOperationalGroup():this.getUnOperationalGroup()}}(oe),{right:90*Math.PI/180,left:270*Math.PI/180,up:0,down:180*Math.PI/180}),ue=function(){function t(t){this.width=10,this.height=10,this.direction="right",l.assign(this,t),this._init()}return t.prototype._init=function(){var t=this.width/2,e=this.height/2,i=[{x:0,y:-e},{x:-t,y:e},{x:t,y:e}];this.shape=new u.Path({attrs:l.deepMix({path:[["M",i[0].x,i[0].y],["L",i[1].x,i[1].y],["L",i[2].x,i[2].y],["Z"]]},this.attrs)});var n=[];n.push(["r",se[this.direction]]),n.push(["t",this.x,this.y]),this.shape.transform(n)},t}(),le={layout:"horizontal",titleDistance:15,itemDistance:5,itemMarginBottom:8,wordSpacing:8,backgroundPadding:0,unSelectedColor:"#ccc",offsetX:0,offsetY:0},ce=function(t){function e(e){return t.call(this,Object(h.__assign)(Object(h.__assign)({hoverable:!0,clickable:!0,selectedMode:"multiple",allowAllCanceled:!1,reversed:!1,autoWrap:!0},le),e))||this}return Object(h.__extends)(e,t),e}(Qt),he=(function(t){function e(e){return t.call(this,Object(h.__assign)({type:"category-legend"},e))||this}Object(h.__extends)(e,t),e.prototype.init=function(){this.isFlipped=!1;var t=this.get("container");this.set("canvas",t.get("canvas"));var e=t.addGroup();this.set("itemsGroup",e),this.get("flipPage")&&this.set("autoWrap",!0)},e.prototype.renderTitle=function(){var t=this.get("title");if(t){var e=this.get("container"),i=this.get("titleStyle"),n=e.addShape("text",{attrs:Object(h.__assign)({x:0,y:0,text:t},i)});n.name="legend-title",this.set("titleShape",n)}},e.prototype.renderItems=function(){var t=this,e=this.get("items");this.get("reversed")&&e.reverse(),Object(l.each)(e,(function(e){t._addItem(e)})),this.get("autoWrap")&&this._adjustItems();var i=this._getMaxItemSize(),n=i.maxItemWidth,r=i.maxItemHeight;this.set("maxItemWidth",n),this.set("maxItemHeight",r),this.isNeedFlip()&&this.flipPage(),this._adjustPositionOffset(),this._renderBack()},e.prototype.isNeedFlip=function(){var t=this.get("maxWidth"),e=this.get("maxItemHeight"),i=this.get("itemsGroup").getBBox(),n=this.get("layout");if(this.get("flipPage")){if("vertical"===n&&t1){b-=1,_.text.attr("text",b+" / "+h);var n=Object(l.clone)(a.attr("matrix"));if("vertical"===s){var r=t.get("itemDistance")+e;n[6]+=r}else{r=i+t.get("itemMarginBottom");n[7]+=r}a.stopAnimate(),a.animate({matrix:n},100),t.get("canvas").draw()}})),S.on("click",(function(){if(bo&&Object(l.each)(a,(function(n){i=n.getBBox(),t=f||i.width,e=i.height+u,o-po&&Object(l.each)(a,(function(n,r){e=n.getBBox(),e.width,t=e.height,o-f0&&(d+=i),n.move(d,h)):n.move(d,f),f+=t+u}))},e.prototype._adjustItems=function(){"horizontal"===this.get("layout")?this._adjustHorizontal():this._adjustVertical()},e.prototype._renderBack=function(){var t=this.get("container"),e=this.get("backgroundPadding"),i=this.get("backgroundStyle");Object(l.isNumber)(e)&&(e=[e,e,e,e]),i&&t.renderBack(e,i)},e.prototype._onMousemove=function(t){var e=this._getLegendItem(t.target);if(e&&e.get("checked")){var i=new u.Event("itemmouseover",t,!0,!0);i.item=this._findItem(e),i.checked=e.get("checked"),this.emit("itemmouseover",i),this.get("canvas").draw()}},e.prototype._onMouseleave=function(t){var e=this._getLegendItem(t.target);if(e&&e.get("checked")){var i=new u.Event("itemmouseleave",t,!0,!0);i.item=this._findItem(e),i.checked=e.get("checked"),this.emit("itemmouseleave",i),this.get("canvas").draw()}},e.prototype._onClick=function(t){var e=this,i=this._getLegendItem(t.target);if(i&&!i.get("destroyed")){var n=i.get("checked");if(!this.get("allowAllCanceled")&&n&&1===this.getCheckedCount())return;var r=this.get("selectedMode"),a=this._findItem(i),o=new u.Event("itemclick",t,!0,!0);o.item=a,o.currentTarget=i,o.checked="single"===r||!n;var s,c,p,f=this.get("unSelectedColor"),d=this.get("textStyle").fill;if("single"===r){var g=this.get("itemsGroup").get("children");Object(l.each)(g,(function(t){s=e._findShapeByName(t,"legend-marker"),c=e._findShapeByName(t,"legend-text"),p=e._findShapeByName(t,"legend-item"),t!==i?(s.attr("fill")&&s.attr("fill",f),s.attr("stroke")&&s.attr("stroke",f),c.attr("fill",f),s.set("checked",!1),s.set("rawAttrs",Object(h.__assign)({},s.get("attrs"))),c.set("checked",!1),p.set("checked",!1),t.set("checked",!1)):(s.attr("fill")&&s.attr("fill",a.marker.fill),s.attr("stroke")&&s.attr("stroke",a.marker.stroke),c.attr("fill",d),s.set("rawAttrs",Object(h.__assign)({},s.get("attrs"))),s.set("checked",!0),c.set("checked",!0),p.set("checked",!0),t.set("checked",!0))}))}else s=this._findShapeByName(i,"legend-marker"),c=this._findShapeByName(i,"legend-text"),p=this._findShapeByName(i,"legend-item"),s.attr("fill")&&s.attr("fill",n?f:a.marker.fill),s.attr("stroke")&&s.attr("stroke",n?f:a.marker.stroke),c.attr("fill",n?f:d),i.set("checked",!n),s.set("checked",!n),c.set("checked",!n),p.set("checked",!n);this.emit("itemclick",o),this.get("canvas").draw()}},e.prototype._getLegendItem=function(t){var e=t.get("parent");return e&&"legendGroup"===e.name?e:null},e.prototype._findItem=function(t){var e=this.get("items"),i=null,n=t instanceof u.Group?t.get("value"):t;return Object(l.each)(e,(function(t){if(t.value===n)return i=t,!1})),i},e.prototype._findShapeByName=function(t,e){return t.findBy((function(t){return t.name===e}))},e.prototype._getMaxItemSize=function(){var t=-1/0,e=-1/0,i=this.get("itemsGroup").get("children");return Object(l.each)(i,(function(i){var n=i.getBBox();t-1?t:t.parentNode?t.parentNode.className===e?t.parentNode:ye(t.parentNode,e):null}function me(t,e){return t.getElementsByClassName(e)[0]}!function(t){function e(e){return t.call(this,Object(h.__assign)({type:"html-legend",prefixClassName:"g2-legend",pagination:!0,highlight:!1},e))||this}Object(h.__extends)(e,t),e.prototype.init=function(){var t=this.get("fontFamily"),e=this.get("layout"),i=this.get("maxWidth"),n=this.get("maxHeight"),r=this.get("prefixClassName"),a=this.get("containerTpl");a||(a='
    \n
    \n
      \n
      ');var o=p.createDom(a),s=l.deepMix({},he,this.get("backgroundStyle"));p.modifyCSS(o,Object(h.__assign)({fontFamily:t,maxHeight:n+"px",width:"100%",height:"auto"},s)),"horizontal"===e&&p.modifyCSS(o,{maxWidth:i+"px"});var u=this.get("container");if(u)if(/^\#/.test(u)){var c=u.replace("#","");(u=document.getElementById(c)).appendChild(o)}else u.appendChild(o);else this.get("canvas").get("el").parentNode.appendChild(o);this.set("_legendContainer",o)},e.prototype.renderTitle=function(){var t=this.get("title");if(t){var e=this.get("prefixClassName"),i=this.get("_legendContainer"),n=me(i,e+"-title");n||(n=p.createDom('
      '),i.appendChild(n)),n.innerHTML=t;var r=l.deepMix({},pe,this.get("titleStyle"));p.modifyCSS(n,r),this.set("_titleContainer",n)}},e.prototype.renderItems=function(){var t=this,e=this.get("items");if(e&&e.length){var i=this.get("_legendContainer"),n=this.get("layout"),r=this.get("prefixClassName");this.get("reversed")&&e.reverse();var a=me(i,r+"-list");a||(a=p.createDom('
        '));var o=l.deepMix({},fe,this.get("listStyle"));"horizontal"===n&&(o.width="max-content"),p.modifyCSS(a,o);var s=p.createDom("
        ");i.appendChild(s),s.appendChild(a),this.set("_clipContainer",s),this.set("_itemGroupContainer",a);var u=this.get("itemTpl");u||(u='
      • \n \n \n
      • ');var c=this.get("unSelectedColor"),h=l.deepMix({},de,this.get("itemStyle")),f=l.deepMix({},ge,this.get("markerStyle"));"horizontal"===n?h.display="inline-block":"vertical"===n&&(h.display="block");var d={};l.each(e,(function(e,i){var n,o=e.checked,s=t.formatterValue(e.value),g=e.marker.fill||e.marker.stroke,v=o?g:c;if(l.isFunction(u)){var y=u(s,v,o,i);n=p.createDom(y)}else{me(n=p.createDom(u),r+"-item-text").innerHTML=s}h.color=v,f.backgroundColor=v,p.modifyCSS(n,h),n.setAttribute("data-checked",o),n.setAttribute("data-value",e.value),n.setAttribute("data-color",g);var m=me(n,r+"-item-marker");m&&p.modifyCSS(m,f),a.appendChild(n),d[e.value]=e})),this.set("_itemMap",d),"horizontal"===n?this._renderHorizontalPagination():this._renderPagination()}},e.prototype.bindEvents=function(){var t=this,e=this.get("_itemGroupContainer");e&&(this.get("clickable")&&(e.onclick=function(e){return t._onClick(e)}),this.get("hoverable")&&(e.onmousemove=function(e){return t._onMousemove(e)},e.onmouseout=function(e){return t._onMouseout(e)}))},e.prototype.getWidth=function(){var t=this.get("_legendContainer");return p.getOuterWidth(t)},e.prototype.getHeight=function(){var t=this.get("_legendContainer");return p.getOuterHeight(t)},e.prototype.getBBox=function(){return new u.BBox(this.get("x")||0,this.get("y")||0,this.getWidth(),this.getHeight())},e.prototype.moveTo=function(t,e){var i=this.get("_legendContainer");p.modifyCSS(i,{left:t+"px",top:e+"px"}),this.set("x",t),this.set("y",e)},e.prototype.destroy=function(){t.prototype.destroy.call(this);var e=this.get("_legendContainer");e&&e.parentNode&&e.parentNode.removeChild(e)},e.prototype.draw=function(){return null},e.prototype._updateStatus=function(t,e,i,n){e&&(e.style.background=i),t.style.color=i,t.setAttribute("data-checked",n)},e.prototype._onClick=function(t){var e=this,i=(this.get("items"),this.get("_itemGroupContainer")),n=this.get("prefixClassName"),r=n+"-item",a=n+"-item-marker",o=t.target,s=o.className.split(" ");if(!(l.indexOf(s,n+"-list")>-1)){var u=ye(o,r),c=me(u,a),h=this.get("_itemMap"),p=h[u.getAttribute("data-value")],f=u.getAttribute("data-color"),d=this.get("selectedMode"),g=this.get("unSelectedColor"),v=i.childNodes;if("single"===d)p.checked=!0,l.each(v,(function(t){if(t!==u){var i=me(t,a);e._updateStatus(t,i,g,"false"),h[t.getAttribute("data-value")].checked=!1}else e._updateStatus(u,c,f,"true")}));else{var y="true"===u.getAttribute("data-checked"),m=0;if(l.each(v,(function(t){"true"===t.getAttribute("data-checked")&&m++})),!this.get("allowAllCanceled")&&y&&1===m)return;p.checked=!p.checked,y?this._updateStatus(u,c,g,"false"):this._updateStatus(u,c,f,"true")}this.emit("itemclick",{item:p,currentTarget:u,checked:"single"===d||p.checked})}},e.prototype._onMousemove=function(t){var e=this.get("_lastActiveItem"),i=(this.get("items"),this.get("_itemMap")),n=this.get("prefixClassName"),r=n+"-list",a=n+"-item",o=t.target,s=o.className.split(" ");if(!(l.indexOf(s,r)>-1)){var u=ye(o,a),c=i[u.getAttribute("data-value")];if(c){var h=this.get("highlight");if(c.checked&&e!==c){if(u.className+=" active",h)this.get("_itemGroupContainer").childNodes.forEach((function(t){t!==u&&"true"===t.getAttribute("data-checked")&&(t.className+=" inactive")}));this.set("_lastActiveItem",c)}this.emit("itemmouseover",{item:c,currentTarget:u,checked:c.checked})}}},e.prototype._onMouseout=function(t){this.get("_itemGroupContainer").childNodes.forEach((function(t){var e=t.className.split(" ");l.remove(e,(function(t){return"active"===t||"inactive"===t})),t.className=e.join(" ")})),this.set("_lastActiveItem",null),this.emit("itemmouseleave",t)},e.prototype._renderPagination=function(){var t=this.get("pagination"),e=this.get("_legendContainer"),i=this.get("_itemGroupContainer");if(t&&e.scrollHeight>e.offsetHeight){p.modifyCSS(e,{overflow:"hidden",height:this.get("maxHeight")+"px"});var n=p.createDom('\n
        \n
        \n
        \n 1 / 0\n
        \n
        \n
        \n ');e.appendChild(n);var r=this.getHeight()-(this.get("_titleContainer")?p.getOuterHeight(this.get("_titleContainer")):0)-p.getOuterHeight(n),a=i.offsetHeight,o=this.get("_clipContainer");p.modifyCSS(o,{maxHeight:r+"px",overflow:"hidden"});var s=Math.ceil(a/r),u=p.getOuterHeight(i.childNodes[0]),c=Math.floor(r/u)*u,h=me(n,"current-page-number"),f=me(n,"total-page-number"),d=me(n,"pre-page"),g=me(n,"next-page");f.innerHTML=s;var v=l.deepMix({},ve,t),y={cursor:"pointer",border:v.activeColor+" solid",borderWidth:"2px 2px 0 0",width:v.arrowSize+"px",height:v.arrowSize+"px"},m={cursor:"default",border:v.inactiveColor+" solid",borderWidth:"2px 2px 0 0",width:v.arrowSize+"px",height:v.arrowSize+"px"};p.modifyCSS(d,m),p.modifyCSS(g,y),v.animation&&p.modifyCSS(i,{transition:"transform .3s ease-in"});var x=1,_=0;d.onclick=function(){1!==x&&(x-=1,_+=c,h.innerHTML=x,p.modifyCSS(d,y),p.modifyCSS(g,y),p.modifyCSS(i,{transform:"translateY("+_+"px)"}),1===x&&p.modifyCSS(d,m))},g.onclick=function(){x!==s&&(x+=1,_-=c,h.innerHTML=x,p.modifyCSS(g,y),p.modifyCSS(d,y),p.modifyCSS(i,{transform:"translateY("+_+"px)"}),x===s&&p.modifyCSS(g,m))}}},e.prototype._renderHorizontalPagination=function(){var t=this.get("pagination"),e=this.get("_legendContainer"),i=this.get("_itemGroupContainer");if(t&&e.scrollWidth>e.offsetWidth){p.modifyCSS(e,{overflow:"hidden",width:this.get("maxWidth")+"px"});var n=p.createDom('\n
        \n
        \n
        \n 1 / 0\n
        \n
        \n
        \n ');e.appendChild(n);var r=this.getWidth()-p.getOuterWidth(n)-40,a=i.offsetWidth,o=this.get("_clipContainer");p.modifyCSS(o,{maxWidth:r+"px",overflow:"hidden"});var s=Math.ceil(a/r),u=(p.getOuterWidth(i.childNodes[0]),r),c=me(n,"current-page-number"),h=me(n,"total-page-number"),f=me(n,"pre-page"),d=me(n,"next-page");h.innerHTML=s;var g=l.deepMix({},ve,t),v={cursor:"pointer",border:g.activeColor+" solid",borderWidth:"2px 2px 0 0",width:g.arrowSize+"px",height:g.arrowSize+"px"},y={cursor:"default",border:g.inactiveColor+" solid",borderWidth:"2px 2px 0 0",width:g.arrowSize+"px",height:g.arrowSize+"px"};p.modifyCSS(f,y),p.modifyCSS(d,v),g.animation&&p.modifyCSS(i,{transition:"transform .3s ease-in"});var m=1,x=0;f.onclick=function(){1!==m&&(m-=1,x+=u,c.innerHTML=m,p.modifyCSS(f,v),p.modifyCSS(d,v),p.modifyCSS(i,{transform:"translateX("+x+"px)"}),1===m&&p.modifyCSS(f,y))},d.onclick=function(){m!==s&&(m+=1,x-=u,c.innerHTML=m,p.modifyCSS(d,v),p.modifyCSS(f,v),p.modifyCSS(i,{transform:"translateX("+x+"px)"}),m===s&&p.modifyCSS(d,y))}}}}(ce);var xe=function(t){function e(e){return t.call(this,Object(h.__assign)({xScales:null,yScales:null,el:null},e))||this}return Object(h.__extends)(e,t),e.prototype.clear=function(){var t=this.get("el");t&&t.remove()},e.prototype.changeVisible=function(t){this.set("visible",t);var e=this.get("el");e instanceof u.Element?e.set("visible",t):e instanceof HTMLElement&&(e.style.display=t?"":"none")},e.prototype.change=function(t){this.cfg=l.deepMix({},this.cfg,t)},e.prototype.get=function(t){return this.cfg[t]},e.prototype.set=function(t,e){return this.cfg[t]=e,this},e.prototype.parsePoint=function(t,e){var i=this.get("xScales"),n=this.get("yScales"),r=l.isFunction(e)?e.call(null,i,n):e,a=0,o=0;if(l.isArray(r)&&l.includes(r[0],"%"))return this.parsePercentPoint(t,r);if(l.isArray(r))a=this.getNormalizedValue(r[0],l.head(l.values(i))),o=this.getNormalizedValue(r[1],l.head(l.values(n)));else if(!l.isNil(r))for(var s=0,u=l.keys(r);s=0&&r<1&&(o=r);var s={x:t.x+(e.x-t.x)*o,y:t.y+(e.y-t.y)*o,text:n.content};if(n.offsetX&&(s.x+=n.offsetX),n.offsetY&&(s.y+=n.offsetY),l.assign(s,a),n.autoRotate&&l.isNil(a.rotate)){var u=D.vec2.angleTo([e.x-t.x,e.y-t.y],[1,0],1);s.rotate=u}else l.isNil(a.rotate)||(s.rotate=a.rotate*Math.PI/180);i.addShape("Text",{attrs:s})},e}(xe),be=function(t){function e(e){return t.call(this,Object(h.__assign)({type:"text",position:null,content:null,style:{fill:"#999",fontSize:12,fontWeight:500,textAlign:"center"}},e))||this}return Object(h.__extends)(e,t),e.prototype.render=function(t,e){var i=this.parsePoint(t,this.get("position")),n=l.clone(this.get("style")),r=this.get("offsetX"),a=this.get("offsetY");r&&(i.x+=r),a&&(i.y+=a),n.rotate&&(n.rotate=n.rotate*Math.PI/180);var o=e.addShape("Text",{zIndex:this.get("zIndex"),attrs:l.assign({text:this.get("content")},n,i)});o.name="annotation-text",this.get("appendInfo")&&o.setSilent("appendInfo",this.get("appendInfo")),this.set("el",o)},e}(xe),Me=function(t){function e(e){return t.call(this,Object(h.__assign)({type:"arc",start:null,end:null,style:{stroke:"#999",lineWidth:1}},e))||this}return Object(h.__extends)(e,t),e.prototype.render=function(t,e){var i=this.get("start"),n=this.get("end"),r=this.parsePoint(t,this.get("start")),a=this.parsePoint(t,this.get("end")),o=t.getCenter(),s=Math.sqrt((r.x-o.x)*(r.x-o.x)+(r.y-o.y)*(r.y-o.y)),u=[["M",r.x,r.y]];if(l.isNumberEqual(r.x,a.x)&&l.isNumberEqual(r.y,a.y))l.isEqual(i,n)?console.warn("start point is the same as end point!"):u=[["M",r.x,r.y],["A",s,s,0,1,1,2*o.x-r.x,2*o.y-r.y],["A",s,s,0,1,1,r.x,r.y]];else{var c=D.vec2.angleTo([o.x-r.x,o.y-r.y],[o.x-a.x,o.y-a.y],0)>Math.PI?1:0;u=[["M",r.x,r.y],["A",s,s,0,c,1,a.x,a.y]]}var h=e.addShape("path",{zIndex:this.get("zIndex"),attrs:l.assign({path:u},this.get("style"))});h.name="annotation-arc",this.get("appendInfo")&&h.setSilent("appendInfo",this.get("appendInfo")),this.set("el",h)},e}(xe),Se=function(t){function e(e){return t.call(this,Object(h.__assign)({type:"region",zIndex:1,start:null,end:null,style:{lineWidth:0,fill:"#CCD7EB",opacity:.4}},e))||this}return Object(h.__extends)(e,t),e.prototype.render=function(t,e){var i=this.get("style"),n=this.getPath(t),r=e.addShape("path",{zIndex:this.get("zIndex"),attrs:l.assign({path:n},i)});r.name="annotation-region",this.get("appendInfo")&&r.setSilent("appendInfo",this.get("appendInfo")),this.set("el",r)},e.prototype.getPath=function(t){var e=this.parsePoint(t,this.get("start")),i=this.parsePoint(t,this.get("end"));return[["M",e.x,e.y],["L",i.x,e.y],["L",i.x,i.y],["L",e.x,i.y],["z"]]},e}(xe),we=function(t){function e(e){return t.call(this,Object(h.__assign)({type:"image",start:null,end:null,src:""},e))||this}return Object(h.__extends)(e,t),e.prototype.render=function(t,e){var i=this.parsePoint(t,this.get("start")),n={x:i.x,y:i.y,img:this.get("src")};if(this.get("end")){var r=this.parsePoint(t,this.get("end"));n.width=r.x-i.x,n.height=r.y-i.y}else n.width=this.get("width")||32,n.height=this.get("height")||32;this.get("offsetX")&&(n.x+=this.get("offsetX")),this.get("offsetY")&&(n.y+=this.get("offsetY"));var a=e.addShape("Image",{zIndex:1,attrs:n});a.name="annotation-image",this.get("appendInfo")&&a.setSilent("appendInfo",this.get("appendInfo")),this.set("el",a)},e}(xe),ke=function(t){function e(e){return t.call(this,Object(h.__assign)({type:"html",zIndex:7,position:null,alignX:"middle",alignY:"middle",offsetX:null,offsetY:null,html:null},e))||this}return Object(h.__extends)(e,t),e.prototype.render=function(t,e){var i=this.parsePoint(t,this.get("position")),n=e.get("canvas").get("el").parentNode,r=p.createDom('
        ');n.appendChild(r);var a=this.get("html");l.isFunction(a)&&(a=a(this.get("xScales"),this.get("yScales")));var o=l.isElement(a)?a:p.createDom(a);r.appendChild(o),p.modifyCSS(r,{position:"absolute"}),this.setDomPosition(r,o,i),this.set("el",r)},e.prototype.clear=function(){var t=this.get("el");t&&t.parentNode&&t.parentNode.removeChild(t)},e.prototype.setDomPosition=function(t,e,i){var n=this.get("alignX"),r=this.get("alignY"),a=p.getOuterWidth(e),o=p.getOuterHeight(e),s={x:i.x,y:i.y};"middle"===n?s.x-=Math.round(a/2):"right"===n&&(s.x-=Math.round(a)),"middle"===r?s.y-=Math.round(o/2):"bottom"===r&&(s.y-=Math.round(o));var u=this.get("offsetX");u&&(s.x+=u);var l=this.get("offsetY");l&&(s.y+=l),p.modifyCSS(t,{top:Math.round(s.y)+"px",left:Math.round(s.x)+"px",visibility:"visible",zIndex:this.get("zIndex")})},e}(xe),Ce=function(t){function e(e){return t.call(this,l.deepMix({type:"dataMarker",zIndex:1,position:null,point:{display:!0,style:{r:3,fill:"#ffffff",stroke:"#1890FF",lineWidth:2}},line:{display:!0,lineLength:20,style:{stroke:"#A3B1BF",lineWidth:1}},text:{display:!0,style:{fill:"#000000",opacity:.65,fontSize:12,textAlign:"start"}},direction:"upward",autoAdjust:!0},e))||this}return Object(h.__extends)(e,t),e.prototype.render=function(t,e){var i,n,r=this,a=this.parsePoint(t,this.get("position")),o=e.addGroup(),s=this.getElementPosition(a),u=this.get("line"),l=this.get("point"),c=this.get("text");if(u.display){var h=s.line;i=this.drawLine(h,o)}if(c.display&&c.content){var p=s.text;n=this.drawText(p,o)}if(l.display){var f=s.point;this.drawPoint(f,o)}if(this.get("autoAdjust")){var d=o.getBBox(),g=d.minX,v=d.minY,y=d.maxX,m=d.maxY,x=t.start,_=t.end;if(n){g<=x.x&&n.attr("textAlign","start"),y>=_.x&&n.attr("textAlign","end");var b=this.get("direction");if("upward"===b&&v<=_.y||"upward"!==b&&m>=x.y){var M=void 0,S=void 0;"upward"===b&&v<=_.y?(M="top",S=1):(M="bottom",S=-1),n.attr("textBaseline",M);var w=0;if(u.display){w=u.lineLength;var k=[["M",a.x,a.y],["L",a.x,a.y+w*S]];i.attr("path",k)}var C=a.y+(w+2)*S;n.attr("y",C)}}}o.get("children").forEach((function(t){t.name="annotation-data-marker",r.get("appendInfo")&&t.setSilent("appendInfo",r.get("appendInfo"))})),this.set("el",o)},e.prototype.getElementPosition=function(t){var e=t.x,i=t.y,n=this.get("line").display?this.get("line").lineLength:0,r=this.get("direction");this.get("text").style.textBaseline="upward"===r?"bottom":"top";var a="upward"===r?-1:1;return{point:{x:e,y:i},line:[{x:e,y:i},{x:e,y:n*a+i}],text:{x:e,y:(n+2)*a+i}}},e.prototype.drawLine=function(t,e){var i=this.get("line").style,n=[["M",t[0].x,t[0].y],["L",t[1].x,t[1].y]];return e.addShape("path",{attrs:l.assign({path:n},i)})},e.prototype.drawText=function(t,e){var i=this.get("text");return e.addShape("text",{attrs:l.assign({text:i.content},i.style,t)})},e.prototype.drawPoint=function(t,e){var i=this.get("point").style;return e.addShape("circle",{attrs:l.assign({},i,t)})},e}(xe),Pe=function(t){function e(e){return t.call(this,l.deepMix({type:"dataRegion",start:null,end:null,region:{lineLength:0,style:{lineWidth:0,fill:"#000000",opacity:.04}},text:{display:!0,content:"",style:{textAlign:"center",textBaseline:"bottom",fontSize:12,fill:"rgba(0, 0, 0, .65)"}}},e))||this}return Object(h.__extends)(e,t),e.prototype.render=function(t,e,i){var n=this,r=this.get("region"),a=this.get("text"),o=r.lineLength,s=this.getRegionData(t,i);if(s.length){var u=this.getBBox(s),c=[];c.push(["M",s[0].x,u.minY-o]);for(var h=0,p=s.length;h=i&&c.push(this.parsePoint(t,[f[a],f[o]])),f[a]===u)break}return c},e.prototype.getBBox=function(t){for(var e=[],i=[],n=0;n=o[l]?1:0,p=c>Math.PI?1:0,f=i.convertPoint(s),d=Le(i,f);if(d>=.5)if(c===2*Math.PI){var g={x:(s.x+o.x)/2,y:(s.y+o.y)/2},v=i.convertPoint(g);u.push(["A",d,d,0,p,h,v.x,v.y]),u.push(["A",d,d,0,p,h,f.x,f.y])}else u.push(["A",d,d,0,p,h,f.x,f.y]);return u}(i,n,t)):a.push(Te(o,t));break;case"z":default:a.push(o)}})),function(t){l.each(t,(function(e,i){if("a"===e[0].toLowerCase()){var n=t[i-1],r=t[i+1];r&&"a"===r[0].toLowerCase()?n&&"l"===n[0].toLowerCase()&&(n[0]="M"):n&&"a"===n[0].toLowerCase()&&r&&"l"===r[0].toLowerCase()&&(r[0]="M")}}))}(a),a}var Fe={_coord:null,getCoord:function(){return this._coord},parsePath:function(t,e){var i=this._coord,n=j.b(t);return n=i.isPolar&&!1!==e?Be(i,n):function(t,e){var i=[];return l.each(e,(function(e){switch(e[0].toLowerCase()){case"m":case"l":case"c":i.push(Te(e,t));break;case"z":default:i.push(e)}})),i}(i,n)},parsePoint:function(t){return this._coord.convertPoint(t)},parsePoints:function(t){var e=this._coord;return t.map((function(t){return e.convertPoint(t)}))},draw:function(){}},Re={_theme:P.theme.shape,_coord:null,_getShapeStyleByState:function(t,e,i){var n=this._theme,r=this.name;if(n&&n[r]&&n[r][t]){var a=n[r][t][e];return l.isFunction(a)&&(a=a(i)),a}},defaultShapeType:null,setCoord:function(t){this._coord=t},setTheme:function(t){this._theme=t},getShape:function(t){var e=this[l.isArray(t)?t[0]:t]||this[this.defaultShapeType];return e._coord=this._coord,e},getShapePoints:function(t,e){var i=this.getShape(t);return i.getPoints?i.getPoints(e):this.getDefaultPoints(e)},getDefaultPoints:function(){return[]},getMarkerStyle:function(t,e){var i=this.getShape(t);if(i.getMarkerStyle){var n=i.getMarkerStyle(e),r=this._theme,a=i.name,o=this.name;return r&&r[o]&&r[o][a]&&(n=l.mix({},r[o][a].default,n)),n}},getInactiveStyle:function(t,e){var i=this.getShape(t);return i.getInactiveStyle?i.getInactiveStyle(e):this._getShapeStyleByState(i.name,"inactive",e)},getActiveStyle:function(t,e){var i=this.getShape(t);return i.getActiveStyle?i.getActiveStyle(e):this._getShapeStyleByState(i.name,"active",e)},getSelectedStyle:function(t,e){var i=this.getShape(t);return i.getSelectedStyle?i.getSelectedStyle(e):this._getShapeStyleByState(i.name,"selected",e)},drawShape:function(t,e,i){var n=this.getShape(t),r=n.name,a=this._theme,o=this.name;if(a&&a[o]&&a[o][r]){var s=a[o][r].default;e.style=l.mix({},s,e.style)}var u=n.draw(e,i);return u&&(u.setSilent("origin",e.origin),u.id=e.yIndex?e.id+e.yIndex:e.id,u.name=this.name),u}},Ne={};function ze(t,e){var i=l.upperFirst(t),n=Object(h.__assign)(Object(h.__assign)(Object(h.__assign)({},Re),e),{name:t});return Ne[i]=n,n}function He(t,e,i){var n=l.upperFirst(t),r=Ne[n],a=Object(h.__assign)(Object(h.__assign)(Object(h.__assign)({},Fe),i),{name:e});return r[e]=a,a}function Ge(t){var e=l.upperFirst(t);return Ne[e]}var Ye=["cross","tick","plus","hyphen","line","hollowCircle","hollowSquare","hollowDiamond","hollowTriangle","hollowTriangleDown","hollowHexagon","hollowBowtie"],We=function(){function t(t){this.legends=[];var e=t.view;this.view=e,this.theme=e.get("theme")}return t.prototype.render=function(){var t=this;this.clear();var e=this.options;if(l.isObject(e)){if(e.custom){var i=this.addCustomLegend();this.legends.push(i)}else{var n=this.view.getElements(),r=[];l.each(n,(function(i){var n=i.get("view"),a=i.getAttrsForLegend();l.each(a,(function(a){var o,s,u=a.type,c=a.getScale(u);if(c&&c.field&&"identity"!==c.type&&(o=r,s=c,!l.find(o,(function(t){var e=[].concat(t.values),i=[].concat(s.values);return t.type===s.type&&t.field===s.field&&l.isEqual(e.sort(),i.sort())})))){r.push(c);var h=n.getFilteredOutValues(c.field),p=t.addLegend(e,c,a,i,h);p&&t.legends.push(p)}}))}))}this.alignLegends()}},t.prototype.changeVisible=function(t){l.each(this.legends,(function(t){}))},t.prototype.clear=function(){l.each(this.legends,(function(t){t.destroy()})),this.legends=[],this.reset()},t.prototype.reset=function(){this.init()},t.prototype.init=function(){this.options=this.getLegendOptions(),this.panelRange=this.view.get("panelRange"),this.viewRange=this.view.get("viewRange"),this.container=this.view.get("frontgroundGroup")},t.prototype.addLegend=function(t,e,i,n,r){var a=e.field,o=t.fields&&t.fields[a];if(!1!==o){if(o&&o.custom)return this.addCustomLegend(a);var s=this.getFieldLegendConfig(a,"position",this.theme.defaultLegendPosition);s=this.adjustPosition(s);var u=e.isLinear?this.addContinuousLegend(e,i,s):this.addCategoryLegend(e,i,n,r,s);return u&&this.bindHoverEvent(u,a),u}},t.prototype.addContinuousLegend=function(t,e,i){var n=this.container.addGroup({name:"legend"}),r=t.field,a=t.getTicks(),o=l.map(a,(function(i){var n=i.value,r=i.tickValue,a=t.invert(n);return{value:r,color:e.mapping(a).join("")}})),s=!!l.find(a,(function(t){return 0===t.value})),u=!!l.find(a,(function(t){return 1===t.value}));if(!s){var c=e.mapping(0).join("");o.push({value:t.min,color:c})}if(!u){c=e.mapping(0).join("");o.push({value:t.max,color:c})}var h,p=this.options,f=i.split("-"),d=this.theme.legend[f[0]],g=l.deepMix({},d,this.getFieldLegendOption(r,p),{items:o,attr:e,formatter:t.formatter,container:n,position:i});if(g.showTitle&&l.mix(g,{title:t.field}),"color"===e.type)h=new Ae.Color(g);else{if("size"!==e.type)return;h=new Ae.Size(g)}return this.bindFilterEvent(h,t),h},t.prototype.addCategoryLegend=function(t,e,i,n,r){var a=this,o=this.options,s=t.field,u=o.fields?o.fields[s]:null,c=[],p=t.getTicks(),f=!0,d=i.get("shapeType")||"point",g=i.getDefaultValue("shape")||d||"point";o.marker&&(g=o.marker,d="point",f=!1),u&&u.marker&&(g=u.marker,d="point",f=!1);var v=this.view,y=this.theme,m=v.get("canvas"),x=v.get("panelGroup").attr("clip"),_=x?x.getBBox():void 0,b=v.get("panelRange"),M=v.get("viewRange"),S=r.split("-"),w="right"===S[0]||"left"===S[0]?_?_.height:b.height:_?M.width-(b.width-_.width):M.width;l.each(p,(function(e){var r=e.text,o=e.value,s=t.invert(o),u={isInCircle:i.isInCircle()},p=!n||a.isFiltered(t,n,s),v=i.getAttr("color"),m=i.getAttr("shape");if(v)if(v.callback&&v.callback.length>1){var x=Array(v.callback.length-1).fill("");u.color=v.mapping.apply(v,Object(h.__spreadArrays)([s],x)).join("")||y.defaultColor}else u.color=v.mapping(s).join("")||y.defaultColor;if(f&&m&&m.scales.length)if(m.callback&&m.callback.length>1){x=Array(m.callback.length-1).fill("");g=m.mapping.apply(m,Object(h.__spreadArrays)([s],x)).join("")}else g=m.mapping(s).join("");var _=Ge(d).getMarkerStyle(g,u);l.isFunction(g)&&(_.symbol=g),c.push({value:r,dataValue:s,checked:p,marker:_})}));var k,C,P,O,A=!!o.useHtml||!(!u||!u.useHtml);switch(S[0]){case"left":O=_?_.height:b.height,P=b.x-M.x,C="vertical";break;case"right":O=_?_.height:b.height,P=M.tr.x-b.tr.x,C="vertical";break;case"top":O=b.tr.y-M.tr.y,P=_?M.width-(b.width-_.width):M.width,C="horizontal";break;case"bottom":O=M.br.y-b.br.y,P=_?M.width-(b.width-_.width):M.width,C="horizontal"}k=A?l.mix({},y.legend.html,{maxHeight:O,maxWidth:P,layout:C}):l.mix({},y.legend[S[0]],{maxHeight:O,maxWidth:P,layout:C,container:this.container.addGroup({name:"legend"})});var L=l.deepMix({},k,o,u,{maxLength:w,canvas:m,items:c,position:r});L.showTitle&&l.mix(L,{title:t.alias||t.field});var T=A?new Ae.HtmlCategory(L):new Ae.CanvasCategory(L);return this.bindClickEvent(T,t,n,L.onClick),T},t.prototype.addCustomLegend=function(t){var e,i=this.theme,n=(this.view,this.container.addGroup({name:"legend"})),r=n.get("canvas"),a=this.panelRange,o=this.options;l.isObject(o)&&(e=o.fields?o.fields[t]:{});var s=e.position||o.position||i.defaultLegendPosition;s=this.adjustPosition(s);var u=e.items||o.items;if(u){l.each(u,(function(t){l.isPlainObject(t.marker)?t.marker.radius=t.marker.radius||4.5:(t.marker={symbol:t.marker||"circle",radius:4.5},l.contains(Ye,t.marker.symbol)?t.marker.stroke=t.color:t.marker.fill=t.color);var e=t.marker.symbol;l.isString(e)&&-1!==e.indexOf("hollow")&&(t.marker.symbol=l.lowerFirst(e.substr(6))),t.checked=!!l.isNil(t.checked)||t.checked}));var c=s.split("-"),h="right"===c[0]||"left"===c[0]?a.height:this.viewRange.width,p=l.deepMix({},i.legend[c[0]],o,e,{maxLength:h,viewTheme:i,items:u,container:n,canvas:r}),f=!!p.useHtml?new Ae.HtmlCategory(p):new Ae.CanvasCategory(p);return f.on("itemclick",(function(t){o.onClick&&o.onClick(t)})),this.bindHoverEvent(f),f}},t.prototype.alignLegends=function(){var t=this,e=this.getRegion();this.totalRegion=e;var i=this.groupLegendByPosition(),n=0;l.each(i,(function(i,r){var a=e.subs[n];l.each(i,(function(e,n){var o=i[n-1];t.alignLegend(e,o,a,r)})),n++}))},t.prototype.alignLegend=function(t,e,i,n){var r=this.theme,a=this.viewRange.width,o=this.viewRange.height,s=this.totalRegion,u=this.groupLegendByPosition(),l=this.viewRange,c=t.get("offsetX")||0,h=t.get("offsetY")||0,p=t.getHeight(),f=t.getWidth(),d=r.legend.margin,g=r.legend.legendMargin,v=u[n].length,y=n.split("-"),m=0,x=0,_=v>1?s:i;if("left"===y[0]||"right"===y[0])o=l.maxY,m=this.getXAlign(y[0],a,i,l,f,d),x=e?e.get("y")+e.getHeight()+g:this.getYAlignVertical(y[1],o,_,l,0,d,this.viewRange.height);else if("top"===y[0]||"bottom"===y[0])if(x=this.getYAlignHorizontal(y[0],o,i,l,p,d),e){var b=e.getWidth();m=e.get("x")+b+g}else m=this.getXAlign(y[1],a,_,l,f,d);t.moveTo(m+c,x+h)},t.prototype.getXAlign=function(t,e,i,n,r,a){var o="left"===t?n.minX+a[3]:n.maxX-a[1]-r;return"center"===t&&(o=(e-i.totalWidth)/2),o},t.prototype.getYAlignHorizontal=function(t,e,i,n,r,a){return"top"===t?n.minY+a[0]:n.maxY-a[2]-r},t.prototype.getYAlignVertical=function(t,e,i,n,r,a,o){var s="top"===t?n.minY+a[0]:n.maxY-i.totalHeight-a[2];return"center"===t&&(s=n.minY+(n.height-i.totalHeight)/2),s},t.prototype.adjustPosition=function(t){var e=t.split("-");if(1===e.length){var i=e[0];return"left"===i?"left-bottom":"right"===i?"right-bottom":"top"===i?"top-center":"bottom"===i?"bottom-center":""}return e.slice(0,2).join("-")},t.prototype.bindClickEvent=function(t,e,i,n){var r=this,a=this.view,o=e.field;t.on("itemclick",(function(e){if(n)n(e);else{var s=e.item,u=e.checked,c="single"===t.get("selectedMode"),h=s.dataValue;u?(l.pull(i,h),r.isFieldInView(o,h)&&a.filter(o,(function(t){return c?t===h:!l.contains(i,t)}))):c||(i.push(h),r.isFieldInView(o,h)&&a.filter(o,(function(t){return!l.contains(i,t)}))),a.set("keepLegend",!0),a.repaint(),a.set("keepLegend",!1)}}))},t.prototype.bindHoverEvent=function(t,e){var i=t.get("onMouseover"),n=t.get("onMouseleave");t.on("itemmouseover",(function(t){i&&i(t)})),t.on("itemmouseleave",(function(t){n&&n(t)}))},t.prototype.getRegion=function(){var t=this,e=this.theme.legend.legendMargin,i=[],n=0,r=0,a=this.groupLegendByPosition();return l.each(a,(function(a){var o=t.getSubRegion(a);i.push(o),n+=o.totalWidth+e,r+=o.totalHeight+e})),{totalWidth:n,totalHeight:r,subs:i}},t.prototype.getSubRegion=function(t){var e=0,i=0,n=0,r=0;return l.each(t,(function(t){var a=t.getWidth(),o=t.getHeight();e=e&&u<=i;n.filterLabels(a,o,c),c?a.show():a.hide()}}))},t.prototype.groupLegendByPosition=function(){return l.groupBy(this.legends,(function(t){return t.get("position")}))},t.prototype.filterLabels=function(t,e,i){if(t.get("gLabel"))t.get("gLabel").set("visible",i);else{var n=e.get("labelOptions");if(!l.isEmpty(l.get(n,"fields"))){var r=e.getXScale().field,a=e.getYScale().field,o=t.get("origin")._origin,s=e.get("labels");l.each(s,(function(e){var n=e.get("origin")||[];n[r]===o[r]&&n[a]===o[a]&&(e.set("visible",i),t.set("gLabel",e))}))}}},t.prototype.getFieldLegendOption=function(t,e){return void 0===e&&(e={}),l.get(this.getLegendOptions(),"fields."+t,e)},t}();function Ve(t,e){void 0===e&&(e=0);var i=e;return"middle"===t&&(i=.5),-1!==t.indexOf("%")&&(i=parseInt(t,10)/100),i}var qe=function(){function t(t){this.title=null,this.visible=!0,this.canvas=null,this.container=null,this.coord=null,this.options=null,this.axes=[],this.theme=null,l.mix(this,t)}return t.prototype.createAxis=function(t,e,i){var n,r=this,a=this.coord,o=a.type;"theta"===o||"polar"===o&&a.isTransposed||(t&&!this._isHide(t.field)&&(n=this._drawAxis(a,t,e[0],"x",i)),l.isEmpty(e)||"helix"===o||l.each(e,(function(e,o){r._isHide(e.field)||r._drawAxis(a,e,t,"y",i,n,o)})))},t.prototype.changeVisible=function(t){var e=this.axes;l.each(e,(function(e){e.set("visible",t)}))},t.prototype.clear=function(){var t=this.axes;l.each(t,(function(t){t.clear()})),this.axes=[]},t.prototype._getAxisOptionByField=function(t,e){return void 0===e&&(e={}),l.get(this.options,"fields."+t,e)},t.prototype._isHide=function(t){return!1===this._getAxisOptionByField(t)},t.prototype._getMiddleValue=function(t,e,i,n){if(0===t&&!n)return 0;if(1===t)return 1;var r=e[i+1].value;return n||1!==r?(t+r)/2:1},t.prototype._getLineRange=function(t,e,i,n){var r,a,o,s=e.field,u=this._getAxisOptionByField(s).position||"";if("x"===i){var l="top"===u?1:0;r={x:0,y:l=Ve(u,l)},a={x:1,y:l},o=!1}else{var c;if(n)r={x:c=Ve(u,c="left"===u?0:1),y:0},a={x:c,y:1};else r={x:c=Ve(u,c="right"===u?1:0),y:0},a={x:c,y:1};o=!0}return{start:r=t.convert(r),end:a=t.convert(a),isVertical:o}},t.prototype._getLineCfg=function(t,e,i,n){var r=this._getLineRange(t,e,i,n),a=r.start,o=r.end,s=t.center,u=t.isTransposed?!r.isVertical:r.isVertical;return{isVertical:u,factor:u&&a.x>s.x||!u&&a.y>s.y?1:-1,start:a,end:o}},t.prototype._getCircleCfg=function(t){var e,i=t.x,n=t.y,r=t.isTransposed,a=t.circleCenter,o=t.innerRadius,s=n.start>n.end;e=r?{x:s?0:1,y:0}:{x:0,y:s?0:1};var u,l=[(e=t.convert(e)).x-a.x,e.y-a.y],c=[1,0];return{startAngle:u=e.y>a.y?D.vec2.angle(l,c):-1*D.vec2.angle(l,c),endAngle:u+(i.end-i.start),center:a,radius:Math.sqrt(Math.pow(e.x-a.x,2)+Math.pow(e.y-a.y,2)),inner:o||0}},t.prototype._getRadiusCfg=function(t){var e,i,n=t.x.start<0?-1:1;return t.isTransposed?(e={x:0,y:0},i={x:1,y:0}):(e={x:0,y:0},i={x:0,y:1}),{factor:n,start:t.convert(e),end:t.convert(i)}},t.prototype._getHelixCfg=function(t){for(var e=t.a,i=t.startAngle,n=t.endAngle,r=t.center,a=t.y,o=[],s=0;s<=100;s++){var u=t.convert({x:s/100,y:0});o.push(u.x),o.push(u.y)}return{a:e,startAngle:i,endAngle:n,crp:o,axisStart:t.convert({x:0,y:0}),center:r,inner:a.start}},t.prototype._getAxisPosition=function(t,e,i,n){if(this._getAxisOptionByField(n).position)return this._getAxisOptionByField(n).position;var r="",a=t.type;return t.isRect?"x"===e?r="bottom":"y"===e&&(r=i?"right":"left"):r="helix"===a?"helix":"x"===e?t.isTransposed?"radius":"circle":t.isTransposed?"circle":"radius",r},t.prototype._getAxisDefaultCfg=function(t,e,i,n){var r=this.theme,a=e.field,o={coord:t,theme:r.axis[n]};if((o=l.deepMix({},r.axis[n],o,this._getAxisOptionByField(a))).showTitle){var s=l.get(o,"title",{});s.text=s.text||e.alias||a,l.deepMix(o,{title:s})}return o.ticks=e.getTicks(),t.isPolar&&!e.isCategory&&"x"===i&&Math.abs(t.endAngle-t.startAngle)===2*Math.PI&&o.ticks.pop(),o},t.prototype._getAxisCfg=function(t,e,i,n,r,a){var o=this;void 0===r&&(r="");var s,u,c,h,p=this._getAxisPosition(t,n,r,e.field),f=this._getAxisDefaultCfg(t,e,n,p);if(f.grid&&i){var d=[],g=function(t){var e=[];if(t.length){var i=(e=t.slice(0))[0],n=e[e.length-1];0!==i.value&&e.unshift({value:0}),1!==n.value&&e.push({value:1})}return e}(i.getTicks());if(g.length){var v=(s=f.ticks,u=e.isLinear,c="center"===f.gridAlign,h=[],s.length?(s.length>=2&&u&&c&&h.push({text:"",tickValue:"",value:0}),0!==s[0].value&&h.push({text:"",tickValue:"",value:0}),1!==(h=h.concat(s))[h.length-1].value&&h.push({text:"",tickValue:"",value:1}),h):h);l.each(v,(function(i,s){var u=[],c=i.value;if("center"===f.gridAlign&&(c=o._getMiddleValue(c,v,s,e.isLinear)),!l.isNil(c)){var h=t.x,p=t.y;l.each(g,(function(e){var i="x"===n?c:e.value,r="x"===n?e.value:c,a=t.convert({x:i,y:r});if(t.isPolar){var o=t.circleCenter;p.start>p.end&&(r=1-r),a.flag=h.start>h.end?0:1,a.radius=Math.sqrt(Math.pow(a.x-o.x,2)+Math.pow(a.y-o.y,2))}u.push(a)})),d.push({id:a+"-"+n+r+"-grid-"+i.tickValue,points:u})}}))}f.gridPoints=d}return f},t.prototype._drawAxis=function(t,e,i,n,a,o,s){var u,c,h=this.container,p=this.canvas;"cartesian"===t.type?(u=r.Line,c=this._getLineCfg(t,e,n,s)):"helix"===t.type&&"x"===n?(u=r.Helix,c=this._getHelixCfg(t)):"x"===n?(u=r.Circle,c=this._getCircleCfg(t)):(u=r.Line,c=this._getRadiusCfg(t));var f=this._getAxisCfg(t,e,i,n,s,a);f=l.mix({},f,c),"y"===n&&o&&"circle"===o.get("type")&&(f.circle=o),f.id=l.isNil(s)?a+"-"+n:a+"-"+n+s,l.mix(f,{canvas:p,group:h.addGroup()});var d=new u(f);return d.render(),this.axes.push(d),d},t}(),Xe=D.vec2,Ue=["line","area","path"],Ze=["line","area"],Qe=["marker","showMarker"],$e=function(t){var e=[];return l.each(t,(function(t){-1===function(t,e){var i=-1;return l.each(t,(function(t,n){var r=!0;for(var a in e)if(e.hasOwnProperty(a)&&-1===Qe.indexOf(a)&&!l.isObject(e[a])&&e[a]!==t[a]){r=!1;break}if(r)return i=n,!1})),i}(e,t)&&e.push(t)})),e},Ke=function(){function t(t){var e=this;this.timeStamp=0,this.onMouseMove=function(t){var i=e.view.get("panelGroup"),n=e.timeStamp,r=+new Date,a={x:t.x-(i.get("x")||0),y:t.y-(i.get("y")||0)};r-n>16&&(e.showTooltip(a,e.view,t.target),e.timeStamp=r)},this.onMouseOut=function(t){t&&!t.event||e.hideTooltip()},l.assign(this,t)}return t.prototype.renderTooltip=function(){var t=this;if(!this.tooltip){var e,i=this.view,r=this.theme,a=this._getCanvas(),o=this._getDefaultTooltipOptions(),s=this.options;if((s=l.deepMix({panelGroup:i.get("panelGroup"),panelRange:i.get("panelRange"),capture:!1,canvas:a,frontgroundGroup:i.get("frontgroundGroup"),theme:r.tooltip,backgroundGroup:i.get("backgroundGroup")},o,s)).crosshairs&&"rect"===s.crosshairs.type&&(s.zIndex=0),s.visible=!1,s.useHtml){e=new n.Html(s);var u=this._getTriggerEvent();if(!e.get("enterable")&&"panel:mousemove"===u){var c=e.get("container");c&&(c.onmousemove=function(e){var n=t._normalizeEvent(e);i.emit(u,n)})}}else e=new n.Canvas(s);this.tooltip=e,this.options=s,this._bindEvent()}},t.prototype._normalizeEvent=function(t){var e=this.view,i=this._getCanvas(),n=i.getPointByClient(t.clientX,t.clientY),r=i.get("pixelRatio");return n.x=n.x/r,n.y=n.y/r,n.view=e,n},t.prototype.hideTooltip=function(){var t=this.tooltip;if(t.get("visible")){var e=this.view,i=this._getCanvas();this.prePoint=null,t.hide(),e.emit("tooltip:hide",{tooltip:t}),e.setActive((function(){return!1})),i.draw()}},t.prototype.showTooltip=function(t,e,i){var n=this;if(t){this.tooltip||this.renderTooltip();var r=this.options,a=[],o=[],s=e.getElements(),u=e.get("coord");if(l.each(s,(function(e){var i=e.get("type");if(e.get("visible")&&!1!==e.get("tooltipOptions")){var s=e.get("dataArray");if(e.isShareTooltip()||l.contains(["area","line","path"],i))l.each(s,(function(s){var c=e.findPoint(t,s);if(c){var h=e.getTooltipItems(c,r.title);l.each(h,(function(t){var r=t.point;if(!l.isNil(r)&&!l.isNil(r.x)&&!l.isNil(r.y)){var o=l.isArray(r.x)?r.x[r.x.length-1]:r.x,s=l.isArray(r.y)?r.y[r.y.length-1]:r.y;r=u.applyMatrix(o,s,1),t.x=r[0],t.y=r[1],t.showMarker=!0;var c=n._getItemMarker(e,t.color);t.marker=c,-1!==l.indexOf(Ue,i)&&a.push(t)}})),o=o.concat(h)}}));else{var c=e.get("shapeContainer"),h=c.get("canvas").get("pixelRatio"),p=c.getShape(t.x*h,t.y*h);p&&p.get("visible")&&p.get("origin")&&(o=e.getTooltipItems(p.get("origin"),r.title))}}})),l.each(o,(function(t){var e=t.point,i=l.isArray(e.x)?e.x[e.x.length-1]:e.x,n=l.isArray(e.y)?e.y[e.y.length-1]:e.y;e=u.applyMatrix(i,n,1),t.x=e[0],t.y=e[1]})),o.length){var c=o[0];if(!o.every((function(t){return t.title===c.title}))){var h=c,p=1/0;o.forEach((function(e){var i=Xe.distance([t.x,t.y],[e.x,e.y]);i1){var f=o[0],d=Math.abs(t.y-f.y);l.each(o,(function(e){Math.abs(t.y-e.y)<=d&&(f=e,d=Math.abs(t.y-e.y))})),!f||l.isNil(f.x)||l.isNil(f.y)||(a=[f]),o=[f]}this._setTooltip(t,o,a,i),e.setActive((function(t){var e=!1;return l.each(o,(function(i){if(i.point._origin===t)return e=!0,!1})),e}),!1)}else this.hideTooltip()}},t.prototype.clear=function(){var t=this.tooltip;t&&t.destroy(),this.tooltip=null,this.prePoint=null,this._offEvent()},t.prototype._getCanvas=function(){return this.view.get("canvas")},t.prototype._getTriggerEvent=function(){var t,e=l.get(this.options,"triggerOn");return e&&"mousemove"!==e?"click"===e?t="panel:click":"none"===e&&(t=null):t="panel:mousemove",t},t.prototype._getDefaultTooltipOptions=function(){var t,e=this.view,i=this.options,n=this.theme,r=l.mix({},n.tooltip),a=l.filter(e.getElements(),(function(t){return t.get("visible")})),o=l.uniq(l.map(a,(function(t){return t.get("type")}))),s=!!e.get("coord")&&e.get("coord").isTransposed;if(e.get("coord")&&"cartesian"===e.get("coord").type)if("interval"===o[0])!1!==i.shape&&((u=l.mix({},n.tooltipCrosshairsRect)).isTransposed=s,t={zIndex:0,crosshairs:u});else if(l.indexOf(Ze,o[0])>-1){var u;(u=l.mix({},n.tooltipCrosshairsLine)).isTransposed=s,t={crosshairs:u}}return l.mix(r,t)},t.prototype._bindEvent=function(){var t=this.view,e=this._getTriggerEvent();e&&(t.on(e,this.onMouseMove),t.on("panel:mouseleave",this.onMouseOut))},t.prototype._offEvent=function(){var t=this.view,e=this._getTriggerEvent();e&&(t.off(e,this.onMouseMove),t.off("panel:mouseleave",this.onMouseOut))},t.prototype._setTooltip=function(t,e,i,n){var r=this.tooltip,a=this.prePoint;if(!a||a.x!==t.x||a.y!==t.y){var o=$e(e);this.prePoint=t;var s=this.view,u=this.theme,c=l.isArray(t.x)?t.x[t.x.length-1]:t.x,h=l.isArray(t.y)?t.y[t.y.length-1]:t.y;r.get("visible")||s.emit("tooltip:show",{x:c,y:h,tooltip:r});var p=o[0],f=p.title||p.name;r.isContentChange(f,o)&&(s.emit("tooltip:change",{tooltip:r,x:c,y:h,items:o}),f=o[0].title||o[0].name,r.setContent(f,o),l.isEmpty(i)?(r.clearMarkers(),r.set("markerItems",[])):!1===this.options.showTooltipMarkers?r.set("markerItems",i):r.setMarkers(i,u.tooltipMarker)),r.setPosition(c+(s.get("panelGroup").get("x")||0),h+(s.get("panelGroup").get("y")||0),n),r.show()}},t.prototype._getItemMarker=function(t,e){var i=t.get("shapeType")||"point",n=t.getDefaultValue("shape")||"circle",r={color:e};return Ge(i).getMarkerStyle(n,r)},t}(),Je=function(){function t(t){void 0===t&&(t={view:null}),this._states={},this._stateStack={},this.view=t.view}return t.prototype.setState=function(t,e,i){this._stateStack[t]={exp:e,draw:i},this._onUpdate()},t.prototype.getState=function(t){return this._states[t]},t.prototype.getAllStates=function(){return this._states},t.prototype.clear=function(){this._states={},this._stateStack={},this._changeTimer&&(clearTimeout(this._changeTimer),this._changeTimer=null)},t.prototype._onUpdate=function(){var t=this,e=this._stateStack;this._changeTimer&&(clearTimeout(this._changeTimer),this._changeTimer=null),this._changeTimer=setTimeout((function(){for(var i in e){var n=e[i],r=n.exp;t._states[i]&&t._states[i]===r||(t._states[i]=r,t._triggerEvent(i,n))}t._stateStack={}}),16)},t.prototype._triggerEvent=function(t,e){this.view.emit(t+":change",Object(h.__assign)({name:t},e))},t}();function ti(t,e){var i=t.get("backgroundGroup").get("backShape"),n=t.get("panelGroup").get("backShape");return i===e||n===e}function ei(t){t.target&&t.target.get("origin")&&(t.data=t.target.get("origin"))}function ii(t,e){return!(!t||!e||t!==e)}function ni(t,e,i){return!(t===i||!e.isShapeInView(t))}function ri(t,e){for(var i=t;i=i.get("parent");)if(i===e)return!0;return!1}var ai=function(){function t(t){void 0===t&&(t={view:null,canvas:null}),this.view=t.view,this.canvas=t.canvas,this._panelGroup=this.view.get("panelGroup"),this._eventHandlers=[],this._pixelRatio=this.canvas.get("pixelRatio")}return t.prototype._getEventObj=function(t){return{x:t.x/this._pixelRatio,y:t.y/this._pixelRatio,target:t.target,event:t.event}},t.prototype._triggerShapeEvent=function(t,e,i){var n=t.name;if(n&&!t.get("destroyed")){var r=this.view,a=n+":"+e;i.view=r,i.appendInfo=t.get("appendInfo"),r.emit(a,i)}},t.prototype._addEvent=function(t,e,i){t.on(e,i),this._eventHandlers.push({target:t,type:e,handler:i})},t.prototype.bindEvents=function(){var t=this.view.get("container");this._addEvent(t,"mousedown",l.wrapBehavior(this,"_onEvents")),this._addEvent(t,"mousemove",l.wrapBehavior(this,"_onMove")),this._addEvent(t,"mouseup",l.wrapBehavior(this,"_onEvents")),this._addEvent(t,"click",l.wrapBehavior(this,"_onEvents")),this._addEvent(t,"dblclick",l.wrapBehavior(this,"_onEvents")),this._addEvent(t,"contextmenu",l.wrapBehavior(this,"_onEvents")),this._addEvent(t,"wheel",l.wrapBehavior(this,"_onEvents")),this._addEvent(t,"touchstart",l.wrapBehavior(this,"_onEvents")),this._addEvent(t,"touchmove",l.wrapBehavior(this,"_onEvents")),this._addEvent(t,"touchend",l.wrapBehavior(this,"_onEvents")),this._addEvent(this.canvas,"mousemove",l.wrapBehavior(this,"_onCanvasMove"));var e=this.canvas.get("canvasDOM");this._canvasDomLeaveHandler=l.wrapBehavior(this,"_onCanvasDomLeave"),e.addEventListener("mouseleave",this._canvasDomLeaveHandler)},t.prototype._onEvents=function(t){var e=t.type,i=this._getEventObj(t),n=t.target;ei(i),ti(this.view,n)||this._triggerShapeEvent(n,e,i);var r=n.get("parent");if(r){var a=r.get("name");a&&"panelGroup"===a&&this.view.emit("panel:"+e,i)}this.view.emit(e,i)},t.prototype._onMove=function(t){var e=this._getEventObj(t),i=t.target;ei(e),this.view.emit("mousemove",e);var n=ti(this.view,i);n||this._triggerShapeEvent(i,"mousemove",e);var r=this._lastShape,a=ti(this.view,r);!r||a||ii(r,i)||(ei(this._getEventObj(t)),this._triggerShapeEvent(r,"mouseleave",e));if(!n&&!ii(r,i)){var o=this._getEventObj(t);ei(o),this._triggerShapeEvent(i,"mouseenter",o)}var s=ri(i,this._panelGroup),u=!!r&&ri(r,this._panelGroup);s?u?this.view.emit("panel:mousemove",e):this.view.emit("panel:mouseenter",e):u&&this.view.emit("panel:mouseleave",e),this._lastShape=i},t.prototype._onCanvasMove=function(t){var e=l.isArray(t)?t[0]:t,i=this._getEventObj(e),n=this.canvas,r=this.view,a=e.target,o=ni(a,r,n),s=!!this._lastCanvasTarget&&ni(this._lastCanvasTarget,r,n);a!==this._lastCanvasTarget&&(s&&!o?this.view.emit("mouseleave",i):!s&&o&&this.view.emit("mouseenter",i)),this._lastCanvasTarget=a},t.prototype._onCanvasDomLeave=function(t){var e=this._getEventObj(t);e.event=t,this.view.emit("panel:mouseleave",e)},t.prototype.clearEvents=function(){var t=this._eventHandlers;l.each(t,(function(t){t.target.off(t.type,t.handler)})),this.canvas.get("canvasDOM").removeEventListener("mouseleave",this._canvasDomLeaveHandler)},t}(),oi=function(){function t(t,e){this.view=t,this.cfg=e,this.init()}return t.prototype.init=function(){this.container=this._createContainer();var t=this.view.get("data");this.facets=this.generateFacets(t)},t.prototype._createContainer=function(){return this.view.get("frontgroundGroup").addGroup()},t.prototype.render=function(){this._renderViews(),this.renderTitle(),this.renderAxis()},t.prototype._renderViews=function(){this._clearFacetViews(),this._createFacetViews()},t.prototype._createFacetViews=function(){var t=this;return this.facets.map((function(e){return t.facetToView(e)}))},t.prototype._clearFacetViews=function(){var t=this;l.each(this.facets,(function(e){e.view&&(t.view.removeView(e.view),e.view=void 0)}))},t.prototype.facetToView=function(t){var e=t.region,i=t.data,n=this.view.createView({start:e.start,end:e.end,padding:l.get(t,"padding",this.cfg.padding||0)});n.data(i||[]),this.beforeProcessView(n,t);var r=this.cfg.eachView;return r&&r(n,t),this.afterProcessView(n,t),t.view=n,n},t.prototype.clear=function(){this._clearFacetViews()},t.prototype.destroy=function(){this.clear(),this.container&&this.container.remove(),this.view=void 0,this.facets=[],this.container=void 0,this.destroyed=!0},t.prototype.beforeProcessView=function(t,e){},t.prototype.afterProcessView=function(t,e){},t.prototype.getFieldValues=function(t,e){var i=[],n={};return l.each(t,(function(t){var r=t[e];l.isNil(r)||n[r]||(i.push(r),n[r]=!0)})),i},t.prototype.getRegion=function(t,e,i,n){var r=1/(0===e?1:e),a=1/(0===t?1:t);return{start:{x:r*i,y:a*n},end:{x:r*(i+1),y:a*(n+1)}}},t}(),si={},ui=function(t,e){si[l.lowerFirst(t)]=e},li={},ci=function(t){return li[t.toLowerCase()]},hi=function(t,e){if(ci(t))throw new Error("Element type '"+t+"' existed.");var i=t.toLowerCase();li[i]=e,Ri(i,e)};function pi(t,e,i){var n=i.translate(t),r=i.translate(e);return i.isCategory?n===r:l.isNumberEqual(n,r)}function fi(t){return t.alias||t.field}var di=function(){function t(t){this.element=null,this._xDistance=null,this.element=t}return t.prototype.findPoint=function(t,e){if(0===e.length)return null;var i=this.element,n=i.get("type"),r=i.getXScale(),a=i.getYScale(),o=r.field,s=a.field,u=null;if("point"===n||"heatmap"===n){var c=i.get("coord").invert(t),h=r.invert(c.x),p=a.invert(c.y),f=1/0;return l.each(e,(function(t){var e=t._origin,i=Math.pow(e[o]-h,2)+Math.pow(e[s]-p,2);i=v){if(!_)return u=t,!1;l.isArray(u)||(u=[]),u.push(t)}})),l.isArray(u)&&(u=this._filterYValue(u,t));else{var b;if(r.isLinear||"timeCat"===r.type){if(v>r.translate(x)||vMath.abs(r.translate(b._origin[o])-v)&&(g=b)}var C=this._getXDistance();return!u&&Math.abs(r.translate(g._origin[o])-v)<=C/2&&(u=g),u},t.prototype.getTooltipItems=function(t,e){var i,n,r=this.element,a=t._origin,o=this._getTooltipTitle(a,e),s=r.get("tooltipOptions"),u=r.get("theme").defaultColor,c=this._getSize(t),p=[];function f(e,i){if(!l.isNil(i)&&""!==i){var n={title:o,point:t,name:e||o,value:i,color:t.color||u,marker:!0,size:c};p.push(n)}}if(s){var d=s.fields,g=s.callback;if(g){var v=d.map((function(e){return t._origin[e]})),y=g.apply(void 0,v),m=Object(h.__assign)({point:t,title:o,color:t.color||u,marker:!0,size:c},y);p.push(m)}else{var x=r.get("scales");l.each(d,(function(t){if(!l.isNil(a[t])){var e=x[t];i=fi(e),n=e.getText(a[t]),f(i,n)}}))}}else{var _=this._getTooltipValueScale();l.isNil(a[_.field])||(n=this._getTooltipValue(a,_),f(i=this._getTooltipName(a),n))}return p},t.prototype.clear=function(){this._xDistance=null},t.prototype._getXValueByPoint=function(t){var e=0,i=this.element,n=i.get("coord"),r=i.getXScale(),a=r.range,o=a[a.length-1],s=a[0],u=n.invert(t).x;return i.isInCircle()&&u>(1+o)/2&&(u=s),e=r.invert(u),r.isCategory&&(e=r.translate(e)),e},t.prototype._filterYValue=function(t,e){var i=this.element,n=i.get("coord"),r=i.getYScale(),a=r.field,o=n.invert(e),s=r.invert(o.y),u=t[t.length-1];return l.each(t,(function(t){var e=t._origin;if(e[a][0]<=s&&e[a][1]>=s)return u=t,!1})),u},t.prototype._getXDistance=function(){var t=this._xDistance;if(!t){var e=this.element.getXScale();if(e.isCategory)t=1;else{var i=e.values,n=e.translate(i[0]),r=n;l.each(i,(function(t){var i=e.translate(t);ir&&(r=i)}));var a=i.length;t=(r-n)/(a-1)}this._xDistance=t}return t},t.prototype._getTooltipTitleScale=function(t){var e=this.element,i=e.get("scales");return t?i[t]:i[e.getAttr("position").getFields()[0]]},t.prototype._getTooltipTitle=function(t,e){var i="",n=this.element,r=this._getTooltipTitleScale(e);if(r){var a=t[r.field];i=r.getText(a)}else if("heatmap"===n.get("type")){var o=n.getXScale(),s=n.getYScale();i="( "+o.getText(t[o.field])+", "+s.getText(t[s.field])+" )"}return i},t.prototype._getTooltipValueScale=function(){var t,e=this.element,i=e.getAttrsForLegend();l.each(i,(function(e){var i=e.getScale(e.type);if(i&&i.isLinear)return t=i,!1}));var n=e.getXScale(),r=e.getYScale();return t||r||n},t.prototype._getTooltipValue=function(t,e){var i=t[e.field];return l.isArray(i)?i.map((function(t){return e.getText(t)})).join("-"):e.getText(i)},t.prototype._getTooltipName=function(t){var e,i=this.element.getGroupScales();if(i.length&&l.each(i,(function(t){return e=t,!1})),e){var n=e.field;return e.getText(t[n])}return fi(this._getTooltipValueScale())},t.prototype._getSize=function(t){var e=this.element,i=e.get("coord"),n=e.getSize(t._origin);if(i.isRect&&n){var r=i.isTransposed?"y":"x";if(l.isArray(t[r]))n=n0&&t.labelLine&&e.lineToLabel(t)}))},e.prototype.lineToLabel=function(t){},e.prototype.setLabelPosition=function(t,e,i,n){},e.prototype.transLabelPoint=function(t){var e=this.get("coord").applyMatrix(t.x,t.y,1);t.x=e[0],t.y=e[1]},e.prototype.getOffsetVector=function(t){var e=t.offset||0,i=this.get("coord");return i.isTransposed?i.applyMatrix(e,0):i.applyMatrix(0,e)},e.prototype.getDefaultOffset=function(t){var e=this.get("coord"),i=this.getOffsetVector(t);return e.isTransposed?i[0]:i[1]},e.prototype.getLabelOffset=function(t,e,i){var n=this.getDefaultOffset(t),r=this.get("coord").isTransposed,a=r?"x":"y",o=r?1:-1,s={x:0,y:0};return s[a]=e>0||1===i?n*o:n*o*-1,s},e.prototype.getLabelsItems=function(t,e){var i=this,n=[],r=this.get("element"),a=this.get("coord"),o=this._getlabelOptions(t,e);return l.each(t,(function(t,e){var s=t._origin,u=o[e];if(u){l.isArray(u.text)||(u.text=[u.text]);var c=u.length;l.each(u.text,(function(e,o){if(l.isNil(e)||""===e)n.push(null);else{var h=i.getLabelPoint(u,t,o);(h=l.mix({},u,h)).textAlign||(h.textAlign=i.getLabelAlign(h,o,c)),r&&(h.id=r.getShapeId(s)+"-glabel-"+o+"-"+h.text),h.coord=a,n.push(h)}}))}else n.push(null)})),n},e.prototype.getLabelPoint=function(t,e,i){var n=this.get("coord"),r=t.text.length;function a(e,i){var n,r,a=e;return l.isArray(a)&&(1===t.text.length?a.length<=2?a=a[e.length-1]:(n=a,r=0,l.each(n,(function(t){r+=t})),a=r/n.length):a=a[i]),a}var o={text:t.text[i],x:0,y:0,start:{x:0,y:0},color:"#fff"};if(e&&"polygon"===this.get("elementType")){var s=function(t,e){if(l.isNumber(t)&&l.isNumber(e))return[t,e];for(var i,n,r=-1,a=0,o=0,s=t.length-1,u=0;++ru&&(u=e.x)})),o.x=(o.x+u)/2}"pyramid"===e.shape&&!e.nextPoints&&e.points&&e.points.forEach((function(t){var i=t;i=n.convert(i),(l.isArray(i.x)&&-1===e.x.indexOf(i.x)||l.isNumber(i.x)&&e.x!==i.x)&&(o.x=(o.x+i.x)/2)})),t.position&&this.setLabelPosition(o,e,i,t.position);var c=this.getLabelOffset(t,i,r);return t.offsetX&&(c.x+=t.offsetX),t.offsetY&&(c.y+=t.offsetY),this.transLabelPoint(o),o.start={x:o.x,y:o.y},o.x+=c.x,o.y+=c.y,o.color=e.color,o},e.prototype.getLabelAlign=function(t,e,i){var n="center";if(this.get("coord").isTransposed){var r=this.getDefaultOffset(t);n=r<0?"right":0===r?"center":"left",i>1&&0===e&&("right"===n?n="left":"left"===n&&(n="right"))}return n},e.prototype._getLabelValue=function(t,e){var i=e;l.isArray(i)||(i=[i]);var n=[];return l.each(i,(function(e){var i=t[e.field];if(l.isArray(i)){var r=[];l.each(i,(function(t){r.push(e.getText(t))})),i=r}else i=e.getText(i);l.isNil(i)||""===i?n.push(null):n.push(i)})),n},e.prototype._getlabelOptions=function(t,e){var i=this,n=this.get("elementType"),r=this.get("theme"),a=this.get("labelOptions"),o=a.scales,s=[];return l.each(t,(function(t,e){var u={},c=t._origin,h=i._getLabelValue(c,o);if(a.callback){var p=o.map((function(t){return c[t.field]}));u=a.callback.apply(a,p)}l.isNil(u)?s.push(null):(l.isString(u.content)?(u.text=u.content,delete u.content):l.isFunction(u.content)?(u.text=u.content(c,t,e),delete u.content):u.text=h[0],u.htmlTemplate&&(u.useHtml=!0,u.text=u.htmlTemplate(c,t,e),delete u.htmlTemplate),u.formatter&&(u.text=u.formatter.call(null,u.text,t,e),delete u.formatter),(u="polygon"===n||u.offset<0&&-1===l.indexOf(gi,n)?l.deepMix({},i.get("defaultLabelCfg"),r.innerLabels,u):l.deepMix({},i.get("defaultLabelCfg"),r.label,u)).origin=c,s.push(u))})),s},e}(u.Group),yi=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(h.__extends)(e,t),e.prototype.setLabelPosition=function(t,e,i,n){var r=n;l.isFunction(r)&&(r=r(e));var a=this.get("coord"),o=a.isTransposed,s=a.convertPoint(e.points[0]),u=a.convertPoint(e.points[2]),c=(s.x-u.x)/2*(o?-1:1),h=(s.y-u.y)/2*(o?-1:1);switch(r){case"right":o?(t.x-=c,t.y+=h,t.textAlign=t.textAlign||"center"):(t.x-=c,t.y+=h,t.textAlign=t.textAlign||"left");break;case"left":o?(t.x-=c,t.y-=h,t.textAlign=t.textAlign||"center"):(t.x+=c,t.y+=h,t.textAlign=t.textAlign||"right");break;case"bottom":o?(t.x-=2*c,t.textAlign=t.textAlign||"left"):(t.y+=2*h,t.textAlign=t.textAlign||"center");break;case"middle":o?t.x-=c:t.y+=h,t.textAlign=t.textAlign||"center";break;case"top":t.textAlign=o?t.textAlign||"left":t.textAlign||"center"}},e}(vi),mi=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(h.__extends)(e,t),e.prototype.getLabelPoint=function(t,e,i){var n,r=i,a=t.text[r],o=1;this._isToMiddle(e)?n=this._getMiddlePoint(e.points):(1===t.text.length&&0===r?r=1:0===r&&(o=-1),n=this.getArcPoint(e,r));var s=this.getDefaultOffset(t);s*=o;var u=this.getPointAngle(n),l=t.labelEmit,c=this.getCirclePoint(u,s,n,l);return c?(c.text=a,c.angle=u,c.color=e.color):c={text:""},t.autoRotate||void 0===t.autoRotate?c.rotate=this.getLabelRotate(u,s,l):c.rotate=t.rotate,c.start={x:n.x,y:n.y},c},e.prototype.getCirclePoint=function(t,e,i,n){var r=this.get("coord"),a=r.getCenter(),o=t,s=function(t,e){return Le(t,e)}(r,i);if(0===s)return null;r.isTransposed&&s>e&&!n?o+=2*Math.asin(e/(2*s)):s+=e;return{x:a.x+s*Math.cos(o),y:a.y+s*Math.sin(o),angle:o,r:s}},e.prototype.getArcPoint=function(t,e){var i,n=e;return n=n||0,i=l.isArray(t.x)||l.isArray(t.y)?{x:l.isArray(t.x)?t.x[n]:t.x,y:l.isArray(t.y)?t.y[n]:t.y}:t,this.transLabelPoint(i),i},e.prototype.getPointAngle=function(t){return Ee(this.get("coord"),t)},e.prototype.getLabelRotate=function(t,e,i){var n;return n=180*t/Math.PI,n+=90,i&&(n-=90),n&&(n>90?n-=180:n<-90&&(n+=180)),n/180*Math.PI},e.prototype.getLabelAlign=function(t){var e,i=this.get("coord");if(t.labelEmit)e=t.angle<=Math.PI/2&&t.angle>-Math.PI/2?"left":"right";else if(i.isTransposed){var n=i.getCenter(),r=this.getDefaultOffset(t);e=Math.abs(t.x-n.x)<1?"center":t.angle>Math.PI||t.angle<=0?r>0?"left":"right":r>0?"right":"left"}else e="center";return e},e.prototype.lineToLabel=function(t){},e.prototype._getMiddlePoint=function(t){var e=this.get("coord"),i=t.length,n={x:0,y:0};return l.each(t,(function(t){n.x+=t.x,n.y+=t.y})),n.x/=i,n.y/=i,n=e.convert(n)},e.prototype._isToMiddle=function(t){return t.x.length>2},e}(vi);function xi(t,e,i){return{x:t.x+i*Math.cos(e),y:t.y+i*Math.sin(e)}}var _i=function(t){function e(e){var i=t.call(this,Object(h.__assign)({},e))||this;return i.set("defaultLabelCfg",i.get("theme").thetaLabels),i}return Object(h.__extends)(e,t),e.prototype.getDefaultOffset=function(t){return t.offset||0},e.prototype.adjustItems=function(e){var i=e,n=i[0]?i[0].offset:0;return n>0&&(i=this._distribute(i,n)),t.prototype.adjustItems.call(this,i)},e.prototype.lineToLabel=function(t){var e=this.get("coord"),i=e.getRadius(),n=t.offset,r=t.orignAngle||t.angle,a=e.getCenter(),o=xi(a,r,i+2.5),s=xi(a,r,i+n/2);l.isObject(t.labelLine)||(t.labelLine={}),t.labelLine.path=["M "+o.x,o.y+" Q"+s.x,s.y+" "+t.x,t.y].join(",")},e.prototype.getLabelRotate=function(t,e,i){var n;return e<0&&((n=180*t/Math.PI)>90&&(n-=180),n<-90&&(n+=180)),n/180*Math.PI},e.prototype.getLabelAlign=function(t){var e,i=this.get("coord").getCenter();return e=t.angle<=Math.PI/2&&t.x>=i.x?"left":"right",this.getDefaultOffset(t)<=0&&(e="right"===e?"left":"right"),e},e.prototype.getArcPoint=function(t){return t},e.prototype.getPointAngle=function(t){var e=this.get("coord"),i={x:l.isArray(t.x)?t.x[0]:t.x,y:t.y[0]};this.transLabelPoint(i);var n,r={x:l.isArray(t.x)?t.x[1]:t.x,y:t.y[1]};this.transLabelPoint(r);var a=Ee(e,i);if(t.points&&t.points[0].y===t.points[1].y)n=a;else{var o=Ee(e,r);a>=o&&(o+=2*Math.PI),n=a+(o-a)/2}return n},e.prototype.getCirclePoint=function(t,e,i){var n=this.get("coord"),r=n.getCenter(),a=n.getRadius()+e,o=xi(r,t,a);return o.angle=t,o.r=a,o},e.prototype._distribute=function(t,e){var i=this.get("coord"),n=i.getRadius(),r=this.get("defaultLabelCfg").labelHeight,a=i.getCenter(),o=2*(n+e)+2*r,s={start:i.start,end:i.end},u=this.get("element");if(u){var l=u.get("view");s={start:l.get("panelRange").bl,end:l.get("panelRange").tr}}var c=[[],[]];return t.forEach((function(t){t&&("right"===t.textAlign?c[0].push(t):c[1].push(t))})),c.forEach((function(t,e){var i=o/r;t.length>i&&(t.sort((function(t,e){return e["..percent"]-t["..percent"]})),t.splice(i,t.length-i)),t.sort((function(t,e){return t.y-e.y})),function(t,e,i,n,r){var a,o=!0,s=i.start,u=i.end,l=Math.min(s.y,u.y),c=Math.abs(s.y-u.y),h=0,p=Number.MIN_VALUE,f=t.map((function(t){return t.y>h&&(h=t.y),t.yc&&(c=h-l);o;)for(f.forEach((function(t){var e=(Math.min.apply(p,t.targets)+Math.max.apply(p,t.targets))/2;t.pos=Math.min(Math.max(p,e-t.size/2),c-t.size)})),o=!1,a=f.length;a--;)if(a>0){var d=f[a-1],g=f[a];d.pos+d.size>g.pos&&(d.size+=g.size,d.targets=d.targets.concat(g.targets),d.pos+d.size>c&&(d.pos=c-d.size),f.splice(a,1),o=!0)}a=0,f.forEach((function(i){var n=l+e/2;i.targets.forEach((function(){t[a].y=i.pos+n,n+=e,a++}))})),t.forEach((function(t){var e=t.r*t.r,i=Math.pow(Math.abs(t.y-n.y),2);if(e=0?e:i<=0?i:0},e.prototype.getShapeId=function(t){var e=this.get("id"),i=this.get("keyFields");if(i&&i.length>0)l.each(i,(function(i){e=e+"-"+t[i]}));else{var n=this.get("type"),r=this.getXScale(),a=this.getYScale(),o=r.field||"x",s=a.field||"y",u=t[s],c=void 0;c=r.isIdentity?r.values[0]:t[o],e="interval"===n||"schema"===n?e+"-"+c:"line"===n||"area"===n||"path"===n?e+"-"+n:e+"-"+c+"-"+u;var h=this.getGroupScales();l.isEmpty(h)||l.each(h,(function(i){var n=i.field;"identity"!==i.type&&(e=e+"-"+t[n])}))}return e},e.prototype.getOriginDataByPoint=function(t){var e,i=this.getXScale(),n=this.getYScale(),r=this.get("coord").invert(t),a=i.invert(r.x),o=n.invert(r.y),s=i.field,u=n.field;return(e={})[s]=a,e[u]=o,e},e.prototype.createShapePointsCfg=function(t){var e=this.getXScale(),i=this.getYScale();return{x:this._normalizeValues(t[e.field],e),y:i?this._normalizeValues(t[i.field],i):t.y?t.y:.1,y0:i?i.scale(this.getYMinValue()):void 0}},e.prototype.draw=function(t,e,i,n){for(var r=0,a=t.length;r1){var v=g[1];v.change({nice:!1,min:0,max:Math.max.apply(null,v.values)})}if(u.scales=g,-1!==l.indexOf(["color","size","shape","opacity"],s)&&1===g.length&&g[0].isIdentity)u.values=g[0].values;else if(!c&&!p)if("size"===s)u.values=a.sizes;else if("shape"===s)u.values=a.shapes[o]||[];else if("opacity"===s)u.values=a.opacities;else if("color"===s&&g.length){var y=g[0].values.length;u.values=y<=10?a.colors:a.colors_20}var m=Object(gt.getAttribute)(s);i[s]=new m(u)}))},e.prototype._updateStackRange=function(t,e,i){for(var n=l.flatten(i),r=e.min,a=e.max,o=0,s=n.length;oa&&(a=h)}(re.max)&&e.change({min:r,max:a})},e.prototype._groupData=function(t){var e=this.getGroupScales().map((function(t){return t.field}));return l.group(t,e)},e.prototype._saveOrigin=function(t){return l.map(t,(function(t){var e;return Object(h.__assign)(Object(h.__assign)({},t),((e={})._origin=t,e))}))},e.prototype._numeric=function(t){for(var e=this.getAttr("position").scales,i=0,n=t.length;i1)for(var p=0;pe.minX&&t.xe.minY&&t.y0;){t.shift().destroy()}},e.prototype._clearInner=function(){this.set("scales",{}),this.emit("beforeclearinner"),this.get("options").elements=[],this._clearElements();var t=this.get("facet");t&&t.clear();var e=this.get("annotationController");e&&e.reset();var i=this.get("axisController");i&&i.clear();var n=this.get("tooltipController");if(n&&n.clear(),!this.get("keepLegend")){var r=this.get("legendController");r&&r.clear()}var a=this.get("backgroundGroup"),o=this.get("panelGroup");a.get("backShape")&&a.get("backShape").remove(),o.get("backShape")&&o.get("backShape").remove(),this.emit("afterclearinner")},e.prototype._beforeRender=function(){l.each(this.get("views"),(function(t){t._beforeRender()})),this._initView()},e.prototype._initView=function(){this._execFilters(),this._initCoord(),this.emit("beforeinitelements"),this._initElements(),this._adjustScales()},e.prototype._initCoord=function(){var t=this.get("panelRange"),e=this.get("coordController").createCoord(t.bl,t.tr);this.set("coord",e)},e.prototype._getScales=function(t){var e=this.get("elements");return l.reduce(e,(function(e,i){var n="x"===t?i.getXScale():i.getYScale();return n&&!l.has(e,n.field)&&(e[n.field]=n),e}),{})},e.prototype._initElements=function(){var t=this.get("filteredData"),e=this.get("coord"),i=this.get("id"),n=this.get("options"),r=this.get("animate"),a=this.get("widthRatio"),o=n.tooltip&&n.tooltip.shared;l.each(this.get("elements"),(function(n,s){n.set("data",t),n.set("coord",e),n.set("id",i+"-element-"+s),n.set("animate",r),n.set("widthRatio",l.deepMix({},a,n.get("widthRatio"))),l.isBoolean(o)&&n.set("shareTooltip",o),n.init()}))},e.prototype._adjustScales=function(){this._adjustCategoryScalesRange();var t=this.get("elements"),e=this.get("scaleController").defs;t.forEach((function(t){if("interval"===t.get("type")){var i=t.getYScale(),n=i.field,r=i.min,a=i.max,o=i.type;e[n]&&e[n].min||"time"===o||(r>0?i.change({min:0}):a<=0&&i.change({max:0}))}}))},e.prototype._adjustCategoryScalesRange=function(){var t=this.get("coord"),e=this.getXScale(),i=this.getYScales(),n=this.get("widthRatio"),r=[];e&&r.push(e),r=r.concat(i);var a=function(t){if(t.isPolar){var e=t.startAngle;return t.endAngle-e==2*Math.PI}return!1}(t),o=this.get("scaleController").defs;r.forEach((function(e){var i=e.field,r=e.values;if((e.isCategory||e.isIdentity)&&r&&(!o[i]||!o[i].range)){var s=r.length,u=void 0;if(1===s)u=[.5,1];else{var l=0;u=a?t.isTransposed?[(l=1/s*n.multiplePie)/2,1-l/2]:[0,1-1/s]:[l=1/s*1/2,1-l]}e.range=u}}))},e.prototype._execFilters=function(){this.get("data");var t=this.get("data")||[],e=this._getFilters();e&&(t=t.filter((function(t){var i=!0;return l.each(e,(function(e,n){if(e&&!(i=e(t[n],t)))return!1})),i}))),this.set("filteredData",t)},e.prototype._addBackShape=function(){var t=this.get("backgroundGroup"),e=this.get("viewRange"),i={x:e.x,y:e.y,width:e.width,height:e.height,fill:"rgba(255,255,255,0)"},n=l.mix(this.get("theme").backgroundStyle,this.get("backgroundStyle")),r=t.addShape("rect",{attrs:l.mix(i,n),zIndex:-1});t.set("backShape",r),t.sort();var a=this.get("panelGroup"),o=this.get("panelRange"),s=a.addShape("rect",{attrs:{x:o.x,y:o.y,width:o.width,height:o.height,fill:"rgba(255,255,255,0)"},zIndex:-1});a.set("backShape",s),a.sort()},e.prototype._destroyViewGroups=function(){this.get("frontgroundGroup").remove(),this.get("backgroundGroup").remove(),this.get("panelGroup").remove(),this.set("frontgroundGroup",null),this.set("backgroundGroup",null),this.set("panelGroup",null)},e.prototype._canvasDraw=function(t){var e=this.get("canvas");if(!t){var i=this.get("views");if(this.get("animate")){var n=this.get("isUpdate");l.each(i,(function(t){tt.execAnimation(t,n)})),tt.execAnimation(this,n),e.draw()}else e.draw()}},e.prototype._renderLegend=function(){this.get("legendController").render()},e.prototype._renderAnnotations=function(){var t=this.get("coord"),e=this.get("annotationController");e.xScales=this._getScales("x"),e.yScales=this._getScales("y"),e.render(t)},e.prototype._getLegendFields=function(){var t=[];return this.get("elements").forEach((function(e){var i=e.getLegendFields();t=t.concat(i)})),l.uniq(t)},e.prototype._setInteraction=function(t,e){var i=this.get("interactions");i[t]&&i[t].destroy(),i[t]=e},e}(I),Fi=Bi,Ri=function(t,e){Bi.prototype[t]=function(t){void 0===t&&(t={}),t.view=this,t.theme=this.get("theme"),t.container=this.get("panelGroup").addGroup(),t.canvas=this.get("canvas");var i=new e(t);return this._addElement(i),i}},Ni=function(t){function e(e){return t.call(this,Object(h.__assign)({containerDOM:null,containerId:null,width:P.width,height:P.height,pixelRatio:P.pixelRatio,renderer:P.renderer,forceFit:!1},e))||this}return Object(h.__extends)(e,t),e.prototype.init=function(){this.set("id",l.uniqueId("chart")),this._initCanvas(),this._initEvents(),t.prototype.init.call(this)},e.prototype.changeSize=function(t,e,i){return void 0===i&&(i=!0),this.get("canvas").changeSize(t,e),this.set("width",t),this.set("height",e),this.initRegion(),i&&(this.render(),this.emit("afterchangesize")),this},e.prototype.render=function(e){return t.prototype.render.call(this,e),this.get("canvas").draw(),this},e.prototype.destroy=function(){window.removeEventListener("resize",l.getWrapBehavior(this,"_initForceFitEvent")),t.prototype.destroy.call(this)},e.prototype._initCanvas=function(){var t=new u.Canvas({containerDOM:this.get("containerDOM"),containerId:this.get("containerId"),width:this.get("width"),height:this.get("height"),renderer:this.get("renderer"),pixelRatio:this.get("pixelRatio")});if(this.set("canvas",t),this.set("container",t),this.get("forceFit")){var e=this._getContainerDOM(),i=p.getWidth(e,this.get("width"));this.set("width",i)}},e.prototype._initEvents=function(){this.get("forceFit")&&window.addEventListener("resize",l.wrapBehavior(this,"_initForceFitEvent"))},e.prototype._initForceFitEvent=function(){var t=setTimeout(l.wrapBehavior(this,"forceFit"),200);clearTimeout(this.get("resizeTimer")),this.set("resizeTimer",t)},e.prototype.forceFit=function(){if(!this.destroyed){var t=this._getContainerDOM(),e=this.get("width"),i=p.getWidth(t,e);if(0!==i&&i!==e){var n=this.get("height");this.changeSize(i,n)}return this}},e.prototype._getContainerDOM=function(){var t=this.get("containerDOM");return l.isElement(t)||(t=document.getElementById(this.get("containerId"))),t},e}(Fi);function zi(t){var e=[],i=t.x,n=t.y;return n=l.isArray(n)?n:[n],l.each(n,(function(t,n){var r={x:l.isArray(i)?i[n]:i,y:t};e.push(r)})),e}function Hi(t,e){var i=e.color,n=e.opacity;i&&(t.fill=i),l.isNumber(n)&&(t.opacity=t.fillOpacity=n)}function Gi(t,e){var i=e.color,n=e.opacity;i&&(t.stroke=i),l.isNumber(n)&&(t.opacity=t.strokeOpacity=n)}function Yi(t){var e=t.style;return Gi(e,t),l.isNumber(t.size)&&(e.lineWidth=t.size),e}function Wi(t){var e=t.style;return Hi(e,t),e}function Vi(t,e,i){var n=[],r=[],a=[],o=[],s=t.isInCircle;return l.each(t.points,(function(t){a.push(t[1]),o.push(t[0])})),o=o.reverse(),r.push(a,o),l.each(r,(function(r,a){var o=[],u=i.parsePoints(r),l=u[0];s&&u.push({x:l.x,y:l.y}),o=e?je(u,!1,t.constraint):De(u,!1),a>0&&(o[0][0]="L"),n=n.concat(o)})),n.push(["Z"]),n}var qi=ze("area",{defaultShapeType:"area",getDefaultPoints:function(t){var e=t.x,i=t.y,n=t.y0;return(i=l.isArray(i)?i:[n,i]).map((function(t){return{x:e,y:t}}))},drawShape:function(t,e,i){var n=this.getShape(t),r=n.name,a=this._theme;if(a&&a.area&&a.area[r]){var o=a.area[r].default;e.style=l.mix({},o,e.style)}var s=1===e.points.length&&e.showSinglePoint?function(t,e,i){var n=t._coord.convertPoint(e.points[0][1]);return i.addShape("circle",{attrs:l.mix({x:n.x,y:n.y,r:2,fill:e.color},e.style)})}(this,e,i):n.draw(e,i);return s&&(s.set("origin",e.origin),s.id=e.splitedIndex?e.id+e.splitedIndex:e.id,s.name=this.name),s},getMarkerStyle:function(t,e){var i,n=this.getShape(t);i=n.getMarkerStyle?n.getMarkerStyle(e):function(t){return{symbol:function(t,e){return[["M",t-5.5,e-4],["L",t+5.5,e-4],["L",t+5.5,e+4],["L",t-5.5,e+4],["Z"]]},radius:5,fill:t.color}}(e);var r=this._theme,a=n.name;return r&&r.area&&r.area[a]&&(i=l.mix({},r.area[a].default,i)),i}});He("area","area",{draw:function(t,e){var i=Wi(t),n=Vi(t,!1,this);return e.addShape("path",{attrs:l.mix(i,{path:n})})}}),He("area","smooth",{draw:function(t,e){var i=Wi(t),n=this.getCoord();t.constraint=[[n.start.x,n.end.y],[n.end.x,n.start.y]];var r=Vi(t,!0,this);return e.addShape("path",{attrs:l.mix(i,{path:r})})}}),He("area","line",{draw:function(t,e){var i=Yi(t),n=Vi(t,!1,this);return e.addShape("path",{attrs:l.mix(i,{path:n})})}}),He("area","smoothLine",{draw:function(t,e){var i=Yi(t),n=Vi(t,!0,this);return e.addShape("path",{attrs:l.mix(i,{path:n})})}});var Xi=qi;function Ui(t,e,i){if(!t.length)return[];var n,r=[],a=[];return t.forEach((function(t){n=t._origin?t._origin[i]:t[i],e?l.isNil(n)||a.push(t):l.isArray(n)&&l.isNil(n[0])||l.isNil(n)?a.length&&(r.push(a),a=[]):a.push(t)})),a.length&&r.push(a),r}var Zi=function(t){function e(e){var i=t.call(this,Object(h.__assign)({type:"area",shapeType:"area",generatePoints:!0,sortable:!0,connectNulls:!1,showSinglePoint:!1},e))||this;return i.set("shapeFactory",Xi),i}return Object(h.__extends)(e,t),e.prototype.draw=function(t,e,i,n){var r=this,a=this.getDrawCfg(t[0]),o=Ui(t,this.get("connectNulls"),this.getYScale().field);a.origin=t,l.each(o,(function(t,o){a.splitedIndex=o;var s=t.map((function(t){return t.points}));a.points=s;var u=i.drawShape(a.shape,a,e);r.appendShapeInfo(u,n+o)}))},e}(Li);var Qi=function(){function t(t){this.element=null,this.element=t}return t.prototype.getSize=function(t){var e=this._getSizeValue(t);if(l.isUndefined(e)){var i=this._getDefaultSize();return this._toCoordinateSize(i)}return e},t.prototype.getNormalizedSize=function(t){var e=this._getSizeValue(t);return l.isUndefined(e)?this._getDefaultSize():this._toNormalizedSize(e)},t.prototype.clear=function(){this._defaultSize=null},t.prototype._getSizeValue=function(t){var e,i=this.element,n=i.getAttr("size");return n&&(e=i.getAttrValues(n,t)[0]),e},t.prototype._getDodgeCount=function(t){var e,i=this.element.get("adjustOptions");if(l.each(i,(function(t){if("dodge"===t.type)return e=t.dodgeBy,!1})),e){var n=l.flatten(t);return l.valuesOfKey(n,e).length}return t.length},t.prototype._getDefaultSize=function(){var t=this.element.get("widthRatio"),e=this._defaultSize;if(!e){var i=this.element,n=i.get("coord"),r=i.getXScale(),a=r.values,o=i.get("dataArray"),s=a.length;if(r.isLinear&&a.length>1){a.sort();var u=function(t,e){var i=t.length,n=t;l.isString(n[0])&&(n=t.map((function(t){return e.translate(t)})));for(var r=n[1]-n[0],a=2;ao&&(r=o)}return r}(a,r);s=(r.max-r.min)/u,a.length>s&&(s=a.length)}var c=r.range,h=1/s,p=1;if(i.isInCircle()?p=n.isTransposed&&s>1?t.multiplePie:t.rose:(r.isLinear&&(h*=c[1]-c[0]),p=t.column),h*=p,i.hasAdjust("dodge"))h/=this._getDodgeCount(o);return this._defaultSize=h,h}return e},t.prototype._getCoordinateWidth=function(){var t=this.element,e=t.get("coord");if(t.isInCircle()&&!e.isTransposed)return(e.endAngle-e.startAngle)*e.getRadius();var i=e.convertPoint({x:0,y:0}),n=e.convertPoint({x:1,y:0}),r=0;return i&&n&&(r=Math.sqrt(Math.pow(n.x-i.x,2)+Math.pow(n.y-i.y,2))),r},t.prototype._toCoordinateSize=function(t){return t*this._getCoordinateWidth()},t.prototype._toNormalizedSize=function(t){return t/this._getCoordinateWidth()},t}();function $i(t){var e=t;l.isArray(t)||(e=[t]);var i=e[0],n=e[e.length-1],r=e.length>1?e[1]:i;return{min:i,max:n,min1:r,max1:e.length>3?e[3]:n,median:e.length>2?e[2]:r}}function Ki(t,e,i){var n,r,a,o,s=[],u=t,c=e;return l.isArray(c)?n=[[u-i/2,(r=$i(c)).max],[u+i/2,r.max],[u,r.max],[u,r.max1],[u-i/2,r.min1],[u-i/2,r.max1],[u+i/2,r.max1],[u+i/2,r.min1],[u,r.min1],[u,r.min],[u-i/2,r.min],[u+i/2,r.min],[u-i/2,r.median],[u+i/2,r.median]]:(c=c||.5,n=[[(r=$i(u)).min,c-i/2],[r.min,c+i/2],[r.min,c],[r.min1,c],[r.min1,c-i/2],[r.min1,c+i/2],[r.max1,c+i/2],[r.max1,c-i/2],[r.max1,c],[r.max,c],[r.max,c-i/2],[r.max,c+i/2],[r.median,c-i/2],[r.median,c+i/2]]),a=n,o=s,l.each(a,(function(t){o.push({x:t[0],y:t[1]})})),s}var Ji=ze("box",{defaultShapeType:"box"});He("box","box",{getPoints:function(t){return Ki(t.x,t.y,t.size)},draw:function(t,e){var i,n=function(t){var e=t.style;return Gi(e,t),e}(t),r=[["M",(i=t.points)[0].x,i[0].y],["L",i[1].x,i[1].y],["M",i[2].x,i[2].y],["L",i[3].x,i[3].y],["M",i[4].x,i[4].y],["L",i[5].x,i[5].y],["L",i[6].x,i[6].y],["L",i[7].x,i[7].y],["L",i[4].x,i[4].y],["Z"],["M",i[8].x,i[8].y],["L",i[9].x,i[9].y],["M",i[10].x,i[10].y],["L",i[11].x,i[11].y],["M",i[12].x,i[12].y],["L",i[13].x,i[13].y]];return r=this.parsePath(r),e.addShape("path",{attrs:l.mix(n,{path:r})})},getMarkerStyle:function(t){return{symbol:function(t,e,i){var n=Ki(t,[e-6,e-3,e,e+3,e+6],i);return[["M",n[0].x+1,n[0].y],["L",n[1].x-1,n[1].y],["M",n[2].x,n[2].y],["L",n[3].x,n[3].y],["M",n[4].x,n[4].y],["L",n[5].x,n[5].y],["L",n[6].x,n[6].y],["L",n[7].x,n[7].y],["L",n[4].x,n[4].y],["Z"],["M",n[8].x,n[8].y],["L",n[9].x,n[9].y],["M",n[10].x+1,n[10].y],["L",n[11].x-1,n[11].y],["M",n[12].x,n[12].y],["L",n[13].x,n[13].y]]},radius:6,lineWidth:1,stroke:t.color}}});var tn=Ji,en=function(t){function e(e){var i=t.call(this,Object(h.__assign)({type:"box",shapeType:"box",generatePoints:!0},e))||this,n=new Qi(i);return i.set("sizeController",n),i.set("shapeFactory",tn),i}return Object(h.__extends)(e,t),e.prototype.createShapePointsCfg=function(e){var i=t.prototype.createShapePointsCfg.call(this,e);return i.size=this.getNormalizedSize(e),i},e}(Li),nn=1/3;function rn(t){var e=t.style;return Gi(e,t),e}function an(t,e){var i=[];i.push({x:t.x,y:.5*t.y+1*e.y/2}),i.push({y:.5*t.y+1*e.y/2,x:e.x}),i.push(e);var n=["C"];return l.each(i,(function(t){n.push(t.x,t.y)})),n}function on(t,e){var i=[];i.push({x:e.x,y:e.y}),i.push(t);var n=["Q"];return l.each(i,(function(t){n.push(t.x,t.y)})),n}var sn=ze("edge",{defaultShapeType:"line",getDefaultPoints:function(t){return zi(t)},getMarkerStyle:function(t,e){var i,n=this.getShape(t);i=n.getMarkerStyle?n.getMarkerStyle(e):function(t){var e={symbol:"circle",radius:4.5};return Gi(e,t),e}(e);var r=this._theme,a=n.name;return r&&r.edge&&r.edge[a]&&(i=l.mix({},r.edge[a].default,i)),i}});He("edge","line",{draw:function(t,e){var i=t.isInCircle,n=this.parsePoints(t.points),r=rn(t),a=De(n,i);return e.addShape("path",{attrs:l.mix(r,{path:a})})}}),He("edge","vhv",{draw:function(t,e){var i=t.points,n=rn(t),r=function(t,e){var i=[];i.push({y:t.y*(1-nn)+e.y*nn,x:t.x}),i.push({y:t.y*(1-nn)+e.y*nn,x:e.x}),i.push(e);var n=[["M",t.x,t.y]];return l.each(i,(function(t){n.push(["L",t.x,t.y])})),n}(i[0],i[1]);return r=this.parsePath(r),e.addShape("path",{attrs:l.mix(n,{path:r})})}}),He("edge","smooth",{draw:function(t,e){var i=t.points,n=rn(t),r=function(t,e){var i=an(t,e),n=[["M",t.x,t.y]];return n.push(i),n}(i[0],i[1]);return r=this.parsePath(r),e.addShape("path",{attrs:l.mix(n,{path:r})})}}),He("edge","arc",{draw:function(t,e){var i,n,r=t.points,a=r.length>2?"weight":"normal",o=rn(t);if(t.isInCircle){var s={x:0,y:1};"normal"===a?n=function(t,e,i){var n=on(e,i),r=[["M",t.x,t.y]];return r.push(n),r}(r[0],r[1],s):(o.fill=o.stroke,n=function(t,e){var i=on(t[1],e),n=on(t[3],e),r=[["M",t[0].x,t[0].y]];return r.push(n),r.push(["L",t[3].x,t[3].y]),r.push(["L",t[2].x,t[2].y]),r.push(i),r.push(["L",t[1].x,t[1].y]),r.push(["L",t[0].x,t[0].y]),r.push(["Z"]),r}(r,s)),n=this.parsePath(n),i=e.addShape("path",{attrs:l.mix(o,{path:n})})}else if("normal"===a)r=this.parsePoints(r),i=e.addShape("arc",{attrs:l.mix(o,{x:(r[1].x+r[0].x)/2,y:r[0].y,r:Math.abs(r[1].x-r[0].x)/2,startAngle:Math.PI,endAngle:2*Math.PI})});else{n=[["M",r[0].x,r[0].y],["L",r[1].x,r[1].y]];var u=an(r[1],r[3]),c=an(r[2],r[0]);n.push(u),n.push(["L",r[3].x,r[3].y]),n.push(["L",r[2].x,r[2].y]),n.push(c),n.push(["Z"]),n=this.parsePath(n),o.fill=o.stroke,i=e.addShape("path",{attrs:l.mix(o,{path:n})})}return i}});var un=sn,ln=function(t){function e(e){var i=t.call(this,Object(h.__assign)({type:"edge",generatePoints:!0,shapeType:"edge",shareTooltip:!1},e))||this;return i.set("shapeFactory",un),i}return Object(h.__extends)(e,t),e}(Li),cn=function(t){function e(e){return t.call(this,Object(h.__assign)({type:"heatmap",shapeType:"point",paletteCache:{}},e))||this}return Object(h.__extends)(e,t),e.prototype._prepareRange=function(){var t=this.get("mappedData"),e=this.getAttr("color").scales[0].field,i=1/0,n=-1/0;t.forEach((function(t){var r=t._origin[e];r>n&&(n=r),r=t[0]})));for(var c=this.get("scales")[o],h=0;h1?1:Number(e),n=t.length-1,r=Math.floor(n*i),a=n*i-r,o=t[r],l=r===n?o:t[r+1];return u([s(o,l,a,0),s(o,l,a,1),s(o,l,a,2)])}(i,t)}},toRGB:Object(n.memoize)(p)},d=i(1),g=function(t){function e(e){var i=t.call(this,e)||this;return i.type="color",i.names=["color"],Object(n.isString)(i.values)&&(i.linear=!0),i.gradient=f.gradient(i.values),i}return d.__extends(e,t),e.prototype.getLinearValue=function(t){return this.gradient(t)},e}(a),v=function(t){function e(e){var i=t.call(this,e)||this;return i.type="opacity",i.names=["opacity"],i}return d.__extends(e,t),e}(a),y=function(t){function e(e){var i=t.call(this,e)||this;return i.names=["x","y"],i.type="position",i}return d.__extends(e,t),e.prototype.mapping=function(t,e){var i=this.scales,r=i[0],a=i[1];return Object(n.isNil)(t)||Object(n.isNil)(e)?[]:[Object(n.isArray)(t)?t.map((function(t){return r.scale(t)})):r.scale(t),Object(n.isArray)(e)?e.map((function(t){return a.scale(t)})):a.scale(e)]},e}(a),m=function(t){function e(e){var i=t.call(this,e)||this;return i.type="shape",i.names=["shape"],i}return d.__extends(e,t),e.prototype.getLinearValue=function(t){var e=Math.round((this.values.length-1)*t);return this.values[e]},e}(a),x=function(t){function e(e){var i=t.call(this,e)||this;return i.type="size",i.names=["size"],i}return d.__extends(e,t),e}(a),_=i(14),b={},M=function(t){return b[t.toLowerCase()]},S=function(t,e){if(M(t))throw new Error("Attribute type '"+t+"' existed.");b[t.toLowerCase()]=e};i.d(e,"registerAttribute",(function(){return S})),i.d(e,"getAttribute",(function(){return M})),i.d(e,"Attribute",(function(){return a})),i.d(e,"Color",(function(){return g})),i.d(e,"Opacity",(function(){return v})),i.d(e,"Position",(function(){return y})),i.d(e,"Shape",(function(){return m})),i.d(e,"Size",(function(){return x})),i.d(e,"colorUtil",(function(){return f})),i.d(e,"Scale",(function(){return _.Scale})),S("Color",g),S("Opacity",v),S("Position",y),S("Shape",m),S("Size",x)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sub=e.mul=void 0,e.create=function(){var t=new n.ARRAY_TYPE(9);n.ARRAY_TYPE!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0);return t[0]=1,t[4]=1,t[8]=1,t},e.fromMat4=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t},e.clone=function(t){var e=new n.ARRAY_TYPE(9);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e},e.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},e.fromValues=function(t,e,i,r,a,o,s,u,l){var c=new n.ARRAY_TYPE(9);return c[0]=t,c[1]=e,c[2]=i,c[3]=r,c[4]=a,c[5]=o,c[6]=s,c[7]=u,c[8]=l,c},e.set=function(t,e,i,n,r,a,o,s,u,l){return t[0]=e,t[1]=i,t[2]=n,t[3]=r,t[4]=a,t[5]=o,t[6]=s,t[7]=u,t[8]=l,t},e.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.transpose=function(t,e){if(t===e){var i=e[1],n=e[2],r=e[5];t[1]=e[3],t[2]=e[6],t[3]=i,t[5]=e[7],t[6]=n,t[7]=r}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t},e.invert=function(t,e){var i=e[0],n=e[1],r=e[2],a=e[3],o=e[4],s=e[5],u=e[6],l=e[7],c=e[8],h=c*o-s*l,p=-c*a+s*u,f=l*a-o*u,d=i*h+n*p+r*f;if(!d)return null;return d=1/d,t[0]=h*d,t[1]=(-c*n+r*l)*d,t[2]=(s*n-r*o)*d,t[3]=p*d,t[4]=(c*i-r*u)*d,t[5]=(-s*i+r*a)*d,t[6]=f*d,t[7]=(-l*i+n*u)*d,t[8]=(o*i-n*a)*d,t},e.adjoint=function(t,e){var i=e[0],n=e[1],r=e[2],a=e[3],o=e[4],s=e[5],u=e[6],l=e[7],c=e[8];return t[0]=o*c-s*l,t[1]=r*l-n*c,t[2]=n*s-r*o,t[3]=s*u-a*c,t[4]=i*c-r*u,t[5]=r*a-i*s,t[6]=a*l-o*u,t[7]=n*u-i*l,t[8]=i*o-n*a,t},e.determinant=function(t){var e=t[0],i=t[1],n=t[2],r=t[3],a=t[4],o=t[5],s=t[6],u=t[7],l=t[8];return e*(l*a-o*u)+i*(-l*r+o*s)+n*(u*r-a*s)},e.multiply=r,e.translate=function(t,e,i){var n=e[0],r=e[1],a=e[2],o=e[3],s=e[4],u=e[5],l=e[6],c=e[7],h=e[8],p=i[0],f=i[1];return t[0]=n,t[1]=r,t[2]=a,t[3]=o,t[4]=s,t[5]=u,t[6]=p*n+f*o+l,t[7]=p*r+f*s+c,t[8]=p*a+f*u+h,t},e.rotate=function(t,e,i){var n=e[0],r=e[1],a=e[2],o=e[3],s=e[4],u=e[5],l=e[6],c=e[7],h=e[8],p=Math.sin(i),f=Math.cos(i);return t[0]=f*n+p*o,t[1]=f*r+p*s,t[2]=f*a+p*u,t[3]=f*o-p*n,t[4]=f*s-p*r,t[5]=f*u-p*a,t[6]=l,t[7]=c,t[8]=h,t},e.scale=function(t,e,i){var n=i[0],r=i[1];return t[0]=n*e[0],t[1]=n*e[1],t[2]=n*e[2],t[3]=r*e[3],t[4]=r*e[4],t[5]=r*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},e.fromTranslation=function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1,t},e.fromRotation=function(t,e){var i=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=i,t[2]=0,t[3]=-i,t[4]=n,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.fromScaling=function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.fromMat2d=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t},e.fromQuat=function(t,e){var i=e[0],n=e[1],r=e[2],a=e[3],o=i+i,s=n+n,u=r+r,l=i*o,c=n*o,h=n*s,p=r*o,f=r*s,d=r*u,g=a*o,v=a*s,y=a*u;return t[0]=1-h-d,t[3]=c-y,t[6]=p+v,t[1]=c+y,t[4]=1-l-d,t[7]=f-g,t[2]=p-v,t[5]=f+g,t[8]=1-l-h,t},e.normalFromMat4=function(t,e){var i=e[0],n=e[1],r=e[2],a=e[3],o=e[4],s=e[5],u=e[6],l=e[7],c=e[8],h=e[9],p=e[10],f=e[11],d=e[12],g=e[13],v=e[14],y=e[15],m=i*s-n*o,x=i*u-r*o,_=i*l-a*o,b=n*u-r*s,M=n*l-a*s,S=r*l-a*u,w=c*g-h*d,k=c*v-p*d,C=c*y-f*d,P=h*v-p*g,O=h*y-f*g,A=p*y-f*v,L=m*A-x*O+_*P+b*C-M*k+S*w;if(!L)return null;return L=1/L,t[0]=(s*A-u*O+l*P)*L,t[1]=(u*C-o*A-l*k)*L,t[2]=(o*O-s*C+l*w)*L,t[3]=(r*O-n*A-a*P)*L,t[4]=(i*A-r*C+a*k)*L,t[5]=(n*C-i*O-a*w)*L,t[6]=(g*S-v*M+y*b)*L,t[7]=(v*_-d*S-y*x)*L,t[8]=(d*M-g*_+y*m)*L,t},e.projection=function(t,e,i){return t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/i,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},e.str=function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},e.frob=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2)+Math.pow(t[3],2)+Math.pow(t[4],2)+Math.pow(t[5],2)+Math.pow(t[6],2)+Math.pow(t[7],2)+Math.pow(t[8],2))},e.add=function(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t[2]=e[2]+i[2],t[3]=e[3]+i[3],t[4]=e[4]+i[4],t[5]=e[5]+i[5],t[6]=e[6]+i[6],t[7]=e[7]+i[7],t[8]=e[8]+i[8],t},e.subtract=a,e.multiplyScalar=function(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t[3]=e[3]*i,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*i,t},e.multiplyScalarAndAdd=function(t,e,i,n){return t[0]=e[0]+i[0]*n,t[1]=e[1]+i[1]*n,t[2]=e[2]+i[2]*n,t[3]=e[3]+i[3]*n,t[4]=e[4]+i[4]*n,t[5]=e[5]+i[5]*n,t[6]=e[6]+i[6]*n,t[7]=e[7]+i[7]*n,t[8]=e[8]+i[8]*n,t},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]},e.equals=function(t,e){var i=t[0],r=t[1],a=t[2],o=t[3],s=t[4],u=t[5],l=t[6],c=t[7],h=t[8],p=e[0],f=e[1],d=e[2],g=e[3],v=e[4],y=e[5],m=e[6],x=e[7],_=e[8];return Math.abs(i-p)<=n.EPSILON*Math.max(1,Math.abs(i),Math.abs(p))&&Math.abs(r-f)<=n.EPSILON*Math.max(1,Math.abs(r),Math.abs(f))&&Math.abs(a-d)<=n.EPSILON*Math.max(1,Math.abs(a),Math.abs(d))&&Math.abs(o-g)<=n.EPSILON*Math.max(1,Math.abs(o),Math.abs(g))&&Math.abs(s-v)<=n.EPSILON*Math.max(1,Math.abs(s),Math.abs(v))&&Math.abs(u-y)<=n.EPSILON*Math.max(1,Math.abs(u),Math.abs(y))&&Math.abs(l-m)<=n.EPSILON*Math.max(1,Math.abs(l),Math.abs(m))&&Math.abs(c-x)<=n.EPSILON*Math.max(1,Math.abs(c),Math.abs(x))&&Math.abs(h-_)<=n.EPSILON*Math.max(1,Math.abs(h),Math.abs(_))};var n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}(i(36));function r(t,e,i){var n=e[0],r=e[1],a=e[2],o=e[3],s=e[4],u=e[5],l=e[6],c=e[7],h=e[8],p=i[0],f=i[1],d=i[2],g=i[3],v=i[4],y=i[5],m=i[6],x=i[7],_=i[8];return t[0]=p*n+f*o+d*l,t[1]=p*r+f*s+d*c,t[2]=p*a+f*u+d*h,t[3]=g*n+v*o+y*l,t[4]=g*r+v*s+y*c,t[5]=g*a+v*u+y*h,t[6]=m*n+x*o+_*l,t[7]=m*r+x*s+_*c,t[8]=m*a+x*u+_*h,t}function a(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t[2]=e[2]-i[2],t[3]=e[3]-i[3],t[4]=e[4]-i[4],t[5]=e[5]-i[5],t[6]=e[6]-i[6],t[7]=e[7]-i[7],t[8]=e[8]-i[8],t}e.mul=r,e.sub=a},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=n.__importDefault(i(108)),a=n.__importDefault(i(109)),o=n.__importDefault(i(110)),s=n.__importDefault(i(111)),u=n.__importDefault(i(112)),l=n.__importDefault(i(113)),c={axis:r.default,label:o.default,guideLine:a.default},h={tooltip:l.default,label:u.default,axis:s.default};e.getComponent=function(t,e){return new(0,c[t])(e).config},e.getComponentStateMethod=function(t,e){return h[t][e]}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=n.__importStar(i(7)),a=n.__importStar(i(0)),o=n.__importDefault(i(107)),s=i(11),u=n.__importDefault(i(114)),l=i(8),c=n.__importDefault(i(117)),h=n.__importDefault(i(30)),p=n.__importDefault(i(118)),f=function(t){function e(e){var i=t.call(this,e)||this;return i.interactions=[],i.options=i.getOptions(e),i.initialOptions=a.deepMix({},i.options),i.paddingController=new c.default({plot:i}),i.stateController=new h.default({plot:i}),i.themeController=new p.default,i}return n.__extends(e,t),e.getDefaultOptions=function(){return{title:{visible:!1,text:""},description:{visible:!1,text:""},padding:"auto",legend:{visible:!0,position:"bottom-center"},tooltip:{visible:!0,shared:!0,crosshairs:{type:"y"}},xAxis:{visible:!0,autoHideLabel:!1,autoRotateLabel:!1,autoRotateTitle:!1,grid:{visible:!1},line:{visible:!1},tickLine:{visible:!0},label:{visible:!0},title:{visible:!1,offset:12}},yAxis:{visible:!0,autoHideLabel:!1,autoRotateLabel:!1,autoRotateTitle:!0,grid:{visible:!0},line:{visible:!1},tickLine:{visible:!1},label:{visible:!0},title:{visible:!1,offset:12}},label:{visible:!1}}},e.prototype.getOptions=function(e){var i=t.prototype.getOptions.call(this,e),n=this.constructor.getDefaultOptions();return a.deepMix({},i,n,e)},e.prototype.beforeInit=function(){t.prototype.beforeInit.call(this)},e.prototype.init=function(){var e=this;t.prototype.init.call(this),this.theme=this.themeController.getTheme(this.options,this.type),this.config={scales:{},legends:{},tooltip:{showTitle:!0,triggerOn:"mousemove",inPanel:!0,useHtml:!0},axes:{fields:{}},coord:{type:"cartesian"},elements:[],annotations:[],interactions:{},theme:this.theme,panelRange:{}},this.drawTitle(),this.drawDescription(),this.coord(),this.scale(),this.axis(),this.tooltip(),this.legend(),this.addGeometry(),this.annotation(),this.animation();var i=this.getViewRange();this.view=new r.View({width:this.width,height:this.height,canvas:this.canvas,container:this.container,padding:this.paddingController.getPadding(),data:this.processData(this.options.data),theme:this.theme,options:this.config,start:{x:i.minX,y:i.minY},end:{x:i.maxX,y:i.maxY}}),this.applyInteractions(),this.parserEvents(),this.view.on("afterrender",(function(){e.afterRender()}))},e.prototype.afterInit=function(){t.prototype.afterInit.call(this),this.view&&this.view.destroyed},e.prototype.afterRender=function(){if(this.view&&!this.view.destroyed){var t=this.options,e=t.padding?t.padding:this.config.theme.padding;t.defaultState&&"auto"!==e&&this.stateController.defaultStates(t.defaultState),"auto"===e&&this.paddingController.processAutoPadding()}},e.prototype.render=function(){t.prototype.render.call(this);var e=this.options.data;a.isEmpty(e)||this.view.render()},e.prototype.destroy=function(){this.doDestroy(),t.prototype.destroy.call(this)},e.prototype.updateConfig=function(t){this.view.destroy(),!t.padding&&this.initialOptions.padding&&"auto"===this.initialOptions.padding&&(t.padding="auto");var e=a.deepMix({},this.options,t);this.options=e,this.width=t.width?t.width:this.width,this.height=t.height?t.height:this.height,this.render()},e.prototype.changeData=function(t){this.view.changeData(this.processData(t))},e.prototype.getPlot=function(){return this.view},e.prototype.getResponsiveTheme=function(){return this.themeController.getResponsiveTheme(this.type)},e.prototype.bindStateManager=function(t,e){this.stateController.bindStateManager(t,e)},e.prototype.setActive=function(t,e){this.stateController.setState({type:"active",condition:t,style:e})},e.prototype.setSelected=function(t,e){this.stateController.setState({type:"selected",condition:t,style:e})},e.prototype.setDisable=function(t,e){this.stateController.setState({type:"disable",condition:t,style:e})},e.prototype.setNormal=function(t){this.stateController.setState({type:"normal",condition:t,style:{}})},e.prototype.getData=function(t,e){return this.processData((this.options.data||[]).slice(t,e))},e.prototype.processData=function(t){return t},e.prototype.scale=function(){var t=a.assign({},this.config.scales,this.options.meta||{});this.setConfig("scales",t)},e.prototype.axis=function(){var t=s.getComponent("axis",{plot:this,dim:"x"}),e=s.getComponent("axis",{plot:this,dim:"y"}),i={fields:{}};i.fields[this.options.xField]=t,i.fields[this.options.yField]=e,this.setConfig("axes",i)},e.prototype.tooltip=function(){!1!==this.options.tooltip.visible?(this.setConfig("tooltip",{crosshairs:a.get(this.options,"tooltip.crosshairs"),shared:a.get(this.options,"tooltip.shared"),htmlContent:a.get(this.options,"tooltip.htmlContent"),containerTpl:a.get(this.options,"tooltip.containerTpl"),itemTpl:a.get(this.options,"tooltip.itemTpl")}),this.options.tooltip.style&&a.deepMix(this.config.theme.tooltip,this.options.tooltip.style)):this.setConfig("tooltip",!1)},e.prototype.legend=function(){if(!1!==this.options.legend.visible){var t=a.get(this.options,"legend.flipPage");this.setConfig("legends",{position:a.get(this.options,"legend.position"),formatter:a.get(this.options,"legend.formatter"),offsetX:a.get(this.options,"legend.offsetX"),offsetY:a.get(this.options,"legend.offsetY"),flipPage:t})}else this.setConfig("legends",!1)},e.prototype.applyInteractions=function(){var t=this,e=this.options.interactions,i=void 0===e?[]:e;this.interactions&&this.interactions.forEach((function(t){t.destroy()})),this.interactions=[],i.forEach((function(e){var i=u.default.getInteraction(e.type,t.type);if(i){var n=new i({view:t.view},t,i.getInteractionRange(t.layerBBox,e.cfg),e.cfg);t.interactions.push(n)}}))},e.prototype.setConfig=function(t,e){"element"!==t?!1!==e?a.assign(this.config[t],e):this.config[t]=!1:this.config.elements.push(e)},e.prototype.parserEvents=function(t){var e=this,i=this.options;if(i.events){var n=t?t.EVENT_MAP:l.EVENT_MAP;a.each(i.events,(function(t,i){if(a.isFunction(t)){var r=n[i]||i,o=t;l.onEvent(e,r,o)}}))}},e.prototype.drawTitle=function(){var t=this.options,e=this.layerBBox;if(this.title=null,t.title.visible){var i=this.width,n=this.config.theme,r=new o.default({leftMargin:e.minX+n.title.padding[3],topMargin:e.minY+n.title.padding[0],text:t.title.text,style:a.mix(n.title,t.title.style),wrapperWidth:i-n.title.padding[3]-n.title.padding[1],container:this.container.addGroup(),theme:n});this.title=r,this.paddingController.registerPadding(r,"outer")}},e.prototype.drawDescription=function(){var t=this.options,e=this.layerBBox;if(this.description=null,t.description.visible){var i=this.width,n=e.minY;if(this.title){var r=this.title.getBBox();n=r.minY+r.height}var s=this.config.theme,u=new o.default({leftMargin:e.minX+s.description.padding[3],topMargin:n+s.description.padding[0],text:t.description.text,style:a.mix(s.description,t.description.style),wrapperWidth:i-s.description.padding[3]-s.description.padding[1],container:this.container.addGroup(),theme:s});this.description=u,this.paddingController.registerPadding(u,"outer")}},e.prototype.doDestroy=function(){this.interactions&&this.interactions.forEach((function(t){t.destroy()})),this.view.destroy()},e.prototype.getViewRange=function(){var t=this;return this.interactions.forEach((function(e){var i=u.default.getInteraction("slider",t.type),n=i&&i.getInteractionRange(t.layerBBox,e.cfg);n&&t.paddingController.registerPadding({getBBox:function(){return n},position:"bottom"},"outer")})),this.paddingController.processOuterPadding()},e}(n.__importDefault(i(47)).default);e.default=f},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=n.__importDefault(i(129)),a=n.__importDefault(i(131)),o=n.__importDefault(i(133)),s=n.__importDefault(i(135)),u={area:r.default,line:o.default,point:s.default,interval:a.default};e.getGeom=function(t,e,i){return new(0,u[t][e])(i).config}},function(t,e,i){"use strict";i.r(e);var n=i(0),r=function(){function t(t){this.type="base",this.range=[0,1],this.ticks=[],this.__cfg__=t,this._initDefaultCfg(),n.assign(this,t),this._init()}return t.prototype.translate=function(t){return t},t.prototype.change=function(t){this.constructor(n.assign(this.__cfg__,t))},t.prototype.clone=function(){return this.constructor(this.__cfg__)},t.prototype.getTicks=function(){var t=this;return n.map(this.ticks,(function(e,i){return n.isObject(e)?e:{text:t.getText(e,i),tickValue:e,value:t.scale(e)}}))},t.prototype.getText=function(t,e){var i=this.formatter,r=i?i(t,e):t;return n.isNil(r)||!n.isFunction(r.toString)?"":r.toString()},t.prototype._calcPercent=function(t,e,i){return n.isNumber(t)?(t-e)/(i-e):NaN},t.prototype._calcValue=function(t,e,i){return e+t*(i-e)},t}(),a={};function o(t){return a[t]}function s(t,e){if(o(t))throw new Error("type '"+t+"' existed.");a[t]=e}var u=i(1),l=[1,5,2,2.5,4,3],c=[1,5,2,2.5,4,3,1.5,7,6,8,9],h=100*Number.EPSILON;function p(t,e,i,r,a,o){var s=n.size(e),u=n.indexOf(e,t),l=0,c=function(t,e){return(t%e+e)%e}(r,o);return(c=0&&(l=1),1-u/(s-1)-i+l}function f(t,e,i){var r=n.size(e);return 1-n.indexOf(e,t)/(r-1)-i+1}function d(t,e,i,n,r,a){var o=(t-1)/(a-r),s=(e-1)/(Math.max(a,n)-Math.min(i,r));return 2-Math.max(o/s,s/o)}function g(t,e){return t>=e?2-(t-1)/(e-1):1}function v(t,e,i,n){var r=e-t;return 1-.5*(Math.pow(e-n,2)+Math.pow(t-i,2))/Math.pow(.1*r,2)}function y(t,e,i){var n=e-t;if(i>n){var r=(i-n)/2;return 1-Math.pow(r,2)/Math.pow(.1*n,2)}return 1}function m(t,e,i,r,a,o){if(void 0===i&&(i=5),void 0===r&&(r=!0),void 0===a&&(a=l),void 0===o&&(o=[.25,.2,.5,.05]),t===e||1===i)return{min:t,max:e,ticks:[t]};for(var s={score:-2,lmin:0,lmax:0,lstep:0},u=1;u<1/0;){for(var c=0,h=a;cP)S+=1;else{for(var O=C;O<=P;O+=1){var A=O*(w/u),L=A+w*(_-1),T=w,I=p(m,a,u,A,L,T),D=v(t,e,A,L),j=d(_,i,t,e,A,L),E=o[0]*I+o[1]*D+o[2]*j+1*o[3];E>s.score&&(!r||A<=t&&L>=e)&&(s.lmin=A,s.lmax=L,s.lstep=T,s.score=E)}S+=1}}_+=1}}u+=1}for(var B=Number.isInteger(s.lstep)?0:Math.ceil(Math.abs(Math.log10(s.lstep))),F=[],R=s.lmin;R<=s.lmax;R+=s.lstep)F.push(R);var N=B?n.map(F,(function(t){return Number.parseFloat(t.toFixed(B))})):F;return{min:Math.min(t,n.head(N)),max:Math.max(e,n.last(N)),ticks:N}}var x=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(u.__extends)(e,t),e.prototype.translate=function(t){var e=n.indexOf(this.values,t);return-1===e?n.isNumber(t)?t:NaN:e},e.prototype.scale=function(t){var e=this.translate(t),i=this._calcPercent(e,this.min,this.max);return this._calcValue(i,n.head(this.range),n.last(this.range))},e.prototype.invert=function(t){if(!n.isNumber(t))return t;var e=n.size(this.values)-1,i=this._calcPercent(t,n.head(this.range),n.last(this.range)),r=Math.round(e*i);return this.values[r]},e.prototype.getText=function(e){for(var i=[],r=1;r1?t-1:t,n.isEmpty(this.ticks)&&(this.ticks=this._setTicks())},e.prototype._setTicks=function(){var t=this,e=this.values;if(n.isNumber(this.tickInterval))return n.filter(e,(function(e,i){return i%(t.tickInterval+1)==0}));if(n.isNumber(this.tickCount)){var i=c.filter((function(t){return Number.isInteger(t)})),r=m(this.min,this.max,this.tickCount,!1,i).ticks;return n.filter(r,(function(e){return e>=t.min&&e<=t.max})).map((function(e){return t.values[e]}))}return this.values},e}(r),_=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(u.__extends)(e,t),Object.defineProperty(e.prototype,"_unknown",{get:function(){return n.has(this.__cfg__,"unknown")?this.__cfg__.unknown:this.range[0]},enumerable:!0,configurable:!0}),e.prototype.scale=function(t){return this._scale(t)},e.prototype.invert=function(t){return this._scale(t)},e.prototype._initDefaultCfg=function(){this.type="identity",this.values=[],this.isIdentity=!0},e.prototype._init=function(){},e.prototype._scale=function(t){return n.isNumber(t)?t:this._unknown},e}(r),b=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(u.__extends)(e,t),e.prototype.scale=function(t){if(n.isNil(t))return NaN;var e=this._transform(this.max),i=this._transform(this.min);if(i===e)return.5;var r=Math.min(Math.max(this._transform(t),i),e),a=this._calcPercent(r,i,e),o=n.head(this.range),s=n.last(this.range);return this._calcValue(a,o,s)},e.prototype.invert=function(t){var e=n.head(this.range),i=n.last(this.range),r=this._transform(this.max),a=this._transform(this.min),o=this._calcPercent(t,e,i);return this._calcValue(o,a,r)},e.prototype._initDefaultCfg=function(){this.values=[],this.type="linear",this.isLinear=!0,this.nice=!0,this.tickCount=5},e.prototype._init=function(){this._setDomain(),n.isEmpty(this.ticks)&&(this.ticks=this._setTicks())},e.prototype._setDomain=function(){var t=n.getRange(this.values),e=t.min,i=t.max;n.isNil(this.min)&&(this.min=e),n.isNil(this.max)&&(this.max=i),this.min>this.max&&(console.error("min should less than max"),this.min=e,this.max=i)},e.prototype._transform=function(t){return t},e.prototype._setTicks=function(){var t,e,i,r,a=this,o=this._getAlgoParams(),s=o.onlyLoose,u=o.Q,l=o.w,c=o.m,h=[],p=this.minLimit,f=this.maxLimit;n.isNil(p)||n.isNil(f)||p!==f||(console.error("minLimit should less than maxLimit"),0===(p/=2)&&(f=1)),(i=n.isNil(p)?this.min:this.minLimit)>(r=n.isNil(f)?this.max:this.maxLimit)&&(console.error("minLimit should less than maxLimit"),i=(t=[r,i])[0],r=t[1],p=(e=[f,p])[0],f=e[1]);var d=m(i,r,c,s,u,l),g=d.min,v=d.max,y=d.ticks;return this.nice&&(this.min=g,this.max=v),n.isNil(p)||(this.min=p),n.isNil(f)||(this.max=f),h.push(this.min),n.each(y,(function(t){t>a.min&&t=l})),n.includes(a,l)||a.push(l),o=Math.ceil((this.max-this.min)/this.minTickInterval)+1,1===a.length&&a.push(1)}return{m:o,w:r,Q:a,onlyLoose:e}},e}(r),M=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(u.__extends)(e,t),e.prototype.scale=function(t){var e=n.head(this.range),i=n.last(this.range),r=Math.log(t/this.min)/Math.log(this.max/this.min);return this._calcValue(r,e,i)},e.prototype.invert=function(t){var e=n.head(this.range),i=n.last(this.range),r=this._calcPercent(t,e,i);return this.min<0?-Math.pow(-this.max,r)*Math.pow(-this.min,1-r):Math.pow(this.max,r)*Math.pow(this.min,1-r)},e.prototype._initDefaultCfg=function(){this.type="log",this.values=[],this.base=10},e.prototype._init=function(){this._setDomain(),this.ticks=this._setTicks()},e}(b),S=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(u.__extends)(e,t),e.prototype.invert=function(e){var i=t.prototype.invert.call(this,e);return i>=0?Math.pow(i,1/this.exponent):-Math.pow(-i,1/this.exponent)},e.prototype._initDefaultCfg=function(){this.type="pow",this.values=[],this.exponent=1},e.prototype._init=function(){this._setDomain(),this.ticks=this._setTicks()},e.prototype._transform=function(t){return t>=0?Math.pow(t,this.exponent):-Math.pow(-t,this.exponent)},e}(b),w=i(25);var k=864e5,C=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(u.__extends)(e,t),e.prototype.translate=function(t){return w(t).valueOf()},e.prototype.scale=function(t){var e=this.min,i=this.max,r=Math.min(Math.max(this.translate(t),e),i),a=this._calcPercent(r,e,i),o=n.head(this.range),s=n.last(this.range);return this._calcValue(a,o,s)},e.prototype.invert=function(t){var e=n.head(this.range),i=n.last(this.range),r=this.min,a=this.max,o=this._calcPercent(t,e,i);return w(this._calcValue(o,r,a)).startOf("s")},e.prototype._initDefaultCfg=function(){this.type="time",this.values=[],this.tickCount=10},e.prototype._init=function(){var t=this;this.values=n.map(this.values,(function(e){return t.translate(e)})),this._setDomain(),n.isEmpty(this.ticks)&&(this.tickInterval?this.ticks=this._setTicksByInterval():this.tickCount&&(this.ticks=this._setTicks()))},e.prototype._setDomain=function(){n.isNil(this.min)?this.min=n.minBy(this.values,(function(t){return t})):this.min=this.translate(this.min),n.isNil(this.max)?this.max=n.maxBy(this.values,(function(t){return t})):this.max=this.translate(this.max)},e.prototype._setTicks=function(){var t,e=this,i=[["HH:mm:ss",1e3],["HH:mm:ss",1e4],["HH:mm:ss",3e4],["HH:mm",6e4],["HH:mm",6e5],["HH:mm",18e5],["HH",36e5],["HH",216e5],["HH",432e5],["YYYY-MM-DD",k],["YYYY-MM-DD",4*k],["YYYY-WW",7*k],["YYYY-MM",31*k],["YYYY-MM",107136e5],["YYYY-MM",160704e5],["YYYY",32832e6]],r=this.tickCount,a=this.min,o=this.max,s=(t=function(t){return t[1]},function(e,i,r,a){for(var o=n.isNil(r)?0:r,s=n.isNil(a)?e.length:a;o>>1;t(e[u])>i?s=u:o=u+1}return o})(i,(o-a)/r);s===i.length?this.interval=n.last(i):s?this.interval=i[s]:(r=Math.min(Math.floor((o-a)/1e3),r),this.interval=i[0]);var u=this.interval[1],l=function(t,e,i){void 0===i&&(i=5);var n={max:0,min:0,ticks:[]},r=(e-t)/i,a=Math.pow(10,Math.floor(Math.log10(r))),o=a<1?Math.ceil(Math.abs(Math.log10(a))):0,s=a;2*a-r<1.5*(r-s)&&5*a-r<2.75*(r-(s=2*a))&&10*a-r<1.5*(r-(s=5*a))&&(s=10*a);var u=Math.ceil(e/s),l=Math.floor(t/s);n.max=Math.max(u*s,e),n.min=Math.min(l*s,t);for(var c=Number.parseFloat((l*s).toFixed(o));c=a&&t<=o}));return this.showLast&&(l[l.length-1]=this.max),this.formatter||(this.formatter=function(t){return w(t).format(e.interval[0])}),l},e.prototype._setTicksByInterval=function(){for(var t=this,e=this.min,i=this.max,r=this.tickInterval[1],a=Math.ceil((i-e)/r),o=[],s=0;s<=a;s++){var u=e+r*s;u>i&&this.showLast&&(u=i),o.push(u)}var l=[];return n.each(o,(function(e){l.push(w(e).format(t.tickInterval[0]))})),l},e}(r),P=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(u.__extends)(e,t),e.prototype._initDefaultCfg=function(){t.prototype._initDefaultCfg.call(this),this.type="timeCat"},e.prototype._setTicks=function(){var t=this,e=this.tickCount||Math.ceil(this.max/2),i=m(this.min,this.max,e,!1,[1,2,5,3,4,7,6,8,9]).ticks,r=n.map(i,(function(e){return t.values[e]}));return r[r.length-1]=n.last(this.values),r},e}(x);i.d(e,"Scale",(function(){return r})),i.d(e,"getScale",(function(){return o})),i.d(e,"registerScale",(function(){return s})),s("cat",x),s("category",x),s("identity",_),s("linear",b),s("log",M),s("pow",S),s("time",C),s("timeCat",P)},function(t,e,i){"use strict";i(35);var n=i(24),r=i.n(n);i(45);function a(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}i(84);i(0);var o="\t\n\v\f\r   ᠎              \u2028\u2029",s=new RegExp("([a-z])["+o+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+o+"]*,?["+o+"]*)+)","ig"),u=new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+o+"]*,?["+o+"]*","ig");function l(t){if(!t)return null;if(r()(t))return t;var e={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},i=[];return String(t).replace(s,(function(t,n,r){var a=[],o=n.toLowerCase();if(r.replace(u,(function(t,e){e&&a.push(+e)})),"m"===o&&a.length>2&&(i.push([n].concat(a.splice(0,2))),o="l",n="m"===n?"l":"L"),"o"===o&&1===a.length&&i.push([n,a[0]]),"r"===o)i.push([n].concat(a));else for(;a.length>=e[o]&&(i.push([n].concat(a.splice(0,e[o]))),e[o]););return""})),i}var c=/[a-z]/;function h(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}function p(t){var e=l(t);if(!e||!e.length)return[["M",0,0]];for(var i=!1,n=0;n=0){i=!0;break}}if(!i)return e;var a=[],o=0,s=0,u=0,p=0,f=0,d=e[0];"M"!==d[0]&&"m"!==d[0]||(u=o=+d[1],p=s=+d[2],f++,a[0]=["M",o,s]);n=f;for(var g=e.length;n1&&(i*=M=Math.sqrt(M),n*=M);var S=i*i,w=n*n,k=(a===o?-1:1)*Math.sqrt(Math.abs((S*w-S*b*b-w*_*_)/(S*b*b+w*_*_)));d=k*i*b/n+(t+s)/2,g=k*-n*_/i+(e+u)/2,h=Math.asin(Number(((e-g)/n).toFixed(9))),p=Math.asin(Number(((u-g)/n).toFixed(9))),h=tp&&(h-=2*Math.PI),!o&&p>h&&(p-=2*Math.PI)}var C=p-h;if(Math.abs(C)>v){var P=p,O=s,A=u;p=h+v*(o&&p>h?1:-1),s=d+i*Math.cos(p),u=g+n*Math.sin(p),m=f(s,u,i,n,r,0,o,O,A,[p,P,d,g])}C=p-h;var L=Math.cos(h),T=Math.sin(h),I=Math.cos(p),D=Math.sin(p),j=Math.tan(C/4),E=4/3*i*j,B=4/3*n*j,F=[t,e],R=[t+E*T,e-B*L],N=[s+E*D,u-B*I],z=[s,u];if(R[0]=2*F[0]-R[0],R[1]=2*F[1]-R[1],l)return[R,N,z].concat(m);for(var H=[],G=0,Y=(m=[R,N,z].concat(m).join().split(",")).length;G7){t[e].shift();for(var a=t[e];a.length;)s[e]="A",r&&(u[e]="A"),t.splice(e++,0,["C"].concat(a.splice(0,6)));t.splice(e,1),i=Math.max(n.length,r&&r.length||0)}},y=function(t,e,a,o,s){t&&e&&"M"===t[s][0]&&"M"!==e[s][0]&&(e.splice(s,0,["M",o.x,o.y]),a.bx=0,a.by=0,a.x=t[s][1],a.y=t[s][2],i=Math.max(n.length,r&&r.length||0))};i=Math.max(n.length,r&&r.length||0);for(var m=0;m0&&(r=1/Math.sqrt(r),t[0]=e[0]*r,t[1]=e[1]*r);return t},e.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]},e.cross=function(t,e,i){var n=e[0]*i[1]-e[1]*i[0];return t[0]=t[1]=0,t[2]=n,t},e.lerp=function(t,e,i,n){var r=e[0],a=e[1];return t[0]=r+n*(i[0]-r),t[1]=a+n*(i[1]-a),t},e.random=function(t,e){e=e||1;var i=2*n.RANDOM()*Math.PI;return t[0]=Math.cos(i)*e,t[1]=Math.sin(i)*e,t},e.transformMat2=function(t,e,i){var n=e[0],r=e[1];return t[0]=i[0]*n+i[2]*r,t[1]=i[1]*n+i[3]*r,t},e.transformMat2d=function(t,e,i){var n=e[0],r=e[1];return t[0]=i[0]*n+i[2]*r+i[4],t[1]=i[1]*n+i[3]*r+i[5],t},e.transformMat3=function(t,e,i){var n=e[0],r=e[1];return t[0]=i[0]*n+i[3]*r+i[6],t[1]=i[1]*n+i[4]*r+i[7],t},e.transformMat4=function(t,e,i){var n=e[0],r=e[1];return t[0]=i[0]*n+i[4]*r+i[12],t[1]=i[1]*n+i[5]*r+i[13],t},e.rotate=function(t,e,i,n){var r=e[0]-i[0],a=e[1]-i[1],o=Math.sin(n),s=Math.cos(n);return t[0]=r*s-a*o+i[0],t[1]=r*o+a*s+i[1],t},e.angle=function(t,e){var i=t[0],n=t[1],r=e[0],a=e[1],o=i*i+n*n;o>0&&(o=1/Math.sqrt(o));var s=r*r+a*a;s>0&&(s=1/Math.sqrt(s));var u=(i*r+n*a)*o*s;return u>1?0:u<-1?Math.PI:Math.acos(u)},e.str=function(t){return"vec2("+t[0]+", "+t[1]+")"},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]},e.equals=function(t,e){var i=t[0],r=t[1],a=e[0],o=e[1];return Math.abs(i-a)<=n.EPSILON*Math.max(1,Math.abs(i),Math.abs(a))&&Math.abs(r-o)<=n.EPSILON*Math.max(1,Math.abs(r),Math.abs(o))};var n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}(i(36));function r(){var t=new n.ARRAY_TYPE(2);return n.ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0),t}function a(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t}function o(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[1],t}function s(t,e,i){return t[0]=e[0]/i[0],t[1]=e[1]/i[1],t}function u(t,e){var i=e[0]-t[0],n=e[1]-t[1];return Math.sqrt(i*i+n*n)}function l(t,e){var i=e[0]-t[0],n=e[1]-t[1];return i*i+n*n}function c(t){var e=t[0],i=t[1];return Math.sqrt(e*e+i*i)}function h(t){var e=t[0],i=t[1];return e*e+i*i}var p;e.len=c,e.sub=a,e.mul=o,e.div=s,e.dist=u,e.sqrDist=l,e.sqrLen=h,e.forEach=(p=r(),function(t,e,i,n,r,a){var o=void 0,s=void 0;for(e||(e=2),i||(i=0),s=n?Math.min(n*e+i,t.length):t.length,o=i;o=e&&t<=i}e.dotProduct2D=function(t,e){return t.x*e.y+t.y*e.x},e.applyMatrix=o,e.isBetween=s;var u=.001;function l(t,e){for(var i=!1,n=0,r=e.length-1;nt.y!=u>t.y&&t.x<=(s-a)*(t.y-o)/(u-o)+a&&(i=!i)}return i}function c(t){return t*t}function h(t,e){return c(t.x-e.x)+c(t.y-e.y)}function p(t,e,i){var n=h(e,i);if(0===n)return h(t,e);var r=((t.x-e.x)*(i.x-e.x)+(t.y-e.y)*(i.y-e.y))/n;r=Math.max(0,Math.min(1,r));var a=h(t,{x:e.x+r*(i.x-e.x),y:e.y+r*(i.y-e.y)});return Math.sqrt(a)}function f(t,e){var i=1/0;a.each(e,(function(e){var n=Math.sqrt(h(e,t));i>n&&(i=n)}));for(var n=0,r=e.length-1;nc&&(i=c)}return i}function d(t,e){for(var i=0,n=t;iu*(o*o+l*l)*(c*c+h*h)){var d=(r*h-a*c)/p,g=(r*l-a*o)/p;s(d,0,1)&&s(g,0,1)&&(f={x:t.x+d*o,y:t.y+d*l})}return f},e.isPointInPolygon=l,e.distBetweenPointLine=p,e.isPolygonIntersection=d,e.minDistBetweenConvexPolygon=function(t,e){if(d(t,e))return 0;var i=1/0,n=1/0;return a.each(t,(function(t){var n=f(t,e);i>n&&(i=n)})),a.each(e,(function(e){var i=f(e,t);n>i&&(n=i)})),Math.min(i,n)},e.bboxOnRotate=function(t){var e=t.getBBox(),i=e.minX,n=e.minY,r=e.tr.x-e.tl.x,a=e.bl.y-e.tl.y,s=t.attr("matrix"),u=[s[0],s[1],0,s[3],s[4],0,0,0,1],l=o({x:0,y:0},u);l.x+=i,l.y+=n;var c=o({x:r,y:0},u);c.x+=i,c.y+=n;var h=o({x:0,y:a},u);h.x+=i,h.y+=n;var p=o({x:r,y:a},u);p.x+=i,p.y+=n;var f=[l,c,h,p];f.sort((function(t,e){return t.y-e.y}));var d=f[0].y,g=f[f.length-1].y,v=[f[0],f[1]],y=[f[2],f[3]],m=v[0].xr&&(r=c,a=s)}if(r>i){var h=t(e.slice(0,a+1),i),f=t(e.slice(a,e.length),i);n=h.concat(f)}else n=[e[0],e[e.length-1]];return n}(t,g)},e.getMedian=function(t){var e=a.clone(t);e.sort((function(t,e){return t-e}));var i=Math.floor(e.length/2);return e.length%2?e[i]:(e[i-1]+e[i])/2},e.getMean=function(t){var e=0;return a.each(t,(function(t){e+=t})),e/t.length},e.sturges=function(t){return Math.ceil(Math.log(t.length)/Math.LN2)+1}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(39);e.getGlobalTheme=n.getGlobalTheme,e.registerGlobalTheme=n.registerGlobalTheme;var r=i(120);e.getTheme=r.getTheme,e.registerTheme=r.registerTheme;var a=i(121);e.convertToG2Theme=a.convertToG2Theme},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(46);e.extractScale=function(t,e){if(!e)return t;var i,r,a,o,s;e.hasOwnProperty("tickCount")&&(t.tickCount=e.tickCount),e.hasOwnProperty("type")&&"dateTime"!==e.type&&(t.type=e.type),e.hasOwnProperty("tickInterval")&&("time"===e.type?t.tickInterval=(i=e.tickInterval,r=n.timeIntervals,a=i.split(" "),o=r[a[1]],s=parseInt(a[0],10),[o.format,s*o.value]):t.tickInterval=e.tickInterval),e.hasOwnProperty("min")&&(t.min=e.min),e.hasOwnProperty("max")&&(t.max=e.max),e.hasOwnProperty("minLimit")&&(t.minLimit=e.minLimit),e.hasOwnProperty("maxLimit")&&(t.maxLimit=e.maxLimit),e.hasOwnProperty("nice")&&(t.nice=e.nice),e.hasOwnProperty("formatter")&&(t.formatter=e.formatter)}},function(t,e,i){"use strict";i.r(e);var n=i(4),r=i(0),a=function(){function t(t){this.type="coordinate",this.isRect=!1,this.isHelix=!1,this.isPolar=!1;var e=t.start,i=t.end,n=t.matrix,r=void 0===n?[1,0,0,0,1,0,0,0,1]:n,a=t.isTransposed,o=void 0!==a&&a;this.start=e,this.end=i,this.matrix=r,this.isTransposed=o}return t.prototype.initial=function(){this.center={x:(this.start.x+this.end.x)/2,y:(this.start.y+this.end.y)/2},this.width=Math.abs(this.end.x-this.start.x),this.height=Math.abs(this.end.y-this.start.y)},t.prototype.update=function(t){r.assign(this,t),this.initial()},t.prototype.convertDim=function(t,e){var i=this[e],n=i.start;return n+t*(i.end-n)},t.prototype.invertDim=function(t,e){var i=this[e],n=i.start;return(t-n)/(i.end-n)},t.prototype.applyMatrix=function(t,e,i){void 0===i&&(i=0);var r=this.matrix,a=[t,e,i];return n.vec3.transformMat3(a,a,r),a},t.prototype.invertMatrix=function(t,e,i){void 0===i&&(i=0);var r=this.matrix,a=n.mat3.invert([],r),o=[t,e,i];return n.vec3.transformMat3(o,o,a),o},t.prototype.convert=function(t){var e=this.convertPoint(t),i=e.x,n=e.y,r=this.applyMatrix(i,n,1);return{x:r[0],y:r[1]}},t.prototype.invert=function(t){var e=this.invertMatrix(t.x,t.y,1);return this.invertPoint({x:e[0],y:e[1]})},t.prototype.rotate=function(t){var e=this.matrix,i=this.center;return n.mat3.translate(e,e,[-i.x,-i.y]),n.mat3.rotate(e,e,t),n.mat3.translate(e,e,[i.x,i.y]),this},t.prototype.reflect=function(t){switch(t){case"x":this._swapDim("x");break;case"y":this._swapDim("y");break;default:this._swapDim("y")}return this},t.prototype.scale=function(t,e){var i=this.matrix,r=this.center;return n.mat3.translate(i,i,[-r.x,-r.y]),n.mat3.scale(i,i,[t,e]),n.mat3.translate(i,i,[r.x,r.y]),this},t.prototype.translate=function(t,e){var i=this.matrix;return n.mat3.translate(i,i,[t,e]),this},t.prototype.transpose=function(){return this.isTransposed=!this.isTransposed,this},t.prototype.getCenter=function(){return this.center},t.prototype.getWidth=function(){return this.width},t.prototype.getHeight=function(){return this.height},t.prototype._swapDim=function(t){var e=this[t];if(e){var i=e.start;e.start=e.end,e.end=i}},t}(),o=i(1),s=function(t){function e(e){var i=t.call(this,e)||this;return i.isRect=!0,i.type="cartesian",i.initial(),i}return Object(o.__extends)(e,t),e.prototype.initial=function(){t.prototype.initial.call(this);var e=this.start,i=this.end;this.x={start:e.x,end:i.x},this.y={start:e.y,end:i.y}},e.prototype.convertPoint=function(t){var e,i=t.x,n=t.y;return this.isTransposed&&(i=(e=[n,i])[0],n=e[1]),{x:this.convertDim(i,"x"),y:this.convertDim(n,"y")}},e.prototype.invertPoint=function(t){var e,i=this.invertDim(t.x,"x"),n=this.invertDim(t.y,"y");return this.isTransposed&&(i=(e=[n,i])[0],n=e[1]),{x:i,y:n}},e}(a),u=function(t){function e(e){var i=t.call(this,e)||this;i.isHelix=!0,i.type="helix";var n=e.startAngle,r=void 0===n?1.25*Math.PI:n,a=e.endAngle,o=void 0===a?7.25*Math.PI:a,s=e.innerRadius,u=void 0===s?0:s,l=e.radius;return i.startAngle=r,i.endAngle=o,i.innerRadius=u,i.radius=l,i.initial(),i}return Object(o.__extends)(e,t),e.prototype.initial=function(){t.prototype.initial.call(this);var e=(this.endAngle-this.startAngle)/(2*Math.PI)+1,i=Math.min(this.width,this.height)/2;this.radius&&this.radius>=0&&this.radius<=1&&(i*=this.radius),this.d=Math.floor(i*(1-this.innerRadius)/e),this.a=this.d/(2*Math.PI),this.x={start:this.startAngle,end:this.endAngle},this.y={start:this.innerRadius*i,end:this.innerRadius*i+.99*this.d}},e.prototype.convertPoint=function(t){var e,i=t.x,n=t.y;this.isTransposed&&(i=(e=[n,i])[0],n=e[1]);var r=this.convertDim(i,"x"),a=this.a*r,o=this.convertDim(n,"y");return{x:this.center.x+Math.cos(r)*(a+o),y:this.center.y+Math.sin(r)*(a+o)}},e.prototype.invertPoint=function(t){var e,i=this.d+this.y.start,a=n.vec2.subtract([],[t.x,t.y],[this.center.x,this.center.y]),o=n.vec2.angleTo(a,[1,0],!0),s=o*this.a;n.vec2.length(a)this.width/n?(e=this.width/n,this.circleCenter={x:this.center.x-(.5-a)*this.width,y:this.center.y-(.5-o)*e*r}):(e=this.height/r,this.circleCenter={x:this.center.x-(.5-a)*e*n,y:this.center.y-(.5-o)*this.height}),this.polarRadius=this.radius,this.radius?this.radius>0&&this.radius<=1?this.polarRadius=e*this.radius:(this.radius<=0||this.radius>e)&&(this.polarRadius=e):this.polarRadius=e,this.x={start:this.startAngle,end:this.endAngle},this.y={start:this.innerRadius*this.polarRadius,end:this.polarRadius}},e.prototype.getRadius=function(){return this.polarRadius},e.prototype.convertPoint=function(t){var e,i=this.getCenter(),n=t.x,r=t.y;return this.isTransposed&&(n=(e=[r,n])[0],r=e[1]),n=this.convertDim(n,"x"),r=this.convertDim(r,"y"),{x:i.x+Math.cos(n)*r,y:i.y+Math.sin(n)*r}},e.prototype.invertPoint=function(t){var e=this.getCenter(),i=[t.x-e.x,t.y-e.y],a=[1,0,0,0,1,0,0,0,1];n.mat3.rotate(a,a,this.startAngle);var o=[1,0,0];n.vec3.transformMat3(o,o,a),o=[o[0],o[1]];var s=n.vec2.angleTo(o,i,this.endAngle0?l:-l;var c=this.invertDim(u,"y"),h={x:0,y:0};return h.x=this.isTransposed?c:l,h.y=this.isTransposed?l:c,h},e.prototype.getCenter=function(){return this.circleCenter},e.prototype.getOneBox=function(){var t=this.startAngle,e=this.endAngle;if(Math.abs(e-t)>=2*Math.PI)return{minX:-1,maxX:1,minY:-1,maxY:1};for(var i=[0,Math.cos(t),Math.cos(e)],n=[0,Math.sin(t),Math.sin(e)],r=Math.min(t,e);r0&&e.height>0){var i=e.shape.get("origin").text,n=o.indexOf(i),r=a[n];s.push(["M",r.x1,r.y1],["L",r.x2,r.y2])}})),0===s.length&&(s=[["M",0,0]]),i.attr("path",s)}(t,e)}})},e.prototype.getType=function(){var t=this.plot.options,e=this.dim+"Axis",i=this.dim+"Field";if(t[e]&&t[e].type&&"dateTime"===t[e].type)return"dateTime";var n=this.plot.view.get("scales")[t[i]].type;return u[n]},e.prototype.getAxisInstance=function(){var t="x"===this.dim?0:1;return this.plot.view.get("axisController").axes[t]},e}(s.default);e.default=l},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1).__importStar(i(0)),r=i(64),a=i(65),o=function(){function t(t){this.iterationTime=10,this.iterationIndex=0,this.rulesLocker=[],this.constraintIndex=0,n.assign(this,t),this.currentConstraint=this.constraints[0],this.rules&&(this.iterationTime=this.rules[this.currentConstraint.name].length),this._start(),this._run(),this._end()}return t.prototype._start=function(){this.onStart&&this.onStart(this.nodes)},t.prototype._iteration=function(){var t;"shape"===(t=(this.nodes.type,this.nodes)).type&&t.measureNodes(),this.rules&&this._applyRules(),"shape"===t.type&&t.measureNodes(),this.onIteration&&this.onIteration(this.nodes)},t.prototype._end=function(){this.onEnd&&this.onEnd(this.nodes)},t.prototype._run=function(){for(var t=this._constraintsTest();!(t||this.iterationIndex>this.iterationTime-1);)this._iteration(),t=this._constraintsTest(),this.iterationIndex++;this.constraintIndex=0&&this.layers.splice(e,1)},e.prototype.updateBBox=function(t,e){void 0===e&&(e=!1);var i={x:this.x,y:this.y,width:this.width,height:this.height},n=o.deepMix({},i,t);this.x=n.x,this.y=n.y,this.width=n.width,this.height=n.height,this.layerBBox=this.getLayerBBox(),this.layerRegion=this.getLayerRegion(),this.render(),e&&this.eachLayer((function(t){t.updateBBoxByParent(),t.render()})),this.canvas.draw()},e.prototype.updateBBoxByParent=function(){var t=this.layerRegion;this.x=this.parent.x+this.parent.width*t.start.x,this.y=this.parent.y+this.parent.height*t.start.y,this.width=this.parent.width*(t.end.x-t.start.x),this.height=this.parent.height*(t.end.y-t.start.y),this.layerBBox=this.getLayerBBox()},e.prototype.getGlobalPosition=function(){for(var t=this.x,e=this.y,i=this.parent;i;)t+=i.x,e+=i.y,i=i.parent;return{x:t,y:e}},e.prototype.getOptions=function(t){var e=0,i=0;t.parent&&(e=t.parent.width,i=t.parent.height);var n={x:0,y:0,width:e,height:i};return o.deepMix({},n,t)},e.prototype.eachLayer=function(t){o.each(this.layers,t)},e.prototype.getLayerBBox=function(){return new a.BBox(this.x,this.y,this.width,this.height)},e.prototype.getLayerRegion=function(){if(this.parent){var t=this.parent.width,e=this.parent.height,i=this.parent.x,n=this.parent.y;return{start:{x:(this.x-i)/t,y:(this.y-n)/e},end:{x:(this.x+this.width-i)/t,y:(this.y+this.height-n)/e}}}return{start:{x:0,y:0},end:{x:1,y:1}}},e}(r.default);e.default=s},function(t,e){},function(t,e,i){"use strict";e.__esModule=!0;var n=i(26);e.default=function(t,e){var i=n.default(t,"height",e);return"auto"===i&&(i=t.offsetHeight),parseFloat(i)}},function(t,e,i){"use strict";e.__esModule=!0;var n=i(26);e.default=function(t,e){var i=n.default(t,"width",e);return"auto"===i&&(i=t.offsetWidth),parseFloat(i)}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n={}.toString;e.default=function(t,e){return n.call(t)==="[object "+e+"]"}},function(t,e){},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),a=i(3),o=i(37),s=i(100),u=i(38),l=function(t){function e(e){var i=e.backgroundStyle,r=e.fillStyle,a=e.textStyle,o=e.titleStyle,s=n.__rest(e,["backgroundStyle","fillStyle","textStyle","titleStyle"]),l=e.layout,c=void 0===l?"horizontal":l,h={width:"horizontal"===c?156:16,height:"horizontal"===c?16:156};return t.call(this,n.__assign(n.__assign({titleDistance:16,layout:"horizontal",operational:!0,handleIcon:"rect",backgroundStyle:n.__assign(n.__assign({},u.SliderMiddleBackgroundStyle),i),fillStyle:n.__assign(n.__assign({},u.SliderMiddleFrontendStyle),r),textStyle:n.__assign(n.__assign({},u.SliderTextStyle),a),titleStyle:n.__assign(n.__assign({},u.DefaultTitleStyle),o),width:156,height:16},h),s))||this}return n.__extends(e,t),e.prototype.init=function(){var t=this.get("container");this.set("canvas",t.get("canvas"));var e=t.addGroup();this.set("legendGroup",e);var i=e.addGroup();this.set("itemsGroup",i),e.translate(this.get("offsetX"),this.get("offsetY"))},e.prototype.renderTitle=function(){if(this.isShowTitle()){var t=this.get("title"),e=this.get("legendGroup"),i=this.get("titleStyle"),r=e.addShape("text",{attrs:n.__assign({x:0,y:0,text:t},i)});r.name="legend-title",this.set("titleShape",r)}},e.prototype.renderItems=function(){this.renderSlider()},e.prototype.bindEvents=function(){this.isOperational()},e.prototype.clear=function(){var t=this.get("container");t&&!t.destroyed&&t.clear()},e.prototype.destroy=function(){t.prototype.destroy.call(this);var e=this.get("container");e&&!e.destroyed&&(e.get("parent")&&e.remove(!0),e.destroy())},e.prototype.isHorizontal=function(){return"horizontal"===this.get("layout")},e.prototype.isOperational=function(){return this.get("operational")},e.prototype.isShowTitle=function(){return!!this.get("title")},e.prototype.getSliderConfig=function(){return{layout:this.get("layout"),sliderType:this.get("handleIcon"),sliderSize:this.get("handleSize"),sliderStyle:this.get("handleStyle"),operational:this.isOperational(),width:this.get("width"),height:this.get("height"),min:r.head(this.get("items")).value,max:r.last(this.get("items")).value,range:this.get("range")||[0,1],textStyle:n.__assign({},this.get("textStyle")),formatter:this.formatterValue}},e.prototype.renderSlider=function(){var t=this,e=this.get("itemsGroup"),i=new s.default(this.getSliderConfig());if(i.setBackground(this.createBackgroundGroup()),this.isShowTitle()){var n=this.get("titleDistance"),r=this.get("titleShape").getBBox().height;i.translate(0,n+r)}i.on("sliderchange",(function(e){var i=e.value,n=(e.range,new a.Event("itemfilter",e,!0,!0));n.range=i,t.emit("itemfilter",n)})),e.add(i),this.set("slider",i)},e}(o.default);e.default=l},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(37),a={layout:"horizontal",titleDistance:15,itemDistance:5,itemMarginBottom:8,wordSpacing:8,backgroundPadding:0,unSelectedColor:"#ccc",offsetX:0,offsetY:0},o=function(t){function e(e){return t.call(this,n.__assign(n.__assign({hoverable:!0,clickable:!0,selectedMode:"multiple",allowAllCanceled:!1,reversed:!1,autoWrap:!0},a),e))||this}return n.__extends(e,t),e}(r.default);e.default=o},function(t,e){},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=n.__importDefault(i(21)),a=n.__importStar(i(0)),o=function(t){function e(e){var i=t.call(this)||this;return i._states={},i._stateStack={},i}return n.__extends(e,t),e.prototype.setState=function(t,e){this._stateStack[t]=e,this._onUpdate()},e.prototype.getState=function(t){return this._states[t]},e.prototype.getAllStates=function(){return this._states},e.prototype.clear=function(){this._states={},this._stateStack={},this._changeTimer&&(clearTimeout(this._changeTimer),this._changeTimer=null)},e.prototype._onUpdate=function(){var t=this,e=this._stateStack;this._changeTimer&&(clearTimeout(this._changeTimer),this._changeTimer=null),this._changeTimer=setTimeout((function(){a.each(e,(function(i,n){var r=e[n];t._states[n]&&t._states[n]===i||(t._states[n]=i,t._triggerEvent(n,r))})),t._stateStack={}}),16)},e.prototype._triggerEvent=function(t,e){this.emit(t+":change",{name:t,exp:e})},e}(r.default);e.default=o},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),r=function(){function t(t){this.type="base",this.range=[0,1],this.ticks=[],this.__cfg__=t,this._initDefaultCfg(),n.assign(this,t),this._init()}return t.prototype.translate=function(t){return t},t.prototype.change=function(t){this.constructor(n.assign(this.__cfg__,t))},t.prototype.clone=function(){return this.constructor(this.__cfg__)},t.prototype.getTicks=function(){var t=this;return n.map(this.ticks,(function(e,i){return n.isObject(e)?e:{text:t.getText(e,i),tickValue:e,value:t.scale(e)}}))},t.prototype.getText=function(t,e){var i=this.formatter,r=i?i(t,e):t;return n.isNil(r)||!n.isFunction(r.toString)?"":r.toString()},t.prototype._calcPercent=function(t,e,i){return n.isNumber(t)?(t-e)/(i-e):NaN},t.prototype._calcValue=function(t,e,i){return e+t*(i-e)},t}();e.default=r},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(0);e.DEFAULT_Q=[1,5,2,2.5,4,3],e.ALL_Q=[1,5,2,2.5,4,3,1.5,7,6,8,9];var r=100*Number.EPSILON;function a(t,e,i,a,o,s){var u=n.size(e),l=n.indexOf(e,t),c=0,h=function(t,e){return(t%e+e)%e}(a,s);return(h=0&&(c=1),1-l/(u-1)-i+c}function o(t,e,i){var r=n.size(e);return 1-n.indexOf(e,t)/(r-1)-i+1}function s(t,e,i,n,r,a){var o=(t-1)/(a-r),s=(e-1)/(Math.max(a,n)-Math.min(i,r));return 2-Math.max(o/s,s/o)}function u(t,e){return t>=e?2-(t-1)/(e-1):1}function l(t,e,i,n){var r=e-t;return 1-.5*(Math.pow(e-n,2)+Math.pow(t-i,2))/Math.pow(.1*r,2)}function c(t,e,i){var n=e-t;if(i>n){var r=(i-n)/2;return 1-Math.pow(r,2)/Math.pow(.1*n,2)}return 1}e.default=function(t,i,r,h,p,f){if(void 0===r&&(r=5),void 0===h&&(h=!0),void 0===p&&(p=e.DEFAULT_Q),void 0===f&&(f=[.25,.2,.5,.05]),t===i||1===r)return{min:t,max:i,ticks:[t]};for(var d={score:-2,lmin:0,lmax:0,lstep:0},g=1;g<1/0;){for(var v=0,y=p;vP)S+=1;else{for(var O=C;O<=P;O+=1){var A=O*(w/g),L=A+w*(_-1),T=w,I=a(m,p,g,A,L,T),D=l(t,i,A,L),j=s(_,r,t,i,A,L),E=f[0]*I+f[1]*D+f[2]*j+1*f[3];E>d.score&&(!h||A<=t&&L>=i)&&(d.lmin=A,d.lmax=L,d.lstep=T,d.score=E)}S+=1}}_+=1}}g+=1}for(var B=Number.isInteger(d.lstep)?0:Math.ceil(Math.abs(Math.log10(d.lstep))),F=[],R=d.lmin;R<=d.lmax;R+=d.lstep)F.push(R);var N=B?n.map(F,(function(t){return Number.parseFloat(t.toFixed(B))})):F;return{min:Math.min(t,n.head(N)),max:Math.max(i,n.last(N)),ticks:N}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(0);e.getDataByScaleRange=function(t,e,i,r){var a=r[0],o=r[1],s=n.groupBy(i,t),u=e.slice(a,o);return n.flatten(n.map(u,(function(t){return s[t]||[]})))}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=n.__importStar(i(0)),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.init=function(){var t=this.plot.options;this.config={type:"area",position:{fields:[t.xField,t.yField]},connectNulls:t.connectNulls||!1},t.smooth&&(this.config.shape={values:["smooth"]}),(this._getColorMappingField()||t.color)&&this.parseColor(),t.areaStyle&&this.parseStyle()},e.prototype.parseColor=function(){var t=this.plot.options,e={},i=this._getColorMappingField();if(i&&(e.fields=i),r.has(t,"color")){var n=t.color;r.isString(n)?e.values=[n]:r.isFunction(n)?e.callback=n:e.values=n}this.config.color=e},e.prototype.parseStyle=function(){var t=this.plot.options,e=t.areaStyle,i={};r.isFunction(e)&&t.seriesField?(i.fields=[t.seriesField],i.callback=e):i.cfg=e,this.config.style=i},e.prototype._getColorMappingField=function(){for(var t=this.plot.options,e=0,i=["stackField","seriesField"];e=o[c]?1:0,f=h>Math.PI?1:0,d=i.convertPoint(u),g=s(i,d);if(g>=.5)if(h===2*Math.PI){var v={x:(u.x+o.x)/2,y:(u.y+o.y)/2},y=i.convertPoint(v);l.push(["A",g,g,0,f,p,y.x,y.y]),l.push(["A",g,g,0,f,p,d.x,d.y])}else l.push(["A",g,g,0,f,p,d.x,d.y]);return l}(i,n,t)):o.push(u(a,t));break;case"z":default:o.push(a)}})),function(t){a.each(t,(function(e,i){if("a"===e[0].toLowerCase()){var n=t[i-1],r=t[i+1];r&&"a"===r[0].toLowerCase()?n&&"l"===n[0].toLowerCase()&&(n[0]="M"):n&&"a"===n[0].toLowerCase()&&r&&"l"===r[0].toLowerCase()&&(r[0]="M")}}))}(o),o}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=n.__importStar(i(7)),a=n.__importStar(i(0)),o=i(17),s=i(61),u=n.__importDefault(i(41)),l=r.Global.theme;r.registerShape("line","miniLine",{draw:function(t,e){for(var i=o.lineSimplification(t.points),n=[],r=0;r0&&(l.push(u),l.sort((function(t,e){return e.top-t.top})),r.each(l,(function(t,e){if(e>0){var i=t.shape;a.default(i),i.set("blank",!0)}})))},e.isNodeOverlap=o},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=n.__importStar(i(0)),a=n.__importDefault(i(148)),o=6e4,s=60*o,u=24*s,l=31*u,c=365*u;function h(t,e){var i,n=Math.abs(t-e),a={minute:[o,s],hour:[s,u],day:[u,l],month:[l,c],year:[c,1/0]};return r.each(a,(function(t,e){n>=t[0]&&n=e)){var n=Math.floor(Math.log10(t));return Math.abs(n-i)}var r=t%e;if(r>0){var a=Math.floor(Math.log10(r));return Math.abs(a-i)}return 0}(function(t){if(t.length>=2){var e=parseFloat(t[0].shape.get("origin").text),i=parseFloat(t[1].shape.get("origin").text);return Math.abs(e-i)}return 0}(u),d)},l).num;t.attr("text",h+p)}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=n.__importStar(i(0)),a=n.__importDefault(i(23));function o(t,e,i){var n=[];r.each(t,(function(t){"start"===t?n.push(0===e):"end"===t?n.push(e===i.length-1):r.isNumber(t)&&n.push(e===t)}));for(var a=0,o=n;a=n.minY&&i.maxY<=n.maxY){var r=e.attr("fill"),a=e.attr("opacity")?e.attr("opacity"):1,s=o.rgb2arr(r),u=Math.round(.299*s[0]+.587*s[1]+.114*s[2])/a,l=this._mappingColor([{from:0,to:85,color:"white"},{from:85,to:170,color:"#F6F6F6"},{from:170,to:255,color:"black"}],u);t.attr("fill",l)}else i.maxY=n.from&&e=n.minX&&i.maxX<=n.maxX){var r=e.attr("fill"),a=e.attr("opacity")?e.attr("opacity"):1,s=o.rgb2arr(r),u=Math.round(.299*s[0]+.587*s[1]+.114*s[2])/a,l=this._mappingColor([{from:0,to:85,color:"white"},{from:85,to:170,color:"#F6F6F6"},{from:170,to:255,color:"black"}],u);t.attr("fill",l)}else i.maxY=n.from&&e=50?10:4},e}(s.default);e.default=p,a.registerPlotType("progress",p)},function(t,e,i){"use strict";i.r(e);var n=i(1),r=i(2),a=i(3),o=i(0),s={default:{trackColor:"rgba(0,0,0,0)",thumbColor:"rgba(0,0,0,0.15)",size:8,lineCap:"round"},hover:{thumbColor:"rgba(0,0,0,0.2)"}},u=function(t){function e(e){var i=t.call(this)||this;i._isMobile=!1,i._onStartEvent=function(t){return function(e){i._isMobile=t,e.event.preventDefault();var n=i._isMobile?o.get(e.event,"touches.0",e):e,r=n.clientX,a=n.clientY;i._startPos=i.isHorizontal?r:a,i._bindLaterEvent()}},i._onTrackClick=function(t){var e=i.get("canvas").get("containerDOM").getBoundingClientRect(),n=t.clientX,r=t.clientY,a=i.isHorizontal?n-e.left-i.position.x-i.thumbLen/2:r-e.top-i.position.y-i.thumbLen/2,o=i._validateRange(a);i.updateThumbOffset(o)},i._onMouseMove=function(t){t.preventDefault();var e=i._isMobile?o.get(t,"touches.0",t):t,n=e.clientX,r=e.clientY,a=i.isHorizontal?n:r,s=a-i._startPos;i._startPos=a,i.updateThumbOffset(i.thumbOffset+s)},i._onMouseUp=function(t){t.preventDefault(),i._clearEvents()},i._onTrackMouseOver=function(t){var e=i.theme.hover.thumbColor;i.thumbShape.attr("stroke",e),i.get("canvas").draw()},i._onTrackMouseOut=function(t){var e=i.theme.default.thumbColor;i.thumbShape.attr("stroke",e),i.get("canvas").draw()};var n=e.isHorizontal,r=void 0!==n&&n,a=e.trackLen,u=e.thumbLen,l=e.position,c=e.minThumbLen,h=void 0===c?20:c,p=e.thumbOffset,f=void 0===p?0:p,d=e.theme;return i.isHorizontal=r,i.thumbOffset=f,i.trackLen=a,i.thumbLen=u,i.position=l,i.minThumbLen=h,i.theme=o.deepMix({},s,d),i._initScrollBar(),i}return Object(n.__extends)(e,t),e.prototype.current=function(){var t=this.thumbLen/this.trackLen;return this.thumbOffset/this.trackLen/(1-t)},e.prototype.updateTrackLen=function(t){if(this.trackLen!==t){var e=t*(this.thumbLen/this.trackLen),i=t*(this.thumbOffset/this.trackLen);this.trackLen=t,this.isHorizontal?this.trackShape.attr("x2",t):this.trackShape.attr("y2",t),this.updateThumbLen(e),this.updateThumbOffset(i),this._renderNewScrollBar()}},e.prototype.updateThumbLen=function(t){this.thumbLen!==t&&(this.thumbLen=t,this.isHorizontal?this.thumbShape.attr("x2",this.thumbOffset+t):this.thumbShape.attr("y2",this.thumbOffset+t),this._renderNewScrollBar())},e.prototype.updateThumbOffset=function(t){var e=this._validateRange(t);this.thumbOffset!==e&&(this.thumbOffset=e,this.isHorizontal?this.thumbShape.attr({x1:e,x2:e+this.thumbLen}):this.thumbShape.attr({y1:e,y2:e+this.thumbLen}),this._renderNewScrollBar())},e.prototype.updateScrollBarPos=function(t){t.x===this.position.x&&t.y===this.position.y||(this.position=t,this.scrollBarGroup.move(t.x,t.y),this._renderNewScrollBar())},e.prototype._renderNewScrollBar=function(){this.emit("scrollchange",{thumbOffset:this.thumbOffset,ratio:o.clamp(this.thumbOffset/(this.trackLen-this.thumbLen),0,1)}),this.get("canvas").draw()},e.prototype.updateTheme=function(t){this.theme=o.deepMix({},s,t),this.thumbShape.attr("stroke",this.theme.default.thumbColor),this.thumbShape.attr("lineWidth",this.theme.default.size),this.thumbShape.attr("lineCap",this.theme.default.lineCap),this.get("canvas").draw()},e.prototype._initScrollBar=function(){this.scrollBarGroup=this._createScrollBarGroup(),this.scrollBarGroup.move(this.position.x,this.position.y),this._bindEvents()},e.prototype._createScrollBarGroup=function(){var t=this.addGroup({className:this.isHorizontal?"horizontalBar":"verticalBar"});return this.trackShape=this._createTrackShape(t),this.thumbShape=this._createThumbShape(t),t},e.prototype._createTrackShape=function(t){var e=this.theme.default,i=e.lineCap,n=e.trackColor,r=e.size;return this.isHorizontal?t.addShape("line",{attrs:{x1:0,y1:r/2,x2:this.trackLen,y2:r/2,lineWidth:r,stroke:n,lineCap:i}}):t.addShape("line",{attrs:{x1:r/2,y1:0,x2:r/2,y2:this.trackLen,lineWidth:r,stroke:n,lineCap:i}})},e.prototype._createThumbShape=function(t){var e=this.theme.default,i=e.size,n=e.lineCap,r=e.thumbColor;return this.isHorizontal?t.addShape("line",{attrs:{x1:this.thumbOffset,y1:i/2,x2:this.thumbOffset+this.thumbLen,y2:i/2,lineWidth:i,stroke:r,lineCap:n,cursor:"default"}}):t.addShape("line",{attrs:{x1:i/2,y1:this.thumbOffset,x2:i/2,y2:this.thumbOffset+this.thumbLen,lineWidth:i,stroke:r,lineCap:n,cursor:"default"}})},e.prototype._bindEvents=function(){this.on("mousedown",this._onStartEvent(!1)),this.on("touchstart",this._onStartEvent(!0)),this.trackShape.on("click",this._onTrackClick),this.thumbShape.on("mouseover",this._onTrackMouseOver),this.thumbShape.on("mouseout",this._onTrackMouseOut)},e.prototype._bindLaterEvent=function(){var t=this.get("canvas").get("containerDOM"),e=[];e=this._isMobile?[r.addEventListener(t,"touchmove",this._onMouseMove),r.addEventListener(t,"touchend",this._onMouseUp),r.addEventListener(t,"touchcancel",this._onMouseUp)]:[r.addEventListener(t,"mousemove",this._onMouseMove),r.addEventListener(t,"mouseup",this._onMouseUp),r.addEventListener(t,"mouseleave",this._onMouseUp)],this._clearEvents=function(){e.forEach((function(t){t.remove()}))}},e.prototype._validateRange=function(t){var e=t;return t+this.thumbLen>this.trackLen?e=this.trackLen-this.thumbLen:t+this.thumbLenu&&(s=(e=[u,s])[0],u=e[1],r=(i=[a,r])[0],a=i[1],l=!0);var c=r.getBBox(),h=a.getBBox(),p=c.width>s-2?{x:s+n/2+2,textAlign:"left"}:{x:s-n/2-2,textAlign:"right"},f=h.width>this.width-u-2?{x:u-n/2-2,textAlign:"right"}:{x:u+n/2+2,textAlign:"left"};return l?[f,p]:[p,f]},e}(a.Group);i.d(e,"ScrollBar",(function(){return u})),i.d(e,"Icon",(function(){return l})),i.d(e,"Arrow",(function(){return h})),i.d(e,"Slider",(function(){return L})),i.d(e,"Trend",(function(){return M}))},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.forEach=e.sqrLen=e.len=e.sqrDist=e.dist=e.div=e.mul=e.sub=void 0,e.create=r,e.clone=function(t){var e=new n.ARRAY_TYPE(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},e.length=a,e.fromValues=o,e.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t},e.set=function(t,e,i,n){return t[0]=e,t[1]=i,t[2]=n,t},e.add=function(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t[2]=e[2]+i[2],t},e.subtract=s,e.multiply=u,e.divide=l,e.ceil=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t},e.floor=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t},e.min=function(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t[2]=Math.min(e[2],i[2]),t},e.max=function(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t[2]=Math.max(e[2],i[2]),t},e.round=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t},e.scale=function(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t},e.scaleAndAdd=function(t,e,i,n){return t[0]=e[0]+i[0]*n,t[1]=e[1]+i[1]*n,t[2]=e[2]+i[2]*n,t},e.distance=c,e.squaredDistance=h,e.squaredLength=p,e.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t},e.inverse=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t},e.normalize=f,e.dot=d,e.cross=function(t,e,i){var n=e[0],r=e[1],a=e[2],o=i[0],s=i[1],u=i[2];return t[0]=r*u-a*s,t[1]=a*o-n*u,t[2]=n*s-r*o,t},e.lerp=function(t,e,i,n){var r=e[0],a=e[1],o=e[2];return t[0]=r+n*(i[0]-r),t[1]=a+n*(i[1]-a),t[2]=o+n*(i[2]-o),t},e.hermite=function(t,e,i,n,r,a){var o=a*a,s=o*(2*a-3)+1,u=o*(a-2)+a,l=o*(a-1),c=o*(3-2*a);return t[0]=e[0]*s+i[0]*u+n[0]*l+r[0]*c,t[1]=e[1]*s+i[1]*u+n[1]*l+r[1]*c,t[2]=e[2]*s+i[2]*u+n[2]*l+r[2]*c,t},e.bezier=function(t,e,i,n,r,a){var o=1-a,s=o*o,u=a*a,l=s*o,c=3*a*s,h=3*u*o,p=u*a;return t[0]=e[0]*l+i[0]*c+n[0]*h+r[0]*p,t[1]=e[1]*l+i[1]*c+n[1]*h+r[1]*p,t[2]=e[2]*l+i[2]*c+n[2]*h+r[2]*p,t},e.random=function(t,e){e=e||1;var i=2*n.RANDOM()*Math.PI,r=2*n.RANDOM()-1,a=Math.sqrt(1-r*r)*e;return t[0]=Math.cos(i)*a,t[1]=Math.sin(i)*a,t[2]=r*e,t},e.transformMat4=function(t,e,i){var n=e[0],r=e[1],a=e[2],o=i[3]*n+i[7]*r+i[11]*a+i[15];return o=o||1,t[0]=(i[0]*n+i[4]*r+i[8]*a+i[12])/o,t[1]=(i[1]*n+i[5]*r+i[9]*a+i[13])/o,t[2]=(i[2]*n+i[6]*r+i[10]*a+i[14])/o,t},e.transformMat3=function(t,e,i){var n=e[0],r=e[1],a=e[2];return t[0]=n*i[0]+r*i[3]+a*i[6],t[1]=n*i[1]+r*i[4]+a*i[7],t[2]=n*i[2]+r*i[5]+a*i[8],t},e.transformQuat=function(t,e,i){var n=i[0],r=i[1],a=i[2],o=i[3],s=e[0],u=e[1],l=e[2],c=r*l-a*u,h=a*s-n*l,p=n*u-r*s,f=r*p-a*h,d=a*c-n*p,g=n*h-r*c,v=2*o;return c*=v,h*=v,p*=v,f*=2,d*=2,g*=2,t[0]=s+c+f,t[1]=u+h+d,t[2]=l+p+g,t},e.rotateX=function(t,e,i,n){var r=[],a=[];return r[0]=e[0]-i[0],r[1]=e[1]-i[1],r[2]=e[2]-i[2],a[0]=r[0],a[1]=r[1]*Math.cos(n)-r[2]*Math.sin(n),a[2]=r[1]*Math.sin(n)+r[2]*Math.cos(n),t[0]=a[0]+i[0],t[1]=a[1]+i[1],t[2]=a[2]+i[2],t},e.rotateY=function(t,e,i,n){var r=[],a=[];return r[0]=e[0]-i[0],r[1]=e[1]-i[1],r[2]=e[2]-i[2],a[0]=r[2]*Math.sin(n)+r[0]*Math.cos(n),a[1]=r[1],a[2]=r[2]*Math.cos(n)-r[0]*Math.sin(n),t[0]=a[0]+i[0],t[1]=a[1]+i[1],t[2]=a[2]+i[2],t},e.rotateZ=function(t,e,i,n){var r=[],a=[];return r[0]=e[0]-i[0],r[1]=e[1]-i[1],r[2]=e[2]-i[2],a[0]=r[0]*Math.cos(n)-r[1]*Math.sin(n),a[1]=r[0]*Math.sin(n)+r[1]*Math.cos(n),a[2]=r[2],t[0]=a[0]+i[0],t[1]=a[1]+i[1],t[2]=a[2]+i[2],t},e.angle=function(t,e){var i=o(t[0],t[1],t[2]),n=o(e[0],e[1],e[2]);f(i,i),f(n,n);var r=d(i,n);return r>1?0:r<-1?Math.PI:Math.acos(r)},e.str=function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]},e.equals=function(t,e){var i=t[0],r=t[1],a=t[2],o=e[0],s=e[1],u=e[2];return Math.abs(i-o)<=n.EPSILON*Math.max(1,Math.abs(i),Math.abs(o))&&Math.abs(r-s)<=n.EPSILON*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(a-u)<=n.EPSILON*Math.max(1,Math.abs(a),Math.abs(u))};var n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}(i(36));function r(){var t=new n.ARRAY_TYPE(3);return n.ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function a(t){var e=t[0],i=t[1],n=t[2];return Math.sqrt(e*e+i*i+n*n)}function o(t,e,i){var r=new n.ARRAY_TYPE(3);return r[0]=t,r[1]=e,r[2]=i,r}function s(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t[2]=e[2]-i[2],t}function u(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[1],t[2]=e[2]*i[2],t}function l(t,e,i){return t[0]=e[0]/i[0],t[1]=e[1]/i[1],t[2]=e[2]/i[2],t}function c(t,e){var i=e[0]-t[0],n=e[1]-t[1],r=e[2]-t[2];return Math.sqrt(i*i+n*n+r*r)}function h(t,e){var i=e[0]-t[0],n=e[1]-t[1],r=e[2]-t[2];return i*i+n*n+r*r}function p(t){var e=t[0],i=t[1],n=t[2];return e*e+i*i+n*n}function f(t,e){var i=e[0],n=e[1],r=e[2],a=i*i+n*n+r*r;return a>0&&(a=1/Math.sqrt(a),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a),t}function d(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}var g;e.sub=s,e.mul=u,e.div=l,e.dist=c,e.sqrDist=h,e.len=a,e.sqrLen=p,e.forEach=(g=r(),function(t,e,i,n,r,a){var o=void 0,s=void 0;for(e||(e=3),i||(i=0),s=n?Math.min(n*e+i,t.length):t.length,o=i;o1?t-1:t,r.isEmpty(this.ticks)&&(this.ticks=this._setTicks())},e.prototype._setTicks=function(){var t=this,e=this.values;if(r.isNumber(this.tickInterval))return r.filter(e,(function(e,i){return i%(t.tickInterval+1)==0}));if(r.isNumber(this.tickCount)){var i=o.ALL_Q.filter((function(t){return Number.isInteger(t)})),n=o.default(this.min,this.max,this.tickCount,!1,i).ticks;return r.filter(n,(function(e){return e>=t.min&&e<=t.max})).map((function(e){return t.values[e]}))}return this.values},e}(a.default);e.default=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),a=i(57),o=i(58),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.scale=function(t){if(r.isNil(t))return NaN;var e=this._transform(this.max),i=this._transform(this.min);if(i===e)return.5;var n=Math.min(Math.max(this._transform(t),i),e),a=this._calcPercent(n,i,e),o=r.head(this.range),s=r.last(this.range);return this._calcValue(a,o,s)},e.prototype.invert=function(t){var e=r.head(this.range),i=r.last(this.range),n=this._transform(this.max),a=this._transform(this.min),o=this._calcPercent(t,e,i);return this._calcValue(o,a,n)},e.prototype._initDefaultCfg=function(){this.values=[],this.type="linear",this.isLinear=!0,this.nice=!0,this.tickCount=5},e.prototype._init=function(){this._setDomain(),r.isEmpty(this.ticks)&&(this.ticks=this._setTicks())},e.prototype._setDomain=function(){var t=r.getRange(this.values),e=t.min,i=t.max;r.isNil(this.min)&&(this.min=e),r.isNil(this.max)&&(this.max=i),this.min>this.max&&(console.error("min should less than max"),this.min=e,this.max=i)},e.prototype._transform=function(t){return t},e.prototype._setTicks=function(){var t,e,i,n,a=this,s=this._getAlgoParams(),u=s.onlyLoose,l=s.Q,c=s.w,h=s.m,p=[],f=this.minLimit,d=this.maxLimit;r.isNil(f)||r.isNil(d)||f!==d||(console.error("minLimit should less than maxLimit"),0===(f/=2)&&(d=1)),(i=r.isNil(f)?this.min:this.minLimit)>(n=r.isNil(d)?this.max:this.maxLimit)&&(console.error("minLimit should less than maxLimit"),i=(t=[n,i])[0],n=t[1],f=(e=[d,f])[0],d=e[1]);var g=o.default(i,n,h,u,l,c),v=g.min,y=g.max,m=g.ticks;return this.nice&&(this.min=v,this.max=y),r.isNil(f)||(this.min=f),r.isNil(d)||(this.max=d),p.push(this.min),r.each(m,(function(t){t>a.min&&t=c})),r.includes(a,c)||a.push(c),s=Math.ceil((this.max-this.min)/this.minTickInterval)+1,1===a.length&&a.push(1)}return{m:s,w:n,Q:a,onlyLoose:e}},e}(a.default);e.default=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),i(1).__exportStar(i(46),e);var n=i(47);e.Layer=n.default,e.LayerConfig=n.LayerConfig;var r=i(12);e.ViewLayer=r.default,e.ViewConfig=r.ViewConfig;var a=i(5);e.Base=a.default,e.PlotConfig=a.PlotConfig;var o=i(127);e.Line=o.default,e.LineConfig=o.LineConfig;var s=i(166);e.Density=s.default,e.DensityConfig=s.DensityConfig;var u=i(172);e.Column=u.default,e.ColumnConfig=u.ColumnConfig;var l=i(180);e.Bubble=l.default,e.BubbleConfig=l.BubbleConfig;var c=i(184);e.GroupColumn=c.default,e.GroupColumnConfig=c.GroupColumnConfig;var h=i(186);e.StackColumn=h.default,e.StackColumnConfig=h.StackColumnConfig;var p=i(189);e.PercentageStackColumn=p.default,e.PercentageStackColumnConfig=p.PercentageStackColumnConfig;var f=i(191);e.Histogram=f.default,e.HistogramConfig=f.HistogramConfig;var d=i(193);e.Bar=d.default,e.BarConfig=d.BarConfig;var g=i(198);e.StackBar=g.default,e.StackBarConfig=g.StackBarConfig;var v=i(200);e.PercentageStackBar=v.default,e.PercentageStackBarConfig=v.PercentageStackBarConfig;var y=i(202);e.GroupBar=y.default,e.GroupBarConfig=y.GroupBarConfig;var m=i(204);e.Pie=m.default,e.PieConfig=m.PieConfig;var x=i(208);e.Ring=x.default,e.RingConfig=x.RingConfig;var _=i(215);e.Radar=_.default,e.RadarConfig=_.RadarConfig;var b=i(218);e.Liquid=b.default,e.LiquidConfig=b.LiquidConfig;var M=i(222);e.Gauge=M.default,e.GaugeConfig=M.GaugeConfig;var S=i(226);e.Area=S.default,e.AreaConfig=S.AreaConfig;var w=i(227);e.StackArea=w.default,e.StackAreaConfig=w.StackAreaConfig;var k=i(230);e.PercentageStackArea=k.default,e.PercentageStackAreaConfig=k.PercentageStackAreaConfig;var C=i(29);e.TinyLayerConfig=C.TinyLayerConfig;var P=i(232);e.Progress=P.default,e.ProgressConfig=P.ProgressConfig;var O=i(234);e.RingProgress=O.default;var A=i(238);e.TinyColumn=A.default;var L=i(241);e.TinyArea=L.default;var T=i(244);e.TinyLine=T.default;var I=i(18);e.registerTheme=I.registerTheme,e.registerGlobalTheme=I.registerGlobalTheme;var D=i(64);e.registerResponsiveConstraint=D.registerResponsiveConstraint,e.IConstraint=D.IConstraint;var j=i(65);e.registerResponsiveRule=j.registerResponsiveRule;var E=i(27);e.registerResponsiveTheme=E.registerResponsiveTheme,e.getResponsiveTheme=E.getResponsiveTheme;var B=i(56);e.StateManager=B.default},function(t,e,i){"use strict";e.__esModule=!0,e.default=function(t,e,i){if(t){if("function"==typeof t.addEventListener)return t.addEventListener(e,i,!1),{remove:function(){t.removeEventListener(e,i,!1)}};if("function"==typeof t.attachEvent)return t.attachEvent("on"+e,i),{remove:function(){t.detachEvent("on"+e,i)}}}}},function(t,e,i){"use strict";var n,r,a,o;e.__esModule=!0,e.default=function(t){n||(n=document.createElement("table"),r=document.createElement("tr"),a=/^\s*<(\w+|!)[^>]*>/,o={tr:document.createElement("tbody"),tbody:n,thead:n,tfoot:n,td:r,th:r,"*":document.createElement("div")});var e=a.test(t)&&RegExp.$1;e&&e in o||(e="*");var i=o[e];t=t.replace(/(^\s*)|(\s*$)/g,""),i.innerHTML=""+t;var s=i.childNodes[0];return i.removeChild(s),s}},function(t,e,i){"use strict";e.__esModule=!0;var n=i(26),r=i(49);e.default=function(t,e){var i=r.default(t,e),a=parseFloat(n.default(t,"borderTopWidth"))||0,o=parseFloat(n.default(t,"paddingTop"))||0,s=parseFloat(n.default(t,"paddingBottom"))||0;return i+a+(parseFloat(n.default(t,"borderBottomWidth"))||0)+o+s+(parseFloat(n.default(t,"marginTop"))||0)+(parseFloat(n.default(t,"marginBottom"))||0)}},function(t,e,i){"use strict";e.__esModule=!0;var n=i(26),r=i(50);e.default=function(t,e){var i=r.default(t,e),a=parseFloat(n.default(t,"borderLeftWidth"))||0,o=parseFloat(n.default(t,"paddingLeft"))||0,s=parseFloat(n.default(t,"paddingRight"))||0,u=parseFloat(n.default(t,"borderRightWidth"))||0,l=parseFloat(n.default(t,"marginRight"))||0;return i+a+u+o+s+(parseFloat(n.default(t,"marginLeft"))||0)+l}},function(t,e,i){"use strict";e.__esModule=!0,e.default=function(){return window.devicePixelRatio?window.devicePixelRatio:2}},function(t,e,i){"use strict";e.__esModule=!0,e.default=function(t,e){if(t)for(var i in e)e.hasOwnProperty(i)&&(t.style[i]=e[i]);return t}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){return"object"==typeof t&&null!==t}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=function(t){function e(e){var i=t.call(this)||this;return i.cfg=n.__assign({id:null,canvas:null,container:null,group:null,capture:!0,offsetX:0,offsetY:0,visible:!0,zIndex:1},e),i.destroyed=!1,i}return n.__extends(e,t),e.prototype.get=function(t){return this.cfg[t]},e.prototype.set=function(t,e){return this.cfg[t]=e,this},e.prototype.destroy=function(){this.off(),this.destroyed=!0},e}(i(21).default);e.Guide=r,e.default=r},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(99);e.Size=n.default;var r=i(102);e.Color=r.default},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(3),a=i(53),o=function(t){function e(e){return t.call(this,n.__assign({type:"size-legend"},e))||this}return n.__extends(e,t),e.prototype.getBackgroundShapeAttr=function(){var t=this.get("width"),e=this.get("height"),i=t/2,n=e/2;return{points:"rect"===this.get("handleIcon")?this.isHorizontal()?[[0,e],[0,e-4],[t,0],[t,e]]:[[0,0],[t,0],[t,e],[t-4,e]]:this.isHorizontal()?[[0,n+2],[0,n-2],[t,n-2],[t,n+2]]:[[i+2,0],[i-2,0],[i-2,e],[i+2,e]]}},e.prototype.createBackgroundGroup=function(){var t=this.getBackgroundShapeAttr(),e=this.get("backgroundStyle"),i=this.get("fillStyle"),a=new r.Polygon({attrs:n.__assign(n.__assign({},t),e)}),o=new r.Polygon({attrs:n.__assign(n.__assign(n.__assign({},t),e),i)}),s=new r.Group;return this.isOperational()?(s.add(a),s.add(o)):s.add(o),{group:s,background:a,frontend:o}},e}(a.default);e.default=o},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(3),a=i(2),o=i(38),s=function(t){function e(e){var i=t.call(this)||this;i.onMouseMove=function(t){var e=t.clientX,n=t.clientY;i.updateSliderStatus(e,n)},i.onMouseUp=function(){i.clearAllEvents&&i.clearAllEvents(),i.currentTarget=void 0};var n=e.layout,r=e.sliderType,a=e.sliderSize,s=e.operational,u=e.width,l=e.height,c=e.textStyle,h=e.min,p=e.max,f=e.range,d=e.formatter;i.layout=n,i.sliderType=r;var g=a||[],v=g[0],y=void 0===v?o.SLIDER_WIDTH:v,m=g[1],x=void 0===m?o.SLIDER_HEIGHT:m;return i.sliderSize=[y,x],i.operational=s,i.width=u,i.height=l,i.min=h,i.max=p,i.range=f,i.textStyle=c,i.formatter=d,i.initialSlider(),i}return n.__extends(e,t),e.prototype.setBackground=function(t){this.backgroundGroup&&this.backgroundGroup.destroy();var e=t.group,i=(t.background,t.frontend);this.backgroundGroup=e,this.backgroundGroup.set("zIndex",0),this.operational&&this.rangeSliderShape&&i&&i.attr("clip",this.rangeSliderShape),this.add(this.backgroundGroup),this.sort()},e.prototype.isHorizontal=function(){return"horizontal"===this.layout},e.prototype.initialSlider=function(){if(this.operational){this.rangeSliderShape=this.createRangeSliderShape(),this.rangeSliderShape.set("zIndex",1),this.minSliderGroup=this.createMinSliderGroup(),this.minSliderGroup.set("zIndex",2),this.maxSliderGroup=this.createMaxSliderGroup(),this.maxSliderGroup.set("zIndex",2);var t=this.range,e=t[0],i=t[1];this.renderUIWithRange(e,i)}this.bindEvent()},e.prototype.getSliderCursor=function(){return this.isHorizontal()?"ew-resize":"ns-resize"},e.prototype.createMinSliderGroup=function(){var t=this.addGroup();return this.minSliderShape=this.createSliderButton(t,!0),this.minTextShape=this.createSliderText(t,!0),t},e.prototype.createMaxSliderGroup=function(){var t=this.addGroup();return this.maxSliderShape=this.createSliderButton(t,!1),this.maxTextShape=this.createSliderText(t,!1),t},e.prototype.createRangeSliderShape=function(){return this.addShape("rect",{attrs:{fill:"#fff",fillOpacity:0,cursor:"move"}})},e.prototype.getRectButtonAttribute=function(t){var e=this.sliderSize,i=e[0],n=e[1];return this.isHorizontal()?{x:t?-i:0,y:this.height/2-n/2,width:i,height:n}:{x:this.width/2-n/2,y:t?0:-i,width:n,height:i}},e.prototype.getCircleButtonAttribute=function(t){return this.isHorizontal()?{x:0,y:this.height/2,r:o.SLIDER_CIRCLE_MAX_SIZE/2}:{x:this.width/2,y:0,r:o.SLIDER_CIRCLE_MAX_SIZE/2}},e.prototype.createSliderButton=function(t,e){var i="rect"===this.sliderType?this.getRectButtonAttribute(e):"circle"===this.sliderType?this.getCircleButtonAttribute(e):{},r=n.__assign(n.__assign(n.__assign({},i),o.SliderBtnStyle),{cursor:this.getSliderCursor()});return t.addShape(this.sliderType,{attrs:r})},e.prototype.getRectTextAttribute=function(t){var e=this.sliderSize,i=e[0],n=e[1];return this.isHorizontal()?{x:t?-i/2:i/2,y:this.height/2+n/2+4,textAlign:"center",textBaseline:"top"}:{x:this.width/2+n/2+4,y:t?i/2:-i/2,textAlign:"left",textBaseline:"middle"}},e.prototype.getCircleTextAttribute=function(t){return this.isHorizontal()?{x:0,y:this.height/2+o.SLIDER_CIRCLE_MAX_SIZE/2+4,textAlign:"center",textBaseline:"top"}:{x:this.width/2+o.SLIDER_CIRCLE_MAX_SIZE/2+4,y:0,textAlign:"left",textBaseline:"middle"}},e.prototype.createSliderText=function(t,e){var i="rect"===this.sliderType?this.getRectTextAttribute(e):"circle"===this.sliderType?this.getCircleTextAttribute(e):{},r=n.__assign(n.__assign(n.__assign({},this.textStyle),i),{text:""});return t.addShape("text",{attrs:r})},e.prototype.bindEvent=function(){this.operational&&this.on("mousedown",this.onMouseDown)},e.prototype.onMouseDown=function(t){this.currentTarget=t.target;var e=t.event;e.stopPropagation(),e.preventDefault();var i=e.clientX,n=e.clientY;this.pos=this.isHorizontal()?i:n,this.bindCanvasEvents()},e.prototype.bindCanvasEvents=function(){var t=this.get("canvas").get("containerDOM"),e=a.addEventListener(t,"mousemove",this.onMouseMove),i=a.addEventListener(t,"mouseup",this.onMouseUp),n=a.addEventListener(t,"mouseleave",this.onMouseUp);this.clearAllEvents=function(){e.remove(),i.remove(),n.remove()}},e.prototype.isDragMin=function(){return this.currentTarget===this.minSliderShape},e.prototype.isDragMax=function(){return this.currentTarget===this.maxSliderShape},e.prototype.isDragAll=function(){return this.currentTarget===this.rangeSliderShape},e.prototype.updateSliderStatus=function(t,e){var i=this,n=this.isHorizontal()?this.width:this.height,r=this.isHorizontal()?1:-1,a=this.range,o=a[0],s=a[1],u=this.pos,l=this.isHorizontal()?t:e,c=(l-u)/n*r,h=[o,s];this.isDragAll()?h=c>=0&&s+c>1?[o+(1-s),1]:c<0&&o+c<0?[0,s-o]:[o+c,s+c]:(this.isDragMin()&&(h[0]=this.getNewRange(o,c)),this.isDragMax()&&(h[1]=this.getNewRange(s,c)),h[1]1?1:i<0?0:i},e.prototype.getValue=function(t){var e=this.min+(this.max-this.min)*t;return Number(e.toFixed(e>1?0:2))},e}(r.Group);e.default=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FONT_FAMILY='"-apple-system", "BlinkMacSystemFont", "Segoe UI", Roboto, "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", SimSun, "sans-serif"'},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),a=i(3),o=i(9),s=i(53),u=i(38),l=function(t){function e(e){return t.call(this,n.__assign({type:"color-legend"},e))||this}return n.__extends(e,t),e.prototype.calculatePercent=function(t){var e=r.head(t).value,i=r.last(t).value-e;return r.map(t,(function(t){return n.__assign(n.__assign({},t),{percentage:(Number(t.value)-e)/i})}))},e.prototype.isSegment=function(){return!!this.get("isSegment")},e.prototype.getOperationalGroup=function(){var t,e=this.get("width"),i=this.get("height"),s=this.calculatePercent(this.get("items")),u=this.get("backgroundStyle"),l="";this.isHorizontal()?(l+="l (0) ",r.each(s,(function(e){t=o.colorUtil.toRGB(e.color),l+=e.percentage+":"+t+" "}))):(l+="l (90) ",r.each(s,(function(e){t=o.colorUtil.toRGB(e.color),l+=1-e.percentage+":"+t+" "})));var c=new a.Rect({attrs:n.__assign({x:0,y:0,width:e,height:i,strokeOpacity:0},u)}),h=new a.Rect({attrs:{x:0,y:0,width:e,height:i,fill:l,strokeOpacity:0}}),p=new a.Group;return this.isOperational()?(p.add(c),p.add(h)):p.add(h),{group:p,background:c,frontend:h}},e.prototype.getUnOperationalGroup=function(){var t,e=this,i=this.get("width"),s=this.get("height"),l=this.calculatePercent(this.get("items")),c=this.get("textStyle"),h=new a.Group,p="",f=[],d=l.length;this.isHorizontal()?(p+="l (0) ",r.each(l,(function(r,a){if(0!==a&&a!==d-1&&(f.push(["M",r.percentage*i,0]),f.push(["L",r.percentage*i,s])),t=o.colorUtil.toRGB(l[a].color),e.isSegment()&&a>0){var g=o.colorUtil.toRGB(l[a-1].color);p+=r.percentage+":"+g+" "}p+=r.percentage+":"+t+" ",h.addShape("text",{attrs:n.__assign(n.__assign({x:r.percentage*i,y:s+u.TEXT_OFFSET,text:""+e.formatterValue(r.value)},c),{textBaseline:"top",textAlign:"center"})})}))):(p+="l (90) ",r.each(l,(function(r,a){if(0!==a&&a!==d-1&&(f.push(["M",0,s-r.percentage*s]),f.push(["L",i,s-r.percentage*s])),t=o.colorUtil.toRGB(l[a].color),p+=1-r.percentage+":"+t+" ",e.isSegment()&&a>0){var g=o.colorUtil.toRGB(l[a-1].color);p+=1-r.percentage+":"+g+" "}h.addShape("text",{attrs:n.__assign(n.__assign({x:i+u.TEXT_OFFSET,y:(1-r.percentage)*s,text:""+e.formatterValue(r.value)},c),{textAlign:"start",textBaseline:"middle"})})})));var g=h.addShape("rect",{attrs:{x:0,y:0,width:i,height:s,fill:p,strokeOpacity:0}});return h.addShape("path",{attrs:{path:f,lineWidth:1,stroke:"#fff"}}),{group:h,background:g,frontend:void 0}},e.prototype.createBackgroundGroup=function(){return this.isOperational()?this.getOperationalGroup():this.getUnOperationalGroup()},e}(s.default);e.default=l},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(104);e.CanvasCategory=n.default;var r=i(106);e.HtmlCategory=r.default},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(3),a=i(0),o=i(105),s=function(t){function e(e){return t.call(this,n.__assign({type:"category-legend"},e))||this}return n.__extends(e,t),e.prototype.init=function(){this.isFlipped=!1;var t=this.get("container");this.set("canvas",t.get("canvas"));var e=t.addGroup();this.set("itemsGroup",e),this.get("flipPage")&&this.set("autoWrap",!0)},e.prototype.renderTitle=function(){var t=this.get("title");if(t){var e=this.get("container"),i=this.get("titleStyle"),r=e.addShape("text",{attrs:n.__assign({x:0,y:0,text:t},i)});r.name="legend-title",this.set("titleShape",r)}},e.prototype.renderItems=function(){var t=this,e=this.get("items");this.get("reversed")&&e.reverse(),a.each(e,(function(e){t._addItem(e)})),this.get("autoWrap")&&this._adjustItems();var i=this._getMaxItemSize(),n=i.maxItemWidth,r=i.maxItemHeight;this.set("maxItemWidth",n),this.set("maxItemHeight",r),this.isNeedFlip()&&this.flipPage(),this._adjustPositionOffset(),this._renderBack()},e.prototype.isNeedFlip=function(){var t=this.get("maxWidth"),e=this.get("maxItemHeight"),i=this.get("itemsGroup").getBBox(),n=this.get("layout");if(this.get("flipPage")){if("vertical"===n&&t1){b-=1,_.text.attr("text",b+" / "+h);var n=a.clone(s.attr("matrix"));if("vertical"===l){var r=t.get("itemDistance")+e;n[6]+=r}else{r=i+t.get("itemMarginBottom");n[7]+=r}s.stopAnimate(),s.animate({matrix:n},100),t.get("canvas").draw()}})),S.on("click",(function(){if(bs&&a.each(o,(function(n){i=n.getBBox(),t=f||i.width,e=i.height+l,s-ps&&a.each(o,(function(n,r){e=n.getBBox(),e.width,t=e.height,s-f0&&(d+=i),n.move(d,h)):n.move(d,f),f+=t+l}))},e.prototype._adjustItems=function(){"horizontal"===this.get("layout")?this._adjustHorizontal():this._adjustVertical()},e.prototype._renderBack=function(){var t=this.get("container"),e=this.get("backgroundPadding"),i=this.get("backgroundStyle");a.isNumber(e)&&(e=[e,e,e,e]),i&&t.renderBack(e,i)},e.prototype._onMousemove=function(t){var e=this._getLegendItem(t.target);if(e&&e.get("checked")){var i=new r.Event("itemmouseover",t,!0,!0);i.item=this._findItem(e),i.checked=e.get("checked"),this.emit("itemmouseover",i),this.get("canvas").draw()}},e.prototype._onMouseleave=function(t){var e=this._getLegendItem(t.target);if(e&&e.get("checked")){var i=new r.Event("itemmouseleave",t,!0,!0);i.item=this._findItem(e),i.checked=e.get("checked"),this.emit("itemmouseleave",i),this.get("canvas").draw()}},e.prototype._onClick=function(t){var e=this,i=this._getLegendItem(t.target);if(i&&!i.get("destroyed")){var o=i.get("checked");if(!this.get("allowAllCanceled")&&o&&1===this.getCheckedCount())return;var s=this.get("selectedMode"),u=this._findItem(i),l=new r.Event("itemclick",t,!0,!0);l.item=u,l.currentTarget=i,l.checked="single"===s||!o;var c,h,p,f=this.get("unSelectedColor"),d=this.get("textStyle").fill;if("single"===s){var g=this.get("itemsGroup").get("children");a.each(g,(function(t){c=e._findShapeByName(t,"legend-marker"),h=e._findShapeByName(t,"legend-text"),p=e._findShapeByName(t,"legend-item"),t!==i?(c.attr("fill")&&c.attr("fill",f),c.attr("stroke")&&c.attr("stroke",f),h.attr("fill",f),c.set("checked",!1),c.set("rawAttrs",n.__assign({},c.get("attrs"))),h.set("checked",!1),p.set("checked",!1),t.set("checked",!1)):(c.attr("fill")&&c.attr("fill",u.marker.fill),c.attr("stroke")&&c.attr("stroke",u.marker.stroke),h.attr("fill",d),c.set("rawAttrs",n.__assign({},c.get("attrs"))),c.set("checked",!0),h.set("checked",!0),p.set("checked",!0),t.set("checked",!0))}))}else c=this._findShapeByName(i,"legend-marker"),h=this._findShapeByName(i,"legend-text"),p=this._findShapeByName(i,"legend-item"),c.attr("fill")&&c.attr("fill",o?f:u.marker.fill),c.attr("stroke")&&c.attr("stroke",o?f:u.marker.stroke),h.attr("fill",o?f:d),i.set("checked",!o),c.set("checked",!o),h.set("checked",!o),p.set("checked",!o);this.emit("itemclick",l),this.get("canvas").draw()}},e.prototype._getLegendItem=function(t){var e=t.get("parent");return e&&"legendGroup"===e.name?e:null},e.prototype._findItem=function(t){var e=this.get("items"),i=null,n=t instanceof r.Group?t.get("value"):t;return a.each(e,(function(t){if(t.value===n)return i=t,!1})),i},e.prototype._findShapeByName=function(t,e){return t.findBy((function(t){return t.name===e}))},e.prototype._getMaxItemSize=function(){var t=-1/0,e=-1/0,i=this.get("itemsGroup").get("children");return a.each(i,(function(i){var n=i.getBBox();t-1?t:t.parentNode?t.parentNode.className===e?t.parentNode:d(t.parentNode,e):null}function g(t,e){return t.getElementsByClassName(e)[0]}var v=function(t){function e(e){return t.call(this,n.__assign({type:"html-legend",prefixClassName:"g2-legend",pagination:!0,highlight:!1},e))||this}return n.__extends(e,t),e.prototype.init=function(){var t=this.get("fontFamily"),e=this.get("layout"),i=this.get("maxWidth"),a=this.get("maxHeight"),s=this.get("prefixClassName"),l=this.get("containerTpl");l||(l='
        \n
        \n
          \n
          ');var c=r.createDom(l),h=o.deepMix({},u,this.get("backgroundStyle"));r.modifyCSS(c,n.__assign({fontFamily:t,maxHeight:a+"px",width:"100%",height:"auto"},h)),"horizontal"===e&&r.modifyCSS(c,{maxWidth:i+"px"});var p=this.get("container");if(p)if(/^\#/.test(p)){var f=p.replace("#","");(p=document.getElementById(f)).appendChild(c)}else p.appendChild(c);else this.get("canvas").get("el").parentNode.appendChild(c);this.set("_legendContainer",c)},e.prototype.renderTitle=function(){var t=this.get("title");if(t){var e=this.get("prefixClassName"),i=this.get("_legendContainer"),n=g(i,e+"-title");n||(n=r.createDom('
          '),i.appendChild(n)),n.innerHTML=t;var a=o.deepMix({},l,this.get("titleStyle"));r.modifyCSS(n,a),this.set("_titleContainer",n)}},e.prototype.renderItems=function(){var t=this,e=this.get("items");if(e&&e.length){var i=this.get("_legendContainer"),n=this.get("layout"),a=this.get("prefixClassName");this.get("reversed")&&e.reverse();var s=g(i,a+"-list");s||(s=r.createDom('
            '));var u=o.deepMix({},c,this.get("listStyle"));"horizontal"===n&&(u.width="max-content"),r.modifyCSS(s,u);var l=r.createDom("
            ");i.appendChild(l),l.appendChild(s),this.set("_clipContainer",l),this.set("_itemGroupContainer",s);var f=this.get("itemTpl");f||(f='
          • \n \n \n
          • ');var d=this.get("unSelectedColor"),v=o.deepMix({},h,this.get("itemStyle")),y=o.deepMix({},p,this.get("markerStyle"));"horizontal"===n?v.display="inline-block":"vertical"===n&&(v.display="block");var m={};o.each(e,(function(e,i){var n,u=e.checked,l=t.formatterValue(e.value),c=e.marker.fill||e.marker.stroke,h=u?c:d;if(o.isFunction(f)){var p=f(l,h,u,i);n=r.createDom(p)}else{g(n=r.createDom(f),a+"-item-text").innerHTML=l}v.color=h,y.backgroundColor=h,r.modifyCSS(n,v),n.setAttribute("data-checked",u),n.setAttribute("data-value",e.value),n.setAttribute("data-color",c);var x=g(n,a+"-item-marker");x&&r.modifyCSS(x,y),s.appendChild(n),m[e.value]=e})),this.set("_itemMap",m),"horizontal"===n?this._renderHorizontalPagination():this._renderPagination()}},e.prototype.bindEvents=function(){var t=this,e=this.get("_itemGroupContainer");e&&(this.get("clickable")&&(e.onclick=function(e){return t._onClick(e)}),this.get("hoverable")&&(e.onmousemove=function(e){return t._onMousemove(e)},e.onmouseout=function(e){return t._onMouseout(e)}))},e.prototype.getWidth=function(){var t=this.get("_legendContainer");return r.getOuterWidth(t)},e.prototype.getHeight=function(){var t=this.get("_legendContainer");return r.getOuterHeight(t)},e.prototype.getBBox=function(){return new a.BBox(this.get("x")||0,this.get("y")||0,this.getWidth(),this.getHeight())},e.prototype.moveTo=function(t,e){var i=this.get("_legendContainer");r.modifyCSS(i,{left:t+"px",top:e+"px"}),this.set("x",t),this.set("y",e)},e.prototype.destroy=function(){t.prototype.destroy.call(this);var e=this.get("_legendContainer");e&&e.parentNode&&e.parentNode.removeChild(e)},e.prototype.draw=function(){return null},e.prototype._updateStatus=function(t,e,i,n){e&&(e.style.background=i),t.style.color=i,t.setAttribute("data-checked",n)},e.prototype._onClick=function(t){var e=this,i=(this.get("items"),this.get("_itemGroupContainer")),n=this.get("prefixClassName"),r=n+"-item",a=n+"-item-marker",s=t.target,u=s.className.split(" ");if(!(o.indexOf(u,n+"-list")>-1)){var l=d(s,r),c=g(l,a),h=this.get("_itemMap"),p=h[l.getAttribute("data-value")],f=l.getAttribute("data-color"),v=this.get("selectedMode"),y=this.get("unSelectedColor"),m=i.childNodes;if("single"===v)p.checked=!0,o.each(m,(function(t){if(t!==l){var i=g(t,a);e._updateStatus(t,i,y,"false"),h[t.getAttribute("data-value")].checked=!1}else e._updateStatus(l,c,f,"true")}));else{var x="true"===l.getAttribute("data-checked"),_=0;if(o.each(m,(function(t){"true"===t.getAttribute("data-checked")&&_++})),!this.get("allowAllCanceled")&&x&&1===_)return;p.checked=!p.checked,x?this._updateStatus(l,c,y,"false"):this._updateStatus(l,c,f,"true")}this.emit("itemclick",{item:p,currentTarget:l,checked:"single"===v||p.checked})}},e.prototype._onMousemove=function(t){var e=this.get("_lastActiveItem"),i=(this.get("items"),this.get("_itemMap")),n=this.get("prefixClassName"),r=n+"-list",a=n+"-item",s=t.target,u=s.className.split(" ");if(!(o.indexOf(u,r)>-1)){var l=d(s,a),c=i[l.getAttribute("data-value")];if(c){var h=this.get("highlight");if(c.checked&&e!==c){if(l.className+=" active",h)this.get("_itemGroupContainer").childNodes.forEach((function(t){t!==l&&"true"===t.getAttribute("data-checked")&&(t.className+=" inactive")}));this.set("_lastActiveItem",c)}this.emit("itemmouseover",{item:c,currentTarget:l,checked:c.checked})}}},e.prototype._onMouseout=function(t){this.get("_itemGroupContainer").childNodes.forEach((function(t){var e=t.className.split(" ");o.remove(e,(function(t){return"active"===t||"inactive"===t})),t.className=e.join(" ")})),this.set("_lastActiveItem",null),this.emit("itemmouseleave",t)},e.prototype._renderPagination=function(){var t=this.get("pagination"),e=this.get("_legendContainer"),i=this.get("_itemGroupContainer");if(t&&e.scrollHeight>e.offsetHeight){r.modifyCSS(e,{overflow:"hidden",height:this.get("maxHeight")+"px"});var n=r.createDom('\n
            \n
            \n
            \n 1 / 0\n
            \n
            \n
            \n ');e.appendChild(n);var a=this.getHeight()-(this.get("_titleContainer")?r.getOuterHeight(this.get("_titleContainer")):0)-r.getOuterHeight(n),s=i.offsetHeight,u=this.get("_clipContainer");r.modifyCSS(u,{maxHeight:a+"px",overflow:"hidden"});var l=Math.ceil(s/a),c=r.getOuterHeight(i.childNodes[0]),h=Math.floor(a/c)*c,p=g(n,"current-page-number"),d=g(n,"total-page-number"),v=g(n,"pre-page"),y=g(n,"next-page");d.innerHTML=l;var m=o.deepMix({},f,t),x={cursor:"pointer",border:m.activeColor+" solid",borderWidth:"2px 2px 0 0",width:m.arrowSize+"px",height:m.arrowSize+"px"},_={cursor:"default",border:m.inactiveColor+" solid",borderWidth:"2px 2px 0 0",width:m.arrowSize+"px",height:m.arrowSize+"px"};r.modifyCSS(v,_),r.modifyCSS(y,x),m.animation&&r.modifyCSS(i,{transition:"transform .3s ease-in"});var b=1,M=0;v.onclick=function(){1!==b&&(b-=1,M+=h,p.innerHTML=b,r.modifyCSS(v,x),r.modifyCSS(y,x),r.modifyCSS(i,{transform:"translateY("+M+"px)"}),1===b&&r.modifyCSS(v,_))},y.onclick=function(){b!==l&&(b+=1,M-=h,p.innerHTML=b,r.modifyCSS(y,x),r.modifyCSS(v,x),r.modifyCSS(i,{transform:"translateY("+M+"px)"}),b===l&&r.modifyCSS(y,_))}}},e.prototype._renderHorizontalPagination=function(){var t=this.get("pagination"),e=this.get("_legendContainer"),i=this.get("_itemGroupContainer");if(t&&e.scrollWidth>e.offsetWidth){r.modifyCSS(e,{overflow:"hidden",width:this.get("maxWidth")+"px"});var n=r.createDom('\n
            \n
            \n
            \n 1 / 0\n
            \n
            \n
            \n ');e.appendChild(n);var a=this.getWidth()-r.getOuterWidth(n)-40,s=i.offsetWidth,u=this.get("_clipContainer");r.modifyCSS(u,{maxWidth:a+"px",overflow:"hidden"});var l=Math.ceil(s/a),c=(r.getOuterWidth(i.childNodes[0]),a),h=g(n,"current-page-number"),p=g(n,"total-page-number"),d=g(n,"pre-page"),v=g(n,"next-page");p.innerHTML=l;var y=o.deepMix({},f,t),m={cursor:"pointer",border:y.activeColor+" solid",borderWidth:"2px 2px 0 0",width:y.arrowSize+"px",height:y.arrowSize+"px"},x={cursor:"default",border:y.inactiveColor+" solid",borderWidth:"2px 2px 0 0",width:y.arrowSize+"px",height:y.arrowSize+"px"};r.modifyCSS(d,x),r.modifyCSS(v,m),y.animation&&r.modifyCSS(i,{transition:"transform .3s ease-in"});var _=1,b=0;d.onclick=function(){1!==_&&(_-=1,b+=c,h.innerHTML=_,r.modifyCSS(d,m),r.modifyCSS(v,m),r.modifyCSS(i,{transform:"translateX("+b+"px)"}),1===_&&r.modifyCSS(d,x))},v.onclick=function(){_!==l&&(_+=1,b-=c,h.innerHTML=_,r.modifyCSS(v,m),r.modifyCSS(d,m),r.modifyCSS(i,{transform:"translateX("+b+"px)"}),_===l&&r.modifyCSS(v,x))}}},e}(s.default);e.default=v},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(3),a=n.__importStar(i(0)),o=function(){function t(t){this.position="top",a.assign(this,t),this._init()}return t.prototype.getBBox=function(){return this.shape?this.shape.getBBox():null},t.prototype.clear=function(){this.shape&&this.shape.attr("text","")},t.prototype.destroy=function(){this.shape&&this.shape.remove()},t.prototype._init=function(){var t=this._textWrapper(this.wrapperWidth,this.style);this.shape=this.container.addShape("text",{attrs:a.mix({x:this.leftMargin,y:this.topMargin,text:t},this.style)})},t.prototype._textWrapper=function(t,e){var i=this.text,a=new r.Text({attrs:n.__assign({text:"",x:0,y:0},e)}),o=i.split("\n").map((function(e){for(var i=0,n=0;nt&&(e=e.slice(0,n)+"\n"+e.slice(n),i=0)}return e}));return a.remove(),o.join("\n")},t}();e.default=o},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=n.__importStar(i(0));function a(t,e,i){t[i]&&(e[i]=t[i])}var o=function(){function t(t){r.assign(this,t),this._init()}return t.prototype._init=function(){this.config=!1,this._needDraw()&&this._styleParser()},t.prototype._styleParser=function(){this.config=n.__assign({},this.localProps),this._isVisible("line")?this._lineParser():this.config.line=null,this._isVisible("grid")?this._gridParser():this.config.grid=null,this._isVisible("tickLine")?this._tickLineParser():this.config.tickLine=null,this._isVisible("label")?this._labelParser():this.config.label=null,this.localProps.title&&this._titleParser(),a(this.localProps,this.config,"autoHideLabel"),a(this.localProps,this.config,"autoRotateLabel"),a(this.localProps,this.config,"autoRotateTitle")},t.prototype._needDraw=function(){var t=this.plot.options,e=this.plot.theme,i=t[this.dim+"Axis"]?t[this.dim+"Axis"]:{},n=e.axis[this.dim],a=r.deepMix({},n,i);return this.localProps=a,!!a.visible},t.prototype._lineParser=function(){this.config.line=this.localProps.line,this.localProps.line.style&&(this.config.line=this.localProps.line.style)},t.prototype._gridParser=function(){this.config.grid=this.localProps.grid,this.localProps.grid.style&&(this.config.grid=this.localProps.grid.style)},t.prototype._tickLineParser=function(){this.config.tickLine=this.localProps.tickLine,this.localProps.tickLine.style&&(this.config.tickLine=this.localProps.tickLine.style)},t.prototype._labelParser=function(){var t=this.localProps.label,e=t.formatter,i=t.style,r=n.__rest(t,["formatter","style"]),a=n.__assign({},r);if(i&&(a.textStyle=this.localProps.label.style),e){var o=this.localProps.label.formatter;this.config.label=function(t){return a.text=o(t),a}}else this.config.label=a},t.prototype._titleParser=function(){var t=n.__assign({},this.localProps.title);this.localProps.title.visible?this.config.showTitle=!0:this.config.showTitle=!1,this.localProps.title.style&&(t.textStyle=this.localProps.title.style),this.localProps.title.text&&(t.text=this.localProps.title.text),this.config.title=t},t.prototype._isVisible=function(t){return!(!this.localProps[t]||!this.localProps[t].visible)||!!r.isFunction(this.localProps[t])},t}();e.default=o},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(14),a=n.__importStar(i(0)),o=i(17),s=function(){function t(t){a.assign(this,t),this._init()}return t.prototype._init=function(){var t=this.plot.options,e=this._getDefaultStyle(),i=a.mix(e,n.__assign(n.__assign({},this.cfg),{type:"line",top:!0}));if(this.cfg.type){var o=this._getState(this.cfg.type),s=this._getState("min"),u=this._getState("max"),l=new(r.getScale("linear"))(a.mix({},{min:s,max:u,nice:!0},t.meta)),c=(o-l.min)/(l.max-l.min)*100+"%",h=["0%",c],p=["100%",c];this.config=a.mix({start:h,end:p},i)}else this.config=i},t.prototype._getState=function(t){var e=this._extractValues();return"median"===t?o.getMedian(e):"mean"===t?o.getMean(e):"max"===t?Math.max.apply(Math,e):"min"===t?Math.min.apply(Math,e):void 0},t.prototype._extractValues=function(){var t=this.plot.options,e=t.yField,i=[];return a.each(t.data,(function(t){i.push(t[e])})),i},t.prototype._getDefaultStyle=function(){return{line:{style:{lineWidth:2,stroke:"#66d6a8",opacity:.7,lineDash:[0,0]}}}},t}();e.default=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=n.__importStar(i(0)),a=function(){function t(t){this.config={},this.plot=t.plot,this._init(t)}return t.prototype._init=function(t){var e=this;r.assign(this.config,t),this.config.callback=function(t){return e._parseCallBack(t)}},t.prototype._parseCallBack=function(t){var e=this.plot.options.label,i=n.__assign({},e);return this._parseOffset(e,i),e.position&&(r.isFunction(e.position)?i.position=e.position(t):i.position=e.position),e.formatter&&(i.formatter=e.formatter),e.style&&(r.isFunction(e.style)?i.textStyle=e.style(t):i.textStyle=e.style),e.autoRotate&&(i.autoRotate=e.autoRotate),i},t.prototype._parseOffset=function(t,e){var i=0;r.each(["offset","offsetX","offsetY"],(function(n){r.has(t,n)&&(e[n]=t[n],i++)})),0===i&&"middle"===r.get(t,"position")&&(e.offset=0)},t}();e.default=a},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n,r,a=i(1).__importStar(i(0));function o(t,e){n||s(t),a.each(n,(function(t,i){var n=u(t,e);if(l(n.labelData,n.con)){r[i];var a={opacity:1,fontWeight:600,fill:"red"};t.shape.attr(a)}}))}function s(t){n=[],r=[];var e=t.view.get("axisController").axes;a.each(e,(function(e){var i=[],o=function(t,e){var i=t.options,n="y",r=e.get("position");"bottom"!==r&&"top"!==r||(n="x");var a=i[n+"Field"];return t.view.get("scales")[a]}(t,e),s=e.get("labelRenderer").get("group").get("children");if(a.each(s,(function(t){"text"===t.type&&(i.push({shape:t}),r.push(t.attr()))})),o){var u=o.ticks,l=o.field;a.each(i,(function(t,e){t.value=u[e],t.scaleField=l,t.type=o.type}))}n.push.apply(n,i)}))}function u(t,e){var i,n=((i={})[t.scaleField]=t.value,i),r=a.clone(e);return"time"===t.type&&a.isObject(e)&&!a.isFunction(r.exp)&&(r.exp=new Date(r.exp).getTime()),{labelData:n,con:r}}function l(t,e){if(!a.isFunction(e)){var i=e.name,n=e.exp;return!!t[i]&&(a.isFunction(n)?n(t[i]):t[i]===n)}return e(t)}e.default={active:o,selected:o,disable:function(t,e){n||s(t),a.each(n,(function(t,i){var n=u(t,e);if(l(n.labelData,n.con)){var a=r[i],o={opacity:.2*(a.opacity||1)};t.shape.attr(o)}}))}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n,r,a=i(1).__importStar(i(0)),o=i(30);function s(t,e){n||u(t),a.each(n,(function(t,i){var n=t.get("origin");if(o.compare(n,e)){var s=r[i],u=a.mix({},s,{opacity:1});t.attr(u)}}))}function u(t){n=[],r=[];var e=t.view.get("elements");a.each(e,(function(t){var e=t.get("labels");e&&a.each(e,(function(t){n.push(t),r.push(t.attr())}))}))}e.default={active:s,selected:s,disable:function(t,e){n||u(t),a.each(n,(function(t,i){var n=t.get("origin");if(o.compare(n,e)){var a=r[i],s={opacity:.2*(a.opacity||1)};t.attr(s)}}))}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1).__importStar(i(0)),r=i(30),a=["xField","yField","angleField"];function o(t,e){var i=t.options;if(function(t,e){var i=function(t){var e=[];return n.each(a,(function(i){n.has(t,i)&&e.push(i)})),e}(t);return!n.isFunction(e)&&i.indexOf(e.name)}(i,e)){var o=i.data;n.each(o,(function(i){if(r.compare(i,e)){var n=t.view.getXY(i);t.view.on("tooltip:create",(function(t){s(e,t,!1)})),t.view.showTooltip(n)}}))}}function s(t,e,i){var a=!i,o=n.clone(e.items);e.items.splice(0),n.each(o,(function(i){var n=i.point._origin;r.compare(n,t)===a&&e.items.push(i)}))}e.default={active:o,selected:o,disable:function(t,e){t.view.on("tooltip:change",(function(t){s(e,t,!0)}))}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=n.__importDefault(i(31)),a=n.__importDefault(i(115)),o=n.__importDefault(i(116));r.default.registerInteraction("slider",o.default),r.default.registerInteraction("scrollbar",a.default),n.__exportStar(i(31),e),e.default=r.default},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(3),a=i(82),o=i(0),s=n.__importDefault(i(31)),u=i(59),l=function(t){void 0===t&&(t={});var e=n.__assign({type:"horizontal",categorySize:32,width:16,height:16,padding:[0,0,0,0]},t);return t.padding||(e.padding="horizontal"===e.type?[8,0,8,0]:[0,8,0,8]),e},c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.onChangeFn=o.throttle(e.onChange.bind(e),20,{leading:!0}),e}return n.__extends(e,t),e.getInteractionRange=function(t,e){var i=l(e),n=i.padding,a=n[0],o=n[1],s=n[2],u=n[3];return"horizontal"===i.type?new r.BBox(t.minX,t.maxY-i.height-a-s,t.width,i.height+a+s):new r.BBox(t.maxX-i.width-u-o,t.minY,i.width+u+o,t.height)},e.prototype.render=function(){var t=this,e=this.view;this.ratio=0,this.thumbOffset=0,e.on("afterrender",(function(){var e=t.view.get("padding");o.isEqual([0,0,0,0],e)||(t.trackLen?t.renderScrollbar():(t.measureScrollBar(),t.changeViewData(t.getScrollRange())))}))},e.prototype.clear=function(){this.scrollBar&&(this.scrollBar.destroy(),this.scrollBar=null),this.container&&(this.container.remove(!0),this.container=null),this.trackLen=null,this.thumbLen=null},e.prototype.renderScrollbar=function(){var t=l(this.getInteractionConfig()),e=this.getRange(),i="vertical"!==t.type,n=this.view.get("panelRange"),r=t.padding,o=r[0],s=r[3],u=i?{x:n.minX+s,y:e.tl.y+o}:{x:e.tl.x+s,y:n.minY+o};this.scrollBar?(this.scrollBar.updateTrackLen(this.trackLen),this.scrollBar.updateThumbLen(this.thumbLen),this.scrollBar.updateScrollBarPos(u),this.scrollBar.updateThumbOffset(this.thumbOffset)):(this.container=this.canvas.addGroup(),this.scrollBar=new a.ScrollBar({isHorizontal:i,trackLen:this.trackLen,thumbLen:this.thumbLen,position:u,thumbOffset:this.ratio*this.trackLen}),this.container.add(this.scrollBar),this.scrollBar.set("zIndex",999),this.scrollBar.on("scrollchange",this.onChangeFn))},e.prototype.measureScrollBar=function(){var t=l(this.getInteractionConfig()),e=t.padding,i=e[0],n=e[1],r=e[2],a=e[3],s="vertical"!==t.type,u=this.view.get("panelRange"),c=this.view.getXScale(),h=this.view.getYScales();this.cnt=c.values.length,this.xScaleCfg={field:c.field,values:c.values||[]},this.yScalesCfg=o.map(h,(function(t){return{field:t.field,type:t.type,min:t.min,max:t.max,ticks:t.ticks}})),this.step=Math.floor((s?u.width:u.height)/t.categorySize),this.trackLen=s?u.width-a-n:u.height-i-r,this.thumbLen=Math.max(this.trackLen*o.clamp(this.step/c.values.length,0,1),8)},e.prototype.getScrollRange=function(){var t=Math.floor((this.cnt-this.step)*this.ratio);return[t,t+this.step]},e.prototype.changeViewData=function(t){var e=this,i=t[0],r=t[1],a=this.getViewLayer(),s=a.options.meta,l=a.getData(),c=u.getDataByScaleRange(this.xScaleCfg.field,this.xScaleCfg.values,l,[i,r]);this.yScalesCfg.forEach((function(t){var i=o.get(s,t.field)||{};e.view.scale(t.field,n.__assign(n.__assign({},i),{type:t.type,min:t.min,max:t.max}))})),this.view.set("data",c),this.view.repaint()},e.prototype.onChange=function(t){var e=t.ratio,i=t.thumbOffset;this.ratio=e,this.thumbOffset=i;var n=this.view.get("animation");this.view.animate(!1),this.changeViewData(this.getScrollRange()),this.view.animate(n)},e}(s.default);e.default=c},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(3),a=i(82),o=i(0),s=n.__importDefault(i(31)),u=i(59),l=function(t){void 0===t&&(t={});var e=n.__assign({type:"horizontal",start:0,end:1,width:void 0,height:void 0,padding:[0,0,0,0],backgroundColor:void 0,foregroundColor:void 0},t);t.padding||(e.padding="horizontal"===e.type?[8,0,8,0]:[0,8,0,8]),t.height||(e.height=16),t.width||(e.width=16);var i=o.clamp(Math.min(e.start,e.end),0,1),r=o.clamp(Math.max(e.start,e.end),0,1);return e.start=i,e.end=r,e},c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.onChangeFn=o.throttle(e.onChange.bind(e),20,{leading:!0}),e}return n.__extends(e,t),e.getInteractionRange=function(t,e){var i=l(e),n=i.padding||[0,0,0,0],a=n[0],o=n[1],s=n[2],u=n[3];return"horizontal"===i.type?new r.BBox(t.minX,t.maxY-i.height-a-s,t.width,i.height+a+s):new r.BBox(t.maxX-i.width-u-o,t.minY,i.width+u+o,t.height)},e.prototype.render=function(){var t=this,e=l(this.getInteractionConfig());this.curStart=e.start,this.curEnd=e.end,this.xScaleCfg=void 0,this.view.on("afterrender",(function(){if(t.xScaleCfg)t.renderSlider();else{var e=t.view.getXScale();t.xScaleCfg={field:e.field,values:e.values||[]},t.view.set("data",t.getSliderData(t.curStart,t.curEnd)),t.view.repaint()}}))},e.prototype.clear=function(){this.slider&&(this.slider.destroy(),this.slider=null),this.container&&(this.container.remove(!0),this.container=null)},e.prototype.renderSlider=function(){this.slider?this.slider.update(this.getSliderConfig()):(this.container=this.canvas.addGroup(),this.slider=new a.Slider(this.getSliderConfig()),this.slider.on("sliderchange",this.onChangeFn),this.container.add(this.slider))},e.prototype.getSliderConfig=function(){var t=this.view.get("panelRange"),e=this.getRange(),i=l(this.getInteractionConfig())||{},n=i.padding,r=void 0===n?[0,0,0,0]:n,a=i.foregroundColor,o=i.backgroundColor,s=r[0],u=r[1],c=r[2],h=r[3],p=this.getSliderMinMaxText(this.curStart,this.curEnd),f=p.minText,d=p.maxText,g={x:t.minX+h,y:e.tl.y+s,width:t.width-h-u,height:e.height-s-c,start:this.curStart,end:this.curEnd,minText:f,maxText:d,trendCfg:{data:this.getSliderTrendData(),isArea:!1,smooth:!1},foregroundStyle:{},backgroundStyle:{}};return a&&(g.foregroundStyle.fill=a),o&&(g.backgroundStyle.fill=o),g},e.prototype.getSliderTrendData=function(){var t=this.getViewLayer().options,e=t.data,i=t.yField;return o.map(e,(function(t){return t[i]}))},e.prototype.getSliderData=function(t,e){var i=this.getViewLayer().getData(),n=o.size(this.xScaleCfg.values),r=Math.round(t*n),a=Math.max(r+1,Math.round(e*n));return u.getDataByScaleRange(this.xScaleCfg.field,this.xScaleCfg.values,i,[r,a])},e.prototype.getSliderMinMaxText=function(t,e){var i=this.getViewLayer().options,n=i.data,r=void 0===n?[]:n,a=i.xField,s=o.size(r),u=Math.round(t*s),l=Math.max(u+1,Math.round(e*s)),c=r.slice(u,l);return{minText:o.head(c)[a],maxText:o.last(c)[a]}},e.prototype.onChange=function(t){var e=this.view,i=o.clamp(Math.min(t[0],t[1]),0,1),n=o.clamp(Math.max(t[0],t[1]),0,1),r=this.getSliderData(i,n),a=this.getSliderMinMaxText(i,n),s=a.minText,u=a.maxText;this.curStart=i,this.curEnd=n,this.slider.update({start:i,end:n,minText:s,maxText:u});var l=e.get("animation");e.animate(!1),e.changeData(r),e.animate(l)},e}(s.default);e.default=c},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(3),a=n.__importStar(i(0)),o=function(){function t(t){this.innerPaddingComponents=[],this.outerPaddingComponents=[],a.assign(this,t)}return t.prototype.registerPadding=function(t,e){void 0===e&&(e="outer"),"inner"===e?this.innerPaddingComponents.push(t):this.outerPaddingComponents.push(t)},t.prototype.getPadding=function(){var t=this.plot.options,e=t.padding?t.padding:this.plot.config.theme.padding;return"auto"===e?[0,0,0,0]:e},t.prototype.processAutoPadding=function(){var t=this._getInnerAutoPadding();this.plot.updateConfig({padding:t})},t.prototype.processOuterPadding=function(){var t=this.plot.layerBBox.minX,e=this.plot.layerBBox.maxX,i=a.clone(this.plot.layerBBox.minY),n=this.plot.layerBBox.maxY;return a.each(this.outerPaddingComponents,(function(r){var a=r.position,o=r.getBBox(),s=o.minX,u=o.maxX,l=o.minY,c=o.maxY;c>i&&ci&&lt&&ut&&u0&&a.each(i,(function(t){var i=t.get("group").getBBox();e.push(i)}))},t.prototype._getLegend=function(t,e,i){var n=this,o=t.get("viewRange"),s=t.get("legendController").legends;s.length>0&&a.each(s,(function(a){var s=a;n._adjustLegend(s,t,i);var u=s.getBBox(),l=u.width,c=u.height,h=0,p=0,f=s.get("position").split("-");"right"===f[0]&&(h=o.maxX,p=u.minY),"left"===f[0]&&(h=o.minX-l,p=u.minY),"top"===f[0]&&(h=u.minX,p=-c),"bottom"===f[0]&&(h=u.minX,p=o.maxY+c);var d=new r.BBox(h,p,l,c);e.push(d);var g=n._getLegendInnerPadding(s);n._mergeBleeding(g)}))},t.prototype._mergeBBox=function(t){var e=1/0,i=-1/0,n=1/0,r=-1/0;return a.each(t,(function(t){var a=t;e=Math.min(a.minX,e),i=Math.max(a.maxX,i),n=Math.min(a.minY,n),r=Math.max(a.maxY,r)})),{minX:e,maxX:i,minY:n,maxY:r}},t.prototype._adjustLegend=function(t,e,i){var n=t.get("position").split("-"),r=t.get("container"),a=r.getBBox(),o=e.get("viewRange"),s=o.width,u=(o.height,o.maxX,o.minX,o.maxY),l=o.minY;"right"===n[0]&&r.move(s,l),"left"===n[0]&&r.move(i.minX-a.width,l),"top"===n[0]&&r.move(0,i.minY-a.height),"bottom"===n[0]&&r.move(0,Math.max(u,i.maxY))},t.prototype._getLegendInnerPadding=function(t){var e=this.plot.theme.legend.innerPadding,i=t.get("position").split("-");return"top"===i[0]?[e[0],0,0,0]:"bottom"===i[0]?[0,0,e[2],0]:"left"===i[0]?[0,0,0,e[3]]:"right"===i[0]?[0,e[1],0,0]:void 0},t.prototype._mergeBleeding=function(t){var e=this.bleeding;if(t.length===e.length)for(var i=0;i0},t.prototype.connect_=function(){n&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),l?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){n&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,i=void 0===e?"":e;u.some((function(t){return!!~i.indexOf(t)}))&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),h=function(t,e){for(var i=0,n=Object.keys(e);i0},t}(),S="undefined"!=typeof WeakMap?new WeakMap:new i,w=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var i=c.getInstance(),n=new M(e,i,this);S.set(this,n)};["observe","unobserve","disconnect"].forEach((function(t){w.prototype[t]=function(){var e;return(e=S.get(this))[t].apply(e,arguments)}}));var k=void 0!==r.ResizeObserver?r.ResizeObserver:w;e.default=k}.call(this,i(126))},function(t,e){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=n.__importStar(i(0)),a=n.__importDefault(i(5)),o=n.__importDefault(i(128)),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.createLayers=function(e){var i=r.deepMix({},e);i.type="line",t.prototype.createLayers.call(this,i)},e.getDefaultOptions=o.default.getDefaultOptions,e}(a.default);e.default=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=n.__importStar(i(0)),a=i(6),o=n.__importDefault(i(12)),s=i(11),u=i(13),l=i(19);i(138);var c=n.__importDefault(i(139));i(73),i(73),i(158),i(160);var h=n.__importStar(i(161)),p=i(162);i(165);var f={line:"line",point:"point"},d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="line",e}return n.__extends(e,t),e.getDefaultOptions=function(){return r.deepMix({},t.getDefaultOptions.call(this),{connectNulls:!1,smooth:!1,lineSize:2,point:{visible:!1,size:4,shape:"point"},label:{visible:!1,type:"point"}})},e.prototype.getOptions=function(e){var i=t.prototype.getOptions.call(this,e),n=this.constructor.getDefaultOptions();return r.deepMix({},i,n,e)},e.prototype.afterRender=function(){var e=this.options;e.responsive&&"auto"!==e.padding&&this.applyResponsive("afterRender"),t.prototype.afterRender.call(this)},e.prototype.geometryParser=function(t,e){return f[e]},e.prototype.scale=function(){var e=this.options,i={};i[e.xField]={},r.has(e,"xAxis")&&l.extractScale(i[e.xField],e.xAxis),i[e.yField]={},r.has(e,"yAxis")&&l.extractScale(i[e.yField],e.yAxis),this.setConfig("scales",i),t.prototype.scale.call(this)},e.prototype.coord=function(){},e.prototype.addGeometry=function(){var t=this.options;this.line=u.getGeom("line","main",{plot:this}),t.label&&this.label(),this.setConfig("element",this.line),this.addPoint()},e.prototype.addPoint=function(){var t=this.options;if(t.point&&(t.point=r.deepMix({visible:!1},t.point)),t.point&&t.point.visible){var e=u.getGeom("point","guide",{plot:this});this.setConfig("element",e),this.point=e}},e.prototype.label=function(){var t=this.options,e=t.label;!1!==e.visible?("line"===e.type&&(e.offset=0),this.line.label=s.getComponent("label",{fields:"line"===e.type?[t.seriesField]:[t.yField],labelType:e.type,plot:this})):this.line.label=!1},e.prototype.annotation=function(){},e.prototype.animation=function(){var t=this.options;!1===t.animation?this.line.animate=!1:r.has(t,"animation")&&"clipingWithData"===t.animation.type&&(this.line.animate={appear:{animation:"clipingWithData",easing:"easeLinear",duration:1e4,yField:t.yField}},t.point&&t.point.visible&&(this.point.animate={appear:{animation:"zoomIn",delay:1e4}}))},e.prototype.applyInteractions=function(){t.prototype.applyInteractions.call(this);var e=this.view.get("interactions"),i=new p.LineActive({view:this.view});e.lineActive=i;var n=new p.LineSelect({view:this.view});e.lineSelect=n},e.prototype.parserEvents=function(e){t.prototype.parserEvents.call(this,h)},e.prototype.applyResponsive=function(t){var e=this,i=c.default[t];r.each(i,(function(t){t.method(e)}))},e}(o.default);e.default=d,a.registerPlotType("line",d)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=n.__importDefault(i(60)),a=n.__importDefault(i(130));e.default={main:r.default,mini:a.default}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=n.__importStar(i(7)),a=n.__importStar(i(0)),o=i(17),s=i(61),u=n.__importDefault(i(60)),l=r.Global.theme;function c(t,e,i){var n=[],r=[];a.each(t.points,(function(t){n.push(t[1]),r.push(t[0])})),r=e.parsePoints(r.reverse()),n=o.lineSimplification(e.parsePoints(n));var u=i?s.getSplinePath(n,!1,[[0,0],[1,1]]):h(n),l=h(r);return l[0][0]="L",u.concat(l)}function h(t){for(var e=[],i=0;i=o.x&&r<=s.x){var u=(s.y-o.y)/(s.x-o.x),l=o.y+u*(r-o.x);return[r,l]}}}(t,s,n);l.attr("x",e[0]),l.attr("y",e[1]);var i=function(t,e,i){var n=(e-i.start.y)/(i.end.y-i.start.y);return t.invert(n).toFixed(2)}(a,e[1],n);l.attr("text",i)}},e.duration,h,e.callback,c)}))},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=n.__importDefault(i(140)),a=n.__importDefault(i(157)),o=[{name:"responsiveAxis",method:r.default},{name:"responsivePointLabel",method:a.default}];e.default={preRender:[],afterRender:o}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1).__importDefault(i(32));e.default=function(t){var e=t.getResponsiveTheme(),i=t.canvas;new n.default({plot:t,responsiveTheme:e,dim:"x"}),new n.default({plot:t,responsiveTheme:e,dim:"y"}),i.draw()}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={type:"padding",usage:"assign",expression:function(t,e,i){return void 0===i&&(i={ratio:.6}),e.width*i.ratio}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1).__importStar(i(17));e.default={type:"group",usage:"compare",expression:function(t,e){var i=[t.topLeft,t.topRight,t.bottomRight,t.bottomLeft],r=[e.topLeft,e.topRight,e.bottomRight,e.bottomLeft],a=n.minDistBetweenConvexPolygon(i,r);return Math.round(a)>=2}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1).__importStar(i(17));e.default={type:"chain",usage:"compare",expression:function(t,e,i){void 0===i&&(i={value:4});var r=[t.topLeft,t.topRight,t.bottomRight,t.bottomLeft],a=[e.topLeft,e.topRight,e.bottomRight,e.bottomLeft],o=n.minDistBetweenConvexPolygon(r,a);return Math.round(o)>=i.value}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={type:"chain",usage:"compare",expression:function(t,e,i){void 0===i&&(i={value:5});var n=Math.abs(t.bottom-e.top);return Math.round(n)>=i.value}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={type:"padding",usage:"compare",expression:function(t,e,i){return void 0===i&&(i={ratio:.15}),t.width3?0:(t-t%10!=10)*t%10]}};var g={D:function(t){return t.getDate()},DD:function(t){return c(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return t.getDay()},dd:function(t){return c(t.getDay())},ddd:function(t,e){return e.dayNamesShort[t.getDay()]},dddd:function(t,e){return e.dayNames[t.getDay()]},M:function(t){return t.getMonth()+1},MM:function(t){return c(t.getMonth()+1)},MMM:function(t,e){return e.monthNamesShort[t.getMonth()]},MMMM:function(t,e){return e.monthNames[t.getMonth()]},YY:function(t){return c(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return c(t.getFullYear(),4)},h:function(t){return t.getHours()%12||12},hh:function(t){return c(t.getHours()%12||12)},H:function(t){return t.getHours()},HH:function(t){return c(t.getHours())},m:function(t){return t.getMinutes()},mm:function(t){return c(t.getMinutes())},s:function(t){return t.getSeconds()},ss:function(t){return c(t.getSeconds())},S:function(t){return Math.round(t.getMilliseconds()/100)},SS:function(t){return c(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return c(t.getMilliseconds(),3)},a:function(t,e){return t.getHours()<12?e.amPm[0]:e.amPm[1]},A:function(t,e){return t.getHours()<12?e.amPm[0].toUpperCase():e.amPm[1].toUpperCase()},ZZ:function(t){var e=t.getTimezoneOffset();return(e>0?"-":"+")+c(100*Math.floor(Math.abs(e)/60)+Math.abs(e)%60,4)}},v={D:["\\d\\d?",function(t,e){t.day=e}],Do:["\\d\\d?"+a,function(t,e){t.day=parseInt(e,10)}],M:["\\d\\d?",function(t,e){t.month=e-1}],YY:["\\d\\d?",function(t,e){var i=+(""+(new Date).getFullYear()).substr(0,2);t.year=""+(e>68?i-1:i)+e}],h:["\\d\\d?",function(t,e){t.hour=e}],m:["\\d\\d?",function(t,e){t.minute=e}],s:["\\d\\d?",function(t,e){t.second=e}],YYYY:["\\d{4}",function(t,e){t.year=e}],S:["\\d",function(t,e){t.millisecond=100*e}],SS:["\\d{2}",function(t,e){t.millisecond=10*e}],SSS:["\\d{3}",function(t,e){t.millisecond=e}],d:["\\d\\d?",s],ddd:[a,s],MMM:[a,l("monthNamesShort")],MMMM:[a,l("monthNames")],a:[a,function(t,e,i){var n=e.toLowerCase();n===i.amPm[0]?t.isPm=!1:n===i.amPm[1]&&(t.isPm=!0)}],ZZ:["[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z",function(t,e){var i,n=(e+"").match(/([+-]|\d\d)/gi);n&&(i=60*n[1]+parseInt(n[2],10),t.timezoneOffset="+"===n[0]?i:-i)}]};v.dd=v.d,v.dddd=v.ddd,v.DD=v.D,v.mm=v.m,v.hh=v.H=v.HH=v.h,v.MM=v.M,v.ss=v.s,v.A=v.a,n.masks={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},n.format=function(t,e,i){var a=i||n.i18n;if("number"==typeof t&&(t=new Date(t)),"[object Date]"!==Object.prototype.toString.call(t)||isNaN(t.getTime()))throw new Error("Invalid Date in fecha.format");e=n.masks[e]||e||n.masks.default;var s=[];return(e=(e=e.replace(o,(function(t,e){return s.push(e),"@@@"}))).replace(r,(function(e){return e in g?g[e](t,a):e.slice(1,e.length-1)}))).replace(/@@@/g,(function(){return s.shift()}))},n.parse=function(t,e,i){var a=i||n.i18n;if("string"!=typeof e)throw new Error("Invalid format in fecha.parse");if(e=n.masks[e]||e,t.length>1e3)return null;var s={},u=[],l=[];e=e.replace(o,(function(t,e){return l.push(e),"@@@"}));var c,h=(c=e,c.replace(/[|\\{()[^$+*?.-]/g,"\\$&")).replace(r,(function(t){if(v[t]){var e=v[t];return u.push(e[1]),"("+e[0]+")"}return t}));h=h.replace(/@@@/g,(function(){return l.shift()}));var p=t.match(new RegExp(h,"i"));if(!p)return null;for(var f=1;f90&&t<=180)return 180-t;if(t>180&&t<270)return t-180;return 360-t}(u);var l=Math.abs(t.centerX-e.centerX),c=Math.abs(t.centerY-e.centerY);u>45?i="x":u<45&&(i="y");return{dir:i,distX:l,distY:c}}(a[i],a[i+1]),s=o.dir,u=(o.distX,o.distY,t.get("startPoint"));"x"===s&&t.attr("y",u.y+20)}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1).__importStar(i(0)),r=i(66);e.default=function(t,e,i,a){var o=a.nodes.nodes;if(0!==i){var s=o[i],u=o[i-1];if(r.isNodeOverlap(s,u)){var l=a.plot.plot.get("elements")[0],c=u.top-s.height/2;if(c-10>a.region.top){var h=s.shape.get("origin"),p=function(t,e){var i;return n.each(e,(function(e){var n=e;n.id===t&&(i=n)})),i}(l.getShapeId(h),l.getShapes()).get("box"),f=p.left+p.width/2,d=p.top,g=l.get("labelController").labelsContainer.addShape("path",{attrs:{path:[["M",f,d],["L",s.shape.attr("x"),c]],stroke:"#ccc",lineWidth:1}}),v={x:t.attr("x"),y:t.attr("y")};s.shape.attr("y",c-10),o[i]=a.nodes.measure(s.shape),o[i].line=g,o[i].origin_position=v}}}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(69),a=n.__importDefault(i(23));e.default=function(t,e,i,n){var o=n.nodes.nodes;r.isKeep(e.keep,i,o)||t.attr("text")!==t.get("origin").text&&a.default(t)}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=n.__importStar(i(0)),a=n.__importDefault(i(23));e.default=function(t,e,i,n){var o=n.nodes.nodes,s=function(t){var e=r.deepMix([],t);return e.sort((function(t,e){return e.width-t.width})),Math.round(e[0].width)}(o);if(!(i<=1)){var u=o[i],l=function(t,e){for(var i=t-1;i>0;i--){var n=e[i];if(!n.shape.get("blank"))return n}}(i,o),c=l.centerX-u.centerX,h=l.centerY-u.centerY;Math.sqrt(c*c+h*h)=n.minY&&i.maxY<=n.maxY){var r=e.attr("fill"),a=e.attr("opacity")?e.attr("opacity"):1,s=o.rgb2arr(r),u=Math.round(.299*s[0]+.587*s[1]+.114*s[2])/a,l=this._mappingColor([{from:0,to:85,color:"white"},{from:85,to:170,color:"#F6F6F6"},{from:170,to:255,color:"black"}],u);t.attr("fill",l)}else i.maxY=n.from&&ex&&e.splice(x,e.length-x),e.sort((function(t,e){return t.y-e.y})),t._antiCollision(e)})),this.view.get("canvas").draw()}},t.prototype.clear=function(){this.container&&this.container.clear()},t.prototype._init=function(){var t=this;this.view.on("beforerender",(function(){t.clear()})),this.view.on("afterrender",(function(){t.draw()}))},t.prototype._antiCollision=function(t){var e,i=this,n=this.view.get("coord"),r=n.getHeight(),a=n.center,o=n.getRadius(),s=a.y-o-15-this.config.lineHeight,u=!0,l=r,c=0,h=Number.MIN_VALUE,p=0,f=t.map((function(t){var e=t.y;e>c&&(c=e),e=p&&(p=n),{size:i.config.lineHeight,targets:[e-s]}}));c-s>l&&(l=c-s);for(;u;)for(f.forEach((function(t){var e=(Math.min.apply(h,t.targets)+Math.max.apply(h,t.targets))/2;t.pos=Math.min(Math.max(h,e-t.size/2),l-t.size)})),u=!1,e=f.length;e--;)if(e>0){var d=f[e-1],g=f[e];d.pos+d.size>g.pos&&(d.size+=g.size,d.targets=d.targets.concat(g.targets),d.pos+d.size>l&&(d.pos=l-d.size),f.splice(e,1),u=!0)}e=0,f.forEach((function(n){var r=s;n.targets.forEach((function(){t[e].y=n.pos+r+i.config.lineHeight/2,r+=i.config.lineHeight,e++}))}));var v=[];t.forEach((function(t){var e=i._drawLabel(t);i.container.add(e),i._drawLabelLine(t,p),v.push(e)}))},t.prototype._drawLabel=function(t){var e=this,i=this.width,n=t.y,r=t.textGroup,a=r.get("children"),o="left"===t._side?1:-1,s={textAlign:t._side,x:"left"===t._side?this.config.sidePadding:i-this.config.sidePadding};return this.offsetX&&(s.x+=this.offsetX*o),a.forEach((function(t){var i=t.get("offsetY"),r=e.offsetY?n+i*e.offsetY:n;t.attr(s),t.attr("y",r)})),r},t.prototype._drawLabelLine=function(t,e){var i=[t._anchor.x,t._anchor.y],n=[t._inflection.x,t._inflection.y],r=t.fill,a=t.y,o=["left"===t._side?this.config.sidePadding:this.width-this.config.sidePadding,a],s=[i,n,o];if(n[1]!==a)if(n[1]u[0])&&(s=[i,p,o])}else s=[i,[n[0],a],o];for(var f=[],d=0;d'+n+""),document.getElementsByClassName(e.centralClass)[0].innerHTML=n}))}},e.prototype.geometryParser=function(t,e){return"g2"===t?c[e]:h[e]},e.prototype.coord=function(){var t=this.options,e={type:"theta",cfg:{radius:t.radius,innerRadius:t.innerRadius}};this.setConfig("coord",e)},e.prototype.annotation=function(){var t=this,e=this.options;if(e.annotation){var i=[];r.each(e.annotation,(function(e){if("centralText"===e.type){var n=t.drawCentralText(e);i.push(n),t.centralText=n}})),this.setConfig("annotations",i)}},e.prototype.parserEvents=function(e){t.prototype.parserEvents.call(this,l)},e.prototype.drawCentralText=function(t){var e,i,n=this.options,r={type:"html",top:!0,position:["50%","50%"],onActive:!1};if(t.content)e=t.content;else{var a=n.data[0];e=this.parseCentralTextData(a)}return i=t.htmlContent?t.htmlContent(e):this.getCentralTextTemplate(e),r.html=i,t.onActive&&(r.onActive=t.onActive,this.setConfig("tooltip",!1)),r},e.prototype.parseCentralTextData=function(t){var e=this.options,i=e.angleField;return e.colorField?{name:t[e.colorField],value:t[i]}:t[i]},e.prototype.getCentralTextTemplate=function(t){var e;if(r.isString(t))e=u.getSingleDataTemplate(t,this.centralClass);else if(r.isObject(t)&&2===r.keys(t).length){var i=t;e=u.getTwoDataTemplate(i.name,i.value,this.centralClass)}return e},e.prototype.applyResponsive=function(t){var e=this,i=s.default[t];r.each(i,(function(t){t.method(e)}))},e.centralId=0,e}(o.default);e.default=p,a.registerPlotType("ring",p)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=[{name:"responsiveRing",method:i(1).__importDefault(i(211)).default}];e.default={preRender:n}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(20),a=n.__importDefault(i(74)),o=n.__importDefault(i(33));e.default=function(t){var e=t.options,i=t.getResponsiveTheme(),n=e.padding,s=e.radius?e.radius:1,u=t.width,l=t.height,c={radius:s,coord:new(r.getCoordinate("polar"))({radius:s,start:{x:n[3],y:n[0]},end:{x:u-n[1],y:l-n[2]}})},h=new a.default({nodes:[{name:"innerRadius",value:0}]}),p=i.ring.constraints;new o.default({nodes:h,constraints:p,region:c,plot:t,onEnd:function(){e.innerRadius=h.nodes[0].value}})}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});i(27).registerResponsiveTheme("ring",{ring:{constraints:[{name:"ringThickness"},{name:"minRingThickness"}]}})},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n="color:#8c8c8c;font-size:14px;text-align:center;line-height:2;font-family:'-apple-system',BlinkMacSystemFont,'SegoeUI',Roboto,'HelveticaNeue',Helvetica,'PingFangSC','HiraginoSansGB','MicrosoftYaHei',SimSun,'sans-serif';",r="font-weight:300;",a="font-size:20px;font-weight:bold;color:#4D4D4D";e.getSingleDataTemplate=function(t,e){return'

            { const bannerButtons = [ { text: t('图表示例'), - link: '/examples/point/basic', + link: `/${i18n.language}/examples/gallery/basic`, type: 'primary', }, { text: t('下载使用'), - link: '/docs/API/L7', + link: `/${i18n.language}/docs/api/l7`, }, ]; @@ -59,7 +59,7 @@ const IndexPage = () => { logo:'https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*gjBmT56SDgsAAAAAAAAAAABkARQnAQ', title: t('浅色色板'), description: t('一个个真实的数据可视化案例,复杂的地理数据,简单,易用的API接口,让用户达到开箱即用的效果。'), - link: 'https://antvis.github.io/L7/zh/examples/gallery/basic', + link: `/${i18n.language}/examples/gallery/basic`, image: 'https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*8Pa8Toh3-OsAAAAAAAAAAABkARQnAQ', }, @@ -67,7 +67,7 @@ const IndexPage = () => { logo:'https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*gjBmT56SDgsAAAAAAAAAAABkARQnAQ', title: t('深色色板'), description: t('一个个真实的数据可视化案例,复杂的地理数据,简单,易用的API接口,让用户达到开箱即用的效果.'), - link: 'https://antvis.github.io/L7/zh/examples/gallery/basic', + link: `/${i18n.language}/examples/gallery/basic`, image: 'https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*ryTVQ49K8SkAAAAAAAAAAABkARQnAQ', } @@ -83,7 +83,7 @@ const IndexPage = () => { src="https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*VcojS5aWhMYAAAAAAAAAAABkARQnAQ" /> } - title={t('L7 地理空间可视化引擎')} + title={t('L7 地理空间数据可视分析引擎')} description={t( 'L7 是由蚂蚁金服 AntV 数据可视化团队推出的基于WebGL的开源大规模地理空间数据可视分析开发框架。', )} diff --git a/yarn.lock b/yarn.lock index 7db3944c1e..b7df42b23b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -89,9 +89,9 @@ wolfy87-eventemitter "~5.1.0" "@antv/gatsby-theme-antv@^0.9.52": - version "0.9.69" - resolved "https://registry.npm.alibaba-inc.com/@antv/gatsby-theme-antv/download/@antv/gatsby-theme-antv-0.9.69.tgz#039e5b13ebf0c77ab28265b07566a98a2dd60489" - integrity sha1-A55bE+vwx3qygmWwdWapii3WBIk= + version "0.9.77" + resolved "https://registry.npm.alibaba-inc.com/@antv/gatsby-theme-antv/download/@antv/gatsby-theme-antv-0.9.77.tgz#5cec145937992759c1df3dce547a9a6054758620" + integrity sha1-XOwUWTeZJ1nB3z3OVHqaYFR1hiA= dependencies: "@babel/plugin-transform-modules-umd" "^7.2.0" "@babel/preset-env" "^7.6.3" @@ -126,9 +126,10 @@ gatsby-plugin-manifest "^2.2.16" gatsby-plugin-meta-redirect "^1.1.1" gatsby-plugin-nprogress "^2.1.12" - gatsby-plugin-offline "^3.0.7" + gatsby-plugin-offline "^3.0.22" gatsby-plugin-page-creator "^2.1.25" gatsby-plugin-react-helmet "^3.1.7" + gatsby-plugin-remove-serviceworker "^1.0.0" gatsby-plugin-remove-trailing-slashes "^2.1.9" gatsby-plugin-sharp "^2.2.22" gatsby-plugin-typescript "^2.1.8" @@ -173,6 +174,7 @@ slick-carousel "^1.8.1" ts-jest "^24.1.0" typescript "^3.6.3" + video-react "^0.14.1" "@antv/gl-matrix@^2.7.1", "@antv/gl-matrix@~2.7.1": version "2.7.1" @@ -3724,16 +3726,11 @@ dependencies: "@types/lodash" "*" -"@types/lodash@*": +"@types/lodash@*", "@types/lodash@^4.14.138": version "4.14.149" resolved "https://registry.npm.alibaba-inc.com/@types/lodash/download/@types/lodash-4.14.149.tgz#1342d63d948c6062838fbf961012f74d4e638440" integrity sha1-E0LWPZSMYGKDj7+WEBL3TU5jhEA= -"@types/lodash@^4.14.138": - version "4.14.148" - resolved "https://registry.npm.alibaba-inc.com/@types/lodash/download/@types/lodash-4.14.148.tgz#ffa2786721707b335c6aa1465e6d3d74016fbd3e" - integrity sha1-/6J4ZyFwezNcaqFGXm09dAFvvT4= - "@types/mapbox-gl@^0.54.3": version "0.54.5" resolved "https://registry.npm.alibaba-inc.com/@types/mapbox-gl/download/@types/mapbox-gl-0.54.5.tgz#d50285796cb9d3544121d9e2b5314da99f9774bf" @@ -3751,16 +3748,11 @@ resolved "https://registry.npm.alibaba-inc.com/@types/mkdirp/download/@types/mkdirp-0.3.29.tgz#7f2ad7ec55f914482fc9b1ec4bb1ae6028d46066" integrity sha1-fyrX7FX5FEgvybHsS7GuYCjUYGY= -"@types/node@*", "@types/node@>= 8": +"@types/node@*", "@types/node@>= 8", "@types/node@^12.0.2", "@types/node@^12.7.3": version "12.12.9" resolved "https://registry.npm.alibaba-inc.com/@types/node/download/@types/node-12.12.9.tgz#0b5ae05516b757cbff2e82c04500190aef986c7b" integrity sha1-C1rgVRa3V8v/LoLARQAZCu+YbHs= -"@types/node@^12.0.2", "@types/node@^12.7.3": - version "12.12.8" - resolved "https://registry.npm.alibaba-inc.com/@types/node/download/@types/node-12.12.8.tgz#dab418655af39ce2fa99286a0bed21ef8072ac9d" - integrity sha1-2rQYZVrznOL6mShqC+0h74ByrJ0= - "@types/node@^7.0.11": version "7.10.9" resolved "https://registry.npm.alibaba-inc.com/@types/node/download/@types/node-7.10.9.tgz#4343e3b009f8cf5e1ed685e36097b74b4101e880" @@ -4894,20 +4886,7 @@ autocomplete.js@0.36.0: dependencies: immediate "^3.2.3" -autoprefixer@^9.0.0, autoprefixer@^9.4.9: - version "9.7.1" - resolved "https://registry.npm.alibaba-inc.com/autoprefixer/download/autoprefixer-9.7.1.tgz#9ffc44c55f5ca89253d9bb7186cefb01ef57747f" - integrity sha1-n/xExV9cqJJT2btxhs77Ae9XdH8= - dependencies: - browserslist "^4.7.2" - caniuse-lite "^1.0.30001006" - chalk "^2.4.2" - normalize-range "^0.1.2" - num2fraction "^1.2.2" - postcss "^7.0.21" - postcss-value-parser "^4.0.2" - -autoprefixer@^9.7.1: +autoprefixer@^9.0.0, autoprefixer@^9.4.9, autoprefixer@^9.7.1: version "9.7.2" resolved "https://registry.npm.alibaba-inc.com/autoprefixer/download/autoprefixer-9.7.2.tgz#26cf729fbb709323b40171a874304884dcceffed" integrity sha1-Js9yn7twkyO0AXGodDBIhNzO/+0= @@ -6269,16 +6248,11 @@ caniuse-api@^3.0.0: lodash.memoize "^4.1.2" lodash.uniq "^4.5.0" -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000844, caniuse-lite@^1.0.30001006, caniuse-lite@^1.0.30001010: +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000844, caniuse-lite@^1.0.30000989, caniuse-lite@^1.0.30001010: version "1.0.30001010" resolved "https://registry.npm.alibaba-inc.com/caniuse-lite/download/caniuse-lite-1.0.30001010.tgz#397a14034d384260453cc81994f494626d34b938" integrity sha1-OXoUA004QmBFPMgZlPSUYm00uTg= -caniuse-lite@^1.0.30000989: - version "1.0.30001009" - resolved "https://registry.npm.alibaba-inc.com/caniuse-lite/download/caniuse-lite-1.0.30001009.tgz#69b77997b882a7aee6af24c8d7d2fa27ee41f348" - integrity sha1-abd5l7iCp67mryTI19L6J+5B80g= - capture-exit@^2.0.0: version "2.0.0" resolved "https://registry.npm.alibaba-inc.com/capture-exit/download/capture-exit-2.0.0.tgz#fb953bfaebeb781f62898239dabb426d08a509a4" @@ -7106,9 +7080,9 @@ conventional-changelog-preset-loader@^2.1.1: integrity sha1-WA+oqwLO8iwkKU0l5S18zSR6mmo= conventional-changelog-writer@^4.0.6: - version "4.0.10" - resolved "https://registry.npm.alibaba-inc.com/conventional-changelog-writer/download/conventional-changelog-writer-4.0.10.tgz#39f6458cca62a8151b3ce582a57ff71fd2b0ff7a" - integrity sha1-OfZFjMpiqBUbPOWCpX/3H9Kw/3o= + version "4.0.11" + resolved "https://registry.npm.alibaba-inc.com/conventional-changelog-writer/download/conventional-changelog-writer-4.0.11.tgz#9f56d2122d20c96eb48baae0bf1deffaed1edba4" + integrity sha1-n1bSEi0gyW60i6rgvx3v+u0e26Q= dependencies: compare-func "^1.3.1" conventional-commits-filter "^2.0.2" @@ -7116,7 +7090,7 @@ conventional-changelog-writer@^4.0.6: handlebars "^4.4.0" json-stringify-safe "^5.0.1" lodash "^4.17.15" - meow "^4.0.0" + meow "^5.0.0" semver "^6.0.0" split "^1.0.0" through2 "^3.0.0" @@ -7148,14 +7122,14 @@ conventional-commits-parser@^2.1.0: trim-off-newlines "^1.0.0" conventional-commits-parser@^3.0.3: - version "3.0.7" - resolved "https://registry.npm.alibaba-inc.com/conventional-commits-parser/download/conventional-commits-parser-3.0.7.tgz#55b6cde6a2d0b4a7ab399392777d527134a8d05c" - integrity sha1-VbbN5qLQtKerOZOSd31ScTSo0Fw= + version "3.0.8" + resolved "https://registry.npm.alibaba-inc.com/conventional-commits-parser/download/conventional-commits-parser-3.0.8.tgz#23310a9bda6c93c874224375e72b09fb275fe710" + integrity sha1-IzEKm9psk8h0IkN15ysJ+ydf5xA= dependencies: JSONStream "^1.0.4" is-text-path "^1.0.1" lodash "^4.17.15" - meow "^4.0.0" + meow "^5.0.0" split2 "^2.0.0" through2 "^3.0.0" trim-off-newlines "^1.0.0" @@ -7857,28 +7831,28 @@ d3-color@1, d3-color@^1.4.0: integrity sha1-icRamV7Xc7EzFPBkYN8m1gug7K8= d3-dispatch@1: - version "1.0.5" - resolved "https://registry.npm.alibaba-inc.com/d3-dispatch/download/d3-dispatch-1.0.5.tgz#e25c10a186517cd6c82dd19ea018f07e01e39015" - integrity sha1-4lwQoYZRfNbILdGeoBjwfgHjkBU= + version "1.0.6" + resolved "https://registry.npm.alibaba-inc.com/d3-dispatch/download/d3-dispatch-1.0.6.tgz#00d37bcee4dd8cd97729dd893a0ac29caaba5d58" + integrity sha1-ANN7zuTdjNl3Kd2JOgrCnKq6XVg= d3-dsv@^1.1.1: - version "1.1.1" - resolved "https://registry.npm.alibaba-inc.com/d3-dsv/download/d3-dsv-1.1.1.tgz#aaa830ecb76c4b5015572c647cc6441e3c7bb701" - integrity sha1-qqgw7LdsS1AVVyxkfMZEHjx7twE= + version "1.2.0" + resolved "https://registry.npm.alibaba-inc.com/d3-dsv/download/d3-dsv-1.2.0.tgz#9d5f75c3a5f8abd611f74d3f5847b0d4338b885c" + integrity sha1-nV91w6X4q9YR900/WEew1DOLiFw= dependencies: commander "2" iconv-lite "0.4" rw "1" d3-ease@1, d3-ease@~1.0.3: - version "1.0.5" - resolved "https://registry.npm.alibaba-inc.com/d3-ease/download/d3-ease-1.0.5.tgz#8ce59276d81241b1b72042d6af2d40e76d936ffb" - integrity sha1-jOWSdtgSQbG3IELWry1A522Tb/s= + version "1.0.6" + resolved "https://registry.npm.alibaba-inc.com/d3-ease/download/d3-ease-1.0.6.tgz#ebdb6da22dfac0a22222f2d4da06f66c416a0ec0" + integrity sha1-69ttoi36wKIiIvLU2gb2bEFqDsA= d3-format@1: - version "1.4.1" - resolved "https://registry.npm.alibaba-inc.com/d3-format/download/d3-format-1.4.1.tgz#c45f74b17c5a290c072a4ba7039dd19662cd5ce6" - integrity sha1-xF90sXxaKQwHKkunA53RlmLNXOY= + version "1.4.2" + resolved "https://registry.npm.alibaba-inc.com/d3-format/download/d3-format-1.4.2.tgz#2a8c0ebf500f315981c2110eaaf70b82f472cb2b" + integrity sha1-KowOv1APMVmBwhEOqvcLgvRyyys= d3-hexbin@^0.2.2: version "0.2.2" @@ -7886,9 +7860,9 @@ d3-hexbin@^0.2.2: integrity sha1-nFg32s/UcasFM3qeke8Qv8T5iDE= d3-interpolate@1: - version "1.3.2" - resolved "https://registry.npm.alibaba-inc.com/d3-interpolate/download/d3-interpolate-1.3.2.tgz#417d3ebdeb4bc4efcc8fd4361c55e4040211fd68" - integrity sha1-QX0+vetLxO/Mj9Q2HFXkBAIR/Wg= + version "1.3.3" + resolved "https://registry.npm.alibaba-inc.com/d3-interpolate/download/d3-interpolate-1.3.3.tgz#cef4ba06dfccebcc45e4ae9d4d836a931a945076" + integrity sha1-zvS6Bt/M68xF5K6dTYNqkxqUUHY= dependencies: d3-color "1" @@ -7911,14 +7885,14 @@ d3-scale@^3.1.0: d3-time-format "2" d3-selection@^1.0.2, d3-selection@^1.1.0: - version "1.4.0" - resolved "https://registry.npm.alibaba-inc.com/d3-selection/download/d3-selection-1.4.0.tgz#ab9ac1e664cf967ebf1b479cc07e28ce9908c474" - integrity sha1-q5rB5mTPln6/G0ecwH4ozpkIxHQ= + version "1.4.1" + resolved "https://registry.npm.alibaba-inc.com/d3-selection/download/d3-selection-1.4.1.tgz#98eedbbe085fbda5bafa2f9e3f3a2f4d7d622a98" + integrity sha1-mO7bvghfvaW6+i+ePzovTX1iKpg= d3-time-format@2: - version "2.2.1" - resolved "https://registry.npm.alibaba-inc.com/d3-time-format/download/d3-time-format-2.2.1.tgz#971f66aae3b8fb268040494986f41512d4d4dca6" - integrity sha1-lx9mquO4+yaAQElJhvQVEtTU3KY= + version "2.2.2" + resolved "https://registry.npm.alibaba-inc.com/d3-time-format/download/d3-time-format-2.2.2.tgz#187597ffc6a0f37cb36bb7a1d7167cdc887ecda0" + integrity sha1-GHWX/8ag83yza7eh1xZ83Ih+zaA= dependencies: d3-time "1" @@ -7928,14 +7902,14 @@ d3-time@1: integrity sha1-seGdMH2unJALflsl/8XcwkmooPE= d3-timer@1, d3-timer@~1.0.6: - version "1.0.9" - resolved "https://registry.npm.alibaba-inc.com/d3-timer/download/d3-timer-1.0.9.tgz#f7bb8c0d597d792ff7131e1c24a36dd471a471ba" - integrity sha1-97uMDVl9eS/3Ex4cJKNt1HGkcbo= + version "1.0.10" + resolved "https://registry.npm.alibaba-inc.com/d3-timer/download/d3-timer-1.0.10.tgz#dfe76b8a91748831b13b6d9c793ffbd508dd9de5" + integrity sha1-3+dripF0iDGxO22ceT/71QjdneU= d3-transition@^1.0.1: - version "1.2.0" - resolved "https://registry.npm.alibaba-inc.com/d3-transition/download/d3-transition-1.2.0.tgz#f538c0e21b2aa1f05f3e965f8567e81284b3b2b8" - integrity sha1-9TjA4hsqofBfPpZfhWfoEoSzsrg= + version "1.3.2" + resolved "https://registry.npm.alibaba-inc.com/d3-transition/download/d3-transition-1.3.2.tgz#a98ef2151be8d8600543434c1ca80140ae23b398" + integrity sha1-qY7yFRvo2GAFQ0NMHKgBQK4js5g= dependencies: d3-color "1" d3-dispatch "1" @@ -8538,9 +8512,9 @@ dom-scroll-into-view@1.x, dom-scroll-into-view@^1.2.0, dom-scroll-into-view@^1.2 integrity sha1-6PNnMt0ImwIBqI14Fdw/iObWbH4= dom-serializer@0: - version "0.2.1" - resolved "https://registry.npm.alibaba-inc.com/dom-serializer/download/dom-serializer-0.2.1.tgz#13650c850daffea35d8b626a4cfc4d3a17643fdb" - integrity sha1-E2UMhQ2v/qNdi2JqTPxNOhdkP9s= + version "0.2.2" + resolved "https://registry.npm.alibaba-inc.com/dom-serializer/download/dom-serializer-0.2.2.tgz#1afb81f533717175d478655debc5e332d9f9bb51" + integrity sha1-GvuB9TNxcXXUeGVd68XjMtn5u1E= dependencies: domelementtype "^2.0.1" entities "^2.0.0" @@ -8744,9 +8718,9 @@ ee-first@1.1.1: integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= ejs@^2.6.1: - version "2.7.2" - resolved "https://registry.npm.alibaba-inc.com/ejs/download/ejs-2.7.2.tgz#749037c4c09bd57626a6140afbe6b7e650661614" - integrity sha1-dJA3xMCb1XYmphQK++a35lBmFhQ= + version "2.7.3" + resolved "https://registry.npm.alibaba-inc.com/ejs/download/ejs-2.7.3.tgz#4f437b3992ea0e0757f0ab8d7f29e42593498927" + integrity sha1-T0N7OZLqDgdX8KuNfynkJZNJiSc= electron-to-chromium@^1.3.247, electron-to-chromium@^1.3.306, electron-to-chromium@^1.3.47: version "1.3.306" @@ -10477,7 +10451,7 @@ fuse.js@^3.4.4: resolved "https://registry.npm.alibaba-inc.com/fuse.js/download/fuse.js-3.4.5.tgz#8954fb43f9729bd5dbcb8c08f251db552595a7a6" integrity sha1-iVT7Q/lym9Xby4wI8lHbVSWVp6Y= -gatsby-cli@^2.8.11, gatsby-cli@^2.8.12: +gatsby-cli@^2.8.12: version "2.8.12" resolved "https://registry.npm.alibaba-inc.com/gatsby-cli/download/gatsby-cli-2.8.12.tgz#e1d870a15258003b3ee6db68a24d5b6bc9d4368d" integrity sha1-4dhwoVJYADs+5ttook1ba8nUNo0= @@ -10525,7 +10499,7 @@ gatsby-cli@^2.8.11, gatsby-cli@^2.8.12: ink "^2.5.0" ink-spinner "^3.0.1" -gatsby-core-utils@^1.0.19, gatsby-core-utils@^1.0.20: +gatsby-core-utils@^1.0.20: version "1.0.20" resolved "https://registry.npm.alibaba-inc.com/gatsby-core-utils/download/gatsby-core-utils-1.0.20.tgz#f4788c2591fa7165c87f0ee5e8edf664c91978ea" integrity sha1-9HiMJZH6cWXIfw7l6O32ZMkZeOo= @@ -10594,20 +10568,13 @@ gatsby-plugin-copy-files@^1.0.3: dependencies: fs-extra "^4.0.0" -gatsby-plugin-google-analytics@^2.1.16: +gatsby-plugin-google-analytics@^2.1.16, gatsby-plugin-google-analytics@^2.1.27: version "2.1.28" resolved "https://registry.npm.alibaba-inc.com/gatsby-plugin-google-analytics/download/gatsby-plugin-google-analytics-2.1.28.tgz#3f3b5105a1d47e3f07b1d4a4383e5173f483534c" integrity sha1-PztRBaHUfj8HsdSkOD5Rc/SDU0w= dependencies: "@babel/runtime" "^7.7.2" -gatsby-plugin-google-analytics@^2.1.27: - version "2.1.27" - resolved "https://registry.npm.alibaba-inc.com/gatsby-plugin-google-analytics/download/gatsby-plugin-google-analytics-2.1.27.tgz#adbf24bb971ce3fb67ecdc3dcec36b833ff70abc" - integrity sha1-rb8ku5cc4/tn7Nw9zsNrgz/3Crw= - dependencies: - "@babel/runtime" "^7.7.2" - gatsby-plugin-i18n@^1.0.1: version "1.0.1" resolved "https://registry.npm.alibaba-inc.com/gatsby-plugin-i18n/download/gatsby-plugin-i18n-1.0.1.tgz#573fb98b85654c29e0cda50740037061fa38e694" @@ -10657,7 +10624,7 @@ gatsby-plugin-nprogress@^2.1.12: "@babel/runtime" "^7.7.2" nprogress "^0.2.0" -gatsby-plugin-offline@^3.0.7: +gatsby-plugin-offline@^3.0.22: version "3.0.22" resolved "https://registry.npm.alibaba-inc.com/gatsby-plugin-offline/download/gatsby-plugin-offline-3.0.22.tgz#a8fb03e4d6abbd8cc14a03a9427424734675d484" integrity sha1-qPsD5NarvYzBSgOpQnQkc0Z11IQ= @@ -10670,7 +10637,7 @@ gatsby-plugin-offline@^3.0.7: lodash "^4.17.15" workbox-build "^4.3.1" -gatsby-plugin-page-creator@^2.1.25, gatsby-plugin-page-creator@^2.1.30, gatsby-plugin-page-creator@^2.1.31: +gatsby-plugin-page-creator@^2.1.25, gatsby-plugin-page-creator@^2.1.31: version "2.1.31" resolved "https://registry.npm.alibaba-inc.com/gatsby-plugin-page-creator/download/gatsby-plugin-page-creator-2.1.31.tgz#21554d125d5bd333b5307ea12ece7da297a8eb89" integrity sha1-IVVNEl1b0zO1MH6hLs59opeo64k= @@ -10690,6 +10657,11 @@ gatsby-plugin-react-helmet@^3.1.7: dependencies: "@babel/runtime" "^7.7.2" +gatsby-plugin-remove-serviceworker@^1.0.0: + version "1.0.0" + resolved "https://registry.npm.alibaba-inc.com/gatsby-plugin-remove-serviceworker/download/gatsby-plugin-remove-serviceworker-1.0.0.tgz#9fb433bc8bd766e14e1d3711c4ac6f051e1dff7c" + integrity sha1-n7QzvIvXZuFOHTcRxKxvBR4d/3w= + gatsby-plugin-remove-trailing-slashes@^2.1.9: version "2.1.14" resolved "https://registry.npm.alibaba-inc.com/gatsby-plugin-remove-trailing-slashes/download/gatsby-plugin-remove-trailing-slashes-2.1.14.tgz#3895e8559f12e740284f70a45da0bdbdcab9a597" @@ -10823,7 +10795,7 @@ gatsby-source-github@^0.0.2: lodash "~4.17.5" yup "~0.24.1" -gatsby-telemetry@^1.1.37, gatsby-telemetry@^1.1.38: +gatsby-telemetry@^1.1.38: version "1.1.38" resolved "https://registry.npm.alibaba-inc.com/gatsby-telemetry/download/gatsby-telemetry-1.1.38.tgz#e8ac949565b87e37699ccbd067f55cc2fe62793e" integrity sha1-6KyUlWW4fjdpnMvQZ/Vcwv5ieT4= @@ -10887,9 +10859,9 @@ gatsby-transformer-sharp@^2.2.14: sharp "^0.23.2" gatsby@^2.15.16: - version "2.17.17" - resolved "https://registry.npm.alibaba-inc.com/gatsby/download/gatsby-2.17.17.tgz#f0999ce134d9abc8f29fc783abe90f69d3b08269" - integrity sha1-8Jmc4TTZq8jyn8eDq+kPadOwgmk= + version "2.18.0" + resolved "https://registry.npm.alibaba-inc.com/gatsby/download/gatsby-2.18.0.tgz#d21e4f0f56006bff913c940e79732db4e42ea319" + integrity sha1-0h5PD1YAa/+RPJQOeXMttOQuoxk= dependencies: "@babel/code-frame" "^7.5.5" "@babel/core" "^7.7.2" @@ -11024,9 +10996,9 @@ gatsby@^2.15.16: yaml-loader "^0.5.0" gatsby@^2.17.7: - version "2.17.15" - resolved "https://registry.npm.alibaba-inc.com/gatsby/download/gatsby-2.17.15.tgz#731e44f4292256889f374d434d56ace29ac2cfec" - integrity sha1-cx5E9CkiVoifN01DTVas4prCz+w= + version "2.17.17" + resolved "https://registry.npm.alibaba-inc.com/gatsby/download/gatsby-2.17.17.tgz#f0999ce134d9abc8f29fc783abe90f69d3b08269" + integrity sha1-8Jmc4TTZq8jyn8eDq+kPadOwgmk= dependencies: "@babel/code-frame" "^7.5.5" "@babel/core" "^7.7.2" @@ -11088,13 +11060,13 @@ gatsby@^2.17.7: flat "^4.1.0" fs-exists-cached "1.0.0" fs-extra "^8.1.0" - gatsby-cli "^2.8.11" - gatsby-core-utils "^1.0.19" + gatsby-cli "^2.8.12" + gatsby-core-utils "^1.0.20" gatsby-graphiql-explorer "^0.2.28" gatsby-link "^2.2.24" - gatsby-plugin-page-creator "^2.1.30" + gatsby-plugin-page-creator "^2.1.31" gatsby-react-router-scroll "^2.1.16" - gatsby-telemetry "^1.1.37" + gatsby-telemetry "^1.1.38" glob "^7.1.6" got "8.3.2" graphql "^14.5.8" @@ -11139,7 +11111,7 @@ gatsby@^2.17.7: shallow-compare "^1.2.2" sift "^5.1.0" signal-exit "^3.0.2" - slash "^3.0.0" + slugify "^1.3.6" socket.io "^2.3.0" stack-trace "^0.0.10" string-similarity "^1.2.2" @@ -11945,9 +11917,9 @@ handle-thing@^2.0.0: integrity sha1-DgOWlf9QyT/CiFV9aW88HcZ3Z1Q= handlebars@^4.1.2, handlebars@^4.4.0: - version "4.5.2" - resolved "https://registry.npm.alibaba-inc.com/handlebars/download/handlebars-4.5.2.tgz#5a4eb92ab5962ca3415ac188c86dc7f784f76a0f" - integrity sha1-Wk65KrWWLKNBWsGIyG3H94T3ag8= + version "4.5.3" + resolved "https://registry.npm.alibaba-inc.com/handlebars/download/handlebars-4.5.3.tgz#5cf75bd8714f7605713511a56be7c349becb0482" + integrity sha1-XPdb2HFPdgVxNRGla+fDSb7LBII= dependencies: neo-async "^2.6.0" optimist "^0.6.1" @@ -12496,9 +12468,9 @@ humps@^2.0.1: integrity sha1-3QLqYIG9BWjcXQcxhEY5V7qe+ao= husky@^3.0.9: - version "3.0.9" - resolved "https://registry.npm.alibaba-inc.com/husky/download/husky-3.0.9.tgz#a2c3e9829bfd6b4957509a9500d2eef5dbfc8044" - integrity sha1-osPpgpv9a0lXUJqVANLu9dv8gEQ= + version "3.1.0" + resolved "https://registry.npm.alibaba-inc.com/husky/download/husky-3.1.0.tgz#5faad520ab860582ed94f0c1a77f0f04c90b57c0" + integrity sha1-X6rVIKuGBYLtlPDBp38PBMkLV8A= dependencies: chalk "^2.4.2" ci-info "^2.0.0" @@ -18122,7 +18094,7 @@ postcss@^6.0.0, postcss@^6.0.1, postcss@^6.0.2, postcss@^6.0.23, postcss@^6.0.8: source-map "^0.6.1" supports-color "^5.4.0" -postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.21, postcss@^7.0.23, postcss@^7.0.5: +postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.13, postcss@^7.0.14, postcss@^7.0.16, postcss@^7.0.17, postcss@^7.0.18, postcss@^7.0.2, postcss@^7.0.23, postcss@^7.0.5, postcss@^7.0.6, postcss@^7.0.7: version "7.0.23" resolved "https://registry.npm.alibaba-inc.com/postcss/download/postcss-7.0.23.tgz#9f9759fad661b15964f3cfc3140f66f1e05eadc1" integrity sha1-n5dZ+tZhsVlk88/DFA9m8eBercE= @@ -18131,15 +18103,6 @@ postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.21, postcss@^7.0.23, postcss@^7.0.5 source-map "^0.6.1" supports-color "^6.1.0" -postcss@^7.0.13, postcss@^7.0.14, postcss@^7.0.16, postcss@^7.0.17, postcss@^7.0.18, postcss@^7.0.2, postcss@^7.0.6, postcss@^7.0.7: - version "7.0.21" - resolved "https://registry.npm.alibaba-inc.com/postcss/download/postcss-7.0.21.tgz#06bb07824c19c2021c5d056d5b10c35b989f7e17" - integrity sha1-BrsHgkwZwgIcXQVtWxDDW5iffhc= - dependencies: - chalk "^2.4.2" - source-map "^0.6.1" - supports-color "^6.1.0" - potpack@^1.0.1: version "1.0.1" resolved "https://registry.npm.alibaba-inc.com/potpack/download/potpack-1.0.1.tgz#d1b1afd89e4c8f7762865ec30bd112ab767e2ebf" @@ -18803,9 +18766,9 @@ rc-footer@^0.6.1: classnames "^2.2.1" rc-form@^2.4.10: - version "2.4.10" - resolved "https://registry.npm.alibaba-inc.com/rc-form/download/rc-form-2.4.10.tgz#8bf7260a4c9a1d5b82621cee5f82d8daa4ecb84e" - integrity sha1-i/cmCkyaHVuCYhzuX4LY2qTsuE4= + version "2.4.11" + resolved "https://registry.npm.alibaba-inc.com/rc-form/download/rc-form-2.4.11.tgz#61ee3ae579259684ae30f2c48f55f0f23a5d3d08" + integrity sha1-Ye465XklloSuMPLEj1Xw8jpdPQg= dependencies: async-validator "~1.11.3" babel-runtime "6.x" @@ -19330,9 +19293,9 @@ react-hotkeys@2.0.0-pre4: prop-types "^15.6.1" react-i18next@^11.0.0, react-i18next@^11.0.1: - version "11.2.1" - resolved "https://registry.npm.alibaba-inc.com/react-i18next/download/react-i18next-11.2.1.tgz#a56d9f1f52d003eb4fa8f1c7d6752123827160f0" - integrity sha1-pW2fH1LQA+tPqPHH1nUhI4JxYPA= + version "11.2.2" + resolved "https://registry.npm.alibaba-inc.com/react-i18next/download/react-i18next-11.2.2.tgz#e5e55ae4187521b01b4eafe483dd96b280106670" + integrity sha1-5eVa5Bh1IbAbTq/kg92WsoAQZnA= dependencies: "@babel/runtime" "^7.3.1" html-parse-stringify2 "2.0.1" @@ -19807,7 +19770,7 @@ redux-thunk@^2.3.0: resolved "https://registry.npm.alibaba-inc.com/redux-thunk/download/redux-thunk-2.3.0.tgz#51c2c19a185ed5187aaa9a2d08b666d0d6467622" integrity sha1-UcLBmhhe1Rh6qpotCLZm0NZGdiI= -redux@^4.0.4: +redux@^4.0.1, redux@^4.0.4: version "4.0.4" resolved "https://registry.npm.alibaba-inc.com/redux/download/redux-4.0.4.tgz#4ee1aeb164b63d6a1bcc57ae4aa0b6e6fa7a3796" integrity sha1-TuGusWS2PWobzFeuSqC25vp6N5Y= @@ -20537,9 +20500,9 @@ rollup@^0.25.8: source-map-support "^0.3.2" rollup@^1.27.0: - version "1.27.0" - resolved "https://registry.npm.alibaba-inc.com/rollup/download/rollup-1.27.0.tgz#7afe0da89c967cec5ccea7e919da6c89a1a68666" - integrity sha1-ev4NqJyWfOxczqfpGdpsiaGmhmY= + version "1.27.2" + resolved "https://registry.npm.alibaba-inc.com/rollup/download/rollup-1.27.2.tgz#caf54a93df228bf7864f13dddcdb363d3e958509" + integrity sha1-yvVKk98ii/eGTxPd3Ns2PT6VhQk= dependencies: "@types/estree" "*" "@types/node" "*" @@ -23527,6 +23490,17 @@ vfile@^3.0.0: unist-util-stringify-position "^1.0.0" vfile-message "^1.0.0" +video-react@^0.14.1: + version "0.14.1" + resolved "https://registry.npm.alibaba-inc.com/video-react/download/video-react-0.14.1.tgz#49ac7b19f1d039c0b3ebec82f81224bc2fa8bdf1" + integrity sha1-Sax7GfHQOcCz6+yC+BIkvC+ovfE= + dependencies: + "@babel/runtime" "^7.4.5" + classnames "^2.2.6" + lodash.throttle "^4.1.1" + prop-types "^15.7.2" + redux "^4.0.1" + viewport-mercator-project@^6.2.1: version "6.2.2" resolved "https://registry.npm.alibaba-inc.com/viewport-mercator-project/download/viewport-mercator-project-6.2.2.tgz#f524819ad53fcc009b46136a59f73461bfcf1604" @@ -24405,9 +24379,9 @@ yargs@^13.2.4, yargs@^13.3.0: yargs-parser "^13.1.1" yargs@^14.2.0: - version "14.2.0" - resolved "https://registry.npm.alibaba-inc.com/yargs/download/yargs-14.2.0.tgz#f116a9242c4ed8668790b40759b4906c276e76c3" - integrity sha1-8RapJCxO2GaHkLQHWbSQbCdudsM= + version "14.2.2" + resolved "https://registry.npm.alibaba-inc.com/yargs/download/yargs-14.2.2.tgz#2769564379009ff8597cdd38fba09da9b493c4b5" + integrity sha1-J2lWQ3kAn/hZfN04+6CdqbSTxLU= dependencies: cliui "^5.0.0" decamelize "^1.2.0"