Commit 2d06de47d0d496b6e6cbfd18a915e5a60fc18eaf
1 parent
f5ce4e87
update...
Showing
48 changed files
with
1694 additions
and
1014 deletions
src/main/java/com/bsth/common/Constants.java
src/main/java/com/bsth/controller/schedule/InOutScheduleController.java
| ... | ... | @@ -57,6 +57,11 @@ public class InOutScheduleController { |
| 57 | 57 | return inOutScheduleService.tzrc(cpcsJson); |
| 58 | 58 | } |
| 59 | 59 | |
| 60 | + @RequestMapping(value = "tzrc_check", method = RequestMethod.POST) | |
| 61 | + public Map<String, Object> tzrc_check(@RequestParam Map<String, String> map){ | |
| 62 | + return inOutScheduleService.tzrc_check(map); | |
| 63 | + } | |
| 64 | + | |
| 60 | 65 | /** |
| 61 | 66 | * 人已报到 |
| 62 | 67 | * @param map | ... | ... |
src/main/java/com/bsth/controller/sys/ModuleController.java deleted
100644 → 0
| 1 | -package com.bsth.controller.sys; | |
| 2 | - | |
| 3 | -import com.bsth.controller.BaseController; | |
| 4 | -import com.bsth.entity.sys.Module; | |
| 5 | -import com.bsth.service.sys.ModuleService; | |
| 6 | -import org.springframework.beans.factory.annotation.Autowired; | |
| 7 | -import org.springframework.web.bind.annotation.RequestMapping; | |
| 8 | -import org.springframework.web.bind.annotation.RequestParam; | |
| 9 | -import org.springframework.web.bind.annotation.RestController; | |
| 10 | - | |
| 11 | -import java.util.List; | |
| 12 | - | |
| 13 | -@RestController | |
| 14 | -@RequestMapping("module") | |
| 15 | -public class ModuleController extends BaseController<Module, Integer>{ | |
| 16 | - | |
| 17 | - @Autowired | |
| 18 | - ModuleService moduleService; | |
| 19 | - | |
| 20 | - @RequestMapping(value = "/findByGroupType") | |
| 21 | - public List<Module> findByGroupType(@RequestParam String group){ | |
| 22 | - return moduleService.findByGroupType(group); | |
| 23 | - } | |
| 24 | - | |
| 25 | - /** | |
| 26 | - * | |
| 27 | - * @Title: findByRoleId | |
| 28 | - * @Description: TODO(根据角色获取功能模块) | |
| 29 | - * @param @param roleId | |
| 30 | - * @throws | |
| 31 | - */ | |
| 32 | - @RequestMapping(value = "/findByCurrentUser") | |
| 33 | - public List<Module> findByCurrentUser(){ | |
| 34 | - return moduleService.findByCurrentUser(); | |
| 35 | - } | |
| 36 | - | |
| 37 | - @RequestMapping(value = "/all_distinct") | |
| 38 | - public List<Module> findAll_distinct(){ | |
| 39 | - return moduleService.findAll_distinct(); | |
| 40 | - } | |
| 41 | -} |
src/main/java/com/bsth/controller/sys/ResourceController.java deleted
100644 → 0
| 1 | -package com.bsth.controller.sys; | |
| 2 | - | |
| 3 | -import java.util.Map; | |
| 4 | - | |
| 5 | -import org.springframework.beans.factory.annotation.Autowired; | |
| 6 | -import org.springframework.web.bind.annotation.RequestMapping; | |
| 7 | -import org.springframework.web.bind.annotation.RequestMethod; | |
| 8 | -import org.springframework.web.bind.annotation.RequestParam; | |
| 9 | -import org.springframework.web.bind.annotation.RestController; | |
| 10 | - | |
| 11 | -import com.alibaba.fastjson.JSON; | |
| 12 | -import com.bsth.controller.BaseController; | |
| 13 | -import com.bsth.entity.sys.Resource; | |
| 14 | -import com.bsth.service.sys.ResourceService; | |
| 15 | - | |
| 16 | -@RestController | |
| 17 | -@RequestMapping("resource") | |
| 18 | -public class ResourceController extends BaseController<Resource, Integer>{ | |
| 19 | - | |
| 20 | - @Autowired | |
| 21 | - ResourceService resourceService; | |
| 22 | - | |
| 23 | - @RequestMapping(value = "/batch", method = RequestMethod.POST) | |
| 24 | - public Map<String, Object> save(@RequestParam String array){ | |
| 25 | - return resourceService.saveList(JSON.parseArray(array, Resource.class)); | |
| 26 | - } | |
| 27 | -} |
src/main/java/com/bsth/controller/sys/RoleController.java
| 1 | 1 | package com.bsth.controller.sys; |
| 2 | 2 | |
| 3 | -import java.util.Map; | |
| 4 | - | |
| 3 | +import com.bsth.controller.BaseController; | |
| 4 | +import com.bsth.entity.sys.Role; | |
| 5 | +import com.bsth.service.sys.RoleService; | |
| 6 | +import org.slf4j.Logger; | |
| 7 | +import org.slf4j.LoggerFactory; | |
| 5 | 8 | import org.springframework.beans.factory.annotation.Autowired; |
| 6 | 9 | import org.springframework.web.bind.annotation.RequestMapping; |
| 7 | 10 | import org.springframework.web.bind.annotation.RequestMethod; |
| 8 | 11 | import org.springframework.web.bind.annotation.RequestParam; |
| 9 | 12 | import org.springframework.web.bind.annotation.RestController; |
| 10 | 13 | |
| 11 | -import com.bsth.controller.BaseController; | |
| 12 | -import com.bsth.entity.sys.Role; | |
| 13 | -import com.bsth.service.sys.RoleService; | |
| 14 | +import java.io.BufferedReader; | |
| 15 | +import java.io.InputStreamReader; | |
| 16 | +import java.util.Map; | |
| 14 | 17 | |
| 15 | 18 | @RestController |
| 16 | 19 | @RequestMapping("role") |
| 17 | -public class RoleController extends BaseController<Role, Integer>{ | |
| 18 | - | |
| 19 | - | |
| 20 | - @Autowired | |
| 21 | - RoleService roleService; | |
| 22 | - | |
| 23 | - /** | |
| 24 | - * | |
| 25 | - * @Title: settRoleModules | |
| 26 | - * @Description: TODO(为角色设置模块,全量覆盖) | |
| 27 | - * @param @param roleId 角色ID | |
| 28 | - * @param @param mIds 模块ID字符串(1,2,3,4) | |
| 29 | - * @throws | |
| 30 | - */ | |
| 31 | - @RequestMapping(value = "/settModules", method = RequestMethod.POST) | |
| 32 | - public Map<String, Object> settRoleModules(@RequestParam Integer roleId,@RequestParam String mIds){ | |
| 33 | - return roleService.settRoleModules(roleId, mIds); | |
| 34 | - } | |
| 35 | - | |
| 36 | - /** | |
| 37 | - * | |
| 38 | - * @Title: roleInfo | |
| 39 | - * @Description: TODO(角色信息) | |
| 40 | - * @param @param id 角色ID | |
| 41 | - * @throws | |
| 42 | - */ | |
| 43 | - @RequestMapping(value = "/roleInfo") | |
| 44 | - public Map<String, Object> roleInfo(@RequestParam Integer id){ | |
| 45 | - return roleService.roleInfo(id); | |
| 46 | - } | |
| 20 | +public class RoleController extends BaseController<Role, Integer> { | |
| 21 | + | |
| 22 | + static Logger logger = LoggerFactory.getLogger(RoleController.class); | |
| 23 | + | |
| 24 | + @Autowired | |
| 25 | + RoleService roleService; | |
| 26 | + | |
| 27 | + /** | |
| 28 | + * menu 菜单json | |
| 29 | + */ | |
| 30 | + private static String authJson; | |
| 31 | + | |
| 32 | + static { | |
| 33 | + loadAuthStrByFile(); | |
| 34 | + } | |
| 35 | + | |
| 36 | + private static void loadAuthStrByFile() { | |
| 37 | + try { | |
| 38 | + | |
| 39 | + BufferedReader br = new BufferedReader(new InputStreamReader(RoleController.class.getClassLoader().getResourceAsStream("auths.json"))); | |
| 40 | + | |
| 41 | + StringBuilder sb = new StringBuilder(); | |
| 42 | + | |
| 43 | + String lineStr; | |
| 44 | + | |
| 45 | + while ((lineStr = br.readLine()) != null) { | |
| 46 | + sb.append(lineStr); | |
| 47 | + } | |
| 48 | + | |
| 49 | + authJson = sb.toString(); | |
| 50 | + | |
| 51 | + } catch (Exception e) { | |
| 52 | + logger.error("", e); | |
| 53 | + } | |
| 54 | + } | |
| 55 | + | |
| 56 | + | |
| 57 | + @RequestMapping("auth_json") | |
| 58 | + public String authJsonStr() { | |
| 59 | + return authJson; | |
| 60 | + } | |
| 61 | + | |
| 62 | + @RequestMapping("re_load") | |
| 63 | + public int reLoadByFile() { | |
| 64 | + loadAuthStrByFile(); | |
| 65 | + return 1; | |
| 66 | + } | |
| 67 | + | |
| 68 | + @RequestMapping(value = "saveAuthStr", method = RequestMethod.POST) | |
| 69 | + public Map<String, Object> saveAuthStr(@RequestParam String authStr, @RequestParam int id){ | |
| 70 | + return roleService.saveAuthStr(authStr, id); | |
| 71 | + } | |
| 72 | + | |
| 73 | + @RequestMapping(value = "add", method = RequestMethod.POST) | |
| 74 | + public Map<String, Object> add(@RequestParam String roleName){ | |
| 75 | + return roleService.add(roleName); | |
| 76 | + } | |
| 47 | 77 | } | ... | ... |
src/main/java/com/bsth/controller/sys/UserController.java
| ... | ... | @@ -3,14 +3,10 @@ package com.bsth.controller.sys; |
| 3 | 3 | import com.bsth.common.Constants; |
| 4 | 4 | import com.bsth.common.ResponseCode; |
| 5 | 5 | import com.bsth.controller.BaseController; |
| 6 | -import com.bsth.controller.sys.dto.CompanyData; | |
| 7 | 6 | import com.bsth.controller.sys.util.RSAUtils; |
| 8 | -import com.bsth.entity.sys.CompanyAuthority; | |
| 9 | 7 | import com.bsth.entity.sys.SysUser; |
| 10 | 8 | import com.bsth.security.util.SecurityUtils; |
| 11 | -import com.bsth.service.sys.CompanyAuthorityService; | |
| 12 | 9 | import com.bsth.service.sys.SysUserService; |
| 13 | -import com.google.common.collect.ArrayListMultimap; | |
| 14 | 10 | import org.slf4j.Logger; |
| 15 | 11 | import org.slf4j.LoggerFactory; |
| 16 | 12 | import org.springframework.beans.factory.annotation.Autowired; |
| ... | ... | @@ -24,7 +20,9 @@ import org.springframework.web.bind.annotation.RestController; |
| 24 | 20 | |
| 25 | 21 | import javax.servlet.http.HttpServletRequest; |
| 26 | 22 | import javax.servlet.http.HttpSession; |
| 27 | -import java.util.*; | |
| 23 | +import java.util.HashMap; | |
| 24 | +import java.util.List; | |
| 25 | +import java.util.Map; | |
| 28 | 26 | |
| 29 | 27 | @RestController |
| 30 | 28 | @RequestMapping("user") |
| ... | ... | @@ -35,9 +33,6 @@ public class UserController extends BaseController<SysUser, Integer> { |
| 35 | 33 | @Autowired |
| 36 | 34 | SysUserService sysUserService; |
| 37 | 35 | |
| 38 | - @Autowired | |
| 39 | - CompanyAuthorityService companyAuthorityService; | |
| 40 | - | |
| 41 | 36 | @RequestMapping(value = "/login/jCryptionKey") |
| 42 | 37 | public Map<String, Object> jCryptionKey(HttpServletRequest request){ |
| 43 | 38 | //公匙返回页面 |
| ... | ... | @@ -46,8 +41,6 @@ public class UserController extends BaseController<SysUser, Integer> { |
| 46 | 41 | return rs; |
| 47 | 42 | } |
| 48 | 43 | |
| 49 | - //需要验证码的账号 | |
| 50 | - //public static Map<String, Integer> captchaMap = new HashMap<>(); | |
| 51 | 44 | |
| 52 | 45 | @RequestMapping(value = "/login", method = RequestMethod.POST) |
| 53 | 46 | public Map<String, Object> login(HttpServletRequest request, @RequestParam String userName, |
| ... | ... | @@ -88,8 +81,8 @@ public class UserController extends BaseController<SysUser, Integer> { |
| 88 | 81 | session.setAttribute(Constants.SESSION_USERNAME, user.getUserName()); |
| 89 | 82 | |
| 90 | 83 | //获取公司权限数据 |
| 91 | - List<CompanyAuthority> cmyAuths=companyAuthorityService.findByUser(user); | |
| 92 | - session.setAttribute(Constants.COMPANY_AUTHORITYS, cmyAuths); | |
| 84 | + //List<CompanyAuthority> cmyAuths=companyAuthorityService.findByUser(user); | |
| 85 | + //session.setAttribute(Constants.COMPANY_AUTHORITYS, cmyAuths); | |
| 93 | 86 | |
| 94 | 87 | rs.put("status", ResponseCode.SUCCESS); |
| 95 | 88 | } catch (Exception e) { |
| ... | ... | @@ -99,42 +92,6 @@ public class UserController extends BaseController<SysUser, Integer> { |
| 99 | 92 | return rs; |
| 100 | 93 | } |
| 101 | 94 | |
| 102 | - /** | |
| 103 | - * 返回当前用户的公司权限数据,用于构建页面级联下拉框 | |
| 104 | - * @return | |
| 105 | - */ | |
| 106 | - @RequestMapping("companyData") | |
| 107 | - public List<CompanyData> companyData(HttpServletRequest request){ | |
| 108 | - List<CompanyData> rs = new ArrayList<>(); | |
| 109 | - CompanyData companyData; | |
| 110 | - | |
| 111 | - ArrayListMultimap<String, CompanyAuthority> map = ArrayListMultimap.create(); | |
| 112 | - List<CompanyAuthority> cmyAuths = (List<CompanyAuthority>) request.getSession().getAttribute(Constants.COMPANY_AUTHORITYS); | |
| 113 | - | |
| 114 | - for(CompanyAuthority cAuth : cmyAuths){ | |
| 115 | - map.put(cAuth.getCompanyCode()+"_"+cAuth.getCompanyName(), cAuth); | |
| 116 | - } | |
| 117 | - | |
| 118 | - Set<String> keys = map.keySet(); | |
| 119 | - String[] temps; | |
| 120 | - for(String k : keys){ | |
| 121 | - temps = k.split("_"); | |
| 122 | - | |
| 123 | - companyData = new CompanyData(); | |
| 124 | - companyData.setCompanyCode(temps[0]); | |
| 125 | - companyData.setCompanyName(temps[1]); | |
| 126 | - companyData.setChildren(new ArrayList<CompanyData.ChildrenCompany>()); | |
| 127 | - | |
| 128 | - cmyAuths = map.get(k); | |
| 129 | - for(CompanyAuthority c : cmyAuths){ | |
| 130 | - companyData.getChildren().add(new CompanyData.ChildrenCompany(c.getSubCompanyCode(), c.getSubCompanyName())); | |
| 131 | - } | |
| 132 | - | |
| 133 | - rs.add(companyData); | |
| 134 | - } | |
| 135 | - | |
| 136 | - return rs; | |
| 137 | - } | |
| 138 | 95 | |
| 139 | 96 | public Map<String, Object> put(Map<String, Object> rs, String key, Object val){ |
| 140 | 97 | rs.put(key, val); | ... | ... |
src/main/java/com/bsth/entity/sys/Module.java deleted
100644 → 0
| 1 | -package com.bsth.entity.sys; | |
| 2 | - | |
| 3 | -import javax.persistence.*; | |
| 4 | -import java.util.Date; | |
| 5 | -import java.util.LinkedHashSet; | |
| 6 | -import java.util.Set; | |
| 7 | - | |
| 8 | -@Entity | |
| 9 | -@Table(name = "bsth_c_sys_module") | |
| 10 | -@NamedEntityGraphs({ | |
| 11 | - @NamedEntityGraph(name = "module_role", attributeNodes = { | |
| 12 | - @NamedAttributeNode("roles") | |
| 13 | - }) | |
| 14 | -}) | |
| 15 | -public class Module { | |
| 16 | - | |
| 17 | - @Id | |
| 18 | - @GeneratedValue(strategy = GenerationType.IDENTITY) | |
| 19 | - private Integer id; | |
| 20 | - | |
| 21 | - private Integer pId; | |
| 22 | - | |
| 23 | - private String name; | |
| 24 | - | |
| 25 | - private String descriptions; | |
| 26 | - | |
| 27 | - private String path; | |
| 28 | - | |
| 29 | - private String mappSymbol; | |
| 30 | - | |
| 31 | - private boolean enable; | |
| 32 | - | |
| 33 | - private String icon; | |
| 34 | - | |
| 35 | - //页面容器 | |
| 36 | - private String container; | |
| 37 | - | |
| 38 | - /** | |
| 39 | - * 1:组 | |
| 40 | - * 2:目录 | |
| 41 | - * 3:功能模块 | |
| 42 | - */ | |
| 43 | - private String groupType; | |
| 44 | - | |
| 45 | - @ManyToMany(mappedBy = "modules") | |
| 46 | - private Set<Role> roles = new LinkedHashSet<>(); | |
| 47 | - | |
| 48 | - @Column(updatable = false,name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP") | |
| 49 | - private Date createDate; | |
| 50 | - | |
| 51 | - @Column(name = "update_date", columnDefinition = "timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP") | |
| 52 | - private Date updateDate; | |
| 53 | - | |
| 54 | - public Integer getId() { | |
| 55 | - return id; | |
| 56 | - } | |
| 57 | - | |
| 58 | - public void setId(Integer id) { | |
| 59 | - this.id = id; | |
| 60 | - } | |
| 61 | - | |
| 62 | - public String getName() { | |
| 63 | - return name; | |
| 64 | - } | |
| 65 | - | |
| 66 | - public void setName(String name) { | |
| 67 | - this.name = name; | |
| 68 | - } | |
| 69 | - | |
| 70 | - public String getDescriptions() { | |
| 71 | - return descriptions; | |
| 72 | - } | |
| 73 | - | |
| 74 | - public void setDescriptions(String descriptions) { | |
| 75 | - this.descriptions = descriptions; | |
| 76 | - } | |
| 77 | - | |
| 78 | - public Set<Role> getRoles() { | |
| 79 | - return roles; | |
| 80 | - } | |
| 81 | - | |
| 82 | - public void setRoles(Set<Role> roles) { | |
| 83 | - this.roles = roles; | |
| 84 | - } | |
| 85 | - | |
| 86 | - public String getPath() { | |
| 87 | - return path; | |
| 88 | - } | |
| 89 | - | |
| 90 | - public void setPath(String path) { | |
| 91 | - this.path = path; | |
| 92 | - } | |
| 93 | - | |
| 94 | - public String getMappSymbol() { | |
| 95 | - return mappSymbol; | |
| 96 | - } | |
| 97 | - | |
| 98 | - public void setMappSymbol(String mappSymbol) { | |
| 99 | - this.mappSymbol = mappSymbol; | |
| 100 | - } | |
| 101 | - | |
| 102 | - public boolean isEnable() { | |
| 103 | - return enable; | |
| 104 | - } | |
| 105 | - | |
| 106 | - public void setEnable(boolean enable) { | |
| 107 | - this.enable = enable; | |
| 108 | - } | |
| 109 | - | |
| 110 | - public String getIcon() { | |
| 111 | - return icon; | |
| 112 | - } | |
| 113 | - | |
| 114 | - public void setIcon(String icon) { | |
| 115 | - this.icon = icon; | |
| 116 | - } | |
| 117 | - | |
| 118 | - public Integer getpId() { | |
| 119 | - return pId; | |
| 120 | - } | |
| 121 | - | |
| 122 | - public void setpId(Integer pId) { | |
| 123 | - this.pId = pId; | |
| 124 | - } | |
| 125 | - | |
| 126 | - public String getGroupType() { | |
| 127 | - return groupType; | |
| 128 | - } | |
| 129 | - | |
| 130 | - public void setGroupType(String groupType) { | |
| 131 | - this.groupType = groupType; | |
| 132 | - } | |
| 133 | - | |
| 134 | - public Date getCreateDate() { | |
| 135 | - return createDate; | |
| 136 | - } | |
| 137 | - | |
| 138 | - public void setCreateDate(Date createDate) { | |
| 139 | - this.createDate = createDate; | |
| 140 | - } | |
| 141 | - | |
| 142 | - public Date getUpdateDate() { | |
| 143 | - return updateDate; | |
| 144 | - } | |
| 145 | - | |
| 146 | - public void setUpdateDate(Date updateDate) { | |
| 147 | - this.updateDate = updateDate; | |
| 148 | - } | |
| 149 | - | |
| 150 | - @Override | |
| 151 | - public boolean equals(Object obj) { | |
| 152 | - // TODO Auto-generated method stub | |
| 153 | - return this.id.equals(((Module)obj).getId()); | |
| 154 | - } | |
| 155 | - | |
| 156 | - public String getContainer() { | |
| 157 | - return container; | |
| 158 | - } | |
| 159 | - | |
| 160 | - public void setContainer(String container) { | |
| 161 | - this.container = container; | |
| 162 | - } | |
| 163 | -} |
src/main/java/com/bsth/entity/sys/Resource.java deleted
100644 → 0
| 1 | -package com.bsth.entity.sys; | |
| 2 | - | |
| 3 | -import java.util.Date; | |
| 4 | -import java.util.LinkedHashSet; | |
| 5 | -import java.util.Set; | |
| 6 | - | |
| 7 | -import javax.persistence.Column; | |
| 8 | -import javax.persistence.Entity; | |
| 9 | -import javax.persistence.FetchType; | |
| 10 | -import javax.persistence.GeneratedValue; | |
| 11 | -import javax.persistence.GenerationType; | |
| 12 | -import javax.persistence.Id; | |
| 13 | -import javax.persistence.ManyToMany; | |
| 14 | -import javax.persistence.ManyToOne; | |
| 15 | -import javax.persistence.Table; | |
| 16 | - | |
| 17 | -import com.fasterxml.jackson.annotation.JsonIgnore; | |
| 18 | - | |
| 19 | -@Entity | |
| 20 | -@Table(name = "bsth_c_sys_resource") | |
| 21 | -public class Resource { | |
| 22 | - | |
| 23 | - @Id | |
| 24 | - @GeneratedValue(strategy = GenerationType.IDENTITY) | |
| 25 | - private Integer id; | |
| 26 | - | |
| 27 | - private String name; | |
| 28 | - | |
| 29 | - private String url; | |
| 30 | - | |
| 31 | - private String method; | |
| 32 | - | |
| 33 | - private String descriptions; | |
| 34 | - | |
| 35 | - @ManyToOne | |
| 36 | - private Module module; | |
| 37 | - | |
| 38 | - private boolean enable; | |
| 39 | - | |
| 40 | - @JsonIgnore | |
| 41 | - @ManyToMany(fetch = FetchType.EAGER) | |
| 42 | - private Set<Role> roles = new LinkedHashSet<>(); | |
| 43 | - | |
| 44 | - @Column(updatable = false, name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP") | |
| 45 | - private Date createDate; | |
| 46 | - | |
| 47 | - @Column(name = "update_date", columnDefinition = "timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP") | |
| 48 | - private Date updateDate; | |
| 49 | - | |
| 50 | - public Integer getId() { | |
| 51 | - return id; | |
| 52 | - } | |
| 53 | - | |
| 54 | - public void setId(Integer id) { | |
| 55 | - this.id = id; | |
| 56 | - } | |
| 57 | - | |
| 58 | - public String getName() { | |
| 59 | - return name; | |
| 60 | - } | |
| 61 | - | |
| 62 | - public void setName(String name) { | |
| 63 | - this.name = name; | |
| 64 | - } | |
| 65 | - | |
| 66 | - public String getDescriptions() { | |
| 67 | - return descriptions; | |
| 68 | - } | |
| 69 | - | |
| 70 | - public void setDescriptions(String descriptions) { | |
| 71 | - this.descriptions = descriptions; | |
| 72 | - } | |
| 73 | - | |
| 74 | - public Set<Role> getRoles() { | |
| 75 | - return roles; | |
| 76 | - } | |
| 77 | - | |
| 78 | - public void setRoles(Set<Role> roles) { | |
| 79 | - this.roles = roles; | |
| 80 | - } | |
| 81 | - | |
| 82 | - public Module getModule() { | |
| 83 | - return module; | |
| 84 | - } | |
| 85 | - | |
| 86 | - public void setModule(Module module) { | |
| 87 | - this.module = module; | |
| 88 | - } | |
| 89 | - | |
| 90 | - public boolean isEnable() { | |
| 91 | - return enable; | |
| 92 | - } | |
| 93 | - | |
| 94 | - public void setEnable(boolean enable) { | |
| 95 | - this.enable = enable; | |
| 96 | - } | |
| 97 | - | |
| 98 | - public String getUrl() { | |
| 99 | - return url; | |
| 100 | - } | |
| 101 | - | |
| 102 | - public void setUrl(String url) { | |
| 103 | - this.url = url; | |
| 104 | - } | |
| 105 | - | |
| 106 | - public String getMethod() { | |
| 107 | - return method; | |
| 108 | - } | |
| 109 | - | |
| 110 | - public void setMethod(String method) { | |
| 111 | - this.method = method; | |
| 112 | - } | |
| 113 | - | |
| 114 | - public Date getCreateDate() { | |
| 115 | - return createDate; | |
| 116 | - } | |
| 117 | - | |
| 118 | - public void setCreateDate(Date createDate) { | |
| 119 | - this.createDate = createDate; | |
| 120 | - } | |
| 121 | - | |
| 122 | - public Date getUpdateDate() { | |
| 123 | - return updateDate; | |
| 124 | - } | |
| 125 | - | |
| 126 | - public void setUpdateDate(Date updateDate) { | |
| 127 | - this.updateDate = updateDate; | |
| 128 | - } | |
| 129 | -} |
src/main/java/com/bsth/entity/sys/Role.java
| 1 | 1 | package com.bsth.entity.sys; |
| 2 | 2 | |
| 3 | +import com.fasterxml.jackson.annotation.JsonIgnore; | |
| 4 | + | |
| 5 | +import javax.persistence.*; | |
| 3 | 6 | import java.util.Date; |
| 4 | 7 | import java.util.LinkedHashSet; |
| 5 | 8 | import java.util.Set; |
| 6 | 9 | |
| 7 | -import javax.persistence.Column; | |
| 8 | -import javax.persistence.Entity; | |
| 9 | -import javax.persistence.FetchType; | |
| 10 | -import javax.persistence.GeneratedValue; | |
| 11 | -import javax.persistence.GenerationType; | |
| 12 | -import javax.persistence.Id; | |
| 13 | -import javax.persistence.ManyToMany; | |
| 14 | -import javax.persistence.Table; | |
| 15 | - | |
| 16 | -import com.fasterxml.jackson.annotation.JsonIgnore; | |
| 17 | - | |
| 18 | 10 | @Entity |
| 19 | 11 | @Table(name = "bsth_c_sys_role") |
| 20 | 12 | public class Role { |
| ... | ... | @@ -22,37 +14,30 @@ public class Role { |
| 22 | 14 | @Id |
| 23 | 15 | @GeneratedValue(strategy = GenerationType.IDENTITY) |
| 24 | 16 | private Integer id; |
| 25 | - | |
| 17 | + | |
| 26 | 18 | private String codeName; |
| 27 | 19 | |
| 28 | 20 | private String roleName; |
| 29 | 21 | |
| 30 | 22 | private String descriptions; |
| 31 | 23 | |
| 32 | - private boolean isSuperAdmin; | |
| 33 | - | |
| 34 | 24 | private boolean enable; |
| 35 | - | |
| 25 | + | |
| 26 | + /** | |
| 27 | + * 菜单配置,json字符串 | |
| 28 | + */ | |
| 29 | + private String menuStr; | |
| 30 | + | |
| 36 | 31 | @JsonIgnore |
| 37 | 32 | @ManyToMany(fetch = FetchType.LAZY, mappedBy = "roles") |
| 38 | 33 | private Set<SysUser> users = new LinkedHashSet<>(); |
| 39 | 34 | |
| 40 | - @JsonIgnore | |
| 41 | - @ManyToMany | |
| 42 | - private Set<Module> modules = new LinkedHashSet<>(); | |
| 43 | - | |
| 44 | - @JsonIgnore | |
| 45 | - @ManyToMany(mappedBy = "roles") | |
| 46 | - private Set<Resource> resources = new LinkedHashSet<>(); | |
| 47 | - | |
| 48 | 35 | @Column(updatable = false, name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP") |
| 49 | 36 | private Date createDate; |
| 50 | 37 | |
| 51 | 38 | @Column(name = "update_date", columnDefinition = "timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP") |
| 52 | 39 | private Date updateDate; |
| 53 | 40 | |
| 54 | - private int pic; | |
| 55 | - | |
| 56 | 41 | public Integer getId() { |
| 57 | 42 | return id; |
| 58 | 43 | } |
| ... | ... | @@ -93,29 +78,6 @@ public class Role { |
| 93 | 78 | this.users = users; |
| 94 | 79 | } |
| 95 | 80 | |
| 96 | - public boolean isSuperAdmin() { | |
| 97 | - return isSuperAdmin; | |
| 98 | - } | |
| 99 | - | |
| 100 | - public void setSuperAdmin(boolean isSuperAdmin) { | |
| 101 | - this.isSuperAdmin = isSuperAdmin; | |
| 102 | - } | |
| 103 | - | |
| 104 | - public Set<Module> getModules() { | |
| 105 | - return modules; | |
| 106 | - } | |
| 107 | - | |
| 108 | - public void setModules(Set<Module> modules) { | |
| 109 | - this.modules = modules; | |
| 110 | - } | |
| 111 | - | |
| 112 | - public Set<Resource> getResources() { | |
| 113 | - return resources; | |
| 114 | - } | |
| 115 | - | |
| 116 | - public void setResources(Set<Resource> resources) { | |
| 117 | - this.resources = resources; | |
| 118 | - } | |
| 119 | 81 | |
| 120 | 82 | public Date getCreateDate() { |
| 121 | 83 | return createDate; |
| ... | ... | @@ -133,34 +95,29 @@ public class Role { |
| 133 | 95 | this.updateDate = updateDate; |
| 134 | 96 | } |
| 135 | 97 | |
| 136 | - public String getCodeName() { | |
| 137 | - return codeName; | |
| 138 | - } | |
| 139 | - | |
| 140 | - public void setCodeName(String codeName) { | |
| 141 | - this.codeName = codeName; | |
| 98 | + @Override | |
| 99 | + public boolean equals(Object obj) { | |
| 100 | + return this.id.equals(((Role)obj).getId()); | |
| 142 | 101 | } |
| 143 | 102 | |
| 144 | - public int getPic() { | |
| 145 | - return pic; | |
| 103 | + @Override | |
| 104 | + public int hashCode() { | |
| 105 | + return this.getCodeName().toString().hashCode(); | |
| 146 | 106 | } |
| 147 | 107 | |
| 148 | - public void setPic(int pic) { | |
| 149 | - this.pic = pic; | |
| 108 | + public String getMenuStr() { | |
| 109 | + return menuStr; | |
| 150 | 110 | } |
| 151 | 111 | |
| 152 | - @Override | |
| 153 | - public boolean equals(Object obj) { | |
| 154 | - return this.id.equals(((Role)obj).getId()); | |
| 112 | + public void setMenuStr(String menuStr) { | |
| 113 | + this.menuStr = menuStr; | |
| 155 | 114 | } |
| 156 | 115 | |
| 157 | - @Override | |
| 158 | - public int hashCode() { | |
| 159 | - return this.toString().hashCode(); | |
| 116 | + public String getCodeName() { | |
| 117 | + return codeName; | |
| 160 | 118 | } |
| 161 | 119 | |
| 162 | - @Override | |
| 163 | - public String toString() { | |
| 164 | - return this.id + "" + this.getCodeName(); | |
| 120 | + public void setCodeName(String codeName) { | |
| 121 | + this.codeName = codeName; | |
| 165 | 122 | } |
| 166 | 123 | } | ... | ... |
src/main/java/com/bsth/entity/sys/SecurityUser.java
| 1 | 1 | package com.bsth.entity.sys; |
| 2 | 2 | |
| 3 | -import java.util.ArrayList; | |
| 4 | -import java.util.Collection; | |
| 5 | -import java.util.Set; | |
| 6 | - | |
| 7 | 3 | import org.springframework.security.core.GrantedAuthority; |
| 8 | 4 | import org.springframework.security.core.authority.SimpleGrantedAuthority; |
| 9 | 5 | import org.springframework.security.core.userdetails.UserDetails; |
| 10 | 6 | |
| 7 | +import java.util.ArrayList; | |
| 8 | +import java.util.Collection; | |
| 9 | +import java.util.Set; | |
| 10 | + | |
| 11 | 11 | public class SecurityUser extends SysUser implements UserDetails { |
| 12 | 12 | |
| 13 | 13 | private static final long serialVersionUID = 1L; |
| ... | ... | @@ -36,7 +36,7 @@ public class SecurityUser extends SysUser implements UserDetails { |
| 36 | 36 | authorities.add(authority); |
| 37 | 37 | } |
| 38 | 38 | } |
| 39 | - return authorities; | |
| 39 | + return null; | |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | @Override | ... | ... |
src/main/java/com/bsth/entity/sys/SysUser.java
| ... | ... | @@ -23,6 +23,16 @@ public class SysUser { |
| 23 | 23 | |
| 24 | 24 | private String userName; |
| 25 | 25 | |
| 26 | + /** | |
| 27 | + * 公司编码 | |
| 28 | + */ | |
| 29 | + private String company; | |
| 30 | + | |
| 31 | + /** | |
| 32 | + * 分公司编码 | |
| 33 | + */ | |
| 34 | + private String fgsCompany; | |
| 35 | + | |
| 26 | 36 | private String name; |
| 27 | 37 | |
| 28 | 38 | private String password; |
| ... | ... | @@ -36,10 +46,10 @@ public class SysUser { |
| 36 | 46 | private String agencies; |
| 37 | 47 | |
| 38 | 48 | private boolean enabled; |
| 39 | - | |
| 49 | + | |
| 40 | 50 | @ManyToMany(fetch = FetchType.EAGER) |
| 41 | 51 | private Set<Role> roles = new LinkedHashSet<>(); |
| 42 | - | |
| 52 | + | |
| 43 | 53 | |
| 44 | 54 | public Integer getId() { |
| 45 | 55 | return id; |
| ... | ... | @@ -112,4 +122,20 @@ public class SysUser { |
| 112 | 122 | public void setRoles(Set<Role> roles) { |
| 113 | 123 | this.roles = roles; |
| 114 | 124 | } |
| 125 | + | |
| 126 | + public String getCompany() { | |
| 127 | + return company; | |
| 128 | + } | |
| 129 | + | |
| 130 | + public void setCompany(String company) { | |
| 131 | + this.company = company; | |
| 132 | + } | |
| 133 | + | |
| 134 | + public String getFgsCompany() { | |
| 135 | + return fgsCompany; | |
| 136 | + } | |
| 137 | + | |
| 138 | + public void setFgsCompany(String fgsCompany) { | |
| 139 | + this.fgsCompany = fgsCompany; | |
| 140 | + } | |
| 115 | 141 | } | ... | ... |
src/main/java/com/bsth/repository/sys/ModuleRepository.java deleted
100644 → 0
| 1 | -package com.bsth.repository.sys; | |
| 2 | - | |
| 3 | -import com.bsth.entity.sys.Module; | |
| 4 | -import com.bsth.repository.BaseRepository; | |
| 5 | -import org.springframework.data.jpa.domain.Specification; | |
| 6 | -import org.springframework.data.jpa.repository.EntityGraph; | |
| 7 | -import org.springframework.data.jpa.repository.Query; | |
| 8 | -import org.springframework.stereotype.Repository; | |
| 9 | - | |
| 10 | -import java.util.List; | |
| 11 | -import java.util.Set; | |
| 12 | - | |
| 13 | -@Repository | |
| 14 | -public interface ModuleRepository extends BaseRepository<Module, Integer> { | |
| 15 | - | |
| 16 | - @Query("select m from Module m where m.groupType in ?1") | |
| 17 | - List<Module> findByGroupType(String[] groupType); | |
| 18 | - | |
| 19 | - List<Module> findByPId(Integer pId); | |
| 20 | - | |
| 21 | - @Query("select m from Module m where m.id in ?1") | |
| 22 | - Set<Module> findByIds(List<Integer> ids); | |
| 23 | - | |
| 24 | - @Override | |
| 25 | - List<Module> findAll(Specification<Module> spec); | |
| 26 | - | |
| 27 | - @EntityGraph(value = "module_role", type = EntityGraph.EntityGraphType.FETCH) | |
| 28 | - @Query(value = "select DISTINCT m from Module m") | |
| 29 | - List<Module> findAll_distinct(); | |
| 30 | -} |
src/main/java/com/bsth/repository/sys/ResourceRepository.java deleted
100644 → 0
| 1 | -package com.bsth.repository.sys; | |
| 2 | - | |
| 3 | -import java.util.List; | |
| 4 | - | |
| 5 | -import org.springframework.stereotype.Repository; | |
| 6 | - | |
| 7 | -import com.bsth.entity.sys.Resource; | |
| 8 | -import com.bsth.repository.BaseRepository; | |
| 9 | - | |
| 10 | -@Repository | |
| 11 | -public interface ResourceRepository extends BaseRepository<Resource, Integer> { | |
| 12 | - | |
| 13 | - List<Resource> findByRolesId(Integer roleId); | |
| 14 | -} |
src/main/java/com/bsth/repository/sys/RoleRepository.java
| 1 | 1 | package com.bsth.repository.sys; |
| 2 | 2 | |
| 3 | 3 | |
| 4 | -import javax.transaction.Transactional; | |
| 5 | - | |
| 6 | -import org.springframework.data.jpa.repository.Modifying; | |
| 7 | -import org.springframework.data.jpa.repository.Query; | |
| 8 | -import org.springframework.stereotype.Repository; | |
| 9 | - | |
| 10 | 4 | import com.bsth.entity.sys.Role; |
| 11 | 5 | import com.bsth.repository.BaseRepository; |
| 6 | +import org.springframework.stereotype.Repository; | |
| 7 | + | |
| 8 | +import java.util.List; | |
| 12 | 9 | |
| 13 | 10 | @Repository |
| 14 | 11 | public interface RoleRepository extends BaseRepository<Role, Integer>{ |
| 15 | 12 | |
| 16 | - /** | |
| 17 | - * @Title: update | |
| 18 | - * @Description: TODO(简洁版更新(不需要级联的)) | |
| 19 | - */ | |
| 20 | - @Modifying | |
| 21 | - @Transactional | |
| 22 | - @Query("update Role r set r.codeName=?1, r.roleName=?2, r.enable=?3, r.descriptions=?4 where r.id=?5") | |
| 23 | - void update(String codeName, String roleName, boolean enable, String descriptions, Integer id); | |
| 13 | + List<Role> findByRoleName(String roleName); | |
| 24 | 14 | } | ... | ... |
src/main/java/com/bsth/repository/sys/SysUserRepository.java
| ... | ... | @@ -25,7 +25,6 @@ public interface SysUserRepository extends BaseRepository<SysUser, Integer>{ |
| 25 | 25 | @Query(value="update bsth_c_sys_user set password=?2 where id=?1",nativeQuery=true) |
| 26 | 26 | int changePWD(int id,String newPWD); |
| 27 | 27 | |
| 28 | - @EntityGraph(value = "sysUser_role", type = EntityGraph.EntityGraphType.FETCH) | |
| 29 | 28 | @Query(value = "select DISTINCT u from SysUser u") |
| 30 | 29 | List<SysUser> findAll_distinct(); |
| 31 | 30 | } | ... | ... |
src/main/java/com/bsth/security/SecurityMetadataSourceService.java
| 1 | 1 | package com.bsth.security; |
| 2 | 2 | |
| 3 | -import com.bsth.entity.sys.Resource; | |
| 4 | -import com.bsth.entity.sys.Role; | |
| 5 | -import com.bsth.service.sys.ResourceService; | |
| 6 | 3 | import com.bsth.service.sys.RoleService; |
| 7 | -import com.google.common.collect.ArrayListMultimap; | |
| 8 | 4 | import com.google.common.collect.Multimap; |
| 9 | 5 | import org.springframework.beans.factory.annotation.Autowired; |
| 10 | 6 | import org.springframework.security.access.ConfigAttribute; |
| 11 | -import org.springframework.security.access.SecurityConfig; | |
| 12 | -import org.springframework.security.web.FilterInvocation; | |
| 13 | 7 | import org.springframework.security.web.access.intercept.FilterInvocationSecurityMetadataSource; |
| 14 | 8 | import org.springframework.stereotype.Component; |
| 15 | 9 | import org.springframework.util.AntPathMatcher; |
| 16 | 10 | import org.springframework.util.PathMatcher; |
| 17 | 11 | |
| 18 | 12 | import java.util.Collection; |
| 19 | -import java.util.Iterator; | |
| 20 | -import java.util.List; | |
| 21 | -import java.util.Set; | |
| 22 | 13 | |
| 23 | 14 | @Component |
| 24 | 15 | public class SecurityMetadataSourceService implements |
| ... | ... | @@ -27,9 +18,6 @@ public class SecurityMetadataSourceService implements |
| 27 | 18 | @Autowired |
| 28 | 19 | RoleService roleService; |
| 29 | 20 | |
| 30 | - @Autowired | |
| 31 | - ResourceService resourceService; | |
| 32 | - | |
| 33 | 21 | private PathMatcher matcher = new AntPathMatcher(); |
| 34 | 22 | |
| 35 | 23 | private Multimap<String, ConfigAttribute> multimap; |
| ... | ... | @@ -38,7 +26,7 @@ public class SecurityMetadataSourceService implements |
| 38 | 26 | public void loadResourceDefine() throws Exception { |
| 39 | 27 | |
| 40 | 28 | |
| 41 | - multimap = ArrayListMultimap.create(); | |
| 29 | + /*multimap = ArrayListMultimap.create(); | |
| 42 | 30 | //获取所有资源 |
| 43 | 31 | List<Resource> resList = (List<Resource>) resourceService.findAll(); |
| 44 | 32 | |
| ... | ... | @@ -54,14 +42,14 @@ public class SecurityMetadataSourceService implements |
| 54 | 42 | for(Role role : roles) |
| 55 | 43 | multimap.put(url , new SecurityConfig(role.getCodeName())); |
| 56 | 44 | } |
| 57 | - } | |
| 45 | + }*/ | |
| 58 | 46 | System.out.println(multimap); |
| 59 | 47 | } |
| 60 | 48 | |
| 61 | 49 | public Collection<ConfigAttribute> getAttributes(Object object) |
| 62 | 50 | throws IllegalArgumentException { |
| 63 | 51 | |
| 64 | - FilterInvocation invocation = ((FilterInvocation) object); | |
| 52 | + /*FilterInvocation invocation = ((FilterInvocation) object); | |
| 65 | 53 | String method = invocation.getRequest().getMethod(); |
| 66 | 54 | String url = method.toLowerCase() + "#" + invocation.getRequestUrl(); |
| 67 | 55 | |
| ... | ... | @@ -78,7 +66,7 @@ public class SecurityMetadataSourceService implements |
| 78 | 66 | if(matcher.match(temp, url)){ |
| 79 | 67 | return multimap.get(url); |
| 80 | 68 | } |
| 81 | - } | |
| 69 | + }*/ | |
| 82 | 70 | |
| 83 | 71 | return null; |
| 84 | 72 | } | ... | ... |
src/main/java/com/bsth/security/util/SecurityUtils.java
| 1 | 1 | package com.bsth.security.util; |
| 2 | 2 | |
| 3 | -import com.bsth.entity.sys.Role; | |
| 4 | 3 | import com.bsth.entity.sys.SecurityUser; |
| 5 | 4 | import com.bsth.entity.sys.SysUser; |
| 6 | 5 | import org.slf4j.Logger; |
| 7 | 6 | import org.slf4j.LoggerFactory; |
| 8 | 7 | import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; |
| 9 | 8 | import org.springframework.security.core.GrantedAuthority; |
| 10 | -import org.springframework.security.core.authority.SimpleGrantedAuthority; | |
| 11 | 9 | import org.springframework.security.core.context.SecurityContext; |
| 12 | 10 | import org.springframework.security.core.context.SecurityContextHolder; |
| 13 | 11 | |
| 14 | 12 | import javax.servlet.http.HttpServletRequest; |
| 15 | 13 | import java.util.ArrayList; |
| 16 | 14 | import java.util.List; |
| 17 | -import java.util.Set; | |
| 18 | 15 | |
| 19 | 16 | /** |
| 20 | 17 | * @author PanZhao |
| ... | ... | @@ -46,10 +43,10 @@ public class SecurityUtils { |
| 46 | 43 | SecurityContext sContext = SecurityContextHolder.getContext(); |
| 47 | 44 | |
| 48 | 45 | List<GrantedAuthority> grantedAuths = new ArrayList<>(); |
| 49 | - Set<Role> set = user.getRoles(); | |
| 46 | + /*Set<Role> set = user.getRoles(); | |
| 50 | 47 | for(Role r : set){ |
| 51 | 48 | grantedAuths.add(new SimpleGrantedAuthority(r.getCodeName())); |
| 52 | - } | |
| 49 | + }*/ | |
| 53 | 50 | |
| 54 | 51 | sContext.setAuthentication(new UsernamePasswordAuthenticationToken(securityUser, securityUser.getAuthorities(), grantedAuths)); |
| 55 | 52 | request.getSession(true).setAttribute("SPRING_SECURITY_CONTEXT", sContext); | ... | ... |
src/main/java/com/bsth/service/schedule/ScheduleService.java
| 1 | 1 | package com.bsth.service.schedule; |
| 2 | 2 | |
| 3 | -import com.bsth.data.attendance.entity.JsyAttendance; | |
| 4 | 3 | import com.bsth.data.schedule.dto.ScheduleInOut; |
| 5 | 4 | |
| 6 | 5 | import java.util.Collection; |
| ... | ... | @@ -20,7 +19,6 @@ public interface ScheduleService { |
| 20 | 19 | |
| 21 | 20 | /** |
| 22 | 21 | * 驾驶员报到 |
| 23 | - * @param att | |
| 24 | 22 | |
| 25 | 23 | void jsyReport(JsyAttendance att); |
| 26 | 24 | */ |
| ... | ... | @@ -38,6 +36,8 @@ public interface ScheduleService { |
| 38 | 36 | |
| 39 | 37 | Map<String,Object> cycc(Map<String, Object> map); |
| 40 | 38 | |
| 39 | + Map<String,Object> tzrc_check(Map<String, String> map); | |
| 40 | + | |
| 41 | 41 | //void inOut(CarInOutEntity obj); |
| 42 | 42 | |
| 43 | 43 | //void busInOut(CarInOutEntity obj); | ... | ... |
src/main/java/com/bsth/service/schedule/impl/ScheduleServiceImpl.java
| ... | ... | @@ -7,17 +7,23 @@ import com.bsth.common.Constants; |
| 7 | 7 | import com.bsth.common.ResponseCode; |
| 8 | 8 | import com.bsth.data.abnormal.MainAbnormalClient; |
| 9 | 9 | import com.bsth.data.abnormal.entity.AbnormalEntity; |
| 10 | -import com.bsth.data.attendance.entity.JsyAttendance; | |
| 10 | +import com.bsth.data.basic.bus.BusDataBuffer; | |
| 11 | +import com.bsth.data.basic.line.LineDataBuffer; | |
| 12 | +import com.bsth.data.basic.person.PersonDataBuffer; | |
| 11 | 13 | import com.bsth.data.schedule.dto.ScheduleInOut; |
| 12 | 14 | import com.bsth.data.schedule.dto.dd.ScheduleRealInfo; |
| 13 | 15 | import com.bsth.data.schedule.real.ScheduleDataBuffer; |
| 14 | 16 | import com.bsth.data.utils.HttpClientUtils; |
| 15 | 17 | import com.bsth.data.utils.RsRequestUtils; |
| 18 | +import com.bsth.entity.Bus; | |
| 19 | +import com.bsth.entity.Line; | |
| 20 | +import com.bsth.entity.Person; | |
| 16 | 21 | import com.bsth.security.util.SecurityUtils; |
| 17 | 22 | import com.bsth.service.schedule.ScheduleService; |
| 18 | 23 | import com.bsth.util.ConfigUtil; |
| 19 | 24 | import com.google.common.base.Splitter; |
| 20 | 25 | import org.apache.commons.lang3.StringEscapeUtils; |
| 26 | +import org.apache.commons.lang3.StringUtils; | |
| 21 | 27 | import org.joda.time.format.DateTimeFormat; |
| 22 | 28 | import org.joda.time.format.DateTimeFormatter; |
| 23 | 29 | import org.slf4j.Logger; |
| ... | ... | @@ -69,21 +75,18 @@ public class ScheduleServiceImpl implements ScheduleService { |
| 69 | 75 | /** |
| 70 | 76 | * 驾驶员报到了哦.... |
| 71 | 77 | * |
| 72 | - * @param att | |
| 73 | - | |
| 74 | - @Override | |
| 75 | - public void jsyReport(JsyAttendance att) { | |
| 76 | - //驾驶员的出场计划 | |
| 77 | - ScheduleInOut sio = ScheduleDataBuffer.getCurrExecOut(att.getCompany(), att.getUserId(), att.getAt()); | |
| 78 | - | |
| 79 | - //报到时间不覆盖 | |
| 80 | - if (sio.getAttSjTime() != null) | |
| 81 | - return; | |
| 82 | - | |
| 83 | - sio.setAttSjTime(att.getAt()); | |
| 84 | - //通知页面 | |
| 85 | - | |
| 86 | - } | |
| 78 | + * @Override public void jsyReport(JsyAttendance att) { | |
| 79 | + * //驾驶员的出场计划 | |
| 80 | + * ScheduleInOut sio = ScheduleDataBuffer.getCurrExecOut(att.getCompany(), att.getUserId(), att.getAt()); | |
| 81 | + * <p> | |
| 82 | + * //报到时间不覆盖 | |
| 83 | + * if (sio.getAttSjTime() != null) | |
| 84 | + * return; | |
| 85 | + * <p> | |
| 86 | + * sio.setAttSjTime(att.getAt()); | |
| 87 | + * //通知页面 | |
| 88 | + * <p> | |
| 89 | + * } | |
| 87 | 90 | */ |
| 88 | 91 | @Override |
| 89 | 92 | public Map<String, Object> findAbnormalByLineArray(String idx) { |
| ... | ... | @@ -91,12 +94,12 @@ public class ScheduleServiceImpl implements ScheduleService { |
| 91 | 94 | try { |
| 92 | 95 | List<String> lineArray = Splitter.on(",").splitToList(idx); |
| 93 | 96 | List<AbnormalEntity> list = new ArrayList<>(), |
| 94 | - subList; | |
| 97 | + subList; | |
| 95 | 98 | for (String lineCode : lineArray) { |
| 96 | 99 | subList = mainAbnormalClient.findByLine(lineCode); |
| 97 | 100 | |
| 98 | - for(AbnormalEntity ae : subList){ | |
| 99 | - if(null == ae.getHandlerTime()) | |
| 101 | + for (AbnormalEntity ae : subList) { | |
| 102 | + if (null == ae.getHandlerTime()) | |
| 100 | 103 | list.add(ae); |
| 101 | 104 | } |
| 102 | 105 | } |
| ... | ... | @@ -121,7 +124,7 @@ public class ScheduleServiceImpl implements ScheduleService { |
| 121 | 124 | @Override |
| 122 | 125 | public Map<String, Object> findSchByLpName(String lineCode, String lpName) { |
| 123 | 126 | Map<String, Object> rs = new HashMap<>(); |
| 124 | - try{ | |
| 127 | + try { | |
| 125 | 128 | //从集调接口获取路牌下的班次信息 |
| 126 | 129 | lpName = URLEncoder.encode(lpName, "UTF-8"); |
| 127 | 130 | String url = dataUrl + "/findByLpName/" + lineCode + "/" + lpName + RsRequestUtils.getParams(); |
| ... | ... | @@ -130,7 +133,7 @@ public class ScheduleServiceImpl implements ScheduleService { |
| 130 | 133 | |
| 131 | 134 | rs.put("list", list); |
| 132 | 135 | rs.put("status", ResponseCode.SUCCESS); |
| 133 | - }catch (Exception e){ | |
| 136 | + } catch (Exception e) { | |
| 134 | 137 | rs.put("status", ResponseCode.ERROR); |
| 135 | 138 | logger.error("", e); |
| 136 | 139 | } |
| ... | ... | @@ -140,12 +143,12 @@ public class ScheduleServiceImpl implements ScheduleService { |
| 140 | 143 | @Override |
| 141 | 144 | public List<ScheduleInOut> findOutByIdx(String idx) { |
| 142 | 145 | List<ScheduleInOut> rs = new ArrayList<>(); |
| 143 | - try{ | |
| 146 | + try { | |
| 144 | 147 | List<String> lineArray = Splitter.on(",").splitToList(idx); |
| 145 | - for(String code : lineArray){ | |
| 148 | + for (String code : lineArray) { | |
| 146 | 149 | rs.addAll(ScheduleDataBuffer.findOutByLine(code)); |
| 147 | 150 | } |
| 148 | - }catch (Exception e){ | |
| 151 | + } catch (Exception e) { | |
| 149 | 152 | logger.error("", e); |
| 150 | 153 | } |
| 151 | 154 | return rs; |
| ... | ... | @@ -154,13 +157,13 @@ public class ScheduleServiceImpl implements ScheduleService { |
| 154 | 157 | @Override |
| 155 | 158 | public Map<String, Object> dftz(Map<String, Object> map) { |
| 156 | 159 | Map<String, Object> rs = new HashMap<>(); |
| 157 | - try{ | |
| 160 | + try { | |
| 158 | 161 | map.put("userId", SecurityUtils.getCurrentUser().getUserName()); |
| 159 | 162 | StringBuilder sb = HttpClientUtils.post(dataUrl + "/tcc_dftz" + RsRequestUtils.getParams(), JSON.toJSONString(map)); |
| 160 | 163 | |
| 161 | 164 | rs = JSON.parseObject(sb.toString()); |
| 162 | 165 | |
| 163 | - if("SUCCESS".equals(rs.get("status"))){ | |
| 166 | + if ("SUCCESS".equals(rs.get("status"))) { | |
| 164 | 167 | ScheduleInOut sio = JSON.toJavaObject(JSON.parseObject(rs.get("t").toString()), ScheduleInOut.class); |
| 165 | 168 | scheduleDataBuffer.put(sio); |
| 166 | 169 | |
| ... | ... | @@ -170,7 +173,7 @@ public class ScheduleServiceImpl implements ScheduleService { |
| 170 | 173 | rs.put("aes", aes); |
| 171 | 174 | rs.put("t", ScheduleDataBuffer.findById(sio.getId())); |
| 172 | 175 | } |
| 173 | - }catch (Exception e){ | |
| 176 | + } catch (Exception e) { | |
| 174 | 177 | logger.error("", e); |
| 175 | 178 | rs.put("status", ResponseCode.ERROR); |
| 176 | 179 | rs.put("msg", "服务器出现异常!"); |
| ... | ... | @@ -181,7 +184,7 @@ public class ScheduleServiceImpl implements ScheduleService { |
| 181 | 184 | @Override |
| 182 | 185 | public Map<String, Object> tzrc(String cpcsJson) { |
| 183 | 186 | JSONObject rs = new JSONObject(); |
| 184 | - try{ | |
| 187 | + try { | |
| 185 | 188 | cpcsJson = StringEscapeUtils.unescapeHtml4(cpcsJson); |
| 186 | 189 | Map<String, Object> params = new HashMap<>(); |
| 187 | 190 | |
| ... | ... | @@ -193,10 +196,10 @@ public class ScheduleServiceImpl implements ScheduleService { |
| 193 | 196 | rs = JSON.parseObject(sb.toString()); |
| 194 | 197 | |
| 195 | 198 | |
| 196 | - if("SUCCESS".equals(rs.get("status"))){ | |
| 199 | + if ("SUCCESS".equals(rs.get("status"))) { | |
| 197 | 200 | List<ScheduleInOut> list = JSONArray.parseArray(rs.getString("list"), ScheduleInOut.class);//有更新的出场班次 |
| 198 | 201 | List<AbnormalEntity> aes = new ArrayList<>();//有更新的异常信息 |
| 199 | - for(ScheduleInOut sio : list){ | |
| 202 | + for (ScheduleInOut sio : list) { | |
| 200 | 203 | scheduleDataBuffer.put(sio); |
| 201 | 204 | aes.addAll(mainAbnormalClient.updateTzrc(sio)); |
| 202 | 205 | } |
| ... | ... | @@ -207,7 +210,7 @@ public class ScheduleServiceImpl implements ScheduleService { |
| 207 | 210 | |
| 208 | 211 | //重新按人车分组数据 |
| 209 | 212 | ScheduleDataBuffer.p_c_mapps(); |
| 210 | - }catch (Exception e){ | |
| 213 | + } catch (Exception e) { | |
| 211 | 214 | logger.error("", e); |
| 212 | 215 | rs.put("status", ResponseCode.ERROR); |
| 213 | 216 | rs.put("msg", "服务器出现异常!"); |
| ... | ... | @@ -219,7 +222,7 @@ public class ScheduleServiceImpl implements ScheduleService { |
| 219 | 222 | public Map<String, Object> rybd(Map<String, Object> map) { |
| 220 | 223 | Map<String, Object> rs = new HashMap<>(); |
| 221 | 224 | |
| 222 | - try{ | |
| 225 | + try { | |
| 223 | 226 | String rq = map.get("rq").toString(); |
| 224 | 227 | String timeStr = map.get("attSjTimeStr").toString(); |
| 225 | 228 | String reason = map.get("reason").toString(); |
| ... | ... | @@ -227,13 +230,13 @@ public class ScheduleServiceImpl implements ScheduleService { |
| 227 | 230 | Long id = Long.parseLong(map.get("schId").toString()); |
| 228 | 231 | |
| 229 | 232 | |
| 230 | - long time = fmtyyyyMMddHHmm.parseMillis(rq+timeStr); | |
| 233 | + long time = fmtyyyyMMddHHmm.parseMillis(rq + timeStr); | |
| 231 | 234 | |
| 232 | 235 | //班次设置签到时间 |
| 233 | 236 | ScheduleInOut sio = ScheduleDataBuffer.findById(id); |
| 234 | 237 | |
| 235 | 238 | //已经报到了 |
| 236 | - if(null != sio && null != sio.getAttSjTime()){ | |
| 239 | + if (null != sio && null != sio.getAttSjTime()) { | |
| 237 | 240 | rs.put("status", ResponseCode.ERROR); |
| 238 | 241 | rs.put("msg", "操作失败,班次已签到!"); |
| 239 | 242 | return rs; |
| ... | ... | @@ -241,12 +244,12 @@ public class ScheduleServiceImpl implements ScheduleService { |
| 241 | 244 | sio.setAttSjTime(time); |
| 242 | 245 | |
| 243 | 246 | //处理掉异常 |
| 244 | - AbnormalEntity ae = mainAbnormalClient.rybd(id,timeStr,reason,remarks); | |
| 247 | + AbnormalEntity ae = mainAbnormalClient.rybd(id, timeStr, reason, remarks); | |
| 245 | 248 | |
| 246 | 249 | rs.put("status", ResponseCode.SUCCESS); |
| 247 | 250 | rs.put("t", sio); |
| 248 | 251 | rs.put("ae", ae); |
| 249 | - }catch (Exception e){ | |
| 252 | + } catch (Exception e) { | |
| 250 | 253 | logger.error("", e); |
| 251 | 254 | rs.put("status", ResponseCode.ERROR); |
| 252 | 255 | } |
| ... | ... | @@ -257,7 +260,7 @@ public class ScheduleServiceImpl implements ScheduleService { |
| 257 | 260 | public Map<String, Object> cycc(Map<String, Object> map) { |
| 258 | 261 | Map<String, Object> rs = new HashMap<>(); |
| 259 | 262 | |
| 260 | - try{ | |
| 263 | + try { | |
| 261 | 264 | String rq = map.get("rq").toString(); |
| 262 | 265 | String timeStr = map.get("outSjTimeStr").toString(); |
| 263 | 266 | String reason = map.get("reason").toString(); |
| ... | ... | @@ -265,11 +268,11 @@ public class ScheduleServiceImpl implements ScheduleService { |
| 265 | 268 | Long id = Long.parseLong(map.get("schId").toString()); |
| 266 | 269 | |
| 267 | 270 | |
| 268 | - long time = fmtyyyyMMddHHmm.parseMillis(rq+timeStr); | |
| 271 | + long time = fmtyyyyMMddHHmm.parseMillis(rq + timeStr); | |
| 269 | 272 | |
| 270 | 273 | //班次设置RFID出场时间 |
| 271 | 274 | ScheduleInOut sio = ScheduleDataBuffer.findById(id); |
| 272 | - if(null != sio && null != sio.getOutTimeRfid()){ | |
| 275 | + if (null != sio && null != sio.getOutTimeRfid()) { | |
| 273 | 276 | rs.put("status", ResponseCode.ERROR); |
| 274 | 277 | rs.put("msg", "操作失败,班次状态已出场!"); |
| 275 | 278 | return rs; |
| ... | ... | @@ -279,13 +282,85 @@ public class ScheduleServiceImpl implements ScheduleService { |
| 279 | 282 | sio.setCcTimeUser(SecurityUtils.getCurrentUser().getUserName()); |
| 280 | 283 | |
| 281 | 284 | //处理掉异常 |
| 282 | - AbnormalEntity ae = mainAbnormalClient.cycc(id,timeStr,reason,remarks); | |
| 285 | + AbnormalEntity ae = mainAbnormalClient.cycc(id, timeStr, reason, remarks); | |
| 283 | 286 | |
| 284 | 287 | rs.put("status", ResponseCode.SUCCESS); |
| 285 | 288 | rs.put("t", sio); |
| 286 | 289 | rs.put("ae", ae); |
| 287 | - }catch (Exception e){ | |
| 290 | + } catch (Exception e) { | |
| 291 | + logger.error("", e); | |
| 292 | + rs.put("status", ResponseCode.ERROR); | |
| 293 | + } | |
| 294 | + return rs; | |
| 295 | + } | |
| 296 | + | |
| 297 | + @Override | |
| 298 | + public Map<String, Object> tzrc_check(Map<String, String> map) { | |
| 299 | + Map<String, Object> rs = new HashMap<>(); | |
| 300 | + try { | |
| 301 | + rs.put("status", ResponseCode.SUCCESS); | |
| 302 | + String jsy = map.get("jsy"); | |
| 303 | + String lineCode = map.get("line"); | |
| 304 | + String nbbm = map.get("nbbm"); | |
| 305 | + String spy = map.get("spy"); | |
| 306 | + | |
| 307 | + Line line = LineDataBuffer.get(lineCode); | |
| 308 | + String gsbm = line.getCompany(); | |
| 309 | + String fgsbm = line.getBrancheCompany(); | |
| 310 | + Person p; | |
| 311 | + //校验驾驶员 | |
| 312 | + | |
| 313 | + if (StringUtils.isNotEmpty(jsy)) { | |
| 314 | + String jGh = jsy.split("/")[0]; | |
| 315 | + | |
| 316 | + p = PersonDataBuffer.findOne(gsbm + "-" + jGh); | |
| 317 | + if (null == p) { | |
| 318 | + rs.put("cStatus", -2); | |
| 319 | + rs.put("msg", line.getName() + " 所属公司下没有工号为【" + jGh + "】的人员(驾驶员)!"); | |
| 320 | + return rs; | |
| 321 | + } else if (!p.getBrancheCompanyCode().equals(fgsbm)) { | |
| 322 | + rs.put("cStatus", -2); | |
| 323 | + rs.put("msg", "暂不允许跨分公司调人(驾驶员)!"); | |
| 324 | + return rs; | |
| 325 | + } | |
| 326 | + | |
| 327 | + } | |
| 328 | + | |
| 329 | + | |
| 330 | + if (StringUtils.isNotEmpty(nbbm)) { | |
| 331 | + Bus b = BusDataBuffer.findOne(nbbm); | |
| 332 | + if (null == b) { | |
| 333 | + rs.put("cStatus", -2); | |
| 334 | + rs.put("msg", line.getName() + " 所属公司下没有自编号为【" + nbbm + "】的车辆!"); | |
| 335 | + return rs; | |
| 336 | + } else if (!b.getBrancheCompanyCode().equals(fgsbm)) { | |
| 337 | + rs.put("cStatus", -2); | |
| 338 | + rs.put("msg", "暂不允许跨分公司调车!"); | |
| 339 | + return rs; | |
| 340 | + } | |
| 341 | + } | |
| 342 | + | |
| 343 | + | |
| 344 | + if (StringUtils.isNotEmpty(spy) | |
| 345 | + && StringUtils.trim(spy).length() > 1) { | |
| 346 | + String sGh = spy.split("/")[0]; | |
| 347 | + | |
| 348 | + p = PersonDataBuffer.findOne(gsbm + "-" + sGh); | |
| 349 | + | |
| 350 | + if (null == p) { | |
| 351 | + rs.put("cStatus", -2); | |
| 352 | + rs.put("msg", line.getName() + " 所属公司下没有工号为【" + sGh + "】的人员(售票员)!"); | |
| 353 | + return rs; | |
| 354 | + } else if (!p.getBrancheCompanyCode().equals(fgsbm)) { | |
| 355 | + rs.put("cStatus", -2); | |
| 356 | + rs.put("msg", "暂不允许跨分公司调人(售票员)!"); | |
| 357 | + return rs; | |
| 358 | + } | |
| 359 | + } | |
| 360 | + | |
| 361 | + } catch (Exception e) { | |
| 288 | 362 | logger.error("", e); |
| 363 | + rs.put("msg", "服务器出现异常!"); | |
| 289 | 364 | rs.put("status", ResponseCode.ERROR); |
| 290 | 365 | } |
| 291 | 366 | return rs; | ... | ... |
src/main/java/com/bsth/service/sys/ModuleService.java deleted
100644 → 0
| 1 | -package com.bsth.service.sys; | |
| 2 | - | |
| 3 | -import com.bsth.entity.sys.Module; | |
| 4 | -import com.bsth.service.BaseService; | |
| 5 | - | |
| 6 | -import java.util.List; | |
| 7 | - | |
| 8 | -public interface ModuleService extends BaseService<Module, Integer>{ | |
| 9 | - | |
| 10 | - List<Module> findByGroupType(String group); | |
| 11 | - | |
| 12 | - List<Module> findByCurrentUser(); | |
| 13 | - | |
| 14 | - List<Module> findAll_distinct(); | |
| 15 | -} |
src/main/java/com/bsth/service/sys/ResourceService.java deleted
100644 → 0
| 1 | -package com.bsth.service.sys; | |
| 2 | - | |
| 3 | -import java.util.List; | |
| 4 | -import java.util.Map; | |
| 5 | - | |
| 6 | -import com.bsth.entity.sys.Resource; | |
| 7 | -import com.bsth.service.BaseService; | |
| 8 | - | |
| 9 | -public interface ResourceService extends BaseService<Resource, Integer> { | |
| 10 | - | |
| 11 | - Map<String, Object> saveList(List<Resource> parseArray); | |
| 12 | - | |
| 13 | - List<Resource> findByRolesId(Integer id); | |
| 14 | - | |
| 15 | -} |
src/main/java/com/bsth/service/sys/RoleService.java
| 1 | 1 | package com.bsth.service.sys; |
| 2 | 2 | |
| 3 | -import java.util.Map; | |
| 4 | - | |
| 5 | 3 | import com.bsth.entity.sys.Role; |
| 6 | 4 | import com.bsth.service.BaseService; |
| 7 | 5 | |
| 6 | +import java.util.Map; | |
| 7 | + | |
| 8 | 8 | public interface RoleService extends BaseService<Role, Integer>{ |
| 9 | + Map<String,Object> saveAuthStr(String authStr, int id); | |
| 10 | + | |
| 11 | + Map<String,Object> add(String roleName); | |
| 9 | 12 | |
| 10 | - Map<String, Object> settRoleModules(Integer roleId, String mIds); | |
| 13 | + /*Map<String, Object> settRoleModules(Integer roleId, String mIds); | |
| 11 | 14 | |
| 12 | - Map<String, Object> roleInfo(Integer id); | |
| 15 | + Map<String, Object> roleInfo(Integer id);*/ | |
| 13 | 16 | } | ... | ... |
src/main/java/com/bsth/service/sys/impl/ModuleServiceImpl.java deleted
100644 → 0
| 1 | -package com.bsth.service.sys.impl; | |
| 2 | - | |
| 3 | -import com.bsth.common.ResponseCode; | |
| 4 | -import com.bsth.entity.sys.Module; | |
| 5 | -import com.bsth.entity.sys.Role; | |
| 6 | -import com.bsth.entity.sys.SysUser; | |
| 7 | -import com.bsth.repository.sys.ModuleRepository; | |
| 8 | -import com.bsth.security.util.SecurityUtils; | |
| 9 | -import com.bsth.service.impl.BaseServiceImpl; | |
| 10 | -import com.bsth.service.sys.ModuleService; | |
| 11 | -import org.springframework.beans.factory.annotation.Autowired; | |
| 12 | -import org.springframework.jdbc.core.JdbcTemplate; | |
| 13 | -import org.springframework.jdbc.core.RowMapper; | |
| 14 | -import org.springframework.stereotype.Service; | |
| 15 | - | |
| 16 | -import java.sql.ResultSet; | |
| 17 | -import java.sql.SQLException; | |
| 18 | -import java.util.*; | |
| 19 | - | |
| 20 | -@Service | |
| 21 | -public class ModuleServiceImpl extends BaseServiceImpl<Module, Integer> implements ModuleService{ | |
| 22 | - | |
| 23 | - @Autowired | |
| 24 | - ModuleRepository moduleRepository; | |
| 25 | - | |
| 26 | - @Autowired | |
| 27 | - JdbcTemplate jdbcTemplate; | |
| 28 | - | |
| 29 | - @Override | |
| 30 | - public List<Module> findByGroupType(String group) { | |
| 31 | - String[] array; | |
| 32 | - if(group.indexOf(",") != -1){ | |
| 33 | - array = group.split(","); | |
| 34 | - } | |
| 35 | - else | |
| 36 | - array = new String[]{group}; | |
| 37 | - return moduleRepository.findByGroupType(array); | |
| 38 | - } | |
| 39 | - | |
| 40 | - @Override | |
| 41 | - public Map<String, Object> delete(Integer id) { | |
| 42 | - | |
| 43 | - Map<String, Object> map = new HashMap<>(); | |
| 44 | - | |
| 45 | - //判断删除的节点是否有子节点 | |
| 46 | - List<Module> list = moduleRepository.findByPId(id); | |
| 47 | - | |
| 48 | - if(null != list && list.size() > 0){ | |
| 49 | - map.put("status", ResponseCode.ERROR); | |
| 50 | - map.put("msg", "失败,要删除的项还存在子节点"); | |
| 51 | - } | |
| 52 | - else{ | |
| 53 | - map = super.delete(id); | |
| 54 | - } | |
| 55 | - return map; | |
| 56 | - } | |
| 57 | - | |
| 58 | - @Override | |
| 59 | - public List<Module> findByCurrentUser() { | |
| 60 | - | |
| 61 | - SysUser user = SecurityUtils.getCurrentUser(); | |
| 62 | - Set<Role> roles = user.getRoles(); | |
| 63 | - | |
| 64 | - String inCond = ""; | |
| 65 | - for(Role r : roles) | |
| 66 | - inCond += ("," + r.getId()); | |
| 67 | - | |
| 68 | - inCond = "(" + inCond.substring(1) + ")"; | |
| 69 | - | |
| 70 | - String sql = "select ID,CREATE_DATE,`ENABLE`,GROUP_TYPE,ICON,MAPP_SYMBOL,NAME,P_ID,PATH,UPDATE_DATE,CONTAINER from bsth_c_sys_module m where id in (select modules from bsth_c_sys_role_modules where roles in "+inCond+") or group_type != 3"; | |
| 71 | - List<Module> all = jdbcTemplate.query(sql, new ModuleRowMapper()) | |
| 72 | - ,rs = new ArrayList<>(); | |
| 73 | - | |
| 74 | - Map<Integer, Module> map = new HashMap<>(); | |
| 75 | - for(Module m : all){ | |
| 76 | - map.put(m.getId(), m); | |
| 77 | - if(m.getGroupType().equals("3")) | |
| 78 | - rs.add(m); | |
| 79 | - } | |
| 80 | - | |
| 81 | - //上层目录和组节点 | |
| 82 | - Set<Module> pSet = new HashSet<>(); | |
| 83 | - for(Module m : rs){ | |
| 84 | - searchParentNode(m, map, pSet); | |
| 85 | - } | |
| 86 | - rs.addAll(pSet); | |
| 87 | - | |
| 88 | - //排序 | |
| 89 | - Collections.sort(rs, new Comparator<Module>() { | |
| 90 | - @Override | |
| 91 | - public int compare(Module o1, Module o2) { | |
| 92 | - return o1.getId() - o2.getId(); | |
| 93 | - } | |
| 94 | - }); | |
| 95 | - return rs; | |
| 96 | - } | |
| 97 | - | |
| 98 | - @Override | |
| 99 | - public List<Module> findAll_distinct() { | |
| 100 | - return moduleRepository.findAll_distinct(); | |
| 101 | - } | |
| 102 | - | |
| 103 | - /** | |
| 104 | - * | |
| 105 | - * @Title: searchParentNode | |
| 106 | - * @Description: TODO(搜索上层节点) | |
| 107 | - * @param @param m 当前节点 | |
| 108 | - * @param @param idMap 全量的ID和节点对照 | |
| 109 | - * @param @param pSet 上层节点容器 | |
| 110 | - * @throws | |
| 111 | - */ | |
| 112 | - public void searchParentNode(Module m, Map<Integer, Module> idMap, Set<Module> pSet){ | |
| 113 | - int pId = m.getpId(); | |
| 114 | - if(pId > 0){ | |
| 115 | - Module pModule = idMap.get(pId); | |
| 116 | - pSet.add(pModule); | |
| 117 | - | |
| 118 | - if(null != pModule && | |
| 119 | - null != pModule.getpId() | |
| 120 | - && pModule.getpId() > 0) | |
| 121 | - searchParentNode(pModule, idMap, pSet); | |
| 122 | - } | |
| 123 | - } | |
| 124 | - | |
| 125 | - public class ModuleRowMapper implements RowMapper<Module>{ | |
| 126 | - | |
| 127 | - @Override | |
| 128 | - public Module mapRow(ResultSet rs, int rowNum) throws SQLException { | |
| 129 | - Module module = new Module(); | |
| 130 | - module.setId(rs.getInt("ID")); | |
| 131 | - module.setCreateDate(rs.getDate("CREATE_DATE")); | |
| 132 | - module.setEnable(rs.getBoolean("ENABLE")); | |
| 133 | - module.setGroupType(rs.getString("GROUP_TYPE")); | |
| 134 | - module.setIcon(rs.getString("ICON")); | |
| 135 | - module.setMappSymbol(rs.getString("MAPP_SYMBOL")); | |
| 136 | - module.setName(rs.getString("NAME")); | |
| 137 | - module.setpId(rs.getInt("P_ID")); | |
| 138 | - module.setPath(rs.getString("PATH")); | |
| 139 | - module.setUpdateDate(rs.getDate("UPDATE_DATE")); | |
| 140 | - module.setContainer(rs.getString("CONTAINER")); | |
| 141 | - return module; | |
| 142 | - } | |
| 143 | - } | |
| 144 | -} |
src/main/java/com/bsth/service/sys/impl/ResourceServiceImpl.java deleted
100644 → 0
| 1 | -package com.bsth.service.sys.impl; | |
| 2 | - | |
| 3 | -import java.util.HashMap; | |
| 4 | -import java.util.List; | |
| 5 | -import java.util.Map; | |
| 6 | - | |
| 7 | -import org.slf4j.Logger; | |
| 8 | -import org.slf4j.LoggerFactory; | |
| 9 | -import org.springframework.beans.factory.annotation.Autowired; | |
| 10 | -import org.springframework.stereotype.Service; | |
| 11 | - | |
| 12 | -import com.bsth.common.ResponseCode; | |
| 13 | -import com.bsth.entity.sys.Resource; | |
| 14 | -import com.bsth.repository.sys.ResourceRepository; | |
| 15 | -import com.bsth.service.impl.BaseServiceImpl; | |
| 16 | -import com.bsth.service.sys.ResourceService; | |
| 17 | - | |
| 18 | -@Service | |
| 19 | -public class ResourceServiceImpl extends BaseServiceImpl<Resource, Integer> implements ResourceService{ | |
| 20 | - | |
| 21 | - @Autowired | |
| 22 | - ResourceRepository resourceRepository; | |
| 23 | - | |
| 24 | - Logger logger = LoggerFactory.getLogger(this.getClass()); | |
| 25 | - | |
| 26 | - @Override | |
| 27 | - public Map<String, Object> saveList(List<Resource> array) { | |
| 28 | - Map<String, Object> map = new HashMap<>(); | |
| 29 | - try{ | |
| 30 | - resourceRepository.save(array); | |
| 31 | - map.put("status", ResponseCode.SUCCESS); | |
| 32 | - }catch(Exception e){ | |
| 33 | - map.put("status", ResponseCode.ERROR); | |
| 34 | - logger.error("", e); | |
| 35 | - } | |
| 36 | - return map; | |
| 37 | - } | |
| 38 | - | |
| 39 | - @Override | |
| 40 | - public List<Resource> findByRolesId(Integer id) { | |
| 41 | - return resourceRepository.findByRolesId(id); | |
| 42 | - } | |
| 43 | -} |
src/main/java/com/bsth/service/sys/impl/RoleServiceImpl.java
| 1 | 1 | package com.bsth.service.sys.impl; |
| 2 | 2 | |
| 3 | -import java.text.SimpleDateFormat; | |
| 4 | -import java.util.ArrayList; | |
| 5 | -import java.util.HashMap; | |
| 6 | -import java.util.Iterator; | |
| 7 | -import java.util.List; | |
| 8 | -import java.util.Map; | |
| 9 | -import java.util.Set; | |
| 10 | - | |
| 11 | -import org.slf4j.Logger; | |
| 12 | -import org.slf4j.LoggerFactory; | |
| 13 | -import org.springframework.beans.factory.annotation.Autowired; | |
| 14 | -import org.springframework.stereotype.Service; | |
| 15 | - | |
| 16 | 3 | import com.bsth.common.ResponseCode; |
| 17 | -import com.bsth.entity.sys.Module; | |
| 18 | 4 | import com.bsth.entity.sys.Role; |
| 19 | -import com.bsth.entity.sys.SysUser; | |
| 20 | -import com.bsth.repository.sys.ModuleRepository; | |
| 21 | 5 | import com.bsth.repository.sys.RoleRepository; |
| 22 | 6 | import com.bsth.service.impl.BaseServiceImpl; |
| 23 | 7 | import com.bsth.service.sys.RoleService; |
| 8 | +import com.github.stuxuhai.jpinyin.PinyinHelper; | |
| 9 | +import org.apache.commons.lang3.StringUtils; | |
| 10 | +import org.slf4j.Logger; | |
| 11 | +import org.slf4j.LoggerFactory; | |
| 12 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 13 | +import org.springframework.jdbc.core.JdbcTemplate; | |
| 14 | +import org.springframework.stereotype.Service; | |
| 15 | + | |
| 16 | +import java.text.SimpleDateFormat; | |
| 17 | +import java.util.HashMap; | |
| 18 | +import java.util.List; | |
| 19 | +import java.util.Map; | |
| 24 | 20 | |
| 25 | 21 | @Service |
| 26 | 22 | public class RoleServiceImpl extends BaseServiceImpl<Role, Integer> implements |
| ... | ... | @@ -28,79 +24,63 @@ public class RoleServiceImpl extends BaseServiceImpl<Role, Integer> implements |
| 28 | 24 | |
| 29 | 25 | Logger logger = LoggerFactory.getLogger(this.getClass()); |
| 30 | 26 | |
| 27 | + SimpleDateFormat sdfMinute = new SimpleDateFormat("yyyy-MM-dd HH:mm"); | |
| 28 | + | |
| 31 | 29 | @Autowired |
| 32 | - RoleRepository roleRepository; | |
| 30 | + JdbcTemplate jdbcTemplate; | |
| 33 | 31 | |
| 34 | 32 | @Autowired |
| 35 | - ModuleRepository moduleRepository; | |
| 36 | - | |
| 37 | - SimpleDateFormat sdfMinute = new SimpleDateFormat("yyyy-MM-dd HH:mm"); | |
| 33 | + RoleRepository roleRepository; | |
| 38 | 34 | |
| 39 | 35 | @Override |
| 40 | - public Map<String, Object> save(Role t) { | |
| 41 | - if (t.getId() != null) { | |
| 42 | - // 更新 | |
| 43 | - Map<String, Object> map = new HashMap<>(); | |
| 44 | - try { | |
| 45 | - roleRepository.update(t.getCodeName(), t.getRoleName(), | |
| 46 | - t.isEnable(), t.getDescriptions(), t.getId()); | |
| 47 | - map.put("status", ResponseCode.SUCCESS); | |
| 48 | - } catch (Exception e) { | |
| 49 | - map.put("status", ResponseCode.ERROR); | |
| 50 | - } | |
| 51 | - return map; | |
| 36 | + public Map<String, Object> saveAuthStr(String authStr,int id) { | |
| 37 | + Map<String, Object> rs = new HashMap(); | |
| 38 | + try { | |
| 39 | + jdbcTemplate.update("update bsth_c_sys_role set menu_str=? where id=?", authStr, id); | |
| 40 | + | |
| 41 | + rs.put("status", ResponseCode.SUCCESS); | |
| 42 | + }catch (Exception e){ | |
| 43 | + logger.error("", e); | |
| 44 | + rs.put("status", ResponseCode.ERROR); | |
| 52 | 45 | } |
| 53 | - return super.save(t); | |
| 46 | + return rs; | |
| 54 | 47 | } |
| 55 | 48 | |
| 56 | 49 | @Override |
| 57 | - public Map<String, Object> settRoleModules(Integer roleId, String mIds) { | |
| 58 | - | |
| 59 | - Map<String, Object> map = new HashMap<>(); | |
| 50 | + public Map<String, Object> add(String roleName) { | |
| 51 | + Map<String, Object> rs = new HashMap(); | |
| 60 | 52 | try { |
| 61 | - Role role = roleRepository.findOne(roleId); | |
| 62 | 53 | |
| 63 | - List<Integer> idList = new ArrayList<>(); | |
| 64 | - String[] array = mIds.split(","); | |
| 65 | - for (String id : array) { | |
| 66 | - if (null == id || id.trim().equals("")) | |
| 67 | - continue; | |
| 68 | - idList.add(Integer.parseInt(id)); | |
| 54 | + if(StringUtils.isEmpty(roleName)){ | |
| 55 | + rs.put("status", ResponseCode.ERROR); | |
| 56 | + rs.put("msg", "角色名称不能为空!"); | |
| 57 | + return rs; | |
| 69 | 58 | } |
| 70 | 59 | |
| 71 | - Set<Module> mList = moduleRepository.findByIds(idList); | |
| 72 | - role.setModules(mList); | |
| 73 | - roleRepository.save(role); | |
| 74 | - map.put("status", ResponseCode.SUCCESS); | |
| 75 | - } catch (Exception e) { | |
| 76 | - logger.error("", e); | |
| 77 | - map.put("status", ResponseCode.ERROR); | |
| 78 | - } | |
| 79 | - return map; | |
| 80 | - } | |
| 81 | - | |
| 82 | - @Override | |
| 83 | - public Map<String, Object> roleInfo(Integer id) { | |
| 84 | - Map<String, Object> map = new HashMap<>(); | |
| 85 | - Role role = roleRepository.findOne(id); | |
| 86 | - map.put("codeName", role.getCodeName()); | |
| 87 | - map.put("roleName", role.getRoleName()); | |
| 88 | - map.put("createDate", sdfMinute.format(role.getCreateDate())); | |
| 89 | - map.put("updateDate", sdfMinute.format(role.getUpdateDate())); | |
| 90 | - map.put("enable", role.isEnable()==true?1:0); | |
| 91 | - map.put("descriptions", role.getDescriptions()); | |
| 92 | - map.put("modules", role.getModules().size()); | |
| 93 | - map.put("resources", role.getResources().size()); | |
| 94 | - String userNames = ""; | |
| 95 | - Set<SysUser> users = role.getUsers(); | |
| 96 | - if(!users.isEmpty()){ | |
| 97 | - Iterator<SysUser> it = users.iterator(); | |
| 98 | - while(it.hasNext()){ | |
| 99 | - SysUser user = it.next(); | |
| 100 | - userNames = user.getUserName()+"..."; | |
| 60 | + //角色名称是否存在 | |
| 61 | + List<Role> list = roleRepository.findByRoleName(roleName); | |
| 62 | + if(list != null && list.size() > 0){ | |
| 63 | + rs.put("status", ResponseCode.ERROR); | |
| 64 | + rs.put("msg", "角色名称【" + roleName + "】已存在!"); | |
| 65 | + return rs; | |
| 101 | 66 | } |
| 67 | + | |
| 68 | + Role r = new Role(); | |
| 69 | + String code = "ROLE_" + PinyinHelper.getShortPinyin(roleName).toUpperCase(); | |
| 70 | + r.setCodeName(code); | |
| 71 | + r.setRoleName(roleName); | |
| 72 | + r.setEnable(true); | |
| 73 | + r.setMenuStr(""); | |
| 74 | + | |
| 75 | + roleRepository.save(r); | |
| 76 | + | |
| 77 | + rs.put("t", r); | |
| 78 | + rs.put("status", ResponseCode.SUCCESS); | |
| 79 | + }catch (Exception e){ | |
| 80 | + logger.error("", e); | |
| 81 | + rs.put("msg", "未知异常!"); | |
| 82 | + rs.put("status", ResponseCode.ERROR); | |
| 102 | 83 | } |
| 103 | - map.put("userNames", userNames); | |
| 104 | - return map; | |
| 84 | + return rs; | |
| 105 | 85 | } |
| 106 | 86 | } | ... | ... |
src/main/resources/auths.json
0 → 100644
| 1 | +{ | |
| 2 | + "list": [ | |
| 3 | + { | |
| 4 | + "code": "b_p_manager", | |
| 5 | + "name": "停放监管", | |
| 6 | + "page": "/pages/b_p_manager/b_p_main.html" | |
| 7 | + }, | |
| 8 | + { | |
| 9 | + "code": "abnormal_data", | |
| 10 | + "name": "异常监管", | |
| 11 | + "page": "/pages/abnormal/main.html" | |
| 12 | + }, | |
| 13 | + { | |
| 14 | + "code": "inout_data", | |
| 15 | + "name": "进出场", | |
| 16 | + "page": "/pages/inout/in_out_main.html", | |
| 17 | + "items": [ | |
| 18 | + { | |
| 19 | + "code": "in_out_schedule", | |
| 20 | + "name": "计划出场", | |
| 21 | + "page": "/pages/inout/in_out_schedule/list.html" | |
| 22 | + }, | |
| 23 | + { | |
| 24 | + "code": "rfid_cljcc_list", | |
| 25 | + "name": "车辆进出场", | |
| 26 | + "page": "/pages/inout/signal/signal_inout_list.html" | |
| 27 | + } | |
| 28 | + ] | |
| 29 | + }, | |
| 30 | + { | |
| 31 | + "code": "attendance_data", | |
| 32 | + "name": "签到/退", | |
| 33 | + "page": "/pages/attendance/att_data_main.html", | |
| 34 | + "items": [ | |
| 35 | + { | |
| 36 | + "code": "att_list", | |
| 37 | + "name": "签到退记录", | |
| 38 | + "page": "/pages/attendance/list.html" | |
| 39 | + } | |
| 40 | + ] | |
| 41 | + }, | |
| 42 | + { | |
| 43 | + "code": "basic_data", | |
| 44 | + "name": "基础数据", | |
| 45 | + "page": "/pages/basic_data/main.html", | |
| 46 | + "items": [ | |
| 47 | + { | |
| 48 | + "code": "person_card", | |
| 49 | + "name": "人员/人卡", | |
| 50 | + "page": "/pages/basic_data/person_card/list.html" | |
| 51 | + }, | |
| 52 | + { | |
| 53 | + "code": "bus", | |
| 54 | + "name": "车辆信息", | |
| 55 | + "page": "/pages/basic_data/bus/list.html" | |
| 56 | + }, | |
| 57 | + { | |
| 58 | + "code": "bus_card", | |
| 59 | + "name": "车卡信息", | |
| 60 | + "page": "/pages/basic_data/bus_card/bus_card_list.html" | |
| 61 | + }, | |
| 62 | + { | |
| 63 | + "code": "private_car", | |
| 64 | + "name": "私家车", | |
| 65 | + "page": "/pages/basic_data/car/car_list.html" | |
| 66 | + }, | |
| 67 | + { | |
| 68 | + "code": "berth", | |
| 69 | + "name": "区域和泊位", | |
| 70 | + "page": "/pages/basic_data/berth/berth_main.html" | |
| 71 | + } | |
| 72 | + ] | |
| 73 | + }, | |
| 74 | + { | |
| 75 | + "code": "system_manager", | |
| 76 | + "name": "系统管理", | |
| 77 | + "page": "/pages/system_manager/sm_main.html", | |
| 78 | + "items": [ | |
| 79 | + { | |
| 80 | + "code": "role", | |
| 81 | + "name": "角色和权限", | |
| 82 | + "page": "/pages/system_manager/role/auths.html" | |
| 83 | + }, | |
| 84 | + { | |
| 85 | + "code": "user", | |
| 86 | + "name": "用户和账号", | |
| 87 | + "page": "/pages/system_manager/user/user_list.html" | |
| 88 | + }, | |
| 89 | + { | |
| 90 | + "code": "logs", | |
| 91 | + "name": "日志", | |
| 92 | + "page": "" | |
| 93 | + }, | |
| 94 | + { | |
| 95 | + "code": "config", | |
| 96 | + "name": "参数配置", | |
| 97 | + "page": "" | |
| 98 | + } | |
| 99 | + ] | |
| 100 | + } | |
| 101 | + ] | |
| 102 | +} | |
| 0 | 103 | \ No newline at end of file | ... | ... |
src/main/resources/static/assets/css/abnormal_monitor.css
| ... | ... | @@ -71,12 +71,12 @@ span.red_line_empty{ |
| 71 | 71 | |
| 72 | 72 | #abnormal_monitor_wrap .abnormal_data_tabs{ |
| 73 | 73 | margin-top: 20px; |
| 74 | - height: calc(100% - 247px); | |
| 74 | + height: calc(100% - 257px); | |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | #abnormal_monitor_wrap .data_charts{ |
| 78 | - height: 100px; | |
| 79 | - background: #f0f0f0; | |
| 78 | + height: 110px; | |
| 79 | + background: #ffffff; | |
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | .abnormal_data_list .uk-card-body{ |
| ... | ... | @@ -150,7 +150,8 @@ span.red_line_empty{ |
| 150 | 150 | } |
| 151 | 151 | |
| 152 | 152 | .abnormal_data_body_ul{ |
| 153 | - height: calc(100% - 59px); | |
| 153 | + height: calc(100% - 49px); | |
| 154 | + margin-top: 10px !important; | |
| 154 | 155 | } |
| 155 | 156 | |
| 156 | 157 | .abnormal_data_body_ul>li{ |
| ... | ... | @@ -696,3 +697,43 @@ table tr>td.empty{ |
| 696 | 697 | } |
| 697 | 698 | |
| 698 | 699 | |
| 700 | +.data_charts>div{ | |
| 701 | + height: 100%; | |
| 702 | +} | |
| 703 | + | |
| 704 | +.data_charts>div svg{ | |
| 705 | + height: 100%; | |
| 706 | + fill: none; | |
| 707 | +} | |
| 708 | + | |
| 709 | +.data_charts .vz-radial_progress-label{ | |
| 710 | + fill: rgb(76, 131, 79) !important; | |
| 711 | +} | |
| 712 | + | |
| 713 | +.data_charts .vz-radial_progress-label{ | |
| 714 | + font-size: 16px !important; | |
| 715 | + transform: translate(3px, -10px); | |
| 716 | +} | |
| 717 | + | |
| 718 | +._chart_title text{ | |
| 719 | + font-size: 13px; | |
| 720 | + stroke: rgb(76, 131, 79); | |
| 721 | + stroke-width: .7; | |
| 722 | + fill: none; | |
| 723 | + font-weight: 300; | |
| 724 | +} | |
| 725 | + | |
| 726 | +.data_charts>div>.chart_wrap{ | |
| 727 | + height: 100%; | |
| 728 | + padding-top: 5px; | |
| 729 | + width: 100% !important; | |
| 730 | + margin-left: 0 !important; | |
| 731 | +} | |
| 732 | + | |
| 733 | +.data_charts .vz-radial_progress-arc{ | |
| 734 | + stroke-width: 3; | |
| 735 | +} | |
| 736 | + | |
| 737 | +.data_charts>div{ | |
| 738 | + text-align: center; | |
| 739 | +} | |
| 699 | 740 | \ No newline at end of file | ... | ... |
src/main/resources/static/assets/css/main.css
| 1 | +#toast-container.toast-bottom-center>div, #toast-container.toast-top-center>div { | |
| 2 | + width: 360px !important; | |
| 3 | +} | |
| 4 | + | |
| 1 | 5 | html, body, .ct-container { |
| 2 | 6 | height: 100%; |
| 3 | 7 | color: #151515; |
| ... | ... | @@ -992,4 +996,39 @@ table tr th, table tr td{ |
| 992 | 996 | } |
| 993 | 997 | .ct_attendance_tab_width th:nth-of-type(8), .ct_attendance_tab_width td:nth-of-type(8) { |
| 994 | 998 | width: 13%; |
| 999 | +} | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | +.ct_sys_user_tab_width th:nth-of-type(1), .ct_sys_user_tab_width td:nth-of-type(1) { | |
| 1004 | + width: 12%; | |
| 1005 | +} | |
| 1006 | +.ct_sys_user_tab_width th:nth-of-type(2), .ct_sys_user_tab_width td:nth-of-type(2) { | |
| 1007 | + width: 15%; | |
| 1008 | +} | |
| 1009 | +.ct_sys_user_tab_width th:nth-of-type(3), .ct_sys_user_tab_width td:nth-of-type(3) { | |
| 1010 | + width: 15%; | |
| 1011 | +} | |
| 1012 | +.ct_sys_user_tab_width th:nth-of-type(4), .ct_sys_user_tab_width td:nth-of-type(4) { | |
| 1013 | + width: 12; | |
| 1014 | +} | |
| 1015 | +.ct_sys_user_tab_width th:nth-of-type(5), .ct_sys_user_tab_width td:nth-of-type(5) { | |
| 1016 | + width: 11%; | |
| 1017 | +} | |
| 1018 | +.ct_sys_user_tab_width th:nth-of-type(6), .ct_sys_user_tab_width td:nth-of-type(6) { | |
| 1019 | + width: 15%; | |
| 1020 | +} | |
| 1021 | +.ct_sys_user_tab_width th:nth-of-type(7), .ct_sys_user_tab_width td:nth-of-type(7) { | |
| 1022 | + width: 10%; | |
| 1023 | +} | |
| 1024 | +.ct_sys_user_tab_width th:nth-of-type(8), .ct_sys_user_tab_width td:nth-of-type(8) { | |
| 1025 | + width: 10%; | |
| 1026 | +} | |
| 1027 | + | |
| 1028 | +.ct_sys_user_tab_width td:nth-of-type(8)>a{ | |
| 1029 | + visibility: hidden; | |
| 1030 | +} | |
| 1031 | + | |
| 1032 | +.ct_sys_user_tab_width tr:hover .edit_icon{ | |
| 1033 | + visibility: visible; | |
| 995 | 1034 | } |
| 996 | 1035 | \ No newline at end of file | ... | ... |
src/main/resources/static/assets/css/system_manager.css
0 → 100644
| 1 | +#role_auth_config_wrap .role_list{ | |
| 2 | + width: 240px; | |
| 3 | + height: 100%; | |
| 4 | + display: inline-block; | |
| 5 | + vertical-align: top; | |
| 6 | + margin-right: 25px; | |
| 7 | + border: 1px solid #c3c3c336; | |
| 8 | +} | |
| 9 | + | |
| 10 | +#role_auth_config_wrap .auth_list{ | |
| 11 | + width: calc(100% - 278px); | |
| 12 | + height: 100%; | |
| 13 | + display: inline-block; | |
| 14 | + vertical-align: top; | |
| 15 | + border: 1px solid #c3c3c336; | |
| 16 | + position: relative; | |
| 17 | +} | |
| 18 | + | |
| 19 | +#role_auth_config_wrap .uk-card-body{ | |
| 20 | + height: 100%; | |
| 21 | + padding: 0; | |
| 22 | +} | |
| 23 | + | |
| 24 | +.role_list>.uk-card-body>ul{ | |
| 25 | + font-size: 14px; | |
| 26 | + margin-top: 0px; | |
| 27 | + height: calc(100% - 40px); | |
| 28 | + overflow: auto; | |
| 29 | +} | |
| 30 | + | |
| 31 | +.role_list>.uk-card-body>ul>li{ | |
| 32 | + cursor: default; | |
| 33 | + padding-left: 20px; | |
| 34 | + margin-top: 2px !important; | |
| 35 | + padding-top: 17px !important; | |
| 36 | + position: relative; | |
| 37 | +} | |
| 38 | + | |
| 39 | +.role_list>.uk-card-body>ul>li.active{ | |
| 40 | + background: #1e87f0 !important; | |
| 41 | + color: white; | |
| 42 | +} | |
| 43 | + | |
| 44 | +.role_list>.uk-card-body>ul>li:hover{ | |
| 45 | + background: #fff494; | |
| 46 | +} | |
| 47 | + | |
| 48 | +#role_auth_config_wrap .uk-card-body .title{ | |
| 49 | + display: block; | |
| 50 | + line-height: 25px; | |
| 51 | + padding: 5px; | |
| 52 | + background: #f8f8f8; | |
| 53 | + text-indent: 7px; | |
| 54 | + font-size: 12px; | |
| 55 | + border-bottom: 1px solid #ececec; | |
| 56 | +} | |
| 57 | + | |
| 58 | +#role_auth_config_wrap .fun_s_list{ | |
| 59 | + padding-bottom: 30px; | |
| 60 | + overflow: auto; | |
| 61 | + height: calc(100% - 55px); | |
| 62 | +} | |
| 63 | + | |
| 64 | +#role_auth_config_wrap .c_box_wrap{ | |
| 65 | + border: 1px solid #eeeeee; | |
| 66 | + padding: 15px; | |
| 67 | + display: block; | |
| 68 | + min-height: 26px; | |
| 69 | + position: relative; | |
| 70 | + box-shadow: 0px 3px 15px rgba(0,0,0,.08); | |
| 71 | +} | |
| 72 | + | |
| 73 | +.fun_s_list .module{ | |
| 74 | + margin: 34px; | |
| 75 | +} | |
| 76 | + | |
| 77 | +.fun_s_list .module span.root{ | |
| 78 | + position: absolute; | |
| 79 | + top: -12px; | |
| 80 | + background: #fff; | |
| 81 | + padding: 4px 9px; | |
| 82 | + color: #181818; | |
| 83 | + font-weight: 600; | |
| 84 | + left: 21px; | |
| 85 | +} | |
| 86 | + | |
| 87 | +.fun_s_list .module .sub_menus{ | |
| 88 | + padding: 28px 30px 10px 0; | |
| 89 | +} | |
| 90 | + | |
| 91 | +.fun_s_list .module .sub_menus>span{ | |
| 92 | + margin: 5px; | |
| 93 | + border-bottom: 1px solid #dedede; | |
| 94 | + padding: 7px 12px 7px 9px; | |
| 95 | + cursor: default; | |
| 96 | +} | |
| 97 | + | |
| 98 | +.fun_s_list .module span.item.active{ | |
| 99 | + color: #ffffff; | |
| 100 | + background: #ff8a65; | |
| 101 | +} | |
| 102 | + | |
| 103 | +.fun_s_list .module span.item.active .uk-checkbox:checked, | |
| 104 | +.fun_s_list .module span.item.active .uk-checkbox:indeterminate, | |
| 105 | +.fun_s_list .module span.item.active .uk-radio:checked{ | |
| 106 | + background-color: #ff8a65; | |
| 107 | +} | |
| 108 | + | |
| 109 | +.fun_s_list .module span.root.item.active{ | |
| 110 | + color: #ffffff; | |
| 111 | + background: #FF5722; | |
| 112 | +} | |
| 113 | + | |
| 114 | +.fun_s_list .module span.root.item.active .uk-checkbox:checked, | |
| 115 | +.fun_s_list .module span.root.item.active .uk-checkbox:indeterminate, | |
| 116 | +.fun_s_list .module span.root.item.active .uk-radio:checked{ | |
| 117 | + background-color: #FF5722; | |
| 118 | +} | |
| 119 | + | |
| 120 | +.footer_wrap{ | |
| 121 | + position: absolute; | |
| 122 | + bottom: 0; | |
| 123 | + width: 100%; | |
| 124 | +} | |
| 125 | + | |
| 126 | +.footer_wrap .uk-margin-small-bottom{ | |
| 127 | + margin-bottom: 0 !important; | |
| 128 | +} | |
| 0 | 129 | \ No newline at end of file | ... | ... |
src/main/resources/static/assets/plugins/d3/d3.min.js
0 → 100644
| 1 | +!function(){function n(n){return n&&(n.ownerDocument||n.document||n).documentElement}function t(n){return n&&(n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView)}function e(n,t){return t>n?-1:n>t?1:n>=t?0:NaN}function r(n){return null===n?NaN:+n}function u(n){return!isNaN(n)}function i(n){return{left:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)<0?r=i+1:u=i}return r},right:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)>0?u=i:r=i+1}return r}}}function a(n){return n.length}function o(n){for(var t=1;n*t%1;)t*=10;return t}function l(n,t){for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}function c(){this._=Object.create(null)}function s(n){return(n+="")===xa||n[0]===ba?ba+n:n}function f(n){return(n+="")[0]===ba?n.slice(1):n}function h(n){return s(n)in this._}function g(n){return(n=s(n))in this._&&delete this._[n]}function p(){var n=[];for(var t in this._)n.push(f(t));return n}function v(){var n=0;for(var t in this._)++n;return n}function d(){for(var n in this._)return!1;return!0}function m(){this._=Object.create(null)}function y(n){return n}function M(n,t,e){return function(){var r=e.apply(t,arguments);return r===t?n:r}}function x(n,t){if(t in n)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e=0,r=_a.length;r>e;++e){var u=_a[e]+t;if(u in n)return u}}function b(){}function _(){}function w(n){function t(){for(var t,r=e,u=-1,i=r.length;++u<i;)(t=r[u].on)&&t.apply(this,arguments);return n}var e=[],r=new c;return t.on=function(t,u){var i,a=r.get(t);return arguments.length<2?a&&a.on:(a&&(a.on=null,e=e.slice(0,i=e.indexOf(a)).concat(e.slice(i+1)),r.remove(t)),u&&e.push(r.set(t,{on:u})),n)},t}function S(){oa.event.preventDefault()}function k(){for(var n,t=oa.event;n=t.sourceEvent;)t=n;return t}function N(n){for(var t=new _,e=0,r=arguments.length;++e<r;)t[arguments[e]]=w(t);return t.of=function(e,r){return function(u){try{var i=u.sourceEvent=oa.event;u.target=n,oa.event=u,t[u.type].apply(e,r)}finally{oa.event=i}}},t}function E(n){return Sa(n,Aa),n}function A(n){return"function"==typeof n?n:function(){return ka(n,this)}}function C(n){return"function"==typeof n?n:function(){return Na(n,this)}}function z(n,t){function e(){this.removeAttribute(n)}function r(){this.removeAttributeNS(n.space,n.local)}function u(){this.setAttribute(n,t)}function i(){this.setAttributeNS(n.space,n.local,t)}function a(){var e=t.apply(this,arguments);null==e?this.removeAttribute(n):this.setAttribute(n,e)}function o(){var e=t.apply(this,arguments);null==e?this.removeAttributeNS(n.space,n.local):this.setAttributeNS(n.space,n.local,e)}return n=oa.ns.qualify(n),null==t?n.local?r:e:"function"==typeof t?n.local?o:a:n.local?i:u}function L(n){return n.trim().replace(/\s+/g," ")}function q(n){return new RegExp("(?:^|\\s+)"+oa.requote(n)+"(?:\\s+|$)","g")}function T(n){return(n+"").trim().split(/^|\s+/)}function R(n,t){function e(){for(var e=-1;++e<u;)n[e](this,t)}function r(){for(var e=-1,r=t.apply(this,arguments);++e<u;)n[e](this,r)}n=T(n).map(D);var u=n.length;return"function"==typeof t?r:e}function D(n){var t=q(n);return function(e,r){if(u=e.classList)return r?u.add(n):u.remove(n);var u=e.getAttribute("class")||"";r?(t.lastIndex=0,t.test(u)||e.setAttribute("class",L(u+" "+n))):e.setAttribute("class",L(u.replace(t," ")))}}function P(n,t,e){function r(){this.style.removeProperty(n)}function u(){this.style.setProperty(n,t,e)}function i(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(n):this.style.setProperty(n,r,e)}return null==t?r:"function"==typeof t?i:u}function U(n,t){function e(){delete this[n]}function r(){this[n]=t}function u(){var e=t.apply(this,arguments);null==e?delete this[n]:this[n]=e}return null==t?e:"function"==typeof t?u:r}function j(n){function t(){var t=this.ownerDocument,e=this.namespaceURI;return e===Ca&&t.documentElement.namespaceURI===Ca?t.createElement(n):t.createElementNS(e,n)}function e(){return this.ownerDocument.createElementNS(n.space,n.local)}return"function"==typeof n?n:(n=oa.ns.qualify(n)).local?e:t}function F(){var n=this.parentNode;n&&n.removeChild(this)}function H(n){return{__data__:n}}function O(n){return function(){return Ea(this,n)}}function I(n){return arguments.length||(n=e),function(t,e){return t&&e?n(t.__data__,e.__data__):!t-!e}}function Y(n,t){for(var e=0,r=n.length;r>e;e++)for(var u,i=n[e],a=0,o=i.length;o>a;a++)(u=i[a])&&t(u,a,e);return n}function Z(n){return Sa(n,La),n}function V(n){var t,e;return function(r,u,i){var a,o=n[i].update,l=o.length;for(i!=e&&(e=i,t=0),u>=t&&(t=u+1);!(a=o[t])&&++t<l;);return a}}function X(n,t,e){function r(){var t=this[a];t&&(this.removeEventListener(n,t,t.$),delete this[a])}function u(){var u=l(t,ca(arguments));r.call(this),this.addEventListener(n,this[a]=u,u.$=e),u._=t}function i(){var t,e=new RegExp("^__on([^.]+)"+oa.requote(n)+"$");for(var r in this)if(t=r.match(e)){var u=this[r];this.removeEventListener(t[1],u,u.$),delete this[r]}}var a="__on"+n,o=n.indexOf("."),l=$;o>0&&(n=n.slice(0,o));var c=qa.get(n);return c&&(n=c,l=B),o?t?u:r:t?b:i}function $(n,t){return function(e){var r=oa.event;oa.event=e,t[0]=this.__data__;try{n.apply(this,t)}finally{oa.event=r}}}function B(n,t){var e=$(n,t);return function(n){var t=this,r=n.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||e.call(t,n)}}function W(e){var r=".dragsuppress-"+ ++Ra,u="click"+r,i=oa.select(t(e)).on("touchmove"+r,S).on("dragstart"+r,S).on("selectstart"+r,S);if(null==Ta&&(Ta="onselectstart"in e?!1:x(e.style,"userSelect")),Ta){var a=n(e).style,o=a[Ta];a[Ta]="none"}return function(n){if(i.on(r,null),Ta&&(a[Ta]=o),n){var t=function(){i.on(u,null)};i.on(u,function(){S(),t()},!0),setTimeout(t,0)}}}function J(n,e){e.changedTouches&&(e=e.changedTouches[0]);var r=n.ownerSVGElement||n;if(r.createSVGPoint){var u=r.createSVGPoint();if(0>Da){var i=t(n);if(i.scrollX||i.scrollY){r=oa.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var a=r[0][0].getScreenCTM();Da=!(a.f||a.e),r.remove()}}return Da?(u.x=e.pageX,u.y=e.pageY):(u.x=e.clientX,u.y=e.clientY),u=u.matrixTransform(n.getScreenCTM().inverse()),[u.x,u.y]}var o=n.getBoundingClientRect();return[e.clientX-o.left-n.clientLeft,e.clientY-o.top-n.clientTop]}function G(){return oa.event.changedTouches[0].identifier}function K(n){return n>0?1:0>n?-1:0}function Q(n,t,e){return(t[0]-n[0])*(e[1]-n[1])-(t[1]-n[1])*(e[0]-n[0])}function nn(n){return n>1?0:-1>n?ja:Math.acos(n)}function tn(n){return n>1?Oa:-1>n?-Oa:Math.asin(n)}function en(n){return((n=Math.exp(n))-1/n)/2}function rn(n){return((n=Math.exp(n))+1/n)/2}function un(n){return((n=Math.exp(2*n))-1)/(n+1)}function an(n){return(n=Math.sin(n/2))*n}function on(){}function ln(n,t,e){return this instanceof ln?(this.h=+n,this.s=+t,void(this.l=+e)):arguments.length<2?n instanceof ln?new ln(n.h,n.s,n.l):_n(""+n,wn,ln):new ln(n,t,e)}function cn(n,t,e){function r(n){return n>360?n-=360:0>n&&(n+=360),60>n?i+(a-i)*n/60:180>n?a:240>n?i+(a-i)*(240-n)/60:i}function u(n){return Math.round(255*r(n))}var i,a;return n=isNaN(n)?0:(n%=360)<0?n+360:n,t=isNaN(t)?0:0>t?0:t>1?1:t,e=0>e?0:e>1?1:e,a=.5>=e?e*(1+t):e+t-e*t,i=2*e-a,new yn(u(n+120),u(n),u(n-120))}function sn(n,t,e){return this instanceof sn?(this.h=+n,this.c=+t,void(this.l=+e)):arguments.length<2?n instanceof sn?new sn(n.h,n.c,n.l):n instanceof hn?pn(n.l,n.a,n.b):pn((n=Sn((n=oa.rgb(n)).r,n.g,n.b)).l,n.a,n.b):new sn(n,t,e)}function fn(n,t,e){return isNaN(n)&&(n=0),isNaN(t)&&(t=0),new hn(e,Math.cos(n*=Ia)*t,Math.sin(n)*t)}function hn(n,t,e){return this instanceof hn?(this.l=+n,this.a=+t,void(this.b=+e)):arguments.length<2?n instanceof hn?new hn(n.l,n.a,n.b):n instanceof sn?fn(n.h,n.c,n.l):Sn((n=yn(n)).r,n.g,n.b):new hn(n,t,e)}function gn(n,t,e){var r=(n+16)/116,u=r+t/500,i=r-e/200;return u=vn(u)*Qa,r=vn(r)*no,i=vn(i)*to,new yn(mn(3.2404542*u-1.5371385*r-.4985314*i),mn(-.969266*u+1.8760108*r+.041556*i),mn(.0556434*u-.2040259*r+1.0572252*i))}function pn(n,t,e){return n>0?new sn(Math.atan2(e,t)*Ya,Math.sqrt(t*t+e*e),n):new sn(NaN,NaN,n)}function vn(n){return n>.206893034?n*n*n:(n-4/29)/7.787037}function dn(n){return n>.008856?Math.pow(n,1/3):7.787037*n+4/29}function mn(n){return Math.round(255*(.00304>=n?12.92*n:1.055*Math.pow(n,1/2.4)-.055))}function yn(n,t,e){return this instanceof yn?(this.r=~~n,this.g=~~t,void(this.b=~~e)):arguments.length<2?n instanceof yn?new yn(n.r,n.g,n.b):_n(""+n,yn,cn):new yn(n,t,e)}function Mn(n){return new yn(n>>16,n>>8&255,255&n)}function xn(n){return Mn(n)+""}function bn(n){return 16>n?"0"+Math.max(0,n).toString(16):Math.min(255,n).toString(16)}function _n(n,t,e){var r,u,i,a=0,o=0,l=0;if(r=/([a-z]+)\((.*)\)/.exec(n=n.toLowerCase()))switch(u=r[2].split(","),r[1]){case"hsl":return e(parseFloat(u[0]),parseFloat(u[1])/100,parseFloat(u[2])/100);case"rgb":return t(Nn(u[0]),Nn(u[1]),Nn(u[2]))}return(i=uo.get(n))?t(i.r,i.g,i.b):(null==n||"#"!==n.charAt(0)||isNaN(i=parseInt(n.slice(1),16))||(4===n.length?(a=(3840&i)>>4,a=a>>4|a,o=240&i,o=o>>4|o,l=15&i,l=l<<4|l):7===n.length&&(a=(16711680&i)>>16,o=(65280&i)>>8,l=255&i)),t(a,o,l))}function wn(n,t,e){var r,u,i=Math.min(n/=255,t/=255,e/=255),a=Math.max(n,t,e),o=a-i,l=(a+i)/2;return o?(u=.5>l?o/(a+i):o/(2-a-i),r=n==a?(t-e)/o+(e>t?6:0):t==a?(e-n)/o+2:(n-t)/o+4,r*=60):(r=NaN,u=l>0&&1>l?0:r),new ln(r,u,l)}function Sn(n,t,e){n=kn(n),t=kn(t),e=kn(e);var r=dn((.4124564*n+.3575761*t+.1804375*e)/Qa),u=dn((.2126729*n+.7151522*t+.072175*e)/no),i=dn((.0193339*n+.119192*t+.9503041*e)/to);return hn(116*u-16,500*(r-u),200*(u-i))}function kn(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function Nn(n){var t=parseFloat(n);return"%"===n.charAt(n.length-1)?Math.round(2.55*t):t}function En(n){return"function"==typeof n?n:function(){return n}}function An(n){return function(t,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=null),Cn(t,e,n,r)}}function Cn(n,t,e,r){function u(){var n,t=l.status;if(!t&&Ln(l)||t>=200&&300>t||304===t){try{n=e.call(i,l)}catch(r){return void a.error.call(i,r)}a.load.call(i,n)}else a.error.call(i,l)}var i={},a=oa.dispatch("beforesend","progress","load","error"),o={},l=new XMLHttpRequest,c=null;return!this.XDomainRequest||"withCredentials"in l||!/^(http(s)?:)?\/\//.test(n)||(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=u:l.onreadystatechange=function(){l.readyState>3&&u()},l.onprogress=function(n){var t=oa.event;oa.event=n;try{a.progress.call(i,l)}finally{oa.event=t}},i.header=function(n,t){return n=(n+"").toLowerCase(),arguments.length<2?o[n]:(null==t?delete o[n]:o[n]=t+"",i)},i.mimeType=function(n){return arguments.length?(t=null==n?null:n+"",i):t},i.responseType=function(n){return arguments.length?(c=n,i):c},i.response=function(n){return e=n,i},["get","post"].forEach(function(n){i[n]=function(){return i.send.apply(i,[n].concat(ca(arguments)))}}),i.send=function(e,r,u){if(2===arguments.length&&"function"==typeof r&&(u=r,r=null),l.open(e,n,!0),null==t||"accept"in o||(o.accept=t+",*/*"),l.setRequestHeader)for(var s in o)l.setRequestHeader(s,o[s]);return null!=t&&l.overrideMimeType&&l.overrideMimeType(t),null!=c&&(l.responseType=c),null!=u&&i.on("error",u).on("load",function(n){u(null,n)}),a.beforesend.call(i,l),l.send(null==r?null:r),i},i.abort=function(){return l.abort(),i},oa.rebind(i,a,"on"),null==r?i:i.get(zn(r))}function zn(n){return 1===n.length?function(t,e){n(null==t?e:null)}:n}function Ln(n){var t=n.responseType;return t&&"text"!==t?n.response:n.responseText}function qn(n,t,e){var r=arguments.length;2>r&&(t=0),3>r&&(e=Date.now());var u=e+t,i={c:n,t:u,n:null};return ao?ao.n=i:io=i,ao=i,oo||(lo=clearTimeout(lo),oo=1,co(Tn)),i}function Tn(){var n=Rn(),t=Dn()-n;t>24?(isFinite(t)&&(clearTimeout(lo),lo=setTimeout(Tn,t)),oo=0):(oo=1,co(Tn))}function Rn(){for(var n=Date.now(),t=io;t;)n>=t.t&&t.c(n-t.t)&&(t.c=null),t=t.n;return n}function Dn(){for(var n,t=io,e=1/0;t;)t.c?(t.t<e&&(e=t.t),t=(n=t).n):t=n?n.n=t.n:io=t.n;return ao=n,e}function Pn(n,t){return t-(n?Math.ceil(Math.log(n)/Math.LN10):1)}function Un(n,t){var e=Math.pow(10,3*Ma(8-t));return{scale:t>8?function(n){return n/e}:function(n){return n*e},symbol:n}}function jn(n){var t=n.decimal,e=n.thousands,r=n.grouping,u=n.currency,i=r&&e?function(n,t){for(var u=n.length,i=[],a=0,o=r[0],l=0;u>0&&o>0&&(l+o+1>t&&(o=Math.max(1,t-l)),i.push(n.substring(u-=o,u+o)),!((l+=o+1)>t));)o=r[a=(a+1)%r.length];return i.reverse().join(e)}:y;return function(n){var e=fo.exec(n),r=e[1]||" ",a=e[2]||">",o=e[3]||"-",l=e[4]||"",c=e[5],s=+e[6],f=e[7],h=e[8],g=e[9],p=1,v="",d="",m=!1,y=!0;switch(h&&(h=+h.substring(1)),(c||"0"===r&&"="===a)&&(c=r="0",a="="),g){case"n":f=!0,g="g";break;case"%":p=100,d="%",g="f";break;case"p":p=100,d="%",g="r";break;case"b":case"o":case"x":case"X":"#"===l&&(v="0"+g.toLowerCase());case"c":y=!1;case"d":m=!0,h=0;break;case"s":p=-1,g="r"}"$"===l&&(v=u[0],d=u[1]),"r"!=g||h||(g="g"),null!=h&&("g"==g?h=Math.max(1,Math.min(21,h)):("e"==g||"f"==g)&&(h=Math.max(0,Math.min(20,h)))),g=ho.get(g)||Fn;var M=c&&f;return function(n){var e=d;if(m&&n%1)return"";var u=0>n||0===n&&0>1/n?(n=-n,"-"):"-"===o?"":o;if(0>p){var l=oa.formatPrefix(n,h);n=l.scale(n),e=l.symbol+d}else n*=p;n=g(n,h);var x,b,_=n.lastIndexOf(".");if(0>_){var w=y?n.lastIndexOf("e"):-1;0>w?(x=n,b=""):(x=n.substring(0,w),b=n.substring(w))}else x=n.substring(0,_),b=t+n.substring(_+1);!c&&f&&(x=i(x,1/0));var S=v.length+x.length+b.length+(M?0:u.length),k=s>S?new Array(S=s-S+1).join(r):"";return M&&(x=i(k+x,k.length?s-b.length:1/0)),u+=v,n=x+b,("<"===a?u+n+k:">"===a?k+u+n:"^"===a?k.substring(0,S>>=1)+u+n+k.substring(S):u+(M?n:k+n))+e}}}function Fn(n){return n+""}function Hn(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function On(n,t,e){function r(t){var e=n(t),r=i(e,1);return r-t>t-e?e:r}function u(e){return t(e=n(new po(e-1)),1),e}function i(n,e){return t(n=new po(+n),e),n}function a(n,r,i){var a=u(n),o=[];if(i>1)for(;r>a;)e(a)%i||o.push(new Date(+a)),t(a,1);else for(;r>a;)o.push(new Date(+a)),t(a,1);return o}function o(n,t,e){try{po=Hn;var r=new Hn;return r._=n,a(r,t,e)}finally{po=Date}}n.floor=n,n.round=r,n.ceil=u,n.offset=i,n.range=a;var l=n.utc=In(n);return l.floor=l,l.round=In(r),l.ceil=In(u),l.offset=In(i),l.range=o,n}function In(n){return function(t,e){try{po=Hn;var r=new Hn;return r._=t,n(r,e)._}finally{po=Date}}}function Yn(n){function t(n){function t(t){for(var e,u,i,a=[],o=-1,l=0;++o<r;)37===n.charCodeAt(o)&&(a.push(n.slice(l,o)),null!=(u=mo[e=n.charAt(++o)])&&(e=n.charAt(++o)),(i=A[e])&&(e=i(t,null==u?"e"===e?" ":"0":u)),a.push(e),l=o+1);return a.push(n.slice(l,o)),a.join("")}var r=n.length;return t.parse=function(t){var r={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null},u=e(r,n,t,0);if(u!=t.length)return null;"p"in r&&(r.H=r.H%12+12*r.p);var i=null!=r.Z&&po!==Hn,a=new(i?Hn:po);return"j"in r?a.setFullYear(r.y,0,r.j):"W"in r||"U"in r?("w"in r||(r.w="W"in r?1:0),a.setFullYear(r.y,0,1),a.setFullYear(r.y,0,"W"in r?(r.w+6)%7+7*r.W-(a.getDay()+5)%7:r.w+7*r.U-(a.getDay()+6)%7)):a.setFullYear(r.y,r.m,r.d),a.setHours(r.H+(r.Z/100|0),r.M+r.Z%100,r.S,r.L),i?a._:a},t.toString=function(){return n},t}function e(n,t,e,r){for(var u,i,a,o=0,l=t.length,c=e.length;l>o;){if(r>=c)return-1;if(u=t.charCodeAt(o++),37===u){if(a=t.charAt(o++),i=C[a in mo?t.charAt(o++):a],!i||(r=i(n,e,r))<0)return-1}else if(u!=e.charCodeAt(r++))return-1}return r}function r(n,t,e){_.lastIndex=0;var r=_.exec(t.slice(e));return r?(n.w=w.get(r[0].toLowerCase()),e+r[0].length):-1}function u(n,t,e){x.lastIndex=0;var r=x.exec(t.slice(e));return r?(n.w=b.get(r[0].toLowerCase()),e+r[0].length):-1}function i(n,t,e){N.lastIndex=0;var r=N.exec(t.slice(e));return r?(n.m=E.get(r[0].toLowerCase()),e+r[0].length):-1}function a(n,t,e){S.lastIndex=0;var r=S.exec(t.slice(e));return r?(n.m=k.get(r[0].toLowerCase()),e+r[0].length):-1}function o(n,t,r){return e(n,A.c.toString(),t,r)}function l(n,t,r){return e(n,A.x.toString(),t,r)}function c(n,t,r){return e(n,A.X.toString(),t,r)}function s(n,t,e){var r=M.get(t.slice(e,e+=2).toLowerCase());return null==r?-1:(n.p=r,e)}var f=n.dateTime,h=n.date,g=n.time,p=n.periods,v=n.days,d=n.shortDays,m=n.months,y=n.shortMonths;t.utc=function(n){function e(n){try{po=Hn;var t=new po;return t._=n,r(t)}finally{po=Date}}var r=t(n);return e.parse=function(n){try{po=Hn;var t=r.parse(n);return t&&t._}finally{po=Date}},e.toString=r.toString,e},t.multi=t.utc.multi=ct;var M=oa.map(),x=Vn(v),b=Xn(v),_=Vn(d),w=Xn(d),S=Vn(m),k=Xn(m),N=Vn(y),E=Xn(y);p.forEach(function(n,t){M.set(n.toLowerCase(),t)});var A={a:function(n){return d[n.getDay()]},A:function(n){return v[n.getDay()]},b:function(n){return y[n.getMonth()]},B:function(n){return m[n.getMonth()]},c:t(f),d:function(n,t){return Zn(n.getDate(),t,2)},e:function(n,t){return Zn(n.getDate(),t,2)},H:function(n,t){return Zn(n.getHours(),t,2)},I:function(n,t){return Zn(n.getHours()%12||12,t,2)},j:function(n,t){return Zn(1+go.dayOfYear(n),t,3)},L:function(n,t){return Zn(n.getMilliseconds(),t,3)},m:function(n,t){return Zn(n.getMonth()+1,t,2)},M:function(n,t){return Zn(n.getMinutes(),t,2)},p:function(n){return p[+(n.getHours()>=12)]},S:function(n,t){return Zn(n.getSeconds(),t,2)},U:function(n,t){return Zn(go.sundayOfYear(n),t,2)},w:function(n){return n.getDay()},W:function(n,t){return Zn(go.mondayOfYear(n),t,2)},x:t(h),X:t(g),y:function(n,t){return Zn(n.getFullYear()%100,t,2)},Y:function(n,t){return Zn(n.getFullYear()%1e4,t,4)},Z:ot,"%":function(){return"%"}},C={a:r,A:u,b:i,B:a,c:o,d:tt,e:tt,H:rt,I:rt,j:et,L:at,m:nt,M:ut,p:s,S:it,U:Bn,w:$n,W:Wn,x:l,X:c,y:Gn,Y:Jn,Z:Kn,"%":lt};return t}function Zn(n,t,e){var r=0>n?"-":"",u=(r?-n:n)+"",i=u.length;return r+(e>i?new Array(e-i+1).join(t)+u:u)}function Vn(n){return new RegExp("^(?:"+n.map(oa.requote).join("|")+")","i")}function Xn(n){for(var t=new c,e=-1,r=n.length;++e<r;)t.set(n[e].toLowerCase(),e);return t}function $n(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+1));return r?(n.w=+r[0],e+r[0].length):-1}function Bn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e));return r?(n.U=+r[0],e+r[0].length):-1}function Wn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e));return r?(n.W=+r[0],e+r[0].length):-1}function Jn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+4));return r?(n.y=+r[0],e+r[0].length):-1}function Gn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.y=Qn(+r[0]),e+r[0].length):-1}function Kn(n,t,e){return/^[+-]\d{4}$/.test(t=t.slice(e,e+5))?(n.Z=-t,e+5):-1}function Qn(n){return n+(n>68?1900:2e3)}function nt(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.m=r[0]-1,e+r[0].length):-1}function tt(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.d=+r[0],e+r[0].length):-1}function et(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+3));return r?(n.j=+r[0],e+r[0].length):-1}function rt(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.H=+r[0],e+r[0].length):-1}function ut(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.M=+r[0],e+r[0].length):-1}function it(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.S=+r[0],e+r[0].length):-1}function at(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+3));return r?(n.L=+r[0],e+r[0].length):-1}function ot(n){var t=n.getTimezoneOffset(),e=t>0?"-":"+",r=Ma(t)/60|0,u=Ma(t)%60;return e+Zn(r,"0",2)+Zn(u,"0",2)}function lt(n,t,e){Mo.lastIndex=0;var r=Mo.exec(t.slice(e,e+1));return r?e+r[0].length:-1}function ct(n){for(var t=n.length,e=-1;++e<t;)n[e][0]=this(n[e][0]);return function(t){for(var e=0,r=n[e];!r[1](t);)r=n[++e];return r[0](t)}}function st(){}function ft(n,t,e){var r=e.s=n+t,u=r-n,i=r-u;e.t=n-i+(t-u)}function ht(n,t){n&&wo.hasOwnProperty(n.type)&&wo[n.type](n,t)}function gt(n,t,e){var r,u=-1,i=n.length-e;for(t.lineStart();++u<i;)r=n[u],t.point(r[0],r[1],r[2]);t.lineEnd()}function pt(n,t){var e=-1,r=n.length;for(t.polygonStart();++e<r;)gt(n[e],t,1);t.polygonEnd()}function vt(){function n(n,t){n*=Ia,t=t*Ia/2+ja/4;var e=n-r,a=e>=0?1:-1,o=a*e,l=Math.cos(t),c=Math.sin(t),s=i*c,f=u*l+s*Math.cos(o),h=s*a*Math.sin(o);ko.add(Math.atan2(h,f)),r=n,u=l,i=c}var t,e,r,u,i;No.point=function(a,o){No.point=n,r=(t=a)*Ia,u=Math.cos(o=(e=o)*Ia/2+ja/4),i=Math.sin(o)},No.lineEnd=function(){n(t,e)}}function dt(n){var t=n[0],e=n[1],r=Math.cos(e);return[r*Math.cos(t),r*Math.sin(t),Math.sin(e)]}function mt(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function yt(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function Mt(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function xt(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function bt(n){var t=Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}function _t(n){return[Math.atan2(n[1],n[0]),tn(n[2])]}function wt(n,t){return Ma(n[0]-t[0])<Pa&&Ma(n[1]-t[1])<Pa}function St(n,t){n*=Ia;var e=Math.cos(t*=Ia);kt(e*Math.cos(n),e*Math.sin(n),Math.sin(t))}function kt(n,t,e){++Eo,Co+=(n-Co)/Eo,zo+=(t-zo)/Eo,Lo+=(e-Lo)/Eo}function Nt(){function n(n,u){n*=Ia;var i=Math.cos(u*=Ia),a=i*Math.cos(n),o=i*Math.sin(n),l=Math.sin(u),c=Math.atan2(Math.sqrt((c=e*l-r*o)*c+(c=r*a-t*l)*c+(c=t*o-e*a)*c),t*a+e*o+r*l);Ao+=c,qo+=c*(t+(t=a)),To+=c*(e+(e=o)),Ro+=c*(r+(r=l)),kt(t,e,r)}var t,e,r;jo.point=function(u,i){u*=Ia;var a=Math.cos(i*=Ia);t=a*Math.cos(u),e=a*Math.sin(u),r=Math.sin(i),jo.point=n,kt(t,e,r)}}function Et(){jo.point=St}function At(){function n(n,t){n*=Ia;var e=Math.cos(t*=Ia),a=e*Math.cos(n),o=e*Math.sin(n),l=Math.sin(t),c=u*l-i*o,s=i*a-r*l,f=r*o-u*a,h=Math.sqrt(c*c+s*s+f*f),g=r*a+u*o+i*l,p=h&&-nn(g)/h,v=Math.atan2(h,g);Do+=p*c,Po+=p*s,Uo+=p*f,Ao+=v,qo+=v*(r+(r=a)),To+=v*(u+(u=o)),Ro+=v*(i+(i=l)),kt(r,u,i)}var t,e,r,u,i;jo.point=function(a,o){t=a,e=o,jo.point=n,a*=Ia;var l=Math.cos(o*=Ia);r=l*Math.cos(a),u=l*Math.sin(a),i=Math.sin(o),kt(r,u,i)},jo.lineEnd=function(){n(t,e),jo.lineEnd=Et,jo.point=St}}function Ct(n,t){function e(e,r){return e=n(e,r),t(e[0],e[1])}return n.invert&&t.invert&&(e.invert=function(e,r){return e=t.invert(e,r),e&&n.invert(e[0],e[1])}),e}function zt(){return!0}function Lt(n,t,e,r,u){var i=[],a=[];if(n.forEach(function(n){if(!((t=n.length-1)<=0)){var t,e=n[0],r=n[t];if(wt(e,r)){u.lineStart();for(var o=0;t>o;++o)u.point((e=n[o])[0],e[1]);return void u.lineEnd()}var l=new Tt(e,n,null,!0),c=new Tt(e,null,l,!1);l.o=c,i.push(l),a.push(c),l=new Tt(r,n,null,!1),c=new Tt(r,null,l,!0),l.o=c,i.push(l),a.push(c)}}),a.sort(t),qt(i),qt(a),i.length){for(var o=0,l=e,c=a.length;c>o;++o)a[o].e=l=!l;for(var s,f,h=i[0];;){for(var g=h,p=!0;g.v;)if((g=g.n)===h)return;s=g.z,u.lineStart();do{if(g.v=g.o.v=!0,g.e){if(p)for(var o=0,c=s.length;c>o;++o)u.point((f=s[o])[0],f[1]);else r(g.x,g.n.x,1,u);g=g.n}else{if(p){s=g.p.z;for(var o=s.length-1;o>=0;--o)u.point((f=s[o])[0],f[1])}else r(g.x,g.p.x,-1,u);g=g.p}g=g.o,s=g.z,p=!p}while(!g.v);u.lineEnd()}}}function qt(n){if(t=n.length){for(var t,e,r=0,u=n[0];++r<t;)u.n=e=n[r],e.p=u,u=e;u.n=e=n[0],e.p=u}}function Tt(n,t,e,r){this.x=n,this.z=t,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}function Rt(n,t,e,r){return function(u,i){function a(t,e){var r=u(t,e);n(t=r[0],e=r[1])&&i.point(t,e)}function o(n,t){var e=u(n,t);d.point(e[0],e[1])}function l(){y.point=o,d.lineStart()}function c(){y.point=a,d.lineEnd()}function s(n,t){v.push([n,t]);var e=u(n,t);x.point(e[0],e[1])}function f(){x.lineStart(),v=[]}function h(){s(v[0][0],v[0][1]),x.lineEnd();var n,t=x.clean(),e=M.buffer(),r=e.length;if(v.pop(),p.push(v),v=null,r)if(1&t){n=e[0];var u,r=n.length-1,a=-1;if(r>0){for(b||(i.polygonStart(),b=!0),i.lineStart();++a<r;)i.point((u=n[a])[0],u[1]);i.lineEnd()}}else r>1&&2&t&&e.push(e.pop().concat(e.shift())),g.push(e.filter(Dt))}var g,p,v,d=t(i),m=u.invert(r[0],r[1]),y={point:a,lineStart:l,lineEnd:c,polygonStart:function(){y.point=s,y.lineStart=f,y.lineEnd=h,g=[],p=[]},polygonEnd:function(){y.point=a,y.lineStart=l,y.lineEnd=c,g=oa.merge(g);var n=Ot(m,p);g.length?(b||(i.polygonStart(),b=!0),Lt(g,Ut,n,e,i)):n&&(b||(i.polygonStart(),b=!0),i.lineStart(),e(null,null,1,i),i.lineEnd()),b&&(i.polygonEnd(),b=!1),g=p=null},sphere:function(){i.polygonStart(),i.lineStart(),e(null,null,1,i),i.lineEnd(),i.polygonEnd()}},M=Pt(),x=t(M),b=!1;return y}}function Dt(n){return n.length>1}function Pt(){var n,t=[];return{lineStart:function(){t.push(n=[])},point:function(t,e){n.push([t,e])},lineEnd:b,buffer:function(){var e=t;return t=[],n=null,e},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function Ut(n,t){return((n=n.x)[0]<0?n[1]-Oa-Pa:Oa-n[1])-((t=t.x)[0]<0?t[1]-Oa-Pa:Oa-t[1])}function jt(n){var t,e=NaN,r=NaN,u=NaN;return{lineStart:function(){n.lineStart(),t=1},point:function(i,a){var o=i>0?ja:-ja,l=Ma(i-e);Ma(l-ja)<Pa?(n.point(e,r=(r+a)/2>0?Oa:-Oa),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(o,r),n.point(i,r),t=0):u!==o&&l>=ja&&(Ma(e-u)<Pa&&(e-=u*Pa),Ma(i-o)<Pa&&(i-=o*Pa),r=Ft(e,r,i,a),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(o,r),t=0),n.point(e=i,r=a),u=o},lineEnd:function(){n.lineEnd(),e=r=NaN},clean:function(){return 2-t}}}function Ft(n,t,e,r){var u,i,a=Math.sin(n-e);return Ma(a)>Pa?Math.atan((Math.sin(t)*(i=Math.cos(r))*Math.sin(e)-Math.sin(r)*(u=Math.cos(t))*Math.sin(n))/(u*i*a)):(t+r)/2}function Ht(n,t,e,r){var u;if(null==n)u=e*Oa,r.point(-ja,u),r.point(0,u),r.point(ja,u),r.point(ja,0),r.point(ja,-u),r.point(0,-u),r.point(-ja,-u),r.point(-ja,0),r.point(-ja,u);else if(Ma(n[0]-t[0])>Pa){var i=n[0]<t[0]?ja:-ja;u=e*i/2,r.point(-i,u),r.point(0,u),r.point(i,u)}else r.point(t[0],t[1])}function Ot(n,t){var e=n[0],r=n[1],u=[Math.sin(e),-Math.cos(e),0],i=0,a=0;ko.reset();for(var o=0,l=t.length;l>o;++o){var c=t[o],s=c.length;if(s)for(var f=c[0],h=f[0],g=f[1]/2+ja/4,p=Math.sin(g),v=Math.cos(g),d=1;;){d===s&&(d=0),n=c[d];var m=n[0],y=n[1]/2+ja/4,M=Math.sin(y),x=Math.cos(y),b=m-h,_=b>=0?1:-1,w=_*b,S=w>ja,k=p*M;if(ko.add(Math.atan2(k*_*Math.sin(w),v*x+k*Math.cos(w))),i+=S?b+_*Fa:b,S^h>=e^m>=e){var N=yt(dt(f),dt(n));bt(N);var E=yt(u,N);bt(E);var A=(S^b>=0?-1:1)*tn(E[2]);(r>A||r===A&&(N[0]||N[1]))&&(a+=S^b>=0?1:-1)}if(!d++)break;h=m,p=M,v=x,f=n}}return(-Pa>i||Pa>i&&0>ko)^1&a}function It(n){function t(n,t){return Math.cos(n)*Math.cos(t)>i}function e(n){var e,i,l,c,s;return{lineStart:function(){c=l=!1,s=1},point:function(f,h){var g,p=[f,h],v=t(f,h),d=a?v?0:u(f,h):v?u(f+(0>f?ja:-ja),h):0;if(!e&&(c=l=v)&&n.lineStart(),v!==l&&(g=r(e,p),(wt(e,g)||wt(p,g))&&(p[0]+=Pa,p[1]+=Pa,v=t(p[0],p[1]))),v!==l)s=0,v?(n.lineStart(),g=r(p,e),n.point(g[0],g[1])):(g=r(e,p),n.point(g[0],g[1]),n.lineEnd()),e=g;else if(o&&e&&a^v){var m;d&i||!(m=r(p,e,!0))||(s=0,a?(n.lineStart(),n.point(m[0][0],m[0][1]),n.point(m[1][0],m[1][1]),n.lineEnd()):(n.point(m[1][0],m[1][1]),n.lineEnd(),n.lineStart(),n.point(m[0][0],m[0][1])))}!v||e&&wt(e,p)||n.point(p[0],p[1]),e=p,l=v,i=d},lineEnd:function(){l&&n.lineEnd(),e=null},clean:function(){return s|(c&&l)<<1}}}function r(n,t,e){var r=dt(n),u=dt(t),a=[1,0,0],o=yt(r,u),l=mt(o,o),c=o[0],s=l-c*c;if(!s)return!e&&n;var f=i*l/s,h=-i*c/s,g=yt(a,o),p=xt(a,f),v=xt(o,h);Mt(p,v);var d=g,m=mt(p,d),y=mt(d,d),M=m*m-y*(mt(p,p)-1);if(!(0>M)){var x=Math.sqrt(M),b=xt(d,(-m-x)/y);if(Mt(b,p),b=_t(b),!e)return b;var _,w=n[0],S=t[0],k=n[1],N=t[1];w>S&&(_=w,w=S,S=_);var E=S-w,A=Ma(E-ja)<Pa,C=A||Pa>E;if(!A&&k>N&&(_=k,k=N,N=_),C?A?k+N>0^b[1]<(Ma(b[0]-w)<Pa?k:N):k<=b[1]&&b[1]<=N:E>ja^(w<=b[0]&&b[0]<=S)){var z=xt(d,(-m+x)/y);return Mt(z,p),[b,_t(z)]}}}function u(t,e){var r=a?n:ja-n,u=0;return-r>t?u|=1:t>r&&(u|=2),-r>e?u|=4:e>r&&(u|=8),u}var i=Math.cos(n),a=i>0,o=Ma(i)>Pa,l=ve(n,6*Ia);return Rt(t,e,l,a?[0,-n]:[-ja,n-ja])}function Yt(n,t,e,r){return function(u){var i,a=u.a,o=u.b,l=a.x,c=a.y,s=o.x,f=o.y,h=0,g=1,p=s-l,v=f-c;if(i=n-l,p||!(i>0)){if(i/=p,0>p){if(h>i)return;g>i&&(g=i)}else if(p>0){if(i>g)return;i>h&&(h=i)}if(i=e-l,p||!(0>i)){if(i/=p,0>p){if(i>g)return;i>h&&(h=i)}else if(p>0){if(h>i)return;g>i&&(g=i)}if(i=t-c,v||!(i>0)){if(i/=v,0>v){if(h>i)return;g>i&&(g=i)}else if(v>0){if(i>g)return;i>h&&(h=i)}if(i=r-c,v||!(0>i)){if(i/=v,0>v){if(i>g)return;i>h&&(h=i)}else if(v>0){if(h>i)return;g>i&&(g=i)}return h>0&&(u.a={x:l+h*p,y:c+h*v}),1>g&&(u.b={x:l+g*p,y:c+g*v}),u}}}}}}function Zt(n,t,e,r){function u(r,u){return Ma(r[0]-n)<Pa?u>0?0:3:Ma(r[0]-e)<Pa?u>0?2:1:Ma(r[1]-t)<Pa?u>0?1:0:u>0?3:2}function i(n,t){return a(n.x,t.x)}function a(n,t){var e=u(n,1),r=u(t,1);return e!==r?e-r:0===e?t[1]-n[1]:1===e?n[0]-t[0]:2===e?n[1]-t[1]:t[0]-n[0]}return function(o){function l(n){for(var t=0,e=d.length,r=n[1],u=0;e>u;++u)for(var i,a=1,o=d[u],l=o.length,c=o[0];l>a;++a)i=o[a],c[1]<=r?i[1]>r&&Q(c,i,n)>0&&++t:i[1]<=r&&Q(c,i,n)<0&&--t,c=i;return 0!==t}function c(i,o,l,c){var s=0,f=0;if(null==i||(s=u(i,l))!==(f=u(o,l))||a(i,o)<0^l>0){do c.point(0===s||3===s?n:e,s>1?r:t);while((s=(s+l+4)%4)!==f)}else c.point(o[0],o[1])}function s(u,i){return u>=n&&e>=u&&i>=t&&r>=i}function f(n,t){s(n,t)&&o.point(n,t)}function h(){C.point=p,d&&d.push(m=[]),S=!0,w=!1,b=_=NaN}function g(){v&&(p(y,M),x&&w&&E.rejoin(),v.push(E.buffer())),C.point=f,w&&o.lineEnd()}function p(n,t){n=Math.max(-Ho,Math.min(Ho,n)),t=Math.max(-Ho,Math.min(Ho,t));var e=s(n,t);if(d&&m.push([n,t]),S)y=n,M=t,x=e,S=!1,e&&(o.lineStart(),o.point(n,t));else if(e&&w)o.point(n,t);else{var r={a:{x:b,y:_},b:{x:n,y:t}};A(r)?(w||(o.lineStart(),o.point(r.a.x,r.a.y)),o.point(r.b.x,r.b.y),e||o.lineEnd(),k=!1):e&&(o.lineStart(),o.point(n,t),k=!1)}b=n,_=t,w=e}var v,d,m,y,M,x,b,_,w,S,k,N=o,E=Pt(),A=Yt(n,t,e,r),C={point:f,lineStart:h,lineEnd:g,polygonStart:function(){o=E,v=[],d=[],k=!0},polygonEnd:function(){o=N,v=oa.merge(v);var t=l([n,r]),e=k&&t,u=v.length;(e||u)&&(o.polygonStart(),e&&(o.lineStart(),c(null,null,1,o),o.lineEnd()),u&&Lt(v,i,t,c,o),o.polygonEnd()),v=d=m=null}};return C}}function Vt(n){var t=0,e=ja/3,r=oe(n),u=r(t,e);return u.parallels=function(n){return arguments.length?r(t=n[0]*ja/180,e=n[1]*ja/180):[t/ja*180,e/ja*180]},u}function Xt(n,t){function e(n,t){var e=Math.sqrt(i-2*u*Math.sin(t))/u;return[e*Math.sin(n*=u),a-e*Math.cos(n)]}var r=Math.sin(n),u=(r+Math.sin(t))/2,i=1+r*(2*u-r),a=Math.sqrt(i)/u;return e.invert=function(n,t){var e=a-t;return[Math.atan2(n,e)/u,tn((i-(n*n+e*e)*u*u)/(2*u))]},e}function $t(){function n(n,t){Io+=u*n-r*t,r=n,u=t}var t,e,r,u;$o.point=function(i,a){$o.point=n,t=r=i,e=u=a},$o.lineEnd=function(){n(t,e)}}function Bt(n,t){Yo>n&&(Yo=n),n>Vo&&(Vo=n),Zo>t&&(Zo=t),t>Xo&&(Xo=t)}function Wt(){function n(n,t){a.push("M",n,",",t,i)}function t(n,t){a.push("M",n,",",t),o.point=e}function e(n,t){a.push("L",n,",",t)}function r(){o.point=n}function u(){a.push("Z")}var i=Jt(4.5),a=[],o={point:n,lineStart:function(){o.point=t},lineEnd:r,polygonStart:function(){o.lineEnd=u},polygonEnd:function(){o.lineEnd=r,o.point=n},pointRadius:function(n){return i=Jt(n),o},result:function(){if(a.length){var n=a.join("");return a=[],n}}};return o}function Jt(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}function Gt(n,t){Co+=n,zo+=t,++Lo}function Kt(){function n(n,r){var u=n-t,i=r-e,a=Math.sqrt(u*u+i*i);qo+=a*(t+n)/2,To+=a*(e+r)/2,Ro+=a,Gt(t=n,e=r)}var t,e;Wo.point=function(r,u){Wo.point=n,Gt(t=r,e=u)}}function Qt(){Wo.point=Gt}function ne(){function n(n,t){var e=n-r,i=t-u,a=Math.sqrt(e*e+i*i);qo+=a*(r+n)/2,To+=a*(u+t)/2,Ro+=a,a=u*n-r*t,Do+=a*(r+n),Po+=a*(u+t),Uo+=3*a,Gt(r=n,u=t)}var t,e,r,u;Wo.point=function(i,a){Wo.point=n,Gt(t=r=i,e=u=a)},Wo.lineEnd=function(){n(t,e)}}function te(n){function t(t,e){n.moveTo(t+a,e),n.arc(t,e,a,0,Fa)}function e(t,e){n.moveTo(t,e),o.point=r}function r(t,e){n.lineTo(t,e)}function u(){o.point=t}function i(){n.closePath()}var a=4.5,o={point:t,lineStart:function(){o.point=e},lineEnd:u,polygonStart:function(){o.lineEnd=i},polygonEnd:function(){o.lineEnd=u,o.point=t},pointRadius:function(n){return a=n,o},result:b};return o}function ee(n){function t(n){return(o?r:e)(n)}function e(t){return ie(t,function(e,r){e=n(e,r),t.point(e[0],e[1])})}function r(t){function e(e,r){e=n(e,r),t.point(e[0],e[1])}function r(){M=NaN,S.point=i,t.lineStart()}function i(e,r){var i=dt([e,r]),a=n(e,r);u(M,x,y,b,_,w,M=a[0],x=a[1],y=e,b=i[0],_=i[1],w=i[2],o,t),t.point(M,x)}function a(){S.point=e,t.lineEnd()}function l(){ | |
| 2 | +r(),S.point=c,S.lineEnd=s}function c(n,t){i(f=n,h=t),g=M,p=x,v=b,d=_,m=w,S.point=i}function s(){u(M,x,y,b,_,w,g,p,f,v,d,m,o,t),S.lineEnd=a,a()}var f,h,g,p,v,d,m,y,M,x,b,_,w,S={point:e,lineStart:r,lineEnd:a,polygonStart:function(){t.polygonStart(),S.lineStart=l},polygonEnd:function(){t.polygonEnd(),S.lineStart=r}};return S}function u(t,e,r,o,l,c,s,f,h,g,p,v,d,m){var y=s-t,M=f-e,x=y*y+M*M;if(x>4*i&&d--){var b=o+g,_=l+p,w=c+v,S=Math.sqrt(b*b+_*_+w*w),k=Math.asin(w/=S),N=Ma(Ma(w)-1)<Pa||Ma(r-h)<Pa?(r+h)/2:Math.atan2(_,b),E=n(N,k),A=E[0],C=E[1],z=A-t,L=C-e,q=M*z-y*L;(q*q/x>i||Ma((y*z+M*L)/x-.5)>.3||a>o*g+l*p+c*v)&&(u(t,e,r,o,l,c,A,C,N,b/=S,_/=S,w,d,m),m.point(A,C),u(A,C,N,b,_,w,s,f,h,g,p,v,d,m))}}var i=.5,a=Math.cos(30*Ia),o=16;return t.precision=function(n){return arguments.length?(o=(i=n*n)>0&&16,t):Math.sqrt(i)},t}function re(n){var t=ee(function(t,e){return n([t*Ya,e*Ya])});return function(n){return le(t(n))}}function ue(n){this.stream=n}function ie(n,t){return{point:t,sphere:function(){n.sphere()},lineStart:function(){n.lineStart()},lineEnd:function(){n.lineEnd()},polygonStart:function(){n.polygonStart()},polygonEnd:function(){n.polygonEnd()}}}function ae(n){return oe(function(){return n})()}function oe(n){function t(n){return n=o(n[0]*Ia,n[1]*Ia),[n[0]*h+l,c-n[1]*h]}function e(n){return n=o.invert((n[0]-l)/h,(c-n[1])/h),n&&[n[0]*Ya,n[1]*Ya]}function r(){o=Ct(a=fe(m,M,x),i);var n=i(v,d);return l=g-n[0]*h,c=p+n[1]*h,u()}function u(){return s&&(s.valid=!1,s=null),t}var i,a,o,l,c,s,f=ee(function(n,t){return n=i(n,t),[n[0]*h+l,c-n[1]*h]}),h=150,g=480,p=250,v=0,d=0,m=0,M=0,x=0,b=Fo,_=y,w=null,S=null;return t.stream=function(n){return s&&(s.valid=!1),s=le(b(a,f(_(n)))),s.valid=!0,s},t.clipAngle=function(n){return arguments.length?(b=null==n?(w=n,Fo):It((w=+n)*Ia),u()):w},t.clipExtent=function(n){return arguments.length?(S=n,_=n?Zt(n[0][0],n[0][1],n[1][0],n[1][1]):y,u()):S},t.scale=function(n){return arguments.length?(h=+n,r()):h},t.translate=function(n){return arguments.length?(g=+n[0],p=+n[1],r()):[g,p]},t.center=function(n){return arguments.length?(v=n[0]%360*Ia,d=n[1]%360*Ia,r()):[v*Ya,d*Ya]},t.rotate=function(n){return arguments.length?(m=n[0]%360*Ia,M=n[1]%360*Ia,x=n.length>2?n[2]%360*Ia:0,r()):[m*Ya,M*Ya,x*Ya]},oa.rebind(t,f,"precision"),function(){return i=n.apply(this,arguments),t.invert=i.invert&&e,r()}}function le(n){return ie(n,function(t,e){n.point(t*Ia,e*Ia)})}function ce(n,t){return[n,t]}function se(n,t){return[n>ja?n-Fa:-ja>n?n+Fa:n,t]}function fe(n,t,e){return n?t||e?Ct(ge(n),pe(t,e)):ge(n):t||e?pe(t,e):se}function he(n){return function(t,e){return t+=n,[t>ja?t-Fa:-ja>t?t+Fa:t,e]}}function ge(n){var t=he(n);return t.invert=he(-n),t}function pe(n,t){function e(n,t){var e=Math.cos(t),o=Math.cos(n)*e,l=Math.sin(n)*e,c=Math.sin(t),s=c*r+o*u;return[Math.atan2(l*i-s*a,o*r-c*u),tn(s*i+l*a)]}var r=Math.cos(n),u=Math.sin(n),i=Math.cos(t),a=Math.sin(t);return e.invert=function(n,t){var e=Math.cos(t),o=Math.cos(n)*e,l=Math.sin(n)*e,c=Math.sin(t),s=c*i-l*a;return[Math.atan2(l*i+c*a,o*r+s*u),tn(s*r-o*u)]},e}function ve(n,t){var e=Math.cos(n),r=Math.sin(n);return function(u,i,a,o){var l=a*t;null!=u?(u=de(e,u),i=de(e,i),(a>0?i>u:u>i)&&(u+=a*Fa)):(u=n+a*Fa,i=n-.5*l);for(var c,s=u;a>0?s>i:i>s;s-=l)o.point((c=_t([e,-r*Math.cos(s),-r*Math.sin(s)]))[0],c[1])}}function de(n,t){var e=dt(t);e[0]-=n,bt(e);var r=nn(-e[1]);return((-e[2]<0?-r:r)+2*Math.PI-Pa)%(2*Math.PI)}function me(n,t,e){var r=oa.range(n,t-Pa,e).concat(t);return function(n){return r.map(function(t){return[n,t]})}}function ye(n,t,e){var r=oa.range(n,t-Pa,e).concat(t);return function(n){return r.map(function(t){return[t,n]})}}function Me(n){return n.source}function xe(n){return n.target}function be(n,t,e,r){var u=Math.cos(t),i=Math.sin(t),a=Math.cos(r),o=Math.sin(r),l=u*Math.cos(n),c=u*Math.sin(n),s=a*Math.cos(e),f=a*Math.sin(e),h=2*Math.asin(Math.sqrt(an(r-t)+u*a*an(e-n))),g=1/Math.sin(h),p=h?function(n){var t=Math.sin(n*=h)*g,e=Math.sin(h-n)*g,r=e*l+t*s,u=e*c+t*f,a=e*i+t*o;return[Math.atan2(u,r)*Ya,Math.atan2(a,Math.sqrt(r*r+u*u))*Ya]}:function(){return[n*Ya,t*Ya]};return p.distance=h,p}function _e(){function n(n,u){var i=Math.sin(u*=Ia),a=Math.cos(u),o=Ma((n*=Ia)-t),l=Math.cos(o);Jo+=Math.atan2(Math.sqrt((o=a*Math.sin(o))*o+(o=r*i-e*a*l)*o),e*i+r*a*l),t=n,e=i,r=a}var t,e,r;Go.point=function(u,i){t=u*Ia,e=Math.sin(i*=Ia),r=Math.cos(i),Go.point=n},Go.lineEnd=function(){Go.point=Go.lineEnd=b}}function we(n,t){function e(t,e){var r=Math.cos(t),u=Math.cos(e),i=n(r*u);return[i*u*Math.sin(t),i*Math.sin(e)]}return e.invert=function(n,e){var r=Math.sqrt(n*n+e*e),u=t(r),i=Math.sin(u),a=Math.cos(u);return[Math.atan2(n*i,r*a),Math.asin(r&&e*i/r)]},e}function Se(n,t){function e(n,t){a>0?-Oa+Pa>t&&(t=-Oa+Pa):t>Oa-Pa&&(t=Oa-Pa);var e=a/Math.pow(u(t),i);return[e*Math.sin(i*n),a-e*Math.cos(i*n)]}var r=Math.cos(n),u=function(n){return Math.tan(ja/4+n/2)},i=n===t?Math.sin(n):Math.log(r/Math.cos(t))/Math.log(u(t)/u(n)),a=r*Math.pow(u(n),i)/i;return i?(e.invert=function(n,t){var e=a-t,r=K(i)*Math.sqrt(n*n+e*e);return[Math.atan2(n,e)/i,2*Math.atan(Math.pow(a/r,1/i))-Oa]},e):Ne}function ke(n,t){function e(n,t){var e=i-t;return[e*Math.sin(u*n),i-e*Math.cos(u*n)]}var r=Math.cos(n),u=n===t?Math.sin(n):(r-Math.cos(t))/(t-n),i=r/u+n;return Ma(u)<Pa?ce:(e.invert=function(n,t){var e=i-t;return[Math.atan2(n,e)/u,i-K(u)*Math.sqrt(n*n+e*e)]},e)}function Ne(n,t){return[n,Math.log(Math.tan(ja/4+t/2))]}function Ee(n){var t,e=ae(n),r=e.scale,u=e.translate,i=e.clipExtent;return e.scale=function(){var n=r.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.translate=function(){var n=u.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.clipExtent=function(n){var a=i.apply(e,arguments);if(a===e){if(t=null==n){var o=ja*r(),l=u();i([[l[0]-o,l[1]-o],[l[0]+o,l[1]+o]])}}else t&&(a=null);return a},e.clipExtent(null)}function Ae(n,t){return[Math.log(Math.tan(ja/4+t/2)),-n]}function Ce(n){return n[0]}function ze(n){return n[1]}function Le(n){for(var t=n.length,e=[0,1],r=2,u=2;t>u;u++){for(;r>1&&Q(n[e[r-2]],n[e[r-1]],n[u])<=0;)--r;e[r++]=u}return e.slice(0,r)}function qe(n,t){return n[0]-t[0]||n[1]-t[1]}function Te(n,t,e){return(e[0]-t[0])*(n[1]-t[1])<(e[1]-t[1])*(n[0]-t[0])}function Re(n,t,e,r){var u=n[0],i=e[0],a=t[0]-u,o=r[0]-i,l=n[1],c=e[1],s=t[1]-l,f=r[1]-c,h=(o*(l-c)-f*(u-i))/(f*a-o*s);return[u+h*a,l+h*s]}function De(n){var t=n[0],e=n[n.length-1];return!(t[0]-e[0]||t[1]-e[1])}function Pe(){rr(this),this.edge=this.site=this.circle=null}function Ue(n){var t=cl.pop()||new Pe;return t.site=n,t}function je(n){Be(n),al.remove(n),cl.push(n),rr(n)}function Fe(n){var t=n.circle,e=t.x,r=t.cy,u={x:e,y:r},i=n.P,a=n.N,o=[n];je(n);for(var l=i;l.circle&&Ma(e-l.circle.x)<Pa&&Ma(r-l.circle.cy)<Pa;)i=l.P,o.unshift(l),je(l),l=i;o.unshift(l),Be(l);for(var c=a;c.circle&&Ma(e-c.circle.x)<Pa&&Ma(r-c.circle.cy)<Pa;)a=c.N,o.push(c),je(c),c=a;o.push(c),Be(c);var s,f=o.length;for(s=1;f>s;++s)c=o[s],l=o[s-1],nr(c.edge,l.site,c.site,u);l=o[0],c=o[f-1],c.edge=Ke(l.site,c.site,null,u),$e(l),$e(c)}function He(n){for(var t,e,r,u,i=n.x,a=n.y,o=al._;o;)if(r=Oe(o,a)-i,r>Pa)o=o.L;else{if(u=i-Ie(o,a),!(u>Pa)){r>-Pa?(t=o.P,e=o):u>-Pa?(t=o,e=o.N):t=e=o;break}if(!o.R){t=o;break}o=o.R}var l=Ue(n);if(al.insert(t,l),t||e){if(t===e)return Be(t),e=Ue(t.site),al.insert(l,e),l.edge=e.edge=Ke(t.site,l.site),$e(t),void $e(e);if(!e)return void(l.edge=Ke(t.site,l.site));Be(t),Be(e);var c=t.site,s=c.x,f=c.y,h=n.x-s,g=n.y-f,p=e.site,v=p.x-s,d=p.y-f,m=2*(h*d-g*v),y=h*h+g*g,M=v*v+d*d,x={x:(d*y-g*M)/m+s,y:(h*M-v*y)/m+f};nr(e.edge,c,p,x),l.edge=Ke(c,n,null,x),e.edge=Ke(n,p,null,x),$e(t),$e(e)}}function Oe(n,t){var e=n.site,r=e.x,u=e.y,i=u-t;if(!i)return r;var a=n.P;if(!a)return-(1/0);e=a.site;var o=e.x,l=e.y,c=l-t;if(!c)return o;var s=o-r,f=1/i-1/c,h=s/c;return f?(-h+Math.sqrt(h*h-2*f*(s*s/(-2*c)-l+c/2+u-i/2)))/f+r:(r+o)/2}function Ie(n,t){var e=n.N;if(e)return Oe(e,t);var r=n.site;return r.y===t?r.x:1/0}function Ye(n){this.site=n,this.edges=[]}function Ze(n){for(var t,e,r,u,i,a,o,l,c,s,f=n[0][0],h=n[1][0],g=n[0][1],p=n[1][1],v=il,d=v.length;d--;)if(i=v[d],i&&i.prepare())for(o=i.edges,l=o.length,a=0;l>a;)s=o[a].end(),r=s.x,u=s.y,c=o[++a%l].start(),t=c.x,e=c.y,(Ma(r-t)>Pa||Ma(u-e)>Pa)&&(o.splice(a,0,new tr(Qe(i.site,s,Ma(r-f)<Pa&&p-u>Pa?{x:f,y:Ma(t-f)<Pa?e:p}:Ma(u-p)<Pa&&h-r>Pa?{x:Ma(e-p)<Pa?t:h,y:p}:Ma(r-h)<Pa&&u-g>Pa?{x:h,y:Ma(t-h)<Pa?e:g}:Ma(u-g)<Pa&&r-f>Pa?{x:Ma(e-g)<Pa?t:f,y:g}:null),i.site,null)),++l)}function Ve(n,t){return t.angle-n.angle}function Xe(){rr(this),this.x=this.y=this.arc=this.site=this.cy=null}function $e(n){var t=n.P,e=n.N;if(t&&e){var r=t.site,u=n.site,i=e.site;if(r!==i){var a=u.x,o=u.y,l=r.x-a,c=r.y-o,s=i.x-a,f=i.y-o,h=2*(l*f-c*s);if(!(h>=-Ua)){var g=l*l+c*c,p=s*s+f*f,v=(f*g-c*p)/h,d=(l*p-s*g)/h,f=d+o,m=sl.pop()||new Xe;m.arc=n,m.site=u,m.x=v+a,m.y=f+Math.sqrt(v*v+d*d),m.cy=f,n.circle=m;for(var y=null,M=ll._;M;)if(m.y<M.y||m.y===M.y&&m.x<=M.x){if(!M.L){y=M.P;break}M=M.L}else{if(!M.R){y=M;break}M=M.R}ll.insert(y,m),y||(ol=m)}}}}function Be(n){var t=n.circle;t&&(t.P||(ol=t.N),ll.remove(t),sl.push(t),rr(t),n.circle=null)}function We(n){for(var t,e=ul,r=Yt(n[0][0],n[0][1],n[1][0],n[1][1]),u=e.length;u--;)t=e[u],(!Je(t,n)||!r(t)||Ma(t.a.x-t.b.x)<Pa&&Ma(t.a.y-t.b.y)<Pa)&&(t.a=t.b=null,e.splice(u,1))}function Je(n,t){var e=n.b;if(e)return!0;var r,u,i=n.a,a=t[0][0],o=t[1][0],l=t[0][1],c=t[1][1],s=n.l,f=n.r,h=s.x,g=s.y,p=f.x,v=f.y,d=(h+p)/2,m=(g+v)/2;if(v===g){if(a>d||d>=o)return;if(h>p){if(i){if(i.y>=c)return}else i={x:d,y:l};e={x:d,y:c}}else{if(i){if(i.y<l)return}else i={x:d,y:c};e={x:d,y:l}}}else if(r=(h-p)/(v-g),u=m-r*d,-1>r||r>1)if(h>p){if(i){if(i.y>=c)return}else i={x:(l-u)/r,y:l};e={x:(c-u)/r,y:c}}else{if(i){if(i.y<l)return}else i={x:(c-u)/r,y:c};e={x:(l-u)/r,y:l}}else if(v>g){if(i){if(i.x>=o)return}else i={x:a,y:r*a+u};e={x:o,y:r*o+u}}else{if(i){if(i.x<a)return}else i={x:o,y:r*o+u};e={x:a,y:r*a+u}}return n.a=i,n.b=e,!0}function Ge(n,t){this.l=n,this.r=t,this.a=this.b=null}function Ke(n,t,e,r){var u=new Ge(n,t);return ul.push(u),e&&nr(u,n,t,e),r&&nr(u,t,n,r),il[n.i].edges.push(new tr(u,n,t)),il[t.i].edges.push(new tr(u,t,n)),u}function Qe(n,t,e){var r=new Ge(n,null);return r.a=t,r.b=e,ul.push(r),r}function nr(n,t,e,r){n.a||n.b?n.l===e?n.b=r:n.a=r:(n.a=r,n.l=t,n.r=e)}function tr(n,t,e){var r=n.a,u=n.b;this.edge=n,this.site=t,this.angle=e?Math.atan2(e.y-t.y,e.x-t.x):n.l===t?Math.atan2(u.x-r.x,r.y-u.y):Math.atan2(r.x-u.x,u.y-r.y)}function er(){this._=null}function rr(n){n.U=n.C=n.L=n.R=n.P=n.N=null}function ur(n,t){var e=t,r=t.R,u=e.U;u?u.L===e?u.L=r:u.R=r:n._=r,r.U=u,e.U=r,e.R=r.L,e.R&&(e.R.U=e),r.L=e}function ir(n,t){var e=t,r=t.L,u=e.U;u?u.L===e?u.L=r:u.R=r:n._=r,r.U=u,e.U=r,e.L=r.R,e.L&&(e.L.U=e),r.R=e}function ar(n){for(;n.L;)n=n.L;return n}function or(n,t){var e,r,u,i=n.sort(lr).pop();for(ul=[],il=new Array(n.length),al=new er,ll=new er;;)if(u=ol,i&&(!u||i.y<u.y||i.y===u.y&&i.x<u.x))(i.x!==e||i.y!==r)&&(il[i.i]=new Ye(i),He(i),e=i.x,r=i.y),i=n.pop();else{if(!u)break;Fe(u.arc)}t&&(We(t),Ze(t));var a={cells:il,edges:ul};return al=ll=ul=il=null,a}function lr(n,t){return t.y-n.y||t.x-n.x}function cr(n,t,e){return(n.x-e.x)*(t.y-n.y)-(n.x-t.x)*(e.y-n.y)}function sr(n){return n.x}function fr(n){return n.y}function hr(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function gr(n,t,e,r,u,i){if(!n(t,e,r,u,i)){var a=.5*(e+u),o=.5*(r+i),l=t.nodes;l[0]&&gr(n,l[0],e,r,a,o),l[1]&&gr(n,l[1],a,r,u,o),l[2]&&gr(n,l[2],e,o,a,i),l[3]&&gr(n,l[3],a,o,u,i)}}function pr(n,t,e,r,u,i,a){var o,l=1/0;return function c(n,s,f,h,g){if(!(s>i||f>a||r>h||u>g)){if(p=n.point){var p,v=t-n.x,d=e-n.y,m=v*v+d*d;if(l>m){var y=Math.sqrt(l=m);r=t-y,u=e-y,i=t+y,a=e+y,o=p}}for(var M=n.nodes,x=.5*(s+h),b=.5*(f+g),_=t>=x,w=e>=b,S=w<<1|_,k=S+4;k>S;++S)if(n=M[3&S])switch(3&S){case 0:c(n,s,f,x,b);break;case 1:c(n,x,f,h,b);break;case 2:c(n,s,b,x,g);break;case 3:c(n,x,b,h,g)}}}(n,r,u,i,a),o}function vr(n,t){n=oa.rgb(n),t=oa.rgb(t);var e=n.r,r=n.g,u=n.b,i=t.r-e,a=t.g-r,o=t.b-u;return function(n){return"#"+bn(Math.round(e+i*n))+bn(Math.round(r+a*n))+bn(Math.round(u+o*n))}}function dr(n,t){var e,r={},u={};for(e in n)e in t?r[e]=Mr(n[e],t[e]):u[e]=n[e];for(e in t)e in n||(u[e]=t[e]);return function(n){for(e in r)u[e]=r[e](n);return u}}function mr(n,t){return n=+n,t=+t,function(e){return n*(1-e)+t*e}}function yr(n,t){var e,r,u,i=hl.lastIndex=gl.lastIndex=0,a=-1,o=[],l=[];for(n+="",t+="";(e=hl.exec(n))&&(r=gl.exec(t));)(u=r.index)>i&&(u=t.slice(i,u),o[a]?o[a]+=u:o[++a]=u),(e=e[0])===(r=r[0])?o[a]?o[a]+=r:o[++a]=r:(o[++a]=null,l.push({i:a,x:mr(e,r)})),i=gl.lastIndex;return i<t.length&&(u=t.slice(i),o[a]?o[a]+=u:o[++a]=u),o.length<2?l[0]?(t=l[0].x,function(n){return t(n)+""}):function(){return t}:(t=l.length,function(n){for(var e,r=0;t>r;++r)o[(e=l[r]).i]=e.x(n);return o.join("")})}function Mr(n,t){for(var e,r=oa.interpolators.length;--r>=0&&!(e=oa.interpolators[r](n,t)););return e}function xr(n,t){var e,r=[],u=[],i=n.length,a=t.length,o=Math.min(n.length,t.length);for(e=0;o>e;++e)r.push(Mr(n[e],t[e]));for(;i>e;++e)u[e]=n[e];for(;a>e;++e)u[e]=t[e];return function(n){for(e=0;o>e;++e)u[e]=r[e](n);return u}}function br(n){return function(t){return 0>=t?0:t>=1?1:n(t)}}function _r(n){return function(t){return 1-n(1-t)}}function wr(n){return function(t){return.5*(.5>t?n(2*t):2-n(2-2*t))}}function Sr(n){return n*n}function kr(n){return n*n*n}function Nr(n){if(0>=n)return 0;if(n>=1)return 1;var t=n*n,e=t*n;return 4*(.5>n?e:3*(n-t)+e-.75)}function Er(n){return function(t){return Math.pow(t,n)}}function Ar(n){return 1-Math.cos(n*Oa)}function Cr(n){return Math.pow(2,10*(n-1))}function zr(n){return 1-Math.sqrt(1-n*n)}function Lr(n,t){var e;return arguments.length<2&&(t=.45),arguments.length?e=t/Fa*Math.asin(1/n):(n=1,e=t/4),function(r){return 1+n*Math.pow(2,-10*r)*Math.sin((r-e)*Fa/t)}}function qr(n){return n||(n=1.70158),function(t){return t*t*((n+1)*t-n)}}function Tr(n){return 1/2.75>n?7.5625*n*n:2/2.75>n?7.5625*(n-=1.5/2.75)*n+.75:2.5/2.75>n?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375}function Rr(n,t){n=oa.hcl(n),t=oa.hcl(t);var e=n.h,r=n.c,u=n.l,i=t.h-e,a=t.c-r,o=t.l-u;return isNaN(a)&&(a=0,r=isNaN(r)?t.c:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return fn(e+i*n,r+a*n,u+o*n)+""}}function Dr(n,t){n=oa.hsl(n),t=oa.hsl(t);var e=n.h,r=n.s,u=n.l,i=t.h-e,a=t.s-r,o=t.l-u;return isNaN(a)&&(a=0,r=isNaN(r)?t.s:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return cn(e+i*n,r+a*n,u+o*n)+""}}function Pr(n,t){n=oa.lab(n),t=oa.lab(t);var e=n.l,r=n.a,u=n.b,i=t.l-e,a=t.a-r,o=t.b-u;return function(n){return gn(e+i*n,r+a*n,u+o*n)+""}}function Ur(n,t){return t-=n,function(e){return Math.round(n+t*e)}}function jr(n){var t=[n.a,n.b],e=[n.c,n.d],r=Hr(t),u=Fr(t,e),i=Hr(Or(e,t,-u))||0;t[0]*e[1]<e[0]*t[1]&&(t[0]*=-1,t[1]*=-1,r*=-1,u*=-1),this.rotate=(r?Math.atan2(t[1],t[0]):Math.atan2(-e[0],e[1]))*Ya,this.translate=[n.e,n.f],this.scale=[r,i],this.skew=i?Math.atan2(u,i)*Ya:0}function Fr(n,t){return n[0]*t[0]+n[1]*t[1]}function Hr(n){var t=Math.sqrt(Fr(n,n));return t&&(n[0]/=t,n[1]/=t),t}function Or(n,t,e){return n[0]+=e*t[0],n[1]+=e*t[1],n}function Ir(n){return n.length?n.pop()+",":""}function Yr(n,t,e,r){if(n[0]!==t[0]||n[1]!==t[1]){var u=e.push("translate(",null,",",null,")");r.push({i:u-4,x:mr(n[0],t[0])},{i:u-2,x:mr(n[1],t[1])})}else(t[0]||t[1])&&e.push("translate("+t+")")}function Zr(n,t,e,r){n!==t?(n-t>180?t+=360:t-n>180&&(n+=360),r.push({i:e.push(Ir(e)+"rotate(",null,")")-2,x:mr(n,t)})):t&&e.push(Ir(e)+"rotate("+t+")")}function Vr(n,t,e,r){n!==t?r.push({i:e.push(Ir(e)+"skewX(",null,")")-2,x:mr(n,t)}):t&&e.push(Ir(e)+"skewX("+t+")")}function Xr(n,t,e,r){if(n[0]!==t[0]||n[1]!==t[1]){var u=e.push(Ir(e)+"scale(",null,",",null,")");r.push({i:u-4,x:mr(n[0],t[0])},{i:u-2,x:mr(n[1],t[1])})}else(1!==t[0]||1!==t[1])&&e.push(Ir(e)+"scale("+t+")")}function $r(n,t){var e=[],r=[];return n=oa.transform(n),t=oa.transform(t),Yr(n.translate,t.translate,e,r),Zr(n.rotate,t.rotate,e,r),Vr(n.skew,t.skew,e,r),Xr(n.scale,t.scale,e,r),n=t=null,function(n){for(var t,u=-1,i=r.length;++u<i;)e[(t=r[u]).i]=t.x(n);return e.join("")}}function Br(n,t){return t=(t-=n=+n)||1/t,function(e){return(e-n)/t}}function Wr(n,t){return t=(t-=n=+n)||1/t,function(e){return Math.max(0,Math.min(1,(e-n)/t))}}function Jr(n){for(var t=n.source,e=n.target,r=Kr(t,e),u=[t];t!==r;)t=t.parent,u.push(t);for(var i=u.length;e!==r;)u.splice(i,0,e),e=e.parent;return u}function Gr(n){for(var t=[],e=n.parent;null!=e;)t.push(n),n=e,e=e.parent;return t.push(n),t}function Kr(n,t){if(n===t)return n;for(var e=Gr(n),r=Gr(t),u=e.pop(),i=r.pop(),a=null;u===i;)a=u,u=e.pop(),i=r.pop();return a}function Qr(n){n.fixed|=2}function nu(n){n.fixed&=-7}function tu(n){n.fixed|=4,n.px=n.x,n.py=n.y}function eu(n){n.fixed&=-5}function ru(n,t,e){var r=0,u=0;if(n.charge=0,!n.leaf)for(var i,a=n.nodes,o=a.length,l=-1;++l<o;)i=a[l],null!=i&&(ru(i,t,e),n.charge+=i.charge,r+=i.charge*i.cx,u+=i.charge*i.cy);if(n.point){n.leaf||(n.point.x+=Math.random()-.5,n.point.y+=Math.random()-.5);var c=t*e[n.point.index];n.charge+=n.pointCharge=c,r+=c*n.point.x,u+=c*n.point.y}n.cx=r/n.charge,n.cy=u/n.charge}function uu(n,t){return oa.rebind(n,t,"sort","children","value"),n.nodes=n,n.links=su,n}function iu(n,t){for(var e=[n];null!=(n=e.pop());)if(t(n),(u=n.children)&&(r=u.length))for(var r,u;--r>=0;)e.push(u[r])}function au(n,t){for(var e=[n],r=[];null!=(n=e.pop());)if(r.push(n),(i=n.children)&&(u=i.length))for(var u,i,a=-1;++a<u;)e.push(i[a]);for(;null!=(n=r.pop());)t(n)}function ou(n){return n.children}function lu(n){return n.value}function cu(n,t){return t.value-n.value}function su(n){return oa.merge(n.map(function(n){return(n.children||[]).map(function(t){return{source:n,target:t}})}))}function fu(n){return n.x}function hu(n){return n.y}function gu(n,t,e){n.y0=t,n.y=e}function pu(n){return oa.range(n.length)}function vu(n){for(var t=-1,e=n[0].length,r=[];++t<e;)r[t]=0;return r}function du(n){for(var t,e=1,r=0,u=n[0][1],i=n.length;i>e;++e)(t=n[e][1])>u&&(r=e,u=t);return r}function mu(n){return n.reduce(yu,0)}function yu(n,t){return n+t[1]}function Mu(n,t){return xu(n,Math.ceil(Math.log(t.length)/Math.LN2+1))}function xu(n,t){for(var e=-1,r=+n[0],u=(n[1]-r)/t,i=[];++e<=t;)i[e]=u*e+r;return i}function bu(n){return[oa.min(n),oa.max(n)]}function _u(n,t){return n.value-t.value}function wu(n,t){var e=n._pack_next;n._pack_next=t,t._pack_prev=n,t._pack_next=e,e._pack_prev=t}function Su(n,t){n._pack_next=t,t._pack_prev=n}function ku(n,t){var e=t.x-n.x,r=t.y-n.y,u=n.r+t.r;return.999*u*u>e*e+r*r}function Nu(n){function t(n){s=Math.min(n.x-n.r,s),f=Math.max(n.x+n.r,f),h=Math.min(n.y-n.r,h),g=Math.max(n.y+n.r,g)}if((e=n.children)&&(c=e.length)){var e,r,u,i,a,o,l,c,s=1/0,f=-(1/0),h=1/0,g=-(1/0);if(e.forEach(Eu),r=e[0],r.x=-r.r,r.y=0,t(r),c>1&&(u=e[1],u.x=u.r,u.y=0,t(u),c>2))for(i=e[2],zu(r,u,i),t(i),wu(r,i),r._pack_prev=i,wu(i,u),u=r._pack_next,a=3;c>a;a++){zu(r,u,i=e[a]);var p=0,v=1,d=1;for(o=u._pack_next;o!==u;o=o._pack_next,v++)if(ku(o,i)){p=1;break}if(1==p)for(l=r._pack_prev;l!==o._pack_prev&&!ku(l,i);l=l._pack_prev,d++);p?(d>v||v==d&&u.r<r.r?Su(r,u=o):Su(r=l,u),a--):(wu(r,i),u=i,t(i))}var m=(s+f)/2,y=(h+g)/2,M=0;for(a=0;c>a;a++)i=e[a],i.x-=m,i.y-=y,M=Math.max(M,i.r+Math.sqrt(i.x*i.x+i.y*i.y));n.r=M,e.forEach(Au)}}function Eu(n){n._pack_next=n._pack_prev=n}function Au(n){delete n._pack_next,delete n._pack_prev}function Cu(n,t,e,r){var u=n.children;if(n.x=t+=r*n.x,n.y=e+=r*n.y,n.r*=r,u)for(var i=-1,a=u.length;++i<a;)Cu(u[i],t,e,r)}function zu(n,t,e){var r=n.r+e.r,u=t.x-n.x,i=t.y-n.y;if(r&&(u||i)){var a=t.r+e.r,o=u*u+i*i;a*=a,r*=r;var l=.5+(r-a)/(2*o),c=Math.sqrt(Math.max(0,2*a*(r+o)-(r-=o)*r-a*a))/(2*o);e.x=n.x+l*u+c*i,e.y=n.y+l*i-c*u}else e.x=n.x+r,e.y=n.y}function Lu(n,t){return n.parent==t.parent?1:2}function qu(n){var t=n.children;return t.length?t[0]:n.t}function Tu(n){var t,e=n.children;return(t=e.length)?e[t-1]:n.t}function Ru(n,t,e){var r=e/(t.i-n.i);t.c-=r,t.s+=e,n.c+=r,t.z+=e,t.m+=e}function Du(n){for(var t,e=0,r=0,u=n.children,i=u.length;--i>=0;)t=u[i],t.z+=e,t.m+=e,e+=t.s+(r+=t.c)}function Pu(n,t,e){return n.a.parent===t.parent?n.a:e}function Uu(n){return 1+oa.max(n,function(n){return n.y})}function ju(n){return n.reduce(function(n,t){return n+t.x},0)/n.length}function Fu(n){var t=n.children;return t&&t.length?Fu(t[0]):n}function Hu(n){var t,e=n.children;return e&&(t=e.length)?Hu(e[t-1]):n}function Ou(n){return{x:n.x,y:n.y,dx:n.dx,dy:n.dy}}function Iu(n,t){var e=n.x+t[3],r=n.y+t[0],u=n.dx-t[1]-t[3],i=n.dy-t[0]-t[2];return 0>u&&(e+=u/2,u=0),0>i&&(r+=i/2,i=0),{x:e,y:r,dx:u,dy:i}}function Yu(n){var t=n[0],e=n[n.length-1];return e>t?[t,e]:[e,t]}function Zu(n){return n.rangeExtent?n.rangeExtent():Yu(n.range())}function Vu(n,t,e,r){var u=e(n[0],n[1]),i=r(t[0],t[1]);return function(n){return i(u(n))}}function Xu(n,t){var e,r=0,u=n.length-1,i=n[r],a=n[u];return i>a&&(e=r,r=u,u=e,e=i,i=a,a=e),n[r]=t.floor(i),n[u]=t.ceil(a),n}function $u(n){return n?{floor:function(t){return Math.floor(t/n)*n},ceil:function(t){return Math.ceil(t/n)*n}}:Sl}function Bu(n,t,e,r){var u=[],i=[],a=0,o=Math.min(n.length,t.length)-1;for(n[o]<n[0]&&(n=n.slice().reverse(),t=t.slice().reverse());++a<=o;)u.push(e(n[a-1],n[a])),i.push(r(t[a-1],t[a]));return function(t){var e=oa.bisect(n,t,1,o)-1;return i[e](u[e](t))}}function Wu(n,t,e,r){function u(){var u=Math.min(n.length,t.length)>2?Bu:Vu,l=r?Wr:Br;return a=u(n,t,l,e),o=u(t,n,l,Mr),i}function i(n){return a(n)}var a,o;return i.invert=function(n){return o(n)},i.domain=function(t){return arguments.length?(n=t.map(Number),u()):n},i.range=function(n){return arguments.length?(t=n,u()):t},i.rangeRound=function(n){return i.range(n).interpolate(Ur)},i.clamp=function(n){return arguments.length?(r=n,u()):r},i.interpolate=function(n){return arguments.length?(e=n,u()):e},i.ticks=function(t){return Qu(n,t)},i.tickFormat=function(t,e){return ni(n,t,e)},i.nice=function(t){return Gu(n,t),u()},i.copy=function(){return Wu(n,t,e,r)},u()}function Ju(n,t){return oa.rebind(n,t,"range","rangeRound","interpolate","clamp")}function Gu(n,t){return Xu(n,$u(Ku(n,t)[2])),Xu(n,$u(Ku(n,t)[2])),n}function Ku(n,t){null==t&&(t=10);var e=Yu(n),r=e[1]-e[0],u=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),i=t/r*u;return.15>=i?u*=10:.35>=i?u*=5:.75>=i&&(u*=2),e[0]=Math.ceil(e[0]/u)*u,e[1]=Math.floor(e[1]/u)*u+.5*u,e[2]=u,e}function Qu(n,t){return oa.range.apply(oa,Ku(n,t))}function ni(n,t,e){var r=Ku(n,t);if(e){var u=fo.exec(e);if(u.shift(),"s"===u[8]){var i=oa.formatPrefix(Math.max(Ma(r[0]),Ma(r[1])));return u[7]||(u[7]="."+ti(i.scale(r[2]))),u[8]="f",e=oa.format(u.join("")),function(n){return e(i.scale(n))+i.symbol}}u[7]||(u[7]="."+ei(u[8],r)),e=u.join("")}else e=",."+ti(r[2])+"f";return oa.format(e)}function ti(n){return-Math.floor(Math.log(n)/Math.LN10+.01)}function ei(n,t){var e=ti(t[2]);return n in kl?Math.abs(e-ti(Math.max(Ma(t[0]),Ma(t[1]))))+ +("e"!==n):e-2*("%"===n)}function ri(n,t,e,r){function u(n){return(e?Math.log(0>n?0:n):-Math.log(n>0?0:-n))/Math.log(t)}function i(n){return e?Math.pow(t,n):-Math.pow(t,-n)}function a(t){return n(u(t))}return a.invert=function(t){return i(n.invert(t))},a.domain=function(t){return arguments.length?(e=t[0]>=0,n.domain((r=t.map(Number)).map(u)),a):r},a.base=function(e){return arguments.length?(t=+e,n.domain(r.map(u)),a):t},a.nice=function(){var t=Xu(r.map(u),e?Math:El);return n.domain(t),r=t.map(i),a},a.ticks=function(){var n=Yu(r),a=[],o=n[0],l=n[1],c=Math.floor(u(o)),s=Math.ceil(u(l)),f=t%1?2:t;if(isFinite(s-c)){if(e){for(;s>c;c++)for(var h=1;f>h;h++)a.push(i(c)*h);a.push(i(c))}else for(a.push(i(c));c++<s;)for(var h=f-1;h>0;h--)a.push(i(c)*h);for(c=0;a[c]<o;c++);for(s=a.length;a[s-1]>l;s--);a=a.slice(c,s)}return a},a.tickFormat=function(n,e){if(!arguments.length)return Nl;arguments.length<2?e=Nl:"function"!=typeof e&&(e=oa.format(e));var r=Math.max(1,t*n/a.ticks().length);return function(n){var a=n/i(Math.round(u(n)));return t-.5>a*t&&(a*=t),r>=a?e(n):""}},a.copy=function(){return ri(n.copy(),t,e,r)},Ju(a,n)}function ui(n,t,e){function r(t){return n(u(t))}var u=ii(t),i=ii(1/t);return r.invert=function(t){return i(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain((e=t.map(Number)).map(u)),r):e},r.ticks=function(n){return Qu(e,n)},r.tickFormat=function(n,t){return ni(e,n,t)},r.nice=function(n){return r.domain(Gu(e,n))},r.exponent=function(a){return arguments.length?(u=ii(t=a),i=ii(1/t),n.domain(e.map(u)),r):t},r.copy=function(){return ui(n.copy(),t,e)},Ju(r,n)}function ii(n){return function(t){return 0>t?-Math.pow(-t,n):Math.pow(t,n)}}function ai(n,t){function e(e){return i[((u.get(e)||("range"===t.t?u.set(e,n.push(e)):NaN))-1)%i.length]}function r(t,e){return oa.range(n.length).map(function(n){return t+e*n})}var u,i,a;return e.domain=function(r){if(!arguments.length)return n;n=[],u=new c;for(var i,a=-1,o=r.length;++a<o;)u.has(i=r[a])||u.set(i,n.push(i));return e[t.t].apply(e,t.a)},e.range=function(n){return arguments.length?(i=n,a=0,t={t:"range",a:arguments},e):i},e.rangePoints=function(u,o){arguments.length<2&&(o=0);var l=u[0],c=u[1],s=n.length<2?(l=(l+c)/2,0):(c-l)/(n.length-1+o);return i=r(l+s*o/2,s),a=0,t={t:"rangePoints",a:arguments},e},e.rangeRoundPoints=function(u,o){arguments.length<2&&(o=0);var l=u[0],c=u[1],s=n.length<2?(l=c=Math.round((l+c)/2),0):(c-l)/(n.length-1+o)|0;return i=r(l+Math.round(s*o/2+(c-l-(n.length-1+o)*s)/2),s),a=0,t={t:"rangeRoundPoints",a:arguments},e},e.rangeBands=function(u,o,l){arguments.length<2&&(o=0),arguments.length<3&&(l=o);var c=u[1]<u[0],s=u[c-0],f=u[1-c],h=(f-s)/(n.length-o+2*l);return i=r(s+h*l,h),c&&i.reverse(),a=h*(1-o),t={t:"rangeBands",a:arguments},e},e.rangeRoundBands=function(u,o,l){arguments.length<2&&(o=0),arguments.length<3&&(l=o);var c=u[1]<u[0],s=u[c-0],f=u[1-c],h=Math.floor((f-s)/(n.length-o+2*l));return i=r(s+Math.round((f-s-(n.length-o)*h)/2),h),c&&i.reverse(),a=Math.round(h*(1-o)),t={t:"rangeRoundBands",a:arguments},e},e.rangeBand=function(){return a},e.rangeExtent=function(){return Yu(t.a[0])},e.copy=function(){return ai(n,t)},e.domain(n)}function oi(n,t){function i(){var e=0,r=t.length;for(o=[];++e<r;)o[e-1]=oa.quantile(n,e/r);return a}function a(n){return isNaN(n=+n)?void 0:t[oa.bisect(o,n)]}var o;return a.domain=function(t){return arguments.length?(n=t.map(r).filter(u).sort(e),i()):n},a.range=function(n){return arguments.length?(t=n,i()):t},a.quantiles=function(){return o},a.invertExtent=function(e){return e=t.indexOf(e),0>e?[NaN,NaN]:[e>0?o[e-1]:n[0],e<o.length?o[e]:n[n.length-1]]},a.copy=function(){return oi(n,t)},i()}function li(n,t,e){function r(t){return e[Math.max(0,Math.min(a,Math.floor(i*(t-n))))]}function u(){return i=e.length/(t-n),a=e.length-1,r}var i,a;return r.domain=function(e){return arguments.length?(n=+e[0],t=+e[e.length-1],u()):[n,t]},r.range=function(n){return arguments.length?(e=n,u()):e},r.invertExtent=function(t){return t=e.indexOf(t),t=0>t?NaN:t/i+n,[t,t+1/i]},r.copy=function(){return li(n,t,e)},u()}function ci(n,t){function e(e){return e>=e?t[oa.bisect(n,e)]:void 0}return e.domain=function(t){return arguments.length?(n=t,e):n},e.range=function(n){return arguments.length?(t=n,e):t},e.invertExtent=function(e){return e=t.indexOf(e),[n[e-1],n[e]]},e.copy=function(){return ci(n,t)},e}function si(n){function t(n){return+n}return t.invert=t,t.domain=t.range=function(e){return arguments.length?(n=e.map(t),t):n},t.ticks=function(t){return Qu(n,t)},t.tickFormat=function(t,e){return ni(n,t,e)},t.copy=function(){return si(n)},t}function fi(){return 0}function hi(n){return n.innerRadius}function gi(n){return n.outerRadius}function pi(n){return n.startAngle}function vi(n){return n.endAngle}function di(n){return n&&n.padAngle}function mi(n,t,e,r){return(n-e)*t-(t-r)*n>0?0:1}function yi(n,t,e,r,u){var i=n[0]-t[0],a=n[1]-t[1],o=(u?r:-r)/Math.sqrt(i*i+a*a),l=o*a,c=-o*i,s=n[0]+l,f=n[1]+c,h=t[0]+l,g=t[1]+c,p=(s+h)/2,v=(f+g)/2,d=h-s,m=g-f,y=d*d+m*m,M=e-r,x=s*g-h*f,b=(0>m?-1:1)*Math.sqrt(Math.max(0,M*M*y-x*x)),_=(x*m-d*b)/y,w=(-x*d-m*b)/y,S=(x*m+d*b)/y,k=(-x*d+m*b)/y,N=_-p,E=w-v,A=S-p,C=k-v;return N*N+E*E>A*A+C*C&&(_=S,w=k),[[_-l,w-c],[_*e/M,w*e/M]]}function Mi(n){function t(t){function a(){c.push("M",i(n(s),o))}for(var l,c=[],s=[],f=-1,h=t.length,g=En(e),p=En(r);++f<h;)u.call(this,l=t[f],f)?s.push([+g.call(this,l,f),+p.call(this,l,f)]):s.length&&(a(),s=[]);return s.length&&a(),c.length?c.join(""):null}var e=Ce,r=ze,u=zt,i=xi,a=i.key,o=.7;return t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t.defined=function(n){return arguments.length?(u=n,t):u},t.interpolate=function(n){return arguments.length?(a="function"==typeof n?i=n:(i=Tl.get(n)||xi).key,t):a},t.tension=function(n){return arguments.length?(o=n,t):o},t}function xi(n){return n.length>1?n.join("L"):n+"Z"}function bi(n){return n.join("L")+"Z"}function _i(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("H",(r[0]+(r=n[t])[0])/2,"V",r[1]);return e>1&&u.push("H",r[0]),u.join("")}function wi(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("V",(r=n[t])[1],"H",r[0]);return u.join("")}function Si(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("H",(r=n[t])[0],"V",r[1]);return u.join("")}function ki(n,t){return n.length<4?xi(n):n[1]+Ai(n.slice(1,-1),Ci(n,t))}function Ni(n,t){return n.length<3?bi(n):n[0]+Ai((n.push(n[0]),n),Ci([n[n.length-2]].concat(n,[n[1]]),t))}function Ei(n,t){return n.length<3?xi(n):n[0]+Ai(n,Ci(n,t))}function Ai(n,t){if(t.length<1||n.length!=t.length&&n.length!=t.length+2)return xi(n);var e=n.length!=t.length,r="",u=n[0],i=n[1],a=t[0],o=a,l=1;if(e&&(r+="Q"+(i[0]-2*a[0]/3)+","+(i[1]-2*a[1]/3)+","+i[0]+","+i[1],u=n[1],l=2),t.length>1){o=t[1],i=n[l],l++,r+="C"+(u[0]+a[0])+","+(u[1]+a[1])+","+(i[0]-o[0])+","+(i[1]-o[1])+","+i[0]+","+i[1];for(var c=2;c<t.length;c++,l++)i=n[l],o=t[c],r+="S"+(i[0]-o[0])+","+(i[1]-o[1])+","+i[0]+","+i[1]}if(e){var s=n[l];r+="Q"+(i[0]+2*o[0]/3)+","+(i[1]+2*o[1]/3)+","+s[0]+","+s[1]}return r}function Ci(n,t){for(var e,r=[],u=(1-t)/2,i=n[0],a=n[1],o=1,l=n.length;++o<l;)e=i,i=a,a=n[o],r.push([u*(a[0]-e[0]),u*(a[1]-e[1])]);return r}function zi(n){if(n.length<3)return xi(n);var t=1,e=n.length,r=n[0],u=r[0],i=r[1],a=[u,u,u,(r=n[1])[0]],o=[i,i,i,r[1]],l=[u,",",i,"L",Ri(Pl,a),",",Ri(Pl,o)];for(n.push(n[e-1]);++t<=e;)r=n[t],a.shift(),a.push(r[0]),o.shift(),o.push(r[1]),Di(l,a,o);return n.pop(),l.push("L",r),l.join("")}function Li(n){if(n.length<4)return xi(n);for(var t,e=[],r=-1,u=n.length,i=[0],a=[0];++r<3;)t=n[r],i.push(t[0]),a.push(t[1]);for(e.push(Ri(Pl,i)+","+Ri(Pl,a)),--r;++r<u;)t=n[r],i.shift(),i.push(t[0]),a.shift(),a.push(t[1]),Di(e,i,a);return e.join("")}function qi(n){for(var t,e,r=-1,u=n.length,i=u+4,a=[],o=[];++r<4;)e=n[r%u],a.push(e[0]),o.push(e[1]);for(t=[Ri(Pl,a),",",Ri(Pl,o)],--r;++r<i;)e=n[r%u],a.shift(),a.push(e[0]),o.shift(),o.push(e[1]),Di(t,a,o);return t.join("")}function Ti(n,t){var e=n.length-1;if(e)for(var r,u,i=n[0][0],a=n[0][1],o=n[e][0]-i,l=n[e][1]-a,c=-1;++c<=e;)r=n[c],u=c/e,r[0]=t*r[0]+(1-t)*(i+u*o),r[1]=t*r[1]+(1-t)*(a+u*l);return zi(n)}function Ri(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]*t[3]}function Di(n,t,e){n.push("C",Ri(Rl,t),",",Ri(Rl,e),",",Ri(Dl,t),",",Ri(Dl,e),",",Ri(Pl,t),",",Ri(Pl,e))}function Pi(n,t){return(t[1]-n[1])/(t[0]-n[0])}function Ui(n){for(var t=0,e=n.length-1,r=[],u=n[0],i=n[1],a=r[0]=Pi(u,i);++t<e;)r[t]=(a+(a=Pi(u=i,i=n[t+1])))/2;return r[t]=a,r}function ji(n){for(var t,e,r,u,i=[],a=Ui(n),o=-1,l=n.length-1;++o<l;)t=Pi(n[o],n[o+1]),Ma(t)<Pa?a[o]=a[o+1]=0:(e=a[o]/t,r=a[o+1]/t,u=e*e+r*r,u>9&&(u=3*t/Math.sqrt(u),a[o]=u*e,a[o+1]=u*r));for(o=-1;++o<=l;)u=(n[Math.min(l,o+1)][0]-n[Math.max(0,o-1)][0])/(6*(1+a[o]*a[o])),i.push([u||0,a[o]*u||0]);return i}function Fi(n){return n.length<3?xi(n):n[0]+Ai(n,ji(n))}function Hi(n){for(var t,e,r,u=-1,i=n.length;++u<i;)t=n[u],e=t[0],r=t[1]-Oa,t[0]=e*Math.cos(r),t[1]=e*Math.sin(r);return n}function Oi(n){function t(t){function l(){v.push("M",o(n(m),f),s,c(n(d.reverse()),f),"Z")}for(var h,g,p,v=[],d=[],m=[],y=-1,M=t.length,x=En(e),b=En(u),_=e===r?function(){ | |
| 3 | +return g}:En(r),w=u===i?function(){return p}:En(i);++y<M;)a.call(this,h=t[y],y)?(d.push([g=+x.call(this,h,y),p=+b.call(this,h,y)]),m.push([+_.call(this,h,y),+w.call(this,h,y)])):d.length&&(l(),d=[],m=[]);return d.length&&l(),v.length?v.join(""):null}var e=Ce,r=Ce,u=0,i=ze,a=zt,o=xi,l=o.key,c=o,s="L",f=.7;return t.x=function(n){return arguments.length?(e=r=n,t):r},t.x0=function(n){return arguments.length?(e=n,t):e},t.x1=function(n){return arguments.length?(r=n,t):r},t.y=function(n){return arguments.length?(u=i=n,t):i},t.y0=function(n){return arguments.length?(u=n,t):u},t.y1=function(n){return arguments.length?(i=n,t):i},t.defined=function(n){return arguments.length?(a=n,t):a},t.interpolate=function(n){return arguments.length?(l="function"==typeof n?o=n:(o=Tl.get(n)||xi).key,c=o.reverse||o,s=o.closed?"M":"L",t):l},t.tension=function(n){return arguments.length?(f=n,t):f},t}function Ii(n){return n.radius}function Yi(n){return[n.x,n.y]}function Zi(n){return function(){var t=n.apply(this,arguments),e=t[0],r=t[1]-Oa;return[e*Math.cos(r),e*Math.sin(r)]}}function Vi(){return 64}function Xi(){return"circle"}function $i(n){var t=Math.sqrt(n/ja);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+-t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}function Bi(n){return function(){var t,e,r;(t=this[n])&&(r=t[e=t.active])&&(r.timer.c=null,r.timer.t=NaN,--t.count?delete t[e]:delete this[n],t.active+=.5,r.event&&r.event.interrupt.call(this,this.__data__,r.index))}}function Wi(n,t,e){return Sa(n,Yl),n.namespace=t,n.id=e,n}function Ji(n,t,e,r){var u=n.id,i=n.namespace;return Y(n,"function"==typeof e?function(n,a,o){n[i][u].tween.set(t,r(e.call(n,n.__data__,a,o)))}:(e=r(e),function(n){n[i][u].tween.set(t,e)}))}function Gi(n){return null==n&&(n=""),function(){this.textContent=n}}function Ki(n){return null==n?"__transition__":"__transition_"+n+"__"}function Qi(n,t,e,r,u){function i(n){var t=v.delay;return s.t=t+l,n>=t?a(n-t):void(s.c=a)}function a(e){var u=p.active,i=p[u];i&&(i.timer.c=null,i.timer.t=NaN,--p.count,delete p[u],i.event&&i.event.interrupt.call(n,n.__data__,i.index));for(var a in p)if(r>+a){var c=p[a];c.timer.c=null,c.timer.t=NaN,--p.count,delete p[a]}s.c=o,qn(function(){return s.c&&o(e||1)&&(s.c=null,s.t=NaN),1},0,l),p.active=r,v.event&&v.event.start.call(n,n.__data__,t),g=[],v.tween.forEach(function(e,r){(r=r.call(n,n.__data__,t))&&g.push(r)}),h=v.ease,f=v.duration}function o(u){for(var i=u/f,a=h(i),o=g.length;o>0;)g[--o].call(n,a);return i>=1?(v.event&&v.event.end.call(n,n.__data__,t),--p.count?delete p[r]:delete n[e],1):void 0}var l,s,f,h,g,p=n[e]||(n[e]={active:0,count:0}),v=p[r];v||(l=u.time,s=qn(i,0,l),v=p[r]={tween:new c,time:l,timer:s,delay:u.delay,duration:u.duration,ease:u.ease,index:t},u=null,++p.count)}function na(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate("+(isFinite(r)?r:e(n))+",0)"})}function ta(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate(0,"+(isFinite(r)?r:e(n))+")"})}function ea(n){return n.toISOString()}function ra(n,t,e){function r(t){return n(t)}function u(n,e){var r=n[1]-n[0],u=r/e,i=oa.bisect(Kl,u);return i==Kl.length?[t.year,Ku(n.map(function(n){return n/31536e6}),e)[2]]:i?t[u/Kl[i-1]<Kl[i]/u?i-1:i]:[tc,Ku(n,e)[2]]}return r.invert=function(t){return ua(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain(t),r):n.domain().map(ua)},r.nice=function(n,t){function e(e){return!isNaN(e)&&!n.range(e,ua(+e+1),t).length}var i=r.domain(),a=Yu(i),o=null==n?u(a,10):"number"==typeof n&&u(a,n);return o&&(n=o[0],t=o[1]),r.domain(Xu(i,t>1?{floor:function(t){for(;e(t=n.floor(t));)t=ua(t-1);return t},ceil:function(t){for(;e(t=n.ceil(t));)t=ua(+t+1);return t}}:n))},r.ticks=function(n,t){var e=Yu(r.domain()),i=null==n?u(e,10):"number"==typeof n?u(e,n):!n.range&&[{range:n},t];return i&&(n=i[0],t=i[1]),n.range(e[0],ua(+e[1]+1),1>t?1:t)},r.tickFormat=function(){return e},r.copy=function(){return ra(n.copy(),t,e)},Ju(r,n)}function ua(n){return new Date(n)}function ia(n){return JSON.parse(n.responseText)}function aa(n){var t=sa.createRange();return t.selectNode(sa.body),t.createContextualFragment(n.responseText)}var oa={version:"3.5.16"},la=[].slice,ca=function(n){return la.call(n)},sa=this.document;if(sa)try{ca(sa.documentElement.childNodes)[0].nodeType}catch(fa){ca=function(n){for(var t=n.length,e=new Array(t);t--;)e[t]=n[t];return e}}if(Date.now||(Date.now=function(){return+new Date}),sa)try{sa.createElement("DIV").style.setProperty("opacity",0,"")}catch(ha){var ga=this.Element.prototype,pa=ga.setAttribute,va=ga.setAttributeNS,da=this.CSSStyleDeclaration.prototype,ma=da.setProperty;ga.setAttribute=function(n,t){pa.call(this,n,t+"")},ga.setAttributeNS=function(n,t,e){va.call(this,n,t,e+"")},da.setProperty=function(n,t,e){ma.call(this,n,t+"",e)}}oa.ascending=e,oa.descending=function(n,t){return n>t?-1:t>n?1:t>=n?0:NaN},oa.min=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u<i;)if(null!=(r=n[u])&&r>=r){e=r;break}for(;++u<i;)null!=(r=n[u])&&e>r&&(e=r)}else{for(;++u<i;)if(null!=(r=t.call(n,n[u],u))&&r>=r){e=r;break}for(;++u<i;)null!=(r=t.call(n,n[u],u))&&e>r&&(e=r)}return e},oa.max=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u<i;)if(null!=(r=n[u])&&r>=r){e=r;break}for(;++u<i;)null!=(r=n[u])&&r>e&&(e=r)}else{for(;++u<i;)if(null!=(r=t.call(n,n[u],u))&&r>=r){e=r;break}for(;++u<i;)null!=(r=t.call(n,n[u],u))&&r>e&&(e=r)}return e},oa.extent=function(n,t){var e,r,u,i=-1,a=n.length;if(1===arguments.length){for(;++i<a;)if(null!=(r=n[i])&&r>=r){e=u=r;break}for(;++i<a;)null!=(r=n[i])&&(e>r&&(e=r),r>u&&(u=r))}else{for(;++i<a;)if(null!=(r=t.call(n,n[i],i))&&r>=r){e=u=r;break}for(;++i<a;)null!=(r=t.call(n,n[i],i))&&(e>r&&(e=r),r>u&&(u=r))}return[e,u]},oa.sum=function(n,t){var e,r=0,i=n.length,a=-1;if(1===arguments.length)for(;++a<i;)u(e=+n[a])&&(r+=e);else for(;++a<i;)u(e=+t.call(n,n[a],a))&&(r+=e);return r},oa.mean=function(n,t){var e,i=0,a=n.length,o=-1,l=a;if(1===arguments.length)for(;++o<a;)u(e=r(n[o]))?i+=e:--l;else for(;++o<a;)u(e=r(t.call(n,n[o],o)))?i+=e:--l;return l?i/l:void 0},oa.quantile=function(n,t){var e=(n.length-1)*t+1,r=Math.floor(e),u=+n[r-1],i=e-r;return i?u+i*(n[r]-u):u},oa.median=function(n,t){var i,a=[],o=n.length,l=-1;if(1===arguments.length)for(;++l<o;)u(i=r(n[l]))&&a.push(i);else for(;++l<o;)u(i=r(t.call(n,n[l],l)))&&a.push(i);return a.length?oa.quantile(a.sort(e),.5):void 0},oa.variance=function(n,t){var e,i,a=n.length,o=0,l=0,c=-1,s=0;if(1===arguments.length)for(;++c<a;)u(e=r(n[c]))&&(i=e-o,o+=i/++s,l+=i*(e-o));else for(;++c<a;)u(e=r(t.call(n,n[c],c)))&&(i=e-o,o+=i/++s,l+=i*(e-o));return s>1?l/(s-1):void 0},oa.deviation=function(){var n=oa.variance.apply(this,arguments);return n?Math.sqrt(n):n};var ya=i(e);oa.bisectLeft=ya.left,oa.bisect=oa.bisectRight=ya.right,oa.bisector=function(n){return i(1===n.length?function(t,r){return e(n(t),r)}:n)},oa.shuffle=function(n,t,e){(i=arguments.length)<3&&(e=n.length,2>i&&(t=0));for(var r,u,i=e-t;i;)u=Math.random()*i--|0,r=n[i+t],n[i+t]=n[u+t],n[u+t]=r;return n},oa.permute=function(n,t){for(var e=t.length,r=new Array(e);e--;)r[e]=n[t[e]];return r},oa.pairs=function(n){for(var t,e=0,r=n.length-1,u=n[0],i=new Array(0>r?0:r);r>e;)i[e]=[t=u,u=n[++e]];return i},oa.transpose=function(n){if(!(u=n.length))return[];for(var t=-1,e=oa.min(n,a),r=new Array(e);++t<e;)for(var u,i=-1,o=r[t]=new Array(u);++i<u;)o[i]=n[i][t];return r},oa.zip=function(){return oa.transpose(arguments)},oa.keys=function(n){var t=[];for(var e in n)t.push(e);return t},oa.values=function(n){var t=[];for(var e in n)t.push(n[e]);return t},oa.entries=function(n){var t=[];for(var e in n)t.push({key:e,value:n[e]});return t},oa.merge=function(n){for(var t,e,r,u=n.length,i=-1,a=0;++i<u;)a+=n[i].length;for(e=new Array(a);--u>=0;)for(r=n[u],t=r.length;--t>=0;)e[--a]=r[t];return e};var Ma=Math.abs;oa.range=function(n,t,e){if(arguments.length<3&&(e=1,arguments.length<2&&(t=n,n=0)),(t-n)/e===1/0)throw new Error("infinite range");var r,u=[],i=o(Ma(e)),a=-1;if(n*=i,t*=i,e*=i,0>e)for(;(r=n+e*++a)>t;)u.push(r/i);else for(;(r=n+e*++a)<t;)u.push(r/i);return u},oa.map=function(n,t){var e=new c;if(n instanceof c)n.forEach(function(n,t){e.set(n,t)});else if(Array.isArray(n)){var r,u=-1,i=n.length;if(1===arguments.length)for(;++u<i;)e.set(u,n[u]);else for(;++u<i;)e.set(t.call(n,r=n[u],u),r)}else for(var a in n)e.set(a,n[a]);return e};var xa="__proto__",ba="\x00";l(c,{has:h,get:function(n){return this._[s(n)]},set:function(n,t){return this._[s(n)]=t},remove:g,keys:p,values:function(){var n=[];for(var t in this._)n.push(this._[t]);return n},entries:function(){var n=[];for(var t in this._)n.push({key:f(t),value:this._[t]});return n},size:v,empty:d,forEach:function(n){for(var t in this._)n.call(this,f(t),this._[t])}}),oa.nest=function(){function n(t,a,o){if(o>=i.length)return r?r.call(u,a):e?a.sort(e):a;for(var l,s,f,h,g=-1,p=a.length,v=i[o++],d=new c;++g<p;)(h=d.get(l=v(s=a[g])))?h.push(s):d.set(l,[s]);return t?(s=t(),f=function(e,r){s.set(e,n(t,r,o))}):(s={},f=function(e,r){s[e]=n(t,r,o)}),d.forEach(f),s}function t(n,e){if(e>=i.length)return n;var r=[],u=a[e++];return n.forEach(function(n,u){r.push({key:n,values:t(u,e)})}),u?r.sort(function(n,t){return u(n.key,t.key)}):r}var e,r,u={},i=[],a=[];return u.map=function(t,e){return n(e,t,0)},u.entries=function(e){return t(n(oa.map,e,0),0)},u.key=function(n){return i.push(n),u},u.sortKeys=function(n){return a[i.length-1]=n,u},u.sortValues=function(n){return e=n,u},u.rollup=function(n){return r=n,u},u},oa.set=function(n){var t=new m;if(n)for(var e=0,r=n.length;r>e;++e)t.add(n[e]);return t},l(m,{has:h,add:function(n){return this._[s(n+="")]=!0,n},remove:g,values:p,size:v,empty:d,forEach:function(n){for(var t in this._)n.call(this,f(t))}}),oa.behavior={},oa.rebind=function(n,t){for(var e,r=1,u=arguments.length;++r<u;)n[e=arguments[r]]=M(n,t,t[e]);return n};var _a=["webkit","ms","moz","Moz","o","O"];oa.dispatch=function(){for(var n=new _,t=-1,e=arguments.length;++t<e;)n[arguments[t]]=w(n);return n},_.prototype.on=function(n,t){var e=n.indexOf("."),r="";if(e>=0&&(r=n.slice(e+1),n=n.slice(0,e)),n)return arguments.length<2?this[n].on(r):this[n].on(r,t);if(2===arguments.length){if(null==t)for(n in this)this.hasOwnProperty(n)&&this[n].on(r,null);return this}},oa.event=null,oa.requote=function(n){return n.replace(wa,"\\$&")};var wa=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,Sa={}.__proto__?function(n,t){n.__proto__=t}:function(n,t){for(var e in t)n[e]=t[e]},ka=function(n,t){return t.querySelector(n)},Na=function(n,t){return t.querySelectorAll(n)},Ea=function(n,t){var e=n.matches||n[x(n,"matchesSelector")];return(Ea=function(n,t){return e.call(n,t)})(n,t)};"function"==typeof Sizzle&&(ka=function(n,t){return Sizzle(n,t)[0]||null},Na=Sizzle,Ea=Sizzle.matchesSelector),oa.selection=function(){return oa.select(sa.documentElement)};var Aa=oa.selection.prototype=[];Aa.select=function(n){var t,e,r,u,i=[];n=A(n);for(var a=-1,o=this.length;++a<o;){i.push(t=[]),t.parentNode=(r=this[a]).parentNode;for(var l=-1,c=r.length;++l<c;)(u=r[l])?(t.push(e=n.call(u,u.__data__,l,a)),e&&"__data__"in u&&(e.__data__=u.__data__)):t.push(null)}return E(i)},Aa.selectAll=function(n){var t,e,r=[];n=C(n);for(var u=-1,i=this.length;++u<i;)for(var a=this[u],o=-1,l=a.length;++o<l;)(e=a[o])&&(r.push(t=ca(n.call(e,e.__data__,o,u))),t.parentNode=e);return E(r)};var Ca="http://www.w3.org/1999/xhtml",za={svg:"http://www.w3.org/2000/svg",xhtml:Ca,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};oa.ns={prefix:za,qualify:function(n){var t=n.indexOf(":"),e=n;return t>=0&&"xmlns"!==(e=n.slice(0,t))&&(n=n.slice(t+1)),za.hasOwnProperty(e)?{space:za[e],local:n}:n}},Aa.attr=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node();return n=oa.ns.qualify(n),n.local?e.getAttributeNS(n.space,n.local):e.getAttribute(n)}for(t in n)this.each(z(t,n[t]));return this}return this.each(z(n,t))},Aa.classed=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node(),r=(n=T(n)).length,u=-1;if(t=e.classList){for(;++u<r;)if(!t.contains(n[u]))return!1}else for(t=e.getAttribute("class");++u<r;)if(!q(n[u]).test(t))return!1;return!0}for(t in n)this.each(R(t,n[t]));return this}return this.each(R(n,t))},Aa.style=function(n,e,r){var u=arguments.length;if(3>u){if("string"!=typeof n){2>u&&(e="");for(r in n)this.each(P(r,n[r],e));return this}if(2>u){var i=this.node();return t(i).getComputedStyle(i,null).getPropertyValue(n)}r=""}return this.each(P(n,e,r))},Aa.property=function(n,t){if(arguments.length<2){if("string"==typeof n)return this.node()[n];for(t in n)this.each(U(t,n[t]));return this}return this.each(U(n,t))},Aa.text=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.textContent=null==t?"":t}:null==n?function(){this.textContent=""}:function(){this.textContent=n}):this.node().textContent},Aa.html=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.innerHTML=null==t?"":t}:null==n?function(){this.innerHTML=""}:function(){this.innerHTML=n}):this.node().innerHTML},Aa.append=function(n){return n=j(n),this.select(function(){return this.appendChild(n.apply(this,arguments))})},Aa.insert=function(n,t){return n=j(n),t=A(t),this.select(function(){return this.insertBefore(n.apply(this,arguments),t.apply(this,arguments)||null)})},Aa.remove=function(){return this.each(F)},Aa.data=function(n,t){function e(n,e){var r,u,i,a=n.length,f=e.length,h=Math.min(a,f),g=new Array(f),p=new Array(f),v=new Array(a);if(t){var d,m=new c,y=new Array(a);for(r=-1;++r<a;)(u=n[r])&&(m.has(d=t.call(u,u.__data__,r))?v[r]=u:m.set(d,u),y[r]=d);for(r=-1;++r<f;)(u=m.get(d=t.call(e,i=e[r],r)))?u!==!0&&(g[r]=u,u.__data__=i):p[r]=H(i),m.set(d,!0);for(r=-1;++r<a;)r in y&&m.get(y[r])!==!0&&(v[r]=n[r])}else{for(r=-1;++r<h;)u=n[r],i=e[r],u?(u.__data__=i,g[r]=u):p[r]=H(i);for(;f>r;++r)p[r]=H(e[r]);for(;a>r;++r)v[r]=n[r]}p.update=g,p.parentNode=g.parentNode=v.parentNode=n.parentNode,o.push(p),l.push(g),s.push(v)}var r,u,i=-1,a=this.length;if(!arguments.length){for(n=new Array(a=(r=this[0]).length);++i<a;)(u=r[i])&&(n[i]=u.__data__);return n}var o=Z([]),l=E([]),s=E([]);if("function"==typeof n)for(;++i<a;)e(r=this[i],n.call(r,r.parentNode.__data__,i));else for(;++i<a;)e(r=this[i],n);return l.enter=function(){return o},l.exit=function(){return s},l},Aa.datum=function(n){return arguments.length?this.property("__data__",n):this.property("__data__")},Aa.filter=function(n){var t,e,r,u=[];"function"!=typeof n&&(n=O(n));for(var i=0,a=this.length;a>i;i++){u.push(t=[]),t.parentNode=(e=this[i]).parentNode;for(var o=0,l=e.length;l>o;o++)(r=e[o])&&n.call(r,r.__data__,o,i)&&t.push(r)}return E(u)},Aa.order=function(){for(var n=-1,t=this.length;++n<t;)for(var e,r=this[n],u=r.length-1,i=r[u];--u>=0;)(e=r[u])&&(i&&i!==e.nextSibling&&i.parentNode.insertBefore(e,i),i=e);return this},Aa.sort=function(n){n=I.apply(this,arguments);for(var t=-1,e=this.length;++t<e;)this[t].sort(n);return this.order()},Aa.each=function(n){return Y(this,function(t,e,r){n.call(t,t.__data__,e,r)})},Aa.call=function(n){var t=ca(arguments);return n.apply(t[0]=this,t),this},Aa.empty=function(){return!this.node()},Aa.node=function(){for(var n=0,t=this.length;t>n;n++)for(var e=this[n],r=0,u=e.length;u>r;r++){var i=e[r];if(i)return i}return null},Aa.size=function(){var n=0;return Y(this,function(){++n}),n};var La=[];oa.selection.enter=Z,oa.selection.enter.prototype=La,La.append=Aa.append,La.empty=Aa.empty,La.node=Aa.node,La.call=Aa.call,La.size=Aa.size,La.select=function(n){for(var t,e,r,u,i,a=[],o=-1,l=this.length;++o<l;){r=(u=this[o]).update,a.push(t=[]),t.parentNode=u.parentNode;for(var c=-1,s=u.length;++c<s;)(i=u[c])?(t.push(r[c]=e=n.call(u.parentNode,i.__data__,c,o)),e.__data__=i.__data__):t.push(null)}return E(a)},La.insert=function(n,t){return arguments.length<2&&(t=V(this)),Aa.insert.call(this,n,t)},oa.select=function(t){var e;return"string"==typeof t?(e=[ka(t,sa)],e.parentNode=sa.documentElement):(e=[t],e.parentNode=n(t)),E([e])},oa.selectAll=function(n){var t;return"string"==typeof n?(t=ca(Na(n,sa)),t.parentNode=sa.documentElement):(t=ca(n),t.parentNode=null),E([t])},Aa.on=function(n,t,e){var r=arguments.length;if(3>r){if("string"!=typeof n){2>r&&(t=!1);for(e in n)this.each(X(e,n[e],t));return this}if(2>r)return(r=this.node()["__on"+n])&&r._;e=!1}return this.each(X(n,t,e))};var qa=oa.map({mouseenter:"mouseover",mouseleave:"mouseout"});sa&&qa.forEach(function(n){"on"+n in sa&&qa.remove(n)});var Ta,Ra=0;oa.mouse=function(n){return J(n,k())};var Da=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;oa.touch=function(n,t,e){if(arguments.length<3&&(e=t,t=k().changedTouches),t)for(var r,u=0,i=t.length;i>u;++u)if((r=t[u]).identifier===e)return J(n,r)},oa.behavior.drag=function(){function n(){this.on("mousedown.drag",i).on("touchstart.drag",a)}function e(n,t,e,i,a){return function(){function o(){var n,e,r=t(h,v);r&&(n=r[0]-M[0],e=r[1]-M[1],p|=n|e,M=r,g({type:"drag",x:r[0]+c[0],y:r[1]+c[1],dx:n,dy:e}))}function l(){t(h,v)&&(m.on(i+d,null).on(a+d,null),y(p),g({type:"dragend"}))}var c,s=this,f=oa.event.target.correspondingElement||oa.event.target,h=s.parentNode,g=r.of(s,arguments),p=0,v=n(),d=".drag"+(null==v?"":"-"+v),m=oa.select(e(f)).on(i+d,o).on(a+d,l),y=W(f),M=t(h,v);u?(c=u.apply(s,arguments),c=[c.x-M[0],c.y-M[1]]):c=[0,0],g({type:"dragstart"})}}var r=N(n,"drag","dragstart","dragend"),u=null,i=e(b,oa.mouse,t,"mousemove","mouseup"),a=e(G,oa.touch,y,"touchmove","touchend");return n.origin=function(t){return arguments.length?(u=t,n):u},oa.rebind(n,r,"on")},oa.touches=function(n,t){return arguments.length<2&&(t=k().touches),t?ca(t).map(function(t){var e=J(n,t);return e.identifier=t.identifier,e}):[]};var Pa=1e-6,Ua=Pa*Pa,ja=Math.PI,Fa=2*ja,Ha=Fa-Pa,Oa=ja/2,Ia=ja/180,Ya=180/ja,Za=Math.SQRT2,Va=2,Xa=4;oa.interpolateZoom=function(n,t){var e,r,u=n[0],i=n[1],a=n[2],o=t[0],l=t[1],c=t[2],s=o-u,f=l-i,h=s*s+f*f;if(Ua>h)r=Math.log(c/a)/Za,e=function(n){return[u+n*s,i+n*f,a*Math.exp(Za*n*r)]};else{var g=Math.sqrt(h),p=(c*c-a*a+Xa*h)/(2*a*Va*g),v=(c*c-a*a-Xa*h)/(2*c*Va*g),d=Math.log(Math.sqrt(p*p+1)-p),m=Math.log(Math.sqrt(v*v+1)-v);r=(m-d)/Za,e=function(n){var t=n*r,e=rn(d),o=a/(Va*g)*(e*un(Za*t+d)-en(d));return[u+o*s,i+o*f,a*e/rn(Za*t+d)]}}return e.duration=1e3*r,e},oa.behavior.zoom=function(){function n(n){n.on(L,f).on(Ba+".zoom",g).on("dblclick.zoom",p).on(R,h)}function e(n){return[(n[0]-k.x)/k.k,(n[1]-k.y)/k.k]}function r(n){return[n[0]*k.k+k.x,n[1]*k.k+k.y]}function u(n){k.k=Math.max(A[0],Math.min(A[1],n))}function i(n,t){t=r(t),k.x+=n[0]-t[0],k.y+=n[1]-t[1]}function a(t,e,r,a){t.__chart__={x:k.x,y:k.y,k:k.k},u(Math.pow(2,a)),i(d=e,r),t=oa.select(t),C>0&&(t=t.transition().duration(C)),t.call(n.event)}function o(){b&&b.domain(x.range().map(function(n){return(n-k.x)/k.k}).map(x.invert)),w&&w.domain(_.range().map(function(n){return(n-k.y)/k.k}).map(_.invert))}function l(n){z++||n({type:"zoomstart"})}function c(n){o(),n({type:"zoom",scale:k.k,translate:[k.x,k.y]})}function s(n){--z||(n({type:"zoomend"}),d=null)}function f(){function n(){o=1,i(oa.mouse(u),h),c(a)}function r(){f.on(q,null).on(T,null),g(o),s(a)}var u=this,a=D.of(u,arguments),o=0,f=oa.select(t(u)).on(q,n).on(T,r),h=e(oa.mouse(u)),g=W(u);Il.call(u),l(a)}function h(){function n(){var n=oa.touches(p);return g=k.k,n.forEach(function(n){n.identifier in d&&(d[n.identifier]=e(n))}),n}function t(){var t=oa.event.target;oa.select(t).on(x,r).on(b,o),_.push(t);for(var e=oa.event.changedTouches,u=0,i=e.length;i>u;++u)d[e[u].identifier]=null;var l=n(),c=Date.now();if(1===l.length){if(500>c-M){var s=l[0];a(p,s,d[s.identifier],Math.floor(Math.log(k.k)/Math.LN2)+1),S()}M=c}else if(l.length>1){var s=l[0],f=l[1],h=s[0]-f[0],g=s[1]-f[1];m=h*h+g*g}}function r(){var n,t,e,r,a=oa.touches(p);Il.call(p);for(var o=0,l=a.length;l>o;++o,r=null)if(e=a[o],r=d[e.identifier]){if(t)break;n=e,t=r}if(r){var s=(s=e[0]-n[0])*s+(s=e[1]-n[1])*s,f=m&&Math.sqrt(s/m);n=[(n[0]+e[0])/2,(n[1]+e[1])/2],t=[(t[0]+r[0])/2,(t[1]+r[1])/2],u(f*g)}M=null,i(n,t),c(v)}function o(){if(oa.event.touches.length){for(var t=oa.event.changedTouches,e=0,r=t.length;r>e;++e)delete d[t[e].identifier];for(var u in d)return void n()}oa.selectAll(_).on(y,null),w.on(L,f).on(R,h),N(),s(v)}var g,p=this,v=D.of(p,arguments),d={},m=0,y=".zoom-"+oa.event.changedTouches[0].identifier,x="touchmove"+y,b="touchend"+y,_=[],w=oa.select(p),N=W(p);t(),l(v),w.on(L,null).on(R,t)}function g(){var n=D.of(this,arguments);y?clearTimeout(y):(Il.call(this),v=e(d=m||oa.mouse(this)),l(n)),y=setTimeout(function(){y=null,s(n)},50),S(),u(Math.pow(2,.002*$a())*k.k),i(d,v),c(n)}function p(){var n=oa.mouse(this),t=Math.log(k.k)/Math.LN2;a(this,n,e(n),oa.event.shiftKey?Math.ceil(t)-1:Math.floor(t)+1)}var v,d,m,y,M,x,b,_,w,k={x:0,y:0,k:1},E=[960,500],A=Wa,C=250,z=0,L="mousedown.zoom",q="mousemove.zoom",T="mouseup.zoom",R="touchstart.zoom",D=N(n,"zoomstart","zoom","zoomend");return Ba||(Ba="onwheel"in sa?($a=function(){return-oa.event.deltaY*(oa.event.deltaMode?120:1)},"wheel"):"onmousewheel"in sa?($a=function(){return oa.event.wheelDelta},"mousewheel"):($a=function(){return-oa.event.detail},"MozMousePixelScroll")),n.event=function(n){n.each(function(){var n=D.of(this,arguments),t=k;Hl?oa.select(this).transition().each("start.zoom",function(){k=this.__chart__||{x:0,y:0,k:1},l(n)}).tween("zoom:zoom",function(){var e=E[0],r=E[1],u=d?d[0]:e/2,i=d?d[1]:r/2,a=oa.interpolateZoom([(u-k.x)/k.k,(i-k.y)/k.k,e/k.k],[(u-t.x)/t.k,(i-t.y)/t.k,e/t.k]);return function(t){var r=a(t),o=e/r[2];this.__chart__=k={x:u-r[0]*o,y:i-r[1]*o,k:o},c(n)}}).each("interrupt.zoom",function(){s(n)}).each("end.zoom",function(){s(n)}):(this.__chart__=k,l(n),c(n),s(n))})},n.translate=function(t){return arguments.length?(k={x:+t[0],y:+t[1],k:k.k},o(),n):[k.x,k.y]},n.scale=function(t){return arguments.length?(k={x:k.x,y:k.y,k:null},u(+t),o(),n):k.k},n.scaleExtent=function(t){return arguments.length?(A=null==t?Wa:[+t[0],+t[1]],n):A},n.center=function(t){return arguments.length?(m=t&&[+t[0],+t[1]],n):m},n.size=function(t){return arguments.length?(E=t&&[+t[0],+t[1]],n):E},n.duration=function(t){return arguments.length?(C=+t,n):C},n.x=function(t){return arguments.length?(b=t,x=t.copy(),k={x:0,y:0,k:1},n):b},n.y=function(t){return arguments.length?(w=t,_=t.copy(),k={x:0,y:0,k:1},n):w},oa.rebind(n,D,"on")};var $a,Ba,Wa=[0,1/0];oa.color=on,on.prototype.toString=function(){return this.rgb()+""},oa.hsl=ln;var Ja=ln.prototype=new on;Ja.brighter=function(n){return n=Math.pow(.7,arguments.length?n:1),new ln(this.h,this.s,this.l/n)},Ja.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new ln(this.h,this.s,n*this.l)},Ja.rgb=function(){return cn(this.h,this.s,this.l)},oa.hcl=sn;var Ga=sn.prototype=new on;Ga.brighter=function(n){return new sn(this.h,this.c,Math.min(100,this.l+Ka*(arguments.length?n:1)))},Ga.darker=function(n){return new sn(this.h,this.c,Math.max(0,this.l-Ka*(arguments.length?n:1)))},Ga.rgb=function(){return fn(this.h,this.c,this.l).rgb()},oa.lab=hn;var Ka=18,Qa=.95047,no=1,to=1.08883,eo=hn.prototype=new on;eo.brighter=function(n){return new hn(Math.min(100,this.l+Ka*(arguments.length?n:1)),this.a,this.b)},eo.darker=function(n){return new hn(Math.max(0,this.l-Ka*(arguments.length?n:1)),this.a,this.b)},eo.rgb=function(){return gn(this.l,this.a,this.b)},oa.rgb=yn;var ro=yn.prototype=new on;ro.brighter=function(n){n=Math.pow(.7,arguments.length?n:1);var t=this.r,e=this.g,r=this.b,u=30;return t||e||r?(t&&u>t&&(t=u),e&&u>e&&(e=u),r&&u>r&&(r=u),new yn(Math.min(255,t/n),Math.min(255,e/n),Math.min(255,r/n))):new yn(u,u,u)},ro.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new yn(n*this.r,n*this.g,n*this.b)},ro.hsl=function(){return wn(this.r,this.g,this.b)},ro.toString=function(){return"#"+bn(this.r)+bn(this.g)+bn(this.b)};var uo=oa.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});uo.forEach(function(n,t){uo.set(n,Mn(t))}),oa.functor=En,oa.xhr=An(y),oa.dsv=function(n,t){function e(n,e,i){arguments.length<3&&(i=e,e=null);var a=Cn(n,t,null==e?r:u(e),i);return a.row=function(n){return arguments.length?a.response(null==(e=n)?r:u(n)):e},a}function r(n){return e.parse(n.responseText)}function u(n){return function(t){return e.parse(t.responseText,n)}}function i(t){return t.map(a).join(n)}function a(n){return o.test(n)?'"'+n.replace(/\"/g,'""')+'"':n}var o=new RegExp('["'+n+"\n]"),l=n.charCodeAt(0);return e.parse=function(n,t){var r;return e.parseRows(n,function(n,e){if(r)return r(n,e-1);var u=new Function("d","return {"+n.map(function(n,t){return JSON.stringify(n)+": d["+t+"]"}).join(",")+"}");r=t?function(n,e){return t(u(n),e)}:u})},e.parseRows=function(n,t){function e(){if(s>=c)return a;if(u)return u=!1,i;var t=s;if(34===n.charCodeAt(t)){for(var e=t;e++<c;)if(34===n.charCodeAt(e)){if(34!==n.charCodeAt(e+1))break;++e}s=e+2;var r=n.charCodeAt(e+1);return 13===r?(u=!0,10===n.charCodeAt(e+2)&&++s):10===r&&(u=!0),n.slice(t+1,e).replace(/""/g,'"')}for(;c>s;){var r=n.charCodeAt(s++),o=1;if(10===r)u=!0;else if(13===r)u=!0,10===n.charCodeAt(s)&&(++s,++o);else if(r!==l)continue;return n.slice(t,s-o)}return n.slice(t)}for(var r,u,i={},a={},o=[],c=n.length,s=0,f=0;(r=e())!==a;){for(var h=[];r!==i&&r!==a;)h.push(r),r=e();t&&null==(h=t(h,f++))||o.push(h)}return o},e.format=function(t){if(Array.isArray(t[0]))return e.formatRows(t);var r=new m,u=[];return t.forEach(function(n){for(var t in n)r.has(t)||u.push(r.add(t))}),[u.map(a).join(n)].concat(t.map(function(t){return u.map(function(n){return a(t[n])}).join(n)})).join("\n")},e.formatRows=function(n){return n.map(i).join("\n")},e},oa.csv=oa.dsv(",","text/csv"),oa.tsv=oa.dsv(" ","text/tab-separated-values");var io,ao,oo,lo,co=this[x(this,"requestAnimationFrame")]||function(n){setTimeout(n,17)};oa.timer=function(){qn.apply(this,arguments)},oa.timer.flush=function(){Rn(),Dn()},oa.round=function(n,t){return t?Math.round(n*(t=Math.pow(10,t)))/t:Math.round(n)};var so=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"].map(Un);oa.formatPrefix=function(n,t){var e=0;return(n=+n)&&(0>n&&(n*=-1),t&&(n=oa.round(n,Pn(n,t))),e=1+Math.floor(1e-12+Math.log(n)/Math.LN10),e=Math.max(-24,Math.min(24,3*Math.floor((e-1)/3)))),so[8+e/3]};var fo=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,ho=oa.map({b:function(n){return n.toString(2)},c:function(n){return String.fromCharCode(n)},o:function(n){return n.toString(8)},x:function(n){return n.toString(16)},X:function(n){return n.toString(16).toUpperCase()},g:function(n,t){return n.toPrecision(t)},e:function(n,t){return n.toExponential(t)},f:function(n,t){return n.toFixed(t)},r:function(n,t){return(n=oa.round(n,Pn(n,t))).toFixed(Math.max(0,Math.min(20,Pn(n*(1+1e-15),t))))}}),go=oa.time={},po=Date;Hn.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){vo.setUTCDate.apply(this._,arguments)},setDay:function(){vo.setUTCDay.apply(this._,arguments)},setFullYear:function(){vo.setUTCFullYear.apply(this._,arguments)},setHours:function(){vo.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){vo.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){vo.setUTCMinutes.apply(this._,arguments)},setMonth:function(){vo.setUTCMonth.apply(this._,arguments)},setSeconds:function(){vo.setUTCSeconds.apply(this._,arguments)},setTime:function(){vo.setTime.apply(this._,arguments)}};var vo=Date.prototype;go.year=On(function(n){return n=go.day(n),n.setMonth(0,1),n},function(n,t){n.setFullYear(n.getFullYear()+t)},function(n){return n.getFullYear()}),go.years=go.year.range,go.years.utc=go.year.utc.range,go.day=On(function(n){var t=new po(2e3,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t},function(n,t){n.setDate(n.getDate()+t)},function(n){return n.getDate()-1}),go.days=go.day.range,go.days.utc=go.day.utc.range,go.dayOfYear=function(n){var t=go.year(n);return Math.floor((n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(n,t){t=7-t;var e=go[n]=On(function(n){return(n=go.day(n)).setDate(n.getDate()-(n.getDay()+t)%7),n},function(n,t){n.setDate(n.getDate()+7*Math.floor(t))},function(n){var e=go.year(n).getDay();return Math.floor((go.dayOfYear(n)+(e+t)%7)/7)-(e!==t)});go[n+"s"]=e.range,go[n+"s"].utc=e.utc.range,go[n+"OfYear"]=function(n){var e=go.year(n).getDay();return Math.floor((go.dayOfYear(n)+(e+t)%7)/7)}}),go.week=go.sunday,go.weeks=go.sunday.range,go.weeks.utc=go.sunday.utc.range,go.weekOfYear=go.sundayOfYear;var mo={"-":"",_:" ",0:"0"},yo=/^\s*\d+/,Mo=/^%/;oa.locale=function(n){return{numberFormat:jn(n),timeFormat:Yn(n)}};var xo=oa.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"], | |
| 4 | +shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});oa.format=xo.numberFormat,oa.geo={},st.prototype={s:0,t:0,add:function(n){ft(n,this.t,bo),ft(bo.s,this.s,this),this.s?this.t+=bo.t:this.s=bo.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var bo=new st;oa.geo.stream=function(n,t){n&&_o.hasOwnProperty(n.type)?_o[n.type](n,t):ht(n,t)};var _o={Feature:function(n,t){ht(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,u=e.length;++r<u;)ht(e[r].geometry,t)}},wo={Sphere:function(n,t){t.sphere()},Point:function(n,t){n=n.coordinates,t.point(n[0],n[1],n[2])},MultiPoint:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)n=e[r],t.point(n[0],n[1],n[2])},LineString:function(n,t){gt(n.coordinates,t,0)},MultiLineString:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)gt(e[r],t,0)},Polygon:function(n,t){pt(n.coordinates,t)},MultiPolygon:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)pt(e[r],t)},GeometryCollection:function(n,t){for(var e=n.geometries,r=-1,u=e.length;++r<u;)ht(e[r],t)}};oa.geo.area=function(n){return So=0,oa.geo.stream(n,No),So};var So,ko=new st,No={sphere:function(){So+=4*ja},point:b,lineStart:b,lineEnd:b,polygonStart:function(){ko.reset(),No.lineStart=vt},polygonEnd:function(){var n=2*ko;So+=0>n?4*ja+n:n,No.lineStart=No.lineEnd=No.point=b}};oa.geo.bounds=function(){function n(n,t){M.push(x=[s=n,h=n]),f>t&&(f=t),t>g&&(g=t)}function t(t,e){var r=dt([t*Ia,e*Ia]);if(m){var u=yt(m,r),i=[u[1],-u[0],0],a=yt(i,u);bt(a),a=_t(a);var l=t-p,c=l>0?1:-1,v=a[0]*Ya*c,d=Ma(l)>180;if(d^(v>c*p&&c*t>v)){var y=a[1]*Ya;y>g&&(g=y)}else if(v=(v+360)%360-180,d^(v>c*p&&c*t>v)){var y=-a[1]*Ya;f>y&&(f=y)}else f>e&&(f=e),e>g&&(g=e);d?p>t?o(s,t)>o(s,h)&&(h=t):o(t,h)>o(s,h)&&(s=t):h>=s?(s>t&&(s=t),t>h&&(h=t)):t>p?o(s,t)>o(s,h)&&(h=t):o(t,h)>o(s,h)&&(s=t)}else n(t,e);m=r,p=t}function e(){b.point=t}function r(){x[0]=s,x[1]=h,b.point=n,m=null}function u(n,e){if(m){var r=n-p;y+=Ma(r)>180?r+(r>0?360:-360):r}else v=n,d=e;No.point(n,e),t(n,e)}function i(){No.lineStart()}function a(){u(v,d),No.lineEnd(),Ma(y)>Pa&&(s=-(h=180)),x[0]=s,x[1]=h,m=null}function o(n,t){return(t-=n)<0?t+360:t}function l(n,t){return n[0]-t[0]}function c(n,t){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:n<t[0]||t[1]<n}var s,f,h,g,p,v,d,m,y,M,x,b={point:n,lineStart:e,lineEnd:r,polygonStart:function(){b.point=u,b.lineStart=i,b.lineEnd=a,y=0,No.polygonStart()},polygonEnd:function(){No.polygonEnd(),b.point=n,b.lineStart=e,b.lineEnd=r,0>ko?(s=-(h=180),f=-(g=90)):y>Pa?g=90:-Pa>y&&(f=-90),x[0]=s,x[1]=h}};return function(n){g=h=-(s=f=1/0),M=[],oa.geo.stream(n,b);var t=M.length;if(t){M.sort(l);for(var e,r=1,u=M[0],i=[u];t>r;++r)e=M[r],c(e[0],u)||c(e[1],u)?(o(u[0],e[1])>o(u[0],u[1])&&(u[1]=e[1]),o(e[0],u[1])>o(u[0],u[1])&&(u[0]=e[0])):i.push(u=e);for(var a,e,p=-(1/0),t=i.length-1,r=0,u=i[t];t>=r;u=e,++r)e=i[r],(a=o(u[1],e[0]))>p&&(p=a,s=e[0],h=u[1])}return M=x=null,s===1/0||f===1/0?[[NaN,NaN],[NaN,NaN]]:[[s,f],[h,g]]}}(),oa.geo.centroid=function(n){Eo=Ao=Co=zo=Lo=qo=To=Ro=Do=Po=Uo=0,oa.geo.stream(n,jo);var t=Do,e=Po,r=Uo,u=t*t+e*e+r*r;return Ua>u&&(t=qo,e=To,r=Ro,Pa>Ao&&(t=Co,e=zo,r=Lo),u=t*t+e*e+r*r,Ua>u)?[NaN,NaN]:[Math.atan2(e,t)*Ya,tn(r/Math.sqrt(u))*Ya]};var Eo,Ao,Co,zo,Lo,qo,To,Ro,Do,Po,Uo,jo={sphere:b,point:St,lineStart:Nt,lineEnd:Et,polygonStart:function(){jo.lineStart=At},polygonEnd:function(){jo.lineStart=Nt}},Fo=Rt(zt,jt,Ht,[-ja,-ja/2]),Ho=1e9;oa.geo.clipExtent=function(){var n,t,e,r,u,i,a={stream:function(n){return u&&(u.valid=!1),u=i(n),u.valid=!0,u},extent:function(o){return arguments.length?(i=Zt(n=+o[0][0],t=+o[0][1],e=+o[1][0],r=+o[1][1]),u&&(u.valid=!1,u=null),a):[[n,t],[e,r]]}};return a.extent([[0,0],[960,500]])},(oa.geo.conicEqualArea=function(){return Vt(Xt)}).raw=Xt,oa.geo.albers=function(){return oa.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},oa.geo.albersUsa=function(){function n(n){var i=n[0],a=n[1];return t=null,e(i,a),t||(r(i,a),t)||u(i,a),t}var t,e,r,u,i=oa.geo.albers(),a=oa.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o=oa.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(n,e){t=[n,e]}};return n.invert=function(n){var t=i.scale(),e=i.translate(),r=(n[0]-e[0])/t,u=(n[1]-e[1])/t;return(u>=.12&&.234>u&&r>=-.425&&-.214>r?a:u>=.166&&.234>u&&r>=-.214&&-.115>r?o:i).invert(n)},n.stream=function(n){var t=i.stream(n),e=a.stream(n),r=o.stream(n);return{point:function(n,u){t.point(n,u),e.point(n,u),r.point(n,u)},sphere:function(){t.sphere(),e.sphere(),r.sphere()},lineStart:function(){t.lineStart(),e.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),e.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),e.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),e.polygonEnd(),r.polygonEnd()}}},n.precision=function(t){return arguments.length?(i.precision(t),a.precision(t),o.precision(t),n):i.precision()},n.scale=function(t){return arguments.length?(i.scale(t),a.scale(.35*t),o.scale(t),n.translate(i.translate())):i.scale()},n.translate=function(t){if(!arguments.length)return i.translate();var c=i.scale(),s=+t[0],f=+t[1];return e=i.translate(t).clipExtent([[s-.455*c,f-.238*c],[s+.455*c,f+.238*c]]).stream(l).point,r=a.translate([s-.307*c,f+.201*c]).clipExtent([[s-.425*c+Pa,f+.12*c+Pa],[s-.214*c-Pa,f+.234*c-Pa]]).stream(l).point,u=o.translate([s-.205*c,f+.212*c]).clipExtent([[s-.214*c+Pa,f+.166*c+Pa],[s-.115*c-Pa,f+.234*c-Pa]]).stream(l).point,n},n.scale(1070)};var Oo,Io,Yo,Zo,Vo,Xo,$o={point:b,lineStart:b,lineEnd:b,polygonStart:function(){Io=0,$o.lineStart=$t},polygonEnd:function(){$o.lineStart=$o.lineEnd=$o.point=b,Oo+=Ma(Io/2)}},Bo={point:Bt,lineStart:b,lineEnd:b,polygonStart:b,polygonEnd:b},Wo={point:Gt,lineStart:Kt,lineEnd:Qt,polygonStart:function(){Wo.lineStart=ne},polygonEnd:function(){Wo.point=Gt,Wo.lineStart=Kt,Wo.lineEnd=Qt}};oa.geo.path=function(){function n(n){return n&&("function"==typeof o&&i.pointRadius(+o.apply(this,arguments)),a&&a.valid||(a=u(i)),oa.geo.stream(n,a)),i.result()}function t(){return a=null,n}var e,r,u,i,a,o=4.5;return n.area=function(n){return Oo=0,oa.geo.stream(n,u($o)),Oo},n.centroid=function(n){return Co=zo=Lo=qo=To=Ro=Do=Po=Uo=0,oa.geo.stream(n,u(Wo)),Uo?[Do/Uo,Po/Uo]:Ro?[qo/Ro,To/Ro]:Lo?[Co/Lo,zo/Lo]:[NaN,NaN]},n.bounds=function(n){return Vo=Xo=-(Yo=Zo=1/0),oa.geo.stream(n,u(Bo)),[[Yo,Zo],[Vo,Xo]]},n.projection=function(n){return arguments.length?(u=(e=n)?n.stream||re(n):y,t()):e},n.context=function(n){return arguments.length?(i=null==(r=n)?new Wt:new te(n),"function"!=typeof o&&i.pointRadius(o),t()):r},n.pointRadius=function(t){return arguments.length?(o="function"==typeof t?t:(i.pointRadius(+t),+t),n):o},n.projection(oa.geo.albersUsa()).context(null)},oa.geo.transform=function(n){return{stream:function(t){var e=new ue(t);for(var r in n)e[r]=n[r];return e}}},ue.prototype={point:function(n,t){this.stream.point(n,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},oa.geo.projection=ae,oa.geo.projectionMutator=oe,(oa.geo.equirectangular=function(){return ae(ce)}).raw=ce.invert=ce,oa.geo.rotation=function(n){function t(t){return t=n(t[0]*Ia,t[1]*Ia),t[0]*=Ya,t[1]*=Ya,t}return n=fe(n[0]%360*Ia,n[1]*Ia,n.length>2?n[2]*Ia:0),t.invert=function(t){return t=n.invert(t[0]*Ia,t[1]*Ia),t[0]*=Ya,t[1]*=Ya,t},t},se.invert=ce,oa.geo.circle=function(){function n(){var n="function"==typeof r?r.apply(this,arguments):r,t=fe(-n[0]*Ia,-n[1]*Ia,0).invert,u=[];return e(null,null,1,{point:function(n,e){u.push(n=t(n,e)),n[0]*=Ya,n[1]*=Ya}}),{type:"Polygon",coordinates:[u]}}var t,e,r=[0,0],u=6;return n.origin=function(t){return arguments.length?(r=t,n):r},n.angle=function(r){return arguments.length?(e=ve((t=+r)*Ia,u*Ia),n):t},n.precision=function(r){return arguments.length?(e=ve(t*Ia,(u=+r)*Ia),n):u},n.angle(90)},oa.geo.distance=function(n,t){var e,r=(t[0]-n[0])*Ia,u=n[1]*Ia,i=t[1]*Ia,a=Math.sin(r),o=Math.cos(r),l=Math.sin(u),c=Math.cos(u),s=Math.sin(i),f=Math.cos(i);return Math.atan2(Math.sqrt((e=f*a)*e+(e=c*s-l*f*o)*e),l*s+c*f*o)},oa.geo.graticule=function(){function n(){return{type:"MultiLineString",coordinates:t()}}function t(){return oa.range(Math.ceil(i/d)*d,u,d).map(h).concat(oa.range(Math.ceil(c/m)*m,l,m).map(g)).concat(oa.range(Math.ceil(r/p)*p,e,p).filter(function(n){return Ma(n%d)>Pa}).map(s)).concat(oa.range(Math.ceil(o/v)*v,a,v).filter(function(n){return Ma(n%m)>Pa}).map(f))}var e,r,u,i,a,o,l,c,s,f,h,g,p=10,v=p,d=90,m=360,y=2.5;return n.lines=function(){return t().map(function(n){return{type:"LineString",coordinates:n}})},n.outline=function(){return{type:"Polygon",coordinates:[h(i).concat(g(l).slice(1),h(u).reverse().slice(1),g(c).reverse().slice(1))]}},n.extent=function(t){return arguments.length?n.majorExtent(t).minorExtent(t):n.minorExtent()},n.majorExtent=function(t){return arguments.length?(i=+t[0][0],u=+t[1][0],c=+t[0][1],l=+t[1][1],i>u&&(t=i,i=u,u=t),c>l&&(t=c,c=l,l=t),n.precision(y)):[[i,c],[u,l]]},n.minorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],o=+t[0][1],a=+t[1][1],r>e&&(t=r,r=e,e=t),o>a&&(t=o,o=a,a=t),n.precision(y)):[[r,o],[e,a]]},n.step=function(t){return arguments.length?n.majorStep(t).minorStep(t):n.minorStep()},n.majorStep=function(t){return arguments.length?(d=+t[0],m=+t[1],n):[d,m]},n.minorStep=function(t){return arguments.length?(p=+t[0],v=+t[1],n):[p,v]},n.precision=function(t){return arguments.length?(y=+t,s=me(o,a,90),f=ye(r,e,y),h=me(c,l,90),g=ye(i,u,y),n):y},n.majorExtent([[-180,-90+Pa],[180,90-Pa]]).minorExtent([[-180,-80-Pa],[180,80+Pa]])},oa.geo.greatArc=function(){function n(){return{type:"LineString",coordinates:[t||r.apply(this,arguments),e||u.apply(this,arguments)]}}var t,e,r=Me,u=xe;return n.distance=function(){return oa.geo.distance(t||r.apply(this,arguments),e||u.apply(this,arguments))},n.source=function(e){return arguments.length?(r=e,t="function"==typeof e?null:e,n):r},n.target=function(t){return arguments.length?(u=t,e="function"==typeof t?null:t,n):u},n.precision=function(){return arguments.length?n:0},n},oa.geo.interpolate=function(n,t){return be(n[0]*Ia,n[1]*Ia,t[0]*Ia,t[1]*Ia)},oa.geo.length=function(n){return Jo=0,oa.geo.stream(n,Go),Jo};var Jo,Go={sphere:b,point:b,lineStart:_e,lineEnd:b,polygonStart:b,polygonEnd:b},Ko=we(function(n){return Math.sqrt(2/(1+n))},function(n){return 2*Math.asin(n/2)});(oa.geo.azimuthalEqualArea=function(){return ae(Ko)}).raw=Ko;var Qo=we(function(n){var t=Math.acos(n);return t&&t/Math.sin(t)},y);(oa.geo.azimuthalEquidistant=function(){return ae(Qo)}).raw=Qo,(oa.geo.conicConformal=function(){return Vt(Se)}).raw=Se,(oa.geo.conicEquidistant=function(){return Vt(ke)}).raw=ke;var nl=we(function(n){return 1/n},Math.atan);(oa.geo.gnomonic=function(){return ae(nl)}).raw=nl,Ne.invert=function(n,t){return[n,2*Math.atan(Math.exp(t))-Oa]},(oa.geo.mercator=function(){return Ee(Ne)}).raw=Ne;var tl=we(function(){return 1},Math.asin);(oa.geo.orthographic=function(){return ae(tl)}).raw=tl;var el=we(function(n){return 1/(1+n)},function(n){return 2*Math.atan(n)});(oa.geo.stereographic=function(){return ae(el)}).raw=el,Ae.invert=function(n,t){return[-t,2*Math.atan(Math.exp(n))-Oa]},(oa.geo.transverseMercator=function(){var n=Ee(Ae),t=n.center,e=n.rotate;return n.center=function(n){return n?t([-n[1],n[0]]):(n=t(),[n[1],-n[0]])},n.rotate=function(n){return n?e([n[0],n[1],n.length>2?n[2]+90:90]):(n=e(),[n[0],n[1],n[2]-90])},e([0,0,90])}).raw=Ae,oa.geom={},oa.geom.hull=function(n){function t(n){if(n.length<3)return[];var t,u=En(e),i=En(r),a=n.length,o=[],l=[];for(t=0;a>t;t++)o.push([+u.call(this,n[t],t),+i.call(this,n[t],t),t]);for(o.sort(qe),t=0;a>t;t++)l.push([o[t][0],-o[t][1]]);var c=Le(o),s=Le(l),f=s[0]===c[0],h=s[s.length-1]===c[c.length-1],g=[];for(t=c.length-1;t>=0;--t)g.push(n[o[c[t]][2]]);for(t=+f;t<s.length-h;++t)g.push(n[o[s[t]][2]]);return g}var e=Ce,r=ze;return arguments.length?t(n):(t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t)},oa.geom.polygon=function(n){return Sa(n,rl),n};var rl=oa.geom.polygon.prototype=[];rl.area=function(){for(var n,t=-1,e=this.length,r=this[e-1],u=0;++t<e;)n=r,r=this[t],u+=n[1]*r[0]-n[0]*r[1];return.5*u},rl.centroid=function(n){var t,e,r=-1,u=this.length,i=0,a=0,o=this[u-1];for(arguments.length||(n=-1/(6*this.area()));++r<u;)t=o,o=this[r],e=t[0]*o[1]-o[0]*t[1],i+=(t[0]+o[0])*e,a+=(t[1]+o[1])*e;return[i*n,a*n]},rl.clip=function(n){for(var t,e,r,u,i,a,o=De(n),l=-1,c=this.length-De(this),s=this[c-1];++l<c;){for(t=n.slice(),n.length=0,u=this[l],i=t[(r=t.length-o)-1],e=-1;++e<r;)a=t[e],Te(a,s,u)?(Te(i,s,u)||n.push(Re(i,a,s,u)),n.push(a)):Te(i,s,u)&&n.push(Re(i,a,s,u)),i=a;o&&n.push(n[0]),s=u}return n};var ul,il,al,ol,ll,cl=[],sl=[];Ye.prototype.prepare=function(){for(var n,t=this.edges,e=t.length;e--;)n=t[e].edge,n.b&&n.a||t.splice(e,1);return t.sort(Ve),t.length},tr.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},er.prototype={insert:function(n,t){var e,r,u;if(n){if(t.P=n,t.N=n.N,n.N&&(n.N.P=t),n.N=t,n.R){for(n=n.R;n.L;)n=n.L;n.L=t}else n.R=t;e=n}else this._?(n=ar(this._),t.P=null,t.N=n,n.P=n.L=t,e=n):(t.P=t.N=null,this._=t,e=null);for(t.L=t.R=null,t.U=e,t.C=!0,n=t;e&&e.C;)r=e.U,e===r.L?(u=r.R,u&&u.C?(e.C=u.C=!1,r.C=!0,n=r):(n===e.R&&(ur(this,e),n=e,e=n.U),e.C=!1,r.C=!0,ir(this,r))):(u=r.L,u&&u.C?(e.C=u.C=!1,r.C=!0,n=r):(n===e.L&&(ir(this,e),n=e,e=n.U),e.C=!1,r.C=!0,ur(this,r))),e=n.U;this._.C=!1},remove:function(n){n.N&&(n.N.P=n.P),n.P&&(n.P.N=n.N),n.N=n.P=null;var t,e,r,u=n.U,i=n.L,a=n.R;if(e=i?a?ar(a):i:a,u?u.L===n?u.L=e:u.R=e:this._=e,i&&a?(r=e.C,e.C=n.C,e.L=i,i.U=e,e!==a?(u=e.U,e.U=n.U,n=e.R,u.L=n,e.R=a,a.U=e):(e.U=u,u=e,n=e.R)):(r=n.C,n=e),n&&(n.U=u),!r){if(n&&n.C)return void(n.C=!1);do{if(n===this._)break;if(n===u.L){if(t=u.R,t.C&&(t.C=!1,u.C=!0,ur(this,u),t=u.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,ir(this,t),t=u.R),t.C=u.C,u.C=t.R.C=!1,ur(this,u),n=this._;break}}else if(t=u.L,t.C&&(t.C=!1,u.C=!0,ir(this,u),t=u.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,ur(this,t),t=u.L),t.C=u.C,u.C=t.L.C=!1,ir(this,u),n=this._;break}t.C=!0,n=u,u=u.U}while(!n.C);n&&(n.C=!1)}}},oa.geom.voronoi=function(n){function t(n){var t=new Array(n.length),r=o[0][0],u=o[0][1],i=o[1][0],a=o[1][1];return or(e(n),o).cells.forEach(function(e,o){var l=e.edges,c=e.site,s=t[o]=l.length?l.map(function(n){var t=n.start();return[t.x,t.y]}):c.x>=r&&c.x<=i&&c.y>=u&&c.y<=a?[[r,a],[i,a],[i,u],[r,u]]:[];s.point=n[o]}),t}function e(n){return n.map(function(n,t){return{x:Math.round(i(n,t)/Pa)*Pa,y:Math.round(a(n,t)/Pa)*Pa,i:t}})}var r=Ce,u=ze,i=r,a=u,o=fl;return n?t(n):(t.links=function(n){return or(e(n)).edges.filter(function(n){return n.l&&n.r}).map(function(t){return{source:n[t.l.i],target:n[t.r.i]}})},t.triangles=function(n){var t=[];return or(e(n)).cells.forEach(function(e,r){for(var u,i,a=e.site,o=e.edges.sort(Ve),l=-1,c=o.length,s=o[c-1].edge,f=s.l===a?s.r:s.l;++l<c;)u=s,i=f,s=o[l].edge,f=s.l===a?s.r:s.l,r<i.i&&r<f.i&&cr(a,i,f)<0&&t.push([n[r],n[i.i],n[f.i]])}),t},t.x=function(n){return arguments.length?(i=En(r=n),t):r},t.y=function(n){return arguments.length?(a=En(u=n),t):u},t.clipExtent=function(n){return arguments.length?(o=null==n?fl:n,t):o===fl?null:o},t.size=function(n){return arguments.length?t.clipExtent(n&&[[0,0],n]):o===fl?null:o&&o[1]},t)};var fl=[[-1e6,-1e6],[1e6,1e6]];oa.geom.delaunay=function(n){return oa.geom.voronoi().triangles(n)},oa.geom.quadtree=function(n,t,e,r,u){function i(n){function i(n,t,e,r,u,i,a,o){if(!isNaN(e)&&!isNaN(r))if(n.leaf){var l=n.x,s=n.y;if(null!=l)if(Ma(l-e)+Ma(s-r)<.01)c(n,t,e,r,u,i,a,o);else{var f=n.point;n.x=n.y=n.point=null,c(n,f,l,s,u,i,a,o),c(n,t,e,r,u,i,a,o)}else n.x=e,n.y=r,n.point=t}else c(n,t,e,r,u,i,a,o)}function c(n,t,e,r,u,a,o,l){var c=.5*(u+o),s=.5*(a+l),f=e>=c,h=r>=s,g=h<<1|f;n.leaf=!1,n=n.nodes[g]||(n.nodes[g]=hr()),f?u=c:o=c,h?a=s:l=s,i(n,t,e,r,u,a,o,l)}var s,f,h,g,p,v,d,m,y,M=En(o),x=En(l);if(null!=t)v=t,d=e,m=r,y=u;else if(m=y=-(v=d=1/0),f=[],h=[],p=n.length,a)for(g=0;p>g;++g)s=n[g],s.x<v&&(v=s.x),s.y<d&&(d=s.y),s.x>m&&(m=s.x),s.y>y&&(y=s.y),f.push(s.x),h.push(s.y);else for(g=0;p>g;++g){var b=+M(s=n[g],g),_=+x(s,g);v>b&&(v=b),d>_&&(d=_),b>m&&(m=b),_>y&&(y=_),f.push(b),h.push(_)}var w=m-v,S=y-d;w>S?y=d+w:m=v+S;var k=hr();if(k.add=function(n){i(k,n,+M(n,++g),+x(n,g),v,d,m,y)},k.visit=function(n){gr(n,k,v,d,m,y)},k.find=function(n){return pr(k,n[0],n[1],v,d,m,y)},g=-1,null==t){for(;++g<p;)i(k,n[g],f[g],h[g],v,d,m,y);--g}else n.forEach(k.add);return f=h=n=s=null,k}var a,o=Ce,l=ze;return(a=arguments.length)?(o=sr,l=fr,3===a&&(u=e,r=t,e=t=0),i(n)):(i.x=function(n){return arguments.length?(o=n,i):o},i.y=function(n){return arguments.length?(l=n,i):l},i.extent=function(n){return arguments.length?(null==n?t=e=r=u=null:(t=+n[0][0],e=+n[0][1],r=+n[1][0],u=+n[1][1]),i):null==t?null:[[t,e],[r,u]]},i.size=function(n){return arguments.length?(null==n?t=e=r=u=null:(t=e=0,r=+n[0],u=+n[1]),i):null==t?null:[r-t,u-e]},i)},oa.interpolateRgb=vr,oa.interpolateObject=dr,oa.interpolateNumber=mr,oa.interpolateString=yr;var hl=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,gl=new RegExp(hl.source,"g");oa.interpolate=Mr,oa.interpolators=[function(n,t){var e=typeof t;return("string"===e?uo.has(t.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(t)?vr:yr:t instanceof on?vr:Array.isArray(t)?xr:"object"===e&&isNaN(t)?dr:mr)(n,t)}],oa.interpolateArray=xr;var pl=function(){return y},vl=oa.map({linear:pl,poly:Er,quad:function(){return Sr},cubic:function(){return kr},sin:function(){return Ar},exp:function(){return Cr},circle:function(){return zr},elastic:Lr,back:qr,bounce:function(){return Tr}}),dl=oa.map({"in":y,out:_r,"in-out":wr,"out-in":function(n){return wr(_r(n))}});oa.ease=function(n){var t=n.indexOf("-"),e=t>=0?n.slice(0,t):n,r=t>=0?n.slice(t+1):"in";return e=vl.get(e)||pl,r=dl.get(r)||y,br(r(e.apply(null,la.call(arguments,1))))},oa.interpolateHcl=Rr,oa.interpolateHsl=Dr,oa.interpolateLab=Pr,oa.interpolateRound=Ur,oa.transform=function(n){var t=sa.createElementNS(oa.ns.prefix.svg,"g");return(oa.transform=function(n){if(null!=n){t.setAttribute("transform",n);var e=t.transform.baseVal.consolidate()}return new jr(e?e.matrix:ml)})(n)},jr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var ml={a:1,b:0,c:0,d:1,e:0,f:0};oa.interpolateTransform=$r,oa.layout={},oa.layout.bundle=function(){return function(n){for(var t=[],e=-1,r=n.length;++e<r;)t.push(Jr(n[e]));return t}},oa.layout.chord=function(){function n(){var n,c,f,h,g,p={},v=[],d=oa.range(i),m=[];for(e=[],r=[],n=0,h=-1;++h<i;){for(c=0,g=-1;++g<i;)c+=u[h][g];v.push(c),m.push(oa.range(i)),n+=c}for(a&&d.sort(function(n,t){return a(v[n],v[t])}),o&&m.forEach(function(n,t){n.sort(function(n,e){return o(u[t][n],u[t][e])})}),n=(Fa-s*i)/n,c=0,h=-1;++h<i;){for(f=c,g=-1;++g<i;){var y=d[h],M=m[y][g],x=u[y][M],b=c,_=c+=x*n;p[y+"-"+M]={index:y,subindex:M,startAngle:b,endAngle:_,value:x}}r[y]={index:y,startAngle:f,endAngle:c,value:v[y]},c+=s}for(h=-1;++h<i;)for(g=h-1;++g<i;){var w=p[h+"-"+g],S=p[g+"-"+h];(w.value||S.value)&&e.push(w.value<S.value?{source:S,target:w}:{source:w,target:S})}l&&t()}function t(){e.sort(function(n,t){return l((n.source.value+n.target.value)/2,(t.source.value+t.target.value)/2)})}var e,r,u,i,a,o,l,c={},s=0;return c.matrix=function(n){return arguments.length?(i=(u=n)&&u.length,e=r=null,c):u},c.padding=function(n){return arguments.length?(s=n,e=r=null,c):s},c.sortGroups=function(n){return arguments.length?(a=n,e=r=null,c):a},c.sortSubgroups=function(n){return arguments.length?(o=n,e=null,c):o},c.sortChords=function(n){return arguments.length?(l=n,e&&t(),c):l},c.chords=function(){return e||n(),e},c.groups=function(){return r||n(),r},c},oa.layout.force=function(){function n(n){return function(t,e,r,u){if(t.point!==n){var i=t.cx-n.x,a=t.cy-n.y,o=u-e,l=i*i+a*a;if(l>o*o/m){if(v>l){var c=t.charge/l;n.px-=i*c,n.py-=a*c}return!0}if(t.point&&l&&v>l){var c=t.pointCharge/l;n.px-=i*c,n.py-=a*c}}return!t.charge}}function t(n){n.px=oa.event.x,n.py=oa.event.y,l.resume()}var e,r,u,i,a,o,l={},c=oa.dispatch("start","tick","end"),s=[1,1],f=.9,h=yl,g=Ml,p=-30,v=xl,d=.1,m=.64,M=[],x=[];return l.tick=function(){if((u*=.99)<.005)return e=null,c.end({type:"end",alpha:u=0}),!0;var t,r,l,h,g,v,m,y,b,_=M.length,w=x.length;for(r=0;w>r;++r)l=x[r],h=l.source,g=l.target,y=g.x-h.x,b=g.y-h.y,(v=y*y+b*b)&&(v=u*a[r]*((v=Math.sqrt(v))-i[r])/v,y*=v,b*=v,g.x-=y*(m=h.weight+g.weight?h.weight/(h.weight+g.weight):.5),g.y-=b*m,h.x+=y*(m=1-m),h.y+=b*m);if((m=u*d)&&(y=s[0]/2,b=s[1]/2,r=-1,m))for(;++r<_;)l=M[r],l.x+=(y-l.x)*m,l.y+=(b-l.y)*m;if(p)for(ru(t=oa.geom.quadtree(M),u,o),r=-1;++r<_;)(l=M[r]).fixed||t.visit(n(l));for(r=-1;++r<_;)l=M[r],l.fixed?(l.x=l.px,l.y=l.py):(l.x-=(l.px-(l.px=l.x))*f,l.y-=(l.py-(l.py=l.y))*f);c.tick({type:"tick",alpha:u})},l.nodes=function(n){return arguments.length?(M=n,l):M},l.links=function(n){return arguments.length?(x=n,l):x},l.size=function(n){return arguments.length?(s=n,l):s},l.linkDistance=function(n){return arguments.length?(h="function"==typeof n?n:+n,l):h},l.distance=l.linkDistance,l.linkStrength=function(n){return arguments.length?(g="function"==typeof n?n:+n,l):g},l.friction=function(n){return arguments.length?(f=+n,l):f},l.charge=function(n){return arguments.length?(p="function"==typeof n?n:+n,l):p},l.chargeDistance=function(n){return arguments.length?(v=n*n,l):Math.sqrt(v)},l.gravity=function(n){return arguments.length?(d=+n,l):d},l.theta=function(n){return arguments.length?(m=n*n,l):Math.sqrt(m)},l.alpha=function(n){return arguments.length?(n=+n,u?n>0?u=n:(e.c=null,e.t=NaN,e=null,c.end({type:"end",alpha:u=0})):n>0&&(c.start({type:"start",alpha:u=n}),e=qn(l.tick)),l):u},l.start=function(){function n(n,r){if(!e){for(e=new Array(u),l=0;u>l;++l)e[l]=[];for(l=0;c>l;++l){var i=x[l];e[i.source.index].push(i.target),e[i.target.index].push(i.source)}}for(var a,o=e[t],l=-1,s=o.length;++l<s;)if(!isNaN(a=o[l][n]))return a;return Math.random()*r}var t,e,r,u=M.length,c=x.length,f=s[0],v=s[1];for(t=0;u>t;++t)(r=M[t]).index=t,r.weight=0;for(t=0;c>t;++t)r=x[t],"number"==typeof r.source&&(r.source=M[r.source]),"number"==typeof r.target&&(r.target=M[r.target]),++r.source.weight,++r.target.weight;for(t=0;u>t;++t)r=M[t],isNaN(r.x)&&(r.x=n("x",f)),isNaN(r.y)&&(r.y=n("y",v)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(i=[],"function"==typeof h)for(t=0;c>t;++t)i[t]=+h.call(this,x[t],t);else for(t=0;c>t;++t)i[t]=h;if(a=[],"function"==typeof g)for(t=0;c>t;++t)a[t]=+g.call(this,x[t],t);else for(t=0;c>t;++t)a[t]=g;if(o=[],"function"==typeof p)for(t=0;u>t;++t)o[t]=+p.call(this,M[t],t);else for(t=0;u>t;++t)o[t]=p;return l.resume()},l.resume=function(){return l.alpha(.1)},l.stop=function(){return l.alpha(0)},l.drag=function(){return r||(r=oa.behavior.drag().origin(y).on("dragstart.force",Qr).on("drag.force",t).on("dragend.force",nu)),arguments.length?void this.on("mouseover.force",tu).on("mouseout.force",eu).call(r):r},oa.rebind(l,c,"on")};var yl=20,Ml=1,xl=1/0;oa.layout.hierarchy=function(){function n(u){var i,a=[u],o=[];for(u.depth=0;null!=(i=a.pop());)if(o.push(i),(c=e.call(n,i,i.depth))&&(l=c.length)){for(var l,c,s;--l>=0;)a.push(s=c[l]),s.parent=i,s.depth=i.depth+1;r&&(i.value=0),i.children=c}else r&&(i.value=+r.call(n,i,i.depth)||0),delete i.children;return au(u,function(n){var e,u;t&&(e=n.children)&&e.sort(t),r&&(u=n.parent)&&(u.value+=n.value)}),o}var t=cu,e=ou,r=lu;return n.sort=function(e){return arguments.length?(t=e,n):t},n.children=function(t){return arguments.length?(e=t,n):e},n.value=function(t){return arguments.length?(r=t,n):r},n.revalue=function(t){return r&&(iu(t,function(n){n.children&&(n.value=0)}),au(t,function(t){var e;t.children||(t.value=+r.call(n,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)})),t},n},oa.layout.partition=function(){function n(t,e,r,u){var i=t.children;if(t.x=e,t.y=t.depth*u,t.dx=r,t.dy=u,i&&(a=i.length)){var a,o,l,c=-1;for(r=t.value?r/t.value:0;++c<a;)n(o=i[c],e,l=o.value*r,u),e+=l}}function t(n){var e=n.children,r=0;if(e&&(u=e.length))for(var u,i=-1;++i<u;)r=Math.max(r,t(e[i]));return 1+r}function e(e,i){var a=r.call(this,e,i);return n(a[0],0,u[0],u[1]/t(a[0])),a}var r=oa.layout.hierarchy(),u=[1,1];return e.size=function(n){return arguments.length?(u=n,e):u},uu(e,r)},oa.layout.pie=function(){function n(a){var o,l=a.length,c=a.map(function(e,r){return+t.call(n,e,r)}),s=+("function"==typeof r?r.apply(this,arguments):r),f=("function"==typeof u?u.apply(this,arguments):u)-s,h=Math.min(Math.abs(f)/l,+("function"==typeof i?i.apply(this,arguments):i)),g=h*(0>f?-1:1),p=oa.sum(c),v=p?(f-l*g)/p:0,d=oa.range(l),m=[];return null!=e&&d.sort(e===bl?function(n,t){return c[t]-c[n]}:function(n,t){return e(a[n],a[t])}),d.forEach(function(n){m[n]={data:a[n],value:o=c[n],startAngle:s,endAngle:s+=o*v+g,padAngle:h}}),m}var t=Number,e=bl,r=0,u=Fa,i=0;return n.value=function(e){return arguments.length?(t=e,n):t},n.sort=function(t){return arguments.length?(e=t,n):e},n.startAngle=function(t){return arguments.length?(r=t,n):r},n.endAngle=function(t){return arguments.length?(u=t,n):u},n.padAngle=function(t){return arguments.length?(i=t,n):i},n};var bl={};oa.layout.stack=function(){function n(o,l){if(!(h=o.length))return o;var c=o.map(function(e,r){return t.call(n,e,r)}),s=c.map(function(t){return t.map(function(t,e){return[i.call(n,t,e),a.call(n,t,e)]})}),f=e.call(n,s,l);c=oa.permute(c,f),s=oa.permute(s,f);var h,g,p,v,d=r.call(n,s,l),m=c[0].length;for(p=0;m>p;++p)for(u.call(n,c[0][p],v=d[p],s[0][p][1]),g=1;h>g;++g)u.call(n,c[g][p],v+=s[g-1][p][1],s[g][p][1]);return o}var t=y,e=pu,r=vu,u=gu,i=fu,a=hu;return n.values=function(e){return arguments.length?(t=e,n):t},n.order=function(t){return arguments.length?(e="function"==typeof t?t:_l.get(t)||pu,n):e},n.offset=function(t){return arguments.length?(r="function"==typeof t?t:wl.get(t)||vu,n):r},n.x=function(t){return arguments.length?(i=t,n):i},n.y=function(t){return arguments.length?(a=t,n):a},n.out=function(t){return arguments.length?(u=t,n):u},n};var _l=oa.map({"inside-out":function(n){var t,e,r=n.length,u=n.map(du),i=n.map(mu),a=oa.range(r).sort(function(n,t){return u[n]-u[t]}),o=0,l=0,c=[],s=[];for(t=0;r>t;++t)e=a[t],l>o?(o+=i[e],c.push(e)):(l+=i[e],s.push(e));return s.reverse().concat(c)},reverse:function(n){return oa.range(n.length).reverse()},"default":pu}),wl=oa.map({silhouette:function(n){var t,e,r,u=n.length,i=n[0].length,a=[],o=0,l=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];r>o&&(o=r),a.push(r)}for(e=0;i>e;++e)l[e]=(o-a[e])/2;return l},wiggle:function(n){var t,e,r,u,i,a,o,l,c,s=n.length,f=n[0],h=f.length,g=[];for(g[0]=l=c=0,e=1;h>e;++e){for(t=0,u=0;s>t;++t)u+=n[t][e][1];for(t=0,i=0,o=f[e][0]-f[e-1][0];s>t;++t){for(r=0,a=(n[t][e][1]-n[t][e-1][1])/(2*o);t>r;++r)a+=(n[r][e][1]-n[r][e-1][1])/o;i+=a*n[t][e][1]}g[e]=l-=u?i/u*o:0,c>l&&(c=l)}for(e=0;h>e;++e)g[e]-=c;return g},expand:function(n){var t,e,r,u=n.length,i=n[0].length,a=1/u,o=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];if(r)for(t=0;u>t;t++)n[t][e][1]/=r;else for(t=0;u>t;t++)n[t][e][1]=a}for(e=0;i>e;++e)o[e]=0;return o},zero:vu});oa.layout.histogram=function(){function n(n,i){for(var a,o,l=[],c=n.map(e,this),s=r.call(this,c,i),f=u.call(this,s,c,i),i=-1,h=c.length,g=f.length-1,p=t?1:1/h;++i<g;)a=l[i]=[],a.dx=f[i+1]-(a.x=f[i]),a.y=0;if(g>0)for(i=-1;++i<h;)o=c[i],o>=s[0]&&o<=s[1]&&(a=l[oa.bisect(f,o,1,g)-1],a.y+=p,a.push(n[i]));return l}var t=!0,e=Number,r=bu,u=Mu;return n.value=function(t){return arguments.length?(e=t,n):e},n.range=function(t){return arguments.length?(r=En(t),n):r},n.bins=function(t){return arguments.length?(u="number"==typeof t?function(n){return xu(n,t)}:En(t),n):u},n.frequency=function(e){return arguments.length?(t=!!e,n):t},n},oa.layout.pack=function(){function n(n,i){var a=e.call(this,n,i),o=a[0],l=u[0],c=u[1],s=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(o.x=o.y=0,au(o,function(n){n.r=+s(n.value)}),au(o,Nu),r){var f=r*(t?1:Math.max(2*o.r/l,2*o.r/c))/2;au(o,function(n){n.r+=f}),au(o,Nu),au(o,function(n){n.r-=f})}return Cu(o,l/2,c/2,t?1:1/Math.max(2*o.r/l,2*o.r/c)),a}var t,e=oa.layout.hierarchy().sort(_u),r=0,u=[1,1];return n.size=function(t){return arguments.length?(u=t,n):u},n.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,n):t},n.padding=function(t){return arguments.length?(r=+t,n):r},uu(n,e)},oa.layout.tree=function(){function n(n,u){var s=a.call(this,n,u),f=s[0],h=t(f);if(au(h,e),h.parent.m=-h.z,iu(h,r),c)iu(f,i);else{var g=f,p=f,v=f;iu(f,function(n){n.x<g.x&&(g=n),n.x>p.x&&(p=n),n.depth>v.depth&&(v=n)});var d=o(g,p)/2-g.x,m=l[0]/(p.x+o(p,g)/2+d),y=l[1]/(v.depth||1);iu(f,function(n){n.x=(n.x+d)*m,n.y=n.depth*y})}return s}function t(n){for(var t,e={A:null,children:[n]},r=[e];null!=(t=r.pop());)for(var u,i=t.children,a=0,o=i.length;o>a;++a)r.push((i[a]=u={_:i[a],parent:t,children:(u=i[a].children)&&u.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:a}).a=u);return e.children[0]}function e(n){var t=n.children,e=n.parent.children,r=n.i?e[n.i-1]:null;if(t.length){Du(n);var i=(t[0].z+t[t.length-1].z)/2;r?(n.z=r.z+o(n._,r._),n.m=n.z-i):n.z=i}else r&&(n.z=r.z+o(n._,r._));n.parent.A=u(n,r,n.parent.A||e[0])}function r(n){n._.x=n.z+n.parent.m,n.m+=n.parent.m}function u(n,t,e){if(t){for(var r,u=n,i=n,a=t,l=u.parent.children[0],c=u.m,s=i.m,f=a.m,h=l.m;a=Tu(a),u=qu(u),a&&u;)l=qu(l),i=Tu(i),i.a=n,r=a.z+f-u.z-c+o(a._,u._),r>0&&(Ru(Pu(a,n,e),n,r),c+=r,s+=r),f+=a.m,c+=u.m,h+=l.m,s+=i.m;a&&!Tu(i)&&(i.t=a,i.m+=f-s),u&&!qu(l)&&(l.t=u,l.m+=c-h,e=n)}return e}function i(n){n.x*=l[0],n.y=n.depth*l[1]}var a=oa.layout.hierarchy().sort(null).value(null),o=Lu,l=[1,1],c=null;return n.separation=function(t){return arguments.length?(o=t,n):o},n.size=function(t){return arguments.length?(c=null==(l=t)?i:null,n):c?null:l},n.nodeSize=function(t){return arguments.length?(c=null==(l=t)?null:i,n):c?l:null},uu(n,a)},oa.layout.cluster=function(){function n(n,i){var a,o=t.call(this,n,i),l=o[0],c=0;au(l,function(n){var t=n.children;t&&t.length?(n.x=ju(t),n.y=Uu(t)):(n.x=a?c+=e(n,a):0,n.y=0,a=n)});var s=Fu(l),f=Hu(l),h=s.x-e(s,f)/2,g=f.x+e(f,s)/2;return au(l,u?function(n){n.x=(n.x-l.x)*r[0],n.y=(l.y-n.y)*r[1]}:function(n){n.x=(n.x-h)/(g-h)*r[0],n.y=(1-(l.y?n.y/l.y:1))*r[1]}),o}var t=oa.layout.hierarchy().sort(null).value(null),e=Lu,r=[1,1],u=!1;return n.separation=function(t){return arguments.length?(e=t,n):e},n.size=function(t){return arguments.length?(u=null==(r=t),n):u?null:r},n.nodeSize=function(t){return arguments.length?(u=null!=(r=t),n):u?r:null},uu(n,t)},oa.layout.treemap=function(){function n(n,t){for(var e,r,u=-1,i=n.length;++u<i;)r=(e=n[u]).value*(0>t?0:t),e.area=isNaN(r)||0>=r?0:r}function t(e){var i=e.children;if(i&&i.length){var a,o,l,c=f(e),s=[],h=i.slice(),p=1/0,v="slice"===g?c.dx:"dice"===g?c.dy:"slice-dice"===g?1&e.depth?c.dy:c.dx:Math.min(c.dx,c.dy);for(n(h,c.dx*c.dy/e.value),s.area=0;(l=h.length)>0;)s.push(a=h[l-1]),s.area+=a.area,"squarify"!==g||(o=r(s,v))<=p?(h.pop(),p=o):(s.area-=s.pop().area,u(s,v,c,!1),v=Math.min(c.dx,c.dy),s.length=s.area=0,p=1/0);s.length&&(u(s,v,c,!0),s.length=s.area=0),i.forEach(t)}}function e(t){var r=t.children;if(r&&r.length){var i,a=f(t),o=r.slice(),l=[];for(n(o,a.dx*a.dy/t.value),l.area=0;i=o.pop();)l.push(i),l.area+=i.area,null!=i.z&&(u(l,i.z?a.dx:a.dy,a,!o.length),l.length=l.area=0);r.forEach(e)}}function r(n,t){for(var e,r=n.area,u=0,i=1/0,a=-1,o=n.length;++a<o;)(e=n[a].area)&&(i>e&&(i=e),e>u&&(u=e));return r*=r,t*=t,r?Math.max(t*u*p/r,r/(t*i*p)):1/0}function u(n,t,e,r){var u,i=-1,a=n.length,o=e.x,c=e.y,s=t?l(n.area/t):0; | |
| 5 | +if(t==e.dx){for((r||s>e.dy)&&(s=e.dy);++i<a;)u=n[i],u.x=o,u.y=c,u.dy=s,o+=u.dx=Math.min(e.x+e.dx-o,s?l(u.area/s):0);u.z=!0,u.dx+=e.x+e.dx-o,e.y+=s,e.dy-=s}else{for((r||s>e.dx)&&(s=e.dx);++i<a;)u=n[i],u.x=o,u.y=c,u.dx=s,c+=u.dy=Math.min(e.y+e.dy-c,s?l(u.area/s):0);u.z=!1,u.dy+=e.y+e.dy-c,e.x+=s,e.dx-=s}}function i(r){var u=a||o(r),i=u[0];return i.x=i.y=0,i.value?(i.dx=c[0],i.dy=c[1]):i.dx=i.dy=0,a&&o.revalue(i),n([i],i.dx*i.dy/i.value),(a?e:t)(i),h&&(a=u),u}var a,o=oa.layout.hierarchy(),l=Math.round,c=[1,1],s=null,f=Ou,h=!1,g="squarify",p=.5*(1+Math.sqrt(5));return i.size=function(n){return arguments.length?(c=n,i):c},i.padding=function(n){function t(t){var e=n.call(i,t,t.depth);return null==e?Ou(t):Iu(t,"number"==typeof e?[e,e,e,e]:e)}function e(t){return Iu(t,n)}if(!arguments.length)return s;var r;return f=null==(s=n)?Ou:"function"==(r=typeof n)?t:"number"===r?(n=[n,n,n,n],e):e,i},i.round=function(n){return arguments.length?(l=n?Math.round:Number,i):l!=Number},i.sticky=function(n){return arguments.length?(h=n,a=null,i):h},i.ratio=function(n){return arguments.length?(p=n,i):p},i.mode=function(n){return arguments.length?(g=n+"",i):g},uu(i,o)},oa.random={normal:function(n,t){var e=arguments.length;return 2>e&&(t=1),1>e&&(n=0),function(){var e,r,u;do e=2*Math.random()-1,r=2*Math.random()-1,u=e*e+r*r;while(!u||u>1);return n+t*e*Math.sqrt(-2*Math.log(u)/u)}},logNormal:function(){var n=oa.random.normal.apply(oa,arguments);return function(){return Math.exp(n())}},bates:function(n){var t=oa.random.irwinHall(n);return function(){return t()/n}},irwinHall:function(n){return function(){for(var t=0,e=0;n>e;e++)t+=Math.random();return t}}},oa.scale={};var Sl={floor:y,ceil:y};oa.scale.linear=function(){return Wu([0,1],[0,1],Mr,!1)};var kl={s:1,g:1,p:1,r:1,e:1};oa.scale.log=function(){return ri(oa.scale.linear().domain([0,1]),10,!0,[1,10])};var Nl=oa.format(".0e"),El={floor:function(n){return-Math.ceil(-n)},ceil:function(n){return-Math.floor(-n)}};oa.scale.pow=function(){return ui(oa.scale.linear(),1,[0,1])},oa.scale.sqrt=function(){return oa.scale.pow().exponent(.5)},oa.scale.ordinal=function(){return ai([],{t:"range",a:[[]]})},oa.scale.category10=function(){return oa.scale.ordinal().range(Al)},oa.scale.category20=function(){return oa.scale.ordinal().range(Cl)},oa.scale.category20b=function(){return oa.scale.ordinal().range(zl)},oa.scale.category20c=function(){return oa.scale.ordinal().range(Ll)};var Al=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(xn),Cl=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(xn),zl=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(xn),Ll=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(xn);oa.scale.quantile=function(){return oi([],[])},oa.scale.quantize=function(){return li(0,1,[0,1])},oa.scale.threshold=function(){return ci([.5],[0,1])},oa.scale.identity=function(){return si([0,1])},oa.svg={},oa.svg.arc=function(){function n(){var n=Math.max(0,+e.apply(this,arguments)),c=Math.max(0,+r.apply(this,arguments)),s=a.apply(this,arguments)-Oa,f=o.apply(this,arguments)-Oa,h=Math.abs(f-s),g=s>f?0:1;if(n>c&&(p=c,c=n,n=p),h>=Ha)return t(c,g)+(n?t(n,1-g):"")+"Z";var p,v,d,m,y,M,x,b,_,w,S,k,N=0,E=0,A=[];if((m=(+l.apply(this,arguments)||0)/2)&&(d=i===ql?Math.sqrt(n*n+c*c):+i.apply(this,arguments),g||(E*=-1),c&&(E=tn(d/c*Math.sin(m))),n&&(N=tn(d/n*Math.sin(m)))),c){y=c*Math.cos(s+E),M=c*Math.sin(s+E),x=c*Math.cos(f-E),b=c*Math.sin(f-E);var C=Math.abs(f-s-2*E)<=ja?0:1;if(E&&mi(y,M,x,b)===g^C){var z=(s+f)/2;y=c*Math.cos(z),M=c*Math.sin(z),x=b=null}}else y=M=0;if(n){_=n*Math.cos(f-N),w=n*Math.sin(f-N),S=n*Math.cos(s+N),k=n*Math.sin(s+N);var L=Math.abs(s-f+2*N)<=ja?0:1;if(N&&mi(_,w,S,k)===1-g^L){var q=(s+f)/2;_=n*Math.cos(q),w=n*Math.sin(q),S=k=null}}else _=w=0;if(h>Pa&&(p=Math.min(Math.abs(c-n)/2,+u.apply(this,arguments)))>.001){v=c>n^g?0:1;var T=p,R=p;if(ja>h){var D=null==S?[_,w]:null==x?[y,M]:Re([y,M],[S,k],[x,b],[_,w]),P=y-D[0],U=M-D[1],j=x-D[0],F=b-D[1],H=1/Math.sin(Math.acos((P*j+U*F)/(Math.sqrt(P*P+U*U)*Math.sqrt(j*j+F*F)))/2),O=Math.sqrt(D[0]*D[0]+D[1]*D[1]);R=Math.min(p,(n-O)/(H-1)),T=Math.min(p,(c-O)/(H+1))}if(null!=x){var I=yi(null==S?[_,w]:[S,k],[y,M],c,T,g),Y=yi([x,b],[_,w],c,T,g);p===T?A.push("M",I[0],"A",T,",",T," 0 0,",v," ",I[1],"A",c,",",c," 0 ",1-g^mi(I[1][0],I[1][1],Y[1][0],Y[1][1]),",",g," ",Y[1],"A",T,",",T," 0 0,",v," ",Y[0]):A.push("M",I[0],"A",T,",",T," 0 1,",v," ",Y[0])}else A.push("M",y,",",M);if(null!=S){var Z=yi([y,M],[S,k],n,-R,g),V=yi([_,w],null==x?[y,M]:[x,b],n,-R,g);p===R?A.push("L",V[0],"A",R,",",R," 0 0,",v," ",V[1],"A",n,",",n," 0 ",g^mi(V[1][0],V[1][1],Z[1][0],Z[1][1]),",",1-g," ",Z[1],"A",R,",",R," 0 0,",v," ",Z[0]):A.push("L",V[0],"A",R,",",R," 0 0,",v," ",Z[0])}else A.push("L",_,",",w)}else A.push("M",y,",",M),null!=x&&A.push("A",c,",",c," 0 ",C,",",g," ",x,",",b),A.push("L",_,",",w),null!=S&&A.push("A",n,",",n," 0 ",L,",",1-g," ",S,",",k);return A.push("Z"),A.join("")}function t(n,t){return"M0,"+n+"A"+n+","+n+" 0 1,"+t+" 0,"+-n+"A"+n+","+n+" 0 1,"+t+" 0,"+n}var e=hi,r=gi,u=fi,i=ql,a=pi,o=vi,l=di;return n.innerRadius=function(t){return arguments.length?(e=En(t),n):e},n.outerRadius=function(t){return arguments.length?(r=En(t),n):r},n.cornerRadius=function(t){return arguments.length?(u=En(t),n):u},n.padRadius=function(t){return arguments.length?(i=t==ql?ql:En(t),n):i},n.startAngle=function(t){return arguments.length?(a=En(t),n):a},n.endAngle=function(t){return arguments.length?(o=En(t),n):o},n.padAngle=function(t){return arguments.length?(l=En(t),n):l},n.centroid=function(){var n=(+e.apply(this,arguments)+ +r.apply(this,arguments))/2,t=(+a.apply(this,arguments)+ +o.apply(this,arguments))/2-Oa;return[Math.cos(t)*n,Math.sin(t)*n]},n};var ql="auto";oa.svg.line=function(){return Mi(y)};var Tl=oa.map({linear:xi,"linear-closed":bi,step:_i,"step-before":wi,"step-after":Si,basis:zi,"basis-open":Li,"basis-closed":qi,bundle:Ti,cardinal:Ei,"cardinal-open":ki,"cardinal-closed":Ni,monotone:Fi});Tl.forEach(function(n,t){t.key=n,t.closed=/-closed$/.test(n)});var Rl=[0,2/3,1/3,0],Dl=[0,1/3,2/3,0],Pl=[0,1/6,2/3,1/6];oa.svg.line.radial=function(){var n=Mi(Hi);return n.radius=n.x,delete n.x,n.angle=n.y,delete n.y,n},wi.reverse=Si,Si.reverse=wi,oa.svg.area=function(){return Oi(y)},oa.svg.area.radial=function(){var n=Oi(Hi);return n.radius=n.x,delete n.x,n.innerRadius=n.x0,delete n.x0,n.outerRadius=n.x1,delete n.x1,n.angle=n.y,delete n.y,n.startAngle=n.y0,delete n.y0,n.endAngle=n.y1,delete n.y1,n},oa.svg.chord=function(){function n(n,o){var l=t(this,i,n,o),c=t(this,a,n,o);return"M"+l.p0+r(l.r,l.p1,l.a1-l.a0)+(e(l,c)?u(l.r,l.p1,l.r,l.p0):u(l.r,l.p1,c.r,c.p0)+r(c.r,c.p1,c.a1-c.a0)+u(c.r,c.p1,l.r,l.p0))+"Z"}function t(n,t,e,r){var u=t.call(n,e,r),i=o.call(n,u,r),a=l.call(n,u,r)-Oa,s=c.call(n,u,r)-Oa;return{r:i,a0:a,a1:s,p0:[i*Math.cos(a),i*Math.sin(a)],p1:[i*Math.cos(s),i*Math.sin(s)]}}function e(n,t){return n.a0==t.a0&&n.a1==t.a1}function r(n,t,e){return"A"+n+","+n+" 0 "+ +(e>ja)+",1 "+t}function u(n,t,e,r){return"Q 0,0 "+r}var i=Me,a=xe,o=Ii,l=pi,c=vi;return n.radius=function(t){return arguments.length?(o=En(t),n):o},n.source=function(t){return arguments.length?(i=En(t),n):i},n.target=function(t){return arguments.length?(a=En(t),n):a},n.startAngle=function(t){return arguments.length?(l=En(t),n):l},n.endAngle=function(t){return arguments.length?(c=En(t),n):c},n},oa.svg.diagonal=function(){function n(n,u){var i=t.call(this,n,u),a=e.call(this,n,u),o=(i.y+a.y)/2,l=[i,{x:i.x,y:o},{x:a.x,y:o},a];return l=l.map(r),"M"+l[0]+"C"+l[1]+" "+l[2]+" "+l[3]}var t=Me,e=xe,r=Yi;return n.source=function(e){return arguments.length?(t=En(e),n):t},n.target=function(t){return arguments.length?(e=En(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},oa.svg.diagonal.radial=function(){var n=oa.svg.diagonal(),t=Yi,e=n.projection;return n.projection=function(n){return arguments.length?e(Zi(t=n)):t},n},oa.svg.symbol=function(){function n(n,r){return(Ul.get(t.call(this,n,r))||$i)(e.call(this,n,r))}var t=Xi,e=Vi;return n.type=function(e){return arguments.length?(t=En(e),n):t},n.size=function(t){return arguments.length?(e=En(t),n):e},n};var Ul=oa.map({circle:$i,cross:function(n){var t=Math.sqrt(n/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(n){var t=Math.sqrt(n/(2*Fl)),e=t*Fl;return"M0,"+-t+"L"+e+",0 0,"+t+" "+-e+",0Z"},square:function(n){var t=Math.sqrt(n)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(n){var t=Math.sqrt(n/jl),e=t*jl/2;return"M0,"+e+"L"+t+","+-e+" "+-t+","+-e+"Z"},"triangle-up":function(n){var t=Math.sqrt(n/jl),e=t*jl/2;return"M0,"+-e+"L"+t+","+e+" "+-t+","+e+"Z"}});oa.svg.symbolTypes=Ul.keys();var jl=Math.sqrt(3),Fl=Math.tan(30*Ia);Aa.transition=function(n){for(var t,e,r=Hl||++Zl,u=Ki(n),i=[],a=Ol||{time:Date.now(),ease:Nr,delay:0,duration:250},o=-1,l=this.length;++o<l;){i.push(t=[]);for(var c=this[o],s=-1,f=c.length;++s<f;)(e=c[s])&&Qi(e,s,u,r,a),t.push(e)}return Wi(i,u,r)},Aa.interrupt=function(n){return this.each(null==n?Il:Bi(Ki(n)))};var Hl,Ol,Il=Bi(Ki()),Yl=[],Zl=0;Yl.call=Aa.call,Yl.empty=Aa.empty,Yl.node=Aa.node,Yl.size=Aa.size,oa.transition=function(n,t){return n&&n.transition?Hl?n.transition(t):n:oa.selection().transition(n)},oa.transition.prototype=Yl,Yl.select=function(n){var t,e,r,u=this.id,i=this.namespace,a=[];n=A(n);for(var o=-1,l=this.length;++o<l;){a.push(t=[]);for(var c=this[o],s=-1,f=c.length;++s<f;)(r=c[s])&&(e=n.call(r,r.__data__,s,o))?("__data__"in r&&(e.__data__=r.__data__),Qi(e,s,i,u,r[i][u]),t.push(e)):t.push(null)}return Wi(a,i,u)},Yl.selectAll=function(n){var t,e,r,u,i,a=this.id,o=this.namespace,l=[];n=C(n);for(var c=-1,s=this.length;++c<s;)for(var f=this[c],h=-1,g=f.length;++h<g;)if(r=f[h]){i=r[o][a],e=n.call(r,r.__data__,h,c),l.push(t=[]);for(var p=-1,v=e.length;++p<v;)(u=e[p])&&Qi(u,p,o,a,i),t.push(u)}return Wi(l,o,a)},Yl.filter=function(n){var t,e,r,u=[];"function"!=typeof n&&(n=O(n));for(var i=0,a=this.length;a>i;i++){u.push(t=[]);for(var e=this[i],o=0,l=e.length;l>o;o++)(r=e[o])&&n.call(r,r.__data__,o,i)&&t.push(r)}return Wi(u,this.namespace,this.id)},Yl.tween=function(n,t){var e=this.id,r=this.namespace;return arguments.length<2?this.node()[r][e].tween.get(n):Y(this,null==t?function(t){t[r][e].tween.remove(n)}:function(u){u[r][e].tween.set(n,t)})},Yl.attr=function(n,t){function e(){this.removeAttribute(o)}function r(){this.removeAttributeNS(o.space,o.local)}function u(n){return null==n?e:(n+="",function(){var t,e=this.getAttribute(o);return e!==n&&(t=a(e,n),function(n){this.setAttribute(o,t(n))})})}function i(n){return null==n?r:(n+="",function(){var t,e=this.getAttributeNS(o.space,o.local);return e!==n&&(t=a(e,n),function(n){this.setAttributeNS(o.space,o.local,t(n))})})}if(arguments.length<2){for(t in n)this.attr(t,n[t]);return this}var a="transform"==n?$r:Mr,o=oa.ns.qualify(n);return Ji(this,"attr."+n,t,o.local?i:u)},Yl.attrTween=function(n,t){function e(n,e){var r=t.call(this,n,e,this.getAttribute(u));return r&&function(n){this.setAttribute(u,r(n))}}function r(n,e){var r=t.call(this,n,e,this.getAttributeNS(u.space,u.local));return r&&function(n){this.setAttributeNS(u.space,u.local,r(n))}}var u=oa.ns.qualify(n);return this.tween("attr."+n,u.local?r:e)},Yl.style=function(n,e,r){function u(){this.style.removeProperty(n)}function i(e){return null==e?u:(e+="",function(){var u,i=t(this).getComputedStyle(this,null).getPropertyValue(n);return i!==e&&(u=Mr(i,e),function(t){this.style.setProperty(n,u(t),r)})})}var a=arguments.length;if(3>a){if("string"!=typeof n){2>a&&(e="");for(r in n)this.style(r,n[r],e);return this}r=""}return Ji(this,"style."+n,e,i)},Yl.styleTween=function(n,e,r){function u(u,i){var a=e.call(this,u,i,t(this).getComputedStyle(this,null).getPropertyValue(n));return a&&function(t){this.style.setProperty(n,a(t),r)}}return arguments.length<3&&(r=""),this.tween("style."+n,u)},Yl.text=function(n){return Ji(this,"text",n,Gi)},Yl.remove=function(){var n=this.namespace;return this.each("end.transition",function(){var t;this[n].count<2&&(t=this.parentNode)&&t.removeChild(this)})},Yl.ease=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].ease:("function"!=typeof n&&(n=oa.ease.apply(oa,arguments)),Y(this,function(r){r[e][t].ease=n}))},Yl.delay=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].delay:Y(this,"function"==typeof n?function(r,u,i){r[e][t].delay=+n.call(r,r.__data__,u,i)}:(n=+n,function(r){r[e][t].delay=n}))},Yl.duration=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].duration:Y(this,"function"==typeof n?function(r,u,i){r[e][t].duration=Math.max(1,n.call(r,r.__data__,u,i))}:(n=Math.max(1,n),function(r){r[e][t].duration=n}))},Yl.each=function(n,t){var e=this.id,r=this.namespace;if(arguments.length<2){var u=Ol,i=Hl;try{Hl=e,Y(this,function(t,u,i){Ol=t[r][e],n.call(t,t.__data__,u,i)})}finally{Ol=u,Hl=i}}else Y(this,function(u){var i=u[r][e];(i.event||(i.event=oa.dispatch("start","end","interrupt"))).on(n,t)});return this},Yl.transition=function(){for(var n,t,e,r,u=this.id,i=++Zl,a=this.namespace,o=[],l=0,c=this.length;c>l;l++){o.push(n=[]);for(var t=this[l],s=0,f=t.length;f>s;s++)(e=t[s])&&(r=e[a][u],Qi(e,s,a,i,{time:r.time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration})),n.push(e)}return Wi(o,a,i)},oa.svg.axis=function(){function n(n){n.each(function(){var n,c=oa.select(this),s=this.__chart__||e,f=this.__chart__=e.copy(),h=null==l?f.ticks?f.ticks.apply(f,o):f.domain():l,g=null==t?f.tickFormat?f.tickFormat.apply(f,o):y:t,p=c.selectAll(".tick").data(h,f),v=p.enter().insert("g",".domain").attr("class","tick").style("opacity",Pa),d=oa.transition(p.exit()).style("opacity",Pa).remove(),m=oa.transition(p.order()).style("opacity",1),M=Math.max(u,0)+a,x=Zu(f),b=c.selectAll(".domain").data([0]),_=(b.enter().append("path").attr("class","domain"),oa.transition(b));v.append("line"),v.append("text");var w,S,k,N,E=v.select("line"),A=m.select("line"),C=p.select("text").text(g),z=v.select("text"),L=m.select("text"),q="top"===r||"left"===r?-1:1;if("bottom"===r||"top"===r?(n=na,w="x",k="y",S="x2",N="y2",C.attr("dy",0>q?"0em":".71em").style("text-anchor","middle"),_.attr("d","M"+x[0]+","+q*i+"V0H"+x[1]+"V"+q*i)):(n=ta,w="y",k="x",S="y2",N="x2",C.attr("dy",".32em").style("text-anchor",0>q?"end":"start"),_.attr("d","M"+q*i+","+x[0]+"H0V"+x[1]+"H"+q*i)),E.attr(N,q*u),z.attr(k,q*M),A.attr(S,0).attr(N,q*u),L.attr(w,0).attr(k,q*M),f.rangeBand){var T=f,R=T.rangeBand()/2;s=f=function(n){return T(n)+R}}else s.rangeBand?s=f:d.call(n,f,s);v.call(n,s,f),m.call(n,f,f)})}var t,e=oa.scale.linear(),r=Vl,u=6,i=6,a=3,o=[10],l=null;return n.scale=function(t){return arguments.length?(e=t,n):e},n.orient=function(t){return arguments.length?(r=t in Xl?t+"":Vl,n):r},n.ticks=function(){return arguments.length?(o=ca(arguments),n):o},n.tickValues=function(t){return arguments.length?(l=t,n):l},n.tickFormat=function(e){return arguments.length?(t=e,n):t},n.tickSize=function(t){var e=arguments.length;return e?(u=+t,i=+arguments[e-1],n):u},n.innerTickSize=function(t){return arguments.length?(u=+t,n):u},n.outerTickSize=function(t){return arguments.length?(i=+t,n):i},n.tickPadding=function(t){return arguments.length?(a=+t,n):a},n.tickSubdivide=function(){return arguments.length&&n},n};var Vl="bottom",Xl={top:1,right:1,bottom:1,left:1};oa.svg.brush=function(){function n(t){t.each(function(){var t=oa.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",i).on("touchstart.brush",i),a=t.selectAll(".background").data([0]);a.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),t.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var o=t.selectAll(".resize").data(v,y);o.exit().remove(),o.enter().append("g").attr("class",function(n){return"resize "+n}).style("cursor",function(n){return $l[n]}).append("rect").attr("x",function(n){return/[ew]$/.test(n)?-3:null}).attr("y",function(n){return/^[ns]/.test(n)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),o.style("display",n.empty()?"none":null);var l,f=oa.transition(t),h=oa.transition(a);c&&(l=Zu(c),h.attr("x",l[0]).attr("width",l[1]-l[0]),r(f)),s&&(l=Zu(s),h.attr("y",l[0]).attr("height",l[1]-l[0]),u(f)),e(f)})}function e(n){n.selectAll(".resize").attr("transform",function(n){return"translate("+f[+/e$/.test(n)]+","+h[+/^s/.test(n)]+")"})}function r(n){n.select(".extent").attr("x",f[0]),n.selectAll(".extent,.n>rect,.s>rect").attr("width",f[1]-f[0])}function u(n){n.select(".extent").attr("y",h[0]),n.selectAll(".extent,.e>rect,.w>rect").attr("height",h[1]-h[0])}function i(){function i(){32==oa.event.keyCode&&(C||(M=null,L[0]-=f[1],L[1]-=h[1],C=2),S())}function v(){32==oa.event.keyCode&&2==C&&(L[0]+=f[1],L[1]+=h[1],C=0,S())}function d(){var n=oa.mouse(b),t=!1;x&&(n[0]+=x[0],n[1]+=x[1]),C||(oa.event.altKey?(M||(M=[(f[0]+f[1])/2,(h[0]+h[1])/2]),L[0]=f[+(n[0]<M[0])],L[1]=h[+(n[1]<M[1])]):M=null),E&&m(n,c,0)&&(r(k),t=!0),A&&m(n,s,1)&&(u(k),t=!0),t&&(e(k),w({type:"brush",mode:C?"move":"resize"}))}function m(n,t,e){var r,u,i=Zu(t),l=i[0],c=i[1],s=L[e],v=e?h:f,d=v[1]-v[0];return C&&(l-=s,c-=d+s),r=(e?p:g)?Math.max(l,Math.min(c,n[e])):n[e],C?u=(r+=s)+d:(M&&(s=Math.max(l,Math.min(c,2*M[e]-r))),r>s?(u=r,r=s):u=s),v[0]!=r||v[1]!=u?(e?o=null:a=null,v[0]=r,v[1]=u,!0):void 0}function y(){d(),k.style("pointer-events","all").selectAll(".resize").style("display",n.empty()?"none":null),oa.select("body").style("cursor",null),q.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),z(),w({type:"brushend"})}var M,x,b=this,_=oa.select(oa.event.target),w=l.of(b,arguments),k=oa.select(b),N=_.datum(),E=!/^(n|s)$/.test(N)&&c,A=!/^(e|w)$/.test(N)&&s,C=_.classed("extent"),z=W(b),L=oa.mouse(b),q=oa.select(t(b)).on("keydown.brush",i).on("keyup.brush",v);if(oa.event.changedTouches?q.on("touchmove.brush",d).on("touchend.brush",y):q.on("mousemove.brush",d).on("mouseup.brush",y),k.interrupt().selectAll("*").interrupt(),C)L[0]=f[0]-L[0],L[1]=h[0]-L[1];else if(N){var T=+/w$/.test(N),R=+/^n/.test(N);x=[f[1-T]-L[0],h[1-R]-L[1]],L[0]=f[T],L[1]=h[R]}else oa.event.altKey&&(M=L.slice());k.style("pointer-events","none").selectAll(".resize").style("display",null),oa.select("body").style("cursor",_.style("cursor")),w({type:"brushstart"}),d()}var a,o,l=N(n,"brushstart","brush","brushend"),c=null,s=null,f=[0,0],h=[0,0],g=!0,p=!0,v=Bl[0];return n.event=function(n){n.each(function(){var n=l.of(this,arguments),t={x:f,y:h,i:a,j:o},e=this.__chart__||t;this.__chart__=t,Hl?oa.select(this).transition().each("start.brush",function(){a=e.i,o=e.j,f=e.x,h=e.y,n({type:"brushstart"})}).tween("brush:brush",function(){var e=xr(f,t.x),r=xr(h,t.y);return a=o=null,function(u){f=t.x=e(u),h=t.y=r(u),n({type:"brush",mode:"resize"})}}).each("end.brush",function(){a=t.i,o=t.j,n({type:"brush",mode:"resize"}),n({type:"brushend"})}):(n({type:"brushstart"}),n({type:"brush",mode:"resize"}),n({type:"brushend"}))})},n.x=function(t){return arguments.length?(c=t,v=Bl[!c<<1|!s],n):c},n.y=function(t){return arguments.length?(s=t,v=Bl[!c<<1|!s],n):s},n.clamp=function(t){return arguments.length?(c&&s?(g=!!t[0],p=!!t[1]):c?g=!!t:s&&(p=!!t),n):c&&s?[g,p]:c?g:s?p:null},n.extent=function(t){var e,r,u,i,l;return arguments.length?(c&&(e=t[0],r=t[1],s&&(e=e[0],r=r[0]),a=[e,r],c.invert&&(e=c(e),r=c(r)),e>r&&(l=e,e=r,r=l),(e!=f[0]||r!=f[1])&&(f=[e,r])),s&&(u=t[0],i=t[1],c&&(u=u[1],i=i[1]),o=[u,i],s.invert&&(u=s(u),i=s(i)),u>i&&(l=u,u=i,i=l),(u!=h[0]||i!=h[1])&&(h=[u,i])),n):(c&&(a?(e=a[0],r=a[1]):(e=f[0],r=f[1],c.invert&&(e=c.invert(e),r=c.invert(r)),e>r&&(l=e,e=r,r=l))),s&&(o?(u=o[0],i=o[1]):(u=h[0],i=h[1],s.invert&&(u=s.invert(u),i=s.invert(i)),u>i&&(l=u,u=i,i=l))),c&&s?[[e,u],[r,i]]:c?[e,r]:s&&[u,i])},n.clear=function(){return n.empty()||(f=[0,0],h=[0,0],a=o=null),n},n.empty=function(){return!!c&&f[0]==f[1]||!!s&&h[0]==h[1]},oa.rebind(n,l,"on")};var $l={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Bl=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Wl=go.format=xo.timeFormat,Jl=Wl.utc,Gl=Jl("%Y-%m-%dT%H:%M:%S.%LZ");Wl.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?ea:Gl,ea.parse=function(n){var t=new Date(n);return isNaN(t)?null:t},ea.toString=Gl.toString,go.second=On(function(n){return new po(1e3*Math.floor(n/1e3))},function(n,t){n.setTime(n.getTime()+1e3*Math.floor(t))},function(n){return n.getSeconds()}),go.seconds=go.second.range,go.seconds.utc=go.second.utc.range,go.minute=On(function(n){return new po(6e4*Math.floor(n/6e4))},function(n,t){n.setTime(n.getTime()+6e4*Math.floor(t))},function(n){return n.getMinutes()}),go.minutes=go.minute.range,go.minutes.utc=go.minute.utc.range,go.hour=On(function(n){var t=n.getTimezoneOffset()/60;return new po(36e5*(Math.floor(n/36e5-t)+t))},function(n,t){n.setTime(n.getTime()+36e5*Math.floor(t))},function(n){return n.getHours()}),go.hours=go.hour.range,go.hours.utc=go.hour.utc.range,go.month=On(function(n){return n=go.day(n),n.setDate(1),n},function(n,t){n.setMonth(n.getMonth()+t)},function(n){return n.getMonth()}),go.months=go.month.range,go.months.utc=go.month.utc.range;var Kl=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Ql=[[go.second,1],[go.second,5],[go.second,15],[go.second,30],[go.minute,1],[go.minute,5],[go.minute,15],[go.minute,30],[go.hour,1],[go.hour,3],[go.hour,6],[go.hour,12],[go.day,1],[go.day,2],[go.week,1],[go.month,1],[go.month,3],[go.year,1]],nc=Wl.multi([[".%L",function(n){return n.getMilliseconds()}],[":%S",function(n){return n.getSeconds()}],["%I:%M",function(n){return n.getMinutes()}],["%I %p",function(n){return n.getHours()}],["%a %d",function(n){return n.getDay()&&1!=n.getDate()}],["%b %d",function(n){return 1!=n.getDate()}],["%B",function(n){return n.getMonth()}],["%Y",zt]]),tc={range:function(n,t,e){return oa.range(Math.ceil(n/e)*e,+t,e).map(ua)},floor:y,ceil:y};Ql.year=go.year,go.scale=function(){return ra(oa.scale.linear(),Ql,nc)};var ec=Ql.map(function(n){return[n[0].utc,n[1]]}),rc=Jl.multi([[".%L",function(n){return n.getUTCMilliseconds()}],[":%S",function(n){return n.getUTCSeconds()}],["%I:%M",function(n){return n.getUTCMinutes()}],["%I %p",function(n){return n.getUTCHours()}],["%a %d",function(n){return n.getUTCDay()&&1!=n.getUTCDate()}],["%b %d",function(n){return 1!=n.getUTCDate()}],["%B",function(n){return n.getUTCMonth()}],["%Y",zt]]);ec.year=go.year.utc,go.scale.utc=function(){return ra(oa.scale.linear(),ec,rc)},oa.text=An(function(n){return n.responseText}),oa.json=function(n,t){return Cn(n,"application/json",ia,t)},oa.html=function(n,t){return Cn(n,"text/html",aa,t)},oa.xml=An(function(n){return n.responseXML}),"function"==typeof define&&define.amd?(this.d3=oa,define(oa)):"object"==typeof module&&module.exports?module.exports=oa:this.d3=oa}(); | |
| 0 | 6 | \ No newline at end of file | ... | ... |
src/main/resources/static/assets/plugins/d3/radialprogress/vizuly_core.min.js
0 → 100644
| 1 | +/*! vizuly 05-06-2017 */ | |
| 2 | +var vizuly={};vizuly.version="1.0",vizuly.core={},vizuly.viz={},vizuly.viz.layout={},vizuly.viz.layout.CLUSTERED="CLUSTERED",vizuly.viz.layout.STACKED="STACKED",vizuly.viz.layout.OVERLAP="OVERLAP",vizuly.viz.layout.STREAM="STREAM",vizuly.svg={},vizuly.theme={},vizuly.skin={},vizuly.ui={},vizuly.core.component=function(a,b,c,d){function e(a,b,c){Object.getOwnPropertyNames(c).forEach(function(d,e,f){"undefined"==typeof b[d]&&(b[d]=c[d],a[d]=function(c){if(!arguments.length)return b[d];var e=b[d];return b[d]=c,b[d]!==e&&b.dispatch[d+"_change"].apply(this,[b[d],e]),a})})}b.parent=a,b.properties=c,b.id=vizuly.core.util.guid(),b.selection=d3.select(a).append("div").attr("id","div_"+b.id).style("width","100%").style("height","100%");var f=[];f.push("mouseover"),f.push("mouseout"),f.push("mousedown"),f.push("click"),f.push("dblclick"),f.push("touch"),f.push("zoom"),f.push("zoomstart"),f.push("zoomend"),f.push("initialize"),f.push("validate"),f.push("measure"),f.push("update"),Object.getOwnPropertyNames(c).forEach(function(a,b,c){f.push(a+"_change")}),d&&d.length>0&&d.forEach(function(a){f.push(a)}),b.dispatch=d3.dispatch.apply(this,f);var g=function(){return e(g,b,b.properties),g};return b.dispatch.component=g(),g.id=function(){return b.id},g.selection=function(){return b.selection},g.on=function(a,c){return b.dispatch.on(a,c),g},g.validate=function(){if(!a){var a=[];if(Object.getOwnPropertyNames(c).forEach(function(c){!b[c]&&Number(0!=b[c])&&a.push(c)}),a.length>0)throw new Error("vizuly.core.util.component.validate(): "+a.concat()+" need to be declared");b.dispatch.validate()}},b.dispatch.component},vizuly.core.util={},vizuly.core.util.size=function(a,b,c){var d={};return d.width=b-vizuly.core.util.measure(a.left,b)-vizuly.core.util.measure(a.right,b),d.height=c-vizuly.core.util.measure(a.top,c)-vizuly.core.util.measure(a.bottom,c),d.top=vizuly.core.util.measure(a.top,c),d.left=vizuly.core.util.measure(a.left,b),d.bottom=vizuly.core.util.measure(a.bottom,c),d.right=vizuly.core.util.measure(a.right,b),d},vizuly.core.util.getTypedScale=function(a){var b;return b="string"==typeof a?d3.scale.ordinal():a instanceof Date?d3.time.scale():d3.scale.linear()},vizuly.core.util.setRange=function(a,b,c){"string"==typeof a.domain()[0]?a.rangeBands([b,c],0):a.range([b,c])},vizuly.core.util.measure=function(a,b){if("string"==typeof a&&"%"==a.substr(a.length-1)){var c=Math.min(Number(a.substr(0,a.length-1)),100)/100;return Math.round(b*c)}return a},vizuly.core.util.guid=function(){return"vzxxxxxxxx".replace(/[xy]/g,function(a){var b=16*Math.random()|0,c="x"===a?b:3&b|8;return c.toString(16)})},vizuly.core.util.getDefs=function(a){var b=a.selection().selectAll("svg defs");return b[0].length<1&&(b=a.selection().select("svg").append("defs")),b},vizuly.core.util.createCSSKey=function(a){return a=String(a).replace(",","_"),a=a.replace(/[\s+,'+,\.,\(,\),\"]/g,""),a="css"+a.toUpperCase()},vizuly.core.util.aggregateNest=function(a,b,c){function d(a,b){if(b)for(var c=0;c<g.length;c++){var d=g[c];void 0!=a[d]&&(a["childProp_"+d]=a[d]),b["childProp_"+d]=a["childProp_"+d]?a["childProp_"+d]:a[d]}}function e(a,f){for(var g=0;g<a.length;g++){var h=a[g];if(h.values){e(h.values,h);for(var i=0;i<h.values.length;i++)for(var j=h.values[i],k=0;k<b.length;k++)isNaN(h["agg_"+b[k]])&&(h["agg_"+b[k]]=0),h["agg_"+b[k]]=c(h["agg_"+b[k]],j["agg_"+b[k]])}else for(var k=0;k<b.length;k++)h["agg_"+b[k]]=Number(h[b[k]]),isNaN(h["agg_"+b[k]])&&(h["agg_"+b[k]]=0);d(h,f)}}for(var f=a[0];f.values;)f=f.values[0];var g=[];Object.getOwnPropertyNames(f).forEach(function(a){g.push(a)}),e(a)},vizuly.core.util.format_YEAR_Mon_MonDay=d3.time.format.multi([[".%L",function(a){return a.getMilliseconds()}],[":%S",function(a){return a.getSeconds()}],["%I:%M",function(a){return a.getMinutes()}],["%I %p",function(a){return a.getHours()}],["%a %d",function(a){return a.getDay()&&1!=a.getDate()}],["%b %d",function(a){return 1!=a.getDate()}],["%b",function(a){return a.getMonth()}],["20%y",function(a){return!0}]]),vizuly.svg.filter={},vizuly.svg.filter.dropShadow=function(a,b,c,d){var e=Math.round(100*b)+"_"+Math.round(100*c)+"_"+Math.round(100*dev),f=a.id(),g=vizuly.core.util.getDefs(a),h=g.selectAll("#vz_filter_"+f+"_"+e).data([e]).enter().append("filter").attr("id","vz_filter_"+f+"_"+e).attr("class","vz-svg-filter-dropShadow").attr("width","300%").attr("height","300%");h.append("feGaussianBlur").attr("in","SourceAlpha").attr("stdDeviation",d),h.append("feOffset").attr("dx",b).attr("dy",c),h.append("feComponentTransfer").append("feFuncA").attr("type","linear").attr("slope",.2);var i=h.append("feMerge");return i.append("feMergeNode"),i.append("feMergeNode").attr("in","SourceGraphic"),"#vz_filter_"+f+"_"+e},vizuly.svg.gradient={},vizuly.svg.gradient.blend=function(a,b,c,d){var e,f,g,h,i=String(b).replace("#","")+String(c).replace("#",""),j="vz_gradient_blend_"+a.id()+"_"+i;"horizontal"==d?(e="100%",f="0%",g="0%",h="0%"):(e="0%",f="0%",g="100%",h="0%");var k=vizuly.core.util.getDefs(a),l=k.selectAll("#"+j).data([i]).enter().append("linearGradient").attr("id",j).attr("class","vz-svg-gradient-blend").attr("x1",e).attr("x2",f).attr("y1",g).attr("y2",h);return l.append("stop").attr("offset","0%").attr("stop-color",b),l.append("stop").attr("offset","100%").attr("stop-color",c),l=k.selectAll("#"+j)},vizuly.svg.gradient.fade=function(a,b,c,d,e){e||(e=[0,1]),d||(d=[.75,.9]);var f,g,h,i,j=String(b).replace("#",""),k="vz_gradient_fade_"+a.id()+"_"+j;"horizontal"==c?(f="0%",g="100%",h="0%",i="0%"):(f="0%",g="0%",h="100%",i="0%");var l=vizuly.core.util.getDefs(a),m=l.selectAll("#"+k).data([j]).enter().append("linearGradient").attr("id",k).attr("class","vz-svg-gradient-fade").attr("x1",f).attr("x2",g).attr("y1",h).attr("y2",i);return m.append("stop").attr("offset",100*e[0]+"%").attr("stop-color",b).attr("stop-opacity",d[0]),m.append("stop").attr("offset",100*e[1]+"%").attr("stop-color",b).attr("stop-opacity",d[1]),m=l.selectAll("#"+k)},vizuly.svg.gradient.radialFade=function(a,b,c,d){d||(d=[0,1]),c||(c=[.75,.9]);var e=String(b).replace("#",""),f="vz_gradient_radial_fade"+a.id()+"_"+e,g=vizuly.core.util.getDefs(a),h=g.selectAll("#"+f).data([e]).enter().append("radialGradient").attr("id",f).attr("class","vz-svg-gradient-radial-fade");return h.append("stop").attr("offset",100*d[0]+"%").attr("stop-color",b).attr("stop-opacity",c[0]),h.append("stop").attr("offset",100*d[1]+"%").attr("stop-color",b).attr("stop-opacity",c[1]),h=g.selectAll("#"+f)},vizuly.svg.gradient.darker=function(a,b,c){var d,e,f,g,h=String(b).replace("#",""),i="vz_gradient_darker_"+a.id()+"_"+h;"horizontal"==c?(d="100%",e="0%",f="0%",g="0%"):(d="0%",e="0%",f="100%",g="0%");var j=vizuly.core.util.getDefs(a),k=j.selectAll("#"+i).data([h]).enter().append("linearGradient").attr("class","vz-gradient-darker").attr("id",i).attr("x1",d).attr("x2",e).attr("y1",f).attr("y2",g);return k.append("stop").attr("offset","0%").attr("stop-color",b).attr("stop-opacity",.75),k.append("stop").attr("offset","100%").attr("stop-color",d3.rgb(b).darker()).attr("stop-opacity",.9),k=j.selectAll("#"+i)},vizuly.svg.text={},vizuly.svg.text.arcPath=function(a,b){var c=.0174533,d={};d.angle=b,d.startAngle=d.angle-179*c,d.endAngle=d.angle+179*c;var e=d3.svg.arc().innerRadius(a).outerRadius(a)(d),f=/[Mm][\d\.\-e,\s]+[Aa][\d\.\-e,\s]+/,g=f.exec(e);return g&&(g=g[0]),g},vizuly.svg.text.wrap=function(a,b,c,d){d=!d&&a.attr("width")?Number(a.attr("width")):d,a.each(function(){var a=d3.select(this);a.selectAll("tspan").remove();var e,f=b.split(/\s+/).reverse(),g=[],h=0,i=a.attr("x"),j=a.attr("y"),k=parseFloat(c);isNaN(k)&&(k=0);for(var l=a.text(null).append("tspan").attr("x",i).attr("y",j).attr("dy","0px");e=f.pop();)g.push(e),l.text(g.join(" ")),l.node().getComputedTextLength()>d&&(h++,g.pop(),l.text(g.join(" ")),g=[e],l=a.append("tspan").attr("class","vz-multi-line").attr("x",i).attr("y",j).attr("dy",+k+"px").text(e),k+=c)})},vizuly.skin.COLUMNBAR_AXIIS="Axiis",vizuly.skin.COLUMNBAR_NEON="Neon",vizuly.skin.COLUMNBAR_MATERIALBLUE="MaterialBlue",vizuly.skin.COLUMNBAR_MATERIALPINK="MaterialPink",vizuly.theme.column_bar=function(a){function b(){l(),"viz.chart.column"==a.type?(m=".vz-left-axis",n=".vz-bottom-axis"):(n=".vz-left-axis",m=".vz-bottom-axis")}function c(){var b=a.width(),c=a.selection();o=Math.max(8,Math.round(a.width()/65)),c.attr("class",s["class"]),c.selectAll(n+" .tick text").style("font-weight",s.ordinalAxis_font_weight).style("fill",s.labelColor).style("fill-opacity",1).style("font-size",o+"px").style("opacity",function(){return b>399?1:0}),c.selectAll(m+" line").style("stroke",s.valueAxis_line_stroke).style("stroke-width",1).style("opacity",s.valueAxis_line_opacity),c.selectAll(m+" text").style("font-size",o+"px").style("fill",s.labelColor).style("fill-opacity",.8);var d=c.selectAll(".vz-plot .vz-bar").style("stroke","#FFF");a.layout()==vizuly.viz.layout.STACKED?d.style("stroke-opacity",1).style("stroke-width",function(){return b/800+"px"}).style("stroke-opacity",.6):d.style("stroke-opacity",s.bar_stroke_opacity),c.selectAll(".vz-bar-group")[0].forEach(function(a,b){d3.select(a).selectAll("rect.vz-bar").attr("filter",function(a,b){return s.bar_filter(a,b)}).style("fill-opacity",function(a,b){return s.bar_fill_opacity(a,b)}).style("fill",function(a,b){return s.bar_fill(a,b)}).style("rx",s.barRadius)}),s.background_transition()}function d(b,c,d){d3.select(b).style("fill",s.bar_mouseover_fill).style("fill-opacity",s.bar_mouseover_opacity).style("stroke",s.bar_mouseover_stroke).attr("filter",s.bar_filter_over()),d3.select(a.selection().selectAll(n+" .tick text")[0][g(c)]).transition().style("font-size",1.2*o+"px").style("font-weight",700).style("fill",s.color).style("text-decoration","underline").style("fill-opacity",1).style("opacity",1)}function e(b,c,d){d3.select(b).style("fill",function(){return s.bar_fill(c,d)}).style("fill-opacity",function(){return s.bar_fill_opacity(c,d)}).style("stroke","#FFF").attr("filter",s.bar_filter()),d3.select(a.selection().selectAll(n+" .tick text")[0][g(c)]).transition().style("font-size",o+"px").style("fill",s.labelColor).style("font-weight",s.ordinalAxis_font_weight).style("text-decoration",null).style("fill-opacity",1).style("opacity",function(){return a.width()>399?1:0})}function f(){a.selection().selectAll(".vz-tip").remove(),"viz.chart.column"==a.type?a.yAxis().tickSize(-vizuly.core.util.size(a.margin(),a.width(),a.height()).width).ticks(5).orient("left"):a.xAxis().tickSize(-vizuly.core.util.size(a.margin(),a.width(),a.height()).height).ticks(5)}function g(b){return(m=".vz-left-axis")?a.xScale().domain().indexOf(a.y().apply(this,[b])):a.yScale().domain().indexOf(a.x().apply(this,[b]))}function h(){var b=a.width();return"url("+vizuly.svg.filter.dropShadow(a,b/300,b/300,b/200)+")"}function i(){var b=a.width();return"url("+vizuly.svg.filter.dropShadow(a,b/100,b/100,1.5)+")"}function j(){a.selection().selectAll(".vz-background").style("fill-opacity",1),a.selection().selectAll(".vz-background").attr("fill",function(){return"url(#"+r.attr("id")+")"}),r.selectAll("stop").transition().duration(500).attr("stop-color",function(a,b){return 0==b?s.grad0:s.grad1})}function k(a,b){return a="0x"+a.replace("#",""),a=parseInt(a,16),a+=65793,a|=b,"#"+a.toString(16)}function l(){q.forEach(function(b){a.on(b.on,b.callback)})}var m,n,o,p={MaterialBlue:{name:"Material Blue",labelColor:"#FFF",color:"#02C3FF",grad0:"#021F51",grad1:"#039FDB",background_transition:j,bar_filter:function(a,b){return h()},bar_filter_over:function(a,b){return i()},bar_fill:function(a,b){return"#02C3FF"},bar_fill_opacity:function(a,b){return 1-b/4},bar_mouseover_stroke:"#02C3FF",bar_mouseover_fill:"#FFF",bar_stroke_opacity:0,bar_mouseover_opacity:1,ordinalAxis_font_weight:200,valueAxis_line_stroke:"#FFF",valueAxis_line_opacity:.25,barRadius:function(){return 0},datatip_class:"vz-material-datatip","class":"vz-skin-default"},MaterialPink:{name:"Material Pink",labelColor:"#FFF",color:"#F553B1",grad0:"#540936",grad1:"#C12780",background_transition:j,bar_filter:function(a,b){return h()},bar_filter_over:function(a,b){return i()},bar_fill:function(a,b){return"#FF35BE"},bar_fill_opacity:function(a,b){return 1-b/4},bar_stroke_opacity:0,bar_mouseover_stroke:"#FF35BE",bar_mouseover_fill:"#FFF",bar_mouseover_opacity:.9,ordinalAxis_font_weight:200,valueAxis_line_stroke:"#FFF",valueAxis_line_opacity:.25,barRadius:function(){return 0},datatip_class:"vz-material-datatip","class":"vz-skin-default"},Neon:{name:"Neon",labelColor:"#FFF",color:"#D1F704",grad0:"#000000",grad1:"#474747",background_transition:j,bar_filter:function(a,b){return null},bar_filter_over:function(a,b){return i()},bar_fill:function(a,b){return"#D1F704"},bar_fill_opacity:function(a,b){return 1-b/6},bar_stroke_opacity:0,bar_mouseover_stroke:"#D1F704",bar_mouseover_fill:"#FFF",bar_mouseover_opacity:1,ordinalAxis_font_weight:200,valueAxis_line_stroke:"#FFF",valueAxis_line_opacity:.25,barRadius:function(){return a.width()/150},datatip_class:"vz-neon-datatip","class":"vz-skin-default"},Axiis:{name:"Axiis",labelColor:"#444",color:"#000",colorScale:d3.scale.linear().range(["#DF1133","#3333DF"]).domain([0,a.data()[0].length]),background_transition:function(){a.selection().select(".vz-background").transition().style("fill-opacity",0)},bar_filter:function(a,b){return null},bar_filter_over:function(a,b){return null},bar_fill:function(b,c){var d=vizuly.svg.gradient.fade(a,k(this.colorScale(a.xScale().domain().indexOf(a.x().apply(this,[b]))),2245632*c));return"url(#"+d.attr("id")+")"},bar_fill_opacity:function(a,b){return 1-b/4},bar_mouseover_stroke:"#AAA",bar_mouseover_fill:"#000",bar_mouseover_opacity:.8,bar_stroke_opacity:1,ordinalAxis_font_weight:400,valueAxis_line_stroke:"#AAA",valueAxis_line_opacity:1,barRadius:function(){return 0},datatip_class:"vz-axiis-datatip","class":"vz-skin-axiis"},Minimal:{name:"Minimal",labelColor:"#444",color:"#333",grad0:"#F0F0F0",grad1:"#F0F0F0",background_transition:j,bar_filter:function(a,b){return null},bar_filter_over:function(a,b){return null},bar_fill:function(a,b){return"#555"},bar_fill_opacity:function(a,b){return 1-b/4},bar_stroke_opacity:0,bar_mouseover_stroke:"#000",bar_mouseover_fill:"#333",bar_mouseover_opacity:1,ordinalAxis_font_weight:400,valueAxis_line_stroke:"#AAA",valueAxis_line_opacity:.35,barRadius:function(){return 0},datatip_class:"vz-minimal-datatip","class":"vz-skin-default"}},a=a,q=[{on:"measure.theme",callback:f},{on:"update.theme",callback:c},{on:"mouseover.theme",callback:d},{on:"mouseout.theme",callback:e}];b();var r=vizuly.svg.gradient.blend(a,"#000","#000");b.apply=function(a){return arguments.length>0&&b.skin(a),c(),b},b.release=function(){a&&(a.selection().attr("class",null),q.forEach(function(b){a.on(b.on,null)}),a=null)},b.viz=function(b){return arguments.length?(a=b,void l()):a};var s=null;return b.skin=function(a){if(0==arguments.length)return s;if(!p[a])throw new Error("theme/column_bar.js - skin "+a+" does not exist.");return s=p[a],b},b.skins=function(){return p},b},vizuly.skin.LINEAREA_AXIIS="Axiis",vizuly.skin.LINEAREA_NEON="Neon",vizuly.skin.LINEAREA_FIRE="Fire",vizuly.skin.LINEAREA_OCEAN="Ocean",vizuly.skin.LINEAREA_SUNSET="Sunset",vizuly.skin.LINEAREA_BUSINESS="Business",vizuly.theme.radial_linearea=function(a){function b(){h()}function c(){if(i){var b=a.selection();b.attr("class",i["class"]),b.selectAll(".vz-background").attr("fill",function(){return"url(#"+j.attr("id")+")"}),b.selectAll(".vz-plot-background").style("opacity",0),b.selectAll(".vz-area").style("fill",function(a,b){return i.area_fill(a,b)}).style("fill-opacity",function(b,c){return i.area_fill_opacity.apply(a,[b,c])}),b.selectAll(".vz-line").style("stroke-width",function(){return a.outerRadius()/450}).style("stroke",function(a,b){return i.line_stroke(a,b)}).style("opacity",function(b,c){return i.line_opacity.apply(a,[b,c])}),b.selectAll(".vz-data-point").style("opacity",0),b.selectAll(".vz-radial-x-axis-tick").style("font-weight",i.xAxis_font_weight).style("fill",i.labelColor).style("font-weight",300).style("fill-opacity",.4).style("font-size",Math.max(8,Math.round(a.outerRadius()/25))+"px"),b.selectAll(".vz-y-axis-tick").style("stroke",i.yAxis_line_stroke).style("stroke-width",1).style("opacity",i.yAxis_line_opacity),b.selectAll(".vz-y-axis-tick-label").style("font-size",Math.max(8,Math.round(a.outerRadius()/30))+"px").style("fill",i.labelColor).style("font-weight",200).style("fill-opacity",function(){return i===m.Business?1:.4}),i.background_transition()}}function d(b,c,d){a.selection().selectAll(".vz-line").transition().style("stroke-width",function(){return a.outerRadius()/270}).style("stroke",function(a,b){return i.line_over_stroke(a,b)}).style("opacity",function(a,b){return b==d?1:0}),a.selection().selectAll(".vz-area").transition().style("opacity",function(a,b){return b==d?1:.35}),a.selection().selectAll(".vz-plot").append("circle").attr("class","vz-yAxis-mouseover").attr("cx",0).attr("cy",0).attr("r",function(){return a.radiusScale()(b.y+b.y0)}).style("stroke","#FFF").style("fill","none").style("stroke-dasharray",function(){return a.outerRadius()/80+","+a.outerRadius()/80}),a.selection().selectAll(".vz-y-axis-tick").style("opacity",.1),a.selection().selectAll(".vz-point-tip").remove();var e=d3.select(this);e.append("circle").attr("class","vz-point-tip").attr("r",4).style("fill","#000").style("stroke","#FFF").style("stroke-width",2).style("pointer-events","none")}function e(b,c,d){a.selection().selectAll(".vz-line").transition().style("stroke-width",function(){return a.outerRadius()/450}).style("stroke",function(a,b){return i.line_stroke(a,b)}).style("opacity",function(b,c){return i.line_opacity.apply(a,[b,c])}),a.selection().selectAll(".vz-area").transition().style("opacity",1),a.selection().selectAll(".vz-yAxis-mouseover").remove(),a.selection().selectAll(".vz-point-tip").remove(),a.selection().selectAll(".vz-y-axis-tick").style("opacity",i.yAxis_line_opacity)}function f(){a.yAxis().tickSize(a.outerRadius()).ticks(a.layout()==vizuly.viz.layout.OVERLAP?5:7).orient("left")}function g(){a.selection().selectAll(".vz-background").style("fill-opacity",1),j.selectAll("stop").transition().duration(500).attr("stop-color",function(a,b){return 0==b?i.grad0:i.grad1})}function h(){l.forEach(function(b){a.on(b.on,b.callback)})}var a=a,i=null,j=vizuly.svg.gradient.blend(a,"#000","#000"),k=d3.scale.category20(),l=[{on:"measure.theme",callback:f},{on:"update.theme",callback:c},{on:"mouseover.theme",callback:d},{on:"mouseout.theme",callback:e}];b(),b.apply=function(a){return arguments.length>0&&b.skin(a),c(),b},b.release=function(){a&&(a.selection().attr("class",null),l.forEach(function(b){a.on(b.on,null)}),a=null)},b.viz=function(b){return arguments.length?(a=b,void h()):a},b.skin=function(a){if(0==arguments.length)return i;if(!m[a])throw new Error("theme/linearea.js - skin "+a+" does not exist.");return i=m[a],b},b.skins=function(){return m};var m={Fire:{name:"Fire",labelColor:"#FFF",color:"#02C3FF",stroke_colors:["#FFA000","#FF5722","#F57C00","#FF9800","#FFEB3B"],fill_colors:["#C50A0A","#C2185B","#F57C00","#FF9800","#FFEB3B"],grad0:"#000000",grad1:"#474747",background_transition:g,line_stroke:function(a,b){return this.stroke_colors[b%5]},line_over_stroke:function(a,b){return d3.rgb(this.stroke_colors[b%5]).brighter()},line_opacity:function(a,b){return this.layout()==vizuly.viz.layout.STREAM?.4:.6},area_fill:function(b,c){return"url(#"+vizuly.svg.gradient.radialFade(a,this.fill_colors[c%5],[1,.35]).attr("id")+")"},area_fill_opacity:function(a,b){return this.layout()==vizuly.viz.layout.OVERLAP?.7:.9},xAxis_font_weight:200,yAxis_line_stroke:"#FFF",yAxis_line_opacity:.25,"class":"vz-skin-default"},Sunset:{name:"Sunset",labelColor:"#D8F433",color:"#02C3FF",stroke_colors:["#CD57A4","#B236A3","#FA6F7F","#FA7C3B","#E96B6B"],fill_colors:["#89208F","#C02690","#D93256","#DB3D0C","#B2180E"],grad1:"#7D1439",grad0:"#000",background_transition:g,line_stroke:function(a,b){return this.stroke_colors[b%5]},line_over_stroke:function(a,b){return d3.rgb(this.stroke_colors[b%5]).brighter()},line_opacity:function(a,b){return this.layout()==vizuly.viz.layout.STREAM?.4:.9},area_fill:function(b,c){return"url(#"+vizuly.svg.gradient.radialFade(a,this.fill_colors[c%5],[1,.35]).attr("id")+")"},area_fill_opacity:function(a,b){return this.layout()==vizuly.viz.layout.OVERLAP?.8:1},xAxis_font_weight:200,yAxis_line_stroke:"#D8F433",yAxis_line_opacity:.25,"class":"vz-skin-default"},Ocean:{name:"Ocean",labelColor:"#FFF",color:"#02C3FF",stroke_colors:["#001432","#001432","#001432","#001432","#001432"],grad1:"#390E1D",grad0:"#92203A",background_transition:function(b){a.selection().select(".vz-background").transition(1e3).style("fill-opacity",0)},line_stroke:function(a,b){return"#FFF"},line_over_stroke:function(a,b){return"#FFF"},line_opacity:function(a,b){return.3},area_fill:function(b,c){return"url(#"+vizuly.svg.gradient.radialFade(a,"#FFF",[1,.35]).attr("id")+")"},area_fill_opacity:function(a,b){return this.layout()==vizuly.viz.layout.OVERLAP?.2:.7},xAxis_font_weight:200,yAxis_line_stroke:"#FFF",yAxis_line_opacity:.25,"class":"vz-skin-ocean"},Neon:{name:"Neon",labelColor:"#FFF",color:"#02C3FF",stroke_colors:["#FFA000","#FF5722","#F57C00","#FF9800","#FFEB3B"],fill_colors:["#C50A0A","#C2185B","#F57C00","#FF9800","#FFEB3B"],grad0:"#000000",grad1:"#474747",background_transition:g,line_stroke:function(a,b){return"#FFF"},line_over_stroke:function(a,b){return"#FFF"},line_opacity:function(a,b){return this.layout()==vizuly.viz.layout.STREAM?.2:.4},area_fill:function(a,b){return"#D1F704"},area_fill_opacity:function(b,c){var d=d3.scale.linear().range([.1,.8]).domain([0,a.data().length])(c);return this.layout()==vizuly.viz.layout.OVERLAP?.8*d:d},xAxis_font_weight:200,yAxis_line_stroke:"#FFF",yAxis_line_opacity:.25,"class":"vz-skin-default"},Business:{name:"Business",labelColor:"#000",color:"#000",stroke_colors:["#FFA000","#FF5722","#F57C00","#FF9800","#FFEB3B"],fill_colors:["#C50A0A","#C2185B","#F57C00","#FF9800","#FFEB3B"],grad0:"#CCC",grad1:"#CCC",background_transition:g,line_stroke:function(a,b){return d3.rgb(k(b)).darker()},line_over_stroke:function(a,b){return"#FFF"},line_opacity:function(a,b){return.7},area_fill:function(a,b){return k(b)},area_fill_opacity:function(a,b){return this.layout()==vizuly.viz.layout.OVERLAP?.9:.95},xAxis_font_weight:200,yAxis_line_stroke:"#000",yAxis_line_opacity:.25,"class":"vz-skin-default"}};return b},vizuly.skin.HALO_FIRE="Fire",vizuly.skin.HALO_SUNSET="Sunset",vizuly.skin.HALO_NEON="Neon",vizuly.skin.HALO_OCEAN="Ocean",vizuly.theme.halo=function(a){function b(){r()}function c(){if(s&&a){var b=a.selection();b.attr("class",s["class"]),b.selectAll(".vz-background").attr("fill",function(){return"url(#"+t.attr("id")+")"}),b.selectAll(".vz-plot-background").style("opacity",0),b.selectAll(".vz-halo-link-path").style("fill",function(a,b){return s.link_fill(a,b)}).style("fill-opacity",s.link_fill_opacity).style("stroke",function(a,b){return s.link_stroke(a,b)}),b.selectAll(".vz-halo-link-node").style("fill",function(a,b){return s.link_fill(a,b)}).style("fill-opacity",s.link_node_fill_opacity),b.selectAll(".vz-halo-node").style("fill",function(a,b){return s.node_fill(a,b)}).style("stroke",function(a,b){return s.node_stroke(a,b)}).style("stroke-width",function(a,b){return u(a.r)}),b.selectAll(".vz-halo-arc-slice").style("fill",function(a,b){return s.arc_fill(a,b)}),b.selectAll(".vz-halo-arc").style("fill",function(a,b){return s.arc_fill(a,b)}),s.background_transition()}}function d(b,c,d){h(),n(d3.select(b)),i(a.selection().selectAll(".vz-halo-link-path.halo-key_"+c.data.key)),c.data.values.forEach(function(b){k(a.selection().selectAll(".vz-halo-node.node-key_"+a.nodeKey()(b)))})}function e(b,c,d){h(),i(d3.select(b.parentNode).selectAll(".vz-halo-link-path")),n(a.selection().selectAll(".vz-halo-arc.halo-key_"+a.haloKey()(c.data))),m(d3.select(b.parentNode).selectAll(".vz-halo-arc-slice")),j(a.selection().selectAll(".vz-halo-node.node-key_"+a.nodeKey()(c.data))),l(d3.select(b.parentNode).selectAll("circle"))}function f(b,c,d){h();var e=a.selection().selectAll(".vz-halo-link-path.node-key_"+c.key);e.each(function(b){var c=a.selection().selectAll(".vz-halo-arc.halo-key_"+a.haloKey()(b.data));n(c)}),i(e),m(a.selection().selectAll(".vz-halo-arc-slice.node-key_"+c.key)),l(a.selection().selectAll(".vz-halo-node.node-key_"+c.key))}function g(a,b,c){o()}function h(){a.selection().selectAll(".vz-halo-node").style("fill-opacity",.1).style("stroke-opacity",.05),a.selection().selectAll(".vz-halo-link-node").style("fill-opacity",0),a.selection().selectAll(".vz-halo-link-path").style("fill-opacity",.025)}function i(a){a.style("fill-opacity",.6).style("stroke-opacity",.25)}function j(a){a.style("stroke-opacity",.8).style("stroke",function(a,b){return s.node_over_stroke(a,b)})}function k(a){a.style("fill-opacity",.8).style("stroke-opacity",.5).style("stroke",function(a,b){return s.node_over_stroke(a,b)})}function l(a){a.style("fill-opacity",.5).style("stroke-opacity",.7).style("stroke",function(a,b){return s.node_over_stroke(a,b)})}function m(a){a.style("fill-opacity",.8).style("stroke-opacity",.8)}function n(a){a.style("fill-opacity",.65).style("stroke-opacity",.8).style("fill",function(a,b){return s.arc_over_fill(a,b)})}function o(){a.selection().selectAll(".vz-halo-arc").style("fill-opacity",null).style("stroke-opacity",null).style("fill",function(a,b){return s.arc_fill(a,b)}),a.selection().selectAll(".vz-halo-node").style("fill-opacity",null).style("stroke-opacity",null).style("stroke",function(a,b){return s.node_stroke(a,b)}),a.selection().selectAll(".vz-halo-link-node").style("fill-opacity",s.link_node_fill_opacity).style("stroke",null),a.selection().selectAll(".vz-halo-link-path").style("fill-opacity",s.link_fill_opacity).style("stroke-opacity",null),a.selection().selectAll(".vz-halo-arc-slice").style("fill-opacity",null).style("stroke-opacity",null)}function p(){var b=Math.min(a.width(),a.height()/2);u.domain([0,b/20]),u.range([0,b/80])}function q(){a.selection().selectAll(".vz-background").style("fill-opacity",1),t.selectAll("stop").transition().duration(500).attr("stop-color",function(a,b){return 0==b?s.grad0:s.grad1})}function r(){v.forEach(function(b){a.on(b.on,b.callback)})}var a=a,s=null,t=vizuly.svg.gradient.blend(a,"#000","#000"),u=d3.scale.linear(),v=[{on:"measure.theme",callback:p},{on:"update.theme",callback:c},{on:"nodeover.theme",callback:f},{on:"nodeout.theme",callback:g},{on:"arcover.theme",callback:d},{on:"arcout.theme",callback:g},{on:"linkover.theme",callback:e},{on:"linkout.theme",callback:g}];b(),b.apply=function(a){return arguments.length>0&&b.skin(a),c(),b},b.release=function(){a&&(a.selection().attr("class",null),v.forEach(function(b){a.on(b.on,null)}),a=null)},b.viz=function(b){return arguments.length?(a=b,void r()):a},b.skin=function(a){if(0==arguments.length)return s;if(!w[a])throw new Error("theme/linearea.js - skin "+a+" does not exist.");return s=w[a],b},b.skins=function(){return w};var w={Fire:{name:"Fire",labelColor:"#FFF",labelFill:"#C50A0A",stroke_colors:["#FFA000","#FF5722","#F57C00","#FF9800","#FFEB3B"],fill_colors:["#C50A0A","#C2185B","#F57C00","#FF9800","#FFEB3B"],grad0:"#000000",grad1:"#474747",background_transition:q,link_stroke:function(a,b){return this.stroke_colors[b%5]},link_fill:function(a,b){return this.fill_colors[b%5]},link_fill_opacity:.1,link_node_fill_opacity:.1,node_stroke:function(a,b){return this.stroke_colors[b%5]},node_over_stroke:function(a,b){return"#FFF"},node_fill:function(a,b){return this.fill_colors[b%5]},arc_stroke:function(a,b){return"#FFF"},arc_fill:function(a,b){return this.fill_colors[b%5]},arc_over_fill:function(a,b){return"#FFEB3B"},"class":"vz-skin-fire"},Sunset:{name:"Sunset",labelColor:"#FFF",labelFill:"#00236C",stroke_colors:["#CD57A4","#B236A3","#FA6F7F","#FA7C3B","#E96B6B"],fill_colors:["#89208F","#C02690","#D93256","#DB3D0C","#B2180E"],grad0:"#220910",grad1:"#571825",background_transition:q,link_stroke:function(a,b){return this.stroke_colors[b%5]},link_fill:function(a,b){return this.fill_colors[b%5]},link_fill_opacity:.2,link_node_fill_opacity:.5,node_stroke:function(a,b){return this.stroke_colors[b%5]},node_over_stroke:function(a,b){return"#FFF"},node_fill:function(a,b){return this.fill_colors[b%5]},arc_stroke:function(a,b){return"#FFF"},arc_fill:function(a,b){return this.fill_colors[b%5]},arc_over_fill:function(a,b){return"#00236C"},"class":"vz-skin-sunset"},Neon:{name:"Neon",labelColor:"#FFF",labelFill:"#005",grad0:"#000000",grad1:"#474747",background_transition:q,link_stroke:function(a,b){return"#D1F704"},link_fill:function(a,b){return"#D1F704"},link_fill_opacity:.1,link_node_fill_opacity:.1,node_stroke:function(a,b){return"#D1F704"},node_over_stroke:function(a,b){return"#FFF"},node_fill:function(a,b){return"#FFF"},arc_stroke:function(a,b){return"#FFF"},arc_fill:function(a,b){return"#D1F704"},arc_over_fill:function(a,b){return"#03F"},"class":"vz-skin-neon"},Ocean:{name:"Ocean",labelColor:"#FFF",labelFill:"#000",background_transition:function(b){a.selection().select(".vz-background").transition(1e3).style("fill-opacity",0)},link_stroke:function(a,b){return"#FFF"},link_fill:function(a,b){return"#FFF"},link_fill_opacity:.075,link_node_fill_opacity:.075,node_stroke:function(a,b){return"#FFF"},node_over_stroke:function(a,b){return"#FFF"},node_fill:function(a,b){return"#FFF"},arc_stroke:function(a,b){return"#FFF"},arc_fill:function(a,b){return"#FFF"},arc_over_fill:function(a,b){return"#000"},"class":"vz-skin-ocean"}};return b},vizuly.skin.LINEAREA_AXIIS="Axiis",vizuly.skin.LINEAREA_NEON="Neon",vizuly.skin.LINEAREA_FIRE="Fire",vizuly.skin.LINEAREA_OCEAN="Ocean",vizuly.skin.LINEAREA_SUNSET="Sunset",vizuly.skin.LINEAREA_BUSINESS="Business",vizuly.theme.linearea=function(a){function b(){h()}function c(){if(i&&null!=i){var b=a.width(),c=a.height(),d=a.selection();d.attr("class",i["class"]),d.selectAll(".vz-background").attr("fill",function(){return"url(#"+j.attr("id")+")"}),d.selectAll(".vz-plot-background").style("opacity",0),d.selectAll(".vz-area").style("fill",function(a,b){return i.area_fill(a,b)}).style("fill-opacity",function(b,c){return i.area_fill_opacity.apply(a,[b,c])}),d.selectAll(".vz-line").style("stroke-width",function(){return c/450}).style("stroke",function(a,b){return i.line_stroke(a,b)}).style("opacity",function(b,c){return i.line_opacity.apply(a,[b,c])}),d.selectAll(".vz-data-point").style("opacity",0),d.selectAll(".vz-bottom-axis").style("font-weight",i.xAxis_font_weight).style("fill",i.labelColor).style("font-weight",300).style("fill-opacity",.8).style("font-size",Math.max(8,Math.round(b/65))+"px").style("opacity",function(){return b>399?1:0}),d.selectAll(".vz-left-axis line").style("stroke",i.yAxis_line_stroke).style("stroke-width",1).style("opacity",i.yAxis_line_opacity),d.selectAll(".vz-left-axis text").style("font-size",Math.max(8,Math.round(b/65))+"px").style("fill",i.labelColor).style("fill-opacity",.8),i.background_transition()}}function d(b,c,d){a.selection().selectAll(".vz-line").transition().style("stroke",function(a,b){return i.line_over_stroke(a,b)}).style("opacity",function(a,b){return b==d?1:0}),a.selection().selectAll(".vz-area").transition().style("opacity",function(a,b){return b==d?1:.35}),a.selection().selectAll(".vz-point-tip").remove();var e=d3.select(this);e.append("circle").attr("class","vz-point-tip").attr("r",4).style("fill","#000").style("stroke","#FFF").style("stroke-width",2).style("pointer-events","none")}function e(b,c,d){a.selection().selectAll(".vz-line").transition().style("stroke",function(a,b){return i.line_stroke(a,b)}).style("opacity",function(b,c){return i.line_opacity.apply(a,[b,c])}),a.selection().selectAll(".vz-area").transition().style("opacity",1),a.selection().selectAll(".vz-point-tip").remove()}function f(){a.yAxis().tickSize(-vizuly.core.util.size(a.margin(),a.width(),a.height()).width).ticks(5).orient("left"),a.xAxis().tickSize(-vizuly.core.util.size(a.margin(),a.width(),a.height()).width); | |
| 3 | +}function g(){a.selection().selectAll(".vz-background").style("fill-opacity",1),j.selectAll("stop").transition().duration(500).attr("stop-color",function(a,b){return 0==b?i.grad0:i.grad1})}function h(){l.forEach(function(b){a.on(b.on,b.callback)})}var a=a,i=null,j=vizuly.svg.gradient.blend(a,"#000","#000"),k=d3.scale.category20(),l=[{on:"measure.theme",callback:f},{on:"update.theme",callback:c},{on:"mouseover.theme",callback:d},{on:"mouseout.theme",callback:e}];b(),b.apply=function(a){return arguments.length>0&&b.skin(a),c(),b},b.release=function(){a&&(a.selection().attr("class",null),l.forEach(function(b){a.on(b.on,null)}),a=null)},b.viz=function(b){return arguments.length?(a=b,void h()):a},b.skin=function(a){if(0==arguments.length)return i;if(!m[a])throw new Error("theme/linearea.js - skin "+a+" does not exist.");return i=m[a],b},b.skins=function(){return m};var m={Fire:{name:"Fire",labelColor:"#FFF",color:"#02C3FF",stroke_colors:["#FFA000","#FF5722","#F57C00","#FF9800","#FFEB3B"],fill_colors:["#C50A0A","#C2185B","#F57C00","#FF9800","#FFEB3B"],grad0:"#000000",grad1:"#474747",background_transition:g,line_stroke:function(a,b){return this.stroke_colors[b%5]},line_over_stroke:function(a,b){return d3.rgb(this.stroke_colors[b%5]).brighter()},line_opacity:function(a,b){return this.layout()==vizuly.viz.layout.STREAM?.6:.8},area_fill:function(b,c){return"url(#"+vizuly.svg.gradient.fade(a,this.fill_colors[c%5],"vertical",[.35,1]).attr("id")+")"},area_fill_opacity:function(a,b){return this.layout()==vizuly.viz.layout.OVERLAP?.7:.9},xAxis_font_weight:200,yAxis_line_stroke:"#FFF",yAxis_line_opacity:.25,data_point_stroke:function(a,b){return this.stroke_colors[b%5]},data_point_fill:function(a,b){return"#FFF"},"class":"vz-skin-default"},Sunset:{name:"Sunset",labelColor:"#D8F433",color:"#02C3FF",stroke_colors:["#CD57A4","#B236A3","#FA6F7F","#FA7C3B","#E96B6B"],fill_colors:["#89208F","#C02690","#D93256","#DB3D0C","#B2180E"],grad1:"#390E1D",grad0:"#92203A",background_transition:g,line_stroke:function(a,b){return this.stroke_colors[b%5]},line_over_stroke:function(a,b){return d3.rgb(this.stroke_colors[b%5]).brighter()},line_opacity:function(a,b){return this.layout()==vizuly.viz.layout.STREAM?.4:.9},area_fill:function(b,c){return"url(#"+vizuly.svg.gradient.fade(a,this.fill_colors[c%5],"vertical",[.5,1]).attr("id")+")"},area_fill_opacity:function(a,b){return this.layout()==vizuly.viz.layout.OVERLAP?.8:1},xAxis_font_weight:200,yAxis_line_stroke:"#D8F433",yAxis_line_opacity:.25,"class":"vz-skin-default"},Ocean:{name:"Ocean",labelColor:"#FFF",color:"#02C3FF",stroke_colors:["#001432","#001432","#001432","#001432","#001432"],grad1:"#390E1D",grad0:"#92203A",background_transition:function(b){a.selection().select(".vz-background").transition(1e3).style("fill-opacity",0)},line_stroke:function(a,b){return"#000"},line_over_stroke:function(a,b){return"#FFF"},line_opacity:function(a,b){return.3},area_fill:function(a,b){return"#FFF"},area_fill_opacity:function(b,c){return(c+1)/a.data().length*(this.layout()==vizuly.viz.layout.OVERLAP?.8:.85)},xAxis_font_weight:200,yAxis_line_stroke:"#FFF",yAxis_line_opacity:.25,"class":"vz-skin-ocean"},Neon:{name:"Neon",labelColor:"#FFF",color:"#02C3FF",stroke_colors:["#FFA000","#FF5722","#F57C00","#FF9800","#FFEB3B"],fill_colors:["#C50A0A","#C2185B","#F57C00","#FF9800","#FFEB3B"],grad0:"#000000",grad1:"#474747",background_transition:g,line_stroke:function(a,b){return"#FFF"},line_over_stroke:function(a,b){return"#FFF"},line_opacity:function(a,b){return this.layout()==vizuly.viz.layout.STREAM?.4:.6},area_fill:function(a,b){return"#D1F704"},area_fill_opacity:function(a,b){return(b+1)/this.data().length*(this.layout()==vizuly.viz.layout.OVERLAP?.6:.8)},xAxis_font_weight:200,yAxis_line_stroke:"#FFF",yAxis_line_opacity:.25,"class":"vz-skin-default"},Business:{name:"Business",labelColor:"#000",color:"#000",stroke_colors:["#FFA000","#FF5722","#F57C00","#FF9800","#FFEB3B"],fill_colors:["#C50A0A","#C2185B","#F57C00","#FF9800","#FFEB3B"],grad0:"#CCC",grad1:"#EEE",background_transition:g,line_stroke:function(a,b){return d3.rgb(k(b)).darker()},line_over_stroke:function(a,b){return"#FFF"},line_opacity:function(a,b){return.7},area_fill:function(a,b){return k(b)},area_fill_opacity:function(a,b){return this.layout()==vizuly.viz.layout.OVERLAP?.8:.9},xAxis_font_weight:200,yAxis_line_stroke:"#000",yAxis_line_opacity:.25,"class":"vz-skin-default"}};return b},vizuly.theme.radial_progress=function(a){function b(){f()}function c(){if(j){var b=a.selection();b.attr("class",j["class"]),b.selectAll(".vz-radial_progress-arc").style("fill",function(a,b){return j.arc_fill(a,b)}).style("fill-opacity",function(a,b){return j.arc_fill_opacity(a,b)}).style("stroke",function(a,b){return j.arc_stroke(a,b)}),b.selectAll(".vz-radial_progress-track").style("fill",j.track_fill),b.selectAll(".vz-radial_progress-label").style("fill",j.label_color).style("stroke-opacity",0).style("font-size",.25*a.radius())}}function d(b,c,d){a.selection().selectAll(".vz-radial_progress-label").style("font-weight",700)}function e(b,c,d){a.selection().selectAll(".vz-radial_progress-label").style("font-weight",null)}function f(){i.forEach(function(b){a.on(b.on,b.callback)})}function g(){i.forEach(function(b){a.on(b.on,null)})}var h={Alert:{name:"Alert",label_color:"#CCC",track_fill:"#DDDDDD",progress_colors:["#4CAF50","#FFC107","#FF9800","#E64A19","#FFEB3B"],arc_fill:function(a,b){return this.progress_colors[b%5]},arc_fill_opacity:function(a,b){return 1},arc_stroke:function(a,b){return this.progress_colors[b%5]},"class":"vz-skin-alert"},Fire:{name:"Fire",label_color:"#F13870",track_fill:"#DDDDDD",progress_colors:["#C50A0A","#F57C00","#FF9800","#FFEB3B","#C2185B"],arc_fill:function(a,b){return this.progress_colors[b%5]},arc_fill_opacity:function(a,b){return 1},arc_stroke:function(a,b){return this.progress_colors[b%5]},"class":"vz-skin-fire"},White:{name:"White",label_color:"#FFF",track_fill:null,arc_fill:function(a,b){return"#FFF"},arc_fill_opacity:function(a,b){return.85/Math.exp(.75*b)},arc_stroke:function(a,b){return"#FFF"},"class":"vz-skin-white"},Neon:{name:"Neon",label_color:"#D1F704",track_fill:"#000",progress_colors:["#D1F704","#A8C102","#788A04","#566204","#383F04"],arc_fill:function(a,b){return this.progress_colors[b%5]},arc_fill_opacity:function(a,b){return 1},arc_stroke:function(a,b){return this.progress_colors[b%5]},"class":"vz-skin-neon"},Business:{name:"Business",label_color:"#EEE",track_fill:"#DDDDDD",progress_colors:d3.scale.category20(),arc_fill:function(a,b){return this.progress_colors(b)},arc_fill_opacity:function(a,b){return 1},arc_stroke:function(a,b){return this.progress_colors(b)},"class":"vz-skin-business"}},a=a,i=[{on:"update.theme",callback:c},{on:"mouseover.theme",callback:d},{on:"mouseout.theme",callback:e}];b(),b.apply=function(a){return arguments.length>0&&b.skin(a),c(),b},b.release=function(){a&&(a.selection().attr("class",null),g(),a=null)},b.viz=function(b){return arguments.length?(a&&g(),a=b,void f()):a},b.skin=function(a){if(0==arguments.length)return j;if(!h[a])throw new Error("theme/linearea.js - skin "+a+" does not exist.");return j=h[a],b},b.skins=function(){return h};var j=h[vizuly.skin.RADIAL_PROGRESS_BUSINESS];return b},vizuly.skin.RADIAL_PROGRESS_FIRE="Fire",vizuly.skin.RADIAL_PROGRESS_MATERIAL="Material",vizuly.skin.RADIAL_PROGRESS_NEON="Neon",vizuly.skin.RADIAL_PROGRESS_OCEAN="Ocean",vizuly.skin.RADIAL_PROGRESS_ALERT="Alert",vizuly.skin.RADIAL_PROGRESS_BUSINESS="Business",vizuly.theme.range_input=function(a){function b(){f()}function c(){if(j){var b=a.selection();b.attr("class",j["class"]),b.selectAll(".vz-range_input-handle").style("cursor","pointer"),b.selectAll(".vz-range_input-centerpane").style("cursor","pointer"),b.selectAll(".vz-range_input-track").style("opacity",0)}}function d(a,b,c){}function e(a,b,c){}function f(){i.forEach(function(b){a.on(b.on,b.callback)})}function g(){i.forEach(function(b){a.on(b.on,null)})}var h={Default:{name:"Default",label_color:"#CCC"}},a=a,i=[{on:"update.theme",callback:c},{on:"mouseover.theme",callback:d},{on:"mouseout.theme",callback:e}];b(),b.apply=function(a){return arguments.length>0&&b.skin(a),c(),b},b.release=function(){a&&(a.selection().attr("class",null),g(),a=null)},b.viz=function(b){return arguments.length?(a&&g(),a=b,void f()):a},b.skin=function(a){if(0==arguments.length)return j;if(!h[a])throw new Error("theme/linearea.js - skin "+a+" does not exist.");return j=h[a],b},b.skins=function(){return h};var j=h.Default;return b},vizuly.skin.SCATTER_NEON="Neon",vizuly.skin.SCATTER_FIRE="Fire",vizuly.skin.SCATTER_OCEAN="Ocean",vizuly.skin.SCATTER_SUNSET="Sunset",vizuly.skin.SCATTER_BUSINESS="Business",vizuly.theme.scatter=function(a){function b(){h()}function c(){if(i){var b=a.width(),c=Math.min(a.width(),a.height())/80,d=a.selection();d.attr("class",i["class"]),d.selectAll(".vz-background").attr("fill",function(){return"url(#"+j.attr("id")+")"}),d.selectAll(".vz-plot-background").style("opacity",0),d.selectAll(".vz-scatter-bottom-axis").style("font-weight",i.xAxis_font_weight).style("fill",i.labelColor).style("font-size",Math.max(8,Math.round(b/85))+"px").style("opacity",function(){return b>399?1:0}),d.selectAll(".vz-scatter-left-axis line").style("stroke",i.yAxis_line_stroke).style("stroke-width",1).style("opacity",i.yAxis_line_opacity),d.selectAll(".vz-scatter-left-axis text").style("font-size",Math.max(8,Math.round(b/85))+"px").style("fill",i.labelColor).style("fill-opacity",.6),d.selectAll(".vz-scatter-node").style("stroke-width",c).style("stroke-opacity",0).style("stroke",function(a,b){return i.node_stroke(a,b)}).style("fill",function(a,b){return i.node_fill(a,b)}).style("fill-opacity",function(a,b){return i.node_fill_opacity(a,b)}),i.background_transition()}}function d(){a.yAxis().tickSize(-vizuly.core.util.size(a.margin(),a.width(),a.height()).width).orient("left"),a.xAxis().tickSize(-vizuly.core.util.size(a.margin(),a.width(),a.height()).width)}function e(b,c,d){a.selection().selectAll(".vz-scatter-node").style("opacity",.15),d3.select(b).style("opacity",1).style("stroke-opacity",.5).style("fill-opacity",.9),l.mouseover(b,c,d)}function f(b,c,d){d3.select(b).style("opacity",1).style("fill-opacity",function(a,b){return i.node_fill_opacity(a,b)}),a.selection().selectAll(".vz-scatter-node").style("stroke-opacity",0).style("opacity",1)}function g(){a.selection().selectAll(".vz-background").style("fill-opacity",1),j.selectAll("stop").transition().duration(500).attr("stop-color",function(a,b){return 0==b?i.grad0:i.grad1})}function h(){k.forEach(function(b){a.on(b.on,b.callback)})}var a=a,i=null,j=vizuly.svg.gradient.blend(a,"#000","#000"),k=[{on:"measure.theme",callback:d},{on:"update.theme",callback:c},{on:"mouseover.theme",callback:e},{on:"mouseout.theme",callback:f}];b(),b.apply=function(a){return arguments.length>0&&b.skin(a),c(),b},b.release=function(){a&&(a.selection().attr("class",null),k.forEach(function(b){a.on(b.on,null)}),a=null)},b.viz=function(b){return arguments.length?(a=b,void h()):a},b.skin=function(a){if(0==arguments.length)return i;if(!m[a])throw new Error("theme/linearea.js - skin "+a+" does not exist.");return i=m[a],b},b.skins=function(){return m};var l=d3.dispatch("mouseover","mouseout");b.on=function(a,c){return l.on(a,c),b};var m={Fire:{name:"Fire",labelColor:"#FFF",labelFill:"#C50A0A",stroke_colors:["#C50A0A","#C2185B","#F57C00","#FF9800","#FFEB3B"],fill_colors:["#C50A0A","#C2185B","#F57C00","#FF9800","#FFEB3B"],grad0:"#000000",grad1:"#474747",background_transition:g,yAxis_line_stroke:"#FFF",yAxis_line_opacity:.25,node_stroke:function(a,b){return this.stroke_colors[b%5]},node_fill:function(a,b){return this.fill_colors[b%5]},node_fill_opacity:function(a,b){return.5},"class":"vz-skin-fire"},Sunset:{name:"Sunset",labelColor:"#FFF",labelFill:"#00236C",stroke_colors:["#CD57A4","#B236A3","#FA6F7F","#FA7C3B","#E96B6B"],fill_colors:["#89208F","#C02690","#D93256","#DB3D0C","#B2180E"],grad1:"#390E1D",grad0:"#7C1B31",background_transition:g,yAxis_line_stroke:"#FFF",yAxis_line_opacity:.25,node_stroke:function(a,b){return this.stroke_colors[b%5]},node_fill:function(a,b){return this.fill_colors[b%5]},node_fill_opacity:function(a,b){return.7},"class":"vz-skin-sunset"},Neon:{name:"Neon",labelColor:"#FFF",labelFill:"#005",grad0:"#000000",grad1:"#474747",background_transition:g,yAxis_line_stroke:"#FFF",yAxis_line_opacity:.25,node_stroke:function(a,b){return"#FFF"},node_fill:function(a,b){return"#D1F704"},node_fill_opacity:function(a,b){return.6},"class":"vz-skin-neon"},Ocean:{name:"Ocean",labelColor:"#FFF",labelFill:"#000",background_transition:function(b){a.selection().select(".vz-background").transition(1e3).style("fill-opacity",0)},yAxis_line_stroke:"#FFF",yAxis_line_opacity:.25,node_stroke:function(a,b){return"#00F"},node_fill:function(a,b){return"#FFF"},node_fill_opacity:function(a,b){return.4},"class":"vz-skin-ocean"}};return b},vizuly.theme.weighted_tree=function(a){function b(){h()}function c(){if(o){var b=a.selection();j=Math.max(8,Math.round(a.width()/75)),b.selectAll(".vz-weighted_tree-node circle").style("stroke",function(a){return o.node_stroke(a)}).style("stroke-opacity",function(a){return o.node_stroke_opacity(a)}).style("fill",function(a){return o.node_fill(a)}).style("fill-opacity",function(a){return o.node_fill_opacity(a)}),b.selectAll(".vz-weighted_tree-node text").style("font-size",o.font_size()).style("fill",o.label_color).style("fill-opacity",function(a){return o.text_fill_opacity(a)}),b.selectAll(".vz-weighted_tree-link").style("stroke",function(a){return o.link_stroke(a)}).style("stroke-opacity",function(a){return o.link_stroke_opacity(a)})}}function d(){if(o&&a.data()){var b=a.data();a.children()(b).forEach(function(a,b){a.vz_link_color=o.link_colors[b%o.link_colors.length],e(a)}),l=!1,m=!1}}function e(b){a.children()(b)&&a.children()(b).forEach(function(a){a.vz_link_color=b.vz_link_color,e(a)})}function f(b,c,d){var e=a.selection();e.selectAll(".vz-id-"+c.vz_tree_id+" circle").style("fill-opacity",.9),e.selectAll("path.vz-id-"+c.vz_tree_id).style("stroke-opacity",.8),e.selectAll(".vz-id-"+c.vz_tree_id+" text").transition().style("font-size",1.25*j).style("font-weight","bold")}function g(b,c,d){var e=a.selection();e.selectAll(".vz-weighted_tree-node circle").style("fill",function(a){return o.node_fill(a)}).style("fill-opacity",function(a){return o.node_fill_opacity(a)}),e.selectAll(".vz-weighted_tree-node text").transition().style("font-size",j).style("font-weight","normal"),e.selectAll(".vz-weighted_tree-link").style("stroke-opacity",function(a){return o.link_stroke_opacity(a)})}function h(){n.forEach(function(b){a.on(b.on,b.callback)})}function i(){n.forEach(function(b){a.on(b.on,null)})}var j,k={Axiis:{name:"Axiis",label_color:"#333",link_colors:["#bd0026","#fecc5c","#fd8d3c","#f03b20","#B02D5D","#9B2C67","#982B9A","#692DA7","#5725AA","#4823AF","#d7b5d8","#dd1c77","#5A0C7A","#5A0C7A"],link_stroke:function(a,b){return a.target.vz_link_color},link_stroke_opacity:function(b,c){return a.value()(b.target)<=0?.15:.35},node_fill:function(a,b){return a.vz_link_color},node_fill_opacity:function(b,c){return a.value()(b)<=0?.15:.4},node_stroke:function(a,b){return a.vz_link_color},node_stroke_opacity:function(a,b){return.6},text_fill_opacity:function(b,c){return a.value()(b)<=0?.35:1},font_size:function(){return j+"px"}},None:{name:"None",label_color:null,link_colors:["#bd0026","#fecc5c","#fd8d3c","#f03b20","#B02D5D","#9B2C67","#982B9A","#692DA7","#5725AA","#4823AF","#d7b5d8","#dd1c77","#5A0C7A","#5A0C7A"],link_stroke:function(a,b){return null},link_stroke_opacity:function(a,b){return null},node_fill:function(a,b){return null},node_fill_opacity:function(a,b){return null},node_stroke:function(a,b){return null},node_stroke_opacity:function(a,b){return null},text_fill_opacity:function(a,b){return null},font_size:function(){return null}}},a=a,l=!0,m=!0,n=[{on:"update.theme",callback:c},{on:"data_prepped.theme",callback:d},{on:"mouseover.theme",callback:f},{on:"mouseout.theme",callback:g}];b(),b.apply=function(a){return arguments.length>0&&b.skin(a),c(),b},b.release=function(){a&&(o=k.None,c(),i(),a=null)},b.viz=function(b){return arguments.length?(a&&i(),a=b,void h()):a},b.skin=function(a){if(0==arguments.length)return o;if(!k[a])throw new Error("theme/weightedtree.js - skin "+a+" does not exist.");return l=!0,o=k[a],b},b.skins=function(){return k};var o=k[vizuly.skin.WEIGHTED_TREE_AXIIS];return b},vizuly.skin.WEIGHTED_TREE_AXIIS="Axiis",vizuly.ui.range_input=function(a){function b(){l=h.selection.append("svg").attr("id",h.id).style("overflow","visible").attr("class","vizuly"),m=vizuly.core.util.getDefs(j),n=l.append("rect").attr("class","vz-background"),o=l.append("g").attr("class","vz-range_input"),p=o.append("g").attr("class","vz-plot"),v=p.append("rect").attr("class","vz-range_input-track"),s=p.append("rect").attr("class","vz-range_input-sidepane"),t=p.append("rect").attr("class","vz-range_input-centerpane"),u=p.append("rect").attr("class","vz-range_input-sidepane"),q=p.append("rect").attr("class","vz-range_input-handle"),r=p.append("rect").attr("class","vz-range_input-handle"),q.call(z),r.call(A),t.call(B),h.dispatch.initialize()}function c(){j.validate(),k=vizuly.core.util.size(h.margin,h.width,h.height),y.range([0,k.width]),y.domain(h.domain),w=Math.round(k.height*h.trackHeight),x=h.handleWidth,h.dispatch.measure()}function d(){c(),l.attr("width",h.width).attr("height",h.height),n.attr("width",h.width).attr("height",h.height),p.style("width",k.width).style("height",k.height).attr("transform","translate("+k.left+","+k.top+")"),v.attr("width",k.width).attr("height",w).attr("y",(k.height-w)/2),q.attr("width",x).attr("height",k.height).attr("x",y(h.data[0])),r.attr("width",x).attr("height",k.height).attr("x",y(h.data[1])),s.attr("width",y(h.data[0])).attr("height",k.height),u.attr("width",k.width-y(h.data[1])).attr("height",k.height).attr("x",y(h.data[1])),t.attr("width",y(h.data[1])-y(h.data[0])).attr("height",k.height).attr("x",y(h.data[0])),h.dispatch.update()}function e(){var a=y.invert(d3.event.x);a=Math.min(h.data[1]-y.invert(x),Math.max(a,h.domain[0])),h.data[0]=a,h.dispatch.change(j),d()}function f(){var a=y.invert(d3.event.x);a=Math.max(h.data[0]+y.invert(x),Math.min(a,h.domain[1])),h.data[1]=a,h.dispatch.change(j),d()}function g(){var a=y.invert(d3.event.dx)+h.data[0];a=Math.min(h.data[1],Math.max(a,h.domain[0]));var b=h.data[1]-h.data[0];a=Math.min(h.domain[1]-b,a),h.data[0]=a,h.data[1]=a+b,h.dispatch.change(j),d()}var h={},i={data:[.25,.75],margin:{top:"10%",bottom:"7%",left:"8%",right:"7%"},domain:[0,1],duration:500,width:300,height:300,handleWidth:3,trackHeight:.1},j=vizuly.core.component(a,h,i,["change","handleOver","handleOut"]);j.type="viz.ui.range_input";var k,l,m,n,o,p,q,r,s,t,u,v,w,x,y=d3.scale.linear(),z=d3.behavior.drag(),A=d3.behavior.drag(),B=d3.behavior.drag();return z.on("drag",e),A.on("drag",f),B.on("drag",g),b(),j.update=function(){return d(),j},j}; | |
| 0 | 4 | \ No newline at end of file | ... | ... |
src/main/resources/static/assets/plugins/d3/radialprogress/vizuly_radialprogress.min.js
0 → 100644
| 1 | +/*! vizuly 05-06-2017 */ | |
| 2 | +vizuly.viz.radial_progress=function(a){function b(){k=f.selection.append("svg").attr("id",f.id).style("overflow","visible").attr("class","vizuly"),r=vizuly.core.util.getDefs(h),m=k.append("rect").attr("class","vz-background"),l=k.append("g").attr("class","vz-radial_progress-viz"),n=l.append("g").attr("class","vz-radial_progress-plot"),o=n.append("rect").attr("class","vz-plot-background"),p=n.append("g").attr("class","vz-radial_progress-arc-plot"),q=n.append("g").attr("class","vz-radial_progress-label-plot"),n.on("mouseover",function(){f.dispatch.mouseover(this)}).on("mouseout",function(){f.dispatch.mouseout(this)}).on("click",function(){f.dispatch.click(this)}),f.dispatch.initialize()}function c(){h.validate(),i=vizuly.core.util.size(f.margin,f.width,f.height),j=f.startAngle==f.endAngle?360:f.startAngle>f.endAngle?360-(f.startAngle-f.endAngle):j=f.endAngle-f.startAngle;var a=f.startAngle*s,b=Math.floor(f.data/(f.max-f.min))+1,c=Math.min(f.radius*f.arcThickness,.75*f.radius/b);t=[];for(var d=0;b>d;d++){var e={},g=d3.svg.arc();g.outerRadius(f.radius-c*d),g.innerRadius(f.radius-c*(d+1)),g.cornerRadius(c*f.capRadius/2),e.arc=g,e.startAngle=a,console.log("start angle = "+e.startAngle);var k=f.data/(f.max-f.min)-d;e.endAngle=k>1?j*s+a:k*j*s+a,t.push(e)}u.outerRadius(f.radius).cornerRadius(c*f.capRadius/2).innerRadius(f.radius-c*t.length).startAngle(f.startAngle*s).endAngle((f.startAngle+j)*s),f.dispatch.measure()}function d(){c(),k.attr("width",f.width).attr("height",f.height),m.attr("width",f.width).attr("height",f.height),n.style("width",i.width).style("height",i.height).attr("transform","translate("+i.left+","+i.top+")"),p.attr("transform","translate("+i.width/2+","+i.height/2+")");var a=n.selectAll(".vz-radial_progress-back-circle");0==a[0].length&&(a=p.append("circle").attr("class","vz-radial_progress-back-circle")),a.attr("r",f.radius);var b=n.selectAll(".vz-radial_progress-track");0==b[0].length&&(b=p.append("path").attr("class","vz-radial_progress-track")),b.attr("d",u);var d=q.selectAll(".vz-radial_progress-label").data([f.data]);d.enter().append("text").attr("class","vz-radial_progress-label").style("text-anchor","middle"),d.exit().remove(),d.attr("x",i.width/2).attr("y",i.height/2).text(function(a,b){return f.label(a,b)});var g=p.selectAll(".vz-radial_progress-arc").data(t);g.enter().append("path").attr("class","vz-radial_progress-arc"),g.exit().remove(),g.transition().duration(f.duration).call(e),f.dispatch.update()}function e(a){a.attrTween("d",function(a){var b=d3.interpolate(a.startAngle,a.endAngle);return function(c){return a.endAngle=b(c),f.dispatch.tween(h,c),a.arc(a)}})}var f={},g={data:null,margin:{top:"10%",bottom:"7%",left:"8%",right:"7%"},duration:500,width:300,height:300,radius:150,min:0,max:1,label:function(a,b){return a},capRadius:0,startAngle:180,endAngle:180,arcThickness:.05},h=vizuly.core.component(a,f,g,["tween"]);h.type="viz.chart.radial_progress";var i,j,k,l,m,n,o,p,q,r,s=Math.PI/180,t=[],u=d3.svg.arc();return b(),h.update=function(){return d(),h},h}; | |
| 0 | 3 | \ No newline at end of file | ... | ... |
src/main/resources/static/assets/plugins/echarts.min.js
0 → 100644
| 1 | +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.echarts={})}(this,function(t){"use strict";function e(t){var e={},n={},i=t.match(/Firefox\/([\d.]+)/),r=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),a=t.match(/Edge\/([\d.]+)/),o=/micromessenger/i.test(t);return i&&(n.firefox=!0,n.version=i[1]),r&&(n.ie=!0,n.version=r[1]),a&&(n.edge=!0,n.version=a[1]),o&&(n.weChat=!0),{browser:n,os:e,node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:"undefined"!=typeof SVGRect,touchEventsSupported:"ontouchstart"in window&&!n.ie&&!n.edge,pointerEventsSupported:"onpointerdown"in window&&(n.edge||n.ie&&n.version>=11)}}function n(t,e){"createCanvas"===t&&(ld=null),od[t]=e}function i(t){if(null==t||"object"!=typeof t)return t;var e=t,n=Jc.call(t);if("[object Array]"===n){if(!z(t)){e=[];for(var r=0,a=t.length;a>r;r++)e[r]=i(t[r])}}else if(Qc[n]){if(!z(t)){var o=t.constructor;if(t.constructor.from)e=o.from(t);else{e=new o(t.length);for(var r=0,a=t.length;a>r;r++)e[r]=i(t[r])}}}else if(!Kc[n]&&!z(t)&&!T(t)){e={};for(var s in t)t.hasOwnProperty(s)&&(e[s]=i(t[s]))}return e}function r(t,e,n){if(!S(e)||!S(t))return n?i(e):t;for(var a in e)if(e.hasOwnProperty(a)){var o=t[a],s=e[a];!S(s)||!S(o)||_(s)||_(o)||T(s)||T(o)||M(s)||M(o)||z(s)||z(o)?!n&&a in t||(t[a]=i(e[a],!0)):r(o,s,n)}return t}function a(t,e){for(var n=t[0],i=1,a=t.length;a>i;i++)n=r(n,t[i],e);return n}function o(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function s(t,e,n){for(var i in e)e.hasOwnProperty(i)&&(n?null!=e[i]:null==t[i])&&(t[i]=e[i]);return t}function l(){return ld||(ld=sd().getContext("2d")),ld}function h(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var n=0,i=t.length;i>n;n++)if(t[n]===e)return n}return-1}function u(t,e){function n(){}var i=t.prototype;n.prototype=e.prototype,t.prototype=new n;for(var r in i)t.prototype[r]=i[r];t.prototype.constructor=t,t.superClass=e}function c(t,e,n){t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,s(t,e,n)}function d(t){return t?"string"==typeof t?!1:"number"==typeof t.length:void 0}function f(t,e,n){if(t&&e)if(t.forEach&&t.forEach===ed)t.forEach(e,n);else if(t.length===+t.length)for(var i=0,r=t.length;r>i;i++)e.call(n,t[i],i,t);else for(var a in t)t.hasOwnProperty(a)&&e.call(n,t[a],a,t)}function p(t,e,n){if(t&&e){if(t.map&&t.map===rd)return t.map(e,n);for(var i=[],r=0,a=t.length;a>r;r++)i.push(e.call(n,t[r],r,t));return i}}function g(t,e,n,i){if(t&&e){if(t.reduce&&t.reduce===ad)return t.reduce(e,n,i);for(var r=0,a=t.length;a>r;r++)n=e.call(i,n,t[r],r,t);return n}}function v(t,e,n){if(t&&e){if(t.filter&&t.filter===nd)return t.filter(e,n);for(var i=[],r=0,a=t.length;a>r;r++)e.call(n,t[r],r,t)&&i.push(t[r]);return i}}function m(t,e,n){if(t&&e)for(var i=0,r=t.length;r>i;i++)if(e.call(n,t[i],i,t))return t[i]}function y(t,e){var n=id.call(arguments,2);return function(){return t.apply(e,n.concat(id.call(arguments)))}}function x(t){var e=id.call(arguments,1);return function(){return t.apply(this,e.concat(id.call(arguments)))}}function _(t){return"[object Array]"===Jc.call(t)}function w(t){return"function"==typeof t}function b(t){return"[object String]"===Jc.call(t)}function S(t){var e=typeof t;return"function"===e||!!t&&"object"==e}function M(t){return!!Kc[Jc.call(t)]}function I(t){return!!Qc[Jc.call(t)]}function T(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}function C(t){return t!==t}function D(){for(var t=0,e=arguments.length;e>t;t++)if(null!=arguments[t])return arguments[t]}function k(t,e){return null!=t?t:e}function A(t,e,n){return null!=t?t:null!=e?e:n}function P(){return Function.call.apply(id,arguments)}function L(t){if("number"==typeof t)return[t,t,t,t];var e=t.length;return 2===e?[t[0],t[1],t[0],t[1]]:3===e?[t[0],t[1],t[2],t[1]]:t}function O(t,e){if(!t)throw new Error(e)}function B(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}function E(t){t[hd]=!0}function z(t){return t[hd]}function R(t){function e(t,e){n?i.set(t,e):i.set(e,t)}var n=_(t),i=this;t instanceof R?t.each(e):t&&f(t,e)}function N(t){return new R(t)}function F(t,e){for(var n=new t.constructor(t.length+e.length),i=0;i<t.length;i++)n[i]=t[i];var r=t.length;for(i=0;i<e.length;i++)n[i+r]=e[i];return n}function H(){}function G(t,e){var n=new cd(2);return null==t&&(t=0),null==e&&(e=0),n[0]=t,n[1]=e,n}function W(t,e){return t[0]=e[0],t[1]=e[1],t}function V(t){var e=new cd(2);return e[0]=t[0],e[1]=t[1],e}function X(t,e,n){return t[0]=e,t[1]=n,t}function j(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function Y(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t}function U(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function q(t){return Math.sqrt(Z(t))}function Z(t){return t[0]*t[0]+t[1]*t[1]}function $(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function K(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function Q(t,e){return t[0]*e[0]+t[1]*e[1]}function J(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function te(t,e){var n=q(e);return 0===n?(t[0]=0,t[1]=0):(t[0]=e[0]/n,t[1]=e[1]/n),t}function ee(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function ne(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}function ie(t,e){return t[0]=-e[0],t[1]=-e[1],t}function re(t,e,n,i){return t[0]=e[0]+i*(n[0]-e[0]),t[1]=e[1]+i*(n[1]-e[1]),t}function ae(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r+n[4],t[1]=n[1]*i+n[3]*r+n[5],t}function oe(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function se(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}function le(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this),this.on("globalout",this._dragEnd,this)}function he(t,e){return{target:t,topTarget:e&&e.topTarget}}function ue(t,e,n){return{type:t,event:n,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which}}function ce(){}function de(t,e,n){if(t[t.rectHover?"rectContain":"contain"](e,n)){for(var i,r=t;r;){if(r.clipPath&&!r.clipPath.contain(e,n))return!1;r.silent&&(i=!0),r=r.parent}return i?xd:!0}return!1}function fe(){var t=new bd(6);return pe(t),t}function pe(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function ge(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}function ve(t,e,n){var i=e[0]*n[0]+e[2]*n[1],r=e[1]*n[0]+e[3]*n[1],a=e[0]*n[2]+e[2]*n[3],o=e[1]*n[2]+e[3]*n[3],s=e[0]*n[4]+e[2]*n[5]+e[4],l=e[1]*n[4]+e[3]*n[5]+e[5];return t[0]=i,t[1]=r,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t}function me(t,e,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+n[0],t[5]=e[5]+n[1],t}function ye(t,e,n){var i=e[0],r=e[2],a=e[4],o=e[1],s=e[3],l=e[5],h=Math.sin(n),u=Math.cos(n);return t[0]=i*u+o*h,t[1]=-i*h+o*u,t[2]=r*u+s*h,t[3]=-r*h+u*s,t[4]=u*a+h*l,t[5]=u*l-h*a,t}function xe(t,e,n){var i=n[0],r=n[1];return t[0]=e[0]*i,t[1]=e[1]*r,t[2]=e[2]*i,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*r,t}function _e(t,e){var n=e[0],i=e[2],r=e[4],a=e[1],o=e[3],s=e[5],l=n*o-a*i;return l?(l=1/l,t[0]=o*l,t[1]=-a*l,t[2]=-i*l,t[3]=n*l,t[4]=(i*s-o*r)*l,t[5]=(a*r-n*s)*l,t):null}function we(t){var e=fe();return ge(e,t),e}function be(t){return t>Id||-Id>t}function Se(t){this._target=t.target,this._life=t.life||1e3,this._delay=t.delay||0,this._initialized=!1,this.loop=null==t.loop?!1:t.loop,this.gap=t.gap||0,this.easing=t.easing||"Linear",this.onframe=t.onframe,this.ondestroy=t.ondestroy,this.onrestart=t.onrestart,this._pausedTime=0,this._paused=!1}function Me(t){return t=Math.round(t),0>t?0:t>255?255:t}function Ie(t){return t=Math.round(t),0>t?0:t>360?360:t}function Te(t){return 0>t?0:t>1?1:t}function Ce(t){return Me(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100*255:parseInt(t,10))}function De(t){return Te(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100:parseFloat(t))}function ke(t,e,n){return 0>n?n+=1:n>1&&(n-=1),1>6*n?t+(e-t)*n*6:1>2*n?e:2>3*n?t+(e-t)*(2/3-n)*6:t}function Ae(t,e,n){return t+(e-t)*n}function Pe(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function Le(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function Oe(t,e){Rd&&Le(Rd,e),Rd=zd.put(t,Rd||e.slice())}function Be(t,e){if(t){e=e||[];var n=zd.get(t);if(n)return Le(e,n);t+="";var i=t.replace(/ /g,"").toLowerCase();if(i in Ed)return Le(e,Ed[i]),Oe(t,e),e;if("#"!==i.charAt(0)){var r=i.indexOf("("),a=i.indexOf(")");if(-1!==r&&a+1===i.length){var o=i.substr(0,r),s=i.substr(r+1,a-(r+1)).split(","),l=1;switch(o){case"rgba":if(4!==s.length)return void Pe(e,0,0,0,1);l=De(s.pop());case"rgb":return 3!==s.length?void Pe(e,0,0,0,1):(Pe(e,Ce(s[0]),Ce(s[1]),Ce(s[2]),l),Oe(t,e),e);case"hsla":return 4!==s.length?void Pe(e,0,0,0,1):(s[3]=De(s[3]),Ee(s,e),Oe(t,e),e);case"hsl":return 3!==s.length?void Pe(e,0,0,0,1):(Ee(s,e),Oe(t,e),e);default:return}}Pe(e,0,0,0,1)}else{if(4===i.length){var h=parseInt(i.substr(1),16);return h>=0&&4095>=h?(Pe(e,(3840&h)>>4|(3840&h)>>8,240&h|(240&h)>>4,15&h|(15&h)<<4,1),Oe(t,e),e):void Pe(e,0,0,0,1)}if(7===i.length){var h=parseInt(i.substr(1),16);return h>=0&&16777215>=h?(Pe(e,(16711680&h)>>16,(65280&h)>>8,255&h,1),Oe(t,e),e):void Pe(e,0,0,0,1)}}}}function Ee(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=De(t[1]),r=De(t[2]),a=.5>=r?r*(i+1):r+i-r*i,o=2*r-a;return e=e||[],Pe(e,Me(255*ke(o,a,n+1/3)),Me(255*ke(o,a,n)),Me(255*ke(o,a,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function ze(t){if(t){var e,n,i=t[0]/255,r=t[1]/255,a=t[2]/255,o=Math.min(i,r,a),s=Math.max(i,r,a),l=s-o,h=(s+o)/2;if(0===l)e=0,n=0;else{n=.5>h?l/(s+o):l/(2-s-o);var u=((s-i)/6+l/2)/l,c=((s-r)/6+l/2)/l,d=((s-a)/6+l/2)/l;i===s?e=d-c:r===s?e=1/3+u-d:a===s&&(e=2/3+c-u),0>e&&(e+=1),e>1&&(e-=1)}var f=[360*e,n,h];return null!=t[3]&&f.push(t[3]),f}}function Re(t,e){var n=Be(t);if(n){for(var i=0;3>i;i++)n[i]=0>e?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0,n[i]>255?n[i]=255:t[i]<0&&(n[i]=0);return Ve(n,4===n.length?"rgba":"rgb")}}function Ne(t){var e=Be(t);return e?((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1):void 0}function Fe(t,e,n){if(e&&e.length&&t>=0&&1>=t){n=n||[];var i=t*(e.length-1),r=Math.floor(i),a=Math.ceil(i),o=e[r],s=e[a],l=i-r;return n[0]=Me(Ae(o[0],s[0],l)),n[1]=Me(Ae(o[1],s[1],l)),n[2]=Me(Ae(o[2],s[2],l)),n[3]=Te(Ae(o[3],s[3],l)),n}}function He(t,e,n){if(e&&e.length&&t>=0&&1>=t){var i=t*(e.length-1),r=Math.floor(i),a=Math.ceil(i),o=Be(e[r]),s=Be(e[a]),l=i-r,h=Ve([Me(Ae(o[0],s[0],l)),Me(Ae(o[1],s[1],l)),Me(Ae(o[2],s[2],l)),Te(Ae(o[3],s[3],l))],"rgba");return n?{color:h,leftIndex:r,rightIndex:a,value:i}:h}}function Ge(t,e,n,i){return t=Be(t),t?(t=ze(t),null!=e&&(t[0]=Ie(e)),null!=n&&(t[1]=De(n)),null!=i&&(t[2]=De(i)),Ve(Ee(t),"rgba")):void 0}function We(t,e){return t=Be(t),t&&null!=e?(t[3]=Te(e),Ve(t,"rgba")):void 0}function Ve(t,e){if(t&&t.length){var n=t[0]+","+t[1]+","+t[2];return("rgba"===e||"hsva"===e||"hsla"===e)&&(n+=","+t[3]),e+"("+n+")"}}function Xe(t,e){return t[e]}function je(t,e,n){t[e]=n}function Ye(t,e,n){return(e-t)*n+t}function Ue(t,e,n){return n>.5?e:t}function qe(t,e,n,i,r){var a=t.length;if(1==r)for(var o=0;a>o;o++)i[o]=Ye(t[o],e[o],n);else for(var s=a&&t[0].length,o=0;a>o;o++)for(var l=0;s>l;l++)i[o][l]=Ye(t[o][l],e[o][l],n)}function Ze(t,e,n){var i=t.length,r=e.length;if(i!==r){var a=i>r;if(a)t.length=r;else for(var o=i;r>o;o++)t.push(1===n?e[o]:Gd.call(e[o]))}for(var s=t[0]&&t[0].length,o=0;o<t.length;o++)if(1===n)isNaN(t[o])&&(t[o]=e[o]);else for(var l=0;s>l;l++)isNaN(t[o][l])&&(t[o][l]=e[o][l])}function $e(t,e,n){if(t===e)return!0;var i=t.length;if(i!==e.length)return!1;if(1===n){for(var r=0;i>r;r++)if(t[r]!==e[r])return!1}else for(var a=t[0].length,r=0;i>r;r++)for(var o=0;a>o;o++)if(t[r][o]!==e[r][o])return!1;return!0}function Ke(t,e,n,i,r,a,o,s,l){var h=t.length;if(1==l)for(var u=0;h>u;u++)s[u]=Qe(t[u],e[u],n[u],i[u],r,a,o);else for(var c=t[0].length,u=0;h>u;u++)for(var d=0;c>d;d++)s[u][d]=Qe(t[u][d],e[u][d],n[u][d],i[u][d],r,a,o)}function Qe(t,e,n,i,r,a,o){var s=.5*(n-t),l=.5*(i-e);return(2*(e-n)+s+l)*o+(-3*(e-n)-2*s-l)*a+s*r+e}function Je(t){if(d(t)){var e=t.length;if(d(t[0])){for(var n=[],i=0;e>i;i++)n.push(Gd.call(t[i]));return n}return Gd.call(t)}return t}function tn(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}function en(t){var e=t[t.length-1].value;return d(e&&e[0])?2:1}function nn(t,e,n,i,r,a){var o=t._getter,s=t._setter,l="spline"===e,h=i.length;if(h){var u,c=i[0].value,f=d(c),p=!1,g=!1,v=f?en(i):0;i.sort(function(t,e){return t.time-e.time}),u=i[h-1].time;for(var m=[],y=[],x=i[0].value,_=!0,w=0;h>w;w++){m.push(i[w].time/u);var b=i[w].value;if(f&&$e(b,x,v)||!f&&b===x||(_=!1),x=b,"string"==typeof b){var S=Be(b);S?(b=S,p=!0):g=!0}y.push(b)}if(a||!_){for(var M=y[h-1],w=0;h-1>w;w++)f?Ze(y[w],M,v):!isNaN(y[w])||isNaN(M)||g||p||(y[w]=M);f&&Ze(o(t._target,r),M,v);var I,T,C,D,k,A,P=0,L=0;if(p)var O=[0,0,0,0];var B=function(t,e){var n;if(0>e)n=0;else if(L>e){for(I=Math.min(P+1,h-1),n=I;n>=0&&!(m[n]<=e);n--);n=Math.min(n,h-2)}else{for(n=P;h>n&&!(m[n]>e);n++);n=Math.min(n-1,h-2)}P=n,L=e;var i=m[n+1]-m[n];if(0!==i)if(T=(e-m[n])/i,l)if(D=y[n],C=y[0===n?n:n-1],k=y[n>h-2?h-1:n+1],A=y[n>h-3?h-1:n+2],f)Ke(C,D,k,A,T,T*T,T*T*T,o(t,r),v);else{var a;if(p)a=Ke(C,D,k,A,T,T*T,T*T*T,O,1),a=tn(O);else{if(g)return Ue(D,k,T);a=Qe(C,D,k,A,T,T*T,T*T*T)}s(t,r,a)}else if(f)qe(y[n],y[n+1],T,o(t,r),v);else{var a;if(p)qe(y[n],y[n+1],T,O,1),a=tn(O);else{if(g)return Ue(y[n],y[n+1],T);a=Ye(y[n],y[n+1],T)}s(t,r,a)}},E=new Se({target:t._target,life:u,loop:t._loop,delay:t._delay,onframe:B,ondestroy:n});return e&&"spline"!==e&&(E.easing=e),E}}}function rn(t,e,n,i){0>n&&(t+=n,n=-n),0>i&&(e+=i,i=-i),this.x=t,this.y=e,this.width=n,this.height=i}function an(t){for(var e=0;t>=tf;)e|=1&t,t>>=1;return t+e}function on(t,e,n,i){var r=e+1;if(r===n)return 1;if(i(t[r++],t[e])<0){for(;n>r&&i(t[r],t[r-1])<0;)r++;sn(t,e,r)}else for(;n>r&&i(t[r],t[r-1])>=0;)r++;return r-e}function sn(t,e,n){for(n--;n>e;){var i=t[e];t[e++]=t[n],t[n--]=i}}function ln(t,e,n,i,r){for(i===e&&i++;n>i;i++){for(var a,o=t[i],s=e,l=i;l>s;)a=s+l>>>1,r(o,t[a])<0?l=a:s=a+1;var h=i-s;switch(h){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;h>0;)t[s+h]=t[s+h-1],h--}t[s]=o}}function hn(t,e,n,i,r,a){var o=0,s=0,l=1;if(a(t,e[n+r])>0){for(s=i-r;s>l&&a(t,e[n+r+l])>0;)o=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s),o+=r,l+=r}else{for(s=r+1;s>l&&a(t,e[n+r-l])<=0;)o=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s);var h=o;o=r-l,l=r-h}for(o++;l>o;){var u=o+(l-o>>>1);a(t,e[n+u])>0?o=u+1:l=u}return l}function un(t,e,n,i,r,a){var o=0,s=0,l=1;if(a(t,e[n+r])<0){for(s=r+1;s>l&&a(t,e[n+r-l])<0;)o=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s);var h=o;o=r-l,l=r-h}else{for(s=i-r;s>l&&a(t,e[n+r+l])>=0;)o=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s),o+=r,l+=r}for(o++;l>o;){var u=o+(l-o>>>1);a(t,e[n+u])<0?l=u:o=u+1}return l}function cn(t,e){function n(t,e){l[c]=t,h[c]=e,c+=1}function i(){for(;c>1;){var t=c-2;if(t>=1&&h[t-1]<=h[t]+h[t+1]||t>=2&&h[t-2]<=h[t]+h[t-1])h[t-1]<h[t+1]&&t--;else if(h[t]>h[t+1])break;a(t)}}function r(){for(;c>1;){var t=c-2;t>0&&h[t-1]<h[t+1]&&t--,a(t)}}function a(n){var i=l[n],r=h[n],a=l[n+1],u=h[n+1];h[n]=r+u,n===c-3&&(l[n+1]=l[n+2],h[n+1]=h[n+2]),c--;var d=un(t[a],t,i,r,0,e);i+=d,r-=d,0!==r&&(u=hn(t[i+r-1],t,a,u,u-1,e),0!==u&&(u>=r?o(i,r,a,u):s(i,r,a,u)))}function o(n,i,r,a){var o=0;for(o=0;i>o;o++)d[o]=t[n+o];var s=0,l=r,h=n;if(t[h++]=t[l++],0!==--a){if(1===i){for(o=0;a>o;o++)t[h+o]=t[l+o];return void(t[h+a]=d[s])}for(var c,f,p,g=u;;){c=0,f=0,p=!1;do if(e(t[l],d[s])<0){if(t[h++]=t[l++],f++,c=0,0===--a){p=!0;break}}else if(t[h++]=d[s++],c++,f=0,1===--i){p=!0;break}while(g>(c|f));if(p)break;do{if(c=un(t[l],d,s,i,0,e),0!==c){for(o=0;c>o;o++)t[h+o]=d[s+o];if(h+=c,s+=c,i-=c,1>=i){p=!0;break}}if(t[h++]=t[l++],0===--a){p=!0;break}if(f=hn(d[s],t,l,a,0,e),0!==f){for(o=0;f>o;o++)t[h+o]=t[l+o];if(h+=f,l+=f,a-=f,0===a){p=!0;break}}if(t[h++]=d[s++],1===--i){p=!0;break}g--}while(c>=ef||f>=ef);if(p)break;0>g&&(g=0),g+=2}if(u=g,1>u&&(u=1),1===i){for(o=0;a>o;o++)t[h+o]=t[l+o];t[h+a]=d[s]}else{if(0===i)throw new Error;for(o=0;i>o;o++)t[h+o]=d[s+o]}}else for(o=0;i>o;o++)t[h+o]=d[s+o]}function s(n,i,r,a){var o=0;for(o=0;a>o;o++)d[o]=t[r+o];var s=n+i-1,l=a-1,h=r+a-1,c=0,f=0;if(t[h--]=t[s--],0!==--i){if(1===a){for(h-=i,s-=i,f=h+1,c=s+1,o=i-1;o>=0;o--)t[f+o]=t[c+o];return void(t[h]=d[l])}for(var p=u;;){var g=0,v=0,m=!1;do if(e(d[l],t[s])<0){if(t[h--]=t[s--],g++,v=0,0===--i){m=!0;break}}else if(t[h--]=d[l--],v++,g=0,1===--a){m=!0;break}while(p>(g|v));if(m)break;do{if(g=i-un(d[l],t,n,i,i-1,e),0!==g){for(h-=g,s-=g,i-=g,f=h+1,c=s+1,o=g-1;o>=0;o--)t[f+o]=t[c+o];if(0===i){m=!0;break}}if(t[h--]=d[l--],1===--a){m=!0;break}if(v=a-hn(t[s],d,0,a,a-1,e),0!==v){for(h-=v,l-=v,a-=v,f=h+1,c=l+1,o=0;v>o;o++)t[f+o]=d[c+o];if(1>=a){m=!0;break}}if(t[h--]=t[s--],0===--i){m=!0;break}p--}while(g>=ef||v>=ef);if(m)break;0>p&&(p=0),p+=2}if(u=p,1>u&&(u=1),1===a){for(h-=i,s-=i,f=h+1,c=s+1,o=i-1;o>=0;o--)t[f+o]=t[c+o];t[h]=d[l]}else{if(0===a)throw new Error;for(c=h-(a-1),o=0;a>o;o++)t[c+o]=d[o]}}else for(c=h-(a-1),o=0;a>o;o++)t[c+o]=d[o]}var l,h,u=ef,c=0,d=[];l=[],h=[],this.mergeRuns=i,this.forceMergeRuns=r,this.pushRun=n}function dn(t,e,n,i){n||(n=0),i||(i=t.length);var r=i-n;if(!(2>r)){var a=0;if(tf>r)return a=on(t,n,i,e),void ln(t,n,i,n+a,e);var o=new cn(t,e),s=an(r);do{if(a=on(t,n,i,e),s>a){var l=r;l>s&&(l=s),ln(t,n,n+l,n+a,e),a=l}o.pushRun(n,a),o.mergeRuns(),r-=a,n+=a}while(0!==r);o.forceMergeRuns()}}function fn(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}function pn(t,e,n){var i=null==e.x?0:e.x,r=null==e.x2?1:e.x2,a=null==e.y?0:e.y,o=null==e.y2?0:e.y2;e.global||(i=i*n.width+n.x,r=r*n.width+n.x,a=a*n.height+n.y,o=o*n.height+n.y),i=isNaN(i)?0:i,r=isNaN(r)?1:r,a=isNaN(a)?0:a,o=isNaN(o)?0:o;var s=t.createLinearGradient(i,a,r,o);return s}function gn(t,e,n){var i=n.width,r=n.height,a=Math.min(i,r),o=null==e.x?.5:e.x,s=null==e.y?.5:e.y,l=null==e.r?.5:e.r;e.global||(o=o*i+n.x,s=s*r+n.y,l*=a);var h=t.createRadialGradient(o,s,0,o,s,l);return h}function vn(){return!1}function mn(t,e,n){var i=sd(),r=e.getWidth(),a=e.getHeight(),o=i.style;return o&&(o.position="absolute",o.left=0,o.top=0,o.width=r+"px",o.height=a+"px",i.setAttribute("data-zr-dom-id",t)),i.width=r*n,i.height=a*n,i}function yn(t){if("string"==typeof t){var e=pf.get(t);return e&&e.image}return t}function xn(t,e,n,i,r){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!n)return e;var a=pf.get(t),o={hostEl:n,cb:i,cbPayload:r};return a?(e=a.image,!wn(e)&&a.pending.push(o)):(!e&&(e=new Image),e.onload=_n,pf.put(t,e.__cachedImgObj={image:e,pending:[o]}),e.src=e.__zrImageSrc=t),e}return t}return e}function _n(){var t=this.__cachedImgObj;this.onload=this.__cachedImgObj=null;for(var e=0;e<t.pending.length;e++){var n=t.pending[e],i=n.cb;i&&i(this,n.cbPayload),n.hostEl.dirty()}t.pending.length=0}function wn(t){return t&&t.width&&t.height}function bn(t,e){e=e||xf;var n=t+":"+e;if(gf[n])return gf[n];for(var i=(t+"").split("\n"),r=0,a=0,o=i.length;o>a;a++)r=Math.max(Bn(i[a],e).width,r);return vf>mf&&(vf=0,gf={}),vf++,gf[n]=r,r}function Sn(t,e,n,i,r,a,o){return a?In(t,e,n,i,r,a,o):Mn(t,e,n,i,r,o)}function Mn(t,e,n,i,r,a){var o=En(t,e,r,a),s=bn(t,e);r&&(s+=r[1]+r[3]);var l=o.outerHeight,h=Tn(0,s,n),u=Cn(0,l,i),c=new rn(h,u,s,l);return c.lineHeight=o.lineHeight,c}function In(t,e,n,i,r,a,o){var s=zn(t,{rich:a,truncate:o,font:e,textAlign:n,textPadding:r}),l=s.outerWidth,h=s.outerHeight,u=Tn(0,l,n),c=Cn(0,h,i);return new rn(u,c,l,h)}function Tn(t,e,n){return"right"===n?t-=e:"center"===n&&(t-=e/2),t}function Cn(t,e,n){return"middle"===n?t-=e/2:"bottom"===n&&(t-=e),t}function Dn(t,e,n){var i=e.x,r=e.y,a=e.height,o=e.width,s=a/2,l="left",h="top";switch(t){case"left":i-=n,r+=s,l="right",h="middle";break;case"right":i+=n+o,r+=s,h="middle";break;case"top":i+=o/2,r-=n,l="center",h="bottom";break;case"bottom":i+=o/2,r+=a+n,l="center";break;case"inside":i+=o/2,r+=s,l="center",h="middle";break;case"insideLeft":i+=n,r+=s,h="middle";break;case"insideRight":i+=o-n,r+=s,l="right",h="middle";break;case"insideTop":i+=o/2,r+=n,l="center";break;case"insideBottom":i+=o/2,r+=a-n,l="center",h="bottom";break;case"insideTopLeft":i+=n,r+=n;break;case"insideTopRight":i+=o-n,r+=n,l="right";break;case"insideBottomLeft":i+=n,r+=a-n,h="bottom";break;case"insideBottomRight":i+=o-n,r+=a-n,l="right",h="bottom"}return{x:i,y:r,textAlign:l,textVerticalAlign:h}}function kn(t,e,n,i,r){if(!e)return"";var a=(t+"").split("\n");r=An(e,n,i,r);for(var o=0,s=a.length;s>o;o++)a[o]=Pn(a[o],r);return a.join("\n")}function An(t,e,n,i){i=o({},i),i.font=e;var n=k(n,"...");i.maxIterations=k(i.maxIterations,2);var r=i.minChar=k(i.minChar,0);i.cnCharWidth=bn("国",e);var a=i.ascCharWidth=bn("a",e);i.placeholder=k(i.placeholder,"");for(var s=t=Math.max(0,t-1),l=0;r>l&&s>=a;l++)s-=a;var h=bn(n);return h>s&&(n="",h=0),s=t-h,i.ellipsis=n,i.ellipsisWidth=h,i.contentWidth=s,i.containerWidth=t,i}function Pn(t,e){var n=e.containerWidth,i=e.font,r=e.contentWidth;if(!n)return"";var a=bn(t,i);if(n>=a)return t;for(var o=0;;o++){if(r>=a||o>=e.maxIterations){t+=e.ellipsis;break}var s=0===o?Ln(t,r,e.ascCharWidth,e.cnCharWidth):a>0?Math.floor(t.length*r/a):0;t=t.substr(0,s),a=bn(t,i)}return""===t&&(t=e.placeholder),t}function Ln(t,e,n,i){for(var r=0,a=0,o=t.length;o>a&&e>r;a++){var s=t.charCodeAt(a);r+=s>=0&&127>=s?n:i}return a}function On(t){return bn("国",t)}function Bn(t,e){return _f.measureText(t,e)}function En(t,e,n,i){null!=t&&(t+="");var r=On(e),a=t?t.split("\n"):[],o=a.length*r,s=o;if(n&&(s+=n[0]+n[2]),t&&i){var l=i.outerHeight,h=i.outerWidth;if(null!=l&&s>l)t="",a=[];else if(null!=h)for(var u=An(h-(n?n[1]+n[3]:0),e,i.ellipsis,{minChar:i.minChar,placeholder:i.placeholder}),c=0,d=a.length;d>c;c++)a[c]=Pn(a[c],u)}return{lines:a,height:o,outerHeight:s,lineHeight:r}}function zn(t,e){var n={lines:[],width:0,height:0};if(null!=t&&(t+=""),!t)return n;for(var i,r=yf.lastIndex=0;null!=(i=yf.exec(t));){var a=i.index;a>r&&Rn(n,t.substring(r,a)),Rn(n,i[2],i[1]),r=yf.lastIndex}r<t.length&&Rn(n,t.substring(r,t.length));var o=n.lines,s=0,l=0,h=[],u=e.textPadding,c=e.truncate,d=c&&c.outerWidth,f=c&&c.outerHeight;u&&(null!=d&&(d-=u[1]+u[3]),null!=f&&(f-=u[0]+u[2]));for(var p=0;p<o.length;p++){for(var g=o[p],v=0,m=0,y=0;y<g.tokens.length;y++){var x=g.tokens[y],_=x.styleName&&e.rich[x.styleName]||{},w=x.textPadding=_.textPadding,b=x.font=_.font||e.font,S=x.textHeight=k(_.textHeight,On(b));if(w&&(S+=w[0]+w[2]),x.height=S,x.lineHeight=A(_.textLineHeight,e.textLineHeight,S),x.textAlign=_&&_.textAlign||e.textAlign,x.textVerticalAlign=_&&_.textVerticalAlign||"middle",null!=f&&s+x.lineHeight>f)return{lines:[],width:0,height:0};x.textWidth=bn(x.text,b);var M=_.textWidth,I=null==M||"auto"===M;if("string"==typeof M&&"%"===M.charAt(M.length-1))x.percentWidth=M,h.push(x),M=0;else{if(I){M=x.textWidth;var T=_.textBackgroundColor,C=T&&T.image;C&&(C=yn(C),wn(C)&&(M=Math.max(M,C.width*S/C.height)))}var D=w?w[1]+w[3]:0;M+=D;var P=null!=d?d-m:null;null!=P&&M>P&&(!I||D>P?(x.text="",x.textWidth=M=0):(x.text=kn(x.text,P-D,b,c.ellipsis,{minChar:c.minChar}),x.textWidth=bn(x.text,b),M=x.textWidth+D))}m+=x.width=M,_&&(v=Math.max(v,x.lineHeight))}g.width=m,g.lineHeight=v,s+=v,l=Math.max(l,m)}n.outerWidth=n.width=k(e.textWidth,l),n.outerHeight=n.height=k(e.textHeight,s),u&&(n.outerWidth+=u[1]+u[3],n.outerHeight+=u[0]+u[2]);for(var p=0;p<h.length;p++){var x=h[p],L=x.percentWidth;x.width=parseInt(L,10)/100*l}return n}function Rn(t,e,n){for(var i=""===e,r=e.split("\n"),a=t.lines,o=0;o<r.length;o++){var s=r[o],l={styleName:n,text:s,isLineHolder:!s&&!i};if(o)a.push({tokens:[l]});else{var h=(a[a.length-1]||(a[0]={tokens:[]})).tokens,u=h.length;1===u&&h[0].isLineHolder?h[0]=l:(s||!u||i)&&h.push(l)}}}function Nn(t){var e=(t.fontSize||t.fontFamily)&&[t.fontStyle,t.fontWeight,(t.fontSize||12)+"px",t.fontFamily||"sans-serif"].join(" ");return e&&B(e)||t.textFont||t.font}function Fn(t,e){var n,i,r,a,o=e.x,s=e.y,l=e.width,h=e.height,u=e.r;0>l&&(o+=l,l=-l),0>h&&(s+=h,h=-h),"number"==typeof u?n=i=r=a=u:u instanceof Array?1===u.length?n=i=r=a=u[0]:2===u.length?(n=r=u[0],i=a=u[1]):3===u.length?(n=u[0],i=a=u[1],r=u[2]):(n=u[0],i=u[1],r=u[2],a=u[3]):n=i=r=a=0;var c;n+i>l&&(c=n+i,n*=l/c,i*=l/c),r+a>l&&(c=r+a,r*=l/c,a*=l/c),i+r>h&&(c=i+r,i*=h/c,r*=h/c),n+a>h&&(c=n+a,n*=h/c,a*=h/c),t.moveTo(o+n,s),t.lineTo(o+l-i,s),0!==i&&t.arc(o+l-i,s+i,i,-Math.PI/2,0),t.lineTo(o+l,s+h-r),0!==r&&t.arc(o+l-r,s+h-r,r,0,Math.PI/2),t.lineTo(o+a,s+h),0!==a&&t.arc(o+a,s+h-a,a,Math.PI/2,Math.PI),t.lineTo(o,s+n),0!==n&&t.arc(o+n,s+n,n,Math.PI,1.5*Math.PI)}function Hn(t){return Gn(t),f(t.rich,Gn),t}function Gn(t){if(t){t.font=Nn(t);var e=t.textAlign;"middle"===e&&(e="center"),t.textAlign=null==e||wf[e]?e:"left";var n=t.textVerticalAlign||t.textBaseline;"center"===n&&(n="middle"),t.textVerticalAlign=null==n||bf[n]?n:"top";var i=t.textPadding;i&&(t.textPadding=L(t.textPadding))}}function Wn(t,e,n,i,r){i.rich?Xn(t,e,n,i,r):Vn(t,e,n,i,r)}function Vn(t,e,n,i,r){var a=Qn(e,"font",i.font||xf),o=i.textPadding,s=t.__textCotentBlock;(!s||t.__dirty)&&(s=t.__textCotentBlock=En(n,a,o,i.truncate));var l=s.outerHeight,h=s.lines,u=s.lineHeight,c=Kn(l,i,r),d=c.baseX,f=c.baseY,p=c.textAlign,g=c.textVerticalAlign;Yn(e,i,r,d,f);var v=Cn(f,l,g),m=d,y=v,x=qn(i);if(x||o){var _=bn(n,a),w=_;o&&(w+=o[1]+o[3]);var b=Tn(d,w,p);x&&Zn(t,e,i,b,v,w,l),o&&(m=ni(d,p,o),y+=o[0])}Qn(e,"textAlign",p||"left"),Qn(e,"textBaseline","middle"),Qn(e,"shadowBlur",i.textShadowBlur||0),Qn(e,"shadowColor",i.textShadowColor||"transparent"),Qn(e,"shadowOffsetX",i.textShadowOffsetX||0),Qn(e,"shadowOffsetY",i.textShadowOffsetY||0),y+=u/2;var S=i.textStrokeWidth,M=Jn(i.textStroke,S),I=ti(i.textFill);M&&(Qn(e,"lineWidth",S),Qn(e,"strokeStyle",M)),I&&Qn(e,"fillStyle",I);for(var T=0;T<h.length;T++)M&&e.strokeText(h[T],m,y),I&&e.fillText(h[T],m,y),y+=u}function Xn(t,e,n,i,r){var a=t.__textCotentBlock;(!a||t.__dirty)&&(a=t.__textCotentBlock=zn(n,i)),jn(t,e,a,i,r)}function jn(t,e,n,i,r){var a=n.width,o=n.outerWidth,s=n.outerHeight,l=i.textPadding,h=Kn(s,i,r),u=h.baseX,c=h.baseY,d=h.textAlign,f=h.textVerticalAlign;Yn(e,i,r,u,c);var p=Tn(u,o,d),g=Cn(c,s,f),v=p,m=g;l&&(v+=l[3],m+=l[0]);var y=v+a;qn(i)&&Zn(t,e,i,p,g,o,s);for(var x=0;x<n.lines.length;x++){for(var _,w=n.lines[x],b=w.tokens,S=b.length,M=w.lineHeight,I=w.width,T=0,C=v,D=y,k=S-1;S>T&&(_=b[T],!_.textAlign||"left"===_.textAlign);)Un(t,e,_,i,M,m,C,"left"),I-=_.width,C+=_.width,T++;for(;k>=0&&(_=b[k],"right"===_.textAlign);)Un(t,e,_,i,M,m,D,"right"),I-=_.width,D-=_.width,k--;for(C+=(a-(C-v)-(y-D)-I)/2;k>=T;)_=b[T],Un(t,e,_,i,M,m,C+_.width/2,"center"),C+=_.width,T++;m+=M}}function Yn(t,e,n,i,r){if(n&&e.textRotation){var a=e.textOrigin;"center"===a?(i=n.width/2+n.x,r=n.height/2+n.y):a&&(i=a[0]+n.x,r=a[1]+n.y),t.translate(i,r),t.rotate(-e.textRotation),t.translate(-i,-r)}}function Un(t,e,n,i,r,a,o,s){var l=i.rich[n.styleName]||{},h=n.textVerticalAlign,u=a+r/2;"top"===h?u=a+n.height/2:"bottom"===h&&(u=a+r-n.height/2),!n.isLineHolder&&qn(l)&&Zn(t,e,l,"right"===s?o-n.width:"center"===s?o-n.width/2:o,u-n.height/2,n.width,n.height);var c=n.textPadding;c&&(o=ni(o,s,c),u-=n.height/2-c[2]-n.textHeight/2),Qn(e,"shadowBlur",A(l.textShadowBlur,i.textShadowBlur,0)),Qn(e,"shadowColor",l.textShadowColor||i.textShadowColor||"transparent"),Qn(e,"shadowOffsetX",A(l.textShadowOffsetX,i.textShadowOffsetX,0)),Qn(e,"shadowOffsetY",A(l.textShadowOffsetY,i.textShadowOffsetY,0)),Qn(e,"textAlign",s),Qn(e,"textBaseline","middle"),Qn(e,"font",n.font||xf);var d=Jn(l.textStroke||i.textStroke,p),f=ti(l.textFill||i.textFill),p=k(l.textStrokeWidth,i.textStrokeWidth);d&&(Qn(e,"lineWidth",p),Qn(e,"strokeStyle",d),e.strokeText(n.text,o,u)),f&&(Qn(e,"fillStyle",f),e.fillText(n.text,o,u))}function qn(t){return t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor}function Zn(t,e,n,i,r,a,o){var s=n.textBackgroundColor,l=n.textBorderWidth,h=n.textBorderColor,u=b(s);if(Qn(e,"shadowBlur",n.textBoxShadowBlur||0),Qn(e,"shadowColor",n.textBoxShadowColor||"transparent"),Qn(e,"shadowOffsetX",n.textBoxShadowOffsetX||0),Qn(e,"shadowOffsetY",n.textBoxShadowOffsetY||0),u||l&&h){e.beginPath();var c=n.textBorderRadius;c?Fn(e,{x:i,y:r,width:a,height:o,r:c}):e.rect(i,r,a,o),e.closePath()}if(u)Qn(e,"fillStyle",s),e.fill();else if(S(s)){var d=s.image;d=xn(d,null,t,$n,s),d&&wn(d)&&e.drawImage(d,i,r,a,o)}l&&h&&(Qn(e,"lineWidth",l),Qn(e,"strokeStyle",h),e.stroke())}function $n(t,e){e.image=t}function Kn(t,e,n){var i=e.x||0,r=e.y||0,a=e.textAlign,o=e.textVerticalAlign;if(n){var s=e.textPosition;if(s instanceof Array)i=n.x+ei(s[0],n.width),r=n.y+ei(s[1],n.height);else{var l=Dn(s,n,e.textDistance);i=l.x,r=l.y,a=a||l.textAlign,o=o||l.textVerticalAlign}var h=e.textOffset;h&&(i+=h[0],r+=h[1])}return{baseX:i,baseY:r,textAlign:a,textVerticalAlign:o}}function Qn(t,e,n){return t[e]=af(t,e,n),t[e]}function Jn(t,e){return null==t||0>=e||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function ti(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function ei(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function ni(t,e,n){return"right"===e?t-n[1]:"center"===e?t+n[3]/2-n[1]/2:t+n[3]}function ii(t,e){return null!=t&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)}function ri(t){t=t||{},Zd.call(this,t);for(var e in t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new sf(t.style,this),this._rect=null,this.__clipPaths=[]}function ai(t){ri.call(this,t)}function oi(t){return parseInt(t,10)}function si(t){return t?t.__builtin__?!0:"function"!=typeof t.resize||"function"!=typeof t.refresh?!1:!0:!1}function li(t,e,n){return kf.copy(t.getBoundingRect()),t.transform&&kf.applyTransform(t.transform),Af.width=e,Af.height=n,!kf.intersect(Af)}function hi(t,e){if(t==e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!0}function ui(t,e){for(var n=0;n<t.length;n++){var i=t[n];i.setTransform(e),e.beginPath(),i.buildPath(e,i.shape),e.clip(),i.restoreTransform(e)}}function ci(t,e){var n=document.createElement("div");return n.style.cssText=["position:relative","overflow:hidden","width:"+t+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";",n}function di(t){return t.getBoundingClientRect?t.getBoundingClientRect():{left:0,top:0}}function fi(t,e,n,i){return n=n||{},i||!$c.canvasSupported?pi(t,e,n):$c.browser.firefox&&null!=e.layerX&&e.layerX!==e.offsetX?(n.zrX=e.layerX,n.zrY=e.layerY):null!=e.offsetX?(n.zrX=e.offsetX,n.zrY=e.offsetY):pi(t,e,n),n}function pi(t,e,n){var i=di(t);n.zrX=e.clientX-i.left,n.zrY=e.clientY-i.top}function gi(t,e,n){if(e=e||window.event,null!=e.zrX)return e;var i=e.type,r=i&&i.indexOf("touch")>=0;if(r){var a="touchend"!=i?e.targetTouches[0]:e.changedTouches[0];a&&fi(t,a,e,n)}else fi(t,e,e,n),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;var o=e.button;return null==e.which&&void 0!==o&&Of.test(e.type)&&(e.which=1&o?1:2&o?3:4&o?2:0),e}function vi(t,e,n){Lf?t.addEventListener(e,n):t.attachEvent("on"+e,n)}function mi(t,e,n){Lf?t.removeEventListener(e,n):t.detachEvent("on"+e,n)}function yi(t){var e=t[1][0]-t[0][0],n=t[1][1]-t[0][1];return Math.sqrt(e*e+n*n)}function xi(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}function _i(t){return"mousewheel"===t&&$c.browser.firefox?"DOMMouseScroll":t}function wi(t,e,n){var i=t._gestureMgr;"start"===n&&i.clear();var r=i.recognize(e,t.handler.findHover(e.zrX,e.zrY,null).target,t.dom);if("end"===n&&i.clear(),r){var a=r.type;e.gestureEvent=a,t.handler.dispatchToElement({target:r.target},a,r.event)}}function bi(t){t._touching=!0,clearTimeout(t._touchTimer),t._touchTimer=setTimeout(function(){t._touching=!1},700)}function Si(t){var e=t.pointerType;return"pen"===e||"touch"===e}function Mi(t){function e(t,e){return function(){return e._touching?void 0:t.apply(e,arguments) | |
| 2 | +}}f(Hf,function(e){t._handlers[e]=y(Vf[e],t)}),f(Wf,function(e){t._handlers[e]=y(Vf[e],t)}),f(Ff,function(n){t._handlers[n]=e(Vf[n],t)})}function Ii(t){function e(e,n){f(e,function(e){vi(t,_i(e),n._handlers[e])},n)}yd.call(this),this.dom=t,this._touching=!1,this._touchTimer,this._gestureMgr=new zf,this._handlers={},Mi(this),$c.pointerEventsSupported?e(Wf,this):($c.touchEventsSupported&&e(Hf,this),e(Ff,this))}function Ti(t,e){var n=new Zf(qc(),t,e);return Uf[n.id]=n,n}function Ci(t){if(t)t.dispose();else{for(var e in Uf)Uf.hasOwnProperty(e)&&Uf[e].dispose();Uf={}}return this}function Di(t){return Uf[t]}function ki(t,e){Yf[t]=e}function Ai(t){delete Uf[t]}function Pi(t){return t instanceof Array?t:null==t?[]:[t]}function Li(t,e,n){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var i=0,r=n.length;r>i;i++){var a=n[i];!t.emphasis[e].hasOwnProperty(a)&&t[e].hasOwnProperty(a)&&(t.emphasis[e][a]=t[e][a])}}}function Oi(t){return!Qf(t)||Jf(t)||t instanceof Date?t:t.value}function Bi(t){return Qf(t)&&!(t instanceof Array)}function Ei(t,e){e=(e||[]).slice();var n=p(t||[],function(t){return{exist:t}});return Kf(e,function(t,i){if(Qf(t)){for(var r=0;r<n.length;r++)if(!n[r].option&&null!=t.id&&n[r].exist.id===t.id+"")return n[r].option=t,void(e[i]=null);for(var r=0;r<n.length;r++){var a=n[r].exist;if(!(n[r].option||null!=a.id&&null!=t.id||null==t.name||Ni(t)||Ni(a)||a.name!==t.name+""))return n[r].option=t,void(e[i]=null)}}}),Kf(e,function(t){if(Qf(t)){for(var e=0;e<n.length;e++){var i=n[e].exist;if(!n[e].option&&!Ni(i)&&null==t.id){n[e].option=t;break}}e>=n.length&&n.push({option:t})}}),n}function zi(t){var e=N();Kf(t,function(t){var n=t.exist;n&&e.set(n.id,t)}),Kf(t,function(t){var n=t.option;O(!n||null==n.id||!e.get(n.id)||e.get(n.id)===t,"id duplicates: "+(n&&n.id)),n&&null!=n.id&&e.set(n.id,t),!t.keyInfo&&(t.keyInfo={})}),Kf(t,function(t,n){var i=t.exist,r=t.option,a=t.keyInfo;if(Qf(r)){if(a.name=null!=r.name?r.name+"":i?i.name:tp+n,i)a.id=i.id;else if(null!=r.id)a.id=r.id+"";else{var o=0;do a.id="\x00"+a.name+"\x00"+o++;while(e.get(a.id))}e.set(a.id,t)}})}function Ri(t){var e=t.name;return!(!e||!e.indexOf(tp))}function Ni(t){return Qf(t)&&t.id&&0===(t.id+"").indexOf("\x00_ec_\x00")}function Fi(t,e){return null!=e.dataIndexInside?e.dataIndexInside:null!=e.dataIndex?_(e.dataIndex)?p(e.dataIndex,function(e){return t.indexOfRawIndex(e)}):t.indexOfRawIndex(e.dataIndex):null!=e.name?_(e.name)?p(e.name,function(e){return t.indexOfName(e)}):t.indexOfName(e.name):void 0}function Hi(){var t="__\x00ec_inner_"+np++ +"_"+Math.random().toFixed(5);return function(e){return e[t]||(e[t]={})}}function Gi(t,e,n){if(b(e)){var i={};i[e+"Index"]=0,e=i}var r=n&&n.defaultMainType;!r||Wi(e,r+"Index")||Wi(e,r+"Id")||Wi(e,r+"Name")||(e[r+"Index"]=0);var a={};return Kf(e,function(i,r){var i=e[r];if("dataIndex"===r||"dataIndexInside"===r)return void(a[r]=i);var o=r.match(/^(\w+)(Index|Id|Name)$/)||[],s=o[1],l=(o[2]||"").toLowerCase();if(!(!s||!l||null==i||"index"===l&&"none"===i||n&&n.includeMainTypes&&h(n.includeMainTypes,s)<0)){var u={mainType:s};("index"!==l||"all"!==i)&&(u[l]=i);var c=t.queryComponents(u);a[s+"Models"]=c,a[s+"Model"]=c[0]}}),a}function Wi(t,e){return t&&t.hasOwnProperty(e)}function Vi(t,e,n){t.setAttribute?t.setAttribute(e,n):t[e]=n}function Xi(t,e){return t.getAttribute?t.getAttribute(e):t[e]}function ji(t){var e={main:"",sub:""};return t&&(t=t.split(ip),e.main=t[0]||"",e.sub=t[1]||""),e}function Yi(t){O(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}function Ui(t){t.$constructor=t,t.extend=function(t){var e=this,n=function(){t.$constructor?t.$constructor.apply(this,arguments):e.apply(this,arguments)};return o(n.prototype,t),n.extend=this.extend,n.superCall=Zi,n.superApply=$i,u(n,this),n.superClass=e,n}}function qi(t){var e=["__\x00is_clz",ap++,Math.random().toFixed(3)].join("_");t.prototype[e]=!0,t.isInstance=function(t){return!(!t||!t[e])}}function Zi(t,e){var n=P(arguments,2);return this.superClass.prototype[e].apply(t,n)}function $i(t,e,n){return this.superClass.prototype[e].apply(t,n)}function Ki(t,e){function n(t){var e=i[t.main];return e&&e[rp]||(e=i[t.main]={},e[rp]=!0),e}e=e||{};var i={};if(t.registerClass=function(t,e){if(e)if(Yi(e),e=ji(e),e.sub){if(e.sub!==rp){var r=n(e);r[e.sub]=t}}else i[e.main]=t;return t},t.getClass=function(t,e,n){var r=i[t];if(r&&r[rp]&&(r=e?r[e]:null),n&&!r)throw new Error(e?"Component "+t+"."+(e||"")+" not exists. Load it first.":t+".type should be specified.");return r},t.getClassesByMainType=function(t){t=ji(t);var e=[],n=i[t.main];return n&&n[rp]?f(n,function(t,n){n!==rp&&e.push(t)}):e.push(n),e},t.hasClass=function(t){return t=ji(t),!!i[t.main]},t.getAllClassMainTypes=function(){var t=[];return f(i,function(e,n){t.push(n)}),t},t.hasSubTypes=function(t){t=ji(t);var e=i[t.main];return e&&e[rp]},t.parseClassType=ji,e.registerWhenExtend){var r=t.extend;r&&(t.extend=function(e){var n=r.call(this,e);return t.registerClass(n,e.type)})}return t}function Qi(t){return t>-fp&&fp>t}function Ji(t){return t>fp||-fp>t}function tr(t,e,n,i,r){var a=1-r;return a*a*(a*t+3*r*e)+r*r*(r*i+3*a*n)}function er(t,e,n,i,r){var a=1-r;return 3*(((e-t)*a+2*(n-e)*r)*a+(i-n)*r*r)}function nr(t,e,n,i,r,a){var o=i+3*(e-n)-t,s=3*(n-2*e+t),l=3*(e-t),h=t-r,u=s*s-3*o*l,c=s*l-9*o*h,d=l*l-3*s*h,f=0;if(Qi(u)&&Qi(c))if(Qi(s))a[0]=0;else{var p=-l/s;p>=0&&1>=p&&(a[f++]=p)}else{var g=c*c-4*u*d;if(Qi(g)){var v=c/u,p=-s/o+v,m=-v/2;p>=0&&1>=p&&(a[f++]=p),m>=0&&1>=m&&(a[f++]=m)}else if(g>0){var y=dp(g),x=u*s+1.5*o*(-c+y),_=u*s+1.5*o*(-c-y);x=0>x?-cp(-x,vp):cp(x,vp),_=0>_?-cp(-_,vp):cp(_,vp);var p=(-s-(x+_))/(3*o);p>=0&&1>=p&&(a[f++]=p)}else{var w=(2*u*s-3*o*c)/(2*dp(u*u*u)),b=Math.acos(w)/3,S=dp(u),M=Math.cos(b),p=(-s-2*S*M)/(3*o),m=(-s+S*(M+gp*Math.sin(b)))/(3*o),I=(-s+S*(M-gp*Math.sin(b)))/(3*o);p>=0&&1>=p&&(a[f++]=p),m>=0&&1>=m&&(a[f++]=m),I>=0&&1>=I&&(a[f++]=I)}}return f}function ir(t,e,n,i,r){var a=6*n-12*e+6*t,o=9*e+3*i-3*t-9*n,s=3*e-3*t,l=0;if(Qi(o)){if(Ji(a)){var h=-s/a;h>=0&&1>=h&&(r[l++]=h)}}else{var u=a*a-4*o*s;if(Qi(u))r[0]=-a/(2*o);else if(u>0){var c=dp(u),h=(-a+c)/(2*o),d=(-a-c)/(2*o);h>=0&&1>=h&&(r[l++]=h),d>=0&&1>=d&&(r[l++]=d)}}return l}function rr(t,e,n,i,r,a){var o=(e-t)*r+t,s=(n-e)*r+e,l=(i-n)*r+n,h=(s-o)*r+o,u=(l-s)*r+s,c=(u-h)*r+h;a[0]=t,a[1]=o,a[2]=h,a[3]=c,a[4]=c,a[5]=u,a[6]=l,a[7]=i}function ar(t,e,n,i,r,a,o,s,l,h,u){var c,d,f,p,g,v=.005,m=1/0;mp[0]=l,mp[1]=h;for(var y=0;1>y;y+=.05)yp[0]=tr(t,n,r,o,y),yp[1]=tr(e,i,a,s,y),p=gd(mp,yp),m>p&&(c=y,m=p);m=1/0;for(var x=0;32>x&&!(pp>v);x++)d=c-v,f=c+v,yp[0]=tr(t,n,r,o,d),yp[1]=tr(e,i,a,s,d),p=gd(yp,mp),d>=0&&m>p?(c=d,m=p):(xp[0]=tr(t,n,r,o,f),xp[1]=tr(e,i,a,s,f),g=gd(xp,mp),1>=f&&m>g?(c=f,m=g):v*=.5);return u&&(u[0]=tr(t,n,r,o,c),u[1]=tr(e,i,a,s,c)),dp(m)}function or(t,e,n,i){var r=1-i;return r*(r*t+2*i*e)+i*i*n}function sr(t,e,n,i){return 2*((1-i)*(e-t)+i*(n-e))}function lr(t,e,n,i,r){var a=t-2*e+n,o=2*(e-t),s=t-i,l=0;if(Qi(a)){if(Ji(o)){var h=-s/o;h>=0&&1>=h&&(r[l++]=h)}}else{var u=o*o-4*a*s;if(Qi(u)){var h=-o/(2*a);h>=0&&1>=h&&(r[l++]=h)}else if(u>0){var c=dp(u),h=(-o+c)/(2*a),d=(-o-c)/(2*a);h>=0&&1>=h&&(r[l++]=h),d>=0&&1>=d&&(r[l++]=d)}}return l}function hr(t,e,n){var i=t+n-2*e;return 0===i?.5:(t-e)/i}function ur(t,e,n,i,r){var a=(e-t)*i+t,o=(n-e)*i+e,s=(o-a)*i+a;r[0]=t,r[1]=a,r[2]=s,r[3]=s,r[4]=o,r[5]=n}function cr(t,e,n,i,r,a,o,s,l){var h,u=.005,c=1/0;mp[0]=o,mp[1]=s;for(var d=0;1>d;d+=.05){yp[0]=or(t,n,r,d),yp[1]=or(e,i,a,d);var f=gd(mp,yp);c>f&&(h=d,c=f)}c=1/0;for(var p=0;32>p&&!(pp>u);p++){var g=h-u,v=h+u;yp[0]=or(t,n,r,g),yp[1]=or(e,i,a,g);var f=gd(yp,mp);if(g>=0&&c>f)h=g,c=f;else{xp[0]=or(t,n,r,v),xp[1]=or(e,i,a,v);var m=gd(xp,mp);1>=v&&c>m?(h=v,c=m):u*=.5}}return l&&(l[0]=or(t,n,r,h),l[1]=or(e,i,a,h)),dp(c)}function dr(t,e,n){if(0!==t.length){var i,r=t[0],a=r[0],o=r[0],s=r[1],l=r[1];for(i=1;i<t.length;i++)r=t[i],a=_p(a,r[0]),o=wp(o,r[0]),s=_p(s,r[1]),l=wp(l,r[1]);e[0]=a,e[1]=s,n[0]=o,n[1]=l}}function fr(t,e,n,i,r,a){r[0]=_p(t,n),r[1]=_p(e,i),a[0]=wp(t,n),a[1]=wp(e,i)}function pr(t,e,n,i,r,a,o,s,l,h){var u,c=ir,d=tr,f=c(t,n,r,o,Dp);for(l[0]=1/0,l[1]=1/0,h[0]=-1/0,h[1]=-1/0,u=0;f>u;u++){var p=d(t,n,r,o,Dp[u]);l[0]=_p(p,l[0]),h[0]=wp(p,h[0])}for(f=c(e,i,a,s,kp),u=0;f>u;u++){var g=d(e,i,a,s,kp[u]);l[1]=_p(g,l[1]),h[1]=wp(g,h[1])}l[0]=_p(t,l[0]),h[0]=wp(t,h[0]),l[0]=_p(o,l[0]),h[0]=wp(o,h[0]),l[1]=_p(e,l[1]),h[1]=wp(e,h[1]),l[1]=_p(s,l[1]),h[1]=wp(s,h[1])}function gr(t,e,n,i,r,a,o,s){var l=hr,h=or,u=wp(_p(l(t,n,r),1),0),c=wp(_p(l(e,i,a),1),0),d=h(t,n,r,u),f=h(e,i,a,c);o[0]=_p(t,r,d),o[1]=_p(e,a,f),s[0]=wp(t,r,d),s[1]=wp(e,a,f)}function vr(t,e,n,i,r,a,o,s,l){var h=oe,u=se,c=Math.abs(r-a);if(1e-4>c%Mp&&c>1e-4)return s[0]=t-n,s[1]=e-i,l[0]=t+n,void(l[1]=e+i);if(Ip[0]=Sp(r)*n+t,Ip[1]=bp(r)*i+e,Tp[0]=Sp(a)*n+t,Tp[1]=bp(a)*i+e,h(s,Ip,Tp),u(l,Ip,Tp),r%=Mp,0>r&&(r+=Mp),a%=Mp,0>a&&(a+=Mp),r>a&&!o?a+=Mp:a>r&&o&&(r+=Mp),o){var d=a;a=r,r=d}for(var f=0;a>f;f+=Math.PI/2)f>r&&(Cp[0]=Sp(f)*n+t,Cp[1]=bp(f)*i+e,h(s,Cp,s),u(l,Cp,l))}function mr(t,e,n,i,r,a,o){if(0===r)return!1;var s=r,l=0,h=t;if(o>e+s&&o>i+s||e-s>o&&i-s>o||a>t+s&&a>n+s||t-s>a&&n-s>a)return!1;if(t===n)return Math.abs(a-t)<=s/2;l=(e-i)/(t-n),h=(t*i-n*e)/(t-n);var u=l*a-o+h,c=u*u/(l*l+1);return s/2*s/2>=c}function yr(t,e,n,i,r,a,o,s,l,h,u){if(0===l)return!1;var c=l;if(u>e+c&&u>i+c&&u>a+c&&u>s+c||e-c>u&&i-c>u&&a-c>u&&s-c>u||h>t+c&&h>n+c&&h>r+c&&h>o+c||t-c>h&&n-c>h&&r-c>h&&o-c>h)return!1;var d=ar(t,e,n,i,r,a,o,s,h,u,null);return c/2>=d}function xr(t,e,n,i,r,a,o,s,l){if(0===o)return!1;var h=o;if(l>e+h&&l>i+h&&l>a+h||e-h>l&&i-h>l&&a-h>l||s>t+h&&s>n+h&&s>r+h||t-h>s&&n-h>s&&r-h>s)return!1;var u=cr(t,e,n,i,r,a,s,l,null);return h/2>=u}function _r(t){return t%=Vp,0>t&&(t+=Vp),t}function wr(t,e,n,i,r,a,o,s,l){if(0===o)return!1;var h=o;s-=t,l-=e;var u=Math.sqrt(s*s+l*l);if(u-h>n||n>u+h)return!1;if(Math.abs(i-r)%Xp<1e-4)return!0;if(a){var c=i;i=_r(r),r=_r(c)}else i=_r(i),r=_r(r);i>r&&(r+=Xp);var d=Math.atan2(l,s);return 0>d&&(d+=Xp),d>=i&&r>=d||d+Xp>=i&&r>=d+Xp}function br(t,e,n,i,r,a){if(a>e&&a>i||e>a&&i>a)return 0;if(i===e)return 0;var o=e>i?1:-1,s=(a-e)/(i-e);(1===s||0===s)&&(o=e>i?.5:-.5);var l=s*(n-t)+t;return l>r?o:0}function Sr(t,e){return Math.abs(t-e)<Up}function Mr(){var t=Zp[0];Zp[0]=Zp[1],Zp[1]=t}function Ir(t,e,n,i,r,a,o,s,l,h){if(h>e&&h>i&&h>a&&h>s||e>h&&i>h&&a>h&&s>h)return 0;var u=nr(e,i,a,s,h,qp);if(0===u)return 0;for(var c,d,f=0,p=-1,g=0;u>g;g++){var v=qp[g],m=0===v||1===v?.5:1,y=tr(t,n,r,o,v);l>y||(0>p&&(p=ir(e,i,a,s,Zp),Zp[1]<Zp[0]&&p>1&&Mr(),c=tr(e,i,a,s,Zp[0]),p>1&&(d=tr(e,i,a,s,Zp[1]))),f+=2==p?v<Zp[0]?e>c?m:-m:v<Zp[1]?c>d?m:-m:d>s?m:-m:v<Zp[0]?e>c?m:-m:c>s?m:-m)}return f}function Tr(t,e,n,i,r,a,o,s){if(s>e&&s>i&&s>a||e>s&&i>s&&a>s)return 0;var l=lr(e,i,a,s,qp);if(0===l)return 0;var h=hr(e,i,a);if(h>=0&&1>=h){for(var u=0,c=or(e,i,a,h),d=0;l>d;d++){var f=0===qp[d]||1===qp[d]?.5:1,p=or(t,n,r,qp[d]);o>p||(u+=qp[d]<h?e>c?f:-f:c>a?f:-f)}return u}var f=0===qp[0]||1===qp[0]?.5:1,p=or(t,n,r,qp[0]);return o>p?0:e>a?f:-f}function Cr(t,e,n,i,r,a,o,s){if(s-=e,s>n||-n>s)return 0;var l=Math.sqrt(n*n-s*s);qp[0]=-l,qp[1]=l;var h=Math.abs(i-r);if(1e-4>h)return 0;if(1e-4>h%Yp){i=0,r=Yp;var u=a?1:-1;return o>=qp[0]+t&&o<=qp[1]+t?u:0}if(a){var l=i;i=_r(r),r=_r(l)}else i=_r(i),r=_r(r);i>r&&(r+=Yp);for(var c=0,d=0;2>d;d++){var f=qp[d];if(f+t>o){var p=Math.atan2(s,f),u=a?1:-1;0>p&&(p=Yp+p),(p>=i&&r>=p||p+Yp>=i&&r>=p+Yp)&&(p>Math.PI/2&&p<1.5*Math.PI&&(u=-u),c+=u)}}return c}function Dr(t,e,n,i,r){for(var a=0,o=0,s=0,l=0,h=0,u=0;u<t.length;){var c=t[u++];switch(c===jp.M&&u>1&&(n||(a+=br(o,s,l,h,i,r))),1==u&&(o=t[u],s=t[u+1],l=o,h=s),c){case jp.M:l=t[u++],h=t[u++],o=l,s=h;break;case jp.L:if(n){if(mr(o,s,t[u],t[u+1],e,i,r))return!0}else a+=br(o,s,t[u],t[u+1],i,r)||0;o=t[u++],s=t[u++];break;case jp.C:if(n){if(yr(o,s,t[u++],t[u++],t[u++],t[u++],t[u],t[u+1],e,i,r))return!0}else a+=Ir(o,s,t[u++],t[u++],t[u++],t[u++],t[u],t[u+1],i,r)||0;o=t[u++],s=t[u++];break;case jp.Q:if(n){if(xr(o,s,t[u++],t[u++],t[u],t[u+1],e,i,r))return!0}else a+=Tr(o,s,t[u++],t[u++],t[u],t[u+1],i,r)||0;o=t[u++],s=t[u++];break;case jp.A:var d=t[u++],f=t[u++],p=t[u++],g=t[u++],v=t[u++],m=t[u++],y=(t[u++],1-t[u++]),x=Math.cos(v)*p+d,_=Math.sin(v)*g+f;u>1?a+=br(o,s,x,_,i,r):(l=x,h=_);var w=(i-d)*g/p+d;if(n){if(wr(d,f,g,v,v+m,y,e,w,r))return!0}else a+=Cr(d,f,g,v,v+m,y,w,r);o=Math.cos(v+m)*p+d,s=Math.sin(v+m)*g+f;break;case jp.R:l=o=t[u++],h=s=t[u++];var b=t[u++],S=t[u++],x=l+b,_=h+S;if(n){if(mr(l,h,x,h,e,i,r)||mr(x,h,x,_,e,i,r)||mr(x,_,l,_,e,i,r)||mr(l,_,l,h,e,i,r))return!0}else a+=br(x,h,x,_,i,r),a+=br(l,_,l,h,i,r);break;case jp.Z:if(n){if(mr(o,s,l,h,e,i,r))return!0}else a+=br(o,s,l,h,i,r);o=l,s=h}}return n||Sr(s,h)||(a+=br(o,s,l,h,i,r)||0),0!==a}function kr(t,e,n){return Dr(t,0,!1,e,n)}function Ar(t,e,n,i){return Dr(t,e,!0,n,i)}function Pr(t){ri.call(this,t),this.path=null}function Lr(t,e,n,i,r,a,o,s,l,h,u){var c=l*(lg/180),d=sg(c)*(t-n)/2+og(c)*(e-i)/2,f=-1*og(c)*(t-n)/2+sg(c)*(e-i)/2,p=d*d/(o*o)+f*f/(s*s);p>1&&(o*=ag(p),s*=ag(p));var g=(r===a?-1:1)*ag((o*o*s*s-o*o*f*f-s*s*d*d)/(o*o*f*f+s*s*d*d))||0,v=g*o*f/s,m=g*-s*d/o,y=(t+n)/2+sg(c)*v-og(c)*m,x=(e+i)/2+og(c)*v+sg(c)*m,_=cg([1,0],[(d-v)/o,(f-m)/s]),w=[(d-v)/o,(f-m)/s],b=[(-1*d-v)/o,(-1*f-m)/s],S=cg(w,b);ug(w,b)<=-1&&(S=lg),ug(w,b)>=1&&(S=0),0===a&&S>0&&(S-=2*lg),1===a&&0>S&&(S+=2*lg),u.addData(h,y,x,o,s,_,S,c,a)}function Or(t){if(!t)return[];var e,n=t.replace(/-/g," -").replace(/ /g," ").replace(/ /g,",").replace(/,,/g,",");for(e=0;e<rg.length;e++)n=n.replace(new RegExp(rg[e],"g"),"|"+rg[e]);var i,r=n.split("|"),a=0,o=0,s=new Wp,l=Wp.CMD;for(e=1;e<r.length;e++){var h,u=r[e],c=u.charAt(0),d=0,f=u.slice(1).replace(/e,-/g,"e-").split(",");f.length>0&&""===f[0]&&f.shift();for(var p=0;p<f.length;p++)f[p]=parseFloat(f[p]);for(;d<f.length&&!isNaN(f[d])&&!isNaN(f[0]);){var g,v,m,y,x,_,w,b=a,S=o;switch(c){case"l":a+=f[d++],o+=f[d++],h=l.L,s.addData(h,a,o);break;case"L":a=f[d++],o=f[d++],h=l.L,s.addData(h,a,o);break;case"m":a+=f[d++],o+=f[d++],h=l.M,s.addData(h,a,o),c="l";break;case"M":a=f[d++],o=f[d++],h=l.M,s.addData(h,a,o),c="L";break;case"h":a+=f[d++],h=l.L,s.addData(h,a,o);break;case"H":a=f[d++],h=l.L,s.addData(h,a,o);break;case"v":o+=f[d++],h=l.L,s.addData(h,a,o);break;case"V":o=f[d++],h=l.L,s.addData(h,a,o);break;case"C":h=l.C,s.addData(h,f[d++],f[d++],f[d++],f[d++],f[d++],f[d++]),a=f[d-2],o=f[d-1];break;case"c":h=l.C,s.addData(h,f[d++]+a,f[d++]+o,f[d++]+a,f[d++]+o,f[d++]+a,f[d++]+o),a+=f[d-2],o+=f[d-1];break;case"S":g=a,v=o;var M=s.len(),I=s.data;i===l.C&&(g+=a-I[M-4],v+=o-I[M-3]),h=l.C,b=f[d++],S=f[d++],a=f[d++],o=f[d++],s.addData(h,g,v,b,S,a,o);break;case"s":g=a,v=o;var M=s.len(),I=s.data;i===l.C&&(g+=a-I[M-4],v+=o-I[M-3]),h=l.C,b=a+f[d++],S=o+f[d++],a+=f[d++],o+=f[d++],s.addData(h,g,v,b,S,a,o);break;case"Q":b=f[d++],S=f[d++],a=f[d++],o=f[d++],h=l.Q,s.addData(h,b,S,a,o);break;case"q":b=f[d++]+a,S=f[d++]+o,a+=f[d++],o+=f[d++],h=l.Q,s.addData(h,b,S,a,o);break;case"T":g=a,v=o;var M=s.len(),I=s.data;i===l.Q&&(g+=a-I[M-4],v+=o-I[M-3]),a=f[d++],o=f[d++],h=l.Q,s.addData(h,g,v,a,o);break;case"t":g=a,v=o;var M=s.len(),I=s.data;i===l.Q&&(g+=a-I[M-4],v+=o-I[M-3]),a+=f[d++],o+=f[d++],h=l.Q,s.addData(h,g,v,a,o);break;case"A":m=f[d++],y=f[d++],x=f[d++],_=f[d++],w=f[d++],b=a,S=o,a=f[d++],o=f[d++],h=l.A,Lr(b,S,a,o,_,w,m,y,x,h,s);break;case"a":m=f[d++],y=f[d++],x=f[d++],_=f[d++],w=f[d++],b=a,S=o,a+=f[d++],o+=f[d++],h=l.A,Lr(b,S,a,o,_,w,m,y,x,h,s)}}("z"===c||"Z"===c)&&(h=l.Z,s.addData(h)),i=h}return s.toStatic(),s}function Br(t,e){var n=Or(t);return e=e||{},e.buildPath=function(t){if(t.setData){t.setData(n.data);var e=t.getContext();e&&t.rebuildPath(e)}else{var e=t;n.rebuildPath(e)}},e.applyTransform=function(t){ig(n,t),this.dirty(!0)},e}function Er(t,e){return new Pr(Br(t,e))}function zr(t,e){return Pr.extend(Br(t,e))}function Rr(t,e){for(var n=[],i=t.length,r=0;i>r;r++){var a=t[r];a.path||a.createPathProxy(),a.__dirtyPath&&a.buildPath(a.path,a.shape,!0),n.push(a.path)}var o=new Pr(e);return o.createPathProxy(),o.buildPath=function(t){t.appendPath(n);var e=t.getContext();e&&t.rebuildPath(e)},o}function Nr(t,e,n,i,r,a,o){var s=.5*(n-t),l=.5*(i-e);return(2*(e-n)+s+l)*o+(-3*(e-n)-2*s-l)*a+s*r+e}function Fr(t,e,n){var i=e.points,r=e.smooth;if(i&&i.length>=2){if(r&&"spline"!==r){var a=xg(i,r,n,e.smoothConstraint);t.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;(n?o:o-1)>s;s++){var l=a[2*s],h=a[2*s+1],u=i[(s+1)%o];t.bezierCurveTo(l[0],l[1],h[0],h[1],u[0],u[1])}}else{"spline"===r&&(i=yg(i,n)),t.moveTo(i[0][0],i[0][1]);for(var s=1,c=i.length;c>s;s++)t.lineTo(i[s][0],i[s][1])}n&&t.closePath()}}function Hr(t,e,n){var i=t.cpx2,r=t.cpy2;return null===i||null===r?[(n?er:tr)(t.x1,t.cpx1,t.cpx2,t.x2,e),(n?er:tr)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(n?sr:or)(t.x1,t.cpx1,t.x2,e),(n?sr:or)(t.y1,t.cpy1,t.y2,e)]}function Gr(t){ri.call(this,t),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}function Wr(t){return Pr.extend(t)}function Vr(t,e){return zr(t,e)}function Xr(t,e,n,i){var r=Er(t,e),a=r.getBoundingRect();return n&&("center"===i&&(n=Yr(n,a)),Ur(r,n)),r}function jr(t,e,n){var i=new ai({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(t){if("center"===n){var r={width:t.width,height:t.height};i.setStyle(Yr(e,r))}}});return i}function Yr(t,e){var n,i=e.width/e.height,r=t.height*i;r<=t.width?n=t.height:(r=t.width,n=r/i);var a=t.x+t.width/2,o=t.y+t.height/2;return{x:a-r/2,y:o-n/2,width:r,height:n}}function Ur(t,e){if(t.applyTransform){var n=t.getBoundingRect(),i=n.calculateTransform(e);t.applyTransform(i)}}function qr(t){var e=t.shape,n=t.style.lineWidth;return Lg(2*e.x1)===Lg(2*e.x2)&&(e.x1=e.x2=$r(e.x1,n,!0)),Lg(2*e.y1)===Lg(2*e.y2)&&(e.y1=e.y2=$r(e.y1,n,!0)),t}function Zr(t){var e=t.shape,n=t.style.lineWidth,i=e.x,r=e.y,a=e.width,o=e.height;return e.x=$r(e.x,n,!0),e.y=$r(e.y,n,!0),e.width=Math.max($r(i+a,n,!1)-e.x,0===a?0:1),e.height=Math.max($r(r+o,n,!1)-e.y,0===o?0:1),t}function $r(t,e,n){var i=Lg(2*t);return(i+Lg(e))%2===0?i/2:(i+(n?1:-1))/2}function Kr(t){return null!=t&&"none"!=t}function Qr(t){return"string"==typeof t?Re(t,-.1):t}function Jr(t){if(t.__hoverStlDirty){var e=t.style.stroke,n=t.style.fill,i=t.__hoverStl;i.fill=i.fill||(Kr(n)?Qr(n):null),i.stroke=i.stroke||(Kr(e)?Qr(e):null);var r={};for(var a in i)null!=i[a]&&(r[a]=t.style[a]);t.__normalStl=r,t.__hoverStlDirty=!1}}function ta(t){if(!t.__isHover){if(Jr(t),t.useHoverLayer)t.__zr&&t.__zr.addHover(t,t.__hoverStl);else{var e=t.style,n=e.insideRollbackOpt;n&&ya(e),e.extendFrom(t.__hoverStl),n&&(ma(e,e.insideOriginalTextPosition,n),null==e.textFill&&(e.textFill=n.autoColor)),t.dirty(!1),t.z2+=1}t.__isHover=!0}}function ea(t){if(t.__isHover){var e=t.__normalStl;t.useHoverLayer?t.__zr&&t.__zr.removeHover(t):(e&&t.setStyle(e),t.z2-=1),t.__isHover=!1}}function na(t){"group"===t.type?t.traverse(function(t){"group"!==t.type&&ta(t)}):ta(t)}function ia(t){"group"===t.type?t.traverse(function(t){"group"!==t.type&&ea(t)}):ea(t)}function ra(t,e){t.__hoverStl=t.hoverStyle||e||{},t.__hoverStlDirty=!0,t.__isHover&&Jr(t)}function aa(t){this.__hoverSilentOnTouch&&t.zrByTouch||!this.__isEmphasis&&na(this)}function oa(t){this.__hoverSilentOnTouch&&t.zrByTouch||!this.__isEmphasis&&ia(this)}function sa(){this.__isEmphasis=!0,na(this)}function la(){this.__isEmphasis=!1,ia(this)}function ha(t,e,n){t.__hoverSilentOnTouch=n&&n.hoverSilentOnTouch,"group"===t.type?t.traverse(function(t){"group"!==t.type&&ra(t,e)}):ra(t,e),t.on("mouseover",aa).on("mouseout",oa),t.on("emphasis",sa).on("normal",la)}function ua(t,e,n,i,r,a,o){r=r||Eg;var s,l=r.labelFetcher,h=r.labelDataIndex,u=r.labelDimIndex,c=n.getShallow("show"),d=i.getShallow("show");(c||d)&&(l&&(s=l.getFormattedLabel(h,"normal",null,u)),null==s&&(s=w(r.defaultText)?r.defaultText(h,r):r.defaultText));var f=c?s:null,p=d?k(l?l.getFormattedLabel(h,"emphasis",null,u):null,s):null;(null!=f||null!=p)&&(ca(t,n,a,r),ca(e,i,o,r,!0)),t.text=f,e.text=p}function ca(t,e,n,i,r){return fa(t,e,i,r),n&&o(t,n),t.host&&t.host.dirty&&t.host.dirty(!1),t}function da(t,e,n){var i,r={isRectText:!0};n===!1?i=!0:r.autoColor=n,fa(t,e,r,i),t.host&&t.host.dirty&&t.host.dirty(!1)}function fa(t,e,n,i){if(n=n||Eg,n.isRectText){var r=e.getShallow("position")||(i?null:"inside");"outside"===r&&(r="top"),t.textPosition=r,t.textOffset=e.getShallow("offset");var a=e.getShallow("rotate");null!=a&&(a*=Math.PI/180),t.textRotation=a,t.textDistance=k(e.getShallow("distance"),i?null:5)}var o,s=e.ecModel,l=s&&s.option.textStyle,h=pa(e);if(h){o={};for(var u in h)if(h.hasOwnProperty(u)){var c=e.getModel(["rich",u]);ga(o[u]={},c,l,n,i)}}return t.rich=o,ga(t,e,l,n,i,!0),n.forceRich&&!n.textStyle&&(n.textStyle={}),t}function pa(t){for(var e;t&&t!==t.ecModel;){var n=(t.option||Eg).rich;if(n){e=e||{};for(var i in n)n.hasOwnProperty(i)&&(e[i]=1)}t=t.parentModel}return e}function ga(t,e,n,i,r,a){if(n=!r&&n||Eg,t.textFill=va(e.getShallow("color"),i)||n.color,t.textStroke=va(e.getShallow("textBorderColor"),i)||n.textBorderColor,t.textStrokeWidth=k(e.getShallow("textBorderWidth"),n.textBorderWidth),!r){if(a){var o=t.textPosition;t.insideRollback=ma(t,o,i),t.insideOriginalTextPosition=o,t.insideRollbackOpt=i}null==t.textFill&&(t.textFill=i.autoColor)}t.fontStyle=e.getShallow("fontStyle")||n.fontStyle,t.fontWeight=e.getShallow("fontWeight")||n.fontWeight,t.fontSize=e.getShallow("fontSize")||n.fontSize,t.fontFamily=e.getShallow("fontFamily")||n.fontFamily,t.textAlign=e.getShallow("align"),t.textVerticalAlign=e.getShallow("verticalAlign")||e.getShallow("baseline"),t.textLineHeight=e.getShallow("lineHeight"),t.textWidth=e.getShallow("width"),t.textHeight=e.getShallow("height"),t.textTag=e.getShallow("tag"),a&&i.disableBox||(t.textBackgroundColor=va(e.getShallow("backgroundColor"),i),t.textPadding=e.getShallow("padding"),t.textBorderColor=va(e.getShallow("borderColor"),i),t.textBorderWidth=e.getShallow("borderWidth"),t.textBorderRadius=e.getShallow("borderRadius"),t.textBoxShadowColor=e.getShallow("shadowColor"),t.textBoxShadowBlur=e.getShallow("shadowBlur"),t.textBoxShadowOffsetX=e.getShallow("shadowOffsetX"),t.textBoxShadowOffsetY=e.getShallow("shadowOffsetY")),t.textShadowColor=e.getShallow("textShadowColor")||n.textShadowColor,t.textShadowBlur=e.getShallow("textShadowBlur")||n.textShadowBlur,t.textShadowOffsetX=e.getShallow("textShadowOffsetX")||n.textShadowOffsetX,t.textShadowOffsetY=e.getShallow("textShadowOffsetY")||n.textShadowOffsetY}function va(t,e){return"auto"!==t?t:e&&e.autoColor?e.autoColor:null}function ma(t,e,n){var i,r=n.useInsideStyle;return null==t.textFill&&r!==!1&&(r===!0||n.isRectText&&e&&"string"==typeof e&&e.indexOf("inside")>=0)&&(i={textFill:null,textStroke:t.textStroke,textStrokeWidth:t.textStrokeWidth},t.textFill="#fff",null==t.textStroke&&(t.textStroke=n.autoColor,null==t.textStrokeWidth&&(t.textStrokeWidth=2))),i}function ya(t){var e=t.insideRollback;e&&(t.textFill=e.textFill,t.textStroke=e.textStroke,t.textStrokeWidth=e.textStrokeWidth)}function xa(t,e){var n=e||e.getModel("textStyle");return B([t.fontStyle||n&&n.getShallow("fontStyle")||"",t.fontWeight||n&&n.getShallow("fontWeight")||"",(t.fontSize||n&&n.getShallow("fontSize")||12)+"px",t.fontFamily||n&&n.getShallow("fontFamily")||"sans-serif"].join(" "))}function _a(t,e,n,i,r,a){"function"==typeof r&&(a=r,r=null);var o=i&&i.isAnimationEnabled();if(o){var s=t?"Update":"",l=i.getShallow("animationDuration"+s),h=i.getShallow("animationEasing"+s),u=i.getShallow("animationDelay"+s);"function"==typeof u&&(u=u(r,i.getAnimationDelayParams?i.getAnimationDelayParams(e,r):null)),"function"==typeof l&&(l=l(r)),l>0?e.animateTo(n,l,u||0,h,a,!!a):(e.stopAnimation(),e.attr(n),a&&a())}else e.stopAnimation(),e.attr(n),a&&a()}function wa(t,e,n,i,r){_a(!0,t,e,n,i,r)}function ba(t,e,n,i,r){_a(!1,t,e,n,i,r)}function Sa(t,e){for(var n=pe([]);t&&t!==e;)ve(n,t.getLocalTransform(),n),t=t.parent;return n}function Ma(t,e,n){return e&&!d(e)&&(e=Td.getLocalTransform(e)),n&&(e=_e([],e)),ae([],t,e)}function Ia(t,e,n){var i=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),r=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),a=["left"===t?-i:"right"===t?i:0,"top"===t?-r:"bottom"===t?r:0];return a=Ma(a,e,n),Math.abs(a[0])>Math.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function Ta(t,e,n){function i(t){var e={};return t.traverse(function(t){!t.isGroup&&t.anid&&(e[t.anid]=t)}),e}function r(t){var e={position:V(t.position),rotation:t.rotation};return t.shape&&(e.shape=o({},t.shape)),e}if(t&&e){var a=i(t);e.traverse(function(t){if(!t.isGroup&&t.anid){var e=a[t.anid];if(e){var i=r(t);t.attr(r(e)),wa(t,i,n,t.dataIndex)}}})}}function Ca(t,e){return p(t,function(t){var n=t[0];n=Og(n,e.x),n=Bg(n,e.x+e.width);var i=t[1];return i=Og(i,e.y),i=Bg(i,e.y+e.height),[n,i]})}function Da(t,e){var n=Og(t.x,e.x),i=Bg(t.x+t.width,e.x+e.width),r=Og(t.y,e.y),a=Bg(t.y+t.height,e.y+e.height);return i>=n&&a>=r?{x:n,y:r,width:i-n,height:a-r}:void 0}function ka(t,e,n){e=o({rectHover:!0},e);var i=e.style={strokeNoScale:!0};return n=n||{x:-1,y:-1,width:2,height:2},t?0===t.indexOf("image://")?(i.image=t.slice(8),s(i,n),new ai(e)):Xr(t.replace("path://",""),e,n,"center"):void 0}function Aa(t,e,n){this.parentModel=e,this.ecModel=n,this.option=t}function Pa(t,e,n){for(var i=0;i<e.length&&(!e[i]||(t=t&&"object"==typeof t?t[e[i]]:null,null!=t));i++);return null==t&&n&&(t=n.get(e)),t}function La(t,e){var n=Vg(t).getParent;return n?n.call(t,e):t.parentModel}function Oa(t){return[t||"",Xg++,Math.random().toFixed(5)].join("_")}function Ba(t){var e={};return t.registerSubTypeDefaulter=function(t,n){t=ji(t),e[t.main]=n},t.determineSubType=function(n,i){var r=i.type;if(!r){var a=ji(n).main;t.hasSubTypes(n)&&e[a]&&(r=e[a](i))}return r},t}function Ea(t,e){function n(t){var n={},a=[];return f(t,function(o){var s=i(n,o),l=s.originalDeps=e(o),u=r(l,t);s.entryCount=u.length,0===s.entryCount&&a.push(o),f(u,function(t){h(s.predecessor,t)<0&&s.predecessor.push(t);var e=i(n,t);h(e.successor,t)<0&&e.successor.push(o)})}),{graph:n,noEntryList:a}}function i(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}function r(t,e){var n=[];return f(t,function(t){h(e,t)>=0&&n.push(t)}),n}t.topologicalTravel=function(t,e,i,r){function a(t){l[t].entryCount--,0===l[t].entryCount&&h.push(t)}function o(t){u[t]=!0,a(t)}if(t.length){var s=n(e),l=s.graph,h=s.noEntryList,u={};for(f(t,function(t){u[t]=!0});h.length;){var c=h.pop(),d=l[c],p=!!u[c];p&&(i.call(r,c,d.originalDeps.slice()),delete u[c]),f(d.successor,p?o:a)}f(u,function(){throw new Error("Circle dependency may exists")})}}}function za(t){return t.replace(/^\s+/,"").replace(/\s+$/,"")}function Ra(t,e,n,i){var r=e[1]-e[0],a=n[1]-n[0];if(0===r)return 0===a?n[0]:(n[0]+n[1])/2;if(i)if(r>0){if(t<=e[0])return n[0];if(t>=e[1])return n[1]}else{if(t>=e[0])return n[0];if(t<=e[1])return n[1]}else{if(t===e[0])return n[0];if(t===e[1])return n[1]}return(t-e[0])/r*a+n[0]}function Na(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?za(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?0/0:+t}function Fa(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),n?t:+t}function Ha(t){return t.sort(function(t,e){return t-e}),t}function Ga(t){if(t=+t,isNaN(t))return 0;for(var e=1,n=0;Math.round(t*e)/e!==t;)e*=10,n++;return n}function Wa(t){var e=t.toString(),n=e.indexOf("e");if(n>0){var i=+e.slice(n+1);return 0>i?-i:0}var r=e.indexOf(".");return 0>r?0:e.length-1-r}function Va(t,e){var n=Math.log,i=Math.LN10,r=Math.floor(n(t[1]-t[0])/i),a=Math.round(n(Math.abs(e[1]-e[0]))/i),o=Math.min(Math.max(-r+a,0),20);return isFinite(o)?o:20}function Xa(t,e,n){if(!t[e])return 0;var i=g(t,function(t,e){return t+(isNaN(e)?0:e)},0);if(0===i)return 0;for(var r=Math.pow(10,n),a=p(t,function(t){return(isNaN(t)?0:t)/i*r*100}),o=100*r,s=p(a,function(t){return Math.floor(t)}),l=g(s,function(t,e){return t+e},0),h=p(a,function(t,e){return t-s[e]});o>l;){for(var u=Number.NEGATIVE_INFINITY,c=null,d=0,f=h.length;f>d;++d)h[d]>u&&(u=h[d],c=d);++s[c],h[c]=0,++l}return s[e]/r}function ja(t){var e=2*Math.PI;return(t%e+e)%e}function Ya(t){return t>-jg&&jg>t}function Ua(t){if(t instanceof Date)return t;if("string"==typeof t){var e=Ug.exec(t);if(!e)return new Date(0/0);if(e[8]){var n=+e[4]||0;return"Z"!==e[8].toUpperCase()&&(n-=e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,n,+(e[5]||0),+e[6]||0,+e[7]||0))}return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,+e[7]||0)}return new Date(null==t?0/0:Math.round(t))}function qa(t){return Math.pow(10,Za(t))}function Za(t){return Math.floor(Math.log(t)/Math.LN10)}function $a(t,e){var n,i=Za(t),r=Math.pow(10,i),a=t/r;return n=e?1.5>a?1:2.5>a?2:4>a?3:7>a?5:10:1>a?1:2>a?2:3>a?3:5>a?5:10,t=n*r,i>=-20?+t.toFixed(0>i?-i:0):t}function Ka(t){function e(t,n,i){return t.interval[i]<n.interval[i]||t.interval[i]===n.interval[i]&&(t.close[i]-n.close[i]===(i?-1:1)||!i&&e(t,n,1))}t.sort(function(t,n){return e(t,n,0)?-1:1});for(var n=-1/0,i=1,r=0;r<t.length;){for(var a=t[r].interval,o=t[r].close,s=0;2>s;s++)a[s]<=n&&(a[s]=n,o[s]=s?1:1-i),n=a[s],i=o[s];a[0]===a[1]&&o[0]*o[1]!==1?t.splice(r,1):r++}return t}function Qa(t){return t-parseFloat(t)>=0}function Ja(t){return isNaN(t)?"-":(t=(t+"").split("."),t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:""))}function to(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()}),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}function eo(t){return String(t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function no(t,e,n){_(e)||(e=[e]);var i=e.length;if(!i)return"";for(var r=e[0].$vars||[],a=0;a<r.length;a++){var o=$g[a];t=t.replace(Kg(o),Kg(o,0))}for(var s=0;i>s;s++)for(var l=0;l<r.length;l++){var h=e[s][r[l]];t=t.replace(Kg($g[l],s),n?eo(h):h)}return t}function io(t,e,n){return f(e,function(e,i){t=t.replace("{"+i+"}",n?eo(e):e)}),t}function ro(t,e){t=b(t)?{color:t,extraCssText:e}:t||{};var n=t.color,i=t.type,e=t.extraCssText;return n?"subItem"===i?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+eo(n)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:'+eo(n)+";"+(e||"")+'"></span>':""}function ao(t,e){return t+="","0000".substr(0,e-t.length)+t}function oo(t,e,n){("week"===t||"month"===t||"quarter"===t||"half-year"===t||"year"===t)&&(t="MM-dd\nyyyy");var i=Ua(e),r=n?"UTC":"",a=i["get"+r+"FullYear"](),o=i["get"+r+"Month"]()+1,s=i["get"+r+"Date"](),l=i["get"+r+"Hours"](),h=i["get"+r+"Minutes"](),u=i["get"+r+"Seconds"](),c=i["get"+r+"Milliseconds"]();return t=t.replace("MM",ao(o,2)).replace("M",o).replace("yyyy",a).replace("yy",a%100).replace("dd",ao(s,2)).replace("d",s).replace("hh",ao(l,2)).replace("h",l).replace("mm",ao(h,2)).replace("m",h).replace("ss",ao(u,2)).replace("s",u).replace("SSS",ao(c,3))}function so(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t}function lo(t,e,n,i,r){var a=0,o=0;null==i&&(i=1/0),null==r&&(r=1/0);var s=0;e.eachChild(function(l,h){var u,c,d=l.position,f=l.getBoundingRect(),p=e.childAt(h+1),g=p&&p.getBoundingRect();if("horizontal"===t){var v=f.width+(g?-g.x+f.x:0);u=a+v,u>i||l.newline?(a=0,u=v,o+=s+n,s=f.height):s=Math.max(s,f.height)}else{var m=f.height+(g?-g.y+f.y:0);c=o+m,c>r||l.newline?(a+=s+n,o=0,c=m,s=f.width):s=Math.max(s,f.width)}l.newline||(d[0]=a,d[1]=o,"horizontal"===t?a=u+n:o=c+n)})}function ho(t,e,n){n=Zg(n||0);var i=e.width,r=e.height,a=Na(t.left,i),o=Na(t.top,r),s=Na(t.right,i),l=Na(t.bottom,r),h=Na(t.width,i),u=Na(t.height,r),c=n[2]+n[0],d=n[1]+n[3],f=t.aspect;switch(isNaN(h)&&(h=i-s-d-a),isNaN(u)&&(u=r-l-c-o),null!=f&&(isNaN(h)&&isNaN(u)&&(f>i/r?h=.8*i:u=.8*r),isNaN(h)&&(h=f*u),isNaN(u)&&(u=h/f)),isNaN(a)&&(a=i-s-h-d),isNaN(o)&&(o=r-l-u-c),t.left||t.right){case"center":a=i/2-h/2-n[3];break;case"right":a=i-h-d | |
| 3 | +}switch(t.top||t.bottom){case"middle":case"center":o=r/2-u/2-n[0];break;case"bottom":o=r-u-c}a=a||0,o=o||0,isNaN(h)&&(h=i-d-a-(s||0)),isNaN(u)&&(u=r-c-o-(l||0));var p=new rn(a+n[3],o+n[0],h,u);return p.margin=n,p}function uo(t,e,n){function i(n,i){var o={},l=0,h={},u=0,c=2;if(ev(n,function(e){h[e]=t[e]}),ev(n,function(t){r(e,t)&&(o[t]=h[t]=e[t]),a(o,t)&&l++,a(h,t)&&u++}),s[i])return a(e,n[1])?h[n[2]]=null:a(e,n[2])&&(h[n[1]]=null),h;if(u!==c&&l){if(l>=c)return o;for(var d=0;d<n.length;d++){var f=n[d];if(!r(o,f)&&r(t,f)){o[f]=t[f];break}}return o}return h}function r(t,e){return t.hasOwnProperty(e)}function a(t,e){return null!=t[e]&&"auto"!==t[e]}function o(t,e,n){ev(t,function(t){e[t]=n[t]})}!S(n)&&(n={});var s=n.ignoreSize;!_(s)&&(s=[s,s]);var l=i(iv[0],0),h=i(iv[1],1);o(iv[0],t,l),o(iv[1],t,h)}function co(t){return fo({},t)}function fo(t,e){return e&&t&&ev(nv,function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t}function po(t){var e=[];return f(sv.getClassesByMainType(t),function(t){e=e.concat(t.prototype.dependencies||[])}),e=p(e,function(t){return ji(t).main}),"dataset"!==t&&h(e,"dataset")<=0&&e.unshift("dataset"),e}function go(t,e){for(var n=t.length,i=0;n>i;i++)if(t[i].length>e)return t[i];return t[n-1]}function vo(t){var e=t.get("coordinateSystem"),n={coordSysName:e,coordSysDims:[],axisMap:N(),categoryAxisMap:N()},i=dv[e];return i?(i(t,n,n.axisMap,n.categoryAxisMap),n):void 0}function mo(t){return"category"===t.get("type")}function yo(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===vv?{}:[]),this.sourceFormat=t.sourceFormat||mv,this.seriesLayoutBy=t.seriesLayoutBy||xv,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&N(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}function xo(t){return wv(t).source}function _o(t){wv(t).datasetMap=N()}function wo(t){var e=t.option,n=e.data,i=I(n)?yv:fv,r=!1,a=e.seriesLayoutBy,o=e.sourceHeader,s=e.dimensions,l=Co(t);if(l){var h=l.option;n=h.source,i=wv(l).sourceFormat,r=!0,a=a||h.seriesLayoutBy,null==o&&(o=h.sourceHeader),s=s||h.dimensions}var u=bo(n,i,a,o,s),c=e.encode;!c&&l&&(c=To(t,l,n,i,a,u)),wv(t).source=new yo({data:n,fromDataset:r,seriesLayoutBy:a,sourceFormat:i,dimensionsDefine:u.dimensionsDefine,startIndex:u.startIndex,dimensionsDetectCount:u.dimensionsDetectCount,encodeDefine:c})}function bo(t,e,n,i,r){if(!t)return{dimensionsDefine:So(r)};var a,o,s;if(e===pv)"auto"===i||null==i?Mo(function(t){null!=t&&"-"!==t&&(b(t)?null==o&&(o=1):o=0)},n,t,10):o=i?1:0,r||1!==o||(r=[],Mo(function(t,e){r[e]=null!=t?t:""},n,t)),a=r?r.length:n===_v?t.length:t[0]?t[0].length:null;else if(e===gv)r||(r=Io(t),s=!0);else if(e===vv)r||(r=[],s=!0,f(t,function(t,e){r.push(e)}));else if(e===fv){var l=Oi(t[0]);a=_(l)&&l.length||1}var h;return s&&f(r,function(t,e){"name"===(S(t)?t.name:t)&&(h=e)}),{startIndex:o,dimensionsDefine:So(r),dimensionsDetectCount:a,potentialNameDimIndex:h}}function So(t){if(t){var e=N();return p(t,function(t){if(t=o({},S(t)?t:{name:t}),null==t.name)return t;t.name+="",null==t.displayName&&(t.displayName=t.name);var n=e.get(t.name);return n?t.name+="-"+n.count++:e.set(t.name,{count:1}),t})}}function Mo(t,e,n,i){if(null==i&&(i=1/0),e===_v)for(var r=0;r<n.length&&i>r;r++)t(n[r]?n[r][0]:null,r);else for(var a=n[0]||[],r=0;r<a.length&&i>r;r++)t(a[r],r)}function Io(t){for(var e,n=0;n<t.length&&!(e=t[n++]););if(e){var i=[];return f(e,function(t,e){i.push(e)}),i}}function To(t,e,n,i,r,a){var o=vo(t),s={},l=[],h=[],u=t.subType,c=N(["pie","map","funnel"]),d=N(["line","bar","pictorialBar","scatter","effectScatter","candlestick","boxplot"]);if(o&&null!=d.get(u)){var p=t.ecModel,g=wv(p).datasetMap,v=e.uid+"_"+r,m=g.get(v)||g.set(v,{categoryWayDim:1,valueWayDim:0});f(o.coordSysDims,function(t){if(null==o.firstCategoryDimIndex){var e=m.valueWayDim++;s[t]=e,h.push(e)}else if(o.categoryAxisMap.get(t))s[t]=0,l.push(0);else{var e=m.categoryWayDim++;s[t]=e,h.push(e)}})}else if(null!=c.get(u)){for(var y,x=0;5>x&&null==y;x++)ko(n,i,r,a.dimensionsDefine,a.startIndex,x)||(y=x);if(null!=y){s.value=y;var _=a.potentialNameDimIndex||Math.max(y-1,0);h.push(_),l.push(_)}}return l.length&&(s.itemName=l),h.length&&(s.seriesName=h),s}function Co(t){var e=t.option,n=e.data;return n?void 0:t.ecModel.getComponent("dataset",e.datasetIndex||0)}function Do(t,e){return ko(t.data,t.sourceFormat,t.seriesLayoutBy,t.dimensionsDefine,t.startIndex,e)}function ko(t,e,n,i,r,a){function o(t){return null!=t&&isFinite(t)&&""!==t?!1:b(t)&&"-"!==t?!0:void 0}var s,l=5;if(I(t))return!1;var h;if(i&&(h=i[a],h=S(h)?h.name:h),e===pv)if(n===_v){for(var u=t[a],c=0;c<(u||[]).length&&l>c;c++)if(null!=(s=o(u[r+c])))return s}else for(var c=0;c<t.length&&l>c;c++){var d=t[r+c];if(d&&null!=(s=o(d[a])))return s}else if(e===gv){if(!h)return;for(var c=0;c<t.length&&l>c;c++){var f=t[c];if(f&&null!=(s=o(f[h])))return s}}else if(e===vv){if(!h)return;var u=t[h];if(!u||I(u))return!1;for(var c=0;c<u.length&&l>c;c++)if(null!=(s=o(u[c])))return s}else if(e===fv)for(var c=0;c<t.length&&l>c;c++){var f=t[c],p=Oi(f);if(!_(p))return!1;if(null!=(s=o(p[a])))return s}return!1}function Ao(t,e){if(e){var n=e.seiresIndex,i=e.seriesId,r=e.seriesName;return null!=n&&t.componentIndex!==n||null!=i&&t.id!==i||null!=r&&t.name!==r}}function Po(t,e){var n=t.color&&!t.colorLayer;f(e,function(e,a){"colorLayer"===a&&n||sv.hasClass(a)||("object"==typeof e?t[a]=t[a]?r(t[a],e,!1):i(e):null==t[a]&&(t[a]=e))})}function Lo(t){t=t,this.option={},this.option[bv]=1,this._componentsMap=N({series:[]}),this._seriesIndices,this._seriesIndicesMap,Po(t,this._theme.option),r(t,hv,!1),this.mergeOption(t)}function Oo(t,e){_(e)||(e=e?[e]:[]);var n={};return f(e,function(e){n[e]=(t.get(e)||[]).slice()}),n}function Bo(t,e,n){var i=e.type?e.type:n?n.subType:sv.determineSubType(t,e);return i}function Eo(t,e){t._seriesIndicesMap=N(t._seriesIndices=p(e,function(t){return t.componentIndex})||[])}function zo(t,e){return e.hasOwnProperty("subType")?v(t,function(t){return t.subType===e.subType}):t}function Ro(t){f(Mv,function(e){this[e]=y(t[e],t)},this)}function No(){this._coordinateSystems=[]}function Fo(t){this._api=t,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}function Ho(t,e,n){var i,r,a=[],o=[],s=t.timeline;if(t.baseOption&&(r=t.baseOption),(s||t.options)&&(r=r||{},a=(t.options||[]).slice()),t.media){r=r||{};var l=t.media;Tv(l,function(t){t&&t.option&&(t.query?o.push(t):i||(i=t))})}return r||(r=t),r.timeline||(r.timeline=s),Tv([r].concat(a).concat(p(o,function(t){return t.option})),function(t){Tv(e,function(e){e(t,n)})}),{baseOption:r,timelineOptions:a,mediaDefault:i,mediaList:o}}function Go(t,e,n){var i={width:e,height:n,aspectratio:e/n},r=!0;return f(t,function(t,e){var n=e.match(Av);if(n&&n[1]&&n[2]){var a=n[1],o=n[2].toLowerCase();Wo(i[o],t,a)||(r=!1)}}),r}function Wo(t,e,n){return"min"===n?t>=e:"max"===n?e>=t:t===e}function Vo(t,e){return t.join(",")===e.join(",")}function Xo(t,e){e=e||{},Tv(e,function(e,n){if(null!=e){var i=t[n];if(sv.hasClass(n)){e=Pi(e),i=Pi(i);var r=Ei(i,e);t[n]=Dv(r,function(t){return t.option&&t.exist?kv(t.exist,t.option,!0):t.exist||t.option})}else t[n]=kv(i,e,!0)}})}function jo(t){var e=t&&t.itemStyle;if(e)for(var n=0,i=Ov.length;i>n;n++){var a=Ov[n],o=e.normal,s=e.emphasis;o&&o[a]&&(t[a]=t[a]||{},t[a].normal?r(t[a].normal,o[a]):t[a].normal=o[a],o[a]=null),s&&s[a]&&(t[a]=t[a]||{},t[a].emphasis?r(t[a].emphasis,s[a]):t[a].emphasis=s[a],s[a]=null)}}function Yo(t,e,n){if(t&&t[e]&&(t[e].normal||t[e].emphasis)){var i=t[e].normal,r=t[e].emphasis;i&&(n?(t[e].normal=t[e].emphasis=null,s(t[e],i)):t[e]=i),r&&(t.emphasis=t.emphasis||{},t.emphasis[e]=r)}}function Uo(t){Yo(t,"itemStyle"),Yo(t,"lineStyle"),Yo(t,"areaStyle"),Yo(t,"label"),Yo(t,"labelLine"),Yo(t,"upperLabel"),Yo(t,"edgeLabel")}function qo(t,e){var n=Lv(t)&&t[e],i=Lv(n)&&n.textStyle;if(i)for(var r=0,a=ep.length;a>r;r++){var e=ep[r];i.hasOwnProperty(e)&&(n[e]=i[e])}}function Zo(t){t&&(Uo(t),qo(t,"label"),t.emphasis&&qo(t.emphasis,"label"))}function $o(t){if(Lv(t)){jo(t),Uo(t),qo(t,"label"),qo(t,"upperLabel"),qo(t,"edgeLabel"),t.emphasis&&(qo(t.emphasis,"label"),qo(t.emphasis,"upperLabel"),qo(t.emphasis,"edgeLabel"));var e=t.markPoint;e&&(jo(e),Zo(e));var n=t.markLine;n&&(jo(n),Zo(n));var i=t.markArea;i&&Zo(i);var r=t.data;if("graph"===t.type){r=r||t.nodes;var a=t.links||t.edges;if(a&&!I(a))for(var o=0;o<a.length;o++)Zo(a[o]);f(t.categories,function(t){Uo(t)})}if(r&&!I(r))for(var o=0;o<r.length;o++)Zo(r[o]);var e=t.markPoint;if(e&&e.data)for(var s=e.data,o=0;o<s.length;o++)Zo(s[o]);var n=t.markLine;if(n&&n.data)for(var l=n.data,o=0;o<l.length;o++)_(l[o])?(Zo(l[o][0]),Zo(l[o][1])):Zo(l[o]);"gauge"===t.type?(qo(t,"axisLabel"),qo(t,"title"),qo(t,"detail")):"treemap"===t.type&&(Yo(t.breadcrumb,"itemStyle"),f(t.levels,function(t){Uo(t)}))}}function Ko(t){return _(t)?t:t?[t]:[]}function Qo(t){return(_(t)?t[0]:t)||{}}function Jo(t,e){e=e.split(",");for(var n=t,i=0;i<e.length&&(n=n&&n[e[i]],null!=n);i++);return n}function ts(t,e,n,i){e=e.split(",");for(var r,a=t,o=0;o<e.length-1;o++)r=e[o],null==a[r]&&(a[r]={}),a=a[r];(i||null==a[e[o]])&&(a[e[o]]=n)}function es(t){f(Ev,function(e){e[0]in t&&!(e[1]in t)&&(t[e[1]]=t[e[0]])})}function ns(t){f(t,function(e,n){var i=[],r=[0/0,0/0],a=[e.stackResultDimension,e.stackedOverDimension],o=e.data,s=e.isStackedByIndex,l=o.map(a,function(a,l,h){var u=o.get(e.stackedDimension,h);if(isNaN(u))return r;var c,d;s?d=o.getRawIndex(h):c=o.get(e.stackedByDimension,h);for(var f=0/0,p=n-1;p>=0;p--){var g=t[p];if(s||(d=g.data.rawIndexOf(g.stackedByDimension,c)),d>=0){var v=g.data.getByRawIndex(g.stackResultDimension,d);if(u>=0&&v>0||0>=u&&0>v){u+=v,f=v;break}}}return i[0]=u,i[1]=f,i});o.hostModel.setData(l),e.data=l})}function is(t,e){yo.isInstance(t)||(t=yo.seriesDataToSource(t)),this._source=t;var n=this._data=t.data,i=t.sourceFormat;i===yv&&(this._offset=0,this._dimSize=e,this._data=n);var r=Hv[i===pv?i+"_"+t.seriesLayoutBy:i];o(this,r)}function rs(){return this._data.length}function as(t){return this._data[t]}function os(t){for(var e=0;e<t.length;e++)this._data.push(t[e])}function ss(t,e,n){return null!=n?t[n]:t}function ls(t,e,n,i){return hs(t[i],this._dimensionInfos[e])}function hs(t,e){var n=e&&e.type;if("ordinal"===n){var i=e&&e.ordinalMeta;return i?i.parseAndCollect(t):t}return"time"===n&&"number"!=typeof t&&null!=t&&"-"!==t&&(t=+Ua(t)),null==t||""===t?0/0:+t}function us(t,e,n){if(t){var i=t.getRawDataItem(e);if(null!=i){var r,a,o=t.getProvider().getSource().sourceFormat,s=t.getDimensionInfo(n);return s&&(r=s.name,a=s.index),Gv[o](i,e,a,r)}}}function cs(t){return new ds(t)}function ds(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0,this.context}function fs(t,e){t._dueIndex=t._outputDueEnd=t._dueEnd=0,t._settedOutputEnd=null;var n,i;!e&&t._reset&&(n=t._reset(t.context),n&&n.progress&&(i=n.forceFirstProgress,n=n.progress)),t._progress=n;var r=t._downstream;return r&&r.dirty(),i}function ps(t){var e=t.name;Ri(t)||(t.name=gs(t)||e)}function gs(t){var e=t.getRawData(),n=e.mapDimension("seriesName",!0),i=[];return f(n,function(t){var n=e.getDimensionInfo(t);n.displayName&&i.push(n.displayName)}),i.join(" ")}function vs(t){return t.model.getRawData().count()}function ms(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),ys}function ys(t,e){t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function xs(t,e){f(t.CHANGABLE_METHODS,function(n){t.wrapMethod(n,x(_s,e))})}function _s(t){var e=ws(t);e&&e.setOutputEnd(this.count())}function ws(t){var e=(t.ecModel||{}).scheduler,n=e&&e.getPipeline(t.uid);if(n){var i=n.currentTask;if(i){var r=i.agentStubMap;r&&(i=r.get(t.uid))}return i}}function bs(){this.group=new Jd,this.uid=Oa("viewChart"),this.renderTask=cs({plan:Is,reset:Ts}),this.renderTask.context={view:this}}function Ss(t,e){if(t&&(t.trigger(e),"group"===t.type))for(var n=0;n<t.childCount();n++)Ss(t.childAt(n),e)}function Ms(t,e,n){var i=Fi(t,e);null!=i?f(Pi(i),function(e){Ss(t.getItemGraphicEl(e),n)}):t.eachItemGraphicEl(function(t){Ss(t,n)})}function Is(t){return Qv(t.model)}function Ts(t){var e=t.model,n=t.ecModel,i=t.api,r=t.payload,a=e.pipelineContext.canProgressiveRender,o=t.view,s=r&&Kv(r).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return"render"!==l&&o[l](e,n,i,r),tm[l]}function Cs(t,e,n){function i(){u=(new Date).getTime(),c=null,t.apply(o,s||[])}var r,a,o,s,l,h=0,u=0,c=null;e=e||0;var d=function(){r=(new Date).getTime(),o=this,s=arguments;var t=l||e,d=l||n;l=null,a=r-(d?h:u)-t,clearTimeout(c),d?c=setTimeout(i,t):a>=0?i():c=setTimeout(i,-a),h=r};return d.clear=function(){c&&(clearTimeout(c),c=null)},d.debounceNextCall=function(t){l=t},d}function Ds(t,e,n,i){var r=t[e];if(r){var a=r[em]||r,o=r[im],s=r[nm];if(s!==n||o!==i){if(null==n||!i)return t[e]=a;r=t[e]=Cs(a,n,"debounce"===i),r[em]=a,r[im]=i,r[nm]=n}return r}}function ks(t,e,n,i){this.ecInstance=t,this.api=e,this.unfinished,this._dataProcessorHandlers=n.slice(),this._visualHandlers=i.slice(),this._stageTaskMap=N()}function As(t,e,n,i,r){function a(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}r=r||{};var o;f(e,function(e){if(!r.visualType||r.visualType===e.visualType){var s=t._stageTaskMap.get(e.uid),l=s.seriesTaskMap,h=s.overallTask;if(h){var u,c=h.agentStubMap;c.each(function(t){a(r,t)&&(t.dirty(),u=!0)}),u&&h.dirty(),um(h,i);var d=t.getPerformArgs(h,r.block);c.each(function(t){t.perform(d)}),o|=h.perform(d)}else l&&l.each(function(s){a(r,s)&&s.dirty();var l=t.getPerformArgs(s,r.block);l.skip=!e.performRawSeries&&n.isSeriesFiltered(s.context.model),um(s,i),o|=s.perform(l)})}}),t.unfinished|=o}function Ps(t,e,n,i,r){function a(n){var a=n.uid,s=o.get(a)||o.set(a,cs({plan:Rs,reset:Ns,count:Hs}));s.context={model:n,ecModel:i,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:t},Gs(t,n,s)}var o=n.seriesTaskMap||(n.seriesTaskMap=N()),s=e.seriesType,l=e.getTargetSeries;e.createOnAllSeries?i.eachRawSeries(a):s?i.eachRawSeriesByType(s,a):l&&l(i,r).each(a);var h=t._pipelineMap;o.each(function(t,e){h.get(e)||(t.dispose(),o.removeKey(e))})}function Ls(t,e,n,i,r){function a(e){var n=e.uid,i=s.get(n)||s.set(n,cs({reset:Bs,onDirty:zs}));i.context={model:e,overallProgress:u,isOverallFilter:c},i.agent=o,i.__block=u,Gs(t,e,i)}var o=n.overallTask=n.overallTask||cs({reset:Os});o.context={ecModel:i,api:r,overallReset:e.overallReset,scheduler:t};var s=o.agentStubMap=o.agentStubMap||N(),l=e.seriesType,h=e.getTargetSeries,u=!0,c=e.isOverallFilter;l?i.eachRawSeriesByType(l,a):h?h(i,r).each(a):(u=!1,f(i.getSeries(),a));var d=t._pipelineMap;s.each(function(t,e){d.get(e)||(t.dispose(),s.removeKey(e))})}function Os(t){t.overallReset(t.ecModel,t.api,t.payload)}function Bs(t){return t.overallProgress&&Es}function Es(){this.agent.dirty(),this.getDownstream().dirty()}function zs(){this.agent&&this.agent.dirty()}function Rs(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function Ns(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=Pi(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length?Fs:void 0}function Fs(t,e){for(var n=e.data,i=e.resetDefines,r=0;r<i.length;r++){var a=i[r];if(a&&a.dataEach)for(var o=t.start;o<t.end;o++)a.dataEach(n,o);else a&&a.progress&&a.progress(t,n)}}function Hs(t){return t.data.count()}function Gs(t,e,n){var i=e.uid,r=t._pipelineMap.get(i);!r.head&&(r.head=n),r.tail&&r.tail.pipe(n),r.tail=n,n.__idxInPipeline=r.count++,n.__pipeline=r}function Ws(t){cm=null;try{t(dm,fm)}catch(e){}return cm}function Vs(t,e){for(var n in e.prototype)t[n]=H}function Xs(t){return function(e,n,i){e=e&&e.toLowerCase(),yd.prototype[t].call(this,e,n,i)}}function js(){yd.call(this)}function Ys(t,e,n){function r(t,e){return t.__prio-e.__prio}n=n||{},"string"==typeof e&&(e=qm[e]),this.id,this.group,this._dom=t;var a="canvas",o=this._zr=Ti(t,{renderer:n.renderer||a,devicePixelRatio:n.devicePixelRatio,width:n.width,height:n.height});this._throttledZrFlush=Cs(y(o.flush,o),17);var e=i(e);e&&Rv(e,!0),this._theme=e,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new No;var s=this._api=ul(this);dn(Um,r),dn(Xm,r),this._scheduler=new ks(this,s,Xm,Um),yd.call(this),this._messageCenter=new js,this._initEvents(),this.resize=y(this.resize,this),this._pendingActions=[],o.animation.on("frame",this._onframe,this),tl(o,this),E(this)}function Us(t,e,n){var i,r=this._model,a=this._coordSysMgr.getCoordinateSystems();e=Gi(r,e);for(var o=0;o<a.length;o++){var s=a[o];if(s[t]&&null!=(i=s[t](r,e,n)))return i}}function qs(t){var e=t._model,n=t._scheduler;n.restorePipelines(e),n.prepareStageTasks(),el(t,"component",e,n),el(t,"chart",e,n),n.plan()}function Zs(t,e,n,i,r){function a(i){i&&i.__alive&&i[e]&&i[e](i.__model,o,t._api,n)}var o=t._model;if(!i)return void wm(t._componentsViews.concat(t._chartsViews),a);var s={};s[i+"Id"]=n[i+"Id"],s[i+"Index"]=n[i+"Index"],s[i+"Name"]=n[i+"Name"];var l={mainType:i,query:s};r&&(l.subType=r),o&&o.eachComponent(l,function(e){a(t["series"===i?"_chartsMap":"_componentsMap"][e.__viewId])},t)}function $s(t,e){var n=t._chartsMap,i=t._scheduler;e.eachSeries(function(t){i.updateStreamModes(t,n[t.__viewId])})}function Ks(t,e){var n=t.type,i=t.escapeConnect,r=Wm[n],a=r.actionInfo,l=(a.update||"update").split(":"),h=l.pop();l=null!=l[0]&&Mm(l[0]),this[zm]=!0;var u=[t],c=!1;t.batch&&(c=!0,u=p(t.batch,function(e){return e=s(o({},e),t),e.batch=null,e}));var d,f=[],g="highlight"===n||"downplay"===n;wm(u,function(t){d=r.action(t,this._model,this._api),d=d||o({},t),d.type=a.event||d.type,f.push(d),g?Zs(this,h,t,"series"):l&&Zs(this,h,t,l.main,l.sub)},this),"none"===h||g||l||(this[Rm]?(qs(this),Hm.update.call(this,t),this[Rm]=!1):Hm[h].call(this,t)),d=c?{type:a.event||n,escapeConnect:i,batch:f}:f[0],this[zm]=!1,!e&&this._messageCenter.trigger(d.type,d)}function Qs(t){for(var e=this._pendingActions;e.length;){var n=e.shift();Ks.call(this,n,t)}}function Js(t){!t&&this.trigger("updated")}function tl(t,e){t.on("rendered",function(){e.trigger("rendered"),!t.animation.isFinished()||e[Rm]||e._scheduler.unfinished||e._pendingActions.length||e.trigger("finished")})}function el(t,e,n,i){function r(t){var e="_ec_"+t.id+"_"+t.type,r=s[e];if(!r){var u=Mm(t.type),c=a?qv.getClass(u.main,u.sub):bs.getClass(u.sub);r=new c,r.init(n,h),s[e]=r,o.push(r),l.add(r.group)}t.__viewId=r.__id=e,r.__alive=!0,r.__model=t,r.group.__ecComponentInfo={mainType:t.mainType,index:t.componentIndex},!a&&i.prepareView(r,t,n,h)}for(var a="component"===e,o=a?t._componentsViews:t._chartsViews,s=a?t._componentsMap:t._chartsMap,l=t._zr,h=t._api,u=0;u<o.length;u++)o[u].__alive=!1;a?n.eachComponent(function(t,e){"series"!==t&&r(e)}):n.eachSeries(r);for(var u=0;u<o.length;){var c=o[u];c.__alive?u++:(!a&&c.renderTask.dispose(),l.remove(c.group),c.dispose(n,h),o.splice(u,1),delete s[c.__id],c.__id=c.group.__ecComponentInfo=null)}}function nl(t){t.clearColorPalette(),t.eachSeries(function(t){t.clearColorPalette()})}function il(t,e,n,i){rl(t,e,n,i),wm(t._chartsViews,function(t){t.__alive=!1}),al(t,e,n,i),wm(t._chartsViews,function(t){t.__alive||t.remove(e,n)})}function rl(t,e,n,i,r){wm(r||t._componentsViews,function(t){var r=t.__model;t.render(r,e,n,i),hl(r,t)})}function al(t,e,n,i,r){var a,o=t._scheduler;e.eachSeries(function(e){var n=t._chartsMap[e.__viewId];n.__alive=!0;var s=n.renderTask;o.updatePayload(s,i),r&&r.get(e.uid)&&s.dirty(),a|=s.perform(o.getPerformArgs(s)),n.group.silent=!!e.get("silent"),hl(e,n),ll(e,n)}),o.unfinished|=a,sl(t._zr,e),om(t._zr.dom,e)}function ol(t,e){wm(Ym,function(n){n(t,e)})}function sl(t,e){var n=t.storage,i=0;n.traverse(function(t){t.isGroup||i++}),i>e.get("hoverLayerThreshold")&&!$c.node&&n.traverse(function(t){t.isGroup||(t.useHoverLayer=!0)})}function ll(t,e){var n=t.get("blendMode")||null;e.group.traverse(function(t){t.isGroup||t.style.blend!==n&&t.setStyle("blend",n),t.eachPendingDisplayable&&t.eachPendingDisplayable(function(t){t.setStyle("blend",n)})})}function hl(t,e){var n=t.get("z"),i=t.get("zlevel");e.group.traverse(function(t){"group"!==t.type&&(null!=n&&(t.z=n),null!=i&&(t.zlevel=i))})}function ul(t){var e=t._coordSysMgr;return o(new Ro(t),{getCoordinateSystems:y(e.getCoordinateSystems,e),getComponentByElement:function(e){for(;e;){var n=e.__ecComponentInfo;if(null!=n)return t._model.getComponent(n.mainType,n.index);e=e.parent}}})}function cl(t){function e(t,e){for(var n=0;n<t.length;n++){var i=t[n];i[a]=e}}var n=0,i=1,r=2,a="__connectUpdateStatus";wm(Vm,function(o,s){t._messageCenter.on(s,function(o){if(Km[t.group]&&t[a]!==n){if(o&&o.escapeConnect)return;var s=t.makeActionFromEvent(o),l=[];wm($m,function(e){e!==t&&e.group===t.group&&l.push(e)}),e(l,n),wm(l,function(t){t[a]!==i&&t.dispatchAction(s)}),e(l,r)}})})}function dl(t,e,n){var i=vl(t);if(i)return i;var r=new Ys(t,e,n);return r.id="ec_"+Qm++,$m[r.id]=r,Vi(t,ty,r.id),cl(r),r}function fl(t){if(_(t)){var e=t;t=null,wm(e,function(e){null!=e.group&&(t=e.group)}),t=t||"g_"+Jm++,wm(e,function(e){e.group=t})}return Km[t]=!0,t}function pl(t){Km[t]=!1}function gl(t){"string"==typeof t?t=$m[t]:t instanceof Ys||(t=vl(t)),t instanceof Ys&&!t.isDisposed()&&t.dispose()}function vl(t){return $m[Xi(t,ty)]}function ml(t){return $m[t]}function yl(t,e){qm[t]=e}function xl(t){jm.push(t)}function _l(t,e){Cl(Xm,t,e,Dm)}function wl(t){Ym.push(t)}function bl(t,e,n){"function"==typeof e&&(n=e,e="");var i=Sm(t)?t.type:[t,t={event:e}][0];t.event=(t.event||i).toLowerCase(),e=t.event,_m(Nm.test(i)&&Nm.test(e)),Wm[i]||(Wm[i]={action:n,actionInfo:t}),Vm[e]=i}function Sl(t,e){No.register(t,e)}function Ml(t){var e=No.get(t);return e?e.getDimensionsInfo?e.getDimensionsInfo():e.dimensions.slice():void 0}function Il(t,e){Cl(Um,t,e,Am,"layout")}function Tl(t,e){Cl(Um,t,e,Lm,"visual")}function Cl(t,e,n,i,r){(bm(e)||Sm(e))&&(n=e,e=i);var a=ks.wrapStageHandler(n,r);return a.__prio=e,a.__raw=n,t.push(a),a}function Dl(t,e){Zm[t]=e}function kl(t){return sv.extend(t)}function Al(t){return qv.extend(t)}function Pl(t){return Uv.extend(t)}function Ll(t){return bs.extend(t)}function Ol(t){n("createCanvas",t)}function Bl(t,e,n){e.geoJson&&!e.features&&(n=e.specialAreas,e=e.geoJson),"string"==typeof e&&(e="undefined"!=typeof JSON&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")()),ey[t]={geoJson:e,specialAreas:n}}function El(t){return ey[t]}function zl(t){return t}function Rl(t,e,n,i,r){this._old=t,this._new=e,this._oldKeyGetter=n||zl,this._newKeyGetter=i||zl,this.context=r}function Nl(t,e,n,i,r){for(var a=0;a<t.length;a++){var o="_ec_"+r[i](t[a],a),s=e[o];null==s?(n.push(o),e[o]=a):(s.length||(e[o]=s=[s]),s.push(a))}}function Fl(t){var e={},n=e.encode={},i=N(),r=[];f(t.dimensions,function(e){var a=t.getDimensionInfo(e),o=a.coordDim;if(o){var s=n[o];n.hasOwnProperty(o)||(s=n[o]=[]),s[a.coordDimIndex]=e,a.isExtraCoord||(i.set(o,1),Gl(a.type)&&(r[0]=e))}ry.each(function(t,e){var i=n[e];n.hasOwnProperty(e)||(i=n[e]=[]);var r=a.otherDims[e];null!=r&&r!==!1&&(i[r]=a.name)})});var a=[],o={};i.each(function(t,e){var i=n[e];o[e]=i[0],a=a.concat(i)}),e.dataDimsOnCoord=a,e.encodeFirstDimNotExtra=o;var s=n.label;s&&s.length&&(r=s.slice());var l=r.slice(),h=n.tooltip;return h&&h.length&&(l=h.slice()),n.defaultedLabel=r,n.defaultedTooltip=l,e}function Hl(t){return"category"===t?"ordinal":"time"===t?"time":"float"}function Gl(t){return!("ordinal"===t||"time"===t)}function Wl(t){return t._rawCount>65535?uy:cy}function Vl(t){var e=t.constructor;return e===Array?t.slice():new e(t)}function Xl(t,e){f(dy.concat(e.__wrappedMethods||[]),function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t.__wrappedMethods=e.__wrappedMethods}function jl(t){var e=t._invertedIndicesMap;f(e,function(n,i){var r=t._dimensionInfos[i],a=r.ordinalMeta;if(a){n=e[i]=new uy(a.categories.length);for(var o=0;o<n.length;o++)n[o]=0/0;for(var o=0;o<t._count;o++)n[t.get(i,o)]=o}})}function Yl(t){return t}function Ul(t){return t<this._count&&t>=0?this._indices[t]:-1}function ql(t,e){var n=t._idList[e];return null==n&&(n=t._getIdFromStore(e)),null==n&&(n=ly+e),n}function Zl(t){return _(t)||(t=[t]),t}function $l(t,e){var n=t.dimensions,i=new fy(p(n,t.getDimensionInfo,t),t.hostModel);Xl(i,t);for(var r=i._storage={},a=t._storage,s=o({},t._rawExtent),l=0;l<n.length;l++){var u=n[l];a[u]&&(h(e,u)>=0?(r[u]=Kl(a[u]),s[u]=Ql()):r[u]=a[u])}return i}function Kl(t){for(var e=new Array(t.length),n=0;n<t.length;n++)e[n]=Vl(t[n]);return e}function Ql(){return[1/0,-1/0]}function Jl(t,e,n){function r(t,e,n){null!=ry.get(e)?t.otherDims[e]=n:(t.coordDim=e,t.coordDimIndex=n,u.set(e,!0))}yo.isInstance(e)||(e=yo.seriesDataToSource(e)),n=n||{},t=(t||[]).slice();for(var a=(n.dimsDef||[]).slice(),l=N(n.encodeDef),h=N(),u=N(),c=[],d=th(e,t,a,n.dimCount),p=0;d>p;p++){var g=a[p]=o({},S(a[p])?a[p]:{name:a[p]}),v=g.name,m=c[p]={otherDims:{}};null!=v&&null==h.get(v)&&(m.name=m.displayName=v,h.set(v,p)),null!=g.type&&(m.type=g.type),null!=g.displayName&&(m.displayName=g.displayName)}l.each(function(t,e){t=Pi(t).slice();var n=l.set(e,[]);f(t,function(t,i){b(t)&&(t=h.get(t)),null!=t&&d>t&&(n[i]=t,r(c[t],e,i))})});var y=0;f(t,function(t){var e,t,n,a;if(b(t))e=t,t={};else{e=t.name;var o=t.ordinalMeta;t.ordinalMeta=null,t=i(t),t.ordinalMeta=o,n=t.dimsDef,a=t.otherDims,t.name=t.coordDim=t.coordDimIndex=t.dimsDef=t.otherDims=null}var h=Pi(l.get(e));if(!h.length)for(var u=0;u<(n&&n.length||1);u++){for(;y<c.length&&null!=c[y].coordDim;)y++;y<c.length&&h.push(y++)}f(h,function(i,o){var l=c[i];r(s(l,t),e,o),null==l.name&&n&&(l.name=l.displayName=n[o]),a&&s(l.otherDims,a)})});var x=n.generateCoord,_=n.generateCoordCount,w=null!=_;_=x?_||1:0;for(var M=x||"value",I=0;d>I;I++){var m=c[I]=c[I]||{},T=m.coordDim;null==T&&(m.coordDim=eh(M,u,w),m.coordDimIndex=0,(!x||0>=_)&&(m.isExtraCoord=!0),_--),null==m.name&&(m.name=eh(m.coordDim,h)),null==m.type&&Do(e,I,m.name)&&(m.type="ordinal")}return c}function th(t,e,n,i){var r=Math.max(t.dimensionsDetectCount||1,e.length,n.length,i||0);return f(e,function(t){var e=t.dimsDef;e&&(r=Math.max(r,e.length))}),r}function eh(t,e,n){if(n||null!=e.get(t)){for(var i=0;null!=e.get(t+i);)i++;t+=i}return e.set(t,!0),t}function nh(t,e,n){n=n||{};var i,r,a,o,s=n.byIndex,l=n.stackedCoordDimension,h=!(!t||!t.get("stack"));if(f(e,function(t,n){b(t)&&(e[n]=t={name:t}),h&&!t.isExtraCoord&&(s||i||!t.ordinalMeta||(i=t),r||"ordinal"===t.type||"time"===t.type||l&&l!==t.coordDim||(r=t))}),r&&(s||i)){a="__\x00ecstackresult",o="__\x00ecstackedover",i&&(i.createInvertedIndices=!0);var u=r.coordDim,c=r.type,d=0;f(e,function(t){t.coordDim===u&&d++}),e.push({name:a,coordDim:u,coordDimIndex:d,type:c,isExtraCoord:!0,isCalculationCoord:!0}),d++,e.push({name:o,coordDim:o,coordDimIndex:d,type:c,isExtraCoord:!0,isCalculationCoord:!0})}return{stackedDimension:r&&r.name,stackedByDimension:i&&i.name,isStackedByIndex:s,stackedOverDimension:o,stackResultDimension:a}}function ih(t,e,n){return e&&e===t.getCalculationInfo("stackedDimension")&&(null!=n?n===t.getCalculationInfo("stackedByDimension"):t.getCalculationInfo("isStackedByIndex"))}function rh(t,e,n){n=n||{},yo.isInstance(t)||(t=yo.seriesDataToSource(t));var i,r=e.get("coordinateSystem"),a=No.get(r),o=vo(e);o&&(i=p(o.coordSysDims,function(t){var e={name:t},n=o.axisMap.get(t);if(n){var i=n.get("type");e.type=Hl(i)}return e})),i||(i=a&&(a.getDimensionsInfo?a.getDimensionsInfo():a.dimensions.slice())||["x","y"]);var s,l,h=vy(t,{coordDimensions:i,generateCoord:n.generateCoord});o&&f(h,function(t,e){var n=t.coordDim,i=o.categoryAxisMap.get(n);i&&(null==s&&(s=e),t.ordinalMeta=i.getOrdinalMeta()),null!=t.otherDims.itemName&&(l=!0)}),l||null==s||(h[s].otherDims.itemName=0);var u=nh(e,h),c=new fy(h,e);c.setCalculationInfo(u);var d=null!=s&&ah(t)?function(t,e,n,i){return i===s?n:this.defaultDimValueGetter(t,e,n,i)}:null;return c.hasItemOption=!1,c.initData(t,null,d),c}function ah(t){if(t.sourceFormat===fv){var e=oh(t.data||[]);return null!=e&&!_(Oi(e))}}function oh(t){for(var e=0;e<t.length&&null==t[e];)e++;return t[e]}function sh(t){this._setting=t||{},this._extent=[1/0,-1/0],this._interval=0,this.init&&this.init.apply(this,arguments)}function lh(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this._map}function hh(t){return t._map||(t._map=N(t.categories))}function uh(t){return S(t)&&null!=t.value?t.value:t+""}function ch(t,e,n,i){var r={},a=t[1]-t[0],o=r.interval=$a(a/e,!0);null!=n&&n>o&&(o=r.interval=n),null!=i&&o>i&&(o=r.interval=i);var s=r.intervalPrecision=dh(o),l=r.niceTickExtent=[_y(Math.ceil(t[0]/o)*o,s),_y(Math.floor(t[1]/o)*o,s)];return ph(l,t),r}function dh(t){return Wa(t)+2}function fh(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function ph(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),fh(t,0,e),fh(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function gh(t,e,n,i){var r=[];if(!t)return r;var a=1e4;e[0]<n[0]&&r.push(e[0]);for(var o=n[0];o<=n[1]&&(r.push(o),o=_y(o+t,i),o!==r[r.length-1]);)if(r.length>a)return[];return e[1]>(r.length?r[r.length-1]:n[1])&&r.push(e[1]),r}function vh(t){return t.get("stack")||Sy+t.seriesIndex}function mh(t){return t.dim+t.index}function yh(t,e){var n=p(t,function(t){var e=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),r=i.getExtent(),a="category"===i.type?i.getBandWidth():Math.abs(r[1]-r[0])/e.count(),o=Na(t.get("barWidth"),a),s=Na(t.get("barMaxWidth"),a),l=t.get("barGap"),h=t.get("barCategoryGap");return{bandWidth:a,barWidth:o,barMaxWidth:s,barGap:l,barCategoryGap:h,axisKey:mh(i),stackId:vh(t)}});return xh(n,e)}function xh(t){var e={};f(t,function(t){var n=t.axisKey,i=t.bandWidth,r=e[n]||{bandWidth:i,remainedWidth:i,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},a=r.stacks;e[n]=r;var o=t.stackId;a[o]||r.autoWidthCount++,a[o]=a[o]||{width:0,maxWidth:0};var s=t.barWidth;s&&!a[o].width&&(a[o].width=s,s=Math.min(r.remainedWidth,s),r.remainedWidth-=s);var l=t.barMaxWidth;l&&(a[o].maxWidth=l);var h=t.barGap;null!=h&&(r.gap=h);var u=t.barCategoryGap;null!=u&&(r.categoryGap=u)});var n={};return f(e,function(t,e){n[e]={};var i=t.stacks,r=t.bandWidth,a=Na(t.categoryGap,r),o=Na(t.gap,1),s=t.remainedWidth,l=t.autoWidthCount,h=(s-a)/(l+(l-1)*o);h=Math.max(h,0),f(i,function(t){var e=t.maxWidth;e&&h>e&&(e=Math.min(e,s),t.width&&(e=Math.min(e,t.width)),s-=e,t.width=e,l--)}),h=(s-a)/(l+(l-1)*o),h=Math.max(h,0);var u,c=0;f(i,function(t){t.width||(t.width=h),u=t,c+=t.width*(1+o)}),u&&(c-=u.width*o);var d=-c/2;f(i,function(t,i){n[e][i]=n[e][i]||{offset:d,width:t.width},d+=t.width*(1+o)})}),n}function _h(t,e){return Ry(t,zy(e))}function wh(t,e){var n,i,r,a=t.type,o=e.getMin(),s=e.getMax(),l=null!=o,h=null!=s,u=t.getExtent();"ordinal"===a?n=e.getCategories().length:(i=e.get("boundaryGap"),_(i)||(i=[i||0,i||0]),"boolean"==typeof i[0]&&(i=[0,0]),i[0]=Na(i[0],1),i[1]=Na(i[1],1),r=u[1]-u[0]||Math.abs(u[0])),null==o&&(o="ordinal"===a?n?0:0/0:u[0]-i[0]*r),null==s&&(s="ordinal"===a?n?n-1:0/0:u[1]+i[1]*r),"dataMin"===o?o=u[0]:"function"==typeof o&&(o=o({min:u[0],max:u[1]})),"dataMax"===s?s=u[1]:"function"==typeof s&&(s=s({min:u[0],max:u[1]})),(null==o||!isFinite(o))&&(o=0/0),(null==s||!isFinite(s))&&(s=0/0),t.setBlank(C(o)||C(s)),e.getNeedCrossZero()&&(o>0&&s>0&&!l&&(o=0),0>o&&0>s&&!h&&(s=0));var c=e.ecModel;if(c&&"time"===a){var d,f=[];if(c.eachSeriesByType("bar",function(t){t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type&&(f.push(t),d|=t.getBaseAxis()===e.axis)}),d){var p=bh(o,s,e,f);o=p.min,s=p.max}}return[o,s]}function bh(t,e,n,i){var r=n.axis.getExtent(),a=r[1]-r[0],o=yh(i),s=n.axis.dim+n.axis.index,l=o[s];if(void 0===l)return{min:t,max:e};var h=1/0;f(l,function(t){h=Math.min(t.offset,h)});var u=-1/0;f(l,function(t){u=Math.max(t.offset+t.width,u)}),h=Math.abs(h),u=Math.abs(u);var c=h+u,d=e-t,p=1-(h+u)/a,g=d/p-d;return e+=g*(u/c),t-=g*(h/c),{min:t,max:e}}function Sh(t,e){var n=wh(t,e),i=null!=e.getMin(),r=null!=e.getMax(),a=e.get("splitNumber");"log"===t.type&&(t.base=e.get("logBase")); | |
| 4 | +var o=t.type;t.setExtent(n[0],n[1]),t.niceExtent({splitNumber:a,fixMin:i,fixMax:r,minInterval:"interval"===o||"time"===o?e.get("minInterval"):null,maxInterval:"interval"===o||"time"===o?e.get("maxInterval"):null});var s=e.get("interval");null!=s&&t.setInterval&&t.setInterval(s)}function Mh(t,e){if(e=e||t.get("type"))switch(e){case"category":return new xy(t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),[1/0,-1/0]);case"value":return new by;default:return(sh.getClass(e)||by).create(t)}}function Ih(t){var e=t.scale.getExtent(),n=e[0],i=e[1];return!(n>0&&i>0||0>n&&0>i)}function Th(t,e,n,i,r){var a,o=0,s=0,l=(i-r)/180*Math.PI,h=1;e.length>40&&(h=Math.floor(e.length/40));for(var u=0;u<t.length;u+=h){var c=t[u],d=Sn(e[u],n,"center","top");d.x+=c*Math.cos(l),d.y+=c*Math.sin(l),d.width*=1.3,d.height*=1.3,a?a.intersect(d)?(s++,o=Math.max(o,s)):(a.union(d),s=0):a=d.clone()}return 0===o&&h>1?h:(o+1)*h-1}function Ch(t,e){var n=t.scale,i=n.getTicksLabels(),r=n.getTicks();return"string"==typeof e?(e=function(t){return function(e){return t.replace("{value}",null!=e?e:"")}}(e),p(i,e)):"function"==typeof e?p(r,function(n,i){return e(Dh(t,n),i)},this):i}function Dh(t,e){return"category"===t.type?t.scale.getLabel(e):e}function kh(t,e){if("image"!==this.type){var n=this.style,i=this.shape;i&&"line"===i.symbolType?n.stroke=t:this.__isEmptyBrush?(n.stroke=t,n.fill=e||"#fff"):(n.fill&&(n.fill=t),n.stroke&&(n.stroke=t)),this.dirty(!1)}}function Ah(t,e,n,i,r,a,o){var s=0===t.indexOf("empty");s&&(t=t.substr(5,1).toLowerCase()+t.substr(6));var l;return l=0===t.indexOf("image://")?jr(t.slice(8),new rn(e,n,i,r),o?"center":"cover"):0===t.indexOf("path://")?Xr(t.slice(7),{},new rn(e,n,i,r),o?"center":"cover"):new Ky({shape:{symbolType:t,x:e,y:n,width:i,height:r}}),l.__isEmptyBrush=s,l.setColor=kh,l.setColor(a),l}function Ph(t){return rh(t.getSource(),t)}function Lh(t,e){var n=e;Aa.isInstance(e)||(n=new Aa(e),c(n,Vy));var i=Mh(n);return i.setExtent(t[0],t[1]),Sh(i,n),i}function Oh(t){c(t,Vy)}function Bh(t,e){return Math.abs(t-e)<tx}function Eh(t,e,n){var i=0,r=t[0];if(!r)return!1;for(var a=1;a<t.length;a++){var o=t[a];i+=br(r[0],r[1],o[0],o[1],e,n),r=o}var s=t[0];return Bh(r[0],s[0])&&Bh(r[1],s[1])||(i+=br(r[0],r[1],s[0],s[1],e,n)),0!==i}function zh(t,e,n){if(this.name=t,this.geometries=e,n)n=[n[0],n[1]];else{var i=this.getBoundingRect();n=[i.x+i.width/2,i.y+i.height/2]}this.center=n}function Rh(t){if(!t.UTF8Encoding)return t;var e=t.UTF8Scale;null==e&&(e=1024);for(var n=t.features,i=0;i<n.length;i++)for(var r=n[i],a=r.geometry,o=a.coordinates,s=a.encodeOffsets,l=0;l<o.length;l++){var h=o[l];if("Polygon"===a.type)o[l]=Nh(h,s[l],e);else if("MultiPolygon"===a.type)for(var u=0;u<h.length;u++){var c=h[u];h[u]=Nh(c,s[l][u],e)}}return t.UTF8Encoding=!1,t}function Nh(t,e,n){for(var i=[],r=e[0],a=e[1],o=0;o<t.length;o+=2){var s=t.charCodeAt(o)-64,l=t.charCodeAt(o+1)-64;s=s>>1^-(1&s),l=l>>1^-(1&l),s+=r,l+=a,r=s,a=l,i.push([s/n,l/n])}return i}function Fh(t,e){var n=t[1]-t[0],i=e,r=n/i/2;t[0]+=r,t[1]-=r}function Hh(t,e){var n=t.mapDimension("defaultedLabel",!0),i=n.length;if(1===i)return us(t,e,n[0]);if(i){for(var r=[],a=0;a<n.length;a++){var o=us(t,e,n[a]);r.push(o)}return r.join(" ")}}function Gh(t,e){var n=t.getItemVisual(e,"symbolSize");return n instanceof Array?n.slice():[+n,+n]}function Wh(t){return[t[0]/2,t[1]/2]}function Vh(t,e,n){Jd.call(this),this.updateData(t,e,n)}function Xh(t,e){this.parent.drift(t,e)}function jh(t){this.group=new Jd,this._symbolCtor=t||Vh}function Yh(t,e,n,i){return!(!e||isNaN(e[0])||isNaN(e[1])||i.isIgnore&&i.isIgnore(n)||i.clipShape&&!i.clipShape.contain(e[0],e[1])||"none"===t.getItemVisual(n,"symbol"))}function Uh(t){return null==t||S(t)||(t={isIgnore:t}),t||{}}function qh(t){var e=t.hostModel;return{itemStyle:e.getModel("itemStyle").getItemStyle(["color"]),hoverItemStyle:e.getModel("emphasis.itemStyle").getItemStyle(),symbolRotate:e.get("symbolRotate"),symbolOffset:e.get("symbolOffset"),hoverAnimation:e.get("hoverAnimation"),labelModel:e.getModel("label"),hoverLabelModel:e.getModel("emphasis.label"),cursorStyle:e.get("cursor")}}function Zh(t,e,n){var i=t.getBaseAxis(),r=t.getOtherAxis(i),a=$h(r,n),o=i.dim,s=r.dim,l=e.mapDimension(s),h=e.mapDimension(o),u="x"===s||"radius"===s?1:0,c=ih(e,l,h),d=p(t.dimensions,function(t){return e.mapDimension(t)});return{dataDimsForPoint:d,valueStart:a,valueAxisDim:s,baseAxisDim:o,stacked:c,valueDim:l,baseDim:h,baseDataOffset:u,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function $h(t,e){var n=0,i=t.scale.getExtent();return"start"===e?n=i[0]:"end"===e?n=i[1]:i[0]>0?n=i[0]:i[1]<0&&(n=i[1]),n}function Kh(t,e,n,i){var r=0/0;t.stacked&&(r=n.get(n.getCalculationInfo("stackedOverDimension"),i)),isNaN(r)&&(r=t.valueStart);var a=t.baseDataOffset,o=[];return o[a]=n.get(t.baseDim,i),o[1-a]=r,e.dataToPoint(o)}function Qh(t,e){var n=[];return e.diff(t).add(function(t){n.push({cmd:"+",idx:t})}).update(function(t,e){n.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){n.push({cmd:"-",idx:t})}).execute(),n}function Jh(t){return isNaN(t[0])||isNaN(t[1])}function tu(t,e,n,i,r,a,o,s,l,h,u){return null==h?eu(e,"x")?nu(t,e,n,i,r,a,o,s,l,"x",u):eu(e,"y")?nu(t,e,n,i,r,a,o,s,l,"y",u):iu.apply(this,arguments):"none"!==h&&eu(e,h)?nu.apply(this,arguments):iu.apply(this,arguments)}function eu(t,e){if(t.length<=1)return!0;for(var n="x"===e?0:1,i=t[0][n],r=0,a=1;a<t.length;++a){var o=t[a][n]-i;if(!isNaN(o)&&!isNaN(r)&&0!==o&&0!==r&&o>=0!=r>=0)return!1;isNaN(o)||0===o||(r=o,i=t[a][n])}return!0}function nu(t,e,n,i,r,a,o,s,l,h,u){for(var c=0,d=n,f=0;i>f;f++){var p=e[d];if(d>=r||0>d)break;if(Jh(p)){if(u){d+=a;continue}break}if(d===n)t[a>0?"moveTo":"lineTo"](p[0],p[1]);else if(l>0){var g=e[c],v="y"===h?1:0,m=(p[v]-g[v])*l;mx(xx,g),xx[v]=g[v]+m,mx(_x,p),_x[v]=p[v]-m,t.bezierCurveTo(xx[0],xx[1],_x[0],_x[1],p[0],p[1])}else t.lineTo(p[0],p[1]);c=d,d+=a}return f}function iu(t,e,n,i,r,a,o,s,l,h,u){for(var c=0,d=n,f=0;i>f;f++){var p=e[d];if(d>=r||0>d)break;if(Jh(p)){if(u){d+=a;continue}break}if(d===n)t[a>0?"moveTo":"lineTo"](p[0],p[1]),mx(xx,p);else if(l>0){var g=d+a,v=e[g];if(u)for(;v&&Jh(e[g]);)g+=a,v=e[g];var m=.5,y=e[c],v=e[g];if(!v||Jh(v))mx(_x,p);else{Jh(v)&&!u&&(v=p),U(yx,v,y);var x,_;if("x"===h||"y"===h){var w="x"===h?0:1;x=Math.abs(p[w]-y[w]),_=Math.abs(p[w]-v[w])}else x=pd(p,y),_=pd(p,v);m=_/(_+x),vx(_x,p,yx,-l*(1-m))}px(xx,xx,s),gx(xx,xx,o),px(_x,_x,s),gx(_x,_x,o),t.bezierCurveTo(xx[0],xx[1],_x[0],_x[1],p[0],p[1]),vx(xx,p,yx,l*m)}else t.lineTo(p[0],p[1]);c=d,d+=a}return f}function ru(t,e){var n=[1/0,1/0],i=[-1/0,-1/0];if(e)for(var r=0;r<t.length;r++){var a=t[r];a[0]<n[0]&&(n[0]=a[0]),a[1]<n[1]&&(n[1]=a[1]),a[0]>i[0]&&(i[0]=a[0]),a[1]>i[1]&&(i[1]=a[1])}return{min:e?n:i,max:e?i:n}}function au(t,e){if(t.length===e.length){for(var n=0;n<t.length;n++){var i=t[n],r=e[n];if(i[0]!==r[0]||i[1]!==r[1])return}return!0}}function ou(t){return"number"==typeof t?t:t?.5:0}function su(t){var e=t.getGlobalExtent();if(t.onBand){var n=t.getBandWidth()/2-1,i=e[1]>e[0]?1:-1;e[0]+=i*n,e[1]-=i*n}return e}function lu(t,e,n){if(!n.valueDim)return[];for(var i=[],r=0,a=e.count();a>r;r++)i.push(Kh(n,t,e,r));return i}function hu(t,e,n){var i=su(t.getAxis("x")),r=su(t.getAxis("y")),a=t.getBaseAxis().isHorizontal(),o=Math.min(i[0],i[1]),s=Math.min(r[0],r[1]),l=Math.max(i[0],i[1])-o,h=Math.max(r[0],r[1])-s,u=n.get("lineStyle.width")||2,c=n.get("clipOverflow")?u/2:Math.max(l,h);a?(s-=c,h+=2*c):(o-=c,l+=2*c);var d=new bg({shape:{x:o,y:s,width:l,height:h}});return e&&(d.shape[a?"width":"height"]=0,ba(d,{shape:{width:l,height:h}},n)),d}function uu(t,e,n){var i=t.getAngleAxis(),r=t.getRadiusAxis(),a=r.getExtent(),o=i.getExtent(),s=Math.PI/180,l=new vg({shape:{cx:t.cx,cy:t.cy,r0:a[0],r:a[1],startAngle:-o[0]*s,endAngle:-o[1]*s,clockwise:i.inverse}});return e&&(l.shape.endAngle=-o[0]*s,ba(l,{shape:{endAngle:-o[1]*s}},n)),l}function cu(t,e,n){return"polar"===t.type?uu(t,e,n):hu(t,e,n)}function du(t,e,n){for(var i=e.getBaseAxis(),r="x"===i.dim||"radius"===i.dim?0:1,a=[],o=0;o<t.length-1;o++){var s=t[o+1],l=t[o];a.push(l);var h=[];switch(n){case"end":h[r]=s[r],h[1-r]=l[1-r],a.push(h);break;case"middle":var u=(l[r]+s[r])/2,c=[];h[r]=c[r]=u,h[1-r]=l[1-r],c[1-r]=s[1-r],a.push(h),a.push(c);break;default:h[r]=l[r],h[1-r]=s[1-r],a.push(h)}}return t[o]&&a.push(t[o]),a}function fu(t,e){var n=t.getVisual("visualMeta");if(n&&n.length&&t.count()&&"cartesian2d"===e.type){for(var i,r,a=n.length-1;a>=0;a--){var o=n[a].dimension,s=t.dimensions[o],l=t.getDimensionInfo(s);if(i=l&&l.coordDim,"x"===i||"y"===i){r=n[a];break}}if(r){var h=e.getAxis(i),u=p(r.stops,function(t){return{coord:h.toGlobalCoord(h.dataToCoord(t.value)),color:t.color}}),c=u.length,d=r.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),d.reverse());var g=10,v=u[0].coord-g,m=u[c-1].coord+g,y=m-v;if(.001>y)return"transparent";f(u,function(t){t.offset=(t.coord-v)/y}),u.push({offset:c?u[c-1].offset:.5,color:d[1]||"transparent"}),u.unshift({offset:c?u[0].offset:.5,color:d[0]||"transparent"});var x=new kg(0,0,0,0,u,!0);return x[i]=v,x[i+"2"]=m,x}}}function pu(t){return this._axes[t]}function gu(t){kx.call(this,t)}function vu(t,e){return e.type||(e.data?"category":"value")}function mu(t,e){return t.getCoordSysModel()===e}function yu(t,e){var n=e*Math.PI/180,i=t.plain(),r=i.width,a=i.height,o=r*Math.cos(n)+a*Math.sin(n),s=r*Math.sin(n)+a*Math.cos(n),l=new rn(i.x,i.y,o,s);return l}function xu(t){var e,n=t.model,i=n.get("axisLabel.show")?n.getFormattedLabels():[],r=n.getModel("axisLabel"),a=1,o=i.length;o>40&&(a=Math.ceil(o/40));for(var s=0;o>s;s+=a)if(!t.isLabelIgnored(s)){var l=r.getTextRect(i[s]),h=yu(l,r.get("rotate")||0);e?e.union(h):e=h}return e}function _u(t,e,n){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,n),this.model=t}function wu(t,e,n){var i=t[e];if(n.onZero){var r=n.onZeroAxisIndex;if(null!=r){var a=i[r];return void(a&&bu(a)&&(n.onZero=!1))}for(var o in i)if(i.hasOwnProperty(o)){var a=i[o];if(a&&!bu(a)){r=+o;break}}null==r&&(n.onZero=!1),n.onZeroAxisIndex=r}}function bu(t){return"category"===t.type||"time"===t.type||!Nx(t)}function Su(t,e){var n=t.getExtent(),i=n[0]+n[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return i-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return i-t+e}}function Mu(t){return p(Gx,function(e){var n=t.getReferringComponents(e)[0];return n})}function Iu(t){return"cartesian2d"===t.get("coordinateSystem")}function Tu(t){var e={componentType:t.mainType};return e[t.mainType+"Index"]=t.componentIndex,e}function Cu(t,e,n,i){var r,a,o=ja(n-t.rotation),s=i[0]>i[1],l="start"===e&&!s||"start"!==e&&s;return Ya(o-Wx/2)?(a=l?"bottom":"top",r="center"):Ya(o-1.5*Wx)?(a=l?"top":"bottom",r="center"):(a="middle",r=1.5*Wx>o&&o>Wx/2?l?"left":"right":l?"right":"left"),{rotation:o,textAlign:r,textVerticalAlign:a}}function Du(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)}function ku(t,e,n){var i=t.get("axisLabel.showMinLabel"),r=t.get("axisLabel.showMaxLabel");e=e||[],n=n||[];var a=e[0],o=e[1],s=e[e.length-1],l=e[e.length-2],h=n[0],u=n[1],c=n[n.length-1],d=n[n.length-2];i===!1?(Au(a),Au(h)):Pu(a,o)&&(i?(Au(o),Au(u)):(Au(a),Au(h))),r===!1?(Au(s),Au(c)):Pu(l,s)&&(r?(Au(l),Au(d)):(Au(s),Au(c)))}function Au(t){t&&(t.ignore=!0)}function Pu(t,e){var n=t&&t.getBoundingRect().clone(),i=e&&e.getBoundingRect().clone();if(n&&i){var r=pe([]);return ye(r,r,-t.rotation),n.applyTransform(ve([],r,t.getLocalTransform())),i.applyTransform(ve([],r,e.getLocalTransform())),n.intersect(i)}}function Lu(t){return"middle"===t||"center"===t}function Ou(t,e,n){var i=e.axis;if(e.get("axisTick.show")&&!i.scale.isBlank()){for(var r=e.getModel("axisTick"),a=r.getModel("lineStyle"),o=r.get("length"),l=Ux(r,n.labelInterval),h=i.getTicksCoords(r.get("alignWithLabel")),u=i.scale.getTicks(),c=e.get("axisLabel.showMinLabel"),d=e.get("axisLabel.showMaxLabel"),f=[],p=[],g=t._transform,v=[],m=h.length,y=0;m>y;y++)if(!Yx(i,y,l,m,c,d)){var x=h[y];f[0]=x,f[1]=0,p[0]=x,p[1]=n.tickDirection*o,g&&(ae(f,f,g),ae(p,p,g));var _=new Sg(qr({anid:"tick_"+u[y],shape:{x1:f[0],y1:f[1],x2:p[0],y2:p[1]},style:s(a.getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")}),z2:2,silent:!0}));t.group.add(_),v.push(_)}return v}}function Bu(t,e,n){var i=e.axis,r=D(n.axisLabelShow,e.get("axisLabel.show"));if(r&&!i.scale.isBlank()){var a=e.getModel("axisLabel"),o=a.get("margin"),s=i.scale.getTicks(),l=e.getFormattedLabels(),h=(D(n.labelRotate,a.get("rotate"))||0)*Wx/180,u=jx(n.rotation,h,n.labelDirection),c=e.getCategories(),d=[],p=Du(e),g=e.get("triggerEvent"),v=e.get("axisLabel.showMinLabel"),m=e.get("axisLabel.showMaxLabel");return f(s,function(r,h){if(!Yx(i,h,n.labelInterval,s.length,v,m)){var f=a;c&&c[r]&&c[r].textStyle&&(f=new Aa(c[r].textStyle,a,e.ecModel));var y=f.getTextColor()||e.get("axisLine.lineStyle.color"),x=i.dataToCoord(r),_=[x,n.labelOffset+n.labelDirection*o],w=i.scale.getLabel(r),b=new dg({anid:"label_"+r,position:_,rotation:u.rotation,silent:p,z2:10});ca(b.style,f,{text:l[h],textAlign:f.getShallow("align",!0)||u.textAlign,textVerticalAlign:f.getShallow("verticalAlign",!0)||f.getShallow("baseline",!0)||u.textVerticalAlign,textFill:"function"==typeof y?y("category"===i.type?w:"value"===i.type?r+"":r,h):y}),g&&(b.eventData=Tu(e),b.eventData.targetType="axisLabel",b.eventData.value=w),t._dumbGroup.add(b),b.updateTransform(),d.push(b),t.group.add(b),b.decomposeTransform()}}),d}}function Eu(t,e){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return zu(n,t,e),n.seriesInvolved&&Nu(n,t),n}function zu(t,e,n){var i=e.getComponent("tooltip"),r=e.getComponent("axisPointer"),a=r.get("link",!0)||[],o=[];qx(n.getCoordinateSystems(),function(n){function s(i,s,l){var u=l.model.getModel("axisPointer",r),d=u.get("show");if(d&&("auto"!==d||i||Xu(u))){null==s&&(s=u.get("triggerTooltip")),u=i?Ru(l,c,r,e,i,s):u;var f=u.get("snap"),p=ju(l.model),g=s||f||"category"===l.type,v=t.axesInfo[p]={key:p,axis:l,coordSys:n,axisPointerModel:u,triggerTooltip:s,involveSeries:g,snap:f,useHandle:Xu(u),seriesModels:[]};h[p]=v,t.seriesInvolved|=g;var m=Fu(a,l);if(null!=m){var y=o[m]||(o[m]={axesInfo:{}});y.axesInfo[p]=v,y.mapper=a[m].mapper,v.linkGroup=y}}}if(n.axisPointerEnabled){var l=ju(n.model),h=t.coordSysAxesInfo[l]={};t.coordSysMap[l]=n;var u=n.model,c=u.getModel("tooltip",i);if(qx(n.getAxes(),Zx(s,!1,null)),n.getTooltipAxes&&i&&c.get("show")){var d="axis"===c.get("trigger"),f="cross"===c.get("axisPointer.type"),p=n.getTooltipAxes(c.get("axisPointer.axis"));(d||f)&&qx(p.baseAxes,Zx(s,f?"cross":!0,d)),f&&qx(p.otherAxes,Zx(s,"cross",!1))}}})}function Ru(t,e,n,r,a,o){var l=e.getModel("axisPointer"),h={};qx(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],function(t){h[t]=i(l.get(t))}),h.snap="category"!==t.type&&!!o,"cross"===l.get("type")&&(h.type="line");var u=h.label||(h.label={});if(null==u.show&&(u.show=!1),"cross"===a){var c=l.get("label.show");if(u.show=null!=c?c:!0,!o){var d=h.lineStyle=l.get("crossStyle");d&&s(u,d.textStyle)}}return t.model.getModel("axisPointer",new Aa(h,n,r))}function Nu(t,e){e.eachSeries(function(e){var n=e.coordinateSystem,i=e.get("tooltip.trigger",!0),r=e.get("tooltip.show",!0);n&&"none"!==i&&i!==!1&&"item"!==i&&r!==!1&&e.get("axisPointer.show",!0)!==!1&&qx(t.coordSysAxesInfo[ju(n.model)],function(t){var i=t.axis;n.getAxis(i.dim)===i&&(t.seriesModels.push(e),null==t.seriesDataCount&&(t.seriesDataCount=0),t.seriesDataCount+=e.getData().count())})},this)}function Fu(t,e){for(var n=e.model,i=e.dim,r=0;r<t.length;r++){var a=t[r]||{};if(Hu(a[i+"AxisId"],n.id)||Hu(a[i+"AxisIndex"],n.componentIndex)||Hu(a[i+"AxisName"],n.name))return r}}function Hu(t,e){return"all"===t||_(t)&&h(t,e)>=0||t===e}function Gu(t){var e=Wu(t);if(e){var n=e.axisPointerModel,i=e.axis.scale,r=n.option,a=n.get("status"),o=n.get("value");null!=o&&(o=i.parse(o));var s=Xu(n);null==a&&(r.status=s?"show":"hide");var l=i.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==o||o>l[1])&&(o=l[1]),o<l[0]&&(o=l[0]),r.value=o,s&&(r.status=e.axis.scale.isBlank()?"hide":"show")}}function Wu(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[ju(t)]}function Vu(t){var e=Wu(t);return e&&e.axisPointerModel}function Xu(t){return!!t.get("handle.show")}function ju(t){return t.type+"||"+t.id}function Yu(t,e,n,i,r,a){var o=$x.getAxisPointerClass(t.axisPointerClass);if(o){var s=Vu(e);s?(t._axisPointer||(t._axisPointer=new o)).render(e,s,i,a):Uu(t,i)}}function Uu(t,e,n){var i=t._axisPointer;i&&i.dispose(e,n),t._axisPointer=null}function qu(t,e,n){n=n||{};var i=t.coordinateSystem,r=e.axis,a={},o=r.position,s=r.onZero?"onZero":o,l=r.dim,h=i.getRect(),u=[h.x,h.x+h.width,h.y,h.y+h.height],c={left:0,right:1,top:0,bottom:1,onZero:2},d=e.get("offset")||0,f="x"===l?[u[2]-d,u[3]+d]:[u[0]-d,u[1]+d];if(r.onZero){var p=i.getAxis("x"===l?"y":"x",r.onZeroAxisIndex),g=p.toGlobalCoord(p.dataToCoord(0));f[c.onZero]=Math.max(Math.min(g,f[1]),f[0])}a.position=["y"===l?f[c[s]]:u[0],"x"===l?f[c[s]]:u[3]],a.rotation=Math.PI/2*("x"===l?0:1);var v={top:-1,bottom:1,left:-1,right:1};a.labelDirection=a.tickDirection=a.nameDirection=v[o],a.labelOffset=r.onZero?f[c[o]]-f[c.onZero]:0,e.get("axisTick.inside")&&(a.tickDirection=-a.tickDirection),D(n.labelInside,e.get("axisLabel.inside"))&&(a.labelDirection=-a.labelDirection);var m=e.get("axisLabel.rotate");return a.labelRotate="top"===s?-m:m,a.labelInterval=r.getLabelInterval(),a.z2=1,a}function Zu(t,e){var n=t.get("center"),i=e.getWidth(),r=e.getHeight(),a=Math.min(i,r),o=Na(n[0],e.getWidth()),s=Na(n[1],e.getHeight()),l=Na(t.get("radius"),a/2);return{cx:o,cy:s,r:l}}function $u(t,e){return e&&("string"==typeof e?t=e.replace("{value}",null!=t?t:""):"function"==typeof e&&(t=e(t))),t}function Ku(t,e,n){var i,r={},a="toggleSelected"===t;return n.eachComponent("legend",function(n){a&&null!=i?n[i?"select":"unSelect"](e.name):(n[t](e.name),i=n.isSelected(e.name));var o=n.getData();f(o,function(t){var e=t.get("name");if("\n"!==e&&""!==e){var i=n.isSelected(e);r[e]=r.hasOwnProperty(e)?r[e]&&i:i}})}),{name:e.name,selected:r}}function Qu(t,e){var n=Zg(e.get("padding")),i=e.getItemStyle(["color","opacity"]);i.fill=e.get("backgroundColor");var t=new bg({shape:{x:t.x-n[3],y:t.y-n[0],width:t.width+n[1]+n[3],height:t.height+n[0]+n[2],r:e.get("borderRadius")},style:i,silent:!0,z2:-1});return t}function Ju(t,e){e.dispatchAction({type:"legendToggleSelect",name:t})}function tc(t,e,n){var i=n.getZr().storage.getDisplayList()[0];i&&i.useHoverLayer||t.get("legendHoverLink")&&n.dispatchAction({type:"highlight",seriesName:t.name,name:e})}function ec(t,e,n){var i=n.getZr().storage.getDisplayList()[0];i&&i.useHoverLayer||t.get("legendHoverLink")&&n.dispatchAction({type:"downplay",seriesName:t.name,name:e})}function nc(t,e,n){var i=t.getOrient(),r=[1,1];r[i.index]=0,uo(e,n,{type:"box",ignoreSize:r})}function ic(t,e,n,i,r){var a=t.axis;if(!a.scale.isBlank()&&a.containData(e)){if(!t.involveSeries)return void n.showPointer(t,e);var s=rc(e,t),l=s.payloadBatch,h=s.snapToValue;l[0]&&null==r.seriesIndex&&o(r,l[0]),!i&&t.snap&&a.containData(h)&&null!=h&&(e=h),n.showPointer(t,e,l,r),n.showTooltip(t,s,h)}}function rc(t,e){var n=e.axis,i=n.dim,r=t,a=[],o=Number.MAX_VALUE,s=-1;return y_(e.seriesModels,function(e){var l,h,u=e.getData().mapDimension(i,!0);if(e.getAxisTooltipData){var c=e.getAxisTooltipData(u,t,n);h=c.dataIndices,l=c.nestestValue}else{if(h=e.getData().indicesOfNearest(u[0],t,"category"===n.type?.5:null),!h.length)return;l=e.getData().get(u[0],h[0])}if(null!=l&&isFinite(l)){var d=t-l,f=Math.abs(d);o>=f&&((o>f||d>=0&&0>s)&&(o=f,s=d,r=l,a.length=0),y_(h,function(t){a.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})}))}}),{payloadBatch:a,snapToValue:r}}function ac(t,e,n,i){t[e.key]={value:n,payloadBatch:i}}function oc(t,e,n,i){var r=n.payloadBatch,a=e.axis,o=a.model,s=e.axisPointerModel;if(e.triggerTooltip&&r.length){var l=e.coordSys.model,h=ju(l),u=t.map[h];u||(u=t.map[h]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(u)),u.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:i,valueLabelOpt:{precision:s.get("label.precision"),formatter:s.get("label.formatter")},seriesDataIndices:r.slice()})}}function sc(t,e,n){var i=n.axesInfo=[];y_(e,function(e,n){var r=e.axisPointerModel.option,a=t[n];a?(!e.useHandle&&(r.status="show"),r.value=a.value,r.seriesDataIndices=(a.payloadBatch||[]).slice()):!e.useHandle&&(r.status="hide"),"show"===r.status&&i.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:r.value})})}function lc(t,e,n,i){if(dc(e)||!t.list.length)return void i({type:"hideTip"});var r=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:r.dataIndexInside,dataIndex:r.dataIndex,seriesIndex:r.seriesIndex,dataByCoordSys:t.list})}function hc(t,e,n){var i=n.getZr(),r="axisPointerLastHighlights",a=__(i)[r]||{},o=__(i)[r]={};y_(t,function(t){var e=t.axisPointerModel.option;"show"===e.status&&y_(e.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;o[e]=t})});var s=[],l=[];f(a,function(t,e){!o[e]&&l.push(t)}),f(o,function(t,e){!a[e]&&s.push(t)}),l.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,batch:l}),s.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,batch:s})}function uc(t,e){for(var n=0;n<(t||[]).length;n++){var i=t[n];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex)return i}}function cc(t){var e=t.axis.model,n={},i=n.axisDim=t.axis.dim;return n.axisIndex=n[i+"AxisIndex"]=e.componentIndex,n.axisName=n[i+"AxisName"]=e.name,n.axisId=n[i+"AxisId"]=e.id,n}function dc(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function fc(t,e,n){if(!$c.node){var i=e.getZr();b_(i).records||(b_(i).records={}),pc(i,e);var r=b_(i).records[t]||(b_(i).records[t]={});r.handler=n}}function pc(t,e){function n(n,i){t.on(n,function(n){var r=yc(e);S_(b_(t).records,function(t){t&&i(t,n,r.dispatchAction)}),gc(r.pendings,e)})}b_(t).initialized||(b_(t).initialized=!0,n("click",x(mc,"click")),n("mousemove",x(mc,"mousemove")),n("globalout",vc))}function gc(t,e){var n,i=t.showTip.length,r=t.hideTip.length;i?n=t.showTip[i-1]:r&&(n=t.hideTip[r-1]),n&&(n.dispatchAction=null,e.dispatchAction(n))}function vc(t,e,n){t.handler("leave",null,n)}function mc(t,e,n,i){e.handler(t,n,i)}function yc(t){var e={showTip:[],hideTip:[]},n=function(i){var r=e[i.type];r?r.push(i):(i.dispatchAction=n,t.dispatchAction(i))};return{dispatchAction:n,pendings:e}}function xc(t,e){if(!$c.node){var n=e.getZr(),i=(b_(n).records||{})[t];i&&(b_(n).records[t]=null)}}function _c(){}function wc(t,e,n,i){bc(I_(n).lastProp,i)||(I_(n).lastProp=i,e?wa(n,i,t):(n.stopAnimation(),n.attr(i)))}function bc(t,e){if(S(t)&&S(e)){var n=!0;return f(e,function(e,i){n=n&&bc(t[i],e)}),!!n}return t===e}function Sc(t,e){t[e.get("label.show")?"show":"hide"]()}function Mc(t){return{position:t.position.slice(),rotation:t.rotation||0}}function Ic(t,e,n){var i=e.get("z"),r=e.get("zlevel");t&&t.traverse(function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=r&&(t.zlevel=r),t.silent=n)})}function Tc(t){var e,n=t.get("type"),i=t.getModel(n+"Style");return"line"===n?(e=i.getLineStyle(),e.fill=null):"shadow"===n&&(e=i.getAreaStyle(),e.stroke=null),e}function Cc(t,e,n,i,r){var a=n.get("value"),o=kc(a,e.axis,e.ecModel,n.get("seriesDataIndices"),{precision:n.get("label.precision"),formatter:n.get("label.formatter")}),s=n.getModel("label"),l=Zg(s.get("padding")||0),h=s.getFont(),u=Sn(o,h),c=r.position,d=u.width+l[1]+l[3],f=u.height+l[0]+l[2],p=r.align;"right"===p&&(c[0]-=d),"center"===p&&(c[0]-=d/2);var g=r.verticalAlign;"bottom"===g&&(c[1]-=f),"middle"===g&&(c[1]-=f/2),Dc(c,d,f,i);var v=s.get("backgroundColor");v&&"auto"!==v||(v=e.get("axisLine.lineStyle.color")),t.label={shape:{x:0,y:0,width:d,height:f,r:s.get("borderRadius")},position:c.slice(),style:{text:o,textFont:h,textFill:s.getTextColor(),textPosition:"inside",fill:v,stroke:s.get("borderColor")||"transparent",lineWidth:s.get("borderWidth")||0,shadowBlur:s.get("shadowBlur"),shadowColor:s.get("shadowColor"),shadowOffsetX:s.get("shadowOffsetX"),shadowOffsetY:s.get("shadowOffsetY")},z2:10}}function Dc(t,e,n,i){var r=i.getWidth(),a=i.getHeight();t[0]=Math.min(t[0]+e,r)-e,t[1]=Math.min(t[1]+n,a)-n,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}function kc(t,e,n,i,r){var a=e.scale.getLabel(t,{precision:r.precision}),o=r.formatter;if(o){var s={value:Dh(e,t),seriesData:[]};f(i,function(t){var e=n.getSeriesByIndex(t.seriesIndex),i=t.dataIndexInside,r=e&&e.getDataParams(i);r&&s.seriesData.push(r)}),b(o)?a=o.replace("{value}",a):w(o)&&(a=o(s))}return a}function Ac(t,e,n){var i=fe();return ye(i,i,n.rotation),me(i,i,n.position),Ma([t.dataToCoord(e),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}function Pc(t,e,n,i,r,a){var o=Vx.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=r.get("label.margin"),Cc(e,i,r,a,{position:Ac(i.axis,t,n),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function Lc(t,e,n){return n=n||0,{x1:t[n],y1:t[1-n],x2:e[n],y2:e[1-n]}}function Oc(t,e,n){return n=n||0,{x:t[n],y:t[1-n],width:e[n],height:e[1-n]}}function Bc(t,e){var n={};return n[e.dim+"AxisIndex"]=e.index,t.getCartesian(n)}function Ec(t){return"x"===t.dim?0:1}function zc(t){var e="cubic-bezier(0.23, 1, 0.32, 1)",n="left "+t+"s "+e+",top "+t+"s "+e;return p(L_,function(t){return t+"transition:"+n}).join(";")}function Rc(t){var e=[],n=t.get("fontSize"),i=t.getTextColor();return i&&e.push("color:"+i),e.push("font:"+t.getFont()),n&&e.push("line-height:"+Math.round(3*n/2)+"px"),A_(["decoration","align"],function(n){var i=t.get(n);i&&e.push("text-"+n+":"+i)}),e.join(";")}function Nc(t){var e=[],n=t.get("transitionDuration"),i=t.get("backgroundColor"),r=t.getModel("textStyle"),a=t.get("padding");return n&&e.push(zc(n)),i&&($c.canvasSupported?e.push("background-Color:"+i):(e.push("background-Color:#"+Ne(i)),e.push("filter:alpha(opacity=70)"))),A_(["width","color","radius"],function(n){var i="border-"+n,r=P_(i),a=t.get(r);null!=a&&e.push(i+":"+a+("color"===n?"":"px"))}),e.push(Rc(r)),null!=a&&e.push("padding:"+Zg(a).join("px ")+"px"),e.join(";")+";"}function Fc(t,e){if($c.wxa)return null;var n=document.createElement("div"),i=this._zr=e.getZr();this.el=n,this._x=e.getWidth()/2,this._y=e.getHeight()/2,t.appendChild(n),this._container=t,this._show=!1,this._hideTimeout;var r=this;n.onmouseenter=function(){r._enterable&&(clearTimeout(r._hideTimeout),r._show=!0),r._inContent=!0},n.onmousemove=function(e){if(e=e||window.event,!r._enterable){var n=i.handler;gi(t,e,!0),n.dispatch("mousemove",e)}},n.onmouseleave=function(){r._enterable&&r._show&&r.hideLater(r._hideDelay),r._inContent=!1}}function Hc(t){for(var e=t.pop();t.length;){var n=t.pop();n&&(Aa.isInstance(n)&&(n=n.get("tooltip",!0)),"string"==typeof n&&(n={formatter:n}),e=new Aa(n,e,e.ecModel))}return e}function Gc(t,e){return t.dispatchAction||y(e.dispatchAction,e)}function Wc(t,e,n,i,r,a,o){var s=Xc(n),l=s.width,h=s.height;return null!=a&&(t+l+a>i?t-=l+a:t+=a),null!=o&&(e+h+o>r?e-=h+o:e+=o),[t,e]}function Vc(t,e,n,i,r){var a=Xc(n),o=a.width,s=a.height;return t=Math.min(t+o,i)-o,e=Math.min(e+s,r)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}function Xc(t){var e=t.clientWidth,n=t.clientHeight;if(document.defaultView&&document.defaultView.getComputedStyle){var i=document.defaultView.getComputedStyle(t);i&&(e+=parseInt(i.paddingLeft,10)+parseInt(i.paddingRight,10)+parseInt(i.borderLeftWidth,10)+parseInt(i.borderRightWidth,10),n+=parseInt(i.paddingTop,10)+parseInt(i.paddingBottom,10)+parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10))}return{width:e,height:n}}function jc(t,e,n){var i=n[0],r=n[1],a=5,o=0,s=0,l=e.width,h=e.height;switch(t){case"inside":o=e.x+l/2-i/2,s=e.y+h/2-r/2;break;case"top":o=e.x+l/2-i/2,s=e.y-r-a;break;case"bottom":o=e.x+l/2-i/2,s=e.y+h+a;break;case"left":o=e.x-i-a,s=e.y+h/2-r/2;break;case"right":o=e.x+l+a,s=e.y+h/2-r/2}return[o,s]}function Yc(t){return"center"===t||"middle"===t}var Uc=2311,qc=function(){return Uc++},Zc={};Zc="undefined"!=typeof wx?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvasSupported:!0}:"undefined"==typeof navigator?{browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0}:e(navigator.userAgent);var $c=Zc,Kc={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},Qc={"[object Int8Array]":1,"[object Uint8Array]":1,"[object Uint8ClampedArray]":1,"[object Int16Array]":1,"[object Uint16Array]":1,"[object Int32Array]":1,"[object Uint32Array]":1,"[object Float32Array]":1,"[object Float64Array]":1},Jc=Object.prototype.toString,td=Array.prototype,ed=td.forEach,nd=td.filter,id=td.slice,rd=td.map,ad=td.reduce,od={},sd=function(){return od.createCanvas()};od.createCanvas=function(){return document.createElement("canvas")};var ld,hd="__ec_primitive__";R.prototype={constructor:R,get:function(t){return this.hasOwnProperty(t)?this[t]:null},set:function(t,e){return this[t]=e},each:function(t,e){void 0!==e&&(t=y(t,e));for(var n in this)this.hasOwnProperty(n)&&t(this[n],n)},removeKey:function(t){delete this[t]}};var ud=(Object.freeze||Object)({$override:n,clone:i,merge:r,mergeAll:a,extend:o,defaults:s,createCanvas:sd,getContext:l,indexOf:h,inherits:u,mixin:c,isArrayLike:d,each:f,map:p,reduce:g,filter:v,find:m,bind:y,curry:x,isArray:_,isFunction:w,isString:b,isObject:S,isBuiltInObject:M,isTypedArray:I,isDom:T,eqNaN:C,retrieve:D,retrieve2:k,retrieve3:A,slice:P,normalizeCssArray:L,assert:O,trim:B,setAsPrimitive:E,isPrimitive:z,createHashMap:N,concatArray:F,noop:H}),cd="undefined"==typeof Float32Array?Array:Float32Array,dd=q,fd=Z,pd=ee,gd=ne,vd=(Object.freeze||Object)({create:G,copy:W,clone:V,set:X,add:j,scaleAndAdd:Y,sub:U,len:q,length:dd,lenSquare:Z,lengthSquare:fd,mul:$,div:K,dot:Q,scale:J,normalize:te,distance:ee,dist:pd,distanceSquare:ne,distSquare:gd,negate:ie,lerp:re,applyTransform:ae,min:oe,max:se});le.prototype={constructor:le,_dragStart:function(t){var e=t.target;e&&e.draggable&&(this._draggingTarget=e,e.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.dispatchToElement(he(e,t),"dragstart",t.event))},_drag:function(t){var e=this._draggingTarget;if(e){var n=t.offsetX,i=t.offsetY,r=n-this._x,a=i-this._y;this._x=n,this._y=i,e.drift(r,a,t),this.dispatchToElement(he(e,t),"drag",t.event);var o=this.findHover(n,i,e).target,s=this._dropTarget;this._dropTarget=o,e!==o&&(s&&o!==s&&this.dispatchToElement(he(s,t),"dragleave",t.event),o&&o!==s&&this.dispatchToElement(he(o,t),"dragenter",t.event))}},_dragEnd:function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.dispatchToElement(he(e,t),"dragend",t.event),this._dropTarget&&this.dispatchToElement(he(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null}};var md=Array.prototype.slice,yd=function(){this._$handlers={}};yd.prototype={constructor:yd,one:function(t,e,n){var i=this._$handlers;if(!e||!t)return this;i[t]||(i[t]=[]);for(var r=0;r<i[t].length;r++)if(i[t][r].h===e)return this;return i[t].push({h:e,one:!0,ctx:n||this}),this},on:function(t,e,n){var i=this._$handlers;if(!e||!t)return this;i[t]||(i[t]=[]);for(var r=0;r<i[t].length;r++)if(i[t][r].h===e)return this;return i[t].push({h:e,one:!1,ctx:n||this}),this},isSilent:function(t){var e=this._$handlers;return e[t]&&e[t].length},off:function(t,e){var n=this._$handlers;if(!t)return this._$handlers={},this;if(e){if(n[t]){for(var i=[],r=0,a=n[t].length;a>r;r++)n[t][r].h!=e&&i.push(n[t][r]);n[t]=i}n[t]&&0===n[t].length&&delete n[t] | |
| 5 | +}else delete n[t];return this},trigger:function(t){if(this._$handlers[t]){var e=arguments,n=e.length;n>3&&(e=md.call(e,1));for(var i=this._$handlers[t],r=i.length,a=0;r>a;){switch(n){case 1:i[a].h.call(i[a].ctx);break;case 2:i[a].h.call(i[a].ctx,e[1]);break;case 3:i[a].h.call(i[a].ctx,e[1],e[2]);break;default:i[a].h.apply(i[a].ctx,e)}i[a].one?(i.splice(a,1),r--):a++}}return this},triggerWithContext:function(t){if(this._$handlers[t]){var e=arguments,n=e.length;n>4&&(e=md.call(e,1,e.length-1));for(var i=e[e.length-1],r=this._$handlers[t],a=r.length,o=0;a>o;){switch(n){case 1:r[o].h.call(i);break;case 2:r[o].h.call(i,e[1]);break;case 3:r[o].h.call(i,e[1],e[2]);break;default:r[o].h.apply(i,e)}r[o].one?(r.splice(o,1),a--):o++}}return this}};var xd="silent";ce.prototype.dispose=function(){};var _d=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],wd=function(t,e,n,i){yd.call(this),this.storage=t,this.painter=e,this.painterRoot=i,n=n||new ce,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,le.call(this),this.setHandlerProxy(n)};wd.prototype={constructor:wd,setHandlerProxy:function(t){this.proxy&&this.proxy.dispose(),t&&(f(_d,function(e){t.on&&t.on(e,this[e],this)},this),t.handler=this),this.proxy=t},mousemove:function(t){var e=t.zrX,n=t.zrY,i=this._hovered,r=i.target;r&&!r.__zr&&(i=this.findHover(i.x,i.y),r=i.target);var a=this._hovered=this.findHover(e,n),o=a.target,s=this.proxy;s.setCursor&&s.setCursor(o?o.cursor:"default"),r&&o!==r&&this.dispatchToElement(i,"mouseout",t),this.dispatchToElement(a,"mousemove",t),o&&o!==r&&this.dispatchToElement(a,"mouseover",t)},mouseout:function(t){this.dispatchToElement(this._hovered,"mouseout",t);var e,n=t.toElement||t.relatedTarget;do n=n&&n.parentNode;while(n&&9!=n.nodeType&&!(e=n===this.painterRoot));!e&&this.trigger("globalout",{event:t})},resize:function(){this._hovered={}},dispatch:function(t,e){var n=this[t];n&&n.call(this,e)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},dispatchToElement:function(t,e,n){t=t||{};var i=t.target;if(!i||!i.silent){for(var r="on"+e,a=ue(e,t,n);i&&(i[r]&&(a.cancelBubble=i[r].call(i,a)),i.trigger(e,a),i=i.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(e,a),this.painter&&this.painter.eachOtherLayer(function(t){"function"==typeof t[r]&&t[r].call(t,a),t.trigger&&t.trigger(e,a)}))}},findHover:function(t,e,n){for(var i=this.storage.getDisplayList(),r={x:t,y:e},a=i.length-1;a>=0;a--){var o;if(i[a]!==n&&!i[a].ignore&&(o=de(i[a],t,e))&&(!r.topTarget&&(r.topTarget=i[a]),o!==xd)){r.target=i[a];break}}return r}},f(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){wd.prototype[t]=function(e){var n=this.findHover(e.zrX,e.zrY),i=n.target;if("mousedown"===t)this._downEl=i,this._downPoint=[e.zrX,e.zrY],this._upEl=i;else if("mouseup"===t)this._upEl=i;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||pd(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,t,e)}}),c(wd,yd),c(wd,le);var bd="undefined"==typeof Float32Array?Array:Float32Array,Sd=(Object.freeze||Object)({create:fe,identity:pe,copy:ge,mul:ve,translate:me,rotate:ye,scale:xe,invert:_e,clone:we}),Md=pe,Id=5e-5,Td=function(t){t=t||{},t.position||(this.position=[0,0]),null==t.rotation&&(this.rotation=0),t.scale||(this.scale=[1,1]),this.origin=this.origin||null},Cd=Td.prototype;Cd.transform=null,Cd.needLocalTransform=function(){return be(this.rotation)||be(this.position[0])||be(this.position[1])||be(this.scale[0]-1)||be(this.scale[1]-1)},Cd.updateTransform=function(){var t=this.parent,e=t&&t.transform,n=this.needLocalTransform(),i=this.transform;return n||e?(i=i||fe(),n?this.getLocalTransform(i):Md(i),e&&(n?ve(i,t.transform,i):ge(i,t.transform)),this.transform=i,this.invTransform=this.invTransform||fe(),void _e(this.invTransform,i)):void(i&&Md(i))},Cd.getLocalTransform=function(t){return Td.getLocalTransform(this,t)},Cd.setTransform=function(t){var e=this.transform,n=t.dpr||1;e?t.setTransform(n*e[0],n*e[1],n*e[2],n*e[3],n*e[4],n*e[5]):t.setTransform(n,0,0,n,0,0)},Cd.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var Dd=[];Cd.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(ve(Dd,t.invTransform,e),e=Dd);var n=e[0]*e[0]+e[1]*e[1],i=e[2]*e[2]+e[3]*e[3],r=this.position,a=this.scale;be(n-1)&&(n=Math.sqrt(n)),be(i-1)&&(i=Math.sqrt(i)),e[0]<0&&(n=-n),e[3]<0&&(i=-i),r[0]=e[4],r[1]=e[5],a[0]=n,a[1]=i,this.rotation=Math.atan2(-e[1]/i,e[0]/n)}},Cd.getGlobalScale=function(){var t=this.transform;if(!t)return[1,1];var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]),n=Math.sqrt(t[2]*t[2]+t[3]*t[3]);return t[0]<0&&(e=-e),t[3]<0&&(n=-n),[e,n]},Cd.transformCoordToLocal=function(t,e){var n=[t,e],i=this.invTransform;return i&&ae(n,n,i),n},Cd.transformCoordToGlobal=function(t,e){var n=[t,e],i=this.transform;return i&&ae(n,n,i),n},Td.getLocalTransform=function(t,e){e=e||[],Md(e);var n=t.origin,i=t.scale||[1,1],r=t.rotation||0,a=t.position||[0,0];return n&&(e[4]-=n[0],e[5]-=n[1]),xe(e,e,i),r&&ye(e,e,r),n&&(e[4]+=n[0],e[5]+=n[1]),e[4]+=a[0],e[5]+=a[1],e};var kd={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(-Math.pow(2,-10*(t-1))+2)},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,n=.1,i=.4;return 0===t?0:1===t?1:(!n||1>n?(n=1,e=i/4):e=i*Math.asin(1/n)/(2*Math.PI),-(n*Math.pow(2,10*(t-=1))*Math.sin(2*(t-e)*Math.PI/i)))},elasticOut:function(t){var e,n=.1,i=.4;return 0===t?0:1===t?1:(!n||1>n?(n=1,e=i/4):e=i*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*t)*Math.sin(2*(t-e)*Math.PI/i)+1)},elasticInOut:function(t){var e,n=.1,i=.4;return 0===t?0:1===t?1:(!n||1>n?(n=1,e=i/4):e=i*Math.asin(1/n)/(2*Math.PI),(t*=2)<1?-.5*n*Math.pow(2,10*(t-=1))*Math.sin(2*(t-e)*Math.PI/i):n*Math.pow(2,-10*(t-=1))*Math.sin(2*(t-e)*Math.PI/i)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?.5*t*t*((e+1)*t-e):.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-kd.bounceOut(1-t)},bounceOut:function(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return.5>t?.5*kd.bounceIn(2*t):.5*kd.bounceOut(2*t-1)+.5}};Se.prototype={constructor:Se,step:function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),this._paused)return void(this._pausedTime+=e);var n=(t-this._startTime-this._pausedTime)/this._life;if(!(0>n)){n=Math.min(n,1);var i=this.easing,r="string"==typeof i?kd[i]:i,a="function"==typeof r?r(n):n;return this.fire("frame",a),1==n?this.loop?(this.restart(t),"restart"):(this._needsRemove=!0,"destroy"):null}},restart:function(t){var e=(t-this._startTime-this._pausedTime)%this._life;this._startTime=t-e+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(t,e){t="on"+t,this[t]&&this[t](this._target,e)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var Ad=function(){this.head=null,this.tail=null,this._len=0},Pd=Ad.prototype;Pd.insert=function(t){var e=new Ld(t);return this.insertEntry(e),e},Pd.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},Pd.remove=function(t){var e=t.prev,n=t.next;e?e.next=n:this.head=n,n?n.prev=e:this.tail=e,t.next=t.prev=null,this._len--},Pd.len=function(){return this._len},Pd.clear=function(){this.head=this.tail=null,this._len=0};var Ld=function(t){this.value=t,this.next,this.prev},Od=function(t){this._list=new Ad,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null},Bd=Od.prototype;Bd.put=function(t,e){var n=this._list,i=this._map,r=null;if(null==i[t]){var a=n.len(),o=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var s=n.head;n.remove(s),delete i[s.key],r=s.value,this._lastRemovedEntry=s}o?o.value=e:o=new Ld(e),o.key=t,n.insertEntry(o),i[t]=o}return r},Bd.get=function(t){var e=this._map[t],n=this._list;return null!=e?(e!==n.tail&&(n.remove(e),n.insertEntry(e)),e.value):void 0},Bd.clear=function(){this._list.clear(),this._map={}};var Ed={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]},zd=new Od(20),Rd=null,Nd=Fe,Fd=He,Hd=(Object.freeze||Object)({parse:Be,lift:Re,toHex:Ne,fastLerp:Fe,fastMapToColor:Nd,lerp:He,mapToColor:Fd,modifyHSL:Ge,modifyAlpha:We,stringify:Ve}),Gd=Array.prototype.slice,Wd=function(t,e,n,i){this._tracks={},this._target=t,this._loop=e||!1,this._getter=n||Xe,this._setter=i||je,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};Wd.prototype={when:function(t,e){var n=this._tracks;for(var i in e)if(e.hasOwnProperty(i)){if(!n[i]){n[i]=[];var r=this._getter(this._target,i);if(null==r)continue;0!==t&&n[i].push({time:0,value:Je(r)})}n[i].push({time:t,value:e[i]})}return this},during:function(t){return this._onframeList.push(t),this},pause:function(){for(var t=0;t<this._clipList.length;t++)this._clipList[t].pause();this._paused=!0},resume:function(){for(var t=0;t<this._clipList.length;t++)this._clipList[t].resume();this._paused=!1},isPaused:function(){return!!this._paused},_doneCallback:function(){this._tracks={},this._clipList.length=0;for(var t=this._doneList,e=t.length,n=0;e>n;n++)t[n].call(this)},start:function(t,e){var n,i=this,r=0,a=function(){r--,r||i._doneCallback()};for(var o in this._tracks)if(this._tracks.hasOwnProperty(o)){var s=nn(this,t,a,this._tracks[o],o,e);s&&(this._clipList.push(s),r++,this.animation&&this.animation.addClip(s),n=s)}if(n){var l=n.onframe;n.onframe=function(t,e){l(t,e);for(var n=0;n<i._onframeList.length;n++)i._onframeList[n](t,e)}}return r||this._doneCallback(),this},stop:function(t){for(var e=this._clipList,n=this.animation,i=0;i<e.length;i++){var r=e[i];t&&r.onframe(this._target,1),n&&n.removeClip(r)}e.length=0},delay:function(t){return this._delay=t,this},done:function(t){return t&&this._doneList.push(t),this},getClips:function(){return this._clipList}};var Vd=1;"undefined"!=typeof window&&(Vd=Math.max(window.devicePixelRatio||1,1));var Xd=0,jd=Vd,Yd=function(){};1===Xd?Yd=function(){for(var t in arguments)throw new Error(arguments[t])}:Xd>1&&(Yd=function(){for(var t in arguments)console.log(arguments[t])});var Ud=Yd,qd=function(){this.animators=[]};qd.prototype={constructor:qd,animate:function(t,e){var n,i=!1,r=this,a=this.__zr;if(t){var o=t.split("."),s=r;i="shape"===o[0];for(var l=0,u=o.length;u>l;l++)s&&(s=s[o[l]]);s&&(n=s)}else n=r;if(!n)return void Ud('Property "'+t+'" is not existed in element '+r.id);var c=r.animators,d=new Wd(n,e);return d.during(function(){r.dirty(i)}).done(function(){c.splice(h(c,d),1)}),c.push(d),a&&a.animation.addAnimator(d),d},stopAnimation:function(t){for(var e=this.animators,n=e.length,i=0;n>i;i++)e[i].stop(t);return e.length=0,this},animateTo:function(t,e,n,i,r,a){function o(){l--,l||r&&r()}b(n)?(r=i,i=n,n=0):w(i)?(r=i,i="linear",n=0):w(n)?(r=n,n=0):w(e)?(r=e,e=500):e||(e=500),this.stopAnimation(),this._animateToShallow("",this,t,e,n);var s=this.animators.slice(),l=s.length;l||r&&r();for(var h=0;h<s.length;h++)s[h].done(o).start(i,a)},_animateToShallow:function(t,e,n,i,r){var a={},o=0;for(var s in n)if(n.hasOwnProperty(s))if(null!=e[s])S(n[s])&&!d(n[s])?this._animateToShallow(t?t+"."+s:s,e[s],n[s],i,r):(a[s]=n[s],o++);else if(null!=n[s])if(t){var l={};l[t]={},l[t][s]=n[s],this.attr(l)}else this.attr(s,n[s]);return o>0&&this.animate(t,!1).when(null==i?500:i,a).delay(r||0),this}};var Zd=function(t){Td.call(this,t),yd.call(this,t),qd.call(this,t),this.id=t.id||qc()};Zd.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,isGroup:!1,drift:function(t,e){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var n=this.transform;n||(n=this.transform=[1,0,0,1,0,0]),n[4]+=t,n[5]+=e,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(){},attrKV:function(t,e){if("position"===t||"scale"===t||"origin"===t){if(e){var n=this[t];n||(n=this[t]=[]),n[0]=e[0],n[1]=e[1]}}else this[t]=e},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(S(t))for(var n in t)t.hasOwnProperty(n)&&this.attrKV(n,t[n]);return this.dirty(!1),this},setClipPath:function(t){var e=this.__zr;e&&t.addSelfToZr(e),this.clipPath&&this.clipPath!==t&&this.removeClipPath(),this.clipPath=t,t.__zr=e,t.__clipTarget=this,this.dirty(!1)},removeClipPath:function(){var t=this.clipPath;t&&(t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(t){this.__zr=t;var e=this.animators;if(e)for(var n=0;n<e.length;n++)t.animation.addAnimator(e[n]);this.clipPath&&this.clipPath.addSelfToZr(t)},removeSelfFromZr:function(t){this.__zr=null;var e=this.animators;if(e)for(var n=0;n<e.length;n++)t.animation.removeAnimator(e[n]);this.clipPath&&this.clipPath.removeSelfFromZr(t)}},c(Zd,qd),c(Zd,Td),c(Zd,yd);var $d=ae,Kd=Math.min,Qd=Math.max;rn.prototype={constructor:rn,union:function(t){var e=Kd(t.x,this.x),n=Kd(t.y,this.y);this.width=Qd(t.x+t.width,this.x+this.width)-e,this.height=Qd(t.y+t.height,this.y+this.height)-n,this.x=e,this.y=n},applyTransform:function(){var t=[],e=[],n=[],i=[];return function(r){if(r){t[0]=n[0]=this.x,t[1]=i[1]=this.y,e[0]=i[0]=this.x+this.width,e[1]=n[1]=this.y+this.height,$d(t,t,r),$d(e,e,r),$d(n,n,r),$d(i,i,r),this.x=Kd(t[0],e[0],n[0],i[0]),this.y=Kd(t[1],e[1],n[1],i[1]);var a=Qd(t[0],e[0],n[0],i[0]),o=Qd(t[1],e[1],n[1],i[1]);this.width=a-this.x,this.height=o-this.y}}}(),calculateTransform:function(t){var e=this,n=t.width/e.width,i=t.height/e.height,r=fe();return me(r,r,[-e.x,-e.y]),xe(r,r,[n,i]),me(r,r,[t.x,t.y]),r},intersect:function(t){if(!t)return!1;t instanceof rn||(t=rn.create(t));var e=this,n=e.x,i=e.x+e.width,r=e.y,a=e.y+e.height,o=t.x,s=t.x+t.width,l=t.y,h=t.y+t.height;return!(o>i||n>s||l>a||r>h)},contain:function(t,e){var n=this;return t>=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},clone:function(){return new rn(this.x,this.y,this.width,this.height)},copy:function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},rn.create=function(t){return new rn(t.x,t.y,t.width,t.height)};var Jd=function(t){t=t||{},Zd.call(this,t);for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};Jd.prototype={constructor:Jd,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){for(var e=this._children,n=0;n<e.length;n++)if(e[n].name===t)return e[n]},childCount:function(){return this._children.length},add:function(t){return t&&t!==this&&t.parent!==this&&(this._children.push(t),this._doAdd(t)),this},addBefore:function(t,e){if(t&&t!==this&&t.parent!==this&&e&&e.parent===this){var n=this._children,i=n.indexOf(e);i>=0&&(n.splice(i,0,t),this._doAdd(t))}return this},_doAdd:function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__storage,n=this.__zr;e&&e!==t.__storage&&(e.addToStorage(t),t instanceof Jd&&t.addChildrenToStorage(e)),n&&n.refresh()},remove:function(t){var e=this.__zr,n=this.__storage,i=this._children,r=h(i,t);return 0>r?this:(i.splice(r,1),t.parent=null,n&&(n.delFromStorage(t),t instanceof Jd&&t.delChildrenFromStorage(n)),e&&e.refresh(),this)},removeAll:function(){var t,e,n=this._children,i=this.__storage;for(e=0;e<n.length;e++)t=n[e],i&&(i.delFromStorage(t),t instanceof Jd&&t.delChildrenFromStorage(i)),t.parent=null;return n.length=0,this},eachChild:function(t,e){for(var n=this._children,i=0;i<n.length;i++){var r=n[i];t.call(e,r,i)}return this},traverse:function(t,e){for(var n=0;n<this._children.length;n++){var i=this._children[n];t.call(e,i),"group"===i.type&&i.traverse(t,e)}return this},addChildrenToStorage:function(t){for(var e=0;e<this._children.length;e++){var n=this._children[e];t.addToStorage(n),n instanceof Jd&&n.addChildrenToStorage(t)}},delChildrenFromStorage:function(t){for(var e=0;e<this._children.length;e++){var n=this._children[e];t.delFromStorage(n),n instanceof Jd&&n.delChildrenFromStorage(t)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(t){for(var e=null,n=new rn(0,0,0,0),i=t||this._children,r=[],a=0;a<i.length;a++){var o=i[a];if(!o.ignore&&!o.invisible){var s=o.getBoundingRect(),l=o.getLocalTransform(r);l?(n.copy(s),n.applyTransform(l),e=e||n.clone(),e.union(n)):(e=e||s.clone(),e.union(s))}}return e||n}},u(Jd,Zd);var tf=32,ef=7,nf=function(){this._roots=[],this._displayList=[],this._displayListLen=0};nf.prototype={constructor:nf,traverse:function(t,e){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(t,e)},getDisplayList:function(t,e){return e=e||!1,t&&this.updateDisplayList(e),this._displayList},updateDisplayList:function(t){this._displayListLen=0;for(var e=this._roots,n=this._displayList,i=0,r=e.length;r>i;i++)this._updateAndAddDisplayable(e[i],null,t);n.length=this._displayListLen,$c.canvasSupported&&dn(n,fn)},_updateAndAddDisplayable:function(t,e,n){if(!t.ignore||n){t.beforeUpdate(),t.__dirty&&t.update(),t.afterUpdate();var i=t.clipPath;if(i){e=e?e.slice():[];for(var r=i,a=t;r;)r.parent=a,r.updateTransform(),e.push(r),a=r,r=r.clipPath}if(t.isGroup){for(var o=t._children,s=0;s<o.length;s++){var l=o[s];t.__dirty&&(l.__dirty=!0),this._updateAndAddDisplayable(l,e,n)}t.__dirty=!1}else t.__clipPaths=e,this._displayList[this._displayListLen++]=t}},addRoot:function(t){t.__storage!==this&&(t instanceof Jd&&t.addChildrenToStorage(this),this.addToStorage(t),this._roots.push(t))},delRoot:function(t){if(null==t){for(var e=0;e<this._roots.length;e++){var n=this._roots[e];n instanceof Jd&&n.delChildrenFromStorage(this)}return this._roots=[],this._displayList=[],void(this._displayListLen=0)}if(t instanceof Array)for(var e=0,i=t.length;i>e;e++)this.delRoot(t[e]);else{var r=h(this._roots,t);r>=0&&(this.delFromStorage(t),this._roots.splice(r,1),t instanceof Jd&&t.delChildrenFromStorage(this))}},addToStorage:function(t){return t&&(t.__storage=this,t.dirty(!1)),this},delFromStorage:function(t){return t&&(t.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:fn};var rf={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1},af=function(t,e,n){return rf.hasOwnProperty(e)?n*=t.dpr:n},of=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],sf=function(t,e){this.extendFrom(t,!1),this.host=e};sf.prototype={constructor:sf,host:null,fill:"#000",stroke:null,opacity:1,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,font:null,textFont:null,fontStyle:null,fontWeight:null,fontSize:null,fontFamily:null,textTag:null,textFill:"#000",textStroke:null,textWidth:null,textHeight:null,textStrokeWidth:0,textLineHeight:null,textPosition:"inside",textRect:null,textOffset:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowColor:"transparent",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,textBoxShadowColor:"transparent",textBoxShadowBlur:0,textBoxShadowOffsetX:0,textBoxShadowOffsetY:0,transformText:!1,textRotation:0,textOrigin:null,textBackgroundColor:null,textBorderColor:null,textBorderWidth:0,textBorderRadius:0,textPadding:null,rich:null,truncate:null,blend:null,bind:function(t,e,n){for(var i=this,r=n&&n.style,a=!r,o=0;o<of.length;o++){var s=of[o],l=s[0];(a||i[l]!==r[l])&&(t[l]=af(t,l,i[l]||s[1]))}if((a||i.fill!==r.fill)&&(t.fillStyle=i.fill),(a||i.stroke!==r.stroke)&&(t.strokeStyle=i.stroke),(a||i.opacity!==r.opacity)&&(t.globalAlpha=null==i.opacity?1:i.opacity),(a||i.blend!==r.blend)&&(t.globalCompositeOperation=i.blend||"source-over"),this.hasStroke()){var h=i.lineWidth;t.lineWidth=h/(this.strokeNoScale&&e&&e.getLineScale?e.getLineScale():1)}},hasFill:function(){var t=this.fill;return null!=t&&"none"!==t},hasStroke:function(){var t=this.stroke;return null!=t&&"none"!==t&&this.lineWidth>0},extendFrom:function(t,e){if(t)for(var n in t)!t.hasOwnProperty(n)||e!==!0&&(e===!1?this.hasOwnProperty(n):null==t[n])||(this[n]=t[n])},set:function(t,e){"string"==typeof t?this[t]=e:this.extendFrom(t,!0)},clone:function(){var t=new this.constructor;return t.extendFrom(this,!0),t},getGradient:function(t,e,n){for(var i="radial"===e.type?gn:pn,r=i(t,e,n),a=e.colorStops,o=0;o<a.length;o++)r.addColorStop(a[o].offset,a[o].color);return r}};for(var lf=sf.prototype,hf=0;hf<of.length;hf++){var uf=of[hf];uf[0]in lf||(lf[uf[0]]=uf[1])}sf.getGradient=lf.getGradient;var cf=function(t,e){this.image=t,this.repeat=e,this.type="pattern"};cf.prototype.getCanvasPattern=function(t){return t.createPattern(this.image,this.repeat||"repeat")};var df=function(t,e,n){var i;n=n||jd,"string"==typeof t?i=mn(t,e,n):S(t)&&(i=t,t=i.id),this.id=t,this.dom=i;var r=i.style;r&&(i.onselectstart=vn,r["-webkit-user-select"]="none",r["user-select"]="none",r["-webkit-touch-callout"]="none",r["-webkit-tap-highlight-color"]="rgba(0,0,0,0)",r.padding=0,r.margin=0,r["border-width"]=0),this.domBack=null,this.ctxBack=null,this.painter=e,this.config=null,this.clearColor=0,this.motionBlur=!1,this.lastFrameAlpha=.7,this.dpr=n};df.prototype={constructor:df,__dirty:!0,__used:!1,__drawIndex:0,__startIndex:0,__endIndex:0,incremental:!1,getElementCount:function(){return this.__endIndex-this.__startIndex},initContext:function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},createBackBuffer:function(){var t=this.dpr;this.domBack=mn("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!=t&&this.ctxBack.scale(t,t)},resize:function(t,e){var n=this.dpr,i=this.dom,r=i.style,a=this.domBack;r&&(r.width=t+"px",r.height=e+"px"),i.width=t*n,i.height=e*n,a&&(a.width=t*n,a.height=e*n,1!=n&&this.ctxBack.scale(n,n))},clear:function(t,e){var n=this.dom,i=this.ctx,r=n.width,a=n.height,e=e||this.clearColor,o=this.motionBlur&&!t,s=this.lastFrameAlpha,l=this.dpr;if(o&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(n,0,0,r/l,a/l)),i.clearRect(0,0,r,a),e&&"transparent"!==e){var h;e.colorStops?(h=e.__canvasGradient||sf.getGradient(i,e,{x:0,y:0,width:r,height:a}),e.__canvasGradient=h):e.image&&(h=cf.prototype.getCanvasPattern.call(e,i)),i.save(),i.fillStyle=h||e,i.fillRect(0,0,r,a),i.restore()}if(o){var u=this.domBack;i.save(),i.globalAlpha=s,i.drawImage(u,0,0,r,a),i.restore()}}};var ff="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){setTimeout(t,16)},pf=new Od(50),gf={},vf=0,mf=5e3,yf=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,xf="12px sans-serif",_f={};_f.measureText=function(t,e){var n=l();return n.font=e||xf,n.measureText(t)};var wf={left:1,right:1,center:1},bf={top:1,bottom:1,middle:1},Sf=new rn,Mf=function(){};Mf.prototype={constructor:Mf,drawRectText:function(t,e){var n=this.style;e=n.textRect||e,this.__dirty&&Hn(n,!0);var i=n.text;if(null!=i&&(i+=""),ii(i,n)){t.save();var r=this.transform;n.transformText?this.setTransform(t):r&&(Sf.copy(e),Sf.applyTransform(r),e=Sf),Wn(this,t,i,n,e),t.restore()}}},ri.prototype={constructor:ri,type:"displayable",__dirty:!0,invisible:!1,z:0,z2:0,zlevel:0,draggable:!1,dragging:!1,silent:!1,culling:!1,cursor:"pointer",rectHover:!1,progressive:!1,incremental:!1,inplace:!1,beforeBrush:function(){},afterBrush:function(){},brush:function(){},getBoundingRect:function(){},contain:function(t,e){return this.rectContain(t,e)},traverse:function(t,e){t.call(e,this)},rectContain:function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect();return i.contain(n[0],n[1])},dirty:function(){this.__dirty=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(t){return this.animate("style",t)},attrKV:function(t,e){"style"!==t?Zd.prototype.attrKV.call(this,t,e):this.style.set(e)},setStyle:function(t,e){return this.style.set(t,e),this.dirty(!1),this},useStyle:function(t){return this.style=new sf(t,this),this.dirty(!1),this}},u(ri,Zd),c(ri,Mf),ai.prototype={constructor:ai,type:"image",brush:function(t,e){var n=this.style,i=n.image;n.bind(t,this,e);var r=this._image=xn(i,this._image,this,this.onload);if(r&&wn(r)){var a=n.x||0,o=n.y||0,s=n.width,l=n.height,h=r.width/r.height;if(null==s&&null!=l?s=l*h:null==l&&null!=s?l=s/h:null==s&&null==l&&(s=r.width,l=r.height),this.setTransform(t),n.sWidth&&n.sHeight){var u=n.sx||0,c=n.sy||0;t.drawImage(r,u,c,n.sWidth,n.sHeight,a,o,s,l)}else if(n.sx&&n.sy){var u=n.sx,c=n.sy,d=s-u,f=l-c;t.drawImage(r,u,c,d,f,a,o,s,l)}else t.drawImage(r,a,o,s,l);null!=n.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))}},getBoundingRect:function(){var t=this.style;return this._rect||(this._rect=new rn(t.x||0,t.y||0,t.width||0,t.height||0)),this._rect}},u(ai,ri);var If=1e5,Tf=314159,Cf=.01,Df=.001,kf=new rn(0,0,0,0),Af=new rn(0,0,0,0),Pf=function(t,e,n){this.type="canvas";var i=!t.nodeName||"CANVAS"===t.nodeName.toUpperCase();this._opts=n=o({},n||{}),this.dpr=n.devicePixelRatio||jd,this._singleCanvas=i,this.root=t;var r=t.style;r&&(r["-webkit-tap-highlight-color"]="transparent",r["-webkit-user-select"]=r["user-select"]=r["-webkit-touch-callout"]="none",t.innerHTML=""),this.storage=e;var a=this._zlevelList=[],s=this._layers={};if(this._layerConfig={},this._needsManuallyCompositing=!1,i){var l=t.width,h=t.height;null!=n.width&&(l=n.width),null!=n.height&&(h=n.height),this.dpr=n.devicePixelRatio||1,t.width=l*this.dpr,t.height=h*this.dpr,this._width=l,this._height=h;var u=new df(t,this,this.dpr);u.__builtin__=!0,u.initContext(),s[Tf]=u,a.push(Tf),this._domRoot=t}else{this._width=this._getSize(0),this._height=this._getSize(1);var c=this._domRoot=ci(this._width,this._height);t.appendChild(c)}this._hoverlayer=null,this._hoverElements=[]};Pf.prototype={constructor:Pf,getType:function(){return"canvas"},isSingleCanvas:function(){return this._singleCanvas},getViewportRoot:function(){return this._domRoot},getViewportRootOffset:function(){var t=this.getViewportRoot();return t?{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}:void 0},refresh:function(t){var e=this.storage.getDisplayList(!0),n=this._zlevelList;this._redrawId=Math.random(),this._paintList(e,t,this._redrawId);for(var i=0;i<n.length;i++){var r=n[i],a=this._layers[r];if(!a.__builtin__&&a.refresh){var o=0===i?this._backgroundColor:null;a.refresh(o)}}return this.refreshHover(),this},addHover:function(t,e){if(!t.__hoverMir){var n=new t.constructor({style:t.style,shape:t.shape});n.__from=t,t.__hoverMir=n,n.setStyle(e),this._hoverElements.push(n) | |
| 6 | +}},removeHover:function(t){var e=t.__hoverMir,n=this._hoverElements,i=h(n,e);i>=0&&n.splice(i,1),t.__hoverMir=null},clearHover:function(){for(var t=this._hoverElements,e=0;e<t.length;e++){var n=t[e].__from;n&&(n.__hoverMir=null)}t.length=0},refreshHover:function(){var t=this._hoverElements,e=t.length,n=this._hoverlayer;if(n&&n.clear(),e){dn(t,this.storage.displayableSortFunc),n||(n=this._hoverlayer=this.getLayer(If));var i={};n.ctx.save();for(var r=0;e>r;){var a=t[r],o=a.__from;o&&o.__zr?(r++,o.invisible||(a.transform=o.transform,a.invTransform=o.invTransform,a.__clipPaths=o.__clipPaths,this._doPaintEl(a,n,!0,i))):(t.splice(r,1),o.__hoverMir=null,e--)}n.ctx.restore()}},getHoverLayer:function(){return this.getLayer(If)},_paintList:function(t,e,n){if(this._redrawId===n){e=e||!1,this._updateLayerStatus(t);var i=this._doPaintList(t,e);if(this._needsManuallyCompositing&&this._compositeManually(),!i){var r=this;ff(function(){r._paintList(t,e,n)})}}},_compositeManually:function(){var t=this.getLayer(Tf).ctx,e=this._domRoot.width,n=this._domRoot.height;t.clearRect(0,0,e,n),this.eachBuiltinLayer(function(i){i.virtual&&t.drawImage(i.dom,0,0,e,n)})},_doPaintList:function(t,e){for(var n=[],i=0;i<this._zlevelList.length;i++){var r=this._zlevelList[i],a=this._layers[r];a.__builtin__&&a!==this._hoverlayer&&(a.__dirty||e)&&n.push(a)}for(var o=!0,s=0;s<n.length;s++){var a=n[s],l=a.ctx,h={};l.save();var u=e?a.__startIndex:a.__drawIndex,c=!e&&a.incremental&&Date.now,d=c&&Date.now(),p=a.zlevel===this._zlevelList[0]?this._backgroundColor:null;if(a.__startIndex===a.__endIndex)a.clear(!1,p);else if(u===a.__startIndex){var g=t[u];g.incremental&&g.notClear&&!e||a.clear(!1,p)}-1===u&&(console.error("For some unknown reason. drawIndex is -1"),u=a.__startIndex);for(var v=u;v<a.__endIndex;v++){var m=t[v];if(this._doPaintEl(m,a,e,h),m.__dirty=!1,c){var y=Date.now()-d;if(y>15)break}}a.__drawIndex=v,a.__drawIndex<a.__endIndex&&(o=!1),h.prevElClipPaths&&l.restore(),l.restore()}return $c.wxa&&f(this._layers,function(t){t&&t.ctx&&t.ctx.draw&&t.ctx.draw()}),o},_doPaintEl:function(t,e,n,i){var r=e.ctx,a=t.transform;if(!(!e.__dirty&&!n||t.invisible||0===t.style.opacity||a&&!a[0]&&!a[3]||t.culling&&li(t,this._width,this._height))){var o=t.__clipPaths;(!i.prevElClipPaths||hi(o,i.prevElClipPaths))&&(i.prevElClipPaths&&(e.ctx.restore(),i.prevElClipPaths=null,i.prevEl=null),o&&(r.save(),ui(o,r),i.prevElClipPaths=o)),t.beforeBrush&&t.beforeBrush(r),t.brush(r,i.prevEl||null),i.prevEl=t,t.afterBrush&&t.afterBrush(r)}},getLayer:function(t,e){this._singleCanvas&&!this._needsManuallyCompositing&&(t=Tf);var n=this._layers[t];return n||(n=new df("zr_"+t,this,this.dpr),n.zlevel=t,n.__builtin__=!0,this._layerConfig[t]&&r(n,this._layerConfig[t],!0),e&&(n.virtual=e),this.insertLayer(t,n),n.initContext()),n},insertLayer:function(t,e){var n=this._layers,i=this._zlevelList,r=i.length,a=null,o=-1,s=this._domRoot;if(n[t])return void Ud("ZLevel "+t+" has been used already");if(!si(e))return void Ud("Layer of zlevel "+t+" is not valid");if(r>0&&t>i[0]){for(o=0;r-1>o&&!(i[o]<t&&i[o+1]>t);o++);a=n[i[o]]}if(i.splice(o+1,0,t),n[t]=e,!e.virtual)if(a){var l=a.dom;l.nextSibling?s.insertBefore(e.dom,l.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom)},eachLayer:function(t,e){var n,i,r=this._zlevelList;for(i=0;i<r.length;i++)n=r[i],t.call(e,this._layers[n],n)},eachBuiltinLayer:function(t,e){var n,i,r,a=this._zlevelList;for(r=0;r<a.length;r++)i=a[r],n=this._layers[i],n.__builtin__&&t.call(e,n,i)},eachOtherLayer:function(t,e){var n,i,r,a=this._zlevelList;for(r=0;r<a.length;r++)i=a[r],n=this._layers[i],n.__builtin__||t.call(e,n,i)},getLayers:function(){return this._layers},_updateLayerStatus:function(t){function e(t){r&&(r.__endIndex!==t&&(r.__dirty=!0),r.__endIndex=t)}if(this.eachBuiltinLayer(function(t){t.__dirty=t.__used=!1}),this._singleCanvas)for(var n=1;n<t.length;n++){var i=t[n];if(i.zlevel!==t[n-1].zlevel||i.incremental){this._needsManuallyCompositing=!0;break}}for(var r=null,a=0,n=0;n<t.length;n++){var o,i=t[n],s=i.zlevel;i.incremental?(o=this.getLayer(s+Df,this._needsManuallyCompositing),o.incremental=!0,a=1):o=this.getLayer(s+(a>0?Cf:0),this._needsManuallyCompositing),o.__builtin__||Ud("ZLevel "+s+" has been used by unkown layer "+o.id),o!==r&&(o.__used=!0,o.__startIndex!==n&&(o.__dirty=!0),o.__startIndex=n,o.__drawIndex=o.incremental?-1:n,e(n),r=o),i.__dirty&&(o.__dirty=!0,o.incremental&&o.__drawIndex<0&&(o.__drawIndex=n))}e(n),this.eachBuiltinLayer(function(t){!t.__used&&t.getElementCount()>0&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)})},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(t){t.clear()},setBackgroundColor:function(t){this._backgroundColor=t},configLayer:function(t,e){if(e){var n=this._layerConfig;n[t]?r(n[t],e,!0):n[t]=e;for(var i=0;i<this._zlevelList.length;i++){var a=this._zlevelList[i];if(a===t||a===t+Cf){var o=this._layers[a];r(o,n[t],!0)}}}},delLayer:function(t){var e=this._layers,n=this._zlevelList,i=e[t];i&&(i.dom.parentNode.removeChild(i.dom),delete e[t],n.splice(h(n,t),1))},resize:function(t,e){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var i=this._opts;if(null!=t&&(i.width=t),null!=e&&(i.height=e),t=this._getSize(0),e=this._getSize(1),n.style.display="",this._width!=t||e!=this._height){n.style.width=t+"px",n.style.height=e+"px";for(var r in this._layers)this._layers.hasOwnProperty(r)&&this._layers[r].resize(t,e);f(this._progressiveLayers,function(n){n.resize(t,e)}),this.refresh(!0)}this._width=t,this._height=e}else{if(null==t||null==e)return;this._width=t,this._height=e,this.getLayer(Tf).resize(t,e)}return this},clearLayer:function(t){var e=this._layers[t];e&&e.clear()},dispose:function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},getRenderedCanvas:function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._layers[Tf].dom;var e=new df("image",this,t.pixelRatio||this.dpr);if(e.initContext(),e.clear(!1,t.backgroundColor||this._backgroundColor),t.pixelRatio<=this.dpr){this.refresh();var n=e.dom.width,i=e.dom.height,r=e.ctx;this.eachLayer(function(t){t.__builtin__?r.drawImage(t.dom,0,0,n,i):t.renderToCanvas&&(e.ctx.save(),t.renderToCanvas(e.ctx),e.ctx.restore())})}else for(var a={},o=this.storage.getDisplayList(!0),s=0;s<o.length;s++){var l=o[s];this._doPaintEl(l,e,!0,a)}return e.dom},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,n=["width","height"][t],i=["clientWidth","clientHeight"][t],r=["paddingLeft","paddingTop"][t],a=["paddingRight","paddingBottom"][t];if(null!=e[n]&&"auto"!==e[n])return parseFloat(e[n]);var o=this.root,s=document.defaultView.getComputedStyle(o);return(o[i]||oi(s[n])||oi(o.style[n]))-(oi(s[r])||0)-(oi(s[a])||0)|0},pathToImage:function(t,e){e=e||this.dpr;var n=document.createElement("canvas"),i=n.getContext("2d"),r=t.getBoundingRect(),a=t.style,o=a.shadowBlur*e,s=a.shadowOffsetX*e,l=a.shadowOffsetY*e,h=a.hasStroke()?a.lineWidth:0,u=Math.max(h/2,-s+o),c=Math.max(h/2,s+o),d=Math.max(h/2,-l+o),f=Math.max(h/2,l+o),p=r.width+u+c,g=r.height+d+f;n.width=p*e,n.height=g*e,i.scale(e,e),i.clearRect(0,0,p,g),i.dpr=e;var v={position:t.position,rotation:t.rotation,scale:t.scale};t.position=[u-r.x,d-r.y],t.rotation=0,t.scale=[1,1],t.updateTransform(),t&&t.brush(i);var m=ai,y=new m({style:{x:0,y:0,image:n}});return null!=v.position&&(y.position=t.position=v.position),null!=v.rotation&&(y.rotation=t.rotation=v.rotation),null!=v.scale&&(y.scale=t.scale=v.scale),y}};var Lf="undefined"!=typeof window&&!!window.addEventListener,Of=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Bf=Lf?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0},Ef=function(t){t=t||{},this.stage=t.stage||{},this.onframe=t.onframe||function(){},this._clips=[],this._running=!1,this._time,this._pausedTime,this._pauseStart,this._paused=!1,yd.call(this)};Ef.prototype={constructor:Ef,addClip:function(t){this._clips.push(t)},addAnimator:function(t){t.animation=this;for(var e=t.getClips(),n=0;n<e.length;n++)this.addClip(e[n])},removeClip:function(t){var e=h(this._clips,t);e>=0&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),n=0;n<e.length;n++)this.removeClip(e[n]);t.animation=null},_update:function(){for(var t=(new Date).getTime()-this._pausedTime,e=t-this._time,n=this._clips,i=n.length,r=[],a=[],o=0;i>o;o++){var s=n[o],l=s.step(t,e);l&&(r.push(l),a.push(s))}for(var o=0;i>o;)n[o]._needsRemove?(n[o]=n[i-1],n.pop(),i--):o++;i=r.length;for(var o=0;i>o;o++)a[o].fire(r[o]);this._time=t,this.onframe(e),this.trigger("frame",e),this.stage.update&&this.stage.update()},_startLoop:function(){function t(){e._running&&(ff(t),!e._paused&&e._update())}var e=this;this._running=!0,ff(t)},start:function(){this._time=(new Date).getTime(),this._pausedTime=0,this._startLoop()},stop:function(){this._running=!1},pause:function(){this._paused||(this._pauseStart=(new Date).getTime(),this._paused=!0)},resume:function(){this._paused&&(this._pausedTime+=(new Date).getTime()-this._pauseStart,this._paused=!1)},clear:function(){this._clips=[]},isFinished:function(){return!this._clips.length},animate:function(t,e){e=e||{};var n=new Wd(t,e.loop,e.getter,e.setter);return this.addAnimator(n),n}},c(Ef,yd);var zf=function(){this._track=[]};zf.prototype={constructor:zf,recognize:function(t,e,n){return this._doTrack(t,e,n),this._recognize(t)},clear:function(){return this._track.length=0,this},_doTrack:function(t,e,n){var i=t.touches;if(i){for(var r={points:[],touches:[],target:e,event:t},a=0,o=i.length;o>a;a++){var s=i[a],l=fi(n,s,{});r.points.push([l.zrX,l.zrY]),r.touches.push(s)}this._track.push(r)}},_recognize:function(t){for(var e in Rf)if(Rf.hasOwnProperty(e)){var n=Rf[e](this._track,t);if(n)return n}}};var Rf={pinch:function(t,e){var n=t.length;if(n){var i=(t[n-1]||{}).points,r=(t[n-2]||{}).points||i;if(r&&r.length>1&&i&&i.length>1){var a=yi(i)/yi(r);!isFinite(a)&&(a=1),e.pinchScale=a;var o=xi(i);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:t[0].target,event:e}}}}},Nf=300,Ff=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Hf=["touchstart","touchend","touchmove"],Gf={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},Wf=p(Ff,function(t){var e=t.replace("mouse","pointer");return Gf[e]?e:t}),Vf={mousemove:function(t){t=gi(this.dom,t),this.trigger("mousemove",t)},mouseout:function(t){t=gi(this.dom,t);var e=t.toElement||t.relatedTarget;if(e!=this.dom)for(;e&&9!=e.nodeType;){if(e===this.dom)return;e=e.parentNode}this.trigger("mouseout",t)},touchstart:function(t){t=gi(this.dom,t),t.zrByTouch=!0,this._lastTouchMoment=new Date,wi(this,t,"start"),Vf.mousemove.call(this,t),Vf.mousedown.call(this,t),bi(this)},touchmove:function(t){t=gi(this.dom,t),t.zrByTouch=!0,wi(this,t,"change"),Vf.mousemove.call(this,t),bi(this)},touchend:function(t){t=gi(this.dom,t),t.zrByTouch=!0,wi(this,t,"end"),Vf.mouseup.call(this,t),+new Date-this._lastTouchMoment<Nf&&Vf.click.call(this,t),bi(this)},pointerdown:function(t){Vf.mousedown.call(this,t)},pointermove:function(t){Si(t)||Vf.mousemove.call(this,t)},pointerup:function(t){Vf.mouseup.call(this,t)},pointerout:function(t){Si(t)||Vf.mouseout.call(this,t)}};f(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){Vf[t]=function(e){e=gi(this.dom,e),this.trigger(t,e)}});var Xf=Ii.prototype;Xf.dispose=function(){for(var t=Ff.concat(Hf),e=0;e<t.length;e++){var n=t[e];mi(this.dom,_i(n),this._handlers[n])}},Xf.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},c(Ii,yd);var jf=!$c.canvasSupported,Yf={canvas:Pf},Uf={},qf="4.0.3",Zf=function(t,e,n){n=n||{},this.dom=e,this.id=t;var i=this,r=new nf,a=n.renderer;if(jf){if(!Yf.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");a="vml"}else a&&Yf[a]||(a="canvas");var o=new Yf[a](e,r,n,t);this.storage=r,this.painter=o;var s=$c.node||$c.worker?null:new Ii(o.getViewportRoot());this.handler=new wd(r,o,s,o.root),this.animation=new Ef({stage:{update:y(this.flush,this)}}),this.animation.start(),this._needsRefresh;var l=r.delFromStorage,h=r.addToStorage;r.delFromStorage=function(t){l.call(r,t),t&&t.removeSelfFromZr(i)},r.addToStorage=function(t){h.call(r,t),t.addSelfToZr(i)}};Zf.prototype={constructor:Zf,getId:function(){return this.id},add:function(t){this.storage.addRoot(t),this._needsRefresh=!0},remove:function(t){this.storage.delRoot(t),this._needsRefresh=!0},configLayer:function(t,e){this.painter.configLayer&&this.painter.configLayer(t,e),this._needsRefresh=!0},setBackgroundColor:function(t){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this._needsRefresh=!0},refreshImmediately:function(){this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1},refresh:function(){this._needsRefresh=!0},flush:function(){var t;this._needsRefresh&&(t=!0,this.refreshImmediately()),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately()),t&&this.trigger("rendered")},addHover:function(t,e){this.painter.addHover&&(this.painter.addHover(t,e),this.refreshHover())},removeHover:function(t){this.painter.removeHover&&(this.painter.removeHover(t),this.refreshHover())},clearHover:function(){this.painter.clearHover&&(this.painter.clearHover(),this.refreshHover())},refreshHover:function(){this._needsRefreshHover=!0},refreshHoverImmediately:function(){this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.refreshHover()},resize:function(t){t=t||{},this.painter.resize(t.width,t.height),this.handler.resize()},clearAnimation:function(){this.animation.clear()},getWidth:function(){return this.painter.getWidth()},getHeight:function(){return this.painter.getHeight()},pathToImage:function(t,e){return this.painter.pathToImage(t,e)},setCursorStyle:function(t){this.handler.setCursorStyle(t)},findHover:function(t,e){return this.handler.findHover(t,e)},on:function(t,e,n){this.handler.on(t,e,n)},off:function(t,e){this.handler.off(t,e)},trigger:function(t,e){this.handler.trigger(t,e)},clear:function(){this.storage.delRoot(),this.painter.clear()},dispose:function(){this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,Ai(this.id)}};var $f=(Object.freeze||Object)({version:qf,init:Ti,dispose:Ci,getInstance:Di,registerPainter:ki}),Kf=f,Qf=S,Jf=_,tp="series\x00",ep=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"],np=0,ip=".",rp="___EC__COMPONENT__CONTAINER___",ap=0,op=function(t){for(var e=0;e<t.length;e++)t[e][1]||(t[e][1]=t[e][0]);return function(e,n,i){for(var r={},a=0;a<t.length;a++){var o=t[a][1];if(!(n&&h(n,o)>=0||i&&h(i,o)<0)){var s=e.getShallow(o);null!=s&&(r[t[a][0]]=s)}}return r}},sp=op([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),lp={getLineStyle:function(t){var e=sp(this,t),n=this.getLineDash(e.lineWidth);return n&&(e.lineDash=n),e},getLineDash:function(t){null==t&&(t=1);var e=this.get("type"),n=Math.max(t,2),i=4*t;return"solid"===e||null==e?null:"dashed"===e?[i,i]:[n,n]}},hp=op([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),up={getAreaStyle:function(t,e){return hp(this,t,e)}},cp=Math.pow,dp=Math.sqrt,fp=1e-8,pp=1e-4,gp=dp(3),vp=1/3,mp=G(),yp=G(),xp=G(),_p=Math.min,wp=Math.max,bp=Math.sin,Sp=Math.cos,Mp=2*Math.PI,Ip=G(),Tp=G(),Cp=G(),Dp=[],kp=[],Ap={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Pp=[],Lp=[],Op=[],Bp=[],Ep=Math.min,zp=Math.max,Rp=Math.cos,Np=Math.sin,Fp=Math.sqrt,Hp=Math.abs,Gp="undefined"!=typeof Float32Array,Wp=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};Wp.prototype={constructor:Wp,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(t,e){this._ux=Hp(1/jd/t)||0,this._uy=Hp(1/jd/e)||0},getContext:function(){return this._ctx},beginPath:function(t){return this._ctx=t,t&&t.beginPath(),t&&(this.dpr=t.dpr),this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this},moveTo:function(t,e){return this.addData(Ap.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},lineTo:function(t,e){var n=Hp(t-this._xi)>this._ux||Hp(e-this._yi)>this._uy||this._len<5;return this.addData(Ap.L,t,e),this._ctx&&n&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),n&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,n,i,r,a){return this.addData(Ap.C,t,e,n,i,r,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,n,i,r,a):this._ctx.bezierCurveTo(t,e,n,i,r,a)),this._xi=r,this._yi=a,this},quadraticCurveTo:function(t,e,n,i){return this.addData(Ap.Q,t,e,n,i),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,n,i):this._ctx.quadraticCurveTo(t,e,n,i)),this._xi=n,this._yi=i,this},arc:function(t,e,n,i,r,a){return this.addData(Ap.A,t,e,n,n,i,r-i,0,a?0:1),this._ctx&&this._ctx.arc(t,e,n,i,r,a),this._xi=Rp(r)*n+t,this._yi=Np(r)*n+t,this},arcTo:function(t,e,n,i,r){return this._ctx&&this._ctx.arcTo(t,e,n,i,r),this},rect:function(t,e,n,i){return this._ctx&&this._ctx.rect(t,e,n,i),this.addData(Ap.R,t,e,n,i),this},closePath:function(){this.addData(Ap.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,n),t.closePath()),this._xi=e,this._yi=n,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t,this._dashIdx=0;for(var e=0,n=0;n<t.length;n++)e+=t[n];this._dashSum=e}return this},setLineDashOffset:function(t){return this._dashOffset=t,this},len:function(){return this._len},setData:function(t){var e=t.length;this.data&&this.data.length==e||!Gp||(this.data=new Float32Array(e));for(var n=0;e>n;n++)this.data[n]=t[n];this._len=e},appendPath:function(t){t instanceof Array||(t=[t]);for(var e=t.length,n=0,i=this._len,r=0;e>r;r++)n+=t[r].len();Gp&&this.data instanceof Float32Array&&(this.data=new Float32Array(i+n));for(var r=0;e>r;r++)for(var a=t[r].data,o=0;o<a.length;o++)this.data[i++]=a[o];this._len=i},addData:function(t){if(this._saveData){var e=this.data;this._len+arguments.length>e.length&&(this._expandData(),e=this.data);for(var n=0;n<arguments.length;n++)e[this._len++]=arguments[n];this._prevCmd=t}},_expandData:function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e<this._len;e++)t[e]=this.data[e];this.data=t}},_needsDash:function(){return this._lineDash},_dashedLineTo:function(t,e){var n,i,r=this._dashSum,a=this._dashOffset,o=this._lineDash,s=this._ctx,l=this._xi,h=this._yi,u=t-l,c=e-h,d=Fp(u*u+c*c),f=l,p=h,g=o.length;for(u/=d,c/=d,0>a&&(a=r+a),a%=r,f-=a*u,p-=a*c;u>0&&t>=f||0>u&&f>=t||0==u&&(c>0&&e>=p||0>c&&p>=e);)i=this._dashIdx,n=o[i],f+=u*n,p+=c*n,this._dashIdx=(i+1)%g,u>0&&l>f||0>u&&f>l||c>0&&h>p||0>c&&p>h||s[i%2?"moveTo":"lineTo"](u>=0?Ep(f,t):zp(f,t),c>=0?Ep(p,e):zp(p,e));u=f-t,c=p-e,this._dashOffset=-Fp(u*u+c*c)},_dashedBezierTo:function(t,e,n,i,r,a){var o,s,l,h,u,c=this._dashSum,d=this._dashOffset,f=this._lineDash,p=this._ctx,g=this._xi,v=this._yi,m=tr,y=0,x=this._dashIdx,_=f.length,w=0;for(0>d&&(d=c+d),d%=c,o=0;1>o;o+=.1)s=m(g,t,n,r,o+.1)-m(g,t,n,r,o),l=m(v,e,i,a,o+.1)-m(v,e,i,a,o),y+=Fp(s*s+l*l);for(;_>x&&(w+=f[x],!(w>d));x++);for(o=(w-d)/y;1>=o;)h=m(g,t,n,r,o),u=m(v,e,i,a,o),x%2?p.moveTo(h,u):p.lineTo(h,u),o+=f[x]/y,x=(x+1)%_;x%2!==0&&p.lineTo(r,a),s=r-h,l=a-u,this._dashOffset=-Fp(s*s+l*l)},_dashedQuadraticTo:function(t,e,n,i){var r=n,a=i;n=(n+2*t)/3,i=(i+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,n,i,r,a)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,Gp&&(this.data=new Float32Array(t)))},getBoundingRect:function(){Pp[0]=Pp[1]=Op[0]=Op[1]=Number.MAX_VALUE,Lp[0]=Lp[1]=Bp[0]=Bp[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,n=0,i=0,r=0,a=0;a<t.length;){var o=t[a++];switch(1==a&&(e=t[a],n=t[a+1],i=e,r=n),o){case Ap.M:i=t[a++],r=t[a++],e=i,n=r,Op[0]=i,Op[1]=r,Bp[0]=i,Bp[1]=r;break;case Ap.L:fr(e,n,t[a],t[a+1],Op,Bp),e=t[a++],n=t[a++];break;case Ap.C:pr(e,n,t[a++],t[a++],t[a++],t[a++],t[a],t[a+1],Op,Bp),e=t[a++],n=t[a++];break;case Ap.Q:gr(e,n,t[a++],t[a++],t[a],t[a+1],Op,Bp),e=t[a++],n=t[a++];break;case Ap.A:var s=t[a++],l=t[a++],h=t[a++],u=t[a++],c=t[a++],d=t[a++]+c,f=(t[a++],1-t[a++]);1==a&&(i=Rp(c)*h+s,r=Np(c)*u+l),vr(s,l,h,u,c,d,f,Op,Bp),e=Rp(d)*h+s,n=Np(d)*u+l;break;case Ap.R:i=e=t[a++],r=n=t[a++];var p=t[a++],g=t[a++];fr(i,r,i+p,r+g,Op,Bp);break;case Ap.Z:e=i,n=r}oe(Pp,Pp,Op),se(Lp,Lp,Bp)}return 0===a&&(Pp[0]=Pp[1]=Lp[0]=Lp[1]=0),new rn(Pp[0],Pp[1],Lp[0]-Pp[0],Lp[1]-Pp[1])},rebuildPath:function(t){for(var e,n,i,r,a,o,s=this.data,l=this._ux,h=this._uy,u=this._len,c=0;u>c;){var d=s[c++];switch(1==c&&(i=s[c],r=s[c+1],e=i,n=r),d){case Ap.M:e=i=s[c++],n=r=s[c++],t.moveTo(i,r);break;case Ap.L:a=s[c++],o=s[c++],(Hp(a-i)>l||Hp(o-r)>h||c===u-1)&&(t.lineTo(a,o),i=a,r=o);break;case Ap.C:t.bezierCurveTo(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),i=s[c-2],r=s[c-1];break;case Ap.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),i=s[c-2],r=s[c-1];break;case Ap.A:var f=s[c++],p=s[c++],g=s[c++],v=s[c++],m=s[c++],y=s[c++],x=s[c++],_=s[c++],w=g>v?g:v,b=g>v?1:g/v,S=g>v?v/g:1,M=Math.abs(g-v)>.001,I=m+y;M?(t.translate(f,p),t.rotate(x),t.scale(b,S),t.arc(0,0,w,m,I,1-_),t.scale(1/b,1/S),t.rotate(-x),t.translate(-f,-p)):t.arc(f,p,w,m,I,1-_),1==c&&(e=Rp(m)*g+f,n=Np(m)*v+p),i=Rp(I)*g+f,r=Np(I)*v+p;break;case Ap.R:e=i=s[c],n=r=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case Ap.Z:t.closePath(),i=e,r=n}}}},Wp.CMD=Ap;var Vp=2*Math.PI,Xp=2*Math.PI,jp=Wp.CMD,Yp=2*Math.PI,Up=1e-4,qp=[-1,-1,-1],Zp=[-1,-1],$p=cf.prototype.getCanvasPattern,Kp=Math.abs,Qp=new Wp(!0);Pr.prototype={constructor:Pr,type:"path",__dirtyPath:!0,strokeContainThreshold:5,brush:function(t,e){var n=this.style,i=this.path||Qp,r=n.hasStroke(),a=n.hasFill(),o=n.fill,s=n.stroke,l=a&&!!o.colorStops,h=r&&!!s.colorStops,u=a&&!!o.image,c=r&&!!s.image;if(n.bind(t,this,e),this.setTransform(t),this.__dirty){var d;l&&(d=d||this.getBoundingRect(),this._fillGradient=n.getGradient(t,o,d)),h&&(d=d||this.getBoundingRect(),this._strokeGradient=n.getGradient(t,s,d))}l?t.fillStyle=this._fillGradient:u&&(t.fillStyle=$p.call(o,t)),h?t.strokeStyle=this._strokeGradient:c&&(t.strokeStyle=$p.call(s,t));var f=n.lineDash,p=n.lineDashOffset,g=!!t.setLineDash,v=this.getGlobalScale();i.setScale(v[0],v[1]),this.__dirtyPath||f&&!g&&r?(i.beginPath(t),f&&!g&&(i.setLineDash(f),i.setLineDashOffset(p)),this.buildPath(i,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(t.beginPath(),this.path.rebuildPath(t)),a&&i.fill(t),f&&g&&(t.setLineDash(f),t.lineDashOffset=p),r&&i.stroke(t),f&&g&&t.setLineDash([]),null!=n.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))},buildPath:function(){},createPathProxy:function(){this.path=new Wp},getBoundingRect:function(){var t=this._rect,e=this.style,n=!t;if(n){var i=this.path;i||(i=this.path=new Wp),this.__dirtyPath&&(i.beginPath(),this.buildPath(i,this.shape,!1)),t=i.getBoundingRect()}if(this._rect=t,e.hasStroke()){var r=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||n){r.copy(t);var a=e.lineWidth,o=e.strokeNoScale?this.getLineScale():1;e.hasFill()||(a=Math.max(a,this.strokeContainThreshold||4)),o>1e-10&&(r.width+=a/o,r.height+=a/o,r.x-=a/o/2,r.y-=a/o/2)}return r}return t},contain:function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect(),r=this.style;if(t=n[0],e=n[1],i.contain(t,e)){var a=this.path.data;if(r.hasStroke()){var o=r.lineWidth,s=r.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(r.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),Ar(a,o/s,t,e)))return!0}if(r.hasFill())return kr(a,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(t){return this.animate("shape",t)},attrKV:function(t,e){"shape"===t?(this.setShape(e),this.__dirtyPath=!0,this._rect=null):ri.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var n=this.shape;if(n){if(S(t))for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);else n[t]=e;this.dirty(!0)}return this},getLineScale:function(){var t=this.transform;return t&&Kp(t[0]-1)>1e-10&&Kp(t[3]-1)>1e-10?Math.sqrt(Kp(t[0]*t[3]-t[2]*t[1])):1}},Pr.extend=function(t){var e=function(e){Pr.call(this,e),t.style&&this.style.extendFrom(t.style,!1);var n=t.shape;if(n){this.shape=this.shape||{};var i=this.shape;for(var r in n)!i.hasOwnProperty(r)&&n.hasOwnProperty(r)&&(i[r]=n[r])}t.init&&t.init.call(this,e)};u(e,Pr);for(var n in t)"style"!==n&&"shape"!==n&&(e.prototype[n]=t[n]);return e},u(Pr,ri);var Jp=Wp.CMD,tg=[[],[],[]],eg=Math.sqrt,ng=Math.atan2,ig=function(t,e){var n,i,r,a,o,s,l=t.data,h=Jp.M,u=Jp.C,c=Jp.L,d=Jp.R,f=Jp.A,p=Jp.Q;for(r=0,a=0;r<l.length;){switch(n=l[r++],a=r,i=0,n){case h:i=1;break;case c:i=1;break;case u:i=3;break;case p:i=2;break;case f:var g=e[4],v=e[5],m=eg(e[0]*e[0]+e[1]*e[1]),y=eg(e[2]*e[2]+e[3]*e[3]),x=ng(-e[1]/y,e[0]/m);l[r]*=m,l[r++]+=g,l[r]*=y,l[r++]+=v,l[r++]*=m,l[r++]*=y,l[r++]+=x,l[r++]+=x,r+=2,a=r;break;case d:s[0]=l[r++],s[1]=l[r++],ae(s,s,e),l[a++]=s[0],l[a++]=s[1],s[0]+=l[r++],s[1]+=l[r++],ae(s,s,e),l[a++]=s[0],l[a++]=s[1]}for(o=0;i>o;o++){var s=tg[o];s[0]=l[r++],s[1]=l[r++],ae(s,s,e),l[a++]=s[0],l[a++]=s[1]}}},rg=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"],ag=Math.sqrt,og=Math.sin,sg=Math.cos,lg=Math.PI,hg=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])},ug=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(hg(t)*hg(e))},cg=function(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(ug(t,e))},dg=function(t){ri.call(this,t)};dg.prototype={constructor:dg,type:"text",brush:function(t,e){var n=this.style;this.__dirty&&Hn(n,!0),n.fill=n.stroke=n.shadowBlur=n.shadowColor=n.shadowOffsetX=n.shadowOffsetY=null;var i=n.text;null!=i&&(i+=""),n.bind(t,this,e),ii(i,n)&&(this.setTransform(t),Wn(this,t,i,n),this.restoreTransform(t))},getBoundingRect:function(){var t=this.style;if(this.__dirty&&Hn(t,!0),!this._rect){var e=t.text;null!=e?e+="":e="";var n=Sn(t.text+"",t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.rich);if(n.x+=t.x||0,n.y+=t.y||0,Jn(t.textStroke,t.textStrokeWidth)){var i=t.textStrokeWidth;n.x-=i/2,n.y-=i/2,n.width+=i,n.height+=i}this._rect=n}return this._rect}},u(dg,ri);var fg=Pr.extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(t,e,n){n&&t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,2*Math.PI,!0)}}),pg=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]],gg=function(t){return $c.browser.ie&&$c.browser.version>=11?function(){var e,n=this.__clipPaths,i=this.style;if(n)for(var r=0;r<n.length;r++){var a=n[r],o=a&&a.shape,s=a&&a.type;if(o&&("sector"===s&&o.startAngle===o.endAngle||"rect"===s&&(!o.width||!o.height))){for(var l=0;l<pg.length;l++)pg[l][2]=i[pg[l][0]],i[pg[l][0]]=pg[l][1];e=!0;break}}if(t.apply(this,arguments),e)for(var l=0;l<pg.length;l++)i[pg[l][0]]=pg[l][2]}:t},vg=Pr.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},brush:gg(Pr.prototype.brush),buildPath:function(t,e){var n=e.cx,i=e.cy,r=Math.max(e.r0||0,0),a=Math.max(e.r,0),o=e.startAngle,s=e.endAngle,l=e.clockwise,h=Math.cos(o),u=Math.sin(o);t.moveTo(h*r+n,u*r+i),t.lineTo(h*a+n,u*a+i),t.arc(n,i,a,o,s,!l),t.lineTo(Math.cos(s)*r+n,Math.sin(s)*r+i),0!==r&&t.arc(n,i,r,s,o,l),t.closePath()}}),mg=Pr.extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(t,e){var n=e.cx,i=e.cy,r=2*Math.PI;t.moveTo(n+e.r,i),t.arc(n,i,e.r,0,r,!1),t.moveTo(n+e.r0,i),t.arc(n,i,e.r0,0,r,!0)}}),yg=function(t,e){for(var n=t.length,i=[],r=0,a=1;n>a;a++)r+=ee(t[a-1],t[a]);var o=r/2;o=n>o?n:o;for(var a=0;o>a;a++){var s,l,h,u=a/(o-1)*(e?n:n-1),c=Math.floor(u),d=u-c,f=t[c%n];e?(s=t[(c-1+n)%n],l=t[(c+1)%n],h=t[(c+2)%n]):(s=t[0===c?c:c-1],l=t[c>n-2?n-1:c+1],h=t[c>n-3?n-1:c+2]);var p=d*d,g=d*p;i.push([Nr(s[0],f[0],l[0],h[0],d,p,g),Nr(s[1],f[1],l[1],h[1],d,p,g)])}return i},xg=function(t,e,n,i){var r,a,o,s,l=[],h=[],u=[],c=[];if(i){o=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,f=t.length;f>d;d++)oe(o,o,t[d]),se(s,s,t[d]);oe(o,o,i[0]),se(s,s,i[1])}for(var d=0,f=t.length;f>d;d++){var p=t[d];if(n)r=t[d?d-1:f-1],a=t[(d+1)%f];else{if(0===d||d===f-1){l.push(V(t[d]));continue}r=t[d-1],a=t[d+1]}U(h,a,r),J(h,h,e);var g=ee(p,r),v=ee(p,a),m=g+v;0!==m&&(g/=m,v/=m),J(u,h,-g),J(c,h,v);var y=j([],p,u),x=j([],p,c);i&&(se(y,y,o),oe(y,y,s),se(x,x,o),oe(x,x,s)),l.push(y),l.push(x)}return n&&l.push(l.shift()),l},_g=Pr.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,e){Fr(t,e,!0)}}),wg=Pr.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){Fr(t,e,!1)}}),bg=Pr.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.x,i=e.y,r=e.width,a=e.height;e.r?Fn(t,e):t.rect(n,i,r,a),t.closePath()}}),Sg=Pr.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var n=e.x1,i=e.y1,r=e.x2,a=e.y2,o=e.percent;0!==o&&(t.moveTo(n,i),1>o&&(r=n*(1-o)+r*o,a=i*(1-o)+a*o),t.lineTo(r,a))},pointAt:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}}),Mg=[],Ig=Pr.extend({type:"bezier-curve",shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var n=e.x1,i=e.y1,r=e.x2,a=e.y2,o=e.cpx1,s=e.cpy1,l=e.cpx2,h=e.cpy2,u=e.percent;0!==u&&(t.moveTo(n,i),null==l||null==h?(1>u&&(ur(n,o,r,u,Mg),o=Mg[1],r=Mg[2],ur(i,s,a,u,Mg),s=Mg[1],a=Mg[2]),t.quadraticCurveTo(o,s,r,a)):(1>u&&(rr(n,o,l,r,u,Mg),o=Mg[1],l=Mg[2],r=Mg[3],rr(i,s,h,a,u,Mg),s=Mg[1],h=Mg[2],a=Mg[3]),t.bezierCurveTo(o,s,l,h,r,a)))},pointAt:function(t){return Hr(this.shape,t,!1)},tangentAt:function(t){var e=Hr(this.shape,t,!0);return te(e,e)}}),Tg=Pr.extend({type:"arc",shape:{cx:0,cy:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},style:{stroke:"#000",fill:null},buildPath:function(t,e){var n=e.cx,i=e.cy,r=Math.max(e.r,0),a=e.startAngle,o=e.endAngle,s=e.clockwise,l=Math.cos(a),h=Math.sin(a);t.moveTo(l*r+n,h*r+i),t.arc(n,i,r,a,o,!s)}}),Cg=Pr.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var t=this.__dirtyPath,e=this.shape.paths,n=0;n<e.length;n++)t=t||e[n].__dirtyPath;this.__dirtyPath=t,this.__dirty=this.__dirty||t},beforeBrush:function(){this._updatePathDirty();for(var t=this.shape.paths||[],e=this.getGlobalScale(),n=0;n<t.length;n++)t[n].path||t[n].createPathProxy(),t[n].path.setScale(e[0],e[1])},buildPath:function(t,e){for(var n=e.paths||[],i=0;i<n.length;i++)n[i].buildPath(t,n[i].shape,!0)},afterBrush:function(){for(var t=this.shape.paths||[],e=0;e<t.length;e++)t[e].__dirtyPath=!1},getBoundingRect:function(){return this._updatePathDirty(),Pr.prototype.getBoundingRect.call(this)}}),Dg=function(t){this.colorStops=t||[]};Dg.prototype={constructor:Dg,addColorStop:function(t,e){this.colorStops.push({offset:t,color:e})}};var kg=function(t,e,n,i,r,a){this.x=null==t?0:t,this.y=null==e?0:e,this.x2=null==n?1:n,this.y2=null==i?0:i,this.type="linear",this.global=a||!1,Dg.call(this,r)};kg.prototype={constructor:kg},u(kg,Dg);var Ag=function(t,e,n,i,r){this.x=null==t?.5:t,this.y=null==e?.5:e,this.r=null==n?.5:n,this.type="radial",this.global=r||!1,Dg.call(this,i)};Ag.prototype={constructor:Ag},u(Ag,Dg),Gr.prototype.incremental=!0,Gr.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1 | |
| 7 | +},Gr.prototype.addDisplayable=function(t,e){e?this._temporaryDisplayables.push(t):this._displayables.push(t),this.dirty()},Gr.prototype.addDisplayables=function(t,e){e=e||!1;for(var n=0;n<t.length;n++)this.addDisplayable(t[n],e)},Gr.prototype.eachPendingDisplayable=function(t){for(var e=this._cursor;e<this._displayables.length;e++)t&&t(this._displayables[e]);for(var e=0;e<this._temporaryDisplayables.length;e++)t&&t(this._temporaryDisplayables[e])},Gr.prototype.update=function(){this.updateTransform();for(var t=this._cursor;t<this._displayables.length;t++){var e=this._displayables[t];e.parent=this,e.update(),e.parent=null}for(var t=0;t<this._temporaryDisplayables.length;t++){var e=this._temporaryDisplayables[t];e.parent=this,e.update(),e.parent=null}},Gr.prototype.brush=function(t){for(var e=this._cursor;e<this._displayables.length;e++){var n=this._temporaryDisplayables[e];n.beforeBrush&&n.beforeBrush(t),n.brush(t,e===this._cursor?null:this._displayables[e-1]),n.afterBrush&&n.afterBrush(t)}this._cursor=e;for(var e=0;e<this._temporaryDisplayables.length;e++){var n=this._temporaryDisplayables[e];n.beforeBrush&&n.beforeBrush(t),n.brush(t,0===e?null:this._temporaryDisplayables[e-1]),n.afterBrush&&n.afterBrush(t)}this._temporaryDisplayables=[],this.notClear=!0};var Pg=[];Gr.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new rn(1/0,1/0,-1/0,-1/0),e=0;e<this._displayables.length;e++){var n=this._displayables[e],i=n.getBoundingRect().clone();n.needLocalTransform()&&i.applyTransform(n.getLocalTransform(Pg)),t.union(i)}this._rect=t}return this._rect},Gr.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect();if(i.contain(n[0],n[1]))for(var r=0;r<this._displayables.length;r++){var a=this._displayables[r];if(a.contain(t,e))return!0}return!1},u(Gr,ri);var Lg=Math.round,Og=Math.max,Bg=Math.min,Eg={},zg=Rr,Rg=(Object.freeze||Object)({extendShape:Wr,extendPath:Vr,makePath:Xr,makeImage:jr,mergePath:zg,resizePath:Ur,subPixelOptimizeLine:qr,subPixelOptimizeRect:Zr,subPixelOptimize:$r,setHoverStyle:ha,setLabelStyle:ua,setTextStyle:ca,setText:da,getFont:xa,updateProps:wa,initProps:ba,getTransform:Sa,applyTransform:Ma,transformDirection:Ia,groupTransition:Ta,clipPointsByRect:Ca,clipRectByRect:Da,createIcon:ka,Group:Jd,Image:ai,Text:dg,Circle:fg,Sector:vg,Ring:mg,Polygon:_g,Polyline:wg,Rect:bg,Line:Sg,BezierCurve:Ig,Arc:Tg,IncrementalDisplayable:Gr,CompoundPath:Cg,LinearGradient:kg,RadialGradient:Ag,BoundingRect:rn}),Ng=["textStyle","color"],Fg={getTextColor:function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(Ng):null)},getFont:function(){return xa({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},getTextRect:function(t){return Sn(t,this.getFont(),this.getShallow("align"),this.getShallow("verticalAlign")||this.getShallow("baseline"),this.getShallow("padding"),this.getShallow("rich"),this.getShallow("truncateText"))}},Hg=op([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]),Gg={getItemStyle:function(t,e){var n=Hg(this,t,e),i=this.getBorderLineDash();return i&&(n.lineDash=i),n},getBorderLineDash:function(){var t=this.get("borderType");return"solid"===t||null==t?null:"dashed"===t?[5,5]:[1,1]}},Wg=c,Vg=Hi();Aa.prototype={constructor:Aa,init:null,mergeOption:function(t){r(this.option,t,!0)},get:function(t,e){return null==t?this.option:Pa(this.option,this.parsePath(t),!e&&La(this,t))},getShallow:function(t,e){var n=this.option,i=null==n?n:n[t],r=!e&&La(this,t);return null==i&&r&&(i=r.getShallow(t)),i},getModel:function(t,e){var n,i=null==t?this.option:Pa(this.option,t=this.parsePath(t));return e=e||(n=La(this,t))&&n.getModel(t),new Aa(i,e,this.ecModel)},isEmpty:function(){return null==this.option},restoreData:function(){},clone:function(){var t=this.constructor;return new t(i(this.option))},setReadOnly:function(){},parsePath:function(t){return"string"==typeof t&&(t=t.split(".")),t},customizeGetParent:function(t){Vg(this).getParent=t},isAnimationEnabled:function(){if(!$c.node){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}}},Ui(Aa),qi(Aa),Wg(Aa,lp),Wg(Aa,up),Wg(Aa,Fg),Wg(Aa,Gg);var Xg=0,jg=1e-4,Yg=9007199254740991,Ug=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/,qg=(Object.freeze||Object)({linearMap:Ra,parsePercent:Na,round:Fa,asc:Ha,getPrecision:Ga,getPrecisionSafe:Wa,getPixelPrecision:Va,getPercentWithPrecision:Xa,MAX_SAFE_INTEGER:Yg,remRadian:ja,isRadianAroundZero:Ya,parseDate:Ua,quantity:qa,nice:$a,reformIntervals:Ka,isNumeric:Qa}),Zg=L,$g=["a","b","c","d","e","f","g"],Kg=function(t,e){return"{"+t+(null==e?"":e)+"}"},Qg=kn,Jg=Sn,tv=(Object.freeze||Object)({addCommas:Ja,toCamelCase:to,normalizeCssArray:Zg,encodeHTML:eo,formatTpl:no,formatTplSimple:io,getTooltipMarker:ro,formatTime:oo,capitalFirst:so,truncateText:Qg,getTextRect:Jg}),ev=f,nv=["left","right","top","bottom","width","height"],iv=[["width","left","right"],["height","top","bottom"]],rv=lo,av=(x(lo,"vertical"),x(lo,"horizontal"),{getBoxLayoutParams:function(){return{left:this.get("left"),top:this.get("top"),right:this.get("right"),bottom:this.get("bottom"),width:this.get("width"),height:this.get("height")}}}),ov=Hi(),sv=Aa.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(t,e,n,i){Aa.call(this,t,e,n,i),this.uid=Oa("ec_cpt_model")},init:function(t,e,n){this.mergeDefaultAndTheme(t,n)},mergeDefaultAndTheme:function(t,e){var n=this.layoutMode,i=n?co(t):{},a=e.getTheme();r(t,a.get(this.mainType)),r(t,this.getDefaultOption()),n&&uo(t,i,n)},mergeOption:function(t){r(this.option,t,!0);var e=this.layoutMode;e&&uo(this.option,t,e)},optionUpdated:function(){},getDefaultOption:function(){var t=ov(this);if(!t.defaultOption){for(var e=[],n=this.constructor;n;){var i=n.prototype.defaultOption;i&&e.push(i),n=n.superClass}for(var a={},o=e.length-1;o>=0;o--)a=r(a,e[o],!0);t.defaultOption=a}return t.defaultOption},getReferringComponents:function(t){return this.ecModel.queryComponents({mainType:t,index:this.get(t+"Index",!0),id:this.get(t+"Id",!0)})}});Ki(sv,{registerWhenExtend:!0}),Ba(sv),Ea(sv,po),c(sv,av);var lv="";"undefined"!=typeof navigator&&(lv=navigator.platform||"");var hv={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:lv.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,animation:"auto",animationDuration:1e3,animationDurationUpdate:300,animationEasing:"exponentialOut",animationEasingUpdate:"cubicOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},uv=Hi(),cv={clearColorPalette:function(){uv(this).colorIdx=0,uv(this).colorNameMap={}},getColorFromPalette:function(t,e,n){e=e||this;var i=uv(e),r=i.colorIdx||0,a=i.colorNameMap=i.colorNameMap||{};if(a.hasOwnProperty(t))return a[t];var o=Pi(this.get("color",!0)),s=this.get("colorLayer",!0),l=null!=n&&s?go(s,n):o;if(l=l||o,l&&l.length){var h=l[r];return t&&(a[t]=h),i.colorIdx=(r+1)%l.length,h}}},dv={cartesian2d:function(t,e,n,i){var r=t.getReferringComponents("xAxis")[0],a=t.getReferringComponents("yAxis")[0];e.coordSysDims=["x","y"],n.set("x",r),n.set("y",a),mo(r)&&(i.set("x",r),e.firstCategoryDimIndex=0),mo(a)&&(i.set("y",a),e.firstCategoryDimIndex=1)},singleAxis:function(t,e,n,i){var r=t.getReferringComponents("singleAxis")[0];e.coordSysDims=["single"],n.set("single",r),mo(r)&&(i.set("single",r),e.firstCategoryDimIndex=0)},polar:function(t,e,n,i){var r=t.getReferringComponents("polar")[0],a=r.findAxisModel("radiusAxis"),o=r.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],n.set("radius",a),n.set("angle",o),mo(a)&&(i.set("radius",a),e.firstCategoryDimIndex=0),mo(o)&&(i.set("angle",o),e.firstCategoryDimIndex=1)},geo:function(t,e){e.coordSysDims=["lng","lat"]},parallel:function(t,e,n,i){var r=t.ecModel,a=r.getComponent("parallel",t.get("parallelIndex")),o=e.coordSysDims=a.dimensions.slice();f(a.parallelAxisIndex,function(t,a){var s=r.getComponent("parallelAxis",t),l=o[a];n.set(l,s),mo(s)&&null==e.firstCategoryDimIndex&&(i.set(l,s),e.firstCategoryDimIndex=a)})}},fv="original",pv="arrayRows",gv="objectRows",vv="keyedColumns",mv="unknown",yv="typedArray",xv="column",_v="row";yo.seriesDataToSource=function(t){return new yo({data:t,sourceFormat:I(t)?yv:fv,fromDataset:!1})},qi(yo);var wv=Hi(),bv="\x00_ec_inner",Sv=Aa.extend({constructor:Sv,init:function(t,e,n,i){n=n||{},this.option=null,this._theme=new Aa(n),this._optionManager=i},setOption:function(t,e){O(!(bv in t),"please use chart.getOption()"),this._optionManager.setOption(t,e),this.resetOption(null)},resetOption:function(t){var e=!1,n=this._optionManager;if(!t||"recreate"===t){var i=n.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this.mergeOption(i)):Lo.call(this,i),e=!0}if(("timeline"===t||"media"===t)&&this.restoreData(),!t||"recreate"===t||"timeline"===t){var r=n.getTimelineOption(this);r&&(this.mergeOption(r),e=!0)}if(!t||"recreate"===t||"media"===t){var a=n.getMediaOption(this,this._api);a.length&&f(a,function(t){this.mergeOption(t,e=!0)},this)}return e},mergeOption:function(t){function e(e,i){var r=Pi(t[e]),s=Ei(a.get(e),r);zi(s),f(s,function(t){var n=t.option;S(n)&&(t.keyInfo.mainType=e,t.keyInfo.subType=Bo(e,n,t.exist))});var l=Oo(a,i);n[e]=[],a.set(e,[]),f(s,function(t,i){var r=t.exist,s=t.option;if(O(S(s)||r,"Empty component definition"),s){var h=sv.getClass(e,t.keyInfo.subType,!0);if(r&&r instanceof h)r.name=t.keyInfo.name,r.mergeOption(s,this),r.optionUpdated(s,!1);else{var u=o({dependentModels:l,componentIndex:i},t.keyInfo);r=new h(s,this,this,u),o(r,u),r.init(s,this,this,u),r.optionUpdated(null,!0)}}else r.mergeOption({},this),r.optionUpdated({},!1);a.get(e)[i]=r,n[e][i]=r.option},this),"series"===e&&Eo(this,a.get("series"))}var n=this.option,a=this._componentsMap,s=[];_o(this),f(t,function(t,e){null!=t&&(sv.hasClass(e)?e&&s.push(e):n[e]=null==n[e]?i(t):r(n[e],t,!0))}),sv.topologicalTravel(s,sv.getAllClassMainTypes(),e,this),this._seriesIndicesMap=N(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var t=i(this.option);return f(t,function(e,n){if(sv.hasClass(n)){for(var e=Pi(e),i=e.length-1;i>=0;i--)Ni(e[i])&&e.splice(i,1);t[n]=e}}),delete t[bv],t},getTheme:function(){return this._theme},getComponent:function(t,e){var n=this._componentsMap.get(t);return n?n[e||0]:void 0},queryComponents:function(t){var e=t.mainType;if(!e)return[];var n=t.index,i=t.id,r=t.name,a=this._componentsMap.get(e);if(!a||!a.length)return[];var o;if(null!=n)_(n)||(n=[n]),o=v(p(n,function(t){return a[t]}),function(t){return!!t});else if(null!=i){var s=_(i);o=v(a,function(t){return s&&h(i,t.id)>=0||!s&&t.id===i})}else if(null!=r){var l=_(r);o=v(a,function(t){return l&&h(r,t.name)>=0||!l&&t.name===r})}else o=a.slice();return zo(o,t)},findComponents:function(t){function e(t){var e=r+"Index",n=r+"Id",i=r+"Name";return!t||null==t[e]&&null==t[n]&&null==t[i]?null:{mainType:r,index:t[e],id:t[n],name:t[i]}}function n(e){return t.filter?v(e,t.filter):e}var i=t.query,r=t.mainType,a=e(i),o=a?this.queryComponents(a):this._componentsMap.get(r);return n(zo(o,t))},eachComponent:function(t,e,n){var i=this._componentsMap;if("function"==typeof t)n=e,e=t,i.each(function(t,i){f(t,function(t,r){e.call(n,i,t,r)})});else if(b(t))f(i.get(t),e,n);else if(S(t)){var r=this.findComponents(t);f(r,e,n)}},getSeriesByName:function(t){var e=this._componentsMap.get("series");return v(e,function(e){return e.name===t})},getSeriesByIndex:function(t){return this._componentsMap.get("series")[t]},getSeriesByType:function(t){var e=this._componentsMap.get("series");return v(e,function(e){return e.subType===t})},getSeries:function(){return this._componentsMap.get("series").slice()},getSeriesCount:function(){return this._componentsMap.get("series").length},eachSeries:function(t,e){f(this._seriesIndices,function(n){var i=this._componentsMap.get("series")[n];t.call(e,i,n)},this)},eachRawSeries:function(t,e){f(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(t,e,n){f(this._seriesIndices,function(i){var r=this._componentsMap.get("series")[i];r.subType===t&&e.call(n,r,i)},this)},eachRawSeriesByType:function(t,e,n){return f(this.getSeriesByType(t),e,n)},isSeriesFiltered:function(t){return null==this._seriesIndicesMap.get(t.componentIndex)},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(t,e){var n=v(this._componentsMap.get("series"),t,e);Eo(this,n)},restoreData:function(t){var e=this._componentsMap;Eo(this,e.get("series"));var n=[];e.each(function(t,e){n.push(e)}),sv.topologicalTravel(n,sv.getAllClassMainTypes(),function(n){f(e.get(n),function(e){("series"!==n||!Ao(e,t))&&e.restoreData()})})}});c(Sv,cv);var Mv=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"],Iv={};No.prototype={constructor:No,create:function(t,e){var n=[];f(Iv,function(i){var r=i.create(t,e);n=n.concat(r||[])}),this._coordinateSystems=n},update:function(t,e){f(this._coordinateSystems,function(n){n.update&&n.update(t,e)})},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},No.register=function(t,e){Iv[t]=e},No.get=function(t){return Iv[t]};var Tv=f,Cv=i,Dv=p,kv=r,Av=/^(min|max)?(.+)$/;Fo.prototype={constructor:Fo,setOption:function(t,e){t&&f(Pi(t.series),function(t){t&&t.data&&I(t.data)&&E(t.data)}),t=Cv(t,!0);var n=this._optionBackup,i=Ho.call(this,t,e,!n);this._newBaseOption=i.baseOption,n?(Xo(n.baseOption,i.baseOption),i.timelineOptions.length&&(n.timelineOptions=i.timelineOptions),i.mediaList.length&&(n.mediaList=i.mediaList),i.mediaDefault&&(n.mediaDefault=i.mediaDefault)):this._optionBackup=i},mountOption:function(t){var e=this._optionBackup;return this._timelineOptions=Dv(e.timelineOptions,Cv),this._mediaList=Dv(e.mediaList,Cv),this._mediaDefault=Cv(e.mediaDefault),this._currentMediaIndices=[],Cv(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,n=this._timelineOptions;if(n.length){var i=t.getComponent("timeline");i&&(e=Cv(n[i.getCurrentIndex()],!0))}return e},getMediaOption:function(){var t=this._api.getWidth(),e=this._api.getHeight(),n=this._mediaList,i=this._mediaDefault,r=[],a=[];if(!n.length&&!i)return a;for(var o=0,s=n.length;s>o;o++)Go(n[o].query,t,e)&&r.push(o);return!r.length&&i&&(r=[-1]),r.length&&!Vo(r,this._currentMediaIndices)&&(a=Dv(r,function(t){return Cv(-1===t?i.option:n[t].option)})),this._currentMediaIndices=r,a}};var Pv=f,Lv=S,Ov=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"],Bv=function(t,e){Pv(Ko(t.series),function(t){Lv(t)&&$o(t)});var n=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&n.push("valueAxis","categoryAxis","logAxis","timeAxis"),Pv(n,function(e){Pv(Ko(t[e]),function(t){t&&(qo(t,"axisLabel"),qo(t.axisPointer,"label"))})}),Pv(Ko(t.parallel),function(t){var e=t&&t.parallelAxisDefault;qo(e,"axisLabel"),qo(e&&e.axisPointer,"label")}),Pv(Ko(t.calendar),function(t){Yo(t,"itemStyle"),qo(t,"dayLabel"),qo(t,"monthLabel"),qo(t,"yearLabel")}),Pv(Ko(t.radar),function(t){qo(t,"name")}),Pv(Ko(t.geo),function(t){Lv(t)&&(Zo(t),Pv(Ko(t.regions),function(t){Zo(t)}))}),Pv(Ko(t.timeline),function(t){Zo(t),Yo(t,"label"),Yo(t,"itemStyle"),Yo(t,"controlStyle",!0);var e=t.data;_(e)&&f(e,function(t){S(t)&&(Yo(t,"label"),Yo(t,"itemStyle"))})}),Pv(Ko(t.toolbox),function(t){Yo(t,"iconStyle"),Pv(t.feature,function(t){Yo(t,"iconStyle")})}),qo(Qo(t.axisPointer),"label"),qo(Qo(t.tooltip).axisPointer,"label")},Ev=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],zv=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],Rv=function(t,e){Bv(t,e),t.series=Pi(t.series),f(t.series,function(t){if(S(t)){var e=t.type;if(("pie"===e||"gauge"===e)&&null!=t.clockWise&&(t.clockwise=t.clockWise),"gauge"===e){var n=Jo(t,"pointer.color");null!=n&&ts(t,"itemStyle.normal.color",n)}es(t)}}),t.dataRange&&(t.visualMap=t.dataRange),f(zv,function(e){var n=t[e];n&&(_(n)||(n=[n]),f(n,function(t){es(t)}))})},Nv=function(t){var e=N();t.eachSeries(function(t){var n=t.get("stack");if(n){var i=e.get(n)||e.set(n,[]),r=t.getData(),a={stackResultDimension:r.getCalculationInfo("stackResultDimension"),stackedOverDimension:r.getCalculationInfo("stackedOverDimension"),stackedDimension:r.getCalculationInfo("stackedDimension"),stackedByDimension:r.getCalculationInfo("stackedByDimension"),isStackedByIndex:r.getCalculationInfo("isStackedByIndex"),data:r,seriesModel:t};if(!a.stackedDimension||!a.isStackedByIndex&&!a.stackedByDimension)return;i.length&&r.setCalculationInfo("stackedOnSeries",i[i.length-1].seriesModel),i.push(a)}}),e.each(ns)},Fv=is.prototype;Fv.pure=!1,Fv.persistent=!0,Fv.getSource=function(){return this._source};var Hv={arrayRows_column:{pure:!0,count:function(){return Math.max(0,this._data.length-this._source.startIndex)},getItem:function(t){return this._data[t+this._source.startIndex]},appendData:os},arrayRows_row:{pure:!0,count:function(){var t=this._data[0];return t?Math.max(0,t.length-this._source.startIndex):0},getItem:function(t){t+=this._source.startIndex;for(var e=[],n=this._data,i=0;i<n.length;i++){var r=n[i];e.push(r?r[t]:null)}return e},appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},objectRows:{pure:!0,count:rs,getItem:as,appendData:os},keyedColumns:{pure:!0,count:function(){var t=this._source.dimensionsDefine[0].name,e=this._data[t];return e?e.length:0},getItem:function(t){for(var e=[],n=this._source.dimensionsDefine,i=0;i<n.length;i++){var r=this._data[n[i].name];e.push(r?r[t]:null)}return e},appendData:function(t){var e=this._data;f(t,function(t,n){for(var i=e[n]||(e[n]=[]),r=0;r<(t||[]).length;r++)i.push(t[r])})}},original:{count:rs,getItem:as,appendData:os},typedArray:{persistent:!1,pure:!0,count:function(){return this._data?this._data.length/this._dimSize:0},getItem:function(t){t-=this._offset;for(var e=[],n=this._dimSize*t,i=0;i<this._dimSize;i++)e[i]=this._data[n+i];return e},appendData:function(t){this._data=t},clean:function(){this._offset+=this.count(),this._data=null}}},Gv={arrayRows:ss,objectRows:function(t,e,n,i){return null!=n?t[i]:t},keyedColumns:ss,original:function(t,e,n){var i=Oi(t);return null!=n&&i instanceof Array?i[n]:i},typedArray:ss},Wv={arrayRows:ls,objectRows:function(t,e){return hs(t[e],this._dimensionInfos[e])},keyedColumns:ls,original:function(t,e,n,i){var r=t&&(null==t.value?t:t.value);return!this._rawData.pure&&Bi(t)&&(this.hasItemOption=!0),hs(r instanceof Array?r[i]:r,this._dimensionInfos[e])},typedArray:function(t,e,n,i){return t[i]}},Vv=/\{@(.+?)\}/g,Xv={getDataParams:function(t,e){var n=this.getData(e),i=this.getRawValue(t,e),r=n.getRawIndex(t),a=n.getName(t,!0),o=n.getRawDataItem(t),s=n.getItemVisual(t,"color");return{componentType:this.mainType,componentSubType:this.subType,seriesType:"series"===this.mainType?this.subType:null,seriesIndex:this.seriesIndex,seriesId:this.id,seriesName:this.name,name:a,dataIndex:r,data:o,dataType:e,value:i,color:s,marker:ro(s),$vars:["seriesName","name","value"]}},getFormattedLabel:function(t,e,n,i,r){e=e||"normal";var a=this.getData(n),o=a.getItemModel(t),s=this.getDataParams(t,n);null!=i&&s.value instanceof Array&&(s.value=s.value[i]);var l=o.get("normal"===e?[r||"label","formatter"]:[e,r||"label","formatter"]);if("function"==typeof l)return s.status=e,l(s);if("string"==typeof l){var h=no(l,s);return h.replace(Vv,function(e,n){var i=n.length;return"["===n.charAt(0)&&"]"===n.charAt(i-1)&&(n=+n.slice(1,i-1)),us(a,t,n)})}},getRawValue:function(t,e){return us(this.getData(e),t)},formatTooltip:function(){}},jv=ds.prototype;jv.perform=function(t){var e=this._upstream,n=t&&t.skip;if(this._dirty&&e){var i=this.context;i.data=i.outputData=e.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var r;this._plan&&!n&&(r=this._plan(this.context));var a;(this._dirty||"reset"===r)&&(this._dirty=!1,a=fs(this,n));var o=t&&t.step;if(this._dueEnd=e?e._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var s=this._dueIndex,l=Math.min(null!=o?this._dueIndex+o:1/0,this._dueEnd);!n&&(a||l>s)&&this._progress({start:s,end:l},this.context),this._dueIndex=l;var h=null!=this._settedOutputEnd?this._settedOutputEnd:l;this._outputDueEnd=h}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()},jv.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},jv.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},jv.pipe=function(t){(this._downstream!==t||this._dirty)&&(this._downstream=t,t._upstream=this,t.dirty())},jv.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},jv.getUpstream=function(){return this._upstream},jv.getDownstream=function(){return this._downstream},jv.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t};var Yv=Hi(),Uv=sv.extend({type:"series.__base__",seriesIndex:0,coordinateSystem:null,defaultOption:null,legendDataProvider:null,visualColorAccessPath:"itemStyle.color",layoutMode:null,init:function(t,e,n){this.seriesIndex=this.componentIndex,this.dataTask=cs({count:vs,reset:ms}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n),wo(this);var i=this.getInitialData(t,n);xs(i,this),this.dataTask.context.data=i,Yv(this).dataBeforeProcessed=i,ps(this)},mergeDefaultAndTheme:function(t,e){var n=this.layoutMode,i=n?co(t):{},a=this.subType;sv.hasClass(a)&&(a+="Series"),r(t,e.getTheme().get(this.subType)),r(t,this.getDefaultOption()),Li(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&uo(t,i,n)},mergeOption:function(t,e){t=r(this.option,t,!0),this.fillDataTextStyle(t.data);var n=this.layoutMode;n&&uo(this.option,t,n),wo(this);var i=this.getInitialData(t,e);xs(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,Yv(this).dataBeforeProcessed=i,ps(this)},fillDataTextStyle:function(t){if(t)for(var e=["show"],n=0;n<t.length;n++)t[n]&&t[n].label&&Li(t[n],"label",e)},getInitialData:function(){},appendData:function(t){var e=this.getRawData();e.appendData(t.data)},getData:function(t){var e=ws(this);if(e){var n=e.context.data;return null==t?n:n.getLinkedData(t)}return Yv(this).data},setData:function(t){var e=ws(this);if(e){var n=e.context;n.data!==t&&e.isOverallFilter&&e.setOutputEnd(t.count()),n.outputData=t,e!==this.dataTask&&(n.data=t)}Yv(this).data=t},getSource:function(){return xo(this)},getRawData:function(){return Yv(this).dataBeforeProcessed},getBaseAxis:function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},formatTooltip:function(t,e){function n(n){function i(t,n){var i=r.getDimensionInfo(n);if(i&&i.otherDims.tooltip!==!1){var a=i.type,l=ro({color:h,type:"subItem"}),u=(o?l+eo(i.displayName||"-")+": ":"")+eo("ordinal"===a?t+"":"time"===a?e?"":oo("yyyy/MM/dd hh:mm:ss",t):Ja(t));u&&s.push(u)}}var o=g(n,function(t,e,n){var i=r.getDimensionInfo(n);return t|=i&&i.tooltip!==!1&&null!=i.displayName},0),s=[];return a.length?f(a,function(e){i(us(r,t,e),e)}):f(n,i),(o?"<br/>":"")+s.join(o?"<br/>":", ")}function i(t){return eo(Ja(t))}var r=this.getData(),a=r.mapDimension("defaultedTooltip",!0),o=a.length,s=this.getRawValue(t),l=_(s),h=r.getItemVisual(t,"color");S(h)&&h.colorStops&&(h=(h.colorStops[0]||{}).color),h=h||"transparent";var u=o>1||l&&!o?n(s):i(o?us(r,t,a[0]):l?s[0]:s),c=ro(h),d=r.getName(t),p=this.name;return Ri(this)||(p=""),p=p?eo(p)+(e?": ":"<br/>"):"",e?c+p+u:p+c+(d?eo(d)+": "+u:u)},isAnimationEnabled:function(){if($c.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(t,e,n){var i=this.ecModel,r=cv.getColorFromPalette.call(this,t,e,n);return r||(r=i.getColorFromPalette(t,e,n)),r},coordDimToDataDim:function(t){return this.getRawData().mapDimension(t,!0)},getProgressive:function(){return this.get("progressive")},getProgressiveThreshold:function(){return this.get("progressiveThreshold")},getAxisTooltipData:null,getTooltipPosition:null,pipeTask:null,preventIncremental:null,pipelineContext:null});c(Uv,Xv),c(Uv,cv);var qv=function(){this.group=new Jd,this.uid=Oa("viewComponent")};qv.prototype={constructor:qv,init:function(){},render:function(){},dispose:function(){}};var Zv=qv.prototype;Zv.updateView=Zv.updateLayout=Zv.updateVisual=function(){},Ui(qv),Ki(qv,{registerWhenExtend:!0});var $v=function(){var t=Hi();return function(e){var n=t(e),i=e.pipelineContext,r=n.large,a=n.canProgressiveRender,o=n.large=i.large,s=n.canProgressiveRender=i.canProgressiveRender;return!!(r^o||a^s)&&"reset"}},Kv=Hi(),Qv=$v();bs.prototype={type:"chart",init:function(){},render:function(){},highlight:function(t,e,n,i){Ms(t.getData(),i,"emphasis")},downplay:function(t,e,n,i){Ms(t.getData(),i,"normal")},remove:function(){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null};var Jv=bs.prototype;Jv.updateView=Jv.updateLayout=Jv.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},Ui(bs,["dispose"]),Ki(bs,{registerWhenExtend:!0}),bs.markUpdateMethod=function(t,e){Kv(t).updateMethod=e};var tm={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},em="\x00__throttleOriginMethod",nm="\x00__throttleRate",im="\x00__throttleType",rm={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData(),i=(t.visualColorAccessPath||"itemStyle.color").split("."),r=t.get(i)||t.getColorFromPalette(t.name,null,e.getSeriesCount());if(n.setVisual("color",r),!e.isSeriesFiltered(t)){"function"!=typeof r||r instanceof Dg||n.each(function(e){n.setItemVisual(e,"color",r(t.getDataParams(e)))});var a=function(t,e){var n=t.getItemModel(e),r=n.get(i,!0);null!=r&&t.setItemVisual(e,"color",r)};return{dataEach:n.hasItemOption?a:null}}}},am={toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}},om=function(t,e){function n(t,e){if("string"!=typeof t)return t;var n=t;return f(e,function(t,e){n=n.replace(new RegExp("\\{\\s*"+e+"\\s*\\}","g"),t)}),n}function i(t){var e=o.get(t);if(null==e){for(var n=t.split("."),i=am.aria,r=0;r<n.length;++r)i=i[n[r]];return i}return e}function r(){var t=e.getModel("title").option;return t&&t.length&&(t=t[0]),t&&t.text}function a(t){return am.series.typeNames[t]||"自定义图"}var o=e.getModel("aria");if(o.get("show")){if(o.get("description"))return void t.setAttribute("aria-label",o.get("description"));var s=0;e.eachSeries(function(){++s},this);var l,h=o.get("data.maxCount")||10,u=o.get("series.maxCount")||10,c=Math.min(s,u);if(!(1>s)){var d=r();l=d?n(i("general.withTitle"),{title:d}):i("general.withoutTitle");var p=[],g=s>1?"series.multiple.prefix":"series.single.prefix";l+=n(i(g),{seriesCount:s}),e.eachSeries(function(t,e){if(c>e){var r,o=t.get("name"),l="series."+(s>1?"multiple":"single")+".";r=i(o?l+"withName":l+"withoutName"),r=n(r,{seriesId:t.seriesIndex,seriesName:t.get("name"),seriesType:a(t.subType)});var u=t.getData();window.data=u,r+=u.count()>h?n(i("data.partialData"),{displayCnt:h}):i("data.allData");for(var d=[],f=0;f<u.count();f++)if(h>f){var g=u.getName(f),v=us(u,f);d.push(n(i(g?"data.withName":"data.withoutName"),{name:g,value:v}))}r+=d.join(i("data.separator.middle"))+i("data.separator.end"),p.push(r)}}),l+=p.join(i("series.multiple.separator.middle"))+i("series.multiple.separator.end"),t.setAttribute("aria-label",l)}}},sm=Math.PI,lm=function(t,e){e=e||{},s(e,{text:"loading",color:"#c23531",textColor:"#000",maskColor:"rgba(255, 255, 255, 0.8)",zlevel:0});var n=new bg({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4}),i=new Tg({shape:{startAngle:-sm/2,endAngle:-sm/2+.1,r:10},style:{stroke:e.color,lineCap:"round",lineWidth:5},zlevel:e.zlevel,z:10001}),r=new bg({style:{fill:"none",text:e.text,textPosition:"right",textDistance:10,textFill:e.textColor},zlevel:e.zlevel,z:10001});i.animateShape(!0).when(1e3,{endAngle:3*sm/2}).start("circularInOut"),i.animateShape(!0).when(1e3,{startAngle:3*sm/2}).delay(300).start("circularInOut");var a=new Jd;return a.add(i),a.add(r),a.add(n),a.resize=function(){var e=t.getWidth()/2,a=t.getHeight()/2;i.setShape({cx:e,cy:a});var o=i.shape.r;r.setShape({x:e-o,y:a-o,width:2*o,height:2*o}),n.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},a.resize(),a},hm=ks.prototype;hm.getPerformArgs=function(t,e){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),i=n.context,r=!e&&n.progressiveEnabled&&(!i||i.canProgressiveRender)&&t.__idxInPipeline>n.bockIndex;return{step:r?n.step:null}}},hm.getPipeline=function(t){return this._pipelineMap.get(t)},hm.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData(),r=i.count(),a=n.progressiveEnabled&&e.incrementalPrepareRender&&r>=n.threshold,o=t.get("large")&&r>=t.get("largeThreshold");t.pipelineContext=n.context={canProgressiveRender:a,large:o}},hm.restorePipelines=function(t){var e=this,n=e._pipelineMap=N();t.eachSeries(function(t){var i=t.getProgressive(),r=t.uid;n.set(r,{id:r,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),bockIndex:-1,step:i||700,count:0}),Gs(e,t,t.dataTask)})},hm.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.ecInstance.getModel(),n=this.api;f([this._dataProcessorHandlers,this._visualHandlers],function(i){f(i,function(i){var r=t.get(i.uid)||t.set(i.uid,[]);i.reset&&Ps(this,i,r,e,n),i.overallReset&&Ls(this,i,r,e,n)},this)},this)},hm.prepareView=function(t,e,n,i){var r=t.renderTask,a=r.context;a.model=e,a.ecModel=n,a.api=i,r.__block=!t.incrementalPrepareRender,Gs(this,e,r)},hm.performDataProcessorTasks=function(t,e){As(this,this._dataProcessorHandlers,t,e,{block:!0})},hm.performVisualTasks=function(t,e,n){As(this,this._visualHandlers,t,e,n)},hm.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e|=t.dataTask.perform()}),this.unfinished|=e},hm.plan=function(){this._pipelineMap.each(function(t){var e=t.tail; | |
| 8 | +do{if(e.__block){t.bockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})};var um=hm.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)};ks.wrapStageHandler=function(t,e){return w(t)&&(t={overallReset:t,seriesType:Ws(t)}),t.uid=Oa("stageHandler"),e&&(t.visualType=e),t};var cm,dm={},fm={};Vs(dm,Sv),Vs(fm,Ro),dm.eachSeriesByType=dm.eachRawSeriesByType=function(t){cm=t},dm.eachComponent=function(t){"series"===t.mainType&&t.subType&&(cm=t.subType)};var pm=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],gm={color:pm,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],pm]},vm="#eee",mm=function(){return{axisLine:{lineStyle:{color:vm}},axisTick:{lineStyle:{color:vm}},axisLabel:{textStyle:{color:vm}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:vm}}}},ym=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],xm={color:ym,backgroundColor:"#333",tooltip:{axisPointer:{lineStyle:{color:vm},crossStyle:{color:vm}}},legend:{textStyle:{color:vm}},textStyle:{color:vm},title:{textStyle:{color:vm}},toolbox:{iconStyle:{normal:{borderColor:vm}}},dataZoom:{textStyle:{color:vm}},visualMap:{textStyle:{color:vm}},timeline:{lineStyle:{color:vm},itemStyle:{normal:{color:ym[1]}},label:{normal:{textStyle:{color:vm}}},controlStyle:{normal:{color:vm,borderColor:vm}}},timeAxis:mm(),logAxis:mm(),valueAxis:mm(),categoryAxis:mm(),line:{symbol:"circle"},graph:{color:ym},gauge:{title:{textStyle:{color:vm}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}};xm.categoryAxis.splitLine.show=!1;var _m=O,wm=f,bm=w,Sm=S,Mm=sv.parseClassType,Im="4.0.4",Tm={zrender:"4.0.3"},Cm=1,Dm=1e3,km=5e3,Am=1e3,Pm=2e3,Lm=3e3,Om=4e3,Bm=5e3,Em={PROCESSOR:{FILTER:Dm,STATISTIC:km},VISUAL:{LAYOUT:Am,GLOBAL:Pm,CHART:Lm,COMPONENT:Om,BRUSH:Bm}},zm="__flagInMainProcess",Rm="__optionUpdated",Nm=/^[a-zA-Z0-9_]+$/;js.prototype.on=Xs("on"),js.prototype.off=Xs("off"),js.prototype.one=Xs("one"),c(js,yd);var Fm=Ys.prototype;Fm._onframe=function(){if(!this._disposed){var t=this._scheduler;if(this[Rm]){var e=this[Rm].silent;this[zm]=!0,qs(this),Hm.update.call(this),this[zm]=!1,this[Rm]=!1,Qs.call(this,e),Js.call(this,e)}else if(t.unfinished){var n=Cm,i=this._model,r=this._api;t.unfinished=!1;do{var a=+new Date;t.performSeriesTasks(i),t.performDataProcessorTasks(i),$s(this,i),t.performVisualTasks(i),al(this,this._model,r,"remain"),n-=+new Date-a}while(n>0&&t.unfinished);t.unfinished||this._zr.flush()}}},Fm.getDom=function(){return this._dom},Fm.getZr=function(){return this._zr},Fm.setOption=function(t,e,n){var i;if(Sm(e)&&(n=e.lazyUpdate,i=e.silent,e=e.notMerge),this[zm]=!0,!this._model||e){var r=new Fo(this._api),a=this._theme,o=this._model=new Sv(null,null,a,r);o.scheduler=this._scheduler,o.init(null,null,a,r)}this._model.setOption(t,jm),n?(this[Rm]={silent:i},this[zm]=!1):(qs(this),Hm.update.call(this),this._zr.flush(),this[Rm]=!1,this[zm]=!1,Qs.call(this,i),Js.call(this,i))},Fm.setTheme=function(){console.log("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},Fm.getModel=function(){return this._model},Fm.getOption=function(){return this._model&&this._model.getOption()},Fm.getWidth=function(){return this._zr.getWidth()},Fm.getHeight=function(){return this._zr.getHeight()},Fm.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},Fm.getRenderedCanvas=function(t){if($c.canvasSupported){t=t||{},t.pixelRatio=t.pixelRatio||1,t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor");var e=this._zr;return e.painter.getRenderedCanvas(t)}},Fm.getSvgDataUrl=function(){if($c.svgSupported){var t=this._zr,e=t.storage.getDisplayList();return f(e,function(t){t.stopAnimation(!0)}),t.painter.pathToDataUrl()}},Fm.getDataURL=function(t){t=t||{};var e=t.excludeComponents,n=this._model,i=[],r=this;wm(e,function(t){n.eachComponent({mainType:t},function(t){var e=r._componentsMap[t.__viewId];e.group.ignore||(i.push(e),e.group.ignore=!0)})});var a="svg"===this._zr.painter.getType()?this.getSvgDataUrl():this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return wm(i,function(t){t.group.ignore=!1}),a},Fm.getConnectedDataURL=function(t){if($c.canvasSupported){var e=this.group,n=Math.min,r=Math.max,a=1/0;if(Km[e]){var o=a,s=a,l=-a,h=-a,u=[],c=t&&t.pixelRatio||1;f($m,function(a){if(a.group===e){var c=a.getRenderedCanvas(i(t)),d=a.getDom().getBoundingClientRect();o=n(d.left,o),s=n(d.top,s),l=r(d.right,l),h=r(d.bottom,h),u.push({dom:c,left:d.left,top:d.top})}}),o*=c,s*=c,l*=c,h*=c;var d=l-o,p=h-s,g=sd();g.width=d,g.height=p;var v=Ti(g);return wm(u,function(t){var e=new ai({style:{x:t.left*c-o,y:t.top*c-s,image:t.dom}});v.add(e)}),v.refreshImmediately(),g.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}},Fm.convertToPixel=x(Us,"convertToPixel"),Fm.convertFromPixel=x(Us,"convertFromPixel"),Fm.containPixel=function(t,e){var n,i=this._model;return t=Gi(i,t),f(t,function(t,i){i.indexOf("Models")>=0&&f(t,function(t){var r=t.coordinateSystem;if(r&&r.containPoint)n|=!!r.containPoint(e);else if("seriesModels"===i){var a=this._chartsMap[t.__viewId];a&&a.containPoint&&(n|=a.containPoint(e,t))}},this)},this),!!n},Fm.getVisual=function(t,e){var n=this._model;t=Gi(n,t,{defaultMainType:"series"});var i=t.seriesModel,r=i.getData(),a=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?r.indexOfRawIndex(t.dataIndex):null;return null!=a?r.getItemVisual(a,e):r.getVisual(e)},Fm.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},Fm.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var Hm={prepareAndUpdate:function(t){qs(this),Hm.update.call(this,t)},update:function(t){var e=this._model,n=this._api,i=this._zr,r=this._coordSysMgr,a=this._scheduler;if(e){e.restoreData(t),a.performSeriesTasks(e),r.create(e,n),a.performDataProcessorTasks(e,t),$s(this,e),r.update(e,n),nl(e),a.performVisualTasks(e,t),il(this,e,n,t);var o=e.get("backgroundColor")||"transparent";if($c.canvasSupported)i.setBackgroundColor(o);else{var s=Be(o);o=Ve(s,"rgb"),0===s[3]&&(o="transparent")}ol(e,n)}},updateTransform:function(t){var e=this._model,n=this,i=this._api;if(e){var r=[];e.eachComponent(function(a,o){var s=n.getViewOfComponentModel(o);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(o,e,i,t);l&&l.update&&r.push(s)}else r.push(s)});var a=N();e.eachSeries(function(r){var o=n._chartsMap[r.__viewId];if(o.updateTransform){var s=o.updateTransform(r,e,i,t);s&&s.update&&a.set(r.uid,1)}else a.set(r.uid,1)}),nl(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0,dirtyMap:a}),al(n,e,i,t,a),ol(e,this._api)}},updateView:function(t){var e=this._model;e&&(bs.markUpdateMethod(t,"updateView"),nl(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),il(this,this._model,this._api,t),ol(e,this._api))},updateVisual:function(t){Hm.update.call(this,t)},updateLayout:function(t){Hm.update.call(this,t)}};Fm.resize=function(t){this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var n=e.resetOption("media"),i=t&&t.silent;this[zm]=!0,n&&qs(this),Hm.update.call(this),this[zm]=!1,Qs.call(this,i),Js.call(this,i)}},Fm.showLoading=function(t,e){if(Sm(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),Zm[t]){var n=Zm[t](this._api,e),i=this._zr;this._loadingFX=n,i.add(n)}},Fm.hideLoading=function(){this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},Fm.makeActionFromEvent=function(t){var e=o({},t);return e.type=Vm[t.type],e},Fm.dispatchAction=function(t,e){if(Sm(e)||(e={silent:!!e}),Wm[t.type]&&this._model){if(this[zm])return void this._pendingActions.push(t);Ks.call(this,t,e.silent),e.flush?this._zr.flush(!0):e.flush!==!1&&$c.browser.weChat&&this._throttledZrFlush(),Qs.call(this,e.silent),Js.call(this,e.silent)}},Fm.appendData=function(t){var e=t.seriesIndex,n=this.getModel(),i=n.getSeriesByIndex(e);i.appendData(t),this._scheduler.unfinished=!0},Fm.on=Xs("on"),Fm.off=Xs("off"),Fm.one=Xs("one");var Gm=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];Fm._initEvents=function(){wm(Gm,function(t){this._zr.on(t,function(e){var n,i=this.getModel(),r=e.target;if("globalout"===t)n={};else if(r&&null!=r.dataIndex){var a=r.dataModel||i.getSeriesByIndex(r.seriesIndex);n=a&&a.getDataParams(r.dataIndex,r.dataType)||{}}else r&&r.eventData&&(n=o({},r.eventData));n&&(n.event=e,n.type=t,this.trigger(t,n))},this)},this),wm(Vm,function(t,e){this._messageCenter.on(e,function(t){this.trigger(e,t)},this)},this)},Fm.isDisposed=function(){return this._disposed},Fm.clear=function(){this.setOption({series:[]},!0)},Fm.dispose=function(){if(!this._disposed){this._disposed=!0,Vi(this.getDom(),ty,"");var t=this._api,e=this._model;wm(this._componentsViews,function(n){n.dispose(e,t)}),wm(this._chartsViews,function(n){n.dispose(e,t)}),this._zr.dispose(),delete $m[this.id]}},c(Ys,yd);var Wm={},Vm={},Xm=[],jm=[],Ym=[],Um=[],qm={},Zm={},$m={},Km={},Qm=new Date-0,Jm=new Date-0,ty="_echarts_instance_",ey={},ny=pl;Tl(Pm,rm),xl(Rv),_l(km,Nv),Dl("default",lm),bl({type:"highlight",event:"highlight",update:"highlight"},H),bl({type:"downplay",event:"downplay",update:"downplay"},H),yl("light",gm),yl("dark",xm);var iy={};Rl.prototype={constructor:Rl,add:function(t){return this._add=t,this},update:function(t){return this._update=t,this},remove:function(t){return this._remove=t,this},execute:function(){var t,e=this._old,n=this._new,i={},r={},a=[],o=[];for(Nl(e,i,a,"_oldKeyGetter",this),Nl(n,r,o,"_newKeyGetter",this),t=0;t<e.length;t++){var s=a[t],l=r[s];if(null!=l){var h=l.length;h?(1===h&&(r[s]=null),l=l.unshift()):r[s]=null,this._update&&this._update(l,t)}else this._remove&&this._remove(t)}for(var t=0;t<o.length;t++){var s=o[t];if(r.hasOwnProperty(s)){var l=r[s];if(null==l)continue;if(l.length)for(var u=0,h=l.length;h>u;u++)this._add&&this._add(l[u]);else this._add&&this._add(l)}}}};var ry=N(["tooltip","label","itemName","itemId","seriesName"]),ay=S,oy="undefined",sy=typeof window===oy?global:window,ly="e\x00\x00",hy={"float":typeof sy.Float64Array===oy?Array:sy.Float64Array,"int":typeof sy.Int32Array===oy?Array:sy.Int32Array,ordinal:Array,number:Array,time:Array},uy=typeof sy.Uint32Array===oy?Array:sy.Uint32Array,cy=typeof sy.Uint16Array===oy?Array:sy.Uint16Array,dy=["hasItemOption","_nameList","_idList","_calculationInfo","_invertedIndicesMap","_rawData","_rawExtent","_chunkSize","_chunkCount","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx"],fy=function(t,e){t=t||["x","y"];for(var n={},i=[],r={},a=0;a<t.length;a++){var o=t[a];b(o)&&(o={name:o});var s=o.name;o.type=o.type||"float",o.coordDim||(o.coordDim=s,o.coordDimIndex=0),o.otherDims=o.otherDims||{},i.push(s),n[s]=o,o.index=a,o.createInvertedIndices&&(r[s]=[])}this.dimensions=i,this._dimensionInfos=n,this.hostModel=e,this.dataType,this._indices=null,this._count=0,this._rawCount=0,this._storage={},this._nameList=[],this._idList=[],this._optionModels=[],this._visual={},this._layout={},this._itemVisuals=[],this.hasItemVisual={},this._itemLayouts=[],this._graphicEls=[],this._chunkSize=1e5,this._chunkCount=0,this._rawData,this._rawExtent={},this._extent={},this._approximateExtent={},this._dimensionsSummary=Fl(this),this._invertedIndicesMap=r,this._calculationInfo={}},py=fy.prototype;py.type="list",py.hasItemOption=!0,py.getDimension=function(t){return isNaN(t)||(t=this.dimensions[t]||t),t},py.getDimensionInfo=function(t){return this._dimensionInfos[this.getDimension(t)]},py.getDimensionsOnCoord=function(){return this._dimensionsSummary.dataDimsOnCoord.slice()},py.mapDimension=function(t,e){var n=this._dimensionsSummary;if(null==e)return n.encodeFirstDimNotExtra[t];var i=n.encode[t];return e===!0?(i||[]).slice():i&&i[e]},py.initData=function(t,e,n){var i=yo.isInstance(t)||d(t);i&&(t=new is(t,this.dimensions.length)),this._rawData=t,this._storage={},this._indices=null,this._nameList=e||[],this._idList=[],this._nameRepeatCount={},n||(this.hasItemOption=!1),this.defaultDimValueGetter=Wv[this._rawData.getSource().sourceFormat],this._dimValueGetter=n=n||this.defaultDimValueGetter,this._rawExtent={},this._initDataFromProvider(0,t.count()),t.pure&&(this.hasItemOption=!1)},py.getProvider=function(){return this._rawData},py.appendData=function(t){var e=this._rawData,n=this.count();e.appendData(t);var i=e.count();e.persistent||(i+=n),this._initDataFromProvider(n,i)},py._initDataFromProvider=function(t,e){if(!(t>=e)){for(var n,i=this._chunkSize,r=this._rawData,a=this._storage,o=this.dimensions,s=this._dimensionInfos,l=this._nameList,h=this._idList,u=this._rawExtent,c=this._nameRepeatCount={},d=this._chunkCount,f=d-1,p=0;p<o.length;p++){var g=o[p];u[g]||(u[g]=Ql());var v=s[g];0===v.otherDims.itemName&&(n=this._nameDimIdx=p),0===v.otherDims.itemId&&(this._idDimIdx=p);var m=hy[v.type];a[g]||(a[g]=[]);var y=a[g][f];if(y&&y.length<i){for(var x=new m(Math.min(e-f*i,i)),_=0;_<y.length;_++)x[_]=y[_];a[g][f]=x}for(var w=d*i;e>w;w+=i)a[g].push(new m(Math.min(e-w,i)));this._chunkCount=a[g].length}for(var b=t;e>b;b++){for(var S=r.getItem(b),M=Math.floor(b/i),I=b%i,w=0;w<o.length;w++){var g=o[w],T=a[g][M],C=this._dimValueGetter(S,g,b,w);T[I]=C,C<u[g][0]&&(u[g][0]=C),C>u[g][1]&&(u[g][1]=C)}if(!r.pure){var D=l[b];S&&!D&&(null!=n?D=this._getNameFromStore(b):null!=S.name&&(l[b]=D=S.name));var k=null==S?null:S.id;null==k&&null!=D&&(c[D]=c[D]||0,k=D,c[D]>0&&(k+="__ec__"+c[D]),c[D]++),null!=k&&(h[b]=k)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=e,this._extent={},jl(this)}},py._getNameFromStore=function(t){var e=this._nameDimIdx;if(null!=e){var n=this._chunkSize,i=Math.floor(t/n),r=t%n,a=this.dimensions[e],o=this._dimensionInfos[a].ordinalMeta;if(o)return o.categories[t];var s=this._storage[a][i];return s&&s[r]}},py._getIdFromStore=function(t){var e=this._idDimIdx;if(null!=e){var n=this._chunkSize,i=Math.floor(t/n),r=t%n,a=this.dimensions[e],o=this._dimensionInfos[a].ordinalMeta;if(o)return o.categories[t];var s=this._storage[a][i];return s&&s[r]}},py.count=function(){return this._count},py.getIndices=function(){if(this._indices){var t=this._indices.constructor;return new t(this._indices.buffer,0,this._count)}for(var t=Wl(this),e=new t(this.count()),n=0;n<e.length;n++)e[n]=n;return e},py.get=function(t,e){if(!(e>=0&&e<this._count))return 0/0;var n=this._storage;if(!n[t])return 0/0;e=this.getRawIndex(e);var i=Math.floor(e/this._chunkSize),r=e%this._chunkSize,a=n[t][i],o=a[r];return o},py.getByRawIndex=function(t,e){if(!(e>=0&&e<this._rawCount))return 0/0;var n=this._storage[t];if(!n)return 0/0;var i=Math.floor(e/this._chunkSize),r=e%this._chunkSize,a=n[i];return a[r]},py._getFast=function(t,e){var n=Math.floor(e/this._chunkSize),i=e%this._chunkSize,r=this._storage[t][n];return r[i]},py.getValues=function(t,e){var n=[];_(t)||(e=t,t=this.dimensions);for(var i=0,r=t.length;r>i;i++)n.push(this.get(t[i],e));return n},py.hasValue=function(t){for(var e=this._dimensionsSummary.dataDimsOnCoord,n=this._dimensionInfos,i=0,r=e.length;r>i;i++)if("ordinal"!==n[e[i]].type&&isNaN(this.get(e[i],t)))return!1;return!0},py.getDataExtent=function(t){t=this.getDimension(t);var e=this._storage[t],n=Ql();if(!e)return n;var i,r=this.count(),a=!this._indices;if(a)return this._rawExtent[t].slice();if(i=this._extent[t])return i.slice();i=n;for(var o=i[0],s=i[1],l=0;r>l;l++){var h=this._getFast(t,this.getRawIndex(l));o>h&&(o=h),h>s&&(s=h)}return i=[o,s],this._extent[t]=i,i},py.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},py.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},py.getCalculationInfo=function(t){return this._calculationInfo[t]},py.setCalculationInfo=function(t,e){ay(t)?o(this._calculationInfo,t):this._calculationInfo[t]=e},py.getSum=function(t){var e=this._storage[t],n=0;if(e)for(var i=0,r=this.count();r>i;i++){var a=this.get(t,i);isNaN(a)||(n+=a)}return n},py.rawIndexOf=function(t,e){var n=t&&this._invertedIndicesMap[t],i=n[e];return null==i||isNaN(i)?-1:i},py.indexOfName=function(t){for(var e=0,n=this.count();n>e;e++)if(this.getName(e)===t)return e;return-1},py.indexOfRawIndex=function(t){if(!this._indices)return t;if(t>=this._rawCount||0>t)return-1;var e=this._indices,n=e[t];if(null!=n&&n<this._count&&n===t)return t;for(var i=0,r=this._count-1;r>=i;){var a=(i+r)/2|0;if(e[a]<t)i=a+1;else{if(!(e[a]>t))return a;r=a-1}}return-1},py.indicesOfNearest=function(t,e,n){var i=this._storage,r=i[t],a=[];if(!r)return a;null==n&&(n=1/0);for(var o=Number.MAX_VALUE,s=-1,l=0,h=this.count();h>l;l++){var u=e-this.get(t,l),c=Math.abs(u);n>=u&&o>=c&&((o>c||u>=0&&0>s)&&(o=c,s=u,a.length=0),a.push(l))}return a},py.getRawIndex=Yl,py.getRawDataItem=function(t){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(t));for(var e=[],n=0;n<this.dimensions.length;n++){var i=this.dimensions[n];e.push(this.get(i,t))}return e},py.getName=function(t){var e=this.getRawIndex(t);return this._nameList[e]||this._getNameFromStore(e)||""},py.getId=function(t){return ql(this,this.getRawIndex(t))},py.each=function(t,e,n,i){if(this._count){"function"==typeof t&&(i=n,n=e,e=t,t=[]),n=n||i||this,t=p(Zl(t),this.getDimension,this);for(var r=t.length,a=0;a<this.count();a++)switch(r){case 0:e.call(n,a);break;case 1:e.call(n,this.get(t[0],a),a);break;case 2:e.call(n,this.get(t[0],a),this.get(t[1],a),a);break;default:for(var o=0,s=[];r>o;o++)s[o]=this.get(t[o],a);s[o]=a,e.apply(n,s)}}},py.filterSelf=function(t,e,n,i){if(this._count){"function"==typeof t&&(i=n,n=e,e=t,t=[]),n=n||i||this,t=p(Zl(t),this.getDimension,this);for(var r=this.count(),a=Wl(this),o=new a(r),s=[],l=t.length,h=0,u=t[0],c=0;r>c;c++){var d,f=this.getRawIndex(c);if(0===l)d=e.call(n,c);else if(1===l){var g=this._getFast(u,f);d=e.call(n,g,c)}else{for(var v=0;l>v;v++)s[v]=this._getFast(u,f);s[v]=c,d=e.apply(n,s)}d&&(o[h++]=f)}return r>h&&(this._indices=o),this._count=h,this._extent={},this.getRawIndex=this._indices?Ul:Yl,this}},py.selectRange=function(t){if(this._count){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);var i=e.length;if(i){var r=this.count(),a=Wl(this),o=new a(r),s=0,l=e[0],h=t[l][0],u=t[l][1],c=!1;if(!this._indices){var d=0;if(1===i){for(var f=this._storage[e[0]],p=0;p<this._chunkCount;p++)for(var g=f[p],v=Math.min(this._count-p*this._chunkSize,this._chunkSize),m=0;v>m;m++){var y=g[m];y>=h&&u>=y&&(o[s++]=d),d++}c=!0}else if(2===i){for(var f=this._storage[l],x=this._storage[e[1]],_=t[e[1]][0],w=t[e[1]][1],p=0;p<this._chunkCount;p++)for(var g=f[p],b=x[p],v=Math.min(this._count-p*this._chunkSize,this._chunkSize),m=0;v>m;m++){var y=g[m],S=b[m];y>=h&&u>=y&&S>=_&&w>=S&&(o[s++]=d),d++}c=!0}}if(!c)if(1===i)for(var m=0;r>m;m++){var M=this.getRawIndex(m),y=this._getFast(l,M);y>=h&&u>=y&&(o[s++]=M)}else for(var m=0;r>m;m++){for(var I=!0,M=this.getRawIndex(m),p=0;i>p;p++){var T=e[p],y=this._getFast(n,M);(y<t[T][0]||y>t[T][1])&&(I=!1)}I&&(o[s++]=this.getRawIndex(m))}return r>s&&(this._indices=o),this._count=s,this._extent={},this.getRawIndex=this._indices?Ul:Yl,this}}},py.mapArray=function(t,e,n,i){"function"==typeof t&&(i=n,n=e,e=t,t=[]),n=n||i||this;var r=[];return this.each(t,function(){r.push(e&&e.apply(this,arguments))},n),r},py.map=function(t,e,n,i){n=n||i||this,t=p(Zl(t),this.getDimension,this);var r=$l(this,t);r._indices=this._indices,r.getRawIndex=r._indices?Ul:Yl;for(var a=r._storage,o=[],s=this._chunkSize,l=t.length,h=this.count(),u=[],c=r._rawExtent,d=0;h>d;d++){for(var f=0;l>f;f++)u[f]=this.get(t[f],d);u[l]=d;var g=e&&e.apply(n,u);if(null!=g){"object"!=typeof g&&(o[0]=g,g=o);for(var v=this.getRawIndex(d),m=Math.floor(v/s),y=v%s,x=0;x<g.length;x++){var _=t[x],w=g[x],b=c[_],S=a[_];S&&(S[m][y]=w),w<b[0]&&(b[0]=w),w>b[1]&&(b[1]=w)}}}return r},py.downSample=function(t,e,n,i){for(var r=$l(this,[t]),a=r._storage,o=[],s=Math.floor(1/e),l=a[t],h=this.count(),u=this._chunkSize,c=r._rawExtent[t],d=new(Wl(this))(h),f=0,p=0;h>p;p+=s){s>h-p&&(s=h-p,o.length=s);for(var g=0;s>g;g++){var v=this.getRawIndex(p+g),m=Math.floor(v/u),y=v%u;o[g]=l[m][y]}var x=n(o),_=this.getRawIndex(Math.min(p+i(o,x)||0,h-1)),w=Math.floor(_/u),b=_%u;l[w][b]=x,x<c[0]&&(c[0]=x),x>c[1]&&(c[1]=x),d[f++]=_}return r._count=f,r._indices=d,r.getRawIndex=Ul,r},py.getItemModel=function(t){var e=this.hostModel;return new Aa(this.getRawDataItem(t),e,e&&e.ecModel)},py.diff=function(t){var e=this;return new Rl(t?t.getIndices():[],this.getIndices(),function(e){return ql(t,e)},function(t){return ql(e,t)})},py.getVisual=function(t){var e=this._visual;return e&&e[t]},py.setVisual=function(t,e){if(ay(t))for(var n in t)t.hasOwnProperty(n)&&this.setVisual(n,t[n]);else this._visual=this._visual||{},this._visual[t]=e},py.setLayout=function(t,e){if(ay(t))for(var n in t)t.hasOwnProperty(n)&&this.setLayout(n,t[n]);else this._layout[t]=e},py.getLayout=function(t){return this._layout[t]},py.getItemLayout=function(t){return this._itemLayouts[t]},py.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?o(this._itemLayouts[t]||{},e):e},py.clearItemLayouts=function(){this._itemLayouts.length=0},py.getItemVisual=function(t,e,n){var i=this._itemVisuals[t],r=i&&i[e];return null!=r||n?r:this.getVisual(e)},py.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{},r=this.hasItemVisual;if(this._itemVisuals[t]=i,ay(e))for(var a in e)e.hasOwnProperty(a)&&(i[a]=e[a],r[a]=!0);else i[e]=n,r[e]=!0},py.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};var gy=function(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType};py.setItemGraphicEl=function(t,e){var n=this.hostModel;e&&(e.dataIndex=t,e.dataType=this.dataType,e.seriesIndex=n&&n.seriesIndex,"group"===e.type&&e.traverse(gy,e)),this._graphicEls[t]=e},py.getItemGraphicEl=function(t){return this._graphicEls[t]},py.eachItemGraphicEl=function(t,e){f(this._graphicEls,function(n,i){n&&t&&t.call(e,n,i)})},py.cloneShallow=function(t){if(!t){var e=p(this.dimensions,this.getDimensionInfo,this);t=new fy(e,this.hostModel)}if(t._storage=this._storage,Xl(t,this),this._indices){var n=this._indices.constructor;t._indices=new n(this._indices)}else t._indices=null;return t.getRawIndex=t._indices?Ul:Yl,t._extent=i(this._extent),t._approximateExtent=i(this._approximateExtent),t},py.wrapMethod=function(t,e){var n=this[t];"function"==typeof n&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=n.apply(this,arguments);return e.apply(this,[t].concat(P(arguments)))})},py.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],py.CHANGABLE_METHODS=["filterSelf","selectRange"];var vy=function(t,e){return e=e||{},Jl(e.coordDimensions||[],t,{dimsDef:e.dimensionsDefine||t.dimensionsDefine,encodeDef:e.encodeDefine||t.encodeDefine,dimCount:e.dimensionsCount,generateCoord:e.generateCoord,generateCoordCount:e.generateCoordCount})};sh.prototype.parse=function(t){return t},sh.prototype.getSetting=function(t){return this._setting[t]},sh.prototype.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},sh.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},sh.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},sh.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])},sh.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},sh.prototype.getExtent=function(){return this._extent.slice()},sh.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},sh.prototype.getTicksLabels=function(){for(var t=[],e=this.getTicks(),n=0;n<e.length;n++)t.push(this.getLabel(e[n]));return t},sh.prototype.isBlank=function(){return this._isBlank},sh.prototype.setBlank=function(t){this._isBlank=t},Ui(sh),Ki(sh,{registerWhenExtend:!0}),lh.createByAxisModel=function(t){var e=t.option,n=e.data,i=n&&p(n,uh);return new lh({categories:i,needCollect:!i,deduplication:e.dedplication!==!1})};var my=lh.prototype;my.getOrdinal=function(t){return hh(this).get(t)},my.parseAndCollect=function(t){var e,n=this._needCollect;if("string"!=typeof t&&!n)return t;if(n&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var i=hh(this);return e=i.get(t),null==e&&(n?(e=this.categories.length,this.categories[e]=t,i.set(t,e)):e=0/0),e};var yy=sh.prototype,xy=sh.extend({type:"ordinal",init:function(t,e){(!t||_(t))&&(t=new lh({categories:t})),this._ordinalMeta=t,this._extent=e||[0,t.categories.length-1]},parse:function(t){return"string"==typeof t?this._ordinalMeta.getOrdinal(t):Math.round(t)},contain:function(t){return t=this.parse(t),yy.contain.call(this,t)&&null!=this._ordinalMeta.categories[t]},normalize:function(t){return yy.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(yy.scale.call(this,t))},getTicks:function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push(n),n++;return t},getLabel:function(t){return this._ordinalMeta.categories[t]},count:function(){return this._extent[1]-this._extent[0]+1},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},niceTicks:H,niceExtent:H});xy.create=function(){return new xy};var _y=Fa,wy=Fa,by=sh.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},unionExtent:function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1]),by.prototype.setExtent.call(this,e[0],e[1])},getInterval:function(){return this._interval},setInterval:function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=dh(t)},getTicks:function(){return gh(this._interval,this._extent,this._niceExtent,this._intervalPrecision)},getTicksLabels:function(){for(var t=[],e=this.getTicks(),n=0;n<e.length;n++)t.push(this.getLabel(e[n]));return t},getLabel:function(t,e){if(null==t)return"";var n=e&&e.precision;return null==n?n=Wa(t)||0:"auto"===n&&(n=this._intervalPrecision),t=wy(t,n,!0),Ja(t)},niceTicks:function(t,e,n){t=t||5;var i=this._extent,r=i[1]-i[0];if(isFinite(r)){0>r&&(r=-r,i.reverse());var a=ch(i,t,e,n);this._intervalPrecision=a.intervalPrecision,this._interval=a.interval,this._niceExtent=a.niceTickExtent}},niceExtent:function(t){var e=this._extent;if(e[0]===e[1])if(0!==e[0]){var n=e[0];t.fixMax?e[0]-=n/2:(e[1]+=n/2,e[0]-=n/2)}else e[1]=1;var i=e[1]-e[0];isFinite(i)||(e[0]=0,e[1]=1),this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var r=this._interval;t.fixMin||(e[0]=wy(Math.floor(e[0]/r)*r)),t.fixMax||(e[1]=wy(Math.ceil(e[1]/r)*r))}});by.create=function(){return new by};var Sy="__ec_stack_",My=by.prototype,Iy=Math.ceil,Ty=Math.floor,Cy=1e3,Dy=60*Cy,ky=60*Dy,Ay=24*ky,Py=function(t,e,n,i){for(;i>n;){var r=n+i>>>1;t[r][1]<e?n=r+1:i=r}return n},Ly=by.extend({type:"time",getLabel:function(t){var e=this._stepLvl,n=new Date(t);return oo(e[0],n,this.getSetting("useUTC"))},niceExtent:function(t){var e=this._extent;if(e[0]===e[1]&&(e[0]-=Ay,e[1]+=Ay),e[1]===-1/0&&1/0===e[0]){var n=new Date;e[1]=+new Date(n.getFullYear(),n.getMonth(),n.getDate()),e[0]=e[1]-Ay}this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var i=this._interval;t.fixMin||(e[0]=Fa(Ty(e[0]/i)*i)),t.fixMax||(e[1]=Fa(Iy(e[1]/i)*i))},niceTicks:function(t,e,n){t=t||10;var i=this._extent,r=i[1]-i[0],a=r/t;null!=e&&e>a&&(a=e),null!=n&&a>n&&(a=n);var o=Oy.length,s=Py(Oy,a,0,o),l=Oy[Math.min(s,o-1)],h=l[1];if("year"===l[0]){var u=r/h,c=$a(u/t,!0);h*=c}var d=this.getSetting("useUTC")?0:60*new Date(+i[0]||+i[1]).getTimezoneOffset()*1e3,f=[Math.round(Iy((i[0]-d)/h)*h+d),Math.round(Ty((i[1]-d)/h)*h+d)];ph(f,i),this._stepLvl=l,this._interval=h,this._niceExtent=f},parse:function(t){return+Ua(t)}});f(["contain","normalize"],function(t){Ly.prototype[t]=function(e){return My[t].call(this,this.parse(e))}});var Oy=[["hh:mm:ss",Cy],["hh:mm:ss",5*Cy],["hh:mm:ss",10*Cy],["hh:mm:ss",15*Cy],["hh:mm:ss",30*Cy],["hh:mm\nMM-dd",Dy],["hh:mm\nMM-dd",5*Dy],["hh:mm\nMM-dd",10*Dy],["hh:mm\nMM-dd",15*Dy],["hh:mm\nMM-dd",30*Dy],["hh:mm\nMM-dd",ky],["hh:mm\nMM-dd",2*ky],["hh:mm\nMM-dd",6*ky],["hh:mm\nMM-dd",12*ky],["MM-dd\nyyyy",Ay],["MM-dd\nyyyy",2*Ay],["MM-dd\nyyyy",3*Ay],["MM-dd\nyyyy",4*Ay],["MM-dd\nyyyy",5*Ay],["MM-dd\nyyyy",6*Ay],["week",7*Ay],["MM-dd\nyyyy",10*Ay],["week",14*Ay],["week",21*Ay],["month",31*Ay],["week",42*Ay],["month",62*Ay],["week",42*Ay],["quarter",380*Ay/4],["month",31*Ay*4],["month",31*Ay*5],["half-year",380*Ay/2],["month",31*Ay*8],["month",31*Ay*10],["year",380*Ay]];Ly.create=function(t){return new Ly({useUTC:t.ecModel.get("useUTC")})};var By=sh.prototype,Ey=by.prototype,zy=Wa,Ry=Fa,Ny=Math.floor,Fy=Math.ceil,Hy=Math.pow,Gy=Math.log,Wy=sh.extend({type:"log",base:10,$constructor:function(){sh.apply(this,arguments),this._originalScale=new by},getTicks:function(){var t=this._originalScale,e=this._extent,n=t.getExtent();return p(Ey.getTicks.call(this),function(i){var r=Fa(Hy(this.base,i));return r=i===e[0]&&t.__fixMin?_h(r,n[0]):r,r=i===e[1]&&t.__fixMax?_h(r,n[1]):r},this)},getLabel:Ey.getLabel,scale:function(t){return t=By.scale.call(this,t),Hy(this.base,t)},setExtent:function(t,e){var n=this.base;t=Gy(t)/Gy(n),e=Gy(e)/Gy(n),Ey.setExtent.call(this,t,e)},getExtent:function(){var t=this.base,e=By.getExtent.call(this);e[0]=Hy(t,e[0]),e[1]=Hy(t,e[1]);var n=this._originalScale,i=n.getExtent();return n.__fixMin&&(e[0]=_h(e[0],i[0])),n.__fixMax&&(e[1]=_h(e[1],i[1])),e},unionExtent:function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=Gy(t[0])/Gy(e),t[1]=Gy(t[1])/Gy(e),By.unionExtent.call(this,t)},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},niceTicks:function(t){t=t||10;var e=this._extent,n=e[1]-e[0];if(!(1/0===n||0>=n)){var i=qa(n),r=t/n*i;for(.5>=r&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var a=[Fa(Fy(e[0]/i)*i),Fa(Ny(e[1]/i)*i)];this._interval=i,this._niceExtent=a}},niceExtent:function(t){Ey.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});f(["contain","normalize"],function(t){Wy.prototype[t]=function(e){return e=Gy(e)/Gy(this.base),By[t].call(this,e)}}),Wy.create=function(){return new Wy};var Vy={getFormattedLabels:function(){return Ch(this.axis,this.get("axisLabel.formatter"))},getMin:function(t){var e=this.option,n=t||null==e.rangeStart?e.min:e.rangeStart;return this.axis&&null!=n&&"dataMin"!==n&&"function"!=typeof n&&!C(n)&&(n=this.axis.scale.parse(n)),n},getMax:function(t){var e=this.option,n=t||null==e.rangeEnd?e.max:e.rangeEnd;return this.axis&&null!=n&&"dataMax"!==n&&"function"!=typeof n&&!C(n)&&(n=this.axis.scale.parse(n)),n},getNeedCrossZero:function(){var t=this.option;return null!=t.rangeStart||null!=t.rangeEnd?!1:!t.scale},getCoordSysModel:H,setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},Xy=Wr({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var n=e.cx,i=e.cy,r=e.width/2,a=e.height/2;t.moveTo(n,i-a),t.lineTo(n+r,i+a),t.lineTo(n-r,i+a),t.closePath()}}),jy=Wr({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var n=e.cx,i=e.cy,r=e.width/2,a=e.height/2;t.moveTo(n,i-a),t.lineTo(n+r,i),t.lineTo(n,i+a),t.lineTo(n-r,i),t.closePath()}}),Yy=Wr({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.x,i=e.y,r=e.width/5*3,a=Math.max(r,e.height),o=r/2,s=o*o/(a-o),l=i-a+o+s,h=Math.asin(s/o),u=Math.cos(h)*o,c=Math.sin(h),d=Math.cos(h),f=.6*o,p=.7*o;t.moveTo(n-u,l+s),t.arc(n,l,o,Math.PI-h,2*Math.PI+h),t.bezierCurveTo(n+u-c*f,l+s+d*f,n,i-p,n,i),t.bezierCurveTo(n,i-p,n-u+c*f,l+s+d*f,n-u,l+s),t.closePath() | |
| 9 | +}}),Uy=Wr({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.height,i=e.width,r=e.x,a=e.y,o=i/3*2;t.moveTo(r,a),t.lineTo(r+o,a+n),t.lineTo(r,a+n/4*3),t.lineTo(r-o,a+n),t.lineTo(r,a),t.closePath()}}),qy={line:Sg,rect:bg,roundRect:bg,square:bg,circle:fg,diamond:jy,pin:Yy,arrow:Uy,triangle:Xy},Zy={line:function(t,e,n,i,r){r.x1=t,r.y1=e+i/2,r.x2=t+n,r.y2=e+i/2},rect:function(t,e,n,i,r){r.x=t,r.y=e,r.width=n,r.height=i},roundRect:function(t,e,n,i,r){r.x=t,r.y=e,r.width=n,r.height=i,r.r=Math.min(n,i)/4},square:function(t,e,n,i,r){var a=Math.min(n,i);r.x=t,r.y=e,r.width=a,r.height=a},circle:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.r=Math.min(n,i)/2},diamond:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.width=n,r.height=i},pin:function(t,e,n,i,r){r.x=t+n/2,r.y=e+i/2,r.width=n,r.height=i},arrow:function(t,e,n,i,r){r.x=t+n/2,r.y=e+i/2,r.width=n,r.height=i},triangle:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.width=n,r.height=i}},$y={};f(qy,function(t,e){$y[e]=new t});var Ky=Wr({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},beforeBrush:function(){var t=this.style,e=this.shape;"pin"===e.symbolType&&"inside"===t.textPosition&&(t.textPosition=["50%","40%"],t.textAlign="center",t.textVerticalAlign="middle")},buildPath:function(t,e,n){var i=e.symbolType,r=$y[i];"none"!==e.symbolType&&(r||(i="rect",r=$y[i]),Zy[i](e.x,e.y,e.width,e.height,r.shape),r.buildPath(t,r.shape,n))}}),Qy={isDimensionStacked:ih,enableDataStack:nh},Jy=(Object.freeze||Object)({createList:Ph,getLayoutRect:ho,dataStack:Qy,createScale:Lh,mixinAxisModelCommonMethods:Oh,completeDimensions:Jl,createDimensions:vy,createSymbol:Ah}),tx=1e-8;zh.prototype={constructor:zh,properties:null,getBoundingRect:function(){var t=this._rect;if(t)return t;for(var e=Number.MAX_VALUE,n=[e,e],i=[-e,-e],r=[],a=[],o=this.geometries,s=0;s<o.length;s++)if("polygon"===o[s].type){var l=o[s].exterior;dr(l,r,a),oe(n,n,r),se(i,i,a)}return 0===s&&(n[0]=n[1]=i[0]=i[1]=0),this._rect=new rn(n[0],n[1],i[0]-n[0],i[1]-n[1])},contain:function(t){var e=this.getBoundingRect(),n=this.geometries;if(!e.contain(t[0],t[1]))return!1;t:for(var i=0,r=n.length;r>i;i++)if("polygon"===n[i].type){var a=n[i].exterior,o=n[i].interiors;if(Eh(a,t[0],t[1])){for(var s=0;s<(o?o.length:0);s++)if(Eh(o[s]))continue t;return!0}}return!1},transformTo:function(t,e,n,i){var r=this.getBoundingRect(),a=r.width/r.height;n?i||(i=n/a):n=a*i;for(var o=new rn(t,e,n,i),s=r.calculateTransform(o),l=this.geometries,h=0;h<l.length;h++)if("polygon"===l[h].type){for(var u=l[h].exterior,c=l[h].interiors,d=0;d<u.length;d++)ae(u[d],u[d],s);for(var f=0;f<(c?c.length:0);f++)for(var d=0;d<c[f].length;d++)ae(c[f][d],c[f][d],s)}r=this._rect,r.copy(o),this.center=[r.x+r.width/2,r.y+r.height/2]}};var ex=function(t){return Rh(t),p(v(t.features,function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0}),function(t){var e=t.properties,n=t.geometry,i=n.coordinates,r=[];"Polygon"===n.type&&r.push({type:"polygon",exterior:i[0],interiors:i.slice(1)}),"MultiPolygon"===n.type&&f(i,function(t){t[0]&&r.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})});var a=new zh(e.name,r,e.cp);return a.properties=e,a})},nx=Ra,ix=[0,1],rx=function(t,e,n){this.dim=t,this.scale=e,this._extent=n||[0,0],this.inverse=!1,this.onBand=!1,this._labelInterval};rx.prototype={constructor:rx,contain:function(t){var e=this._extent,n=Math.min(e[0],e[1]),i=Math.max(e[0],e[1]);return t>=n&&i>=t},containData:function(t){return this.contain(this.dataToCoord(t))},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(t){return Va(t||this.scale.getExtent(),this._extent)},setExtent:function(t,e){var n=this._extent;n[0]=t,n[1]=e},dataToCoord:function(t,e){var n=this._extent,i=this.scale;return t=i.normalize(t),this.onBand&&"ordinal"===i.type&&(n=n.slice(),Fh(n,i.count())),nx(t,ix,n,e)},coordToData:function(t,e){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&(n=n.slice(),Fh(n,i.count()));var r=nx(t,n,ix,e);return this.scale.scale(r)},pointToData:function(){},getTicksCoords:function(t){if(this.onBand&&!t){for(var e=this.getBands(),n=[],i=0;i<e.length;i++)n.push(e[i][0]);return e[i-1]&&n.push(e[i-1][1]),n}return p(this.scale.getTicks(),this.dataToCoord,this)},getLabelsCoords:function(){return p(this.scale.getTicks(),this.dataToCoord,this)},getBands:function(){for(var t=this.getExtent(),e=[],n=this.scale.count(),i=t[0],r=t[1],a=r-i,o=0;n>o;o++)e.push([a*o/n+i,a*(o+1)/n+i]);return e},getBandWidth:function(){var t=this._extent,e=this.scale.getExtent(),n=e[1]-e[0]+(this.onBand?1:0);0===n&&(n=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/n},isHorizontal:null,getRotate:null,getLabelInterval:function(){var t=this._labelInterval;if(!t){var e=this.model,n=e.getModel("axisLabel");t=n.get("interval"),"category"!==this.type||null!=t&&"auto"!==t||(t=Th(p(this.scale.getTicks(),this.dataToCoord,this),e.getFormattedLabels(),n.getFont(),this.getRotate?this.getRotate():this.isHorizontal&&!this.isHorizontal()?90:0,n.get("rotate"))),this._labelInterval=t}return t}};var ax=ex,ox={};f(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],function(t){ox[t]=ud[t]}),Uv.extend({type:"series.line",dependencies:["grid","polar"],getInitialData:function(){return rh(this.getSource(),this)},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,clipOverflow:!0,label:{position:"top"},lineStyle:{width:2,type:"solid"},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:!1,connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0}});var sx=Vh.prototype;sx._createSymbol=function(t,e,n,i){this.removeAll();var r=e.getItemVisual(n,"color"),a=Ah(t,-1,-1,2,2,r);a.attr({z2:100,culling:!0,scale:Wh(i)}),a.drift=Xh,this._symbolType=t,this.add(a)},sx.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(t)},sx.getSymbolPath=function(){return this.childAt(0)},sx.getScale=function(){return this.childAt(0).scale},sx.highlight=function(){this.childAt(0).trigger("emphasis")},sx.downplay=function(){this.childAt(0).trigger("normal")},sx.setZ=function(t,e){var n=this.childAt(0);n.zlevel=t,n.z=e},sx.setDraggable=function(t){var e=this.childAt(0);e.draggable=t,e.cursor=t?"move":"pointer"},sx.updateData=function(t,e,n){this.silent=!1;var i=t.getItemVisual(e,"symbol")||"circle",r=t.hostModel,a=Gh(t,e),o=i!==this._symbolType;if(o)this._createSymbol(i,t,e,a);else{var s=this.childAt(0);s.silent=!1,wa(s,{scale:Wh(a)},r,e)}if(this._updateCommon(t,e,a,n),o){var s=this.childAt(0),l=n&&n.fadeIn,h={scale:s.scale.slice()};l&&(h.style={opacity:s.style.opacity}),s.scale=[0,0],l&&(s.style.opacity=0),ba(s,h,r,e)}this._seriesModel=r};var lx=["itemStyle"],hx=["emphasis","itemStyle"],ux=["label"],cx=["emphasis","label"];sx._updateCommon=function(t,e,n,i){function r(e){return _?t.getName(e):Hh(t,e)}var a=this.childAt(0),s=t.hostModel,l=t.getItemVisual(e,"color");"image"!==a.type&&a.useStyle({strokeNoScale:!0});var h=i&&i.itemStyle,u=i&&i.hoverItemStyle,c=i&&i.symbolRotate,d=i&&i.symbolOffset,f=i&&i.labelModel,p=i&&i.hoverLabelModel,g=i&&i.hoverAnimation,v=i&&i.cursorStyle;if(!i||t.hasItemOption){var m=i&&i.itemModel?i.itemModel:t.getItemModel(e);h=m.getModel(lx).getItemStyle(["color"]),u=m.getModel(hx).getItemStyle(),c=m.getShallow("symbolRotate"),d=m.getShallow("symbolOffset"),f=m.getModel(ux),p=m.getModel(cx),g=m.getShallow("hoverAnimation"),v=m.getShallow("cursor")}else u=o({},u);var y=a.style;a.attr("rotation",(c||0)*Math.PI/180||0),d&&a.attr("position",[Na(d[0],n[0]),Na(d[1],n[1])]),v&&a.attr("cursor",v),a.setColor(l,i&&i.symbolInnerColor),a.setStyle(h);var x=t.getItemVisual(e,"opacity");null!=x&&(y.opacity=x);var _=i&&i.useNameLabel;ua(y,u,f,p,{labelFetcher:s,labelDataIndex:e,defaultText:r,isRectText:!0,autoColor:l}),a.off("mouseover").off("mouseout").off("emphasis").off("normal"),a.hoverStyle=u,ha(a);var w=Wh(n);if(g&&s.isAnimationEnabled()){var b=function(){if(!this.incremental){var t=w[1]/w[0];this.animateTo({scale:[Math.max(1.1*w[0],w[0]+3),Math.max(1.1*w[1],w[1]+3*t)]},400,"elasticOut")}},S=function(){this.incremental||this.animateTo({scale:w},400,"elasticOut")};a.on("mouseover",b).on("mouseout",S).on("emphasis",b).on("normal",S)}},sx.fadeOut=function(t,e){var n=this.childAt(0);this.silent=n.silent=!0,!(e&&e.keepLabel)&&(n.style.text=null),wa(n,{style:{opacity:0},scale:[0,0]},this._seriesModel,this.dataIndex,t)},u(Vh,Jd);var dx=jh.prototype;dx.updateData=function(t,e){e=Uh(e);var n=this.group,i=t.hostModel,r=this._data,a=this._symbolCtor,o=qh(t);r||n.removeAll(),t.diff(r).add(function(i){var r=t.getItemLayout(i);if(Yh(t,r,i,e)){var s=new a(t,i,o);s.attr("position",r),t.setItemGraphicEl(i,s),n.add(s)}}).update(function(s,l){var h=r.getItemGraphicEl(l),u=t.getItemLayout(s);return Yh(t,u,s,e)?(h?(h.updateData(t,s,o),wa(h,{position:u},i)):(h=new a(t,s),h.attr("position",u)),n.add(h),void t.setItemGraphicEl(s,h)):void n.remove(h)}).remove(function(t){var e=r.getItemGraphicEl(t);e&&e.fadeOut(function(){n.remove(e)})}).execute(),this._data=t},dx.isPersistent=function(){return!0},dx.updateLayout=function(){var t=this._data;t&&t.eachItemGraphicEl(function(e,n){var i=t.getItemLayout(n);e.attr("position",i)})},dx.incrementalPrepareUpdate=function(t){this._seriesScope=qh(t),this._data=null,this.group.removeAll()},dx.incrementalUpdate=function(t,e,n){function i(t){t.isGroup||(t.incremental=t.useHoverLayer=!0)}n=Uh(n);for(var r=t.start;r<t.end;r++){var a=e.getItemLayout(r);if(Yh(e,a,r,n)){var o=new this._symbolCtor(e,r,this._seriesScope);o.traverse(i),o.attr("position",a),this.group.add(o),e.setItemGraphicEl(r,o)}}},dx.remove=function(t){var e=this.group,n=this._data;n&&t?n.eachItemGraphicEl(function(t){t.fadeOut(function(){e.remove(t)})}):e.removeAll()};var fx=function(t,e,n,i,r,a,o,s){for(var l=Qh(t,e),h=[],u=[],c=[],d=[],f=[],p=[],g=[],v=Zh(r,e,o),m=Zh(a,t,s),y=0;y<l.length;y++){var x=l[y],_=!0;switch(x.cmd){case"=":var w=t.getItemLayout(x.idx),b=e.getItemLayout(x.idx1);(isNaN(w[0])||isNaN(w[1]))&&(w=b.slice()),h.push(w),u.push(b),c.push(n[x.idx]),d.push(i[x.idx1]),g.push(e.getRawIndex(x.idx1));break;case"+":var S=x.idx;h.push(r.dataToPoint([e.get(v.dataDimsForPoint[0],S),e.get(v.dataDimsForPoint[1],S)])),u.push(e.getItemLayout(S).slice()),c.push(Kh(v,r,e,S)),d.push(i[S]),g.push(e.getRawIndex(S));break;case"-":var S=x.idx,M=t.getRawIndex(S);M!==S?(h.push(t.getItemLayout(S)),u.push(a.dataToPoint([t.get(m.dataDimsForPoint[0],S),t.get(m.dataDimsForPoint[1],S)])),c.push(n[S]),d.push(Kh(m,a,t,S)),g.push(M)):_=!1}_&&(f.push(x),p.push(p.length))}p.sort(function(t,e){return g[t]-g[e]});for(var I=[],T=[],C=[],D=[],k=[],y=0;y<p.length;y++){var S=p[y];I[y]=h[S],T[y]=u[S],C[y]=c[S],D[y]=d[S],k[y]=f[S]}return{current:I,next:T,stackedOnCurrent:C,stackedOnNext:D,status:k}},px=oe,gx=se,vx=Y,mx=W,yx=[],xx=[],_x=[],bx=Pr.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},brush:gg(Pr.prototype.brush),buildPath:function(t,e){var n=e.points,i=0,r=n.length,a=ru(n,e.smoothConstraint);if(e.connectNulls){for(;r>0&&Jh(n[r-1]);r--);for(;r>i&&Jh(n[i]);i++);}for(;r>i;)i+=tu(t,n,i,r,r,1,a.min,a.max,e.smooth,e.smoothMonotone,e.connectNulls)+1}}),Sx=Pr.extend({type:"ec-polygon",shape:{points:[],stackedOnPoints:[],smooth:0,stackedOnSmooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},brush:gg(Pr.prototype.brush),buildPath:function(t,e){var n=e.points,i=e.stackedOnPoints,r=0,a=n.length,o=e.smoothMonotone,s=ru(n,e.smoothConstraint),l=ru(i,e.smoothConstraint);if(e.connectNulls){for(;a>0&&Jh(n[a-1]);a--);for(;a>r&&Jh(n[r]);r++);}for(;a>r;){var h=tu(t,n,r,a,a,1,s.min,s.max,e.smooth,o,e.connectNulls);tu(t,i,r+h-1,h,a,-1,l.min,l.max,e.stackedOnSmooth,o,e.connectNulls),r+=h+1,t.closePath()}}});bs.extend({type:"line",init:function(){var t=new Jd,e=new jh;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},render:function(t,e,n){var i=t.coordinateSystem,r=this.group,a=t.getData(),o=t.getModel("lineStyle"),l=t.getModel("areaStyle"),h=a.mapArray(a.getItemLayout),u="polar"===i.type,c=this._coordSys,d=this._symbolDraw,f=this._polyline,p=this._polygon,g=this._lineGroup,v=t.get("animation"),m=!l.isEmpty(),y=l.get("origin"),x=Zh(i,a,y),_=lu(i,a,x),w=t.get("showSymbol"),b=w&&!u&&!t.get("showAllSymbol")&&this._getSymbolIgnoreFunc(a,i),S=this._data;S&&S.eachItemGraphicEl(function(t,e){t.__temp&&(r.remove(t),S.setItemGraphicEl(e,null))}),w||d.remove(),r.add(g);var M=!u&&t.get("step");if(f&&c.type===i.type&&M===this._step){m&&!p?p=this._newPolygon(h,_,i,v):p&&!m&&(g.remove(p),p=this._polygon=null);var I=cu(i,!1,t);g.setClipPath(I),w&&d.updateData(a,{isIgnore:b,clipShape:I}),a.eachItemGraphicEl(function(t){t.stopAnimation(!0)}),au(this._stackedOnPoints,_)&&au(this._points,h)||(v?this._updateAnimation(a,_,i,n,M,y):(M&&(h=du(h,i,M),_=du(_,i,M)),f.setShape({points:h}),p&&p.setShape({points:h,stackedOnPoints:_})))}else w&&d.updateData(a,{isIgnore:b,clipShape:cu(i,!1,t)}),M&&(h=du(h,i,M),_=du(_,i,M)),f=this._newPolyline(h,i,v),m&&(p=this._newPolygon(h,_,i,v)),g.setClipPath(cu(i,!0,t));var T=fu(a,i)||a.getVisual("color");f.useStyle(s(o.getLineStyle(),{fill:"none",stroke:T,lineJoin:"bevel"}));var C=t.get("smooth");if(C=ou(t.get("smooth")),f.setShape({smooth:C,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")}),p){var D=a.getCalculationInfo("stackedOnSeries"),k=0;p.useStyle(s(l.getAreaStyle(),{fill:T,opacity:.7,lineJoin:"bevel"})),D&&(k=ou(D.get("smooth"))),p.setShape({smooth:C,stackedOnSmooth:k,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")})}this._data=a,this._coordSys=i,this._stackedOnPoints=_,this._points=h,this._step=M,this._valueOrigin=y},dispose:function(){},highlight:function(t,e,n,i){var r=t.getData(),a=Fi(r,i);if(!(a instanceof Array)&&null!=a&&a>=0){var o=r.getItemGraphicEl(a);if(!o){var s=r.getItemLayout(a);if(!s)return;o=new Vh(r,a),o.position=s,o.setZ(t.get("zlevel"),t.get("z")),o.ignore=isNaN(s[0])||isNaN(s[1]),o.__temp=!0,r.setItemGraphicEl(a,o),o.stopSymbolAnimation(!0),this.group.add(o)}o.highlight()}else bs.prototype.highlight.call(this,t,e,n,i)},downplay:function(t,e,n,i){var r=t.getData(),a=Fi(r,i);if(null!=a&&a>=0){var o=r.getItemGraphicEl(a);o&&(o.__temp?(r.setItemGraphicEl(a,null),this.group.remove(o)):o.downplay())}else bs.prototype.downplay.call(this,t,e,n,i)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new bx({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e,e},_newPolygon:function(t,e){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new Sx({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(n),this._polygon=n,n},_getSymbolIgnoreFunc:function(t,e){var n=e.getAxesByScale("ordinal")[0];return n&&n.isLabelIgnored?y(n.isLabelIgnored,n):void 0},_updateAnimation:function(t,e,n,i,r,a){var o=this._polyline,s=this._polygon,l=t.hostModel,h=fx(this._data,t,this._stackedOnPoints,e,this._coordSys,n,this._valueOrigin,a),u=h.current,c=h.stackedOnCurrent,d=h.next,f=h.stackedOnNext;r&&(u=du(h.current,n,r),c=du(h.stackedOnCurrent,n,r),d=du(h.next,n,r),f=du(h.stackedOnNext,n,r)),o.shape.__points=h.current,o.shape.points=u,wa(o,{shape:{points:d}},l),s&&(s.setShape({points:u,stackedOnPoints:c}),wa(s,{shape:{points:d,stackedOnPoints:f}},l));for(var p=[],g=h.status,v=0;v<g.length;v++){var m=g[v].cmd;if("="===m){var y=t.getItemGraphicEl(g[v].idx1);y&&p.push({el:y,ptIdx:v})}}o.animators&&o.animators.length&&o.animators[0].during(function(){for(var t=0;t<p.length;t++){var e=p[t].el;e.attr("position",o.shape.__points[p[t].ptIdx])}})},remove:function(){var t=this.group,e=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),e&&e.eachItemGraphicEl(function(n,i){n.__temp&&(t.remove(n),e.setItemGraphicEl(i,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._data=null}});var Mx=function(t,e,n){return{seriesType:t,performRawSeries:!0,reset:function(t,i){function r(e,n){if("function"==typeof s){var i=t.getRawValue(n),r=t.getDataParams(n);e.setItemVisual(n,"symbolSize",s(i,r))}if(e.hasItemOption){var a=e.getItemModel(n),o=a.getShallow("symbol",!0),l=a.getShallow("symbolSize",!0);null!=o&&e.setItemVisual(n,"symbol",o),null!=l&&e.setItemVisual(n,"symbolSize",l)}}var a=t.getData(),o=t.get("symbol")||e,s=t.get("symbolSize");if(a.setVisual({legendSymbol:n||o,symbol:o,symbolSize:s}),!i.isSeriesFiltered(t)){var l="function"==typeof s;return{dataEach:a.hasItemOption||l?r:null}}}}},Ix=function(t){return{seriesType:t,plan:$v(),reset:function(t){function e(t,e){for(var n=t.end-t.start,r=a&&new Float32Array(n*s),l=t.start,h=0,u=[],c=[];l<t.end;l++){var d;if(1===s){var f=e.get(o[0],l,!0);d=!isNaN(f)&&i.dataToPoint(f,null,c)}else{var f=u[0]=e.get(o[0],l,!0),p=u[1]=e.get(o[1],l,!0);d=!isNaN(f)&&!isNaN(p)&&i.dataToPoint(u,null,c)}a?(r[h++]=d?d[0]:0/0,r[h++]=d?d[1]:0/0):e.setItemLayout(l,d&&d.slice()||[0/0,0/0])}a&&e.setLayout("symbolPoints",r)}var n=t.getData(),i=t.coordinateSystem,r=t.pipelineContext,a=r.large;if(i){var o=p(i.dimensions,function(t){return n.mapDimension(t)}).slice(0,2),s=o.length;return ih(n,o[0],o[1])&&(o[0]=n.getCalculationInfo("stackResultDimension")),ih(n,o[1],o[0])&&(o[1]=n.getCalculationInfo("stackResultDimension")),s&&{progress:e}}}}},Tx={average:function(t){for(var e=0,n=0,i=0;i<t.length;i++)isNaN(t[i])||(e+=t[i],n++);return 0===n?0/0:e/n},sum:function(t){for(var e=0,n=0;n<t.length;n++)e+=t[n]||0;return e},max:function(t){for(var e=-1/0,n=0;n<t.length;n++)t[n]>e&&(e=t[n]);return e},min:function(t){for(var e=1/0,n=0;n<t.length;n++)t[n]<e&&(e=t[n]);return e},nearest:function(t){return t[0]}},Cx=function(t){return Math.round(t.length/2)},Dx=function(t){return{seriesType:t,reset:function(t){var e=t.getData(),n=t.get("sampling"),i=t.coordinateSystem;if("cartesian2d"===i.type&&n){var r=i.getBaseAxis(),a=i.getOtherAxis(r),o=r.getExtent(),s=o[1]-o[0],l=Math.round(e.count()/s);if(l>1){var h;"string"==typeof n?h=Tx[n]:"function"==typeof n&&(h=n),h&&t.setData(e.downSample(a.dim,1/l,h,Cx))}}}}},kx=function(t){this._axes={},this._dimList=[],this.name=t||""};kx.prototype={constructor:kx,type:"cartesian",getAxis:function(t){return this._axes[t]},getAxes:function(){return p(this._dimList,pu,this)},getAxesByScale:function(t){return t=t.toLowerCase(),v(this.getAxes(),function(e){return e.scale.type===t})},addAxis:function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},dataToCoord:function(t){return this._dataCoordConvert(t,"dataToCoord")},coordToData:function(t){return this._dataCoordConvert(t,"coordToData")},_dataCoordConvert:function(t,e){for(var n=this._dimList,i=t instanceof Array?[]:{},r=0;r<n.length;r++){var a=n[r],o=this._axes[a];i[a]=o[e](t[a])}return i}},gu.prototype={constructor:gu,type:"cartesian2d",dimensions:["x","y"],getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},containPoint:function(t){var e=this.getAxis("x"),n=this.getAxis("y");return e.contain(e.toLocalCoord(t[0]))&&n.contain(n.toLocalCoord(t[1]))},containData:function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},dataToPoint:function(t,e,n){var i=this.getAxis("x"),r=this.getAxis("y");return n=n||[],n[0]=i.toGlobalCoord(i.dataToCoord(t[0])),n[1]=r.toGlobalCoord(r.dataToCoord(t[1])),n},clampData:function(t,e){var n=this.getAxis("x").scale.getExtent(),i=this.getAxis("y").scale.getExtent();return e=e||[],e[0]=Math.min(Math.max(Math.min(n[0],n[1]),t[0]),Math.max(n[0],n[1])),e[1]=Math.min(Math.max(Math.min(i[0],i[1]),t[1]),Math.max(i[0],i[1])),e},pointToData:function(t,e){var n=this.getAxis("x"),i=this.getAxis("y");return e=e||[],e[0]=n.coordToData(n.toLocalCoord(t[0])),e[1]=i.coordToData(i.toLocalCoord(t[1])),e},getOtherAxis:function(t){return this.getAxis("x"===t.dim?"y":"x")}},u(gu,kx);var Ax=function(t,e,n,i,r){rx.call(this,t,e,n),this.type=i||"value",this.position=r||"bottom"};Ax.prototype={constructor:Ax,index:0,onZero:!1,model:null,isHorizontal:function(){var t=this.position;return"top"===t||"bottom"===t},getGlobalExtent:function(t){var e=this.getExtent();return e[0]=this.toGlobalCoord(e[0]),e[1]=this.toGlobalCoord(e[1]),t&&e[0]>e[1]&&e.reverse(),e},getOtherAxis:function(){this.grid.getOtherAxis()},isLabelIgnored:function(t){if("category"===this.type){var e=this.getLabelInterval();return"function"==typeof e&&!e(t,this.scale.getLabel(t))||t%(e+1)}},pointToData:function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},toLocalCoord:null,toGlobalCoord:null},u(Ax,rx);var Px={show:!0,zlevel:0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#333",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},Lx={};Lx.categoryAxis=r({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},Px),Lx.valueAxis=r({boundaryGap:[0,0],splitNumber:5},Px),Lx.timeAxis=s({scale:!0,min:"dataMin",max:"dataMax"},Lx.valueAxis),Lx.logAxis=s({scale:!0,logBase:10},Lx.valueAxis);var Ox=["value","category","time","log"],Bx=function(t,e,n,i){f(Ox,function(o){e.extend({type:t+"Axis."+o,mergeDefaultAndTheme:function(e,i){var a=this.layoutMode,s=a?co(e):{},l=i.getTheme();r(e,l.get(o+"Axis")),r(e,this.getDefaultOption()),e.type=n(t,e),a&&uo(e,s,a)},optionUpdated:function(){var t=this.option;"category"===t.type&&(this.__ordinalMeta=lh.createByAxisModel(this))},getCategories:function(){return"category"===this.option.type?this.__ordinalMeta.categories:void 0},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:a([{},Lx[o+"Axis"],i],!0)})}),sv.registerSubTypeDefaulter(t+"Axis",x(n,t))},Ex=sv.extend({type:"cartesian2dAxis",axis:null,init:function(){Ex.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){Ex.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){Ex.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});r(Ex.prototype,Vy);var zx={offset:0};Bx("x",Ex,vu,zx),Bx("y",Ex,vu,zx),sv.extend({type:"grid",dependencies:["xAxis","yAxis"],layoutMode:"box",coordinateSystem:null,defaultOption:{show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:60,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"}});var Rx=f,Nx=Ih,Fx=Sh,Hx=_u.prototype;Hx.type="grid",Hx.axisPointerEnabled=!0,Hx.getRect=function(){return this._rect},Hx.update=function(t,e){var n=this._axesMap;this._updateScale(t,this.model),Rx(n.x,function(t){Fx(t.scale,t.model)}),Rx(n.y,function(t){Fx(t.scale,t.model)}),Rx(n.x,function(t){wu(n,"y",t)}),Rx(n.y,function(t){wu(n,"x",t)}),this.resize(this.model,e)},Hx.resize=function(t,e,n){function i(){Rx(a,function(t){var e=t.isHorizontal(),n=e?[0,r.width]:[0,r.height],i=t.inverse?1:0;t.setExtent(n[i],n[1-i]),Su(t,e?r.x:r.y)})}var r=ho(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=r;var a=this._axesList;i(),!n&&t.get("containLabel")&&(Rx(a,function(t){if(!t.model.get("axisLabel.inside")){var e=xu(t);if(e){var n=t.isHorizontal()?"height":"width",i=t.model.get("axisLabel.margin");r[n]-=e[n]+i,"top"===t.position?r.y+=e.height+i:"left"===t.position&&(r.x+=e.width+i)}}}),i())},Hx.getAxis=function(t,e){var n=this._axesMap[t];if(null!=n){if(null==e)for(var i in n)if(n.hasOwnProperty(i))return n[i];return n[e]}},Hx.getAxes=function(){return this._axesList.slice()},Hx.getCartesian=function(t,e){if(null!=t&&null!=e){var n="x"+t+"y"+e;return this._coordsMap[n]}S(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var i=0,r=this._coordsList;i<r.length;i++)if(r[i].getAxis("x").index===t||r[i].getAxis("y").index===e)return r[i]},Hx.getCartesians=function(){return this._coordsList.slice()},Hx.convertToPixel=function(t,e,n){var i=this._findConvertTarget(t,e);return i.cartesian?i.cartesian.dataToPoint(n):i.axis?i.axis.toGlobalCoord(i.axis.dataToCoord(n)):null},Hx.convertFromPixel=function(t,e,n){var i=this._findConvertTarget(t,e);return i.cartesian?i.cartesian.pointToData(n):i.axis?i.axis.coordToData(i.axis.toLocalCoord(n)):null},Hx._findConvertTarget=function(t,e){var n,i,r=e.seriesModel,a=e.xAxisModel||r&&r.getReferringComponents("xAxis")[0],o=e.yAxisModel||r&&r.getReferringComponents("yAxis")[0],s=e.gridModel,l=this._coordsList;if(r)n=r.coordinateSystem,h(l,n)<0&&(n=null);else if(a&&o)n=this.getCartesian(a.componentIndex,o.componentIndex);else if(a)i=this.getAxis("x",a.componentIndex);else if(o)i=this.getAxis("y",o.componentIndex);else if(s){var u=s.coordinateSystem;u===this&&(n=this._coordsList[0])}return{cartesian:n,axis:i}},Hx.containPoint=function(t){var e=this._coordsList[0];return e?e.containPoint(t):void 0},Hx._initCartesian=function(t,e){function n(n){return function(o,s){if(mu(o,t,e)){var l=o.get("position");"x"===n?"top"!==l&&"bottom"!==l&&(l="bottom",i[l]&&(l="top"===l?"bottom":"top")):"left"!==l&&"right"!==l&&(l="left",i[l]&&(l="left"===l?"right":"left")),i[l]=!0;var h=new Ax(n,Mh(o),[0,0],o.get("type"),l),u="category"===h.type;h.onBand=u&&o.get("boundaryGap"),h.inverse=o.get("inverse"),h.onZero=o.get("axisLine.onZero"),h.onZeroAxisIndex=o.get("axisLine.onZeroAxisIndex"),o.axis=h,h.model=o,h.grid=this,h.index=s,this._axesList.push(h),r[n][s]=h,a[n]++}}}var i={left:!1,right:!1,top:!1,bottom:!1},r={x:{},y:{}},a={x:0,y:0};return e.eachComponent("xAxis",n("x"),this),e.eachComponent("yAxis",n("y"),this),a.x&&a.y?(this._axesMap=r,void Rx(r.x,function(e,n){Rx(r.y,function(i,r){var a="x"+n+"y"+r,o=new gu(a);o.grid=this,o.model=t,this._coordsMap[a]=o,this._coordsList.push(o),o.addAxis(e),o.addAxis(i)},this)},this)):(this._axesMap={},void(this._axesList=[]))},Hx._updateScale=function(t,e){function n(t,e){Rx(t.mapDimension(e.dim,!0),function(n){e.scale.unionExtentFromData(t,n)})}f(this._axesList,function(t){t.scale.setExtent(1/0,-1/0)}),t.eachSeries(function(i){if(Iu(i)){var r=Mu(i,t),a=r[0],o=r[1];if(!mu(a,e,t)||!mu(o,e,t))return;var s=this.getCartesian(a.componentIndex,o.componentIndex),l=i.getData(),h=s.getAxis("x"),u=s.getAxis("y");"list"===l.type&&(n(l,h,i),n(l,u,i))}},this)},Hx.getTooltipAxes=function(t){var e=[],n=[];return Rx(this.getCartesians(),function(i){var r=null!=t&&"auto"!==t?i.getAxis(t):i.getBaseAxis(),a=i.getOtherAxis(r);h(e,r)<0&&e.push(r),h(n,a)<0&&n.push(a)}),{baseAxes:e,otherAxes:n}};var Gx=["xAxis","yAxis"];_u.create=function(t,e){var n=[];return t.eachComponent("grid",function(i,r){var a=new _u(i,t,e);a.name="grid_"+r,a.resize(i,e,!0),i.coordinateSystem=a,n.push(a)}),t.eachSeries(function(e){if(Iu(e)){var n=Mu(e,t),i=n[0],r=n[1],a=i.getCoordSysModel(),o=a.coordinateSystem;e.coordinateSystem=o.getCartesian(i.componentIndex,r.componentIndex)}}),n},_u.dimensions=_u.prototype.dimensions=gu.prototype.dimensions,No.register("cartesian2d",_u);var Wx=Math.PI,Vx=function(t,e){this.opt=e,this.axisModel=t,s(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new Jd;var n=new Jd({position:e.position.slice(),rotation:e.rotation});n.updateTransform(),this._transform=n.transform,this._dumbGroup=n};Vx.prototype={constructor:Vx,hasBuilder:function(t){return!!Xx[t]},add:function(t){Xx[t].call(this)},getGroup:function(){return this.group}};var Xx={axisLine:function(){var t=this.opt,e=this.axisModel;if(e.get("axisLine.show")){var n=this.axisModel.axis.getExtent(),i=this._transform,r=[n[0],0],a=[n[1],0];i&&(ae(r,r,i),ae(a,a,i));var s=o({lineCap:"round"},e.getModel("axisLine.lineStyle").getLineStyle());this.group.add(new Sg(qr({anid:"line",shape:{x1:r[0],y1:r[1],x2:a[0],y2:a[1]},style:s,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1})));var l=e.get("axisLine.symbol"),h=e.get("axisLine.symbolSize"),u=e.get("axisLine.symbolOffset")||0;if("number"==typeof u&&(u=[u,u]),null!=l){"string"==typeof l&&(l=[l,l]),("string"==typeof h||"number"==typeof h)&&(h=[h,h]);var c=h[0],d=h[1];f([{rotate:t.rotation+Math.PI/2,offset:u[0],r:0},{rotate:t.rotation-Math.PI/2,offset:u[1],r:Math.sqrt((r[0]-a[0])*(r[0]-a[0])+(r[1]-a[1])*(r[1]-a[1]))}],function(e,n){if("none"!==l[n]&&null!=l[n]){var i=Ah(l[n],-c/2,-d/2,c,d,s.stroke,!0),a=e.r+e.offset,o=[r[0]+a*Math.cos(t.rotation),r[1]-a*Math.sin(t.rotation)];i.attr({rotation:e.rotate,position:o,silent:!0}),this.group.add(i)}},this)}}},axisTickLabel:function(){var t=this.axisModel,e=this.opt,n=Ou(this,t,e),i=Bu(this,t,e);ku(t,i,n)},axisName:function(){var t=this.opt,e=this.axisModel,n=D(t.axisName,e.get("name"));if(n){var i,r=e.get("nameLocation"),a=t.nameDirection,s=e.getModel("nameTextStyle"),l=e.get("nameGap")||0,h=this.axisModel.axis.getExtent(),u=h[0]>h[1]?-1:1,c=["start"===r?h[0]-u*l:"end"===r?h[1]+u*l:(h[0]+h[1])/2,Lu(r)?t.labelOffset+a*l:0],d=e.get("nameRotate");null!=d&&(d=d*Wx/180);var f;Lu(r)?i=jx(t.rotation,null!=d?d:t.rotation,a):(i=Cu(t,r,d||0,h),f=t.axisNameAvailableWidth,null!=f&&(f=Math.abs(f/Math.sin(i.rotation)),!isFinite(f)&&(f=null)));var p=s.getFont(),g=e.get("nameTruncate",!0)||{},v=g.ellipsis,m=D(t.nameTruncateMaxWidth,g.maxWidth,f),y=null!=v&&null!=m?Qg(n,m,p,v,{minChar:2,placeholder:g.placeholder}):n,x=e.get("tooltip",!0),_=e.mainType,w={componentType:_,name:n,$vars:["name"]};w[_+"Index"]=e.componentIndex;var b=new dg({anid:"name",__fullText:n,__truncatedText:y,position:c,rotation:i.rotation,silent:Du(e),z2:1,tooltip:x&&x.show?o({content:n,formatter:function(){return n},formatterParams:w},x):null});ca(b.style,s,{text:y,textFont:p,textFill:s.getTextColor()||e.get("axisLine.lineStyle.color"),textAlign:i.textAlign,textVerticalAlign:i.textVerticalAlign}),e.get("triggerEvent")&&(b.eventData=Tu(e),b.eventData.targetType="axisName",b.eventData.name=n),this._dumbGroup.add(b),b.updateTransform(),this.group.add(b),b.decomposeTransform()}}},jx=Vx.innerTextLayout=function(t,e,n){var i,r,a=ja(e-t);return Ya(a)?(r=n>0?"top":"bottom",i="center"):Ya(a-Wx)?(r=n>0?"bottom":"top",i="center"):(r="middle",i=a>0&&Wx>a?n>0?"right":"left":n>0?"left":"right"),{rotation:a,textAlign:i,textVerticalAlign:r}},Yx=Vx.ifIgnoreOnTick=function(t,e,n,i,r,a){if(0===e&&r||e===i-1&&a)return!1;var o,s=t.scale;return"ordinal"===s.type&&("function"==typeof n?(o=s.getTicks()[e],!n(o,s.getLabel(o))):e%(n+1))},Ux=Vx.getInterval=function(t,e){var n=t.get("interval");return(null==n||"auto"==n)&&(n=e),n},qx=f,Zx=x,$x=Al({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(t,e,n,i){this.axisPointerClass&&Gu(t),$x.superApply(this,"render",arguments),Yu(this,t,e,n,i,!0)},updateAxisPointer:function(t,e,n,i){Yu(this,t,e,n,i,!1)},remove:function(t,e){var n=this._axisPointer;n&&n.remove(e),$x.superApply(this,"remove",arguments)},dispose:function(t,e){Uu(this,e),$x.superApply(this,"dispose",arguments)}}),Kx=[];$x.registerAxisPointerClass=function(t,e){Kx[t]=e},$x.getAxisPointerClass=function(t){return t&&Kx[t]};var Qx=Vx.ifIgnoreOnTick,Jx=Vx.getInterval,t_=["axisLine","axisTickLabel","axisName"],e_=["splitArea","splitLine"],n_=$x.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(t,e,n,i){this.group.removeAll();var r=this._axisGroup;if(this._axisGroup=new Jd,this.group.add(this._axisGroup),t.get("show")){var a=t.getCoordSysModel(),o=qu(a,t),s=new Vx(t,o); | |
| 10 | +f(t_,s.add,s),this._axisGroup.add(s.getGroup()),f(e_,function(e){t.get(e+".show")&&this["_"+e](t,a,o.labelInterval)},this),Ta(r,this._axisGroup,t),n_.superCall(this,"render",t,e,n,i)}},_splitLine:function(t,e,n){var i=t.axis;if(!i.scale.isBlank()){var r=t.getModel("splitLine"),a=r.getModel("lineStyle"),o=a.get("color"),l=Jx(r,n);o=_(o)?o:[o];for(var h=e.coordinateSystem.getRect(),u=i.isHorizontal(),c=0,d=i.getTicksCoords(),f=i.scale.getTicks(),p=t.get("axisLabel.showMinLabel"),g=t.get("axisLabel.showMaxLabel"),v=[],m=[],y=a.getLineStyle(),x=0;x<d.length;x++)if(!Qx(i,x,l,d.length,p,g)){var w=i.toGlobalCoord(d[x]);u?(v[0]=w,v[1]=h.y,m[0]=w,m[1]=h.y+h.height):(v[0]=h.x,v[1]=w,m[0]=h.x+h.width,m[1]=w);var b=c++%o.length;this._axisGroup.add(new Sg(qr({anid:"line_"+f[x],shape:{x1:v[0],y1:v[1],x2:m[0],y2:m[1]},style:s({stroke:o[b]},y),silent:!0})))}}},_splitArea:function(t,e,n){var i=t.axis;if(!i.scale.isBlank()){var r=t.getModel("splitArea"),a=r.getModel("areaStyle"),o=a.get("color"),l=e.coordinateSystem.getRect(),h=i.getTicksCoords(),u=i.scale.getTicks(),c=i.toGlobalCoord(h[0]),d=i.toGlobalCoord(h[0]),f=0,p=Jx(r,n),g=a.getAreaStyle();o=_(o)?o:[o];for(var v=t.get("axisLabel.showMinLabel"),m=t.get("axisLabel.showMaxLabel"),y=1;y<h.length;y++)if(!(Qx(i,y,p,h.length,v,m)&&y<h.length-1)){var x,w,b,S,M=i.toGlobalCoord(h[y]);i.isHorizontal()?(x=c,w=l.y,b=M-x,S=l.height):(x=l.x,w=d,b=l.width,S=M-w);var I=f++%o.length;this._axisGroup.add(new bg({anid:"area_"+u[y],shape:{x:x,y:w,width:b,height:S},style:s({fill:o[I]},g),silent:!0})),c=x+b,d=w+S}}}});n_.extend({type:"xAxis"}),n_.extend({type:"yAxis"}),Al({type:"grid",render:function(t){this.group.removeAll(),t.get("show")&&this.group.add(new bg({shape:t.coordinateSystem.getRect(),style:s({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))}}),xl(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})}),Tl(Mx("line","circle","line")),Il(Ix("line")),_l(Em.PROCESSOR.STATISTIC,Dx("line"));{var i_=function(t,e,n){e=_(e)&&{coordDimensions:e}||o({},e);var i=t.getSource(),r=vy(i,e),a=new fy(r,t);return a.initData(i,n),a},r_=(Uv.extend({type:"series.gauge",getInitialData:function(t){var e=t.data||[];return _(e)||(e=[e]),t.data=e,i_(this,["value"])},defaultOption:{zlevel:0,z:2,center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,lineStyle:{color:[[.2,"#91c7ae"],[.8,"#63869e"],[1,"#c23531"]],width:30}},splitLine:{show:!0,length:30,lineStyle:{color:"#eee",width:2,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:8,lineStyle:{color:"#eee",width:1,type:"solid"}},axisLabel:{show:!0,distance:5,color:"auto"},pointer:{show:!0,length:"80%",width:8},itemStyle:{color:"auto"},title:{show:!0,offsetCenter:[0,"-40%"],color:"#333",fontSize:15},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"auto",fontSize:30}}}),Pr.extend({type:"echartsGaugePointer",shape:{angle:0,width:10,r:10,x:0,y:0},buildPath:function(t,e){var n=Math.cos,i=Math.sin,r=e.r,a=e.width,o=e.angle,s=e.x-n(o)*a*(a>=r/3?1:2),l=e.y-i(o)*a*(a>=r/3?1:2);o=e.angle-Math.PI/2,t.moveTo(s,l),t.lineTo(e.x+n(o)*a,e.y+i(o)*a),t.lineTo(e.x+n(e.angle)*r,e.y+i(e.angle)*r),t.lineTo(e.x-n(o)*a,e.y-i(o)*a),t.lineTo(s,l)}})),a_=2*Math.PI;bs.extend({type:"gauge",render:function(t,e,n){this.group.removeAll();var i=t.get("axisLine.lineStyle.color"),r=Zu(t,n);this._renderMain(t,e,n,i,r)},dispose:function(){},_renderMain:function(t,e,n,i,r){for(var a=this.group,o=t.getModel("axisLine"),s=o.getModel("lineStyle"),l=t.get("clockwise"),h=-t.get("startAngle")/180*Math.PI,u=-t.get("endAngle")/180*Math.PI,c=(u-h)%a_,d=h,f=s.get("width"),p=0;p<i.length;p++){var g=Math.min(Math.max(i[p][0],0),1),u=h+c*g,v=new vg({shape:{startAngle:d,endAngle:u,cx:r.cx,cy:r.cy,clockwise:l,r0:r.r-f,r:r.r},silent:!0});v.setStyle({fill:i[p][1]}),v.setStyle(s.getLineStyle(["color","borderWidth","borderColor"])),a.add(v),d=u}var m=function(t){if(0>=t)return i[0][1];for(var e=0;e<i.length;e++)if(i[e][0]>=t&&(0===e?0:i[e-1][0])<t)return i[e][1];return i[e-1][1]};if(!l){var y=h;h=u,u=y}this._renderTicks(t,e,n,m,r,h,u,l),this._renderPointer(t,e,n,m,r,h,u,l),this._renderTitle(t,e,n,m,r),this._renderDetail(t,e,n,m,r)},_renderTicks:function(t,e,n,i,r,a,o){for(var s=this.group,l=r.cx,h=r.cy,u=r.r,c=+t.get("min"),d=+t.get("max"),f=t.getModel("splitLine"),p=t.getModel("axisTick"),g=t.getModel("axisLabel"),v=t.get("splitNumber"),m=p.get("splitNumber"),y=Na(f.get("length"),u),x=Na(p.get("length"),u),_=a,w=(o-a)/v,b=w/m,S=f.getModel("lineStyle").getLineStyle(),M=p.getModel("lineStyle").getLineStyle(),I=0;v>=I;I++){var T=Math.cos(_),C=Math.sin(_);if(f.get("show")){var D=new Sg({shape:{x1:T*u+l,y1:C*u+h,x2:T*(u-y)+l,y2:C*(u-y)+h},style:S,silent:!0});"auto"===S.stroke&&D.setStyle({stroke:i(I/v)}),s.add(D)}if(g.get("show")){var k=$u(Fa(I/v*(d-c)+c),g.get("formatter")),A=g.get("distance"),P=i(I/v);s.add(new dg({style:ca({},g,{text:k,x:T*(u-y-A)+l,y:C*(u-y-A)+h,textVerticalAlign:-.4>C?"top":C>.4?"bottom":"middle",textAlign:-.4>T?"left":T>.4?"right":"center"},{autoColor:P}),silent:!0}))}if(p.get("show")&&I!==v){for(var L=0;m>=L;L++){var T=Math.cos(_),C=Math.sin(_),O=new Sg({shape:{x1:T*u+l,y1:C*u+h,x2:T*(u-x)+l,y2:C*(u-x)+h},silent:!0,style:M});"auto"===M.stroke&&O.setStyle({stroke:i((I+L/m)/v)}),s.add(O),_+=b}_-=b}else _+=w}},_renderPointer:function(t,e,n,i,r,a,o){var s=this.group,l=this._data;if(!t.get("pointer.show"))return void(l&&l.eachItemGraphicEl(function(t){s.remove(t)}));var h=[+t.get("min"),+t.get("max")],u=[a,o],c=t.getData(),d=c.mapDimension("value");c.diff(l).add(function(e){var n=new r_({shape:{angle:a}});ba(n,{shape:{angle:Ra(c.get(d,e),h,u,!0)}},t),s.add(n),c.setItemGraphicEl(e,n)}).update(function(e,n){var i=l.getItemGraphicEl(n);wa(i,{shape:{angle:Ra(c.get(d,e),h,u,!0)}},t),s.add(i),c.setItemGraphicEl(e,i)}).remove(function(t){var e=l.getItemGraphicEl(t);s.remove(e)}).execute(),c.eachItemGraphicEl(function(t,e){var n=c.getItemModel(e),a=n.getModel("pointer");t.setShape({x:r.cx,y:r.cy,width:Na(a.get("width"),r.r),r:Na(a.get("length"),r.r)}),t.useStyle(n.getModel("itemStyle").getItemStyle()),"auto"===t.style.fill&&t.setStyle("fill",i(Ra(c.get(d,e),h,[0,1],!0))),ha(t,n.getModel("emphasis.itemStyle").getItemStyle())}),this._data=c},_renderTitle:function(t,e,n,i,r){var a=t.getData(),o=a.mapDimension("value"),s=t.getModel("title");if(s.get("show")){var l=s.get("offsetCenter"),h=r.cx+Na(l[0],r.r),u=r.cy+Na(l[1],r.r),c=+t.get("min"),d=+t.get("max"),f=t.getData().get(o,0),p=i(Ra(f,[c,d],[0,1],!0));this.group.add(new dg({silent:!0,style:ca({},s,{x:h,y:u,text:a.getName(0),textAlign:"center",textVerticalAlign:"middle"},{autoColor:p,forceRich:!0})}))}},_renderDetail:function(t,e,n,i,r){var a=t.getModel("detail"),o=+t.get("min"),s=+t.get("max");if(a.get("show")){var l=a.get("offsetCenter"),h=r.cx+Na(l[0],r.r),u=r.cy+Na(l[1],r.r),c=Na(a.get("width"),r.r),d=Na(a.get("height"),r.r),f=t.getData(),p=f.get(f.mapDimension("value"),0),g=i(Ra(p,[o,s],[0,1],!0));this.group.add(new dg({silent:!0,style:ca({},a,{x:h,y:u,text:$u(p,a.get("formatter")),textWidth:isNaN(c)?null:c,textHeight:isNaN(d)?null:d,textAlign:"center",textVerticalAlign:"middle"},{autoColor:g,forceRich:!0})}))}}})}kl({type:"title",layoutMode:{type:"box",ignoreSize:!0},defaultOption:{zlevel:0,z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bolder",color:"#333"},subtextStyle:{color:"#aaa"}}}),Al({type:"title",render:function(t,e,n){if(this.group.removeAll(),t.get("show")){var i=this.group,r=t.getModel("textStyle"),a=t.getModel("subtextStyle"),o=t.get("textAlign"),s=t.get("textBaseline"),l=new dg({style:ca({},r,{text:t.get("text"),textFill:r.getTextColor()},{disableBox:!0}),z2:10}),h=l.getBoundingRect(),u=t.get("subtext"),c=new dg({style:ca({},a,{text:u,textFill:a.getTextColor(),y:h.height+t.get("itemGap"),textVerticalAlign:"top"},{disableBox:!0}),z2:10}),d=t.get("link"),f=t.get("sublink");l.silent=!d,c.silent=!f,d&&l.on("click",function(){window.open(d,"_"+t.get("target"))}),f&&c.on("click",function(){window.open(f,"_"+t.get("subtarget"))}),i.add(l),u&&i.add(c);var p=i.getBoundingRect(),g=t.getBoxLayoutParams();g.width=p.width,g.height=p.height;var v=ho(g,{width:n.getWidth(),height:n.getHeight()},t.get("padding"));o||(o=t.get("left")||t.get("right"),"middle"===o&&(o="center"),"right"===o?v.x+=v.width:"center"===o&&(v.x+=v.width/2)),s||(s=t.get("top")||t.get("bottom"),"center"===s&&(s="middle"),"bottom"===s?v.y+=v.height:"middle"===s&&(v.y+=v.height/2),s=s||"top"),i.attr("position",[v.x,v.y]);var m={textAlign:o,textVerticalAlign:s};l.setStyle(m),c.setStyle(m),p=i.getBoundingRect();var y=v.margin,x=t.getItemStyle(["color","opacity"]);x.fill=t.get("backgroundColor");var _=new bg({shape:{x:p.x-y[3],y:p.y-y[0],width:p.width+y[1]+y[3],height:p.height+y[0]+y[2],r:t.get("borderRadius")},style:x,silent:!0});Zr(_),i.add(_)}}});var o_=kl({type:"legend.plain",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(t,e,n){this.mergeDefaultAndTheme(t,n),t.selected=t.selected||{}},mergeOption:function(t){o_.superCall(this,"mergeOption",t)},optionUpdated:function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,n=0;n<t.length;n++){var i=t[n].get("name");if(this.isSelected(i)){this.select(i),e=!0;break}}!e&&this.select(t[0].get("name"))}},_updateData:function(t){var e=[],n=[];t.eachRawSeries(function(i){var r=i.name;n.push(r);var a;if(i.legendDataProvider){var o=i.legendDataProvider(),s=o.mapArray(o.getName);t.isSeriesFiltered(i)||(n=n.concat(s)),s.length?e=e.concat(s):a=!0}else a=!0;a&&Ri(i)&&e.push(i.name)}),this._availableNames=n;var i=this.get("data")||e,r=p(i,function(t){return("string"==typeof t||"number"==typeof t)&&(t={name:t}),new Aa(t,this,this.ecModel)},this);this._data=r},getData:function(){return this._data},select:function(t){var e=this.option.selected,n=this.get("selectedMode");if("single"===n){var i=this._data;f(i,function(t){e[t.get("name")]=!1})}e[t]=!0},unSelect:function(t){"single"!==this.get("selectedMode")&&(this.option.selected[t]=!1)},toggleSelected:function(t){var e=this.option.selected;e.hasOwnProperty(t)||(e[t]=!0),this[e[t]?"unSelect":"select"](t)},isSelected:function(t){var e=this.option.selected;return!(e.hasOwnProperty(t)&&!e[t])&&h(this._availableNames,t)>=0},defaultOption:{zlevel:0,z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,inactiveColor:"#ccc",textStyle:{color:"#333"},selectedMode:!0,tooltip:{show:!1}}});bl("legendToggleSelect","legendselectchanged",x(Ku,"toggleSelected")),bl("legendSelect","legendselected",x(Ku,"select")),bl("legendUnSelect","legendunselected",x(Ku,"unSelect"));var s_=x,l_=f,h_=Jd,u_=Al({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new h_),this._backgroundEl},getContentGroup:function(){return this._contentGroup},render:function(t,e,n){if(this.resetInner(),t.get("show",!0)){var i=t.get("align");i&&"auto"!==i||(i="right"===t.get("left")&&"vertical"===t.get("orient")?"right":"left"),this.renderInner(i,t,e,n);var r=t.getBoxLayoutParams(),a={width:n.getWidth(),height:n.getHeight()},o=t.get("padding"),l=ho(r,a,o),h=this.layoutInner(t,i,l),u=ho(s({width:h.width,height:h.height},r),a,o);this.group.attr("position",[u.x-h.x,u.y-h.y]),this.group.add(this._backgroundEl=Qu(h,t))}},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl)},renderInner:function(t,e,n,i){var r=this.getContentGroup(),a=N(),o=e.get("selectedMode");l_(e.getData(),function(s,l){var h=s.get("name");if(!this.newlineDisabled&&(""===h||"\n"===h))return void r.add(new h_({newline:!0}));var u=n.getSeriesByName(h)[0];if(!a.get(h))if(u){var c=u.getData(),d=c.getVisual("color");"function"==typeof d&&(d=d(u.getDataParams(0)));var f=c.getVisual("legendSymbol")||"roundRect",p=c.getVisual("symbol"),g=this._createItem(h,l,s,e,f,p,t,d,o);g.on("click",s_(Ju,h,i)).on("mouseover",s_(tc,u,null,i)).on("mouseout",s_(ec,u,null,i)),a.set(h,!0)}else n.eachRawSeries(function(n){if(!a.get(h)&&n.legendDataProvider){var r=n.legendDataProvider(),u=r.indexOfName(h);if(0>u)return;var c=r.getItemVisual(u,"color"),d="roundRect",f=this._createItem(h,l,s,e,d,null,t,c,o);f.on("click",s_(Ju,h,i)).on("mouseover",s_(tc,n,h,i)).on("mouseout",s_(ec,n,h,i)),a.set(h,!0)}},this)},this)},_createItem:function(t,e,n,i,r,a,s,l,h){var u=i.get("itemWidth"),c=i.get("itemHeight"),d=i.get("inactiveColor"),f=i.isSelected(t),p=new h_,g=n.getModel("textStyle"),v=n.get("icon"),m=n.getModel("tooltip"),y=m.parentModel;if(r=v||r,p.add(Ah(r,0,0,u,c,f?l:d,!0)),!v&&a&&(a!==r||"none"==a)){var x=.8*c;"none"===a&&(a="circle"),p.add(Ah(a,(u-x)/2,(c-x)/2,x,x,f?l:d))}var _="left"===s?u+5:-5,w=s,b=i.get("formatter"),S=t;"string"==typeof b&&b?S=b.replace("{name}",null!=t?t:""):"function"==typeof b&&(S=b(t)),p.add(new dg({style:ca({},g,{text:S,x:_,y:c/2,textFill:f?g.getTextColor():d,textAlign:w,textVerticalAlign:"middle"})}));var M=new bg({shape:p.getBoundingRect(),invisible:!0,tooltip:m.get("show")?o({content:t,formatter:y.get("formatter",!0)||function(){return t},formatterParams:{componentType:"legend",legendIndex:i.componentIndex,name:t,$vars:["name"]}},m.option):null});return p.add(M),p.eachChild(function(t){t.silent=!0}),M.silent=!h,this.getContentGroup().add(p),ha(p),p.__legendDataIndex=e,p},layoutInner:function(t,e,n){var i=this.getContentGroup();rv(t.get("orient"),i,t.get("itemGap"),n.width,n.height);var r=i.getBoundingRect();return i.attr("position",[-r.x,-r.y]),this.group.getBoundingRect()}}),c_=function(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries(function(t){for(var n=0;n<e.length;n++)if(!e[n].isSelected(t.name))return!1;return!0})};_l(c_),sv.registerSubTypeDefaulter("legend",function(){return"plain"});var d_=o_.extend({type:"legend.scroll",setScrollDataIndex:function(t){this.option.scrollDataIndex=t},defaultOption:{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800},init:function(t,e,n,i){var r=co(t);d_.superCall(this,"init",t,e,n,i),nc(this,t,r)},mergeOption:function(t,e){d_.superCall(this,"mergeOption",t,e),nc(this,this.option,t)},getOrient:function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}}}),f_=Jd,p_=["width","height"],g_=["x","y"],v_=u_.extend({type:"legend.scroll",newlineDisabled:!0,init:function(){v_.superCall(this,"init"),this._currentIndex=0,this.group.add(this._containerGroup=new f_),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new f_),this._showController},resetInner:function(){v_.superCall(this,"resetInner"),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},renderInner:function(t,e,n,i){function r(t,n){var r=t+"DataIndex",l=ka(e.get("pageIcons",!0)[e.getOrient().name][n],{onclick:y(a._pageGo,a,r,e,i)},{x:-s[0]/2,y:-s[1]/2,width:s[0],height:s[1]});l.name=t,o.add(l)}var a=this;v_.superCall(this,"renderInner",t,e,n,i);var o=this._controllerGroup,s=e.get("pageIconSize",!0);_(s)||(s=[s,s]),r("pagePrev",0);var l=e.getModel("pageTextStyle");o.add(new dg({name:"pageText",style:{textFill:l.getTextColor(),font:l.getFont(),textVerticalAlign:"middle",textAlign:"center"},silent:!0})),r("pageNext",1)},layoutInner:function(t,e,n){var i=this.getContentGroup(),r=this._containerGroup,a=this._controllerGroup,o=t.getOrient().index,s=p_[o],l=p_[1-o],h=g_[1-o];rv(t.get("orient"),i,t.get("itemGap"),o?n.width:null,o?null:n.height),rv("horizontal",a,t.get("pageButtonItemGap",!0));var u=i.getBoundingRect(),c=a.getBoundingRect(),d=this._showController=u[s]>n[s],f=[-u.x,-u.y];f[o]=i.position[o];var p=[0,0],g=[-c.x,-c.y],v=k(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(d){var m=t.get("pageButtonPosition",!0);"end"===m?g[o]+=n[s]-c[s]:p[o]+=c[s]+v}g[1-o]+=u[l]/2-c[l]/2,i.attr("position",f),r.attr("position",p),a.attr("position",g);var y=this.group.getBoundingRect(),y={x:0,y:0};if(y[s]=d?n[s]:u[s],y[l]=Math.max(u[l],c[l]),y[h]=Math.min(0,c[h]+g[1-o]),r.__rectSize=n[s],d){var x={x:0,y:0};x[s]=Math.max(n[s]-c[s]-v,0),x[l]=y[l],r.setClipPath(new bg({shape:x})),r.__rectSize=x[s]}else a.eachChild(function(t){t.attr({invisible:!0,silent:!0})});var _=this._getPageInfo(t);return null!=_.pageIndex&&wa(i,{position:_.contentPosition},d?t:!1),this._updatePageInfoView(t,_),y},_pageGo:function(t,e,n){var i=this._getPageInfo(e)[t];null!=i&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:e.id})},_updatePageInfoView:function(t,e){var n=this._controllerGroup;f(["pagePrev","pageNext"],function(i){var r=null!=e[i+"DataIndex"],a=n.childOfName(i);a&&(a.setStyle("fill",r?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),a.cursor=r?"pointer":"default")});var i=n.childOfName("pageText"),r=t.get("pageFormatter"),a=e.pageIndex,o=null!=a?a+1:0,s=e.pageCount;i&&r&&i.setStyle("text",b(r)?r.replace("{current}",o).replace("{total}",s):r({current:o,total:s}))},_getPageInfo:function(t){function e(t){var e=t.getBoundingRect().clone();return e[f]+=t.position[u],e}var n,i,r,a,o=t.get("scrollDataIndex",!0),s=this.getContentGroup(),l=s.getBoundingRect(),h=this._containerGroup.__rectSize,u=t.getOrient().index,c=p_[u],d=p_[1-u],f=g_[u],p=s.position.slice();this._showController?s.eachChild(function(t){t.__legendDataIndex===o&&(a=t)}):a=s.childAt(0);var g=h?Math.ceil(l[c]/h):0;if(a){var v=a.getBoundingRect(),m=a.position[u]+v[f];p[u]=-m-l[f],n=Math.floor(g*(m+v[f]+h/2)/l[c]),n=l[c]&&g?Math.max(0,Math.min(g-1,n)):-1;var y={x:0,y:0};y[c]=h,y[d]=l[d],y[f]=-p[u]-l[f];var x,_=s.children();if(s.eachChild(function(t,n){var i=e(t);i.intersect(y)&&(null==x&&(x=n),r=t.__legendDataIndex),n===_.length-1&&i[f]+i[c]<=y[f]+y[c]&&(r=null)}),null!=x){var w=_[x],b=e(w);if(y[f]=b[f]+b[c]-y[c],0>=x&&b[f]>=y[f])i=null;else{for(;x>0&&e(_[x-1]).intersect(y);)x--;i=_[x].__legendDataIndex}}}return{contentPosition:p,pageIndex:n,pageCount:g,pagePrevDataIndex:i,pageNextDataIndex:r}}});bl("legendScroll","legendscroll",function(t,e){var n=t.scrollDataIndex;null!=n&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(t){t.setScrollDataIndex(n)})});var m_=function(t,e){var n,i=[],r=t.seriesIndex;if(null==r||!(n=e.getSeriesByIndex(r)))return{point:[]};var a=n.getData(),o=Fi(a,t);if(null==o||0>o||_(o))return{point:[]};var s=a.getItemGraphicEl(o),l=n.coordinateSystem;if(n.getTooltipPosition)i=n.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)i=l.dataToPoint(a.getValues(p(l.dimensions,function(t){return a.mapDimension(t)}),o,!0))||[];else if(s){var h=s.getBoundingRect().clone();h.applyTransform(s.transform),i=[h.x+h.width/2,h.y+h.height/2]}return{point:i,el:s}},y_=f,x_=x,__=Hi(),w_=function(t,e,n){var i=t.currTrigger,r=[t.x,t.y],a=t,o=t.dispatchAction||y(n.dispatchAction,n),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){dc(r)&&(r=m_({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},e).point);var l=dc(r),h=a.axesInfo,u=s.axesInfo,c="leave"===i||dc(r),d={},f={},p={list:[],map:{}},g={showPointer:x_(ac,f),showTooltip:x_(oc,p)};y_(s.coordSysMap,function(t,e){var n=l||t.containPoint(r);y_(s.coordSysAxesInfo[e],function(t){var e=t.axis,i=uc(h,t);if(!c&&n&&(!h||i)){var a=i&&i.value;null!=a||l||(a=e.pointToData(r)),null!=a&&ic(t,a,g,!1,d)}})});var v={};return y_(u,function(t,e){var n=t.linkGroup;n&&!f[e]&&y_(n.axesInfo,function(e,i){var r=f[i];if(e!==t&&r){var a=r.value;n.mapper&&(a=t.axis.scale.parse(n.mapper(a,cc(e),cc(t)))),v[t.key]=a}})}),y_(v,function(t,e){ic(u[e],t,g,!0,d)}),sc(f,u,d),lc(p,r,t,o),hc(u,o,n),d}},b_=(kl({type:"axisPointer",coordSysAxesInfo:null,defaultOption:{show:"auto",triggerOn:null,zlevel:0,z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#aaa",width:1,type:"solid"},shadowStyle:{color:"rgba(150,150,150,0.3)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,shadowBlur:3,shadowColor:"#aaa"},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}}}),Hi()),S_=f,M_=Al({type:"axisPointer",render:function(t,e,n){var i=e.getComponent("tooltip"),r=t.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";fc("axisPointer",n,function(t,e,n){"none"!==r&&("leave"===t||r.indexOf(t)>=0)&&n({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})})},remove:function(t,e){xc(e.getZr(),"axisPointer"),M_.superApply(this._model,"remove",arguments)},dispose:function(t,e){xc("axisPointer",e),M_.superApply(this._model,"dispose",arguments)}}),I_=Hi(),T_=i,C_=y;_c.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(t,e,n,i){var r=e.get("value"),a=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=n,i||this._lastValue!==r||this._lastStatus!==a){this._lastValue=r,this._lastStatus=a;var o=this._group,s=this._handle;if(!a||"hide"===a)return o&&o.hide(),void(s&&s.hide());o&&o.show(),s&&s.show();var l={};this.makeElOption(l,r,t,e,n);var h=l.graphicKey;h!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=h;var u=this._moveAnimation=this.determineAnimation(t,e);if(o){var c=x(wc,e,u);this.updatePointerEl(o,l,c,e),this.updateLabelEl(o,l,c,e)}else o=this._group=new Jd,this.createPointerEl(o,l,t,e),this.createLabelEl(o,l,t,e),n.getZr().add(o);Ic(o,e,!0),this._renderHandle(r)}},remove:function(t){this.clear(t)},dispose:function(t){this.clear(t)},determineAnimation:function(t,e){var n=e.get("animation"),i=t.axis,r="category"===i.type,a=e.get("snap");if(!a&&!r)return!1;if("auto"===n||null==n){var o=this.animationThreshold;if(r&&i.getBandWidth()>o)return!0;if(a){var s=Wu(t).seriesDataCount,l=i.getExtent();return Math.abs(l[0]-l[1])/s>o}return!1}return n===!0},makeElOption:function(){},createPointerEl:function(t,e){var n=e.pointer;if(n){var i=I_(t).pointerEl=new Rg[n.type](T_(e.pointer));t.add(i)}},createLabelEl:function(t,e,n,i){if(e.label){var r=I_(t).labelEl=new bg(T_(e.label));t.add(r),Sc(r,i)}},updatePointerEl:function(t,e,n){var i=I_(t).pointerEl;i&&(i.setStyle(e.pointer.style),n(i,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,n,i){var r=I_(t).labelEl;r&&(r.setStyle(e.label.style),n(r,{shape:e.label.shape,position:e.label.position}),Sc(r,i))},_renderHandle:function(t){if(!this._dragging&&this.updateHandleTransform){var e=this._axisPointerModel,n=this._api.getZr(),i=this._handle,r=e.getModel("handle"),a=e.get("status");if(!r.get("show")||!a||"hide"===a)return i&&n.remove(i),void(this._handle=null);var o;this._handle||(o=!0,i=this._handle=ka(r.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){Bf(t.event)},onmousedown:C_(this._onHandleDragMove,this,0,0),drift:C_(this._onHandleDragMove,this),ondragend:C_(this._onHandleDragEnd,this)}),n.add(i)),Ic(i,e,!1);var s=["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];i.setStyle(r.getItemStyle(null,s));var l=r.get("size");_(l)||(l=[l,l]),i.attr("scale",[l[0]/2,l[1]/2]),Ds(this,"_doDispatchAxisPointer",r.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,o)}},_moveHandleToValue:function(t,e){wc(this._axisPointerModel,!e&&this._moveAnimation,this._handle,Mc(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(Mc(n),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(Mc(i)),I_(n).lastProp=null,this._doDispatchAxisPointer()}},_doDispatchAxisPointer:function(){var t=this._handle;if(t){var e=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.componentIndex}]})}},_onHandleDragEnd:function(){this._dragging=!1;var t=this._handle;if(t){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},getHandleTransform:null,updateHandleTransform:null,clear:function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),n=this._group,i=this._handle;e&&n&&(this._lastGraphicKey=null,n&&e.remove(n),i&&e.remove(i),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(t,e,n){return n=n||0,{x:t[n],y:t[1-n],width:e[n],height:e[1-n]}}},_c.prototype.constructor=_c,Ui(_c);var D_=_c.extend({makeElOption:function(t,e,n,i,r){var a=n.axis,o=a.grid,s=i.get("type"),l=Bc(o,a).getOtherAxis(a).getGlobalExtent(),h=a.toGlobalCoord(a.dataToCoord(e,!0));if(s&&"none"!==s){var u=Tc(i),c=k_[s](a,h,l,u);c.style=u,t.graphicKey=c.type,t.pointer=c}var d=qu(o.model,n);Pc(e,t,d,n,i,r)},getHandleTransform:function(t,e,n){var i=qu(e.axis.grid.model,e,{labelInside:!1});return i.labelMargin=n.get("handle.margin"),{position:Ac(e.axis,t,i),rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,n){var i=n.axis,r=i.grid,a=i.getGlobalExtent(!0),o=Bc(r,i).getOtherAxis(i).getGlobalExtent(),s="x"===i.dim?0:1,l=t.position;l[s]+=e[s],l[s]=Math.min(a[1],l[s]),l[s]=Math.max(a[0],l[s]);var h=(o[1]+o[0])/2,u=[h,h];u[s]=l[s];var c=[{verticalAlign:"middle"},{align:"center"}];return{position:l,rotation:t.rotation,cursorPoint:u,tooltipOption:c[s]}}}),k_={line:function(t,e,n,i){var r=Lc([e,n[0]],[e,n[1]],Ec(t));return qr({shape:r,style:i}),{type:"Line",shape:r}},shadow:function(t,e,n){var i=t.getBandWidth(),r=n[1]-n[0];return{type:"Rect",shape:Oc([e-i/2,n[0]],[i,r],Ec(t))}}};$x.registerAxisPointerClass("CartesianAxisPointer",D_),xl(function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!_(e)&&(t.axisPointer.link=[e])}}),_l(Em.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=Eu(t,e)}),bl({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},w_),kl({type:"tooltip",dependencies:["axisPointer"],defaultOption:{zlevel:0,z:8,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",confine:!1,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"rgba(50,50,50,0.7)",borderColor:"#333",borderRadius:4,borderWidth:0,padding:5,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#fff",fontSize:14}}});var A_=f,P_=to,L_=["","-webkit-","-moz-","-o-"],O_="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;";Fc.prototype={constructor:Fc,_enterable:!0,update:function(){var t=this._container,e=t.currentStyle||document.defaultView.getComputedStyle(t),n=t.style;"absolute"!==n.position&&"absolute"!==e.position&&(n.position="relative")},show:function(t){clearTimeout(this._hideTimeout);var e=this.el;e.style.cssText=O_+Nc(t)+";left:"+this._x+"px;top:"+this._y+"px;"+(t.get("extraCssText")||""),e.style.display=e.innerHTML?"block":"none",this._show=!0},setContent:function(t){this.el.innerHTML=null==t?"":t},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el;return[t.clientWidth,t.clientHeight]},moveTo:function(t,e){var n,i=this._zr;i&&i.painter&&(n=i.painter.getViewportRootOffset())&&(t+=n.offsetLeft,e+=n.offsetTop);var r=this.el.style;r.left=t+"px",r.top=e+"px",this._x=t,this._y=e},hide:function(){this.el.style.display="none",this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(y(this.hide,this),t)):this.hide())},isShow:function(){return this._show}};var B_=y,E_=f,z_=Na,R_=new bg({shape:{x:-1,y:-1,width:2,height:2}});Al({type:"tooltip",init:function(t,e){if(!$c.node){var n=new Fc(e.getDom(),e);this._tooltipContent=n}},render:function(t,e,n){if(!$c.node&&!$c.wxa){this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=n,this._lastDataByCoordSys=null,this._alwaysShowContent=t.get("alwaysShowContent");var i=this._tooltipContent;i.update(),i.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow()}},_initGlobalListener:function(){var t=this._tooltipModel,e=t.get("triggerOn");fc("itemTooltip",this._api,B_(function(t,n,i){"none"!==e&&(e.indexOf(t)>=0?this._tryShow(n,i):"leave"===t&&this._hide(i))},this))},_keepShow:function(){var t=this._tooltipModel,e=this._ecModel,n=this._api;if(null!=this._lastX&&null!=this._lastY&&"none"!==t.get("triggerOn")){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){i.manuallyShowTip(t,e,n,{x:i._lastX,y:i._lastY})})}},manuallyShowTip:function(t,e,n,i){if(i.from!==this.uid&&!$c.node){var r=Gc(i,n);this._ticket="";var a=i.dataByCoordSys;if(i.tooltip&&null!=i.x&&null!=i.y){var o=R_;o.position=[i.x,i.y],o.update(),o.tooltip=i.tooltip,this._tryShow({offsetX:i.x,offsetY:i.y,target:o},r)}else if(a)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,event:{},dataByCoordSys:i.dataByCoordSys,tooltipOption:i.tooltipOption},r);else if(null!=i.seriesIndex){if(this._manuallyAxisShowTip(t,e,n,i))return;var s=m_(i,e),l=s.point[0],h=s.point[1];null!=l&&null!=h&&this._tryShow({offsetX:l,offsetY:h,position:i.position,target:s.el,event:{}},r)}else null!=i.x&&null!=i.y&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target,event:{}},r))}},manuallyHideTip:function(t,e,n,i){var r=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&r.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,i.from!==this.uid&&this._hide(Gc(i,n))},_manuallyAxisShowTip:function(t,e,n,i){var r=i.seriesIndex,a=i.dataIndex,o=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=r&&null!=a&&null!=o){var s=e.getSeriesByIndex(r);if(s){var l=s.getData(),t=Hc([l.getItemModel(a),s,(s.coordinateSystem||{}).model,t]);if("axis"===t.get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:r,dataIndex:a,position:i.position}),!0}}},_tryShow:function(t,e){var n=t.target,i=this._tooltipModel;if(i){this._lastX=t.offsetX,this._lastY=t.offsetY;var r=t.dataByCoordSys;r&&r.length?this._showAxisTooltip(r,t):n&&null!=n.dataIndex?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(t,n,e)):n&&n.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(t,n,e)):(this._lastDataByCoordSys=null,this._hide(e))}},_showOrMove:function(t,e){var n=t.get("showDelay");e=y(e,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(e,n):e()},_showAxisTooltip:function(t,e){var n=this._ecModel,i=this._tooltipModel,r=[e.offsetX,e.offsetY],a=[],o=[],s=Hc([e.tooltipOption,i]);E_(t,function(t){E_(t.dataByAxis,function(t){var e=n.getComponent(t.axisDim+"Axis",t.axisIndex),i=t.value,r=[];if(e&&null!=i){var s=kc(i,e.axis,n,t.seriesDataIndices,t.valueLabelOpt); | |
| 11 | +f(t.seriesDataIndices,function(a){var l=n.getSeriesByIndex(a.seriesIndex),h=a.dataIndexInside,u=l&&l.getDataParams(h);u.axisDim=t.axisDim,u.axisIndex=t.axisIndex,u.axisType=t.axisType,u.axisId=t.axisId,u.axisValue=Dh(e.axis,i),u.axisValueLabel=s,u&&(o.push(u),r.push(l.formatTooltip(h,!0)))});var l=s;a.push((l?eo(l)+"<br />":"")+r.join("<br />"))}})},this),a.reverse(),a=a.join("<br /><br />");var l=e.position;this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(s,l,r[0],r[1],this._tooltipContent,o):this._showTooltipContent(s,a,o,Math.random(),r[0],r[1],l)})},_showSeriesItemTooltip:function(t,e,n){var i=this._ecModel,r=e.seriesIndex,a=i.getSeriesByIndex(r),o=e.dataModel||a,s=e.dataIndex,l=e.dataType,h=o.getData(),u=Hc([h.getItemModel(s),o,a&&(a.coordinateSystem||{}).model,this._tooltipModel]),c=u.get("trigger");if(null==c||"item"===c){var d=o.getDataParams(s,l),f=o.formatTooltip(s,!1,l),p="item_"+o.name+"_"+s;this._showOrMove(u,function(){this._showTooltipContent(u,f,d,p,t.offsetX,t.offsetY,t.position,t.target)}),n({type:"showTip",dataIndexInside:s,dataIndex:h.getRawIndex(s),seriesIndex:r,from:this.uid})}},_showComponentItemTooltip:function(t,e,n){var i=e.tooltip;if("string"==typeof i){var r=i;i={content:r,formatter:r}}var a=new Aa(i,this._tooltipModel,this._ecModel),o=a.get("content"),s=Math.random();this._showOrMove(a,function(){this._showTooltipContent(a,o,a.get("formatterParams")||{},s,t.offsetX,t.offsetY,t.position,e)}),n({type:"showTip",from:this.uid})},_showTooltipContent:function(t,e,n,i,r,a,o,s){if(this._ticket="",t.get("showContent")&&t.get("show")){var l=this._tooltipContent,h=t.get("formatter");o=o||t.get("position");var u=e;if(h&&"string"==typeof h)u=no(h,n,!0);else if("function"==typeof h){var c=B_(function(e,i){e===this._ticket&&(l.setContent(i),this._updatePosition(t,o,r,a,l,n,s))},this);this._ticket=i,u=h(n,i,c)}l.setContent(u),l.show(t),this._updatePosition(t,o,r,a,l,n,s)}},_updatePosition:function(t,e,n,i,r,a,o){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var h=r.getSize(),u=t.get("align"),c=t.get("verticalAlign"),d=o&&o.getBoundingRect().clone();if(o&&d.applyTransform(o.transform),"function"==typeof e&&(e=e([n,i],a,r.el,d,{viewSize:[s,l],contentSize:h.slice()})),_(e))n=z_(e[0],s),i=z_(e[1],l);else if(S(e)){e.width=h[0],e.height=h[1];var f=ho(e,{width:s,height:l});n=f.x,i=f.y,u=null,c=null}else if("string"==typeof e&&o){var p=jc(e,d,h);n=p[0],i=p[1]}else{var p=Wc(n,i,r.el,s,l,u?null:20,c?null:20);n=p[0],i=p[1]}if(u&&(n-=Yc(u)?h[0]/2:"right"===u?h[0]:0),c&&(i-=Yc(c)?h[1]/2:"bottom"===c?h[1]:0),t.get("confine")){var p=Vc(n,i,r.el,s,l);n=p[0],i=p[1]}r.moveTo(n,i)},_updateContentNotChangedOnAxis:function(t){var e=this._lastDataByCoordSys,n=!!e&&e.length===t.length;return n&&E_(e,function(e,i){var r=e.dataByAxis||{},a=t[i]||{},o=a.dataByAxis||[];n&=r.length===o.length,n&&E_(r,function(t,e){var i=o[e]||{},r=t.seriesDataIndices||[],a=i.seriesDataIndices||[];n&=t.value===i.value&&t.axisType===i.axisType&&t.axisId===i.axisId&&r.length===a.length,n&&E_(r,function(t,e){var i=a[e];n&=t.seriesIndex===i.seriesIndex&&t.dataIndex===i.dataIndex})})}),this._lastDataByCoordSys=t,!!n},_hide:function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},dispose:function(t,e){$c.node||(this._tooltipContent.hide(),xc("itemTooltip",e))}}),bl({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},function(){}),bl({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},function(){}),t.version=Im,t.dependencies=Tm,t.PRIORITY=Em,t.init=dl,t.connect=fl,t.disConnect=pl,t.disconnect=ny,t.dispose=gl,t.getInstanceByDom=vl,t.getInstanceById=ml,t.registerTheme=yl,t.registerPreprocessor=xl,t.registerProcessor=_l,t.registerPostUpdate=wl,t.registerAction=bl,t.registerCoordinateSystem=Sl,t.getCoordinateSystemDimensions=Ml,t.registerLayout=Il,t.registerVisual=Tl,t.registerLoading=Dl,t.extendComponentModel=kl,t.extendComponentView=Al,t.extendSeriesModel=Pl,t.extendChartView=Ll,t.setCanvasCreator=Ol,t.registerMap=Bl,t.getMap=El,t.dataTool=iy,t.zrender=$f,t.graphic=Rg,t.number=qg,t.format=tv,t.throttle=Cs,t.helper=Jy,t.matrix=Sd,t.vector=vd,t.color=Hd,t.parseGeoJSON=ex,t.parseGeoJson=ax,t.util=ox,t.List=fy,t.Model=Aa,t.Axis=rx,t.env=$c}); | |
| 0 | 12 | \ No newline at end of file | ... | ... |
src/main/resources/static/index.html
| ... | ... | @@ -8,6 +8,7 @@ |
| 8 | 8 | <link href="/assets/uikit-3.0.0/css/uikit.min.css" rel="stylesheet" type="text/css"/> |
| 9 | 9 | <link href="/assets/css/main.css" rel="stylesheet" type="text/css"/> |
| 10 | 10 | <link href="/assets/css/abnormal_monitor.css" rel="stylesheet" type="text/css"/> |
| 11 | + <link href="/assets/css/system_manager.css" rel="stylesheet" type="text/css"/> | |
| 11 | 12 | <link href="/assets/css/ct_autocompleter.css" rel="stylesheet" type="text/css"/> |
| 12 | 13 | <link href="/assets/selectize/css/selectize.default.css" rel="stylesheet" type="text/css"/> |
| 13 | 14 | <link href="/assets/plugins/simplePagination/simplePagination.css" rel="stylesheet" type="text/css"/> |
| ... | ... | @@ -34,7 +35,7 @@ |
| 34 | 35 | <span class="ct-btn-link" data-name="attendance_data" data-page="/pages/attendance/att_data_main.html">签到/退</span> |
| 35 | 36 | <span class="ct-btn-link">计划/任务</span> |
| 36 | 37 | <span class="ct-btn-link" data-name="basic_data" data-page="/pages/basic_data/main.html">基础数据</span> |
| 37 | - <span class="ct-btn-link">系统管理</span> | |
| 38 | + <span class="ct-btn-link" data-name="system_manager" data-page="/pages/system_manager/sm_main.html">系统管理</span> | |
| 38 | 39 | |
| 39 | 40 | <span class="ct-user-info"> |
| 40 | 41 | <i uk-icon="icon: user;"></i> admin,在线 |
| ... | ... | @@ -45,8 +46,11 @@ |
| 45 | 46 | <div class="ct-cont-body"></div> |
| 46 | 47 | </div> |
| 47 | 48 | |
| 49 | +<script src="/assets/plugins/d3/d3.min.js" ></script> | |
| 50 | +<script src="/assets/plugins/d3/radialprogress/vizuly_core.min.js" ></script> | |
| 51 | +<script src="/assets/plugins/d3/radialprogress/vizuly_radialprogress.min.js" ></script> | |
| 48 | 52 | <!-- simple pinyin --> |
| 49 | -<script src="/assets/plugins/pinyin.js" merge="plugins"></script> | |
| 53 | +<script src="/assets/plugins/pinyin.js" ></script> | |
| 50 | 54 | <script src="/assets/plugins/eventproxy.js"></script> |
| 51 | 55 | <script src="/assets/plugins/jquery.min.js"></script> |
| 52 | 56 | <script src="/assets/uikit-3.0.0/js/uikit.min.js"></script> |
| ... | ... | @@ -86,5 +90,6 @@ |
| 86 | 90 | <script src="/pages/abnormal/js/o_s_abnormal.js"></script> |
| 87 | 91 | <script src="/pages/abnormal/js/o_s_basic_data.js"></script> |
| 88 | 92 | <script src="/pages/abnormal/js/o_s_websocket.js"></script> |
| 93 | +<script src="/pages/abnormal/js/o_s_charts.js"></script> | |
| 89 | 94 | </body> |
| 90 | 95 | </html> |
| 91 | 96 | \ No newline at end of file | ... | ... |
src/main/resources/static/js/common.js
| ... | ... | @@ -215,6 +215,46 @@ var gb_common = (function () { |
| 215 | 215 | return rs; |
| 216 | 216 | }; |
| 217 | 217 | |
| 218 | + /** | |
| 219 | + * 构建公司到 ——> 分公司级联下拉框 (带总公司) | |
| 220 | + * @param comSelect | |
| 221 | + * @param fgsSelect | |
| 222 | + */ | |
| 223 | + var companySelect2 = function (comSelect, fgsSelect) { | |
| 224 | + //公司切换,级联分公司 | |
| 225 | + comSelect.on('change', function () { | |
| 226 | + var c = $(this).val(); | |
| 227 | + var opts; | |
| 228 | + if(!c){ | |
| 229 | + fgsSelect.empty().attr('disabled', 'disabled'); | |
| 230 | + return; | |
| 231 | + } | |
| 232 | + else if('88' != c){ | |
| 233 | + var fgss = company_json[c].fgs; | |
| 234 | + opts='<option value="">请选择...</option>'; | |
| 235 | + | |
| 236 | + for(var f in fgss){ | |
| 237 | + opts += '<option value="'+f+'">'+fgss[f]+'</option>'; | |
| 238 | + } | |
| 239 | + | |
| 240 | + fgsSelect.removeAttr('disabled'); | |
| 241 | + } | |
| 242 | + else{ | |
| 243 | + fgsSelect.empty().attr('disabled', 'disabled'); | |
| 244 | + } | |
| 245 | + | |
| 246 | + fgsSelect.html(opts).removeAttr('disabled').trigger('change'); | |
| 247 | + }); | |
| 248 | + | |
| 249 | + var opts = ''; | |
| 250 | + for(var c in company_json){ | |
| 251 | + opts += '<option value="'+c+'">'+company_json[c].name+'</option>' | |
| 252 | + } | |
| 253 | + | |
| 254 | + opts+='<option value="88">总公司</option>'; | |
| 255 | + comSelect.html(opts).trigger('change'); | |
| 256 | + }; | |
| 257 | + | |
| 218 | 258 | var companySelect = function (comSelect, fgsSelect, lineSelect) { |
| 219 | 259 | //线路 selectize |
| 220 | 260 | lineSelect.selectize({ |
| ... | ... | @@ -430,6 +470,7 @@ var gb_common = (function () { |
| 430 | 470 | next_elem: next_elem, |
| 431 | 471 | getDisabledVal: getDisabledVal, |
| 432 | 472 | companySelect: companySelect, |
| 473 | + companySelect2: companySelect2, | |
| 433 | 474 | open_modal: open_modal, |
| 434 | 475 | open_modal_2: open_modal_2, |
| 435 | 476 | open_modal_3: open_modal_3, | ... | ... |
src/main/resources/static/js/main.js
src/main/resources/static/pages/abnormal/fragments/m_tzrc.html
| ... | ... | @@ -29,7 +29,9 @@ |
| 29 | 29 | <div class="sch_list_table_wrap"> |
| 30 | 30 | <table class="uk-table uk-table-small uk-table-divider sch_list_table tab_wid_1" style="margin-bottom: 25px;"> |
| 31 | 31 | <tr> |
| 32 | - <td><div uk-spinner></div></td> | |
| 32 | + <td> | |
| 33 | + <div uk-spinner></div> | |
| 34 | + </td> | |
| 33 | 35 | </tr> |
| 34 | 36 | </table> |
| 35 | 37 | </div> |
| ... | ... | @@ -76,8 +78,8 @@ |
| 76 | 78 | (function () { |
| 77 | 79 | |
| 78 | 80 | var wrap = '.modal_cont_tzrc_wrap', modalId, inoutSch |
| 79 | - ,storage = window.localStorage | |
| 80 | - ,_lineCode, _lpName; | |
| 81 | + , storage = window.localStorage | |
| 82 | + , _lineCode, _lpName; | |
| 81 | 83 | |
| 82 | 84 | $(wrap).on('init', function (e, data) { |
| 83 | 85 | e.stopPropagation(); |
| ... | ... | @@ -88,7 +90,7 @@ |
| 88 | 90 | inoutSch = {id: data.id}; |
| 89 | 91 | //初始化下拉框数据 |
| 90 | 92 | initSelect(); |
| 91 | - if(_lpName) | |
| 93 | + if (_lpName) | |
| 92 | 94 | $('form [name=lpName]', wrap).val(_lpName).trigger('change'); |
| 93 | 95 | |
| 94 | 96 | //自动补全 |
| ... | ... | @@ -101,36 +103,36 @@ |
| 101 | 103 | //提交 |
| 102 | 104 | $(modalId).on('click', '.submit-btn', _submit); |
| 103 | 105 | }); |
| 104 | - | |
| 106 | + | |
| 105 | 107 | var reset = function () { |
| 106 | 108 | $('.sch_list_table', wrap).empty().html('<tr><td><div uk-spinner></div></td> </tr>'); |
| 107 | 109 | }; |
| 108 | 110 | |
| 109 | - var _initFlag=1; | |
| 111 | + var _initFlag = 1; | |
| 110 | 112 | var renderTableList = function () { |
| 111 | 113 | reset(); |
| 112 | 114 | var lineCode = $('form [name=line]', wrap).val() |
| 113 | - ,lpName = $('form [name=lpName]', wrap).val(); | |
| 115 | + , lpName = $('form [name=lpName]', wrap).val(); | |
| 114 | 116 | //加载集调班次信息 |
| 115 | - gb_common.$get('/in_out/findSchByLpName', {lineCode: lineCode, lpName: lpName},function (rs) { | |
| 117 | + gb_common.$get('/in_out/findSchByLpName', {lineCode: lineCode, lpName: lpName}, function (rs) { | |
| 116 | 118 | //console.log('rsrs', rs); |
| 117 | 119 | var htmlStr = template('jd_schedule_list_table-temp', {list: rs.list, tcc_code: current_tcc_code}); |
| 118 | 120 | $('.sch_list_table', wrap).html(htmlStr); |
| 119 | 121 | //滚动条 |
| 120 | 122 | $('.sch_list_table_wrap', wrap).perfectScrollbar({suppressScrollX: true}); |
| 121 | 123 | |
| 122 | - if(_initFlag){ | |
| 124 | + if (_initFlag) { | |
| 123 | 125 | //将当前出场班次之前的班次都禁选 |
| 124 | 126 | var trs = $('.sch_list_table tr', wrap); |
| 125 | - for(var i=0,row;row=trs[i++];){ | |
| 126 | - if($(row).data('id')==inoutSch.id) | |
| 127 | + for (var i = 0, row; row = trs[i++];) { | |
| 128 | + if ($(row).data('id') == inoutSch.id) | |
| 127 | 129 | break; |
| 128 | 130 | $(row).addClass('disabled') |
| 129 | 131 | .find('input[type=checkbox]') |
| 130 | - .attr('disabled','disabled'); | |
| 132 | + .attr('disabled', 'disabled'); | |
| 131 | 133 | } |
| 132 | 134 | //选中当前出场班次 |
| 133 | - var dl = $('.sch_list_table tr[data-id="'+inoutSch.id+'"]', wrap).trigger('click'); | |
| 135 | + var dl = $('.sch_list_table tr[data-id="' + inoutSch.id + '"]', wrap).trigger('click'); | |
| 134 | 136 | |
| 135 | 137 | //滚动到可视区域 |
| 136 | 138 | var cont = $('.sch_list_table_wrap', wrap); |
| ... | ... | @@ -148,25 +150,25 @@ |
| 148 | 150 | all = gb_o_s_basic_data.findAllLine(); |
| 149 | 151 | |
| 150 | 152 | var opts = ''; |
| 151 | - for(var i=0,line;line=all[i++];){ | |
| 152 | - if(codeArray.indexOf(line.lineCode)==-1) | |
| 153 | + for (var i = 0, line; line = all[i++];) { | |
| 154 | + if (codeArray.indexOf(line.lineCode) == -1) | |
| 153 | 155 | continue; |
| 154 | - opts += '<option value="'+line.lineCode+'">'+line.name+'</option>'; | |
| 156 | + opts += '<option value="' + line.lineCode + '">' + line.name + '</option>'; | |
| 155 | 157 | } |
| 156 | 158 | $('[name=line]', f).html(opts).val(_lineCode).trigger('change'); |
| 157 | 159 | }; |
| 158 | 160 | |
| 159 | 161 | //渲染路牌下拉框 |
| 160 | 162 | var renderLpSelect = function () { |
| 161 | - var opts=''; | |
| 163 | + var opts = ''; | |
| 162 | 164 | var array = gb_os_card.findLps($('form [name=line]', wrap).val()); |
| 163 | 165 | |
| 164 | - for(var i=0,lp;lp=array[i++];){ | |
| 165 | - opts += '<option>'+lp+'</option>'; | |
| 166 | + for (var i = 0, lp; lp = array[i++];) { | |
| 167 | + opts += '<option>' + lp + '</option>'; | |
| 166 | 168 | } |
| 167 | 169 | $('form [name=lpName]', wrap).html(opts); |
| 168 | 170 | |
| 169 | - if(!_initFlag) | |
| 171 | + if (!_initFlag) | |
| 170 | 172 | $('form [name=lpName]', wrap).trigger('change'); |
| 171 | 173 | }; |
| 172 | 174 | |
| ... | ... | @@ -179,14 +181,14 @@ |
| 179 | 181 | * row 点击选中 |
| 180 | 182 | */ |
| 181 | 183 | $(wrap).on('click', '.sch_list_table tr', function () { |
| 182 | - if($(this).hasClass('disabled')) | |
| 184 | + if ($(this).hasClass('disabled')) | |
| 183 | 185 | return; |
| 184 | 186 | var cbox = $('input[type=checkbox]', this)[0]; |
| 185 | - if($(this).hasClass('active')){ | |
| 187 | + if ($(this).hasClass('active')) { | |
| 186 | 188 | $(this).removeClass('active'); |
| 187 | 189 | cbox.checked = false; |
| 188 | 190 | } |
| 189 | - else{ | |
| 191 | + else { | |
| 190 | 192 | $(this).addClass('active'); |
| 191 | 193 | cbox.checked = true; |
| 192 | 194 | |
| ... | ... | @@ -203,13 +205,13 @@ |
| 203 | 205 | |
| 204 | 206 | var trs = $('.sch_list_table tr', wrap); |
| 205 | 207 | var cbox; |
| 206 | - for(var i=0,row;row=trs[i++];){ | |
| 207 | - if($(row).hasClass('disabled')) | |
| 208 | + for (var i = 0, row; row = trs[i++];) { | |
| 209 | + if ($(row).hasClass('disabled')) | |
| 208 | 210 | continue; |
| 209 | 211 | |
| 210 | 212 | cbox = $('input[type=checkbox]', row)[0]; |
| 211 | 213 | |
| 212 | - if(this.checked) | |
| 214 | + if (this.checked) | |
| 213 | 215 | $(row).addClass('active'); |
| 214 | 216 | else |
| 215 | 217 | $(row).removeClass('active'); |
| ... | ... | @@ -219,7 +221,7 @@ |
| 219 | 221 | |
| 220 | 222 | $('.tzrc_form_card input[type=checkbox]', wrap).on('click', function () { |
| 221 | 223 | var $input = $(this).prev(); |
| 222 | - if(this.checked) | |
| 224 | + if (this.checked) | |
| 223 | 225 | $input.removeAttr('disabled'); |
| 224 | 226 | else |
| 225 | 227 | $input.attr('disabled', 'disabled'); |
| ... | ... | @@ -228,7 +230,7 @@ |
| 228 | 230 | //switch_c_box |
| 229 | 231 | $('.switch_c_box', wrap).on('click', function () { |
| 230 | 232 | var input = $(this).parent().find('input[type=text]'); |
| 231 | - if(this.checked) | |
| 233 | + if (this.checked) | |
| 232 | 234 | input.removeAttr('disabled'); |
| 233 | 235 | else |
| 234 | 236 | input.attr('disabled', 'disabled'); |
| ... | ... | @@ -241,13 +243,13 @@ |
| 241 | 243 | var f = $('form', modalId); |
| 242 | 244 | var fData = f.serializeJSON(); |
| 243 | 245 | |
| 244 | - if(!fData['nbbm'] && !$('[name=nbbm]', f).attr('disabled')){ | |
| 246 | + if (!fData['nbbm'] && !$('[name=nbbm]', f).attr('disabled')) { | |
| 245 | 247 | _shake_elem($('[name=nbbm]', f)); |
| 246 | 248 | return UIkit.notification('车辆不能为空!', 'danger'); |
| 247 | 249 | } |
| 248 | 250 | |
| 249 | - if(!fData['jsy'] && !$('[name=jsy]', f).attr('disabled')){ | |
| 250 | - _shake_elem($('[name=nbbm]', f)); | |
| 251 | + if (!fData['jsy'] && !$('[name=jsy]', f).attr('disabled')) { | |
| 252 | + _shake_elem($('[name=jsy]', f)); | |
| 251 | 253 | return UIkit.notification('驾驶员不能为空!', 'danger'); |
| 252 | 254 | } |
| 253 | 255 | |
| ... | ... | @@ -256,7 +258,6 @@ |
| 256 | 258 | return UIkit.notification('请选中要调整的班次!', 'danger'); |
| 257 | 259 | |
| 258 | 260 | |
| 259 | - console.log('fDatafData', fData); | |
| 260 | 261 | var data = []; |
| 261 | 262 | var schId; |
| 262 | 263 | $.each(checkeds, function () { |
| ... | ... | @@ -269,13 +270,22 @@ |
| 269 | 270 | }); |
| 270 | 271 | }); |
| 271 | 272 | |
| 272 | - console.log('data', data); | |
| 273 | - gb_common.$post('/in_out/tzrc', {cpcsJson: JSON.stringify(data)}, function (rs) { | |
| 274 | - console.log('rsrsrs', rs); | |
| 275 | - | |
| 276 | - UIkit.notification('操作成功!', 'success'); | |
| 277 | - gb_os_card.update(rs.list); | |
| 278 | - UIkit.modal(modalId).hide(); | |
| 273 | + $('.submit-btn', modalId).attr('disabled', 'disabled'); | |
| 274 | + //先校验一下操作有效性 | |
| 275 | + gb_common.$post('/in_out/tzrc_check', fData, function (rs) { | |
| 276 | + if (rs['cStatus'] && rs['cStatus'] == -2) { | |
| 277 | + toastr.error(rs['msg'], '校验失败', toast_top_center_opts); | |
| 278 | + $('.submit-btn', modalId).removeAttr('disabled'); | |
| 279 | + } | |
| 280 | + else { | |
| 281 | + gb_common.$post('/in_out/tzrc', {cpcsJson: JSON.stringify(data)}, function (rs) { | |
| 282 | + console.log('rsrsrs', rs); | |
| 283 | + | |
| 284 | + UIkit.notification('操作成功!', 'success'); | |
| 285 | + gb_os_card.update(rs.list); | |
| 286 | + UIkit.modal(modalId).hide(); | |
| 287 | + }); | |
| 288 | + } | |
| 279 | 289 | }); |
| 280 | 290 | } |
| 281 | 291 | ... | ... |
src/main/resources/static/pages/abnormal/fragments/type_0/h_cont_hrcc.html
| ... | ... | @@ -227,7 +227,7 @@ |
| 227 | 227 | } |
| 228 | 228 | |
| 229 | 229 | if(!fData['jsy'] && !$('[name=jsy]', f).attr('disabled')){ |
| 230 | - _shake_elem($('[name=nbbm]', f)); | |
| 230 | + _shake_elem($('[name=jsy]', f)); | |
| 231 | 231 | return UIkit.notification('驾驶员不能为空!', 'danger'); |
| 232 | 232 | } |
| 233 | 233 | |
| ... | ... | @@ -236,7 +236,6 @@ |
| 236 | 236 | return UIkit.notification('请选中要调整的班次!', 'danger'); |
| 237 | 237 | |
| 238 | 238 | |
| 239 | - console.log('fDatafData', fData); | |
| 240 | 239 | var data = []; |
| 241 | 240 | var schId; |
| 242 | 241 | $.each(checkeds, function () { |
| ... | ... | @@ -249,11 +248,23 @@ |
| 249 | 248 | }); |
| 250 | 249 | }); |
| 251 | 250 | |
| 252 | - gb_common.$post('/in_out/tzrc', {cpcsJson: JSON.stringify(data)}, function (rs) { | |
| 253 | - | |
| 254 | - UIkit.notification('操作成功!', 'success'); | |
| 255 | - gb_os_card.update(rs.list); | |
| 256 | - UIkit.modal(modalId).hide(); | |
| 251 | + $('.submit-btn', modalId).attr('disabled', 'disabled'); | |
| 252 | + //先校验一下操作有效性 | |
| 253 | + fData.line = ae.lineCode; | |
| 254 | + gb_common.$post('/in_out/tzrc_check', fData, function (rs) { | |
| 255 | + if (rs['cStatus'] && rs['cStatus'] == -2) { | |
| 256 | + toastr.error(rs['msg'], '校验失败', toast_top_center_opts); | |
| 257 | + $('.submit-btn', modalId).removeAttr('disabled'); | |
| 258 | + } | |
| 259 | + else { | |
| 260 | + gb_common.$post('/in_out/tzrc', {cpcsJson: JSON.stringify(data)}, function (rs) { | |
| 261 | + console.log('rsrsrs', rs); | |
| 262 | + | |
| 263 | + UIkit.notification('操作成功!', 'success'); | |
| 264 | + gb_os_card.update(rs.list); | |
| 265 | + UIkit.modal(modalId).hide(); | |
| 266 | + }); | |
| 267 | + } | |
| 257 | 268 | }); |
| 258 | 269 | } |
| 259 | 270 | ... | ... |
src/main/resources/static/pages/abnormal/fragments/type_1/h_cont_hccc.html
| 1 | 1 | <div class="handler_cont_hccc_wrap tzrc_table_wrap"> |
| 2 | + | |
| 3 | + <div class="uk-alert-danger disabled_alter" style="display: none;" uk-alert> | |
| 4 | + <a class="uk-alert-close" uk-close></a> | |
| 5 | + <p><i uk-icon="info"></i> 集调班次显示该车辆已出场,你不能再对人车进行调整。</p> | |
| 6 | + </div> | |
| 7 | + | |
| 2 | 8 | <table class="uk-table uk-table-small uk-table-divider curr_out_plan_table"> |
| 3 | 9 | <thead> |
| 4 | 10 | <tr> |
| ... | ... | @@ -83,7 +89,7 @@ |
| 83 | 89 | <script> |
| 84 | 90 | (function () { |
| 85 | 91 | |
| 86 | - var wrap = '.handler_cont_hccc_wrap', ae, inoutSch; | |
| 92 | + var wrap = '.handler_cont_hccc_wrap', ae, inoutSch, modalId; | |
| 87 | 93 | |
| 88 | 94 | |
| 89 | 95 | $(wrap).on('init', function (e, data) { |
| ... | ... | @@ -92,6 +98,7 @@ |
| 92 | 98 | return; |
| 93 | 99 | |
| 94 | 100 | ae = data.ae; |
| 101 | + modalId = data.modalId | |
| 95 | 102 | |
| 96 | 103 | inoutSch = gb_os_card.findByLineCode(ae.lineCode)[ae.schId]; |
| 97 | 104 | $('.curr_out_plan_table>tbody', wrap).html(template('a_h_hccc_out_tbody-temp', {obj: inoutSch})); |
| ... | ... | @@ -105,6 +112,21 @@ |
| 105 | 112 | ct_autocompleter.initBus($('#nbbmAutoCompleter', wrap)); |
| 106 | 113 | |
| 107 | 114 | $(this).attr('data-init', 1); |
| 115 | + | |
| 116 | + //是否禁用 | |
| 117 | + if(inoutSch.status > 0){ | |
| 118 | + $('.disabled_alter', wrap).show(); | |
| 119 | + $('.tzrc_form_card>form input', wrap) | |
| 120 | + .attr('disabled', 'disabled') | |
| 121 | + .each(function () { | |
| 122 | + this.checked=false; | |
| 123 | + }); | |
| 124 | + $('.submit-btn',wrap).attr('disabled', 'disabled'); | |
| 125 | + } | |
| 126 | + else{ | |
| 127 | + //提交 | |
| 128 | + $(modalId).on('click', '.submit-btn', _submit); | |
| 129 | + } | |
| 108 | 130 | }); |
| 109 | 131 | |
| 110 | 132 | var readerScheduleList = function (rs) { |
| ... | ... | @@ -190,6 +212,66 @@ |
| 190 | 212 | else |
| 191 | 213 | input.attr('disabled', 'disabled'); |
| 192 | 214 | }); |
| 215 | + | |
| 216 | + /* | |
| 217 | + * 提交 | |
| 218 | + */ | |
| 219 | + function _submit() { | |
| 220 | + var f = $('form', modalId); | |
| 221 | + var fData = f.serializeJSON(); | |
| 222 | + | |
| 223 | + if(!fData['nbbm'] && !$('[name=nbbm]', f).attr('disabled')){ | |
| 224 | + _shake_elem($('[name=nbbm]', f)); | |
| 225 | + return UIkit.notification('车辆不能为空!', 'danger'); | |
| 226 | + } | |
| 227 | + | |
| 228 | + if(!fData['jsy'] && !$('[name=jsy]', f).attr('disabled')){ | |
| 229 | + _shake_elem($('[name=jsy]', f)); | |
| 230 | + return UIkit.notification('驾驶员不能为空!', 'danger'); | |
| 231 | + } | |
| 232 | + | |
| 233 | + var checkeds = $('.sch_list_table>tr.active', modalId); | |
| 234 | + if (checkeds.length == 0) | |
| 235 | + return UIkit.notification('请选中要调整的班次!', 'danger'); | |
| 236 | + | |
| 237 | + | |
| 238 | + var data = []; | |
| 239 | + var schId; | |
| 240 | + $.each(checkeds, function () { | |
| 241 | + schId = $(this).data('id'); | |
| 242 | + data.push({ | |
| 243 | + schId: schId, | |
| 244 | + jsy: fData.jsy, | |
| 245 | + spy: fData.spy, | |
| 246 | + clZbh: fData.nbbm | |
| 247 | + }); | |
| 248 | + }); | |
| 249 | + | |
| 250 | + $('.submit-btn', modalId).attr('disabled', 'disabled'); | |
| 251 | + //先校验一下操作有效性 | |
| 252 | + fData.line = ae.lineCode; | |
| 253 | + gb_common.$post('/in_out/tzrc_check', fData, function (rs) { | |
| 254 | + if (rs['cStatus'] && rs['cStatus'] == -2) { | |
| 255 | + toastr.error(rs['msg'], '校验失败', toast_top_center_opts); | |
| 256 | + $('.submit-btn', modalId).removeAttr('disabled'); | |
| 257 | + } | |
| 258 | + else { | |
| 259 | + gb_common.$post('/in_out/tzrc', {cpcsJson: JSON.stringify(data)}, function (rs) { | |
| 260 | + console.log('rsrsrs', rs); | |
| 261 | + | |
| 262 | + UIkit.notification('操作成功!', 'success'); | |
| 263 | + gb_os_card.update(rs.list); | |
| 264 | + UIkit.modal(modalId).hide(); | |
| 265 | + }); | |
| 266 | + } | |
| 267 | + }); | |
| 268 | + } | |
| 269 | + | |
| 270 | + function _shake_elem($e) { | |
| 271 | + $e.addClass('uk-animation-shake').one('animationend', function () { | |
| 272 | + $(this).removeClass('uk-animation-shake'); | |
| 273 | + }); | |
| 274 | + } | |
| 193 | 275 | })(); |
| 194 | 276 | </script> |
| 195 | 277 | </div> |
| 196 | 278 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/abnormal/js/o_s_abnormal.js
| ... | ... | @@ -16,14 +16,17 @@ var gb_o_s_abnormal = (function () { |
| 16 | 16 | var list = rs.list.sort(function (a, b) { |
| 17 | 17 | return a['planTime'] - b['planTime']; |
| 18 | 18 | }); |
| 19 | - for(var i=0,obj;obj=list[i++];){ | |
| 19 | + for (var i = 0, obj; obj = list[i++];) { | |
| 20 | 20 | obj.lineName = gb_o_s_basic_data.findLineNameByCode(obj.lineCode); |
| 21 | - _data[obj['schId']+'_'+obj['type']]=obj; | |
| 21 | + _data[obj['schId'] + '_' + obj['type']] = obj; | |
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | //渲染 |
| 25 | 25 | var htmlStr = template('abnormal_card_list-temp', {list: list}); |
| 26 | 26 | $(wrap).html(htmlStr); |
| 27 | + | |
| 28 | + renderErrorLinePanel(); | |
| 29 | + gb_o_s_charts.init();//底部图表 | |
| 27 | 30 | cb && cb(); |
| 28 | 31 | }); |
| 29 | 32 | }; |
| ... | ... | @@ -35,12 +38,12 @@ var gb_o_s_abnormal = (function () { |
| 35 | 38 | var key = $(this).data('key'), |
| 36 | 39 | ae = gb_o_s_abnormal.get(key); |
| 37 | 40 | |
| 38 | - var type = $(this).data('type'),_title; | |
| 39 | - if(type==0) | |
| 41 | + var type = $(this).data('type'), _title; | |
| 42 | + if (type == 0) | |
| 40 | 43 | _title = '未签到 '; |
| 41 | - else if(type==1) | |
| 44 | + else if (type == 1) | |
| 42 | 45 | _title = '未出场 '; |
| 43 | - gb_common.open_modal_default('/pages/abnormal/fragments/type_'+type+'/abnormal_handler.html', _title + '('+ ae.lineName + '、'+ae.lpName + ')' , {key:key}, 700); | |
| 46 | + gb_common.open_modal_default('/pages/abnormal/fragments/type_' + type + '/abnormal_handler.html', _title + '(' + ae.lineName + '、' + ae.lpName + ')', {key: key}, 700); | |
| 44 | 47 | }); |
| 45 | 48 | |
| 46 | 49 | var getByKey = function (key) { |
| ... | ... | @@ -51,23 +54,48 @@ var gb_o_s_abnormal = (function () { |
| 51 | 54 | if (!isArray(array)) |
| 52 | 55 | array = [array]; |
| 53 | 56 | |
| 54 | - if(!array || array.length==0) | |
| 57 | + if (!array || array.length == 0) | |
| 55 | 58 | return; |
| 56 | 59 | |
| 57 | 60 | var elem, key; |
| 58 | - for(var i=0,ae;ae=array[i++];){ | |
| 61 | + for (var i = 0, ae; ae = array[i++];) { | |
| 59 | 62 | key = ae.schId + '_' + ae.type; |
| 60 | - elem = $('.uk-card-body[data-id='+key+']', wrap); | |
| 63 | + elem = $('.uk-card-body[data-id=' + key + ']', wrap); | |
| 61 | 64 | elem.addClass('uk-animation-slide-left-medium uk-animation-reverse') |
| 62 | 65 | .one('animationend', function () { |
| 63 | 66 | $(this).remove(); |
| 64 | 67 | }); |
| 65 | 68 | } |
| 66 | 69 | }; |
| 67 | - | |
| 70 | + | |
| 71 | + var renderErrorLinePanel = function () { | |
| 72 | + var maps = {}; | |
| 73 | + | |
| 74 | + for (var k in _data) { | |
| 75 | + maps[_data[k].lineCode] = 1; | |
| 76 | + } | |
| 77 | + | |
| 78 | + var array = gb_common.get_keys(maps); | |
| 79 | + | |
| 80 | + var $panel = $('.red_line_bts', '#abnormal_monitor_wrap'); | |
| 81 | + if (!array || array.length == 0) { | |
| 82 | + $panel.empty().html('<span class="red_line_empty">没有出现异常的线路</span>'); | |
| 83 | + } | |
| 84 | + else { | |
| 85 | + var htmlStr = ''; | |
| 86 | + for (var i = 0, code; code = array[i++];) { | |
| 87 | + htmlStr += '<span class="red_btn" data-code="' + code + '">' + gb_o_s_basic_data.findLineNameByCode(code) + '</span>'; | |
| 88 | + } | |
| 89 | + | |
| 90 | + $panel.empty().html(htmlStr); | |
| 91 | + } | |
| 92 | + }; | |
| 93 | + | |
| 94 | + | |
| 68 | 95 | return { |
| 69 | 96 | init: init, |
| 70 | 97 | get: getByKey, |
| 71 | - handle: handle | |
| 98 | + handle: handle, | |
| 99 | + renderErrorLinePanel: renderErrorLinePanel | |
| 72 | 100 | } |
| 73 | 101 | })(); |
| 74 | 102 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/abnormal/js/o_s_charts.js
0 → 100644
| 1 | +/** | |
| 2 | + * 自己画图,丰衣足食 | |
| 3 | + */ | |
| 4 | +var gb_o_s_charts = (function () { | |
| 5 | + | |
| 6 | + var init = function () { | |
| 7 | + renderCcCharts(); | |
| 8 | + renderQdCharts(); | |
| 9 | + }; | |
| 10 | + | |
| 11 | + //出场准点率 viz | |
| 12 | + var ccRateChartViz; | |
| 13 | + //签到准点率 viz | |
| 14 | + var qdRateChartViz; | |
| 15 | + | |
| 16 | + | |
| 17 | + /** | |
| 18 | + * 出场准点率 | |
| 19 | + */ | |
| 20 | + var renderCcCharts = function () { | |
| 21 | + var wrap = '#abnormal_monitor_wrap'; | |
| 22 | + var v_cont = d3.selectAll(wrap + ' #ccRateChart>.chart_wrap'); | |
| 23 | + | |
| 24 | + var viz = vizuly.viz.radial_progress($('#ccRateChart>.chart_wrap', wrap)[0]) | |
| 25 | + ,theme = vizuly.theme.radial_progress(viz).skin(vizuly.skin.RADIAL_PROGRESS_ALERT); | |
| 26 | + | |
| 27 | + drawArc(viz, v_cont, 80, '出场准点'); | |
| 28 | + ccRateChartViz = viz; | |
| 29 | + }; | |
| 30 | + | |
| 31 | + /** | |
| 32 | + * 签到准点率 | |
| 33 | + */ | |
| 34 | + var renderQdCharts = function () { | |
| 35 | + var wrap = '#abnormal_monitor_wrap'; | |
| 36 | + var v_cont = d3.selectAll(wrap + ' #bdRateChart>.chart_wrap'); | |
| 37 | + | |
| 38 | + var viz = vizuly.viz.radial_progress($('#bdRateChart>.chart_wrap', wrap)[0]) | |
| 39 | + ,theme = vizuly.theme.radial_progress(viz).skin(vizuly.skin.RADIAL_PROGRESS_ALERT); | |
| 40 | + | |
| 41 | + drawArc(viz, v_cont, 80, '报到准点'); | |
| 42 | + qdRateChartViz = viz; | |
| 43 | + }; | |
| 44 | + | |
| 45 | + | |
| 46 | + function changeSize(viz, val) { | |
| 47 | + var s = String(val).split(","); | |
| 48 | + var divWidth = s[0] * 0.80 / 3; | |
| 49 | + viz.width(divWidth).height(divWidth).radius(divWidth / 2.2).update(); | |
| 50 | + } | |
| 51 | + | |
| 52 | + function drawArc(viz, v_cont, v, title) { | |
| 53 | + viz.data(v) | |
| 54 | + .height(200) | |
| 55 | + .min(0) | |
| 56 | + .max(100) | |
| 57 | + .on("tween",onTween) | |
| 58 | + | |
| 59 | + .startAngle(180) | |
| 60 | + .endAngle(180) | |
| 61 | + .arcThickness(.04) | |
| 62 | + .label(function (d) { | |
| 63 | + return d3.format(".0f")(d) + "%"; | |
| 64 | + }); | |
| 65 | + | |
| 66 | + changeSize(viz, "375,647"); | |
| 67 | + | |
| 68 | + //title | |
| 69 | + v_cont.select('svg') | |
| 70 | + .append('g') | |
| 71 | + .classed('_chart_title', true) | |
| 72 | + .append('text') | |
| 73 | + .attr('x', 28) | |
| 74 | + .attr('y', 65) | |
| 75 | + .attr('font-family', '宋体') | |
| 76 | + .text(title); | |
| 77 | + } | |
| 78 | + | |
| 79 | + function onTween(viz,i) { | |
| 80 | + viz.selection().selectAll(".vz-radial_progress-label") | |
| 81 | + .text(viz.label()(viz.data() * i)); | |
| 82 | + } | |
| 83 | + | |
| 84 | + | |
| 85 | + /* function changeData(val) { | |
| 86 | + viz.data(Number(val)).update(); | |
| 87 | + }*/ | |
| 88 | + | |
| 89 | + return { | |
| 90 | + init: init | |
| 91 | + } | |
| 92 | +})(); | |
| 0 | 93 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/abnormal/main.html
| 1 | 1 | <div id="abnormal_monitor_wrap" class=""> |
| 2 | 2 | |
| 3 | 3 | <div class="left_panel"> |
| 4 | - <div class="red_line_bts"> | |
| 5 | - <!--<span class="red_line_empty">没有出现异常的线路</span>--> | |
| 6 | - <span class="red_btn">778路</span> | |
| 7 | - <span class="red_btn">610路</span> | |
| 8 | - <span class="red_btn">604路</span> | |
| 9 | - <span class="red_btn">81路</span> | |
| 10 | - <span class="red_btn">971路</span> | |
| 11 | - <span class="red_btn">浦东35路</span> | |
| 12 | - </div> | |
| 4 | + <div class="red_line_bts"></div> | |
| 13 | 5 | |
| 14 | 6 | <div class="sys-notice"> |
| 15 | 7 | <span class="bell_icon"> |
| ... | ... | @@ -18,7 +10,7 @@ |
| 18 | 10 | </div> |
| 19 | 11 | |
| 20 | 12 | <div class="abnormal_data_tabs"> |
| 21 | - <ul class="uk-subnav" uk-switcher uk-tab> | |
| 13 | + <ul class="uk-subnav" uk-switcher uk-tab style="margin-bottom: 0;"> | |
| 22 | 14 | <li><a>异常情况 50</a></li> |
| 23 | 15 | <!--<li><a>已处理</a></li>--> |
| 24 | 16 | </ul> |
| ... | ... | @@ -31,7 +23,13 @@ |
| 31 | 23 | </ul> |
| 32 | 24 | </div> |
| 33 | 25 | |
| 34 | - <div class="data_charts"> | |
| 26 | + <div class="data_charts uk-flex-center" uk-grid> | |
| 27 | + <div id="ccRateChart" class="uk-width-1-3@m"> | |
| 28 | + <div class="chart_wrap"></div> | |
| 29 | + </div> | |
| 30 | + <div id="bdRateChart" class="uk-width-1-3@m"> | |
| 31 | + <div class="chart_wrap"></div> | |
| 32 | + </div> | |
| 35 | 33 | </div> |
| 36 | 34 | </div> |
| 37 | 35 | ... | ... |
src/main/resources/static/pages/basic_data/bus/list.html
| ... | ... | @@ -103,8 +103,8 @@ |
| 103 | 103 | data.size=pageSize; |
| 104 | 104 | //query |
| 105 | 105 | gb_common.$get('/bus/list', data, function (rs) { |
| 106 | - var tbodyStr = template('bus_car_list_body-temp', {list:rs.list, company_ns: company_code_name}); | |
| 107 | - $('.ct_bus_list_table>tbody', wrap).html(tbodyStr); | |
| 106 | + var tBodyStr = template('bus_car_list_body-temp', {list:rs.list, company_ns: company_code_name}); | |
| 107 | + $('.ct_bus_list_table>tbody', wrap).html(tBodyStr); | |
| 108 | 108 | |
| 109 | 109 | //pagination |
| 110 | 110 | if (resetPagination){ | ... | ... |
src/main/resources/static/pages/system_manager/role/auths.html
0 → 100644
| 1 | +<!-- 角色权限分配 --> | |
| 2 | +<div id="role_auth_config_wrap" style="padding: 25px;height: calc(100% - 50px);"> | |
| 3 | + <div class="role_list"> | |
| 4 | + <div class="uk-card uk-card-default uk-card-small uk-card-body"> | |
| 5 | + <span class="title"> | |
| 6 | + 角色列表 | |
| 7 | + <a class="uk-button uk-button-text" id="add_role_btn" style="font-size: 13px;font-size: 13px;position: absolute;right: 12px;top: 12px;"> | |
| 8 | + <i uk-icon="icon: plus; ratio: .7" style="vertical-align: top;margin: 2px 2px 2px 0;text-indent: 0;"></i> | |
| 9 | + 添加角色 | |
| 10 | + </a> | |
| 11 | + </span> | |
| 12 | + | |
| 13 | + <ul class="uk-list uk-list-large uk-list-divider role_ul_list"></ul> | |
| 14 | + </div> | |
| 15 | + </div> | |
| 16 | + <div class="auth_list"> | |
| 17 | + <div class="uk-card uk-card-default uk-card-small uk-card-body"> | |
| 18 | + <span class="title">功能菜单</span> | |
| 19 | + <div class="fun_s_list"></div> | |
| 20 | + </div> | |
| 21 | + <div class="footer_wrap"> | |
| 22 | + <button class="uk-button uk-button-primary uk-width-1-1 uk-margin-small-bottom save_btn">保存</button> | |
| 23 | + </div> | |
| 24 | + </div> | |
| 25 | + | |
| 26 | + <script id="sys_role_list-temp" type="text/html"> | |
| 27 | + {{each list as r i}} | |
| 28 | + <li data-id="{{r.id}}">{{r.roleName}}</li> | |
| 29 | + {{/each}} | |
| 30 | + </script> | |
| 31 | + | |
| 32 | + <script id="sys_role_fun-temp" type="text/html"> | |
| 33 | + {{each all as obj i}} | |
| 34 | + <div class="module"> | |
| 35 | + <span class="c_box_wrap"> | |
| 36 | + <span class="root item {{chs[obj.code]?'active':''}}"> | |
| 37 | + <input class="uk-checkbox" type="checkbox" data-code="{{obj.code}}" {{chs[obj.code]?'checked':''}}> {{obj.name}} | |
| 38 | + </span> | |
| 39 | + <div class="sub_menus"> | |
| 40 | + {{each obj.items as item j}} | |
| 41 | + <span class="item {{chs[obj.code+'$'+item.code]?'active':''}}"> | |
| 42 | + <input class="uk-checkbox" type="checkbox" data-code="{{item.code}}" {{chs[obj.code+'$'+item.code]?'checked':''}}> {{item.name}} | |
| 43 | + </span> | |
| 44 | + {{/each}} | |
| 45 | + </div> | |
| 46 | + </span> | |
| 47 | + </div> | |
| 48 | + {{/each}} | |
| 49 | + </script> | |
| 50 | + | |
| 51 | + <script> | |
| 52 | + (function () { | |
| 53 | + var wrap = '#role_auth_config_wrap'; | |
| 54 | + var auth_json; | |
| 55 | + var menuStrMaps; | |
| 56 | + | |
| 57 | + query(); | |
| 58 | + function query(rId) { | |
| 59 | + //角色列表 | |
| 60 | + $.get('/role/all', function (list) { | |
| 61 | + menuStrMaps = {}; | |
| 62 | + for(var i=0,r;r=list[i++];){ | |
| 63 | + menuStrMaps[r.id] = r['menuStr']; | |
| 64 | + } | |
| 65 | + | |
| 66 | + var htmlStr = template('sys_role_list-temp', {list: list}); | |
| 67 | + $('ul.role_ul_list', wrap).html(htmlStr); | |
| 68 | + | |
| 69 | + //all menus | |
| 70 | + $.get('/role/auth_json', function (rs) { | |
| 71 | + auth_json = JSON.parse(rs).list; | |
| 72 | + | |
| 73 | + //选中第一个角色 | |
| 74 | + if(!rId) | |
| 75 | + $('ul.role_ul_list>li:first', wrap).trigger('click'); | |
| 76 | + else | |
| 77 | + $('ul.role_ul_list>li[data-id='+rId+']', wrap).trigger('click'); | |
| 78 | + }); | |
| 79 | + }); | |
| 80 | + } | |
| 81 | + | |
| 82 | + | |
| 83 | + //角色点击 | |
| 84 | + $(wrap).on('click', '.role_list ul>li', function () { | |
| 85 | + if ($(this).hasClass('active')) | |
| 86 | + return; | |
| 87 | + | |
| 88 | + $('.role_list ul>li.active', wrap).removeClass('active'); | |
| 89 | + $(this).addClass('active'); | |
| 90 | + | |
| 91 | + var menuStr = menuStrMaps[$(this).data('id')]; | |
| 92 | + var chsJson = parseMenuStr(menuStr); | |
| 93 | + | |
| 94 | + //加载右侧权限页面 | |
| 95 | + var htmlStr = template('sys_role_fun-temp', {all: auth_json, chs: chsJson}); | |
| 96 | + $('.fun_s_list', wrap).html(htmlStr); | |
| 97 | + }); | |
| 98 | + | |
| 99 | + //保存 | |
| 100 | + $('.save_btn', wrap).on('click', function () { | |
| 101 | + | |
| 102 | + var str = ''; | |
| 103 | + $('.fun_s_list .module', wrap).each(function () { | |
| 104 | + var rc = $('.root input:checkbox:checked', this); | |
| 105 | + if(rc.length == 0) | |
| 106 | + return true; | |
| 107 | + | |
| 108 | + str += ('$' + rc.data('code')); | |
| 109 | + | |
| 110 | + $('.sub_menus input:checkbox:checked', this).each(function () { | |
| 111 | + str += ('^' + $(this).data('code')); | |
| 112 | + }); | |
| 113 | + }); | |
| 114 | + | |
| 115 | + var roleId = $('.role_ul_list li.active', wrap).data('id'); | |
| 116 | + gb_common.$post('/role/saveAuthStr', {authStr: str, id: roleId}, function (rs) { | |
| 117 | + toastr.success("保存成功!",'', toast_top_center_opts); | |
| 118 | + query(roleId); | |
| 119 | + }); | |
| 120 | + }); | |
| 121 | + | |
| 122 | + //c box选中 | |
| 123 | + $(wrap).on('click', '.fun_s_list .module span.item', function () { | |
| 124 | + var cBox = $('.uk-checkbox', this)[0]; | |
| 125 | + | |
| 126 | + if ($(this).hasClass('active')) { | |
| 127 | + $(this).removeClass('active'); | |
| 128 | + cBox.checked = false; | |
| 129 | + } else { | |
| 130 | + $(this).addClass('active'); | |
| 131 | + cBox.checked = true; | |
| 132 | + } | |
| 133 | + | |
| 134 | + sync(this, cBox.checked); | |
| 135 | + }); | |
| 136 | + | |
| 137 | + | |
| 138 | + function sync(elem, isCheck) { | |
| 139 | + if (!$(elem).hasClass('root')) { | |
| 140 | + var isCheck = false; | |
| 141 | + $(elem).parents('.sub_menus').find('span.item>.uk-checkbox').each(function () { | |
| 142 | + if (this.checked) { | |
| 143 | + isCheck = true; | |
| 144 | + return false; | |
| 145 | + } | |
| 146 | + }); | |
| 147 | + | |
| 148 | + var $root = $(elem).parents('.sub_menus').prev(); | |
| 149 | + if (isCheck) | |
| 150 | + $root.addClass('active'); | |
| 151 | + else | |
| 152 | + $root.removeClass('active'); | |
| 153 | + $root.find('.uk-checkbox')[0].checked = isCheck; | |
| 154 | + | |
| 155 | + return; | |
| 156 | + } | |
| 157 | + | |
| 158 | + $(elem).next().find('.uk-checkbox').each(function () { | |
| 159 | + this.checked = isCheck; | |
| 160 | + if (isCheck) { | |
| 161 | + $(this).parent().addClass('active'); | |
| 162 | + } else { | |
| 163 | + $(this).parent().removeClass('active'); | |
| 164 | + } | |
| 165 | + }); | |
| 166 | + } | |
| 167 | + | |
| 168 | + function parseMenuStr(str) { | |
| 169 | + var data = {}; | |
| 170 | + var mArray = str.split('$'); | |
| 171 | + var sArray; | |
| 172 | + | |
| 173 | + var s1,s2; | |
| 174 | + for(var i=0; i<mArray.length; i++){ | |
| 175 | + s1 = mArray[i]; | |
| 176 | + if(!s1) | |
| 177 | + continue; | |
| 178 | + | |
| 179 | + sArray = s1.split('^'); | |
| 180 | + | |
| 181 | + data[sArray[0]] = 1; | |
| 182 | + | |
| 183 | + for(var j=1; j<sArray.length; j++){ | |
| 184 | + s2 = sArray[j]; | |
| 185 | + if(!s2) | |
| 186 | + continue; | |
| 187 | + data[sArray[0] + '$' + s2] = 1; | |
| 188 | + } | |
| 189 | + } | |
| 190 | + | |
| 191 | + return data; | |
| 192 | + } | |
| 193 | + | |
| 194 | + //添加角色 | |
| 195 | + $('#add_role_btn', wrap).on('click', function () { | |
| 196 | + gb_common.alt_prompt('角色名称', '', '保存', function (v) { | |
| 197 | + if(!v) | |
| 198 | + return; | |
| 199 | + gb_common.$post('/role/add', {roleName: v}, function (rs) { | |
| 200 | + toastr.success("添加成功!",'', toast_top_center_opts); | |
| 201 | + query(rs.t.id); | |
| 202 | + }); | |
| 203 | + }); | |
| 204 | + }); | |
| 205 | + })(); | |
| 206 | + </script> | |
| 207 | +</div> | |
| 0 | 208 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/system_manager/sm_main.html
0 → 100644
| 1 | +<!-- 基础数据管理主页 --> | |
| 2 | +<div id="system_manager_wrap" class="l_r_split_screen" style="border-top: 1px solid #ff1d0d36;"> | |
| 3 | + | |
| 4 | + <div class="left-menus"> | |
| 5 | + <ul class="uk-list"> | |
| 6 | + <li class="ct-btn-link" data-name="role" data-page="/pages/system_manager/role/auths.html">角色和权限</li> | |
| 7 | + <li class="ct-btn-link" data-name="user" data-page="/pages/system_manager/user/user_list.html">用户和账号</li> | |
| 8 | + <li class="ct-btn-link" data-name="logs" data-page="">日志</li> | |
| 9 | + <li class="ct-btn-link" data-name="config" data-page="">参数配置</li> | |
| 10 | + </ul> | |
| 11 | + </div> | |
| 12 | + <div class="right-body"> | |
| 13 | + | |
| 14 | + </div> | |
| 15 | + | |
| 16 | + <script> | |
| 17 | + | |
| 18 | + (function () { | |
| 19 | + | |
| 20 | + var wrap = '#system_manager_wrap', $body = $('.right-body', wrap); | |
| 21 | + | |
| 22 | + $('.left-menus .ct-btn-link', wrap).on('click', function () { | |
| 23 | + var page = $(this).data('page'); | |
| 24 | + if(!page) | |
| 25 | + return; | |
| 26 | + | |
| 27 | + var that = this; | |
| 28 | + $body.empty().load(page, function () { | |
| 29 | + $('.left-menus .ct-btn-link.active', wrap).removeClass('active'); | |
| 30 | + $(that).addClass('active'); | |
| 31 | + }); | |
| 32 | + }); | |
| 33 | + | |
| 34 | + //默认选中第一项 | |
| 35 | + $('.left-menus .ct-btn-link:eq(0)', wrap).trigger('click'); | |
| 36 | + })(); | |
| 37 | + </script> | |
| 38 | +</div> | |
| 0 | 39 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/system_manager/user/add.html
0 → 100644
| 1 | +<div class="sys_user_add_page edit-form-modal"> | |
| 2 | + <form class="uk-form-horizontal"> | |
| 3 | + <div class="uk-margin"> | |
| 4 | + <label class="uk-form-label">公司:</label> | |
| 5 | + <div class="uk-form-controls"> | |
| 6 | + <select class="uk-select" name="company"></select> | |
| 7 | + </div> | |
| 8 | + </div> | |
| 9 | + <div class="uk-margin"> | |
| 10 | + <label class="uk-form-label">分公司:</label> | |
| 11 | + <div class="uk-form-controls"> | |
| 12 | + <select class="uk-select" name="fgsCompany"></select> | |
| 13 | + </div> | |
| 14 | + </div> | |
| 15 | + <div class="uk-margin"> | |
| 16 | + <label class="uk-form-label">姓名:</label> | |
| 17 | + <div class="uk-form-controls"> | |
| 18 | + <input class="uk-input" type="text" name="name" required data-fv-stringlength="true" data-fv-stringlength-max="4"> | |
| 19 | + </div> | |
| 20 | + </div> | |
| 21 | + <div class="uk-margin"> | |
| 22 | + <label class="uk-form-label">角色:</label> | |
| 23 | + <div class="uk-form-controls"> | |
| 24 | + <select class="uk-select" name="roles[]" id="roleSelect" required></select> | |
| 25 | + </div> | |
| 26 | + </div> | |
| 27 | + <hr> | |
| 28 | + <div class="uk-margin"> | |
| 29 | + <label class="uk-form-label">用户名:</label> | |
| 30 | + <div class="uk-form-controls"> | |
| 31 | + <input class="uk-input" type="text" name="userName" required data-fv-stringlength="true" data-fv-stringlength-max="15"> | |
| 32 | + </div> | |
| 33 | + </div> | |
| 34 | + <div class="uk-margin"> | |
| 35 | + <label class="uk-form-label">登录密码:</label> | |
| 36 | + <div class="uk-form-controls"> | |
| 37 | + <input class="uk-input" type="password" name="password" required data-fv-stringlength="true" data-fv-stringlength-min="6"> | |
| 38 | + </div> | |
| 39 | + </div> | |
| 40 | + <div class="uk-margin"> | |
| 41 | + <label class="uk-form-label">确认密码:</label> | |
| 42 | + <div class="uk-form-controls"> | |
| 43 | + <input class="uk-input" type="password" name="confirmPassword" required data-fv-stringlength="true" data-fv-stringlength-min="6"> | |
| 44 | + </div> | |
| 45 | + </div> | |
| 46 | + <div class="uk-margin"> | |
| 47 | + <label class="uk-form-label">状态:</label> | |
| 48 | + <div class="uk-form-controls"> | |
| 49 | + <select class="uk-select" name="enabled"> | |
| 50 | + <option value="1">启用</option> | |
| 51 | + <option value="0">禁用</option> | |
| 52 | + </select> | |
| 53 | + </div> | |
| 54 | + </div> | |
| 55 | + </form> | |
| 56 | + | |
| 57 | + <script> | |
| 58 | + (function () { | |
| 59 | + var wrap = '.sys_user_add_page', modalId; | |
| 60 | + | |
| 61 | + $(wrap).on('init', function (e, data) { | |
| 62 | + e.stopPropagation(); | |
| 63 | + modalId = '#'+data.modalId; | |
| 64 | + | |
| 65 | + //查询角色列表 | |
| 66 | + $.get('/role/all', function (list) { | |
| 67 | + var opts = '<option value="">请选择...</option>'; | |
| 68 | + for(var i=0,role;role=list[i++];){ | |
| 69 | + opts+='<option value="'+role.id+'">'+role['roleName']+'</option>'; | |
| 70 | + } | |
| 71 | + | |
| 72 | + $('form #roleSelect', wrap).html(opts); | |
| 73 | + | |
| 74 | + data && data.caller && data.caller(); | |
| 75 | + }); | |
| 76 | + }); | |
| 77 | + | |
| 78 | + | |
| 79 | + //submit | |
| 80 | + var opts = $.extend(gb_form_validation_opts, { | |
| 81 | + fields: { | |
| 82 | + password: { | |
| 83 | + validators: { | |
| 84 | + callback: { | |
| 85 | + message: '2次密码输入不一致', | |
| 86 | + callback: function () { | |
| 87 | + return pwdEqual(); | |
| 88 | + } | |
| 89 | + } | |
| 90 | + } | |
| 91 | + }, | |
| 92 | + confirmPassword: { | |
| 93 | + validators: { | |
| 94 | + callback: { | |
| 95 | + message: '2次密码输入不一致', | |
| 96 | + callback: function () { | |
| 97 | + return pwdEqual(); | |
| 98 | + } | |
| 99 | + } | |
| 100 | + } | |
| 101 | + } | |
| 102 | + } | |
| 103 | + }); | |
| 104 | + | |
| 105 | + var f = $('form', wrap).formValidation(opts); | |
| 106 | + $('.submit-btn', modalId).on('click', function () { | |
| 107 | + f.submit(); | |
| 108 | + }); | |
| 109 | + f.on('success.form.fv', function(e) { | |
| 110 | + e.preventDefault(); | |
| 111 | + var data = $(this).serializeJSON(); | |
| 112 | + | |
| 113 | + $.ajax({ | |
| 114 | + url: '/user/register', | |
| 115 | + type: 'POST', | |
| 116 | + traditional: true, | |
| 117 | + data: data, | |
| 118 | + success: function(rs){ | |
| 119 | + if(!rs){ | |
| 120 | + toastr.error("未知异常!",'', toast_top_center_opts); | |
| 121 | + } | |
| 122 | + if(rs.status=='SUCCESS'){ | |
| 123 | + toastr.success("添加用户成功!",'', toast_top_center_opts); | |
| 124 | + UIkit.modal(modalId).hide(); | |
| 125 | + //刷新list | |
| 126 | + $('#sm_user_list_wrap').trigger('refresh', {resetPagination: true}); | |
| 127 | + } | |
| 128 | + else if(rs.status=='ERROR'){ | |
| 129 | + toastr.error('添加失败[ ' + rs.msg + ']','',toast_top_center_opts); | |
| 130 | + } | |
| 131 | + } | |
| 132 | + }); | |
| 133 | + }); | |
| 134 | + | |
| 135 | + //初始化公司——>分公司(2 -带总公司) | |
| 136 | + var comp = $('[name=company]', wrap); | |
| 137 | + var fgsComp = $('[name=fgsCompany]', wrap); | |
| 138 | + gb_common.companySelect2(comp, fgsComp); | |
| 139 | + | |
| 140 | + /** | |
| 141 | + * 2次密码是否一致 | |
| 142 | + */ | |
| 143 | + function pwdEqual() { | |
| 144 | + var pwd1 = $('[name=password]', f).val() | |
| 145 | + ,pwd2 = $('[name=confirmPassword]', f).val(); | |
| 146 | + | |
| 147 | + if(pwd1 && pwd2 && pwd1!=pwd2) | |
| 148 | + return false; | |
| 149 | + else | |
| 150 | + return true; | |
| 151 | + } | |
| 152 | + })(); | |
| 153 | + </script> | |
| 154 | +</div> | |
| 0 | 155 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/system_manager/user/edit.html
0 → 100644
| 1 | +<!-- 私家车信息编辑 --> | |
| 2 | +<div class="sys_user_edit_page edit-form-modal"> | |
| 3 | + <form class="uk-form-horizontal "> | |
| 4 | + </form> | |
| 5 | + | |
| 6 | + <script id="sys_user_edit_modal_form-temp" type="text/html"> | |
| 7 | + <input type="hidden" name="id" value="{{u.id}}"> | |
| 8 | + <div class="uk-margin"> | |
| 9 | + <label class="uk-form-label">公司:</label> | |
| 10 | + <div class="uk-form-controls"> | |
| 11 | + <select class="uk-select" name="company"></select> | |
| 12 | + </div> | |
| 13 | + </div> | |
| 14 | + <div class="uk-margin"> | |
| 15 | + <label class="uk-form-label">分公司:</label> | |
| 16 | + <div class="uk-form-controls"> | |
| 17 | + <select class="uk-select" name="fgsCompany"></select> | |
| 18 | + </div> | |
| 19 | + </div> | |
| 20 | + <div class="uk-margin"> | |
| 21 | + <label class="uk-form-label">姓名:</label> | |
| 22 | + <div class="uk-form-controls"> | |
| 23 | + <input class="uk-input" type="text" name="name" value="{{u.name}}" required data-fv-stringlength="true" data-fv-stringlength-max="4"> | |
| 24 | + </div> | |
| 25 | + </div> | |
| 26 | + <div class="uk-margin"> | |
| 27 | + <label class="uk-form-label">角色:</label> | |
| 28 | + <div class="uk-form-controls"> | |
| 29 | + <select class="uk-select" name="roles" id="roleSelect" required></select> | |
| 30 | + </div> | |
| 31 | + </div> | |
| 32 | + <hr> | |
| 33 | + <div class="uk-margin"> | |
| 34 | + <label class="uk-form-label">用户名:</label> | |
| 35 | + <div class="uk-form-controls"> | |
| 36 | + <input class="uk-input" type="text" name="userName" value="{{u.userName}}" required data-fv-stringlength="true" data-fv-stringlength-max="15"> | |
| 37 | + </div> | |
| 38 | + </div> | |
| 39 | + <div class="uk-margin"> | |
| 40 | + <label class="uk-form-label">状态:</label> | |
| 41 | + <div class="uk-form-controls"> | |
| 42 | + <select class="uk-select" name="enabled"> | |
| 43 | + <option value="1" >启用</option> | |
| 44 | + <option value="0" {{u.enabled?"":"selected"}}>禁用</option> | |
| 45 | + </select> | |
| 46 | + </div> | |
| 47 | + </div> | |
| 48 | + </script> | |
| 49 | + | |
| 50 | + <script> | |
| 51 | + | |
| 52 | + (function () { | |
| 53 | + var wrap = '.sys_user_edit_page', modalId; | |
| 54 | + | |
| 55 | + $(wrap).on('init', function (e, data) { | |
| 56 | + e.stopPropagation(); | |
| 57 | + modalId = '#'+data.modalId; | |
| 58 | + | |
| 59 | + $.get('/user/'+data.code, function (rs) { | |
| 60 | + var htmlStr = template('sys_user_edit_modal_form-temp', {u: rs}); | |
| 61 | + $('form', wrap).html(htmlStr); | |
| 62 | + | |
| 63 | + //初始化公司——>分公司(2 -带总公司) | |
| 64 | + var comp = $('[name=company]', wrap); | |
| 65 | + var fgsComp = $('[name=fgsCompany]', wrap); | |
| 66 | + gb_common.companySelect2(comp, fgsComp); | |
| 67 | + | |
| 68 | + //设置值 | |
| 69 | + comp.val(rs.company); | |
| 70 | + fgsComp.val(rs.fgsCompany); | |
| 71 | + | |
| 72 | + //角色下拉框 | |
| 73 | + $.get('/role/all', function (list) { | |
| 74 | + var opts = '<option value="">请选择...</option>'; | |
| 75 | + for(var i=0,role;role=list[i++];){ | |
| 76 | + opts+='<option value="'+role.id+'">'+role['roleName']+'</option>'; | |
| 77 | + } | |
| 78 | + | |
| 79 | + $('form #roleSelect', wrap).html(opts).val(rs['roles'][0].id); | |
| 80 | + | |
| 81 | + data && data.caller && data.caller(); | |
| 82 | + }); | |
| 83 | + | |
| 84 | + //form events | |
| 85 | + initFormEvents(); | |
| 86 | + }); | |
| 87 | + }); | |
| 88 | + | |
| 89 | + | |
| 90 | + function initFormEvents() { | |
| 91 | + //submit | |
| 92 | + var f = $('form', wrap).formValidation(gb_form_validation_opts); | |
| 93 | + $('.submit-btn', modalId).on('click', function () { | |
| 94 | + f.submit(); | |
| 95 | + }); | |
| 96 | + f.on('success.form.fv', function(e) { | |
| 97 | + e.preventDefault(); | |
| 98 | + var data = $(this).serializeJSON(); | |
| 99 | + | |
| 100 | + | |
| 101 | + gb_common.$post('/user', data, function (rs) { | |
| 102 | + UIkit.modal(modalId).hide(); | |
| 103 | + UIkit.notification('保存成功!!', 'success'); | |
| 104 | + $('#sm_user_list_wrap').trigger('refresh'); | |
| 105 | + }); | |
| 106 | + }); | |
| 107 | + } | |
| 108 | + })(); | |
| 109 | + </script> | |
| 110 | +</div> | |
| 0 | 111 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/system_manager/user/user_list.html
0 → 100644
| 1 | +<!-- 用户和账号 --> | |
| 2 | +<div id="sm_user_list_wrap" style="padding: 25px;height: calc(100% - 50px);"> | |
| 3 | + | |
| 4 | + <div class="ct_cont" style="height: 100%;"> | |
| 5 | + <div class="ct_search_form_wrap"> | |
| 6 | + <form> | |
| 7 | + <div class="ct_field"> | |
| 8 | + <label>公司: | |
| 9 | + <select class="uk-select" name="company_eq"> | |
| 10 | + </select> | |
| 11 | + </label> | |
| 12 | + </div> | |
| 13 | + | |
| 14 | + <div class="ct_field"> | |
| 15 | + <label>分公司: | |
| 16 | + <select class="uk-select" name="fgsCompany_eq"> | |
| 17 | + </select> | |
| 18 | + </label> | |
| 19 | + </div> | |
| 20 | + <div class="ct_field"> | |
| 21 | + <label>用户名: | |
| 22 | + <input class="uk-input" name="userName_eq" placeholder="卡ID号"> | |
| 23 | + </label> | |
| 24 | + </div> | |
| 25 | + <div class="ct_field"> | |
| 26 | + <label>状态: | |
| 27 | + <select class="uk-select" name="enabled_eq"> | |
| 28 | + <option value="">全部</option> | |
| 29 | + <option value="true">启用</option> | |
| 30 | + <option value="false">禁用</option> | |
| 31 | + </select> | |
| 32 | + </label> | |
| 33 | + </div> | |
| 34 | + <div class="ct_field"> | |
| 35 | + <button class="uk-button uk-button-primary search"><i uk-icon="icon: search"></i>搜索</button> | |
| 36 | + </div> | |
| 37 | + <div class="ct_field" style="vertical-align: bottom;"> | |
| 38 | + <a class="uk-button uk-button-text" id="add_user_btn"><i uk-icon="plus"></i>添加用户</a> | |
| 39 | + </div> | |
| 40 | + </form> | |
| 41 | + </div> | |
| 42 | + <div class="ct_table_wrap" style="height: calc(100% - 76px);"> | |
| 43 | + <table class="uk-table uk-table-small ct_sys_user_tab_width" style="margin-bottom: 0;"> | |
| 44 | + <thead> | |
| 45 | + <tr> | |
| 46 | + <th>公司</th> | |
| 47 | + <th>分公司</th> | |
| 48 | + <th>用户名</th> | |
| 49 | + <th>姓名</th> | |
| 50 | + <th>角色</th> | |
| 51 | + <th>上次登录时间</th> | |
| 52 | + <th>状态</th> | |
| 53 | + <th>操作</th> | |
| 54 | + </tr> | |
| 55 | + </thead> | |
| 56 | + </table> | |
| 57 | + <div class="t_body_wrap" style="max-height: calc(100% - 75px);overflow: auto;"> | |
| 58 | + <table class="uk-table uk-table-divider uk-table-hover uk-table-small ct_sys_user_table ct_sys_user_tab_width"> | |
| 59 | + <tbody></tbody> | |
| 60 | + </table> | |
| 61 | + </div> | |
| 62 | + <div class="pagination-holder"></div> | |
| 63 | + <div class="count_text"></div> | |
| 64 | + </div> | |
| 65 | + </div> | |
| 66 | + | |
| 67 | + <script id="sys_user_list_body-temp" type="text/html"> | |
| 68 | + {{each list as user i}} | |
| 69 | + <tr> | |
| 70 | + <td> | |
| 71 | + {{company_ns[user.company]}} | |
| 72 | + {{if user.company==88}} | |
| 73 | + 总公司 | |
| 74 | + {{/if}} | |
| 75 | + </td> | |
| 76 | + <td> | |
| 77 | + {{company_ns[user.company+'_'+user.fgsCompany]}} | |
| 78 | + {{if user.company==88}} | |
| 79 | + ... | |
| 80 | + {{/if}} | |
| 81 | + </td> | |
| 82 | + <td>{{user.userName}}</td> | |
| 83 | + <td>{{user.name}}</td> | |
| 84 | + <td>{{user.roleStr}}</td> | |
| 85 | + <td>{{user.lastLoginTimeStr}}</td> | |
| 86 | + <td>{{user.enabled?'启用':'禁用'}}</td> | |
| 87 | + <td> | |
| 88 | + <a class="edit_icon" data-code="{{user.id}}" uk-icon="icon: file-edit"></a> | |
| 89 | + </td> | |
| 90 | + </tr> | |
| 91 | + {{/each}} | |
| 92 | + </script> | |
| 93 | + | |
| 94 | + <script> | |
| 95 | + (function () { | |
| 96 | + var wrap = '#sm_user_list_wrap', ps = $('.t_body_wrap', wrap); | |
| 97 | + | |
| 98 | + var page=0, pageSize=14; | |
| 99 | + ps.perfectScrollbar();//滚动条 | |
| 100 | + query(); | |
| 101 | + function query() { | |
| 102 | + var data = $('.ct_search_form_wrap>form', wrap).serializeJSON(); | |
| 103 | + data.page=page; | |
| 104 | + data.size=pageSize; | |
| 105 | + //query | |
| 106 | + gb_common.$get('/user', data, function (rs) { | |
| 107 | + $.each(rs.content, function () { | |
| 108 | + this['roleStr'] = joins(this['roles']); | |
| 109 | + this['lastLoginTimeStr'] = moment(this['lastLoginDate']).format('YYYY-MM-DD HH:mm'); | |
| 110 | + }); | |
| 111 | + | |
| 112 | + var tBodyStr = template('sys_user_list_body-temp', {list:rs.content, company_ns: company_code_name}); | |
| 113 | + | |
| 114 | + $('.ct_sys_user_table>tbody', wrap).html(tBodyStr); | |
| 115 | + | |
| 116 | + //pagination | |
| 117 | + if (resetPagination){ | |
| 118 | + pagination(rs['totalPages'], rs.number); | |
| 119 | + $('.count_text', wrap).text('共:' + rs['totalElements']); | |
| 120 | + } | |
| 121 | + | |
| 122 | + ps.perfectScrollbar('update'); | |
| 123 | + }); | |
| 124 | + } | |
| 125 | + | |
| 126 | + $('.ct_search_form_wrap', wrap).on('submit', function () { | |
| 127 | + resetPagination = true; | |
| 128 | + page = 0; | |
| 129 | + query(); | |
| 130 | + return false; | |
| 131 | + }); | |
| 132 | + | |
| 133 | + var resetPagination = true; | |
| 134 | + var pagination = function(pages, currentPage) { | |
| 135 | + //分页 | |
| 136 | + $('.pagination-holder', wrap).pagination({ | |
| 137 | + pages: pages, | |
| 138 | + currentPage: currentPage, | |
| 139 | + cssStyle: 'light-theme', | |
| 140 | + onPageClick: function (pageNumber, e) { | |
| 141 | + e.stopPropagation(); | |
| 142 | + page = pageNumber - 1; | |
| 143 | + query(); | |
| 144 | + return false; | |
| 145 | + } | |
| 146 | + }); | |
| 147 | + resetPagination = false; | |
| 148 | + }; | |
| 149 | + | |
| 150 | + function joins(roles) { | |
| 151 | + var str = ''; | |
| 152 | + $.each(roles, function () { | |
| 153 | + str += (this['roleName'] + ','); | |
| 154 | + }); | |
| 155 | + | |
| 156 | + return str.substr(0, str.length - 1); | |
| 157 | + } | |
| 158 | + | |
| 159 | + //添加用户 | |
| 160 | + $('#add_user_btn', wrap).on('click', function () { | |
| 161 | + gb_common.open_modal('/pages/system_manager/user/add.html', '添加用户'); | |
| 162 | + }); | |
| 163 | + | |
| 164 | + | |
| 165 | + //初始化公司——>分公司(2 -带总公司) | |
| 166 | + var comp = $('[name=company_eq]', wrap); | |
| 167 | + var fgsComp = $('[name=fgsCompany_eq]', wrap); | |
| 168 | + gb_common.companySelect2(comp, fgsComp); | |
| 169 | + comp.prepend('<option value="" selected>请选择...</option>').trigger('change'); | |
| 170 | + | |
| 171 | + | |
| 172 | + $(wrap).on('refresh', function (e, data) { | |
| 173 | + if(data && data['resetPagination']){ | |
| 174 | + resetPagination = true; | |
| 175 | + page = 0; | |
| 176 | + } | |
| 177 | + query(); | |
| 178 | + }); | |
| 179 | + | |
| 180 | + //edit icon click | |
| 181 | + $(wrap).on('click', '.edit_icon', function () { | |
| 182 | + var code = $(this).data('code'); | |
| 183 | + gb_common.open_modal('/pages/system_manager/user/edit.html', ' 编辑', {code: code}); | |
| 184 | + }); | |
| 185 | + })(); | |
| 186 | + </script> | |
| 187 | +</div> | |
| 0 | 188 | \ No newline at end of file | ... | ... |