diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..3729ff0 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,25 @@ +**/.classpath +**/.dockerignore +**/.env +**/.git +**/.gitignore +**/.project +**/.settings +**/.toolstarget +**/.vs +**/.vscode +**/*.*proj.user +**/*.dbmdl +**/*.jfm +**/azds.yaml +**/bin +**/charts +**/docker-compose* +**/Dockerfile* +**/node_modules +**/npm-debug.log +**/obj +**/secrets.dev.yaml +**/values.dev.yaml +LICENSE +README.md \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b43ad92 --- /dev/null +++ b/.gitignore @@ -0,0 +1,20 @@ +# Build and Release Folders +bin-debug/ +bin-release/ +[Oo]bj/ +[Bb]in/ + +# Other files and folders +.settings/ + +# Executables +*.swf +*.air +*.ipa +*.apk + +# Project files, i.e. `.project`, `.actionScriptProperties` and `.flexProperties` +# should NOT be excluded as they contain compiler settings and other important +# information for Eclipse / Flash Builder. +/LK/appsettings.json +/LK/appsettings.json diff --git a/.vs/IoTGateway/DesignTimeBuild/.dtbcache.v2 b/.vs/IoTGateway/DesignTimeBuild/.dtbcache.v2 new file mode 100644 index 0000000..6dfe2b3 Binary files /dev/null and b/.vs/IoTGateway/DesignTimeBuild/.dtbcache.v2 differ diff --git a/.vs/IoTGateway/config/applicationhost.config b/.vs/IoTGateway/config/applicationhost.config new file mode 100644 index 0000000..bd44eab --- /dev/null +++ b/.vs/IoTGateway/config/applicationhost.config @@ -0,0 +1,1025 @@ + + + + + + + +
+
+
+
+
+
+
+
+ + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+ +
+
+ +
+
+ +
+
+
+ + +
+
+
+
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.vs/IoTGateway/project-colors.json b/.vs/IoTGateway/project-colors.json new file mode 100644 index 0000000..f8a58d0 --- /dev/null +++ b/.vs/IoTGateway/project-colors.json @@ -0,0 +1,41 @@ +{ + "Version": 1, + "ProjectMap": { + "61d79f77-09ef-4a98-a50b-043b1d72c111": { + "ProjectGuid": "61d79f77-09ef-4a98-a50b-043b1d72c111", + "DisplayName": "Plugin", + "ColorIndex": 0 + }, + "68abbdf2-1485-4756-9a94-6afa874d69a3": { + "ProjectGuid": "68abbdf2-1485-4756-9a94-6afa874d69a3", + "DisplayName": "IoTGateway", + "ColorIndex": 1 + }, + "00e91fc1-d5cf-416a-aaaf-61567e368dcd": { + "ProjectGuid": "00e91fc1-d5cf-416a-aaaf-61567e368dcd", + "DisplayName": "IoTGateway.ViewModel", + "ColorIndex": 2 + }, + "9e7c8c77-643f-45cf-8edc-5b032c51d563": { + "ProjectGuid": "9e7c8c77-643f-45cf-8edc-5b032c51d563", + "DisplayName": "IoTGateway.DataAccess", + "ColorIndex": 3 + }, + "c2978e5d-e71e-4882-8ef1-4014e8565a77": { + "ProjectGuid": "c2978e5d-e71e-4882-8ef1-4014e8565a77", + "DisplayName": "IoTGateway.Model", + "ColorIndex": 4 + }, + "7b432fc9-57e6-44bf-b8a7-2a1fb31d6add": { + "ProjectGuid": "7b432fc9-57e6-44bf-b8a7-2a1fb31d6add", + "DisplayName": "DriverModbusTCP", + "ColorIndex": 5 + }, + "16f2c5cc-d881-4fdf-82de-d6df3525d65d": { + "ProjectGuid": "16f2c5cc-d881-4fdf-82de-d6df3525d65d", + "DisplayName": "IoTGateway.Test", + "ColorIndex": 6 + } + }, + "NextColorIndex": 7 +} \ No newline at end of file diff --git a/.vs/IoTGateway/v16/.suo b/.vs/IoTGateway/v16/.suo new file mode 100644 index 0000000..d1925cc Binary files /dev/null and b/.vs/IoTGateway/v16/.suo differ diff --git a/.vs/IoTGateway/v17/.futdcache.v1 b/.vs/IoTGateway/v17/.futdcache.v1 new file mode 100644 index 0000000..ec81832 Binary files /dev/null and b/.vs/IoTGateway/v17/.futdcache.v1 differ diff --git a/.vs/IoTGateway/v17/.suo b/.vs/IoTGateway/v17/.suo new file mode 100644 index 0000000..f7b2e7b Binary files /dev/null and b/.vs/IoTGateway/v17/.suo differ diff --git a/.vs/IoTGateway/v17/TestStore/0/007.testlog b/.vs/IoTGateway/v17/TestStore/0/007.testlog new file mode 100644 index 0000000..3f0c85c Binary files /dev/null and b/.vs/IoTGateway/v17/TestStore/0/007.testlog differ diff --git a/.vs/IoTGateway/v17/TestStore/0/testlog.manifest b/.vs/IoTGateway/v17/TestStore/0/testlog.manifest new file mode 100644 index 0000000..006f9b0 Binary files /dev/null and b/.vs/IoTGateway/v17/TestStore/0/testlog.manifest differ diff --git a/.vs/IoTGateway/v17/fileList.bin b/.vs/IoTGateway/v17/fileList.bin new file mode 100644 index 0000000..ffcb6e7 Binary files /dev/null and b/.vs/IoTGateway/v17/fileList.bin differ diff --git a/IoTGateway.DataAccess/DataContext.cs b/IoTGateway.DataAccess/DataContext.cs new file mode 100644 index 0000000..55bd93f --- /dev/null +++ b/IoTGateway.DataAccess/DataContext.cs @@ -0,0 +1,86 @@ +using System.Linq; +using System.Threading.Tasks; +using IoTGateway.Model; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Design; +using WalkingTec.Mvvm.Core; + +namespace IoTGateway.DataAccess +{ + public class DataContext : FrameworkContext + { + public DbSet FrameworkUsers { get; set; } + public DbSet Devices { get; set; } + public DbSet DeviceConfigs { get; set; } + public DbSet DeviceVariables { get; set; } + public DbSet Drivers { get; set; } + public DbSet SystemConfig { get; set; } + + + public DataContext(CS cs) + : base(cs) + { + } + + public DataContext(string cs, DBTypeEnum dbtype) + : base(cs, dbtype) + { + } + + public DataContext(string cs, DBTypeEnum dbtype, string version = null) + : base(cs, dbtype, version) + { + } + + + public DataContext(DbContextOptions options) : base(options) { } + + public override async Task DataInit(object allModules, bool IsSpa) + { + var state = await base.DataInit(allModules, IsSpa); + bool emptydb = false; + try + { + emptydb = Set().Count() == 0 && Set().Count() == 0; + } + catch { } + if (state == true || emptydb == true) + { + //when state is true, means it's the first time EF create database, do data init here + //当state是true的时候,表示这是第一次创建数据库,可以在这里进行数据初始化 + var user = new FrameworkUser + { + ITCode = "admin", + Password = Utils.GetMD5String("000000"), + IsValid = true, + Name = "Admin" + }; + + var userrole = new FrameworkUserRole + { + UserCode = user.ITCode, + RoleCode = "001" + }; + + Set().Add(user); + Set().Add(userrole); + await SaveChangesAsync(); + } + return state; + } + + } + + /// + /// DesignTimeFactory for EF Migration, use your full connection string, + /// EF will find this class and use the connection defined here to run Add-Migration and Update-Database + /// + public class DataContextFactory : IDesignTimeDbContextFactory + { + public DataContext CreateDbContext(string[] args) + { + return new DataContext("Data Source = ../IoTGateway/iotgateway.db", DBTypeEnum.SQLite); + } + } + +} diff --git a/IoTGateway.DataAccess/IoTGateway.DataAccess.csproj b/IoTGateway.DataAccess/IoTGateway.DataAccess.csproj new file mode 100644 index 0000000..338af31 --- /dev/null +++ b/IoTGateway.DataAccess/IoTGateway.DataAccess.csproj @@ -0,0 +1,24 @@ + + + + net5.0 + true + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + diff --git a/IoTGateway.DataAccess/Migrations/20211209085327_ini.Designer.cs b/IoTGateway.DataAccess/Migrations/20211209085327_ini.Designer.cs new file mode 100644 index 0000000..01403ef --- /dev/null +++ b/IoTGateway.DataAccess/Migrations/20211209085327_ini.Designer.cs @@ -0,0 +1,794 @@ +// +using System; +using IoTGateway.DataAccess; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +namespace IoTGateway.DataAccess.Migrations +{ + [DbContext(typeof(DataContext))] + [Migration("20211209085327_ini")] + partial class ini + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "5.0.9"); + + modelBuilder.Entity("IoTGateway.Model.Device", b => + { + b.Property("ID") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("AutoStart") + .HasColumnType("INTEGER"); + + b.Property("CreateBy") + .HasColumnType("TEXT"); + + b.Property("CreateTime") + .HasColumnType("TEXT"); + + b.Property("Description") + .HasColumnType("TEXT"); + + b.Property("DeviceName") + .HasColumnType("TEXT"); + + b.Property("DeviceTypeEnum") + .HasColumnType("INTEGER"); + + b.Property("DriverId") + .HasColumnType("TEXT"); + + b.Property("Index") + .HasColumnType("INTEGER"); + + b.Property("ParentId") + .HasColumnType("TEXT"); + + b.Property("UpdateBy") + .HasColumnType("TEXT"); + + b.Property("UpdateTime") + .HasColumnType("TEXT"); + + b.HasKey("ID"); + + b.HasIndex("DriverId"); + + b.HasIndex("ParentId"); + + b.ToTable("Devices"); + }); + + modelBuilder.Entity("IoTGateway.Model.DeviceConfig", b => + { + b.Property("ID") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("CreateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("CreateTime") + .HasColumnType("TEXT"); + + b.Property("Description") + .HasColumnType("TEXT"); + + b.Property("DeviceConfigName") + .HasColumnType("TEXT"); + + b.Property("DeviceId") + .HasColumnType("TEXT"); + + b.Property("EnumInfo") + .HasColumnType("TEXT"); + + b.Property("UpdateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("UpdateTime") + .HasColumnType("TEXT"); + + b.Property("Value") + .HasColumnType("TEXT"); + + b.HasKey("ID"); + + b.HasIndex("DeviceId"); + + b.ToTable("DeviceConfigs"); + }); + + modelBuilder.Entity("IoTGateway.Model.DeviceVariable", b => + { + b.Property("ID") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("DataType") + .HasColumnType("INTEGER"); + + b.Property("Description") + .HasColumnType("TEXT"); + + b.Property("DeviceAddress") + .HasColumnType("TEXT"); + + b.Property("DeviceId") + .HasColumnType("TEXT"); + + b.Property("Method") + .HasColumnType("TEXT"); + + b.Property("Name") + .HasColumnType("TEXT"); + + b.Property("ProtectType") + .HasColumnType("INTEGER"); + + b.Property("ValueFactor") + .HasColumnType("REAL"); + + b.HasKey("ID"); + + b.HasIndex("DeviceId"); + + b.ToTable("DeviceVariables"); + }); + + modelBuilder.Entity("IoTGateway.Model.Driver", b => + { + b.Property("ID") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("AssembleName") + .HasColumnType("TEXT"); + + b.Property("AuthorizesNum") + .HasColumnType("INTEGER"); + + b.Property("CreateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("CreateTime") + .HasColumnType("TEXT"); + + b.Property("DriverName") + .HasColumnType("TEXT"); + + b.Property("FileName") + .HasColumnType("TEXT"); + + b.Property("UpdateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("UpdateTime") + .HasColumnType("TEXT"); + + b.HasKey("ID"); + + b.ToTable("Drivers"); + }); + + modelBuilder.Entity("IoTGateway.Model.SystemConfig", b => + { + b.Property("ID") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("CreateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("CreateTime") + .HasColumnType("TEXT"); + + b.Property("GatewayName") + .HasColumnType("TEXT"); + + b.Property("MqttIp") + .HasColumnType("TEXT"); + + b.Property("MqttPort") + .HasColumnType("INTEGER"); + + b.Property("MqttUName") + .HasColumnType("TEXT"); + + b.Property("MqttUPwd") + .HasColumnType("TEXT"); + + b.Property("UpdateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("UpdateTime") + .HasColumnType("TEXT"); + + b.HasKey("ID"); + + b.ToTable("SystemConfig"); + }); + + modelBuilder.Entity("WalkingTec.Mvvm.Core.ActionLog", b => + { + b.Property("ID") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("ActionName") + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.Property("ActionTime") + .HasColumnType("TEXT"); + + b.Property("ActionUrl") + .HasMaxLength(250) + .HasColumnType("TEXT"); + + b.Property("CreateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("CreateTime") + .HasColumnType("TEXT"); + + b.Property("Duration") + .HasColumnType("REAL"); + + b.Property("IP") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("ITCode") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("LogType") + .HasColumnType("INTEGER"); + + b.Property("ModuleName") + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.Property("Remark") + .HasColumnType("TEXT"); + + b.Property("UpdateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("UpdateTime") + .HasColumnType("TEXT"); + + b.HasKey("ID"); + + b.ToTable("ActionLogs"); + }); + + modelBuilder.Entity("WalkingTec.Mvvm.Core.DataPrivilege", b => + { + b.Property("ID") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("CreateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("CreateTime") + .HasColumnType("TEXT"); + + b.Property("Domain") + .HasColumnType("TEXT"); + + b.Property("GroupCode") + .HasColumnType("TEXT"); + + b.Property("RelateId") + .HasColumnType("TEXT"); + + b.Property("TableName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("UpdateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("UpdateTime") + .HasColumnType("TEXT"); + + b.Property("UserCode") + .HasColumnType("TEXT"); + + b.HasKey("ID"); + + b.ToTable("DataPrivileges"); + }); + + modelBuilder.Entity("WalkingTec.Mvvm.Core.FileAttachment", b => + { + b.Property("ID") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("ExtraInfo") + .HasColumnType("TEXT"); + + b.Property("FileData") + .HasColumnType("BLOB"); + + b.Property("FileExt") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("TEXT"); + + b.Property("FileName") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("HandlerInfo") + .HasColumnType("TEXT"); + + b.Property("Length") + .HasColumnType("INTEGER"); + + b.Property("Path") + .HasColumnType("TEXT"); + + b.Property("SaveMode") + .HasColumnType("TEXT"); + + b.Property("UploadTime") + .HasColumnType("TEXT"); + + b.HasKey("ID"); + + b.ToTable("FileAttachments"); + }); + + modelBuilder.Entity("WalkingTec.Mvvm.Core.FrameworkGroup", b => + { + b.Property("ID") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("CreateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("CreateTime") + .HasColumnType("TEXT"); + + b.Property("GroupCode") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("GroupRemark") + .HasColumnType("TEXT"); + + b.Property("TenantCode") + .HasColumnType("TEXT"); + + b.Property("UpdateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("UpdateTime") + .HasColumnType("TEXT"); + + b.HasKey("ID"); + + b.ToTable("FrameworkGroups"); + }); + + modelBuilder.Entity("WalkingTec.Mvvm.Core.FrameworkMenu", b => + { + b.Property("ID") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("ActionName") + .HasColumnType("TEXT"); + + b.Property("ClassName") + .HasColumnType("TEXT"); + + b.Property("DisplayOrder") + .IsRequired() + .HasColumnType("INTEGER"); + + b.Property("Domain") + .HasColumnType("TEXT"); + + b.Property("FolderOnly") + .HasColumnType("INTEGER"); + + b.Property("Icon") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("IsInherit") + .HasColumnType("INTEGER"); + + b.Property("IsInside") + .IsRequired() + .HasColumnType("INTEGER"); + + b.Property("IsPublic") + .HasColumnType("INTEGER"); + + b.Property("MethodName") + .HasColumnType("TEXT"); + + b.Property("ModuleName") + .HasColumnType("TEXT"); + + b.Property("PageName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("ParentId") + .HasColumnType("TEXT"); + + b.Property("ShowOnMenu") + .HasColumnType("INTEGER"); + + b.Property("Url") + .HasColumnType("TEXT"); + + b.HasKey("ID"); + + b.HasIndex("ParentId"); + + b.ToTable("FrameworkMenus"); + }); + + modelBuilder.Entity("WalkingTec.Mvvm.Core.FrameworkRole", b => + { + b.Property("ID") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("CreateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("CreateTime") + .HasColumnType("TEXT"); + + b.Property("RoleCode") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("RoleName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("RoleRemark") + .HasColumnType("TEXT"); + + b.Property("TenantCode") + .HasColumnType("TEXT"); + + b.Property("UpdateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("UpdateTime") + .HasColumnType("TEXT"); + + b.HasKey("ID"); + + b.ToTable("FrameworkRoles"); + }); + + modelBuilder.Entity("WalkingTec.Mvvm.Core.FrameworkUser", b => + { + b.Property("ID") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("Address") + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("CellPhone") + .HasColumnType("TEXT"); + + b.Property("CreateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("CreateTime") + .HasColumnType("TEXT"); + + b.Property("Email") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("Gender") + .HasColumnType("INTEGER"); + + b.Property("HomePhone") + .HasMaxLength(30) + .HasColumnType("TEXT"); + + b.Property("ITCode") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("IsValid") + .HasColumnType("INTEGER"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("PhotoId") + .HasColumnType("TEXT"); + + b.Property("TenantCode") + .HasColumnType("TEXT"); + + b.Property("UpdateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("UpdateTime") + .HasColumnType("TEXT"); + + b.Property("ZipCode") + .HasColumnType("TEXT"); + + b.HasKey("ID"); + + b.HasIndex("PhotoId"); + + b.ToTable("FrameworkUsers"); + }); + + modelBuilder.Entity("WalkingTec.Mvvm.Core.FrameworkUserGroup", b => + { + b.Property("ID") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("CreateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("CreateTime") + .HasColumnType("TEXT"); + + b.Property("GroupCode") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("UpdateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("UpdateTime") + .HasColumnType("TEXT"); + + b.Property("UserCode") + .IsRequired() + .HasColumnType("TEXT"); + + b.HasKey("ID"); + + b.ToTable("FrameworkUserGroups"); + }); + + modelBuilder.Entity("WalkingTec.Mvvm.Core.FrameworkUserRole", b => + { + b.Property("ID") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("CreateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("CreateTime") + .HasColumnType("TEXT"); + + b.Property("RoleCode") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("UpdateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("UpdateTime") + .HasColumnType("TEXT"); + + b.Property("UserCode") + .IsRequired() + .HasColumnType("TEXT"); + + b.HasKey("ID"); + + b.ToTable("FrameworkUserRoles"); + }); + + modelBuilder.Entity("WalkingTec.Mvvm.Core.FunctionPrivilege", b => + { + b.Property("ID") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("Allowed") + .IsRequired() + .HasColumnType("INTEGER"); + + b.Property("CreateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("CreateTime") + .HasColumnType("TEXT"); + + b.Property("MenuItemId") + .HasColumnType("TEXT"); + + b.Property("RoleCode") + .HasColumnType("TEXT"); + + b.Property("UpdateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("UpdateTime") + .HasColumnType("TEXT"); + + b.HasKey("ID"); + + b.HasIndex("MenuItemId"); + + b.ToTable("FunctionPrivileges"); + }); + + modelBuilder.Entity("WalkingTec.Mvvm.Core.PersistedGrant", b => + { + b.Property("ID") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("CreationTime") + .HasColumnType("TEXT"); + + b.Property("Expiration") + .HasColumnType("TEXT"); + + b.Property("RefreshToken") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("UserCode") + .HasColumnType("TEXT"); + + b.HasKey("ID"); + + b.ToTable("PersistedGrants"); + }); + + modelBuilder.Entity("IoTGateway.Model.Device", b => + { + b.HasOne("IoTGateway.Model.Driver", "Driver") + .WithMany() + .HasForeignKey("DriverId"); + + b.HasOne("IoTGateway.Model.Device", "Parent") + .WithMany("Children") + .HasForeignKey("ParentId"); + + b.Navigation("Driver"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("IoTGateway.Model.DeviceConfig", b => + { + b.HasOne("IoTGateway.Model.Device", "Device") + .WithMany("DeviceConfigs") + .HasForeignKey("DeviceId"); + + b.Navigation("Device"); + }); + + modelBuilder.Entity("IoTGateway.Model.DeviceVariable", b => + { + b.HasOne("IoTGateway.Model.Device", "Device") + .WithMany("DeviceVariables") + .HasForeignKey("DeviceId"); + + b.Navigation("Device"); + }); + + modelBuilder.Entity("WalkingTec.Mvvm.Core.FrameworkMenu", b => + { + b.HasOne("WalkingTec.Mvvm.Core.FrameworkMenu", "Parent") + .WithMany("Children") + .HasForeignKey("ParentId"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("WalkingTec.Mvvm.Core.FrameworkUser", b => + { + b.HasOne("WalkingTec.Mvvm.Core.FileAttachment", "Photo") + .WithMany() + .HasForeignKey("PhotoId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("Photo"); + }); + + modelBuilder.Entity("WalkingTec.Mvvm.Core.FunctionPrivilege", b => + { + b.HasOne("WalkingTec.Mvvm.Core.FrameworkMenu", "MenuItem") + .WithMany("Privileges") + .HasForeignKey("MenuItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("MenuItem"); + }); + + modelBuilder.Entity("IoTGateway.Model.Device", b => + { + b.Navigation("Children"); + + b.Navigation("DeviceConfigs"); + + b.Navigation("DeviceVariables"); + }); + + modelBuilder.Entity("WalkingTec.Mvvm.Core.FrameworkMenu", b => + { + b.Navigation("Children"); + + b.Navigation("Privileges"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/IoTGateway.DataAccess/Migrations/20211209085327_ini.cs b/IoTGateway.DataAccess/Migrations/20211209085327_ini.cs new file mode 100644 index 0000000..d73d422 --- /dev/null +++ b/IoTGateway.DataAccess/Migrations/20211209085327_ini.cs @@ -0,0 +1,462 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +namespace IoTGateway.DataAccess.Migrations +{ + public partial class ini : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "ActionLogs", + columns: table => new + { + ID = table.Column(type: "TEXT", nullable: false), + ModuleName = table.Column(type: "TEXT", maxLength: 255, nullable: true), + ActionName = table.Column(type: "TEXT", maxLength: 255, nullable: true), + ITCode = table.Column(type: "TEXT", maxLength: 50, nullable: true), + ActionUrl = table.Column(type: "TEXT", maxLength: 250, nullable: true), + ActionTime = table.Column(type: "TEXT", nullable: false), + Duration = table.Column(type: "REAL", nullable: false), + Remark = table.Column(type: "TEXT", nullable: true), + IP = table.Column(type: "TEXT", maxLength: 50, nullable: true), + LogType = table.Column(type: "INTEGER", nullable: false), + CreateTime = table.Column(type: "TEXT", nullable: true), + CreateBy = table.Column(type: "TEXT", maxLength: 50, nullable: true), + UpdateTime = table.Column(type: "TEXT", nullable: true), + UpdateBy = table.Column(type: "TEXT", maxLength: 50, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_ActionLogs", x => x.ID); + }); + + migrationBuilder.CreateTable( + name: "DataPrivileges", + columns: table => new + { + ID = table.Column(type: "TEXT", nullable: false), + UserCode = table.Column(type: "TEXT", nullable: true), + GroupCode = table.Column(type: "TEXT", nullable: true), + TableName = table.Column(type: "TEXT", maxLength: 50, nullable: false), + RelateId = table.Column(type: "TEXT", nullable: true), + Domain = table.Column(type: "TEXT", nullable: true), + CreateTime = table.Column(type: "TEXT", nullable: true), + CreateBy = table.Column(type: "TEXT", maxLength: 50, nullable: true), + UpdateTime = table.Column(type: "TEXT", nullable: true), + UpdateBy = table.Column(type: "TEXT", maxLength: 50, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_DataPrivileges", x => x.ID); + }); + + migrationBuilder.CreateTable( + name: "Drivers", + columns: table => new + { + ID = table.Column(type: "TEXT", nullable: false), + DriverName = table.Column(type: "TEXT", nullable: true), + FileName = table.Column(type: "TEXT", nullable: true), + AssembleName = table.Column(type: "TEXT", nullable: true), + AuthorizesNum = table.Column(type: "INTEGER", nullable: false), + CreateTime = table.Column(type: "TEXT", nullable: true), + CreateBy = table.Column(type: "TEXT", maxLength: 50, nullable: true), + UpdateTime = table.Column(type: "TEXT", nullable: true), + UpdateBy = table.Column(type: "TEXT", maxLength: 50, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Drivers", x => x.ID); + }); + + migrationBuilder.CreateTable( + name: "FileAttachments", + columns: table => new + { + ID = table.Column(type: "TEXT", nullable: false), + FileName = table.Column(type: "TEXT", nullable: false), + FileExt = table.Column(type: "TEXT", maxLength: 10, nullable: false), + Path = table.Column(type: "TEXT", nullable: true), + Length = table.Column(type: "INTEGER", nullable: false), + UploadTime = table.Column(type: "TEXT", nullable: false), + SaveMode = table.Column(type: "TEXT", nullable: true), + FileData = table.Column(type: "BLOB", nullable: true), + ExtraInfo = table.Column(type: "TEXT", nullable: true), + HandlerInfo = table.Column(type: "TEXT", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FileAttachments", x => x.ID); + }); + + migrationBuilder.CreateTable( + name: "FrameworkGroups", + columns: table => new + { + ID = table.Column(type: "TEXT", nullable: false), + GroupCode = table.Column(type: "TEXT", maxLength: 100, nullable: false), + GroupName = table.Column(type: "TEXT", maxLength: 50, nullable: false), + GroupRemark = table.Column(type: "TEXT", nullable: true), + TenantCode = table.Column(type: "TEXT", nullable: true), + CreateTime = table.Column(type: "TEXT", nullable: true), + CreateBy = table.Column(type: "TEXT", maxLength: 50, nullable: true), + UpdateTime = table.Column(type: "TEXT", nullable: true), + UpdateBy = table.Column(type: "TEXT", maxLength: 50, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FrameworkGroups", x => x.ID); + }); + + migrationBuilder.CreateTable( + name: "FrameworkMenus", + columns: table => new + { + ID = table.Column(type: "TEXT", nullable: false), + PageName = table.Column(type: "TEXT", maxLength: 50, nullable: false), + ActionName = table.Column(type: "TEXT", nullable: true), + ModuleName = table.Column(type: "TEXT", nullable: true), + FolderOnly = table.Column(type: "INTEGER", nullable: false), + IsInherit = table.Column(type: "INTEGER", nullable: false), + ClassName = table.Column(type: "TEXT", nullable: true), + MethodName = table.Column(type: "TEXT", nullable: true), + Domain = table.Column(type: "TEXT", nullable: true), + ShowOnMenu = table.Column(type: "INTEGER", nullable: false), + IsPublic = table.Column(type: "INTEGER", nullable: false), + DisplayOrder = table.Column(type: "INTEGER", nullable: false), + IsInside = table.Column(type: "INTEGER", nullable: false), + Url = table.Column(type: "TEXT", nullable: true), + Icon = table.Column(type: "TEXT", maxLength: 50, nullable: true), + ParentId = table.Column(type: "TEXT", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FrameworkMenus", x => x.ID); + table.ForeignKey( + name: "FK_FrameworkMenus_FrameworkMenus_ParentId", + column: x => x.ParentId, + principalTable: "FrameworkMenus", + principalColumn: "ID", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "FrameworkRoles", + columns: table => new + { + ID = table.Column(type: "TEXT", nullable: false), + RoleCode = table.Column(type: "TEXT", maxLength: 100, nullable: false), + RoleName = table.Column(type: "TEXT", maxLength: 50, nullable: false), + RoleRemark = table.Column(type: "TEXT", nullable: true), + TenantCode = table.Column(type: "TEXT", nullable: true), + CreateTime = table.Column(type: "TEXT", nullable: true), + CreateBy = table.Column(type: "TEXT", maxLength: 50, nullable: true), + UpdateTime = table.Column(type: "TEXT", nullable: true), + UpdateBy = table.Column(type: "TEXT", maxLength: 50, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FrameworkRoles", x => x.ID); + }); + + migrationBuilder.CreateTable( + name: "FrameworkUserGroups", + columns: table => new + { + ID = table.Column(type: "TEXT", nullable: false), + UserCode = table.Column(type: "TEXT", nullable: false), + GroupCode = table.Column(type: "TEXT", nullable: false), + CreateTime = table.Column(type: "TEXT", nullable: true), + CreateBy = table.Column(type: "TEXT", maxLength: 50, nullable: true), + UpdateTime = table.Column(type: "TEXT", nullable: true), + UpdateBy = table.Column(type: "TEXT", maxLength: 50, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FrameworkUserGroups", x => x.ID); + }); + + migrationBuilder.CreateTable( + name: "FrameworkUserRoles", + columns: table => new + { + ID = table.Column(type: "TEXT", nullable: false), + UserCode = table.Column(type: "TEXT", nullable: false), + RoleCode = table.Column(type: "TEXT", nullable: false), + CreateTime = table.Column(type: "TEXT", nullable: true), + CreateBy = table.Column(type: "TEXT", maxLength: 50, nullable: true), + UpdateTime = table.Column(type: "TEXT", nullable: true), + UpdateBy = table.Column(type: "TEXT", maxLength: 50, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FrameworkUserRoles", x => x.ID); + }); + + migrationBuilder.CreateTable( + name: "PersistedGrants", + columns: table => new + { + ID = table.Column(type: "TEXT", nullable: false), + Type = table.Column(type: "TEXT", maxLength: 50, nullable: true), + UserCode = table.Column(type: "TEXT", nullable: true), + CreationTime = table.Column(type: "TEXT", nullable: false), + Expiration = table.Column(type: "TEXT", nullable: false), + RefreshToken = table.Column(type: "TEXT", maxLength: 50, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_PersistedGrants", x => x.ID); + }); + + migrationBuilder.CreateTable( + name: "SystemConfig", + columns: table => new + { + ID = table.Column(type: "TEXT", nullable: false), + GatewayName = table.Column(type: "TEXT", nullable: true), + MqttIp = table.Column(type: "TEXT", nullable: true), + MqttPort = table.Column(type: "INTEGER", nullable: false), + MqttUName = table.Column(type: "TEXT", nullable: true), + MqttUPwd = table.Column(type: "TEXT", nullable: true), + CreateTime = table.Column(type: "TEXT", nullable: true), + CreateBy = table.Column(type: "TEXT", maxLength: 50, nullable: true), + UpdateTime = table.Column(type: "TEXT", nullable: true), + UpdateBy = table.Column(type: "TEXT", maxLength: 50, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_SystemConfig", x => x.ID); + }); + + migrationBuilder.CreateTable( + name: "Devices", + columns: table => new + { + ID = table.Column(type: "TEXT", nullable: false), + DeviceName = table.Column(type: "TEXT", nullable: true), + Index = table.Column(type: "INTEGER", nullable: false), + Description = table.Column(type: "TEXT", nullable: true), + DriverId = table.Column(type: "TEXT", nullable: true), + AutoStart = table.Column(type: "INTEGER", nullable: false), + DeviceTypeEnum = table.Column(type: "INTEGER", nullable: false), + CreateTime = table.Column(type: "TEXT", nullable: true), + CreateBy = table.Column(type: "TEXT", nullable: true), + UpdateTime = table.Column(type: "TEXT", nullable: true), + UpdateBy = table.Column(type: "TEXT", nullable: true), + ParentId = table.Column(type: "TEXT", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Devices", x => x.ID); + table.ForeignKey( + name: "FK_Devices_Devices_ParentId", + column: x => x.ParentId, + principalTable: "Devices", + principalColumn: "ID", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_Devices_Drivers_DriverId", + column: x => x.DriverId, + principalTable: "Drivers", + principalColumn: "ID", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "FrameworkUsers", + columns: table => new + { + ID = table.Column(type: "TEXT", nullable: false), + Email = table.Column(type: "TEXT", maxLength: 50, nullable: true), + Gender = table.Column(type: "INTEGER", nullable: true), + CellPhone = table.Column(type: "TEXT", nullable: true), + HomePhone = table.Column(type: "TEXT", maxLength: 30, nullable: true), + Address = table.Column(type: "TEXT", maxLength: 200, nullable: true), + ZipCode = table.Column(type: "TEXT", nullable: true), + CreateTime = table.Column(type: "TEXT", nullable: true), + CreateBy = table.Column(type: "TEXT", maxLength: 50, nullable: true), + UpdateTime = table.Column(type: "TEXT", nullable: true), + UpdateBy = table.Column(type: "TEXT", maxLength: 50, nullable: true), + ITCode = table.Column(type: "TEXT", maxLength: 50, nullable: false), + Password = table.Column(type: "TEXT", maxLength: 32, nullable: false), + Name = table.Column(type: "TEXT", maxLength: 50, nullable: false), + IsValid = table.Column(type: "INTEGER", nullable: false), + PhotoId = table.Column(type: "TEXT", nullable: true), + TenantCode = table.Column(type: "TEXT", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FrameworkUsers", x => x.ID); + table.ForeignKey( + name: "FK_FrameworkUsers_FileAttachments_PhotoId", + column: x => x.PhotoId, + principalTable: "FileAttachments", + principalColumn: "ID", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "FunctionPrivileges", + columns: table => new + { + ID = table.Column(type: "TEXT", nullable: false), + RoleCode = table.Column(type: "TEXT", nullable: true), + MenuItemId = table.Column(type: "TEXT", nullable: false), + Allowed = table.Column(type: "INTEGER", nullable: false), + CreateTime = table.Column(type: "TEXT", nullable: true), + CreateBy = table.Column(type: "TEXT", maxLength: 50, nullable: true), + UpdateTime = table.Column(type: "TEXT", nullable: true), + UpdateBy = table.Column(type: "TEXT", maxLength: 50, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FunctionPrivileges", x => x.ID); + table.ForeignKey( + name: "FK_FunctionPrivileges_FrameworkMenus_MenuItemId", + column: x => x.MenuItemId, + principalTable: "FrameworkMenus", + principalColumn: "ID", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "DeviceConfigs", + columns: table => new + { + ID = table.Column(type: "TEXT", nullable: false), + DeviceConfigName = table.Column(type: "TEXT", nullable: true), + Description = table.Column(type: "TEXT", nullable: true), + Value = table.Column(type: "TEXT", nullable: true), + EnumInfo = table.Column(type: "TEXT", nullable: true), + DeviceId = table.Column(type: "TEXT", nullable: true), + CreateTime = table.Column(type: "TEXT", nullable: true), + CreateBy = table.Column(type: "TEXT", maxLength: 50, nullable: true), + UpdateTime = table.Column(type: "TEXT", nullable: true), + UpdateBy = table.Column(type: "TEXT", maxLength: 50, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_DeviceConfigs", x => x.ID); + table.ForeignKey( + name: "FK_DeviceConfigs_Devices_DeviceId", + column: x => x.DeviceId, + principalTable: "Devices", + principalColumn: "ID", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "DeviceVariables", + columns: table => new + { + ID = table.Column(type: "TEXT", nullable: false), + Name = table.Column(type: "TEXT", nullable: true), + Description = table.Column(type: "TEXT", nullable: true), + Method = table.Column(type: "TEXT", nullable: true), + DeviceAddress = table.Column(type: "TEXT", nullable: true), + DataType = table.Column(type: "INTEGER", nullable: false), + ValueFactor = table.Column(type: "REAL", nullable: false), + ProtectType = table.Column(type: "INTEGER", nullable: false), + DeviceId = table.Column(type: "TEXT", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_DeviceVariables", x => x.ID); + table.ForeignKey( + name: "FK_DeviceVariables_Devices_DeviceId", + column: x => x.DeviceId, + principalTable: "Devices", + principalColumn: "ID", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateIndex( + name: "IX_DeviceConfigs_DeviceId", + table: "DeviceConfigs", + column: "DeviceId"); + + migrationBuilder.CreateIndex( + name: "IX_Devices_DriverId", + table: "Devices", + column: "DriverId"); + + migrationBuilder.CreateIndex( + name: "IX_Devices_ParentId", + table: "Devices", + column: "ParentId"); + + migrationBuilder.CreateIndex( + name: "IX_DeviceVariables_DeviceId", + table: "DeviceVariables", + column: "DeviceId"); + + migrationBuilder.CreateIndex( + name: "IX_FrameworkMenus_ParentId", + table: "FrameworkMenus", + column: "ParentId"); + + migrationBuilder.CreateIndex( + name: "IX_FrameworkUsers_PhotoId", + table: "FrameworkUsers", + column: "PhotoId"); + + migrationBuilder.CreateIndex( + name: "IX_FunctionPrivileges_MenuItemId", + table: "FunctionPrivileges", + column: "MenuItemId"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "ActionLogs"); + + migrationBuilder.DropTable( + name: "DataPrivileges"); + + migrationBuilder.DropTable( + name: "DeviceConfigs"); + + migrationBuilder.DropTable( + name: "DeviceVariables"); + + migrationBuilder.DropTable( + name: "FrameworkGroups"); + + migrationBuilder.DropTable( + name: "FrameworkRoles"); + + migrationBuilder.DropTable( + name: "FrameworkUserGroups"); + + migrationBuilder.DropTable( + name: "FrameworkUserRoles"); + + migrationBuilder.DropTable( + name: "FrameworkUsers"); + + migrationBuilder.DropTable( + name: "FunctionPrivileges"); + + migrationBuilder.DropTable( + name: "PersistedGrants"); + + migrationBuilder.DropTable( + name: "SystemConfig"); + + migrationBuilder.DropTable( + name: "Devices"); + + migrationBuilder.DropTable( + name: "FileAttachments"); + + migrationBuilder.DropTable( + name: "FrameworkMenus"); + + migrationBuilder.DropTable( + name: "Drivers"); + } + } +} diff --git a/IoTGateway.DataAccess/Migrations/DataContextModelSnapshot.cs b/IoTGateway.DataAccess/Migrations/DataContextModelSnapshot.cs new file mode 100644 index 0000000..a624960 --- /dev/null +++ b/IoTGateway.DataAccess/Migrations/DataContextModelSnapshot.cs @@ -0,0 +1,792 @@ +// +using System; +using IoTGateway.DataAccess; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +namespace IoTGateway.DataAccess.Migrations +{ + [DbContext(typeof(DataContext))] + partial class DataContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "5.0.9"); + + modelBuilder.Entity("IoTGateway.Model.Device", b => + { + b.Property("ID") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("AutoStart") + .HasColumnType("INTEGER"); + + b.Property("CreateBy") + .HasColumnType("TEXT"); + + b.Property("CreateTime") + .HasColumnType("TEXT"); + + b.Property("Description") + .HasColumnType("TEXT"); + + b.Property("DeviceName") + .HasColumnType("TEXT"); + + b.Property("DeviceTypeEnum") + .HasColumnType("INTEGER"); + + b.Property("DriverId") + .HasColumnType("TEXT"); + + b.Property("Index") + .HasColumnType("INTEGER"); + + b.Property("ParentId") + .HasColumnType("TEXT"); + + b.Property("UpdateBy") + .HasColumnType("TEXT"); + + b.Property("UpdateTime") + .HasColumnType("TEXT"); + + b.HasKey("ID"); + + b.HasIndex("DriverId"); + + b.HasIndex("ParentId"); + + b.ToTable("Devices"); + }); + + modelBuilder.Entity("IoTGateway.Model.DeviceConfig", b => + { + b.Property("ID") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("CreateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("CreateTime") + .HasColumnType("TEXT"); + + b.Property("Description") + .HasColumnType("TEXT"); + + b.Property("DeviceConfigName") + .HasColumnType("TEXT"); + + b.Property("DeviceId") + .HasColumnType("TEXT"); + + b.Property("EnumInfo") + .HasColumnType("TEXT"); + + b.Property("UpdateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("UpdateTime") + .HasColumnType("TEXT"); + + b.Property("Value") + .HasColumnType("TEXT"); + + b.HasKey("ID"); + + b.HasIndex("DeviceId"); + + b.ToTable("DeviceConfigs"); + }); + + modelBuilder.Entity("IoTGateway.Model.DeviceVariable", b => + { + b.Property("ID") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("DataType") + .HasColumnType("INTEGER"); + + b.Property("Description") + .HasColumnType("TEXT"); + + b.Property("DeviceAddress") + .HasColumnType("TEXT"); + + b.Property("DeviceId") + .HasColumnType("TEXT"); + + b.Property("Method") + .HasColumnType("TEXT"); + + b.Property("Name") + .HasColumnType("TEXT"); + + b.Property("ProtectType") + .HasColumnType("INTEGER"); + + b.Property("ValueFactor") + .HasColumnType("REAL"); + + b.HasKey("ID"); + + b.HasIndex("DeviceId"); + + b.ToTable("DeviceVariables"); + }); + + modelBuilder.Entity("IoTGateway.Model.Driver", b => + { + b.Property("ID") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("AssembleName") + .HasColumnType("TEXT"); + + b.Property("AuthorizesNum") + .HasColumnType("INTEGER"); + + b.Property("CreateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("CreateTime") + .HasColumnType("TEXT"); + + b.Property("DriverName") + .HasColumnType("TEXT"); + + b.Property("FileName") + .HasColumnType("TEXT"); + + b.Property("UpdateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("UpdateTime") + .HasColumnType("TEXT"); + + b.HasKey("ID"); + + b.ToTable("Drivers"); + }); + + modelBuilder.Entity("IoTGateway.Model.SystemConfig", b => + { + b.Property("ID") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("CreateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("CreateTime") + .HasColumnType("TEXT"); + + b.Property("GatewayName") + .HasColumnType("TEXT"); + + b.Property("MqttIp") + .HasColumnType("TEXT"); + + b.Property("MqttPort") + .HasColumnType("INTEGER"); + + b.Property("MqttUName") + .HasColumnType("TEXT"); + + b.Property("MqttUPwd") + .HasColumnType("TEXT"); + + b.Property("UpdateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("UpdateTime") + .HasColumnType("TEXT"); + + b.HasKey("ID"); + + b.ToTable("SystemConfig"); + }); + + modelBuilder.Entity("WalkingTec.Mvvm.Core.ActionLog", b => + { + b.Property("ID") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("ActionName") + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.Property("ActionTime") + .HasColumnType("TEXT"); + + b.Property("ActionUrl") + .HasMaxLength(250) + .HasColumnType("TEXT"); + + b.Property("CreateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("CreateTime") + .HasColumnType("TEXT"); + + b.Property("Duration") + .HasColumnType("REAL"); + + b.Property("IP") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("ITCode") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("LogType") + .HasColumnType("INTEGER"); + + b.Property("ModuleName") + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.Property("Remark") + .HasColumnType("TEXT"); + + b.Property("UpdateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("UpdateTime") + .HasColumnType("TEXT"); + + b.HasKey("ID"); + + b.ToTable("ActionLogs"); + }); + + modelBuilder.Entity("WalkingTec.Mvvm.Core.DataPrivilege", b => + { + b.Property("ID") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("CreateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("CreateTime") + .HasColumnType("TEXT"); + + b.Property("Domain") + .HasColumnType("TEXT"); + + b.Property("GroupCode") + .HasColumnType("TEXT"); + + b.Property("RelateId") + .HasColumnType("TEXT"); + + b.Property("TableName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("UpdateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("UpdateTime") + .HasColumnType("TEXT"); + + b.Property("UserCode") + .HasColumnType("TEXT"); + + b.HasKey("ID"); + + b.ToTable("DataPrivileges"); + }); + + modelBuilder.Entity("WalkingTec.Mvvm.Core.FileAttachment", b => + { + b.Property("ID") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("ExtraInfo") + .HasColumnType("TEXT"); + + b.Property("FileData") + .HasColumnType("BLOB"); + + b.Property("FileExt") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("TEXT"); + + b.Property("FileName") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("HandlerInfo") + .HasColumnType("TEXT"); + + b.Property("Length") + .HasColumnType("INTEGER"); + + b.Property("Path") + .HasColumnType("TEXT"); + + b.Property("SaveMode") + .HasColumnType("TEXT"); + + b.Property("UploadTime") + .HasColumnType("TEXT"); + + b.HasKey("ID"); + + b.ToTable("FileAttachments"); + }); + + modelBuilder.Entity("WalkingTec.Mvvm.Core.FrameworkGroup", b => + { + b.Property("ID") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("CreateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("CreateTime") + .HasColumnType("TEXT"); + + b.Property("GroupCode") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("GroupRemark") + .HasColumnType("TEXT"); + + b.Property("TenantCode") + .HasColumnType("TEXT"); + + b.Property("UpdateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("UpdateTime") + .HasColumnType("TEXT"); + + b.HasKey("ID"); + + b.ToTable("FrameworkGroups"); + }); + + modelBuilder.Entity("WalkingTec.Mvvm.Core.FrameworkMenu", b => + { + b.Property("ID") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("ActionName") + .HasColumnType("TEXT"); + + b.Property("ClassName") + .HasColumnType("TEXT"); + + b.Property("DisplayOrder") + .IsRequired() + .HasColumnType("INTEGER"); + + b.Property("Domain") + .HasColumnType("TEXT"); + + b.Property("FolderOnly") + .HasColumnType("INTEGER"); + + b.Property("Icon") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("IsInherit") + .HasColumnType("INTEGER"); + + b.Property("IsInside") + .IsRequired() + .HasColumnType("INTEGER"); + + b.Property("IsPublic") + .HasColumnType("INTEGER"); + + b.Property("MethodName") + .HasColumnType("TEXT"); + + b.Property("ModuleName") + .HasColumnType("TEXT"); + + b.Property("PageName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("ParentId") + .HasColumnType("TEXT"); + + b.Property("ShowOnMenu") + .HasColumnType("INTEGER"); + + b.Property("Url") + .HasColumnType("TEXT"); + + b.HasKey("ID"); + + b.HasIndex("ParentId"); + + b.ToTable("FrameworkMenus"); + }); + + modelBuilder.Entity("WalkingTec.Mvvm.Core.FrameworkRole", b => + { + b.Property("ID") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("CreateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("CreateTime") + .HasColumnType("TEXT"); + + b.Property("RoleCode") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("RoleName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("RoleRemark") + .HasColumnType("TEXT"); + + b.Property("TenantCode") + .HasColumnType("TEXT"); + + b.Property("UpdateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("UpdateTime") + .HasColumnType("TEXT"); + + b.HasKey("ID"); + + b.ToTable("FrameworkRoles"); + }); + + modelBuilder.Entity("WalkingTec.Mvvm.Core.FrameworkUser", b => + { + b.Property("ID") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("Address") + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("CellPhone") + .HasColumnType("TEXT"); + + b.Property("CreateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("CreateTime") + .HasColumnType("TEXT"); + + b.Property("Email") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("Gender") + .HasColumnType("INTEGER"); + + b.Property("HomePhone") + .HasMaxLength(30) + .HasColumnType("TEXT"); + + b.Property("ITCode") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("IsValid") + .HasColumnType("INTEGER"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("TEXT"); + + b.Property("PhotoId") + .HasColumnType("TEXT"); + + b.Property("TenantCode") + .HasColumnType("TEXT"); + + b.Property("UpdateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("UpdateTime") + .HasColumnType("TEXT"); + + b.Property("ZipCode") + .HasColumnType("TEXT"); + + b.HasKey("ID"); + + b.HasIndex("PhotoId"); + + b.ToTable("FrameworkUsers"); + }); + + modelBuilder.Entity("WalkingTec.Mvvm.Core.FrameworkUserGroup", b => + { + b.Property("ID") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("CreateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("CreateTime") + .HasColumnType("TEXT"); + + b.Property("GroupCode") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("UpdateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("UpdateTime") + .HasColumnType("TEXT"); + + b.Property("UserCode") + .IsRequired() + .HasColumnType("TEXT"); + + b.HasKey("ID"); + + b.ToTable("FrameworkUserGroups"); + }); + + modelBuilder.Entity("WalkingTec.Mvvm.Core.FrameworkUserRole", b => + { + b.Property("ID") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("CreateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("CreateTime") + .HasColumnType("TEXT"); + + b.Property("RoleCode") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("UpdateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("UpdateTime") + .HasColumnType("TEXT"); + + b.Property("UserCode") + .IsRequired() + .HasColumnType("TEXT"); + + b.HasKey("ID"); + + b.ToTable("FrameworkUserRoles"); + }); + + modelBuilder.Entity("WalkingTec.Mvvm.Core.FunctionPrivilege", b => + { + b.Property("ID") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("Allowed") + .IsRequired() + .HasColumnType("INTEGER"); + + b.Property("CreateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("CreateTime") + .HasColumnType("TEXT"); + + b.Property("MenuItemId") + .HasColumnType("TEXT"); + + b.Property("RoleCode") + .HasColumnType("TEXT"); + + b.Property("UpdateBy") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("UpdateTime") + .HasColumnType("TEXT"); + + b.HasKey("ID"); + + b.HasIndex("MenuItemId"); + + b.ToTable("FunctionPrivileges"); + }); + + modelBuilder.Entity("WalkingTec.Mvvm.Core.PersistedGrant", b => + { + b.Property("ID") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("CreationTime") + .HasColumnType("TEXT"); + + b.Property("Expiration") + .HasColumnType("TEXT"); + + b.Property("RefreshToken") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("UserCode") + .HasColumnType("TEXT"); + + b.HasKey("ID"); + + b.ToTable("PersistedGrants"); + }); + + modelBuilder.Entity("IoTGateway.Model.Device", b => + { + b.HasOne("IoTGateway.Model.Driver", "Driver") + .WithMany() + .HasForeignKey("DriverId"); + + b.HasOne("IoTGateway.Model.Device", "Parent") + .WithMany("Children") + .HasForeignKey("ParentId"); + + b.Navigation("Driver"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("IoTGateway.Model.DeviceConfig", b => + { + b.HasOne("IoTGateway.Model.Device", "Device") + .WithMany("DeviceConfigs") + .HasForeignKey("DeviceId"); + + b.Navigation("Device"); + }); + + modelBuilder.Entity("IoTGateway.Model.DeviceVariable", b => + { + b.HasOne("IoTGateway.Model.Device", "Device") + .WithMany("DeviceVariables") + .HasForeignKey("DeviceId"); + + b.Navigation("Device"); + }); + + modelBuilder.Entity("WalkingTec.Mvvm.Core.FrameworkMenu", b => + { + b.HasOne("WalkingTec.Mvvm.Core.FrameworkMenu", "Parent") + .WithMany("Children") + .HasForeignKey("ParentId"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("WalkingTec.Mvvm.Core.FrameworkUser", b => + { + b.HasOne("WalkingTec.Mvvm.Core.FileAttachment", "Photo") + .WithMany() + .HasForeignKey("PhotoId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("Photo"); + }); + + modelBuilder.Entity("WalkingTec.Mvvm.Core.FunctionPrivilege", b => + { + b.HasOne("WalkingTec.Mvvm.Core.FrameworkMenu", "MenuItem") + .WithMany("Privileges") + .HasForeignKey("MenuItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("MenuItem"); + }); + + modelBuilder.Entity("IoTGateway.Model.Device", b => + { + b.Navigation("Children"); + + b.Navigation("DeviceConfigs"); + + b.Navigation("DeviceVariables"); + }); + + modelBuilder.Entity("WalkingTec.Mvvm.Core.FrameworkMenu", b => + { + b.Navigation("Children"); + + b.Navigation("Privileges"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/IoTGateway.Model/Common.cs b/IoTGateway.Model/Common.cs new file mode 100644 index 0000000..5f32c80 --- /dev/null +++ b/IoTGateway.Model/Common.cs @@ -0,0 +1,20 @@ +using System.ComponentModel.DataAnnotations; + +namespace IoTGateway.Model +{ + public enum DeviceTypeEnum + { + [Display(Name = "采集组")] + Group = 0, + + [Display(Name = "采集点")] + Device = 1 + } + public enum AccessEnum + { + [Display(Name = "只读")] + ReadOnly = 0, + [Display(Name = "读写")] + ReadAndWrite = 1 + } +} \ No newline at end of file diff --git a/IoTGateway.Model/Device.cs b/IoTGateway.Model/Device.cs new file mode 100644 index 0000000..911303e --- /dev/null +++ b/IoTGateway.Model/Device.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using WalkingTec.Mvvm.Core; + +namespace IoTGateway.Model +{ + public class Device : TreePoco, IBasePoco + { + [Display(Name = "名称")] + public string DeviceName { get; set; } + + [Display(Name = "排序")] + public uint Index { get; set; } + + [Display(Name = "描述")] + public string Description { get; set; } + + public Driver Driver { get; set; } + [Display(Name = "驱动")] + public Guid? DriverId { get; set; } + + [Display(Name = "自启动")] + public bool AutoStart { get; set; } + + [Display(Name = "类型")] + public DeviceTypeEnum DeviceTypeEnum { get; set; } + + [Display(Name = "创建时间")] + public DateTime? CreateTime { get; set; } + [Display(Name = "创建人")] + public string CreateBy { get; set; } + [Display(Name = "更新时间")] + public DateTime? UpdateTime { get; set; } + [Display(Name = "更新人")] + public string UpdateBy { get; set; } + + public List DeviceConfigs { get; set; } + public List DeviceVariables { get; set; } + } +} diff --git a/IoTGateway.Model/DeviceConfig.cs b/IoTGateway.Model/DeviceConfig.cs new file mode 100644 index 0000000..97928e9 --- /dev/null +++ b/IoTGateway.Model/DeviceConfig.cs @@ -0,0 +1,21 @@ +using System; +using System.ComponentModel.DataAnnotations; +using WalkingTec.Mvvm.Core; + +namespace IoTGateway.Model +{ + public class DeviceConfig : BasePoco + { + [Display(Name = "名称")] + public string DeviceConfigName { get; set; } + [Display(Name = "描述")] + public string Description { get; set; } + [Display(Name = "值")] + public string Value { get; set; } + [Display(Name = "备注")] + public string EnumInfo { get; set; } + public Device Device { get; set; } + [Display(Name = "设备")] + public Guid? DeviceId { get; set; } + } +} diff --git a/IoTGateway.Model/DeviceVariable.cs b/IoTGateway.Model/DeviceVariable.cs new file mode 100644 index 0000000..979ac72 --- /dev/null +++ b/IoTGateway.Model/DeviceVariable.cs @@ -0,0 +1,35 @@ +using PluginInterface; +using System; +using System.ComponentModel.DataAnnotations; +using WalkingTec.Mvvm.Core; + +namespace IoTGateway.Model +{ + public class DeviceVariable : TopBasePoco, IVariable + { + [Display(Name = "变量名")] + public string Name { get; set; } + + [Display(Name = "描述")] + public string Description { get; set; } + + [Display(Name = "方法")] + public string Method { get; set; } + + [Display(Name = "地址")] + public string DeviceAddress { get; set; } + + [Display(Name = "数据类型")] + public PluginInterface.DataTypeEnum DataType { get; set; } + + [Display(Name = "倍率")] + public double ValueFactor { get; set; } + + [Display(Name = "权限")] + public ProtectTypeEnum ProtectType { get; set; } + + public Device Device { get; set; } + [Display(Name = "采集点")] + public Guid? DeviceId { get; set; } + } +} \ No newline at end of file diff --git a/IoTGateway.Model/Driver.cs b/IoTGateway.Model/Driver.cs new file mode 100644 index 0000000..1d6e06a --- /dev/null +++ b/IoTGateway.Model/Driver.cs @@ -0,0 +1,18 @@ +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using WalkingTec.Mvvm.Core; + +namespace IoTGateway.Model +{ + public class Driver : BasePoco + { + [Display(Name = "驱动名")] + public string DriverName { get; set; } + [Display(Name = "文件名")] + public string FileName { get; set; } + [Display(Name = "程序集名")] + public string AssembleName { get; set; } + [Display(Name = "剩余授权数量")] + public int AuthorizesNum { get; set; } + } +} \ No newline at end of file diff --git a/IoTGateway.Model/FrameworkUser.cs b/IoTGateway.Model/FrameworkUser.cs new file mode 100644 index 0000000..5a048e2 --- /dev/null +++ b/IoTGateway.Model/FrameworkUser.cs @@ -0,0 +1,37 @@ +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace WalkingTec.Mvvm.Core +{ + /// + /// FrameworkUser + /// + [Table("FrameworkUsers")] + public class FrameworkUser : FrameworkUserBase + { + [Display(Name = "_Admin.Email")] + [RegularExpression("^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)+$", ErrorMessage = "Validate.{0}formaterror")] + [StringLength(50, ErrorMessage = "Validate.{0}stringmax{1}")] + public string Email { get; set; } + + [Display(Name = "_Admin.Gender")] + public GenderEnum? Gender { get; set; } + + [Display(Name = "_Admin.CellPhone")] + [RegularExpression("^[1][3-9]\\d{9}$", ErrorMessage = "Validate.{0}formaterror")] + public string CellPhone { get; set; } + + [Display(Name = "_Admin.HomePhone")] + [StringLength(30, ErrorMessage = "Validate.{0}stringmax{1}")] + [RegularExpression("^[-0-9\\s]{8,30}$", ErrorMessage = "Validate.{0}formaterror")] + public string HomePhone { get; set; } + + [Display(Name = "_Admin.Address")] + [StringLength(200, ErrorMessage = "Validate.{0}stringmax{1}")] + public string Address { get; set; } + + [Display(Name = "_Admin.ZipCode")] + [RegularExpression("^[0-9]{6,6}$", ErrorMessage = "Validate.{0}formaterror")] + public string ZipCode { get; set; } + } +} diff --git a/IoTGateway.Model/IVariable.cs b/IoTGateway.Model/IVariable.cs new file mode 100644 index 0000000..dbf9a32 --- /dev/null +++ b/IoTGateway.Model/IVariable.cs @@ -0,0 +1,26 @@ +using PluginInterface; +using System.ComponentModel.DataAnnotations; + +namespace IoTGateway.Model +{ + public interface IVariable + { + [Display(Name = "变量名")] + public string Name { get; set; } + + [Display(Name = "描述")] + public string Description { get; set; } + + [Display(Name = "地址")] + public string DeviceAddress { get; set; } + + [Display(Name = "数据类型")] + public PluginInterface.DataTypeEnum DataType { get; set; } + + [Display(Name = "倍率")] + public double ValueFactor { get; set; } + + [Display(Name = "权限")] + public ProtectTypeEnum ProtectType { get; set; } + } +} \ No newline at end of file diff --git a/IoTGateway.Model/IoTGateway.Model.csproj b/IoTGateway.Model/IoTGateway.Model.csproj new file mode 100644 index 0000000..1221e71 --- /dev/null +++ b/IoTGateway.Model/IoTGateway.Model.csproj @@ -0,0 +1,18 @@ + + + + net5.0 + true + + + + + + + + + + + + + diff --git a/IoTGateway.Model/SystemConfig.cs b/IoTGateway.Model/SystemConfig.cs new file mode 100644 index 0000000..07dc854 --- /dev/null +++ b/IoTGateway.Model/SystemConfig.cs @@ -0,0 +1,19 @@ +using System.ComponentModel.DataAnnotations; +using WalkingTec.Mvvm.Core; + +namespace IoTGateway.Model +{ + public class SystemConfig : BasePoco + { + [Display(Name = "网关名称")] + public string GatewayName { get; set; } + [Display(Name = "Mqtt服务器")] + public string MqttIp { get; set; } + [Display(Name = "Mqtt端口")] + public int MqttPort { get; set; } + [Display(Name = "Mqtt用户名")] + public string MqttUName { get; set; } + [Display(Name = "Mqtt密码")] + public string MqttUPwd { get; set; } + } +} \ No newline at end of file diff --git a/IoTGateway.ViewModel/BasicData/DeviceConfigVMs/DeviceConfigBatchVM.cs b/IoTGateway.ViewModel/BasicData/DeviceConfigVMs/DeviceConfigBatchVM.cs new file mode 100644 index 0000000..84dfa0d --- /dev/null +++ b/IoTGateway.ViewModel/BasicData/DeviceConfigVMs/DeviceConfigBatchVM.cs @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Threading.Tasks; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; +using IoTGateway.Model; +using Plugin; + +namespace IoTGateway.ViewModel.BasicData.DeviceConfigVMs +{ + public partial class DeviceConfigBatchVM : BaseBatchVM + { + public DeviceConfigBatchVM() + { + ListVM = new DeviceConfigListVM(); + LinkedVM = new DeviceConfig_BatchEdit(); + } + public override bool DoBatchDelete() + { + var ret = base.DoBatchDelete(); + if (ret) + { + var deviceService = Wtm.ServiceProvider.GetService(typeof(DeviceService)) as DeviceService; + UpdateDevices.UpdateConfig(DC, deviceService, FC); + } + return ret; + } + + public override bool DoBatchEdit() + { + var ret = base.DoBatchEdit(); + if (ret) + { + var deviceService = Wtm.ServiceProvider.GetService(typeof(DeviceService)) as DeviceService; + UpdateDevices.UpdateConfig(DC, deviceService, FC); + } + return ret; + } + } + + /// + /// Class to define batch edit fields + /// + public class DeviceConfig_BatchEdit : BaseVM + { + [Display(Name = "值")] + public String Value { get; set; } + + protected override void InitVM() + { + } + + } + +} diff --git a/IoTGateway.ViewModel/BasicData/DeviceConfigVMs/DeviceConfigImportVM.cs b/IoTGateway.ViewModel/BasicData/DeviceConfigVMs/DeviceConfigImportVM.cs new file mode 100644 index 0000000..31d0552 --- /dev/null +++ b/IoTGateway.ViewModel/BasicData/DeviceConfigVMs/DeviceConfigImportVM.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Threading.Tasks; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; +using IoTGateway.Model; + + +namespace IoTGateway.ViewModel.BasicData.DeviceConfigVMs +{ + public partial class DeviceConfigTemplateVM : BaseTemplateVM + { + [Display(Name = "名称")] + public ExcelPropety DeviceConfigName_Excel = ExcelPropety.CreateProperty(x => x.DeviceConfigName); + [Display(Name = "描述")] + public ExcelPropety Description_Excel = ExcelPropety.CreateProperty(x => x.Description); + [Display(Name = "值")] + public ExcelPropety Value_Excel = ExcelPropety.CreateProperty(x => x.Value); + [Display(Name = "备注")] + public ExcelPropety EnumInfo_Excel = ExcelPropety.CreateProperty(x => x.EnumInfo); + public ExcelPropety Device_Excel = ExcelPropety.CreateProperty(x => x.DeviceId); + + protected override void InitVM() + { + Device_Excel.DataType = ColumnDataType.ComboBox; + Device_Excel.ListItems = DC.Set().GetSelectListItems(Wtm, y => y.DeviceName); + } + + } + + public class DeviceConfigImportVM : BaseImportVM + { + + } + +} diff --git a/IoTGateway.ViewModel/BasicData/DeviceConfigVMs/DeviceConfigListVM.cs b/IoTGateway.ViewModel/BasicData/DeviceConfigVMs/DeviceConfigListVM.cs new file mode 100644 index 0000000..7d8e32a --- /dev/null +++ b/IoTGateway.ViewModel/BasicData/DeviceConfigVMs/DeviceConfigListVM.cs @@ -0,0 +1,88 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; +using Microsoft.EntityFrameworkCore; +using System.ComponentModel.DataAnnotations; +using IoTGateway.Model; + + +namespace IoTGateway.ViewModel.BasicData.DeviceConfigVMs +{ + public partial class DeviceConfigListVM : BasePagedListVM + { + public List AllDevices { get; set; } + protected override List InitGridAction() + { + return new List + { + this.MakeStandardAction("DeviceConfig", GridActionStandardTypesEnum.Create, Localizer["Sys.Create"],"BasicData", dialogWidth: 800), + this.MakeStandardAction("DeviceConfig", GridActionStandardTypesEnum.Edit, Localizer["Sys.Edit"], "BasicData", dialogWidth: 800), + //this.MakeStandardAction("DeviceConfig", GridActionStandardTypesEnum.Delete, Localizer["Sys.Delete"], "BasicData", dialogWidth: 800), + this.MakeStandardAction("DeviceConfig", GridActionStandardTypesEnum.Details, Localizer["Sys.Details"], "BasicData", dialogWidth: 800), + this.MakeStandardAction("DeviceConfig", GridActionStandardTypesEnum.BatchEdit, Localizer["Sys.BatchEdit"], "BasicData", dialogWidth: 800), + //this.MakeStandardAction("DeviceConfig", GridActionStandardTypesEnum.BatchDelete, Localizer["Sys.BatchDelete"], "BasicData", dialogWidth: 800), + //this.MakeStandardAction("DeviceConfig", GridActionStandardTypesEnum.Import, Localizer["Sys.Import"], "BasicData", dialogWidth: 800), + this.MakeStandardAction("DeviceConfig", GridActionStandardTypesEnum.ExportExcel, Localizer["Sys.Export"], "BasicData"), + }; + } + protected override void InitListVM() + { + AllDevices = DC.Set().AsNoTracking() + .OrderBy(x => x.Parent.Index).ThenBy(x => x.Parent.DeviceName) + .OrderBy(x => x.Index).ThenBy(x => x.DeviceName) + .GetTreeSelectListItems(Wtm, x => x.DeviceName); + foreach (var device in AllDevices) + { + foreach (var item in device.Children) + { + item.Text = item.Text; + item.Icon = "layui-icon layui-icon-link"; + item.Expended = true; + } + } + base.InitListVM(); + } + + + protected override IEnumerable> InitGridHeader() + { + return new List>{ + this.MakeGridHeader(x => x.DeviceConfigName), + this.MakeGridHeader(x => x.Description), + this.MakeGridHeader(x => x.Value), + this.MakeGridHeader(x => x.EnumInfo), + this.MakeGridHeader(x => x.DeviceName_view), + this.MakeGridHeaderAction(width: 200) + }; + } + + public override IOrderedQueryable GetSearchQuery() + { + var query = DC.Set() + .CheckContain(Searcher.DeviceConfigName, x=>x.DeviceConfigName) + .CheckContain(Searcher.Value, x=>x.Value) + .CheckEqual(Searcher.DeviceId, x=>x.DeviceId) + .Select(x => new DeviceConfig_View + { + ID = x.ID, + DeviceConfigName = x.DeviceConfigName, + Description = x.Description, + Value = x.Value, + EnumInfo = x.EnumInfo, + DeviceName_view = x.Device.DeviceName, + }) + .OrderBy(x => x.ID); + return query; + } + + } + + public class DeviceConfig_View : DeviceConfig{ + [Display(Name = "设备名")] + public String DeviceName_view { get; set; } + + } +} diff --git a/IoTGateway.ViewModel/BasicData/DeviceConfigVMs/DeviceConfigSearcher.cs b/IoTGateway.ViewModel/BasicData/DeviceConfigVMs/DeviceConfigSearcher.cs new file mode 100644 index 0000000..f44bfae --- /dev/null +++ b/IoTGateway.ViewModel/BasicData/DeviceConfigVMs/DeviceConfigSearcher.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Threading.Tasks; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; +using IoTGateway.Model; +using Microsoft.EntityFrameworkCore; + +namespace IoTGateway.ViewModel.BasicData.DeviceConfigVMs +{ + public partial class DeviceConfigSearcher : BaseSearcher + { + [Display(Name = "名称")] + public String DeviceConfigName { get; set; } + [Display(Name = "值")] + public String Value { get; set; } + public List AllDevices { get; set; } + [Display(Name = "设备名")] + public Guid? DeviceId { get; set; } + + protected override void InitVM() + { + AllDevices = DC.Set().AsNoTracking().Where(x => x.DeviceTypeEnum == DeviceTypeEnum.Device) + .OrderBy(x => x.Parent.Index).ThenBy(x => x.Parent.DeviceName) + .ThenBy(x => x.Index).ThenBy(x => x.Parent.DeviceName) + .GetSelectListItems(Wtm, y => y.DeviceName); + } + + } +} diff --git a/IoTGateway.ViewModel/BasicData/DeviceConfigVMs/DeviceConfigVM.cs b/IoTGateway.ViewModel/BasicData/DeviceConfigVMs/DeviceConfigVM.cs new file mode 100644 index 0000000..298f97c --- /dev/null +++ b/IoTGateway.ViewModel/BasicData/DeviceConfigVMs/DeviceConfigVM.cs @@ -0,0 +1,81 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.ComponentModel.DataAnnotations; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; +using IoTGateway.Model; +using Plugin; +using System.Text.Json; +using Microsoft.EntityFrameworkCore; +using Microsoft.Extensions.Primitives; + +namespace IoTGateway.ViewModel.BasicData.DeviceConfigVMs +{ + public partial class DeviceConfigVM : BaseCRUDVM + { + public List AllDevices { get; set; } + public List AllTypes { get; set; } + + public DeviceConfigVM() + { + SetInclude(x => x.Device); + } + + protected override void InitVM() + { + AllDevices = DC.Set().AsNoTracking().Where(x => x.DeviceTypeEnum == DeviceTypeEnum.Device) + .OrderBy(x => x.Parent.Index).ThenBy(x => x.Parent.DeviceName) + .OrderBy(x => x.Index).ThenBy(x => x.DeviceName) + .GetSelectListItems(Wtm, y => y.DeviceName); + if (Entity.DeviceId != null) + { + if (Entity.EnumInfo != null) + { + AllTypes = new List(); + var EnumInfos = JsonSerializer.Deserialize>(Entity.EnumInfo); + foreach (var EnumInfo in EnumInfos) + { + var item = new ComboSelectListItem + { + Text = EnumInfo.Key, + Value = EnumInfo.Key, + Selected = Entity.Value == EnumInfo.Key ? true : false + }; + AllTypes.Add(item); + } + } + } + } + + public override void DoAdd() + { + base.DoAdd(); + UpdateConfig(); + } + + public override void DoEdit(bool updateAllFields = false) + { + base.DoEdit(updateAllFields); + UpdateConfig(); + } + + public override void DoDelete() + { + //先获取id + var id = UpdateDevices.FC2Guids(FC); + var deviceId = DC.Set().Where(x => id.Contains(x.ID)).Select(x => x.DeviceId).FirstOrDefault(); + FC["Entity.DeviceId"] = (StringValues)deviceId.ToString(); + base.DoDelete(); + UpdateConfig(); + } + + private void UpdateConfig() + { + var deviceService = Wtm.ServiceProvider.GetService(typeof(DeviceService)) as DeviceService; + UpdateDevices.UpdateConfig(DC, deviceService, FC); + + } + } +} diff --git a/IoTGateway.ViewModel/BasicData/DeviceVMs/CopyVM.cs b/IoTGateway.ViewModel/BasicData/DeviceVMs/CopyVM.cs new file mode 100644 index 0000000..165131f --- /dev/null +++ b/IoTGateway.ViewModel/BasicData/DeviceVMs/CopyVM.cs @@ -0,0 +1,109 @@ +using Microsoft.EntityFrameworkCore; +using Plugin; +using System; +using System.Collections.Generic; +using System.Linq; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; +using IoTGateway.Model; + +namespace IoTGateway.ViewModel.BasicData.DeviceVMs +{ + public class CopyVM : BaseVM + { + public string 设备名称 { get; set; } + public uint 复制数量 { get; set; } = 20; + public string 复制结果 { get; set; } + + public void Copy() + { + using (var transaction = DC.BeginTransaction()) + { + try + { + var device = DC.Set().Where(x => x.ID == Guid.Parse(FC["id"].ToString())).Include(x => x.Driver).FirstOrDefault(); + var devices = new List(); + if (device == null) + 复制结果 = "复制失败,找不到采集点"; + else if (device.DeviceTypeEnum == DeviceTypeEnum.Group) + 复制结果 = "复制失败,组不支持复制"; + else + { + var deviceConfigs = DC.Set().Where(x => x.DeviceId == device.ID).ToList(); + var deviceVariables = DC.Set().Where(x => x.DeviceId == device.ID).ToList(); + for (int i = 1; i <= 复制数量; i++) + { + var newDevice = new Device + { + ID = Guid.NewGuid(), + DeviceName = $"{device.DeviceName}-Copy{i}", + AutoStart = false, + ParentId = device.ParentId, + CreateBy = this.Wtm.LoginUserInfo.Name, + CreateTime = DateTime.Now, + Driver = device.Driver, + DriverId = device.DriverId, + Description = device.Description, + DeviceTypeEnum = device.DeviceTypeEnum + }; + DC.Set().Add(newDevice); + devices.Add(newDevice); + + foreach (var deviceConfig in deviceConfigs) + { + var newDeviceConfig = new DeviceConfig + { + DeviceId = newDevice.ID, + DeviceConfigName = deviceConfig.DeviceConfigName, + Description = deviceConfig.Description, + EnumInfo = deviceConfig.EnumInfo, + Value = deviceConfig.Value, + UpdateBy = this.Wtm.LoginUserInfo.Name, + UpdateTime = DateTime.Now + }; + DC.Set().Add(newDeviceConfig); + } + + foreach (var deviceVariable in deviceVariables) + { + var newDeviceVariable = new DeviceVariable + { + DeviceId = newDevice.ID, + Name = deviceVariable.Name, + Description = deviceVariable.Description, + DataType = deviceVariable.DataType, + Method = deviceVariable.Method, + ProtectType = deviceVariable.ProtectType, + ValueFactor = deviceVariable.ValueFactor, + DeviceAddress = deviceVariable.DeviceAddress + }; + DC.Set().Add(newDeviceVariable); + + } + } + } + DC.SaveChanges(); + transaction.Commit(); + 复制结果 = "复制成功"; + + var pluginManager = Wtm.ServiceProvider.GetService(typeof(DeviceService)) as DeviceService; + pluginManager?.CreateDeviceThreads(devices); + } + catch (Exception ex) + { + transaction.Rollback(); + + 复制结果 = $"复制失败,{ex}"; + } + } + } + + protected override void InitVM() + { + var device = DC.Set().AsNoTracking().Include(x => x.Parent).Where(x => x.ID == Guid.Parse(FC["id"].ToString())).FirstOrDefault(); + 设备名称 = $"{device?.Parent?.DeviceName}===>{device?.DeviceName}"; + + base.InitVM(); + } + } +} diff --git a/IoTGateway.ViewModel/BasicData/DeviceVMs/DeleteDevices.cs b/IoTGateway.ViewModel/BasicData/DeviceVMs/DeleteDevices.cs new file mode 100644 index 0000000..9263bfc --- /dev/null +++ b/IoTGateway.ViewModel/BasicData/DeviceVMs/DeleteDevices.cs @@ -0,0 +1,68 @@ +using Plugin; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; +using IoTGateway.Model; + +namespace IoTGateway.ViewModel.BasicData.DeviceVMs +{ + static class DeleteDevices + { + public static DeleteRet doDelete(DeviceService pluginManager,IDataContext DC,List Ids) + { + DeleteRet deleteRet = new() { IsSuccess = false }; + using (var transaction = DC.BeginTransaction()) + { + try + { + var daps = DC.Set().Where(x => Ids.Contains(x.ID)).ToList(); + + foreach (var dap in daps) + { + if (dap == null) + { + deleteRet.Message = "采集点不存在,可能已经被删除了"; + return deleteRet; + } + else if (dap.DeviceTypeEnum == DeviceTypeEnum.Group) + { + deleteRet.Message = "有风险,暂不支持组删除"; + return deleteRet; + } + else + { + var dapConfigs = DC.Set().Where(x => x.DeviceId == dap.ID).ToList(); + var dapVariables = DC.Set().Where(x => x.DeviceId == dap.ID).ToList(); + DC.Set().RemoveRange(dapConfigs); + DC.Set().RemoveRange(dapVariables); + } + pluginManager.RemoveDeviceThread(dap); + } + DC.Set().RemoveRange(daps); + DC.SaveChanges(); + transaction.Commit(); + deleteRet.IsSuccess=true; + } + catch (Exception ex) + { + transaction.Rollback(); + + deleteRet.Message = $"其他错误,{ex}"; + } + } + + + return deleteRet; + } + } + + public class DeleteRet + { + public bool IsSuccess { get; set; } + public string Message { get; set; } + } +} diff --git a/IoTGateway.ViewModel/BasicData/DeviceVMs/DeviceBatchVM.cs b/IoTGateway.ViewModel/BasicData/DeviceVMs/DeviceBatchVM.cs new file mode 100644 index 0000000..6e7825e --- /dev/null +++ b/IoTGateway.ViewModel/BasicData/DeviceVMs/DeviceBatchVM.cs @@ -0,0 +1,84 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Threading.Tasks; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; +using IoTGateway.Model; +using Microsoft.Extensions.Primitives; +using Plugin; + +namespace IoTGateway.ViewModel.BasicData.DeviceVMs +{ + public partial class DeviceBatchVM : BaseBatchVM + { + public DeviceBatchVM() + { + ListVM = new DeviceListVM(); + LinkedVM = new Device_BatchEdit(); + } + public override bool DoBatchDelete() + { + StringValues IdsStr = new(); + if (FC.ContainsKey("Ids")) + IdsStr = (StringValues)FC["Ids"]; + else if (FC.ContainsKey("Ids[]")) + IdsStr = (StringValues)FC["Ids[]"]; + List Ids = new(); + foreach (var item in IdsStr) + { + Ids.Add(Guid.Parse(item)); + } + + var pluginManager = Wtm.ServiceProvider.GetService(typeof(DeviceService)) as DeviceService; + var ret = DeleteDevices.doDelete(pluginManager, DC, Ids); + if (!ret.IsSuccess) + { + MSD.AddModelError("", ret.Message); + return false; + } + + return true; + } + protected override void InitVM() + { + base.InitVM(); + } + + public override bool DoBatchEdit() + { + var ret = base.DoBatchEdit(); + if (ret) + { + var deviceService = Wtm.ServiceProvider.GetService(typeof(DeviceService)) as DeviceService; + UpdateDevices.UpdateDevice(DC, deviceService, FC); + } + return ret; + } + } + + /// + /// Class to define batch edit fields + /// + public class Device_BatchEdit : BaseVM + { + public List AllDrivers { get; set; } + public Guid? DriverId { get; set; } + [Display(Name = "自启动")] + public Boolean? AutoStart { get; set; } + [Display(Name = "类型")] + public DeviceTypeEnum? DeviceTypeEnum { get; set; } + public List AllParents { get; set; } + [Display(Name = "_Admin.Parent")] + public Guid? ParentId { get; set; } + + protected override void InitVM() + { + AllDrivers = DC.Set().GetSelectListItems(Wtm, y => y.DriverName); + AllParents = DC.Set().GetSelectListItems(Wtm, y => y.DeviceName); + } + + } + +} diff --git a/IoTGateway.ViewModel/BasicData/DeviceVMs/DeviceImportVM.cs b/IoTGateway.ViewModel/BasicData/DeviceVMs/DeviceImportVM.cs new file mode 100644 index 0000000..d92c1eb --- /dev/null +++ b/IoTGateway.ViewModel/BasicData/DeviceVMs/DeviceImportVM.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Threading.Tasks; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; +using IoTGateway.Model; + + +namespace IoTGateway.ViewModel.BasicData.DeviceVMs +{ + public partial class DeviceTemplateVM : BaseTemplateVM + { + [Display(Name = "名称")] + public ExcelPropety DeviceName_Excel = ExcelPropety.CreateProperty(x => x.DeviceName); + [Display(Name = "排序")] + public ExcelPropety Index_Excel = ExcelPropety.CreateProperty(x => x.Index); + [Display(Name = "描述")] + public ExcelPropety Description_Excel = ExcelPropety.CreateProperty(x => x.Description); + public ExcelPropety Driver_Excel = ExcelPropety.CreateProperty(x => x.DriverId); + [Display(Name = "自启动")] + public ExcelPropety AutoStart_Excel = ExcelPropety.CreateProperty(x => x.AutoStart); + [Display(Name = "类型")] + public ExcelPropety DeviceTypeEnum_Excel = ExcelPropety.CreateProperty(x => x.DeviceTypeEnum); + [Display(Name = "_Admin.Parent")] + public ExcelPropety Parent_Excel = ExcelPropety.CreateProperty(x => x.ParentId); + + protected override void InitVM() + { + Driver_Excel.DataType = ColumnDataType.ComboBox; + Driver_Excel.ListItems = DC.Set().GetSelectListItems(Wtm, y => y.DriverName); + Parent_Excel.DataType = ColumnDataType.ComboBox; + Parent_Excel.ListItems = DC.Set().GetSelectListItems(Wtm, y => y.DeviceName); + } + + } + + public class DeviceImportVM : BaseImportVM + { + + } + +} diff --git a/IoTGateway.ViewModel/BasicData/DeviceVMs/DeviceListVM.cs b/IoTGateway.ViewModel/BasicData/DeviceVMs/DeviceListVM.cs new file mode 100644 index 0000000..f3e998e --- /dev/null +++ b/IoTGateway.ViewModel/BasicData/DeviceVMs/DeviceListVM.cs @@ -0,0 +1,117 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; +using Microsoft.EntityFrameworkCore; +using System.ComponentModel.DataAnnotations; +using IoTGateway.Model; +using Microsoft.Extensions.Primitives; + +namespace IoTGateway.ViewModel.BasicData.DeviceVMs +{ + public partial class DeviceListVM : BasePagedListVM + { + protected override List InitGridAction() + { + return new List + { + this.MakeAction("Device","Copy","设备复制","设备复制", GridActionParameterTypesEnum.SingleId,"BasicData",600).SetIconCls("layui-icon layui-icon-template-1").SetPromptMessage("你确定复制设备,包括配置参数和变量?").SetDialogTitle("复制设备确认").SetHideOnToolBar(true).SetShowInRow(true).SetBindVisiableColName("copy"), + this.MakeAction("Device","CreateGroup","创建组","创建组", GridActionParameterTypesEnum.NoId,"BasicData",600).SetIconCls("_wtmicon _wtmicon-zuzhiqunzu").SetDialogTitle("创建组").SetShowInRow(false), + this.MakeStandardAction("Device", GridActionStandardTypesEnum.Create, "创建设备","BasicData", dialogWidth: 800,name:"创建设备").SetIconCls("layui-icon layui-icon-senior"), + this.MakeStandardAction("Device", GridActionStandardTypesEnum.Edit, Localizer["Sys.Edit"], "BasicData", dialogWidth: 800), + this.MakeStandardAction("Device", GridActionStandardTypesEnum.Delete, Localizer["Sys.Delete"], "BasicData", dialogWidth: 800), + this.MakeStandardAction("Device", GridActionStandardTypesEnum.Details, Localizer["Sys.Details"], "BasicData", dialogWidth: 800), + this.MakeStandardAction("Device", GridActionStandardTypesEnum.BatchEdit, Localizer["Sys.BatchEdit"], "BasicData", dialogWidth: 800), + this.MakeStandardAction("Device", GridActionStandardTypesEnum.BatchDelete, Localizer["Sys.BatchDelete"], "BasicData", dialogWidth: 800), + //this.MakeStandardAction("Device", GridActionStandardTypesEnum.Import, Localizer["Sys.Import"], "BasicData", dialogWidth: 800), + this.MakeStandardAction("Device", GridActionStandardTypesEnum.ExportExcel, Localizer["Sys.Export"], "BasicData"), + }; + } + + + protected override IEnumerable> InitGridHeader() + { + return new List>{ + this.MakeGridHeader(x => x.DeviceName), + this.MakeGridHeader(x => x.Index), + this.MakeGridHeader(x => x.Description), + this.MakeGridHeader(x => x.DriverName_view), + this.MakeGridHeader(x => x.AutoStart), + this.MakeGridHeader(x => x.DeviceTypeEnum), + this.MakeGridHeader(x => x.DeviceName_view), + this.MakeGridHeader(x=>"copy").SetHide().SetFormat((a,b)=>{ + if(a.DeviceTypeEnum== DeviceTypeEnum.Device) + return "true"; + return "false"; + }), + this.MakeGridHeaderAction(width: 280) + }; + } + + public override IOrderedQueryable GetSearchQuery() + { + var data = DC.Set().AsNoTracking().Where(x => x.DeviceTypeEnum == DeviceTypeEnum.Group).OrderBy(x => x.Index).ThenBy(x => x.DeviceName).ToList(); + + var dataRet = new List(); + + int order = 0; + foreach (var x in data) + { + var itemF = new Device_View + { + ID = x.ID, + Index = x.Index, + DeviceName = x.DeviceName, + Description = x.Description, + DeviceTypeEnum = x.DeviceTypeEnum, + DriverName_view = x.Driver?.DriverName, + ExtraOrder = order + }; + dataRet.Add(itemF); + order++; + + + StringValues Ids = new(); + if (FC.ContainsKey("Ids[]")) + { + Ids = (StringValues)FC["Ids[]"]; + } + var childrens = DC.Set().AsNoTracking().Where(y => y.ParentId == x.ID).Include(x => x.Driver).OrderBy(x => x.Index).ThenBy(x => x.DeviceName).ToList(); + if (Ids.Count != 0) + childrens = childrens.Where(x => Ids.Contains(x.ID.ToString())).ToList(); + + foreach (var y in childrens) + { + var itemC = new Device_View + { + ID = y.ID, + Index = y.Index, + DeviceName = "    " + y.DeviceName, + AutoStart = y.AutoStart, + Description = y.Description, + DeviceTypeEnum = y.DeviceTypeEnum, + DriverName_view = y.Driver?.DriverName, + DeviceName_view = itemF.DeviceName, + ExtraOrder = order + }; + dataRet.Add(itemC); + } + order++; + } + + return dataRet.AsQueryable().OrderBy(x => x.ExtraOrder); + } + + } + + public class Device_View : Device + { + [Display(Name = "驱动名")] + public String DriverName_view { get; set; } + [Display(Name = "父级名")] + public String DeviceName_view { get; set; } + public int ExtraOrder { get; set; } + } +} diff --git a/IoTGateway.ViewModel/BasicData/DeviceVMs/DeviceSearcher.cs b/IoTGateway.ViewModel/BasicData/DeviceVMs/DeviceSearcher.cs new file mode 100644 index 0000000..ec08d33 --- /dev/null +++ b/IoTGateway.ViewModel/BasicData/DeviceVMs/DeviceSearcher.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Threading.Tasks; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; +using IoTGateway.Model; + + +namespace IoTGateway.ViewModel.BasicData.DeviceVMs +{ + public partial class DeviceSearcher : BaseSearcher + { + [Display(Name = "名称")] + public String DeviceName { get; set; } + public List AllDrivers { get; set; } + public Guid? DriverId { get; set; } + [Display(Name = "自启动")] + public Boolean? AutoStart { get; set; } + [Display(Name = "类型")] + public DeviceTypeEnum? DeviceTypeEnum { get; set; } + public List AllParents { get; set; } + [Display(Name = "_Admin.Parent")] + public Guid? ParentId { get; set; } + + protected override void InitVM() + { + AllDrivers = DC.Set().GetSelectListItems(Wtm, y => y.DriverName); + AllParents = DC.Set().GetSelectListItems(Wtm, y => y.DeviceName); + } + + } +} diff --git a/IoTGateway.ViewModel/BasicData/DeviceVMs/DeviceVM.cs b/IoTGateway.ViewModel/BasicData/DeviceVMs/DeviceVM.cs new file mode 100644 index 0000000..cd4df6b --- /dev/null +++ b/IoTGateway.ViewModel/BasicData/DeviceVMs/DeviceVM.cs @@ -0,0 +1,69 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.ComponentModel.DataAnnotations; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; +using IoTGateway.Model; +using Plugin; +using Microsoft.EntityFrameworkCore; + +namespace IoTGateway.ViewModel.BasicData.DeviceVMs +{ + public partial class DeviceVM : BaseCRUDVM + { + public List AllDrivers { get; set; } + public List AllParents { get; set; } + + public DeviceVM() + { + SetInclude(x => x.Driver); + SetInclude(x => x.Parent); + } + + protected override void InitVM() + { + AllDrivers = DC.Set().GetSelectListItems(Wtm, y => y.DriverName); + AllParents = DC.Set().Where(x=>x.DeviceTypeEnum== DeviceTypeEnum.Group).GetSelectListItems(Wtm, y => y.DeviceName); + } + + public override void DoAdd() + { + try + { + base.DoAdd(); + //添加结束 + if (this.Entity.DeviceTypeEnum == DeviceTypeEnum.Device) + { + var deviceService = Wtm.ServiceProvider.GetService(typeof(DeviceService)) as DeviceService; + deviceService._DrvierManager.AddConfigs(this.Entity.ID, this.Entity.DriverId); + var dap = DC.Set().Where(x => x.ID == Entity.ID).Include(x => x.Driver).SingleOrDefault(); + deviceService.CreateDeviceThread(dap); + } + } + catch (Exception ex) + { + MSD.AddModelError("", $"添加失败,{ex.Message}"); + } + } + + public override void DoEdit(bool updateAllFields = false) + { + base.DoEdit(updateAllFields); + //修改结束 + var pluginManager = Wtm.ServiceProvider.GetService(typeof(DeviceService)) as DeviceService; + UpdateDevices.UpdateDevice(DC, pluginManager, FC); + } + + public override void DoDelete() + { + List Ids = new List() { Guid.Parse(FC["id"].ToString()) }; + + var pluginManager = Wtm.ServiceProvider.GetService(typeof(DeviceService)) as DeviceService; + var ret = DeleteDevices.doDelete(pluginManager, DC, Ids); + if (!ret.IsSuccess) + MSD.AddModelError("", ret.Message); + } + } +} diff --git a/IoTGateway.ViewModel/BasicData/DeviceVariableVMs/DeviceVariableBatchVM.cs b/IoTGateway.ViewModel/BasicData/DeviceVariableVMs/DeviceVariableBatchVM.cs new file mode 100644 index 0000000..5b2ae97 --- /dev/null +++ b/IoTGateway.ViewModel/BasicData/DeviceVariableVMs/DeviceVariableBatchVM.cs @@ -0,0 +1,67 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Threading.Tasks; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; +using IoTGateway.Model; +using PluginInterface; +using Plugin; + +namespace IoTGateway.ViewModel.BasicData.DeviceVariableVMs +{ + public partial class DeviceVariableBatchVM : BaseBatchVM + { + public DeviceVariableBatchVM() + { + ListVM = new DeviceVariableListVM(); + LinkedVM = new DeviceVariable_BatchEdit(); + } + + public override bool DoBatchDelete() + { + var ret = base.DoBatchDelete(); + if (ret) + { + var deviceService = Wtm.ServiceProvider.GetService(typeof(DeviceService)) as DeviceService; + UpdateDevices.UpdateVaribale(DC, deviceService, FC); + } + return ret; + } + + public override bool DoBatchEdit() + { + var ret = base.DoBatchEdit(); + if (ret) + { + var deviceService = Wtm.ServiceProvider.GetService(typeof(DeviceService)) as DeviceService; + UpdateDevices.UpdateVaribale(DC, deviceService, FC); + } + return ret; + } + } + + /// + /// Class to define batch edit fields + /// + public class DeviceVariable_BatchEdit : BaseVM + { + [Display(Name = "变量名")] + public String Name { get; set; } + [Display(Name = "地址")] + public String DeviceAddress { get; set; } + [Display(Name = "数据类型")] + public DataTypeEnum? DataType { get; set; } + [Display(Name = "倍率")] + public Double? ValueFactor { get; set; } + [Display(Name = "权限")] + public ProtectTypeEnum? ProtectType { get; set; } + + protected override void InitVM() + { + } + + } + +} diff --git a/IoTGateway.ViewModel/BasicData/DeviceVariableVMs/DeviceVariableImportVM.cs b/IoTGateway.ViewModel/BasicData/DeviceVariableVMs/DeviceVariableImportVM.cs new file mode 100644 index 0000000..bafe895 --- /dev/null +++ b/IoTGateway.ViewModel/BasicData/DeviceVariableVMs/DeviceVariableImportVM.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Threading.Tasks; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; +using IoTGateway.Model; +using PluginInterface; + + +namespace IoTGateway.ViewModel.BasicData.DeviceVariableVMs +{ + public partial class DeviceVariableTemplateVM : BaseTemplateVM + { + [Display(Name = "变量名")] + public ExcelPropety Name_Excel = ExcelPropety.CreateProperty(x => x.Name); + [Display(Name = "描述")] + public ExcelPropety Description_Excel = ExcelPropety.CreateProperty(x => x.Description); + [Display(Name = "方法")] + public ExcelPropety Method_Excel = ExcelPropety.CreateProperty(x => x.Method); + [Display(Name = "地址")] + public ExcelPropety DeviceAddress_Excel = ExcelPropety.CreateProperty(x => x.DeviceAddress); + [Display(Name = "数据类型")] + public ExcelPropety DataType_Excel = ExcelPropety.CreateProperty(x => x.DataType); + [Display(Name = "倍率")] + public ExcelPropety ValueFactor_Excel = ExcelPropety.CreateProperty(x => x.ValueFactor); + [Display(Name = "权限")] + public ExcelPropety ProtectType_Excel = ExcelPropety.CreateProperty(x => x.ProtectType); + public ExcelPropety Device_Excel = ExcelPropety.CreateProperty(x => x.DeviceId); + + protected override void InitVM() + { + Device_Excel.DataType = ColumnDataType.ComboBox; + Device_Excel.ListItems = DC.Set().GetSelectListItems(Wtm, y => y.DeviceName); + } + } + + public class DeviceVariableImportVM : BaseImportVM + { + + } + +} diff --git a/IoTGateway.ViewModel/BasicData/DeviceVariableVMs/DeviceVariableListVM.cs b/IoTGateway.ViewModel/BasicData/DeviceVariableVMs/DeviceVariableListVM.cs new file mode 100644 index 0000000..79f15eb --- /dev/null +++ b/IoTGateway.ViewModel/BasicData/DeviceVariableVMs/DeviceVariableListVM.cs @@ -0,0 +1,121 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; +using Microsoft.EntityFrameworkCore; +using System.ComponentModel.DataAnnotations; +using IoTGateway.Model; +using PluginInterface; +using Plugin; + +namespace IoTGateway.ViewModel.BasicData.DeviceVariableVMs +{ + public partial class DeviceVariableListVM : BasePagedListVM + { + public List AllDevices { get; set; } + protected override List InitGridAction() + { + return new List + { + this.MakeStandardAction("DeviceVariable", GridActionStandardTypesEnum.Create, Localizer["Sys.Create"],"BasicData", dialogWidth: 800), + this.MakeStandardAction("DeviceVariable", GridActionStandardTypesEnum.Edit, Localizer["Sys.Edit"], "BasicData", dialogWidth: 800), + this.MakeStandardAction("DeviceVariable", GridActionStandardTypesEnum.Delete, Localizer["Sys.Delete"], "BasicData", dialogWidth: 800), + this.MakeStandardAction("DeviceVariable", GridActionStandardTypesEnum.Details, Localizer["Sys.Details"], "BasicData", dialogWidth: 800).SetBindVisiableColName("detail"), + this.MakeStandardAction("DeviceVariable", GridActionStandardTypesEnum.BatchEdit, Localizer["Sys.BatchEdit"], "BasicData", dialogWidth: 800), + this.MakeStandardAction("DeviceVariable", GridActionStandardTypesEnum.BatchDelete, Localizer["Sys.BatchDelete"], "BasicData", dialogWidth: 800), + this.MakeStandardAction("DeviceVariable", GridActionStandardTypesEnum.Import, Localizer["Sys.Import"], "BasicData", dialogWidth: 800), + this.MakeStandardAction("DeviceVariable", GridActionStandardTypesEnum.ExportExcel, Localizer["Sys.Export"], "BasicData"), + }; + } + + protected override void InitListVM() + { + AllDevices = DC.Set().AsNoTracking() + .OrderBy(x => x.Parent.Index).ThenBy(x => x.Parent.DeviceName) + .OrderBy(x => x.Index).ThenBy(x => x.DeviceName) + .GetTreeSelectListItems(Wtm, x => x.DeviceName); + foreach (var device in AllDevices) + { + foreach (var item in device.Children) + { + item.Text = item.Text; + item.Icon = "layui-icon layui-icon-link"; + item.Expended = true; + } + } + base.InitListVM(); + } + protected override IEnumerable> InitGridHeader() + { + return new List>{ + this.MakeGridHeader(x => x.Name).SetSort(true).SetWidth(120), + //this.MakeGridHeader(x => x.Description), + this.MakeGridHeader(x => x.Method).SetSort(true).SetWidth(160), + this.MakeGridHeader(x => x.DeviceAddress).SetSort(true).SetWidth(80), + this.MakeGridHeader(x => x.DataType).SetSort(true).SetWidth(110), + this.MakeGridHeader(x => x.Value).SetWidth(80), + this.MakeGridHeader(x => x.State).SetWidth(80), + this.MakeGridHeader(x => x.ValueFactor).SetSort(true).SetWidth(80), + //this.MakeGridHeader(x => x.ProtectType).SetSort(true), + this.MakeGridHeader(x => x.DeviceName_view).SetSort(true).SetWidth(90), + this.MakeGridHeader(x=> "detail").SetHide().SetFormat((a,b)=>{ + return "false"; + }), + this.MakeGridHeaderAction(width: 150) + }; + } + + public override void AfterDoSearcher() + { + var deviceService = Wtm.ServiceProvider.GetService(typeof(DeviceService)) as DeviceService; + foreach (var item in EntityList) + { + var DapThread = deviceService.DeviceThreads.Where(x => x.Device.ID == item.DeviceId).FirstOrDefault(); + if (DapThread?.DeviceValues != null && DapThread.DeviceValues.ContainsKey(item.ID)) + { + item.Value = DapThread.DeviceValues[item.ID].Value?.ToString(); + item.State = DapThread.DeviceValues[item.ID].StatusType.ToString(); + } + } + + } + public override IOrderedQueryable GetSearchQuery() + { + var query = DC.Set() + .CheckContain(Searcher.Name, x => x.Name) + .CheckContain(Searcher.Method, x => x.Method) + .CheckContain(Searcher.DeviceAddress, x => x.DeviceAddress) + .CheckEqual(Searcher.DataType, x => x.DataType) + .CheckEqual(Searcher.DeviceId, x => x.DeviceId) + .Select(x => new DeviceVariable_View + { + ID = x.ID, + DeviceId = x.DeviceId, + Name = x.Name, + Description = x.Description, + Method = x.Method, + DeviceAddress = x.DeviceAddress, + DataType = x.DataType, + ValueFactor = x.ValueFactor, + ProtectType = x.ProtectType, + DeviceName_view = x.Device.DeviceName, + }) + .OrderBy(x => x.ID); + return query; + } + + } + + public class DeviceVariable_View : DeviceVariable + { + [Display(Name = "设备名")] + public String DeviceName_view { get; set; } + [Display(Name = "值")] + public String Value { get; set; } + [Display(Name = "状态")] + public String State { get; set; } + + } +} diff --git a/IoTGateway.ViewModel/BasicData/DeviceVariableVMs/DeviceVariableSearcher.cs b/IoTGateway.ViewModel/BasicData/DeviceVariableVMs/DeviceVariableSearcher.cs new file mode 100644 index 0000000..3308278 --- /dev/null +++ b/IoTGateway.ViewModel/BasicData/DeviceVariableVMs/DeviceVariableSearcher.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Threading.Tasks; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; +using IoTGateway.Model; +using PluginInterface; +using Microsoft.EntityFrameworkCore; + +namespace IoTGateway.ViewModel.BasicData.DeviceVariableVMs +{ + public partial class DeviceVariableSearcher : BaseSearcher + { + [Display(Name = "变量名")] + public String Name { get; set; } + [Display(Name = "方法")] + public String Method { get; set; } + [Display(Name = "地址")] + public String DeviceAddress { get; set; } + [Display(Name = "数据类型")] + public DataTypeEnum? DataType { get; set; } + public List AllDevices { get; set; } + [Display(Name = "设备名")] + public Guid? DeviceId { get; set; } + + protected override void InitVM() + { + AllDevices = DC.Set().AsNoTracking().Where(x => x.DeviceTypeEnum == DeviceTypeEnum.Device) + .OrderBy(x => x.Parent.Index).ThenBy(x => x.Parent.DeviceName) + .ThenBy(x => x.Index).ThenBy(x => x.Parent.DeviceName) + .GetSelectListItems(Wtm, y => y.DeviceName); + } + + } +} diff --git a/IoTGateway.ViewModel/BasicData/DeviceVariableVMs/DeviceVariableVM.cs b/IoTGateway.ViewModel/BasicData/DeviceVariableVMs/DeviceVariableVM.cs new file mode 100644 index 0000000..d2a18f9 --- /dev/null +++ b/IoTGateway.ViewModel/BasicData/DeviceVariableVMs/DeviceVariableVM.cs @@ -0,0 +1,69 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.ComponentModel.DataAnnotations; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; +using IoTGateway.Model; +using Plugin; +using Microsoft.EntityFrameworkCore; +using Microsoft.Extensions.Primitives; + +namespace IoTGateway.ViewModel.BasicData.DeviceVariableVMs +{ + public partial class DeviceVariableVM : BaseCRUDVM + { + public List AllDevices { get; set; } + public List AllMethods { get; set; } + + public DeviceVariableVM() + { + SetInclude(x => x.Device); + } + + protected override void InitVM() + { + AllDevices = DC.Set().AsNoTracking().Where(x => x.DeviceTypeEnum == DeviceTypeEnum.Device) + .OrderBy(x => x.Parent.Index).ThenBy(x => x.Parent.DeviceName) + .OrderBy(x => x.Index).ThenBy(x => x.DeviceName) + .GetSelectListItems(Wtm, y => y.DeviceName); + if (Entity.DeviceId != null) + { + var deviceService = Wtm.ServiceProvider.GetService(typeof(DeviceService)) as DeviceService; + AllMethods = deviceService.GetDriverMethods(Entity.DeviceId); + var DapThread = deviceService.DeviceThreads.Where(x => x.Device.ID == Entity.DeviceId).FirstOrDefault(); + } + } + + public override void DoAdd() + { + base.DoAdd(); + UpdateVaribale(); + } + + public override void DoEdit(bool updateAllFields = false) + { + base.DoEdit(updateAllFields); + UpdateVaribale(); + } + + public override void DoDelete() + { + //先获取id + var id= UpdateDevices.FC2Guids(FC); + var deviceId = DC.Set().Where(x => id.Contains(x.ID)).Select(x=>x.DeviceId).FirstOrDefault(); + FC["Entity.DeviceId"] =(StringValues)deviceId.ToString(); + base.DoDelete(); + UpdateVaribale(); + } + + + private void UpdateVaribale() + { + var deviceService = Wtm.ServiceProvider.GetService(typeof(DeviceService)) as DeviceService; + UpdateDevices.UpdateVaribale(DC, deviceService, FC); + + } + } +} diff --git a/IoTGateway.ViewModel/BasicData/DriverVMs/DriverBatchVM.cs b/IoTGateway.ViewModel/BasicData/DriverVMs/DriverBatchVM.cs new file mode 100644 index 0000000..cd38505 --- /dev/null +++ b/IoTGateway.ViewModel/BasicData/DriverVMs/DriverBatchVM.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Threading.Tasks; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; +using IoTGateway.Model; + + +namespace IoTGateway.ViewModel.BasicData.DriverVMs +{ + public partial class DriverBatchVM : BaseBatchVM + { + public DriverBatchVM() + { + ListVM = new DriverListVM(); + LinkedVM = new Driver_BatchEdit(); + } + + } + + /// + /// Class to define batch edit fields + /// + public class Driver_BatchEdit : BaseVM + { + + protected override void InitVM() + { + } + + } + +} diff --git a/IoTGateway.ViewModel/BasicData/DriverVMs/DriverImportVM.cs b/IoTGateway.ViewModel/BasicData/DriverVMs/DriverImportVM.cs new file mode 100644 index 0000000..e79ccfb --- /dev/null +++ b/IoTGateway.ViewModel/BasicData/DriverVMs/DriverImportVM.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Threading.Tasks; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; +using IoTGateway.Model; + + +namespace IoTGateway.ViewModel.BasicData.DriverVMs +{ + public partial class DriverTemplateVM : BaseTemplateVM + { + [Display(Name = "驱动名")] + public ExcelPropety DriverName_Excel = ExcelPropety.CreateProperty(x => x.DriverName); + [Display(Name = "文件名")] + public ExcelPropety FileName_Excel = ExcelPropety.CreateProperty(x => x.FileName); + [Display(Name = "程序集名")] + public ExcelPropety AssembleName_Excel = ExcelPropety.CreateProperty(x => x.AssembleName); + [Display(Name = "剩余授权数量")] + public ExcelPropety AuthorizesNum_Excel = ExcelPropety.CreateProperty(x => x.AuthorizesNum); + + protected override void InitVM() + { + } + + } + + public class DriverImportVM : BaseImportVM + { + + } + +} diff --git a/IoTGateway.ViewModel/BasicData/DriverVMs/DriverListVM.cs b/IoTGateway.ViewModel/BasicData/DriverVMs/DriverListVM.cs new file mode 100644 index 0000000..d8b016b --- /dev/null +++ b/IoTGateway.ViewModel/BasicData/DriverVMs/DriverListVM.cs @@ -0,0 +1,64 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; +using Microsoft.EntityFrameworkCore; +using System.ComponentModel.DataAnnotations; +using IoTGateway.Model; + + +namespace IoTGateway.ViewModel.BasicData.DriverVMs +{ + public partial class DriverListVM : BasePagedListVM + { + protected override List InitGridAction() + { + return new List + { + this.MakeStandardAction("Driver", GridActionStandardTypesEnum.Create, Localizer["Sys.Create"],"BasicData", dialogWidth: 800), + this.MakeStandardAction("Driver", GridActionStandardTypesEnum.Edit, Localizer["Sys.Edit"], "BasicData", dialogWidth: 800), + this.MakeStandardAction("Driver", GridActionStandardTypesEnum.Delete, Localizer["Sys.Delete"], "BasicData", dialogWidth: 800), + this.MakeStandardAction("Driver", GridActionStandardTypesEnum.Details, Localizer["Sys.Details"], "BasicData", dialogWidth: 800), + this.MakeStandardAction("Driver", GridActionStandardTypesEnum.BatchEdit, Localizer["Sys.BatchEdit"], "BasicData", dialogWidth: 800), + this.MakeStandardAction("Driver", GridActionStandardTypesEnum.BatchDelete, Localizer["Sys.BatchDelete"], "BasicData", dialogWidth: 800), + //this.MakeStandardAction("Driver", GridActionStandardTypesEnum.Import, Localizer["Sys.Import"], "BasicData", dialogWidth: 800), + //this.MakeStandardAction("Driver", GridActionStandardTypesEnum.ExportExcel, Localizer["Sys.Export"], "BasicData"), + }; + } + + + protected override IEnumerable> InitGridHeader() + { + return new List>{ + this.MakeGridHeader(x => x.DriverName), + this.MakeGridHeader(x => x.FileName), + this.MakeGridHeader(x => x.AssembleName), + this.MakeGridHeader(x => x.AuthorizesNum), + this.MakeGridHeaderAction(width: 200) + }; + } + + public override IOrderedQueryable GetSearchQuery() + { + var query = DC.Set() + .CheckContain(Searcher.DriverName, x=>x.DriverName) + .Select(x => new Driver_View + { + ID = x.ID, + DriverName = x.DriverName, + FileName = x.FileName, + AssembleName = x.AssembleName, + AuthorizesNum = x.AuthorizesNum, + }) + .OrderBy(x => x.ID); + return query; + } + + } + + public class Driver_View : Driver{ + + } +} diff --git a/IoTGateway.ViewModel/BasicData/DriverVMs/DriverSearcher.cs b/IoTGateway.ViewModel/BasicData/DriverVMs/DriverSearcher.cs new file mode 100644 index 0000000..aa5e5c0 --- /dev/null +++ b/IoTGateway.ViewModel/BasicData/DriverVMs/DriverSearcher.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Threading.Tasks; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; +using IoTGateway.Model; + + +namespace IoTGateway.ViewModel.BasicData.DriverVMs +{ + public partial class DriverSearcher : BaseSearcher + { + [Display(Name = "驱动名")] + public String DriverName { get; set; } + + protected override void InitVM() + { + } + + } +} diff --git a/IoTGateway.ViewModel/BasicData/DriverVMs/DriverVM.cs b/IoTGateway.ViewModel/BasicData/DriverVMs/DriverVM.cs new file mode 100644 index 0000000..71aeb44 --- /dev/null +++ b/IoTGateway.ViewModel/BasicData/DriverVMs/DriverVM.cs @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.ComponentModel.DataAnnotations; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; +using IoTGateway.Model; +using Plugin; + +namespace IoTGateway.ViewModel.BasicData.DriverVMs +{ + public partial class DriverVM : BaseCRUDVM + { + + public DriverVM() + { + } + + protected override void InitVM() + { + } + + public override void DoAdd() + { + var drvierService = Wtm.ServiceProvider.GetService(typeof(DrvierService)) as DrvierService; + Entity.AssembleName = drvierService.GetAssembleNameByFileName(Entity.FileName); + if (string.IsNullOrEmpty(Entity.AssembleName)) + { + MSD.AddModelError("", "程序集获取失败"); + return; + } + + base.DoAdd(); + } + + public override void DoEdit(bool updateAllFields = false) + { + base.DoEdit(updateAllFields); + } + + public override void DoDelete() + { + base.DoDelete(); + } + } +} diff --git a/IoTGateway.ViewModel/BasicData/UpdateDevices.cs b/IoTGateway.ViewModel/BasicData/UpdateDevices.cs new file mode 100644 index 0000000..78dcc03 --- /dev/null +++ b/IoTGateway.ViewModel/BasicData/UpdateDevices.cs @@ -0,0 +1,111 @@ +using Microsoft.EntityFrameworkCore; +using Microsoft.Extensions.Primitives; +using Plugin; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using WalkingTec.Mvvm.Core; +using IoTGateway.Model; + +namespace IoTGateway.ViewModel.BasicData +{ + internal static class UpdateDevices + { + internal enum FromVM + { + Variable, + Config, + Device + } + internal static void UpdateVaribale(IDataContext DC, DeviceService deviceService, Dictionary FC) + { + var devices = GetDevices(DC, deviceService, FromVM.Variable, FC); + deviceService.UpdateDevices(devices); + } + + internal static void UpdateConfig(IDataContext DC, DeviceService deviceService, Dictionary FC) + { + var devices = GetDevices(DC,deviceService, FromVM.Config,FC); + deviceService.UpdateDevices(devices); + } + + internal static void UpdateDevice(IDataContext DC, DeviceService deviceService, Dictionary FC) + { + var devices = GetDevices(DC, deviceService, FromVM.Device, FC); + deviceService.UpdateDevices(devices); + } + + + internal static List GetDevices(IDataContext DC, DeviceService deviceService, FromVM fromVM, Dictionary FC) + { + List devices = new(); + List Ids = FC2Guids(FC); + + if (FC.ContainsKey("Entity.DeviceId")) + { + StringValues id = (StringValues)FC["Entity.DeviceId"]; + var device = DC.Set().Where(x => x.ID == Guid.Parse(id)).Include(x => x.DeviceVariables).Include(x => x.Driver).SingleOrDefault(); + if (!devices.Where(x => x.ID == device.ID).Any()) + devices.Add(device); + } + foreach (var varId in Ids) + { + switch (fromVM) + { + case FromVM.Variable: + var deviceVariable = DC.Set().Where(x => x.ID == varId).SingleOrDefault(); + if (deviceVariable != null) + { + var device = DC.Set().Where(x => x.ID == deviceVariable.DeviceId).Include(x=>x.DeviceVariables).Include(x => x.Driver).SingleOrDefault(); + if (!devices.Where(x => x.ID == device.ID).Any()) + devices.Add(device); + } + break; + case FromVM.Config: + foreach (var deviceConfigId in Ids) + { + var deviceConfig = DC.Set().Where(x => x.ID == deviceConfigId).SingleOrDefault(); + if (deviceConfig != null) + { + var device = DC.Set().Where(x => x.ID == deviceConfig.DeviceId).Include(x => x.DeviceVariables).Include(x => x.Driver).SingleOrDefault(); + if (!devices.Where(x => x.ID == device.ID).Any()) + devices.Add(device); + } + } + break; + case FromVM.Device: + foreach (var deviceId in Ids) + { + var device = DC.Set().Where(x => x.ID == deviceId).Include(x => x.DeviceVariables).Include(x => x.Driver).SingleOrDefault(); + if (!devices.Where(x => x.ID == device.ID).Any()) + devices.Add(device); + } + break; + default: + break; + } + + } + return devices; + } + + internal static List FC2Guids(Dictionary FC) + { + List Ids = new(); + StringValues IdsStr = new(); + if (FC.ContainsKey("Ids")) + IdsStr = (StringValues)FC["Ids"]; + else if (FC.ContainsKey("Ids[]")) + IdsStr = (StringValues)FC["Ids[]"]; + else if (FC.ContainsKey("id")) + IdsStr = (StringValues)FC["id"]; + foreach (var item in IdsStr) + { + Ids.Add(Guid.Parse(item)); + } + return Ids; + } + } +} diff --git a/IoTGateway.ViewModel/Config/SystemConfigVMs/SystemConfigBatchVM.cs b/IoTGateway.ViewModel/Config/SystemConfigVMs/SystemConfigBatchVM.cs new file mode 100644 index 0000000..a2a2ca5 --- /dev/null +++ b/IoTGateway.ViewModel/Config/SystemConfigVMs/SystemConfigBatchVM.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Threading.Tasks; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; +using IoTGateway.Model; + + +namespace IoTGateway.ViewModel.Config.SystemConfigVMs +{ + public partial class SystemConfigBatchVM : BaseBatchVM + { + public SystemConfigBatchVM() + { + ListVM = new SystemConfigListVM(); + LinkedVM = new SystemConfig_BatchEdit(); + } + + } + + /// + /// Class to define batch edit fields + /// + public class SystemConfig_BatchEdit : BaseVM + { + + protected override void InitVM() + { + } + + } + +} diff --git a/IoTGateway.ViewModel/Config/SystemConfigVMs/SystemConfigImportVM.cs b/IoTGateway.ViewModel/Config/SystemConfigVMs/SystemConfigImportVM.cs new file mode 100644 index 0000000..bc4ea34 --- /dev/null +++ b/IoTGateway.ViewModel/Config/SystemConfigVMs/SystemConfigImportVM.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Threading.Tasks; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; +using IoTGateway.Model; + + +namespace IoTGateway.ViewModel.Config.SystemConfigVMs +{ + public partial class SystemConfigTemplateVM : BaseTemplateVM + { + [Display(Name = "网关名称")] + public ExcelPropety GatewayName_Excel = ExcelPropety.CreateProperty(x => x.GatewayName); + [Display(Name = "Mqtt服务器")] + public ExcelPropety MqttIp_Excel = ExcelPropety.CreateProperty(x => x.MqttIp); + [Display(Name = "Mqtt端口")] + public ExcelPropety MqttPort_Excel = ExcelPropety.CreateProperty(x => x.MqttPort); + [Display(Name = "Mqtt用户名")] + public ExcelPropety MqttUName_Excel = ExcelPropety.CreateProperty(x => x.MqttUName); + [Display(Name = "Mqtt密码")] + public ExcelPropety MqttUPwd_Excel = ExcelPropety.CreateProperty(x => x.MqttUPwd); + + protected override void InitVM() + { + } + + } + + public class SystemConfigImportVM : BaseImportVM + { + + } + +} diff --git a/IoTGateway.ViewModel/Config/SystemConfigVMs/SystemConfigListVM.cs b/IoTGateway.ViewModel/Config/SystemConfigVMs/SystemConfigListVM.cs new file mode 100644 index 0000000..77ab872 --- /dev/null +++ b/IoTGateway.ViewModel/Config/SystemConfigVMs/SystemConfigListVM.cs @@ -0,0 +1,65 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; +using Microsoft.EntityFrameworkCore; +using System.ComponentModel.DataAnnotations; +using IoTGateway.Model; + + +namespace IoTGateway.ViewModel.Config.SystemConfigVMs +{ + public partial class SystemConfigListVM : BasePagedListVM + { + protected override List InitGridAction() + { + return new List + { + //this.MakeStandardAction("SystemConfig", GridActionStandardTypesEnum.Create, Localizer["Sys.Create"],"Config", dialogWidth: 800), + this.MakeStandardAction("SystemConfig", GridActionStandardTypesEnum.Edit, Localizer["Sys.Edit"], "Config", dialogWidth: 800), + //this.MakeStandardAction("SystemConfig", GridActionStandardTypesEnum.Delete, Localizer["Sys.Delete"], "Config", dialogWidth: 800), + this.MakeStandardAction("SystemConfig", GridActionStandardTypesEnum.Details, Localizer["Sys.Details"], "Config", dialogWidth: 800), + //this.MakeStandardAction("SystemConfig", GridActionStandardTypesEnum.BatchEdit, Localizer["Sys.BatchEdit"], "Config", dialogWidth: 800), + //this.MakeStandardAction("SystemConfig", GridActionStandardTypesEnum.BatchDelete, Localizer["Sys.BatchDelete"], "Config", dialogWidth: 800), + //this.MakeStandardAction("SystemConfig", GridActionStandardTypesEnum.Import, Localizer["Sys.Import"], "Config", dialogWidth: 800), + //this.MakeStandardAction("SystemConfig", GridActionStandardTypesEnum.ExportExcel, Localizer["Sys.Export"], "Config"), + }; + } + + + protected override IEnumerable> InitGridHeader() + { + return new List>{ + this.MakeGridHeader(x => x.GatewayName), + this.MakeGridHeader(x => x.MqttIp), + this.MakeGridHeader(x => x.MqttPort), + this.MakeGridHeader(x => x.MqttUName), + this.MakeGridHeader(x => x.MqttUPwd), + this.MakeGridHeaderAction(width: 200) + }; + } + + public override IOrderedQueryable GetSearchQuery() + { + var query = DC.Set() + .Select(x => new SystemConfig_View + { + ID = x.ID, + GatewayName = x.GatewayName, + MqttIp = x.MqttIp, + MqttPort = x.MqttPort, + MqttUName = x.MqttUName, + MqttUPwd = x.MqttUPwd, + }) + .OrderBy(x => x.ID); + return query; + } + + } + + public class SystemConfig_View : SystemConfig{ + + } +} diff --git a/IoTGateway.ViewModel/Config/SystemConfigVMs/SystemConfigSearcher.cs b/IoTGateway.ViewModel/Config/SystemConfigVMs/SystemConfigSearcher.cs new file mode 100644 index 0000000..7d2c956 --- /dev/null +++ b/IoTGateway.ViewModel/Config/SystemConfigVMs/SystemConfigSearcher.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Threading.Tasks; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; +using IoTGateway.Model; + + +namespace IoTGateway.ViewModel.Config.SystemConfigVMs +{ + public partial class SystemConfigSearcher : BaseSearcher + { + + protected override void InitVM() + { + } + + } +} diff --git a/IoTGateway.ViewModel/Config/SystemConfigVMs/SystemConfigVM.cs b/IoTGateway.ViewModel/Config/SystemConfigVMs/SystemConfigVM.cs new file mode 100644 index 0000000..c5d3e39 --- /dev/null +++ b/IoTGateway.ViewModel/Config/SystemConfigVMs/SystemConfigVM.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.ComponentModel.DataAnnotations; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; +using IoTGateway.Model; +using Plugin; + +namespace IoTGateway.ViewModel.Config.SystemConfigVMs +{ + public partial class SystemConfigVM : BaseCRUDVM + { + + public SystemConfigVM() + { + } + + protected override void InitVM() + { + } + + public override void DoAdd() + { + base.DoAdd(); + } + + public override void DoEdit(bool updateAllFields = false) + { + base.DoEdit(updateAllFields); + var myMqttClient = Wtm.ServiceProvider.GetService(typeof(MyMqttClient)) as MyMqttClient; + myMqttClient.InitClient(); + } + + public override void DoDelete() + { + base.DoDelete(); + } + } +} diff --git a/IoTGateway.ViewModel/HomeVMs/LoginVM.cs b/IoTGateway.ViewModel/HomeVMs/LoginVM.cs new file mode 100644 index 0000000..9ca30d9 --- /dev/null +++ b/IoTGateway.ViewModel/HomeVMs/LoginVM.cs @@ -0,0 +1,78 @@ +using System.ComponentModel.DataAnnotations; +using System.Linq; +using Microsoft.EntityFrameworkCore; +using WalkingTec.Mvvm.Core; + +namespace IoTGateway.ViewModel.HomeVMs +{ + public class LoginVM : BaseVM + { + [Display(Name = "_Admin.Account")] + [Required(ErrorMessage = "Validate.{0}required")] + [StringLength(50, ErrorMessage = "Validate.{0}stringmax{1}")] + public string ITCode { get; set; } + + [Display(Name = "_Admin.Password")] + [Required(ErrorMessage = "Validate.{0}required")] + [StringLength(50, ErrorMessage = "Validate.{0}stringmax{1}")] + public string Password { get; set; } + + [Display(Name = "Login.RememberMe")] + public bool RememberLogin { get; set; } + + private string _redirect; + public string Redirect + { + get + { + var rv = _redirect; + if (string.IsNullOrEmpty(rv) == false) + { + if (rv.StartsWith("/#") == false) + { + rv = "/#" + rv; + } + if(rv.Split("#/").Length > 2) + { + int index = rv.LastIndexOf("#/"); + rv = rv.Substring(0, index); + } + } + return rv; + } + set { _redirect = value; } + } + + [Display(Name = "Login.InputValidation")] + public string VerifyCode { get; set; } + + /// + /// 进行登录 + /// + /// 外部传递的页面权限 + /// 登录用户的信息 + public async System.Threading.Tasks.Task DoLoginAsync(bool ignorePris = false) + { + //根据用户名和密码查询用户 + var rv = await DC.Set().Where(x => x.ITCode.ToLower() == ITCode.ToLower() && x.Password == Utils.GetMD5String(Password) && x.IsValid).Select(x => new { itcode = x.ITCode, id = x.GetID() }).SingleOrDefaultAsync(); + + //如果没有找到则输出错误 + if (rv == null) + { + MSD.AddModelError("", Localizer["Sys.LoginFailed"]); + return null; + } + else + { + LoginUserInfo user = new LoginUserInfo + { + ITCode = rv.itcode, + UserId = rv.id.ToString() + }; + //读取角色,用户组,页面权限,数据权限等框架配置信息 + await user.LoadBasicInfoAsync(Wtm); + return user; + } + } + } +} diff --git a/IoTGateway.ViewModel/HomeVMs/RegVM.cs b/IoTGateway.ViewModel/HomeVMs/RegVM.cs new file mode 100644 index 0000000..15f225d --- /dev/null +++ b/IoTGateway.ViewModel/HomeVMs/RegVM.cs @@ -0,0 +1,76 @@ +using System.ComponentModel.DataAnnotations; +using System.Linq; +using WalkingTec.Mvvm.Core; + +namespace IoTGateway.ViewModel.HomeVMs +{ + public class RegVM : BaseVM + { + [Display(Name = "_Admin.Account")] + [Required(ErrorMessage = "Validate.{0}required")] + [StringLength(50, ErrorMessage = "Validate.{0}stringmax{1}")] + public string ITCode { get; set; } + + [Display(Name = "_Admin.Name")] + [Required(ErrorMessage = "Validate.{0}required")] + [StringLength(50, ErrorMessage = "Validate.{0}stringmax{1}")] + public string Name { get; set; } + + [Display(Name = "_Admin.Password")] + [Required(AllowEmptyStrings = false)] + [StringLength(50, ErrorMessage = "Validate.{0}stringmax{1}")] + public string Password { get; set; } + + [Display(Name = "_Admin.Password")] + [Required(AllowEmptyStrings = false)] + [StringLength(50, ErrorMessage = "Validate.{0}stringmax{1}")] + public string NewPasswordComfirm { get; set; } + + [Display(Name = "_Admin.Email")] + [RegularExpression("^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)+$", ErrorMessage = "Validate.{0}formaterror")] + [StringLength(50, ErrorMessage = "Validate.{0}stringmax{1}")] + public string Email { get; set; } + + [Display(Name = "_Admin.CellPhone")] + [RegularExpression("^[1][3-9]\\d{9}$", ErrorMessage = "Validate.{0}formaterror")] + public string CellPhone { get; set; } + + /// + /// 进行登录 + /// + /// 登录用户的信息 + public bool DoReg() + { + //检查两次新密码是否输入一致,如不一致则输出错误 + if (Password != NewPasswordComfirm) + { + MSD.AddModelError("NewPasswordComfirm", Localizer["Sys.PasswordNotSame"]); + return false; + } + + + //检查itcode是否重复 + var exist = DC.Set().Any(x => x.ITCode.ToLower() == ITCode.ToLower()); + + if (exist == true) + { + MSD.AddModelError("ITCode", Localizer["Login.ItcodeDuplicate"]); + return false; + } + + FrameworkUser user = new FrameworkUser + { + ITCode = ITCode, + Name = Name, + Password = Utils.GetMD5String(Password), + IsValid = true, + CellPhone = CellPhone, + Email = Email + }; + + DC.Set().Add(user); + DC.SaveChanges(); + return true; + } + } +} diff --git a/IoTGateway.ViewModel/IoTGateway.ViewModel.csproj b/IoTGateway.ViewModel/IoTGateway.ViewModel.csproj new file mode 100644 index 0000000..5121da2 --- /dev/null +++ b/IoTGateway.ViewModel/IoTGateway.ViewModel.csproj @@ -0,0 +1,14 @@ + + + + net5.0 + true + + + + + + + + + diff --git a/IoTGateway.ViewModel/_Admin/ActionLogVMs/ActionLogBatchVM.cs b/IoTGateway.ViewModel/_Admin/ActionLogVMs/ActionLogBatchVM.cs new file mode 100644 index 0000000..eedc021 --- /dev/null +++ b/IoTGateway.ViewModel/_Admin/ActionLogVMs/ActionLogBatchVM.cs @@ -0,0 +1,27 @@ +// WTM默认页面 Wtm buidin page +using System; +using WalkingTec.Mvvm.Core; + + +namespace WalkingTec.Mvvm.Mvc.Admin.ViewModels.ActionLogVMs +{ + public class ActionLogBatchVM : BaseBatchVM + { + public ActionLogBatchVM() + { + ListVM = new ActionLogListVM(); + LinkedVM = new ActionLog_BatchEdit(); + } + + } + + public class ActionLog_BatchEdit : BaseVM + { + + protected override void InitVM() + { + } + + } + +} diff --git a/IoTGateway.ViewModel/_Admin/ActionLogVMs/ActionLogListVM.cs b/IoTGateway.ViewModel/_Admin/ActionLogVMs/ActionLogListVM.cs new file mode 100644 index 0000000..566efdf --- /dev/null +++ b/IoTGateway.ViewModel/_Admin/ActionLogVMs/ActionLogListVM.cs @@ -0,0 +1,100 @@ +// WTM默认页面 Wtm buidin page +using System.Collections.Generic; +using System.Linq; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; + +namespace WalkingTec.Mvvm.Mvc.Admin.ViewModels.ActionLogVMs +{ + public class ActionLogListVM : BasePagedListVM + { + protected override List InitGridAction() + { + var actions = new List + { + this.MakeStandardAction("ActionLog", GridActionStandardTypesEnum.BatchDelete, "","_Admin", dialogWidth: 800), + this.MakeStandardAction("ActionLog", GridActionStandardTypesEnum.Details, "","_Admin", dialogWidth: 800).SetHideOnToolBar(true), + this.MakeStandardAction("ActionLog", GridActionStandardTypesEnum.ExportExcel, "","_Admin"), + }; + return actions; + } + + protected override IEnumerable> InitGridHeader() + { + var header = new List>(); + + header.Add(this.MakeGridHeader(x => x.LogType, 100).SetForeGroundFunc((entity)=> { + if(entity.LogType == ActionLogTypesEnum.Exception) + { + return "FF0000"; + } + else + { + return ""; + } + })); + header.Add(this.MakeGridHeader(x => x.ModuleName, 120)); + header.Add(this.MakeGridHeader(x => x.ActionName, 120)); + header.Add(this.MakeGridHeader(x => x.ITCode, 120)); + header.Add(this.MakeGridHeader(x => x.ActionUrl, 200)); + header.Add(this.MakeGridHeader(x => x.ActionTime, 200).SetSort(true).SetFormat((a, b) => a.ActionTime.ToString("yyyy-MM-dd HH:mm:ss"))); + header.Add(this.MakeGridHeader(x => x.Duration, 100).SetSort(true).SetForeGroundFunc((entity)=> { + if(entity.Duration <= 1) + { + return "008000"; + } + else if(entity.Duration <= 3) + { + return "FFC90E"; + } + else + { + return "FF0000"; + } + }).SetFormat((entity,v)=> { return ((double)v).ToString("f2"); })); + header.Add(this.MakeGridHeader(x => x.IP, 120)); + header.Add(this.MakeGridHeader(x => x.Remark).SetFormat((a,b)=> { + if (SearcherMode == ListVMSearchModeEnum.Search && a.Remark?.Length > 30) + { + a.Remark = a.Remark.Substring(0, 30) + "..."; + } + return a.Remark; + })); + header.Add(this.MakeGridHeaderAction(width: 120)); + + return header; + } + + public override IOrderedQueryable GetSearchQuery() + { + var query = DC.Set() + .CheckContain(Searcher.ITCode, x=>x.ITCode) + .CheckContain(Searcher.ActionUrl, x=>x.ActionUrl) + //.CheckEqual(Searcher.LogType, x=>x.LogType) + .CheckContain(Searcher.LogType, x=>x.LogType) + .CheckContain(Searcher.IP, x=>x.IP) + .CheckBetween(Searcher.ActionTime?.GetStartTime(), Searcher.ActionTime?.GetEndTime(), x=>x.ActionTime, includeMax:false) + .CheckWhere(Searcher.Duration,x=>x.Duration >= Searcher.Duration) + .Select(x=>new ActionLog() + { + ID = x.ID, + ModuleName = x.ModuleName, + ITCode = x.ITCode, + ActionTime = x.ActionTime, + ActionName = x.ActionName, + ActionUrl = x.ActionUrl, + Duration = x.Duration, + IP = x.IP, + LogType = x.LogType, + Remark = x.Remark, + CreateBy = x.CreateBy, + CreateTime = x.CreateTime, + UpdateBy = x.UpdateBy, + UpdateTime = x.UpdateTime + }) + .OrderByDescending(x=>x.ActionTime); + + return query; + } + } +} diff --git a/IoTGateway.ViewModel/_Admin/ActionLogVMs/ActionLogSearcher.cs b/IoTGateway.ViewModel/_Admin/ActionLogVMs/ActionLogSearcher.cs new file mode 100644 index 0000000..c762fea --- /dev/null +++ b/IoTGateway.ViewModel/_Admin/ActionLogVMs/ActionLogSearcher.cs @@ -0,0 +1,32 @@ +// WTM默认页面 Wtm buidin page +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using WalkingTec.Mvvm.Core; + +namespace WalkingTec.Mvvm.Mvc.Admin.ViewModels.ActionLogVMs +{ + public class ActionLogSearcher : BaseSearcher + { + + [Display(Name = "_Admin.Account")] + public string ITCode { get; set; } + + [Display(Name = "Url")] + public string ActionUrl { get; set; } + + [Display(Name = "_Admin.LogType")] + public List LogType { get; set; } + + [Display(Name = "_Admin.ActionTime")] + public DateRange ActionTime { get; set; } + + + [Display(Name = "IP")] + public string IP { get; set; } + + [Display(Name = "_Admin.Duration")] + public double? Duration { get; set; } + + } +} diff --git a/IoTGateway.ViewModel/_Admin/ActionLogVMs/ActionLogVM.cs b/IoTGateway.ViewModel/_Admin/ActionLogVMs/ActionLogVM.cs new file mode 100644 index 0000000..7a2e70c --- /dev/null +++ b/IoTGateway.ViewModel/_Admin/ActionLogVMs/ActionLogVM.cs @@ -0,0 +1,9 @@ +// WTM默认页面 Wtm buidin page +using WalkingTec.Mvvm.Core; + +namespace WalkingTec.Mvvm.Mvc.Admin.ViewModels.ActionLogVMs +{ + public class ActionLogVM : BaseCRUDVM + { + } +} diff --git a/IoTGateway.ViewModel/_Admin/DataPrivilegeVMs/DataPrivilegeBatchVM.cs b/IoTGateway.ViewModel/_Admin/DataPrivilegeVMs/DataPrivilegeBatchVM.cs new file mode 100644 index 0000000..19b1617 --- /dev/null +++ b/IoTGateway.ViewModel/_Admin/DataPrivilegeVMs/DataPrivilegeBatchVM.cs @@ -0,0 +1,23 @@ +// WTM默认页面 Wtm buidin page +using System; +using System.ComponentModel.DataAnnotations; +using WalkingTec.Mvvm.Core; + +namespace WalkingTec.Mvvm.Mvc.Admin.ViewModels.DataPrivilegeVMs +{ + public class DataPrivilegeBatchVM : BaseBatchVM + { + public DataPrivilegeBatchVM() + { + ListVM = new DataPrivilegeListVM(); + LinkedVM = new DataPrivilege_BatchEdit(); + } + + } + + public class DataPrivilege_BatchEdit : BaseVM + { + + } + +} diff --git a/IoTGateway.ViewModel/_Admin/DataPrivilegeVMs/DataPrivilegeListVM.cs b/IoTGateway.ViewModel/_Admin/DataPrivilegeVMs/DataPrivilegeListVM.cs new file mode 100644 index 0000000..2c18ad4 --- /dev/null +++ b/IoTGateway.ViewModel/_Admin/DataPrivilegeVMs/DataPrivilegeListVM.cs @@ -0,0 +1,142 @@ +// WTM默认页面 Wtm buidin page +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; + +namespace WalkingTec.Mvvm.Mvc.Admin.ViewModels.DataPrivilegeVMs +{ + public class DataPrivilegeListVM : BasePagedListVM + { + + protected override List InitGridAction() + { + string tp = ""; + if (Searcher.DpType == DpTypeEnum.User) + { + tp = "User"; + } + if (Searcher.DpType == DpTypeEnum.UserGroup) + { + tp = "UserGroup"; + } + + return new List + { + this.MakeStandardAction("DataPrivilege", GridActionStandardTypesEnum.Create, "","_Admin", dialogWidth: 800).SetQueryString($"Type={tp}"), + this.MakeStandardAction("DataPrivilege", GridActionStandardTypesEnum.ExportExcel, "","_Admin"), + }; + } + + protected override IEnumerable> InitGridHeader() + { + return new List>{ + this.MakeGridHeader(x => x.Name, 200), + this.MakeGridHeader(x => x.TableName).SetFormat((entity,val)=>GetPrivilegeName(entity)), + this.MakeGridHeader(x => x.RelateIDs), + this.MakeGridHeader(x=>x.Edit,200).SetFormat((entity,val)=>GetOperation(entity)).SetHeader(Localizer["Sys.Operation"]).SetDisableExport(), + this.MakeGridHeader(x => x.DpType).SetHide(true), + this.MakeGridHeader(x => x.TargetId).SetHide(true) + }; + } + + + public string GetPrivilegeName(DataPrivilege_ListView item) + { + var temp = Wtm.DataPrivilegeSettings.Where(x => x.ModelName == item.TableName).SingleOrDefault(); + if (temp == null) + { + return ""; + } + else + { + return temp.PrivillegeName; + } + } + + public List GetOperation(DataPrivilege_ListView item) + { + string editurl = ""; + string delurl = ""; + if(Searcher.DpType == DpTypeEnum.User) + { + editurl = "/_Admin/DataPrivilege/Edit?ModelName=" + item.TableName + "&Type=User&Id=" + item.TargetId; + delurl = "/_Admin/DataPrivilege/Delete?ModelName=" + item.TableName + "&Type=User&Id=" + item.TargetId; + } + else + { + editurl = "/_Admin/DataPrivilege/Edit?ModelName=" + item.TableName + "&Type=UserGroup&Id=" + item.TargetId; + delurl = "/_Admin/DataPrivilege/Delete?ModelName=" + item.TableName + "&Type=UserGroup&Id=" + item.TargetId; + } + return new List + { + ColumnFormatInfo.MakeDialogButton(ButtonTypesEnum.Button,editurl,Localizer["Sys.Edit"],800,null,Localizer["Sys.Edit"]), + ColumnFormatInfo.MakeDialogButton(ButtonTypesEnum.Button,delurl,Localizer["Sys.Delete"],null,null,showDialog:false) + }; + } + + /// + /// 查询结果 + /// + public override IOrderedQueryable GetSearchQuery() + { + IOrderedQueryable query = null; + if (Searcher.DpType == DpTypeEnum.User) + { + query = DC.Set() + .Join(DC.Set(), ok => ok.UserCode, ik => ik.ITCode, (dp, user) => new { dp = dp, user = user }) + .CheckContain(Searcher.Name, x => x.user.Name) + .CheckContain(Searcher.TableName, x => x.dp.TableName) + .GroupBy(x => new { x.user.Name, x.user.ITCode, x.dp.TableName }, x => x.dp.RelateId) + .Select(x => new DataPrivilege_ListView + { + TargetId = x.Key.ITCode, + Name = x.Key.Name, + TableName = x.Key.TableName, + RelateIDs = x.Count(), + DpType = (int)Searcher.DpType + }) + .OrderByDescending(x => x.Name).OrderByDescending(x => x.TableName); + } + else + { + query = DC.Set() + .Join(DC.Set(), ok => ok.GroupCode, ik => ik.GroupCode, (dp, group) => new { dp = dp, group = group }) + .CheckContain(Searcher.Name, x => x.group.GroupName) + .CheckContain(Searcher.TableName, x => x.dp.TableName) + .GroupBy(x => new { x.group.GroupName, x.group.GroupCode, x.dp.TableName }, x => x.dp.RelateId) + .Select(x => new DataPrivilege_ListView + { + TargetId = x.Key.GroupCode, + Name = x.Key.GroupName, + TableName = x.Key.TableName, + RelateIDs = x.Count(), + DpType = (int)Searcher.DpType + }) + .OrderByDescending(x => x.Name).OrderByDescending(x => x.TableName); + + } + return query; + } + } + + public class DataPrivilege_ListView : BasePoco + { + [Display(Name = "_Admin.DpTargetName")] + public string Name { get; set; } + public string TargetId { get; set; } + [Display(Name = "_Admin.DataPrivilegeName")] + public string TableName { get; set; } + [Display(Name = "_Admin.DataPrivilegeCount")] + public int RelateIDs { get; set; } + public int DpType { get; set; } + public string DomainName { get; set; } + + public Guid? DomainID { get; set; } + + public string Edit { get; set; } + } + +} diff --git a/IoTGateway.ViewModel/_Admin/DataPrivilegeVMs/DataPrivilegeSearcher.cs b/IoTGateway.ViewModel/_Admin/DataPrivilegeVMs/DataPrivilegeSearcher.cs new file mode 100644 index 0000000..c5968f6 --- /dev/null +++ b/IoTGateway.ViewModel/_Admin/DataPrivilegeVMs/DataPrivilegeSearcher.cs @@ -0,0 +1,34 @@ +// WTM默认页面 Wtm buidin page +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using WalkingTec.Mvvm.Core; + +namespace WalkingTec.Mvvm.Mvc.Admin.ViewModels.DataPrivilegeVMs +{ + public enum DpTypeEnum + { + [Display(Name = "_Admin.GroupDp")] + UserGroup, + [Display(Name = "_Admin.UserDp")] + User + } + + public class DataPrivilegeSearcher : BaseSearcher + { + [Display(Name = "_Admin.Account")] + public string Name { get; set; } + [Display(Name = "_Admin.Privileges")] + public string TableName { get; set; } + public List TableNames { get; set; } + + [Display(Name = "_Admin.DpType")] + public DpTypeEnum DpType { get; set; } + public Guid? DomainID { get; set; } + public List AllDomains { get; set; } + protected override void InitVM() + { + TableNames = new List(); + } + } +} diff --git a/IoTGateway.ViewModel/_Admin/DataPrivilegeVMs/DataPrivilegeVM.cs b/IoTGateway.ViewModel/_Admin/DataPrivilegeVMs/DataPrivilegeVM.cs new file mode 100644 index 0000000..39c173d --- /dev/null +++ b/IoTGateway.ViewModel/_Admin/DataPrivilegeVMs/DataPrivilegeVM.cs @@ -0,0 +1,289 @@ +// WTM默认页面 Wtm buidin page +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkGroupVMs; +using WalkingTec.Mvvm.Core.Extensions; +using System.Threading.Tasks; + +namespace WalkingTec.Mvvm.Mvc.Admin.ViewModels.DataPrivilegeVMs +{ + public class DataPrivilegeVM : BaseCRUDVM + { + public List TableNames { get; set; } + public List AllItems { get; set; } + public List AllGroups { get; set; } + [Display(Name = "_Admin.AllowedDp")] + public List SelectedItemsID { get; set; } + + [Display(Name = "_Admin.DpType")] + public DpTypeEnum DpType { get; set; } + + public DpListVM DpList { get; set; } + [Display(Name = "_Admin.AllDp")] + public bool? IsAll { get; set; } + public DataPrivilegeVM() + { + DpList = new DpListVM(); + IsAll = false; + } + + protected override void InitVM() + { + TableNames = new List(); + if (ControllerName.Contains("/api") == false) + { + AllGroups = DC.Set().GetSelectListItems(Wtm, x => x.GroupName, x=>x.GroupCode); + TableNames = Wtm.DataPrivilegeSettings.ToListItems(x => x.PrivillegeName, x => x.ModelName); + } + SelectedItemsID = new List(); + List rids = null; + if (DpType == DpTypeEnum.User) + { + rids = DC.Set().Where(x => x.TableName == Entity.TableName && x.UserCode == Entity.UserCode).Select(x => x.RelateId).ToList(); + } + else + { + rids = DC.Set().Where(x => x.TableName == Entity.TableName && x.GroupCode == Entity.GroupCode).Select(x => x.RelateId).ToList(); + } + if (rids.Contains(null)) + { + IsAll = true; + } + else + { + SelectedItemsID.AddRange(rids.Select(x => x)); + } + + } + + protected override void ReInitVM() + { + TableNames = new List(); + AllItems = new List(); + TableNames = Wtm.DataPrivilegeSettings.ToListItems(x => x.PrivillegeName, x => x.ModelName); + if (ControllerName.Contains("/api") == false) + { + AllGroups = DC.Set().GetSelectListItems(Wtm, x => x.GroupName, x => x.GroupCode); + } + } + + public override void Validate() + { + if (DpType == DpTypeEnum.User) + { + if (string.IsNullOrEmpty(Entity.UserCode)) + { + MSD.AddModelError("Entity.UserCode", Localizer["Validate.{0}required", Localizer["_Admin.Account"]]); + } + else + { + var user = DC.Set().Where(x => x.ITCode == Entity.UserCode).FirstOrDefault(); + if (user == null) + { + MSD.AddModelError("Entity.UserCode", Localizer["Sys.CannotFindUser", Entity.UserCode]); + } + } + } + else + { + if(string.IsNullOrEmpty(Entity.GroupCode)) + { + MSD.AddModelError("Entity.GroupId", Localizer["Validate.{0}required", Localizer["_Admin.Group"]]); + } + } + + base.Validate(); + } + + public override async Task DoAddAsync() + { + if (SelectedItemsID == null && IsAll == false) + { + return; + } + List oldIDs = null; + + if (DpType == DpTypeEnum.User) + { + oldIDs = DC.Set().Where(x => x.UserCode == Entity.UserCode && x.TableName == this.Entity.TableName).Select(x => x.ID).ToList(); + } + else + { + oldIDs = DC.Set().Where(x => x.GroupCode == Entity.GroupCode && x.TableName == this.Entity.TableName).Select(x => x.ID).ToList(); + } + foreach (var oldid in oldIDs) + { + DataPrivilege dp = new DataPrivilege { ID = oldid }; + DC.Set().Attach(dp); + DC.DeleteEntity(dp); + } + if (DpType == DpTypeEnum.User) + { + if (IsAll == true) + { + DataPrivilege dp = new DataPrivilege(); + dp.RelateId = null; + dp.UserCode = Entity.UserCode; + dp.TableName = this.Entity.TableName; + DC.Set().Add(dp); + + } + else + { + foreach (var id in SelectedItemsID) + { + DataPrivilege dp = new DataPrivilege(); + dp.RelateId = id; + dp.UserCode = Entity.UserCode; + dp.TableName = this.Entity.TableName; + DC.Set().Add(dp); + } + } + } + else + { + if (IsAll == true) + { + DataPrivilege dp = new DataPrivilege(); + dp.RelateId = null; + dp.GroupCode = Entity.GroupCode; + dp.TableName = this.Entity.TableName; + DC.Set().Add(dp); + } + else + { + foreach (var id in SelectedItemsID) + { + DataPrivilege dp = new DataPrivilege(); + dp.RelateId = id; + dp.GroupCode = Entity.GroupCode; + dp.TableName = this.Entity.TableName; + DC.Set().Add(dp); + } + } + } + await DC.SaveChangesAsync(); + if (DpType == DpTypeEnum.User) + { + await Wtm.RemoveUserCache(Entity.UserCode); + } + else + { + var userids = DC.Set().Where(x => x.GroupCode == Entity.GroupCode).Select(x => x.UserCode).ToArray(); + await Wtm.RemoveUserCache(userids); + } + + } + + public override async Task DoEditAsync(bool updateAllFields = false) + { + List oldIDs = null; + + if (DpType == DpTypeEnum.User) + { + oldIDs = DC.Set().Where(x => x.UserCode == Entity.UserCode && x.TableName == this.Entity.TableName).Select(x => x.ID).ToList(); + } + else + { + oldIDs = DC.Set().Where(x => x.GroupCode == Entity.GroupCode && x.TableName == this.Entity.TableName).Select(x => x.ID).ToList(); + } + foreach (var oldid in oldIDs) + { + DataPrivilege dp = new DataPrivilege { ID = oldid }; + DC.Set().Attach(dp); + DC.DeleteEntity(dp); + } + if(IsAll == true) + { + if (DpType == DpTypeEnum.User) + { + DataPrivilege dp = new DataPrivilege(); + dp.RelateId = null; + dp.UserCode = Entity.UserCode; + dp.TableName = this.Entity.TableName; + DC.Set().Add(dp); + + } + else + { + DataPrivilege dp = new DataPrivilege(); + dp.RelateId = null; + dp.GroupCode = Entity.GroupCode; + dp.TableName = this.Entity.TableName; + DC.Set().Add(dp); + } + } + else { + if (SelectedItemsID != null) + { + if (DpType == DpTypeEnum.User) + { + foreach (var id in SelectedItemsID) + { + DataPrivilege dp = new DataPrivilege(); + dp.RelateId = id; + dp.UserCode = Entity.UserCode; + dp.TableName = this.Entity.TableName; + DC.Set().Add(dp); + } + + } + else + { + foreach (var id in SelectedItemsID) + { + DataPrivilege dp = new DataPrivilege(); + dp.RelateId = id; + dp.GroupCode = Entity.GroupCode; + dp.TableName = this.Entity.TableName; + DC.Set().Add(dp); + } + } + } + } + await DC.SaveChangesAsync(); + if (DpType == DpTypeEnum.User) + { + await Wtm.RemoveUserCache(Entity.UserCode); + } + else + { + var userids = DC.Set().Where(x => x.GroupCode == Entity.GroupCode).Select(x => x.UserCode).ToArray(); + await Wtm.RemoveUserCache(userids); + } + } + + public override async Task DoDeleteAsync() + { + List oldIDs = null; + + if (DpType == DpTypeEnum.User) + { + oldIDs = DC.Set().Where(x => x.UserCode == Entity.UserCode && x.TableName == this.Entity.TableName).Select(x => x.ID).ToList(); + } + else + { + oldIDs = DC.Set().Where(x => x.GroupCode == Entity.GroupCode && x.TableName == this.Entity.TableName).Select(x => x.ID).ToList(); + } + foreach (var oldid in oldIDs) + { + DataPrivilege dp = new DataPrivilege { ID = oldid }; + DC.Set().Attach(dp); + DC.DeleteEntity(dp); + } + await DC.SaveChangesAsync(); + if (DpType == DpTypeEnum.User) + { + await Wtm.RemoveUserCache(Entity.UserCode.ToString()); + } + else + { + var userids = DC.Set().Where(x => x.GroupCode == Entity.GroupCode).Select(x => x.UserCode).ToArray(); + await Wtm.RemoveUserCache(userids); + } + } + } +} diff --git a/IoTGateway.ViewModel/_Admin/DataPrivilegeVMs/DpListVM.cs b/IoTGateway.ViewModel/_Admin/DataPrivilegeVMs/DpListVM.cs new file mode 100644 index 0000000..aae6714 --- /dev/null +++ b/IoTGateway.ViewModel/_Admin/DataPrivilegeVMs/DpListVM.cs @@ -0,0 +1,68 @@ +// WTM默认页面 Wtm buidin page +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Text; +using WalkingTec.Mvvm.Core; + +namespace WalkingTec.Mvvm.Mvc.Admin.ViewModels.DataPrivilegeVMs +{ + public class DpListVM : BasePagedListVM + { + public DpListVM() + { + NeedPage = false; + } + + protected override IEnumerable> InitGridHeader() + { + return new List>{ + this.MakeGridHeader(x => x.Name), + }; + } + + public override IOrderedQueryable GetSearchQuery() + { + + var dps = Wtm.DataPrivilegeSettings.Where(x => x.ModelName == Searcher.TableName).SingleOrDefault(); + if (dps != null) + { + return dps.GetItemList(Wtm, Searcher.Filter).Select(x => new DpView { ID = x.Value.ToString(), Name = x.Text }).AsQueryable().OrderBy(x => x.Name); + } + else + { + return new List().AsQueryable().OrderBy(x => x.Name); + } + } + + public override IOrderedQueryable GetBatchQuery() + { + var dps = Wtm.DataPrivilegeSettings.Where(x => x.ModelName == Searcher.TableName).SingleOrDefault(); + if (dps != null) + { + return dps.GetItemList(Wtm, null,Ids).Select(x => new DpView { ID = x.Value.ToString(), Name = x.Text }).AsQueryable().OrderBy(x => x.Name); + } + else + { + return new List().AsQueryable().OrderBy(x => x.Name); + } + } + } + + public class DpView : TopBasePoco + { + public new string ID { get; set; } + + [Display(Name = "_Admin.DataPrivilegeName")] + public string Name { get; set; } + } + + public class DpSearcher : BaseSearcher + { + public string TableName { get; set; } + [Display(Name = "_Admin.DataPrivilegeName")] + public string Filter { get; set; } + } + +} diff --git a/IoTGateway.ViewModel/_Admin/FrameworkGroupVMs/FrameworkGroupBatchVM.cs b/IoTGateway.ViewModel/_Admin/FrameworkGroupVMs/FrameworkGroupBatchVM.cs new file mode 100644 index 0000000..c70f5f3 --- /dev/null +++ b/IoTGateway.ViewModel/_Admin/FrameworkGroupVMs/FrameworkGroupBatchVM.cs @@ -0,0 +1,20 @@ +// WTM默认页面 Wtm buidin page +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.EntityFrameworkCore; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; + +namespace WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkGroupVMs +{ + public class FrameworkGroupBatchVM : BaseBatchVM + { + public FrameworkGroupBatchVM() + { + ListVM = new FrameworkGroupListVM(); + } + + } +} diff --git a/IoTGateway.ViewModel/_Admin/FrameworkGroupVMs/FrameworkGroupImportVM.cs b/IoTGateway.ViewModel/_Admin/FrameworkGroupVMs/FrameworkGroupImportVM.cs new file mode 100644 index 0000000..067ec1e --- /dev/null +++ b/IoTGateway.ViewModel/_Admin/FrameworkGroupVMs/FrameworkGroupImportVM.cs @@ -0,0 +1,17 @@ +// WTM默认页面 Wtm buidin page +using WalkingTec.Mvvm.Core; + +namespace WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkGroupVMs +{ + public class FrameworkGroupTemplateVM : BaseTemplateVM + { + public ExcelPropety r1 = ExcelPropety.CreateProperty(x => x.GroupCode); + public ExcelPropety r2 = ExcelPropety.CreateProperty(x => x.GroupName); + public ExcelPropety r3 = ExcelPropety.CreateProperty(x => x.GroupRemark); + } + + public class FrameworkGroupImportVM : BaseImportVM + { + + } +} diff --git a/IoTGateway.ViewModel/_Admin/FrameworkGroupVMs/FrameworkGroupListVM.cs b/IoTGateway.ViewModel/_Admin/FrameworkGroupVMs/FrameworkGroupListVM.cs new file mode 100644 index 0000000..2adc7cf --- /dev/null +++ b/IoTGateway.ViewModel/_Admin/FrameworkGroupVMs/FrameworkGroupListVM.cs @@ -0,0 +1,45 @@ +// WTM默认页面 Wtm buidin page +using System.Collections.Generic; +using System.Linq; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; + +namespace WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkGroupVMs +{ + public class FrameworkGroupListVM : BasePagedListVM + { + protected override List InitGridAction() + { + return new List + { + this.MakeStandardAction("FrameworkGroup", GridActionStandardTypesEnum.Create, "","_Admin", dialogWidth: 800), + this.MakeStandardAction("FrameworkGroup", GridActionStandardTypesEnum.Edit, "","_Admin", dialogWidth: 800), + this.MakeStandardAction("FrameworkGroup", GridActionStandardTypesEnum.Delete, "", "_Admin",dialogWidth: 800), + this.MakeStandardAction("FrameworkGroup", GridActionStandardTypesEnum.BatchDelete, "","_Admin", dialogWidth: 800), + this.MakeStandardAction("FrameworkGroup", GridActionStandardTypesEnum.Import, "","_Admin", dialogWidth: 800), + this.MakeAction("FrameworkGroup","DataFunction",Localizer["_Admin.DataPrivilege"],Localizer["_Admin.DataPrivilege"], GridActionParameterTypesEnum.SingleId,"_Admin",800,null,null,x=>x.GroupCode).SetShowInRow(), + this.MakeStandardAction("FrameworkGroup", GridActionStandardTypesEnum.ExportExcel, "","_Admin"), + }; + } + + protected override IEnumerable> InitGridHeader() + { + return new List>{ + this.MakeGridHeader(x => x.GroupCode, 120), + this.MakeGridHeader(x => x.GroupName, 120), + this.MakeGridHeader(x => x.GroupRemark), + this.MakeGridHeaderAction(width: 300) + }; + } + + public override IOrderedQueryable GetSearchQuery() + { + var query = DC.Set() + .CheckContain(Searcher.GroupCode, x=>x.GroupCode) + .CheckContain(Searcher.GroupName, x=>x.GroupName) + .OrderBy(x => x.GroupCode); + return query; + } + + } +} diff --git a/IoTGateway.ViewModel/_Admin/FrameworkGroupVMs/FrameworkGroupMDVM.cs b/IoTGateway.ViewModel/_Admin/FrameworkGroupVMs/FrameworkGroupMDVM.cs new file mode 100644 index 0000000..d792eb8 --- /dev/null +++ b/IoTGateway.ViewModel/_Admin/FrameworkGroupVMs/FrameworkGroupMDVM.cs @@ -0,0 +1,100 @@ +// WTM默认页面 Wtm buidin page +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Mvc.Admin.ViewModels.DataPrivilegeVMs; +using WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkMenuVMs; + +namespace WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkGroupVMs +{ + public class FrameworkGroupMDVM : BaseVM + { + + public string GroupCode { get; set; } + public List DpLists { get; set; } + + public FrameworkGroupMDVM() + { + } + + protected override void InitVM() + { + DpLists = new List(); + foreach (var item in Wtm.DataPrivilegeSettings) + { + DpListVM list = new DpListVM(); + list.Searcher = new DpSearcher(); + list.Searcher.TableName = item.ModelName; + DpLists.Add(new GroupDp { DpName = item.PrivillegeName, List = list, SelectedIds = new List() }); + } + var alldp = DC.Set().Where(x => x.GroupCode == GroupCode).ToList(); + foreach (var item in DpLists) + { + var select = alldp.Where(x => x.TableName == item.List.Searcher.TableName).Select(x => x.RelateId).ToList(); + if(select.Count == 0) + { + item.IsAll = null; + } + else if (select.Contains(null)) + { + item.IsAll = true; + } + else + { + item.IsAll = false; + item.SelectedIds = select; + } + } + } + + public bool DoChange() + { + List oldIDs = DC.Set().Where(x => x.GroupCode == GroupCode).Select(x => x.ID).ToList(); + + foreach (var oldid in oldIDs) + { + DataPrivilege dp = new DataPrivilege { ID = oldid }; + DC.Set().Attach(dp); + DC.DeleteEntity(dp); + } + foreach (var item in DpLists) + { + if(item.IsAll == true) + { + DataPrivilege dp = new DataPrivilege(); + dp.RelateId = null; + dp.GroupCode = GroupCode; + dp.TableName = item.List.Searcher.TableName; + DC.Set().Add(dp); + } + if (item.IsAll == false && item.SelectedIds != null) + { + foreach (var id in item.SelectedIds) + { + DataPrivilege dp = new DataPrivilege(); + dp.RelateId = id; + dp.GroupCode = GroupCode; + dp.TableName = item.List.Searcher.TableName; + DC.Set().Add(dp); + } + + } + } + DC.SaveChanges(); + return true; + } + + } + + public class GroupDp + { + public DpListVM List { get; set; } + public string DpName { get; set; } + + public List SelectedIds { get; set; } + + public bool? IsAll { get; set; } + } +} diff --git a/IoTGateway.ViewModel/_Admin/FrameworkGroupVMs/FrameworkGroupSearcher.cs b/IoTGateway.ViewModel/_Admin/FrameworkGroupVMs/FrameworkGroupSearcher.cs new file mode 100644 index 0000000..19f7b68 --- /dev/null +++ b/IoTGateway.ViewModel/_Admin/FrameworkGroupVMs/FrameworkGroupSearcher.cs @@ -0,0 +1,19 @@ +// WTM默认页面 Wtm buidin page +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Threading.Tasks; +using WalkingTec.Mvvm.Core; + +namespace WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkGroupVMs +{ + public class FrameworkGroupSearcher : BaseSearcher + { + [Display(Name = "_Admin.GroupCode")] + public string GroupCode { get; set; } + + [Display(Name = "_Admin.GroupName")] + public string GroupName { get; set; } + } +} diff --git a/IoTGateway.ViewModel/_Admin/FrameworkGroupVMs/FrameworkGroupVM.cs b/IoTGateway.ViewModel/_Admin/FrameworkGroupVMs/FrameworkGroupVM.cs new file mode 100644 index 0000000..eb70752 --- /dev/null +++ b/IoTGateway.ViewModel/_Admin/FrameworkGroupVMs/FrameworkGroupVM.cs @@ -0,0 +1,51 @@ +// WTM默认页面 Wtm buidin page +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; + +namespace WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkGroupVMs +{ + public class FrameworkGroupVM : BaseCRUDVM + { + public override DuplicatedInfo SetDuplicatedCheck() + { + var rv = CreateFieldsInfo(SimpleField(x => x.GroupName)); + rv.AddGroup(SimpleField(x => x.GroupCode)); + return rv; + } + + public override void DoEdit(bool updateAllFields = false) + { + if (FC.ContainsKey("Entity.GroupCode")) + { + FC.Remove("Entity.GroupCode"); + } + + base.DoEdit(updateAllFields); + } + + public override async Task DoDeleteAsync() + { + using (var tran = DC.BeginTransaction()) + { + try + { + await base.DoDeleteAsync(); + var ur = DC.Set().Where(x => x.GroupCode == Entity.GroupCode); + DC.Set().RemoveRange(ur); + DC.SaveChanges(); + tran.Commit(); + await Wtm.RemoveUserCache(ur.Select(x => x.UserCode).ToArray()); + } + catch + { + tran.Rollback(); + } + } + } + + } +} diff --git a/IoTGateway.ViewModel/_Admin/FrameworkMenuVMs/FrameworkActionListVM.cs b/IoTGateway.ViewModel/_Admin/FrameworkMenuVMs/FrameworkActionListVM.cs new file mode 100644 index 0000000..fe14b0a --- /dev/null +++ b/IoTGateway.ViewModel/_Admin/FrameworkMenuVMs/FrameworkActionListVM.cs @@ -0,0 +1,111 @@ +// WTM默认页面 Wtm buidin page +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using WalkingTec.Mvvm.Core; + +namespace WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkMenuVMs +{ + public class FrameworkActionListVM : BasePagedListVM + { + + public FrameworkActionListVM() + { + NeedPage = false; + } + + protected override List InitGridAction() + { + var actions = new List + { + }; + return actions; + } + + protected override IEnumerable> InitGridHeader() + { + var header = new List>(); + + header.Add(this.MakeGridHeader(x => x.ModuleName, 150)); + header.Add(this.MakeGridHeader(x => x.ActionName, 150)); + header.Add(this.MakeGridHeader(x => x.ClassName, 150)); + header.Add(this.MakeGridHeader(x => x.MethodName, 150)); + + return header; + } + + /// + /// 查询结果 + /// + public override IOrderedQueryable GetSearchQuery() + { + var newdc = DC as FrameworkContext; + List actions = new List(); + var urls = newdc.BaseFrameworkMenus.Where(y => y.IsInside == true && y.FolderOnly == false).Select(y => y.Url).Distinct().ToList(); + if (ControllerName.Contains("/api") == false) + { + actions = Wtm.GlobaInfo.AllModule.SelectMany(x=>x.Actions) + .Where(x => urls.Contains(x.Url) == false) + .Select(x => new FrameworkAction_ListView + { + ID = x.ID, + ModuleID = x.ModuleId, + ModuleName = x.Module.ModuleName, + ActionName = x.ActionName, + ClassName = x.Module.ClassName, + MethodName = x.MethodName, + AreaName = x.Module.Area?.AreaName + }).ToList(); + } + else + { + actions = Wtm.GlobaInfo.AllModule.SelectMany(x => x.Actions) + .Where(x => x.Module.IsApi == true && urls.Contains(x.Url) == false) + .Select(x => new FrameworkAction_ListView + { + ID = x.ID, + ModuleID = x.ModuleId, + ModuleName = x.Module.ModuleName, + ActionName = x.ActionName, + ClassName = x.Module.ClassName, + MethodName = x.MethodName, + AreaName = x.Module.Area?.AreaName + }).ToList(); + + } + + var modules = Wtm.GlobaInfo.AllModule; + List toremove = new List(); + foreach (var item in actions) + { + var m = modules.Where(x => x.ClassName == item.ClassName && x.Area?.AreaName == item.AreaName).FirstOrDefault(); + var a = m?.Actions.Where(x => x.MethodName == item.MethodName).FirstOrDefault(); + if(m?.IgnorePrivillege == true || a?.IgnorePrivillege == true) + { + toremove.Add(item); + } + } + toremove.ForEach(x => actions.Remove(x)); + return actions.AsQueryable().OrderBy(x=>x.AreaName).ThenBy(x=>x.ModuleName).ThenBy(x=>x.MethodName); + } + + } + + public class FrameworkAction_ListView : BasePoco + { + public Guid? ModuleID { get; set; } + + [Display(Name = "Codegen.ModuleName")] + public string ModuleName { get; set; } + [Display(Name = "_Admin.ActionName")] + public string ActionName { get; set; } + [Display(Name = "_Admin.ClassName")] + public string ClassName { get; set; } + [Display(Name = "_Admin.MethodName")] + public string MethodName { get; set; } + + public string AreaName { get; set; } + + } +} diff --git a/IoTGateway.ViewModel/_Admin/FrameworkMenuVMs/FrameworkMenuBatchVM.cs b/IoTGateway.ViewModel/_Admin/FrameworkMenuVMs/FrameworkMenuBatchVM.cs new file mode 100644 index 0000000..f8c070e --- /dev/null +++ b/IoTGateway.ViewModel/_Admin/FrameworkMenuVMs/FrameworkMenuBatchVM.cs @@ -0,0 +1,48 @@ +// WTM默认页面 Wtm buidin page +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; + +namespace WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkMenuVMs +{ + public class FrameworkMenuBatchVM : BaseBatchVM + { + public FrameworkMenuBatchVM() + { + } + protected override void InitVM() + { + } + + public override bool DoBatchDelete() + { + if (Ids != null) + { + foreach (var item in Ids) + { + FrameworkMenu f = new FrameworkMenu { ID = Guid.Parse(item) }; + DC.CascadeDelete(f); + } + } + DC.SaveChanges(); + return true; + } + } + + + public class FrameworkMenu_BatchEdit : BaseVM + { + public List IDs { get; set; } + [Display(Name = "_Admin.ShowOnMenu")] + public bool ShowOnMenu { get; set; } + + [Display(Name = "_Admin.ParentFolder")] + public Guid? ParentID { get; set; } + public List AllParents { get; set; } + [Display(Name = "_Admin.Icon")] + public string Icon { get; set; } + } +} diff --git a/IoTGateway.ViewModel/_Admin/FrameworkMenuVMs/FrameworkMenuListVM.cs b/IoTGateway.ViewModel/_Admin/FrameworkMenuVMs/FrameworkMenuListVM.cs new file mode 100644 index 0000000..fb43bed --- /dev/null +++ b/IoTGateway.ViewModel/_Admin/FrameworkMenuVMs/FrameworkMenuListVM.cs @@ -0,0 +1,243 @@ +// WTM默认页面 Wtm buidin page +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; + +namespace WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkMenuVMs +{ + public class FrameworkMenuListVM : BasePagedListVM + { + public FrameworkMenuListVM() + { + this.NeedPage = false; + } + + protected override IEnumerable> InitGridHeader() + { + List> rv = new List>(); + switch (SearcherMode) + { + case ListVMSearchModeEnum.Batch: + rv.AddRange(new GridColumn[] { + this.MakeGridHeader(x => x.PageName), + this.MakeGridHeader(x => x.ModuleName, 200), + this.MakeGridHeader(x => x.ActionName, 150), + }); + break; + case ListVMSearchModeEnum.Custom1: + rv.AddRange(new GridColumn[] { + this.MakeGridHeader(x => x.PageName,300), + }); + break; + case ListVMSearchModeEnum.Custom2: + rv.AddRange(new GridColumn[] { + this.MakeGridHeader(x => x.PageName,200), + this.MakeGridHeader(x => x.ParentID).SetHeader(Localizer["Sys.Operation"]).SetFormat((item, cell) => GenerateCheckBox(item)).SetAlign(GridColumnAlignEnum.Left), + }); + break; + default: + rv.AddRange(new GridColumn[] { + this.MakeGridHeader(x => x.PageName,300), + this.MakeGridHeader(x => x.ModuleName, 150), + this.MakeGridHeader(x => x.ShowOnMenu), + this.MakeGridHeader(x => x.FolderOnly), + this.MakeGridHeader(x => x.IsPublic), + this.MakeGridHeader(x => x.DisplayOrder), + this.MakeGridHeader(x => x.Icon, 100).SetFormat(PhotoIdFormat), + this.MakeGridHeaderAction(width: 270) + }); + break; + } + return rv; + } + + private object GenerateCheckBox(FrameworkMenu_ListView item) + { + string rv = ""; + if (item.FolderOnly == false) + { + if (item.IsInside == true) + { + + var others = item.Children?.ToList(); + rv += UIService.MakeCheckBox(item.Allowed, Localizer["Sys.MainPage"], "menu_" + item.ID, "1"); + if (others != null) + { + foreach (var c in others) + { + string actionname = ""; + if(c.ActionName != null) + { + actionname = Localizer[c.ActionName]; + } + rv += UIService.MakeCheckBox(c.Allowed, actionname, "menu_" + c.ID, "1"); + } + } + } + else + { + rv += UIService.MakeCheckBox(item.Allowed, Localizer["Sys.MainPage"], "menu_" + item.ID, "1"); + } + } + return rv; + } + + + protected override List InitGridAction() + { + if (SearcherMode == ListVMSearchModeEnum.Search) + { + return new List{ + this.MakeAction("FrameworkMenu", "Create",Localizer["Sys.Create"], Localizer["Sys.Create"], GridActionParameterTypesEnum.SingleIdWithNull,"_Admin").SetIconCls("layui-icon layui-icon-add-1"), + this.MakeStandardAction("FrameworkMenu", GridActionStandardTypesEnum.Edit, "", "_Admin"), + this.MakeStandardAction("FrameworkMenu", GridActionStandardTypesEnum.Delete, "", "_Admin"), + this.MakeStandardAction("FrameworkMenu", GridActionStandardTypesEnum.Details, "", "_Admin"), + this.MakeAction( "FrameworkMenu", "UnsetPages", Localizer["_Admin.CheckPage"], Localizer["_Admin.UnsetPages"],GridActionParameterTypesEnum.NoId, "_Admin").SetIconCls("layui-icon layui-icon-ok"), + this.MakeAction("FrameworkMenu", "RefreshMenu", Localizer["_Admin.RefreshMenu"], Localizer["_Admin.RefreshMenu"], GridActionParameterTypesEnum.NoId,"_Admin").SetShowDialog(false).SetIconCls("layui-icon layui-icon-refresh"), + }; + } + else + { + return new List(); + } + } + + + private string PhotoIdFormat(FrameworkMenu_ListView entity, object val) + { + if (entity.Icon != null) + { + return $""; + } + else + { + return ""; + } + } + + public override IOrderedQueryable GetSearchQuery() + { + + var data = DC.Set().ToList(); + var topdata = data.Where(x => x.ParentId == null).ToList().FlatTree(x => x.DisplayOrder).Where(x => x.IsInside == false || x.FolderOnly == true || x.Url.EndsWith("/Index") || x.MethodName == null).ToList(); + foreach (var item in topdata) + { + if (item.PageName?.StartsWith("MenuKey.") == true) + { + item.PageName =Localizer[item.PageName]; + } + if (item.ModuleName?.StartsWith("MenuKey.") == true) + { + item.ModuleName = Localizer[item.ModuleName]; + } + + } + topdata.ForEach((x) => { int l = x.GetLevel(); for (int i = 0; i < l; i++) { x.PageName = "    " + x.PageName; } }); + if (SearcherMode == ListVMSearchModeEnum.Custom2) + { + var pris = DC.Set() + .Where(x => x.RoleCode == DC.Set().CheckID(Searcher.RoleID,null).Select(x=>x.RoleCode).FirstOrDefault()).ToList(); + var allowed = pris.Where(x => x.Allowed == true).Select(x => x.MenuItemId).ToList(); + var denied = pris.Where(x => x.Allowed == false).Select(x => x.MenuItemId).ToList(); + int order = 0; + var data2 = topdata.Select(x => new FrameworkMenu_ListView + { + ID = x.ID, + PageName = x.PageName, + ModuleName = x.ModuleName, + ActionName = x.ActionName, + ShowOnMenu = x.ShowOnMenu, + FolderOnly = x.FolderOnly, + IsPublic = x.IsPublic, + DisplayOrder = x.DisplayOrder, + Children = x.Children?.Select(y => new FrameworkMenu_ListView + { + ID = y.ID, + Allowed = allowed.Contains(y.ID), + ActionName = y.ActionName + }), + ExtraOrder = order++, + ParentID = x.ParentId, + Parent = x.Parent, + IsInside = x.IsInside, + HasChild = (x.Children != null && x.Children.Count() > 0) ? true : false, + Allowed = allowed.Contains(x.ID), + Denied = denied.Contains(x.ID) + }).OrderBy(x => x.ExtraOrder); + return data2.AsQueryable() as IOrderedQueryable; + } + else + { + int order = 0; + var data2 = topdata.Select(x => new FrameworkMenu_ListView + { + ID = x.ID, + PageName = x.PageName, + ModuleName = x.ModuleName, + ActionName = x.ActionName, + ShowOnMenu = x.ShowOnMenu, + FolderOnly = x.FolderOnly, + IsPublic = x.IsPublic, + DisplayOrder = x.DisplayOrder, + ExtraOrder = order++, + + ParentID = x.ParentId, + Icon = x.Icon, + HasChild = (x.Children != null && x.Children.Count() > 0) ? true : false + }).OrderBy(x => x.ExtraOrder); + + return data2.AsQueryable() as IOrderedQueryable; + + } + } + + } + + public class FrameworkMenu_ListView : BasePoco + { + [Display(Name = "_Admin.PageName")] + public string PageName { get; set; } + + [Display(Name = "Codegen.ModuleName")] + public string ModuleName { get; set; } + + [Display(Name = "_Admin.ActionName")] + public string ActionName { get; set; } + + [Display(Name = "_Admin.ShowOnMenu")] + public bool? ShowOnMenu { get; set; } + + [Display(Name = "_Admin.FolderOnly")] + public bool? FolderOnly { get; set; } + + [Display(Name = "_Admin.IsPublic")] + public bool? IsPublic { get; set; } + + [Display(Name = "_Admin.DisplayOrder")] + public int? DisplayOrder { get; set; } + + [Display(Name = "_Admin.Icon")] + public string Icon { get; set; } + + public bool Allowed { get; set; } + + public bool Denied { get; set; } + + public bool HasChild { get; set; } + + public string IconClass { get; set; } + + public IEnumerable Children { get; set; } + + public FrameworkMenu Parent { get; set; } + + public Guid? ParentID { get; set; } + + public int ExtraOrder { get; set; } + + public bool? IsInside { get; set; } + } +} diff --git a/IoTGateway.ViewModel/_Admin/FrameworkMenuVMs/FrameworkMenuListVM2.cs b/IoTGateway.ViewModel/_Admin/FrameworkMenuVMs/FrameworkMenuListVM2.cs new file mode 100644 index 0000000..9dd87b1 --- /dev/null +++ b/IoTGateway.ViewModel/_Admin/FrameworkMenuVMs/FrameworkMenuListVM2.cs @@ -0,0 +1,73 @@ +// WTM默认页面 Wtm buidin page +using System.Collections.Generic; +using System.Linq; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; + +namespace WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkMenuVMs +{ + public class FrameworkMenuListVM2 : BasePagedListVM + { + public FrameworkMenuListVM2() + { + this.NeedPage = false; + } + + protected override IEnumerable> InitGridHeader() + { + List> rv = new List>(); + rv.AddRange(new GridColumn[] { + this.MakeGridHeader(x => x.PageName, 300), + this.MakeGridHeader(x => x.ModuleName, 150), + this.MakeGridHeader(x => x.ShowOnMenu, 60), + this.MakeGridHeader(x => x.FolderOnly, 60), + this.MakeGridHeader(x => x.IsPublic, 60), + this.MakeGridHeader(x => x.DisplayOrder, 60), + this.MakeGridHeader(x => x.Icon, 100), + this.MakeGridHeader(x => x.Children, 100), + this.MakeGridHeader(x=>x.ParentID).SetHide(), + this.MakeGridHeaderAction(width: 290) + }); + return rv; + } + + public override IOrderedQueryable GetSearchQuery() + { + var data = DC.Set().ToList(); + var topdata = data.Where(x => x.ParentId == null).ToList().FlatTree(x => x.DisplayOrder).Where(x => x.IsInside == false || x.FolderOnly == true || string.IsNullOrEmpty(x.MethodName)).ToList(); + foreach (var item in topdata) + { + if (item.PageName?.StartsWith("MenuKey.") == true) + { + item.PageName = Localizer[item.PageName]; + } + if (item.ModuleName?.StartsWith("MenuKey.") == true) + { + item.ModuleName = Localizer[item.ModuleName]; + } + } + int order = 0; + var data2 = topdata.Select(x => new FrameworkMenu_ListView + { + ID = x.ID, + PageName = x.PageName, + ModuleName = x.ModuleName, + ActionName = x.ActionName, + ShowOnMenu = x.ShowOnMenu, + FolderOnly = x.FolderOnly, + IsPublic = x.IsPublic, + DisplayOrder = x.DisplayOrder, + ExtraOrder = order++, + ParentID = x.ParentId, + Icon = x.Icon, + HasChild = (x.Children != null && x.Children.Count() > 0) ? true : false + }).OrderBy(x => x.ExtraOrder).ToList(); + + return data2.AsQueryable() as IOrderedQueryable; + } + + + + } + +} diff --git a/IoTGateway.ViewModel/_Admin/FrameworkMenuVMs/FrameworkMenuSearcher.cs b/IoTGateway.ViewModel/_Admin/FrameworkMenuVMs/FrameworkMenuSearcher.cs new file mode 100644 index 0000000..b95d38d --- /dev/null +++ b/IoTGateway.ViewModel/_Admin/FrameworkMenuVMs/FrameworkMenuSearcher.cs @@ -0,0 +1,29 @@ +// WTM默认页面 Wtm buidin page +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Threading.Tasks; +using WalkingTec.Mvvm.Core; + +namespace WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkMenuVMs +{ + public enum FrameworkMenuMode { Normal = 0, RoleMode = 1, RoleSetMode = 2 } + public class FrameworkMenuSearcher : BaseSearcher + { + [Display(Name = "_Admin.PageName")] + public string PageName { get; set; } + [Display(Name = "Codegen.ModuleName")] + public string ModuleName { get; set; } + [Display(Name = "_Admin.ActionName")] + public string ActionName { get; set; } + [Display(Name = "_Admin.ShowOnMenu")] + public bool? ShowOnMenu { get; set; } + [Display(Name = "_Admin.IsPublic")] + public bool? IsPublic { get; set; } + [Display(Name = "_Admin.FolderOnly")] + public bool? FolderOnly { get; set; } + + public Guid? RoleID { get; set; } + } +} diff --git a/IoTGateway.ViewModel/_Admin/FrameworkMenuVMs/FrameworkMenuVM.cs b/IoTGateway.ViewModel/_Admin/FrameworkMenuVMs/FrameworkMenuVM.cs new file mode 100644 index 0000000..08c503a --- /dev/null +++ b/IoTGateway.ViewModel/_Admin/FrameworkMenuVMs/FrameworkMenuVM.cs @@ -0,0 +1,380 @@ +// WTM默认页面 Wtm buidin page +using Microsoft.EntityFrameworkCore; +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Text.Json.Serialization; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; +using WalkingTec.Mvvm.Core.Support.Json; +using WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkRoleVMs; + +namespace WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkMenuVMs +{ + public class FrameworkMenuVM : BaseCRUDVM + { + [Display(Name = "_Admin.IconFont")] + public string IconFont { get; set; } + + [Display(Name = "_Admin.Icon")] + public string IconFontItem { get; set; } + + [JsonIgnore] + public List AllParents { get; set; } + [JsonIgnore] + public List AllModules { get; set; } + [JsonIgnore] + public List AllActions { get; set; } + + [Display(Name = "_Admin.Action")] + public List SelectedActionIDs { get; set; } + + [Display(Name = "_Admin.Module")] + public string SelectedModule { get; set; } + + [Display(Name = "_Admin.AllowedRole")] + public List SelectedRolesIds { get; set; } + + [JsonIgnore] + public FrameworkRoleListVM RoleListVM { get; set; } + + public List IconSelectItems { get; set; } + + public FrameworkMenuVM() + { + RoleListVM = new FrameworkRoleListVM(); + AllActions = new List(); + AllModules = new List(); + + SelectedRolesIds = new List(); + } + + protected override void InitVM() + { + if (!string.IsNullOrEmpty(Entity.Icon)) + { + var res = Entity.Icon.Split(' '); + IconFont = res[0]; + IconFontItem = res[1]; + } + + SelectedRolesIds.AddRange(DC.Set().Where(x => x.MenuItemId == Entity.ID && x.RoleCode != null && x.Allowed == true).Select(x => x.RoleCode).ToList()); + + var data = DC.Set().AsNoTracking().ToList(); + var topMenu = data.Where(x => x.ParentId == null).ToList().FlatTree(x => x.DisplayOrder); + var pids = Entity.GetAllChildrenIDs(DC); + AllParents = data.Where(x => x.ID != Entity.ID && !pids.Contains(x.ID) && x.FolderOnly == true).ToList().ToListItems(y => y.PageName, x => x.ID); + + foreach (var p in AllParents) + { + if (p.Text.StartsWith("MenuKey.")) + { + p.Text = Localizer[p.Text]; + } + } + + var modules = Wtm.GlobaInfo.AllModule; + var toRemove = new List(); + foreach (var item in modules) + { + if (item.IgnorePrivillege) + { + toRemove.Add(item); + } + } + var m = Utils.ResetModule(modules); + toRemove.ForEach(x => m.Remove(x)); + + AllModules = m.ToListItems(y => y.ModuleName, y => y.FullName); + if (string.IsNullOrEmpty(SelectedModule) == false || (string.IsNullOrEmpty(Entity.Url) == false && Entity.IsInside == true)) + { + if (string.IsNullOrEmpty(SelectedModule)) + { + SelectedModule = m.Where(x => (x.FullName == Entity.ClassName)).FirstOrDefault()?.FullName; + } + var mm = m.Where(x => x.FullName == SelectedModule).SelectMany(x => x.Actions).Where(x => x.MethodName != "Index" && x.IgnorePrivillege == false).ToList(); + AllActions = mm.ToListItems(y => y.ActionName, y => y.Url); + if (SelectedActionIDs == null) + { + SelectedActionIDs = DC.Set().Where(x => AllActions.Select(y => y.Value).Contains(x.Url) && x.IsInside == true && x.FolderOnly == false).Select(x => x.Url).ToList(); + } + } + } + + + + public override void Validate() + { + if (Entity.IsInside == true && Entity.FolderOnly == false) + { + if (string.IsNullOrEmpty(SelectedModule) == true) + { + MSD.AddModelError("SelectedModule", Localizer["Validate.{0}required", Localizer["_Admin.Module"]]); + } + var modules = Wtm.GlobaInfo.AllModule; + var test = DC.Set().Where(x => x.ClassName == this.SelectedModule && (x.MethodName == null || x.MethodName == "Index") && x.ID != Entity.ID).FirstOrDefault(); + if (test != null) + { + MSD.AddModelError(" error", Localizer["_Admin.ModuleHasSet"]); + } + + } + base.Validate(); + } + + public override void DoEdit(bool updateAllFields = false) + { + Entity.Icon = $"{IconFont} {IconFontItem}"; + FC.Add("Entity.Icon", " "); + if (Entity.IsInside == false) + { + if (Entity.Url != null && Entity.Url != "" && Entity.Url.StartsWith("/") == false) + { + if (Entity.Url.ToLower().StartsWith("http://") == false && Entity.Url.ToLower().StartsWith("https://") == false) + { + Entity.Url = "http://" + Entity.Url; + } + } + if(Entity.Url != null) + { + Entity.Url = Entity.Url.TrimEnd('/'); + } + } + else + { + if (string.IsNullOrEmpty(SelectedModule) == false && Entity.FolderOnly == false) + { + var modules = Wtm.GlobaInfo.AllModule; + var m = Utils.ResetModule(modules, false); + var actionPage = m.Where(x => x.FullName == this.SelectedModule) + .SelectMany(x => x.Actions).Where(x => x.MethodName == "Index" || x.ActionDes?.IsPage == true) + .FirstOrDefault(); + if (actionPage == null && Entity.ShowOnMenu == true) + { + MSD.AddModelError("Entity.ModuleId", Localizer["_Admin.NoIndexInModule"]); + return; + } + List otherActions = null; + + var mainModule = m.Where(x => x.FullName == this.SelectedModule).FirstOrDefault(); + if (actionPage == null) + { + actionPage = new SimpleAction + { + Module = mainModule, + Url = "/" + mainModule.ClassName, + ActionName = mainModule.ModuleName + }; + } + var mainAction = actionPage; + + Entity.Url = mainAction.Url; + Entity.ModuleName = mainModule.ModuleName; + Entity.ActionName = mainAction.ActionDes?.Description ?? mainAction.ActionName; + Entity.ClassName = mainModule.FullName; + Entity.MethodName = null; + + otherActions = m.Where(x => x.FullName == this.SelectedModule) + .SelectMany(x => x.Actions) + .Where(x => x.MethodName != mainAction.MethodName) + .ToList(); + var actionsInDB = DC.Set().AsNoTracking().Where(x => x.ParentId == Entity.ID).ToList(); + int order = 1; + Entity.Children = new List(); + foreach (var action in otherActions) + { + if (SelectedActionIDs != null && SelectedActionIDs.Contains(action.Url)) + { + Guid aid = action.ID; + var adb = actionsInDB.Where(x => x.Url.ToLower() == action.Url.ToLower()).FirstOrDefault(); + if (adb != null) + { + aid = adb.ID; + } + var menu = new FrameworkMenu(); + menu.FolderOnly = false; + menu.IsPublic = Entity.IsPublic; + menu.Parent = Entity; + menu.ShowOnMenu = false; + menu.DisplayOrder = order++; + menu.Privileges = new List(); + menu.IsInside = true; + menu.Domain = Entity.Domain; + menu.PageName = action.ActionDes?.Description ?? action.ActionName; + menu.ModuleName = mainModule.ModuleName; + menu.ActionName = action.ActionDes?.Description ?? action.ActionName; + menu.ClassName = mainModule.FullName; + menu.MethodName = action.MethodName; + menu.Url = action.Url; + menu.ID = aid; + Entity.Children.Add(menu); + } + } + } + else + { + //Entity.Children = new List(); + Entity.Url = null; + } + } + if (Entity.FolderOnly == false) + { + if (FC.ContainsKey("Entity.Children") == false) + { + FC.Add("Entity.Children", 0); + FC.Add("Entity.Children[0].IsPublic", 0); + FC.Add("Entity.Children[0].PageName", 0); + FC.Add("Entity.Children[0].ModuleName", 0); + FC.Add("Entity.Children[0].ActionName", 0); + FC.Add("Entity.Children[0].ClassName", 0); + FC.Add("Entity.Children[0].MethodName", 0); + FC.Add("Entity.Children[0].Url", 0); + } + } + FC.Add("Entity.ModuleName", 0); + base.DoEdit(); + List guids = new List(); + guids.Add(Entity.ID); + if (Entity.Children != null) + { + guids.AddRange(Entity.Children?.Select(x => x.ID).ToList()); + } + AddPrivilege(guids); + } + + public override void DoAdd() + { + Entity.Icon = $"{IconFont} {IconFontItem}"; + if (Entity.IsInside == false) + { + if (Entity.Url != null && Entity.Url != "" && Entity.Url.StartsWith("/") == false) + { + if (Entity.Url.ToLower().StartsWith("http://") == false && Entity.Url.ToLower().StartsWith("https://") == false) + { + Entity.Url = "http://" + Entity.Url; + } + } + if(Entity.Url != null) + { + Entity.Url = Entity.Url.TrimEnd('/'); + } + } + else + { + + if (string.IsNullOrEmpty(SelectedModule) == false && Entity.FolderOnly == false) + { + var modules = Wtm.GlobaInfo.AllModule; + + var m = Utils.ResetModule(modules, false); + var actionPage = m.Where(x => x.FullName == this.SelectedModule) + .SelectMany(x => x.Actions).Where(x => x.MethodName == "Index" || x.ActionDes?.IsPage == true) + .FirstOrDefault(); + if (actionPage == null && Entity.ShowOnMenu == true) + { + MSD.AddModelError("Entity.ModuleId", Localizer["_Admin.NoIndexInModule"]); + return; + } + List otherActions = null; + var mainModule = m.Where(x => x.FullName == this.SelectedModule).FirstOrDefault(); + if(actionPage == null) + { + actionPage = new SimpleAction + { + Module = mainModule, + Url = "/" + mainModule.ClassName, + ActionName = mainModule.ModuleName + }; + } + var mainAction = actionPage; + + Entity.Url = mainAction.Url; + Entity.ModuleName = mainModule.ModuleName; + Entity.ActionName = mainAction.ActionDes?.Description ?? mainAction.ActionName; + Entity.ClassName = mainModule.FullName; + Entity.MethodName = null; + Entity.Children = new List(); + + otherActions = m.Where(x => x.FullName == this.SelectedModule).SelectMany(x => x.Actions).Where(x => x.MethodName != mainAction.MethodName).ToList(); + int order = 1; + foreach (var action in otherActions) + { + if (SelectedActionIDs?.Contains(action.Url) == true) + { + FrameworkMenu menu = new FrameworkMenu(); + menu.FolderOnly = false; + menu.IsPublic = Entity.IsPublic; + menu.Parent = Entity; + menu.ShowOnMenu = false; + menu.DisplayOrder = order++; + menu.Privileges = new List(); + menu.IsInside = true; + menu.Domain = Entity.Domain; + menu.PageName = action.ActionDes?.Description ?? action.ActionName; + menu.ModuleName = mainModule.ModuleName; + menu.ActionName = action.ActionDes?.Description ?? action.ActionName; + menu.ClassName = mainModule.FullName; + menu.MethodName = action.MethodName; + menu.Url = action.Url; + Entity.Children.Add(menu); + } + } + } + + else + { + Entity.Children = null; + Entity.Url = null; + } + + } + base.DoAdd(); + List guids = new List(); + guids.Add(Entity.ID); + if (Entity.Children != null) + { + guids.AddRange(Entity.Children?.Select(x => x.ID).ToList()); + } + AddPrivilege(guids); + } + + public void AddPrivilege(List menuids) + { + var admin = DC.Set().Where(x => x.RoleCode == "001").SingleOrDefault(); + if (admin != null && SelectedRolesIds.Contains(admin.RoleCode) == false) + { + SelectedRolesIds.Add(admin.RoleCode); + } + foreach (var menuid in menuids) + { + + if (SelectedRolesIds != null) + { + foreach (var code in SelectedRolesIds) + { + FunctionPrivilege fp = new FunctionPrivilege(); + fp.MenuItemId = menuid; + fp.RoleCode = code; + fp.Allowed = true; + DC.Set().Add(fp); + } + } + } + + DC.SaveChanges(); + } + + + public override void DoDelete() + { + try + { + DC.CascadeDelete(Entity); + DC.SaveChanges(); + } + catch + { } + } + } +} diff --git a/IoTGateway.ViewModel/_Admin/FrameworkMenuVMs/FrameworkMenuVM2.cs b/IoTGateway.ViewModel/_Admin/FrameworkMenuVMs/FrameworkMenuVM2.cs new file mode 100644 index 0000000..5cf84a3 --- /dev/null +++ b/IoTGateway.ViewModel/_Admin/FrameworkMenuVMs/FrameworkMenuVM2.cs @@ -0,0 +1,300 @@ +// WTM默认页面 Wtm buidin page +using Microsoft.EntityFrameworkCore; +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; + +namespace WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkMenuVMs +{ + public class FrameworkMenuVM2 : BaseCRUDVM + { + + [Display(Name = "_Admin.Action")] + public List SelectedActionIDs { get; set; } + + [Display(Name = "_Admin.Module")] + public string SelectedModule { get; set; } + + [Display(Name = "_Admin.AllowedRole")] + public List SelectedRolesCodes { get; set; } + + + public FrameworkMenuVM2() + { + SelectedRolesCodes = new List(); + } + + protected override void InitVM() + { + SelectedRolesCodes.AddRange(DC.Set().Where(x => x.MenuItemId == Entity.ID && x.RoleCode != null && x.Allowed == true).Select(x => x.RoleCode).ToList()); + + var data = DC.Set().ToList(); + var topMenu = data.Where(x => x.ParentId == null).ToList().FlatTree(x => x.DisplayOrder); + var modules = Wtm.GlobaInfo.AllModule; + + if (Entity.Url != null && Entity.IsInside == true) + { + SelectedModule = modules.Where(x => x.IsApi == true && (x.FullName == Entity.ClassName)).FirstOrDefault()?.FullName; + if (SelectedModule != null) + { + var urls = modules.Where(x => x.FullName == SelectedModule && x.IsApi == true).SelectMany(x => x.Actions).Where(x => x.IgnorePrivillege == false).Select(x => x.Url).ToList(); + SelectedActionIDs = DC.Set().Where(x => urls.Contains(x.Url) && x.IsInside == true && x.FolderOnly == false).Select(x => x.MethodName).ToList(); + } + else + { + SelectedModule = Entity.Url; + } + } + } + + public override void Validate() + { + if (Entity.IsInside == true && Entity.FolderOnly == false) + { + if (string.IsNullOrEmpty(SelectedModule) == true) + { + MSD.AddModelError("SelectedModule", Localizer["Validate.{0}required", Localizer["_Admin.Module"]]); + } + else + { + var modules = Wtm.GlobaInfo.AllModule; + var test = DC.Set().Where(x => x.Url != null && x.Url.ToLower() == this.Entity.Url.ToLower() && x.ID != Entity.ID).FirstOrDefault(); + if (test != null) + { + MSD.AddModelError(" error", Localizer["_Admin.ModuleHasSet"]); + } + } + } + base.Validate(); + } + + public override void DoEdit(bool updateAllFields = false) + { + if (Entity.IsInside == false) + { + if (Entity.Url != null && Entity.Url != "") + { + if (string.IsNullOrEmpty(Entity.Domain) == true) + { + if (Entity.Url.ToLower().StartsWith("http://") == false && Entity.Url.ToLower().StartsWith("https://") == false && Entity.Url.StartsWith("@") == false) + { + Entity.Url = "http://" + Entity.Url; + } + } + else + { + if (Entity.Url.StartsWith("/") == false) + { + Entity.Url = "/" + Entity.Url; + } + } + Entity.Url = Entity.Url.TrimEnd('/'); + } + } + else + { + + if (string.IsNullOrEmpty(SelectedModule) == false && Entity.FolderOnly == false) + { + var modules = Wtm.GlobaInfo.AllModule; + var ndc = DC.ReCreate(); + var actionsInDB = DC.Set().AsNoTracking().Where(x => x.ParentId == Entity.ID).ToList(); + var mo = modules.Where(x => x.FullName == this.SelectedModule && x.IsApi == true).FirstOrDefault(); + if (mo != null) + { + Entity.ModuleName = mo.ModuleName; + Entity.ClassName = mo.FullName; + Entity.MethodName = null; + + var otherActions = mo.Actions; + int order = 1; + Entity.Children = new List(); + foreach (var action in otherActions) + { + if (SelectedActionIDs != null && SelectedActionIDs.Contains(action.MethodName)) + { + Guid aid = action.ID; + var adb = actionsInDB.Where(x => x.Url.ToLower() == action.Url.ToLower()).FirstOrDefault(); + if (adb != null) + { + aid = adb.ID; + } + FrameworkMenu menu = new FrameworkMenu(); + menu.FolderOnly = false; + menu.IsPublic = Entity.IsPublic; + menu.Parent = Entity; + menu.ShowOnMenu = false; + menu.DisplayOrder = order++; + menu.Privileges = new List(); + menu.IsInside = true; + menu.Domain = Entity.Domain; + menu.PageName = action.ActionDes?.Description ?? action.ActionName; + menu.ModuleName = action.Module.ModuleName; + menu.ActionName = action.ActionDes?.Description ?? action.ActionName; + menu.Url = action.Url; + menu.ClassName = action.Module.FullName; + menu.MethodName = action.MethodName; + menu.ID = aid; + Entity.Children.Add(menu); + } + } + } + else + { + Entity.ModuleName = ""; + Entity.ClassName = ""; + Entity.MethodName = ""; + } + } + + else + { + Entity.Children = null; + Entity.Url = null; + } + } + if (FC.ContainsKey("Entity.Children") == false) + { + FC.Add("Entity.Children", 0); + FC.Add("Entity.Children[0].IsPublic", 0); + FC.Add("Entity.Children[0].PageName", 0); + FC.Add("Entity.Children[0].ModuleName", 0); + FC.Add("Entity.Children[0].ActionName", 0); + FC.Add("Entity.Children[0].ClassName", 0); + FC.Add("Entity.Children[0].MethodName", 0); + FC.Add("Entity.Children[0].Url", 0); + } + base.DoEdit(updateAllFields); + List guids = new List(); + guids.Add(Entity.ID); + if (Entity.Children != null) + { + guids.AddRange(Entity.Children?.Select(x => x.ID).ToList()); + } + AddPrivilege(guids); + } + + public override void DoAdd() + { + if (Entity.IsInside == false) + { + if (Entity.Url != null && Entity.Url != "") + { + if (string.IsNullOrEmpty(Entity.Domain) == true) + { + if (Entity.Url.ToLower().StartsWith("http://") == false && Entity.Url.ToLower().StartsWith("https://") == false && Entity.Url.StartsWith("@") == false) + { + Entity.Url = "http://" + Entity.Url; + } + } + else + { + if (Entity.Url.StartsWith("/") == false) + { + Entity.Url = "/" + Entity.Url; + } + } + Entity.Url = Entity.Url.TrimEnd('/'); + } + } + else + { + + if (string.IsNullOrEmpty(SelectedModule) == false && Entity.FolderOnly == false) + { + var modules = Wtm.GlobaInfo.AllModule; + + var mo = modules.Where(x => x.FullName == this.SelectedModule && x.IsApi == true).FirstOrDefault(); + if (mo != null) + { + Entity.ModuleName = mo.ModuleName; + Entity.ClassName = mo.FullName; + Entity.MethodName = null; + + var otherActions = mo.Actions; + int order = 1; + Entity.Children = new List(); + foreach (var action in otherActions) + { + if (SelectedActionIDs != null && SelectedActionIDs.Contains(action.MethodName)) + { + FrameworkMenu menu = new FrameworkMenu(); + menu.FolderOnly = false; + menu.IsPublic = Entity.IsPublic; + menu.Parent = Entity; + menu.ShowOnMenu = false; + menu.DisplayOrder = order++; + menu.Privileges = new List(); + menu.IsInside = true; + menu.Domain = Entity.Domain; + menu.PageName = action.ActionDes?.Description ?? action.ActionName; + menu.ModuleName = action.Module.ModuleName; + menu.ActionName = action.ActionDes?.Description ?? action.ActionName; + menu.Url = action.Url; + menu.ClassName = action.Module.FullName; + menu.MethodName = action.MethodName; + Entity.Children.Add(menu); + } + } + } + } + + else + { + Entity.Children = null; + Entity.Url = null; + } + + } + base.DoAdd(); + List guids = new List(); + guids.Add(Entity.ID); + if (Entity.Children != null) + { + guids.AddRange(Entity.Children?.Select(x => x.ID).ToList()); + } + AddPrivilege(guids); + } + + public void AddPrivilege(List menuids) + { + var admin = DC.Set().Where(x => x.RoleCode == "001").SingleOrDefault(); + if (admin != null && SelectedRolesCodes.Contains(admin.RoleCode) == false) + { + SelectedRolesCodes.Add(admin.RoleCode); + } + foreach (var menuid in menuids) + { + + if (SelectedRolesCodes != null) + { + foreach (var code in SelectedRolesCodes) + { + FunctionPrivilege fp = new FunctionPrivilege(); + fp.MenuItemId = menuid; + fp.RoleCode = code; + fp.Allowed = true; + DC.Set().Add(fp); + } + } + } + + DC.SaveChanges(); + } + + + public override void DoDelete() + { + try + { + DC.CascadeDelete(Entity); + DC.SaveChanges(); + } + catch + { } + } + } +} diff --git a/IoTGateway.ViewModel/_Admin/FrameworkRoleVMs/FrameworkRoleBatchVM.cs b/IoTGateway.ViewModel/_Admin/FrameworkRoleVMs/FrameworkRoleBatchVM.cs new file mode 100644 index 0000000..dc1b0fd --- /dev/null +++ b/IoTGateway.ViewModel/_Admin/FrameworkRoleVMs/FrameworkRoleBatchVM.cs @@ -0,0 +1,20 @@ +// WTM默认页面 Wtm buidin page +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.EntityFrameworkCore; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; + +namespace WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkRoleVMs +{ + public class FrameworkRoleBatchVM : BaseBatchVM + { + public FrameworkRoleBatchVM() + { + ListVM = new FrameworkRoleListVM(); + } + + } +} diff --git a/IoTGateway.ViewModel/_Admin/FrameworkRoleVMs/FrameworkRoleImportVM.cs b/IoTGateway.ViewModel/_Admin/FrameworkRoleVMs/FrameworkRoleImportVM.cs new file mode 100644 index 0000000..147f0c6 --- /dev/null +++ b/IoTGateway.ViewModel/_Admin/FrameworkRoleVMs/FrameworkRoleImportVM.cs @@ -0,0 +1,17 @@ +// WTM默认页面 Wtm buidin page +using WalkingTec.Mvvm.Core; + +namespace WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkRoleVMs +{ + public class FrameworkRoleTemplateVM : BaseTemplateVM + { + public ExcelPropety r1 = ExcelPropety.CreateProperty(x => x.RoleCode); + public ExcelPropety r2 = ExcelPropety.CreateProperty(x => x.RoleName); + public ExcelPropety r3 = ExcelPropety.CreateProperty(x => x.RoleRemark); + } + + public class FrameworkRoleImportVM : BaseImportVM + { + + } +} diff --git a/IoTGateway.ViewModel/_Admin/FrameworkRoleVMs/FrameworkRoleListVM.cs b/IoTGateway.ViewModel/_Admin/FrameworkRoleVMs/FrameworkRoleListVM.cs new file mode 100644 index 0000000..cfe100b --- /dev/null +++ b/IoTGateway.ViewModel/_Admin/FrameworkRoleVMs/FrameworkRoleListVM.cs @@ -0,0 +1,46 @@ +// WTM默认页面 Wtm buidin page +using System.Collections.Generic; +using System.Linq; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; + +namespace WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkRoleVMs +{ + public class FrameworkRoleListVM : BasePagedListVM + { + protected override List InitGridAction() + { + return new List + { + this.MakeStandardAction("FrameworkRole", GridActionStandardTypesEnum.Create, "","_Admin", dialogWidth: 800), + this.MakeStandardAction("FrameworkRole", GridActionStandardTypesEnum.Edit, "","_Admin", dialogWidth: 800), + this.MakeStandardAction("FrameworkRole", GridActionStandardTypesEnum.Delete, "", "_Admin",dialogWidth: 800), + this.MakeStandardAction("FrameworkRole", GridActionStandardTypesEnum.Details, "","_Admin", dialogWidth: 800), + this.MakeStandardAction("FrameworkRole", GridActionStandardTypesEnum.BatchDelete, "","_Admin", dialogWidth: 800), + this.MakeStandardAction("FrameworkRole", GridActionStandardTypesEnum.Import, "","_Admin", dialogWidth: 800), + this.MakeAction("FrameworkRole","PageFunction",Localizer["_Admin.PageFunction"],Localizer["_Admin.PageFunction"], GridActionParameterTypesEnum.SingleId,"_Admin",800).SetShowInRow(), + this.MakeStandardAction("FrameworkRole", GridActionStandardTypesEnum.ExportExcel, "","_Admin"), + }; + } + + protected override IEnumerable> InitGridHeader() + { + return new List>{ + this.MakeGridHeader(x => x.RoleCode, 120), + this.MakeGridHeader(x => x.RoleName, 120), + this.MakeGridHeader(x => x.RoleRemark), + this.MakeGridHeaderAction(width: 300) + }; + } + + public override IOrderedQueryable GetSearchQuery() + { + var query = DC.Set() + .CheckContain(Searcher.RoleCode,x=>x.RoleCode) + .CheckContain(Searcher.RoleName,x=>x.RoleName) + .OrderBy(x => x.RoleCode); + return query; + } + + } +} diff --git a/IoTGateway.ViewModel/_Admin/FrameworkRoleVMs/FrameworkRoleMDVM.cs b/IoTGateway.ViewModel/_Admin/FrameworkRoleVMs/FrameworkRoleMDVM.cs new file mode 100644 index 0000000..51bd7aa --- /dev/null +++ b/IoTGateway.ViewModel/_Admin/FrameworkRoleVMs/FrameworkRoleMDVM.cs @@ -0,0 +1,55 @@ +// WTM默认页面 Wtm buidin page +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkMenuVMs; +using WalkingTec.Mvvm.Core.Extensions; + +namespace WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkRoleVMs +{ + public class FrameworkRoleMDVM : BaseCRUDVM + { + public FrameworkMenuListVM ListVM { get; set; } + + public FrameworkRoleMDVM() + { + ListVM = new FrameworkMenuListVM(); + } + + protected override void InitVM() + { + ListVM.CopyContext(this); + ListVM.Searcher.RoleID = Entity.ID; + } + + public async Task DoChangeAsync() + { + var all = FC.Where(x => x.Key.StartsWith("menu_")).ToList(); + List AllowedMenuIds = all.Where(x => x.Value.ToString() == "1").Select(x=> Guid.Parse(x.Key.Replace("menu_",""))).ToList(); + var torem = AllowedMenuIds.Distinct(); + var oldIDs = DC.Set().Where(x => x.RoleCode == Entity.RoleCode).Select(x => x.ID).ToList(); + + foreach (var oldid in oldIDs) + { + FunctionPrivilege fp = new FunctionPrivilege { ID = oldid }; + DC.Set().Attach(fp); + DC.DeleteEntity(fp); + } + foreach (var menuid in AllowedMenuIds) + { + FunctionPrivilege fp = new FunctionPrivilege(); + fp.MenuItemId = menuid; + fp.RoleCode = Entity.RoleCode; + fp.Allowed = true; + DC.Set().Add(fp); + } + await DC.SaveChangesAsync(); + var userids = DC.Set().Where(x => x.RoleCode == Entity.RoleCode).Select(x => x.UserCode).ToArray(); + await Wtm.RemoveUserCache(userids); + return true; + } + + } +} diff --git a/IoTGateway.ViewModel/_Admin/FrameworkRoleVMs/FrameworkRoleMDVM2.cs b/IoTGateway.ViewModel/_Admin/FrameworkRoleVMs/FrameworkRoleMDVM2.cs new file mode 100644 index 0000000..e775285 --- /dev/null +++ b/IoTGateway.ViewModel/_Admin/FrameworkRoleVMs/FrameworkRoleMDVM2.cs @@ -0,0 +1,128 @@ +// WTM默认页面 Wtm buidin page +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Text.Json.Serialization; +using System.Threading.Tasks; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; + +namespace WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkRoleVMs +{ + public class FrameworkRoleMDVM2 : BaseCRUDVM + { + public List Pages { get; set; } + + public FrameworkRoleMDVM2() + { + + } + + protected override void InitVM() + { + var allowedids = DC.Set() + .Where(x => x.RoleCode == Entity.RoleCode && x.Allowed == true).Select(x => x.MenuItemId) + .ToList(); + var data = DC.Set().ToList(); + var topdata = data.Where(x => x.ParentId == null).ToList().FlatTree(x => x.DisplayOrder).Where(x => x.IsInside == false || x.FolderOnly == true || x.MethodName == null).ToList(); + int order = 0; + var data2 = topdata.Select(x => new Page_View + { + ID = x.ID, + Name = x.PageName, + AllActions = x.FolderOnly == true ? null : x.Children.ToListItems(y => y.ActionName, y => y.ID, null), + ParentID = x.ParentId, + Level = x.GetLevel(), + IsFolder = x.FolderOnly, + ExtraOrder = order++ + }).OrderBy(x => x.ExtraOrder).ToList(); + + foreach (var item in data2) + { + if (item.Name?.StartsWith("MenuKey.") == true) + { + item.Name = Localizer[item.Name]; + } + if (item.AllActions == null) + { + item.AllActions = new List(); + } + foreach (var act in item.AllActions) + { + act.Text = Localizer[act.Text]; + } + item.AllActions.Insert(0, new ComboSelectListItem { Text = Localizer["Sys.MainPage"], Value = item.ID.ToString() }); + var ids = item.AllActions.Select(x => Guid.Parse(x.Value.ToString())); + item.Actions = ids.Where(x => allowedids.Contains(x)).ToList(); + } + Pages = data2; + } + + public async Task DoChangeAsync() + { + List AllowedMenuIds = new List(); + var torem = AllowedMenuIds.Distinct(); + + foreach (var page in Pages) + { + if (page.Actions != null) + { + foreach (var action in page.Actions) + { + if (AllowedMenuIds.Contains(action) == false) + { + AllowedMenuIds.Add(action); + } + } + } + } + + var oldIDs = DC.Set().Where(x => x.RoleCode == Entity.RoleCode).Select(x => x.ID).ToList(); + foreach (var oldid in oldIDs) + { + FunctionPrivilege fp = new FunctionPrivilege { ID = oldid }; + DC.Set().Attach(fp); + DC.DeleteEntity(fp); + } + foreach (var menuid in AllowedMenuIds) + { + FunctionPrivilege fp = new FunctionPrivilege(); + fp.MenuItemId = menuid; + fp.RoleCode = Entity.RoleCode; + fp.Allowed = true; + DC.Set().Add(fp); + } + await DC.SaveChangesAsync(); + var userids = DC.Set().Where(x => x.RoleCode == Entity.RoleCode).Select(x => x.UserCode).ToArray(); + await Wtm.RemoveUserCache(userids); + return true; + } + + } + + public class Page_View : TopBasePoco + { + [Display(Name = "_Admin.PageName")] + public string Name { get; set; } + [Display(Name = "_Admin.PageFunction")] + public List Actions { get; set; } + [Display(Name = "_Admin.PageFunction")] + public List AllActions { get; set; } + + public List Children { get; set; } + + public bool IsFolder { get; set; } + [JsonIgnore] + public int ExtraOrder { get; set; } + + public Guid? ParentID { get; set; } + + [JsonIgnore] + public Page_View Parent { get; set; } + + public int Level { get; set; } + + } + +} diff --git a/IoTGateway.ViewModel/_Admin/FrameworkRoleVMs/FrameworkRoleSearcher.cs b/IoTGateway.ViewModel/_Admin/FrameworkRoleVMs/FrameworkRoleSearcher.cs new file mode 100644 index 0000000..710965a --- /dev/null +++ b/IoTGateway.ViewModel/_Admin/FrameworkRoleVMs/FrameworkRoleSearcher.cs @@ -0,0 +1,19 @@ +// WTM默认页面 Wtm buidin page +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Threading.Tasks; +using WalkingTec.Mvvm.Core; + +namespace WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkRoleVMs +{ + public class FrameworkRoleSearcher : BaseSearcher + { + [Display(Name = "_Admin.RoleCode")] + public string RoleCode { get; set; } + + [Display(Name = "_Admin.RoleName")] + public string RoleName { get; set; } + } +} diff --git a/IoTGateway.ViewModel/_Admin/FrameworkRoleVMs/FrameworkRoleVM.cs b/IoTGateway.ViewModel/_Admin/FrameworkRoleVMs/FrameworkRoleVM.cs new file mode 100644 index 0000000..26911fa --- /dev/null +++ b/IoTGateway.ViewModel/_Admin/FrameworkRoleVMs/FrameworkRoleVM.cs @@ -0,0 +1,49 @@ +// WTM默认页面 Wtm buidin page +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; + +namespace WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkRoleVMs +{ + public class FrameworkRoleVM : BaseCRUDVM + { + public override DuplicatedInfo SetDuplicatedCheck() + { + var rv = CreateFieldsInfo(SimpleField(x => x.RoleName)); + rv.AddGroup(SimpleField(x => x.RoleCode)); + return rv; + } + + public override void DoEdit(bool updateAllFields = false) + { + if (FC.ContainsKey("Entity.RoleCode")) + { + FC.Remove("Entity.RoleCode"); + } + base.DoEdit(updateAllFields); + } + + public override async Task DoDeleteAsync() + { + using (var tran = DC.BeginTransaction()) + { + try + { + await base.DoDeleteAsync(); + var ur = DC.Set().Where(x => x.RoleCode == Entity.RoleCode); + DC.Set().RemoveRange(ur); + DC.SaveChanges(); + tran.Commit(); + await Wtm.RemoveUserCache(ur.Select(x=>x.UserCode).ToArray()); + } + catch + { + tran.Rollback(); + } + } + } + } +} diff --git a/IoTGateway.ViewModel/_Admin/FrameworkUserVms/ChangePasswordVM.cs b/IoTGateway.ViewModel/_Admin/FrameworkUserVms/ChangePasswordVM.cs new file mode 100644 index 0000000..47610e5 --- /dev/null +++ b/IoTGateway.ViewModel/_Admin/FrameworkUserVms/ChangePasswordVM.cs @@ -0,0 +1,52 @@ +// WTM默认页面 Wtm buidin page +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using WalkingTec.Mvvm.Core; + +namespace WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkUserVms +{ + public class ChangePasswordVM : BaseVM + { + [Display(Name = "_Admin.Account")] + public string ITCode { get; set; } + + [Display(Name = "Login.OldPassword")] + [Required(AllowEmptyStrings = false)] + [StringLength(50, ErrorMessage = "Validate.{0}stringmax{1}")] + public string OldPassword { get; set; } + + [Display(Name = "Login.NewPassword")] + [Required(AllowEmptyStrings = false)] + [StringLength(50, ErrorMessage = "Validate.{0}stringmax{1}")] + public string NewPassword { get; set; } + + [Display(Name = "Login.NewPasswordComfirm")] + [Required(AllowEmptyStrings = false)] + [StringLength(50, ErrorMessage = "Validate.{0}stringmax{1}")] + public string NewPasswordComfirm { get; set; } + + public override void Validate() + { + List rv = new List(); + if (DC.Set().Where(x => x.ITCode == LoginUserInfo.ITCode && x.Password == Utils.GetMD5String(OldPassword)).SingleOrDefault() == null) + { + MSD.AddModelError("OldPassword", Localizer["Login.OldPasswrodWrong"]); + } + if (NewPassword != NewPasswordComfirm) + { + MSD.AddModelError("NewPasswordComfirm", Localizer["Login.PasswordNotSame"]); + } + } + + public void DoChange() + { + var user = DC.Set().Where(x => x.ITCode == LoginUserInfo.ITCode).SingleOrDefault(); + if (user != null) + { + user.Password = Utils.GetMD5String(NewPassword); + } + DC.SaveChanges(); + } + } +} diff --git a/IoTGateway.ViewModel/_Admin/FrameworkUserVms/FrameworkUserBatchVM.cs b/IoTGateway.ViewModel/_Admin/FrameworkUserVms/FrameworkUserBatchVM.cs new file mode 100644 index 0000000..2239786 --- /dev/null +++ b/IoTGateway.ViewModel/_Admin/FrameworkUserVms/FrameworkUserBatchVM.cs @@ -0,0 +1,61 @@ +// WTM默认页面 Wtm buidin page +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using Microsoft.EntityFrameworkCore; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; + +namespace WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkUserVms +{ + public class FrameworkUserBatchVM : BaseBatchVM + { + public FrameworkUserBatchVM() + { + ListVM = new FrameworkUserListVM(); + LinkedVM = new FrameworkUser_BatchEdit(); + } + + public override bool DoBatchEdit() + { + var entityList = DC.Set().AsNoTracking().CheckIDs(Ids.ToList()).ToList(); + foreach (var entity in entityList) + { + List todelete = new List(); + todelete.AddRange(DC.Set().AsNoTracking().Where(x => x.UserCode == entity.ITCode).Select(x => x.ID)); + foreach (var item in todelete) + { + DC.DeleteEntity(new FrameworkUserRole { ID = item }); + } + + if (LinkedVM.SelectedRolesCodes != null) + { + foreach (var rolecode in LinkedVM.SelectedRolesCodes) + { + FrameworkUserRole r = new FrameworkUserRole + { + RoleCode = rolecode, + UserCode = entity.ITCode + }; + DC.AddEntity(r); + } + } + } + return base.DoBatchEdit(); + } + } + + public class FrameworkUser_BatchEdit : BaseVM + { + [Display(Name = "_Admin.Role")] + public List SelectedRolesCodes { get; set; } + public List AllRoles { get; set; } + + protected override void InitVM() + { + AllRoles = DC.Set().GetSelectListItems(Wtm, y => y.RoleName, y => y.RoleCode); + } + } + +} diff --git a/IoTGateway.ViewModel/_Admin/FrameworkUserVms/FrameworkUserImportVM.cs b/IoTGateway.ViewModel/_Admin/FrameworkUserVms/FrameworkUserImportVM.cs new file mode 100644 index 0000000..efba18b --- /dev/null +++ b/IoTGateway.ViewModel/_Admin/FrameworkUserVms/FrameworkUserImportVM.cs @@ -0,0 +1,38 @@ +// WTM默认页面 Wtm buidin page +using System.Collections.Generic; +using WalkingTec.Mvvm.Core; + +namespace WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkUserVms +{ + public class FrameworkUserTemplateVM : BaseTemplateVM + { + public ExcelPropety c1 = ExcelPropety.CreateProperty(x => x.ITCode); + public ExcelPropety c2 = ExcelPropety.CreateProperty(x => x.Password); + public ExcelPropety c3 = ExcelPropety.CreateProperty(x => x.Name); + public ExcelPropety c5 = ExcelPropety.CreateProperty(x => x.Gender); + public ExcelPropety c6 = ExcelPropety.CreateProperty(x => x.CellPhone); + public ExcelPropety c7 = ExcelPropety.CreateProperty(x => x.HomePhone); + public ExcelPropety c8 = ExcelPropety.CreateProperty(x => x.Address); + public ExcelPropety c9 = ExcelPropety.CreateProperty(x => x.ZipCode); + + protected override void InitVM() + { + } + + } + + public class FrameworkUserImportVM : BaseImportVM + { + public override bool BatchSaveData() + { + SetEntityList(); + foreach (var item in EntityList) + { + item.IsValid = true; + item.Password = Utils.GetMD5String(item.Password); + } + return base.BatchSaveData(); + } + } + +} diff --git a/IoTGateway.ViewModel/_Admin/FrameworkUserVms/FrameworkUserListVM.cs b/IoTGateway.ViewModel/_Admin/FrameworkUserVms/FrameworkUserListVM.cs new file mode 100644 index 0000000..5768162 --- /dev/null +++ b/IoTGateway.ViewModel/_Admin/FrameworkUserVms/FrameworkUserListVM.cs @@ -0,0 +1,88 @@ +// WTM默认页面 Wtm buidin page +using Microsoft.EntityFrameworkCore; +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; + +namespace WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkUserVms +{ + public class FrameworkUserListVM : BasePagedListVM + { + protected override List InitGridAction() + { + return new List + { + this.MakeStandardAction("FrameworkUser", GridActionStandardTypesEnum.Create, "", "_Admin",dialogWidth: 800), + this.MakeStandardAction("FrameworkUser", GridActionStandardTypesEnum.Edit, "", "_Admin",dialogWidth: 800), + this.MakeAction("FrameworkUser","Password",Localizer?["Login.ChangePassword"],Localizer?["Login.ChangePassword"], GridActionParameterTypesEnum.SingleId,"_Admin",400).SetShowInRow(true), + this.MakeStandardAction("FrameworkUser", GridActionStandardTypesEnum.Delete, "","_Admin",dialogWidth: 800), + this.MakeStandardAction("FrameworkUser", GridActionStandardTypesEnum.Details, "", "_Admin",dialogWidth: 600), + this.MakeStandardAction("FrameworkUser", GridActionStandardTypesEnum.BatchEdit, "","_Admin", dialogWidth: 800), + this.MakeStandardAction("FrameworkUser", GridActionStandardTypesEnum.BatchDelete, "","_Admin", dialogWidth: 800), + this.MakeStandardAction("FrameworkUser", GridActionStandardTypesEnum.Import, "","_Admin", dialogWidth: 800), + this.MakeStandardAction("FrameworkUser", GridActionStandardTypesEnum.ExportExcel, "","_Admin"), + }; + } + + protected override IEnumerable> InitGridHeader() + { + return new List>{ + this.MakeGridHeader(x => x.ITCode), + this.MakeGridHeader(x => x.Name), + this.MakeGridHeader(x => x.Gender,80), + this.MakeGridHeader(x => x.CellPhone,120), + this.MakeGridHeader(x => x.RoleName_view), + this.MakeGridHeader(x => x.GroupName_view), + this.MakeGridHeader(x=> x.PhotoId,170).SetFormat(PhotoIdFormat), + this.MakeGridHeader(x => x.IsValid).SetHeader(Localizer["Sys.Enable"]).SetWidth(80), + this.MakeGridHeaderAction(width: 280) + }; + } + + private List PhotoIdFormat(FrameworkUser_View entity, object val) + { + return new List + { + ColumnFormatInfo.MakeDownloadButton(ButtonTypesEnum.Button,entity.PhotoId), + ColumnFormatInfo.MakeViewButton(ButtonTypesEnum.Button,entity.PhotoId), + }; + } + + public override IOrderedQueryable GetSearchQuery() + { + var query = DC.Set() + .CheckContain(Searcher.ITCode,x=>x.ITCode) + .CheckContain(Searcher.Name, x=>x.Name) + .CheckEqual(Searcher.IsValid, x=>x.IsValid) + .Select(x => new FrameworkUser_View + { + ID = x.ID, + ITCode = x.ITCode, + Name = x.Name, + PhotoId = x.PhotoId, + CellPhone = x.CellPhone, + IsValid = x.IsValid, + RoleName_view = DC.Set().Where(y => y.UserCode == x.ITCode) + .Join(DC.Set(), ur => ur.RoleCode, role => role.RoleCode, (ur, role) => role.RoleName).ToSepratedString(null, ","), + GroupName_view = DC.Set().Where(y => y.UserCode == x.ITCode) + .Join(DC.Set(), ug => ug.GroupCode, group => group.GroupCode, (ug, group) => group.GroupName).ToSepratedString(null, ","), + Gender = x.Gender + }) + .OrderBy(x => x.ITCode); + return query; + } + + } + + public class FrameworkUser_View : FrameworkUser + { + [Display(Name = "_Admin.Role")] + public string RoleName_view { get; set; } + + [Display(Name = "_Admin.Group")] + public string GroupName_view { get; set; } + } +} diff --git a/IoTGateway.ViewModel/_Admin/FrameworkUserVms/FrameworkUserSearcher.cs b/IoTGateway.ViewModel/_Admin/FrameworkUserVms/FrameworkUserSearcher.cs new file mode 100644 index 0000000..d0b3056 --- /dev/null +++ b/IoTGateway.ViewModel/_Admin/FrameworkUserVms/FrameworkUserSearcher.cs @@ -0,0 +1,19 @@ +// WTM默认页面 Wtm buidin page +using System; +using System.ComponentModel.DataAnnotations; +using WalkingTec.Mvvm.Core; + +namespace WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkUserVms +{ + public class FrameworkUserSearcher : BaseSearcher + { + [Display(Name = "_Admin.Account")] + public string ITCode { get; set; } + + [Display(Name = "_Admin.Name")] + public string Name { get; set; } + [Display(Name = "_Admin.IsValid")] + public bool? IsValid { get; set; } + + } +} diff --git a/IoTGateway.ViewModel/_Admin/FrameworkUserVms/FrameworkUserVM.cs b/IoTGateway.ViewModel/_Admin/FrameworkUserVms/FrameworkUserVM.cs new file mode 100644 index 0000000..7293b66 --- /dev/null +++ b/IoTGateway.ViewModel/_Admin/FrameworkUserVms/FrameworkUserVM.cs @@ -0,0 +1,185 @@ +// WTM默认页面 Wtm buidin page +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Text.Json.Serialization; +using System.Threading.Tasks; +using Microsoft.EntityFrameworkCore; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; + +namespace WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkUserVms +{ + public class FrameworkUserVM : BaseCRUDVM + { + [JsonIgnore] + public List AllRoles { get; set; } + + [JsonIgnore] + public List AllGroups { get; set; } + [Display(Name = "_Admin.Role")] + public List SelectedRolesCodes { get; set; } + [Display(Name = "_Admin.Group")] + public List SelectedGroupCodes { get; set; } + + + public FrameworkUserVM() + { + } + + public override DuplicatedInfo SetDuplicatedCheck() + { + var rv = CreateFieldsInfo(SimpleField(x => x.ITCode)); + return rv; + } + + protected override void InitVM() + { + AllRoles = DC.Set().GetSelectListItems(Wtm, y => y.RoleName, y => y.RoleCode); + AllGroups = DC.Set().GetSelectListItems(Wtm, y => y.GroupName, y => y.GroupCode); + SelectedRolesCodes = DC.Set().Where(x => x.UserCode == Entity.ITCode).Select(x => x.RoleCode).ToList(); + SelectedGroupCodes = DC.Set().Where(x => x.UserCode == Entity.ITCode).Select(x => x.GroupCode).ToList(); + } + + protected override void ReInitVM() + { + AllRoles = DC.Set().GetSelectListItems(Wtm, y => y.RoleName, y => y.RoleCode); + AllGroups = DC.Set().GetSelectListItems(Wtm, y => y.GroupName, y => y.GroupCode); + } + + public override async Task DoAddAsync() + { + using (var trans = DC.BeginTransaction()) + { + if (SelectedRolesCodes != null) + { + foreach (var rolecode in SelectedRolesCodes) + { + FrameworkUserRole r = new FrameworkUserRole + { + RoleCode = rolecode, + UserCode = Entity.ITCode + }; + DC.AddEntity(r); + } + } + if (SelectedGroupCodes != null) + { + foreach (var groupcode in SelectedGroupCodes) + { + FrameworkUserGroup g = new FrameworkUserGroup + { + GroupCode = groupcode, + UserCode = Entity.ITCode + }; + DC.AddEntity(g); + } + } + Entity.IsValid = true; + Entity.Password = Utils.GetMD5String(Entity.Password); + await base.DoAddAsync(); + if (MSD.IsValid) + { + trans.Commit(); + } + else + { + trans.Rollback(); + } + } + } + + public override async Task DoEditAsync(bool updateAllFields = false) + { + if (FC.ContainsKey("Entity.ITCode")) + { + FC.Remove("Entity.ITCode"); + } + using (var trans = DC.BeginTransaction()) + { + if (SelectedRolesCodes != null) + { + List todelete = new List(); + todelete.AddRange(DC.Set().AsNoTracking().Where(x => x.UserCode == Entity.ITCode).Select(x => x.ID)); + foreach (var item in todelete) + { + DC.DeleteEntity(new FrameworkUserRole { ID = item }); + } + } + if (SelectedGroupCodes != null) + { + List todelete = new List(); + todelete.AddRange(DC.Set().AsNoTracking().Where(x => x.UserCode == Entity.ITCode).Select(x => x.ID)); + foreach (var item in todelete) + { + DC.DeleteEntity(new FrameworkUserGroup { ID = item }); + } + } + if (SelectedRolesCodes != null) + { + foreach (var rolecode in SelectedRolesCodes) + { + FrameworkUserRole r = new FrameworkUserRole + { + RoleCode = rolecode, + UserCode = Entity.ITCode + }; + DC.AddEntity(r); + } + } + if (SelectedGroupCodes != null) + { + foreach (var groupcode in SelectedGroupCodes) + { + FrameworkUserGroup g = new FrameworkUserGroup + { + GroupCode = groupcode, + UserCode = Entity.ITCode + }; + DC.AddEntity(g); + } + } + await base.DoEditAsync(updateAllFields); + if (MSD.IsValid) + { + trans.Commit(); + await Wtm.RemoveUserCache(Entity.ITCode.ToString()); + } + else + { + trans.Rollback(); + } + } + } + + public override async Task DoDeleteAsync() + { + using (var tran = DC.BeginTransaction()) + { + try + { + await base.DoDeleteAsync(); + var ur = DC.Set().Where(x => x.UserCode == Entity.ITCode); + DC.Set().RemoveRange(ur); + var ug = DC.Set().Where(x => x.UserCode == Entity.ITCode); + DC.Set().RemoveRange(ug); + DC.SaveChanges(); + tran.Commit(); + } + catch + { + tran.Rollback(); + } + } + await Wtm.RemoveUserCache(Entity.ITCode.ToString()); + } + + public void ChangePassword() + { + Entity.Password = Utils.GetMD5String(Entity.Password); + DC.UpdateProperty(Entity, x => x.Password); + DC.SaveChanges(); + } + } +} diff --git a/IoTGateway.sln b/IoTGateway.sln new file mode 100644 index 0000000..fdd9b7c --- /dev/null +++ b/IoTGateway.sln @@ -0,0 +1,71 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31919.166 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IoTGateway", "IoTGateway\IoTGateway.csproj", "{68ABBDF2-1485-4756-9A94-6AFA874D69A3}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IoTGateway.Model", "IoTGateway.Model\IoTGateway.Model.csproj", "{C2978E5D-E71E-4882-8EF1-4014E8565A77}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IoTGateway.DataAccess", "IoTGateway.DataAccess\IoTGateway.DataAccess.csproj", "{9E7C8C77-643F-45CF-8EDC-5B032C51D563}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IoTGateway.ViewModel", "IoTGateway.ViewModel\IoTGateway.ViewModel.csproj", "{00E91FC1-D5CF-416A-AAAF-61567E368DCD}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Plugins", "Plugins", "{FBED048F-7AB9-4348-AD56-F9BF4D9E3A55}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Plugin", "Plugins\Plugin\Plugin.csproj", "{61D79F77-09EF-4A98-A50B-043B1D72C111}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PluginInterface", "Plugins\PluginInterface\PluginInterface.csproj", "{E5F79995-AB61-41F4-820D-BA39967B406B}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Drivers", "Drivers", "{52D96C24-2F2F-49B5-9F29-00414DEA41D8}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DriverModbusTCP", "Plugins\Drivers\DriverModbusTCP\DriverModbusTCP.csproj", "{7B432FC9-57E6-44BF-B8A7-2A1FB31D6ADD}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {68ABBDF2-1485-4756-9A94-6AFA874D69A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {68ABBDF2-1485-4756-9A94-6AFA874D69A3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {68ABBDF2-1485-4756-9A94-6AFA874D69A3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {68ABBDF2-1485-4756-9A94-6AFA874D69A3}.Release|Any CPU.Build.0 = Release|Any CPU + {C2978E5D-E71E-4882-8EF1-4014E8565A77}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C2978E5D-E71E-4882-8EF1-4014E8565A77}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C2978E5D-E71E-4882-8EF1-4014E8565A77}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C2978E5D-E71E-4882-8EF1-4014E8565A77}.Release|Any CPU.Build.0 = Release|Any CPU + {9E7C8C77-643F-45CF-8EDC-5B032C51D563}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9E7C8C77-643F-45CF-8EDC-5B032C51D563}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9E7C8C77-643F-45CF-8EDC-5B032C51D563}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9E7C8C77-643F-45CF-8EDC-5B032C51D563}.Release|Any CPU.Build.0 = Release|Any CPU + {00E91FC1-D5CF-416A-AAAF-61567E368DCD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {00E91FC1-D5CF-416A-AAAF-61567E368DCD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {00E91FC1-D5CF-416A-AAAF-61567E368DCD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {00E91FC1-D5CF-416A-AAAF-61567E368DCD}.Release|Any CPU.Build.0 = Release|Any CPU + {61D79F77-09EF-4A98-A50B-043B1D72C111}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {61D79F77-09EF-4A98-A50B-043B1D72C111}.Debug|Any CPU.Build.0 = Debug|Any CPU + {61D79F77-09EF-4A98-A50B-043B1D72C111}.Release|Any CPU.ActiveCfg = Release|Any CPU + {61D79F77-09EF-4A98-A50B-043B1D72C111}.Release|Any CPU.Build.0 = Release|Any CPU + {E5F79995-AB61-41F4-820D-BA39967B406B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E5F79995-AB61-41F4-820D-BA39967B406B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E5F79995-AB61-41F4-820D-BA39967B406B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E5F79995-AB61-41F4-820D-BA39967B406B}.Release|Any CPU.Build.0 = Release|Any CPU + {7B432FC9-57E6-44BF-B8A7-2A1FB31D6ADD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7B432FC9-57E6-44BF-B8A7-2A1FB31D6ADD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7B432FC9-57E6-44BF-B8A7-2A1FB31D6ADD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7B432FC9-57E6-44BF-B8A7-2A1FB31D6ADD}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {61D79F77-09EF-4A98-A50B-043B1D72C111} = {FBED048F-7AB9-4348-AD56-F9BF4D9E3A55} + {E5F79995-AB61-41F4-820D-BA39967B406B} = {FBED048F-7AB9-4348-AD56-F9BF4D9E3A55} + {52D96C24-2F2F-49B5-9F29-00414DEA41D8} = {FBED048F-7AB9-4348-AD56-F9BF4D9E3A55} + {7B432FC9-57E6-44BF-B8A7-2A1FB31D6ADD} = {52D96C24-2F2F-49B5-9F29-00414DEA41D8} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {1F219808-E6E8-4C1D-B846-41F2F7CF20FA} + EndGlobalSection +EndGlobal diff --git a/IoTGateway/.config/dotnet-tools.json b/IoTGateway/.config/dotnet-tools.json new file mode 100644 index 0000000..3ba0fe6 --- /dev/null +++ b/IoTGateway/.config/dotnet-tools.json @@ -0,0 +1,12 @@ +{ + "version": 1, + "isRoot": true, + "tools": { + "dotnet-ef": { + "version": "6.0.0", + "commands": [ + "dotnet-ef" + ] + } + } +} \ No newline at end of file diff --git a/IoTGateway/Areas/BasicData/Controllers/DeviceConfigController.cs b/IoTGateway/Areas/BasicData/Controllers/DeviceConfigController.cs new file mode 100644 index 0000000..a7d4abb --- /dev/null +++ b/IoTGateway/Areas/BasicData/Controllers/DeviceConfigController.cs @@ -0,0 +1,219 @@ +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using System; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Mvc; +using WalkingTec.Mvvm.Core.Extensions; +using IoTGateway.ViewModel.BasicData.DeviceConfigVMs; + +namespace IoTGateway.Controllers +{ + [Area("BasicData")] + [ActionDescription("设备参数配置")] + public partial class DeviceConfigController : BaseController + { + #region Search + [ActionDescription("Sys.Search")] + public ActionResult Index() + { + var vm = Wtm.CreateVM(); + return PartialView(vm); + } + + [ActionDescription("Sys.Search")] + [HttpPost] + public string Search(DeviceConfigSearcher searcher) + { + var vm = Wtm.CreateVM(passInit: true); + if (ModelState.IsValid) + { + vm.Searcher = searcher; + return vm.GetJson(false); + } + else + { + return vm.GetError(); + } + } + + #endregion + + #region Create + [ActionDescription("Sys.Create")] + public ActionResult Create() + { + var vm = Wtm.CreateVM(); + return PartialView(vm); + } + + [HttpPost] + [ActionDescription("Sys.Create")] + public ActionResult Create(DeviceConfigVM vm) + { + if (!ModelState.IsValid) + { + return PartialView(vm); + } + else + { + vm.DoAdd(); + if (!ModelState.IsValid) + { + vm.DoReInit(); + return PartialView(vm); + } + else + { + return FFResult().CloseDialog().RefreshGrid(); + } + } + } + #endregion + + #region Edit + [ActionDescription("Sys.Edit")] + public ActionResult Edit(string id) + { + var vm = Wtm.CreateVM(id); + return PartialView(vm); + } + + [ActionDescription("Sys.Edit")] + [HttpPost] + [ValidateFormItemOnly] + public ActionResult Edit(DeviceConfigVM vm) + { + if (!ModelState.IsValid) + { + return PartialView(vm); + } + else + { + vm.DoEdit(); + if (!ModelState.IsValid) + { + vm.DoReInit(); + return PartialView(vm); + } + else + { + return FFResult().CloseDialog().RefreshGridRow(vm.Entity.ID); + } + } + } + #endregion + + #region Delete + [ActionDescription("Sys.Delete")] + public ActionResult Delete(string id) + { + var vm = Wtm.CreateVM(id); + return PartialView(vm); + } + + [ActionDescription("Sys.Delete")] + [HttpPost] + public ActionResult Delete(string id, IFormCollection nouse) + { + var vm = Wtm.CreateVM(id); + vm.DoDelete(); + if (!ModelState.IsValid) + { + return PartialView(vm); + } + else + { + return FFResult().CloseDialog().RefreshGrid(); + } + } + #endregion + + #region Details + [ActionDescription("Sys.Details")] + public ActionResult Details(string id) + { + var vm = Wtm.CreateVM(id); + return PartialView(vm); + } + #endregion + + #region BatchEdit + [HttpPost] + [ActionDescription("Sys.BatchEdit")] + public ActionResult BatchEdit(string[] IDs) + { + var vm = Wtm.CreateVM(Ids: IDs); + return PartialView(vm); + } + + [HttpPost] + [ActionDescription("Sys.BatchEdit")] + public ActionResult DoBatchEdit(DeviceConfigBatchVM vm, IFormCollection nouse) + { + if (!ModelState.IsValid || !vm.DoBatchEdit()) + { + return PartialView("BatchEdit",vm); + } + else + { + return FFResult().CloseDialog().RefreshGrid().Alert(Localizer["Sys.BatchEditSuccess", vm.Ids.Length]); + } + } + #endregion + + #region BatchDelete + [HttpPost] + [ActionDescription("Sys.BatchDelete")] + public ActionResult BatchDelete(string[] IDs) + { + var vm = Wtm.CreateVM(Ids: IDs); + return PartialView(vm); + } + + [HttpPost] + [ActionDescription("Sys.BatchDelete")] + public ActionResult DoBatchDelete(DeviceConfigBatchVM vm, IFormCollection nouse) + { + if (!ModelState.IsValid || !vm.DoBatchDelete()) + { + return PartialView("BatchDelete",vm); + } + else + { + return FFResult().CloseDialog().RefreshGrid().Alert(Localizer["Sys.BatchDeleteSuccess", vm.Ids.Length]); + } + } + #endregion + + #region Import + [ActionDescription("Sys.Import")] + public ActionResult Import() + { + var vm = Wtm.CreateVM(); + return PartialView(vm); + } + + [HttpPost] + [ActionDescription("Sys.Import")] + public ActionResult Import(DeviceConfigImportVM vm, IFormCollection nouse) + { + if (vm.ErrorListVM.EntityList.Count > 0 || !vm.BatchSaveData()) + { + return PartialView(vm); + } + else + { + return FFResult().CloseDialog().RefreshGrid().Alert(Localizer["Sys.ImportSuccess", vm.EntityList.Count.ToString()]); + } + } + #endregion + + [ActionDescription("Sys.Export")] + [HttpPost] + public IActionResult ExportExcel(DeviceConfigListVM vm) + { + return vm.GetExportData(); + } + + } +} diff --git a/IoTGateway/Areas/BasicData/Controllers/DeviceController.cs b/IoTGateway/Areas/BasicData/Controllers/DeviceController.cs new file mode 100644 index 0000000..1807228 --- /dev/null +++ b/IoTGateway/Areas/BasicData/Controllers/DeviceController.cs @@ -0,0 +1,289 @@ +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using System; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Mvc; +using WalkingTec.Mvvm.Core.Extensions; +using IoTGateway.ViewModel.BasicData.DeviceVMs; +using Plugin; + +namespace IoTGateway.Controllers +{ + [Area("BasicData")] + [ActionDescription("设备维护")] + public partial class DeviceController : BaseController + { + private DeviceService _DeviceService; + public DeviceController(DeviceService deviceService) + { + _DeviceService = deviceService; + } + #region Search + [ActionDescription("Sys.Search")] + public ActionResult Index() + { + var vm = Wtm.CreateVM(); + return PartialView(vm); + } + + [ActionDescription("Sys.Search")] + [HttpPost] + public string Search(DeviceSearcher searcher) + { + var vm = Wtm.CreateVM(passInit: true); + if (ModelState.IsValid) + { + vm.Searcher = searcher; + return vm.GetJson(false); + } + else + { + return vm.GetError(); + } + } + + #endregion + + #region Create + [ActionDescription("创建设备")] + public ActionResult Create() + { + var vm = Wtm.CreateVM(); + vm.Entity.DeviceTypeEnum = Model.DeviceTypeEnum.Device; + return PartialView(vm); + } + + [HttpPost] + [ActionDescription("创建设备")] + public ActionResult Create(DeviceVM vm) + { + if (!ModelState.IsValid) + { + return PartialView(vm); + } + else + { + vm.Entity.DeviceTypeEnum = Model.DeviceTypeEnum.Device; + vm.DoAdd(); + if (!ModelState.IsValid) + { + vm.DoReInit(); + return PartialView(vm); + } + else + { + return FFResult().CloseDialog().RefreshGrid(); + } + } + } + #endregion + #region Create + [ActionDescription("Sys.Create")] + public ActionResult CreateGroup() + { + var vm = Wtm.CreateVM(); + vm.Entity.DeviceTypeEnum = Model.DeviceTypeEnum.Group; + return PartialView(vm); + } + + [HttpPost] + [ActionDescription("Sys.Create")] + public ActionResult CreateGroup(DeviceVM vm) + { + if (!ModelState.IsValid) + { + return PartialView(vm); + } + else + { + vm.Entity.DeviceTypeEnum = Model.DeviceTypeEnum.Group; + vm.DoAdd(); + if (!ModelState.IsValid) + { + vm.DoReInit(); + return PartialView(vm); + } + else + { + return FFResult().CloseDialog().RefreshGrid(); + } + } + } + #endregion + + #region Edit + [ActionDescription("Sys.Edit")] + public ActionResult Edit(string id) + { + var vm = Wtm.CreateVM(id); + return PartialView(vm); + } + + [ActionDescription("Sys.Edit")] + [HttpPost] + [ValidateFormItemOnly] + public ActionResult Edit(DeviceVM vm) + { + if (!ModelState.IsValid) + { + return PartialView(vm); + } + else + { + vm.DoEdit(); + if (!ModelState.IsValid) + { + vm.DoReInit(); + return PartialView(vm); + } + else + { + return FFResult().CloseDialog().RefreshGridRow(vm.Entity.ID); + } + } + } + #endregion + + #region Delete + [ActionDescription("Sys.Delete")] + public ActionResult Delete(string id) + { + var vm = Wtm.CreateVM(id); + return PartialView(vm); + } + + [ActionDescription("Sys.Delete")] + [HttpPost] + public ActionResult Delete(string id, IFormCollection nouse) + { + var vm = Wtm.CreateVM(id); + vm.DoDelete(); + if (!ModelState.IsValid) + { + return PartialView(vm); + } + else + { + return FFResult().CloseDialog().RefreshGrid(); + } + } + #endregion + + #region Details + [ActionDescription("Sys.Details")] + public ActionResult Details(string id) + { + var vm = Wtm.CreateVM(id); + return PartialView(vm); + } + #endregion + + #region BatchEdit + [HttpPost] + [ActionDescription("Sys.BatchEdit")] + public ActionResult BatchEdit(string[] IDs) + { + var vm = Wtm.CreateVM(Ids: IDs); + return PartialView(vm); + } + + [HttpPost] + [ActionDescription("Sys.BatchEdit")] + public ActionResult DoBatchEdit(DeviceBatchVM vm, IFormCollection nouse) + { + if (!ModelState.IsValid || !vm.DoBatchEdit()) + { + return PartialView("BatchEdit",vm); + } + else + { + return FFResult().CloseDialog().RefreshGrid().Alert(Localizer["Sys.BatchEditSuccess", vm.Ids.Length]); + } + } + #endregion + + #region BatchDelete + [HttpPost] + [ActionDescription("Sys.BatchDelete")] + public ActionResult BatchDelete(string[] IDs) + { + var vm = Wtm.CreateVM(Ids: IDs); + return PartialView(vm); + } + + [HttpPost] + [ActionDescription("Sys.BatchDelete")] + public ActionResult DoBatchDelete(DeviceBatchVM vm, IFormCollection nouse) + { + if (!ModelState.IsValid || !vm.DoBatchDelete()) + { + return PartialView("BatchDelete",vm); + } + else + { + return FFResult().CloseDialog().RefreshGrid().Alert(Localizer["Sys.BatchDeleteSuccess", vm.Ids.Length]); + } + } + #endregion + + #region Import + [ActionDescription("Sys.Import")] + public ActionResult Import() + { + var vm = Wtm.CreateVM(); + return PartialView(vm); + } + + [HttpPost] + [ActionDescription("Sys.Import")] + public ActionResult Import(DeviceImportVM vm, IFormCollection nouse) + { + if (vm.ErrorListVM.EntityList.Count > 0 || !vm.BatchSaveData()) + { + return PartialView(vm); + } + else + { + return FFResult().CloseDialog().RefreshGrid().Alert(Localizer["Sys.ImportSuccess", vm.EntityList.Count.ToString()]); + } + } + #endregion + + [ActionDescription("Sys.Export")] + [HttpPost] + public IActionResult ExportExcel(DeviceListVM vm) + { + return vm.GetExportData(); + } + + #region 设备复制 + [ActionDescription("设备复制")] + public ActionResult Copy() + { + var vm = Wtm.CreateVM(); + return PartialView(vm); + } + + [HttpPost] + [ActionDescription("设备复制")] + public ActionResult Copy(CopyVM vm) + { + if (!ModelState.IsValid) + { + return PartialView(vm); + } + else + { + vm.Copy(); + return FFResult().CloseDialog().RefreshGrid().Alert($"{vm.复制结果}"); + } + } + #endregion + + + public IActionResult GetMethods(Guid? ID) + { + return JsonMore(_DeviceService.GetDriverMethods(ID)); + } + } +} diff --git a/IoTGateway/Areas/BasicData/Controllers/DeviceVariableController.cs b/IoTGateway/Areas/BasicData/Controllers/DeviceVariableController.cs new file mode 100644 index 0000000..e75425c --- /dev/null +++ b/IoTGateway/Areas/BasicData/Controllers/DeviceVariableController.cs @@ -0,0 +1,220 @@ +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using System; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Mvc; +using WalkingTec.Mvvm.Core.Extensions; +using IoTGateway.ViewModel.BasicData.DeviceVariableVMs; + +namespace IoTGateway.Controllers +{ + [Area("BasicData")] + [ActionDescription("设备变量配置")] + public partial class DeviceVariableController : BaseController + { + #region Search + [ActionDescription("Sys.Search")] + public ActionResult Index() + { + var vm = Wtm.CreateVM(); + return PartialView(vm); + } + + [ActionDescription("Sys.Search")] + [HttpPost] + public string Search(DeviceVariableSearcher searcher) + { + var vm = Wtm.CreateVM(passInit: true); + if (ModelState.IsValid) + { + vm.Searcher = searcher; + return vm.GetJson(false); + } + else + { + return vm.GetError(); + } + } + + #endregion + + #region Create + [ActionDescription("Sys.Create")] + public ActionResult Create() + { + var vm = Wtm.CreateVM(); + vm.Entity.ValueFactor = 1; + return PartialView(vm); + } + + [HttpPost] + [ActionDescription("Sys.Create")] + public ActionResult Create(DeviceVariableVM vm) + { + if (!ModelState.IsValid) + { + return PartialView(vm); + } + else + { + vm.DoAdd(); + if (!ModelState.IsValid) + { + vm.DoReInit(); + return PartialView(vm); + } + else + { + return FFResult().CloseDialog().RefreshGrid(); + } + } + } + #endregion + + #region Edit + [ActionDescription("Sys.Edit")] + public ActionResult Edit(string id) + { + var vm = Wtm.CreateVM(id); + return PartialView(vm); + } + + [ActionDescription("Sys.Edit")] + [HttpPost] + [ValidateFormItemOnly] + public ActionResult Edit(DeviceVariableVM vm) + { + if (!ModelState.IsValid) + { + return PartialView(vm); + } + else + { + vm.DoEdit(); + if (!ModelState.IsValid) + { + vm.DoReInit(); + return PartialView(vm); + } + else + { + return FFResult().CloseDialog().RefreshGridRow(vm.Entity.ID); + } + } + } + #endregion + + #region Delete + [ActionDescription("Sys.Delete")] + public ActionResult Delete(string id) + { + var vm = Wtm.CreateVM(id); + return PartialView(vm); + } + + [ActionDescription("Sys.Delete")] + [HttpPost] + public ActionResult Delete(string id, IFormCollection nouse) + { + var vm = Wtm.CreateVM(id); + vm.DoDelete(); + if (!ModelState.IsValid) + { + return PartialView(vm); + } + else + { + return FFResult().CloseDialog().RefreshGrid(); + } + } + #endregion + + #region Details + [ActionDescription("Sys.Details")] + public ActionResult Details(string id) + { + var vm = Wtm.CreateVM(id); + return PartialView(vm); + } + #endregion + + #region BatchEdit + [HttpPost] + [ActionDescription("Sys.BatchEdit")] + public ActionResult BatchEdit(string[] IDs) + { + var vm = Wtm.CreateVM(Ids: IDs); + return PartialView(vm); + } + + [HttpPost] + [ActionDescription("Sys.BatchEdit")] + public ActionResult DoBatchEdit(DeviceVariableBatchVM vm, IFormCollection nouse) + { + if (!ModelState.IsValid || !vm.DoBatchEdit()) + { + return PartialView("BatchEdit",vm); + } + else + { + return FFResult().CloseDialog().RefreshGrid().Alert(Localizer["Sys.BatchEditSuccess", vm.Ids.Length]); + } + } + #endregion + + #region BatchDelete + [HttpPost] + [ActionDescription("Sys.BatchDelete")] + public ActionResult BatchDelete(string[] IDs) + { + var vm = Wtm.CreateVM(Ids: IDs); + return PartialView(vm); + } + + [HttpPost] + [ActionDescription("Sys.BatchDelete")] + public ActionResult DoBatchDelete(DeviceVariableBatchVM vm, IFormCollection nouse) + { + if (!ModelState.IsValid || !vm.DoBatchDelete()) + { + return PartialView("BatchDelete",vm); + } + else + { + return FFResult().CloseDialog().RefreshGrid().Alert(Localizer["Sys.BatchDeleteSuccess", vm.Ids.Length]); + } + } + #endregion + + #region Import + [ActionDescription("Sys.Import")] + public ActionResult Import() + { + var vm = Wtm.CreateVM(); + return PartialView(vm); + } + + [HttpPost] + [ActionDescription("Sys.Import")] + public ActionResult Import(DeviceVariableImportVM vm, IFormCollection nouse) + { + if (vm.ErrorListVM.EntityList.Count > 0 || !vm.BatchSaveData()) + { + return PartialView(vm); + } + else + { + return FFResult().CloseDialog().RefreshGrid().Alert(Localizer["Sys.ImportSuccess", vm.EntityList.Count.ToString()]); + } + } + #endregion + + [ActionDescription("Sys.Export")] + [HttpPost] + public IActionResult ExportExcel(DeviceVariableListVM vm) + { + return vm.GetExportData(); + } + + } +} diff --git a/IoTGateway/Areas/BasicData/Controllers/DriverController.cs b/IoTGateway/Areas/BasicData/Controllers/DriverController.cs new file mode 100644 index 0000000..567c8ef --- /dev/null +++ b/IoTGateway/Areas/BasicData/Controllers/DriverController.cs @@ -0,0 +1,219 @@ +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using System; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Mvc; +using WalkingTec.Mvvm.Core.Extensions; +using IoTGateway.ViewModel.BasicData.DriverVMs; + +namespace IoTGateway.Controllers +{ + [Area("BasicData")] + [ActionDescription("驱动管理")] + public partial class DriverController : BaseController + { + #region Search + [ActionDescription("Sys.Search")] + public ActionResult Index() + { + var vm = Wtm.CreateVM(); + return PartialView(vm); + } + + [ActionDescription("Sys.Search")] + [HttpPost] + public string Search(DriverSearcher searcher) + { + var vm = Wtm.CreateVM(passInit: true); + if (ModelState.IsValid) + { + vm.Searcher = searcher; + return vm.GetJson(false); + } + else + { + return vm.GetError(); + } + } + + #endregion + + #region Create + [ActionDescription("Sys.Create")] + public ActionResult Create() + { + var vm = Wtm.CreateVM(); + return PartialView(vm); + } + + [HttpPost] + [ActionDescription("Sys.Create")] + public ActionResult Create(DriverVM vm) + { + if (!ModelState.IsValid) + { + return PartialView(vm); + } + else + { + vm.DoAdd(); + if (!ModelState.IsValid) + { + vm.DoReInit(); + return PartialView(vm); + } + else + { + return FFResult().CloseDialog().RefreshGrid(); + } + } + } + #endregion + + #region Edit + [ActionDescription("Sys.Edit")] + public ActionResult Edit(string id) + { + var vm = Wtm.CreateVM(id); + return PartialView(vm); + } + + [ActionDescription("Sys.Edit")] + [HttpPost] + [ValidateFormItemOnly] + public ActionResult Edit(DriverVM vm) + { + if (!ModelState.IsValid) + { + return PartialView(vm); + } + else + { + vm.DoEdit(); + if (!ModelState.IsValid) + { + vm.DoReInit(); + return PartialView(vm); + } + else + { + return FFResult().CloseDialog().RefreshGridRow(vm.Entity.ID); + } + } + } + #endregion + + #region Delete + [ActionDescription("Sys.Delete")] + public ActionResult Delete(string id) + { + var vm = Wtm.CreateVM(id); + return PartialView(vm); + } + + [ActionDescription("Sys.Delete")] + [HttpPost] + public ActionResult Delete(string id, IFormCollection nouse) + { + var vm = Wtm.CreateVM(id); + vm.DoDelete(); + if (!ModelState.IsValid) + { + return PartialView(vm); + } + else + { + return FFResult().CloseDialog().RefreshGrid(); + } + } + #endregion + + #region Details + [ActionDescription("Sys.Details")] + public ActionResult Details(string id) + { + var vm = Wtm.CreateVM(id); + return PartialView(vm); + } + #endregion + + #region BatchEdit + [HttpPost] + [ActionDescription("Sys.BatchEdit")] + public ActionResult BatchEdit(string[] IDs) + { + var vm = Wtm.CreateVM(Ids: IDs); + return PartialView(vm); + } + + [HttpPost] + [ActionDescription("Sys.BatchEdit")] + public ActionResult DoBatchEdit(DriverBatchVM vm, IFormCollection nouse) + { + if (!ModelState.IsValid || !vm.DoBatchEdit()) + { + return PartialView("BatchEdit",vm); + } + else + { + return FFResult().CloseDialog().RefreshGrid().Alert(Localizer["Sys.BatchEditSuccess", vm.Ids.Length]); + } + } + #endregion + + #region BatchDelete + [HttpPost] + [ActionDescription("Sys.BatchDelete")] + public ActionResult BatchDelete(string[] IDs) + { + var vm = Wtm.CreateVM(Ids: IDs); + return PartialView(vm); + } + + [HttpPost] + [ActionDescription("Sys.BatchDelete")] + public ActionResult DoBatchDelete(DriverBatchVM vm, IFormCollection nouse) + { + if (!ModelState.IsValid || !vm.DoBatchDelete()) + { + return PartialView("BatchDelete",vm); + } + else + { + return FFResult().CloseDialog().RefreshGrid().Alert(Localizer["Sys.BatchDeleteSuccess", vm.Ids.Length]); + } + } + #endregion + + #region Import + [ActionDescription("Sys.Import")] + public ActionResult Import() + { + var vm = Wtm.CreateVM(); + return PartialView(vm); + } + + [HttpPost] + [ActionDescription("Sys.Import")] + public ActionResult Import(DriverImportVM vm, IFormCollection nouse) + { + if (vm.ErrorListVM.EntityList.Count > 0 || !vm.BatchSaveData()) + { + return PartialView(vm); + } + else + { + return FFResult().CloseDialog().RefreshGrid().Alert(Localizer["Sys.ImportSuccess", vm.EntityList.Count.ToString()]); + } + } + #endregion + + [ActionDescription("Sys.Export")] + [HttpPost] + public IActionResult ExportExcel(DriverListVM vm) + { + return vm.GetExportData(); + } + + } +} diff --git a/IoTGateway/Areas/BasicData/Views/Device/BatchDelete.cshtml b/IoTGateway/Areas/BasicData/Views/Device/BatchDelete.cshtml new file mode 100644 index 0000000..5d6fdd3 --- /dev/null +++ b/IoTGateway/Areas/BasicData/Views/Device/BatchDelete.cshtml @@ -0,0 +1,12 @@ +@model IoTGateway.ViewModel.BasicData.DeviceVMs.DeviceBatchVM +@inject IStringLocalizer Localizer; + + + @Localizer["Sys.BatchDeleteConfirm"] + + + + + + + diff --git a/IoTGateway/Areas/BasicData/Views/Device/BatchEdit.cshtml b/IoTGateway/Areas/BasicData/Views/Device/BatchEdit.cshtml new file mode 100644 index 0000000..f5e0881 --- /dev/null +++ b/IoTGateway/Areas/BasicData/Views/Device/BatchEdit.cshtml @@ -0,0 +1,18 @@ +@model IoTGateway.ViewModel.BasicData.DeviceVMs.DeviceBatchVM +@inject IStringLocalizer Localizer; + + +
@Localizer["Sys.BatchEditConfirm"]
+ + + + + + + + + + + + +
diff --git a/IoTGateway/Areas/BasicData/Views/Device/Copy.cshtml b/IoTGateway/Areas/BasicData/Views/Device/Copy.cshtml new file mode 100644 index 0000000..f69a319 --- /dev/null +++ b/IoTGateway/Areas/BasicData/Views/Device/Copy.cshtml @@ -0,0 +1,15 @@ +@model IoTGateway.ViewModel.BasicData.DeviceVMs.CopyVM +@inject IStringLocalizer Localizer; + + + + + @Model.设备名称 + + + + + + + + diff --git a/IoTGateway/Areas/BasicData/Views/Device/Create.cshtml b/IoTGateway/Areas/BasicData/Views/Device/Create.cshtml new file mode 100644 index 0000000..4d8abe3 --- /dev/null +++ b/IoTGateway/Areas/BasicData/Views/Device/Create.cshtml @@ -0,0 +1,18 @@ +@model IoTGateway.ViewModel.BasicData.DeviceVMs.DeviceVM +@inject IStringLocalizer Localizer; + + + + + + + + + + + + + + + + diff --git a/IoTGateway/Areas/BasicData/Views/Device/CreateGroup.cshtml b/IoTGateway/Areas/BasicData/Views/Device/CreateGroup.cshtml new file mode 100644 index 0000000..9930ddf --- /dev/null +++ b/IoTGateway/Areas/BasicData/Views/Device/CreateGroup.cshtml @@ -0,0 +1,15 @@ +@model IoTGateway.ViewModel.BasicData.DeviceVMs.DeviceVM +@inject IStringLocalizer Localizer; + + + + + + + + + + + + + diff --git a/IoTGateway/Areas/BasicData/Views/Device/Delete.cshtml b/IoTGateway/Areas/BasicData/Views/Device/Delete.cshtml new file mode 100644 index 0000000..7c603c3 --- /dev/null +++ b/IoTGateway/Areas/BasicData/Views/Device/Delete.cshtml @@ -0,0 +1,20 @@ +@model IoTGateway.ViewModel.BasicData.DeviceVMs.DeviceVM +@inject IStringLocalizer Localizer; + + + @Localizer["Sys.DeleteConfirm"] + + + + + + + + + + + + + + + diff --git a/IoTGateway/Areas/BasicData/Views/Device/Details.cshtml b/IoTGateway/Areas/BasicData/Views/Device/Details.cshtml new file mode 100644 index 0000000..1971d27 --- /dev/null +++ b/IoTGateway/Areas/BasicData/Views/Device/Details.cshtml @@ -0,0 +1,17 @@ +@model IoTGateway.ViewModel.BasicData.DeviceVMs.DeviceVM +@inject IStringLocalizer Localizer; + + + + + + + + + + + + + + + diff --git a/IoTGateway/Areas/BasicData/Views/Device/Edit.cshtml b/IoTGateway/Areas/BasicData/Views/Device/Edit.cshtml new file mode 100644 index 0000000..e89dc3e --- /dev/null +++ b/IoTGateway/Areas/BasicData/Views/Device/Edit.cshtml @@ -0,0 +1,24 @@ +@model IoTGateway.ViewModel.BasicData.DeviceVMs.DeviceVM +@inject IStringLocalizer Localizer; + + + + + + + + @{ + if (Model.Entity.DeviceTypeEnum == IoTGateway.Model.DeviceTypeEnum.Device) + { + + + + } + } + + + + + + + diff --git a/IoTGateway/Areas/BasicData/Views/Device/Import.cshtml b/IoTGateway/Areas/BasicData/Views/Device/Import.cshtml new file mode 100644 index 0000000..0da01e8 --- /dev/null +++ b/IoTGateway/Areas/BasicData/Views/Device/Import.cshtml @@ -0,0 +1,14 @@ +@model IoTGateway.ViewModel.BasicData.DeviceVMs.DeviceImportVM +@inject IStringLocalizer Localizer; + + + + + + + + + + + + diff --git a/IoTGateway/Areas/BasicData/Views/Device/Index.cshtml b/IoTGateway/Areas/BasicData/Views/Device/Index.cshtml new file mode 100644 index 0000000..8ec4b9a --- /dev/null +++ b/IoTGateway/Areas/BasicData/Views/Device/Index.cshtml @@ -0,0 +1,13 @@ +@model IoTGateway.ViewModel.BasicData.DeviceVMs.DeviceListVM +@inject IStringLocalizer Localizer; + + + + + + + + + + + diff --git a/IoTGateway/Areas/BasicData/Views/DeviceConfig/BatchDelete.cshtml b/IoTGateway/Areas/BasicData/Views/DeviceConfig/BatchDelete.cshtml new file mode 100644 index 0000000..2de70f1 --- /dev/null +++ b/IoTGateway/Areas/BasicData/Views/DeviceConfig/BatchDelete.cshtml @@ -0,0 +1,12 @@ +@model IoTGateway.ViewModel.BasicData.DeviceConfigVMs.DeviceConfigBatchVM +@inject IStringLocalizer Localizer; + + + @Localizer["Sys.BatchDeleteConfirm"] + + + + + + + diff --git a/IoTGateway/Areas/BasicData/Views/DeviceConfig/BatchEdit.cshtml b/IoTGateway/Areas/BasicData/Views/DeviceConfig/BatchEdit.cshtml new file mode 100644 index 0000000..fafbee6 --- /dev/null +++ b/IoTGateway/Areas/BasicData/Views/DeviceConfig/BatchEdit.cshtml @@ -0,0 +1,15 @@ +@model IoTGateway.ViewModel.BasicData.DeviceConfigVMs.DeviceConfigBatchVM +@inject IStringLocalizer Localizer; + + +
@Localizer["Sys.BatchEditConfirm"]
+ + + + + + + + + +
diff --git a/IoTGateway/Areas/BasicData/Views/DeviceConfig/Create.cshtml b/IoTGateway/Areas/BasicData/Views/DeviceConfig/Create.cshtml new file mode 100644 index 0000000..e895873 --- /dev/null +++ b/IoTGateway/Areas/BasicData/Views/DeviceConfig/Create.cshtml @@ -0,0 +1,16 @@ +@model IoTGateway.ViewModel.BasicData.DeviceConfigVMs.DeviceConfigVM +@inject IStringLocalizer Localizer; + + + + + + + + + + + + + + diff --git a/IoTGateway/Areas/BasicData/Views/DeviceConfig/Delete.cshtml b/IoTGateway/Areas/BasicData/Views/DeviceConfig/Delete.cshtml new file mode 100644 index 0000000..ce1ef71 --- /dev/null +++ b/IoTGateway/Areas/BasicData/Views/DeviceConfig/Delete.cshtml @@ -0,0 +1,18 @@ +@model IoTGateway.ViewModel.BasicData.DeviceConfigVMs.DeviceConfigVM +@inject IStringLocalizer Localizer; + + + @Localizer["Sys.DeleteConfirm"] + + + + + + + + + + + + + diff --git a/IoTGateway/Areas/BasicData/Views/DeviceConfig/Details.cshtml b/IoTGateway/Areas/BasicData/Views/DeviceConfig/Details.cshtml new file mode 100644 index 0000000..940a7fa --- /dev/null +++ b/IoTGateway/Areas/BasicData/Views/DeviceConfig/Details.cshtml @@ -0,0 +1,15 @@ +@model IoTGateway.ViewModel.BasicData.DeviceConfigVMs.DeviceConfigVM +@inject IStringLocalizer Localizer; + + + + + + + + + + + + + diff --git a/IoTGateway/Areas/BasicData/Views/DeviceConfig/Edit.cshtml b/IoTGateway/Areas/BasicData/Views/DeviceConfig/Edit.cshtml new file mode 100644 index 0000000..0f8d016 --- /dev/null +++ b/IoTGateway/Areas/BasicData/Views/DeviceConfig/Edit.cshtml @@ -0,0 +1,26 @@ +@model IoTGateway.ViewModel.BasicData.DeviceConfigVMs.DeviceConfigVM +@inject IStringLocalizer Localizer; + + + + + @{ + if (Model.Entity.EnumInfo != null) + { + + } + else + { + + } + } + + + + + + + + + + diff --git a/IoTGateway/Areas/BasicData/Views/DeviceConfig/Import.cshtml b/IoTGateway/Areas/BasicData/Views/DeviceConfig/Import.cshtml new file mode 100644 index 0000000..2df2b60 --- /dev/null +++ b/IoTGateway/Areas/BasicData/Views/DeviceConfig/Import.cshtml @@ -0,0 +1,14 @@ +@model IoTGateway.ViewModel.BasicData.DeviceConfigVMs.DeviceConfigImportVM +@inject IStringLocalizer Localizer; + + + + + + + + + + + + diff --git a/IoTGateway/Areas/BasicData/Views/DeviceConfig/Index.cshtml b/IoTGateway/Areas/BasicData/Views/DeviceConfig/Index.cshtml new file mode 100644 index 0000000..5e5a709 --- /dev/null +++ b/IoTGateway/Areas/BasicData/Views/DeviceConfig/Index.cshtml @@ -0,0 +1,13 @@ +@model IoTGateway.ViewModel.BasicData.DeviceConfigVMs.DeviceConfigListVM +@inject IStringLocalizer Localizer; + + + + + + + + + + + diff --git a/IoTGateway/Areas/BasicData/Views/DeviceVariable/BatchDelete.cshtml b/IoTGateway/Areas/BasicData/Views/DeviceVariable/BatchDelete.cshtml new file mode 100644 index 0000000..8e9e3a5 --- /dev/null +++ b/IoTGateway/Areas/BasicData/Views/DeviceVariable/BatchDelete.cshtml @@ -0,0 +1,12 @@ +@model IoTGateway.ViewModel.BasicData.DeviceVariableVMs.DeviceVariableBatchVM +@inject IStringLocalizer Localizer; + + + @Localizer["Sys.BatchDeleteConfirm"] + + + + + + + diff --git a/IoTGateway/Areas/BasicData/Views/DeviceVariable/BatchEdit.cshtml b/IoTGateway/Areas/BasicData/Views/DeviceVariable/BatchEdit.cshtml new file mode 100644 index 0000000..369cb94 --- /dev/null +++ b/IoTGateway/Areas/BasicData/Views/DeviceVariable/BatchEdit.cshtml @@ -0,0 +1,19 @@ +@model IoTGateway.ViewModel.BasicData.DeviceVariableVMs.DeviceVariableBatchVM +@inject IStringLocalizer Localizer; + + +
@Localizer["Sys.BatchEditConfirm"]
+ + + + + + + + + + + + + +
diff --git a/IoTGateway/Areas/BasicData/Views/DeviceVariable/Create.cshtml b/IoTGateway/Areas/BasicData/Views/DeviceVariable/Create.cshtml new file mode 100644 index 0000000..0134ed4 --- /dev/null +++ b/IoTGateway/Areas/BasicData/Views/DeviceVariable/Create.cshtml @@ -0,0 +1,19 @@ +@model IoTGateway.ViewModel.BasicData.DeviceVariableVMs.DeviceVariableVM +@inject IStringLocalizer Localizer; + + + + + + + + + + + + + + + + + diff --git a/IoTGateway/Areas/BasicData/Views/DeviceVariable/Delete.cshtml b/IoTGateway/Areas/BasicData/Views/DeviceVariable/Delete.cshtml new file mode 100644 index 0000000..1d0bb00 --- /dev/null +++ b/IoTGateway/Areas/BasicData/Views/DeviceVariable/Delete.cshtml @@ -0,0 +1,21 @@ +@model IoTGateway.ViewModel.BasicData.DeviceVariableVMs.DeviceVariableVM +@inject IStringLocalizer Localizer; + + + @Localizer["Sys.DeleteConfirm"] + + + + + + + + + + + + + + + + diff --git a/IoTGateway/Areas/BasicData/Views/DeviceVariable/Details.cshtml b/IoTGateway/Areas/BasicData/Views/DeviceVariable/Details.cshtml new file mode 100644 index 0000000..cb60b25 --- /dev/null +++ b/IoTGateway/Areas/BasicData/Views/DeviceVariable/Details.cshtml @@ -0,0 +1,18 @@ +@model IoTGateway.ViewModel.BasicData.DeviceVariableVMs.DeviceVariableVM +@inject IStringLocalizer Localizer; + + + + + + + + + + + + + + + + diff --git a/IoTGateway/Areas/BasicData/Views/DeviceVariable/Edit.cshtml b/IoTGateway/Areas/BasicData/Views/DeviceVariable/Edit.cshtml new file mode 100644 index 0000000..7d35eed --- /dev/null +++ b/IoTGateway/Areas/BasicData/Views/DeviceVariable/Edit.cshtml @@ -0,0 +1,20 @@ +@model IoTGateway.ViewModel.BasicData.DeviceVariableVMs.DeviceVariableVM +@inject IStringLocalizer Localizer; + + + + + + + + + + + + + + + + + + diff --git a/IoTGateway/Areas/BasicData/Views/DeviceVariable/Import.cshtml b/IoTGateway/Areas/BasicData/Views/DeviceVariable/Import.cshtml new file mode 100644 index 0000000..59241c2 --- /dev/null +++ b/IoTGateway/Areas/BasicData/Views/DeviceVariable/Import.cshtml @@ -0,0 +1,14 @@ +@model IoTGateway.ViewModel.BasicData.DeviceVariableVMs.DeviceVariableImportVM +@inject IStringLocalizer Localizer; + + + + + + + + + + + + diff --git a/IoTGateway/Areas/BasicData/Views/DeviceVariable/Index.cshtml b/IoTGateway/Areas/BasicData/Views/DeviceVariable/Index.cshtml new file mode 100644 index 0000000..ccb0222 --- /dev/null +++ b/IoTGateway/Areas/BasicData/Views/DeviceVariable/Index.cshtml @@ -0,0 +1,15 @@ +@model IoTGateway.ViewModel.BasicData.DeviceVariableVMs.DeviceVariableListVM +@inject IStringLocalizer Localizer; + + + + + + + + + + + + + diff --git a/IoTGateway/Areas/BasicData/Views/Driver/BatchDelete.cshtml b/IoTGateway/Areas/BasicData/Views/Driver/BatchDelete.cshtml new file mode 100644 index 0000000..2903a3b --- /dev/null +++ b/IoTGateway/Areas/BasicData/Views/Driver/BatchDelete.cshtml @@ -0,0 +1,12 @@ +@model IoTGateway.ViewModel.BasicData.DriverVMs.DriverBatchVM +@inject IStringLocalizer Localizer; + + + @Localizer["Sys.BatchDeleteConfirm"] + + + + + + + diff --git a/IoTGateway/Areas/BasicData/Views/Driver/BatchEdit.cshtml b/IoTGateway/Areas/BasicData/Views/Driver/BatchEdit.cshtml new file mode 100644 index 0000000..8220a3b --- /dev/null +++ b/IoTGateway/Areas/BasicData/Views/Driver/BatchEdit.cshtml @@ -0,0 +1,14 @@ +@model IoTGateway.ViewModel.BasicData.DriverVMs.DriverBatchVM +@inject IStringLocalizer Localizer; + + +
@Localizer["Sys.BatchEditConfirm"]
+ + + + + + + + +
diff --git a/IoTGateway/Areas/BasicData/Views/Driver/Create.cshtml b/IoTGateway/Areas/BasicData/Views/Driver/Create.cshtml new file mode 100644 index 0000000..e93f5a9 --- /dev/null +++ b/IoTGateway/Areas/BasicData/Views/Driver/Create.cshtml @@ -0,0 +1,14 @@ +@model IoTGateway.ViewModel.BasicData.DriverVMs.DriverVM +@inject IStringLocalizer Localizer; + + + + + + + + + + + + diff --git a/IoTGateway/Areas/BasicData/Views/Driver/Delete.cshtml b/IoTGateway/Areas/BasicData/Views/Driver/Delete.cshtml new file mode 100644 index 0000000..c4c2884 --- /dev/null +++ b/IoTGateway/Areas/BasicData/Views/Driver/Delete.cshtml @@ -0,0 +1,17 @@ +@model IoTGateway.ViewModel.BasicData.DriverVMs.DriverVM +@inject IStringLocalizer Localizer; + + + @Localizer["Sys.DeleteConfirm"] + + + + + + + + + + + + diff --git a/IoTGateway/Areas/BasicData/Views/Driver/Details.cshtml b/IoTGateway/Areas/BasicData/Views/Driver/Details.cshtml new file mode 100644 index 0000000..e574672 --- /dev/null +++ b/IoTGateway/Areas/BasicData/Views/Driver/Details.cshtml @@ -0,0 +1,14 @@ +@model IoTGateway.ViewModel.BasicData.DriverVMs.DriverVM +@inject IStringLocalizer Localizer; + + + + + + + + + + + + diff --git a/IoTGateway/Areas/BasicData/Views/Driver/Edit.cshtml b/IoTGateway/Areas/BasicData/Views/Driver/Edit.cshtml new file mode 100644 index 0000000..b306514 --- /dev/null +++ b/IoTGateway/Areas/BasicData/Views/Driver/Edit.cshtml @@ -0,0 +1,16 @@ +@model IoTGateway.ViewModel.BasicData.DriverVMs.DriverVM +@inject IStringLocalizer Localizer; + + + + + + + + + + + + + + diff --git a/IoTGateway/Areas/BasicData/Views/Driver/Import.cshtml b/IoTGateway/Areas/BasicData/Views/Driver/Import.cshtml new file mode 100644 index 0000000..c8c6d5d --- /dev/null +++ b/IoTGateway/Areas/BasicData/Views/Driver/Import.cshtml @@ -0,0 +1,14 @@ +@model IoTGateway.ViewModel.BasicData.DriverVMs.DriverImportVM +@inject IStringLocalizer Localizer; + + + + + + + + + + + + diff --git a/IoTGateway/Areas/BasicData/Views/Driver/Index.cshtml b/IoTGateway/Areas/BasicData/Views/Driver/Index.cshtml new file mode 100644 index 0000000..b4ec6b1 --- /dev/null +++ b/IoTGateway/Areas/BasicData/Views/Driver/Index.cshtml @@ -0,0 +1,9 @@ +@model IoTGateway.ViewModel.BasicData.DriverVMs.DriverListVM +@inject IStringLocalizer Localizer; + + + + + + + diff --git a/IoTGateway/Areas/Config/Controllers/SystemConfigController.cs b/IoTGateway/Areas/Config/Controllers/SystemConfigController.cs new file mode 100644 index 0000000..2bf3579 --- /dev/null +++ b/IoTGateway/Areas/Config/Controllers/SystemConfigController.cs @@ -0,0 +1,219 @@ +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using System; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Mvc; +using WalkingTec.Mvvm.Core.Extensions; +using IoTGateway.ViewModel.Config.SystemConfigVMs; + +namespace IoTGateway.Controllers +{ + [Area("Config")] + [ActionDescription("系统配置")] + public partial class SystemConfigController : BaseController + { + #region Search + [ActionDescription("Sys.Search")] + public ActionResult Index() + { + var vm = Wtm.CreateVM(); + return PartialView(vm); + } + + [ActionDescription("Sys.Search")] + [HttpPost] + public string Search(SystemConfigSearcher searcher) + { + var vm = Wtm.CreateVM(passInit: true); + if (ModelState.IsValid) + { + vm.Searcher = searcher; + return vm.GetJson(false); + } + else + { + return vm.GetError(); + } + } + + #endregion + + #region Create + [ActionDescription("Sys.Create")] + public ActionResult Create() + { + var vm = Wtm.CreateVM(); + return PartialView(vm); + } + + [HttpPost] + [ActionDescription("Sys.Create")] + public ActionResult Create(SystemConfigVM vm) + { + if (!ModelState.IsValid) + { + return PartialView(vm); + } + else + { + vm.DoAdd(); + if (!ModelState.IsValid) + { + vm.DoReInit(); + return PartialView(vm); + } + else + { + return FFResult().CloseDialog().RefreshGrid(); + } + } + } + #endregion + + #region Edit + [ActionDescription("Sys.Edit")] + public ActionResult Edit(string id) + { + var vm = Wtm.CreateVM(id); + return PartialView(vm); + } + + [ActionDescription("Sys.Edit")] + [HttpPost] + [ValidateFormItemOnly] + public ActionResult Edit(SystemConfigVM vm) + { + if (!ModelState.IsValid) + { + return PartialView(vm); + } + else + { + vm.DoEdit(); + if (!ModelState.IsValid) + { + vm.DoReInit(); + return PartialView(vm); + } + else + { + return FFResult().CloseDialog().RefreshGridRow(vm.Entity.ID); + } + } + } + #endregion + + #region Delete + [ActionDescription("Sys.Delete")] + public ActionResult Delete(string id) + { + var vm = Wtm.CreateVM(id); + return PartialView(vm); + } + + [ActionDescription("Sys.Delete")] + [HttpPost] + public ActionResult Delete(string id, IFormCollection nouse) + { + var vm = Wtm.CreateVM(id); + vm.DoDelete(); + if (!ModelState.IsValid) + { + return PartialView(vm); + } + else + { + return FFResult().CloseDialog().RefreshGrid(); + } + } + #endregion + + #region Details + [ActionDescription("Sys.Details")] + public ActionResult Details(string id) + { + var vm = Wtm.CreateVM(id); + return PartialView(vm); + } + #endregion + + #region BatchEdit + [HttpPost] + [ActionDescription("Sys.BatchEdit")] + public ActionResult BatchEdit(string[] IDs) + { + var vm = Wtm.CreateVM(Ids: IDs); + return PartialView(vm); + } + + [HttpPost] + [ActionDescription("Sys.BatchEdit")] + public ActionResult DoBatchEdit(SystemConfigBatchVM vm, IFormCollection nouse) + { + if (!ModelState.IsValid || !vm.DoBatchEdit()) + { + return PartialView("BatchEdit",vm); + } + else + { + return FFResult().CloseDialog().RefreshGrid().Alert(Localizer["Sys.BatchEditSuccess", vm.Ids.Length]); + } + } + #endregion + + #region BatchDelete + [HttpPost] + [ActionDescription("Sys.BatchDelete")] + public ActionResult BatchDelete(string[] IDs) + { + var vm = Wtm.CreateVM(Ids: IDs); + return PartialView(vm); + } + + [HttpPost] + [ActionDescription("Sys.BatchDelete")] + public ActionResult DoBatchDelete(SystemConfigBatchVM vm, IFormCollection nouse) + { + if (!ModelState.IsValid || !vm.DoBatchDelete()) + { + return PartialView("BatchDelete",vm); + } + else + { + return FFResult().CloseDialog().RefreshGrid().Alert(Localizer["Sys.BatchDeleteSuccess", vm.Ids.Length]); + } + } + #endregion + + #region Import + [ActionDescription("Sys.Import")] + public ActionResult Import() + { + var vm = Wtm.CreateVM(); + return PartialView(vm); + } + + [HttpPost] + [ActionDescription("Sys.Import")] + public ActionResult Import(SystemConfigImportVM vm, IFormCollection nouse) + { + if (vm.ErrorListVM.EntityList.Count > 0 || !vm.BatchSaveData()) + { + return PartialView(vm); + } + else + { + return FFResult().CloseDialog().RefreshGrid().Alert(Localizer["Sys.ImportSuccess", vm.EntityList.Count.ToString()]); + } + } + #endregion + + [ActionDescription("Sys.Export")] + [HttpPost] + public IActionResult ExportExcel(SystemConfigListVM vm) + { + return vm.GetExportData(); + } + + } +} diff --git a/IoTGateway/Areas/Config/Views/SystemConfig/BatchDelete.cshtml b/IoTGateway/Areas/Config/Views/SystemConfig/BatchDelete.cshtml new file mode 100644 index 0000000..4282f75 --- /dev/null +++ b/IoTGateway/Areas/Config/Views/SystemConfig/BatchDelete.cshtml @@ -0,0 +1,12 @@ +@model IoTGateway.ViewModel.Config.SystemConfigVMs.SystemConfigBatchVM +@inject IStringLocalizer Localizer; + + + @Localizer["Sys.BatchDeleteConfirm"] + + + + + + + diff --git a/IoTGateway/Areas/Config/Views/SystemConfig/BatchEdit.cshtml b/IoTGateway/Areas/Config/Views/SystemConfig/BatchEdit.cshtml new file mode 100644 index 0000000..7e496ba --- /dev/null +++ b/IoTGateway/Areas/Config/Views/SystemConfig/BatchEdit.cshtml @@ -0,0 +1,14 @@ +@model IoTGateway.ViewModel.Config.SystemConfigVMs.SystemConfigBatchVM +@inject IStringLocalizer Localizer; + + +
@Localizer["Sys.BatchEditConfirm"]
+ + + + + + + + +
diff --git a/IoTGateway/Areas/Config/Views/SystemConfig/Create.cshtml b/IoTGateway/Areas/Config/Views/SystemConfig/Create.cshtml new file mode 100644 index 0000000..c746aa6 --- /dev/null +++ b/IoTGateway/Areas/Config/Views/SystemConfig/Create.cshtml @@ -0,0 +1,16 @@ +@model IoTGateway.ViewModel.Config.SystemConfigVMs.SystemConfigVM +@inject IStringLocalizer Localizer; + + + + + + + + + + + + + + diff --git a/IoTGateway/Areas/Config/Views/SystemConfig/Delete.cshtml b/IoTGateway/Areas/Config/Views/SystemConfig/Delete.cshtml new file mode 100644 index 0000000..1f23668 --- /dev/null +++ b/IoTGateway/Areas/Config/Views/SystemConfig/Delete.cshtml @@ -0,0 +1,18 @@ +@model IoTGateway.ViewModel.Config.SystemConfigVMs.SystemConfigVM +@inject IStringLocalizer Localizer; + + + @Localizer["Sys.DeleteConfirm"] + + + + + + + + + + + + + diff --git a/IoTGateway/Areas/Config/Views/SystemConfig/Details.cshtml b/IoTGateway/Areas/Config/Views/SystemConfig/Details.cshtml new file mode 100644 index 0000000..96db607 --- /dev/null +++ b/IoTGateway/Areas/Config/Views/SystemConfig/Details.cshtml @@ -0,0 +1,15 @@ +@model IoTGateway.ViewModel.Config.SystemConfigVMs.SystemConfigVM +@inject IStringLocalizer Localizer; + + + + + + + + + + + + + diff --git a/IoTGateway/Areas/Config/Views/SystemConfig/Edit.cshtml b/IoTGateway/Areas/Config/Views/SystemConfig/Edit.cshtml new file mode 100644 index 0000000..2acf3ab --- /dev/null +++ b/IoTGateway/Areas/Config/Views/SystemConfig/Edit.cshtml @@ -0,0 +1,17 @@ +@model IoTGateway.ViewModel.Config.SystemConfigVMs.SystemConfigVM +@inject IStringLocalizer Localizer; + + + + + + + + + + + + + + + diff --git a/IoTGateway/Areas/Config/Views/SystemConfig/Import.cshtml b/IoTGateway/Areas/Config/Views/SystemConfig/Import.cshtml new file mode 100644 index 0000000..0522b4b --- /dev/null +++ b/IoTGateway/Areas/Config/Views/SystemConfig/Import.cshtml @@ -0,0 +1,14 @@ +@model IoTGateway.ViewModel.Config.SystemConfigVMs.SystemConfigImportVM +@inject IStringLocalizer Localizer; + + + + + + + + + + + + diff --git a/IoTGateway/Areas/Config/Views/SystemConfig/Index.cshtml b/IoTGateway/Areas/Config/Views/SystemConfig/Index.cshtml new file mode 100644 index 0000000..6eee90f --- /dev/null +++ b/IoTGateway/Areas/Config/Views/SystemConfig/Index.cshtml @@ -0,0 +1,8 @@ +@model IoTGateway.ViewModel.Config.SystemConfigVMs.SystemConfigListVM +@inject IStringLocalizer Localizer; + + + + + + diff --git a/IoTGateway/Areas/_Admin/ApiControllers/AccountController.cs b/IoTGateway/Areas/_Admin/ApiControllers/AccountController.cs new file mode 100644 index 0000000..a9740d0 --- /dev/null +++ b/IoTGateway/Areas/_Admin/ApiControllers/AccountController.cs @@ -0,0 +1,272 @@ +// WTM默认页面 Wtm buidin page +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text.Json; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Authentication; +using Microsoft.AspNetCore.Authentication.Cookies; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; +using Microsoft.Extensions.Logging; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; +using WalkingTec.Mvvm.Core.Support.Json; +using WalkingTec.Mvvm.Mvc; +using WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkUserVms; +using WalkingTec.Mvvm.Mvc.Auth; + +namespace WalkingTec.Mvvm.Admin.Api +{ + [AuthorizeJwtWithCookie] + [ApiController] + [Route("api/_[controller]")] + [ActionDescription("_Admin.LoginApi")] + [AllRights] + public class AccountController : BaseApiController + { + private readonly ILogger _logger; + private readonly ITokenService _authService; + public AccountController( + ILogger logger, + ITokenService authService) + { + _logger = logger; + _authService = authService; + } + + [AllowAnonymous] + [HttpPost("[action]")] + public async Task Login([FromForm] string account, [FromForm] string password, [FromForm] bool rememberLogin = false) + { + + var rv = await DC.Set().Where(x => x.ITCode.ToLower() == account.ToLower() && x.Password == Utils.GetMD5String(password) && x.IsValid).Select(x => new { itcode = x.ITCode, id = x.GetID() }).SingleOrDefaultAsync(); + + if (rv == null) + { + return BadRequest(Localizer["Sys.LoginFailed"].Value); + } + LoginUserInfo user = new LoginUserInfo + { + ITCode = rv.itcode, + UserId = rv.id.ToString() + }; + + await user.LoadBasicInfoAsync(Wtm); + Wtm.LoginUserInfo = user; + + AuthenticationProperties properties = null; + if (rememberLogin) + { + properties = new AuthenticationProperties + { + IsPersistent = true, + ExpiresUtc = DateTimeOffset.UtcNow.Add(TimeSpan.FromDays(30)) + }; + } + + var principal = Wtm.LoginUserInfo.CreatePrincipal(); + await HttpContext.SignInAsync(CookieAuthenticationDefaults.AuthenticationScheme, principal, properties); + List ms = new List(); + LoginUserInfo forapi = new LoginUserInfo(); + forapi.UserId = user.UserId; + forapi.ITCode = user.ITCode; + forapi.Name = user.Name; + forapi.Roles = user.Roles; + forapi.Groups = user.Groups; + forapi.PhotoId = user.PhotoId; + var roleIDs = Wtm.LoginUserInfo.Roles.Select(x => x.RoleCode).ToList(); + var data = DC.Set().Where(x => x.MethodName == null).ToList(); + var topdata = data.Where(x => x.ParentId == null && x.ShowOnMenu).ToList().FlatTree(x => x.DisplayOrder).Where(x => (x.IsInside == false || x.FolderOnly == true || string.IsNullOrEmpty(x.MethodName)) && x.ShowOnMenu).ToList(); + var allowed = DC.Set() + .AsNoTracking() + .Where(x => x.RoleCode != null && roleIDs.Contains(x.RoleCode)) + .Select(x => new { x.MenuItem.ID, x.MenuItem.Url }) + .ToList(); + + var allowedids = allowed.Select(x => x.ID).ToList(); + foreach (var item in topdata) + { + if (allowedids.Contains(item.ID)) + { + ms.Add(new SimpleMenuApi + { + Id = item.ID.ToString().ToLower(), + ParentId = item.ParentId?.ToString()?.ToLower(), + Text = item.PageName, + Url = item.Url, + Icon = item.Icon + }); + } + } + + LocalizeMenu(ms); + + List urls = new List(); + urls.AddRange(allowed.Select(x => x.Url).Distinct()); + urls.AddRange(GlobaInfo.AllModule.Where(x => x.IsApi == true).SelectMany(x => x.Actions).Where(x => (x.IgnorePrivillege == true || x.Module.IgnorePrivillege == true) && x.Url != null).Select(x => x.Url)); + forapi.Attributes = new Dictionary(); + forapi.Attributes.Add("Menus", ms); + forapi.Attributes.Add("Actions", urls); + + return Ok(forapi); + } + + + [AllowAnonymous] + [HttpPost("[action]")] + public async Task LoginJwt(SimpleLogin loginInfo) + { + + var rv = await DC.Set().Where(x => x.ITCode.ToLower() == loginInfo.Account.ToLower() && x.Password == Utils.GetMD5String(loginInfo.Password) && x.IsValid).Select(x => new { itcode = x.ITCode, id = x.GetID() }).SingleOrDefaultAsync(); + + if (rv == null) + { + ModelState.AddModelError(" ", Localizer["Sys.LoginFailed"]); + return BadRequest(ModelState.GetErrorJson()); + } + LoginUserInfo user = new LoginUserInfo + { + ITCode = rv.itcode, + UserId = rv.id.ToString() + }; + await user.LoadBasicInfoAsync(Wtm); + Wtm.LoginUserInfo = user; + + var authService = HttpContext.RequestServices.GetService(typeof(ITokenService)) as ITokenService; + + var token = await authService.IssueTokenAsync(Wtm.LoginUserInfo); + return Content(JsonSerializer.Serialize(token), "application/json"); + } + + + private void LocalizeMenu(List menus) + { + if (menus == null) + { + return; + } + foreach (var menu in menus) + { + if (menu.Text?.StartsWith("MenuKey.") == true) + { + menu.Text = Localizer[menu.Text]; + } + } + } + + [HttpPost("[action]")] + [Public] + [ProducesResponseType(typeof(Token), StatusCodes.Status200OK)] + public async Task RefreshToken(string refreshToken) + { + var rv = await _authService.RefreshTokenAsync(refreshToken); + if (rv == null) + { + return BadRequest(); + } + else + { + return Ok(rv); + } + } + + [AllRights] + [HttpGet("[action]")] + public IActionResult CheckUserInfo() + { + if (Wtm.LoginUserInfo == null) + { + return BadRequest(); + } + else + { + var forapi = new LoginUserInfo(); + forapi.UserId = Wtm.LoginUserInfo.UserId; + forapi.ITCode = Wtm.LoginUserInfo.ITCode; + forapi.Name = Wtm.LoginUserInfo.Name; + forapi.Roles = Wtm.LoginUserInfo.Roles; + forapi.Groups = Wtm.LoginUserInfo.Groups; + forapi.PhotoId = Wtm.LoginUserInfo.PhotoId; + + var ms = new List(); + var roleIDs = Wtm.LoginUserInfo.Roles.Select(x => x.RoleCode).ToList(); + var data = DC.Set().Where(x => x.MethodName == null).ToList(); + var topdata = data.Where(x => x.ParentId == null && x.ShowOnMenu).ToList().FlatTree(x => x.DisplayOrder).Where(x => (x.IsInside == false || x.FolderOnly == true || string.IsNullOrEmpty(x.MethodName)) && x.ShowOnMenu).ToList(); + var allowed = DC.Set() + .AsNoTracking() + .Where(x => x.RoleCode != null && roleIDs.Contains(x.RoleCode)) + .Select(x => new { x.MenuItem.ID, x.MenuItem.Url }) + .ToList(); + + var allowedids = allowed.Select(x => x.ID).ToList(); + foreach (var item in topdata) + { + if (allowedids.Contains(item.ID)) + { + ms.Add(new SimpleMenuApi + { + Id = item.ID.ToString().ToLower(), + ParentId = item.ParentId?.ToString()?.ToLower(), + Text = item.PageName, + Url = item.Url, + Icon = item.Icon + }); + } + } + + LocalizeMenu(ms); + + List urls = new List(); + urls.AddRange(allowed.Select(x => x.Url).Distinct()); + urls.AddRange(GlobaInfo.AllModule.Where(x => x.IsApi == true).SelectMany(x => x.Actions).Where(x => (x.IgnorePrivillege == true || x.Module.IgnorePrivillege == true) && x.Url != null).Select(x => x.Url)); + forapi.Attributes = new Dictionary(); + forapi.Attributes.Add("Menus", ms); + forapi.Attributes.Add("Actions", urls); + return Ok(forapi); + } + } + + + [AllRights] + [HttpPost("[action]")] + public IActionResult ChangePassword(ChangePasswordVM vm) + { + if (!ModelState.IsValid) + { + return BadRequest(ModelState.GetErrorJson()); + } + else + { + vm.DoChange(); + if (!ModelState.IsValid) + { + return BadRequest(ModelState.GetErrorJson()); + } + else + { + return Ok(); + } + } + + } + + [AllRights] + [HttpGet("[action]")] + public async Task Logout() + { + HttpContext.Session.Clear(); + await HttpContext.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme); + HttpContext.Response.Redirect("/"); + } + + } + + public class SimpleLogin + { + public string Account { get; set; } + public string Password { get; set; } + } +} diff --git a/IoTGateway/Areas/_Admin/ApiControllers/ActionLogController.cs b/IoTGateway/Areas/_Admin/ApiControllers/ActionLogController.cs new file mode 100644 index 0000000..5a38063 --- /dev/null +++ b/IoTGateway/Areas/_Admin/ApiControllers/ActionLogController.cs @@ -0,0 +1,90 @@ +// WTM默认页面 Wtm buidin page +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.AspNetCore.Mvc; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; +using WalkingTec.Mvvm.Mvc; +using WalkingTec.Mvvm.Mvc.Admin.ViewModels.ActionLogVMs; + +namespace WalkingTec.Mvvm.Admin.Api +{ + [AuthorizeJwtWithCookie] + [ActionDescription("_Admin.ActionLogApi")] + [ApiController] + [Route("api/_[controller]")] + public class ActionLogController : BaseApiController + { + [ActionDescription("Sys.Search")] + [HttpPost("[action]")] + public IActionResult Search(ActionLogSearcher searcher) + { + if (ModelState.IsValid) + { + var vm = Wtm.CreateVM(passInit:true); + vm.Searcher = searcher; + return Content(vm.GetJson()); + } + else + { + return BadRequest(ModelState.GetErrorJson()); + } + } + + [ActionDescription("Sys.Get")] + [HttpGet("{id}")] + public ActionLogVM Get(Guid id) + { + var vm = Wtm.CreateVM(id); + return vm; + } + + [HttpPost("[action]")] + [ActionDescription("Sys.Delete")] + public IActionResult BatchDelete(string[] ids) + { + var vm = Wtm.CreateVM(); + if (ids != null && ids.Count() > 0) + { + vm.Ids = ids; + } + else + { + return Ok(); + } + if (!ModelState.IsValid || !vm.DoBatchDelete()) + { + return BadRequest(ModelState.GetErrorJson()); + } + else + { + return Ok(ids.Count()); + } + } + + + [ActionDescription("Sys.Export")] + [HttpPost("[action]")] + public IActionResult ExportExcel(ActionLogSearcher searcher) + { + var vm = Wtm.CreateVM(); + vm.Searcher = searcher; + vm.SearcherMode = ListVMSearchModeEnum.Export; + return vm.GetExportData(); + } + + [ActionDescription("Sys.ExportByIds")] + [HttpPost("[action]")] + public IActionResult ExportExcelByIds(string[] ids) + { + var vm = Wtm.CreateVM(); + if (ids != null && ids.Count() > 0) + { + vm.Ids = new List(ids); + vm.SearcherMode = ListVMSearchModeEnum.CheckExport; + } + return vm.GetExportData(); + } + } +} diff --git a/IoTGateway/Areas/_Admin/ApiControllers/DataPrivilegeController.cs b/IoTGateway/Areas/_Admin/ApiControllers/DataPrivilegeController.cs new file mode 100644 index 0000000..6424496 --- /dev/null +++ b/IoTGateway/Areas/_Admin/ApiControllers/DataPrivilegeController.cs @@ -0,0 +1,146 @@ +// WTM默认页面 Wtm buidin page +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; +using WalkingTec.Mvvm.Mvc; +using WalkingTec.Mvvm.Mvc.Admin.ViewModels.DataPrivilegeVMs; + +namespace WalkingTec.Mvvm.Admin.Api +{ + [AuthorizeJwtWithCookie] + [ActionDescription("_Admin.DataPrivilegeApi")] + [ApiController] + [Route("api/_[controller]")] + public class DataPrivilegeController : BaseApiController + { + [ActionDescription("Sys.Search")] + [HttpPost("[action]")] + public string Search(DataPrivilegeSearcher searcher) + { + var vm = Wtm.CreateVM(); + vm.Searcher = searcher; + return vm.GetJson(); + } + + [ActionDescription("Sys.Get")] + [HttpGet("[action]")] + public DataPrivilegeVM Get(string TableName, string TargetId, DpTypeEnum DpType) + { + DataPrivilegeVM vm = null; + if (DpType == DpTypeEnum.User) + { + vm = Wtm.CreateVM(values: x => x.Entity.TableName == TableName && x.Entity.UserCode == TargetId && x.DpType == DpType); + } + else + { + vm = Wtm.CreateVM(values: x => x.Entity.TableName == TableName && x.Entity.GroupCode == TargetId && x.DpType == DpType); + } + return vm; + } + + [ActionDescription("Sys.Create")] + [HttpPost("[action]")] + public async Task Add(DataPrivilegeVM vm) + { + if (!ModelState.IsValid) + { + return BadRequest(ModelState.GetErrorJson()); + } + else + { + await vm.DoAddAsync(); + if (!ModelState.IsValid) + { + return BadRequest(ModelState.GetErrorJson()); + } + else + { + return Ok(vm.Entity); + } + } + + } + + [ActionDescription("Sys.Edit")] + [HttpPut("[action]")] + public async Task Edit(DataPrivilegeVM vm) + { + if (!ModelState.IsValid) + { + return BadRequest(ModelState.GetErrorJson()); + } + else + { + await vm.DoEditAsync(false); + if (!ModelState.IsValid) + { + return BadRequest(ModelState.GetErrorJson()); + } + else + { + return Ok(vm.Entity); + } + } + } + + + [HttpPost("[action]")] + [ActionDescription("Sys.Delete")] + public async Task Delete(SimpleDpModel dp) + { + DataPrivilegeVM vm = null; + if (dp.Type == DpTypeEnum.User) + { + vm = Wtm.CreateVM(values: x => x.Entity.TableName == dp.ModelName && x.Entity.UserCode == dp.Id && x.DpType == dp.Type); + } + else + { + vm = Wtm.CreateVM(values: x => x.Entity.TableName == dp.ModelName && x.Entity.GroupCode == dp.Id && x.DpType == dp.Type); + } + await vm.DoDeleteAsync(); + return Ok(1); + } + + + + [AllRights] + [HttpGet("[action]")] + public ActionResult GetPrivilegeByTableName(string table) + { + var AllItems = new List(); + var dps =Wtm.DataPrivilegeSettings.Where(x => x.ModelName == table).SingleOrDefault(); + if (dps != null) + { + AllItems = dps.GetItemList(Wtm); + } + return Ok(AllItems); + } + + [AllRights] + [HttpGet("[action]")] + public ActionResult GetPrivileges() + { + var rv = Wtm.DataPrivilegeSettings.ToListItems(x => x.PrivillegeName, x => x.ModelName); + return Ok(rv); + } + + [AllRights] + [HttpGet("[action]")] + public ActionResult GetUserGroups() + { + var rv = DC.Set().GetSelectListItems(Wtm, x => x.GroupName); + return Ok(rv); + } + } + + public class SimpleDpModel + { + public string ModelName { get; set; } + public string Id { get; set; } + public DpTypeEnum Type { get; set; } + } +} diff --git a/IoTGateway/Areas/_Admin/ApiControllers/FileApiController.cs b/IoTGateway/Areas/_Admin/ApiControllers/FileApiController.cs new file mode 100644 index 0000000..bc735f5 --- /dev/null +++ b/IoTGateway/Areas/_Admin/ApiControllers/FileApiController.cs @@ -0,0 +1,155 @@ +// WTM默认页面 Wtm buidin page +using System; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.StaticFiles; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Support.FileHandlers; +using WalkingTec.Mvvm.Mvc; + +namespace WalkingTec.Mvvm.Admin.Api +{ + [AuthorizeJwtWithCookie] + [ApiController] + [Route("api/_file")] + [AllRights] + [ActionDescription("_Admin.FileApi")] + public class FileApiController : BaseApiController + { + [HttpPost("[action]")] + [ActionDescription("UploadFile")] + public IActionResult Upload([FromServices] WtmFileProvider fp, string sm = null, string groupName = null, string subdir=null,string extra = null,string csName= null) + { + var FileData = Request.Form.Files[0]; + var file = fp.Upload(FileData.FileName, FileData.Length, FileData.OpenReadStream(),groupName,subdir,extra,sm,Wtm.CreateDC(cskey:csName)); + return Ok(new { Id = file.GetID(), Name = file.FileName }); + } + + [HttpPost("[action]")] + [ActionDescription("UploadPic")] + public IActionResult UploadImage([FromServices] WtmFileProvider fp,int? width = null, int? height = null, string sm = null, string groupName = null, string subdir = null, string extra = null, string csName = null) + { + if (width == null && height == null) + { + return Upload(fp,sm,groupName,csName); + } + var FileData = Request.Form.Files[0]; + + Image oimage = Image.FromStream(FileData.OpenReadStream()); + if (oimage == null) + { + return BadRequest(Localizer["Sys.UploadFailed"]); + } + if (width == null) + { + width = height * oimage.Width / oimage.Height; + } + if (height == null) + { + height = width * oimage.Height / oimage.Width; + } + MemoryStream ms = new MemoryStream(); + oimage.GetThumbnailImage(width.Value, height.Value, null, IntPtr.Zero).Save(ms, System.Drawing.Imaging.ImageFormat.Png); + ms.Position = 0; + var file = fp.Upload(FileData.FileName, FileData.Length, ms, groupName,subdir, extra, sm, Wtm.CreateDC(cskey: csName)); + oimage.Dispose(); + ms.Dispose(); + + if (file != null) + { + return Ok(new { Id = file.GetID(), Name = file.FileName }); + } + return BadRequest(Localizer["Sys.UploadFailed"]); + + } + + [HttpGet("[action]/{id}")] + [ActionDescription("GetFileName")] + public IActionResult GetFileName([FromServices] WtmFileProvider fp, string id, string csName = null) + { + return Ok(fp.GetFileName(id, ConfigInfo.CreateDC(csName))); + } + + [HttpGet("[action]/{id}")] + [ActionDescription("GetFile")] + public async Task GetFile([FromServices] WtmFileProvider fp, string id, string csName = null, int? width = null, int? height = null) + { + var file = fp.GetFile(id, true, ConfigInfo.CreateDC(csName)); + + + if (file == null) + { + return BadRequest(Localizer["Sys.FileNotFound"]); + } + try + { + if (width != null || height != null) + { + Image oimage = Image.FromStream(file.DataStream); + if (oimage != null) + { + if (width == null) + { + width = oimage.Width * height / oimage.Height; + } + if (height == null) + { + height = oimage.Height * width / oimage.Width; + } + var ms = new MemoryStream(); + oimage.GetThumbnailImage(width.Value, height.Value, null, IntPtr.Zero).Save(ms, System.Drawing.Imaging.ImageFormat.Png); + ms.Position = 0; + await ms?.CopyToAsync(Response.Body); + file.DataStream.Dispose(); + ms.Dispose(); + oimage.Dispose(); + return new EmptyResult(); + } + } + } + catch { } + + var ext = file.FileExt.ToLower(); + if (ext == "mp4") + { + return File(file.DataStream, "video/mpeg4", enableRangeProcessing: true); + } + else + { + await file.DataStream?.CopyToAsync(Response.Body); + file.DataStream.Dispose(); + return new EmptyResult(); + } + } + + [HttpGet("[action]/{id}")] + [ActionDescription("DownloadFile")] + public IActionResult DownloadFile([FromServices] WtmFileProvider fp, string id, string csName = null) + { + var file = fp.GetFile(id, true, ConfigInfo.CreateDC(csName)); + if (file == null) + { + return BadRequest(Localizer["Sys.FileNotFound"]); + } + var ext = file.FileExt.ToLower(); + var provider = new FileExtensionContentTypeProvider(); + string contentType; + if (!provider.TryGetContentType(file.FileName, out contentType)) + { + contentType = "application/octet-stream"; + } + return File(file.DataStream, contentType, file.FileName ?? (Guid.NewGuid().ToString() + ext)); + } + + [HttpGet("[action]/{id}")] + [ActionDescription("DeleteFile")] + public IActionResult DeletedFile([FromServices] WtmFileProvider fp, string id, string csName = null) + { + fp.DeleteFile(id, ConfigInfo.CreateDC(csName)); + return Ok(); + } + } +} diff --git a/IoTGateway/Areas/_Admin/ApiControllers/FrameworkGroupController.cs b/IoTGateway/Areas/_Admin/ApiControllers/FrameworkGroupController.cs new file mode 100644 index 0000000..133931d --- /dev/null +++ b/IoTGateway/Areas/_Admin/ApiControllers/FrameworkGroupController.cs @@ -0,0 +1,166 @@ +// WTM默认页面 Wtm buidin page +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; +using WalkingTec.Mvvm.Mvc; +using WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkGroupVMs; + +namespace WalkingTec.Mvvm.Admin.Api +{ + [AuthorizeJwtWithCookie] + [ActionDescription("_Admin.GroupApi")] + [ApiController] + [Route("api/_[controller]")] + public class FrameworkGroupController : BaseApiController + { + [ActionDescription("Sys.Search")] + [HttpPost("[action]")] + public string Search(FrameworkGroupSearcher searcher) + { + var vm = Wtm.CreateVM(); + vm.Searcher = searcher; + return vm.GetJson(); + } + + [ActionDescription("Sys.Get")] + [HttpGet("{id}")] + public FrameworkGroupVM Get(Guid id) + { + var vm = Wtm.CreateVM(id); + return vm; + } + + [ActionDescription("Sys.Create")] + [HttpPost("[action]")] + public IActionResult Add(FrameworkGroupVM vm) + { + if (!ModelState.IsValid) + { + return BadRequest(ModelState.GetErrorJson()); + } + else + { + vm.DoAdd(); + if (!ModelState.IsValid) + { + return BadRequest(ModelState.GetErrorJson()); + } + else + { + return Ok(vm.Entity); + } + } + + } + + [ActionDescription("Sys.Edit")] + [HttpPut("[action]")] + public IActionResult Edit(FrameworkGroupVM vm) + { + if (!ModelState.IsValid) + { + return BadRequest(ModelState.GetErrorJson()); + } + else + { + vm.DoEdit(false); + if (!ModelState.IsValid) + { + return BadRequest(ModelState.GetErrorJson()); + } + else + { + return Ok(vm.Entity); + } + } + } + + [HttpPost("BatchDelete")] + [ActionDescription("Sys.Delete")] + public async Task BatchDelete(string[] ids) + { + var vm = Wtm.CreateVM(); + List GroupCode = new List(); + if (ids != null && ids.Count() > 0) + { + GroupCode = DC.Set().CheckIDs(new List(ids)).Select(x => x.GroupCode).ToList(); + vm.Ids = ids; + } + else + { + return Ok(); + } + if (!ModelState.IsValid || !vm.DoBatchDelete()) + { + return BadRequest(ModelState.GetErrorJson()); + } + else + { + var gr = DC.Set().Where(x => GroupCode.Contains(x.GroupCode)).ToList(); + var itcodes = gr.Select(x => x.UserCode).ToArray(); + DC.Set().RemoveRange(gr); + DC.SaveChanges(); + await Wtm.RemoveUserCache(itcodes); + return Ok(ids.Count()); + } + } + + [ActionDescription("Sys.Export")] + [HttpPost("[action]")] + public IActionResult ExportExcel(FrameworkGroupSearcher searcher) + { + var vm = Wtm.CreateVM(); + vm.Searcher = searcher; + vm.SearcherMode = ListVMSearchModeEnum.Export; + return vm.GetExportData(); + } + + [ActionDescription("Sys.ExportByIds")] + [HttpPost("[action]")] + public IActionResult ExportExcelByIds(string[] ids) + { + var vm = Wtm.CreateVM(); + if (ids != null && ids.Count() > 0) + { + vm.Ids = new List(ids); + vm.SearcherMode = ListVMSearchModeEnum.CheckExport; + } + return vm.GetExportData(); + } + + [ActionDescription("Sys.DownloadTemplate")] + [HttpGet("[action]")] + public IActionResult GetExcelTemplate() + { + var vm = Wtm.CreateVM(); + var qs = new Dictionary(); + foreach (var item in Request.Query.Keys) + { + qs.Add(item, Request.Query[item]); + } + vm.SetParms(qs); + var data = vm.GenerateTemplate(out string fileName); + return File(data, "application/vnd.ms-excel", fileName); + } + + [ActionDescription("Sys.Import")] + [HttpPost("[action]")] + public ActionResult Import(FrameworkGroupImportVM vm) + { + + if (vm.ErrorListVM.EntityList.Count > 0 || !vm.BatchSaveData()) + { + return BadRequest(vm.GetErrorJson()); + } + else + { + return Ok(vm.EntityList.Count); + } + } + + } +} diff --git a/IoTGateway/Areas/_Admin/ApiControllers/FrameworkMenuController.cs b/IoTGateway/Areas/_Admin/ApiControllers/FrameworkMenuController.cs new file mode 100644 index 0000000..3495bda --- /dev/null +++ b/IoTGateway/Areas/_Admin/ApiControllers/FrameworkMenuController.cs @@ -0,0 +1,186 @@ +// WTM默认页面 Wtm buidin page +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; +using WalkingTec.Mvvm.Core.Support.Json; +using WalkingTec.Mvvm.Mvc; +using WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkMenuVMs; + +namespace WalkingTec.Mvvm.Admin.Api +{ + [AuthorizeJwtWithCookie] + [ActionDescription("_Admin.MenuApi")] + [ApiController] + [Route("api/_[controller]")] + public class FrameworkMenuController : BaseApiController + { + [ActionDescription("Sys.Search")] + [HttpPost("[action]")] + public string Search(BaseSearcher searcher) + { + var vm = Wtm.CreateVM(); + vm.Searcher = searcher; + return vm.GetJson(); + } + + [ActionDescription("Sys.Get")] + [HttpGet("{id}")] + public FrameworkMenuVM2 Get(Guid id) + { + var vm = Wtm.CreateVM(id); + return vm; + } + + [ActionDescription("Sys.Create")] + [HttpPost("[action]")] + public IActionResult Add(FrameworkMenuVM2 vm) + { + if (!ModelState.IsValid) + { + return BadRequest(ModelState.GetErrorJson()); + } + else + { + vm.DoAdd(); + if (!ModelState.IsValid) + { + return BadRequest(ModelState.GetErrorJson()); + } + else + { + return Ok(vm.Entity); + } + } + + } + + [ActionDescription("Sys.Edit")] + [HttpPut("[action]")] + public IActionResult Edit(FrameworkMenuVM2 vm) + { + if (!ModelState.IsValid) + { + return BadRequest(ModelState.GetErrorJson()); + } + else + { + vm.DoEdit(true); + if (!ModelState.IsValid) + { + return BadRequest(ModelState.GetErrorJson()); + } + else + { + return Ok(vm.Entity); + } + } + } + + [HttpPost("BatchDelete")] + [ActionDescription("Sys.Delete")] + public IActionResult BatchDelete(string[] ids) + { + var vm = Wtm.CreateVM(); + if (ids != null && ids.Count() > 0) + { + vm.Ids = ids; + } + else + { + return Ok(); + } + if (!ModelState.IsValid || !vm.DoBatchDelete()) + { + return BadRequest(ModelState.GetErrorJson()); + } + else + { + return Ok(ids.Count()); + } + } + + [ActionDescription("Sys.Export")] + [HttpPost("[action]")] + public IActionResult ExportExcel(BaseSearcher searcher) + { + var vm = Wtm.CreateVM(); + vm.Searcher = searcher; + vm.SearcherMode = ListVMSearchModeEnum.Export; + return vm.GetExportData(); + } + + [ActionDescription("Sys.ExportByIds")] + [HttpPost("[action]")] + public IActionResult ExportExcelByIds(string[] ids) + { + var vm = Wtm.CreateVM(); + if (ids != null && ids.Count() > 0) + { + vm.Ids = new List(ids); + vm.SearcherMode = ListVMSearchModeEnum.CheckExport; + } + return vm.GetExportData(); + } + + [ActionDescription("_Admin.UnsetPages")] + [HttpGet("[action]")] + public string UnsetPages() + { + var vm = Wtm.CreateVM(); + return vm.GetJson(); + } + + [ActionDescription("_Admin.RefreshMenu")] + [HttpGet("[action]")] + public async Task RefreshMenu() + { + Cache.Delete("FFMenus"); + var userids = DC.Set().Select(x => x.ID.ToString().ToLower()).ToArray(); + await Wtm.RemoveUserCache(userids); + return Ok(Localizer["Sys.OprationSuccess"]); + } + + [ActionDescription("GetActionsByModelId")] + [HttpGet("GetActionsByModel")] + [AllRights] + public ActionResult GetActionsByModel(string ModelName) + { + var m = GlobaInfo.AllModule.Where(x => x.IsApi == true && x.FullName.ToLower() == ModelName.ToLower()).SelectMany(x => x.Actions).ToList(); + List toremove = new List(); + foreach (var item in m) + { + if (item.IgnorePrivillege == true || item.Module.IgnorePrivillege == true) + { + toremove.Add(item); + } + } + toremove.ForEach(x => m.Remove(x)); + var actions = m.ToListItems(y => y.ActionName, y => y.MethodName); + actions.ForEach(x => x.Selected = true); + return Ok(actions); + } + + [ActionDescription("GetFolders")] + [HttpGet("GetFolders")] + [AllRights] + public ActionResult GetFolders() + { + var AllParents = DC.Set().Where(x => x.FolderOnly == true).OrderBy(x => x.DisplayOrder).GetSelectListItems(Wtm, x => x.PageName); + foreach (var p in AllParents) + { + if (p.Text.StartsWith("MenuKey.")) + { + p.Text = Localizer[p.Text]; + } + } + + return Ok(AllParents); + } + + } + +} diff --git a/IoTGateway/Areas/_Admin/ApiControllers/FrameworkRoleController.cs b/IoTGateway/Areas/_Admin/ApiControllers/FrameworkRoleController.cs new file mode 100644 index 0000000..e2fbd18 --- /dev/null +++ b/IoTGateway/Areas/_Admin/ApiControllers/FrameworkRoleController.cs @@ -0,0 +1,198 @@ +// WTM默认页面 Wtm buidin page +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; +using WalkingTec.Mvvm.Mvc; +using WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkRoleVMs; + +namespace WalkingTec.Mvvm.Admin.Api +{ + [AuthorizeJwtWithCookie] + [ActionDescription("_Admin.RoleApi")] + [ApiController] + [Route("api/_[controller]")] + public class FrameworkRoleController : BaseApiController + { + [ActionDescription("Sys.Search")] + [HttpPost("[action]")] + public string Search(FrameworkRoleSearcher searcher) + { + var vm = Wtm.CreateVM(); + vm.Searcher = searcher; + return vm.GetJson(); + } + + [ActionDescription("Sys.Get")] + [HttpGet("{id}")] + public FrameworkRoleVM Get(Guid id) + { + var vm = Wtm.CreateVM(id); + return vm; + } + + [ActionDescription("GetPageActions")] + [HttpGet("[action]/{id}")] + [AllRights] + public FrameworkRoleMDVM2 GetPageActions(Guid id) + { + var vm = Wtm.CreateVM(id); + return vm; + } + + [ActionDescription("_Admin.PageFunction")] + [HttpPut("[action]")] + public async Task EditPrivilege(FrameworkRoleMDVM2 vm) + { + if (!ModelState.IsValid) + { + return BadRequest(ModelState.GetErrorJson()); + } + else + { + await vm.DoChangeAsync(); + if (!ModelState.IsValid) + { + return BadRequest(ModelState.GetErrorJson()); + } + else + { + return Ok(vm.Entity); + } + } + } + + [ActionDescription("Sys.Create")] + [HttpPost("[action]")] + public IActionResult Add(FrameworkRoleVM vm) + { + if (!ModelState.IsValid) + { + return BadRequest(ModelState.GetErrorJson()); + } + else + { + vm.DoAdd(); + if (!ModelState.IsValid) + { + return BadRequest(ModelState.GetErrorJson()); + } + else + { + return Ok(vm.Entity); + } + } + + } + + [ActionDescription("Sys.Edit")] + [HttpPut("[action]")] + public IActionResult Edit(FrameworkRoleVM vm) + { + if (!ModelState.IsValid) + { + return BadRequest(ModelState.GetErrorJson()); + } + else + { + vm.DoEdit(false); + if (!ModelState.IsValid) + { + return BadRequest(ModelState.GetErrorJson()); + } + else + { + return Ok(vm.Entity); + } + } + } + + [HttpPost("BatchDelete")] + [ActionDescription("Sys.Delete")] + public async Task BatchDelete(string[] ids) + { + var vm = Wtm.CreateVM(); + List RoleCode = new List(); + if (ids != null && ids.Count() > 0) + { + RoleCode = DC.Set().CheckIDs(new List(ids)).Select(x => x.RoleCode).ToList(); + vm.Ids = ids; + } + else + { + return Ok(); + } + if (!ModelState.IsValid || !vm.DoBatchDelete()) + { + return BadRequest(ModelState.GetErrorJson()); + } + else + { + var ur = DC.Set().Where(x => RoleCode.Contains(x.RoleCode)).ToList(); + var itcodes = ur.Select(x => x.UserCode).ToArray(); + DC.Set().RemoveRange(ur); + DC.SaveChanges(); + await Wtm.RemoveUserCache(itcodes); + return Ok(ids.Count()); + } + } + + [ActionDescription("Sys.Export")] + [HttpPost("[action]")] + public IActionResult ExportExcel(FrameworkRoleSearcher searcher) + { + var vm = Wtm.CreateVM(); + vm.Searcher = searcher; + vm.SearcherMode = ListVMSearchModeEnum.Export; + return vm.GetExportData(); + } + + [ActionDescription("Sys.ExportByIds")] + [HttpPost("[action]")] + public IActionResult ExportExcelByIds(string[] ids) + { + var vm = Wtm.CreateVM(); + if (ids != null && ids.Count() > 0) + { + vm.Ids = new List(ids); + vm.SearcherMode = ListVMSearchModeEnum.CheckExport; + } + return vm.GetExportData(); + } + + [ActionDescription("Sys.DownloadTemplate")] + [HttpGet("[action]")] + public IActionResult GetExcelTemplate() + { + var vm = Wtm.CreateVM(); + var qs = new Dictionary(); + foreach (var item in Request.Query.Keys) + { + qs.Add(item, Request.Query[item]); + } + vm.SetParms(qs); + var data = vm.GenerateTemplate(out string fileName); + return File(data, "application/vnd.ms-excel", fileName); + } + + [ActionDescription("Sys.Import")] + [HttpPost("[action]")] + public ActionResult Import(FrameworkRoleImportVM vm) + { + + if (vm.ErrorListVM.EntityList.Count > 0 || !vm.BatchSaveData()) + { + return BadRequest(vm.GetErrorJson()); + } + else + { + return Ok(vm.EntityList.Count); + } + } + + + } +} diff --git a/IoTGateway/Areas/_Admin/ApiControllers/FrameworkUserController.cs b/IoTGateway/Areas/_Admin/ApiControllers/FrameworkUserController.cs new file mode 100644 index 0000000..2aa2b05 --- /dev/null +++ b/IoTGateway/Areas/_Admin/ApiControllers/FrameworkUserController.cs @@ -0,0 +1,200 @@ +// WTM默认页面 Wtm buidin page +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; +using WalkingTec.Mvvm.Mvc; +using WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkUserVms; + +namespace WalkingTec.Mvvm.Admin.Api +{ + [AuthorizeJwtWithCookie] + [ActionDescription("_Admin.UserApi")] + [ApiController] + [Route("api/_FrameworkUser")] + public class FrameworkUserController : BaseApiController + { + [ActionDescription("Sys.Search")] + [HttpPost("[action]")] + public string Search(FrameworkUserSearcher searcher) + { + var vm = Wtm.CreateVM(); + vm.Searcher = searcher; + return vm.GetJson(); + } + + [ActionDescription("Sys.Get")] + [HttpGet("{id}")] + public FrameworkUserVM Get(Guid id) + { + var vm = Wtm.CreateVM(id, passInit:true); + return vm; + } + + [ActionDescription("Sys.Create")] + [HttpPost("[action]")] + public async Task Add(FrameworkUserVM vm) + { + if (!ModelState.IsValid) + { + return BadRequest(ModelState.GetErrorJson()); + } + else + { + await vm.DoAddAsync(); + if (!ModelState.IsValid) + { + return BadRequest(ModelState.GetErrorJson()); + } + else + { + return Ok(vm.Entity); + } + } + + } + + [ActionDescription("Sys.Edit")] + [HttpPut("[action]")] + public async Task Edit(FrameworkUserVM vm) + { + ModelState.Remove("Entity.Password"); + if (!ModelState.IsValid) + { + return BadRequest(ModelState.GetErrorJson()); + } + else + { + await vm.DoEditAsync(false); + if (!ModelState.IsValid) + { + return BadRequest(ModelState.GetErrorJson()); + } + else + { + return Ok(vm.Entity); + } + } + } + + [HttpPost("BatchDelete")] + [ActionDescription("Sys.Delete")] + public async Task BatchDelete(string[] ids) + { + var vm = Wtm.CreateVM(); + List itcode = new List(); + if (ids != null && ids.Count() > 0) + { + vm.Ids = ids; + itcode = DC.Set().CheckIDs(new List(ids)).Select(x => x.ITCode).ToList(); + } + else + { + return Ok(); + } + if (!ModelState.IsValid || !vm.DoBatchDelete()) + { + return BadRequest(ModelState.GetErrorJson()); + } + else + { + using (var tran = DC.BeginTransaction()) + { + try + { + var ur = DC.Set().Where(x => itcode.Contains(x.UserCode)); + DC.Set().RemoveRange(ur); + var ug = DC.Set().Where(x => itcode.Contains(x.UserCode)); + DC.Set().RemoveRange(ug); + DC.SaveChanges(); + tran.Commit(); + } + catch + { + tran.Rollback(); + } + } + + await Wtm.RemoveUserCache(itcode.ToArray()); + return Ok(ids.Count()); + } + } + + [ActionDescription("Sys.Export")] + [HttpPost("[action]")] + public IActionResult ExportExcel(FrameworkUserSearcher searcher) + { + var vm = Wtm.CreateVM(); + vm.Searcher = searcher; + vm.SearcherMode = ListVMSearchModeEnum.Export; + return vm.GetExportData(); + } + + [ActionDescription("Sys.ExportByIds")] + [HttpPost("[action]")] + public IActionResult ExportExcelByIds(string[] ids) + { + var vm = Wtm.CreateVM(); + if (ids != null && ids.Count() > 0) + { + vm.Ids = new List(ids); + vm.SearcherMode = ListVMSearchModeEnum.CheckExport; + } + return vm.GetExportData(); + } + + [ActionDescription("Sys.DownloadTemplate")] + [HttpGet("[action]")] + public IActionResult GetExcelTemplate() + { + var vm = Wtm.CreateVM(); + var qs = new Dictionary(); + if (Request != null) + { + foreach (var item in Request.Query.Keys) + { + qs.Add(item, Request.Query[item]); + } + } + vm.SetParms(qs); + var data = vm.GenerateTemplate(out string fileName); + return File(data, "application/vnd.ms-excel", fileName); + } + + [ActionDescription("Sys.Import")] + [HttpPost("[action]")] + public ActionResult Import(FrameworkUserImportVM vm) + { + + if (vm.ErrorListVM.EntityList.Count > 0 || !vm.BatchSaveData()) + { + return BadRequest(vm.GetErrorJson()); + } + else + { + return Ok(vm.EntityList.Count); + } + } + + [HttpGet("GetFrameworkRoles")] + [ActionDescription("GetRoles")] + [AllRights] + public ActionResult GetFrameworkRoles() + { + return Ok(DC.Set().GetSelectListItems(Wtm, x => x.RoleName)); + } + + [HttpGet("GetFrameworkGroups")] + [ActionDescription("GetGroups")] + [AllRights] + public ActionResult GetFrameworkGroups() + { + return Ok(DC.Set().GetSelectListItems(Wtm, x => x.GroupName)); + } + + } +} diff --git a/IoTGateway/Areas/_Admin/Controllers/ActionLogController.cs b/IoTGateway/Areas/_Admin/Controllers/ActionLogController.cs new file mode 100644 index 0000000..a414cf5 --- /dev/null +++ b/IoTGateway/Areas/_Admin/Controllers/ActionLogController.cs @@ -0,0 +1,80 @@ +// WTM默认页面 Wtm buidin page +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; +using WalkingTec.Mvvm.Mvc.Admin.ViewModels.ActionLogVMs; + +namespace WalkingTec.Mvvm.Mvc.Admin.Controllers +{ + [Area("_Admin")] + [ActionDescription("MenuKey.ActionLog")] + [FixConnection(CsName = "defaultlog")] + public class ActionLogController : BaseController + { + [ActionDescription("Sys.Search")] + public IActionResult Index() + { + var vm = Wtm.CreateVM(); + return PartialView(vm); + } + + [ActionDescription("Sys.Search")] + [HttpPost] + public string Search(ActionLogSearcher searcher) + { + var vm = Wtm.CreateVM(passInit:true); + if (ModelState.IsValid) + { + vm.Searcher = searcher; + return vm.GetJson(false); + } + else + { + return vm.GetError(); + } + } + + + [HttpGet] + [ActionDescription("Sys.Details")] + public IActionResult Details(string id) + { + var vm = Wtm.CreateVM(id); + return PartialView(vm); + } + + [ActionDescription("Sys.Export")] + [HttpPost] + public IActionResult ExportExcel(ActionLogListVM vm) + { + return vm.GetExportData(); + } + + [HttpPost] + [ActionDescription("Sys.BatchDelete")] + public ActionResult BatchDelete(string[] IDs) + { + var vm = Wtm.CreateVM(Ids: IDs); + return PartialView(vm); + } + + [HttpPost] + [ActionDescription("Sys.BatchDelete")] + public ActionResult DoBatchDelete(ActionLogBatchVM vm, IFormCollection nouse) + { + if (!ModelState.IsValid || !vm.DoBatchDelete()) + { + return PartialView("BatchDelete", vm); + } + else + { + return FFResult().CloseDialog().RefreshGrid().Alert(Localizer["Sys.BatchDeleteSuccess", vm.Ids.Length]); + } + } + + } +} diff --git a/IoTGateway/Areas/_Admin/Controllers/DataPrivilegeController.cs b/IoTGateway/Areas/_Admin/Controllers/DataPrivilegeController.cs new file mode 100644 index 0000000..c7c077c --- /dev/null +++ b/IoTGateway/Areas/_Admin/Controllers/DataPrivilegeController.cs @@ -0,0 +1,136 @@ +// WTM默认页面 Wtm buidin page +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.AspNetCore.Mvc; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Mvc.Admin.ViewModels.DataPrivilegeVMs; +using WalkingTec.Mvvm.Core.Extensions; +using System.Threading.Tasks; + +namespace WalkingTec.Mvvm.Mvc.Admin.Controllers +{ + [Area("_Admin")] + [ActionDescription("MenuKey.DataPrivilege")] + public class DataPrivilegeController : BaseController + { + [ActionDescription("Sys.Search")] + public ActionResult Index() + { + var vm = Wtm.CreateVM(); + vm.Searcher.TableNames = Wtm.DataPrivilegeSettings.ToListItems(x => x.PrivillegeName, x => x.ModelName); + return PartialView(vm); + } + + [HttpPost] + public ActionResult Index(DataPrivilegeListVM vm) + { + vm.Searcher.TableNames = Wtm.DataPrivilegeSettings.ToListItems(x => x.PrivillegeName, x => x.ModelName); + return PartialView(vm); + } + + + [ActionDescription("Sys.Search")] + [HttpPost] + public string Search(DataPrivilegeSearcher searcher) + { + var vm = Wtm.CreateVM(passInit: true); + if (ModelState.IsValid) + { + vm.Searcher = searcher; + return vm.GetJson(false); + } + else + { + return vm.GetError(); + } + } + + [ActionDescription("Sys.Create")] + public ActionResult Create(DpTypeEnum Type) + { + var vm = Wtm.CreateVM(values:x=>x.DpType == Type); + return PartialView(vm); + } + + [HttpPost] + [ActionDescription("Sys.Create")] + public async Task Create(DataPrivilegeVM vm) + { + if (!ModelState.IsValid) + { + return PartialView(vm); + } + else + { + await vm.DoAddAsync(); + return FFResult().CloseDialog().RefreshGrid(); + } + } + + [ActionDescription("Sys.Edit")] + public ActionResult Edit(string ModelName, string Id, DpTypeEnum Type) + { + DataPrivilegeVM vm = null; + if (Type == DpTypeEnum.User) + { + vm = Wtm.CreateVM(values: x => x.Entity.TableName == ModelName && x.Entity.UserCode == Id && x.DpType == Type); + } + else + { + vm = Wtm.CreateVM(values: x => x.Entity.TableName == ModelName && x.Entity.GroupCode == Id && x.DpType == Type); + } + return PartialView(vm); + } + + [ActionDescription("Sys.Edit")] + [HttpPost] + public async Task Edit(DataPrivilegeVM vm) + { + if (!ModelState.IsValid) + { + return PartialView(vm); + } + else + { + await vm.DoEditAsync(); + return FFResult().CloseDialog().RefreshGrid(); + } + } + + [ActionDescription("Sys.Delete")] + public async Task Delete(string ModelName, string Id, DpTypeEnum Type) + { + DataPrivilegeVM vm = null; + if (Type == DpTypeEnum.User) + { + vm = Wtm.CreateVM(values: x => x.Entity.TableName == ModelName && x.Entity.UserCode == Id && x.DpType == Type); + } + else + { + vm = Wtm.CreateVM(values: x => x.Entity.TableName == ModelName && x.Entity.GroupCode == Id && x.DpType == Type); + } + await vm.DoDeleteAsync(); + return FFResult().RefreshGrid(); + } + + [AllRights] + public ActionResult GetPrivilegeByTableName(string table) + { + var AllItems = new List(); + var dps = Wtm.DataPrivilegeSettings.Where(x => x.ModelName == table).SingleOrDefault(); + if (dps != null) + { + AllItems = dps.GetItemList(Wtm); + } + return JsonMore(AllItems); + } + + [ActionDescription("Sys.Export")] + [HttpPost] + public IActionResult ExportExcel(DataPrivilegeListVM vm) + { + return vm.GetExportData(); + } + } +} diff --git a/IoTGateway/Areas/_Admin/Controllers/FrameworkGroupController.cs b/IoTGateway/Areas/_Admin/Controllers/FrameworkGroupController.cs new file mode 100644 index 0000000..6155759 --- /dev/null +++ b/IoTGateway/Areas/_Admin/Controllers/FrameworkGroupController.cs @@ -0,0 +1,185 @@ +// WTM默认页面 Wtm buidin page +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Linq.Expressions; +using System.Threading.Tasks; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; +using WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkGroupVMs; + +namespace WalkingTec.Mvvm.Mvc.Admin.Controllers +{ + [Area("_Admin")] + [ActionDescription("MenuKey.GroupManagement")] + public class FrameworkGroupController : BaseController + { + #region 查询 + [ActionDescription("Sys.Search")] + public ActionResult Index() + { + var vm = Wtm.CreateVM(); + return PartialView(vm); + } + + [ActionDescription("Sys.Search")] + [HttpPost] + public string Search(FrameworkGroupSearcher searcher) + { + var vm = Wtm.CreateVM(passInit: true); + if (ModelState.IsValid) + { + vm.Searcher = searcher; + return vm.GetJson(false); + } + else + { + return vm.GetError(); + } + } + #endregion + + [ActionDescription("Sys.Create")] + public ActionResult Create() + { + var vm = Wtm.CreateVM(); + return PartialView(vm); + } + + [HttpPost] + [ActionDescription("Sys.Create")] + public ActionResult Create(FrameworkGroupVM vm) + { + if (!ModelState.IsValid) + { + return PartialView(vm); + } + else + { + vm.DoAdd(); + return FFResult().CloseDialog().RefreshGrid(); + } + } + + [ActionDescription("Sys.Edit")] + public ActionResult Edit(Guid id) + { + var vm = Wtm.CreateVM(id); + return PartialView(vm); + } + + [HttpPost] + [ActionDescription("Sys.Edit")] + [ValidateFormItemOnly] + public ActionResult Edit(FrameworkGroupVM vm) + { + if (!ModelState.IsValid) + { + return PartialView(vm); + } + else + { + vm.DoEdit(); + return FFResult().CloseDialog().RefreshGrid(); + } + } + + [ActionDescription("Sys.Delete")] + public ActionResult Delete(Guid id) + { + var vm = Wtm.CreateVM(id); + return PartialView(vm); + } + + [HttpPost] + [ActionDescription("Sys.Delete")] + public async Task Delete(Guid id, IFormCollection noUse) + { + var vm = Wtm.CreateVM(id); + await vm.DoDeleteAsync(); + if (!ModelState.IsValid) + { + return PartialView(vm); + } + else + { + return FFResult().CloseDialog().RefreshGrid(); + } + } + + [HttpPost] + [ActionDescription("Sys.BatchDelete")] + public ActionResult BatchDelete(Guid[] ids) + { + var vm = Wtm.CreateVM(Ids: ids); + return PartialView(vm); + } + + [HttpPost] + [ActionDescription("Sys.BatchDelete")] + public async Task DoBatchDelete(FrameworkGroupBatchVM vm, IFormCollection noUse) + { + List GroupCode = DC.Set().CheckIDs(new List(vm.Ids)).Select(x => x.GroupCode).ToList(); + if (!ModelState.IsValid || !vm.DoBatchDelete()) + { + return PartialView("BatchDelete", vm); + } + else + { + var gr = DC.Set().Where(x => GroupCode.Contains(x.GroupCode)).ToList(); + var itcodes = gr.Select(x => x.UserCode).ToArray(); + DC.Set().RemoveRange(gr); + DC.SaveChanges(); + await Wtm.RemoveUserCache(itcodes); + return FFResult().CloseDialog().RefreshGrid().Alert(Localizer["Sys.OprationSuccess"]); + } + } + + [ActionDescription("Sys.Import")] + public ActionResult Import() + { + var vm = Wtm.CreateVM(); + return PartialView(vm); + } + + [HttpPost] + [ActionDescription("Sys.Import")] + public ActionResult Import(FrameworkGroupImportVM vm, IFormCollection nouse) + { + if (vm.ErrorListVM.EntityList.Count > 0 || !vm.BatchSaveData()) + { + return PartialView(vm); + } + else + { + return FFResult().CloseDialog().RefreshGrid().Alert(Localizer["Sys.ImportSuccess", vm.EntityList.Count.ToString()]); + } + } + + [ActionDescription("_Admin.DataPrivilege")] + public PartialViewResult DataFunction(string groupcode) + { + var role = Wtm.CreateVM(values: x=>x.GroupCode == groupcode); + return PartialView(role); + } + + [ActionDescription("_Admin.DataPrivilege")] + [HttpPost] + public ActionResult DataFunction(FrameworkGroupMDVM vm, IFormCollection noUse) + { + vm.DoChange(); + return FFResult().CloseDialog().Alert(Localizer["Sys.OprationSuccess"]); + } + + [ActionDescription("Sys.Export")] + [HttpPost] + public IActionResult ExportExcel(FrameworkGroupListVM vm) + { + return vm.GetExportData(); + } + + } + +} diff --git a/IoTGateway/Areas/_Admin/Controllers/FrameworkMenuController.cs b/IoTGateway/Areas/_Admin/Controllers/FrameworkMenuController.cs new file mode 100644 index 0000000..5987081 --- /dev/null +++ b/IoTGateway/Areas/_Admin/Controllers/FrameworkMenuController.cs @@ -0,0 +1,215 @@ +// WTM默认页面 Wtm buidin page +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; +using Microsoft.Extensions.Caching.Memory; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; +using WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkMenuVMs; + +namespace WalkingTec.Mvvm.Mvc.Admin.Controllers +{ + [Area("_Admin")] + [ActionDescription("MenuKey.MenuMangement")] + public class FrameworkMenuController : BaseController + { + [ActionDescription("Sys.Search")] + public ActionResult Index() + { + var vm = Wtm.CreateVM(); + return PartialView(vm); + } + + [ActionDescription("Sys.Search")] + [HttpPost] + public string Search(FrameworkMenuSearcher searcher) + { + var vm = Wtm.CreateVM(passInit: true); + if (ModelState.IsValid) + { + vm.Searcher = searcher; + return vm.GetJson(false); + } + else + { + return vm.GetError(); + } + } + + [ActionDescription("Sys.Create")] + public ActionResult Create(Guid? id) + { + var vm = Wtm.CreateVM(); + if (id != null) + { + vm.Entity.ParentId = id; + } + vm.Entity.IsInside = true; + vm.Entity.IsPublic = false; + vm.Entity.FolderOnly = false; + vm.Entity.ShowOnMenu = true; + return PartialView(vm); + } + + [HttpPost] + [Public] + [ActionDescription("Sys.Create")] + public ActionResult Create(FrameworkMenuVM vm) + { + if (!ModelState.IsValid) + { + return PartialView(vm); + } + else + { + vm.DoAdd(); + if (!ModelState.IsValid) + { + vm.DoReInit(); + return PartialView(vm); + } + else + { + return FFResult().CloseDialog().RefreshGrid(); + } + } + } + + [ActionDescription("Sys.Edit")] + public ActionResult Edit(Guid id) + { + var vm = Wtm.CreateVM(id); + vm.IconSelectItems = !string.IsNullOrEmpty(vm.IconFont) && IconFontsHelper + .IconFontDicItems + .ContainsKey(vm.IconFont) + ? IconFontsHelper + .IconFontDicItems[vm.IconFont] + .Select(x => new ComboSelectListItem() + { + Text = x.Text, + Value = x.Value, + Icon = x.Icon + }).ToList() + : new List(); + + return PartialView(vm); + } + + [ActionDescription("Sys.Edit")] + [HttpPost] + public ActionResult Edit(FrameworkMenuVM vm) + { + if (!ModelState.IsValid) + { + vm.IconSelectItems = !string.IsNullOrEmpty(vm.IconFont) && IconFontsHelper + .IconFontDicItems + .ContainsKey(vm.IconFont) + ? IconFontsHelper + .IconFontDicItems[vm.IconFont] + .Select(x => new ComboSelectListItem() + { + Text = x.Text, + Value = x.Value, + Icon = x.Icon + }).ToList() + : new List(); + return PartialView(vm); + } + else + { + vm.DoEdit(); + if (!ModelState.IsValid) + { + vm.DoReInit(); + return PartialView(vm); + } + else + { + return FFResult().CloseDialog().RefreshGrid(); + } + } + } + + [ActionDescription("Sys.Delete")] + public ActionResult Delete(Guid id) + { + var vm = Wtm.CreateVM(id); + return PartialView(vm); + } + + [ActionDescription("Sys.Delete")] + [HttpPost] + public ActionResult Delete(Guid id, IFormCollection noUser) + { + var vm = Wtm.CreateVM(id); + vm.DoDelete(); + if (!ModelState.IsValid) + { + return PartialView(vm); + } + else + { + return FFResult().CloseDialog().RefreshGrid(); + } + } + + [ActionDescription("Sys.Details")] + public PartialViewResult Details(Guid id) + { + var v = Wtm.CreateVM(id); + return PartialView("Details", v); + } + + [ActionDescription("_Admin.UnsetPages")] + public ActionResult UnsetPages() + { + var vm = Wtm.CreateVM(); + return PartialView(vm); + } + + [ActionDescription("_Admin.RefreshMenu")] + public async Task RefreshMenu() + { + Cache.Delete("FFMenus"); + var userids = DC.Set().Select(x => x.ID.ToString().ToLower()).ToArray(); + await Wtm.RemoveUserCache(userids); + return FFResult().Alert(Localizer["Sys.OprationSuccess"]); + } + + [ActionDescription("GetActionsByModelId")] + [AllRights] + public JsonResult GetActionsByModelId(string Id) + { + var modules = Wtm.GlobaInfo.AllModule; + var m =Utils.ResetModule(modules); + + List AllActions = new List(); + var action = m.Where(x => x.FullName == Id)?.FirstOrDefault().Actions; + if (action != null) + { + var mList = action?.Where(x => x.MethodName != "Index" && x.IgnorePrivillege == false)?.ToList(); + AllActions = mList.ToListItems(y => y.ActionName, y => y.Url); + AllActions.ForEach(x => x.Selected = true); + } + + return JsonMore(AllActions); + } + + [HttpGet] + [ResponseCache(Duration = 3600)] + [AllRights] + public IActionResult GetIconFontItems(string id) + { + if (!string.IsNullOrEmpty(id) && IconFontsHelper.IconFontDicItems.ContainsKey(id)) + return JsonMore(IconFontsHelper.IconFontDicItems[id]); + else + return JsonMore(null); + } + + } + +} diff --git a/IoTGateway/Areas/_Admin/Controllers/FrameworkRoleController.cs b/IoTGateway/Areas/_Admin/Controllers/FrameworkRoleController.cs new file mode 100644 index 0000000..8d4004e --- /dev/null +++ b/IoTGateway/Areas/_Admin/Controllers/FrameworkRoleController.cs @@ -0,0 +1,188 @@ +// WTM默认页面 Wtm buidin page +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; +using WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkRoleVMs; + +namespace WalkingTec.Mvvm.Mvc.Admin.Controllers +{ + [Area("_Admin")] + [ActionDescription("MenuKey.RoleManagement")] + public class FrameworkRoleController : BaseController + { + [ActionDescription("Sys.Search")] + public ActionResult Index() + { + var vm = Wtm.CreateVM(); + return PartialView(vm); + } + [ActionDescription("Sys.Search")] + [HttpPost] + public string Search(FrameworkRoleSearcher searcher) + { + var vm = Wtm.CreateVM(passInit: true); + if (ModelState.IsValid) + { + vm.Searcher = searcher; + return vm.GetJson(false); + } + else + { + return vm.GetError(); + } + } + + [ActionDescription("Sys.Create")] + public ActionResult Create() + { + var vm = Wtm.CreateVM(); + return PartialView(vm); + } + + [HttpPost] + [ActionDescription("Sys.Create")] + public ActionResult Create(FrameworkRoleVM vm) + { + if (!ModelState.IsValid) + { + return PartialView(vm); + } + else + { + vm.DoAdd(); + return FFResult().CloseDialog().RefreshGrid(); + } + } + + [ActionDescription("Sys.Edit")] + public ActionResult Edit(Guid id) + { + var vm = Wtm.CreateVM(id); + return PartialView(vm); + } + + [HttpPost] + [ActionDescription("Sys.Edit")] + [ValidateFormItemOnly] + public ActionResult Edit(FrameworkRoleVM vm) + { + if (!ModelState.IsValid) + { + return PartialView(vm); + } + else + { + vm.DoEdit(); + return FFResult().CloseDialog().RefreshGrid(); + } + } + + [ActionDescription("Sys.Delete")] + public ActionResult Delete(Guid id) + { + var vm = Wtm.CreateVM(id); + return PartialView(vm); + } + + [HttpPost] + [ActionDescription("Sys.Delete")] + public async Task Delete(Guid id, IFormCollection noUse) + { + var vm = Wtm.CreateVM(id); + await vm.DoDeleteAsync(); + if (!ModelState.IsValid) + { + return PartialView(vm); + } + else + { + return FFResult().CloseDialog().RefreshGrid(); + } + } + + [HttpPost] + [ActionDescription("Sys.BatchDelete")] + public ActionResult BatchDelete(Guid[] ids) + { + var vm = Wtm.CreateVM(Ids: ids); + return PartialView(vm); + } + + [HttpPost] + [ActionDescription("Sys.BatchDelete")] + public async Task DoBatchDelete(FrameworkRoleBatchVM vm, IFormCollection noUse) + { + List RoleCode = DC.Set().CheckIDs(new List(vm.Ids)).Select(x => x.RoleCode).ToList(); + if (!ModelState.IsValid || !vm.DoBatchDelete()) + { + return PartialView("BatchDelete", vm); + } + else + { + var ur = DC.Set().Where(x => RoleCode.Contains(x.RoleCode)).ToList(); + var itcodes = ur.Select(x => x.UserCode).ToArray(); + DC.Set().RemoveRange(ur); + DC.SaveChanges(); + await Wtm.RemoveUserCache(itcodes); + return FFResult().CloseDialog().RefreshGrid(); + } + } + + [ActionDescription("Sys.Import")] + public ActionResult Import() + { + var vm = Wtm.CreateVM(); + return PartialView(vm); + } + + [HttpPost] + [ActionDescription("Sys.Import")] + public ActionResult Import(FrameworkRoleImportVM vm, IFormCollection nouse) + { + if (vm.ErrorListVM.EntityList.Count > 0 || !vm.BatchSaveData()) + { + return PartialView(vm); + } + else + { + return FFResult().CloseDialog().RefreshGrid().Alert(Localizer["Sys.ImportSuccess", vm.EntityList.Count.ToString()]); + } + } + + [ActionDescription("Sys.Details")] + public PartialViewResult Details(Guid id) + { + var role = Wtm.CreateVM(id); + role.ListVM.SearcherMode = ListVMSearchModeEnum.Custom1; + return PartialView(role); + } + + [ActionDescription("_Admin.PageFunction")] + public PartialViewResult PageFunction(Guid id) + { + var role = Wtm.CreateVM(id); + role.ListVM.SearcherMode = ListVMSearchModeEnum.Custom2; + return PartialView(role); + } + + [ActionDescription("_Admin.PageFunction")] + [HttpPost] + public async Task PageFunction(FrameworkRoleMDVM vm, IFormCollection noUse) + { + await vm.DoChangeAsync(); + return FFResult().CloseDialog().Alert(Localizer["Sys.OprationSuccess"]); + } + + [ActionDescription("Sys.Export")] + [HttpPost] + public IActionResult ExportExcel(FrameworkRoleListVM vm) + { + return vm.GetExportData(); + } + } +} diff --git a/IoTGateway/Areas/_Admin/Controllers/FrameworkUserController.cs b/IoTGateway/Areas/_Admin/Controllers/FrameworkUserController.cs new file mode 100644 index 0000000..ea36acd --- /dev/null +++ b/IoTGateway/Areas/_Admin/Controllers/FrameworkUserController.cs @@ -0,0 +1,285 @@ +// WTM默认页面 Wtm buidin page +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using System; +using System.Linq; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkUserVms; +using WalkingTec.Mvvm.Core.Extensions; +using System.Threading.Tasks; +using System.Collections.Generic; + +namespace WalkingTec.Mvvm.Mvc.Admin.Controllers +{ + [Area("_Admin")] + [ActionDescription("MenuKey.UserManagement")] + public class FrameworkUserController : BaseController + { + [ActionDescription("Sys.Search", IsPage = true)] + public ActionResult Index() + { + var vm = Wtm.CreateVM(); + vm.Searcher.IsValid = true; + return PartialView(vm); + } + + [ActionDescription("Sys.Search")] + [HttpPost] + public string Search(FrameworkUserSearcher searcher) + { + var vm = Wtm.CreateVM(passInit: true); + if (ModelState.IsValid) + { + vm.Searcher = searcher; + return vm.GetJson(false); + } + else + { + return vm.GetError(); + } + } + + + [ActionDescription("Sys.Create")] + public ActionResult Create() + { + var vm = Wtm.CreateVM(); + return PartialView(vm); + } + + [HttpPost] + [ActionDescription("Sys.Create")] + public async Task Create(FrameworkUserVM vm) + { + if (!ModelState.IsValid) + { + return PartialView(vm); + } + else + { + await vm.DoAddAsync(); + if (!ModelState.IsValid) + { + vm.DoReInit(); + return PartialView(vm); + } + else + { + return FFResult().CloseDialog().RefreshGrid(); + } + } + } + + [ActionDescription("Sys.Edit")] + public ActionResult Edit(string id) + { + var vm = Wtm.CreateVM(id); + vm.Entity.Password = null; + return PartialView(vm); + } + + [ActionDescription("Sys.Edit")] + [HttpPost] + [ValidateFormItemOnly] + public async Task Edit(FrameworkUserVM vm) + { + if (ModelState.Any(x => x.Key != "Entity.Password" && x.Value.ValidationState == Microsoft.AspNetCore.Mvc.ModelBinding.ModelValidationState.Invalid)) + { + return PartialView(vm); + } + else + { + ModelState.Clear(); + await vm.DoEditAsync(); + if (!ModelState.IsValid) + { + vm.DoReInit(); + return PartialView(vm); + } + else + { + return FFResult().CloseDialog().RefreshGridRow(vm.Entity.ID); + } + } + } + + [ActionDescription("Login.ChangePassword")] + public ActionResult Password(Guid id) + { + var vm = Wtm.CreateVM(id, passInit: true); + vm.Entity.Password = null; + return PartialView(vm); + } + + [ActionDescription("Login.ChangePassword")] + [HttpPost] + public ActionResult Password(FrameworkUserVM vm) + { + var keys = ModelState.Keys.ToList(); + foreach (var item in keys) + { + if (item != "Entity.Password") + { + ModelState.Remove(item); + } + } + if (ModelState.IsValid == false) + { + return PartialView(vm); + } + else + { + vm.ChangePassword(); + if (!ModelState.IsValid) + { + vm.DoReInit(); + return PartialView(vm); + } + else + { + return FFResult().CloseDialog().RefreshGridRow(vm.Entity.ID); + } + } + } + + [ActionDescription("Sys.Delete")] + public ActionResult Delete(Guid id) + { + var vm = Wtm.CreateVM(id); + return PartialView(vm); + } + + [ActionDescription("Sys.Delete")] + [HttpPost] + public async Task Delete(Guid id, IFormCollection nouse) + { + var vm = Wtm.CreateVM(id); + await vm.DoDeleteAsync(); + if (!ModelState.IsValid) + { + return PartialView(vm); + } + else + { + return FFResult().CloseDialog().RefreshGrid(); + } + } + + [ActionDescription("Sys.Details")] + public PartialViewResult Details(Guid id) + { + var v = Wtm.CreateVM(id); + return PartialView("Details", v); + } + + [HttpPost] + [ActionDescription("Sys.BatchEdit")] + public ActionResult BatchEdit(string[] IDs) + { + var vm = Wtm.CreateVM(Ids: IDs); + return PartialView(vm); + } + + [HttpPost] + [ActionDescription("Sys.BatchEdit")] + public ActionResult DoBatchEdit(FrameworkUserBatchVM vm, IFormCollection nouse) + { + if (!ModelState.IsValid || !vm.DoBatchEdit()) + { + return PartialView("BatchEdit", vm); + } + else + { + return FFResult().CloseDialog().RefreshGrid().Alert(Localizer["Sys.BatchEditSuccess", vm.Ids.Length]); + } + } + + [HttpPost] + [ActionDescription("Sys.BatchDelete")] + public ActionResult BatchDelete(string[] IDs) + { + var vm = Wtm.CreateVM(Ids: IDs); + return PartialView(vm); + } + + [HttpPost] + [ActionDescription("Sys.BatchDelete")] + public async Task DoBatchDelete(FrameworkUserBatchVM vm, IFormCollection nouse) + { + List itcode = new List(); + itcode = DC.Set().CheckIDs(new List(vm.Ids)).Select(x => x.ITCode).ToList(); + if (!ModelState.IsValid || !vm.DoBatchDelete()) + { + return PartialView("BatchDelete", vm); + } + else + { + using (var tran = DC.BeginTransaction()) + { + try + { + var ur = DC.Set().Where(x => itcode.Contains(x.UserCode)); + DC.Set().RemoveRange(ur); + var ug = DC.Set().Where(x => itcode.Contains(x.UserCode)); + DC.Set().RemoveRange(ug); + DC.SaveChanges(); + tran.Commit(); + } + catch + { + tran.Rollback(); + } + } + + await Wtm.RemoveUserCache(itcode.ToArray()); + return FFResult().CloseDialog().RefreshGrid().Alert(Localizer["Sys.OprationSuccess"]); + } + } + + [ActionDescription("Sys.Import")] + public ActionResult Import() + { + var vm = Wtm.CreateVM(); + return PartialView(vm); + } + + [HttpPost] + [ActionDescription("Sys.Import")] + public ActionResult Import(FrameworkUserImportVM vm, IFormCollection nouse) + { + if (vm.ErrorListVM.EntityList.Count > 0 || !vm.BatchSaveData()) + { + return PartialView(vm); + } + else + { + return FFResult().CloseDialog().RefreshGrid().Alert(Localizer["Sys.ImportSuccess", vm.EntityList.Count.ToString()]); + } + } + + [ActionDescription("Sys.Enable")] + public ActionResult Enable(Guid id, bool enable) + { + FrameworkUser user = new FrameworkUser { ID = id }; + user.IsValid = enable; + DC.UpdateProperty(user, x => x.IsValid); + DC.SaveChanges(); + return FFResult().RefreshGrid(CurrentWindowId); + } + + [AllRights] + public ActionResult GetUserById(string keywords) + { + var users = DC.Set().Where(x => x.ITCode.ToLower().StartsWith(keywords.ToLower())).GetSelectListItems(Wtm, x => x.Name + "(" + x.ITCode + ")", x => x.ITCode); + return JsonMore(users); + + } + + [ActionDescription("Sys.Export")] + [HttpPost] + public IActionResult ExportExcel(FrameworkUserListVM vm) + { + return vm.GetExportData(); + } + } +} diff --git a/IoTGateway/Areas/_Admin/Views/ActionLog/BatchDelete.cshtml b/IoTGateway/Areas/_Admin/Views/ActionLog/BatchDelete.cshtml new file mode 100644 index 0000000..5c02192 --- /dev/null +++ b/IoTGateway/Areas/_Admin/Views/ActionLog/BatchDelete.cshtml @@ -0,0 +1,15 @@ +@model WalkingTec.Mvvm.Mvc.Admin.ViewModels.ActionLogVMs.ActionLogBatchVM +@using Microsoft.Extensions.Localization; +@inject IStringLocalizer Localizer; + + + @Localizer["Sys.BatchDeleteConfirm"] + + + + + + + + + diff --git a/IoTGateway/Areas/_Admin/Views/ActionLog/Details.cshtml b/IoTGateway/Areas/_Admin/Views/ActionLog/Details.cshtml new file mode 100644 index 0000000..1ab34ec --- /dev/null +++ b/IoTGateway/Areas/_Admin/Views/ActionLog/Details.cshtml @@ -0,0 +1,26 @@ +@model WalkingTec.Mvvm.Mvc.Admin.ViewModels.ActionLogVMs.ActionLogVM + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/IoTGateway/Areas/_Admin/Views/ActionLog/Index.cshtml b/IoTGateway/Areas/_Admin/Views/ActionLog/Index.cshtml new file mode 100644 index 0000000..3ba5457 --- /dev/null +++ b/IoTGateway/Areas/_Admin/Views/ActionLog/Index.cshtml @@ -0,0 +1,19 @@ +@model WalkingTec.Mvvm.Mvc.Admin.ViewModels.ActionLogVMs.ActionLogListVM +@inject IStringLocalizer Localizer; + + + + + + + + + + + + + + + + + diff --git a/IoTGateway/Areas/_Admin/Views/DataPrivilege/Create.cshtml b/IoTGateway/Areas/_Admin/Views/DataPrivilege/Create.cshtml new file mode 100644 index 0000000..996616b --- /dev/null +++ b/IoTGateway/Areas/_Admin/Views/DataPrivilege/Create.cshtml @@ -0,0 +1,58 @@ +@model WalkingTec.Mvvm.Mvc.Admin.ViewModels.DataPrivilegeVMs.DataPrivilegeVM + + + + + + + + + + + + + + + + + + + +

+ + + + +
+ + + diff --git a/IoTGateway/Areas/_Admin/Views/DataPrivilege/Edit.cshtml b/IoTGateway/Areas/_Admin/Views/DataPrivilege/Edit.cshtml new file mode 100644 index 0000000..7effec9 --- /dev/null +++ b/IoTGateway/Areas/_Admin/Views/DataPrivilege/Edit.cshtml @@ -0,0 +1,51 @@ +@model WalkingTec.Mvvm.Mvc.Admin.ViewModels.DataPrivilegeVMs.DataPrivilegeVM + + + + + + + + + + + + + + + + + + + +

+ + + + +
+ + + diff --git a/IoTGateway/Areas/_Admin/Views/DataPrivilege/Index.cshtml b/IoTGateway/Areas/_Admin/Views/DataPrivilege/Index.cshtml new file mode 100644 index 0000000..d1463e6 --- /dev/null +++ b/IoTGateway/Areas/_Admin/Views/DataPrivilege/Index.cshtml @@ -0,0 +1,11 @@ +@model WalkingTec.Mvvm.Mvc.Admin.ViewModels.DataPrivilegeVMs.DataPrivilegeListVM + + + + + + + + + + diff --git a/IoTGateway/Areas/_Admin/Views/FrameworkGroup/BatchDelete.cshtml b/IoTGateway/Areas/_Admin/Views/FrameworkGroup/BatchDelete.cshtml new file mode 100644 index 0000000..00fa949 --- /dev/null +++ b/IoTGateway/Areas/_Admin/Views/FrameworkGroup/BatchDelete.cshtml @@ -0,0 +1,15 @@ +@model WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkGroupVMs.FrameworkGroupBatchVM +@using Microsoft.Extensions.Localization; +@inject IStringLocalizer Localizer; + + + @Localizer["Sys.BatchDeleteConfirm"] + + + + + + + + + diff --git a/IoTGateway/Areas/_Admin/Views/FrameworkGroup/Create.cshtml b/IoTGateway/Areas/_Admin/Views/FrameworkGroup/Create.cshtml new file mode 100644 index 0000000..bba3fd1 --- /dev/null +++ b/IoTGateway/Areas/_Admin/Views/FrameworkGroup/Create.cshtml @@ -0,0 +1,13 @@ +@model WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkGroupVMs.FrameworkGroupVM + + + + + + + + + + + + diff --git a/IoTGateway/Areas/_Admin/Views/FrameworkGroup/DataFunction.cshtml b/IoTGateway/Areas/_Admin/Views/FrameworkGroup/DataFunction.cshtml new file mode 100644 index 0000000..6d6927f --- /dev/null +++ b/IoTGateway/Areas/_Admin/Views/FrameworkGroup/DataFunction.cshtml @@ -0,0 +1,41 @@ +@model WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkGroupVMs.FrameworkGroupMDVM +@using Microsoft.Extensions.Localization; +@inject IStringLocalizer Localizer; + + + @for (int i = 0; i < Model.DpLists.Count; i++) + { + + + + + + + + + + + + + + } + + + + + + + + + diff --git a/IoTGateway/Areas/_Admin/Views/FrameworkGroup/Delete.cshtml b/IoTGateway/Areas/_Admin/Views/FrameworkGroup/Delete.cshtml new file mode 100644 index 0000000..286c7a7 --- /dev/null +++ b/IoTGateway/Areas/_Admin/Views/FrameworkGroup/Delete.cshtml @@ -0,0 +1,17 @@ +@model WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkGroupVMs.FrameworkGroupVM +@using Microsoft.Extensions.Localization; +@inject IStringLocalizer Localizer; + + + @Localizer["Sys.DeleteConfirm"] + + + + + + + + + + + diff --git a/IoTGateway/Areas/_Admin/Views/FrameworkGroup/Edit.cshtml b/IoTGateway/Areas/_Admin/Views/FrameworkGroup/Edit.cshtml new file mode 100644 index 0000000..8b5a3dd --- /dev/null +++ b/IoTGateway/Areas/_Admin/Views/FrameworkGroup/Edit.cshtml @@ -0,0 +1,14 @@ +@model WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkGroupVMs.FrameworkGroupVM + + + + + + + + + + + + + diff --git a/IoTGateway/Areas/_Admin/Views/FrameworkGroup/Import.cshtml b/IoTGateway/Areas/_Admin/Views/FrameworkGroup/Import.cshtml new file mode 100644 index 0000000..2cc7af0 --- /dev/null +++ b/IoTGateway/Areas/_Admin/Views/FrameworkGroup/Import.cshtml @@ -0,0 +1,17 @@ +@model WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkGroupVMs.FrameworkGroupImportVM +@using Microsoft.Extensions.Localization; +@inject IStringLocalizer Localizer; + + + + + + + + + + + + + + diff --git a/IoTGateway/Areas/_Admin/Views/FrameworkGroup/Index.cshtml b/IoTGateway/Areas/_Admin/Views/FrameworkGroup/Index.cshtml new file mode 100644 index 0000000..f21a343 --- /dev/null +++ b/IoTGateway/Areas/_Admin/Views/FrameworkGroup/Index.cshtml @@ -0,0 +1,11 @@ +@model WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkGroupVMs.FrameworkGroupListVM + + + + + + + + + + diff --git a/IoTGateway/Areas/_Admin/Views/FrameworkMenu/Create.cshtml b/IoTGateway/Areas/_Admin/Views/FrameworkMenu/Create.cshtml new file mode 100644 index 0000000..4e59d87 --- /dev/null +++ b/IoTGateway/Areas/_Admin/Views/FrameworkMenu/Create.cshtml @@ -0,0 +1,71 @@ +@using WalkingTec.Mvvm.Mvc; +@model WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkMenuVMs.FrameworkMenuVM +@using Microsoft.Extensions.Localization; +@inject IStringLocalizer Localizer; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/IoTGateway/Areas/_Admin/Views/FrameworkMenu/Delete.cshtml b/IoTGateway/Areas/_Admin/Views/FrameworkMenu/Delete.cshtml new file mode 100644 index 0000000..c6838b6 --- /dev/null +++ b/IoTGateway/Areas/_Admin/Views/FrameworkMenu/Delete.cshtml @@ -0,0 +1,23 @@ +@model WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkMenuVMs.FrameworkMenuVM +@using Microsoft.Extensions.Localization; +@inject IStringLocalizer Localizer; + + @Localizer["Sys.DeleteConfirm"] + + + + + + + + + + + + + + + + + + diff --git a/IoTGateway/Areas/_Admin/Views/FrameworkMenu/Details.cshtml b/IoTGateway/Areas/_Admin/Views/FrameworkMenu/Details.cshtml new file mode 100644 index 0000000..d0095a7 --- /dev/null +++ b/IoTGateway/Areas/_Admin/Views/FrameworkMenu/Details.cshtml @@ -0,0 +1,19 @@ +@model WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkMenuVMs.FrameworkMenuVM + + + + + + + + + + + + + + + + + + diff --git a/IoTGateway/Areas/_Admin/Views/FrameworkMenu/Edit.cshtml b/IoTGateway/Areas/_Admin/Views/FrameworkMenu/Edit.cshtml new file mode 100644 index 0000000..484d590 --- /dev/null +++ b/IoTGateway/Areas/_Admin/Views/FrameworkMenu/Edit.cshtml @@ -0,0 +1,67 @@ +@using WalkingTec.Mvvm.Mvc; +@model WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkMenuVMs.FrameworkMenuVM +@using Microsoft.Extensions.Localization; +@inject IStringLocalizer Localizer; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/IoTGateway/Areas/_Admin/Views/FrameworkMenu/Index.cshtml b/IoTGateway/Areas/_Admin/Views/FrameworkMenu/Index.cshtml new file mode 100644 index 0000000..3ebad95 --- /dev/null +++ b/IoTGateway/Areas/_Admin/Views/FrameworkMenu/Index.cshtml @@ -0,0 +1,6 @@ +@model WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkMenuVMs.FrameworkMenuListVM + +
+ + + diff --git a/IoTGateway/Areas/_Admin/Views/FrameworkMenu/UnsetPages.cshtml b/IoTGateway/Areas/_Admin/Views/FrameworkMenu/UnsetPages.cshtml new file mode 100644 index 0000000..c307442 --- /dev/null +++ b/IoTGateway/Areas/_Admin/Views/FrameworkMenu/UnsetPages.cshtml @@ -0,0 +1,5 @@ +@model WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkMenuVMs.FrameworkActionListVM + + + + diff --git a/IoTGateway/Areas/_Admin/Views/FrameworkRole/BatchDelete.cshtml b/IoTGateway/Areas/_Admin/Views/FrameworkRole/BatchDelete.cshtml new file mode 100644 index 0000000..b8dc266 --- /dev/null +++ b/IoTGateway/Areas/_Admin/Views/FrameworkRole/BatchDelete.cshtml @@ -0,0 +1,15 @@ +@model WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkRoleVMs.FrameworkRoleBatchVM +@using Microsoft.Extensions.Localization; +@inject IStringLocalizer Localizer; + + + @Localizer["Sys.BatchDeleteConfirm"] + + + + + + + + + diff --git a/IoTGateway/Areas/_Admin/Views/FrameworkRole/Create.cshtml b/IoTGateway/Areas/_Admin/Views/FrameworkRole/Create.cshtml new file mode 100644 index 0000000..aa529c0 --- /dev/null +++ b/IoTGateway/Areas/_Admin/Views/FrameworkRole/Create.cshtml @@ -0,0 +1,13 @@ +@model WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkRoleVMs.FrameworkRoleVM + + + + + + + + + + + + diff --git a/IoTGateway/Areas/_Admin/Views/FrameworkRole/Delete.cshtml b/IoTGateway/Areas/_Admin/Views/FrameworkRole/Delete.cshtml new file mode 100644 index 0000000..0624c7b --- /dev/null +++ b/IoTGateway/Areas/_Admin/Views/FrameworkRole/Delete.cshtml @@ -0,0 +1,17 @@ +@model WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkRoleVMs.FrameworkRoleVM +@using Microsoft.Extensions.Localization; +@inject IStringLocalizer Localizer; + + + @Localizer["Sys.DeleteConfirm"] + + + + + + + + + + + diff --git a/IoTGateway/Areas/_Admin/Views/FrameworkRole/Details.cshtml b/IoTGateway/Areas/_Admin/Views/FrameworkRole/Details.cshtml new file mode 100644 index 0000000..447a284 --- /dev/null +++ b/IoTGateway/Areas/_Admin/Views/FrameworkRole/Details.cshtml @@ -0,0 +1,12 @@ +@model WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkRoleVMs.FrameworkRoleMDVM + + + + + + + + + + + diff --git a/IoTGateway/Areas/_Admin/Views/FrameworkRole/Edit.cshtml b/IoTGateway/Areas/_Admin/Views/FrameworkRole/Edit.cshtml new file mode 100644 index 0000000..5acc9f7 --- /dev/null +++ b/IoTGateway/Areas/_Admin/Views/FrameworkRole/Edit.cshtml @@ -0,0 +1,14 @@ +@model WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkRoleVMs.FrameworkRoleVM + + + + + + + + + + + + + diff --git a/IoTGateway/Areas/_Admin/Views/FrameworkRole/Import.cshtml b/IoTGateway/Areas/_Admin/Views/FrameworkRole/Import.cshtml new file mode 100644 index 0000000..6cfbdb4 --- /dev/null +++ b/IoTGateway/Areas/_Admin/Views/FrameworkRole/Import.cshtml @@ -0,0 +1,17 @@ +@model WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkRoleVMs.FrameworkRoleImportVM +@using Microsoft.Extensions.Localization; +@inject IStringLocalizer Localizer; + + + + + + + + + + + + + + diff --git a/IoTGateway/Areas/_Admin/Views/FrameworkRole/Index.cshtml b/IoTGateway/Areas/_Admin/Views/FrameworkRole/Index.cshtml new file mode 100644 index 0000000..e3c03bc --- /dev/null +++ b/IoTGateway/Areas/_Admin/Views/FrameworkRole/Index.cshtml @@ -0,0 +1,11 @@ +@model WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkRoleVMs.FrameworkRoleListVM + + + + + + + + + + diff --git a/IoTGateway/Areas/_Admin/Views/FrameworkRole/PageFunction.cshtml b/IoTGateway/Areas/_Admin/Views/FrameworkRole/PageFunction.cshtml new file mode 100644 index 0000000..18e785e --- /dev/null +++ b/IoTGateway/Areas/_Admin/Views/FrameworkRole/PageFunction.cshtml @@ -0,0 +1,17 @@ +@model WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkRoleVMs.FrameworkRoleMDVM + + + + + + + + + + + + + + + + diff --git a/IoTGateway/Areas/_Admin/Views/FrameworkUser/BatchDelete.cshtml b/IoTGateway/Areas/_Admin/Views/FrameworkUser/BatchDelete.cshtml new file mode 100644 index 0000000..f0a637d --- /dev/null +++ b/IoTGateway/Areas/_Admin/Views/FrameworkUser/BatchDelete.cshtml @@ -0,0 +1,14 @@ +@model WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkUserVms.FrameworkUserBatchVM +@using Microsoft.Extensions.Localization; +@inject IStringLocalizer Localizer; + + @Localizer["Sys.BatchDeleteConfirm"] + + + + + + + + + diff --git a/IoTGateway/Areas/_Admin/Views/FrameworkUser/BatchEdit.cshtml b/IoTGateway/Areas/_Admin/Views/FrameworkUser/BatchEdit.cshtml new file mode 100644 index 0000000..ad2c5a7 --- /dev/null +++ b/IoTGateway/Areas/_Admin/Views/FrameworkUser/BatchEdit.cshtml @@ -0,0 +1,18 @@ +@model WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkUserVms.FrameworkUserBatchVM +@using Microsoft.Extensions.Localization; +@inject IStringLocalizer Localizer; + + +
@Localizer["Sys.BatchEditConfirm"]
+ + + + + + + + + +
+ + diff --git a/IoTGateway/Areas/_Admin/Views/FrameworkUser/Create.cshtml b/IoTGateway/Areas/_Admin/Views/FrameworkUser/Create.cshtml new file mode 100644 index 0000000..4997b72 --- /dev/null +++ b/IoTGateway/Areas/_Admin/Views/FrameworkUser/Create.cshtml @@ -0,0 +1,46 @@ +@model WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkUserVms.FrameworkUserVM +@using Microsoft.Extensions.Localization; +@inject IStringLocalizer Localizer; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/IoTGateway/Areas/_Admin/Views/FrameworkUser/Delete.cshtml b/IoTGateway/Areas/_Admin/Views/FrameworkUser/Delete.cshtml new file mode 100644 index 0000000..fe5f0c0 --- /dev/null +++ b/IoTGateway/Areas/_Admin/Views/FrameworkUser/Delete.cshtml @@ -0,0 +1,25 @@ +@model WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkUserVms.FrameworkUserVM +@using Microsoft.Extensions.Localization; +@inject IStringLocalizer Localizer; + + + @Localizer["Sys.DeleteConfirm"] + + + + + + + + + + + + + + + + + + + diff --git a/IoTGateway/Areas/_Admin/Views/FrameworkUser/Details.cshtml b/IoTGateway/Areas/_Admin/Views/FrameworkUser/Details.cshtml new file mode 100644 index 0000000..4cf2939 --- /dev/null +++ b/IoTGateway/Areas/_Admin/Views/FrameworkUser/Details.cshtml @@ -0,0 +1,20 @@ +@model WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkUserVms.FrameworkUserVM + + + + + + + + + + + + + + + + + + + diff --git a/IoTGateway/Areas/_Admin/Views/FrameworkUser/Edit.cshtml b/IoTGateway/Areas/_Admin/Views/FrameworkUser/Edit.cshtml new file mode 100644 index 0000000..07efbf7 --- /dev/null +++ b/IoTGateway/Areas/_Admin/Views/FrameworkUser/Edit.cshtml @@ -0,0 +1,48 @@ +@model WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkUserVms.FrameworkUserVM +@using Microsoft.Extensions.Localization; +@inject IStringLocalizer Localizer; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/IoTGateway/Areas/_Admin/Views/FrameworkUser/Import.cshtml b/IoTGateway/Areas/_Admin/Views/FrameworkUser/Import.cshtml new file mode 100644 index 0000000..aaebcfc --- /dev/null +++ b/IoTGateway/Areas/_Admin/Views/FrameworkUser/Import.cshtml @@ -0,0 +1,17 @@ +@model WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkUserVms.FrameworkUserImportVM +@using Microsoft.Extensions.Localization; +@inject IStringLocalizer Localizer; + + + + + + + + + + + + + + diff --git a/IoTGateway/Areas/_Admin/Views/FrameworkUser/Index.cshtml b/IoTGateway/Areas/_Admin/Views/FrameworkUser/Index.cshtml new file mode 100644 index 0000000..5b69200 --- /dev/null +++ b/IoTGateway/Areas/_Admin/Views/FrameworkUser/Index.cshtml @@ -0,0 +1,14 @@ +@model WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkUserVms.FrameworkUserListVM +@using Microsoft.Extensions.Localization; +@inject IStringLocalizer Localizer; + + + + + + + + + + + diff --git a/IoTGateway/Areas/_Admin/Views/FrameworkUser/Password.cshtml b/IoTGateway/Areas/_Admin/Views/FrameworkUser/Password.cshtml new file mode 100644 index 0000000..96aa1fb --- /dev/null +++ b/IoTGateway/Areas/_Admin/Views/FrameworkUser/Password.cshtml @@ -0,0 +1,12 @@ +@model WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkUserVms.FrameworkUserVM + + + + + + + + + + + diff --git a/IoTGateway/Areas/_Admin/Views/_ViewImports.cshtml b/IoTGateway/Areas/_Admin/Views/_ViewImports.cshtml new file mode 100644 index 0000000..78d9f0c --- /dev/null +++ b/IoTGateway/Areas/_Admin/Views/_ViewImports.cshtml @@ -0,0 +1,3 @@ +@using WalkingTec.Mvvm.TagHelpers.LayUI +@using Microsoft.Extensions.Localization; +@addTagHelper *, WalkingTec.Mvvm.TagHelpers.LayUI diff --git a/IoTGateway/Areas/_ViewImports.cshtml b/IoTGateway/Areas/_ViewImports.cshtml new file mode 100644 index 0000000..1517d40 --- /dev/null +++ b/IoTGateway/Areas/_ViewImports.cshtml @@ -0,0 +1,4 @@ +@using WalkingTec.Mvvm.TagHelpers.LayUI +@using Microsoft.Extensions.Localization; +@using IoTGateway; +@addTagHelper *, WalkingTec.Mvvm.TagHelpers.LayUI diff --git a/IoTGateway/Controllers/HomeController.cs b/IoTGateway/Controllers/HomeController.cs new file mode 100644 index 0000000..b116aff --- /dev/null +++ b/IoTGateway/Controllers/HomeController.cs @@ -0,0 +1,154 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using Microsoft.AspNetCore.Authentication; +using Microsoft.AspNetCore.Authentication.Cookies; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.DataProtection; +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; +using Microsoft.Extensions.DependencyInjection; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Auth; +using WalkingTec.Mvvm.Core.Extensions; +using WalkingTec.Mvvm.Mvc; + +namespace IoTGateway.Controllers +{ + public class HomeController : BaseController + { + [AllRights] + public IActionResult Index() + { + ViewData["title"] = "IoTGateway"; + return View(); + } + + [AllowAnonymous] + public IActionResult PIndex() + { + return View(); + } + + [AllRights] + [ActionDescription("FrontPage")] + public IActionResult FrontPage() + { + return PartialView(); + } + + public IActionResult GetActionChart() + { + var areas = GlobaInfo.AllModule.Select(x => x.Area).Distinct(); + var data = new List(); + + foreach (var area in areas) + { + var controllers = GlobaInfo.AllModule.Where(x => x.Area == area); + data.Add(new ChartData + { + Category = "Controllers", + Value = controllers.Count(), + Series = area?.AreaName ?? "Default" + }); + data.Add(new ChartData + { + Category = "Actions", + Value = controllers.SelectMany(x=>x.Actions).Count(), + Series = area?.AreaName ?? "Default" + }); + } + var rv = data.ToChartData(); + return Json(rv); + } + + public IActionResult GetModelChart() + { + var models = new List(); + + var pros = Wtm.ConfigInfo.Connections.SelectMany(x => x.DcConstructor.DeclaringType.GetProperties(BindingFlags.Default | BindingFlags.Public | BindingFlags.Instance)); + if (pros != null) + { + foreach (var pro in pros) + { + if (pro.PropertyType.IsGeneric(typeof(DbSet<>))) + { + models.Add(pro.PropertyType.GetGenericArguments()[0]); + } + } + } + var data = new List(); + + foreach (var m in models) + { + data.Add(new ChartData + { + Value = m.GetProperties().Count(), + Category = m.GetPropertyDisplayName(), + Series = "Model" + }) ; + } + var rv = data.ToChartData(); + return Json(rv); + } + + public IActionResult GetSampleChart() + { + var data = new List(); + Random r = new Random(); + int maxi = r.Next(3, 10); + int maxy = r.Next(3, 10); + for (int i = 0; i < maxi; i++) + { + for (int j = 0; j < maxy; j++) + { + data.Add(new ChartData + { + Category = "x" + i, + Value = r.Next(100, 1000), + ValueX = r.Next(200, 2000), + Series = "y" + j, + Addition = r.Next(100, 1000), + + }); + } + } + var rv = data.ToChartData(); + return Json(rv); + } + + + [AllRights] + [ActionDescription("Layout")] + public IActionResult Layout() + { + ViewData["debug"] = Wtm.ConfigInfo.IsQuickDebug; + return PartialView(); + } + + [AllRights] + public IActionResult UserInfo() + { + if (HttpContext.Request.Cookies.TryGetValue(CookieAuthenticationDefaults.CookiePrefix + AuthConstants.CookieAuthName, out string cookieValue)) + { + var protectedData = Base64UrlTextEncoder.Decode(cookieValue); + var dataProtectionProvider = HttpContext.RequestServices.GetRequiredService(); + var _dataProtector = dataProtectionProvider + .CreateProtector( + "Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationMiddleware", + CookieAuthenticationDefaults.AuthenticationScheme, + "v2"); + var unprotectedData = _dataProtector.Unprotect(protectedData); + + string cookieData = Encoding.UTF8.GetString(unprotectedData); + return JsonMore(cookieData); + } + else + return JsonMore("No Data"); + } + + } + +} diff --git a/IoTGateway/Controllers/LoginController.cs b/IoTGateway/Controllers/LoginController.cs new file mode 100644 index 0000000..28a8d91 --- /dev/null +++ b/IoTGateway/Controllers/LoginController.cs @@ -0,0 +1,148 @@ +using System; +using System.Threading.Tasks; +using System.Web; +using Microsoft.AspNetCore.Authentication; +using Microsoft.AspNetCore.Authentication.Cookies; +using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; +using WalkingTec.Mvvm.Mvc; +using WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkUserVms; +using IoTGateway.ViewModel.HomeVMs; + +namespace IoTGateway.Controllers +{ + [AllRights] + public class LoginController : BaseController + { + + [Public] + [ActionDescription("Login")] + public IActionResult Login() + { + LoginVM vm = Wtm.CreateVM(); + vm.Redirect = HttpContext.Request.Query["ReturnUrl"]; + if (Wtm.ConfigInfo.IsQuickDebug == true) + { + vm.ITCode = "admin"; + vm.Password = "000000"; + } + return View(vm); + } + + [Public] + [HttpPost] + public async Task Login(LoginVM vm) + { + if (Wtm.ConfigInfo.IsQuickDebug == false) + { + var verifyCode = HttpContext.Session.Get("verify_code"); + if (string.IsNullOrEmpty(verifyCode) || verifyCode.ToLower() != vm.VerifyCode.ToLower()) + { + vm.MSD.AddModelError("", Localizer["Login.ValidationFail"]); + return View(vm); + } + } + + var user = await vm.DoLoginAsync(); + if (user == null) + { + return View(vm); + } + else + { + Wtm.LoginUserInfo = user; + string url = string.Empty; + if (!string.IsNullOrEmpty(vm.Redirect)) + { + url = vm.Redirect; + } + else + { + url = "/"; + } + + AuthenticationProperties properties = null; + if (vm.RememberLogin) + { + properties = new AuthenticationProperties + { + IsPersistent = true, + ExpiresUtc = DateTimeOffset.UtcNow.Add(TimeSpan.FromDays(30)) + }; + } + + var principal = user.CreatePrincipal(); + await HttpContext.SignInAsync(CookieAuthenticationDefaults.AuthenticationScheme, principal, properties); + return Redirect(HttpUtility.UrlDecode(url)); + } + } + + [Public] + public IActionResult Reg() + { + var vm = Wtm.CreateVM(); + return PartialView(vm); + } + + [Public] + [HttpPost] + public IActionResult Reg(RegVM vm) + { + if (!ModelState.IsValid) + { + return PartialView(vm); + } + else + { + var rv = vm.DoReg(); + if (rv == true) + { + return FFResult().CloseDialog().Message(Localizer["Reg.Success"]); + } + else + { + return PartialView(vm); + } + } + } + + [AllRights] + [ActionDescription("Logout")] + public async Task Logout() + { + await Wtm.RemoveUserCache(Wtm.LoginUserInfo.ITCode); + HttpContext.Session.Clear(); + await HttpContext.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme); + HttpContext.Response.Redirect("/"); + } + + [AllRights] + [ActionDescription("ChangePassword")] + public ActionResult ChangePassword() + { + var vm = Wtm.CreateVM(); + vm.ITCode = Wtm.LoginUserInfo.ITCode; + return PartialView(vm); + } + + [AllRights] + [HttpPost] + [ActionDescription("ChangePassword")] + public ActionResult ChangePassword(ChangePasswordVM vm) + { + if (!ModelState.IsValid) + { + return PartialView(vm); + } + else + { + vm.DoChange(); + return FFResult().CloseDialog().Alert(Localizer["Login.ChangePasswordSuccess"]); + } + } + + } +} diff --git a/IoTGateway/Dockerfile b/IoTGateway/Dockerfile new file mode 100644 index 0000000..189a6cc --- /dev/null +++ b/IoTGateway/Dockerfile @@ -0,0 +1,30 @@ +#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging. + +FROM mcr.microsoft.com/dotnet/aspnet:5.0-buster-slim AS base +WORKDIR /app +EXPOSE 518 + +RUN apt-get update +RUN apt-get install libgdiplus -y +RUN apt-get install nano -y + +FROM mcr.microsoft.com/dotnet/sdk:5.0-buster-slim AS build +WORKDIR /src +COPY ["IoTGateway/IoTGateway.csproj", "IoTGateway/"] +COPY ["IoTGateway.ViewModel/IoTGateway.ViewModel.csproj", "IoTGateway.ViewModel/"] +COPY ["IoTGateway.Model/IoTGateway.Model.csproj", "IoTGateway.Model/"] +COPY ["IoTGateway.DataAccess/IoTGateway.DataAccess.csproj", "IoTGateway.DataAccess/"] +RUN dotnet restore "IoTGateway/IoTGateway.csproj" +COPY . . +WORKDIR "/src/IoTGateway" +RUN dotnet build "IoTGateway.csproj" -c Release -o /app/build + +FROM build AS publish +RUN dotnet publish "IoTGateway.csproj" -c Release -o /app/publish + +FROM base AS final +WORKDIR /app +COPY --from=publish /app/publish . + +ENV TZ=Asia/Shanghai +ENTRYPOINT ["dotnet", "IoTGateway.dll"] \ No newline at end of file diff --git a/IoTGateway/IoTGateway.csproj b/IoTGateway/IoTGateway.csproj new file mode 100644 index 0000000..4a8eca7 --- /dev/null +++ b/IoTGateway/IoTGateway.csproj @@ -0,0 +1,33 @@ + + + + net5.0 + true + InProcess + zh-Hans,en + + true + + Linux + + + + + + + + + + + + + + + + + + + + + + diff --git a/IoTGateway/IoTGateway.csproj.user b/IoTGateway/IoTGateway.csproj.user new file mode 100644 index 0000000..81b1159 --- /dev/null +++ b/IoTGateway/IoTGateway.csproj.user @@ -0,0 +1,10 @@ + + + + IoTGateway + D:\Repos\iotgateway\IoTGateway\Properties\PublishProfiles\FolderProfile.pubxml + + + ProjectDebugger + + \ No newline at end of file diff --git a/IoTGateway/Plugin.dll b/IoTGateway/Plugin.dll new file mode 100644 index 0000000..2378f81 Binary files /dev/null and b/IoTGateway/Plugin.dll differ diff --git a/IoTGateway/Program.cs b/IoTGateway/Program.cs new file mode 100644 index 0000000..43a9ca3 --- /dev/null +++ b/IoTGateway/Program.cs @@ -0,0 +1,44 @@ +using System.Collections.Generic; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.Logging; +using WalkingTec.Mvvm.Core; + +namespace IoTGateway +{ + public class Program + { + public static void Main(string[] args) + { + CreateWebHostBuilder(args).Build().Run(); + } + + public static IHostBuilder CreateWebHostBuilder(string[] args) + { + return + Host.CreateDefaultBuilder(args) + .ConfigureAppConfiguration((hostingContext, config) => + { + config.AddInMemoryCollection(new Dictionary { { "HostRoot", hostingContext.HostingEnvironment.ContentRootPath } }); + }) + .ConfigureLogging((hostingContext, logging) => + { + logging.ClearProviders(); + logging.AddConsole(); + logging.AddWTMLogger(); + }) + .ConfigureWebHostDefaults(webBuilder => + { + webBuilder.UseStartup(); + webBuilder.UseKestrel(option => + { + option.ListenAnyIP(518); + }); + }); + //.UseServiceProviderFactory(new AutofacServiceProviderFactory()); + } + } +} diff --git a/IoTGateway/Properties/PublishProfiles/FolderProfile.pubxml b/IoTGateway/Properties/PublishProfiles/FolderProfile.pubxml new file mode 100644 index 0000000..20ed980 --- /dev/null +++ b/IoTGateway/Properties/PublishProfiles/FolderProfile.pubxml @@ -0,0 +1,21 @@ + + + + + False + False + True + Release + Any CPU + FileSystem + bin\Release\net5.0\publish\ + FileSystem + + net5.0 + win-x64 + 68abbdf2-1485-4756-9a94-6afa874d69a3 + false + + \ No newline at end of file diff --git a/IoTGateway/Properties/PublishProfiles/FolderProfile.pubxml.user b/IoTGateway/Properties/PublishProfiles/FolderProfile.pubxml.user new file mode 100644 index 0000000..9a4d120 --- /dev/null +++ b/IoTGateway/Properties/PublishProfiles/FolderProfile.pubxml.user @@ -0,0 +1,10 @@ + + + + + <_PublishTargetUrl>D:\Repos\iotgateway\IoTGateway\bin\Release\net5.0\publish\ + True|2021-12-12T06:11:08.8380502Z; + + \ No newline at end of file diff --git a/IoTGateway/Properties/launchSettings.json b/IoTGateway/Properties/launchSettings.json new file mode 100644 index 0000000..c73b2d7 --- /dev/null +++ b/IoTGateway/Properties/launchSettings.json @@ -0,0 +1,35 @@ +{ + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:6652/", + "sslPort": 0 + } + }, + "profiles": { + "IoTGateway": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development", + "ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" + }, + "applicationUrl": "http://localhost:6652" + }, + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development", + "ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" + } + }, + "Docker": { + "commandName": "Docker", + "launchBrowser": true, + "launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}", + "publishAllPorts": true + } + } +} \ No newline at end of file diff --git a/IoTGateway/Resources/Program.en.resx b/IoTGateway/Resources/Program.en.resx new file mode 100644 index 0000000..91ce954 --- /dev/null +++ b/IoTGateway/Resources/Program.en.resx @@ -0,0 +1,960 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Generate api only, no frontend code + + + Attachment + + + AuthMode + + + This will generate following files, are you sure? + + + ControllerNs + + + DataNs + + + The {0} field must start with characters or underscores + + + Field des + + + File name + + + Generate code + + + Generate Api + + + Please input module name, such as xxx management + + + Batch field + + + Form field + + + Import field + + + List field + + + Search field + + + Link type + + + ManyToMany + + + ModelNS + + + Module name + + + OneToMany + + + The model selected must inherit from TopBasePoco + + + Please select a module + + + Please setup fields + + + Start generation + + + Display field of linked poco + + + Code has been generated, please close the debug and rebuild the solution. + + + TestNs + + + VMNs + + + Change password + + + The password has been modified successfully. Please log in with the new password next time. + + + Please input password + + + Please input user name + + + Validation code + + + Account is duplicated + + + Login + + + LogOut + + + New passwrod + + + Passwrod again + + + Current + + + Current password is wrong + + + Inconsistent password + + + Register + + + New user registration + + + Remember me + + + Incorrect verification code + + + Log + + + Buildin Api + + + Data Privilege + + + Group Management + + + Login + + + Menu Mangement + + + Role Management + + + System + + + User Management + + + Registered successfully + + + Account + + + Admin + + + All + + + Api Doc + + + The value '{0}' is not valid for {1}. + + + Home + + + Batch delete + + + Are you sure to delete following data: + + + {0} rows have been deleted + + + Batch edit + + + Batch update following data + + + {0} rows have been edited + + + {0} is used, it cannot be deleted + + + Can not find user {0} + + + CellIndex + + + Check export + + + Close + + + Close all tags + + + Close other tags + + + Close this tag + + + CodeGen + + + Filters + + + ComboBox + + + Continue + + + Create + + + Data is used, it cannot be deleted + + + Data does not exist + + + between {0} and {1} + + + The address can only be accessed in debug mode + + + Default area + + + Delete + + + Are you sure to delete this data + + + Data is in use, delete failed. + + + Details + + + Download + + + Download template + + + The {0} field has duplicated data + + + The {0} fields has duplicated data + + + Edit + + + Edit failed + + + Enable + + + Error + + + Error handling + + + Error message + + + Export + + + CheckExport + + + Export Excel + + + Failed to load data + + + Female + + + File is not found + + + For selection + + + Get + + + Goto + + + GO + + + Have + + + Hide/Show + + + Home + + + Import + + + Error occurs during import + + + Click to download template + + + Upload your template with data + + + Import failed, please download error file for details + + + {0} rows have been imported + + + Info + + + Invalid + + + Layout + + + EN + + + Horizontal + + + Failed to load + + + Login failed + + + MainPage + + + Male + + + More + + + You havn't logged in or your login is expired, please login again. + + + No + + + No data + + + No matching data + + + None + + + You are not allowed to access this page + + + None + + + OK + + + Operation + + + Opration success + + + Page + + + Error occurred + + + Please input decimal + + + Please input with decimal format + + + Please use data existed in the combobox + + + Please input number + + + Please input with number format + + + Please input text + + + Please select + + + Please upload template + + + Preview + + + Print + + + Record(s) + + + + + + Refresh + + + Reset + + + Rollback + + + Row + + + Search + + + Conditions + + + Select + + + Selected + + + Please select a row + + + Please select only one row + + + Please select at least one row + + + Single + + + Submit + + + Failed to submit + + + Tabs + + + Theme + + + Total: + + + Update successfully + + + Vertical + + + Upload failed + + + Template + + + Valid + + + The value '{0}' is invalid. + + + Wrong template + + + The text is too long + + + WTM Doc + + + Yes + + + The {0} field has an error format + + + The {0} field's value does not exist + + + The {0} field's type is not supported + + + The {0} field has an error format + + + The {0} field must be digit + + + {0} must be less than {1} + + + {0} must be at least {1} + + + {0} must between {1} and {2} + + + The {0} field is required + + + The {0} field is limited {1} characters + + + Account + + + Action + + + Log management Api + + + Action name + + + Action time + + + Additional + + + Address + + + All privilege + + + Allowed + + + Allowed + + + Allowed roles + + + All privilege + + + Basic + + + CellPhone + + + Check Page + + + Children + + + ClassName + + + CreateBy + + + CreateTime + + + Data Privilege + + + Data privilege Api + + + Dp count + + + Dp name + + + Debug + + + Order + + + Domain + + + Target + + + Dp type + + + Duration + + + Email + + + Exception + + + Field name + + + File Api + + + File ext + + + Folder + + + Gender + + + Group + + + Group management Api + + + Group code + + + Group Dp + + + Group name + + + HomePhone + + + Icon + + + IconFont + + + Inside + + + Inherit + + + Domain + + + Public + + + IsValid + + + Length + + + Login Api + + + Log type + + + Menu management Api + + + MenuItem + + + Method name + + + Module + + + This module has already beed added + + + Name + + + There is no View in this Module + + + No privilege + + + Normal + + + Outside + + + Page privileges + + + Page name + + + Parent + + + Parent folder + + + Password + + + Path + + + Photo + + + Privileges + + + Refresh menu + + + Remark + + + Role + + + Role management Api + + + Role code + + + Role name + + + Model + + + Select privileges + + + Menu + + + Privilege name + + + Tenant + + + Unset pages + + + UpdateBy + + + Update time + + + User + + + User management Api + + + User Dp + + + Users + + + Zip + + \ No newline at end of file diff --git a/IoTGateway/Resources/Program.zh.resx b/IoTGateway/Resources/Program.zh.resx new file mode 100644 index 0000000..13cd764 --- /dev/null +++ b/IoTGateway/Resources/Program.zh.resx @@ -0,0 +1,963 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 勾选此项将只生成api,而没有前端代码 + + + 附件 + + + 认证方式 + + + 该操作将生成如下文件,是否确定? + + + Controller命名空间 + + + Data命名空间 + + + {0}只能以英文字母或下划线开头 + + + 字段描述 + + + 文件名 + + + 生成代码 + + + 生成Api + + + 请输入模块名称,比如xx管理 + + + 批量更新字段 + + + 表单字段 + + + 导入字段 + + + 列表展示 + + + 搜索条件 + + + 关联类型 + + + 多对多 + + + Model命名空间 + + + 模块名称 + + + 一对多 + + + 所选模型必须继承TopBasePoco基类 + + + 请选择一个模块 + + + 请进行字段配置 + + + 开始生成 + + + 关联表显示字段 + + + 生成成功!请关闭调试重新编译运行 + + + Test命名空间 + + + VM命名空间 + + + 修改密码 + + + 密码修改成功,下次请使用新密码登录。 + + + 请输入密码 + + + 请输入用户名 + + + 请输入验证码 + + + 账号重复 + + + 登 录 + + + 退出 + + + 新密码 + + + 新密码 + + + 当前密码 + + + 当前密码错误 + + + 两次新密码输入不一致 + + + 注 册 + + + 新用户注册 + + + 记住我 + + + 验证码不正确 + + + 日志 + + + 内置Api + + + 数据权限 + + + 用户组管理 + + + 登录 + + + 菜单管理 + + + 角色管理 + + + 系统管理 + + + 用户管理 + + + 菜单管理 + + + 注册成功 + + + 账号 + + + 超级管理员 + + + 全部 + + + Api文档 + + + '{0}' 不是 {1} 的有效格式 + + + 返回首页 + + + 批量删除 + + + 确定要删除以下数据么: + + + 成功删除{0}行数据 + + + 批量修改 + + + 批量修改以下数据 + + + 成功修改{0}行数据 + + + {0}已被使用,无法删除 + + + 无法找到账号为{0}的用户 + + + 列号 + + + 勾选导出 + + + 关闭 + + + 关闭全部标签页 + + + 关闭其它标签页 + + + 关闭当前标签页 + + + 代码生成器 + + + 筛选列 + + + 下拉菜单 + + + 继续 + + + 新建 + + + 数据被使用,无法删除 + + + 数据不存在 + + + 在{0}到{1}之间 + + + 该地址只能在调试模式下访问 + + + 默认区域 + + + 删除 + + + 确定要删除这条数据么: + + + 数据使用中,无法删除 + + + 详细 + + + 下载 + + + 下载模板 + + + {0}数据重复 + + + {0}组合字段重复 + + + 修改 + + + 修改失败 + + + 启用 + + + 错误 + + + 错误处理 + + + 错误信息 + + + 导出 + + + 勾选导出 + + + 导出Excel + + + 获取数据失败 + + + + + + 没有找到文件 + + + 待选择 + + + 获取 + + + 到第 + + + 确定 + + + + + + 侧边伸缩 + + + 首页 + + + 导入 + + + 导入时发生错误 + + + 点击右侧按钮下载模板 + + + 将编辑好的模板上传 + + + 导入失败,请下载错误文件查看详情 + + + 成功导入{0}行数据 + + + 信息 + + + 无效 + + + 布局 + + + CN + + + 左右结构 + + + 加载失败 + + + 登录失败 + + + 主页面 + + + + + + 更多设置 + + + 您没有登录或登录已过期,请重新登陆 + + + + + + 无数据 + + + 无匹配数据 + + + + + + 您没有访问该页面的权限 + + + + + + 确定 + + + 操作 + + + 操作成功 + + + + + + 页面发生错误 + + + 请输入小数 + + + 请输入小数格式 + + + 请输入下拉菜单中存在的数据 + + + 请输入数字 + + + 请输入数字格式 + + + 请输入文本 + + + 请选择 + + + 请上传模板文件 + + + 预览 + + + 打印 + + + + + + 条/页 + + + 刷新 + + + 重置 + + + 已回滚 + + + 行号 + + + 搜索 + + + 搜索条件 + + + 选择 + + + 已选择 + + + 请选择一行 + + + 最多只能选择一行 + + + 请至少选择一行 + + + 单页面 + + + 提交 + + + 提交失败 + + + 多标签 + + + 主题 + + + 合计: + + + 更新成功 + + + 上下结构 + + + 上传失败 + + + 上传模板 + + + 有效 + + + {0} 格式错误 + + + 错误的模板 + + + 文本长度不符合要求 + + + WTM文档 + + + + + + {0}格式错误 + + + {0}输入的值在数据库中不存在 + + + {0}输入的值不在允许的数据类型范围内 + + + {0}格式错误 + + + {0}必须是数字 + + + {0}至少是{1} + + + {0}必须是{1}到{2}之间的数 + + + {0}最多是{1} + + + {0}是必填项 + + + {0}最多输入{1}个字符 + + + 账号 + + + 动作 + + + 日志管理Api + + + 动作名称 + + + 操作时间 + + + 附加信息 + + + 地址 + + + 全部权限 + + + 允许 + + + 允许访问 + + + 允许角色 + + + 全部权限 + + + 基本信息 + + + 手机 + + + 检查页面 + + + 子项 + + + 类名 + + + 创建人 + + + 创建时间 + + + 数据权限 + + + 数据权限Api + + + 权限数量 + + + 权限名称 + + + 调试 + + + 顺序 + + + + + + 授权对象 + + + 权限类别 + + + 时长 + + + 邮箱 + + + 异常 + + + 字段名称 + + + 文件操作Api + + + 扩展名 + + + 目录 + + + 性别 + + + 用户组 + + + 用户组管理Api + + + 用户组编号 + + + 用户组权限 + + + 组名 + + + 座机 + + + 图标 + + + 图标库 + + + 内部 + + + 继承 + + + 地址类型 + + + 公开 + + + 是否有效 + + + 长度 + + + 账号操作Api + + + 类型 + + + 菜单管理Api + + + 菜单项 + + + 方法 + + + 模块 + + + 该模块已经配置过了 + + + 姓名 + + + 模块中没有找到页面 + + + 无权限 + + + 普通 + + + 外部 + + + 页面权限 + + + 页面名称 + + + 父级 + + + 父目录 + + + 密码 + + + 路径 + + + 照片 + + + 权限 + + + 刷新菜单 + + + 备注 + + + 角色 + + + 角色管理Api + + + 角色编号 + + + 角色名称 + + + 选择模型 + + + 选择权限 + + + 菜单显示 + + + 权限名称 + + + 租户 + + + 未设置页面 + + + 修改人 + + + 修改时间 + + + 用户 + + + 用户管理Api + + + 用户权限 + + + 包含用户 + + + 邮编 + + \ No newline at end of file diff --git a/IoTGateway/Startup.cs b/IoTGateway/Startup.cs new file mode 100644 index 0000000..737f3c6 --- /dev/null +++ b/IoTGateway/Startup.cs @@ -0,0 +1,151 @@ +using System; +using System.Collections.Generic; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.Filters; +using Microsoft.AspNetCore.Mvc.Razor; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Options; +using Plugin; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; +using WalkingTec.Mvvm.Core.Support.FileHandlers; +using WalkingTec.Mvvm.Mvc; + +namespace IoTGateway +{ + public class Startup + { + public IConfiguration ConfigRoot { get; } + + public Startup(IWebHostEnvironment env, IConfiguration config) + { + ConfigRoot = config; + } + + + // This method gets called by the runtime. Use this method to add services to the container. + public void ConfigureServices(IServiceCollection services) + { + services.AddDistributedMemoryCache(); + services.AddWtmSession(3600, ConfigRoot); + services.AddWtmCrossDomain(ConfigRoot); + services.AddWtmAuthentication(ConfigRoot); + services.AddWtmHttpClient(ConfigRoot); + services.AddWtmSwagger(); + services.AddWtmMultiLanguages(ConfigRoot); + + services.AddMvc(options => + { + options.UseWtmMvcOptions(); + }) + .AddJsonOptions(options => { + options.UseWtmJsonOptions(); + }) + .SetCompatibilityVersion(CompatibilityVersion.Version_3_0) + .ConfigureApiBehaviorOptions(options => + { + options.UseWtmApiOptions(); + }) + .AddViewLocalization(LanguageViewLocationExpanderFormat.Suffix) + .AddWtmDataAnnotationsLocalization(typeof(Program)); + + services.AddWtmContext(ConfigRoot, (options)=> { + options.DataPrivileges = DataPrivilegeSettings(); + options.CsSelector = CSSelector; + options.FileSubDirSelector = SubDirSelector; + options.ReloadUserFunc = ReloadUser; + }); + services.AddHostedService(); + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + } + + //public void ConfigureContainer(ContainerBuilder containerBuilder) + //{ + // containerBuilder.RegisterModule(); + //} + // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. + public void Configure(IApplicationBuilder app, IOptionsMonitor configs, DeviceService deviceService) + { + IconFontsHelper.GenerateIconFont(); + + app.UseExceptionHandler(configs.CurrentValue.ErrorHandler); + app.UseStaticFiles(); + app.UseWtmStaticFiles(); + app.UseRouting(); + app.UseWtmMultiLanguages(); + app.UseWtmCrossDomain(); + app.UseAuthentication(); + app.UseAuthorization(); + app.UseSession(); + app.UseWtmSwagger(); + app.UseWtm(); + + app.UseEndpoints(endpoints => + { + endpoints.MapControllerRoute( + name: "areaRoute", + pattern: "{area:exists}/{controller=Home}/{action=Index}/{id?}"); + endpoints.MapControllerRoute( + name: "default", + pattern: "{controller=Home}/{action=Index}/{id?}"); + }); + + app.UseWtmContext(); + } + + /// + /// Wtm will call this function to dynamiclly set connection string + /// 框架会调用这个函数来动态设定每次访问需要链接的数据库 + /// + /// ActionContext + /// Connection string key name + public string CSSelector(ActionExecutingContext context) + { + //To override the default logic of choosing connection string, + //change this function to return different connection string key + //根据context返回不同的连接字符串的名称 + return null; + } + + /// + /// Set data privileges that system supports + /// 设置系统支持的数据权限 + /// + /// data privileges list + public List DataPrivilegeSettings() + { + List pris = new List(); + //Add data privilege to specific type + //指定哪些模型需要数据权限 + return pris; + } + + /// + /// Set sub directory of uploaded files + /// 动态设置上传文件的子目录 + /// + /// IWtmFileHandler + /// subdir name + public string SubDirSelector(IWtmFileHandler fh) + { + return null; + } + + /// + /// Custom Reload user process when cache is not available + /// 设置自定义的方法重新读取用户信息,这个方法会在用户缓存失效的时候调用 + /// + /// + /// + /// + public LoginUserInfo ReloadUser(WTMContext context, string account) + { + return null; + } + } +} diff --git a/IoTGateway/Views/Home/FrontPage.cshtml b/IoTGateway/Views/Home/FrontPage.cshtml new file mode 100644 index 0000000..de6cfde --- /dev/null +++ b/IoTGateway/Views/Home/FrontPage.cshtml @@ -0,0 +1,118 @@ +@model WalkingTec.Mvvm.Core.BaseVM +@using System.Text.Json + +
+
+
+ +
+
+
控制器
+
+ +
+
+
+
+
+
模型
+
+ +
+
+
+
+
+
模拟数据
+
+ + +
+
+
+
+
+ + +
+ diff --git a/IoTGateway/Views/Home/Index.cshtml b/IoTGateway/Views/Home/Index.cshtml new file mode 100644 index 0000000..e410892 --- /dev/null +++ b/IoTGateway/Views/Home/Index.cshtml @@ -0,0 +1 @@ + diff --git a/IoTGateway/Views/Home/Layout.cshtml b/IoTGateway/Views/Home/Layout.cshtml new file mode 100644 index 0000000..57f8299 --- /dev/null +++ b/IoTGateway/Views/Home/Layout.cshtml @@ -0,0 +1,186 @@ +@using Microsoft.AspNetCore.Builder +@using Microsoft.AspNetCore.Localization +@using Microsoft.Extensions.Options +@model WalkingTec.Mvvm.Core.BaseVM +@inject IOptionsMonitor LocOptions + +@{ + var requestCulture = Context.Features.Get(); + var cultureItems = LocOptions.CurrentValue.SupportedUICultures + .Select(c => new SelectListItem { Value = c.Name, Text = c.NativeName }) + .ToList(); +} +
+
+ + + + +
+ + +
+
+ + +
+
+ + + + + +
+
+
+ + +
+
diff --git a/IoTGateway/Views/Home/PIndex.cshtml b/IoTGateway/Views/Home/PIndex.cshtml new file mode 100644 index 0000000..4fd00e7 --- /dev/null +++ b/IoTGateway/Views/Home/PIndex.cshtml @@ -0,0 +1,7 @@ +
+
+
+
+
+ + diff --git a/IoTGateway/Views/Login/ChangePassword.cshtml b/IoTGateway/Views/Login/ChangePassword.cshtml new file mode 100644 index 0000000..1a86567 --- /dev/null +++ b/IoTGateway/Views/Login/ChangePassword.cshtml @@ -0,0 +1,13 @@ +@model WalkingTec.Mvvm.Mvc.Admin.ViewModels.FrameworkUserVms.ChangePasswordVM + +

@Model.Localizer["Login.ChangePassword"]

+ + + + + + + + + + diff --git a/IoTGateway/Views/Login/Login.cshtml b/IoTGateway/Views/Login/Login.cshtml new file mode 100644 index 0000000..ad157ae --- /dev/null +++ b/IoTGateway/Views/Login/Login.cshtml @@ -0,0 +1,82 @@ +@model IoTGateway.ViewModel.HomeVMs.LoginVM + +@{ + Layout = null; + int bgnumber = new Random().Next(1, 6); +} + + + + + + + + + + + + + + IoTGateway + + + + + + + + + + + + + diff --git a/IoTGateway/Views/Login/Reg.cshtml b/IoTGateway/Views/Login/Reg.cshtml new file mode 100644 index 0000000..4b671ac --- /dev/null +++ b/IoTGateway/Views/Login/Reg.cshtml @@ -0,0 +1,14 @@ +@model IoTGateway.ViewModel.HomeVMs.RegVM + +

@Model.Localizer["Login.RegTitle"]

+ + + + + + + + + + + diff --git a/IoTGateway/Views/Shared/_Layout.cshtml b/IoTGateway/Views/Shared/_Layout.cshtml new file mode 100644 index 0000000..7358259 --- /dev/null +++ b/IoTGateway/Views/Shared/_Layout.cshtml @@ -0,0 +1,45 @@ + + + + + + @ViewData["title"] + + + + + + + + + + +
+ + + + + + + + + + + + + + + + @RenderBody() + + + diff --git a/IoTGateway/Views/_ViewImports.cshtml b/IoTGateway/Views/_ViewImports.cshtml new file mode 100644 index 0000000..1517d40 --- /dev/null +++ b/IoTGateway/Views/_ViewImports.cshtml @@ -0,0 +1,4 @@ +@using WalkingTec.Mvvm.TagHelpers.LayUI +@using Microsoft.Extensions.Localization; +@using IoTGateway; +@addTagHelper *, WalkingTec.Mvvm.TagHelpers.LayUI diff --git a/IoTGateway/Views/_ViewStart.cshtml b/IoTGateway/Views/_ViewStart.cshtml new file mode 100644 index 0000000..efda124 --- /dev/null +++ b/IoTGateway/Views/_ViewStart.cshtml @@ -0,0 +1,3 @@ +@{ + Layout = "~/Views/Shared/_Layout.cshtml"; +} \ No newline at end of file diff --git a/IoTGateway/appsettings.json b/IoTGateway/appsettings.json new file mode 100644 index 0000000..d12bf79 --- /dev/null +++ b/IoTGateway/appsettings.json @@ -0,0 +1,116 @@ +{ + "Logging": { + "Console": { + "IncludeScopes": true, + "LogLevel": { + "Default": "Error" + } + }, + "Debug": { + "IncludeScopes": true, + "LogLevel": { + "Default": "Error" + } + }, + "WTM": { + "LogLevel": { + "Default": "Error" + } + } + }, + "Connections": [ + { + "Key": "default", + "Value": "Data Source = iotgateway.db", + "DbContext": "DataContext", + "DBType": "SQLite" //DataBase, you can choose mysql,sqlserver,pgsql,sqlite,oracle + } + ], + "CookiePre": "IoTGateway", //cookie prefix + "IsQuickDebug": false, //is debug mode + "CorsOptions": { + "EnableAll": true, + "Policy": [ + { + "Name": "Default", + "Domain": "http://localhost,https://localhost" + } + ] + }, + "ErrorHandler": "/_Framework/Error", + "Languages": "zh,en", + "BlazorMode": "server", // server or wasm + "UIOptions": { + "DataTable": { + "RPP": 100, //default records per page for all datagrid + "ShowPrint": true, + "ShowFilter": true + }, + "ComboBox": { + "DefaultEnableSearch": true + }, + "DateTime": { + "DefaultReadonly": true + }, + "SearchPanel": { + "DefaultExpand": false + } + }, + "PageMode": "Tab", //display mode,Single or Tab + "TabMode": "Simple", //Tab mode,Default or Simple + "IsFilePublic": false, //Can download or view attachment file without login + "FileUploadOptions": { + "UploadLimit": 2097152000, + "SaveFileMode": "local", //上传文件的保存方式,可选Database,local,oss + "Settings": { + "local": [ + { + "GroupName": "driver", + "GroupLocation": "" + } + ], + "oss": [ + { + "GroupName": "default", + "GroupLocation": "wtmimg", + "ServerUrl": "", + "Key": "", + "Secret": "" + } + ] + } + }, + "JwtOptions": { + "Issuer": "http://localhost", + "Audience": "http://localhost", + "Expires": 3600, + "SecurityKey": "superSecretKey@345", + "RefreshTokenExpires": 86400, + "LoginPath": "/_Framework/Redirect401" + }, + "CookieOptions": { + "Issuer": "http://localhost", + "Audience": "http://localhost", + "Domain": "", + "Expires": 3600, + "SlidingExpiration": true, + "SecurityKey": "superSecretKey@345", + "RefreshTokenExpires": 86400, + "LoginPath": "/Login/Login" + }, + "Domains": { + "server": { //Blazor Server模式下页面调用接口的内网地址 + "Address": "http://localhost:6652" + }, + "serverpub": { //Blazor Server模式下页面调用接口的外网地址,可为空,为空表示api和页面部署在同一地址下 + "Address": "http://localhost:6652" + }, + "github": { + "Address": "https://api.github.com" + } + }, + "AppSettings": { + "key1": "value1", + "key2": "value2" + } +} diff --git a/IoTGateway/iotgateway.db b/IoTGateway/iotgateway.db new file mode 100644 index 0000000..18b7e20 Binary files /dev/null and b/IoTGateway/iotgateway.db differ diff --git a/IoTGateway/iotgateway.db-shm b/IoTGateway/iotgateway.db-shm new file mode 100644 index 0000000..13086ac Binary files /dev/null and b/IoTGateway/iotgateway.db-shm differ diff --git a/IoTGateway/iotgateway.db-wal b/IoTGateway/iotgateway.db-wal new file mode 100644 index 0000000..09da195 Binary files /dev/null and b/IoTGateway/iotgateway.db-wal differ diff --git a/IoTGateway/wwwroot/echarts/chalk.js b/IoTGateway/wwwroot/echarts/chalk.js new file mode 100644 index 0000000..229f88b --- /dev/null +++ b/IoTGateway/wwwroot/echarts/chalk.js @@ -0,0 +1,418 @@ + +(function (root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['exports', 'echarts'], factory); + } else if (typeof exports === 'object' && typeof exports.nodeName !== 'string') { + // CommonJS + factory(exports, require('echarts')); + } else { + // Browser globals + factory({}, root.echarts); + } +}(this, function (exports, echarts) { + var log = function (msg) { + if (typeof console !== 'undefined') { + console && console.error && console.error(msg); + } + }; + if (!echarts) { + log('ECharts is not Loaded'); + return; + } + echarts.registerTheme('chalk', { + "color": [ + "#fc97af", + "#87f7cf", + "#f7f494", + "#72ccff", + "#f7c5a0", + "#d4a4eb", + "#d2f5a6", + "#76f2f2" + ], + "backgroundColor": "rgba(41,52,65,1)", + "textStyle": {}, + "title": { + "textStyle": { + "color": "#ffffff" + }, + "subtextStyle": { + "color": "#dddddd" + } + }, + "line": { + "itemStyle": { + "borderWidth": "4" + }, + "lineStyle": { + "width": "3" + }, + "symbolSize": "0", + "symbol": "circle", + "smooth": true + }, + "radar": { + "itemStyle": { + "borderWidth": "4" + }, + "lineStyle": { + "width": "3" + }, + "symbolSize": "0", + "symbol": "circle", + "smooth": true + }, + "bar": { + "itemStyle": { + "barBorderWidth": 0, + "barBorderColor": "#ccc" + } + }, + "pie": { + "itemStyle": { + "borderWidth": 0, + "borderColor": "#ccc" + } + }, + "scatter": { + "itemStyle": { + "borderWidth": 0, + "borderColor": "#ccc" + } + }, + "boxplot": { + "itemStyle": { + "borderWidth": 0, + "borderColor": "#ccc" + } + }, + "parallel": { + "itemStyle": { + "borderWidth": 0, + "borderColor": "#ccc" + } + }, + "sankey": { + "itemStyle": { + "borderWidth": 0, + "borderColor": "#ccc" + } + }, + "funnel": { + "itemStyle": { + "borderWidth": 0, + "borderColor": "#ccc" + } + }, + "gauge": { + "itemStyle": { + "borderWidth": 0, + "borderColor": "#ccc" + } + }, + "candlestick": { + "itemStyle": { + "color": "#fc97af", + "color0": "transparent", + "borderColor": "#fc97af", + "borderColor0": "#87f7cf", + "borderWidth": "2" + } + }, + "graph": { + "itemStyle": { + "borderWidth": 0, + "borderColor": "#ccc" + }, + "lineStyle": { + "width": "1", + "color": "#ffffff" + }, + "symbolSize": "0", + "symbol": "circle", + "smooth": true, + "color": [ + "#fc97af", + "#87f7cf", + "#f7f494", + "#72ccff", + "#f7c5a0", + "#d4a4eb", + "#d2f5a6", + "#76f2f2" + ], + "label": { + "color": "#293441" + } + }, + "map": { + "itemStyle": { + "areaColor": "#f3f3f3", + "borderColor": "#999999", + "borderWidth": 0.5 + }, + "label": { + "color": "#893448" + }, + "emphasis": { + "itemStyle": { + "areaColor": "rgba(255,178,72,1)", + "borderColor": "#eb8146", + "borderWidth": 1 + }, + "label": { + "color": "rgb(137,52,72)" + } + } + }, + "geo": { + "itemStyle": { + "areaColor": "#f3f3f3", + "borderColor": "#999999", + "borderWidth": 0.5 + }, + "label": { + "color": "#893448" + }, + "emphasis": { + "itemStyle": { + "areaColor": "rgba(255,178,72,1)", + "borderColor": "#eb8146", + "borderWidth": 1 + }, + "label": { + "color": "rgb(137,52,72)" + } + } + }, + "categoryAxis": { + "axisLine": { + "show": true, + "lineStyle": { + "color": "#666666" + } + }, + "axisTick": { + "show": false, + "lineStyle": { + "color": "#333" + } + }, + "axisLabel": { + "show": true, + "color": "#aaaaaa" + }, + "splitLine": { + "show": false, + "lineStyle": { + "color": [ + "#e6e6e6" + ] + } + }, + "splitArea": { + "show": false, + "areaStyle": { + "color": [ + "rgba(250,250,250,0.05)", + "rgba(200,200,200,0.02)" + ] + } + } + }, + "valueAxis": { + "axisLine": { + "show": true, + "lineStyle": { + "color": "#666666" + } + }, + "axisTick": { + "show": false, + "lineStyle": { + "color": "#333" + } + }, + "axisLabel": { + "show": true, + "color": "#aaaaaa" + }, + "splitLine": { + "show": false, + "lineStyle": { + "color": [ + "#e6e6e6" + ] + } + }, + "splitArea": { + "show": false, + "areaStyle": { + "color": [ + "rgba(250,250,250,0.05)", + "rgba(200,200,200,0.02)" + ] + } + } + }, + "logAxis": { + "axisLine": { + "show": true, + "lineStyle": { + "color": "#666666" + } + }, + "axisTick": { + "show": false, + "lineStyle": { + "color": "#333" + } + }, + "axisLabel": { + "show": true, + "color": "#aaaaaa" + }, + "splitLine": { + "show": false, + "lineStyle": { + "color": [ + "#e6e6e6" + ] + } + }, + "splitArea": { + "show": false, + "areaStyle": { + "color": [ + "rgba(250,250,250,0.05)", + "rgba(200,200,200,0.02)" + ] + } + } + }, + "timeAxis": { + "axisLine": { + "show": true, + "lineStyle": { + "color": "#666666" + } + }, + "axisTick": { + "show": false, + "lineStyle": { + "color": "#333" + } + }, + "axisLabel": { + "show": true, + "color": "#aaaaaa" + }, + "splitLine": { + "show": false, + "lineStyle": { + "color": [ + "#e6e6e6" + ] + } + }, + "splitArea": { + "show": false, + "areaStyle": { + "color": [ + "rgba(250,250,250,0.05)", + "rgba(200,200,200,0.02)" + ] + } + } + }, + "toolbox": { + "iconStyle": { + "borderColor": "#999999" + }, + "emphasis": { + "iconStyle": { + "borderColor": "#666666" + } + } + }, + "legend": { + "textStyle": { + "color": "#999999" + } + }, + "tooltip": { + "axisPointer": { + "lineStyle": { + "color": "#cccccc", + "width": 1 + }, + "crossStyle": { + "color": "#cccccc", + "width": 1 + } + } + }, + "timeline": { + "lineStyle": { + "color": "#87f7cf", + "width": 1 + }, + "itemStyle": { + "color": "#87f7cf", + "borderWidth": 1 + }, + "controlStyle": { + "color": "#87f7cf", + "borderColor": "#87f7cf", + "borderWidth": 0.5 + }, + "checkpointStyle": { + "color": "#fc97af", + "borderColor": "#fc97af" + }, + "label": { + "color": "#87f7cf" + }, + "emphasis": { + "itemStyle": { + "color": "#f7f494" + }, + "controlStyle": { + "color": "#87f7cf", + "borderColor": "#87f7cf", + "borderWidth": 0.5 + }, + "label": { + "color": "#87f7cf" + } + } + }, + "visualMap": { + "color": [ + "#fc97af", + "#87f7cf" + ] + }, + "dataZoom": { + "backgroundColor": "rgba(255,255,255,0)", + "dataBackgroundColor": "rgba(114,204,255,1)", + "fillerColor": "rgba(114,204,255,0.2)", + "handleColor": "#72ccff", + "handleSize": "100%", + "textStyle": { + "color": "#333333" + } + }, + "markPoint": { + "label": { + "color": "#293441" + }, + "emphasis": { + "label": { + "color": "#293441" + } + } + } + }); +})); diff --git a/IoTGateway/wwwroot/echarts/echarts.min.js b/IoTGateway/wwwroot/echarts/echarts.min.js new file mode 100644 index 0000000..016dd56 --- /dev/null +++ b/IoTGateway/wwwroot/echarts/echarts.min.js @@ -0,0 +1,45 @@ + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).echarts={})}(this,(function(t){"use strict"; +/*! ***************************************************************************** + Copyright (c) Microsoft Corporation. + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH + REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, + INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + PERFORMANCE OF THIS SOFTWARE. + ***************************************************************************** */var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,n)};function n(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}var i=function(){return(i=Object.assign||function(t){for(var e,n=1,i=arguments.length;n18);a&&(n.weChat=!0);e.canvasSupported=!!document.createElement("canvas").getContext,e.svgSupported="undefined"!=typeof SVGRect,e.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,e.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&+n.version>=11),e.domSupported="undefined"!=typeof document;var s=document.documentElement.style;e.transform3dSupported=(n.ie&&"transition"in s||n.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),e.transformSupported=e.transform3dSupported||n.ie&&+n.version>=9}(navigator.userAgent,a);var s={"[object Function]":!0,"[object RegExp]":!0,"[object Date]":!0,"[object Error]":!0,"[object CanvasGradient]":!0,"[object CanvasPattern]":!0,"[object Image]":!0,"[object Canvas]":!0},l={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0},u=Object.prototype.toString,h=Array.prototype,c=h.forEach,p=h.filter,d=h.slice,f=h.map,g=function(){}.constructor,y=g?g.prototype:null,v={};function m(t,e){v[t]=e}var _=2311;function x(){return _++}function b(){for(var t=[],e=0;e>1)%2;a.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[s]+":0",r[l]+":0",i[1-s]+":auto",r[1-l]+":auto",""].join("!important;"),t.appendChild(a),n.push(a)}return n}(e,o),o,r);if(s)return s(t,n,i),!0}return!1}function Yt(t){return"CANVAS"===t.nodeName.toUpperCase()}var Zt="undefined"!=typeof window&&!!window.addEventListener,jt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,qt=[];function Kt(t,e,n,i){return n=n||{},i||!a.canvasSupported?$t(t,e,n):a.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):$t(t,e,n),n}function $t(t,e,n){if(a.domSupported&&t.getBoundingClientRect){var i=e.clientX,r=e.clientY;if(Yt(t)){var o=t.getBoundingClientRect();return n.zrX=i-o.left,void(n.zrY=r-o.top)}if(Xt(qt,t,i,r))return n.zrX=qt[0],void(n.zrY=qt[1])}n.zrX=n.zrY=0}function Jt(t){return t||window.event}function Qt(t,e,n){if(null!=(e=Jt(e)).zrX)return e;var i=e.type;if(i&&i.indexOf("touch")>=0){var r="touchend"!==i?e.targetTouches[0]:e.changedTouches[0];r&&Kt(t,r,e,n)}else{Kt(t,e,e,n);var o=function(t){var e=t.wheelDelta;if(e)return e;var n=t.deltaX,i=t.deltaY;if(null==n||null==i)return e;return 3*(0!==i?Math.abs(i):Math.abs(n))*(i>0?-1:i<0?1:n>0?-1:1)}(e);e.zrDelta=o?o/120:-(e.detail||0)/3}var a=e.button;return null==e.which&&void 0!==a&&jt.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function te(t,e,n,i){Zt?t.addEventListener(e,n,i):t.attachEvent("on"+e,n)}var ee=Zt?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0};function ne(t){return 2===t.which||3===t.which}var ie=function(){function t(){this._track=[]}return t.prototype.recognize=function(t,e,n){return this._doTrack(t,e,n),this._recognize(t)},t.prototype.clear=function(){return this._track.length=0,this},t.prototype._doTrack=function(t,e,n){var i=t.touches;if(i){for(var r={points:[],touches:[],target:e,event:t},o=0,a=i.length;o1&&r&&r.length>1){var a=re(r)/re(o);!isFinite(a)&&(a=1),e.pinchScale=a;var s=[((i=r)[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2];return e.pinchX=s[0],e.pinchY=s[1],{type:"pinch",target:t[0].target,event:e}}}}},ae="silent";function se(){ee(this.event)}var le=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.handler=null,e}return n(e,t),e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e}(Ft),ue=function(t,e){this.x=t,this.y=e},he=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],ce=function(t){function e(e,n,i,r){var o=t.call(this)||this;return o._hovered=new ue(0,0),o.storage=e,o.painter=n,o.painterRoot=r,i=i||new le,o.proxy=null,o.setHandlerProxy(i),o._draggingMgr=new Bt(o),o}return n(e,t),e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(P(he,(function(e){t.on&&t.on(e,this[e],this)}),this),t.handler=this),this.proxy=t},e.prototype.mousemove=function(t){var e=t.zrX,n=t.zrY,i=de(this,e,n),r=this._hovered,o=r.target;o&&!o.__zr&&(o=(r=this.findHover(r.x,r.y)).target);var a=this._hovered=i?new ue(e,n):this.findHover(e,n),s=a.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),o&&s!==o&&this.dispatchToElement(r,"mouseout",t),this.dispatchToElement(a,"mousemove",t),s&&s!==o&&this.dispatchToElement(a,"mouseover",t)},e.prototype.mouseout=function(t){var e=t.zrEventControl;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&this.trigger("globalout",{type:"globalout",event:t})},e.prototype.resize=function(){this._hovered=new ue(0,0)},e.prototype.dispatch=function(t,e){var n=this[t];n&&n.call(this,e)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},e.prototype.dispatchToElement=function(t,e,n){var i=(t=t||{}).target;if(!i||!i.silent){for(var r="on"+e,o=function(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,stop:se}}(e,t,n);i&&(i[r]&&(o.cancelBubble=!!i[r].call(i,o)),i.trigger(e,o),i=i.__hostTarget?i.__hostTarget:i.parent,!o.cancelBubble););o.cancelBubble||(this.trigger(e,o),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer((function(t){"function"==typeof t[r]&&t[r].call(t,o),t.trigger&&t.trigger(e,o)})))}},e.prototype.findHover=function(t,e,n){for(var i=this.storage.getDisplayList(),r=new ue(t,e),o=i.length-1;o>=0;o--){var a=void 0;if(i[o]!==n&&!i[o].ignore&&(a=pe(i[o],t,e))&&(!r.topTarget&&(r.topTarget=i[o]),a!==ae)){r.target=i[o];break}}return r},e.prototype.processGesture=function(t,e){this._gestureMgr||(this._gestureMgr=new ie);var n=this._gestureMgr;"start"===e&&n.clear();var i=n.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&n.clear(),i){var r=i.type;t.gestureEvent=r;var o=new ue;o.target=i.target,this.dispatchToElement(o,r,i.event)}},e}(Ft);function pe(t,e,n){if(t[t.rectHover?"rectContain":"contain"](e,n)){for(var i=t,r=void 0,o=!1;i;){if(i.ignoreClip&&(o=!0),!o){var a=i.getClipPath();if(a&&!a.contain(e,n))return!1;i.silent&&(r=!0)}var s=i.__hostTarget;i=s||i.parent}return!r||ae}return!1}function de(t,e,n){var i=t.painter;return e<0||e>i.getWidth()||n<0||n>i.getHeight()}P(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(t){ce.prototype[t]=function(e){var n,i,r=e.zrX,o=e.zrY,a=de(this,r,o);if("mouseup"===t&&a||(i=(n=this.findHover(r,o)).target),"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||Lt(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,t,e)}}));function fe(t,e,n,i){var r=e+1;if(r===n)return 1;if(i(t[r++],t[e])<0){for(;r=0;)r++;return r-e}function ge(t,e,n,i,r){for(i===e&&i++;i>>1])<0?l=o:s=o+1;var u=i-s;switch(u){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(;u>0;)t[s+u]=t[s+u-1],u--}t[s]=a}}function ye(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])>0){for(s=i-r;l0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}else{for(s=r+1;ls&&(l=s);var u=a;a=r-l,l=r-u}for(a++;a>>1);o(t,e[n+h])>0?a=h+1:l=h}return l}function ve(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])<0){for(s=r+1;ls&&(l=s);var u=a;a=r-l,l=r-u}else{for(s=i-r;l=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}for(a++;a>>1);o(t,e[n+h])<0?l=h:a=h+1}return l}function me(t,e){var n,i,r=7,o=0;t.length;var a=[];function s(s){var l=n[s],u=i[s],h=n[s+1],c=i[s+1];i[s]=u+c,s===o-3&&(n[s+1]=n[s+2],i[s+1]=i[s+2]),o--;var p=ve(t[h],t,l,u,0,e);l+=p,0!==(u-=p)&&0!==(c=ye(t[l+u-1],t,h,c,c-1,e))&&(u<=c?function(n,i,o,s){var l=0;for(l=0;l=7||d>=7);if(f)break;g<0&&(g=0),g+=2}if((r=g)<1&&(r=1),1===i){for(l=0;l=0;l--)t[d+l]=t[p+l];return void(t[c]=a[h])}var f=r;for(;;){var g=0,y=0,v=!1;do{if(e(a[h],t[u])<0){if(t[c--]=t[u--],g++,y=0,0==--i){v=!0;break}}else if(t[c--]=a[h--],y++,g=0,1==--s){v=!0;break}}while((g|y)=0;l--)t[d+l]=t[p+l];if(0===i){v=!0;break}}if(t[c--]=a[h--],1==--s){v=!0;break}if(0!==(y=s-ye(t[u],a,0,s,s-1,e))){for(s-=y,d=(c-=y)+1,p=(h-=y)+1,l=0;l=7||y>=7);if(v)break;f<0&&(f=0),f+=2}(r=f)<1&&(r=1);if(1===s){for(d=(c-=i)+1,p=(u-=i)+1,l=i-1;l>=0;l--)t[d+l]=t[p+l];t[c]=a[h]}else{if(0===s)throw new Error;for(p=c-(s-1),l=0;l1;){var t=o-2;if(t>=1&&i[t-1]<=i[t]+i[t+1]||t>=2&&i[t-2]<=i[t]+i[t-1])i[t-1]i[t+1])break;s(t)}},forceMergeRuns:function(){for(;o>1;){var t=o-2;t>0&&i[t-1]=32;)e|=1&t,t>>=1;return t+e}(r);do{if((o=fe(t,n,i,e))s&&(l=s),ge(t,n,n+l,n+o,e),o=l}a.pushRun(n,o),a.mergeRuns(),r-=o,n+=o}while(0!==r);a.forceMergeRuns()}}}var xe=!1;function be(){xe||(xe=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function we(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var Se=function(){function t(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=we}return t.prototype.traverse=function(t,e){for(var n=0;n0&&(u.__clipPaths=[]),isNaN(u.z)&&(be(),u.z=0),isNaN(u.z2)&&(be(),u.z2=0),isNaN(u.zlevel)&&(be(),u.zlevel=0),this._displayList[this._displayListLen++]=u}var h=t.getDecalElement&&t.getDecalElement();h&&this._updateAndAddDisplayable(h,e,n);var c=t.getTextGuideLine();c&&this._updateAndAddDisplayable(c,e,n);var p=t.getTextContent();p&&this._updateAndAddDisplayable(p,e,n)}},t.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},t.prototype.delRoot=function(t){if(t instanceof Array)for(var e=0,n=t.length;e=0&&this._roots.splice(i,1)}},t.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},t.prototype.getRoots=function(){return this._roots},t.prototype.dispose=function(){this._displayList=null,this._roots=null},t}(),Me="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)},Ie={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*(2-Math.pow(2,-10*(t-1)))},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;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),-n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4))},elasticOut:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,n=.1,i=.4;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=i*Math.asin(1/n)/(2*Math.PI),(t*=2)<1?n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*-.5:n*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*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?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-Ie.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?.5*Ie.bounceIn(2*t):.5*Ie.bounceOut(2*t-1)+.5}},Te=function(){function t(t){this._initialized=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=null!=t.loop&&t.loop,this.gap=t.gap||0,this.easing=t.easing||"linear",this.onframe=t.onframe,this.ondestroy=t.ondestroy,this.onrestart=t.onrestart}return t.prototype.step=function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),!this._paused){var n=(t-this._startTime-this._pausedTime)/this._life;n<0&&(n=0),n=Math.min(n,1);var i=this.easing,r="string"==typeof i?Ie[i]:i,o="function"==typeof r?r(n):n;if(this.onframe&&this.onframe(o),1===n){if(!this.loop)return!0;this._restart(t),this.onrestart&&this.onrestart()}return!1}this._pausedTime+=e},t.prototype._restart=function(t){var e=(t-this._startTime-this._pausedTime)%this._life;this._startTime=t-e+this.gap,this._pausedTime=0},t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1},t}(),Ce=function(t){this.value=t},De=function(){function t(){this._len=0}return t.prototype.insert=function(t){var e=new Ce(t);return this.insertEntry(e),e},t.prototype.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++},t.prototype.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--},t.prototype.len=function(){return this._len},t.prototype.clear=function(){this.head=this.tail=null,this._len=0},t}(),Ae=function(){function t(t){this._list=new De,this._maxSize=10,this._map={},this._maxSize=t}return t.prototype.put=function(t,e){var n=this._list,i=this._map,r=null;if(null==i[t]){var o=n.len(),a=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var s=n.head;n.remove(s),delete i[s.key],r=s.value,this._lastRemovedEntry=s}a?a.value=e:a=new Ce(e),a.key=t,n.insertEntry(a),i[t]=a}return r},t.prototype.get=function(t){var e=this._map[t],n=this._list;if(null!=e)return e!==n.tail&&(n.remove(e),n.insertEntry(e)),e.value},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t}(),Le={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]};function ke(t){return(t=Math.round(t))<0?0:t>255?255:t}function Pe(t){return t<0?0:t>1?1:t}function Oe(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?ke(parseFloat(e)/100*255):ke(parseInt(e,10))}function Re(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?Pe(parseFloat(e)/100):Pe(parseFloat(e))}function Ne(t,e,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function ze(t,e,n){return t+(e-t)*n}function Ee(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function Ve(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var Be=new Ae(20),Fe=null;function Ge(t,e){Fe&&Ve(Fe,e),Fe=Be.put(t,Fe||e.slice())}function He(t,e){if(t){e=e||[];var n=Be.get(t);if(n)return Ve(e,n);var i=(t+="").replace(/ /g,"").toLowerCase();if(i in Le)return Ve(e,Le[i]),Ge(t,e),e;var r,o=i.length;if("#"===i.charAt(0))return 4===o||5===o?(r=parseInt(i.slice(1,4),16))>=0&&r<=4095?(Ee(e,(3840&r)>>4|(3840&r)>>8,240&r|(240&r)>>4,15&r|(15&r)<<4,5===o?parseInt(i.slice(4),16)/15:1),Ge(t,e),e):void Ee(e,0,0,0,1):7===o||9===o?(r=parseInt(i.slice(1,7),16))>=0&&r<=16777215?(Ee(e,(16711680&r)>>16,(65280&r)>>8,255&r,9===o?parseInt(i.slice(7),16)/255:1),Ge(t,e),e):void Ee(e,0,0,0,1):void 0;var a=i.indexOf("("),s=i.indexOf(")");if(-1!==a&&s+1===o){var l=i.substr(0,a),u=i.substr(a+1,s-(a+1)).split(","),h=1;switch(l){case"rgba":if(4!==u.length)return 3===u.length?Ee(e,+u[0],+u[1],+u[2],1):Ee(e,0,0,0,1);h=Re(u.pop());case"rgb":return 3!==u.length?void Ee(e,0,0,0,1):(Ee(e,Oe(u[0]),Oe(u[1]),Oe(u[2]),h),Ge(t,e),e);case"hsla":return 4!==u.length?void Ee(e,0,0,0,1):(u[3]=Re(u[3]),We(u,e),Ge(t,e),e);case"hsl":return 3!==u.length?void Ee(e,0,0,0,1):(We(u,e),Ge(t,e),e);default:return}}Ee(e,0,0,0,1)}}function We(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=Re(t[1]),r=Re(t[2]),o=r<=.5?r*(i+1):r+i-r*i,a=2*r-o;return Ee(e=e||[],ke(255*Ne(a,o,n+1/3)),ke(255*Ne(a,o,n)),ke(255*Ne(a,o,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function Ue(t,e){var n=He(t);if(n){for(var i=0;i<3;i++)n[i]=e<0?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0,n[i]>255?n[i]=255:n[i]<0&&(n[i]=0);return Je(n,4===n.length?"rgba":"rgb")}}function Xe(t){var e=He(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function Ye(t,e,n){if(e&&e.length&&t>=0&&t<=1){n=n||[];var i=t*(e.length-1),r=Math.floor(i),o=Math.ceil(i),a=e[r],s=e[o],l=i-r;return n[0]=ke(ze(a[0],s[0],l)),n[1]=ke(ze(a[1],s[1],l)),n[2]=ke(ze(a[2],s[2],l)),n[3]=Pe(ze(a[3],s[3],l)),n}}var Ze=Ye;function je(t,e,n){if(e&&e.length&&t>=0&&t<=1){var i=t*(e.length-1),r=Math.floor(i),o=Math.ceil(i),a=He(e[r]),s=He(e[o]),l=i-r,u=Je([ke(ze(a[0],s[0],l)),ke(ze(a[1],s[1],l)),ke(ze(a[2],s[2],l)),Pe(ze(a[3],s[3],l))],"rgba");return n?{color:u,leftIndex:r,rightIndex:o,value:i}:u}}var qe=je;function Ke(t,e,n,i){var r=He(t);if(t)return r=function(t){if(t){var e,n,i=t[0]/255,r=t[1]/255,o=t[2]/255,a=Math.min(i,r,o),s=Math.max(i,r,o),l=s-a,u=(s+a)/2;if(0===l)e=0,n=0;else{n=u<.5?l/(s+a):l/(2-s-a);var h=((s-i)/6+l/2)/l,c=((s-r)/6+l/2)/l,p=((s-o)/6+l/2)/l;i===s?e=p-c:r===s?e=1/3+h-p:o===s&&(e=2/3+c-h),e<0&&(e+=1),e>1&&(e-=1)}var d=[360*e,n,u];return null!=t[3]&&d.push(t[3]),d}}(r),null!=e&&(r[0]=function(t){return(t=Math.round(t))<0?0:t>360?360:t}(e)),null!=n&&(r[1]=Re(n)),null!=i&&(r[2]=Re(i)),Je(We(r),"rgba")}function $e(t,e){var n=He(t);if(n&&null!=e)return n[3]=Pe(e),Je(n,"rgba")}function Je(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 Qe(t,e){var n=He(t);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*e:0}var tn=Object.freeze({__proto__:null,parse:He,lift:Ue,toHex:Xe,fastLerp:Ye,fastMapToColor:Ze,lerp:je,mapToColor:qe,modifyHSL:Ke,modifyAlpha:$e,stringify:Je,lum:Qe,random:function(){return"rgb("+Math.round(255*Math.random())+","+Math.round(255*Math.random())+","+Math.round(255*Math.random())+")"}}),en=Array.prototype.slice;function nn(t,e,n){return(e-t)*n+t}function rn(t,e,n,i){for(var r=e.length,o=0;oa)i.length=a;else for(var s=o;s=2&&this.interpolable},t.prototype.getAdditiveTrack=function(){return this._additiveTrack},t.prototype.addKeyframe=function(t,e){t>=this.maxTime?this.maxTime=t:this._needsSort=!0;var n=this.keyframes,i=n.length;if(this.interpolable)if(k(e)){var r=function(t){return k(t&&t[0])?2:1}(e);if(i>0&&this.arrDim!==r)return void(this.interpolable=!1);if(1===r&&"number"!=typeof e[0]||2===r&&"number"!=typeof e[0][0])return void(this.interpolable=!1);if(i>0){var o=n[i-1];this._isAllValueEqual&&(1===r&&ln(e,o.value)||(this._isAllValueEqual=!1))}this.arrDim=r}else{if(this.arrDim>0)return void(this.interpolable=!1);if("string"==typeof e){var a=He(e);a?(e=a,this.isValueColor=!0):this.interpolable=!1}else if("number"!=typeof e||isNaN(e))return void(this.interpolable=!1);if(this._isAllValueEqual&&i>0){o=n[i-1];(this.isValueColor&&!ln(o.value,e)||o.value!==e)&&(this._isAllValueEqual=!1)}}var s={time:t,value:e,percent:0};return this.keyframes.push(s),s},t.prototype.prepare=function(t){var e=this.keyframes;this._needsSort&&e.sort((function(t,e){return t.time-e.time}));for(var n=this.arrDim,i=e.length,r=e[i-1],o=0;o0&&o!==i-1&&sn(e[o].value,r.value,n);if(t&&this.needsAnimate()&&t.needsAnimate()&&n===t.arrDim&&this.isValueColor===t.isValueColor&&!t._finished){this._additiveTrack=t;var a=e[0].value;for(o=0;o=0&&!(o[n].percent<=e);n--);n=Math.min(n,a-2)}else{for(n=this._lastFrame;ne);n++);n=Math.min(n-1,a-2)}var h=o[n+1],c=o[n];if(c&&h){this._lastFrame=n,this._lastFramePercent=e;var p=h.percent-c.percent;if(0!==p){var d=(e-c.percent)/p,f=i?this._additiveValue:u?gn:t[s];if((l>0||u)&&!f&&(f=this._additiveValue=[]),this.useSpline){var g=o[n][r],y=o[0===n?n:n-1][r],v=o[n>a-2?a-1:n+1][r],m=o[n>a-3?a-1:n+2][r];if(l>0)1===l?hn(f,y,g,v,m,d,d*d,d*d*d):function(t,e,n,i,r,o,a,s){for(var l=e.length,u=e[0].length,h=0;h0)1===l?rn(f,c[r],h[r],d):function(t,e,n,i){for(var r=e.length,o=r&&e[0].length,a=0;a.5?e:t}(c[r],h[r],d),i?this._additiveValue=_:t[s]=_}i&&this._addToTarget(t)}}}},t.prototype._addToTarget=function(t){var e=this.arrDim,n=this.propName,i=this._additiveValue;0===e?this.isValueColor?(He(t[n],gn),on(gn,gn,i,1),t[n]=pn(gn)):t[n]=t[n]+i:1===e?on(t[n],t[n],i,1):2===e&&an(t[n],t[n],i,1)},t}(),vn=function(){function t(t,e,n){this._tracks={},this._trackKeys=[],this._delay=0,this._maxTime=0,this._paused=!1,this._started=0,this._clip=null,this._target=t,this._loop=e,e&&n?b("Can' use additive animation on looped animation."):this._additiveAnimators=n}return t.prototype.getTarget=function(){return this._target},t.prototype.changeTarget=function(t){this._target=t},t.prototype.when=function(t,e){return this.whenWithKeys(t,e,E(e))},t.prototype.whenWithKeys=function(t,e,n){for(var i=this._tracks,r=0;r0)){this._started=1;for(var n=this,i=[],r=0;r1){var a=o.pop();r.addKeyframe(a.time,t[i]),r.prepare(r.getAdditiveTrack())}}}},t}(),mn=function(t){function e(e){var n=t.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,e=e||{},n.stage=e.stage||{},n.onframe=e.onframe||function(){},n}return n(e,t),e.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._clipsHead?(this._clipsTail.next=t,t.prev=this._clipsTail,t.next=null,this._clipsTail=t):this._clipsHead=this._clipsTail=t,t.animation=this},e.prototype.addAnimator=function(t){t.animation=this;var e=t.getClip();e&&this.addClip(e)},e.prototype.removeClip=function(t){if(t.animation){var e=t.prev,n=t.next;e?e.next=n:this._clipsHead=n,n?n.prev=e:this._clipsTail=e,t.next=t.prev=t.animation=null}},e.prototype.removeAnimator=function(t){var e=t.getClip();e&&this.removeClip(e),t.animation=null},e.prototype.update=function(t){for(var e=(new Date).getTime()-this._pausedTime,n=e-this._time,i=this._clipsHead;i;){var r=i.next;i.step(e,n)?(i.ondestroy&&i.ondestroy(),this.removeClip(i),i=r):i=r}this._time=e,t||(this.onframe(n),this.trigger("frame",n),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0,Me((function e(){t._running&&(Me(e),!t._paused&&t.update())}))},e.prototype.start=function(){this._running||(this._time=(new Date).getTime(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=(new Date).getTime(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=(new Date).getTime()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._clipsHead;t;){var e=t.next;t.prev=t.next=t.animation=null,t=e}this._clipsHead=this._clipsTail=null},e.prototype.isFinished=function(){return null==this._clipsHead},e.prototype.animate=function(t,e){e=e||{},this.start();var n=new vn(t,e.loop);return this.addAnimator(n),n},e}(Ft),_n=a.domSupported,xn=(fn={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:dn=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:O(dn,(function(t){var e=t.replace("mouse","pointer");return fn.hasOwnProperty(e)?e:t}))}),bn=["mousemove","mouseup"],wn=["pointermove","pointerup"],Sn=!1;function Mn(t){var e=t.pointerType;return"pen"===e||"touch"===e}function In(t){t&&(t.zrByTouch=!0)}function Tn(t,e){for(var n=e,i=!1;n&&9!==n.nodeType&&!(i=n.domBelongToZr||n!==e&&n===t.painterRoot);)n=n.parentNode;return i}var Cn=function(t,e){this.stopPropagation=ft,this.stopImmediatePropagation=ft,this.preventDefault=ft,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY},Dn={mousedown:function(t){t=Qt(this.dom,t),this.__mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=Qt(this.dom,t);var e=this.__mayPointerCapture;!e||t.zrX===e[0]&&t.zrY===e[1]||this.__togglePointerCapture(!0),this.trigger("mousemove",t)},mouseup:function(t){t=Qt(this.dom,t),this.__togglePointerCapture(!1),this.trigger("mouseup",t)},mouseout:function(t){Tn(this,(t=Qt(this.dom,t)).toElement||t.relatedTarget)||(this.__pointerCapturing&&(t.zrEventControl="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){Sn=!0,t=Qt(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){Sn||(t=Qt(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){In(t=Qt(this.dom,t)),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),Dn.mousemove.call(this,t),Dn.mousedown.call(this,t)},touchmove:function(t){In(t=Qt(this.dom,t)),this.handler.processGesture(t,"change"),Dn.mousemove.call(this,t)},touchend:function(t){In(t=Qt(this.dom,t)),this.handler.processGesture(t,"end"),Dn.mouseup.call(this,t),+new Date-+this.__lastTouchMoment<300&&Dn.click.call(this,t)},pointerdown:function(t){Dn.mousedown.call(this,t)},pointermove:function(t){Mn(t)||Dn.mousemove.call(this,t)},pointerup:function(t){Dn.mouseup.call(this,t)},pointerout:function(t){Mn(t)||Dn.mouseout.call(this,t)}};P(["click","dblclick","contextmenu"],(function(t){Dn[t]=function(e){e=Qt(this.dom,e),this.trigger(t,e)}}));var An={pointermove:function(t){Mn(t)||An.mousemove.call(this,t)},pointerup:function(t){An.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}};function Ln(t,e){var n=e.domHandlers;a.pointerEventsSupported?P(xn.pointer,(function(i){Pn(e,i,(function(e){n[i].call(t,e)}))})):(a.touchEventsSupported&&P(xn.touch,(function(i){Pn(e,i,(function(r){n[i].call(t,r),function(t){t.touching=!0,null!=t.touchTimer&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout((function(){t.touching=!1,t.touchTimer=null}),700)}(e)}))})),P(xn.mouse,(function(i){Pn(e,i,(function(r){r=Jt(r),e.touching||n[i].call(t,r)}))})))}function kn(t,e){function n(n){Pn(e,n,(function(i){i=Jt(i),Tn(t,i.target)||(i=function(t,e){return Qt(t.dom,new Cn(t,e),!0)}(t,i),e.domHandlers[n].call(t,i))}),{capture:!0})}a.pointerEventsSupported?P(wn,n):a.touchEventsSupported||P(bn,n)}function Pn(t,e,n,i){t.mounted[e]=n,t.listenerOpts[e]=i,te(t.domTarget,e,n,i)}function On(t){var e,n,i,r,o=t.mounted;for(var a in o)o.hasOwnProperty(a)&&(e=t.domTarget,n=a,i=o[a],r=t.listenerOpts[a],Zt?e.removeEventListener(n,i,r):e.detachEvent("on"+n,i));t.mounted={}}var Rn=function(t,e){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=e},Nn=function(t){function e(e,n){var i=t.call(this)||this;return i.__pointerCapturing=!1,i.dom=e,i.painterRoot=n,i._localHandlerScope=new Rn(e,Dn),_n&&(i._globalHandlerScope=new Rn(document,An)),Ln(i,i._localHandlerScope),i}return n(e,t),e.prototype.dispose=function(){On(this._localHandlerScope),_n&&On(this._globalHandlerScope)},e.prototype.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},e.prototype.__togglePointerCapture=function(t){if(this.__mayPointerCapture=null,_n&&+this.__pointerCapturing^+t){this.__pointerCapturing=t;var e=this._globalHandlerScope;t?kn(this,e):On(e)}},e}(Ft),zn=1;"undefined"!=typeof window&&(zn=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var En=zn,Vn="#333",Bn="#ccc";function Fn(){return[1,0,0,1,0,0]}function Gn(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function Hn(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 Wn(t,e,n){var i=e[0]*n[0]+e[2]*n[1],r=e[1]*n[0]+e[3]*n[1],o=e[0]*n[2]+e[2]*n[3],a=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]=o,t[3]=a,t[4]=s,t[5]=l,t}function Un(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 Xn(t,e,n){var i=e[0],r=e[2],o=e[4],a=e[1],s=e[3],l=e[5],u=Math.sin(n),h=Math.cos(n);return t[0]=i*h+a*u,t[1]=-i*u+a*h,t[2]=r*h+s*u,t[3]=-r*u+h*s,t[4]=h*o+u*l,t[5]=h*l-u*o,t}function Yn(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 Zn(t,e){var n=e[0],i=e[2],r=e[4],o=e[1],a=e[3],s=e[5],l=n*a-o*i;return l?(l=1/l,t[0]=a*l,t[1]=-o*l,t[2]=-i*l,t[3]=n*l,t[4]=(i*s-a*r)*l,t[5]=(o*r-n*s)*l,t):null}function jn(t){var e=[1,0,0,1,0,0];return Hn(e,t),e}var qn=Object.freeze({__proto__:null,create:Fn,identity:Gn,copy:Hn,mul:Wn,translate:Un,rotate:Xn,scale:Yn,invert:Zn,clone:jn}),Kn=Gn,$n=5e-5;function Jn(t){return t>$n||t<-5e-5}var Qn,ti,ei=[],ni=[],ii=[1,0,0,1,0,0],ri=Math.abs,oi=function(){function t(){}return t.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},t.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},t.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},t.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},t.prototype.needLocalTransform=function(){return Jn(this.rotation)||Jn(this.x)||Jn(this.y)||Jn(this.scaleX-1)||Jn(this.scaleY-1)},t.prototype.updateTransform=function(){var t=this.parent,e=t&&t.transform,n=this.needLocalTransform(),i=this.transform;n||e?(i=i||[1,0,0,1,0,0],n?this.getLocalTransform(i):Kn(i),e&&(n?Wn(i,t.transform,i):Hn(i,t.transform)),this.transform=i,this._resolveGlobalScaleRatio(i)):i&&Kn(i)},t.prototype._resolveGlobalScaleRatio=function(t){var e=this.globalScaleRatio;if(null!=e&&1!==e){this.getGlobalScale(ei);var n=ei[0]<0?-1:1,i=ei[1]<0?-1:1,r=((ei[0]-n)*e+n)/ei[0]||0,o=((ei[1]-i)*e+i)/ei[1]||0;t[0]*=r,t[1]*=r,t[2]*=o,t[3]*=o}this.invTransform=this.invTransform||[1,0,0,1,0,0],Zn(this.invTransform,t)},t.prototype.getLocalTransform=function(e){return t.getLocalTransform(this,e)},t.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},t.prototype.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3],i=Math.atan2(t[1],t[0]),r=Math.PI/2+i-Math.atan2(t[3],t[2]);n=Math.sqrt(n)*Math.cos(r),e=Math.sqrt(e),this.skewX=r,this.skewY=0,this.rotation=-i,this.x=+t[4],this.y=+t[5],this.scaleX=e,this.scaleY=n,this.originX=0,this.originY=0}},t.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(Wn(ni,t.invTransform,e),e=ni);var n=this.originX,i=this.originY;(n||i)&&(ii[4]=n,ii[5]=i,Wn(ni,e,ii),ni[4]-=n,ni[5]-=i,e=ni),this.setLocalTransform(e)}},t.prototype.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},t.prototype.transformCoordToLocal=function(t,e){var n=[t,e],i=this.invTransform;return i&&Rt(n,n,i),n},t.prototype.transformCoordToGlobal=function(t,e){var n=[t,e],i=this.transform;return i&&Rt(n,n,i),n},t.prototype.getLineScale=function(){var t=this.transform;return t&&ri(t[0]-1)>1e-10&&ri(t[3]-1)>1e-10?Math.sqrt(ri(t[0]*t[3]-t[2]*t[1])):1},t.getLocalTransform=function(t,e){e=e||[];var n=t.originX||0,i=t.originY||0,r=t.scaleX,o=t.scaleY,a=t.rotation||0,s=t.x,l=t.y,u=t.skewX?Math.tan(t.skewX):0,h=t.skewY?Math.tan(-t.skewY):0;return n||i?(e[4]=-n*r-u*i*o,e[5]=-i*o-h*n*r):e[4]=e[5]=0,e[0]=r,e[3]=o,e[1]=h*r,e[2]=u*o,a&&Xn(e,e,a),e[4]+=n+s,e[5]+=i+l,e},t.initDefaultProps=function(){var e=t.prototype;e.x=0,e.y=0,e.scaleX=1,e.scaleY=1,e.originX=0,e.originY=0,e.skewX=0,e.skewY=0,e.rotation=0,e.globalScaleRatio=1}(),t}(),ai=function(){function t(t,e){this.x=t||0,this.y=e||0}return t.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.set=function(t,e){return this.x=t,this.y=e,this},t.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},t.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},t.prototype.scale=function(t){this.x*=t,this.y*=t},t.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},t.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},t.prototype.dot=function(t){return this.x*t.x+this.y*t.y},t.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},t.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},t.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},t.prototype.distance=function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},t.prototype.distanceSquare=function(t){var e=this.x-t.x,n=this.y-t.y;return e*e+n*n},t.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},t.prototype.transform=function(t){if(t){var e=this.x,n=this.y;return this.x=t[0]*e+t[2]*n+t[4],this.y=t[1]*e+t[3]*n+t[5],this}},t.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},t.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},t.set=function(t,e,n){t.x=e,t.y=n},t.copy=function(t,e){t.x=e.x,t.y=e.y},t.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},t.lenSquare=function(t){return t.x*t.x+t.y*t.y},t.dot=function(t,e){return t.x*e.x+t.y*e.y},t.add=function(t,e,n){t.x=e.x+n.x,t.y=e.y+n.y},t.sub=function(t,e,n){t.x=e.x-n.x,t.y=e.y-n.y},t.scale=function(t,e,n){t.x=e.x*n,t.y=e.y*n},t.scaleAndAdd=function(t,e,n,i){t.x=e.x+n.x*i,t.y=e.y+n.y*i},t.lerp=function(t,e,n,i){var r=1-i;t.x=r*e.x+i*n.x,t.y=r*e.y+i*n.y},t}(),si=Math.min,li=Math.max,ui=new ai,hi=new ai,ci=new ai,pi=new ai,di=new ai,fi=new ai,gi=function(){function t(t,e,n,i){n<0&&(t+=n,n=-n),i<0&&(e+=i,i=-i),this.x=t,this.y=e,this.width=n,this.height=i}return t.prototype.union=function(t){var e=si(t.x,this.x),n=si(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=li(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=li(t.y+t.height,this.y+this.height)-n:this.height=t.height,this.x=e,this.y=n},t.prototype.applyTransform=function(e){t.applyTransform(this,this,e)},t.prototype.calculateTransform=function(t){var e=this,n=t.width/e.width,i=t.height/e.height,r=[1,0,0,1,0,0];return Un(r,r,[-e.x,-e.y]),Yn(r,r,[n,i]),Un(r,r,[t.x,t.y]),r},t.prototype.intersect=function(e,n){if(!e)return!1;e instanceof t||(e=t.create(e));var i=this,r=i.x,o=i.x+i.width,a=i.y,s=i.y+i.height,l=e.x,u=e.x+e.width,h=e.y,c=e.y+e.height,p=!(of&&(f=_,gf&&(f=x,v=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(e){t.copy(this,e)},t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},t.prototype.isZero=function(){return 0===this.width||0===this.height},t.create=function(e){return new t(e.x,e.y,e.width,e.height)},t.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},t.applyTransform=function(e,n,i){if(i){if(i[1]<1e-5&&i[1]>-1e-5&&i[2]<1e-5&&i[2]>-1e-5){var r=i[0],o=i[3],a=i[4],s=i[5];return e.x=n.x*r+a,e.y=n.y*o+s,e.width=n.width*r,e.height=n.height*o,e.width<0&&(e.x+=e.width,e.width=-e.width),void(e.height<0&&(e.y+=e.height,e.height=-e.height))}ui.x=ci.x=n.x,ui.y=pi.y=n.y,hi.x=pi.x=n.x+n.width,hi.y=ci.y=n.y+n.height,ui.transform(i),pi.transform(i),hi.transform(i),ci.transform(i),e.x=si(ui.x,hi.x,ci.x,pi.x),e.y=si(ui.y,hi.y,ci.y,pi.y);var l=li(ui.x,hi.x,ci.x,pi.x),u=li(ui.y,hi.y,ci.y,pi.y);e.width=l-e.x,e.height=u-e.y}else e!==n&&t.copy(e,n)},t}(),yi={},vi="12px sans-serif";var mi={measureText:function(t,e){return Qn||(Qn=C().getContext("2d")),ti!==e&&(ti=Qn.font=e||vi),Qn.measureText(t)}};function _i(t,e){var n=yi[e=e||vi];n||(n=yi[e]=new Ae(500));var i=n.get(t);return null==i&&(i=mi.measureText(t,e).width,n.put(t,i)),i}function xi(t,e,n,i){var r=_i(t,e),o=Mi(e),a=wi(0,r,n),s=Si(0,o,i);return new gi(a,s,r,o)}function bi(t,e,n,i){var r=((t||"")+"").split("\n");if(1===r.length)return xi(r[0],e,n,i);for(var o=new gi(0,0,0,0),a=0;a=0?parseFloat(t)/100*e:parseFloat(t):t}function Ti(t,e,n){var i=e.position||"inside",r=null!=e.distance?e.distance:5,o=n.height,a=n.width,s=o/2,l=n.x,u=n.y,h="left",c="top";if(i instanceof Array)l+=Ii(i[0],n.width),u+=Ii(i[1],n.height),h=null,c=null;else switch(i){case"left":l-=r,u+=s,h="right",c="middle";break;case"right":l+=r+a,u+=s,c="middle";break;case"top":l+=a/2,u-=r,h="center",c="bottom";break;case"bottom":l+=a/2,u+=o+r,h="center";break;case"inside":l+=a/2,u+=s,h="center",c="middle";break;case"insideLeft":l+=r,u+=s,c="middle";break;case"insideRight":l+=a-r,u+=s,h="right",c="middle";break;case"insideTop":l+=a/2,u+=r,h="center";break;case"insideBottom":l+=a/2,u+=o-r,h="center",c="bottom";break;case"insideTopLeft":l+=r,u+=r;break;case"insideTopRight":l+=a-r,u+=r,h="right";break;case"insideBottomLeft":l+=r,u+=o-r,c="bottom";break;case"insideBottomRight":l+=a-r,u+=o-r,h="right",c="bottom"}return(t=t||{}).x=l,t.y=u,t.align=h,t.verticalAlign=c,t}var Ci="__zr_normal__",Di=["x","y","scaleX","scaleY","originX","originY","rotation","ignore"],Ai={x:!0,y:!0,scaleX:!0,scaleY:!0,originX:!0,originY:!0,rotation:!0,ignore:!1},Li={},ki=new gi(0,0,0,0),Pi=function(){function t(t){this.id=x(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return t.prototype._init=function(t){this.attr(t)},t.prototype.drift=function(t,e,n){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=e,this.decomposeTransform(),this.markRedraw()},t.prototype.beforeUpdate=function(){},t.prototype.afterUpdate=function(){},t.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},t.prototype.updateInnerText=function(t){var e=this._textContent;if(e&&(!e.ignore||t)){this.textConfig||(this.textConfig={});var n=this.textConfig,i=n.local,r=e.attachedTransform,o=void 0,a=void 0,s=!1;r.parent=i?this:null;var l=!1;if(r.x=e.x,r.y=e.y,r.originX=e.originX,r.originY=e.originY,r.rotation=e.rotation,r.scaleX=e.scaleX,r.scaleY=e.scaleY,null!=n.position){var u=ki;n.layoutRect?u.copy(n.layoutRect):u.copy(this.getBoundingRect()),i||u.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(Li,n,u):Ti(Li,n,u),r.x=Li.x,r.y=Li.y,o=Li.align,a=Li.verticalAlign;var h=n.origin;if(h&&null!=n.rotation){var c=void 0,p=void 0;"center"===h?(c=.5*u.width,p=.5*u.height):(c=Ii(h[0],u.width),p=Ii(h[1],u.height)),l=!0,r.originX=-r.x+c+(i?0:u.x),r.originY=-r.y+p+(i?0:u.y)}}null!=n.rotation&&(r.rotation=n.rotation);var d=n.offset;d&&(r.x+=d[0],r.y+=d[1],l||(r.originX=-d[0],r.originY=-d[1]));var f=null==n.inside?"string"==typeof n.position&&n.position.indexOf("inside")>=0:n.inside,g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),y=void 0,v=void 0,m=void 0;f&&this.canBeInsideText()?(y=n.insideFill,v=n.insideStroke,null!=y&&"auto"!==y||(y=this.getInsideTextFill()),null!=v&&"auto"!==v||(v=this.getInsideTextStroke(y),m=!0)):(y=n.outsideFill,v=n.outsideStroke,null!=y&&"auto"!==y||(y=this.getOutsideFill()),null!=v&&"auto"!==v||(v=this.getOutsideStroke(y),m=!0)),(y=y||"#000")===g.fill&&v===g.stroke&&m===g.autoStroke&&o===g.align&&a===g.verticalAlign||(s=!0,g.fill=y,g.stroke=v,g.autoStroke=m,g.align=o,g.verticalAlign=a,e.setDefaultTextStyle(g)),e.__dirty|=1,s&&e.dirtyStyle(!0)}},t.prototype.canBeInsideText=function(){return!0},t.prototype.getInsideTextFill=function(){return"#fff"},t.prototype.getInsideTextStroke=function(t){return"#000"},t.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Bn:Vn},t.prototype.getOutsideStroke=function(t){var e=this.__zr&&this.__zr.getBackgroundColor(),n="string"==typeof e&&He(e);n||(n=[255,255,255,1]);for(var i=n[3],r=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*i+(r?0:255)*(1-i);return n[3]=1,Je(n,"rgba")},t.prototype.traverse=function(t,e){},t.prototype.attrKV=function(t,e){"textConfig"===t?this.setTextConfig(e):"textContent"===t?this.setTextContent(e):"clipPath"===t?this.setClipPath(e):"extra"===t?(this.extra=this.extra||{},I(this.extra,e)):this[t]=e},t.prototype.hide=function(){this.ignore=!0,this.markRedraw()},t.prototype.show=function(){this.ignore=!1,this.markRedraw()},t.prototype.attr=function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(X(t))for(var n=E(t),i=0;i0},t.prototype.getState=function(t){return this.states[t]},t.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},t.prototype.clearStates=function(t){this.useState(Ci,!1,t)},t.prototype.useState=function(t,e,n,i){var r=t===Ci;if(this.hasState()||!r){var o=this.currentStates,a=this.stateTransition;if(!(D(o,t)>=0)||!e&&1!==o.length){var s;if(this.stateProxy&&!r&&(s=this.stateProxy(t)),s||(s=this.states&&this.states[t]),s||r){r||this.saveCurrentToNormalState(s);var l=!!(s&&s.hoverLayer||i);l&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,s,this._normalState,e,!n&&!this.__inHover&&a&&a.duration>0,a);var u=this._textContent,h=this._textGuide;return u&&u.useState(t,e,n,l),h&&h.useState(t,e,n,l),r?(this.currentStates=[],this._normalState={}):e?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2),s}b("State "+t+" not exists.")}}},t.prototype.useStates=function(t,e,n){if(t.length){var i=[],r=this.currentStates,o=t.length,a=o===r.length;if(a)for(var s=0;s0,d);var f=this._textContent,g=this._textGuide;f&&f.useStates(t,e,c),g&&g.useStates(t,e,c),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2)}else this.clearStates()},t.prototype._updateAnimationTargets=function(){for(var t=0;t=0){var n=this.currentStates.slice();n.splice(e,1),this.useStates(n)}},t.prototype.replaceState=function(t,e,n){var i=this.currentStates.slice(),r=D(i,t),o=D(i,e)>=0;r>=0?o?i.splice(r,1):i[r]=e:n&&!o&&i.push(e),this.useStates(i)},t.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},t.prototype._mergeStates=function(t){for(var e,n={},i=0;i=0&&e.splice(n,1)})),this.animators.push(t),n&&n.animation.addAnimator(t),n&&n.wakeUp()},t.prototype.updateDuringAnimation=function(t){this.markRedraw()},t.prototype.stopAnimation=function(t,e){for(var n=this.animators,i=n.length,r=[],o=0;o8)&&(r("position","_legacyPos","x","y"),r("scale","_legacyScale","scaleX","scaleY"),r("origin","_legacyOrigin","originX","originY"))}(),t}();function Oi(t,e,n,i,r){var o=[];zi(t,"",t,e,n=n||{},i,o,r);var a=o.length,s=!1,l=n.done,u=n.aborted,h=function(){s=!0,--a<=0&&(s?l&&l():u&&u())},c=function(){--a<=0&&(s?l&&l():u&&u())};a||l&&l(),o.length>0&&n.during&&o[0].during((function(t,e){n.during(e)}));for(var p=0;p0||r.force&&!a.length){for(var m=t.animators,_=[],x=0;x=0&&(n.splice(i,0,t),this._doAdd(t))}return this},e.prototype.replaceAt=function(t,e){var n=this._children,i=n[e];if(t&&t!==this&&t.parent!==this&&t!==i){n[e]=t,i.parent=null;var r=this.__zr;r&&i.removeSelfFromZr(r),this._doAdd(t)}return this},e.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__zr;e&&e!==t.__zr&&t.addSelfToZr(e),e&&e.refresh()},e.prototype.remove=function(t){var e=this.__zr,n=this._children,i=D(n,t);return i<0||(n.splice(i,1),t.parent=null,e&&t.removeSelfFromZr(e),e&&e.refresh()),this},e.prototype.removeAll=function(){for(var t=this._children,e=this.__zr,n=0;n0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},t.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},t.prototype.wakeUp=function(){this.animation.start(),this._stillFrameAccum=0},t.prototype.addHover=function(t){},t.prototype.removeHover=function(t){},t.prototype.clearHover=function(){},t.prototype.refreshHover=function(){this._needsRefreshHover=!0},t.prototype.refreshHoverImmediately=function(){this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover()},t.prototype.resize=function(t){t=t||{},this.painter.resize(t.width,t.height),this.handler.resize()},t.prototype.clearAnimation=function(){this.animation.clear()},t.prototype.getWidth=function(){return this.painter.getWidth()},t.prototype.getHeight=function(){return this.painter.getHeight()},t.prototype.pathToImage=function(t,e){if(this.painter.pathToImage)return this.painter.pathToImage(t,e)},t.prototype.setCursorStyle=function(t){this.handler.setCursorStyle(t)},t.prototype.findHover=function(t,e){return this.handler.findHover(t,e)},t.prototype.on=function(t,e,n){return this.handler.on(t,e,n),this},t.prototype.off=function(t,e){this.handler.off(t,e)},t.prototype.trigger=function(t,e){this.handler.trigger(t,e)},t.prototype.clear=function(){for(var t=this.storage.getRoots(),e=0;e0){if(t<=r)return a;if(t>=o)return s}else{if(t>=r)return a;if(t<=o)return s}else{if(t===r)return a;if(t===o)return s}return(t-r)/l*u+a}function Zi(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?(n=t,n.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t;var n}function ji(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),n?t:+t}function qi(t){return t.sort((function(t,e){return t-e})),t}function Ki(t){if(t=+t,isNaN(t))return 0;if(t>1e-14)for(var e=1,n=0;n<15;n++,e*=10)if(Math.round(t*e)/e===t)return n;return $i(t)}function $i(t){var e=t.toString().toLowerCase(),n=e.indexOf("e"),i=n>0?+e.slice(n+1):0,r=n>0?n:e.length,o=e.indexOf("."),a=o<0?0:r-1-o;return Math.max(0,a-i)}function Ji(t,e){var n=Math.log,i=Math.LN10,r=Math.floor(n(t[1]-t[0])/i),o=Math.round(n(Math.abs(e[1]-e[0]))/i),a=Math.min(Math.max(-r+o,0),20);return isFinite(a)?a:20}function Qi(t,e,n){if(!t[e])return 0;var i=R(t,(function(t,e){return t+(isNaN(e)?0:e)}),0);if(0===i)return 0;for(var r=Math.pow(10,n),o=O(t,(function(t){return(isNaN(t)?0:t)/i*r*100})),a=100*r,s=O(o,(function(t){return Math.floor(t)})),l=R(s,(function(t,e){return t+e}),0),u=O(o,(function(t,e){return t-s[e]}));lh&&(h=u[p],c=p);++s[c],u[c]=0,++l}return s[e]/r}function tr(t,e){var n=Math.max(Ki(t),Ki(e)),i=t+e;return n>20?i:ji(i,n)}var er=9007199254740991;function nr(t){var e=2*Math.PI;return(t%e+e)%e}function ir(t){return t>-1e-4&&t=10&&e++,e}function lr(t,e){var n=sr(t),i=Math.pow(10,n),r=t/i;return t=(e?r<1.5?1:r<2.5?2:r<4?3:r<7?5:10:r<1?1:r<2?2:r<3?3:r<5?5:10)*i,n>=-20?+t.toFixed(n<0?-n:0):t}function ur(t,e){var n=(t.length-1)*e+1,i=Math.floor(n),r=+t[i-1],o=n-i;return o?r+o*(t[i]-r):r}function hr(t){t.sort((function(t,e){return s(t,e,0)?-1:1}));for(var e=-1/0,n=1,i=0;i=0||r&&D(r,s)<0)){var l=n.getShallow(s,e);null!=l&&(o[t[a][0]]=l)}}return o}}var Jr=$r([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),Qr=function(){function t(){}return t.prototype.getAreaStyle=function(t,e){return Jr(this,t,e)},t}(),to=new Ae(50);function eo(t){if("string"==typeof t){var e=to.get(t);return e&&e.image}return t}function no(t,e,n,i,r){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!n)return e;var o=to.get(t),a={hostEl:n,cb:i,cbPayload:r};return o?!ro(e=o.image)&&o.pending.push(a):((e=new Image).onload=e.onerror=io,to.put(t,e.__cachedImgObj={image:e,pending:[a]}),e.src=e.__zrImageSrc=t),e}return t}return e}function io(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e=a;l++)s-=a;var u=_i(n,e);return u>s&&(n="",u=0),s=t-u,r.ellipsis=n,r.ellipsisWidth=u,r.contentWidth=s,r.containerWidth=t,r}function lo(t,e){var n=e.containerWidth,i=e.font,r=e.contentWidth;if(!n)return"";var o=_i(t,i);if(o<=n)return t;for(var a=0;;a++){if(o<=r||a>=e.maxIterations){t+=e.ellipsis;break}var s=0===a?uo(t,r,e.ascCharWidth,e.cnCharWidth):o>0?Math.floor(t.length*r/o):0;o=_i(t=t.substr(0,s),i)}return""===t&&(t=e.placeholder),t}function uo(t,e,n,i){for(var r=0,o=0,a=t.length;o0&&f+i.accumWidth>i.width&&(o=e.split("\n"),c=!0),i.accumWidth=f}else{var g=vo(e,h,i.width,i.breakAll,i.accumWidth);i.accumWidth=g.accumWidth+d,a=g.linesWidths,o=g.lines}}else o=e.split("\n");for(var y=0;y=33&&e<=255}(t)||!!go[t]}function vo(t,e,n,i,r){for(var o=[],a=[],s="",l="",u=0,h=0,c=0;cn:r+h+d>n)?h?(s||l)&&(f?(s||(s=l,l="",h=u=0),o.push(s),a.push(h-u),l+=p,s="",h=u+=d):(l&&(s+=l,h+=u,l="",u=0),o.push(s),a.push(h),s=p,h=d)):f?(o.push(l),a.push(u),l=p,u=d):(o.push(p),a.push(d)):(h+=d,f?(l+=p,u+=d):(l&&(s+=l,l="",u=0),s+=p))}else l&&(s+=l,h+=u),o.push(s),a.push(h),s="",l="",u=0,h=0}return o.length||s||(s=t,l="",u=0),l&&(s+=l),s&&(o.push(s),a.push(h)),1===o.length&&(h+=r),{accumWidth:h,lines:o,linesWidths:a}}var mo="__zr_style_"+Math.round(10*Math.random()),_o={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},xo={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};_o[mo]=!0;var bo=["z","z2","invisible"],wo=["invisible"],So=function(t){function e(e){return t.call(this,e)||this}var i;return n(e,t),e.prototype._init=function(e){for(var n=E(e),i=0;i-1e-8&&tDo||t<-1e-8}function Eo(t,e,n,i,r){var o=1-r;return o*o*(o*t+3*r*e)+r*r*(r*i+3*o*n)}function Vo(t,e,n,i,r){var o=1-r;return 3*(((e-t)*o+2*(n-e)*r)*o+(i-n)*r*r)}function Bo(t,e,n,i,r,o){var a=i+3*(e-n)-t,s=3*(n-2*e+t),l=3*(e-t),u=t-r,h=s*s-3*a*l,c=s*l-9*a*u,p=l*l-3*s*u,d=0;if(No(h)&&No(c)){if(No(s))o[0]=0;else(M=-l/s)>=0&&M<=1&&(o[d++]=M)}else{var f=c*c-4*h*p;if(No(f)){var g=c/h,y=-g/2;(M=-s/a+g)>=0&&M<=1&&(o[d++]=M),y>=0&&y<=1&&(o[d++]=y)}else if(f>0){var v=Co(f),m=h*s+1.5*a*(-c+v),_=h*s+1.5*a*(-c-v);(M=(-s-((m=m<0?-To(-m,ko):To(m,ko))+(_=_<0?-To(-_,ko):To(_,ko))))/(3*a))>=0&&M<=1&&(o[d++]=M)}else{var x=(2*h*s-3*a*c)/(2*Co(h*h*h)),b=Math.acos(x)/3,w=Co(h),S=Math.cos(b),M=(-s-2*w*S)/(3*a),I=(y=(-s+w*(S+Lo*Math.sin(b)))/(3*a),(-s+w*(S-Lo*Math.sin(b)))/(3*a));M>=0&&M<=1&&(o[d++]=M),y>=0&&y<=1&&(o[d++]=y),I>=0&&I<=1&&(o[d++]=I)}}return d}function Fo(t,e,n,i,r){var o=6*n-12*e+6*t,a=9*e+3*i-3*t-9*n,s=3*e-3*t,l=0;if(No(a)){if(zo(o))(h=-s/o)>=0&&h<=1&&(r[l++]=h)}else{var u=o*o-4*a*s;if(No(u))r[0]=-o/(2*a);else if(u>0){var h,c=Co(u),p=(-o-c)/(2*a);(h=(-o+c)/(2*a))>=0&&h<=1&&(r[l++]=h),p>=0&&p<=1&&(r[l++]=p)}}return l}function Go(t,e,n,i,r,o){var a=(e-t)*r+t,s=(n-e)*r+e,l=(i-n)*r+n,u=(s-a)*r+a,h=(l-s)*r+s,c=(h-u)*r+u;o[0]=t,o[1]=a,o[2]=u,o[3]=c,o[4]=c,o[5]=h,o[6]=l,o[7]=i}function Ho(t,e,n,i,r,o,a,s,l,u,h){var c,p,d,f,g,y=.005,v=1/0;Po[0]=l,Po[1]=u;for(var m=0;m<1;m+=.05)Oo[0]=Eo(t,n,r,a,m),Oo[1]=Eo(e,i,o,s,m),(f=Pt(Po,Oo))=0&&f=0&&y1e-4)return s[0]=t-n,s[1]=e-i,l[0]=t+n,void(l[1]=e+i);if(ea[0]=Qo(r)*n+t,ea[1]=Jo(r)*i+e,na[0]=Qo(o)*n+t,na[1]=Jo(o)*i+e,u(s,ea,na),h(l,ea,na),(r%=ta)<0&&(r+=ta),(o%=ta)<0&&(o+=ta),r>o&&!a?o+=ta:rr&&(ia[0]=Qo(d)*n+t,ia[1]=Jo(d)*i+e,u(s,ia,s),h(l,ia,l))}var ca={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},pa=[],da=[],fa=[],ga=[],ya=[],va=[],ma=Math.min,_a=Math.max,xa=Math.cos,ba=Math.sin,wa=Math.sqrt,Sa=Math.abs,Ma=Math.PI,Ia=2*Ma,Ta="undefined"!=typeof Float32Array,Ca=[];function Da(t){return Math.round(t/Ma*1e8)/1e8%2*Ma}function Aa(t,e){var n=Da(t[0]);n<0&&(n+=Ia);var i=n-t[0],r=t[1];r+=i,!e&&r-n>=Ia?r=n+Ia:e&&n-r>=Ia?r=n-Ia:!e&&n>r?r=n+(Ia-Da(n-r)):e&&n0&&(this._ux=Sa(n/En/t)||0,this._uy=Sa(n/En/e)||0)},t.prototype.setDPR=function(t){this.dpr=t},t.prototype.setContext=function(t){this._ctx=t},t.prototype.getContext=function(){return this._ctx},t.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},t.prototype.reset=function(){this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},t.prototype.moveTo=function(t,e){return this._drawPendingPt(),this.addData(ca.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},t.prototype.lineTo=function(t,e){var n=Sa(t-this._xi),i=Sa(e-this._yi),r=n>this._ux||i>this._uy;if(this.addData(ca.L,t,e),this._ctx&&r&&(this._needsDash?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),r)this._xi=t,this._yi=e,this._pendingPtDist=0;else{var o=n*n+i*i;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=o)}return this},t.prototype.bezierCurveTo=function(t,e,n,i,r,o){return this.addData(ca.C,t,e,n,i,r,o),this._ctx&&(this._needsDash?this._dashedBezierTo(t,e,n,i,r,o):this._ctx.bezierCurveTo(t,e,n,i,r,o)),this._xi=r,this._yi=o,this},t.prototype.quadraticCurveTo=function(t,e,n,i){return this.addData(ca.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},t.prototype.arc=function(t,e,n,i,r,o){Ca[0]=i,Ca[1]=r,Aa(Ca,o),i=Ca[0];var a=(r=Ca[1])-i;return this.addData(ca.A,t,e,n,n,i,a,0,o?0:1),this._ctx&&this._ctx.arc(t,e,n,i,r,o),this._xi=xa(r)*n+t,this._yi=ba(r)*n+e,this},t.prototype.arcTo=function(t,e,n,i,r){return this._ctx&&this._ctx.arcTo(t,e,n,i,r),this},t.prototype.rect=function(t,e,n,i){return this._ctx&&this._ctx.rect(t,e,n,i),this.addData(ca.R,t,e,n,i),this},t.prototype.closePath=function(){this._drawPendingPt(),this.addData(ca.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},t.prototype.fill=function(t){t&&t.fill(),this.toStatic()},t.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},t.prototype.setLineDash=function(t){if(t instanceof Array){this._lineDash=t,this._dashIdx=0;for(var e=0,n=0;nu.length&&(this._expandData(),u=this.data);for(var h=0;h0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},t.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e0&&d<=t||h<0&&d>=t||0===h&&(c>0&&f<=e||c<0&&f>=e);)d+=h*(n=o[i=this._dashIdx]),f+=c*n,this._dashIdx=(i+1)%g,h>0&&dl||c>0&&fu||a[i%2?"moveTo":"lineTo"](h>=0?ma(d,t):_a(d,t),c>=0?ma(f,e):_a(f,e));h=d-t,c=f-e,this._dashOffset=-wa(h*h+c*c)},t.prototype._dashedBezierTo=function(t,e,n,i,r,o){var a,s,l,u,h,c=this._ctx,p=this._dashSum,d=this._dashOffset,f=this._lineDash,g=this._xi,y=this._yi,v=0,m=this._dashIdx,_=f.length,x=0;for(d<0&&(d=p+d),d%=p,a=0;a<1;a+=.1)s=Eo(g,t,n,r,a+.1)-Eo(g,t,n,r,a),l=Eo(y,e,i,o,a+.1)-Eo(y,e,i,o,a),v+=wa(s*s+l*l);for(;m<_&&!((x+=f[m])>d);m++);for(a=(x-d)/v;a<=1;)u=Eo(g,t,n,r,a),h=Eo(y,e,i,o,a),m%2?c.moveTo(u,h):c.lineTo(u,h),a+=f[m]/v,m=(m+1)%_;m%2!=0&&c.lineTo(r,o),s=r-u,l=o-h,this._dashOffset=-wa(s*s+l*l)},t.prototype._dashedQuadraticTo=function(t,e,n,i){var r=n,o=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,o)},t.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var t=this.data;t instanceof Array&&(t.length=this._len,Ta&&this._len>11&&(this.data=new Float32Array(t)))}},t.prototype.getBoundingRect=function(){fa[0]=fa[1]=ya[0]=ya[1]=Number.MAX_VALUE,ga[0]=ga[1]=va[0]=va[1]=-Number.MAX_VALUE;var t,e=this.data,n=0,i=0,r=0,o=0;for(t=0;tn||Sa(y)>i||c===e-1)&&(f=Math.sqrt(A*A+y*y),r=g,o=_);break;case ca.C:var v=t[c++],m=t[c++],_=(g=t[c++],t[c++]),x=t[c++],b=t[c++];f=Wo(r,o,v,m,g,_,x,b,10),r=x,o=b;break;case ca.Q:f=qo(r,o,v=t[c++],m=t[c++],g=t[c++],_=t[c++],10),r=g,o=_;break;case ca.A:var w=t[c++],S=t[c++],M=t[c++],I=t[c++],T=t[c++],C=t[c++],D=C+T;c+=1;t[c++];d&&(a=xa(T)*M+w,s=ba(T)*I+S),f=_a(M,I)*ma(Ia,Math.abs(C)),r=xa(D)*M+w,o=ba(D)*I+S;break;case ca.R:a=r=t[c++],s=o=t[c++],f=2*t[c++]+2*t[c++];break;case ca.Z:var A=a-r;y=s-o;f=Math.sqrt(A*A+y*y),r=a,o=s}f>=0&&(l[h++]=f,u+=f)}return this._pathLen=u,u},t.prototype.rebuildPath=function(t,e){var n,i,r,o,a,s,l,u,h,c,p=this.data,d=this._ux,f=this._uy,g=this._len,y=e<1,v=0,m=0,_=0;if(!y||(this._pathSegLen||this._calculateLength(),l=this._pathSegLen,u=e*this._pathLen))t:for(var x=0;x0&&(t.lineTo(h,c),_=0),n=r=p[x++],i=o=p[x++],t.moveTo(r,o);break;case ca.L:a=p[x++],s=p[x++];var S=Sa(a-r),M=Sa(s-o);if(S>d||M>f){if(y){if(v+(j=l[m++])>u){var I=(u-v)/j;t.lineTo(r*(1-I)+a*I,o*(1-I)+s*I);break t}v+=j}t.lineTo(a,s),r=a,o=s,_=0}else{var T=S*S+M*M;T>_&&(h=a,c=s,_=T)}break;case ca.C:var C=p[x++],D=p[x++],A=p[x++],L=p[x++],k=p[x++],P=p[x++];if(y){if(v+(j=l[m++])>u){Go(r,C,A,k,I=(u-v)/j,pa),Go(o,D,L,P,I,da),t.bezierCurveTo(pa[1],da[1],pa[2],da[2],pa[3],da[3]);break t}v+=j}t.bezierCurveTo(C,D,A,L,k,P),r=k,o=P;break;case ca.Q:C=p[x++],D=p[x++],A=p[x++],L=p[x++];if(y){if(v+(j=l[m++])>u){Zo(r,C,A,I=(u-v)/j,pa),Zo(o,D,L,I,da),t.quadraticCurveTo(pa[1],da[1],pa[2],da[2]);break t}v+=j}t.quadraticCurveTo(C,D,A,L),r=A,o=L;break;case ca.A:var O=p[x++],R=p[x++],N=p[x++],z=p[x++],E=p[x++],V=p[x++],B=p[x++],F=!p[x++],G=N>z?N:z,H=Sa(N-z)>.001,W=E+V,U=!1;if(y)v+(j=l[m++])>u&&(W=E+V*(u-v)/j,U=!0),v+=j;if(H&&t.ellipse?t.ellipse(O,R,N,z,B,E,W,F):t.arc(O,R,G,E,W,F),U)break t;w&&(n=xa(E)*N+O,i=ba(E)*z+R),r=xa(W)*N+O,o=ba(W)*z+R;break;case ca.R:n=r=p[x],i=o=p[x+1],a=p[x++],s=p[x++];var X=p[x++],Y=p[x++];if(y){if(v+(j=l[m++])>u){var Z=u-v;t.moveTo(a,s),t.lineTo(a+ma(Z,X),s),(Z-=X)>0&&t.lineTo(a+X,s+ma(Z,Y)),(Z-=Y)>0&&t.lineTo(a+_a(X-Z,0),s+Y),(Z-=X)>0&&t.lineTo(a,s+_a(Y-Z,0));break t}v+=j}t.rect(a,s,X,Y);break;case ca.Z:if(_>0&&(t.lineTo(h,c),_=0),y){var j;if(v+(j=l[m++])>u){I=(u-v)/j;t.lineTo(r*(1-I)+n*I,o*(1-I)+i*I);break t}v+=j}t.closePath(),r=n,o=i}}},t.CMD=ca,t.initDefaultProps=function(){var e=t.prototype;e._saveData=!0,e._needsDash=!1,e._dashOffset=0,e._dashIdx=0,e._dashSum=0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0}(),t}();function ka(t,e,n,i,r,o,a){if(0===r)return!1;var s=r,l=0;if(a>e+s&&a>i+s||at+s&&o>n+s||oe+c&&h>i+c&&h>o+c&&h>s+c||ht+c&&u>n+c&&u>r+c&&u>a+c||ue+u&&l>i+u&&l>o+u||lt+u&&s>n+u&&s>r+u||sn||h+ur&&(r+=za);var p=Math.atan2(l,s);return p<0&&(p+=za),p>=i&&p<=r||p+za>=i&&p+za<=r}function Va(t,e,n,i,r,o){if(o>e&&o>i||or?s:0}var Ba=La.CMD,Fa=2*Math.PI;var Ga=[-1,-1,-1],Ha=[-1,-1];function Wa(t,e,n,i,r,o,a,s,l,u){if(u>e&&u>i&&u>o&&u>s||u1&&(h=void 0,h=Ha[0],Ha[0]=Ha[1],Ha[1]=h),f=Eo(e,i,o,s,Ha[0]),d>1&&(g=Eo(e,i,o,s,Ha[1]))),2===d?ve&&s>i&&s>o||s=0&&h<=1&&(r[l++]=h);else{var u=a*a-4*o*s;if(No(u))(h=-a/(2*o))>=0&&h<=1&&(r[l++]=h);else if(u>0){var h,c=Co(u),p=(-a-c)/(2*o);(h=(-a+c)/(2*o))>=0&&h<=1&&(r[l++]=h),p>=0&&p<=1&&(r[l++]=p)}}return l}(e,i,o,s,Ga);if(0===l)return 0;var u=Yo(e,i,o);if(u>=0&&u<=1){for(var h=0,c=Uo(e,i,o,u),p=0;pn||s<-n)return 0;var l=Math.sqrt(n*n-s*s);Ga[0]=-l,Ga[1]=l;var u=Math.abs(i-r);if(u<1e-4)return 0;if(u>=Fa-1e-4){i=0,r=Fa;var h=o?1:-1;return a>=Ga[0]+t&&a<=Ga[1]+t?h:0}if(i>r){var c=i;i=r,r=c}i<0&&(i+=Fa,r+=Fa);for(var p=0,d=0;d<2;d++){var f=Ga[d];if(f+t>a){var g=Math.atan2(s,f);h=o?1:-1;g<0&&(g=Fa+g),(g>=i&&g<=r||g+Fa>=i&&g+Fa<=r)&&(g>Math.PI/2&&g<1.5*Math.PI&&(h=-h),p+=h)}}return p}function Ya(t,e,n,i,r){for(var o,a,s,l,u=t.data,h=t.len(),c=0,p=0,d=0,f=0,g=0,y=0;y1&&(n||(c+=Va(p,d,f,g,i,r))),m&&(f=p=u[y],g=d=u[y+1]),v){case Ba.M:p=f=u[y++],d=g=u[y++];break;case Ba.L:if(n){if(ka(p,d,u[y],u[y+1],e,i,r))return!0}else c+=Va(p,d,u[y],u[y+1],i,r)||0;p=u[y++],d=u[y++];break;case Ba.C:if(n){if(Pa(p,d,u[y++],u[y++],u[y++],u[y++],u[y],u[y+1],e,i,r))return!0}else c+=Wa(p,d,u[y++],u[y++],u[y++],u[y++],u[y],u[y+1],i,r)||0;p=u[y++],d=u[y++];break;case Ba.Q:if(n){if(Oa(p,d,u[y++],u[y++],u[y],u[y+1],e,i,r))return!0}else c+=Ua(p,d,u[y++],u[y++],u[y],u[y+1],i,r)||0;p=u[y++],d=u[y++];break;case Ba.A:var _=u[y++],x=u[y++],b=u[y++],w=u[y++],S=u[y++],M=u[y++];y+=1;var I=!!(1-u[y++]);o=Math.cos(S)*b+_,a=Math.sin(S)*w+x,m?(f=o,g=a):c+=Va(p,d,o,a,i,r);var T=(i-_)*w/b+_;if(n){if(Ea(_,x,w,S,S+M,I,e,T,r))return!0}else c+=Xa(_,x,w,S,S+M,I,T,r);p=Math.cos(S+M)*b+_,d=Math.sin(S+M)*w+x;break;case Ba.R:if(f=p=u[y++],g=d=u[y++],o=f+u[y++],a=g+u[y++],n){if(ka(f,g,o,g,e,i,r)||ka(o,g,o,a,e,i,r)||ka(o,a,f,a,e,i,r)||ka(f,a,f,g,e,i,r))return!0}else c+=Va(o,g,o,a,i,r),c+=Va(f,a,f,g,i,r);break;case Ba.Z:if(n){if(ka(p,d,f,g,e,i,r))return!0}else c+=Va(p,d,f,g,i,r);p=f,d=g}}return n||(s=d,l=g,Math.abs(s-l)<1e-4)||(c+=Va(p,d,f,g,i,r)||0),0!==c}var Za=T({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},_o),ja={style:T({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},xo.style)},qa=["x","y","rotation","scaleX","scaleY","originX","originY","invisible","culling","z","z2","zlevel","parent"],Ka=function(t){function e(e){return t.call(this,e)||this}var i;return n(e,t),e.prototype.update=function(){var n=this;t.prototype.update.call(this);var i=this.style;if(i.decal){var r=this._decalEl=this._decalEl||new e;r.buildPath===e.prototype.buildPath&&(r.buildPath=function(t){n.buildPath(t,n.shape)}),r.silent=!0;var o=r.style;for(var a in i)o[a]!==i[a]&&(o[a]=i[a]);o.fill=i.fill?i.decal:null,o.decal=null,o.shadowColor=null,i.strokeFirst&&(o.stroke=null);for(var s=0;s.5?Vn:e>.2?"#eee":Bn}if(t)return Bn}return Vn},e.prototype.getInsideTextStroke=function(t){var e=this.style.fill;if(H(e)){var n=this.__zr;if(!(!n||!n.isDarkMode())===Qe(t,0)<.4)return e}},e.prototype.buildPath=function(t,e,n){},e.prototype.pathUpdated=function(){this.__dirty&=-5},e.prototype.createPathProxy=function(){this.path=new La(!1)},e.prototype.hasStroke=function(){var t=this.style,e=t.stroke;return!(null==e||"none"===e||!(t.lineWidth>0))},e.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},e.prototype.getBoundingRect=function(){var t=this._rect,e=this.style,n=!t;if(n){var i=!1;this.path||(i=!0,this.createPathProxy());var r=this.path;(i||4&this.__dirty)&&(r.beginPath(),this.buildPath(r,this.shape,!1),this.pathUpdated()),t=r.getBoundingRect()}if(this._rect=t,this.hasStroke()&&this.path&&this.path.len()>0){var o=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||n){o.copy(t);var a=e.strokeNoScale?this.getLineScale():1,s=e.lineWidth;if(!this.hasFill()){var l=this.strokeContainThreshold;s=Math.max(s,null==l?4:l)}a>1e-10&&(o.width+=s/a,o.height+=s/a,o.x-=s/a/2,o.y-=s/a/2)}return o}return t},e.prototype.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 o=this.path;if(this.hasStroke()){var a=r.lineWidth,s=r.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),function(t,e,n,i){return Ya(t,e,!0,n,i)}(o,a/s,t,e)))return!0}if(this.hasFill())return function(t,e,n){return Ya(t,0,!1,e,n)}(o,t,e)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(t){return this.animate("shape",t)},e.prototype.updateDuringAnimation=function(t){"style"===t?this.dirtyStyle():"shape"===t?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(e,n){"shape"===e?this.setShape(n):t.prototype.attrKV.call(this,e,n)},e.prototype.setShape=function(t,e){var n=this.shape;return n||(n=this.shape={}),"string"==typeof t?n[t]=e:I(n,t),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(4&this.__dirty)},e.prototype.createStyle=function(t){return pt(Za,t)},e.prototype._innerSaveToNormal=function(e){t.prototype._innerSaveToNormal.call(this,e);var n=this._normalState;e.shape&&!n.shape&&(n.shape=I({},this.shape))},e.prototype._applyStateObj=function(e,n,i,r,o,a){t.prototype._applyStateObj.call(this,e,n,i,r,o,a);var s,l=!(n&&r);if(n&&n.shape?o?r?s=n.shape:(s=I({},i.shape),I(s,n.shape)):(s=I({},r?this.shape:i.shape),I(s,n.shape)):l&&(s=i.shape),s)if(o){this.shape=I({},this.shape);for(var u={},h=E(s),c=0;c0},e.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},e.prototype.createStyle=function(t){return pt($a,t)},e.prototype.setBoundingRect=function(t){this._rect=t},e.prototype.getBoundingRect=function(){var t=this.style;if(!this._rect){var e=t.text;null!=e?e+="":e="";var n=bi(e,t.font,t.textAlign,t.textBaseline);if(n.x+=t.x||0,n.y+=t.y||0,this.hasStroke()){var i=t.lineWidth;n.x-=i/2,n.y-=i/2,n.width+=i,n.height+=i}this._rect=n}return this._rect},e.initDefaultProps=void(e.prototype.dirtyRectTolerance=10),e}(So);Ja.prototype.type="tspan";var Qa=T({x:0,y:0},_o),ts={style:T({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},xo.style)};var es=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.createStyle=function(t){return pt(Qa,t)},e.prototype._getSize=function(t){var e=this.style,n=e[t];if(null!=n)return n;var i,r=(i=e.image)&&"string"!=typeof i&&i.width&&i.height?e.image:this.__image;if(!r)return 0;var o="width"===t?"height":"width",a=e[o];return null==a?r[t]:r[t]/r[o]*a},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return ts},e.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new gi(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},e}(So);es.prototype.type="image";var ns=Math.round;function is(t,e,n){if(e){var i=e.x1,r=e.x2,o=e.y1,a=e.y2;t.x1=i,t.x2=r,t.y1=o,t.y2=a;var s=n&&n.lineWidth;return s?(ns(2*i)===ns(2*r)&&(t.x1=t.x2=os(i,s,!0)),ns(2*o)===ns(2*a)&&(t.y1=t.y2=os(o,s,!0)),t):t}}function rs(t,e,n){if(e){var i=e.x,r=e.y,o=e.width,a=e.height;t.x=i,t.y=r,t.width=o,t.height=a;var s=n&&n.lineWidth;return s?(t.x=os(i,s,!0),t.y=os(r,s,!0),t.width=Math.max(os(i+o,s,!1)-t.x,0===o?0:1),t.height=Math.max(os(r+a,s,!1)-t.y,0===a?0:1),t):t}}function os(t,e,n){if(!e)return t;var i=ns(2*t);return(i+ns(e))%2==0?i/2:(i+(n?1:-1))/2}var as=function(){this.x=0,this.y=0,this.width=0,this.height=0},ss={},ls=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getDefaultShape=function(){return new as},e.prototype.buildPath=function(t,e){var n,i,r,o;if(this.subPixelOptimize){var a=rs(ss,e,this.style);n=a.x,i=a.y,r=a.width,o=a.height,a.r=e.r,e=a}else n=e.x,i=e.y,r=e.width,o=e.height;e.r?function(t,e){var n,i,r,o,a,s=e.x,l=e.y,u=e.width,h=e.height,c=e.r;u<0&&(s+=u,u=-u),h<0&&(l+=h,h=-h),"number"==typeof c?n=i=r=o=c:c instanceof Array?1===c.length?n=i=r=o=c[0]:2===c.length?(n=r=c[0],i=o=c[1]):3===c.length?(n=c[0],i=o=c[1],r=c[2]):(n=c[0],i=c[1],r=c[2],o=c[3]):n=i=r=o=0,n+i>u&&(n*=u/(a=n+i),i*=u/a),r+o>u&&(r*=u/(a=r+o),o*=u/a),i+r>h&&(i*=h/(a=i+r),r*=h/a),n+o>h&&(n*=h/(a=n+o),o*=h/a),t.moveTo(s+n,l),t.lineTo(s+u-i,l),0!==i&&t.arc(s+u-i,l+i,i,-Math.PI/2,0),t.lineTo(s+u,l+h-r),0!==r&&t.arc(s+u-r,l+h-r,r,0,Math.PI/2),t.lineTo(s+o,l+h),0!==o&&t.arc(s+o,l+h-o,o,Math.PI/2,Math.PI),t.lineTo(s,l+n),0!==n&&t.arc(s+n,l+n,n,Math.PI,1.5*Math.PI)}(t,e):t.rect(n,i,r,o)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(Ka);ls.prototype.type="rect";var us={fill:"#000"},hs={style:T({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},xo.style)},cs=function(t){function e(e){var n=t.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=us,n.attr(e),n}return n(e,t),e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){this.styleChanged()&&this._updateSubTexts();for(var e=0;ep&&u){var d=Math.floor(p/l);n=n.slice(0,d)}var f=p,g=h;if(r&&(f+=r[0]+r[2],null!=g&&(g+=r[1]+r[3])),t&&a&&null!=g)for(var y=so(h,o,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),v=0;v0,I=null!=t.width&&("truncate"===t.overflow||"break"===t.overflow||"breakAll"===t.overflow),T=i.calculatedLineHeight,C=0;Cl&&fo(n,t.substring(l,u),e,s),fo(n,i[2],e,s,i[1]),l=oo.lastIndex}lo){b>0?(m.tokens=m.tokens.slice(0,b),y(m,x,_),n.lines=n.lines.slice(0,v+1)):n.lines=n.lines.slice(0,v);break t}var C=w.width,D=null==C||"auto"===C;if("string"==typeof C&&"%"===C.charAt(C.length-1))P.percentWidth=C,h.push(P),P.contentWidth=_i(P.text,I);else{if(D){var A=w.backgroundColor,L=A&&A.image;L&&ro(L=eo(L))&&(P.width=Math.max(P.width,L.width*T/L.height))}var k=f&&null!=r?r-x:null;null!=k&&k=0&&"right"===(C=_[T]).align;)this._placeToken(C,t,b,f,I,"right",y),w-=C.width,I-=C.width,T--;for(M+=(n-(M-d)-(g-I)-w)/2;S<=T;)C=_[S],this._placeToken(C,t,b,f,M+C.width/2,"center",y),M+=C.width,S++;f+=b}},e.prototype._placeToken=function(t,e,n,i,r,o,a){var s=e.rich[t.styleName]||{};s.text=t.text;var l=t.verticalAlign,u=i+n/2;"top"===l?u=i+t.height/2:"bottom"===l&&(u=i+n-t.height/2),!t.isLineHolder&&ms(s)&&this._renderBackground(s,e,"right"===o?r-t.width:"center"===o?r-t.width/2:r,u-t.height/2,t.width,t.height);var h=!!s.backgroundColor,c=t.textPadding;c&&(r=ys(r,o,c),u-=t.height/2-c[0]-t.innerHeight/2);var p=this._getOrCreateChild(Ja),d=p.createStyle();p.useStyle(d);var f=this._defaultStyle,g=!1,y=0,v=gs("fill"in s?s.fill:"fill"in e?e.fill:(g=!0,f.fill)),m=gs("stroke"in s?s.stroke:"stroke"in e?e.stroke:h||a||f.autoStroke&&!g?null:(y=2,f.stroke)),_=s.textShadowBlur>0||e.textShadowBlur>0;d.text=t.text,d.x=r,d.y=u,_&&(d.shadowBlur=s.textShadowBlur||e.textShadowBlur||0,d.shadowColor=s.textShadowColor||e.textShadowColor||"transparent",d.shadowOffsetX=s.textShadowOffsetX||e.textShadowOffsetX||0,d.shadowOffsetY=s.textShadowOffsetY||e.textShadowOffsetY||0),d.textAlign=o,d.textBaseline="middle",d.font=t.font||vi,d.opacity=et(s.opacity,e.opacity,1),m&&(d.lineWidth=et(s.lineWidth,e.lineWidth,y),d.lineDash=tt(s.lineDash,e.lineDash),d.lineDashOffset=e.lineDashOffset||0,d.stroke=m),v&&(d.fill=v);var x=t.contentWidth,b=t.contentHeight;p.setBoundingRect(new gi(wi(d.x,x,d.textAlign),Si(d.y,b,d.textBaseline),x,b))},e.prototype._renderBackground=function(t,e,n,i,r,o){var a,s,l,u=t.backgroundColor,h=t.borderWidth,c=t.borderColor,p=u&&u.image,d=u&&!p,f=t.borderRadius,g=this;if(d||h&&c){(a=this._getOrCreateChild(ls)).useStyle(a.createStyle()),a.style.fill=null;var y=a.shape;y.x=n,y.y=i,y.width=r,y.height=o,y.r=f,a.dirtyShape()}if(d)(l=a.style).fill=u||null,l.fillOpacity=tt(t.fillOpacity,1);else if(p){(s=this._getOrCreateChild(es)).onload=function(){g.dirtyStyle()};var v=s.style;v.image=u.image,v.x=n,v.y=i,v.width=r,v.height=o}h&&c&&((l=a.style).lineWidth=h,l.stroke=c,l.strokeOpacity=tt(t.strokeOpacity,1),l.lineDash=t.borderDash,l.lineDashOffset=t.borderDashOffset||0,a.strokeContainThreshold=0,a.hasFill()&&a.hasStroke()&&(l.strokeFirst=!0,l.lineWidth*=2));var m=(a||s).style;m.shadowBlur=t.shadowBlur||0,m.shadowColor=t.shadowColor||"transparent",m.shadowOffsetX=t.shadowOffsetX||0,m.shadowOffsetY=t.shadowOffsetY||0,m.opacity=et(t.opacity,e.opacity,1)},e.makeFont=function(t){var e="";if(t.fontSize||t.fontFamily||t.fontWeight){var n="";n="string"!=typeof t.fontSize||-1===t.fontSize.indexOf("px")&&-1===t.fontSize.indexOf("rem")&&-1===t.fontSize.indexOf("em")?isNaN(+t.fontSize)?"12px":t.fontSize+"px":t.fontSize,e=[t.fontStyle,t.fontWeight,n,t.fontFamily||"sans-serif"].join(" ")}return e&&ot(e)||t.textFont||t.font},e}(So),ps={left:!0,right:1,center:1},ds={top:1,bottom:1,middle:1};function fs(t){if(t){t.font=cs.makeFont(t);var e=t.align;"middle"===e&&(e="center"),t.align=null==e||ps[e]?e:"left";var n=t.verticalAlign;"center"===n&&(n="middle"),t.verticalAlign=null==n||ds[n]?n:"top",t.padding&&(t.padding=it(t.padding))}}function gs(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function ys(t,e,n){return"right"===e?t-n[1]:"center"===e?t+n[3]/2-n[1]/2:t+n[3]}function vs(t){var e=t.text;return null!=e&&(e+=""),e}function ms(t){return!!(t.backgroundColor||t.borderWidth&&t.borderColor)}var _s=kr(),xs=1,bs={},ws=kr(),Ss=["emphasis","blur","select"],Ms=["normal","emphasis","blur","select"],Is=10,Ts="highlight",Cs="downplay",Ds="select",As="unselect",Ls="toggleSelect";function ks(t){return null!=t&&"none"!==t}var Ps=new Ae(100);function Os(t){if("string"!=typeof t)return t;var e=Ps.get(t);return e||(e=Ue(t,-.1),Ps.put(t,e)),e}function Rs(t,e,n){t.onHoverStateChange&&(t.hoverState||0)!==n&&t.onHoverStateChange(e),t.hoverState=n}function Ns(t){Rs(t,"emphasis",2)}function zs(t){2===t.hoverState&&Rs(t,"normal",0)}function Es(t){Rs(t,"blur",1)}function Vs(t){1===t.hoverState&&Rs(t,"normal",0)}function Bs(t){t.selected=!0}function Fs(t){t.selected=!1}function Gs(t,e,n){e(t,n)}function Hs(t,e,n){Gs(t,e,n),t.isGroup&&t.traverse((function(t){Gs(t,e,n)}))}function Ws(t,e){switch(e){case"emphasis":t.hoverState=2;break;case"normal":t.hoverState=0;break;case"blur":t.hoverState=1;break;case"select":t.selected=!0}}function Us(t,e){var n=this.states[t];if(this.style){if("emphasis"===t)return function(t,e,n,i){var r=n&&D(n,"select")>=0,o=!1;if(t instanceof Ka){var a=ws(t),s=r&&a.selectFill||a.normalFill,l=r&&a.selectStroke||a.normalStroke;if(ks(s)||ks(l)){var u=(i=i||{}).style||{};!ks(u.fill)&&ks(s)?(o=!0,i=I({},i),(u=I({},u)).fill=Os(s)):!ks(u.stroke)&&ks(l)&&(o||(i=I({},i),u=I({},u)),u.stroke=Os(l)),i.style=u}}if(i&&null==i.z2){o||(i=I({},i));var h=t.z2EmphasisLift;i.z2=t.z2+(null!=h?h:Is)}return i}(this,0,e,n);if("blur"===t)return function(t,e,n){var i=D(t.currentStates,e)>=0,r=t.style.opacity,o=i?null:function(t,e,n,i){for(var r=t.style,o={},a=0;a0){var o={dataIndex:r,seriesIndex:t.seriesIndex};null!=i&&(o.dataType=i),e.push(o)}}))})),e}function sl(t,e,n){pl(t,!0),Hs(t,Xs),ll(t,e,n)}function ll(t,e,n){var i=_s(t);null!=e?(i.focus=e,i.blurScope=n):i.focus&&(i.focus=null)}var ul=["emphasis","blur","select"],hl={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function cl(t,e,n,i){n=n||"itemStyle";for(var r=0;r1&&(a*=xl(f),s*=xl(f));var g=(r===o?-1:1)*xl((a*a*(s*s)-a*a*(d*d)-s*s*(p*p))/(a*a*(d*d)+s*s*(p*p)))||0,y=g*a*d/s,v=g*-s*p/a,m=(t+n)/2+wl(c)*y-bl(c)*v,_=(e+i)/2+bl(c)*y+wl(c)*v,x=Tl([1,0],[(p-y)/a,(d-v)/s]),b=[(p-y)/a,(d-v)/s],w=[(-1*p-y)/a,(-1*d-v)/s],S=Tl(b,w);if(Il(b,w)<=-1&&(S=Sl),Il(b,w)>=1&&(S=0),S<0){var M=Math.round(S/Sl*1e6)/1e6;S=2*Sl+M%2*Sl}h.addData(u,m,_,a,s,x,S,c,o)}var Dl=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,Al=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;var Ll=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.applyTransform=function(t){},e}(Ka);function kl(t){return null!=t.setData}function Pl(t,e){var n=function(t){var e=new La;if(!t)return e;var n,i=0,r=0,o=i,a=r,s=La.CMD,l=t.match(Dl);if(!l)return e;for(var u=0;uL*L+k*k&&(M=T,I=C),{cx:M,cy:I,x01:-h,y01:-c,x11:M*(r/b-1),y11:I*(r/b-1)}}function Kl(t,e){var n=Yl(e.r,0),i=Yl(e.r0||0,0),r=n>0;if(r||i>0){if(r||(n=i,i=0),i>n){var o=n;n=i,i=o}var a,s=!!e.clockwise,l=e.startAngle,u=e.endAngle;if(l===u)a=0;else{var h=[l,u];Aa(h,!s),a=Ul(h[0]-h[1])}var c=e.cx,p=e.cy,d=e.cornerRadius||0,f=e.innerCornerRadius||0;if(n>jl)if(a>Bl-jl)t.moveTo(c+n*Gl(l),p+n*Fl(l)),t.arc(c,p,n,l,u,!s),i>jl&&(t.moveTo(c+i*Gl(u),p+i*Fl(u)),t.arc(c,p,i,u,l,s));else{var g=Ul(n-i)/2,y=Zl(g,d),v=Zl(g,f),m=v,_=y,x=n*Gl(l),b=n*Fl(l),w=i*Gl(u),S=i*Fl(u),M=void 0,I=void 0,T=void 0,C=void 0;if((y>jl||v>jl)&&(M=n*Gl(u),I=n*Fl(u),T=i*Gl(l),C=i*Fl(l),ajl)if(_>jl){var N=ql(T,C,x,b,n,_,s),z=ql(M,I,w,S,n,_,s);t.moveTo(c+N.cx+N.x01,p+N.cy+N.y01),_jl&&a>jl)if(m>jl){N=ql(w,S,M,I,i,-m,s),z=ql(x,b,T,C,i,-m,s);t.lineTo(c+N.cx+N.x01,p+N.cy+N.y01),m=2){if(i&&"spline"!==i){var o=function(t,e,n,i){var r,o,a,s,l=[],u=[],h=[],c=[];if(i){a=[1/0,1/0],s=[-1/0,-1/0];for(var p=0,d=t.length;pn-2?n-1:l+1],d=t[l>n-3?n-1:l+2]);var f=u*u,g=u*f;i.push([eu(h[0],c[0],p[0],d[0],u,f,g),eu(h[1],c[1],p[1],d[1],u,f,g)])}return i}(r,n)),t.moveTo(r[0][0],r[0][1]);s=1;for(var c=r.length;sbu[1]){if(a=!1,r)return a;var u=Math.abs(bu[0]-xu[1]),h=Math.abs(xu[0]-bu[1]);Math.min(u,h)>i.len()&&(u0?l?e.animateFrom(n,{duration:f,delay:y||0,easing:g,done:o,force:!!o||!!a,scope:t,during:a}):e.animateTo(n,{duration:f,delay:y||0,easing:g,done:o,force:!!o||!!a,setToFinal:!0,scope:t,during:a}):(e.stopAnimation(),!l&&e.attr(n),o&&o())}else e.stopAnimation(),!l&&e.attr(n),a&&a(1),o&&o()}function Hu(t,e,n,i,r,o){Gu("update",t,e,n,i,r,o)}function Wu(t,e,n,i,r,o){Gu("init",t,e,n,i,r,o)}function Uu(t,e,n,i,r,o){Zu(t)||Gu("remove",t,e,n,i,r,o)}function Xu(t,e,n,i){t.removeTextContent(),t.removeTextGuideLine(),Uu(t,{style:{opacity:0}},e,n,i)}function Yu(t,e,n){function i(){t.parent&&t.parent.remove(t)}t.isGroup?t.traverse((function(t){t.isGroup||Xu(t,e,n,i)})):Xu(t,e,n,i)}function Zu(t){if(!t.__zr)return!0;for(var e=0;eMath.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function $u(t){return!t.isGroup}function Ju(t,e,n){if(t&&e){var i,r=(i={},t.traverse((function(t){$u(t)&&t.anid&&(i[t.anid]=t)})),i);e.traverse((function(t){if($u(t)&&t.anid){var e=r[t.anid];if(e){var i=o(t);t.attr(o(e)),Hu(t,i,n,_s(t).dataIndex)}}}))}function o(t){var e={x:t.x,y:t.y,rotation:t.rotation};return function(t){return null!=t.shape}(t)&&(e.shape=I({},t.shape)),e}}function Qu(t,e){return O(t,(function(t){var n=t[0];n=Cu(n,e.x),n=Du(n,e.x+e.width);var i=t[1];return i=Cu(i,e.y),[n,i=Du(i,e.y+e.height)]}))}function th(t,e){var n=Cu(t.x,e.x),i=Du(t.x+t.width,e.x+e.width),r=Cu(t.y,e.y),o=Du(t.y+t.height,e.y+e.height);if(i>=n&&o>=r)return{x:n,y:r,width:i-n,height:o-r}}function eh(t,e,n){var i=I({rectHover:!0},e),r=i.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(r.image=t.slice(8),T(r,n),new es(i)):Nu(t.replace("path://",""),i,n,"center")}function nh(t,e,n,i,r){for(var o=0,a=r[r.length-1];o=-1e-6)return!1;var f=t-r,g=e-o,y=rh(f,g,u,h)/d;if(y<0||y>1)return!1;var v=rh(f,g,c,p)/d;return!(v<0||v>1)}function rh(t,e,n,i){return t*i-n*e}function oh(t){var e=t.itemTooltipOption,n=t.componentModel,i=t.itemName,r=H(e)?{formatter:e}:e,o=n.mainType,a=n.componentIndex,s={componentType:o,name:i,$vars:["name"]};s[o+"Index"]=a;var l=t.formatterParamsExtra;l&&P(E(l),(function(t){dt(s,t)||(s[t]=l[t],s.$vars.push(t))}));var u=_s(t.el);u.componentMainType=o,u.componentIndex=a,u.tooltipConfig={name:i,option:T({content:i,formatterParams:s},r)}}Ou("circle",Nl),Ou("ellipse",El),Ou("sector",Jl),Ou("ring",tu),Ou("polygon",ru),Ou("polyline",au),Ou("rect",ls),Ou("line",uu),Ou("bezierCurve",du),Ou("arc",gu);var ah=Object.freeze({__proto__:null,extendShape:Lu,extendPath:Pu,registerShape:Ou,getShapeClass:Ru,makePath:Nu,makeImage:zu,mergePath:Vu,resizePath:Bu,subPixelOptimizeLine:function(t){return is(t.shape,t.shape,t.style),t},subPixelOptimizeRect:function(t){return rs(t.shape,t.shape,t.style),t},subPixelOptimize:Fu,updateProps:Hu,initProps:Wu,removeElement:Uu,removeElementWithFadeOut:Yu,isElementRemoved:Zu,getTransform:ju,applyTransform:qu,transformDirection:Ku,groupTransition:Ju,clipPointsByRect:Qu,clipRectByRect:th,createIcon:eh,linePolygonIntersect:nh,lineLineIntersect:ih,setTooltipConfig:oh,Group:Ei,Image:es,Text:cs,Circle:Nl,Ellipse:El,Sector:Jl,Ring:tu,Polygon:ru,Polyline:au,Rect:ls,Line:uu,BezierCurve:du,Arc:gu,IncrementalDisplayable:Tu,CompoundPath:yu,LinearGradient:mu,RadialGradient:_u,BoundingRect:gi,OrientedBoundingRect:Mu,Point:ai,Path:Ka}),sh={};function lh(t,e){for(var n=0;n-1?Eh:Bh;function Wh(t,e){t=t.toUpperCase(),Gh[t]=new Oh(e),Fh[t]=e}Wh(Vh,{time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}}),Wh(Eh,{time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},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:""}}}});var Uh=1e3,Xh=6e4,Yh=36e5,Zh=864e5,jh=31536e6,qh={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{hh}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {hh}:{mm}:{ss} {SSS}"},Kh="{yyyy}-{MM}-{dd}",$h={year:"{yyyy}",month:"{yyyy}-{MM}",day:Kh,hour:"{yyyy}-{MM}-{dd} "+qh.hour,minute:"{yyyy}-{MM}-{dd} "+qh.minute,second:"{yyyy}-{MM}-{dd} "+qh.second,millisecond:qh.none},Jh=["year","month","day","hour","minute","second","millisecond"],Qh=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function tc(t,e){return"0000".substr(0,e-(t+="").length)+t}function ec(t){switch(t){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return t}}function nc(t){return t===ec(t)}function ic(t,e,n,i){var r=or(t),o=r[ac(n)](),a=r[sc(n)]()+1,s=Math.floor((a-1)/4)+1,l=r[lc(n)](),u=r["get"+(n?"UTC":"")+"Day"](),h=r[uc(n)](),c=(h-1)%12+1,p=r[hc(n)](),d=r[cc(n)](),f=r[pc(n)](),g=(i instanceof Oh?i:function(t){return Gh[t]}(i||Hh)||Gh.EN).getModel("time"),y=g.get("month"),v=g.get("monthAbbr"),m=g.get("dayOfWeek"),_=g.get("dayOfWeekAbbr");return(e||"").replace(/{yyyy}/g,o+"").replace(/{yy}/g,o%100+"").replace(/{Q}/g,s+"").replace(/{MMMM}/g,y[a-1]).replace(/{MMM}/g,v[a-1]).replace(/{MM}/g,tc(a,2)).replace(/{M}/g,a+"").replace(/{dd}/g,tc(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,m[u]).replace(/{ee}/g,_[u]).replace(/{e}/g,u+"").replace(/{HH}/g,tc(h,2)).replace(/{H}/g,h+"").replace(/{hh}/g,tc(c+"",2)).replace(/{h}/g,c+"").replace(/{mm}/g,tc(p,2)).replace(/{m}/g,p+"").replace(/{ss}/g,tc(d,2)).replace(/{s}/g,d+"").replace(/{SSS}/g,tc(f,3)).replace(/{S}/g,f+"")}function rc(t,e){var n=or(t),i=n[sc(e)]()+1,r=n[lc(e)](),o=n[uc(e)](),a=n[hc(e)](),s=n[cc(e)](),l=0===n[pc(e)](),u=l&&0===s,h=u&&0===a,c=h&&0===o,p=c&&1===r;return p&&1===i?"year":p?"month":c?"day":h?"hour":u?"minute":l?"second":"millisecond"}function oc(t,e,n){var i="number"==typeof t?or(t):t;switch(e=e||rc(t,n)){case"year":return i[ac(n)]();case"half-year":return i[sc(n)]()>=6?1:0;case"quarter":return Math.floor((i[sc(n)]()+1)/4);case"month":return i[sc(n)]();case"day":return i[lc(n)]();case"half-day":return i[uc(n)]()/24;case"hour":return i[uc(n)]();case"minute":return i[hc(n)]();case"second":return i[cc(n)]();case"millisecond":return i[pc(n)]()}}function ac(t){return t?"getUTCFullYear":"getFullYear"}function sc(t){return t?"getUTCMonth":"getMonth"}function lc(t){return t?"getUTCDate":"getDate"}function uc(t){return t?"getUTCHours":"getHours"}function hc(t){return t?"getUTCMinutes":"getMinutes"}function cc(t){return t?"getUTCSeconds":"getSeconds"}function pc(t){return t?"getUTCSeconds":"getSeconds"}function dc(t){return t?"setUTCFullYear":"setFullYear"}function fc(t){return t?"setUTCMonth":"setMonth"}function gc(t){return t?"setUTCDate":"setDate"}function yc(t){return t?"setUTCHours":"setHours"}function vc(t){return t?"setUTCMinutes":"setMinutes"}function mc(t){return t?"setUTCSeconds":"setSeconds"}function _c(t){return t?"setUTCSeconds":"setSeconds"}function xc(t){if(!pr(t))return H(t)?t:"-";var e=(t+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function bc(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}var wc=it,Sc=/([&<>"'])/g,Mc={"&":"&","<":"<",">":">",'"':""","'":"'"};function Ic(t){return null==t?"":(t+"").replace(Sc,(function(t,e){return Mc[e]}))}function Tc(t,e,n){function i(t){return t&&ot(t)?t:"-"}function r(t){return!(null==t||isNaN(t)||!isFinite(t))}var o="time"===e,a=t instanceof Date;if(o||a){var s=o?or(t):t;if(!isNaN(+s))return ic(s,"{yyyy}-{MM}-{dd} {hh}:{mm}:{ss}",n);if(a)return"-"}if("ordinal"===e)return W(t)?i(t):U(t)&&r(t)?t+"":"-";var l=cr(t);return r(l)?xc(l):W(t)?i(t):"-"}var Cc=["a","b","c","d","e","f","g"],Dc=function(t,e){return"{"+t+(null==e?"":e)+"}"};function Ac(t,e,n){F(e)||(e=[e]);var i=e.length;if(!i)return"";for(var r=e[0].$vars||[],o=0;o':'':{renderMode:o,content:"{"+(n.markerId||"markerX")+"|} ",style:"subItem"===r?{width:4,height:4,borderRadius:2,backgroundColor:i}:{width:10,height:10,borderRadius:5,backgroundColor:i}}:""}function kc(t,e){return e=e||"transparent",H(t)?t:X(t)&&t.colorStops&&(t.colorStops[0]||{}).color||e}function Pc(t,e){if("_blank"===e||"blank"===e){var n=window.open();n.opener=null,n.location.href=t}else window.open(t,e)}var Oc=P,Rc=["left","right","top","bottom","width","height"],Nc=[["width","left","right"],["height","top","bottom"]];function zc(t,e,n,i,r){var o=0,a=0;null==i&&(i=1/0),null==r&&(r=1/0);var s=0;e.eachChild((function(l,u){var h,c,p=l.getBoundingRect(),d=e.childAt(u+1),f=d&&d.getBoundingRect();if("horizontal"===t){var g=p.width+(f?-f.x+p.x:0);(h=o+g)>i||l.newline?(o=0,h=g,a+=s+n,s=p.height):s=Math.max(s,p.height)}else{var y=p.height+(f?-f.y+p.y:0);(c=a+y)>r||l.newline?(o+=s+n,a=0,c=y,s=p.width):s=Math.max(s,p.width)}l.newline||(l.x=o,l.y=a,l.markRedraw(),"horizontal"===t?o=h+n:a=c+n)}))}var Ec=zc;B(zc,"vertical"),B(zc,"horizontal");function Vc(t,e,n){n=wc(n||0);var i=e.width,r=e.height,o=Zi(t.left,i),a=Zi(t.top,r),s=Zi(t.right,i),l=Zi(t.bottom,r),u=Zi(t.width,i),h=Zi(t.height,r),c=n[2]+n[0],p=n[1]+n[3],d=t.aspect;switch(isNaN(u)&&(u=i-s-p-o),isNaN(h)&&(h=r-l-c-a),null!=d&&(isNaN(u)&&isNaN(h)&&(d>i/r?u=.8*i:h=.8*r),isNaN(u)&&(u=d*h),isNaN(h)&&(h=u/d)),isNaN(o)&&(o=i-s-u-p),isNaN(a)&&(a=r-l-h-c),t.left||t.right){case"center":o=i/2-u/2-n[3];break;case"right":o=i-u-p}switch(t.top||t.bottom){case"middle":case"center":a=r/2-h/2-n[0];break;case"bottom":a=r-h-c}o=o||0,a=a||0,isNaN(u)&&(u=i-p-o-(s||0)),isNaN(h)&&(h=r-c-a-(l||0));var f=new gi(o+n[3],a+n[0],u,h);return f.margin=n,f}function Bc(t,e,n,i,r){var o=!r||!r.hv||r.hv[0],a=!r||!r.hv||r.hv[1],s=r&&r.boundingMode||"all";if(o||a){var l;if("raw"===s)l="group"===t.type?new gi(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(l=t.getBoundingRect(),t.needLocalTransform()){var u=t.getLocalTransform();(l=l.clone()).applyTransform(u)}var h=Vc(T({width:l.width,height:l.height},e),n,i),c=o?h.x-l.x:0,p=a?h.y-l.y:0;"raw"===s?(t.x=c,t.y=p):(t.x+=c,t.y+=p),t.markRedraw()}}function Fc(t){var e=t.layoutMode||t.constructor.layoutMode;return X(e)?e:e?{type:e}:null}function Gc(t,e,n){var i=n&&n.ignoreSize;!F(i)&&(i=[i,i]);var r=a(Nc[0],0),o=a(Nc[1],1);function a(n,r){var o={},a=0,u={},h=0;if(Oc(n,(function(e){u[e]=t[e]})),Oc(n,(function(t){s(e,t)&&(o[t]=u[t]=e[t]),l(o,t)&&a++,l(u,t)&&h++})),i[r])return l(e,n[1])?u[n[2]]=null:l(e,n[2])&&(u[n[1]]=null),u;if(2!==h&&a){if(a>=2)return o;for(var c=0;c=0;a--)o=S(o,n[a],!0);e.defaultOption=o}return e.defaultOption},e.prototype.getReferringComponents=function(t,e){var n=t+"Index",i=t+"Id";return Er(this.ecModel,t,{index:this.get(n,!0),id:this.get(i,!0)},e)},e.prototype.getBoxLayoutParams=function(){var t=this;return{left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")}},e.protoInitialize=function(){var t=e.prototype;t.type="component",t.id="",t.name="",t.mainType="",t.subType="",t.componentIndex=0}(),e}(Oh);Yr(Xc,Oh),Kr(Xc),function(t){var e={};t.registerSubTypeDefaulter=function(t,n){var i=Wr(t);e[i.main]=n},t.determineSubType=function(n,i){var r=i.type;if(!r){var o=Wr(n).main;t.hasSubTypes(n)&&e[o]&&(r=e[o](i))}return r}}(Xc),function(t,e){function n(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}t.topologicalTravel=function(t,i,r,o){if(t.length){var a=function(t){var i={},r=[];return P(t,(function(o){var a=n(i,o),s=function(t,e){var n=[];return P(t,(function(t){D(e,t)>=0&&n.push(t)})),n}(a.originalDeps=e(o),t);a.entryCount=s.length,0===a.entryCount&&r.push(o),P(s,(function(t){D(a.predecessor,t)<0&&a.predecessor.push(t);var e=n(i,t);D(e.successor,t)<0&&e.successor.push(o)}))})),{graph:i,noEntryList:r}}(i),s=a.graph,l=a.noEntryList,u={};for(P(t,(function(t){u[t]=!0}));l.length;){var h=l.pop(),c=s[h],p=!!u[h];p&&(r.call(o,h,c.originalDeps.slice()),delete u[h]),P(c.successor,p?f:d)}P(u,(function(){var t="";throw new Error(t)}))}function d(t){s[t].entryCount--,0===s[t].entryCount&&l.push(t)}function f(t){u[t]=!0,d(t)}}}(Xc,(function(t){var e=[];P(Xc.getClassesByMainType(t),(function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])})),e=O(e,(function(t){return Wr(t).main})),"dataset"!==t&&D(e,"dataset")<=0&&e.unshift("dataset");return e}));var Yc="";"undefined"!=typeof navigator&&(Yc=navigator.platform||"");var Zc="rgba(0, 0, 0, 0.2)",jc={darkMode:"auto",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:Zc,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Zc,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Zc,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Zc,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Zc,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Zc,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:Yc.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},qc=ht(["tooltip","label","itemName","itemId","seriesName"]),Kc="original",$c="arrayRows",Jc="objectRows",Qc="keyedColumns",tp="typedArray",ep="unknown",np="column",ip="row",rp=1,op=2,ap=3,sp=kr();function lp(t,e,n){var i={},r=hp(e);if(!r||!t)return i;var o,a,s=[],l=[],u=e.ecModel,h=sp(u).datasetMap,c=r.uid+"_"+n.seriesLayoutBy;P(t=t.slice(),(function(e,n){var r=X(e)?e:t[n]={name:e};"ordinal"===r.type&&null==o&&(o=n,a=f(r)),i[r.name]=[]}));var p=h.get(c)||h.set(c,{categoryWayDim:a,valueWayDim:0});function d(t,e,n){for(var i=0;ie)return t[i];return t[n-1]}(i,a):n;if((h=h||n)&&h.length){var c=h[l];return r&&(u[r]=c),s.paletteIdx=(l+1)%h.length,c}}var wp=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.init=function(t,e,n,i,r,o){i=i||{},this.option=null,this._theme=new Oh(i),this._locale=new Oh(r),this._optionManager=o},e.prototype.setOption=function(t,e,n){var i=Ip(e);this._optionManager.setOption(t,n,i),this._resetOption(null,i)},e.prototype.resetOption=function(t,e){return this._resetOption(t,Ip(e))},e.prototype._resetOption=function(t,e){var n=!1,i=this._optionManager;if(!t||"recreate"===t){var r=i.mountOption("recreate"===t);0,this.option&&"recreate"!==t?(this.restoreData(),this._mergeOption(r,e)):yp(this,r),n=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var o=i.getTimelineOption(this);o&&(n=!0,this._mergeOption(o,e))}if(!t||"recreate"===t||"media"===t){var a=i.getMediaOption(this);a.length&&P(a,(function(t){n=!0,this._mergeOption(t,e)}),this)}return n},e.prototype.mergeOption=function(t){this._mergeOption(t,null)},e.prototype._mergeOption=function(t,e){var n=this.option,i=this._componentsMap,r=this._componentsCount,o=[],a=ht(),s=e&&e.replaceMergeMainTypeMap;sp(this).datasetMap=ht(),P(t,(function(t,e){null!=t&&(Xc.hasClass(e)?e&&(o.push(e),a.set(e,!0)):n[e]=null==n[e]?w(t):S(n[e],t,!0))})),s&&s.each((function(t,e){Xc.hasClass(e)&&!a.get(e)&&(o.push(e),a.set(e,!0))})),Xc.topologicalTravel(o,Xc.getAllClassMainTypes(),(function(e){var o=function(t,e,n){var i=dp.get(e);if(!i)return n;var r=i(t);return r?n.concat(r):n}(this,e,xr(t[e])),a=i.get(e),l=a?s&&s.get(e)?"replaceMerge":"normalMerge":"replaceAll",u=Mr(a,o,l);(function(t,e,n){P(t,(function(t){var i=t.newOption;X(i)&&(t.keyInfo.mainType=e,t.keyInfo.subType=function(t,e,n,i){return e.type?e.type:n?n.subType:i.determineSubType(t,e)}(e,i,t.existing,n))}))})(u,e,Xc),n[e]=null,i.set(e,null),r.set(e,0);var h=[],c=[],p=0;P(u,(function(t,n){var i=t.existing,r=t.newOption;if(r){var o="series"===e,a=Xc.getClass(e,t.keyInfo.subType,!o);if(!a)return;if(i&&i.constructor===a)i.name=t.keyInfo.name,i.mergeOption(r,this),i.optionUpdated(r,!1);else{var s=I({componentIndex:n},t.keyInfo);I(i=new a(r,this,this,s),s),t.brandNew&&(i.__requireNewView=!0),i.init(r,this,this),i.optionUpdated(null,!0)}}else i&&(i.mergeOption({},this),i.optionUpdated({},!1));i?(h.push(i.option),c.push(i),p++):(h.push(void 0),c.push(void 0))}),this),n[e]=h,i.set(e,c),r.set(e,p),"series"===e&&fp(this)}),this),this._seriesIndices||fp(this)},e.prototype.getOption=function(){var t=w(this.option);return P(t,(function(e,n){if(Xc.hasClass(n)){for(var i=xr(e),r=i.length,o=!1,a=r-1;a>=0;a--)i[a]&&!Ar(i[a])?o=!0:(i[a]=null,!o&&r--);i.length=r,t[n]=i}})),delete t["\0_ec_inner"],t},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.getLocale=function(t){return this.getLocaleModel().get(t)},e.prototype.setUpdatePayload=function(t){this._payload=t},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(t,e){var n=this._componentsMap.get(t);if(n){var i=n[e||0];if(i)return i;if(null==e)for(var r=0;r=e:"max"===n?t<=e:t===e})(i[a],t,o)||(r=!1)}})),r}var Op=P,Rp=X,Np=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function zp(t){var e=t&&t.itemStyle;if(e)for(var n=0,i=Np.length;n=0;f--){var g=t[f];if(s||(c=g.data.rawIndexOf(g.stackedByDimension,h)),c>=0){var y=g.data.getByRawIndex(g.stackResultDimension,c);if(p>=0&&y>0||p<=0&&y<0){p=tr(p,y),d=y;break}}}return i[0]=p,i[1]=d,i}));a.hostModel.setData(l),e.data=l}))}var td,ed,nd,id,rd,od=function(t){this.data=t.data||(t.sourceFormat===Qc?{}:[]),this.sourceFormat=t.sourceFormat||ep,this.seriesLayoutBy=t.seriesLayoutBy||np,this.startIndex=t.startIndex||0,this.dimensionsDefine=t.dimensionsDefine,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.encodeDefine=t.encodeDefine,this.metaRawOption=t.metaRawOption};function ad(t){return t instanceof od}function sd(t,e,n,i){n=n||hd(t);var r=e.seriesLayoutBy,o=function(t,e,n,i,r){var o,a;if(!t)return{dimensionsDefine:cd(r),startIndex:a,dimensionsDetectedCount:o};if(e===$c){var s=t;"auto"===i||null==i?pd((function(t){null!=t&&"-"!==t&&(H(t)?null==a&&(a=1):a=0)}),n,s,10):a=U(i)?i:i?1:0,r||1!==a||(r=[],pd((function(t,e){r[e]=null!=t?t+"":""}),n,s,1/0)),o=r?r.length:n===ip?s.length:s[0]?s[0].length:null}else if(e===Jc)r||(r=function(t){var e,n=0;for(;nu&&(u=d)}s[0]=l,s[1]=u}},i=function(){return this._data?this._data.length/this._dimSize:0};function r(t){for(var e=0;e=1)&&(t=1),t}a===l&&s===u||(e="reset"),(this._dirty||"reset"===e)&&(this._dirty=!1,o=this._doReset(i)),this._modBy=l,this._modDataCount=u;var c=t&&t.step;if(this._dueEnd=n?n._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var p=this._dueIndex,d=Math.min(null!=c?this._dueIndex+c:1/0,this._dueEnd);if(!i&&(o||p1&&i>0?s:a}};return o;function a(){return e=t?null:oe},gte:function(t,e){return t>=e}},Nd=function(){function t(t,e){if("number"!=typeof e){var n="";0,vr(n)}this._opFn=Rd[t],this._rvalFloat=cr(e)}return t.prototype.evaluate=function(t){return"number"==typeof t?this._opFn(t,this._rvalFloat):this._opFn(cr(t),this._rvalFloat)},t}(),zd=function(){function t(t,e){var n="desc"===t;this._resultLT=n?1:-1,null==e&&(e=n?"min":"max"),this._incomparable="min"===e?-1/0:1/0}return t.prototype.evaluate=function(t,e){var n=typeof t,i=typeof e,r="number"===n?t:cr(t),o="number"===i?e:cr(e),a=isNaN(r),s=isNaN(o);if(a&&(r=this._incomparable),s&&(o=this._incomparable),a&&s){var l="string"===n,u="string"===i;l&&(r=u?t:0),u&&(o=l?e:0)}return ro?-this._resultLT:0},t}(),Ed=function(){function t(t,e){this._rval=e,this._isEQ=t,this._rvalTypeof=typeof e,this._rvalFloat=cr(e)}return t.prototype.evaluate=function(t){var e=t===this._rval;if(!e){var n=typeof t;n===this._rvalTypeof||"number"!==n&&"number"!==this._rvalTypeof||(e=cr(t)===this._rvalFloat)}return this._isEQ?e:!e},t}();function Vd(t,e){return"eq"===t||"ne"===t?new Ed("eq"===t,e):dt(Rd,t)?new Nd(t,e):null}var Bd=function(){function t(){}return t.prototype.getRawData=function(){throw new Error("not supported")},t.prototype.getRawDataItem=function(t){throw new Error("not supported")},t.prototype.cloneRawData=function(){},t.prototype.getDimensionInfo=function(t){},t.prototype.cloneAllDimensionInfo=function(){},t.prototype.count=function(){},t.prototype.retrieveValue=function(t,e){},t.prototype.retrieveValueFromItem=function(t,e){},t.prototype.convertValue=function(t,e){return kd(t,e)},t}();function Fd(t){var e=t.sourceFormat;if(!Yd(e)){var n="";0,vr(n)}return t.data}function Gd(t){var e=t.sourceFormat,n=t.data;if(!Yd(e)){var i="";0,vr(i)}if(e===$c){for(var r=[],o=0,a=n.length;o9e10&&(this._versionSignBase=0)},t.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},t.prototype.prepareSource=function(){this._isDirty()&&this._createSource()},t.prototype._createSource=function(){this._setLocalSource([],[]);var t,e,n=this._sourceHost,i=this._getUpstreamSourceManagers(),r=!!i.length;if(qd(n)){var o=n,a=void 0,s=void 0,l=void 0;if(r){var u=i[0];u.prepareSource(),a=(l=u.getSource()).data,s=l.sourceFormat,e=[u._getVersionSign()]}else s=Z(a=o.get("data",!0))?tp:Kc,e=[];var h=this._getSourceMetaRawOption(),c=l?l.metaRawOption:null;t=[sd(a,{seriesLayoutBy:tt(h.seriesLayoutBy,c?c.seriesLayoutBy:null),sourceHeader:tt(h.sourceHeader,c?c.sourceHeader:null),dimensions:tt(h.dimensions,c?c.dimensions:null)},s,o.get("encode",!0))]}else{var p=n;if(r){var d=this._applyTransform(i);t=d.sourceList,e=d.upstreamSignList}else{t=[sd(p.get("source",!0),this._getSourceMetaRawOption(),null,null)],e=[]}}this._setLocalSource(t,e)},t.prototype._applyTransform=function(t){var e,n=this._sourceHost,i=n.get("transform",!0),r=n.get("fromTransformResult",!0);if(null!=r){var o="";1!==t.length&&Kd(o)}var a,s=[],l=[];return P(t,(function(t){t.prepareSource();var e=t.getSource(r||0),n="";null==r||e||Kd(n),s.push(e),l.push(t._getVersionSign())})),i?e=function(t,e,n){var i=xr(t),r=i.length,o="";r||vr(o);for(var a=0,s=r;a1||e>0&&!t.noHeader,i=0;P(t.blocks,(function(t){ef(t).planLayout(t);var e=t.__gapLevelBetweenSubBlocks;e>=i&&(i=e+(!n||e&&("section"!==t.type||t.noHeader)?0:1))})),t.__gapLevelBetweenSubBlocks=i},build:function(t,e,n,i){var r=e.noHeader,o=of(e),a=function(t,e,n,i){var r=[],o=e.blocks||[];rt(!o||F(o)),o=o||[];var a=t.orderMode;if(e.sortBlocks&&a){o=o.slice();var s={valueAsc:"asc",valueDesc:"desc"};if(dt(s,a)){var l=new zd(s[a],null);o.sort((function(t,e){return l.evaluate(t.sortParam,e.sortParam)}))}else"seriesDesc"===a&&o.reverse()}var u=of(e);if(P(o,(function(e,n){var o=ef(e).build(t,e,n>0?u.html:0,i);null!=o&&r.push(o)})),!r.length)return;return"richText"===t.renderMode?r.join(u.richText):af(r.join(""),n)}(t,e,r?n:o.html,i);if(r)return a;var s=Tc(e.header,"ordinal",t.useUTC),l=$d(i,t.renderMode).nameStyle;return"richText"===t.renderMode?sf(t,s,l)+o.richText+a:af('
'+Ic(s)+"
"+a,n)}},nameValue:{planLayout:function(t){t.__gapLevelBetweenSubBlocks=0},build:function(t,e,n,i){var r=t.renderMode,o=e.noName,a=e.noValue,s=!e.markerType,l=e.name,u=e.value,h=t.useUTC;if(!o||!a){var c=s?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",r),p=o?"":Tc(l,"ordinal",h),d=e.valueType,f=a?[]:F(u)?O(u,(function(t,e){return Tc(t,F(d)?d[e]:d,h)})):[Tc(u,F(d)?d[0]:d,h)],g=!s||!o,y=!s&&o,v=$d(i,r),m=v.nameStyle,_=v.valueStyle;return"richText"===r?(s?"":c)+(o?"":sf(t,p,m))+(a?"":function(t,e,n,i,r){var o=[r],a=i?10:20;return n&&o.push({padding:[0,0,0,a],align:"right"}),t.markupStyleCreator.wrapRichTextStyle(e.join(" "),o)}(t,f,g,y,_)):af((s?"":c)+(o?"":function(t,e,n){return''+Ic(t)+""}(p,!s,m))+(a?"":function(t,e,n,i){var r=n?"10px":"20px";return''+O(t,(function(t){return Ic(t)})).join("  ")+""}(f,g,y,_)),n)}}}};function rf(t,e,n,i,r,o){if(t){var a=ef(t);a.planLayout(t);var s={useUTC:r,renderMode:n,orderMode:i,markupStyleCreator:e};return a.build(s,t,0,o)}}function of(t){var e=t.__gapLevelBetweenSubBlocks;return{html:Jd[e],richText:Qd[e]}}function af(t,e){return'
'+t+'
'}function sf(t,e,n){return t.markupStyleCreator.wrapRichTextStyle(e,n)}function lf(t,e){return kc(t.getData().getItemVisual(e,"style")[t.visualDrawType])}function uf(t,e){var n=t.get("padding");return null!=n?n:"richText"===e?[8,10]:10}var hf=function(){function t(){this.richTextStyles={},this._nextStyleNameId=dr()}return t.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},t.prototype.makeTooltipMarker=function(t,e,n){var i="richText"===n?this._generateStyleName():null,r=Lc({color:e,type:t,renderMode:n,markerId:i});return H(r)?r:(this.richTextStyles[i]=r.style,r.content)},t.prototype.wrapRichTextStyle=function(t,e){var n={};F(e)?P(e,(function(t){return I(n,t)})):I(n,e);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+t+"}"},t}();function cf(t){var e,n,i,r,o=t.series,a=t.dataIndex,s=t.multipleSeries,l=o.getData(),u=l.mapDimensionsAll("defaultedTooltip"),h=u.length,c=o.getRawValue(a),p=F(c),d=lf(o,a);if(h>1||p&&!h){var f=function(t,e,n,i,r){var o=e.getData(),a=R(t,(function(t,e,n){var i=o.getDimensionInfo(n);return t||i&&!1!==i.tooltip&&null!=i.displayName}),!1),s=[],l=[],u=[];function h(t,e){var n=o.getDimensionInfo(e);n&&!1!==n.otherDims.tooltip&&(a?u.push(tf("nameValue",{markerType:"subItem",markerColor:r,name:n.displayName,value:t,valueType:n.type})):(s.push(t),l.push(n.type)))}return i.length?P(i,(function(t){h(Md(o,n,t),t)})):P(t,h),{inlineValues:s,inlineValueTypes:l,blocks:u}}(c,o,a,u,d);e=f.inlineValues,n=f.inlineValueTypes,i=f.blocks,r=f.inlineValues[0]}else if(h){var g=l.getDimensionInfo(u[0]);r=e=Md(l,a,u[0]),n=g.type}else r=e=p?c[0]:c;var y=Dr(o),v=y&&o.name||"",m=l.getName(a),_=s?v:m;return tf("section",{header:v,noHeader:s||!y,sortParam:r,blocks:[tf("nameValue",{markerType:"item",markerColor:d,name:_,noName:!ot(_),value:e,valueType:n})].concat(i||[])})}var pf=kr();function df(t,e){return t.getName(e)||t.getId(e)}var ff=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}return n(e,t),e.prototype.init=function(t,e,n){this.seriesIndex=this.componentIndex,this.dataTask=Dd({count:yf,reset:vf}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n),(pf(this).sourceManager=new Zd(this)).prepareSource();var i=this.getInitialData(t,n);_f(i,this),this.dataTask.context.data=i,pf(this).dataBeforeProcessed=i,gf(this),this._initSelectedMapFromData(i)},e.prototype.mergeDefaultAndTheme=function(t,e){var n=Fc(this),i=n?Hc(t):{},r=this.subType;Xc.hasClass(r)&&(r+="Series"),S(t,e.getTheme().get(this.subType)),S(t,this.getDefaultOption()),br(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&Gc(t,i,n)},e.prototype.mergeOption=function(t,e){t=S(this.option,t,!0),this.fillDataTextStyle(t.data);var n=Fc(this);n&&Gc(this.option,t,n);var i=pf(this).sourceManager;i.dirty(),i.prepareSource();var r=this.getInitialData(t,e);_f(r,this),this.dataTask.dirty(),this.dataTask.context.data=r,pf(this).dataBeforeProcessed=r,gf(this),this._initSelectedMapFromData(r)},e.prototype.fillDataTextStyle=function(t){if(t&&!Z(t))for(var e=["show"],n=0;nthis.getShallow("animationThreshold")&&(t=!1),!!t},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,e,n){var i=this.ecModel,r=_p.prototype.getColorFromPalette.call(this,t,e,n);return r||(r=i.getColorFromPalette(t,e,n)),r},e.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(t,e){this._innerSelect(this.getData(e),t)},e.prototype.unselect=function(t,e){var n=this.option.selectedMap;if(n)for(var i=this.getData(e),r=0;r=0&&n.push(r)}return n},e.prototype.isSelected=function(t,e){var n=this.option.selectedMap;return n&&n[df(this.getData(e),t)]||!1},e.prototype._innerSelect=function(t,e){var n,i,r=this.option.selectedMode,o=e.length;if(r&&o)if("multiple"===r)for(var a=this.option.selectedMap||(this.option.selectedMap={}),s=0;s0&&this._innerSelect(t,e)}},e.registerClass=function(t){return Xc.registerClass(t)},e.protoInitialize=function(){var t=e.prototype;t.type="series.__base__",t.seriesIndex=0,t.useColorPaletteOnData=!1,t.ignoreStyleOnData=!1,t.hasSymbolVisual=!1,t.defaultSymbol="circle",t.visualStyleAccessPath="itemStyle",t.visualDrawType="fill"}(),e}(Xc);function gf(t){var e=t.name;Dr(t)||(t.name=function(t){var e=t.getRawData(),n=e.mapDimensionsAll("seriesName"),i=[];return P(n,(function(t){var n=e.getDimensionInfo(t);n.displayName&&i.push(n.displayName)})),i.join(" ")}(t)||e)}function yf(t){return t.model.getRawData().count()}function vf(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),mf}function mf(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function _f(t,e){P(r(t.CHANGABLE_METHODS,t.DOWNSAMPLE_METHODS),(function(n){t.wrapMethod(n,B(xf,e))}))}function xf(t,e){var n=bf(t);return n&&n.setOutputEnd((e||this).count()),e}function bf(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}}L(ff,Td),L(ff,_p),Yr(ff,Xc);var wf=function(){function t(){this.group=new Ei,this.uid=Nh("viewComponent")}return t.prototype.init=function(t,e){},t.prototype.render=function(t,e,n,i){},t.prototype.dispose=function(t,e){},t.prototype.updateView=function(t,e,n,i){},t.prototype.updateLayout=function(t,e,n,i){},t.prototype.updateVisual=function(t,e,n,i){},t.prototype.blurSeries=function(t,e){},t}();function Sf(){var t=kr();return function(e){var n=t(e),i=e.pipelineContext,r=!!n.large,o=!!n.progressiveRender,a=n.large=!(!i||!i.large),s=n.progressiveRender=!(!i||!i.progressiveRender);return!(r===a&&o===s)&&"reset"}}Ur(wf),Kr(wf);var Mf=kr(),If=Sf(),Tf=function(){function t(){this.group=new Ei,this.uid=Nh("viewChart"),this.renderTask=Dd({plan:Af,reset:Lf}),this.renderTask.context={view:this}}return t.prototype.init=function(t,e){},t.prototype.render=function(t,e,n,i){},t.prototype.highlight=function(t,e,n,i){Df(t.getData(),i,"emphasis")},t.prototype.downplay=function(t,e,n,i){Df(t.getData(),i,"normal")},t.prototype.remove=function(t,e){this.group.removeAll()},t.prototype.dispose=function(t,e){},t.prototype.updateView=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.updateLayout=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},t.markUpdateMethod=function(t,e){Mf(t).updateMethod=e},t.protoInitialize=void(t.prototype.type="chart"),t}();function Cf(t,e,n){t&&("emphasis"===e?js:qs)(t,n)}function Df(t,e,n){var i=Lr(t,e),r=e&&null!=e.highlightKey?function(t){var e=bs[t];return null==e&&xs<=32&&(e=bs[t]=xs++),e}(e.highlightKey):null;null!=i?P(xr(i),(function(e){Cf(t.getItemGraphicEl(e),n,r)})):t.eachItemGraphicEl((function(t){Cf(t,n,r)}))}function Af(t){return If(t.model)}function Lf(t){var e=t.model,n=t.ecModel,i=t.api,r=t.payload,o=e.pipelineContext.progressiveRender,a=t.view,s=r&&Mf(r).updateMethod,l=o?"incrementalPrepareRender":s&&a[s]?s:"render";return"render"!==l&&a[l](e,n,i,r),kf[l]}Ur(Tf),Kr(Tf);var kf={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)}}},Pf="\0__throttleOriginMethod",Of="\0__throttleRate",Rf="\0__throttleType";function Nf(t,e,n){var i,r,o,a,s,l=0,u=0,h=null;function c(){u=(new Date).getTime(),h=null,t.apply(o,a||[])}e=e||0;var p=function(){for(var t=[],p=0;p=0?c():h=setTimeout(c,-r),l=i};return p.clear=function(){h&&(clearTimeout(h),h=null)},p.debounceNextCall=function(t){s=t},p}function zf(t,e,n,i){var r=t[e];if(r){var o=r[Pf]||r,a=r[Rf];if(r[Of]!==n||a!==i){if(null==n||!i)return t[e]=o;(r=t[e]=Nf(o,n,"debounce"===i))[Pf]=o,r[Rf]=i,r[Of]=n}return r}}var Ef=kr(),Vf={itemStyle:$r(Lh,!0),lineStyle:$r(Ch,!0)},Bf={lineStyle:"stroke",itemStyle:"fill"};function Ff(t,e){var n=t.visualStyleMapper||Vf[e];return n||(console.warn("Unkown style type '"+e+"'."),Vf.itemStyle)}function Gf(t,e){var n=t.visualDrawType||Bf[e];return n||(console.warn("Unkown style type '"+e+"'."),"fill")}var Hf={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData(),i=t.visualStyleAccessPath||"itemStyle",r=t.getModel(i),o=Ff(t,i)(r),a=r.getShallow("decal");a&&(n.setVisual("decal",a),a.dirty=!0);var s=Gf(t,i),l=o[s],u=G(l)?l:null,h="auto"===o.fill||"auto"===o.stroke;if(!o[s]||u||h){var c=t.getColorFromPalette(t.name,null,e.getSeriesCount());o[s]||(o[s]=c,n.setVisual("colorFromPalette",!0)),o.fill="auto"===o.fill||"function"==typeof o.fill?c:o.fill,o.stroke="auto"===o.stroke||"function"==typeof o.stroke?c:o.stroke}if(n.setVisual("style",o),n.setVisual("drawType",s),!e.isSeriesFiltered(t)&&u)return n.setVisual("colorFromPalette",!1),{dataEach:function(e,n){var i=t.getDataParams(n),r=I({},o);r[s]=u(i),e.setItemVisual(n,"style",r)}}}},Wf=new Oh,Uf={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!t.ignoreStyleOnData&&!e.isSeriesFiltered(t)){var n=t.getData(),i=t.visualStyleAccessPath||"itemStyle",r=Ff(t,i),o=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(t,e){var n=t.getRawDataItem(e);if(n&&n[i]){Wf.option=n[i];var a=r(Wf);I(t.ensureUniqueItemVisual(e,"style"),a),Wf.option.decal&&(t.setItemVisual(e,"decal",Wf.option.decal),Wf.option.decal.dirty=!0),o in a&&t.setItemVisual(e,"colorFromPalette",!1)}}:null}}}},Xf={performRawSeries:!0,overallReset:function(t){var e=ht();t.eachSeries((function(t){if(t.useColorPaletteOnData){var n=e.get(t.type);n||(n={},e.set(t.type,n)),Ef(t).scope=n}})),t.eachSeries((function(e){if(e.useColorPaletteOnData&&!t.isSeriesFiltered(e)){var n=e.getRawData(),i={},r=e.getData(),o=Ef(e).scope,a=e.visualStyleAccessPath||"itemStyle",s=Gf(e,a);r.each((function(t){var e=r.getRawIndex(t);i[e]=t})),n.each((function(t){var a=i[t];if(r.getItemVisual(a,"colorFromPalette")){var l=r.ensureUniqueItemVisual(a,"style"),u=n.getName(t)||t+"",h=n.count();l[s]=e.getColorFromPalette(u,o,h)}}))}}))}},Yf=Math.PI;var Zf=function(){function t(t,e,n,i){this._stageTaskMap=ht(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return t.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each((function(t){var e=t.overallTask;e&&e.dirty()}))},t.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),i=n.context,r=!e&&n.progressiveEnabled&&(!i||i.progressiveRender)&&t.__idxInPipeline>n.blockIndex?n.step:null,o=i&&i.modDataCount;return{step:r,modBy:null!=o?Math.ceil(o/r):null,modDataCount:o}}},t.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},t.prototype.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData().count(),r=n.progressiveEnabled&&e.incrementalPrepareRender&&i>=n.threshold,o=t.get("large")&&i>=t.get("largeThreshold"),a="mod"===t.get("progressiveChunkMode")?i:null;t.pipelineContext=n.context={progressiveRender:r,modDataCount:a,large:o}},t.prototype.restorePipelines=function(t){var e=this,n=e._pipelineMap=ht();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()),blockIndex:-1,step:Math.round(i||700),count:0}),e._pipe(t,t.dataTask)}))},t.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),n=this.api;P(this._allHandlers,(function(i){var r=t.get(i.uid)||t.set(i.uid,{}),o="";rt(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,r,e,n),i.overallReset&&this._createOverallStageTask(i,r,e,n)}),this)},t.prototype.prepareView=function(t,e,n,i){var r=t.renderTask,o=r.context;o.model=e,o.ecModel=n,o.api=i,r.__block=!t.incrementalPrepareRender,this._pipe(e,r)},t.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},t.prototype.performVisualTasks=function(t,e,n){this._performStageTasks(this._visualHandlers,t,e,n)},t.prototype._performStageTasks=function(t,e,n,i){i=i||{};var r=!1,o=this;function a(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}P(t,(function(t,s){if(!i.visualType||i.visualType===t.visualType){var l=o._stageTaskMap.get(t.uid),u=l.seriesTaskMap,h=l.overallTask;if(h){var c,p=h.agentStubMap;p.each((function(t){a(i,t)&&(t.dirty(),c=!0)})),c&&h.dirty(),o.updatePayload(h,n);var d=o.getPerformArgs(h,i.block);p.each((function(t){t.perform(d)})),h.perform(d)&&(r=!0)}else u&&u.each((function(s,l){a(i,s)&&s.dirty();var u=o.getPerformArgs(s,i.block);u.skip=!t.performRawSeries&&e.isSeriesFiltered(s.context.model),o.updatePayload(s,n),s.perform(u)&&(r=!0)}))}})),this.unfinished=r||this.unfinished},t.prototype.performSeriesTasks=function(t){var e;t.eachSeries((function(t){e=t.dataTask.perform()||e})),this.unfinished=e||this.unfinished},t.prototype.plan=function(){this._pipelineMap.each((function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)}))},t.prototype.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},t.prototype._createSeriesStageTask=function(t,e,n,i){var r=this,o=e.seriesTaskMap,a=e.seriesTaskMap=ht(),s=t.seriesType,l=t.getTargetSeries;function u(e){var s=e.uid,l=a.set(s,o&&o.get(s)||Dd({plan:Jf,reset:Qf,count:ng}));l.context={model:e,ecModel:n,api:i,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:r},r._pipe(e,l)}t.createOnAllSeries?n.eachRawSeries(u):s?n.eachRawSeriesByType(s,u):l&&l(n,i).each(u)},t.prototype._createOverallStageTask=function(t,e,n,i){var r=this,o=e.overallTask=e.overallTask||Dd({reset:jf});o.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:r};var a=o.agentStubMap,s=o.agentStubMap=ht(),l=t.seriesType,u=t.getTargetSeries,h=!0,c=!1,p="";function d(t){var e=t.uid,n=s.set(e,a&&a.get(e)||(c=!0,Dd({reset:qf,onDirty:$f})));n.context={model:t,overallProgress:h},n.agent=o,n.__block=h,r._pipe(t,n)}rt(!t.createOnAllSeries,p),l?n.eachRawSeriesByType(l,d):u?u(n,i).each(d):(h=!1,P(n.getSeries(),d)),c&&o.dirty()},t.prototype._pipe=function(t,e){var n=t.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=e),i.tail&&i.tail.pipe(e),i.tail=e,e.__idxInPipeline=i.count++,e.__pipeline=i},t.wrapStageHandler=function(t,e){return G(t)&&(t={overallReset:t,seriesType:ig(t)}),t.uid=Nh("stageHandler"),e&&(t.visualType=e),t},t}();function jf(t){t.overallReset(t.ecModel,t.api,t.payload)}function qf(t){return t.overallProgress&&Kf}function Kf(){this.agent.dirty(),this.getDownstream().dirty()}function $f(){this.agent&&this.agent.dirty()}function Jf(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function Qf(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=xr(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?O(e,(function(t,e){return eg(e)})):tg}var tg=eg(0);function eg(t){return function(e,n){var i=n.data,r=n.resetDefines[t];if(r&&r.dataEach)for(var o=e.start;o0&&h===r.length-u.length){var c=r.slice(0,h);"data"!==c&&(e.mainType=c,e[u.toLowerCase()]=t,s=!0)}}a.hasOwnProperty(r)&&(n[r]=t,s=!0),s||(i[r]=t)}))}return{cptQuery:e,dataQuery:n,otherQuery:i}},t.prototype.filter=function(t,e){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,r=n.packedEvent,o=n.model,a=n.view;if(!o||!a)return!0;var s=e.cptQuery,l=e.dataQuery;return u(s,o,"mainType")&&u(s,o,"subType")&&u(s,o,"index","componentIndex")&&u(s,o,"name")&&u(s,o,"id")&&u(l,r,"name")&&u(l,r,"dataIndex")&&u(l,r,"dataType")&&(!a.filterForExposedEvent||a.filterForExposedEvent(t,e.otherQuery,i,r));function u(t,e,n,i){return null==t[n]||e[i||n]===t[n]}},t.prototype.afterTrigger=function(){this.eventInfo=null},t}(),yg={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData();if(t.legendIcon&&n.setVisual("legendIcon",t.legendIcon),t.hasSymbolVisual){var i=t.get("symbol"),r=t.get("symbolSize"),o=t.get("symbolKeepAspect"),a=t.get("symbolRotate"),s=t.get("symbolOffset"),l=G(i),u=G(r),h=G(a),c=G(s),p=l||u||h||c,d=!l&&i?i:t.defaultSymbol,f=u?null:r,g=h?null:a,y=c?null:s;if(n.setVisual({legendIcon:t.legendIcon||d,symbol:d,symbolSize:f,symbolKeepAspect:o,symbolRotate:g,symbolOffset:y}),!e.isSeriesFiltered(t))return{dataEach:p?function(e,n){var o=t.getRawValue(n),p=t.getDataParams(n);l&&e.setItemVisual(n,"symbol",i(o,p)),u&&e.setItemVisual(n,"symbolSize",r(o,p)),h&&e.setItemVisual(n,"symbolRotate",a(o,p)),c&&e.setItemVisual(n,"symbolOffset",s(o,p))}:null}}}};function vg(t,e,n){switch(n){case"color":return t.getItemVisual(e,"style")[t.getVisual("drawType")];case"opacity":return t.getItemVisual(e,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getItemVisual(e,n);default:0}}function mg(t,e){switch(e){case"color":return t.getVisual("style")[t.getVisual("drawType")];case"opacity":return t.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getVisual(e);default:0}}function _g(t,e,n,i){switch(n){case"color":t.ensureUniqueItemVisual(e,"style")[t.getVisual("drawType")]=i,t.setItemVisual(e,"colorFromPalette",!1);break;case"opacity":t.ensureUniqueItemVisual(e,"style").opacity=i;break;case"symbol":case"symbolSize":case"liftZ":t.setItemVisual(e,n,i);break;default:0}}var xg=2*Math.PI,bg=La.CMD,wg=["top","right","bottom","left"];function Sg(t,e,n,i,r){var o=n.width,a=n.height;switch(t){case"top":i.set(n.x+o/2,n.y-e),r.set(0,-1);break;case"bottom":i.set(n.x+o/2,n.y+a+e),r.set(0,1);break;case"left":i.set(n.x-e,n.y+a/2),r.set(-1,0);break;case"right":i.set(n.x+o+e,n.y+a/2),r.set(1,0)}}function Mg(t,e,n,i,r,o,a,s,l){a-=t,s-=e;var u=Math.sqrt(a*a+s*s),h=(a/=u)*n+t,c=(s/=u)*n+e;if(Math.abs(i-r)%xg<1e-4)return l[0]=h,l[1]=c,u-n;if(o){var p=i;i=Na(r),r=Na(p)}else i=Na(i),r=Na(r);i>r&&(r+=xg);var d=Math.atan2(s,a);if(d<0&&(d+=xg),d>=i&&d<=r||d+xg>=i&&d+xg<=r)return l[0]=h,l[1]=c,u-n;var f=n*Math.cos(i)+t,g=n*Math.sin(i)+e,y=n*Math.cos(r)+t,v=n*Math.sin(r)+e,m=(f-a)*(f-a)+(g-s)*(g-s),_=(y-a)*(y-a)+(v-s)*(v-s);return m<_?(l[0]=f,l[1]=g,Math.sqrt(m)):(l[0]=y,l[1]=v,Math.sqrt(_))}function Ig(t,e,n,i,r,o,a,s){var l=r-t,u=o-e,h=n-t,c=i-e,p=Math.sqrt(h*h+c*c),d=(l*(h/=p)+u*(c/=p))/p;s&&(d=Math.min(Math.max(d,0),1)),d*=p;var f=a[0]=t+d*h,g=a[1]=e+d*c;return Math.sqrt((f-r)*(f-r)+(g-o)*(g-o))}function Tg(t,e,n,i,r,o,a){n<0&&(t+=n,n=-n),i<0&&(e+=i,i=-i);var s=t+n,l=e+i,u=a[0]=Math.min(Math.max(r,t),s),h=a[1]=Math.min(Math.max(o,e),l);return Math.sqrt((u-r)*(u-r)+(h-o)*(h-o))}var Cg=[];function Dg(t,e,n){var i=Tg(e.x,e.y,e.width,e.height,t.x,t.y,Cg);return n.set(Cg[0],Cg[1]),i}function Ag(t,e,n){for(var i,r,o=0,a=0,s=0,l=0,u=1/0,h=e.data,c=t.x,p=t.y,d=0;d0){e=e/180*Math.PI,Lg.fromArray(t[0]),kg.fromArray(t[1]),Pg.fromArray(t[2]),ai.sub(Og,Lg,kg),ai.sub(Rg,Pg,kg);var n=Og.len(),i=Rg.len();if(!(n<.001||i<.001)){Og.scale(1/n),Rg.scale(1/i);var r=Og.dot(Rg);if(Math.cos(e)1&&ai.copy(Eg,Pg),Eg.toArray(t[1])}}}}function Bg(t,e,n){if(n<=180&&n>0){n=n/180*Math.PI,Lg.fromArray(t[0]),kg.fromArray(t[1]),Pg.fromArray(t[2]),ai.sub(Og,kg,Lg),ai.sub(Rg,Pg,kg);var i=Og.len(),r=Rg.len();if(!(i<.001||r<.001))if(Og.scale(1/i),Rg.scale(1/r),Og.dot(e)=a)ai.copy(Eg,Pg);else{Eg.scaleAndAdd(Rg,o/Math.tan(Math.PI/2-s));var l=Pg.x!==kg.x?(Eg.x-kg.x)/(Pg.x-kg.x):(Eg.y-kg.y)/(Pg.y-kg.y);if(isNaN(l))return;l<0?ai.copy(Eg,kg):l>1&&ai.copy(Eg,Pg)}Eg.toArray(t[1])}}}function Fg(t,e,n,i){var r="normal"===n,o=r?t:t.ensureState(n);o.ignore=e;var a=i.get("smooth");a&&!0===a&&(a=.3),o.shape=o.shape||{},a>0&&(o.shape.smooth=a);var s=i.getModel("lineStyle").getLineStyle();r?t.useStyle(s):o.style=s}function Gg(t,e){var n=e.smooth,i=e.points;if(i)if(t.moveTo(i[0][0],i[0][1]),n>0&&i.length>=3){var r=Lt(i[0],i[1]),o=Lt(i[1],i[2]);if(!r||!o)return t.lineTo(i[1][0],i[1][1]),void t.lineTo(i[2][0],i[2][1]);var a=Math.min(r,o)*n,s=Ot([],i[1],i[0],a/r),l=Ot([],i[1],i[2],a/o),u=Ot([],s,l,.5);t.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),t.bezierCurveTo(l[0],l[1],l[0],l[1],i[2][0],i[2][1])}else for(var h=1;h0&&o&&x(-h/a,0,a);var f,g,y=t[0],v=t[a-1];return m(),f<0&&b(-f,.8),g<0&&b(g,.8),m(),_(f,g,1),_(g,f,-1),m(),f<0&&w(-f),g<0&&w(g),u}function m(){f=y.rect[e]-i,g=r-v.rect[e]-v.rect[n]}function _(t,e,n){if(t<0){var i=Math.min(e,-t);if(i>0){x(i*n,0,a);var r=i+t;r<0&&b(-r*n,1)}else b(-t*n,1)}}function x(n,i,r){0!==n&&(u=!0);for(var o=i;o0)for(l=0;l0;l--){x(-(o[l-1]*c),l,a)}}}function w(t){var e=t<0?-1:1;t=Math.abs(t);for(var n=Math.ceil(t/(a-1)),i=0;i0?x(n,0,i+1):x(-n,a-i-1,a),(t-=n)<=0)return}}function Xg(t,e,n,i){return Ug(t,"y","height",e,n,i)}function Yg(t){if(t){for(var e=[],n=0;n=0&&n.attr(d.oldLayoutSelect),D(u,"emphasis")>=0&&n.attr(d.oldLayoutEmphasis)),Hu(n,s,e,a)}else if(n.attr(s),!_h(n).valueAnimation){var h=tt(n.style.opacity,1);n.style.opacity=0,Wu(n,{style:{opacity:h}},e,a)}if(d.oldLayout=s,n.states.select){var c=d.oldLayoutSelect={};Jg(c,s,Qg),Jg(c,n.states.select,Qg)}if(n.states.emphasis){var p=d.oldLayoutEmphasis={};Jg(p,s,Qg),Jg(p,n.states.emphasis,Qg)}bh(n,a,l,e,e)}if(i&&!i.ignore&&!i.invisible){r=(d=$g(i)).oldLayout;var d,f={points:i.shape.points};r?(i.attr({shape:r}),Hu(i,{shape:f},e)):(i.setShape(f),i.style.strokePercent=0,Wu(i,{style:{strokePercent:1}},e)),d.oldLayout=f}},t}();function ey(t,e){function n(e,n){var i=[];return e.eachComponent({mainType:"series",subType:t,query:n},(function(t){i.push(t.seriesIndex)})),i}P([[t+"ToggleSelect","toggleSelect"],[t+"Select","select"],[t+"UnSelect","unselect"]],(function(t){e(t[0],(function(e,i,r){e=I({},e),r.dispatchAction(I(e,{type:t[1],seriesIndex:n(i,e)}))}))}))}function ny(t,e,n,i,r){var o=t+e;n.isSilent(o)||i.eachComponent({mainType:"series",subType:"pie"},(function(t){for(var e=t.seriesIndex,i=r.selected,a=0;a0?(e=e||1,"dashed"===t?[4*e,2*e]:"dotted"===t?[e]:U(t)?[t]:F(t)?t:null):null}var my=new La(!0);function _y(t){var e=t.stroke;return!(null==e||"none"===e||!(t.lineWidth>0))}function xy(t){var e=t.fill;return null!=e&&"none"!==e}function by(t,e){if(null!=e.fillOpacity&&1!==e.fillOpacity){var n=t.globalAlpha;t.globalAlpha=e.fillOpacity*e.opacity,t.fill(),t.globalAlpha=n}else t.fill()}function wy(t,e){if(null!=e.strokeOpacity&&1!==e.strokeOpacity){var n=t.globalAlpha;t.globalAlpha=e.strokeOpacity*e.opacity,t.stroke(),t.globalAlpha=n}else t.stroke()}function Sy(t,e,n){var i=no(e.image,e.__image,n);if(ro(i)){var r=t.createPattern(i,e.repeat||"repeat");if("function"==typeof DOMMatrix&&r.setTransform){var o=new DOMMatrix;o.rotateSelf(0,0,(e.rotation||0)/Math.PI*180),o.scaleSelf(e.scaleX||1,e.scaleY||1),o.translateSelf(e.x||0,e.y||0),r.setTransform(o)}return r}}var My=["shadowBlur","shadowOffsetX","shadowOffsetY"],Iy=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function Ty(t,e,n,i,r){var o=!1;if(!i&&e===(n=n||{}))return!1;if(i||e.opacity!==n.opacity){o||(Ay(t,r),o=!0);var a=Math.max(Math.min(e.opacity,1),0);t.globalAlpha=isNaN(a)?_o.opacity:a}(i||e.blend!==n.blend)&&(o||(Ay(t,r),o=!0),t.globalCompositeOperation=e.blend||_o.blend);for(var s=0;s0&&vy(n.lineDash,n.lineWidth),w=n.lineDashOffset,S=!!t.setLineDash,M=e.getGlobalScale();if(u.setScale(M[0],M[1],e.segmentIgnoreThreshold),b){var I=n.strokeNoScale&&e.getLineScale?e.getLineScale():1;I&&1!==I&&(b=O(b,(function(t){return t/I})),w/=I)}var T=!0;(l||4&e.__dirty||b&&!S&&r)&&(u.setDPR(t.dpr),s?u.setContext(null):(u.setContext(t),T=!1),u.reset(),b&&!S&&(u.setLineDash(b),u.setLineDashOffset(w)),e.buildPath(u,e.shape,i),u.toStatic(),e.pathUpdated()),T&&u.rebuildPath(t,s?a:1),b&&S&&(t.setLineDash(b),t.lineDashOffset=w),i||(n.strokeFirst?(r&&wy(t,n),o&&by(t,n)):(o&&by(t,n),r&&wy(t,n))),b&&S&&t.setLineDash([])}(t,e,d,p),p&&(n.batchFill=d.fill||"",n.batchStroke=d.stroke||"")):e instanceof Ja?(3!==n.lastDrawType&&(l=!0,n.lastDrawType=3),Cy(t,e,u,l,n),function(t,e,n){var i=n.text;if(null!=i&&(i+=""),i){t.font=n.font||vi,t.textAlign=n.textAlign,t.textBaseline=n.textBaseline;var r=void 0;if(t.setLineDash){var o=n.lineDash&&n.lineWidth>0&&vy(n.lineDash,n.lineWidth),a=n.lineDashOffset;if(o){var s=n.strokeNoScale&&e.getLineScale?e.getLineScale():1;s&&1!==s&&(o=O(o,(function(t){return t/s})),a/=s),t.setLineDash(o),t.lineDashOffset=a,r=!0}}n.strokeFirst?(_y(n)&&t.strokeText(i,n.x,n.y),xy(n)&&t.fillText(i,n.x,n.y)):(xy(n)&&t.fillText(i,n.x,n.y),_y(n)&&t.strokeText(i,n.x,n.y)),r&&t.setLineDash([])}}(t,e,d)):e instanceof es?(2!==n.lastDrawType&&(l=!0,n.lastDrawType=2),function(t,e,n,i,r){Ty(t,Ly(e,r.inHover),n&&Ly(n,r.inHover),i,r)}(t,e,u,l,n),function(t,e,n){var i=e.__image=no(n.image,e.__image,e,e.onload);if(i&&ro(i)){var r=n.x||0,o=n.y||0,a=e.getWidth(),s=e.getHeight(),l=i.width/i.height;if(null==a&&null!=s?a=s*l:null==s&&null!=a?s=a/l:null==a&&null==s&&(a=i.width,s=i.height),n.sWidth&&n.sHeight){var u=n.sx||0,h=n.sy||0;t.drawImage(i,u,h,n.sWidth,n.sHeight,r,o,a,s)}else if(n.sx&&n.sy){var c=a-(u=n.sx),p=s-(h=n.sy);t.drawImage(i,u,h,c,p,r,o,a,s)}else t.drawImage(i,r,o,a,s)}}(t,e,d)):e instanceof Tu&&(4!==n.lastDrawType&&(l=!0,n.lastDrawType=4),function(t,e,n){var i=e.getDisplayables(),r=e.getTemporalDisplayables();t.save();var o,a,s={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:n.viewWidth,viewHeight:n.viewHeight,inHover:n.inHover};for(o=e.getCursor(),a=i.length;o=4&&(l={x:parseFloat(c[0]||0),y:parseFloat(c[1]||0),width:parseFloat(c[2]),height:parseFloat(c[3])})}if(l&&null!=a&&null!=s&&(u=sv(l,{x:0,y:0,width:a,height:s}),!e.ignoreViewBox)){var p=i;(i=new Ei).add(p),p.scaleX=p.scaleY=u.scale,p.x=u.x,p.y=u.y}return e.ignoreRootClip||null==a||null==s||i.setClipPath(new ls({shape:{x:0,y:0,width:a,height:s}})),{root:i,width:a,height:s,viewBoxRect:l,viewBoxTransform:u,named:r}},t.prototype._parseNode=function(t,e,n,i,r,o){var a,s=t.nodeName.toLowerCase(),l=i;if("defs"===s&&(r=!0),"text"===s&&(o=!0),"defs"===s||"switch"===s)a=e;else{if(!r){var u=Oy[s];if(u&&dt(Oy,s)){a=u.call(this,t,e);var h=t.getAttribute("name");if(h){var c={name:h,namedFrom:null,svgNodeTagLower:s,el:a};n.push(c),"g"===s&&(l=c)}else i&&n.push({name:i.name,namedFrom:i,svgNodeTagLower:s,el:a});e.add(a)}}var p=Zy[s];if(p&&dt(Zy,s)){var d=p.call(this,t),f=t.getAttribute("id");f&&(this._defs[f]=d)}}if(a&&a.isGroup)for(var g=t.firstChild;g;)1===g.nodeType?this._parseNode(g,a,n,l,r,o):3===g.nodeType&&o&&this._parseText(g,a),g=g.nextSibling},t.prototype._parseText=function(t,e){var n=new Ja({style:{text:t.textContent},silent:!0,x:this._textX||0,y:this._textY||0});Ky(e,n),Jy(t,n,this._defsUsePending,!1,!1),function(t,e){var n=e.__selfStyle;if(n){var i=n.textBaseline,r=i;i&&"auto"!==i?"baseline"===i?r="alphabetic":"before-edge"===i||"text-before-edge"===i?r="top":"after-edge"===i||"text-after-edge"===i?r="bottom":"central"!==i&&"mathematical"!==i||(r="middle"):r="alphabetic",t.style.textBaseline=r}var o=e.__inheritedStyle;if(o){var a=o.textAlign,s=a;a&&("middle"===a&&(s="center"),t.style.textAlign=s)}}(n,e);var i=n.style,r=i.fontSize;r&&r<9&&(i.fontSize=9,n.scaleX*=r/9,n.scaleY*=r/9);var o=(i.fontSize||i.fontFamily)&&[i.fontStyle,i.fontWeight,(i.fontSize||12)+"px",i.fontFamily||"sans-serif"].join(" ");i.font=o;var a=n.getBoundingRect();return this._textX+=a.width,e.add(n),n},t.internalField=void(Oy={g:function(t,e){var n=new Ei;return Ky(e,n),Jy(t,n,this._defsUsePending,!1,!1),n},rect:function(t,e){var n=new ls;return Ky(e,n),Jy(t,n,this._defsUsePending,!1,!1),n.setShape({x:parseFloat(t.getAttribute("x")||"0"),y:parseFloat(t.getAttribute("y")||"0"),width:parseFloat(t.getAttribute("width")||"0"),height:parseFloat(t.getAttribute("height")||"0")}),n.silent=!0,n},circle:function(t,e){var n=new Nl;return Ky(e,n),Jy(t,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),r:parseFloat(t.getAttribute("r")||"0")}),n.silent=!0,n},line:function(t,e){var n=new uu;return Ky(e,n),Jy(t,n,this._defsUsePending,!1,!1),n.setShape({x1:parseFloat(t.getAttribute("x1")||"0"),y1:parseFloat(t.getAttribute("y1")||"0"),x2:parseFloat(t.getAttribute("x2")||"0"),y2:parseFloat(t.getAttribute("y2")||"0")}),n.silent=!0,n},ellipse:function(t,e){var n=new El;return Ky(e,n),Jy(t,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),rx:parseFloat(t.getAttribute("rx")||"0"),ry:parseFloat(t.getAttribute("ry")||"0")}),n.silent=!0,n},polygon:function(t,e){var n,i=t.getAttribute("points");i&&(n=$y(i));var r=new ru({shape:{points:n||[]},silent:!0});return Ky(e,r),Jy(t,r,this._defsUsePending,!1,!1),r},polyline:function(t,e){var n,i=t.getAttribute("points");i&&(n=$y(i));var r=new au({shape:{points:n||[]},silent:!0});return Ky(e,r),Jy(t,r,this._defsUsePending,!1,!1),r},image:function(t,e){var n=new es;return Ky(e,n),Jy(t,n,this._defsUsePending,!1,!1),n.setStyle({image:t.getAttribute("xlink:href"),x:+t.getAttribute("x"),y:+t.getAttribute("y"),width:+t.getAttribute("width"),height:+t.getAttribute("height")}),n.silent=!0,n},text:function(t,e){var n=t.getAttribute("x")||"0",i=t.getAttribute("y")||"0",r=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(r),this._textY=parseFloat(i)+parseFloat(o);var a=new Ei;return Ky(e,a),Jy(t,a,this._defsUsePending,!1,!0),a},tspan:function(t,e){var n=t.getAttribute("x"),i=t.getAttribute("y");null!=n&&(this._textX=parseFloat(n)),null!=i&&(this._textY=parseFloat(i));var r=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0",a=new Ei;return Ky(e,a),Jy(t,a,this._defsUsePending,!1,!0),this._textX+=parseFloat(r),this._textY+=parseFloat(o),a},path:function(t,e){var n=Ol(t.getAttribute("d")||"");return Ky(e,n),Jy(t,n,this._defsUsePending,!1,!1),n.silent=!0,n}}),t}(),Zy={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||"0",10),n=parseInt(t.getAttribute("y1")||"0",10),i=parseInt(t.getAttribute("x2")||"10",10),r=parseInt(t.getAttribute("y2")||"0",10),o=new mu(e,n,i,r);return jy(t,o),qy(t,o),o},radialgradient:function(t){var e=parseInt(t.getAttribute("cx")||"0",10),n=parseInt(t.getAttribute("cy")||"0",10),i=parseInt(t.getAttribute("r")||"0",10),r=new _u(e,n,i);return jy(t,r),qy(t,r),r}};function jy(t,e){"userSpaceOnUse"===t.getAttribute("gradientUnits")&&(e.global=!0)}function qy(t,e){for(var n=t.firstChild;n;){if(1===n.nodeType&&"stop"===n.nodeName.toLocaleLowerCase()){var i=n.getAttribute("offset"),r=void 0;r=i&&i.indexOf("%")>0?parseInt(i,10)/100:i?parseFloat(i):0;var o={};av(n,o,o);var a=o.stopColor||n.getAttribute("stop-color")||"#000000";e.colorStops.push({offset:r,color:a})}n=n.nextSibling}}function Ky(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),T(e.__inheritedStyle,t.__inheritedStyle))}function $y(t){for(var e=nv(t),n=[],i=0;i0;o-=2){var a=i[o],s=i[o-1],l=nv(a);switch(r=r||[1,0,0,1,0,0],s){case"translate":Un(r,r,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":Yn(r,r,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":Xn(r,r,-parseFloat(l[0])*rv);break;case"skewX":Wn(r,[1,0,Math.tan(parseFloat(l[0])*rv),1,0,0],r);break;case"skewY":Wn(r,[1,Math.tan(parseFloat(l[0])*rv),0,1,0,0],r);break;case"matrix":r[0]=parseFloat(l[0]),r[1]=parseFloat(l[1]),r[2]=parseFloat(l[2]),r[3]=parseFloat(l[3]),r[4]=parseFloat(l[4]),r[5]=parseFloat(l[5])}}e.setLocalTransform(r)}}(t,e),av(t,a,s),i||function(t,e,n){for(var i=0;i>1^-(1&s),l=l>>1^-(1&l),r=s+=r,o=l+=o,i.push([s/n,l/n])}return i}function vv(t,e){return O(N((t=function(t){if(!t.UTF8Encoding)return t;var e=t,n=e.UTF8Scale;null==n&&(n=1024);for(var i=e.features,r=0;r0})),(function(t){var n=t.properties,i=t.geometry,r=[];if("Polygon"===i.type){var o=i.coordinates;r.push({type:"polygon",exterior:o[0],interiors:o.slice(1)})}"MultiPolygon"===i.type&&P(o=i.coordinates,(function(t){t[0]&&r.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})}));var a=new pv(n[e||"name"],r,n.cp);return a.properties=n,a}))}for(var mv=[126,25],_v="南海诸岛",xv=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]],bv=0;bv0&&t.unfinished);t.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.setOption=function(t,e,n){if(this._disposed)_m(this.id);else{var i,r,o;if(zv(e)&&(n=e.lazyUpdate,i=e.silent,r=e.replaceMerge,o=e.transition,e=e.notMerge),this.__flagInMainProcess=!0,!this._model||e){var a=new kp(this._api),s=this._theme,l=this._model=new wp;l.scheduler=this._scheduler,l.init(null,null,null,s,this._locale,a)}this._model.setOption(t,{replaceMerge:r},Sm),cm(this,o),n?(this.__optionUpdated={silent:i},this.__flagInMainProcess=!1,this.getZr().wakeUp()):(Zv(this),Kv.update.call(this),this._zr.flush(),this.__optionUpdated=!1,this.__flagInMainProcess=!1,tm.call(this,i),em.call(this,i))}},e.prototype.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Vv&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){if(a.canvasSupported)return t=t||{},this._zr.painter.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},e.prototype.getSvgDataURL=function(){if(a.svgSupported){var t=this._zr;return P(t.storage.getDisplayList(),(function(t){t.stopAnimation(null,!0)})),t.painter.toDataURL()}},e.prototype.getDataURL=function(t){if(!this._disposed){var e=(t=t||{}).excludeComponents,n=this._model,i=[],r=this;Rv(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 o="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return Rv(i,(function(t){t.group.ignore=!1})),o}_m(this.id)},e.prototype.getConnectedDataURL=function(t){if(this._disposed)_m(this.id);else if(a.canvasSupported){var e="svg"===t.type,n=this.group,i=Math.min,r=Math.max,o=1/0;if(Lm[n]){var s=o,l=o,u=-1/0,h=-1/0,c=[],p=t&&t.pixelRatio||this.getDevicePixelRatio();P(Am,(function(o,a){if(o.group===n){var p=e?o.getZr().painter.getSvgDom().innerHTML:o.getRenderedCanvas(w(t)),d=o.getDom().getBoundingClientRect();s=i(d.left,s),l=i(d.top,l),u=r(d.right,u),h=r(d.bottom,h),c.push({dom:p,left:d.left,top:d.top})}}));var d=(u*=p)-(s*=p),f=(h*=p)-(l*=p),g=C(),y=Hi(g,{renderer:e?"svg":"canvas"});if(y.resize({width:d,height:f}),e){var v="";return Rv(c,(function(t){var e=t.left-s,n=t.top-l;v+=''+t.dom+""})),y.painter.getSvgRoot().innerHTML=v,t.connectedBackgroundColor&&y.painter.setBackgroundColor(t.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}return t.connectedBackgroundColor&&y.add(new ls({shape:{x:0,y:0,width:d,height:f},style:{fill:t.connectedBackgroundColor}})),Rv(c,(function(t){var e=new es({style:{x:t.left*p-s,y:t.top*p-l,image:t.dom}});y.add(e)})),y.refreshImmediately(),g.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}},e.prototype.convertToPixel=function(t,e){return $v(this,"convertToPixel",t,e)},e.prototype.convertFromPixel=function(t,e){return $v(this,"convertFromPixel",t,e)},e.prototype.containPixel=function(t,e){var n;if(!this._disposed)return P(Or(this._model,t),(function(t,i){i.indexOf("Models")>=0&&P(t,(function(t){var r=t.coordinateSystem;if(r&&r.containPoint)n=n||!!r.containPoint(e);else if("seriesModels"===i){var o=this._chartsMap[t.__viewId];o&&o.containPoint&&(n=n||o.containPoint(e,t))}else 0}),this)}),this),!!n;_m(this.id)},e.prototype.getVisual=function(t,e){var n=Or(this._model,t,{defaultMainType:"series"}),i=n.seriesModel;var r=i.getData(),o=n.hasOwnProperty("dataIndexInside")?n.dataIndexInside:n.hasOwnProperty("dataIndex")?r.indexOfRawIndex(n.dataIndex):null;return null!=o?vg(r,o,e):mg(r,e)},e.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},e.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},e.prototype._initEvents=function(){var t,e,n,i=this;Rv(mm,(function(t){var e=function(e){var n,r=i.getModel(),o=e.target,a="globalout"===t;if(a?n={}:o&&iy(o,(function(t){var e=_s(t);if(e&&null!=e.dataIndex){var i=e.dataModel||r.getSeriesByIndex(e.seriesIndex);return n=i&&i.getDataParams(e.dataIndex,e.dataType)||{},!0}if(e.eventData)return n=I({},e.eventData),!0}),!0),n){var s=n.componentType,l=n.componentIndex;"markLine"!==s&&"markPoint"!==s&&"markArea"!==s||(s="series",l=n.seriesIndex);var u=s&&null!=l&&r.getComponent(s,l),h=u&&i["series"===u.mainType?"_chartsMap":"_componentsMap"][u.__viewId];0,n.event=e,n.type=t,i._$eventProcessor.eventInfo={targetEl:o,packedEvent:n,model:u,view:h},i.trigger(t,n)}};e.zrEventfulCallAtLast=!0,i._zr.on(t,e,i)})),Rv(bm,(function(t,e){i._messageCenter.on(e,(function(t){this.trigger(e,t)}),i)})),Rv(["selectchanged"],(function(t){i._messageCenter.on(t,(function(e){this.trigger(t,e)}),i)})),t=this._messageCenter,e=this,n=this._api,t.on("selectchanged",(function(t){var i=n.getModel();t.isFromClick?(ny("map","selectchanged",e,i,t),ny("pie","selectchanged",e,i,t)):"select"===t.fromAction?(ny("map","selected",e,i,t),ny("pie","selected",e,i,t)):"unselect"===t.fromAction&&(ny("map","unselected",e,i,t),ny("pie","unselected",e,i,t))}))},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){this._disposed?_m(this.id):this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed)_m(this.id);else{this._disposed=!0,Vr(this.getDom(),Om,"");var t=this._api,e=this._model;Rv(this._componentsViews,(function(n){n.dispose(e,t)})),Rv(this._chartsViews,(function(n){n.dispose(e,t)})),this._zr.dispose(),delete Am[this.id]}},e.prototype.resize=function(t){if(this._disposed)_m(this.id);else{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.__optionUpdated&&(null==i&&(i=this.__optionUpdated.silent),n=!0,this.__optionUpdated=!1),this.__flagInMainProcess=!0,n&&Zv(this),Kv.update.call(this,{type:"resize",animation:I({duration:0},t&&t.animation)}),this.__flagInMainProcess=!1,tm.call(this,i),em.call(this,i)}}},e.prototype.showLoading=function(t,e){if(this._disposed)_m(this.id);else if(zv(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),Dm[t]){var n=Dm[t](this._api,e),i=this._zr;this._loadingFX=n,i.add(n)}},e.prototype.hideLoading=function(){this._disposed?_m(this.id):(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},e.prototype.makeActionFromEvent=function(t){var e=I({},t);return e.type=bm[t.type],e},e.prototype.dispatchAction=function(t,e){if(this._disposed)_m(this.id);else if(zv(e)||(e={silent:!!e}),xm[t.type]&&this._model)if(this.__flagInMainProcess)this._pendingActions.push(t);else{var n=e.silent;Qv.call(this,t,n);var i=e.flush;i?this._zr.flush():!1!==i&&a.browser.weChat&&this._throttledZrFlush(),tm.call(this,n),em.call(this,n)}},e.prototype.updateLabelLayout=function(){var t=this._labelManager;t.updateLayoutConfig(this._api),t.layout(this._api),t.processLabelsOverall()},e.prototype.appendData=function(t){if(this._disposed)_m(this.id);else{var e=t.seriesIndex,n=this.getModel().getSeriesByIndex(e);0,n.appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()}},e.internalField=function(){function t(t){for(var e=[],n=t.currentStates,i=0;i0?{duration:o,delay:i.get("delay"),easing:i.get("easing")}:null;n.group.traverse((function(e){if(e.states&&e.states.emphasis){if(Zu(e))return;if(e instanceof Ka&&function(t){var e=ws(t);e.normalFill=t.style.fill,e.normalStroke=t.style.stroke;var n=t.states.select||{};e.selectFill=n.style&&n.style.fill||null,e.selectStroke=n.style&&n.style.stroke||null}(e),e.__dirty){var n=e.prevStates;n&&e.useStates(n)}if(r){e.stateTransition=a;var i=e.getTextContent(),o=e.getTextGuideLine();i&&(i.stateTransition=a),o&&(o.stateTransition=a)}e.__dirty&&t(e)}}))}Zv=function(t){var e=t._scheduler;e.restorePipelines(t._model),e.prepareStageTasks(),jv(t,!0),jv(t,!1),e.plan()},jv=function(t,e){for(var n=t._model,i=t._scheduler,r=e?t._componentsViews:t._chartsViews,o=e?t._componentsMap:t._chartsMap,a=t._zr,s=t._api,l=0;le.get("hoverLayerThreshold")&&!a.node&&!a.worker&&e.eachSeries((function(e){if(!e.preventUsingHoverLayer){var n=t._chartsMap[e.__viewId];n.__alive&&n.group.traverse((function(t){t.states.emphasis&&(t.states.emphasis.hoverLayer=!0)}))}}))}(t,n)},lm=function(t,e){Rv(Im,(function(n){n(t,e)}))},pm=function(t){t.__needsUpdateStatus=!0,t.getZr().wakeUp()},dm=function(e){e.__needsUpdateStatus&&(e.getZr().storage.traverse((function(e){Zu(e)||t(e)})),e.__needsUpdateStatus=!1)},um=function(t){return new(function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return n(i,e),i.prototype.getCoordinateSystems=function(){return t._coordSysMgr.getCoordinateSystems()},i.prototype.getComponentByElement=function(e){for(;e;){var n=e.__ecComponentInfo;if(null!=n)return t._model.getComponent(n.mainType,n.index);e=e.parent}},i.prototype.enterEmphasis=function(e,n){js(e,n),pm(t)},i.prototype.leaveEmphasis=function(e,n){qs(e,n),pm(t)},i.prototype.enterBlur=function(e){Ks(e),pm(t)},i.prototype.leaveBlur=function(e){$s(e),pm(t)},i.prototype.enterSelect=function(e){Js(e),pm(t)},i.prototype.leaveSelect=function(e){Qs(e),pm(t)},i.prototype.getModel=function(){return t.getModel()},i.prototype.getViewOfComponentModel=function(e){return t.getViewOfComponentModel(e)},i.prototype.getViewOfSeriesModel=function(e){return t.getViewOfSeriesModel(e)},i}(Cp))(t)},hm=function(t){function e(t,e){for(var n=0;n=0)){Ym.push(n);var o=Zf.wrapStageHandler(n,r);o.__prio=e,o.__raw=n,t.push(o)}}function jm(t,e){Dm[t]=e}function qm(t,e,n){Av(t,e,n)}var Km=function(t){var e=(t=w(t)).type,n="";e||vr(n);var i=e.split(":");2!==i.length&&vr(n);var r=!1;"echarts"===i[0]&&(e=i[1],r=!0),t.__isBuiltIn=r,Ud.set(e,t)};Xm(Bv,Hf),Xm(Fv,Uf),Xm(Fv,Xf),Xm(Bv,yg),Xm(Fv,{createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(t.hasSymbolVisual&&!e.isSeriesFiltered(t))return{dataEach:t.getData().hasItemOption?function(t,e){var n=t.getItemModel(e),i=n.getShallow("symbol",!0),r=n.getShallow("symbolSize",!0),o=n.getShallow("symbolRotate",!0),a=n.getShallow("symbolOffset",!0),s=n.getShallow("symbolKeepAspect",!0);null!=i&&t.setItemVisual(e,"symbol",i),null!=r&&t.setItemVisual(e,"symbolSize",r),null!=o&&t.setItemVisual(e,"symbolRotate",o),null!=a&&t.setItemVisual(e,"symbolOffset",a),null!=s&&t.setItemVisual(e,"symbolKeepAspect",s)}:null}}}),Xm(7e3,(function(t,e){t.eachRawSeries((function(n){if(!t.isSeriesFiltered(n)){var i=n.getData();i.hasItemVisual()&&i.each((function(t){var n=i.getItemVisual(t,"decal");n&&(i.ensureUniqueItemVisual(t,"style").decal=Ey(n,e))}));var r=i.getVisual("decal");if(r)i.getVisual("style").decal=Ey(r,e)}}))})),Vm(Jp),Bm(900,(function(t){var e=ht();t.eachSeries((function(t){var n=t.get("stack");if(n){var i=e.get(n)||e.set(n,[]),r=t.getData(),o={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(!o.stackedDimension||!o.isStackedByIndex&&!o.stackedByDimension)return;i.length&&r.setCalculationInfo("stackedOnSeries",i[i.length-1].seriesModel),i.push(o)}})),e.each(Qp)})),jm("default",(function(t,e){T(e=e||{},{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var n=new Ei,i=new ls({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});n.add(i);var r,o=new cs({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),a=new ls({style:{fill:"none"},textContent:o,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});return n.add(a),e.showSpinner&&((r=new gu({shape:{startAngle:-Yf/2,endAngle:-Yf/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*Yf/2}).start("circularInOut"),r.animateShape(!0).when(1e3,{startAngle:3*Yf/2}).delay(300).start("circularInOut"),n.add(r)),n.resize=function(){var n=o.getBoundingRect().width,s=e.showSpinner?e.spinnerRadius:0,l=(t.getWidth()-2*s-(e.showSpinner&&n?10:0)-n)/2-(e.showSpinner&&n?0:5+n/2)+(e.showSpinner?0:n/2)+(n?0:s),u=t.getHeight()/2;e.showSpinner&&r.setShape({cx:l,cy:u}),a.setShape({x:l-s,y:u-s,width:2*s,height:2*s}),i.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},n.resize(),n})),Hm({type:Ts,event:Ts,update:Ts},ft),Hm({type:Cs,event:Cs,update:Cs},ft),Hm({type:Ds,event:Ds,update:Ds},ft),Hm({type:As,event:As,update:As},ft),Hm({type:Ls,event:Ls,update:Ls},ft),Em("light",ug),Em("dark",fg);var $m=[],Jm={registerPreprocessor:Vm,registerProcessor:Bm,registerPostInit:Fm,registerPostUpdate:Gm,registerAction:Hm,registerCoordinateSystem:Wm,registerLayout:Um,registerVisual:Xm,registerTransform:Km,registerLoading:jm,registerMap:qm,PRIORITY:Gv,ComponentModel:Xc,ComponentView:wf,SeriesModel:ff,ChartView:Tf,registerComponentModel:function(t){Xc.registerClass(t)},registerComponentView:function(t){wf.registerClass(t)},registerSeriesModel:function(t){ff.registerClass(t)},registerChartView:function(t){Tf.registerClass(t)},registerSubTypeDefaulter:function(t,e){Xc.registerSubTypeDefaulter(t,e)},registerPainter:function(t,e){Wi(t,e)}};function Qm(t){F(t)?P(t,(function(t){Qm(t)})):D($m,t)>=0||($m.push(t),G(t)&&(t={install:t}),t.install(Jm))}function t_(t){return null==t?0:t.length||1}function e_(t){return t}var n_=function(){function t(t,e,n,i,r,o){this._old=t,this._new=e,this._oldKeyGetter=n||e_,this._newKeyGetter=i||e_,this.context=r,this._diffModeMultiple="multiple"===o}return t.prototype.add=function(t){return this._add=t,this},t.prototype.update=function(t){return this._update=t,this},t.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},t.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},t.prototype.remove=function(t){return this._remove=t,this},t.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},t.prototype._executeOneToOne=function(){var t=this._old,e=this._new,n={},i=new Array(t.length),r=new Array(e.length);this._initIndexMap(t,null,i,"_oldKeyGetter"),this._initIndexMap(e,n,r,"_newKeyGetter");for(var o=0;o1){var u=s.shift();1===s.length&&(n[a]=s[0]),this._update&&this._update(u,o)}else 1===l?(n[a]=null,this._update&&this._update(s,o)):this._remove&&this._remove(o)}this._performRestAdd(r,n)},t.prototype._executeMultiple=function(){var t=this._old,e=this._new,n={},i={},r=[],o=[];this._initIndexMap(t,n,r,"_oldKeyGetter"),this._initIndexMap(e,i,o,"_newKeyGetter");for(var a=0;a1&&1===c)this._updateManyToOne&&this._updateManyToOne(u,l),i[s]=null;else if(1===h&&c>1)this._updateOneToMany&&this._updateOneToMany(u,l),i[s]=null;else if(1===h&&1===c)this._update&&this._update(u,l),i[s]=null;else if(h>1)for(var p=0;p1)for(var a=0;av[1]&&(v[1]=y)}e&&(this._nameList[d]=e[f],this._dontMakeIdFromName||d_(this,d))}this._rawCount=this._count=s,this._extent={},a_(this)},t.prototype._initDataFromProvider=function(t,e,n){if(!(t>=e)){for(var i=this._rawData,r=this._storage,o=this.dimensions,a=o.length,s=this._dimensionInfos,l=this._nameList,u=this._idList,h=this._rawExtent,c=i.getSource().sourceFormat===Kc,p=0;pb[1]&&(b[1]=x)}if(c&&!i.pure&&y){var w=y.name;null==l[v]&&null!=w&&(l[v]=Cr(w,null));var S=y.id;null==u[v]&&null!=S&&(u[v]=Cr(S,null))}this._dontMakeIdFromName||d_(this,v)}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=e,this._extent={},a_(this)}},t.prototype.count=function(){return this._count},t.prototype.getIndices=function(){var t,e=this._indices;if(e){var n=e.constructor,i=this._count;if(n===Array){t=new n(i);for(var r=0;r=0&&e=0&&e=0&&ea&&(a=l)}return i=[o,a],this._extent[t]=i,i},t.prototype.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},t.prototype.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},t.prototype.getCalculationInfo=function(t){return this._calculationInfo[t]},t.prototype.setCalculationInfo=function(t,e){b_(t)?I(this._calculationInfo,t):this._calculationInfo[t]=e},t.prototype.getSum=function(t){var e=0;if(this._storage[t])for(var n=0,i=this.count();n=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,n=e[t];if(null!=n&&nt))return o;r=o-1}}return-1},t.prototype.indicesOfNearest=function(t,e,n){var i=this._storage[t],r=[];if(!i)return r;null==n&&(n=1/0);for(var o=1/0,a=-1,s=0,l=0,u=this.count();l=0&&a<0)&&(o=c,a=h,s=0),h===a&&(r[s++]=l))}return r.length=s,r},t.prototype.getRawDataItem=function(t){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(t));for(var e=[],n=0;n=c&&b<=p||isNaN(b))&&(s[l++]=g),g++}f=!0}else if(2===o){y=d[h[0]];var m=d[h[1]],_=t[i[1]][0],x=t[i[1]][1];for(v=0;v=c&&b<=p||isNaN(b))&&(w>=_&&w<=x||isNaN(w))&&(s[l++]=g),g++}f=!0}}if(!f)if(1===o)for(v=0;v=c&&b<=p||isNaN(b))&&(s[l++]=S)}else for(v=0;vt[T][1])&&(M=!1)}M&&(s[l++]=this.getRawIndex(v))}return lx[1]&&(x[1]=_)}}}return a},t.prototype.downSample=function(t,e,n,i){for(var r=g_(this,[t]),o=r._storage,a=[],s=x_(1/e),l=o[t],u=this.count(),h=r._rawExtent[t],c=new(s_(this))(u),p=0,d=0;du-d&&(s=u-d,a.length=s);for(var f=0;fh[1]&&(h[1]=y),c[p++]=v}return r._count=p,r._indices=c,r.getRawIndex=h_,r},t.prototype.lttbDownSample=function(t,e){var n,i,r,o=g_(this,[]),a=o._storage[t],s=this.count(),l=new(s_(this))(s),u=0,h=x_(1/e),c=this.getRawIndex(0);l[u++]=c;for(var p=1;pn&&(n=i,r=S)}l[u++]=r,c=r}return l[u++]=this.getRawIndex(s-1),o._count=u,o._indices=l,o.getRawIndex=h_,o},t.prototype.getItemModel=function(t){var e=this.hostModel,n=this.getRawDataItem(t);return new Oh(n,e,e&&e.ecModel)},t.prototype.diff=function(t){var e=this;return new n_(t?t.getIndices():[],this.getIndices(),(function(e){return c_(t,e)}),(function(t){return c_(e,t)}))},t.prototype.getVisual=function(t){var e=this._visual;return e&&e[t]},t.prototype.setVisual=function(t,e){this._visual=this._visual||{},b_(t)?I(this._visual,t):this._visual[t]=e},t.prototype.getItemVisual=function(t,e){var n=this._itemVisuals[t],i=n&&n[e];return null==i?this.getVisual(e):i},t.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},t.prototype.ensureUniqueItemVisual=function(t,e){var n=this._itemVisuals,i=n[t];i||(i=n[t]={});var r=i[e];return null==r&&(F(r=this.getVisual(e))?r=r.slice():b_(r)&&(r=I({},r)),i[e]=r),r},t.prototype.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{};this._itemVisuals[t]=i,b_(e)?I(i,e):i[e]=n},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(t,e){if(b_(t))for(var n in t)t.hasOwnProperty(n)&&this.setLayout(n,t[n]);else this._layout[t]=e},t.prototype.getLayout=function(t){return this._layout[t]},t.prototype.getItemLayout=function(t){return this._itemLayouts[t]},t.prototype.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?I(this._itemLayouts[t]||{},e):e},t.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},t.prototype.setItemGraphicEl=function(t,e){var n=this.hostModel;if(e){var i=_s(e);i.dataIndex=t,i.dataType=this.dataType,i.seriesIndex=n&&n.seriesIndex,"group"===e.type&&e.traverse(v_,e)}this._graphicEls[t]=e},t.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},t.prototype.eachItemGraphicEl=function(t,e){P(this._graphicEls,(function(n,i){n&&t&&t.call(e,n,i)}))},t.prototype.cloneShallow=function(e){e||(e=new t(w_(this.dimensions,this.getDimensionInfo,this),this.hostModel));if(e._storage=this._storage,e._storageArr=this._storageArr,m_(e,this),this._indices){var n=this._indices.constructor;if(n===Array){var i=this._indices.length;e._indices=new n(i);for(var r=0;r65535?I_:C_},l_=function(t,e,n,i){var r=M_[e.type],o=e.name;if(i){var a=t[o],s=a&&a.length;if(s!==n){for(var l=new r(n),u=0;u=0?this._indices[t]:-1},c_=function(t,e){var n=t._idList[e];return null==n&&null!=t._idDimIdx&&(n=p_(t,t._idDimIdx,t._idOrdinalMeta,e)),null==n&&(n="e\0\0"+e),n},f_=function(t){return F(t)||(t=null!=t?[t]:[]),t},function(t,e){for(var n=0;n=0?(s[c]=(o=l[c],a=void 0,(a=o.constructor)===Array?o.slice():new a(o)),r._rawExtent[c]=y_(),r._extent[c]=null):s[c]=l[c],u.push(s[c]))}return r},y_=function(){return[1/0,-1/0]},v_=function(t){var e=_s(t),n=_s(this);e.seriesIndex=n.seriesIndex,e.dataIndex=n.dataIndex,e.dataType=n.dataType},m_=function(t,e){P(D_.concat(e.__wrappedMethods||[]),(function(n){e.hasOwnProperty(n)&&(t[n]=e[n])})),t.__wrappedMethods=e.__wrappedMethods,P(A_,(function(n){t[n]=w(e[n])})),t._calculationInfo=I({},e._calculationInfo)},d_=function(t,e){var n=t._nameList,i=t._idList,r=t._nameDimIdx,o=t._idDimIdx,a=n[e],s=i[e];if(null==a&&null!=r&&(n[e]=a=p_(t,r,t._nameOrdinalMeta,e)),null==s&&null!=o&&(i[e]=s=p_(t,o,t._idOrdinalMeta,e)),null==s&&null!=a){var l=t._nameRepeatCount,u=l[a]=(l[a]||0)+1;s=a,u>1&&(s+="__ec__"+u),i[e]=s}}}(),t}();function k_(t,e,n){ad(e)||(e=ld(e)),n=n||{},t=(t||[]).slice();for(var i=(n.dimsDef||[]).slice(),r=ht(),o=ht(),a=[],s=function(t,e,n,i){var r=Math.max(t.dimensionsDetectedCount||1,e.length,n.length,i||0);return P(e,(function(t){var e;X(t)&&(e=t.dimsDef)&&(r=Math.max(r,e.length))})),r}(e,t,i,n.dimCount),l=0;le[1]&&(e[1]=t[1])},t.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},t.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},t.prototype.isBlank=function(){return this._isBlank},t.prototype.setBlank=function(t){this._isBlank=t},t}();Kr(G_);var H_=function(){function t(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication}return t.createByAxisModel=function(e){var n=e.option,i=n.data,r=i&&O(i,W_);return new t({categories:r,needCollect:!r,deduplication:!1!==n.dedplication})},t.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},t.prototype.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=this._getOrCreateMap();return null==(e=i.get(t))&&(n?(e=this.categories.length,this.categories[e]=t,i.set(t,e)):e=NaN),e},t.prototype._getOrCreateMap=function(){return this._map||(this._map=ht(this.categories))},t}();function W_(t){return X(t)&&null!=t.value?t.value:t+""}var U_=ji;function X_(t,e,n,i){var r={},o=t[1]-t[0],a=r.interval=lr(o/e,!0);null!=n&&ai&&(a=r.interval=i);var s=r.intervalPrecision=Y_(a);return function(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),Z_(t,0,e),Z_(t,1,e),t[0]>t[1]&&(t[0]=t[1])}(r.niceTickExtent=[U_(Math.ceil(t[0]/a)*a,s),U_(Math.floor(t[1]/a)*a,s)],t),r}function Y_(t){return Ki(t)+2}function Z_(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function j_(t,e){return t>=e[0]&&t<=e[1]}function q_(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function K_(t,e){return t*(e[1]-e[0])+e[0]}var $_=function(t){function e(e){var n=t.call(this,e)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new H_({})),F(i)&&(i=new H_({categories:O(i,(function(t){return X(t)?t.value:t}))})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return n(e,t),e.prototype.parse=function(t){return"string"==typeof t?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return j_(t=this.parse(t),this._extent)&&null!=this._ordinalMeta.categories[t]},e.prototype.normalize=function(t){return q_(t=this._getTickNumber(this.parse(t)),this._extent)},e.prototype.scale=function(t){return t=Math.round(K_(t,this._extent)),this.getRawOrdinalNumber(t)},e.prototype.getTicks=function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push({value:n}),n++;return t},e.prototype.getMinorTicks=function(t){},e.prototype.setSortInfo=function(t){if(null!=t){for(var e=t.ordinalNumbers,n=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],r=0,o=this._ordinalMeta.categories.length,a=Math.min(o,e.length);r=0&&t=0&&t=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.niceTicks=function(){},e.prototype.niceExtent=function(){},e.type="ordinal",e}(G_);G_.registerClass($_);var J_=ji,Q_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}return n(e,t),e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return j_(t,this._extent)},e.prototype.normalize=function(t){return q_(t,this._extent)},e.prototype.scale=function(t){return K_(t,this._extent)},e.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},e.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),this.setExtent(e[0],e[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=Y_(t)},e.prototype.getTicks=function(t){var e=this._interval,n=this._extent,i=this._niceExtent,r=this._intervalPrecision,o=[];if(!e)return o;n[0]1e4)return[];var s=o.length?o[o.length-1].value:i[1];return n[1]>s&&(t?o.push({value:J_(s+e,r)}):o.push({value:n[1]})),o},e.prototype.getMinorTicks=function(t){for(var e=this.getTicks(!0),n=[],i=this.getExtent(),r=1;ri[0]&&h0&&(o=null===o?s:Math.min(o,s))}n[i]=o}}return n}(t),n=[];return P(t,(function(t){var i,r=t.coordinateSystem.getBaseAxis(),o=r.getExtent();if("category"===r.type)i=r.getBandWidth();else if("value"===r.type||"time"===r.type){var a=r.dim+"_"+r.index,s=e[a],l=Math.abs(o[1]-o[0]),u=r.scale.getExtent(),h=Math.abs(u[1]-u[0]);i=s?l/h*s:l}else{var c=t.getData();i=Math.abs(o[1]-o[0])/c.count()}var p=Zi(t.get("barWidth"),i),d=Zi(t.get("barMaxWidth"),i),f=Zi(t.get("barMinWidth")||1,i),g=t.get("barGap"),y=t.get("barCategoryGap");n.push({bandWidth:i,barWidth:p,barMaxWidth:d,barMinWidth:f,barGap:g,barCategoryGap:y,axisKey:ix(r),stackId:nx(t)})})),ax(n)}function ax(t){var e={};P(t,(function(t,n){var i=t.axisKey,r=t.bandWidth,o=e[i]||{bandWidth:r,remainedWidth:r,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},a=o.stacks;e[i]=o;var s=t.stackId;a[s]||o.autoWidthCount++,a[s]=a[s]||{width:0,maxWidth:0};var l=t.barWidth;l&&!a[s].width&&(a[s].width=l,l=Math.min(o.remainedWidth,l),o.remainedWidth-=l);var u=t.barMaxWidth;u&&(a[s].maxWidth=u);var h=t.barMinWidth;h&&(a[s].minWidth=h);var c=t.barGap;null!=c&&(o.gap=c);var p=t.barCategoryGap;null!=p&&(o.categoryGap=p)}));var n={};return P(e,(function(t,e){n[e]={};var i=t.stacks,r=t.bandWidth,o=t.categoryGap;if(null==o){var a=E(i).length;o=Math.max(35-4*a,15)+"%"}var s=Zi(o,r),l=Zi(t.gap,1),u=t.remainedWidth,h=t.autoWidthCount,c=(u-s)/(h+(h-1)*l);c=Math.max(c,0),P(i,(function(t){var e=t.maxWidth,n=t.minWidth;if(t.width){i=t.width;e&&(i=Math.min(i,e)),n&&(i=Math.max(i,n)),t.width=i,u-=i+l*i,h--}else{var i=c;e&&ei&&(i=n),i!==c&&(t.width=i,u-=i+l*i,h--)}})),c=(u-s)/(h+(h-1)*l),c=Math.max(c,0);var p,d=0;P(i,(function(t,e){t.width||(t.width=c),p=t,d+=t.width*(1+l)})),p&&(d-=p.width*l);var f=-d/2;P(i,(function(t,i){n[e][i]=n[e][i]||{bandWidth:r,offset:f,width:t.width},f+=t.width*(1+l)}))})),n}function sx(t,e,n){if(t&&e){var i=t[ix(e)];return null!=i&&null!=n?i[nx(n)]:i}}function lx(t,e){var n=rx(t,e),i=ox(n),r={};P(n,(function(t){var e=t.getData(),n=t.coordinateSystem,o=n.getBaseAxis(),a=nx(t),s=i[ix(o)][a],l=s.offset,u=s.width,h=n.getOtherAxis(o),c=t.get("barMinHeight")||0;r[a]=r[a]||[],e.setLayout({bandWidth:s.bandWidth,offset:l,size:u});for(var p=e.mapDimension(h.dim),d=e.mapDimension(o.dim),f=V_(e,p),g=h.isHorizontal(),y=px(o,h),v=0,m=e.count();v=0?"p":"n",w=y;f&&(r[a][x]||(r[a][x]={p:y,n:y}),w=r[a][x][b]);var S,M=void 0,I=void 0,T=void 0,C=void 0;if(g)M=w,I=(S=n.dataToPoint([_,x]))[1]+l,T=S[0]-y,C=u,Math.abs(T).5||(h=.5),{progress:function(t,e){for(var c,p=t.count,d=new ex(2*p),f=new ex(2*p),g=new ex(p),y=[],v=[],m=0,_=0;null!=(c=t.next());)v[u]=e.get(a,c),v[1-u]=e.get(s,c),y=n.dataToPoint(v,null),f[m]=l?i.x+i.width:y[0],d[m++]=y[0],f[m]=l?y[1]:i.y+i.height,d[m++]=y[1],g[_++]=c;e.setLayout({largePoints:d,largeDataIndices:g,largeBackgroundPoints:f,barWidth:h,valueAxisStart:px(r,o),backgroundStart:l?i.x:i.y,valueAxisHorizontal:l})}}}}};function hx(t){return t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type}function cx(t){return t.pipelineContext&&t.pipelineContext.large}function px(t,e,n){return e.toGlobalCoord(e.dataToCoord("log"===e.type?1:0))}var dx=function(t){function e(e){var n=t.call(this,e)||this;return n.type="time",n}return n(e,t),e.prototype.getLabel=function(t){var e=this.getSetting("useUTC");return ic(t.value,$h[function(t){switch(t){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}(ec(this._minLevelUnit))]||$h.second,e,this.getSetting("locale"))},e.prototype.getFormattedLabel=function(t,e,n){var i=this.getSetting("useUTC");return function(t,e,n,i,r){var o=null;if("string"==typeof n)o=n;else if("function"==typeof n)o=n(t.value,e,{level:t.level});else{var a=I({},qh);if(t.level>0)for(var s=0;s=0;--s)if(l[u]){o=l[u];break}o=o||a.none}if(F(o)){var h=null==t.level?0:t.level>=0?t.level:o.length+t.level;o=o[h=Math.min(h,o.length-1)]}}return ic(new Date(t.value),o,r,i)}(t,e,n,this.getSetting("locale"),i)},e.prototype.getTicks=function(t){var e=this._interval,n=this._extent,i=[];if(!e)return i;i.push({value:n[0],level:0});var r=this.getSetting("useUTC"),o=function(t,e,n,i){var r=1e4,o=Qh,a=0;function s(t,e,n,r,o,a,s){for(var l=new Date(e),u=e,h=l[r]();u1&&0===u&&o.unshift({value:o[0].value-p})}}for(u=0;u=i[0]&&v<=i[1]&&c++)}var m=(i[1]-i[0])/e;if(c>1.5*m&&p>m/1.5)break;if(u.push(g),c>m||t===o[d])break}h=[]}}0;var _=N(O(u,(function(t){return N(t,(function(t){return t.value>=i[0]&&t.value<=i[1]&&!t.notAdd}))})),(function(t){return t.length>0})),x=[],b=_.length-1;for(d=0;d<_.length;++d)for(var w=_[d],S=0;Sn&&(this._approxInterval=n);var o=fx.length,a=Math.min(function(t,e,n,i){for(;n>>1;t[r][1]16?16:t>7.5?7:t>3.5?4:t>1.5?2:1}function yx(t){return(t/=2592e6)>6?6:t>3?3:t>2?2:1}function vx(t){return(t/=Yh)>12?12:t>6?6:t>3.5?4:t>2?2:1}function mx(t,e){return(t/=e?Xh:Uh)>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function _x(t){return lr(t,!0)}function xx(t,e,n){var i=new Date(t);switch(ec(e)){case"year":case"month":i[fc(n)](0);case"day":i[gc(n)](1);case"hour":i[yc(n)](0);case"minute":i[vc(n)](0);case"second":i[mc(n)](0),i[_c(n)](0)}return i.getTime()}G_.registerClass(dx);var bx=G_.prototype,Sx=Q_.prototype,Mx=ji,Ix=Math.floor,Tx=Math.ceil,Cx=Math.pow,Dx=Math.log,Ax=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="log",e.base=10,e._originalScale=new Q_,e._interval=0,e}return n(e,t),e.prototype.getTicks=function(t){var e=this._originalScale,n=this._extent,i=e.getExtent();return O(Sx.getTicks.call(this,t),(function(t){var e=t.value,r=ji(Cx(this.base,e));return r=e===n[0]&&this._fixMin?kx(r,i[0]):r,{value:r=e===n[1]&&this._fixMax?kx(r,i[1]):r}}),this)},e.prototype.setExtent=function(t,e){var n=this.base;t=Dx(t)/Dx(n),e=Dx(e)/Dx(n),Sx.setExtent.call(this,t,e)},e.prototype.getExtent=function(){var t=this.base,e=bx.getExtent.call(this);e[0]=Cx(t,e[0]),e[1]=Cx(t,e[1]);var n=this._originalScale.getExtent();return this._fixMin&&(e[0]=kx(e[0],n[0])),this._fixMax&&(e[1]=kx(e[1],n[1])),e},e.prototype.unionExtent=function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=Dx(t[0])/Dx(e),t[1]=Dx(t[1])/Dx(e),bx.unionExtent.call(this,t)},e.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},e.prototype.niceTicks=function(t){t=t||10;var e=this._extent,n=e[1]-e[0];if(!(n===1/0||n<=0)){var i=ar(n);for(t/n*i<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var r=[ji(Tx(e[0]/i)*i),ji(Ix(e[1]/i)*i)];this._interval=i,this._niceExtent=r}},e.prototype.niceExtent=function(t){Sx.niceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return j_(t=Dx(t)/Dx(this.base),this._extent)},e.prototype.normalize=function(t){return q_(t=Dx(t)/Dx(this.base),this._extent)},e.prototype.scale=function(t){return t=K_(t,this._extent),Cx(this.base,t)},e.type="log",e}(G_),Lx=Ax.prototype;function kx(t,e){return Mx(t,Ki(e))}Lx.getMinorTicks=Sx.getMinorTicks,Lx.getLabel=Sx.getLabel,G_.registerClass(Ax);var Px=function(){function t(t,e,n){this._prepareParams(t,e,n)}return t.prototype._prepareParams=function(t,e,n){n[1]s&&(a=NaN,s=NaN);var h=J(a)||J(s)||t&&!i;this._needCrossZero&&(a>0&&s>0&&!l&&(a=0),a<0&&s<0&&!u&&(s=0));var c=this._determinedMin,p=this._determinedMax;return null!=c&&(a=c,l=!0),null!=p&&(s=p,u=!0),{min:a,max:s,minFixed:l,maxFixed:u,isBlank:h}},t.prototype.modifyDataMinMax=function(t,e){this[Rx[t]]=e},t.prototype.setDeterminedMinMax=function(t,e){var n=Ox[t];this[n]=e},t.prototype.freeze=function(){this.frozen=!0},t}(),Ox={min:"_determinedMin",max:"_determinedMax"},Rx={min:"_dataMin",max:"_dataMax"};function Nx(t,e,n){var i=t.rawExtentInfo;return i||(i=new Px(t,e,n),t.rawExtentInfo=i,i)}function zx(t,e){return null==e?null:J(e)?NaN:t.parse(e)}function Ex(t,e){var n=t.type,i=Nx(t,e,t.getExtent()).calculate();t.setBlank(i.isBlank);var r=i.min,o=i.max,a=e.ecModel;if(a&&"time"===n){var s=rx("bar",a),l=!1;if(P(s,(function(t){l=l||t.getBaseAxis()===e.axis})),l){var u=ox(s),h=function(t,e,n,i){var r=n.axis.getExtent(),o=r[1]-r[0],a=sx(i,n.axis);if(void 0===a)return{min:t,max:e};var s=1/0;P(a,(function(t){s=Math.min(t.offset,s)}));var l=-1/0;P(a,(function(t){l=Math.max(t.offset+t.width,l)})),s=Math.abs(s),l=Math.abs(l);var u=s+l,h=e-t,c=h/(1-(s+l)/o)-h;return{min:t-=c*(s/u),max:e+=c*(l/u)}}(r,o,e,u);r=h.min,o=h.max}}return{extent:[r,o],fixMin:i.minFixed,fixMax:i.maxFixed}}function Vx(t,e){var n=Ex(t,e),i=n.extent,r=e.get("splitNumber");t instanceof Ax&&(t.base=e.get("logBase"));var o=t.type;t.setExtent(i[0],i[1]),t.niceExtent({splitNumber:r,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:"interval"===o||"time"===o?e.get("minInterval"):null,maxInterval:"interval"===o||"time"===o?e.get("maxInterval"):null});var a=e.get("interval");null!=a&&t.setInterval&&t.setInterval(a)}function Bx(t,e){if(e=e||t.get("type"))switch(e){case"category":return new $_({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new dx({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(G_.getClass(e)||Q_)}}function Fx(t){var e,n,i=t.getLabelModel().get("formatter"),r="category"===t.type?t.scale.getExtent()[0]:null;return"time"===t.scale.type?(n=i,function(e,i){return t.scale.getFormattedLabel(e,i,n)}):"string"==typeof i?function(e){return function(n){var i=t.scale.getLabel(n);return e.replace("{value}",null!=i?i:"")}}(i):"function"==typeof i?(e=i,function(n,i){return null!=r&&(i=n.value-r),e(Gx(t,n),i,null!=n.level?{level:n.level}:null)}):function(e){return t.scale.getLabel(e)}}function Gx(t,e){return"category"===t.type?t.scale.getLabel(e):e.value}function Hx(t,e){var n=e*Math.PI/180,i=t.width,r=t.height,o=i*Math.abs(Math.cos(n))+Math.abs(r*Math.sin(n)),a=i*Math.abs(Math.sin(n))+Math.abs(r*Math.cos(n));return new gi(t.x,t.y,o,a)}function Wx(t){var e=t.get("interval");return null==e?"auto":e}function Ux(t){return"category"===t.type&&0===Wx(t.getLabelModel())}function Xx(t,e){var n={};return P(t.mapDimensionsAll(e),(function(e){n[B_(t,e)]=!0})),E(n)}var Yx=function(){function t(){}return t.prototype.getNeedCrossZero=function(){return!this.option.scale},t.prototype.getCoordSysModel=function(){},t}();var Zx={isDimensionStacked:V_,enableDataStack:E_,getStackedDimension:B_};var jx=Object.freeze({__proto__:null,createList:function(t){return F_(t.getSource(),t)},getLayoutRect:Vc,dataStack:Zx,createScale:function(t,e){var n=e;e instanceof Oh||(n=new Oh(e));var i=Bx(n);return i.setExtent(t[0],t[1]),Vx(i,n),i},mixinAxisModelCommonMethods:function(t){L(t,Yx)},getECData:_s,createTextStyle:function(t,e){return ph(t,null,null,"normal"!==(e=e||{}).state)},createDimensions:O_,createSymbol:fy,enableHoverEmphasis:sl}),qx=Object.freeze({__proto__:null,linearMap:Yi,round:ji,asc:qi,getPrecision:Ki,getPrecisionSafe:$i,getPixelPrecision:Ji,getPercentWithPrecision:Qi,MAX_SAFE_INTEGER:er,remRadian:nr,isRadianAroundZero:ir,parseDate:or,quantity:ar,quantityExponent:sr,nice:lr,quantile:ur,reformIntervals:hr,isNumeric:pr,numericToNumber:cr}),Kx=Object.freeze({__proto__:null,parse:or,format:ic}),$x=Object.freeze({__proto__:null,extendShape:Lu,extendPath:Pu,makePath:Nu,makeImage:zu,mergePath:Vu,resizePath:Bu,createIcon:eh,updateProps:Hu,initProps:Wu,getTransform:ju,clipPointsByRect:Qu,clipRectByRect:th,registerShape:Ou,getShapeClass:Ru,Group:Ei,Image:es,Text:cs,Circle:Nl,Ellipse:El,Sector:Jl,Ring:tu,Polygon:ru,Polyline:au,Rect:ls,Line:uu,BezierCurve:du,Arc:gu,IncrementalDisplayable:Tu,CompoundPath:yu,LinearGradient:mu,RadialGradient:_u,BoundingRect:gi}),Jx=Object.freeze({__proto__:null,addCommas:xc,toCamelCase:bc,normalizeCssArray:wc,encodeHTML:Ic,formatTpl:Ac,getTooltipMarker:Lc,formatTime:function(t,e,n){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var i=or(e),r=n?"UTC":"",o=i["get"+r+"FullYear"](),a=i["get"+r+"Month"]()+1,s=i["get"+r+"Date"](),l=i["get"+r+"Hours"](),u=i["get"+r+"Minutes"](),h=i["get"+r+"Seconds"](),c=i["get"+r+"Milliseconds"]();return t=t.replace("MM",tc(a,2)).replace("M",a).replace("yyyy",o).replace("yy",o%100+"").replace("dd",tc(s,2)).replace("d",s).replace("hh",tc(l,2)).replace("h",l).replace("mm",tc(u,2)).replace("m",u).replace("ss",tc(h,2)).replace("s",h).replace("SSS",tc(c,3))},capitalFirst:function(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t},truncateText:ao,getTextRect:function(t,e,n,i,r,o,a,s){return yr(),new cs({style:{text:t,font:e,align:n,verticalAlign:i,padding:r,rich:o,overflow:a?"truncate":null,lineHeight:s}}).getBoundingRect()}}),Qx=Object.freeze({__proto__:null,map:O,each:P,indexOf:D,inherits:A,reduce:R,filter:N,bind:V,curry:B,isArray:F,isString:H,isObject:X,isFunction:G,extend:I,defaults:T,clone:w,merge:S}),tb=kr();function eb(t){return"category"===t.type?function(t){var e=t.getLabelModel(),n=ib(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}(t):function(t){var e=t.scale.getTicks(),n=Fx(t);return{labels:O(e,(function(e,i){return{formattedLabel:n(e,i),rawLabel:t.scale.getLabel(e),tickValue:e.value}}))}}(t)}function nb(t,e){return"category"===t.type?function(t,e){var n,i,r=rb(t,"ticks"),o=Wx(e),a=ob(r,o);if(a)return a;e.get("show")&&!t.scale.isBlank()||(n=[]);if(G(o))n=lb(t,o,!0);else if("auto"===o){var s=ib(t,t.getLabelModel());i=s.labelCategoryInterval,n=O(s.labels,(function(t){return t.tickValue}))}else n=sb(t,i=o,!0);return ab(r,o,{ticks:n,tickCategoryInterval:i})}(t,e):{ticks:O(t.scale.getTicks(),(function(t){return t.value}))}}function ib(t,e){var n,i,r=rb(t,"labels"),o=Wx(e),a=ob(r,o);return a||(G(o)?n=lb(t,o):(i="auto"===o?function(t){var e=tb(t).autoInterval;return null!=e?e:tb(t).autoInterval=t.calculateCategoryInterval()}(t):o,n=sb(t,i)),ab(r,o,{labels:n,labelCategoryInterval:i}))}function rb(t,e){return tb(t)[e]||(tb(t)[e]=[])}function ob(t,e){for(var n=0;n1&&h/l>2&&(u=Math.round(Math.ceil(u/l)*l));var c=Ux(t),p=a.get("showMinLabel")||c,d=a.get("showMaxLabel")||c;p&&u!==o[0]&&g(o[0]);for(var f=u;f<=o[1];f+=l)g(f);function g(t){var e={value:t};s.push(n?t:{formattedLabel:i(e),rawLabel:r.getLabel(e),tickValue:t})}return d&&f-l!==o[1]&&g(o[1]),s}function lb(t,e,n){var i=t.scale,r=Fx(t),o=[];return P(i.getTicks(),(function(t){var a=i.getLabel(t),s=t.value;e(t.value,a)&&o.push(n?s:{formattedLabel:r(t),rawLabel:a,tickValue:s})})),o}var ub=[0,1],hb=function(){function t(t,e,n){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=n||[0,0]}return t.prototype.contain=function(t){var e=this._extent,n=Math.min(e[0],e[1]),i=Math.max(e[0],e[1]);return t>=n&&t<=i},t.prototype.containData=function(t){return this.scale.contain(t)},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.getPixelPrecision=function(t){return Ji(t||this.scale.getExtent(),this._extent)},t.prototype.setExtent=function(t,e){var n=this._extent;n[0]=t,n[1]=e},t.prototype.dataToCoord=function(t,e){var n=this._extent,i=this.scale;return t=i.normalize(t),this.onBand&&"ordinal"===i.type&&cb(n=n.slice(),i.count()),Yi(t,ub,n,e)},t.prototype.coordToData=function(t,e){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&cb(n=n.slice(),i.count());var r=Yi(t,n,ub,e);return this.scale.scale(r)},t.prototype.pointToData=function(t,e){},t.prototype.getTicksCoords=function(t){var e=(t=t||{}).tickModel||this.getTickModel(),n=O(nb(this,e).ticks,(function(t){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawOrdinalNumber(t):t),tickValue:t}}),this);return function(t,e,n,i){var r=e.length;if(!t.onBand||n||!r)return;var o,a,s=t.getExtent();if(1===r)e[0].coord=s[0],o=e[1]={coord:s[0]};else{var l=e[r-1].tickValue-e[0].tickValue,u=(e[r-1].coord-e[0].coord)/l;P(e,(function(t){t.coord-=u/2})),a=1+t.scale.getExtent()[1]-e[r-1].tickValue,o={coord:e[r-1].coord+u*a},e.push(o)}var h=s[0]>s[1];c(e[0].coord,s[0])&&(i?e[0].coord=s[0]:e.shift());i&&c(s[0],e[0].coord)&&e.unshift({coord:s[0]});c(s[1],o.coord)&&(i?o.coord=s[1]:e.pop());i&&c(o.coord,s[1])&&e.push({coord:s[1]});function c(t,e){return t=ji(t),e=ji(e),h?t>e:t0&&t<100||(t=5),O(this.scale.getMinorTicks(t),(function(t){return O(t,(function(t){return{coord:this.dataToCoord(t),tickValue:t}}),this)}),this)},t.prototype.getViewLabels=function(){return eb(this).labels},t.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},t.prototype.getTickModel=function(){return this.model.getModel("axisTick")},t.prototype.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},t.prototype.calculateCategoryInterval=function(){return function(t){var e=function(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}(t),n=Fx(t),i=(e.axisRotate-e.labelRotate)/180*Math.PI,r=t.scale,o=r.getExtent(),a=r.count();if(o[1]-o[0]<1)return 0;var s=1;a>40&&(s=Math.max(1,Math.floor(a/40)));for(var l=o[0],u=t.dataToCoord(l+1)-t.dataToCoord(l),h=Math.abs(u*Math.cos(i)),c=Math.abs(u*Math.sin(i)),p=0,d=0;l<=o[1];l+=s){var f,g,y=bi(n({value:l}),e.font,"center","top");f=1.3*y.width,g=1.3*y.height,p=Math.max(p,f,7),d=Math.max(d,g,7)}var v=p/h,m=d/c;isNaN(v)&&(v=1/0),isNaN(m)&&(m=1/0);var _=Math.max(0,Math.floor(Math.min(v,m))),x=tb(t.model),b=t.getExtent(),w=x.lastAutoInterval,S=x.lastTickCount;return null!=w&&null!=S&&Math.abs(w-_)<=1&&Math.abs(S-a)<=1&&w>_&&x.axisExtent0===b[0]&&x.axisExtent1===b[1]?_=w:(x.lastTickCount=a,x.lastAutoInterval=_,x.axisExtent0=b[0],x.axisExtent1=b[1]),_}(this)},t}();function cb(t,e){var n=(t[1]-t[0])/e/2;t[0]+=n,t[1]-=n}function pb(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function db(t,e,n,i,r){for(var o=e.length,a=n.length,s=t.newPos,l=s-i,u=0;s+1=i&&l+1>=r){for(var u=[],h=0;h=i&&c+1>=r)return gb(l.components);s[a]=l}else s[a]=void 0}var f;o++}for(;o<=a;){var p=c();if(p)return p}}(t,e,n)}var vb="none",mb=Math.round,_b=Math.sin,xb=Math.cos,bb=Math.PI,wb=2*Math.PI,Sb=180/bb,Mb=1e-4;function Ib(t){return mb(1e3*t)/1e3}function Tb(t){return mb(1e4*t)/1e4}function Cb(t){return t-1e-4}function Db(t,e){e&&Ab(t,"transform","matrix("+Ib(e[0])+","+Ib(e[1])+","+Ib(e[2])+","+Ib(e[3])+","+Tb(e[4])+","+Tb(e[5])+")")}function Ab(t,e,n){(!n||"linear"!==n.type&&"radial"!==n.type)&&t.setAttribute(e,n)}function Lb(t,e,n){var i=null==e.opacity?1:e.opacity;if(n instanceof es)t.style.opacity=i+"";else{if(function(t){var e=t.fill;return null!=e&&e!==vb}(e)){var r=e.fill;Ab(t,"fill",r="transparent"===r?vb:r),Ab(t,"fill-opacity",(null!=e.fillOpacity?e.fillOpacity*i:i)+"")}else Ab(t,"fill",vb);if(function(t){var e=t.stroke;return null!=e&&e!==vb}(e)){var o=e.stroke;Ab(t,"stroke",o="transparent"===o?vb:o);var a=e.lineWidth,s=e.strokeNoScale?n.getLineScale():1;Ab(t,"stroke-width",(s?a/s:0)+""),Ab(t,"paint-order",e.strokeFirst?"stroke":"fill"),Ab(t,"stroke-opacity",(null!=e.strokeOpacity?e.strokeOpacity*i:i)+"");var l=e.lineDash&&a>0&&vy(e.lineDash,a);if(l){var u=e.lineDashOffset;s&&1!==s&&(l=O(l,(function(t){return t/s})),u&&(u=mb(u/=s))),Ab(t,"stroke-dasharray",l.join(",")),Ab(t,"stroke-dashoffset",(u||0)+"")}else Ab(t,"stroke-dasharray","");e.lineCap&&Ab(t,"stroke-linecap",e.lineCap),e.lineJoin&&Ab(t,"stroke-linejoin",e.lineJoin),e.miterLimit&&Ab(t,"stroke-miterlimit",e.miterLimit+"")}else Ab(t,"stroke",vb)}}var kb=function(){function t(){}return t.prototype.reset=function(){this._d=[],this._str=""},t.prototype.moveTo=function(t,e){this._add("M",t,e)},t.prototype.lineTo=function(t,e){this._add("L",t,e)},t.prototype.bezierCurveTo=function(t,e,n,i,r,o){this._add("C",t,e,n,i,r,o)},t.prototype.quadraticCurveTo=function(t,e,n,i){this._add("Q",t,e,n,i)},t.prototype.arc=function(t,e,n,i,r,o){this.ellipse(t,e,n,n,0,i,r,o)},t.prototype.ellipse=function(t,e,n,i,r,o,a,s){var l=0===this._d.length,u=a-o,h=!s,c=Math.abs(u),p=Cb(c-wb)||(h?u>=wb:-u>=wb),d=u>0?u%wb:u%wb+wb,f=!1;f=!!p||!Cb(c)&&d>=bb==!!h;var g=Tb(t+n*xb(o)),y=Tb(e+i*_b(o));p&&(u=h?wb-1e-4:1e-4-wb,f=!0,l&&this._d.push("M",g,y));var v=Tb(t+n*xb(o+u)),m=Tb(e+i*_b(o+u));if(isNaN(g)||isNaN(y)||isNaN(n)||isNaN(i)||isNaN(r)||isNaN(Sb)||isNaN(v)||isNaN(m))return"";this._d.push("A",Tb(n),Tb(i),mb(r*Sb),+f,+h,v,m)},t.prototype.rect=function(t,e,n,i){this._add("M",t,e),this._add("L",t+n,e),this._add("L",t+n,e+i),this._add("L",t,e+i),this._add("L",t,e)},t.prototype.closePath=function(){this._d.length>0&&this._add("Z")},t.prototype._add=function(t,e,n,i,r,o,a,s,l){this._d.push(t);for(var u=1;u=0;--n)if(e[n]===t)return!0;return!1}),i}return null}return n[0]},t.prototype.doUpdate=function(t,e){if(t){var n=this.getDefs(!1);if(t[this._domName]&&n.contains(t[this._domName]))"function"==typeof e&&e(t);else{var i=this.add(t);i&&(t[this._domName]=i)}}},t.prototype.add=function(t){return null},t.prototype.addDom=function(t){var e=this.getDefs(!0);t.parentNode!==e&&e.appendChild(t)},t.prototype.removeDom=function(t){var e=this.getDefs(!1);e&&t[this._domName]&&(e.removeChild(t[this._domName]),t[this._domName]=null)},t.prototype.getDoms=function(){var t=this.getDefs(!1);if(!t)return[];var e=[];return P(this._tagNames,(function(n){for(var i=t.getElementsByTagName(n),r=0;r-1){var s=He(a)[3],l=Xe(a);o.setAttribute("stop-color","#"+l),o.setAttribute("stop-opacity",s+"")}else o.setAttribute("stop-color",n[i].color);e.appendChild(o)}t.__dom=e},e.prototype.markUsed=function(e){if(e.style){var n=e.style.fill;n&&n.__dom&&t.prototype.markDomUsed.call(this,n.__dom),(n=e.style.stroke)&&n.__dom&&t.prototype.markDomUsed.call(this,n.__dom)}},e}(zb);function Gb(t){return t&&(!!t.image||!!t.svgElement)}var Hb=new oy,Wb=function(t){function e(e,n){return t.call(this,e,n,["pattern"],"__pattern_in_use__")||this}return n(e,t),e.prototype.addWithoutUpdate=function(t,e){if(e&&e.style){var n=this;P(["fill","stroke"],(function(i){var r=e.style[i];if(Gb(r)){var o=n.getDefs(!0),a=Hb.get(r);a?o.contains(a)||n.addDom(a):a=n.add(r),n.markUsed(e);var s=a.getAttribute("id");t.setAttribute(i,"url(#"+s+")")}}))}},e.prototype.add=function(t){if(Gb(t)){var e=this.createElement("pattern");return t.id=null==t.id?this.nextId++:t.id,e.setAttribute("id","zr"+this._zrId+"-pattern-"+t.id),e.setAttribute("x","0"),e.setAttribute("y","0"),e.setAttribute("patternUnits","userSpaceOnUse"),this.updateDom(t,e),this.addDom(e),e}},e.prototype.update=function(t){if(Gb(t)){var e=this;this.doUpdate(t,(function(){var n=Hb.get(t);e.updateDom(t,n)}))}},e.prototype.updateDom=function(t,e){var n=t.svgElement;if(n instanceof SVGElement)n.parentNode!==e&&(e.innerHTML="",e.appendChild(n),e.setAttribute("width",t.svgWidth+""),e.setAttribute("height",t.svgHeight+""));else{var i=void 0,r=e.getElementsByTagName("image");if(r.length){if(!t.image)return void e.removeChild(r[0]);i=r[0]}else t.image&&(i=this.createElement("image"));if(i){var o=void 0,a=t.image;if("string"==typeof a?o=a:a instanceof HTMLImageElement?o=a.src:a instanceof HTMLCanvasElement&&(o=a.toDataURL()),o){i.setAttribute("href",o),i.setAttribute("x","0"),i.setAttribute("y","0");var s=no(o,i,{dirty:function(){}},(function(t){e.setAttribute("width",t.width+""),e.setAttribute("height",t.height+"")}));s&&s.width&&s.height&&(e.setAttribute("width",s.width+""),e.setAttribute("height",s.height+"")),e.appendChild(i)}}}var l="translate("+(t.x||0)+", "+(t.y||0)+") rotate("+(t.rotation||0)/Math.PI*180+") scale("+(t.scaleX||1)+", "+(t.scaleY||1)+")";e.setAttribute("patternTransform",l),Hb.set(t,e)},e.prototype.markUsed=function(e){e.style&&(Gb(e.style.fill)&&t.prototype.markDomUsed.call(this,Hb.get(e.style.fill)),Gb(e.style.stroke)&&t.prototype.markDomUsed.call(this,Hb.get(e.style.stroke)))},e}(zb);function Ub(t){var e=t.__clipPaths;return e&&e.length>0}var Xb=function(t){function e(e,n){var i=t.call(this,e,n,"clipPath","__clippath_in_use__")||this;return i._refGroups={},i._keyDuplicateCount={},i}return n(e,t),e.prototype.markAllUnused=function(){for(var e in t.prototype.markAllUnused.call(this),this._refGroups)this.markDomUnused(this._refGroups[e]);this._keyDuplicateCount={}},e.prototype._getClipPathGroup=function(t,e){if(Ub(t)){var n=t.__clipPaths,i=this._keyDuplicateCount,r=function(t){var e=[];if(t)for(var n=0;n0){var n=this.getDefs(!0),i=e[0],r=void 0,o=void 0;i._dom?(o=i._dom.getAttribute("id"),r=i._dom,n.contains(r)||n.appendChild(r)):(o="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,(r=this.createElement("clipPath")).setAttribute("id",o),n.appendChild(r),i._dom=r),this.getSvgProxy(i).brush(i);var a=this.getSvgElement(i);r.innerHTML="",r.appendChild(a),t.setAttribute("clip-path","url(#"+o+")"),e.length>1&&this.updateDom(r,e.slice(1))}else t&&t.setAttribute("clip-path","none")},e.prototype.markUsed=function(e){var n=this;e.__clipPaths&&P(e.__clipPaths,(function(e){e._dom&&t.prototype.markDomUsed.call(n,e._dom)}))},e.prototype.removeUnused=function(){t.prototype.removeUnused.call(this);var e={};for(var n in this._refGroups){var i=this._refGroups[n];this.isDomUnused(i)?i.parentNode&&i.parentNode.removeChild(i):e[n]=i}this._refGroups=e},e}(zb),Yb=function(t){function e(e,n){var i=t.call(this,e,n,["filter"],"__filter_in_use__","_shadowDom")||this;return i._shadowDomMap={},i._shadowDomPool=[],i}return n(e,t),e.prototype._getFromPool=function(){var t=this._shadowDomPool.pop();if(!t){(t=this.createElement("filter")).setAttribute("id","zr"+this._zrId+"-shadow-"+this.nextId++);var e=this.createElement("feDropShadow");t.appendChild(e),this.addDom(t)}return t},e.prototype.update=function(t,e){if(function(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY)}(e.style)){var n=function(t){var e=t.style,n=t.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),n[0],n[1]].join(",")}(e),i=e._shadowDom=this._shadowDomMap[n];i||(i=this._getFromPool(),this._shadowDomMap[n]=i),this.updateDom(t,e,i)}else this.remove(t,e)},e.prototype.remove=function(t,e){null!=e._shadowDom&&(e._shadowDom=null,t.style.filter="")},e.prototype.updateDom=function(t,e,n){var i=n.children[0],r=e.style,o=e.getGlobalScale(),a=o[0],s=o[1];if(a&&s){var l=r.shadowOffsetX||0,u=r.shadowOffsetY||0,h=r.shadowBlur,c=r.shadowColor;i.setAttribute("dx",l/a+""),i.setAttribute("dy",u/s+""),i.setAttribute("flood-color",c);var p=h/2/a+" "+h/2/s;i.setAttribute("stdDeviation",p),n.setAttribute("x","-100%"),n.setAttribute("y","-100%"),n.setAttribute("width","300%"),n.setAttribute("height","300%"),e._shadowDom=n;var d=n.getAttribute("id");t.style.filter="url(#"+d+")"}},e.prototype.removeUnused=function(){if(this.getDefs(!1)){var t=this._shadowDomPool;for(var e in this._shadowDomMap){var n=this._shadowDomMap[e];t.push(n)}this._shadowDomMap={}}},e}(zb);function Zb(t){return parseInt(t,10)}function jb(t){return t instanceof Ka?Pb:t instanceof es?Ob:t instanceof Ja?Nb:Pb}function qb(t,e){return e&&t&&e.parentNode!==t}function Kb(t,e,n){if(qb(t,e)&&n){var i=n.nextSibling;i?t.insertBefore(e,i):t.appendChild(e)}}function $b(t,e){if(qb(t,e)){var n=t.firstChild;n?t.insertBefore(e,n):t.appendChild(e)}}function Jb(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)}function Qb(t){return t.__svgEl}var tw=function(){function t(t,e,n,i){this.type="svg",this.refreshHover=ew("refreshHover"),this.pathToImage=ew("pathToImage"),this.configLayer=ew("configLayer"),this.root=t,this.storage=e,this._opts=n=I({},n||{});var r=pb("svg");r.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns","http://www.w3.org/2000/svg"),r.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),r.setAttribute("version","1.1"),r.setAttribute("baseProfile","full"),r.style.cssText="user-select:none;position:absolute;left:0;top:0;";var o=pb("g");r.appendChild(o);var a=pb("g");r.appendChild(a),this._gradientManager=new Fb(i,a),this._patternManager=new Wb(i,a),this._clipPathManager=new Xb(i,a),this._shadowManager=new Yb(i,a);var s=document.createElement("div");s.style.cssText="overflow:hidden;position:relative",this._svgDom=r,this._svgRoot=a,this._backgroundRoot=o,this._viewport=s,t.appendChild(s),s.appendChild(r),this.resize(n.width,n.height),this._visibleList=[]}return t.prototype.getType=function(){return"svg"},t.prototype.getViewportRoot=function(){return this._viewport},t.prototype.getSvgDom=function(){return this._svgDom},t.prototype.getSvgRoot=function(){return this._svgRoot},t.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},t.prototype.refresh=function(){var t=this.storage.getDisplayList(!0);this._paintList(t)},t.prototype.setBackgroundColor=function(t){this._backgroundRoot&&this._backgroundNode&&this._backgroundRoot.removeChild(this._backgroundNode);var e=pb("rect");e.setAttribute("width",this.getWidth()),e.setAttribute("height",this.getHeight()),e.setAttribute("x",0),e.setAttribute("y",0),e.setAttribute("id",0),e.style.fill=t,this._backgroundRoot.appendChild(e),this._backgroundNode=e},t.prototype.createSVGElement=function(t){return pb(t)},t.prototype.paintOne=function(t){var e=jb(t);return e&&e.brush(t),Qb(t)},t.prototype._paintList=function(t){var e=this._gradientManager,n=this._patternManager,i=this._clipPathManager,r=this._shadowManager;e.markAllUnused(),n.markAllUnused(),i.markAllUnused(),r.markAllUnused();for(var o=this._svgRoot,a=this._visibleList,s=t.length,l=[],u=0;u\n\r<"))},t}();function ew(t){return function(){b('In SVG mode painter not support method "'+t+'"')}}function nw(){return!1}function iw(t,e,n){var i=C(),r=e.getWidth(),o=e.getHeight(),a=i.style;return a&&(a.position="absolute",a.left="0",a.top="0",a.width=r+"px",a.height=o+"px",i.setAttribute("data-zr-dom-id",t)),i.width=r*n,i.height=o*n,i}var rw=function(t){function e(e,n,i){var r,o=t.call(this)||this;o.motionBlur=!1,o.lastFrameAlpha=.7,o.dpr=1,o.virtual=!1,o.config={},o.incremental=!1,o.zlevel=0,o.maxRepaintRectCount=5,o.__dirty=!0,o.__firstTimePaint=!0,o.__used=!1,o.__drawIndex=0,o.__startIndex=0,o.__endIndex=0,o.__prevStartIndex=null,o.__prevEndIndex=null,i=i||En,"string"==typeof e?r=iw(e,n,i):X(e)&&(e=(r=e).id),o.id=e,o.dom=r;var a=r.style;return a&&(r.onselectstart=nw,a.webkitUserSelect="none",a.userSelect="none",a.webkitTapHighlightColor="rgba(0,0,0,0)",a["-webkit-touch-callout"]="none",a.padding="0",a.margin="0",a.borderWidth="0"),o.domBack=null,o.ctxBack=null,o.painter=n,o.config=null,o.dpr=i,o}return n(e,t),e.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},e.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},e.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},e.prototype.setUnpainted=function(){this.__firstTimePaint=!0},e.prototype.createBackBuffer=function(){var t=this.dpr;this.domBack=iw("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!==t&&this.ctxBack.scale(t,t)},e.prototype.createRepaintRects=function(t,e,n,i){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var r,o=[],a=this.maxRepaintRectCount,s=!1,l=new gi(0,0,0,0);function u(t){if(t.isFinite()&&!t.isZero())if(0===o.length){(e=new gi(0,0,0,0)).copy(t),o.push(e)}else{for(var e,n=!1,i=1/0,r=0,u=0;u=a)}}for(var h=this.__startIndex;h15)break}n.prevElClipPaths&&u.restore()};if(p)if(0===p.length)s=l.__endIndex;else for(var x=d.dpr,b=0;b0&&t>i[0]){for(s=0;st);s++);a=n[i[s]]}if(i.splice(s+1,0,t),n[t]=e,!e.virtual)if(a){var l=a.dom;l.nextSibling?o.insertBefore(e.dom,l.nextSibling):o.appendChild(e.dom)}else o.firstChild?o.insertBefore(e.dom,o.firstChild):o.appendChild(e.dom);e.__painter=this}else b("Layer of zlevel "+t+" is not valid")},t.prototype.eachLayer=function(t,e){for(var n=this._zlevelList,i=0;i0?sw:0),this._needsManuallyCompositing),u.__builtin__||b("ZLevel "+l+" has been used by unkown layer "+u.id),u!==o&&(u.__used=!0,u.__startIndex!==r&&(u.__dirty=!0),u.__startIndex=r,u.incremental?u.__drawIndex=-1:u.__drawIndex=r,e(r),o=u),1&s.__dirty&&!s.__inHover&&(u.__dirty=!0,u.incremental&&u.__drawIndex<0&&(u.__drawIndex=r))}e(r),this.eachBuiltinLayer((function(t,e){!t.__used&&t.getElementCount()>0&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)}))},t.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},t.prototype._clearLayer=function(t){t.clear()},t.prototype.setBackgroundColor=function(t){this._backgroundColor=t,P(this._layers,(function(t){t.setUnpainted()}))},t.prototype.configLayer=function(t,e){if(e){var n=this._layerConfig;n[t]?S(n[t],e,!0):n[t]=e;for(var i=0;i-1&&(s.style.stroke=s.style.fill,s.style.fill="#fff",s.style.lineWidth=2),e},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={zlevel:0,z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0,lineStyle:{width:"bolder"}},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0},e}(ff);function cw(t,e){var n=t.mapDimensionsAll("defaultedLabel"),i=n.length;if(1===i){var r=Md(t,e,n[0]);return null!=r?r+"":null}if(i){for(var o=[],a=0;a0?n=i[0]:i[1]<0&&(n=i[1]);return n}(r,n),a=i.dim,s=r.dim,l=e.mapDimension(s),u=e.mapDimension(a),h="x"===s||"radius"===s?1:0,c=O(t.dimensions,(function(t){return e.mapDimension(t)})),p=!1,d=e.getCalculationInfo("stackResultDimension");return V_(e,c[0])&&(p=!0,c[0]=d),V_(e,c[1])&&(p=!0,c[1]=d),{dataDimsForPoint:c,valueStart:o,valueAxisDim:s,baseAxisDim:a,stacked:!!p,valueDim:l,baseDim:u,baseDataOffset:h,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function xw(t,e,n,i){var r=NaN;t.stacked&&(r=n.get(n.getCalculationInfo("stackedOverDimension"),i)),isNaN(r)&&(r=t.valueStart);var o=t.baseDataOffset,a=[];return a[o]=n.get(t.baseDim,i),a[1-o]=r,e.dataToPoint(a)}var bw="undefined"!=typeof Float32Array,ww=bw?Float32Array:Array;function Sw(t){return F(t)?bw?new Float32Array(t):t:new ww(t)}var Mw=Math.min,Iw=Math.max;function Tw(t,e){return isNaN(t)||isNaN(e)}function Cw(t,e,n,i,r,o,a,s,l){for(var u,h,c,p,d,f,g=n,y=0;y=r||g<0)break;if(Tw(v,m)){if(l){g+=o;continue}break}if(g===n)t[o>0?"moveTo":"lineTo"](v,m),c=v,p=m;else{var _=v-u,x=m-h;if(_*_+x*x<.5){g+=o;continue}if(a>0){var b=g+o,w=e[2*b],S=e[2*b+1],M=y+1;if(l)for(;Tw(w,S)&&M=i||Tw(w,S))d=v,f=m;else{T=w-u,C=S-h;var L=v-u,k=w-v,P=m-h,O=S-m,R=void 0,N=void 0;"x"===s?(R=Math.abs(L),N=Math.abs(k),d=v-R*a,f=m,D=v+R*a,A=m):"y"===s?(R=Math.abs(P),N=Math.abs(O),d=v,f=m-R*a,D=v,A=m+R*a):(R=Math.sqrt(L*L+P*P),d=v-T*a*(1-(I=(N=Math.sqrt(k*k+O*O))/(N+R))),f=m-C*a*(1-I),A=m+C*a*I,D=Mw(D=v+T*a*I,Iw(w,v)),A=Mw(A,Iw(S,m)),D=Iw(D,Mw(w,v)),f=m-(C=(A=Iw(A,Mw(S,m)))-m)*R/N,d=Mw(d=v-(T=D-v)*R/N,Iw(u,v)),f=Mw(f,Iw(h,m)),D=v+(T=v-(d=Iw(d,Mw(u,v))))*N/R,A=m+(C=m-(f=Iw(f,Mw(h,m))))*N/R)}t.bezierCurveTo(c,p,d,f,v,m),c=D,p=A}else t.lineTo(v,m)}u=v,h=m,g+=o}return y}var Dw=function(){this.smooth=0,this.smoothConstraint=!0},Aw=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-polyline",n}return n(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new Dw},e.prototype.buildPath=function(t,e){var n=e.points,i=0,r=n.length/2;if(e.connectNulls){for(;r>0&&Tw(n[2*r-2],n[2*r-1]);r--);for(;i=0){var y=a?(h-i)*g+i:(u-n)*g+n;return a?[t,y]:[y,t]}n=u,i=h;break;case o.C:u=r[l++],h=r[l++],c=r[l++],p=r[l++],d=r[l++],f=r[l++];var v=a?Bo(n,u,c,d,t,s):Bo(i,h,p,f,t,s);if(v>0)for(var m=0;m=0){y=a?Eo(i,h,p,f,_):Eo(n,u,c,d,_);return a?[t,y]:[y,t]}}n=d,i=f}}},e}(Ka),Lw=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e}(Dw),kw=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-polygon",n}return n(e,t),e.prototype.getDefaultShape=function(){return new Lw},e.prototype.buildPath=function(t,e){var n=e.points,i=e.stackedOnPoints,r=0,o=n.length/2,a=e.smoothMonotone;if(e.connectNulls){for(;o>0&&Tw(n[2*o-2],n[2*o-1]);o--);for(;ri)return!1;return!0}(o,e))){var a=e.mapDimension(o.dim),s={};return P(o.getViewLabels(),(function(t){var e=o.scale.getRawOrdinalNumber(t.tickValue);s[e]=1})),function(t){return!s.hasOwnProperty(e.get(a,t))}}}}function Hw(t,e){return[t[2*e],t[2*e+1]]}function Ww(t,e,n,i){if(Nw(e,"cartesian2d")){var r=i.getModel("endLabel"),o=r.get("show"),a=r.get("valueAnimation"),s=i.getData(),l={lastFrameIndex:0},u=o?function(n,i){t._endLabelOnDuring(n,i,s,l,a,r,e)}:null,h=e.getBaseAxis().isHorizontal(),c=Pw(e,n,i,(function(){var e=t._endLabel;e&&n&&null!=l.originalX&&e.attr({x:l.originalX,y:l.originalY})}),u);if(!i.get("clip",!0)){var p=c.shape,d=Math.max(p.width,p.height);h?(p.y-=d,p.height+=2*d):(p.x-=d,p.width+=2*d)}return u&&u(1,c),c}return Ow(e,n,i)}var Uw=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.init=function(){var t=new Ei,e=new mw;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},e.prototype.render=function(t,e,n){var i=this,r=t.coordinateSystem,o=this.group,a=t.getData(),s=t.getModel("lineStyle"),l=t.getModel("areaStyle"),u=a.getLayout("points")||[],h="polar"===r.type,c=this._coordSys,p=this._symbolDraw,d=this._polyline,f=this._polygon,g=this._lineGroup,y=t.get("animation"),v=!l.isEmpty(),m=l.get("origin"),_=_w(r,a,m),x=v&&function(t,e,n){if(!n.valueDim)return[];for(var i=e.count(),r=Sw(2*i),o=0;o=0;o--){var a=n[o].dimension,s=t.dimensions[a],l=t.getDimensionInfo(s);if("x"===(i=l&&l.coordDim)||"y"===i){r=n[o];break}}if(r){var u=e.getAxis(i),h=O(r.stops,(function(t){return{offset:0,coord:u.toGlobalCoord(u.dataToCoord(t.value,!0)),color:t.color}})),c=h.length,p=r.outerColors.slice();c&&h[0].coord>h[c-1].coord&&(h.reverse(),p.reverse());var d=h[0].coord-10,f=h[c-1].coord+10,g=f-d;if(g<.001)return"transparent";P(h,(function(t){t.offset=(t.coord-d)/g})),h.push({offset:c?h[c-1].offset:.5,color:p[1]||"transparent"}),h.unshift({offset:c?h[0].offset:.5,color:p[0]||"transparent"});var y=new mu(0,0,0,0,h,!0);return y[i]=d,y[i+"2"]=f,y}}}(a,r)||a.getVisual("style")[a.getVisual("drawType")];d&&c.type===r.type&&I===this._step?(v&&!f?f=this._newPolygon(u,x):f&&!v&&(g.remove(f),f=this._polygon=null),h||this._initOrUpdateEndLabel(t,r,kc(C)),g.setClipPath(Ww(this,r,!1,t)),b&&p.updateData(a,{isIgnore:w,clipShape:M,disableAnimation:!0,getSymbolPoint:function(t){return[u[2*t],u[2*t+1]]}}),zw(this._stackedOnPoints,x)&&zw(this._points,u)||(y?this._doUpdateAnimation(a,x,r,n,I,m):(I&&(u=Fw(u,r,I),x&&(x=Fw(x,r,I))),d.setShape({points:u}),f&&f.setShape({points:u,stackedOnPoints:x})))):(b&&p.updateData(a,{isIgnore:w,clipShape:M,disableAnimation:!0,getSymbolPoint:function(t){return[u[2*t],u[2*t+1]]}}),y&&this._initSymbolLabelAnimation(a,r,M),I&&(u=Fw(u,r,I),x&&(x=Fw(x,r,I))),d=this._newPolyline(u),v&&(f=this._newPolygon(u,x)),h||this._initOrUpdateEndLabel(t,r,kc(C)),g.setClipPath(Ww(this,r,!0,t)));var D=t.get(["emphasis","focus"]),A=t.get(["emphasis","blurScope"]);(d.useStyle(T(s.getLineStyle(),{fill:"none",stroke:C,lineJoin:"bevel"})),cl(d,t,"lineStyle"),d.style.lineWidth>0&&"bolder"===t.get(["emphasis","lineStyle","width"]))&&(d.getState("emphasis").style.lineWidth=+d.style.lineWidth+1);_s(d).seriesIndex=t.seriesIndex,sl(d,D,A);var L=Bw(t.get("smooth")),k=t.get("smoothMonotone"),R=t.get("connectNulls");if(d.setShape({smooth:L,smoothMonotone:k,connectNulls:R}),f){var N=a.getCalculationInfo("stackedOnSeries"),z=0;f.useStyle(T(l.getAreaStyle(),{fill:C,opacity:.7,lineJoin:"bevel",decal:a.getVisual("style").decal})),N&&(z=Bw(N.get("smooth"))),f.setShape({smooth:L,stackedOnSmooth:z,smoothMonotone:k,connectNulls:R}),cl(f,t,"areaStyle"),_s(f).seriesIndex=t.seriesIndex,sl(f,D,A)}var E=function(t){i._changePolyState(t)};a.eachItemGraphicEl((function(t){t&&(t.onHoverStateChange=E)})),this._polyline.onHoverStateChange=E,this._data=a,this._coordSys=r,this._stackedOnPoints=x,this._points=u,this._step=I,this._valueOrigin=m},e.prototype.dispose=function(){},e.prototype.highlight=function(t,e,n,i){var r=t.getData(),o=Lr(r,i);if(this._changePolyState("emphasis"),!(o instanceof Array)&&null!=o&&o>=0){var a=r.getLayout("points"),s=r.getItemGraphicEl(o);if(!s){var l=a[2*o],u=a[2*o+1];if(isNaN(l)||isNaN(u))return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(l,u))return;var h=t.get("zlevel"),c=t.get("z");(s=new dw(r,o)).x=l,s.y=u,s.setZ(h,c);var p=s.getSymbolPath().getTextContent();p&&(p.zlevel=h,p.z=c,p.z2=this._polyline.z2+1),s.__temp=!0,r.setItemGraphicEl(o,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else Tf.prototype.highlight.call(this,t,e,n,i)},e.prototype.downplay=function(t,e,n,i){var r=t.getData(),o=Lr(r,i);if(this._changePolyState("normal"),null!=o&&o>=0){var a=r.getItemGraphicEl(o);a&&(a.__temp?(r.setItemGraphicEl(o,null),this.group.remove(a)):a.downplay())}else Tf.prototype.downplay.call(this,t,e,n,i)},e.prototype._changePolyState=function(t){var e=this._polygon;Ws(this._polyline,t),e&&Ws(e,t)},e.prototype._newPolyline=function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new Aw({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(e),this._polyline=e,e},e.prototype._newPolygon=function(t,e){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new kw({shape:{points:t,stackedOnPoints:e},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},e.prototype._initSymbolLabelAnimation=function(t,e,n){var i,r,o=e.getBaseAxis(),a=o.inverse;"cartesian2d"===e.type?(i=o.isHorizontal(),r=!1):"polar"===e.type&&(i="angle"===o.dim,r=!0);var s=t.hostModel,l=s.get("animationDuration");"function"==typeof l&&(l=l(null));var u=s.get("animationDelay")||0,h="function"==typeof u?u(null):u;t.eachItemGraphicEl((function(t,o){var s=t;if(s){var c=[t.x,t.y],p=void 0,d=void 0,f=void 0;if(n)if(r){var g=n,y=e.pointToCoord(c);i?(p=g.startAngle,d=g.endAngle,f=-y[1]/180*Math.PI):(p=g.r0,d=g.r,f=y[0])}else{var v=n;i?(p=v.x,d=v.x+v.width,f=t.x):(p=v.y+v.height,d=v.y,f=t.y)}var m=d===p?0:(f-p)/(d-p);a&&(m=1-m);var _="function"==typeof u?u(o):l*m+h,x=s.getSymbolPath(),b=x.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,delay:_}),b&&b.animateFrom({style:{opacity:0}},{duration:300,delay:_}),x.disableLabelAnimation=!0}}))},e.prototype._initOrUpdateEndLabel=function(t,e,n){var i=t.getModel("endLabel");if(i.get("show")){var r=t.getData(),o=this._polyline,a=this._endLabel;a||((a=this._endLabel=new cs({z2:200})).ignoreClip=!0,o.setTextContent(this._endLabel),o.disableLabelAnimation=!0);var s=function(t){for(var e,n,i=t.length/2;i>0&&(e=t[2*i-2],n=t[2*i-1],isNaN(e)||isNaN(n));i--);return i-1}(r.getLayout("points"));s>=0&&(hh(o,ch(t,"endLabel"),{inheritColor:n,labelFetcher:t,labelDataIndex:s,defaultText:function(t,e,n){return null!=n?pw(r,n):cw(r,t)},enableTextSetter:!0},function(t,e){var n=e.getBaseAxis(),i=n.isHorizontal(),r=n.inverse,o=i?r?"right":"left":"center",a=i?"middle":r?"top":"bottom";return{normal:{align:t.get("align")||o,verticalAlign:t.get("verticalAlign")||a}}}(i,e)),o.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,e,n,i,r,o,a){var s=this._endLabel,l=this._polyline;if(s){t<1&&null==i.originalX&&(i.originalX=s.x,i.originalY=s.y);var u=n.getLayout("points"),h=n.hostModel,c=h.get("connectNulls"),p=o.get("precision"),d=o.get("distance")||0,f=a.getBaseAxis(),g=f.isHorizontal(),y=f.inverse,v=e.shape,m=y?g?v.x:v.y+v.height:g?v.x+v.width:v.y,_=(g?d:0)*(y?-1:1),x=(g?0:-d)*(y?-1:1),b=g?"x":"y",w=function(t,e,n){for(var i,r,o=t.length/2,a="x"===n?0:1,s=0,l=-1,u=0;u=e||i>=e&&r<=e){l=u;break}s=u,i=r}else i=r;return{range:[s,l],t:(e-i)/(r-i)}}(u,m,b),S=w.range,M=S[1]-S[0],I=void 0;if(M>=1){if(M>1&&!c){var T=Hw(u,S[0]);s.attr({x:T[0]+_,y:T[1]+x}),r&&(I=h.getRawValue(S[0]))}else{(T=l.getPointOn(m,b))&&s.attr({x:T[0]+_,y:T[1]+x});var C=h.getRawValue(S[0]),D=h.getRawValue(S[1]);r&&(I=Fr(n,p,C,D,w.t))}i.lastFrameIndex=S[0]}else{var A=1===t||i.lastFrameIndex>0?S[0]:0;T=Hw(u,A);r&&(I=h.getRawValue(A)),s.attr({x:T[0]+_,y:T[1]+x})}r&&_h(s).setLabelText(I)}},e.prototype._doUpdateAnimation=function(t,e,n,i,r,o){var a=this._polyline,s=this._polygon,l=t.hostModel,u=function(t,e,n,i,r,o,a,s){for(var l=function(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}(t,e),u=[],h=[],c=[],p=[],d=[],f=[],g=[],y=_w(r,e,a),v=t.getLayout("points")||[],m=e.getLayout("points")||[],_=0;_3e3||s&&Vw(c,d)>3e3)return a.setShape({points:p}),void(s&&s.setShape({points:p,stackedOnPoints:d}));a.shape.__points=u.current,a.shape.points=h;var f={shape:{points:p}};u.current!==h&&(f.shape.__points=u.next),a.stopAnimation(),Hu(a,f,l),s&&(s.setShape({points:h,stackedOnPoints:c}),s.stopAnimation(),Hu(s,{shape:{stackedOnPoints:d}},l),a.shape.points!==s.shape.points&&(s.shape.points=a.shape.points));for(var g=[],y=u.status,v=0;ve&&(e=t[n]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,n=0;n10&&"cartesian2d"===o.type&&r){var s=o.getBaseAxis(),l=o.getOtherAxis(s),u=s.getExtent(),h=n.getDevicePixelRatio(),c=Math.abs(u[1]-u[0])*(h||1),p=Math.round(a/c);if(p>1){"lttb"===r&&t.setData(i.lttbDownSample(i.mapDimension(l.dim),1/p));var d=void 0;"string"==typeof r?d=Yw[r]:"function"==typeof r&&(d=r),d&&t.setData(i.downSample(i.mapDimension(l.dim),1/p,d,Zw))}}}}}var qw=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.getInitialData=function(t,e){return F_(this.getSource(),this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t){var e=this.coordinateSystem;if(e){var n=e.dataToPoint(e.clampData(t)),i=this.getData(),r=i.getLayout("offset"),o=i.getLayout("size");return n[e.getBaseAxis().isHorizontal()?0:1]+=r+o/2,n}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},e}(ff);ff.registerClass(qw);var Kw=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.getInitialData=function(){return F_(this.getSource(),this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return!!this.get("large")&&this.get("progressive")},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return e>t&&(t=e),t},e.prototype.brushSelector=function(t,e,n){return n.rect(e.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=zh(qw.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),e}(qw),$w=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},Jw=function(t){function e(e){var n=t.call(this,e)||this;return n.type="sausage",n}return n(e,t),e.prototype.getDefaultShape=function(){return new $w},e.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=Math.max(e.r0||0,0),o=Math.max(e.r,0),a=.5*(o-r),s=r+a,l=e.startAngle,u=e.endAngle,h=e.clockwise,c=Math.cos(l),p=Math.sin(l),d=Math.cos(u),f=Math.sin(u);(h?u-l<2*Math.PI:l-u<2*Math.PI)&&(t.moveTo(c*r+n,p*r+i),t.arc(c*s+n,p*s+i,a,-Math.PI+l,l,!h)),t.arc(n,i,o,l,u,!h),t.moveTo(d*o+n,f*o+i),t.arc(d*s+n,f*s+i,a,u-2*Math.PI,u-Math.PI,!h),0!==r&&(t.arc(n,i,r,u,l,h),t.moveTo(c*r+n,f*r+i)),t.closePath()},e}(Ka),Qw=[0,0],tS=Math.max,eS=Math.min;var nS=function(t){function e(){var n=t.call(this)||this;return n.type=e.type,n._isFirstFrame=!0,n}return n(e,t),e.prototype.render=function(t,e,n,i){this._model=t,this._removeOnRenderedListener(n),this._updateDrawMode(t);var r=t.get("coordinateSystem");("cartesian2d"===r||"polar"===r)&&(this._isLargeDraw?this._renderLarge(t,e,n):this._renderNormal(t,e,n,i))},e.prototype.incrementalPrepareRender=function(t){this._clear(),this._updateDrawMode(t),this._updateLargeClip(t)},e.prototype.incrementalRender=function(t,e){this._incrementalRenderLarge(t,e)},e.prototype._updateDrawMode=function(t){var e=t.pipelineContext.large;null!=this._isLargeDraw&&e===this._isLargeDraw||(this._isLargeDraw=e,this._clear())},e.prototype._renderNormal=function(t,e,n,i){var r,o=this.group,a=t.getData(),s=this._data,l=t.coordinateSystem,u=l.getBaseAxis();"cartesian2d"===l.type?r=u.isHorizontal():"polar"===l.type&&(r="angle"===u.dim);var h=t.isAnimationEnabled()?t:null,c=function(t,e){var n=t.get("realtimeSort",!0),i=e.getBaseAxis();0;if(n&&"category"===i.type&&"cartesian2d"===e.type)return{baseAxis:i,otherAxis:e.getOtherAxis(i)}}(t,l);c&&this._enableRealtimeSort(c,a,n);var p=t.get("clip",!0)||c,d=function(t,e){var n=t.getArea&&t.getArea();if(Nw(t,"cartesian2d")){var i=t.getBaseAxis();if("category"!==i.type||!i.onBand){var r=e.getLayout("bandWidth");i.isHorizontal()?(n.x-=r,n.width+=2*r):(n.y-=r,n.height+=2*r)}}return n}(l,a);o.removeClipPath();var f=t.get("roundCap",!0),g=t.get("showBackground",!0),y=t.getModel("backgroundStyle"),v=y.get("borderRadius")||0,m=[],_=this._backgroundEls,x=i&&i.isInitSort,b=i&&"changeAxisOrder"===i.type;function w(t){var e=aS[l.type](a,t),n=function(t,e,n){return new("polar"===t.type?Jl:ls)({shape:pS(e,n,t),silent:!0,z2:0})}(l,r,e);return n.useStyle(y.getItemStyle()),"cartesian2d"===l.type&&n.setShape("r",v),m[t]=n,n}a.diff(s).add((function(e){var n=a.getItemModel(e),i=aS[l.type](a,e,n);if(g&&w(e),a.hasValue(e)){var s=!1;p&&(s=iS[l.type](d,i));var y=rS[l.type](t,a,e,i,r,h,u.model,!1,f);sS(y,a,e,n,i,t,r,"polar"===l.type),x?y.attr({shape:i}):c?oS(c,h,y,i,e,r,!1,!1):Wu(y,{shape:i},t,e),a.setItemGraphicEl(e,y),o.add(y),y.ignore=s}})).update((function(e,n){var i=a.getItemModel(e),S=aS[l.type](a,e,i);if(g){var M=void 0;0===_.length?M=w(n):((M=_[n]).useStyle(y.getItemStyle()),"cartesian2d"===l.type&&M.setShape("r",v),m[e]=M);var I=aS[l.type](a,e);Hu(M,{shape:pS(r,I,l)},h,e)}var T=s.getItemGraphicEl(n);if(!a.hasValue(e))return o.remove(T),void(T=null);var C=!1;p&&(C=iS[l.type](d,S))&&o.remove(T),T||(T=rS[l.type](t,a,e,S,r,h,u.model,!!T,f)),b||sS(T,a,e,i,S,t,r,"polar"===l.type),x?T.attr({shape:S}):c?oS(c,h,T,S,e,r,!0,b):Hu(T,{shape:S},t,e,null),a.setItemGraphicEl(e,T),T.ignore=C,o.add(T)})).remove((function(e){var n=s.getItemGraphicEl(e);n&&Yu(n,t,e)})).execute();var S=this._backgroundGroup||(this._backgroundGroup=new Ei);S.removeAll();for(var M=0;Mo)return!0;o=u}return!1},e.prototype._isOrderDifferentInView=function(t,e){for(var n=e.scale,i=n.getExtent(),r=Math.max(0,i[0]),o=Math.min(i[1],n.getOrdinalMeta().categories.length-1);r<=o;++r)if(t.ordinalNumbers[r]!==n.getRawOrdinalNumber(r))return!0},e.prototype._updateSortWithinSameData=function(t,e,n,i){if(this._isOrderChangedWithinSameData(t,e,n)){var r=this._dataSort(t,n,e);this._isOrderDifferentInView(r,n)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:r}))}},e.prototype._dispatchInitSort=function(t,e,n){var i=e.baseAxis,r=this._dataSort(t,i,(function(n){return t.get(t.mapDimension(e.otherAxis.dim),n)}));n.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:r,animation:{duration:0}})},e.prototype.remove=function(t,e){this._clear(this._model),this._removeOnRenderedListener(e)},e.prototype.dispose=function(t,e){this._removeOnRenderedListener(e)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var e=this.group,n=this._data;t&&t.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl((function(e){Yu(e,t,_s(e).dataIndex)}))):e.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(Tf),iS={cartesian2d:function(t,e){var n=e.width<0?-1:1,i=e.height<0?-1:1;n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height);var r=t.x+t.width,o=t.y+t.height,a=tS(e.x,t.x),s=eS(e.x+e.width,r),l=tS(e.y,t.y),u=eS(e.y+e.height,o),h=sr?s:a,e.y=c&&l>o?u:l,e.width=h?0:s-a,e.height=c?0:u-l,n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height),h||c},polar:function(t,e){var n=e.r0<=e.r?1:-1;if(n<0){var i=e.r;e.r=e.r0,e.r0=i}var r=eS(e.r,t.r),o=tS(e.r0,t.r0);e.r=r,e.r0=o;var a=r-o<0;if(n<0){i=e.r;e.r=e.r0,e.r0=i}return a}},rS={cartesian2d:function(t,e,n,i,r,o,a,s,l){var u=new ls({shape:I({},i),z2:1});(u.__dataIndex=n,u.name="item",o)&&(u.shape[r?"height":"width"]=0);return u},polar:function(t,e,n,i,r,o,a,s,l){var u=i.startAngle0?1:-1,a=i.height>0?1:-1;return{x:i.x+o*r/2,y:i.y+a*r/2,width:i.width-o*r,height:i.height-a*r}},polar:function(t,e,n){var i=t.getItemLayout(e);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle}}};function sS(t,e,n,i,r,o,a,s){var l=e.getItemVisual(n,"style");s||t.setShape("r",i.get(["itemStyle","borderRadius"])||0),t.useStyle(l);var u=i.getShallow("cursor");if(u&&t.attr("cursor",u),!s){var h=a?r.height>0?"bottom":"top":r.width>0?"left":"right",c=ch(i);hh(t,c,{labelFetcher:o,labelDataIndex:n,defaultText:cw(o.getData(),n),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:h}),xh(t.getTextContent(),c,o.getRawValue(n),(function(t){return pw(e,t)}))}var p=i.getModel(["emphasis"]);sl(t,p.get("focus"),p.get("blurScope")),cl(t,i),function(t){return null!=t.startAngle&&null!=t.endAngle&&t.startAngle===t.endAngle}(r)&&(t.style.fill="none",t.style.stroke="none",P(t.states,(function(t){t.style&&(t.style.fill=t.style.stroke="none")})))}var lS=function(){},uS=function(t){function e(e){var n=t.call(this,e)||this;return n.type="largeBar",n}return n(e,t),e.prototype.getDefaultShape=function(){return new lS},e.prototype.buildPath=function(t,e){for(var n=e.points,i=this.__startPoint,r=this.__baseDimIdx,o=0;o=c&&y<=p&&(l<=v?h>=l&&h<=v:h>=v&&h<=l))return a[d]}return-1}(this,t.offsetX,t.offsetY);_s(this).dataIndex=e>=0?e:null}),30,!1);function pS(t,e,n){if(Nw(n,"cartesian2d")){var i=e,r=n.getArea();return{x:t?i.x:r.x,y:t?r.y:i.y,width:t?i.width:r.width,height:t?r.height:i.height}}var o=e;return{cx:(r=n.getArea()).cx,cy:r.cy,r0:t?r.r0:o.r0,r:t?r.r:o.r,startAngle:t?o.startAngle:0,endAngle:t?o.endAngle:2*Math.PI}}var dS=2*Math.PI,fS=Math.PI/180;function gS(t,e,n){e.eachSeriesByType(t,(function(t){var e=t.getData(),i=e.mapDimension("value"),r=function(t,e){return Vc(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,n),o=t.get("center"),a=t.get("radius");F(a)||(a=[0,a]),F(o)||(o=[o,o]);var s=Zi(r.width,n.getWidth()),l=Zi(r.height,n.getHeight()),u=Math.min(s,l),h=Zi(o[0],s)+r.x,c=Zi(o[1],l)+r.y,p=Zi(a[0],u/2),d=Zi(a[1],u/2),f=-t.get("startAngle")*fS,g=t.get("minAngle")*fS,y=0;e.each(i,(function(t){!isNaN(t)&&y++}));var v=e.getSum(i),m=Math.PI/(v||y)*2,_=t.get("clockwise"),x=t.get("roseType"),b=t.get("stillShowZeroSum"),w=e.getDataExtent(i);w[0]=0;var S=dS,M=0,I=f,T=_?1:-1;if(e.setLayout({viewRect:r,r:d}),e.each(i,(function(t,n){var i;if(isNaN(t))e.setItemLayout(n,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:_,cx:h,cy:c,r0:p,r:x?NaN:d});else{(i="area"!==x?0===v&&b?m:t*m:dS/y)n?a:o,h=Math.abs(l.label.y-n);if(h>u.maxY){var c=l.label.x-e-l.len2*r,p=i+l.len,f=Math.abs(c)0?"right":"left":L>0?"left":"right"}var F=y.get("rotate");if(O="number"==typeof F?F*(Math.PI/180):F?L<0?-A+Math.PI:-A:0,o=!!O,p.x=I,p.y=T,p.rotation=O,p.setStyle({verticalAlign:"middle"}),R){p.setStyle({align:D});var G=p.states.select;G&&(G.x+=p.x,G.y+=p.y)}else{var H=p.getBoundingRect().clone();H.applyTransform(p.getComputedTransform());var W=(p.style.margin||0)+2.1;H.y-=W/2,H.height+=W,r.push({label:p,labelLine:f,position:v,len:S,len2:M,minTurnAngle:w.get("minTurnAngle"),maxSurfaceAngle:w.get("maxSurfaceAngle"),surfaceNormal:new ai(L,k),linePoints:C,textAlign:D,labelDistance:m,labelAlignTo:_,edgeDistance:x,bleedMargin:b,rect:H})}s.setTextConfig({inside:R})}})),!o&&t.get("avoidLabelOverlap")&&function(t,e,n,i,r,o,a,s){for(var l=[],u=[],h=Number.MAX_VALUE,c=-Number.MAX_VALUE,p=0;p0){for(var l=o.getItemLayout(0),u=1;isNaN(l&&l.startAngle)&&u=n.r0}},e.type="pie",e}(Tf);function MS(t,e,n){e=F(e)&&{coordDimensions:e}||I({},e);var i=t.getSource(),r=O_(i,e),o=new L_(r,t);return o.initData(i,n),o}var IS=function(){function t(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}return t.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},t.prototype.containName=function(t){return this._getRawData().indexOfName(t)>=0},t.prototype.indexOfName=function(t){return this._getDataWithEncodedVisual().indexOfName(t)},t.prototype.getItemVisual=function(t,e){return this._getDataWithEncodedVisual().getItemVisual(t,e)},t}(),TS=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.useColorPaletteOnData=!0,e}return n(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new IS(V(this.getData,this),V(this.getRawData,this)),this._defaultLabelLine(e)},e.prototype.mergeOption=function(){t.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return MS(this,{coordDimensions:["value"],encodeDefaulter:B(up,this)})},e.prototype.getDataParams=function(e){var n=this.getData(),i=t.prototype.getDataParams.call(this,e),r=[];return n.each(n.mapDimension("value"),(function(t){r.push(t)})),i.percent=Qi(r,e,n.hostModel.get("percentPrecision")),i.$vars.push("percent"),i},e.prototype._defaultLabelLine=function(t){br(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.type="series.pie",e.defaultOption={zlevel:0,z:2,legendHoverLink:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(ff);var CS=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return n(e,t),e.prototype.getInitialData=function(t,e){return F_(this.getSource(),this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?5e3:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?1e4:this.get("progressiveThreshold"):t},e.prototype.brushSelector=function(t,e,n){return n.point(e.getItemLayout(t))},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}}},e}(ff),DS=function(){},AS=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getDefaultShape=function(){return new DS},e.prototype.buildPath=function(t,e){var n=e.points,i=e.size,r=this.symbolProxy,o=r.shape,a=t.getContext?t.getContext():t;if(a&&i[0]<4)this._ctx=a;else{this._ctx=null;for(var s=0;s=0;s--){var l=2*s,u=i[l]-o/2,h=i[l+1]-a/2;if(t>=u&&e>=h&&t<=u+o&&e<=h+a)return s}return-1},e}(Ka),LS=function(){function t(){this.group=new Ei}return t.prototype.isPersistent=function(){return!this._incremental},t.prototype.updateData=function(t,e){this.group.removeAll();var n=new AS({rectHover:!0,cursor:"default"});n.setShape({points:t.getLayout("points")}),this._setCommon(n,t,!1,e),this.group.add(n),this._incremental=null},t.prototype.updateLayout=function(t){if(!this._incremental){var e=t.getLayout("points");this.group.eachChild((function(t){if(null!=t.startIndex){var n=2*(t.endIndex-t.startIndex),i=4*t.startIndex*2;e=new Float32Array(e.buffer,i,n)}t.setShape("points",e)}))}},t.prototype.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>2e6?(this._incremental||(this._incremental=new Tu({silent:!0})),this.group.add(this._incremental)):this._incremental=null},t.prototype.incrementalUpdate=function(t,e,n){var i;this._incremental?(i=new AS,this._incremental.addDisplayable(i,!0)):((i=new AS({rectHover:!0,cursor:"default",startIndex:t.start,endIndex:t.end})).incremental=!0,this.group.add(i)),i.setShape({points:e.getLayout("points")}),this._setCommon(i,e,!!this._incremental,n)},t.prototype._setCommon=function(t,e,n,i){var r=e.hostModel;i=i||{};var o=e.getVisual("symbolSize");t.setShape("size",o instanceof Array?o:[o,o]),t.softClipShape=i.clipShape||null,t.symbolProxy=fy(e.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var a=t.shape.size[0]<4;t.useStyle(r.getModel("itemStyle").getItemStyle(a?["color","shadowBlur","shadowColor"]:["color"]));var s=e.getVisual("style"),l=s&&s.fill;if(l&&t.setColor(l),!n){var u=_s(t);u.seriesIndex=r.seriesIndex,t.on("mousemove",(function(e){u.dataIndex=null;var n=t.findDataIndex(e.offsetX,e.offsetY);n>=0&&(u.dataIndex=n+(t.startIndex||0))}))}},t.prototype.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},t.prototype._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()},t}(),kS=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){var i=t.getData();this._updateSymbolDraw(i,t).updateData(i,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,e,n){var i=t.getData();this._updateSymbolDraw(i,t).incrementalPrepareUpdate(i),this._finished=!1},e.prototype.incrementalRender=function(t,e,n){this._symbolDraw.incrementalUpdate(t,e.getData(),{clipShape:this._getClipShape(e)}),this._finished=t.end===e.getData().count()},e.prototype.updateTransform=function(t,e,n){var i=t.getData();if(this.group.dirty(),!this._finished||i.count()>1e4||!this._symbolDraw.isPersistent())return{update:!0};var r=Xw("").reset(t,e,n);r.progress&&r.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout(i)},e.prototype._getClipShape=function(t){var e=t.coordinateSystem,n=e&&e.getArea&&e.getArea();return t.get("clip",!0)?n:null},e.prototype._updateSymbolDraw=function(t,e){var n=this._symbolDraw,i=e.pipelineContext.large;return n&&i===this._isLargeDraw||(n&&n.remove(),n=this._symbolDraw=i?new LS:new mw,this._isLargeDraw=i,this.group.removeAll()),this.group.add(n.group),n},e.prototype.remove=function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(Tf),PS=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},e}(Xc),OS=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Nr).models[0]},e.type="cartesian2dAxis",e}(Xc);L(OS,Yx);var RS={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:"#6E7079",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:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},NS=S({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},RS),zS=S({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},RS),ES={category:NS,value:zS,time:S({scale:!0,splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},zS),log:T({scale:!0,logBase:10},zS)},VS={value:1,category:1,time:1,log:1};function BS(t,e,i,r){P(VS,(function(o,a){var s=S(S({},ES[a],!0),r,!0),l=function(t){function i(){for(var n=[],i=0;ie[1]&&e.reverse(),e},e.prototype.pointToData=function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},e.prototype.setCategorySortInfo=function(t){if("category"!==this.type)return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e}(hb);function YS(t,e,n){n=n||{};var i=t.coordinateSystem,r=e.axis,o={},a=r.getAxesOnZeroOf()[0],s=r.position,l=a?"onZero":s,u=r.dim,h=i.getRect(),c=[h.x,h.x+h.width,h.y,h.y+h.height],p={left:0,right:1,top:0,bottom:1,onZero:2},d=e.get("offset")||0,f="x"===u?[c[2]-d,c[3]+d]:[c[0]-d,c[1]+d];if(a){var g=a.toGlobalCoord(a.dataToCoord(0));f[p.onZero]=Math.max(Math.min(g,f[1]),f[0])}o.position=["y"===u?f[p[l]]:c[0],"x"===u?f[p[l]]:c[3]],o.rotation=Math.PI/2*("x"===u?0:1);o.labelDirection=o.tickDirection=o.nameDirection={top:-1,bottom:1,left:-1,right:1}[s],o.labelOffset=a?f[p[s]]-f[p.onZero]:0,e.get(["axisTick","inside"])&&(o.tickDirection=-o.tickDirection),Q(n.labelInside,e.get(["axisLabel","inside"]))&&(o.labelDirection=-o.labelDirection);var y=e.get(["axisLabel","rotate"]);return o.labelRotate="top"===l?-y:y,o.z2=1,o}function ZS(t){return"cartesian2d"===t.get("coordinateSystem")}function jS(t){var e={xAxisModel:null,yAxisModel:null};return P(e,(function(n,i){var r=i.replace(/Model$/,""),o=t.getReferringComponents(r,Nr).models[0];e[i]=o})),e}var qS=function(){function t(t,e,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=HS,this._initCartesian(t,e,n),this.model=t}return t.prototype.getRect=function(){return this._rect},t.prototype.update=function(t,e){var n=this._axesMap;this._updateScale(t,this.model),P(n.x,(function(t){Vx(t.scale,t.model)})),P(n.y,(function(t){Vx(t.scale,t.model)}));var i={};P(n.x,(function(t){$S(n,"y",t,i)})),P(n.y,(function(t){$S(n,"x",t,i)})),this.resize(this.model,e)},t.prototype.resize=function(t,e,n){var i=t.getBoxLayoutParams(),r=!n&&t.get("containLabel"),o=Vc(i,{width:e.getWidth(),height:e.getHeight()});this._rect=o;var a=this._axesList;function s(){P(a,(function(t){var e=t.isHorizontal(),n=e?[0,o.width]:[0,o.height],i=t.inverse?1:0;t.setExtent(n[i],n[1-i]),function(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}}(t,e?o.x:o.y)}))}s(),r&&(P(a,(function(t){if(!t.model.get(["axisLabel","inside"])){var e=function(t){var e=t.model,n=t.scale;if(e.get(["axisLabel","show"])&&!n.isBlank()){var i,r,o=n.getExtent();r=n instanceof $_?n.count():(i=n.getTicks()).length;var a,s=t.getLabelModel(),l=Fx(t),u=1;r>40&&(u=Math.ceil(r/40));for(var h=0;h0&&i>0||n<0&&i<0)}(t)}var QS=Math.PI,tM=function(){function t(t,e){this.group=new Ei,this.opt=e,this.axisModel=t,T(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new Ei({x:e.position[0],y:e.position[1],rotation:e.rotation});n.updateTransform(),this._transformGroup=n}return t.prototype.hasBuilder=function(t){return!!eM[t]},t.prototype.add=function(t){eM[t](this.opt,this.axisModel,this.group,this._transformGroup)},t.prototype.getGroup=function(){return this.group},t.innerTextLayout=function(t,e,n){var i,r,o=nr(e-t);return ir(o)?(r=n>0?"top":"bottom",i="center"):ir(o-QS)?(r=n>0?"bottom":"top",i="center"):(r="middle",i=o>0&&o0?"right":"left":n>0?"left":"right"),{rotation:o,textAlign:i,textVerticalAlign:r}},t.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},t.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},t}(),eM={axisLine:function(t,e,n,i){var r=e.get(["axisLine","show"]);if("auto"===r&&t.handleAutoShown&&(r=t.handleAutoShown("axisLine")),r){var o=e.axis.getExtent(),a=i.transform,s=[o[0],0],l=[o[1],0];a&&(Rt(s,s,a),Rt(l,l,a));var u=I({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),h=new uu({subPixelOptimize:!0,shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:u,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1});h.anid="line",n.add(h);var c=e.get(["axisLine","symbol"]),p=e.get(["axisLine","symbolSize"]),d=e.get(["axisLine","symbolOffset"])||0;if("number"==typeof d&&(d=[d,d]),null!=c){"string"==typeof c&&(c=[c,c]),"string"!=typeof p&&"number"!=typeof p||(p=[p,p]);var f=p[0],g=p[1];P([{rotate:t.rotation+Math.PI/2,offset:d[0],r:0},{rotate:t.rotation-Math.PI/2,offset:d[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],(function(e,i){if("none"!==c[i]&&null!=c[i]){var r=fy(c[i],-f/2,-g/2,f,g,u.stroke,!0),o=e.r+e.offset;r.attr({rotation:e.rotate,x:s[0]+o*Math.cos(t.rotation),y:s[1]-o*Math.sin(t.rotation),silent:!0,z2:11}),n.add(r)}}))}}},axisTickLabel:function(t,e,n,i){var r=function(t,e,n,i){var r=n.axis,o=n.getModel("axisTick"),a=o.get("show");"auto"===a&&i.handleAutoShown&&(a=i.handleAutoShown("axisTick"));if(!a||r.scale.isBlank())return;for(var s=o.getModel("lineStyle"),l=i.tickDirection*o.get("length"),u=oM(r.getTicksCoords(),e.transform,l,T(s.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),h=0;hc[1]?-1:1,d=["start"===s?c[0]-p*h:"end"===s?c[1]+p*h:(c[0]+c[1])/2,rM(s)?t.labelOffset+l*h:0],f=e.get("nameRotate");null!=f&&(f=f*QS/180),rM(s)?o=tM.innerTextLayout(t.rotation,null!=f?f:t.rotation,l):(o=function(t,e,n,i){var r,o,a=nr(n-t),s=i[0]>i[1],l="start"===e&&!s||"start"!==e&&s;ir(a-QS/2)?(o=l?"bottom":"top",r="center"):ir(a-1.5*QS)?(o=l?"top":"bottom",r="center"):(o="middle",r=a<1.5*QS&&a>QS/2?l?"left":"right":l?"right":"left");return{rotation:a,textAlign:r,textVerticalAlign:o}}(t.rotation,s,f||0,c),null!=(a=t.axisNameAvailableWidth)&&(a=Math.abs(a/Math.sin(o.rotation)),!isFinite(a)&&(a=null)));var g=u.getFont(),y=e.get("nameTruncate",!0)||{},v=y.ellipsis,m=Q(t.nameTruncateMaxWidth,y.maxWidth,a),_=new cs({x:d[0],y:d[1],rotation:o.rotation,silent:tM.isLabelSilent(e),style:ph(u,{text:r,font:g,overflow:"truncate",width:m,ellipsis:v,fill:u.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:u.get("align")||o.textAlign,verticalAlign:u.get("verticalAlign")||o.textVerticalAlign}),z2:1});if(oh({el:_,componentModel:e,itemName:r}),_.__fullText=r,_.anid="name",e.get("triggerEvent")){var x=tM.makeAxisEventDataBase(e);x.targetType="axisName",x.name=r,_s(_).eventData=x}i.add(_),_.updateTransform(),n.add(_),_.decomposeTransform()}}};function nM(t){t&&(t.ignore=!0)}function iM(t,e){var n=t&&t.getBoundingRect().clone(),i=e&&e.getBoundingRect().clone();if(n&&i){var r=Gn([]);return Xn(r,r,-t.rotation),n.applyTransform(Wn([],r,t.getLocalTransform())),i.applyTransform(Wn([],r,e.getLocalTransform())),n.intersect(i)}}function rM(t){return"middle"===t||"center"===t}function oM(t,e,n,i,r){for(var o=[],a=[],s=[],l=0;l=0||t===e}function lM(t){var e=uM(t);if(e){var n=e.axisPointerModel,i=e.axis.scale,r=n.option,o=n.get("status"),a=n.get("value");null!=a&&(a=i.parse(a));var s=hM(n);null==o&&(r.status=s?"show":"hide");var l=i.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==a||a>l[1])&&(a=l[1]),a0&&!c.min?c.min=0:null!=c.min&&c.min<0&&!c.max&&(c.max=0);var p=a;null!=c.color&&(p=T({color:c.color},a));var d=S(w(c),{boundaryGap:t,splitNumber:e,scale:n,axisLine:i,axisTick:r,axisLabel:o,name:c.text,nameLocation:"end",nameGap:u,nameTextStyle:p,triggerEvent:h},!1);if(s||(d.name=""),"string"==typeof l){var f=d.name;d.name=l.replace("{value}",null!=f?f:"")}else"function"==typeof l&&(d.name=l(d.name,d));var g=new Oh(d,null,this.ecModel);return L(g,Yx.prototype),g.mainType="radar",g.componentIndex=this.componentIndex,g}),this);this._indicatorModels=c},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={zlevel:0,z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:S({lineStyle:{color:"#bbb"}},PM.axisLine),axisLabel:OM(PM.axisLabel,!1),axisTick:OM(PM.axisTick,!1),splitLine:OM(PM.splitLine,!0),splitArea:OM(PM.splitArea,!0),indicator:[]},e}(Xc),NM=["axisLine","axisTickLabel","axisName"],zM=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){this.group.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t){var e=t.coordinateSystem;P(O(e.getIndicatorAxes(),(function(t){return new tM(t.model,{position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})})),(function(t){P(NM,t.add,t),this.group.add(t.getGroup())}),this)},e.prototype._buildSplitLineAndArea=function(t){var e=t.coordinateSystem,n=e.getIndicatorAxes();if(n.length){var i=t.get("shape"),r=t.getModel("splitLine"),o=t.getModel("splitArea"),a=r.getModel("lineStyle"),s=o.getModel("areaStyle"),l=r.get("show"),u=o.get("show"),h=a.get("color"),c=s.get("color"),p=F(h)?h:[h],d=F(c)?c:[c],f=[],g=[];if("circle"===i)for(var y=n[0].getTicksCoords(),v=e.cx,m=e.cy,_=0;_n[0]&&isFinite(c)&&isFinite(n[0]))}else{a.getTicks().length-1>r&&(u=o(u));c=ji((h=Math.ceil(n[1]/u)*u)-u*r);a.setExtent(c,h),a.setInterval(u)}}))},t.prototype.convertToPixel=function(t,e,n){return console.warn("Not implemented."),null},t.prototype.convertFromPixel=function(t,e,n){return console.warn("Not implemented."),null},t.prototype.containPoint=function(t){return console.warn("Not implemented."),!1},t.create=function(e,n){var i=[];return e.eachComponent("radar",(function(r){var o=new t(r,e,n);i.push(o),r.coordinateSystem=o})),e.eachSeriesByType("radar",(function(t){"radar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("radarIndex")||0])})),i},t.dimensions=[],t}();function BM(t){t.registerCoordinateSystem("radar",VM),t.registerComponentModel(RM),t.registerComponentView(zM),t.registerVisual({seriesType:"radar",reset:function(t){var e=t.getData();e.each((function(t){e.setItemVisual(t,"legendIcon","roundRect")})),e.setVisual("legendIcon","roundRect")}})}var FM="\0_ec_interaction_mutex";function GM(t,e){return!!HM(t)[e]}function HM(t){return t[FM]||(t[FM]={})}Hm({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},(function(){}));var WM=function(t){function e(e){var n=t.call(this)||this;n._zr=e;var i=V(n._mousedownHandler,n),r=V(n._mousemoveHandler,n),o=V(n._mouseupHandler,n),a=V(n._mousewheelHandler,n),s=V(n._pinchHandler,n);return n.enable=function(t,n){this.disable(),this._opt=T(w(n)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==t&&(t=!0),!0!==t&&"move"!==t&&"pan"!==t||(e.on("mousedown",i),e.on("mousemove",r),e.on("mouseup",o)),!0!==t&&"scale"!==t&&"zoom"!==t||(e.on("mousewheel",a),e.on("pinch",s))},n.disable=function(){e.off("mousedown",i),e.off("mousemove",r),e.off("mouseup",o),e.off("mousewheel",a),e.off("pinch",s)},n}return n(e,t),e.prototype.isDragging=function(){return this._dragging},e.prototype.isPinching=function(){return this._pinching},e.prototype.setPointerChecker=function(t){this.pointerChecker=t},e.prototype.dispose=function(){this.disable()},e.prototype._mousedownHandler=function(t){if(!(ne(t)||t.target&&t.target.draggable)){var e=t.offsetX,n=t.offsetY;this.pointerChecker&&this.pointerChecker(t,e,n)&&(this._x=e,this._y=n,this._dragging=!0)}},e.prototype._mousemoveHandler=function(t){if(this._dragging&&YM("moveOnMouseMove",t,this._opt)&&"pinch"!==t.gestureEvent&&!GM(this._zr,"globalPan")){var e=t.offsetX,n=t.offsetY,i=this._x,r=this._y,o=e-i,a=n-r;this._x=e,this._y=n,this._opt.preventDefaultMouseMove&&ee(t.event),XM(this,"pan","moveOnMouseMove",t,{dx:o,dy:a,oldX:i,oldY:r,newX:e,newY:n,isAvailableBehavior:null})}},e.prototype._mouseupHandler=function(t){ne(t)||(this._dragging=!1)},e.prototype._mousewheelHandler=function(t){var e=YM("zoomOnMouseWheel",t,this._opt),n=YM("moveOnMouseWheel",t,this._opt),i=t.wheelDelta,r=Math.abs(i),o=t.offsetX,a=t.offsetY;if(0!==i&&(e||n)){if(e){var s=r>3?1.4:r>1?1.2:1.1;UM(this,"zoom","zoomOnMouseWheel",t,{scale:i>0?s:1/s,originX:o,originY:a,isAvailableBehavior:null})}if(n){var l=Math.abs(i);UM(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:(i>0?1:-1)*(l>3?.4:l>1?.15:.05),originX:o,originY:a,isAvailableBehavior:null})}}},e.prototype._pinchHandler=function(t){GM(this._zr,"globalPan")||UM(this,"zoom",null,t,{scale:t.pinchScale>1?1.1:1/1.1,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})},e}(Ft);function UM(t,e,n,i,r){t.pointerChecker&&t.pointerChecker(i,r.originX,r.originY)&&(ee(i.event),XM(t,e,n,i,r))}function XM(t,e,n,i,r){r.isAvailableBehavior=V(YM,null,n,i),t.trigger(e,r)}function YM(t,e,n){var i=n[t];return!t||i&&(!H(i)||e.event[i+"Key"])}function ZM(t,e,n){var i=t.target;i.x+=e,i.y+=n,i.dirty()}function jM(t,e,n,i){var r=t.target,o=t.zoomLimit,a=t.zoom=t.zoom||1;if(a*=e,o){var s=o.min||0,l=o.max||1/0;a=Math.max(Math.min(l,a),s)}var u=a/t.zoom;t.zoom=a,r.x-=(n-r.x)*(u-1),r.y-=(i-r.y)*(u-1),r.scaleX*=u,r.scaleY*=u,r.dirty()}var qM={axisPointer:1,tooltip:1,brush:1};function KM(t,e,n){var i=e.getComponentByElement(t.topTarget),r=i&&i.coordinateSystem;return i&&i!==n&&!qM.hasOwnProperty(i.mainType)&&r&&r.model!==n}var $M=["rect","circle","line","ellipse","polygon","polyline","path"],JM=ht($M),QM=ht($M.concat(["g"])),tI=ht($M.concat(["g"])),eI=kr();function nI(t){var e=t.getItemStyle(),n=t.get("areaColor");return null!=n&&(e.fill=n),e}var iI=function(){function t(t){var e=new Ei;this.uid=Nh("ec_map_draw"),this._controller=new WM(t.getZr()),this._controllerHost={target:e},this.group=e,e.add(this._regionsGroup=new Ei),e.add(this._svgGroup=new Ei)}return t.prototype.draw=function(t,e,n,i,r){var o="geo"===t.mainType,a=t.getData&&t.getData();o&&e.eachComponent({mainType:"series",subType:"map"},(function(e){a||e.getHostGeoModel()!==t||(a=e.getData())}));var s=t.coordinateSystem,l=this._regionsGroup,u=this.group,h=s.getTransformInfo(),c=h.raw,p=h.roam;!l.childAt(0)||r?(u.x=p.x,u.y=p.y,u.scaleX=p.scaleX,u.scaleY=p.scaleY,u.dirty()):Hu(u,p,t);var d=a&&a.getVisual("visualMeta")&&a.getVisual("visualMeta").length>0,f={api:n,geo:s,mapOrGeoModel:t,data:a,isVisualEncodedByVisualMap:d,isGeo:o,transformInfoRaw:c};"geoJSON"===s.resourceType?this._buildGeoJSON(f):"geoSVG"===s.resourceType&&this._buildSVG(f),this._updateController(t,e,n),this._updateMapSelectHandler(t,l,n,i)},t.prototype._buildGeoJSON=function(t){var e=this._regionsGroupByName=ht(),n=ht(),i=this._regionsGroup,r=t.transformInfoRaw,o=t.mapOrGeoModel,a=t.data,s=function(t){return[t[0]*r.scaleX+r.x,t[1]*r.scaleY+r.y]};i.removeAll(),P(t.geo.regions,(function(r){var l=r.name,u=e.get(l),h=n.get(l)||{},c=h.dataIdx,p=h.regionModel;u||(u=e.set(l,new Ei),i.add(u),c=a?a.indexOfName(l):null,p=t.isGeo?o.getRegionModel(l):a?a.getItemModel(c):null,n.set(l,{dataIdx:c,regionModel:p}));var d=new yu({segmentIgnoreThreshold:1,shape:{paths:[]}});u.add(d),P(r.geometries,(function(t){if("polygon"===t.type){for(var e=[],n=0;n=0)&&(p=r);var d=a?{normal:{align:"center",verticalAlign:"middle"}}:null;hh(e,ch(i),{labelFetcher:p,labelDataIndex:c,defaultText:n},d);var f=e.getTextContent();if(f&&(eI(f).ignore=f.ignore,e.textConfig&&a)){var g=e.getBoundingRect().clone();e.textConfig.layoutRect=g,e.textConfig.position=[(a[0]-g.x)/g.width*100+"%",(a[1]-g.y)/g.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function aI(t,e,n,i,r,o){t.data?t.data.setItemGraphicEl(o,e):_s(e).eventData={componentType:"geo",componentIndex:r.componentIndex,geoIndex:r.componentIndex,name:n,region:i&&i.option||{}}}function sI(t,e,n,i,r){t.data||oh({el:e,componentModel:r,itemName:n,itemTooltipOption:i.get("tooltip")})}function lI(t,e,n,i,r){e.highDownSilentOnTouch=!!r.get("selectedMode");var o=i.getModel("emphasis"),a=o.get("focus");return sl(e,a,o.get("blurScope")),t.isGeo&&function(t,e,n){var i=_s(t);i.componentMainType=e.mainType,i.componentIndex=e.componentIndex,i.componentHighDownName=n}(e,r,n),a}var uI=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n,i){if(!i||"mapToggleSelect"!==i.type||i.from!==this.uid){var r=this.group;if(r.removeAll(),!t.getHostGeoModel()){if(this._mapDraw&&i&&"geoRoam"===i.type&&this._mapDraw.resetForLabelLayout(),i&&"geoRoam"===i.type&&"series"===i.componentType&&i.seriesId===t.id)(o=this._mapDraw)&&r.add(o.group);else if(t.needsDrawMap){var o=this._mapDraw||new iI(n);r.add(o.group),o.draw(t,e,n,this,i),this._mapDraw=o}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;t.get("showLegendSymbol")&&e.getComponent("legend")&&this._renderSymbols(t,e,n)}}},e.prototype.remove=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},e.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},e.prototype._renderSymbols=function(t,e,n){var i=t.originalData,r=this.group;i.each(i.mapDimension("value"),(function(e,n){if(!isNaN(e)){var o=i.getItemLayout(n);if(o&&o.point){var a=o.point,s=o.offset,l=new Nl({style:{fill:t.getData().getVisual("style").fill},shape:{cx:a[0]+9*s,cy:a[1],r:3},silent:!0,z2:8+(s?0:11)});if(!s){var u=t.mainSeries.getData(),h=i.getName(n),c=u.indexOfName(h),p=i.getItemModel(n),d=p.getModel("label"),f=u.getItemGraphicEl(c);hh(l,ch(p),{labelFetcher:{getFormattedLabel:function(e,n){return t.getFormattedLabel(c,n)}}}),l.disableLabelAnimation=!0,d.get("position")||l.setTextConfig({position:"bottom"}),f.onHoverStateChange=function(t){Ws(l,t)}}r.add(l)}}}))},e.type="map",e}(Tf),hI=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.needsDrawMap=!1,n.seriesGroup=[],n.getTooltipPosition=function(t){if(null!=t){var e=this.getData().getName(t),n=this.coordinateSystem,i=n.getRegion(e);return i&&n.dataToPoint(i.getCenter())}},n}return n(e,t),e.prototype.getInitialData=function(t){for(var e=MS(this,{coordDimensions:["value"],encodeDefaulter:B(up,this)}),n=ht(),i=[],r=0,o=e.count();r-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2),n},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={zlevel:0,z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},e}(ff);function cI(t){var e={};t.eachSeriesByType("map",(function(t){var n=t.getHostGeoModel(),i=n?"o"+n.id:"i"+t.getMapType();(e[i]=e[i]||[]).push(t)})),P(e,(function(t,e){for(var n,i,r,o=(n=O(t,(function(t){return t.getData()})),i=t[0].get("mapValueCalculation"),r={},P(n,(function(t){t.each(t.mapDimension("value"),(function(e,n){var i="ec-"+t.getName(n);r[i]=r[i]||[],isNaN(e)||r[i].push(e)}))})),n[0].map(n[0].mapDimension("value"),(function(t,e){for(var o="ec-"+n[0].getName(e),a=0,s=1/0,l=-1/0,u=r[o].length,h=0;h1?(s.width=a,s.height=a/d):(s.height=a,s.width=a*d),s.y=o[1]-s.height/2,s.x=o[0]-s.width/2;else{var g=t.getBoxLayoutParams();g.aspect=d,s=Vc(g,{width:c,height:p})}this.setViewRect(s.x,s.y,s.width,s.height),this.setCenter(t.get("center")),this.setZoom(t.get("zoom"))}L(vI,fI);var xI=new(function(){function t(){this.dimensions=vI.prototype.dimensions}return t.prototype.create=function(t,e){var n=[];t.eachComponent("geo",(function(t,i){var r=t.get("map"),o=new vI(r+i,r,{nameMap:t.get("nameMap"),nameProperty:t.get("nameProperty"),aspectScale:t.get("aspectScale")});o.zoomLimit=t.get("scaleLimit"),n.push(o),t.coordinateSystem=o,o.model=t,o.resize=_I,o.resize(t,e)})),t.eachSeries((function(t){if("geo"===t.get("coordinateSystem")){var e=t.get("geoIndex")||0;t.coordinateSystem=n[e]}}));var i={};return t.eachSeriesByType("map",(function(t){if(!t.getHostGeoModel()){var e=t.getMapType();i[e]=i[e]||[],i[e].push(t)}})),P(i,(function(t,i){var r=O(t,(function(t){return t.get("nameMap")})),o=new vI(i,i,{nameMap:M(r),nameProperty:t[0].get("nameProperty"),aspectScale:t[0].get("aspectScale")});o.zoomLimit=Q.apply(null,O(t,(function(t){return t.get("scaleLimit")}))),n.push(o),o.resize=_I,o.resize(t[0],e),P(t,(function(t){t.coordinateSystem=o,function(t,e){P(e.get("geoCoord"),(function(e,n){t.addGeoCoord(n,e)}))}(o,t)}))})),n},t.prototype.getFilledRegions=function(t,e,n,i){for(var r=(t||[]).slice(),o=ht(),a=0;a=0;){var o=e[n];o.hierNode.prelim+=i,o.hierNode.modifier+=i,r+=o.hierNode.change,i+=o.hierNode.shift+r}}(t);var o=(n[0].hierNode.prelim+n[n.length-1].hierNode.prelim)/2;r?(t.hierNode.prelim=r.hierNode.prelim+e(t,r),t.hierNode.modifier=t.hierNode.prelim-o):t.hierNode.prelim=o}else r&&(t.hierNode.prelim=r.hierNode.prelim+e(t,r));t.parentNode.hierNode.defaultAncestor=function(t,e,n,i){if(e){for(var r=t,o=t,a=o.parentNode.children[0],s=e,l=r.hierNode.modifier,u=o.hierNode.modifier,h=a.hierNode.modifier,c=s.hierNode.modifier;s=AI(s),o=LI(o),s&&o;){r=AI(r),a=LI(a),r.hierNode.ancestor=t;var p=s.hierNode.prelim+c-o.hierNode.prelim-u+i(s,o);p>0&&(PI(kI(s,t,n),t,p),u+=p,l+=p),c+=s.hierNode.modifier,u+=o.hierNode.modifier,l+=r.hierNode.modifier,h+=a.hierNode.modifier}s&&!AI(r)&&(r.hierNode.thread=s,r.hierNode.modifier+=c-l),o&&!LI(a)&&(a.hierNode.thread=o,a.hierNode.modifier+=u-h,n=t)}return n}(t,r,t.parentNode.hierNode.defaultAncestor||i[0],e)}function TI(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function CI(t){return arguments.length?t:OI}function DI(t,e){return t-=Math.PI/2,{x:e*Math.cos(t),y:e*Math.sin(t)}}function AI(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function LI(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function kI(t,e,n){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:n}function PI(t,e,n){var i=n/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=i,e.hierNode.shift+=n,e.hierNode.modifier+=n,e.hierNode.prelim+=n,t.hierNode.change+=i}function OI(t,e){return t.parentNode===e.parentNode?1:2}var RI=function(){this.parentPoint=[],this.childPoints=[]},NI=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new RI},e.prototype.buildPath=function(t,e){var n=e.childPoints,i=n.length,r=e.parentPoint,o=n[0],a=n[i-1];if(1===i)return t.moveTo(r[0],r[1]),void t.lineTo(o[0],o[1]);var s=e.orient,l="TB"===s||"BT"===s?0:1,u=1-l,h=Zi(e.forkPosition,1),c=[];c[l]=r[l],c[u]=r[u]+(a[u]-r[u])*h,t.moveTo(r[0],r[1]),t.lineTo(c[0],c[1]),t.moveTo(o[0],o[1]),c[l]=o[l],t.lineTo(c[0],c[1]),c[l]=a[l],t.lineTo(c[0],c[1]),t.lineTo(a[0],a[1]);for(var p=1;pm.x)||(x-=Math.PI);var S=b?"left":"right",M=s.getModel("label"),I=M.get("rotate"),C=I*(Math.PI/180),D=y.getTextContent();D&&(y.setTextConfig({position:M.get("position")||S,rotation:null==I?-x:C,origin:"center"}),D.setStyle("verticalAlign","middle"))}var A=s.get(["emphasis","focus"]),L="ancestor"===A?a.getAncestorsIndices():"descendant"===A?a.getDescendantIndices():null;L&&(_s(n).focus=L),function(t,e,n,i,r,o,a,s){var l=e.getModel(),u=t.get("edgeShape"),h=t.get("layout"),c=t.getOrient(),p=t.get(["lineStyle","curveness"]),d=t.get("edgeForkPosition"),f=l.getModel("lineStyle").getLineStyle(),g=i.__edge;if("curve"===u)e.parentNode&&e.parentNode!==n&&(g||(g=i.__edge=new du({shape:FI(h,c,p,r,r)})),Hu(g,{shape:FI(h,c,p,o,a)},t));else if("polyline"===u)if("orthogonal"===h){if(e!==n&&e.children&&0!==e.children.length&&!0===e.isExpand){for(var y=e.children,v=[],m=0;me&&(e=i.height)}this.height=e+1},t.prototype.getNodeById=function(t){if(this.getId()===t)return this;for(var e=0,n=this.children,i=n.length;e=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},t.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},t.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostTree.data.getItemModel(this.dataIndex).getModel(t)},t.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},t.prototype.setVisual=function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},t.prototype.getVisual=function(t){return this.hostTree.data.getItemVisual(this.dataIndex,t)},t.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},t.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},t.prototype.isAncestorOf=function(t){for(var e=t.parentNode;e;){if(e===this)return!0;e=e.parentNode}return!1},t.prototype.isDescendantOf=function(t){return t!==this&&t.isAncestorOf(this)},t}(),$I=function(){function t(t){this.type="tree",this._nodes=[],this.hostModel=t}return t.prototype.eachNode=function(t,e,n){this.root.eachNode(t,e,n)},t.prototype.getNodeByDataIndex=function(t){var e=this.data.getRawIndex(t);return this._nodes[e]},t.prototype.getNodeById=function(t){return this.root.getNodeById(t)},t.prototype.update=function(){for(var t=this.data,e=this._nodes,n=0,i=e.length;n=0){var i=n.getData().tree.root,r=t.targetNode;if("string"==typeof r&&(r=i.getNodeById(r)),r&&i.contains(r))return{node:r};var o=t.targetNodeId;if(null!=o&&(r=i.getNodeById(o)))return{node:r}}}function QI(t){for(var e=[];t;)(t=t.parentNode)&&e.push(t);return e.reverse()}function tT(t,e){return D(QI(t),e)>=0}function eT(t,e){for(var n=[];t;){var i=t.dataIndex;n.push({name:t.name,dataIndex:i,value:e.getRawValue(i)}),t=t.parentNode}return n.reverse(),n}var nT=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.hasSymbolVisual=!0,e.ignoreStyleOnData=!0,e}return n(e,t),e.prototype.getInitialData=function(t){var e={name:t.name,children:t.data},n=t.leaves||{},i=new Oh(n,this,this.ecModel),r=$I.createTree(e,this,(function(t){t.wrapMethod("getItemModel",(function(t,e){var n=r.getNodeByDataIndex(e);return n&&n.children.length&&n.isExpand||(t.parentModel=i),t}))}));var o=0;r.eachNode("preorder",(function(t){t.depth>o&&(o=t.depth)}));var a=t.expandAndCollapse&&t.initialTreeDepth>=0?t.initialTreeDepth:o;return r.root.eachNode("preorder",(function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=a})),r.data},e.prototype.getOrient=function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(t="TB"),t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.formatTooltip=function(t,e,n){for(var i=this.getData().tree,r=i.root.children[0],o=i.getNodeByDataIndex(t),a=o.getValue(),s=o.name;o&&o!==r;)s=o.parentNode.name+"."+s,o=o.parentNode;return tf("nameValue",{name:s,value:a,noValue:isNaN(a)||null==a})},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return n.treeAncestors=eT(i,this),n},e.type="series.tree",e.layoutMode="box",e.defaultOption={zlevel:0,z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(ff);function iT(t,e){for(var n,i=[t];n=i.pop();)if(e(n),n.isExpand){var r=n.children;if(r.length)for(var o=r.length-1;o>=0;o--)i.push(r[o])}}function rT(t,e){t.eachSeriesByType("tree",(function(t){!function(t,e){var n=function(t,e){return Vc(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e);t.layoutInfo=n;var i=t.get("layout"),r=0,o=0,a=null;"radial"===i?(r=2*Math.PI,o=Math.min(n.height,n.width)/2,a=CI((function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth}))):(r=n.width,o=n.height,a=CI());var s=t.getData().tree.root,l=s.children[0];if(l){!function(t){var e=t;e.hierNode={defaultAncestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var n,i,r=[e];n=r.pop();)if(i=n.children,n.isExpand&&i.length)for(var o=i.length-1;o>=0;o--){var a=i[o];a.hierNode={defaultAncestor:null,ancestor:a,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},r.push(a)}}(s),function(t,e,n){for(var i,r=[t],o=[];i=r.pop();)if(o.push(i),i.isExpand){var a=i.children;if(a.length)for(var s=0;sh.getLayout().x&&(h=t),t.depth>c.depth&&(c=t)}));var p=u===h?1:a(u,h)/2,d=p-u.getLayout().x,f=0,g=0,y=0,v=0;if("radial"===i)f=r/(h.getLayout().x+p+d),g=o/(c.depth-1||1),iT(l,(function(t){y=(t.getLayout().x+d)*f,v=(t.depth-1)*g;var e=DI(y,v);t.setLayout({x:e.x,y:e.y,rawX:y,rawY:v},!0)}));else{var m=t.getOrient();"RL"===m||"LR"===m?(g=o/(h.getLayout().x+p+d),f=r/(c.depth-1||1),iT(l,(function(t){v=(t.getLayout().x+d)*g,y="LR"===m?(t.depth-1)*f:r-(t.depth-1)*f,t.setLayout({x:y,y:v},!0)}))):"TB"!==m&&"BT"!==m||(f=r/(h.getLayout().x+p+d),g=o/(c.depth-1||1),iT(l,(function(t){y=(t.getLayout().x+d)*f,v="TB"===m?(t.depth-1)*g:o-(t.depth-1)*g,t.setLayout({x:y,y:v},!0)})))}}}(t,e)}))}function oT(t){t.eachSeriesByType("tree",(function(t){var e=t.getData();e.tree.eachNode((function(t){var n=t.getModel().getModel("itemStyle").getItemStyle();I(e.ensureUniqueItemVisual(t.dataIndex,"style"),n)}))}))}var aT=function(){},sT=["treemapZoomToNode","treemapRender","treemapMove"];function lT(t){var e=t.getData().tree,n={};e.eachNode((function(e){for(var i=e;i&&i.depth>1;)i=i.parentNode;var r=xp(t.ecModel,i.name||i.dataIndex+"",n);e.setVisual("decal",r)}))}var uT=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.preventUsingHoverLayer=!0,n}return n(e,t),e.prototype.getInitialData=function(t,e){var n={name:t.name,children:t.data};hT(n);var i=t.levels||[],r=this.designatedVisualItemStyle={},o=new Oh({itemStyle:r},this,e),a=O((i=t.levels=function(t,e){var n,i,r=xr(e.get("color")),o=xr(e.get(["aria","decal","decals"]));if(!r)return;P(t=t||[],(function(t){var e=new Oh(t),r=e.get("color"),o=e.get("decal");(e.get(["itemStyle","color"])||r&&"none"!==r)&&(n=!0),(e.get(["itemStyle","decal"])||o&&"none"!==o)&&(i=!0)}));var a=t[0]||(t[0]={});n||(a.color=r.slice());!i&&o&&(a.decal=o.slice());return t}(i,e))||[],(function(t){return new Oh(t,o,e)}),this),s=$I.createTree(n,this,(function(t){t.wrapMethod("getItemModel",(function(t,e){var n=s.getNodeByDataIndex(e),i=n?a[n.depth]:null;return t.parentModel=i||o,t}))}));return s.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,e,n){var i=this.getData(),r=this.getRawValue(t);return tf("nameValue",{name:i.getName(t),value:r})},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return n.treePathInfo=eT(i,this),n},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},I(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=ht(),this._idIndexMapCount=0);var n=e.get(t);return null==n&&e.set(t,n=this._idIndexMapCount++),n},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)},e.prototype.enableAriaDecal=function(){lT(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.1024,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],ellipsis:!0,verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e}(ff);function hT(t){var e=0;P(t.children,(function(t){hT(t);var n=t.value;F(n)&&(n=n[0]),e+=n}));var n=t.value;F(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=e),n<0&&(n=0),F(t.value)?t.value[0]=n:t.value=n}var cT=function(){function t(t){this.group=new Ei,t.add(this.group)}return t.prototype.render=function(t,e,n,i){var r=t.getModel("breadcrumb"),o=this.group;if(o.removeAll(),r.get("show")&&n){var a=r.getModel("itemStyle"),s=a.getModel("textStyle"),l={pos:{left:r.get("left"),right:r.get("right"),top:r.get("top"),bottom:r.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:r.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(n,l,s),this._renderContent(t,l,a,s,i),Bc(o,l.pos,l.box)}},t.prototype._prepare=function(t,e,n){for(var i=t;i;i=i.parentNode){var r=Cr(i.getModel().get("name"),""),o=n.getTextRect(r),a=Math.max(o.width+16,e.emptyItemWidth);e.totalWidth+=a+8,e.renderList.push({node:i,text:r,width:a})}},t.prototype._renderContent=function(t,e,n,i,r){for(var o,a,s,l,u,h,c,p,d,f=0,g=e.emptyItemWidth,y=t.get(["breadcrumb","height"]),v=(o=e.pos,a=e.box,l=a.width,u=a.height,h=Zi(o.left,l),c=Zi(o.top,u),p=Zi(o.right,l),d=Zi(o.bottom,u),(isNaN(h)||isNaN(parseFloat(o.left)))&&(h=0),(isNaN(p)||isNaN(parseFloat(o.right)))&&(p=l),(isNaN(c)||isNaN(parseFloat(o.top)))&&(c=0),(isNaN(d)||isNaN(parseFloat(o.bottom)))&&(d=u),s=wc(s||0),{width:Math.max(p-h-s[1]-s[3],0),height:Math.max(d-c-s[0]-s[2],0)}),m=e.totalWidth,_=e.renderList,x=_.length-1;x>=0;x--){var b=_[x],w=b.node,S=b.width,M=b.text;m>v.width&&(m-=S-g,S=g,M=null);var I=new ru({shape:{points:pT(f,0,S,y,x===_.length-1,0===x)},style:T(n.getItemStyle(),{lineJoin:"bevel"}),textContent:new cs({style:{text:M,fill:i.getTextColor(),font:i.getFont()}}),textConfig:{position:"inside"},z2:1e5,onclick:B(r,w)});I.disableLabelAnimation=!0,this.group.add(I),dT(I,t,w),f+=S+8}},t.prototype.remove=function(){this.group.removeAll()},t}();function pT(t,e,n,i,r,o){var a=[[r?t:t-5,e],[t+n,e],[t+n,e+i],[r?t:t-5,e+i]];return!o&&a.splice(2,0,[t+n+5,e+i/2]),!r&&a.push([t,e+i/2]),a}function dT(t,e,n){_s(t).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.componentIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:n&&n.dataIndex,name:n&&n.name},treePathInfo:n&&eT(n,e)}}var fT=function(){function t(){this._storage=[],this._elExistsMap={}}return t.prototype.add=function(t,e,n,i,r){return!this._elExistsMap[t.id]&&(this._elExistsMap[t.id]=!0,this._storage.push({el:t,target:e,duration:n,delay:i,easing:r}),!0)},t.prototype.finished=function(t){return this._finishedCallback=t,this},t.prototype.start=function(){for(var t=this,e=this._storage.length,n=function(){--e<=0&&(t._storage.length=0,t._elExistsMap={},t._finishedCallback&&t._finishedCallback())},i=0,r=this._storage.length;i3||Math.abs(t.dy)>3)){var e=this.seriesModel.getData().tree.root;if(!e)return;var n=e.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+t.dx,y:n.y+t.dy,width:n.width,height:n.height}})}},e.prototype._onZoom=function(t){var e=t.originX,n=t.originY;if("animating"!==this._state){var i=this.seriesModel.getData().tree.root;if(!i)return;var r=i.getLayout();if(!r)return;var o=new gi(r.x,r.y,r.width,r.height),a=this.seriesModel.layoutInfo,s=[1,0,0,1,0,0];Un(s,s,[-(e-=a.x),-(n-=a.y)]),Yn(s,s,[t.scale,t.scale]),Un(s,s,[e,n]),o.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:o.x,y:o.y,width:o.width,height:o.height}})}},e.prototype._initEvents=function(t){var e=this;t.on("click",(function(t){if("ready"===e._state){var n=e.seriesModel.get("nodeClick",!0);if(n){var i=e.findTarget(t.offsetX,t.offsetY);if(i){var r=i.node;if(r.getLayout().isLeafRoot)e._rootToNode(i);else if("zoomToNode"===n)e._zoomToNode(i);else if("link"===n){var o=r.hostTree.data.getItemModel(r.dataIndex),a=o.get("link",!0),s=o.get("target",!0)||"blank";a&&Pc(a,s)}}}}}),this)},e.prototype._renderBreadcrumb=function(t,e,n){var i=this;n||(n=null!=t.get("leafDepth",!0)?{node:t.getViewRoot()}:this.findTarget(e.getWidth()/2,e.getHeight()/2))||(n={node:t.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new cT(this.group))).render(t,e,n.node,(function(e){"animating"!==i._state&&(tT(t.getViewRoot(),e)?i._rootToNode({node:e}):i._zoomToNode({node:e}))}))},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage={nodeGroup:[],background:[],content:[]},this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype._rootToNode=function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype.findTarget=function(t,e){var n;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},(function(i){var r=this._storage.background[i.getRawIndex()];if(r){var o=r.transformCoordToLocal(t,e),a=r.shape;if(!(a.x<=o[0]&&o[0]<=a.x+a.width&&a.y<=o[1]&&o[1]<=a.y+a.height))return!1;n={node:i,offsetX:o[0],offsetY:o[1]}}}),this),n},e.type="treemap",e}(Tf);var ST=P,MT=X,IT=-1,TT=function(){function t(e){var n=e.mappingMethod,i=e.type,r=this.option=w(e);this.type=i,this.mappingMethod=n,this._normalizeData=zT[n];var o=t.visualHandlers[i];this.applyVisual=o.applyVisual,this.getColorMapper=o.getColorMapper,this._normalizedToVisual=o._normalizedToVisual[n],"piecewise"===n?(CT(r),function(t){var e=t.pieceList;t.hasSpecialVisual=!1,P(e,(function(e,n){e.originIndex=n,null!=e.visual&&(t.hasSpecialVisual=!0)}))}(r)):"category"===n?r.categories?function(t){var e=t.categories,n=t.categoryMap={},i=t.visual;if(ST(e,(function(t,e){n[t]=e})),!F(i)){var r=[];X(i)?ST(i,(function(t,e){var i=n[e];r[null!=i?i:IT]=t})):r[-1]=i,i=NT(t,r)}for(var o=e.length-1;o>=0;o--)null==i[o]&&(delete n[e[o]],e.pop())}(r):CT(r,!0):(rt("linear"!==n||r.dataExtent),CT(r))}return t.prototype.mapValueToVisual=function(t){var e=this._normalizeData(t);return this._normalizedToVisual(e,t)},t.prototype.getNormalizer=function(){return V(this._normalizeData,this)},t.listVisualTypes=function(){return E(t.visualHandlers)},t.isValidType=function(e){return t.visualHandlers.hasOwnProperty(e)},t.eachVisual=function(t,e,n){X(t)?P(t,e,n):e.call(n,t)},t.mapVisual=function(e,n,i){var r,o=F(e)?[]:X(e)?{}:(r=!0,null);return t.eachVisual(e,(function(t,e){var a=n.call(i,t,e);r?o=a:o[e]=a})),o},t.retrieveVisuals=function(e){var n,i={};return e&&ST(t.visualHandlers,(function(t,r){e.hasOwnProperty(r)&&(i[r]=e[r],n=!0)})),n?i:null},t.prepareVisualTypes=function(t){if(F(t))t=t.slice();else{if(!MT(t))return[];var e=[];ST(t,(function(t,n){e.push(n)})),t=e}return t.sort((function(t,e){return"color"===e&&"color"!==t&&0===t.indexOf("color")?1:-1})),t},t.dependsOn=function(t,e){return"color"===e?!(!t||0!==t.indexOf(e)):t===e},t.findPieceIndex=function(t,e,n){for(var i,r=1/0,o=0,a=e.length;ou[1]&&(u[1]=l);var h=e.get("colorMappingBy"),c={type:a.name,dataExtent:u,visual:a.range};"color"!==c.type||"index"!==h&&"id"!==h?c.mappingMethod="linear":(c.mappingMethod="category",c.loop=!0);var p=new TT(c);return VT(p).drColorMappingBy=h,p}(0,r,o,0,u,d);P(d,(function(t,e){if(t.depth>=n.length||t===n[t.depth]){var o=function(t,e,n,i,r,o){var a=I({},e);if(r){var s=r.type,l="color"===s&&VT(r).drColorMappingBy,u="index"===l?i:"id"===l?o.mapIdToIndex(n.getId()):n.getValue(t.get("visualDimension"));a[s]=r.mapValueToVisual(u)}return a}(r,u,t,e,f,i);FT(t,o,n,i)}}))}else s=GT(u),h.fill=s}}function GT(t){var e=HT(t,"color");if(e){var n=HT(t,"colorAlpha"),i=HT(t,"colorSaturation");return i&&(e=Ke(e,null,null,i)),n&&(e=$e(e,n)),e}}function HT(t,e){var n=t[e];if(null!=n&&"none"!==n)return n}function WT(t,e){var n=t.get(e);return F(n)&&n.length?{name:e,range:n}:null}var UT=Math.max,XT=Math.min,YT=Q,ZT=P,jT=["itemStyle","borderWidth"],qT=["itemStyle","gapWidth"],KT=["upperLabel","show"],$T=["upperLabel","height"],JT={seriesType:"treemap",reset:function(t,e,n,i){var r=n.getWidth(),o=n.getHeight(),a=t.option,s=Vc(t.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()}),l=a.size||[],u=Zi(YT(s.width,l[0]),r),h=Zi(YT(s.height,l[1]),o),c=i&&i.type,p=JI(i,["treemapZoomToNode","treemapRootToNode"],t),d="treemapRender"===c||"treemapMove"===c?i.rootRect:null,f=t.getViewRoot(),g=QI(f);if("treemapMove"!==c){var y="treemapZoomToNode"===c?function(t,e,n,i,r){var o,a=(e||{}).node,s=[i,r];if(!a||a===n)return s;var l=i*r,u=l*t.option.zoomToNodeRatio;for(;o=a.parentNode;){for(var h=0,c=o.children,p=0,d=c.length;per&&(u=er),a=o}ua[1]&&(a[1]=e)}))):a=[NaN,NaN];return{sum:i,dataExtent:a}}(e,a,s);if(0===u.sum)return t.viewChildren=[];if(u.sum=function(t,e,n,i,r){if(!i)return n;for(var o=t.get("visibleMin"),a=r.length,s=a,l=a-1;l>=0;l--){var u=r["asc"===i?a-l-1:l].getValue();u/n*ei&&(i=a));var l=t.area*t.area,u=e*e*n;return l?UT(u*i/l,l/(u*r)):1/0}function eC(t,e,n,i,r){var o=e===n.width?0:1,a=1-o,s=["x","y"],l=["width","height"],u=n[s[o]],h=e?t.area/e:0;(r||h>n[l[a]])&&(h=n[l[a]]);for(var c=0,p=t.length;ci&&(i=e);var o=i%2?i+2:i+3;r=[];for(var a=0;a0&&(m[0]=-m[0],m[1]=-m[1]);var x=v[0]<0?-1:1;if("start"!==i.__position&&"end"!==i.__position){var b=-Math.atan2(v[1],v[0]);u[0].8?"left":h[0]<-.8?"right":"center",p=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";break;case"start":i.x=-h[0]*f+l[0],i.y=-h[1]*g+l[1],c=h[0]>.8?"right":h[0]<-.8?"left":"center",p=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=f*x+l[0],i.y=l[1]+w,c=v[0]<0?"right":"left",i.originX=-f*x,i.originY=-w;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=_[0],i.y=_[1]+w,c="center",i.originY=-w;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-f*x+u[0],i.y=u[1]+w,c=v[0]>=0?"right":"left",i.originX=f*x,i.originY=-w}i.scaleX=i.scaleY=r,i.setStyle({verticalAlign:i.__verticalAlign||p,align:i.__align||c})}}}function S(t,e){var n=t.__specifiedRotation;if(null==n){var i=a.tangentAt(e);t.attr("rotation",(1===e?-1:1)*Math.PI/2-Math.atan2(i[1],i[0]))}else t.attr("rotation",n)}},e}(Ei),VC=function(){function t(t){this.group=new Ei,this._LineCtor=t||EC}return t.prototype.isPersistent=function(){return!0},t.prototype.updateData=function(t){var e=this,n=this,i=n.group,r=n._lineData;n._lineData=t,r||i.removeAll();var o=BC(t);t.diff(r).add((function(n){e._doAdd(t,n,o)})).update((function(n,i){e._doUpdate(r,t,i,n,o)})).remove((function(t){i.remove(r.getItemGraphicEl(t))})).execute()},t.prototype.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl((function(e,n){e.updateLayout(t,n)}),this)},t.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=BC(t),this._lineData=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(t,e){function n(t){t.isGroup||function(t){return t.animators&&t.animators.length>0}(t)||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}for(var i=t.start;i=0?i+=u:i-=u:f>=0?i-=u:i+=u}return i}function qC(t,e){var n=[],i=Zo,r=[[],[],[]],o=[[],[]],a=[];e/=2,t.eachEdge((function(t,s){var l=t.getLayout(),u=t.getVisual("fromSymbol"),h=t.getVisual("toSymbol");l.__original||(l.__original=[mt(l[0]),mt(l[1])],l[2]&&l.__original.push(mt(l[2])));var c=l.__original;if(null!=l[2]){if(vt(r[0],c[0]),vt(r[1],c[2]),vt(r[2],c[1]),u&&"none"!==u){var p=_C(t.node1),d=jC(r,c[0],p*e);i(r[0][0],r[1][0],r[2][0],d,n),r[0][0]=n[3],r[1][0]=n[4],i(r[0][1],r[1][1],r[2][1],d,n),r[0][1]=n[3],r[1][1]=n[4]}if(h&&"none"!==h){p=_C(t.node2),d=jC(r,c[1],p*e);i(r[0][0],r[1][0],r[2][0],d,n),r[1][0]=n[1],r[2][0]=n[2],i(r[0][1],r[1][1],r[2][1],d,n),r[1][1]=n[1],r[2][1]=n[2]}vt(l[0],r[0]),vt(l[1],r[2]),vt(l[2],r[1])}else{if(vt(o[0],c[0]),vt(o[1],c[1]),wt(a,o[1],o[0]),Dt(a,a),u&&"none"!==u){p=_C(t.node1);bt(o[0],o[0],a,p*e)}if(h&&"none"!==h){p=_C(t.node2);bt(o[1],o[1],a,-p*e)}vt(l[0],o[0]),vt(l[1],o[1])}}))}function KC(t){return"view"===t.type}var $C=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.init=function(t,e){var n=new mw,i=new VC,r=this.group;this._controller=new WM(e.getZr()),this._controllerHost={target:r},r.add(n.group),r.add(i.group),this._symbolDraw=n,this._lineDraw=i,this._firstRender=!0},e.prototype.render=function(t,e,n){var i=this,r=t.coordinateSystem;this._model=t;var o=this._symbolDraw,a=this._lineDraw,s=this.group;if(KC(r)){var l={x:r.x,y:r.y,scaleX:r.scaleX,scaleY:r.scaleY};this._firstRender?s.attr(l):Hu(s,l,t)}qC(t.getGraph(),mC(t));var u=t.getData();o.updateData(u);var h=t.getEdgeData();a.updateData(h),this._updateNodeAndLinkScale(),this._updateController(t,e,n),clearTimeout(this._layoutTimeout);var c=t.forceLayout,p=t.get(["force","layoutAnimation"]);c&&this._startForceLayoutIteration(c,p),u.graph.eachNode((function(t){var e=t.dataIndex,n=t.getGraphicEl(),r=t.getModel();n.off("drag").off("dragend");var o=r.get("draggable");o&&n.on("drag",(function(){c&&(c.warmUp(),!i._layouting&&i._startForceLayoutIteration(c,p),c.setFixed(e),u.setItemLayout(e,[n.x,n.y]))})).on("dragend",(function(){c&&c.setUnfixed(e)})),n.setDraggable(o&&!!c),"adjacency"===r.get(["emphasis","focus"])&&(_s(n).focus=t.getAdjacentDataIndices())})),u.graph.eachEdge((function(t){var e=t.getGraphicEl();"adjacency"===t.getModel().get(["emphasis","focus"])&&(_s(e).focus={edge:[t.dataIndex],node:[t.node1.dataIndex,t.node2.dataIndex]})}));var d="circular"===t.get("layout")&&t.get(["circular","rotateLabel"]),f=u.getLayout("cx"),g=u.getLayout("cy");u.eachItemGraphicEl((function(t,e){var n=u.getItemModel(e).get(["label","rotate"])||0,i=t.getSymbolPath();if(d){var r=u.getItemLayout(e),o=Math.atan2(r[1]-g,r[0]-f);o<0&&(o=2*Math.PI+o);var a=r[0]=0&&t.call(e,n[r],r)},t.prototype.eachEdge=function(t,e){for(var n=this.edges,i=n.length,r=0;r=0&&n[r].node1.dataIndex>=0&&n[r].node2.dataIndex>=0&&t.call(e,n[r],r)},t.prototype.breadthFirstTraverse=function(t,e,n,i){if(e instanceof tD||(e=this._nodesMap[JC(e)]),e){for(var r="out"===n?"outEdges":"in"===n?"inEdges":"edges",o=0;o=0&&n.node2.dataIndex>=0}));for(r=0,o=i.length;r=0&&this[t][e].setItemVisual(this.dataIndex,n,i)},getVisual:function(n){return this[t][e].getItemVisual(this.dataIndex,n)},setLayout:function(n,i){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,n,i)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}}function iD(t,e,n,i,r){for(var o=new QC(i),a=0;a "+p)),u++)}var d,f=n.get("coordinateSystem");if("cartesian2d"===f||"polar"===f)d=F_(t,n);else{var g=Ap.get(f),y=g&&g.dimensions||[];D(y,"value")<0&&y.concat(["value"]);var v=O_(t,{coordDimensions:y});(d=new L_(v,n)).initData(t)}var m=new L_(["value"],n);return m.initData(l,s),r&&r(d,m),HI({mainData:d,struct:o,structAttr:"graph",datas:{node:d,edge:m},datasAttr:{node:"data",edge:"edgeData"}}),o.update(),o}L(tD,nD("hostGraph","data")),L(eD,nD("hostGraph","edgeData"));var rD=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return n(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments);var n=this;function i(){return n._categoriesData}this.legendVisualProvider=new IS(i,i),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(e){t.prototype.mergeDefaultAndTheme.apply(this,arguments),br(e,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,e){var n,i=t.edges||t.links||[],r=t.data||t.nodes||[],o=this;if(r&&i){uC(n=this)&&(n.__curvenessList=[],n.__edgeMap={},hC(n));var a=iD(r,i,this,!0,(function(t,e){t.wrapMethod("getItemModel",(function(t){var e=o._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t}));var n=Oh.prototype.getModel;function i(t,e){var i=n.call(this,t,e);return i.resolveParentPath=r,i}function r(t){if(t&&("label"===t[0]||"label"===t[1])){var e=t.slice();return"label"===t[0]?e[0]="edgeLabel":"label"===t[1]&&(e[1]="edgeLabel"),e}return t}e.wrapMethod("getItemModel",(function(t){return t.resolveParentPath=r,t.getModel=i,t}))}));return P(a.edges,(function(t){!function(t,e,n,i){if(uC(n)){var r=cC(t,e,n),o=n.__edgeMap,a=o[pC(r)];o[r]&&!a?o[r].isForward=!0:a&&o[r]&&(a.isForward=!0,o[r].isForward=!1),o[r]=o[r]||[],o[r].push(i)}}(t.node1,t.node2,this,t.dataIndex)}),this),a.data}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(t,e,n){if("edge"===n){var i=this.getData(),r=this.getDataParams(t,n),o=i.graph.getEdgeByIndex(t),a=i.getName(o.node1.dataIndex),s=i.getName(o.node2.dataIndex),l=[];return null!=a&&l.push(a),null!=s&&l.push(s),tf("nameValue",{name:l.join(" > "),value:r.value,noValue:null==r.value})}return cf({series:this,dataIndex:t,multipleSeries:e})},e.prototype._updateCategoriesData=function(){var t=O(this.option.categories||[],(function(t){return null!=t.value?t:I({value:0},t)})),e=new L_(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray((function(t){return e.getItemModel(t)}))},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return t.prototype.isAnimationEnabled.call(this)&&!("force"===this.get("layout")&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={zlevel:0,z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(ff),oD={type:"graphRoam",event:"graphRoam",update:"none"};var aD=function(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0},sD=function(t){function e(e){var n=t.call(this,e)||this;return n.type="pointer",n}return n(e,t),e.prototype.getDefaultShape=function(){return new aD},e.prototype.buildPath=function(t,e){var n=Math.cos,i=Math.sin,r=e.r,o=e.width,a=e.angle,s=e.x-n(a)*o*(o>=r/3?1:2),l=e.y-i(a)*o*(o>=r/3?1:2);a=e.angle-Math.PI/2,t.moveTo(s,l),t.lineTo(e.x+n(a)*o,e.y+i(a)*o),t.lineTo(e.x+n(e.angle)*r,e.y+i(e.angle)*r),t.lineTo(e.x-n(a)*o,e.y-i(a)*o),t.lineTo(s,l)},e}(Ka);function lD(t,e){var n=null==t?"":t+"";return e&&("string"==typeof e?n=e.replace("{value}",n):"function"==typeof e&&(n=e(t))),n}var uD=2*Math.PI,hD=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){this.group.removeAll();var i=t.get(["axisLine","lineStyle","color"]),r=function(t,e){var n=t.get("center"),i=e.getWidth(),r=e.getHeight(),o=Math.min(i,r);return{cx:Zi(n[0],e.getWidth()),cy:Zi(n[1],e.getHeight()),r:Zi(t.get("radius"),o/2)}}(t,n);this._renderMain(t,e,n,i,r),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,e,n,i,r){for(var o=this.group,a=t.get("clockwise"),s=-t.get("startAngle")/180*Math.PI,l=-t.get("endAngle")/180*Math.PI,u=t.getModel("axisLine"),h=u.get("roundCap")?Jw:Jl,c=u.get("show"),p=u.getModel("lineStyle"),d=p.get("width"),f=(l-s)%uD||l===s?(l-s)%uD:uD,g=s,y=0;c&&y=t&&(0===e?0:i[e-1][0]).8?"bottom":"middle",align:u<-.4?"left":u>.4?"right":"center"},{inheritColor:R}),silent:!0}))}if(m.get("show")&&L!==x){P=(P=m.get("distance"))?P+l:l;for(var N=0;N<=b;N++){u=Math.cos(M),h=Math.sin(M);var z=new uu({shape:{x1:u*(f-P)+p,y1:h*(f-P)+d,x2:u*(f-S-P)+p,y2:h*(f-S-P)+d},silent:!0,style:D});"auto"===D.stroke&&z.setStyle({stroke:i((L+N/b)/x)}),c.add(z),M+=T}M-=T}else M+=I}},e.prototype._renderPointer=function(t,e,n,i,r,o,a,s,l){var u=this.group,h=this._data,c=this._progressEls,p=[],d=t.get(["pointer","show"]),f=t.getModel("progress"),g=f.get("show"),y=t.getData(),v=y.mapDimension("value"),m=+t.get("min"),_=+t.get("max"),x=[m,_],b=[o,a];function w(e,n){var i,o=y.getItemModel(e).getModel("pointer"),a=Zi(o.get("width"),r.r),s=Zi(o.get("length"),r.r),l=t.get(["pointer","icon"]),u=o.get("offsetCenter"),h=Zi(u[0],r.r),c=Zi(u[1],r.r),p=o.get("keepAspect");return(i=l?fy(l,h-a/2,c-s,a,s,null,p):new sD({shape:{angle:-Math.PI/2,width:a,r:s,x:h,y:c}})).rotation=-(n+Math.PI/2),i.x=r.cx,i.y=r.cy,i}function S(t,e){var n=f.get("roundCap")?Jw:Jl,i=f.get("overlap"),a=i?f.get("width"):l/y.count(),u=i?r.r-a:r.r-(t+1)*a,h=i?r.r:r.r-t*a,c=new n({shape:{startAngle:o,endAngle:e,cx:r.cx,cy:r.cy,clockwise:s,r0:u,r:h}});return i&&(c.z2=_-y.get(v,t)%_),c}(g||d)&&(y.diff(h).add((function(e){if(d){var n=w(e,o);Wu(n,{rotation:-(Yi(y.get(v,e),x,b,!0)+Math.PI/2)},t),u.add(n),y.setItemGraphicEl(e,n)}if(g){var i=S(e,o),r=f.get("clip");Wu(i,{shape:{endAngle:Yi(y.get(v,e),x,b,r)}},t),u.add(i),p[e]=i}})).update((function(e,n){if(d){var i=h.getItemGraphicEl(n),r=i?i.rotation:o,a=w(e,r);a.rotation=r,Hu(a,{rotation:-(Yi(y.get(v,e),x,b,!0)+Math.PI/2)},t),u.add(a),y.setItemGraphicEl(e,a)}if(g){var s=c[n],l=S(e,s?s.shape.endAngle:o),m=f.get("clip");Hu(l,{shape:{endAngle:Yi(y.get(v,e),x,b,m)}},t),u.add(l),p[e]=l}})).execute(),y.each((function(t){var e=y.getItemModel(t),n=e.getModel("emphasis");if(d){var r=y.getItemGraphicEl(t),o=y.getItemVisual(t,"style"),a=o.fill;if(r instanceof es){var s=r.style;r.useStyle(I({image:s.image,x:s.x,y:s.y,width:s.width,height:s.height},o))}else r.useStyle(o),"pointer"!==r.type&&r.setColor(a);r.setStyle(e.getModel(["pointer","itemStyle"]).getItemStyle()),"auto"===r.style.fill&&r.setStyle("fill",i(Yi(y.get(v,t),x,[0,1],!0))),r.z2EmphasisLift=0,cl(r,e),sl(r,n.get("focus"),n.get("blurScope"))}if(g){var l=p[t];l.useStyle(y.getItemVisual(t,"style")),l.setStyle(e.getModel(["progress","itemStyle"]).getItemStyle()),l.z2EmphasisLift=0,cl(l,e),sl(l,n.get("focus"),n.get("blurScope"))}})),this._progressEls=p)},e.prototype._renderAnchor=function(t,e){var n=t.getModel("anchor");if(n.get("show")){var i=n.get("size"),r=n.get("icon"),o=n.get("offsetCenter"),a=n.get("keepAspect"),s=fy(r,e.cx-i/2+Zi(o[0],e.r),e.cy-i/2+Zi(o[1],e.r),i,i,null,a);s.z2=n.get("showAbove")?1:0,s.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(s)}},e.prototype._renderTitleAndDetail=function(t,e,n,i,r){var o=this,a=t.getData(),s=a.mapDimension("value"),l=+t.get("min"),u=+t.get("max"),h=new Ei,c=[],p=[],d=t.isAnimationEnabled();a.diff(this._data).add((function(t){c[t]=new cs({silent:!0}),p[t]=new cs({silent:!0})})).update((function(t,e){c[t]=o._titleEls[e],p[t]=o._detailEls[e]})).execute(),a.each((function(e){var n=a.getItemModel(e),o=a.get(s,e),f=new Ei,g=i(Yi(o,[l,u],[0,1],!0)),y=n.getModel("title");if(y.get("show")){var v=y.get("offsetCenter"),m=r.cx+Zi(v[0],r.r),_=r.cy+Zi(v[1],r.r);(C=c[e]).attr({style:ph(y,{x:m,y:_,text:a.getName(e),align:"center",verticalAlign:"middle"},{inheritColor:g})}),f.add(C)}var x=n.getModel("detail");if(x.get("show")){var b=x.get("offsetCenter"),w=r.cx+Zi(b[0],r.r),S=r.cy+Zi(b[1],r.r),M=Zi(x.get("width"),r.r),I=Zi(x.get("height"),r.r),T=t.get(["progress","show"])?a.getItemVisual(e,"style").fill:g,C=p[e],D=x.get("formatter");C.attr({style:ph(x,{x:w,y:S,text:lD(o,D),width:isNaN(M)?null:M,height:isNaN(I)?null:I,align:"center",verticalAlign:"middle"},{inheritColor:T})}),xh(C,{normal:x},o,(function(t){return lD(t,D)})),d&&bh(C,e,a,t,{getFormattedLabel:function(t,e,n,i,r,a){return lD(a?a.interpolatedValue:o,D)}}),f.add(C)}h.add(f)})),this.group.add(h),this._titleEls=c,this._detailEls=p},e.type="gauge",e}(Tf),cD=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.visualStyleAccessPath="itemStyle",n.useColorPaletteOnData=!0,n}return n(e,t),e.prototype.getInitialData=function(t,e){return MS(this,["value"])},e.type="series.gauge",e.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,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12},pointer:{icon:null,offsetCenter:[0,0],show:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(ff);var pD=["itemStyle","opacity"],dD=function(t){function e(e,n){var i=t.call(this)||this,r=i,o=new au,a=new cs;return r.setTextContent(a),i.setTextGuideLine(o),i.updateData(e,n,!0),i}return n(e,t),e.prototype.updateData=function(t,e,n){var i=this,r=t.hostModel,o=t.getItemModel(e),a=t.getItemLayout(e),s=o.getModel("emphasis"),l=o.get(pD);l=null==l?1:l,i.useStyle(t.getItemVisual(e,"style")),i.style.lineJoin="round",n?(i.setShape({points:a.points}),i.style.opacity=0,Wu(i,{style:{opacity:l}},r,e)):Hu(i,{style:{opacity:l},shape:{points:a.points}},r,e),cl(i,o),this._updateLabel(t,e),sl(this,s.get("focus"),s.get("blurScope"))},e.prototype._updateLabel=function(t,e){var n=this,i=this.getTextGuideLine(),r=n.getTextContent(),o=t.hostModel,a=t.getItemModel(e),s=t.getItemLayout(e).label,l=t.getItemVisual(e,"style"),u=l.fill;hh(r,ch(a),{labelFetcher:t.hostModel,labelDataIndex:e,defaultOpacity:l.opacity,defaultText:t.getName(e)},{normal:{align:s.textAlign,verticalAlign:s.verticalAlign}}),n.setTextConfig({local:!0,inside:!!s.inside,insideStroke:u,outsideFill:u});var h=s.linePoints;i.setShape({points:h}),n.textGuideLineConfig={anchor:h?new ai(h[0][0],h[0][1]):null},Hu(r,{style:{x:s.x,y:s.y}},o,e),r.attr({rotation:s.rotation,originX:s.x,originY:s.y,z2:10}),Hg(n,Wg(a),{stroke:u})},e}(ru),fD=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.ignoreLabelLineUpdate=!0,n}return n(e,t),e.prototype.render=function(t,e,n){var i=t.getData(),r=this._data,o=this.group;i.diff(r).add((function(t){var e=new dD(i,t);i.setItemGraphicEl(t,e),o.add(e)})).update((function(t,e){var n=r.getItemGraphicEl(e);n.updateData(i,t),o.add(n),i.setItemGraphicEl(t,n)})).remove((function(e){Yu(r.getItemGraphicEl(e),t,e)})).execute(),this._data=i},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(Tf),gD=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.useColorPaletteOnData=!0,n}return n(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new IS(V(this.getData,this),V(this.getRawData,this)),this._defaultLabelLine(e)},e.prototype.getInitialData=function(t,e){return MS(this,{coordDimensions:["value"],encodeDefaulter:B(up,this)})},e.prototype._defaultLabelLine=function(t){br(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.prototype.getDataParams=function(e){var n=this.getData(),i=t.prototype.getDataParams.call(this,e),r=n.mapDimension("value"),o=n.getSum(r);return i.percent=o?+(n.get(r,e)/o*100).toFixed(2):0,i.$vars.push("percent"),i},e.type="series.funnel",e.defaultOption={zlevel:0,z:2,legendHoverLink:!0,left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(ff);function yD(t,e){t.eachSeriesByType("funnel",(function(t){var n=t.getData(),i=n.mapDimension("value"),r=t.get("sort"),o=function(t,e){return Vc(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e),a=t.get("orient"),s=o.width,l=o.height,u=function(t,e){for(var n=t.mapDimension("value"),i=t.mapArray(n,(function(t){return t})),r=[],o="ascending"===e,a=0,s=t.count();a5)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);"none"!==i.behavior&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!this._mouseDownPoint&&AD(this,"mousemove")){var e=this._model,n=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),i=n.behavior;"jump"===i&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===i?null:{axisExpandWindow:n.axisExpandWindow,animation:"jump"===i?null:{duration:0}})}}};function AD(t,e){var n=t._model;return n.get("axisExpandable")&&n.get("axisExpandTriggerOn")===e}var LD=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.init=function(){t.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(t){var e=this.option;t&&S(e,t,!0),this._initDimensions()},e.prototype.contains=function(t,e){var n=t.get("parallelIndex");return null!=n&&e.getComponent("parallel",n)===this},e.prototype.setAxisExpand=function(t){P(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],(function(e){t.hasOwnProperty(e)&&(this.option[e]=t[e])}),this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],e=this.parallelAxisIndex=[];P(N(this.ecModel.queryComponents({mainType:"parallelAxis"}),(function(t){return(t.get("parallelIndex")||0)===this.componentIndex}),this),(function(n){t.push("dim"+n.get("dim")),e.push(n.componentIndex)}))},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={zlevel:0,z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e}(Xc),kD=function(t){function e(e,n,i,r,o){var a=t.call(this,e,n,i)||this;return a.type=r||"value",a.axisIndex=o,a}return n(e,t),e.prototype.isHorizontal=function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")},e}(hb);function PD(t,e,n,i,r,o){t=t||0;var a=n[1]-n[0];if(null!=r&&(r=RD(r,[0,a])),null!=o&&(o=Math.max(o,null!=r?r:0)),"all"===i){var s=Math.abs(e[1]-e[0]);s=RD(s,[0,a]),r=o=RD(s,[r,o]),i=0}e[0]=RD(e[0],n),e[1]=RD(e[1],n);var l=OD(e,i);e[i]+=t;var u,h=r||0,c=n.slice();return l.sign<0?c[0]+=h:c[1]-=h,e[i]=RD(e[i],c),u=OD(e,i),null!=r&&(u.sign!==l.sign||u.spano&&(e[1-i]=e[i]+u.sign*o),e}function OD(t,e){var n=t[e]-t[1-e];return{span:Math.abs(n),sign:n>0?-1:n<0?1:e?-1:1}}function RD(t,e){return Math.min(null!=e[1]?e[1]:1/0,Math.max(null!=e[0]?e[0]:-1/0,t))}var ND=P,zD=Math.min,ED=Math.max,VD=Math.floor,BD=Math.ceil,FD=ji,GD=Math.PI,HD=function(){function t(t,e,n){this.type="parallel",this._axesMap=ht(),this._axesLayout={},this.dimensions=t.dimensions,this._model=t,this._init(t,e,n)}return t.prototype._init=function(t,e,n){var i=t.dimensions,r=t.parallelAxisIndex;ND(i,(function(t,n){var i=r[n],o=e.getComponent("parallelAxis",i),a=this._axesMap.set(t,new kD(t,Bx(o),[0,0],o.get("type"),i)),s="category"===a.type;a.onBand=s&&o.get("boundaryGap"),a.inverse=o.get("inverse"),o.axis=a,a.model=o,a.coordinateSystem=o.coordinateSystem=this}),this)},t.prototype.update=function(t,e){this._updateAxesFromSeries(this._model,t)},t.prototype.containPoint=function(t){var e=this._makeLayoutInfo(),n=e.axisBase,i=e.layoutBase,r=e.pixelDimIndex,o=t[1-r],a=t[r];return o>=n&&o<=n+e.axisLength&&a>=i&&a<=i+e.layoutLength},t.prototype.getModel=function(){return this._model},t.prototype._updateAxesFromSeries=function(t,e){e.eachSeries((function(n){if(t.contains(n,e)){var i=n.getData();ND(this.dimensions,(function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(i,i.mapDimension(t)),Vx(e.scale,e.model)}),this)}}),this)},t.prototype.resize=function(t,e){this._rect=Vc(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},t.prototype.getRect=function(){return this._rect},t.prototype._makeLayoutInfo=function(){var t,e=this._model,n=this._rect,i=["x","y"],r=["width","height"],o=e.get("layout"),a="horizontal"===o?0:1,s=n[r[a]],l=[0,s],u=this.dimensions.length,h=WD(e.get("axisExpandWidth"),l),c=WD(e.get("axisExpandCount")||0,[0,u]),p=e.get("axisExpandable")&&u>3&&u>c&&c>1&&h>0&&s>0,d=e.get("axisExpandWindow");d?(t=WD(d[1]-d[0],l),d[1]=d[0]+t):(t=WD(h*(c-1),l),(d=[h*(e.get("axisExpandCenter")||VD(u/2))-t/2])[1]=d[0]+t);var f=(s-t)/(u-c);f<3&&(f=0);var g=[VD(FD(d[0]/h,1))+1,BD(FD(d[1]/h,1))-1],y=f/h*d[0];return{layout:o,pixelDimIndex:a,layoutBase:n[i[a]],layoutLength:s,axisBase:n[i[1-a]],axisLength:n[r[1-a]],axisExpandable:p,axisExpandWidth:h,axisCollapseWidth:f,axisExpandWindow:d,axisCount:u,winInnerIndices:g,axisExpandWindow0Pos:y}},t.prototype._layoutAxes=function(){var t=this._rect,e=this._axesMap,n=this.dimensions,i=this._makeLayoutInfo(),r=i.layout;e.each((function(t){var e=[0,i.axisLength],n=t.inverse?1:0;t.setExtent(e[n],e[1-n])})),ND(n,(function(e,n){var o=(i.axisExpandable?XD:UD)(n,i),a={horizontal:{x:o.position,y:i.axisLength},vertical:{x:0,y:o.position}},s={horizontal:GD/2,vertical:0},l=[a[r].x+t.x,a[r].y+t.y],u=s[r],h=[1,0,0,1,0,0];Xn(h,h,u),Un(h,h,l),this._axesLayout[e]={position:l,rotation:u,transform:h,axisNameAvailableWidth:o.axisNameAvailableWidth,axisLabelShow:o.axisLabelShow,nameTruncateMaxWidth:o.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}}),this)},t.prototype.getAxis=function(t){return this._axesMap.get(t)},t.prototype.dataToPoint=function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},t.prototype.eachActiveState=function(t,e,n,i){null==n&&(n=0),null==i&&(i=t.count());var r=this._axesMap,o=this.dimensions,a=[],s=[];P(o,(function(e){a.push(t.mapDimension(e)),s.push(r.get(e).model)}));for(var l=this.hasAxisBrushed(),u=n;ur*(1-h[0])?(l="jump",a=s-r*(1-h[2])):(a=s-r*h[1])>=0&&(a=s-r*(1-h[1]))<=0&&(a=0),(a*=e.axisExpandWidth/u)?PD(a,i,o,"all"):l="none";else{var p=i[1]-i[0];(i=[ED(0,o[1]*s/p-p/2)])[1]=zD(o[1],i[0]+p),i[0]=i[1]-p}return{axisExpandWindow:i,behavior:l}},t}();function WD(t,e){return zD(ED(t,e[0]),e[1])}function UD(t,e){var n=e.layoutLength/(e.axisCount-1);return{position:n*t,axisNameAvailableWidth:n,axisLabelShow:!0}}function XD(t,e){var n,i,r=e.layoutLength,o=e.axisExpandWidth,a=e.axisCount,s=e.axisCollapseWidth,l=e.winInnerIndices,u=s,h=!1;return t=0;n--)qi(e[n])},e.prototype.getActiveState=function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t||isNaN(+t))return"inactive";if(1===e.length){var n=e[0];if(n[0]<=t&&t<=n[1])return"active"}else for(var i=0,r=e.length;i6}(t)||o){if(a&&!o){"single"===s.brushMode&&pA(t);var l=w(s);l.brushType=AA(l.brushType,a),l.panelId=a===jD?null:a.panelId,o=t._creatingCover=rA(t,l),t._covers.push(o)}if(o){var u=PA[AA(t._brushType,a)];o.__brushOption.range=u.getCreatingRange(IA(t,o,t._track)),i&&(oA(t,o),u.updateCommon(t,o)),aA(t,o),r={isEnd:i}}}else i&&"single"===s.brushMode&&s.removeOnClick&&hA(t,e,n)&&pA(t)&&(r={isEnd:i,removeOnClick:!0});return r}function AA(t,e){return"auto"===t?e.defaultBrushType:t}var LA={mousedown:function(t){if(this._dragging)kA(this,t);else if(!t.target||!t.target.draggable){TA(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null,(this._creatingPanel=hA(this,t,e))&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=t.offsetX,n=t.offsetY,i=this.group.transformCoordToLocal(e,n);if(function(t,e,n){if(t._brushType&&!function(t,e,n){var i=t._zr;return e<0||e>i.getWidth()||n<0||n>i.getHeight()}(t,e.offsetX,e.offsetY)){var i=t._zr,r=t._covers,o=hA(t,e,n);if(!t._dragging)for(var a=0;a=0&&(o[r[a].depth]=new Oh(r[a],this,e));if(i&&n)return iD(i,n,this,!0,(function(t,e){t.wrapMethod("getItemModel",(function(t,e){var n=t.parentModel,i=n.getData().getItemLayout(e);if(i){var r=i.depth,o=n.levelModels[r];o&&(t.parentModel=o)}return t})),e.wrapMethod("getItemModel",(function(t,e){var n=t.parentModel,i=n.getGraph().getEdgeByIndex(e).node1.getLayout();if(i){var r=i.depth,o=n.levelModels[r];o&&(t.parentModel=o)}return t}))})).data},e.prototype.setNodePosition=function(t,e){var n=this.option.data[t];n.localX=e[0],n.localY=e[1]},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,e,n){function i(t){return isNaN(t)||null==t}if("edge"===n){var r=this.getDataParams(t,n),o=r.data,a=r.value;return tf("nameValue",{name:o.source+" -- "+o.target,value:a,noValue:i(a)})}var s=this.getGraph().getNodeByIndex(t).getLayout().value,l=this.getDataParams(t,n).data.name;return tf("nameValue",{name:null!=l?l+"":null,value:s,noValue:i(s)})},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(e,n){var i=t.prototype.getDataParams.call(this,e,n);if(null==i.value&&"node"===n){var r=this.getGraph().getNodeByIndex(e).getLayout().value;i.value=r}return i},e.type="series.sankey",e.defaultOption={zlevel:0,z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},e}(ff);function ZA(t,e){t.eachSeriesByType("sankey",(function(t){var n=t.get("nodeWidth"),i=t.get("nodeGap"),r=function(t,e){return Vc(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e);t.layoutInfo=r;var o=r.width,a=r.height,s=t.getGraph(),l=s.nodes,u=s.edges;!function(t){P(t,(function(t){var e=iL(t.outEdges,nL),n=iL(t.inEdges,nL),i=t.getValue()||0,r=Math.max(e,n,i);t.setLayout({value:r},!0)}))}(l),function(t,e,n,i,r,o,a,s,l){(function(t,e,n,i,r,o,a){for(var s=[],l=[],u=[],h=[],c=0,p=0;p=0;v&&y.depth>d&&(d=y.depth),g.setLayout({depth:v?y.depth:c},!0),"vertical"===o?g.setLayout({dy:n},!0):g.setLayout({dx:n},!0);for(var m=0;mc-1?d:c-1;a&&"left"!==a&&function(t,e,n,i){if("right"===e){for(var r=[],o=t,a=0;o.length;){for(var s=0;s0;o--)KA(s,l*=.99,a),qA(s,r,n,i,a),rL(s,l,a),qA(s,r,n,i,a)}(t,e,o,r,i,a,s),function(t,e){var n="vertical"===e?"x":"y";P(t,(function(t){t.outEdges.sort((function(t,e){return t.node2.getLayout()[n]-e.node2.getLayout()[n]})),t.inEdges.sort((function(t,e){return t.node1.getLayout()[n]-e.node1.getLayout()[n]}))})),P(t,(function(t){var e=0,n=0;P(t.outEdges,(function(t){t.setLayout({sy:e},!0),e+=t.getLayout().dy})),P(t.inEdges,(function(t){t.setLayout({ty:n},!0),n+=t.getLayout().dy}))}))}(t,s)}(l,u,n,i,o,a,0!==N(l,(function(t){return 0===t.getLayout().value})).length?0:t.get("layoutIterations"),t.get("orient"),t.get("nodeAlign"))}))}function jA(t){var e=t.hostGraph.data.getRawDataItem(t.dataIndex);return null!=e.depth&&e.depth>=0}function qA(t,e,n,i,r){var o="vertical"===r?"x":"y";P(t,(function(t){var a,s,l;t.sort((function(t,e){return t.getLayout()[o]-e.getLayout()[o]}));for(var u=0,h=t.length,c="vertical"===r?"dx":"dy",p=0;p0&&(a=s.getLayout()[o]+l,"vertical"===r?s.setLayout({x:a},!0):s.setLayout({y:a},!0)),u=s.getLayout()[o]+s.getLayout()[c]+e;if((l=u-e-("vertical"===r?i:n))>0){a=s.getLayout()[o]-l,"vertical"===r?s.setLayout({x:a},!0):s.setLayout({y:a},!0),u=a;for(p=h-2;p>=0;--p)(l=(s=t[p]).getLayout()[o]+s.getLayout()[c]+e-u)>0&&(a=s.getLayout()[o]-l,"vertical"===r?s.setLayout({x:a},!0):s.setLayout({y:a},!0)),u=s.getLayout()[o]}}))}function KA(t,e,n){P(t.slice().reverse(),(function(t){P(t,(function(t){if(t.outEdges.length){var i=iL(t.outEdges,$A,n)/iL(t.outEdges,nL);if(isNaN(i)){var r=t.outEdges.length;i=r?iL(t.outEdges,JA,n)/r:0}if("vertical"===n){var o=t.getLayout().x+(i-eL(t,n))*e;t.setLayout({x:o},!0)}else{var a=t.getLayout().y+(i-eL(t,n))*e;t.setLayout({y:a},!0)}}}))}))}function $A(t,e){return eL(t.node2,e)*t.getValue()}function JA(t,e){return eL(t.node2,e)}function QA(t,e){return eL(t.node1,e)*t.getValue()}function tL(t,e){return eL(t.node1,e)}function eL(t,e){return"vertical"===e?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function nL(t){return t.getValue()}function iL(t,e,n){for(var i=0,r=t.length,o=-1;++oi&&(i=e)})),P(e,(function(e){var r=new TT({type:"color",mappingMethod:"linear",dataExtent:[n,i],visual:t.get("color")}).mapValueToVisual(e.getLayout().value),o=e.getModel().get(["itemStyle","color"]);null!=o?(e.setVisual("color",o),e.setVisual("style",{fill:o})):(e.setVisual("color",r),e.setVisual("style",{fill:r}))}))}}))}var aL=function(){function t(){}return t.prototype.getInitialData=function(t,e){var n,i,r=e.getComponent("xAxis",this.get("xAxisIndex")),o=e.getComponent("yAxis",this.get("yAxisIndex")),a=r.get("type"),s=o.get("type");"category"===a?(t.layout="horizontal",n=r.getOrdinalMeta(),i=!0):"category"===s?(t.layout="vertical",n=o.getOrdinalMeta(),i=!0):t.layout=t.layout||"horizontal";var l=["x","y"],u="horizontal"===t.layout?0:1,h=this._baseAxisDim=l[u],c=l[1-u],p=[r,o],d=p[u].get("type"),f=p[1-u].get("type"),g=t.data;if(g&&i){var y=[];P(g,(function(t,e){var n;F(t)?(n=t.slice(),t.unshift(e)):F(t.value)?(n=t.value.slice(),t.value.unshift(e)):n=t,y.push(n)})),t.data=y}var v=this.defaultValueDimensions,m=[{name:h,type:r_(d),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:c,type:r_(f),dimsDef:v.slice()}];return MS(this,{coordDimensions:m,dimensionsCount:v.length+1,encodeDefaulter:B(lp,m,this)})},t.prototype.getBaseAxis=function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis},t}(),sL=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],n.visualDrawType="stroke",n}return n(e,t),e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},e}(ff);L(sL,aL,!0);var lL=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){var i=t.getData(),r=this.group,o=this._data;this._data||r.removeAll();var a="horizontal"===t.get("layout")?1:0;i.diff(o).add((function(t){if(i.hasValue(t)){var e=cL(i.getItemLayout(t),i,t,a,!0);i.setItemGraphicEl(t,e),r.add(e)}})).update((function(t,e){var n=o.getItemGraphicEl(e);if(i.hasValue(t)){var s=i.getItemLayout(t);n?pL(s,n,i,t):n=cL(s,i,t,a),r.add(n),i.setItemGraphicEl(t,n)}else r.remove(n)})).remove((function(t){var e=o.getItemGraphicEl(t);e&&r.remove(e)})).execute(),this._data=i},e.prototype.remove=function(t){var e=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl((function(t){t&&e.remove(t)}))},e.type="boxplot",e}(Tf),uL=function(){},hL=function(t){function e(e){var n=t.call(this,e)||this;return n.type="boxplotBoxPath",n}return n(e,t),e.prototype.getDefaultShape=function(){return new uL},e.prototype.buildPath=function(t,e){var n=e.points,i=0;for(t.moveTo(n[i][0],n[i][1]),i++;i<4;i++)t.lineTo(n[i][0],n[i][1]);for(t.closePath();ig){var x=[v,_];i.push(x)}}}return{boxData:n,outliers:i}}(e.getRawData(),t.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:i.boxData},{data:i.outliers}]}};var mL=["color","borderColor"],_L=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){this.group.removeClipPath(),this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,e,n){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,e,n,i){this._isLargeDraw?this._incrementalRenderLarge(t,e):this._incrementalRenderNormal(t,e)},e.prototype._updateDrawMode=function(t){var e=t.pipelineContext.large;null!=this._isLargeDraw&&e===this._isLargeDraw||(this._isLargeDraw=e,this._clear())},e.prototype._renderNormal=function(t){var e=t.getData(),n=this._data,i=this.group,r=e.getLayout("isSimpleBox"),o=t.get("clip",!0),a=t.coordinateSystem,s=a.getArea&&a.getArea();this._data||i.removeAll(),e.diff(n).add((function(n){if(e.hasValue(n)){var a=e.getItemLayout(n);if(o&&SL(s,a))return;var l=wL(a,n,!0);Wu(l,{shape:{points:a.ends}},t,n),ML(l,e,n,r),i.add(l),e.setItemGraphicEl(n,l)}})).update((function(a,l){var u=n.getItemGraphicEl(l);if(e.hasValue(a)){var h=e.getItemLayout(a);o&&SL(s,h)?i.remove(u):(u?Hu(u,{shape:{points:h.ends}},t,a):u=wL(h),ML(u,e,a,r),i.add(u),e.setItemGraphicEl(a,u))}else i.remove(u)})).remove((function(t){var e=n.getItemGraphicEl(t);e&&i.remove(e)})).execute(),this._data=e},e.prototype._renderLarge=function(t){this._clear(),DL(t,this.group);var e=t.get("clip",!0)?Rw(t.coordinateSystem,!1,t):null;e?this.group.setClipPath(e):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,e){for(var n,i=e.getData(),r=i.getLayout("isSimpleBox");null!=(n=t.next());){var o=wL(i.getItemLayout(n));ML(o,i,n,r),o.incremental=!0,this.group.add(o)}},e.prototype._incrementalRenderLarge=function(t,e){DL(e,this.group,!0)},e.prototype.remove=function(t){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(Tf),xL=function(){},bL=function(t){function e(e){var n=t.call(this,e)||this;return n.type="normalCandlestickBox",n}return n(e,t),e.prototype.getDefaultShape=function(){return new xL},e.prototype.buildPath=function(t,e){var n=e.points;this.__simpleBox?(t.moveTo(n[4][0],n[4][1]),t.lineTo(n[6][0],n[6][1])):(t.moveTo(n[0][0],n[0][1]),t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]),t.lineTo(n[3][0],n[3][1]),t.closePath(),t.moveTo(n[4][0],n[4][1]),t.lineTo(n[5][0],n[5][1]),t.moveTo(n[6][0],n[6][1]),t.lineTo(n[7][0],n[7][1]))},e}(Ka);function wL(t,e,n){var i=t.ends;return new bL({shape:{points:n?IL(i,t):i},z2:100})}function SL(t,e){for(var n=!0,i=0;i0?"borderColor":"borderColor0"])||n.get(["itemStyle",t>0?"color":"color0"]),o=n.getModel("itemStyle").getItemStyle(mL);e.useStyle(o),e.style.fill=null,e.style.stroke=r}var LL=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],n}return n(e,t),e.prototype.getShadowDim=function(){return"open"},e.prototype.brushSelector=function(t,e,n){var i=e.getItemLayout(t);return i&&n.rect(i.brushRect)},e.type="series.candlestick",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},e}(ff);function kL(t){t&&F(t.series)&&P(t.series,(function(t){X(t)&&"k"===t.type&&(t.type="candlestick")}))}L(LL,aL,!0);var PL=["itemStyle","borderColor"],OL=["itemStyle","borderColor0"],RL=["itemStyle","color"],NL=["itemStyle","color0"],zL={seriesType:"candlestick",plan:Sf(),performRawSeries:!0,reset:function(t,e){function n(t,e){return e.get(t>0?RL:NL)}function i(t,e){return e.get(t>0?PL:OL)}if(!e.isSeriesFiltered(t))return!t.pipelineContext.large&&{progress:function(t,e){for(var r;null!=(r=t.next());){var o=e.getItemModel(r),a=e.getItemLayout(r).sign,s=o.getItemStyle();s.fill=n(a,o),s.stroke=i(a,o)||s.fill,I(e.ensureUniqueItemVisual(r,"style"),s)}}}}},EL="undefined"!=typeof Float32Array?Float32Array:Array,VL={seriesType:"candlestick",plan:Sf(),reset:function(t){var e=t.coordinateSystem,n=t.getData(),i=function(t,e){var n,i=t.getBaseAxis(),r="category"===i.type?i.getBandWidth():(n=i.getExtent(),Math.abs(n[1]-n[0])/e.count()),o=Zi(tt(t.get("barMaxWidth"),r),r),a=Zi(tt(t.get("barMinWidth"),1),r),s=t.get("barWidth");return null!=s?Zi(s,r):Math.max(Math.min(r/2,o),a)}(t,n),r=["x","y"],o=n.mapDimension(r[0]),a=n.mapDimensionsAll(r[1]),s=a[0],l=a[1],u=a[2],h=a[3];if(n.setLayout({candleWidth:i,isSimpleBox:i<=1.3}),!(null==o||a.length<4))return{progress:t.pipelineContext.large?function(t,n){var i,r,a=new EL(4*t.count),c=0,p=[],d=[];for(;null!=(r=t.next());){var f=n.get(o,r),g=n.get(s,r),y=n.get(l,r),v=n.get(u,r),m=n.get(h,r);isNaN(f)||isNaN(v)||isNaN(m)?(a[c++]=NaN,c+=3):(a[c++]=BL(n,r,g,y,l),p[0]=f,p[1]=v,i=e.dataToPoint(p,null,d),a[c++]=i?i[0]:NaN,a[c++]=i?i[1]:NaN,p[1]=m,i=e.dataToPoint(p,null,d),a[c++]=i?i[1]:NaN)}n.setLayout("largePoints",a)}:function(t,n){var r;for(;null!=(r=t.next());){var a=n.get(o,r),c=n.get(s,r),p=n.get(l,r),d=n.get(u,r),f=n.get(h,r),g=Math.min(c,p),y=Math.max(c,p),v=w(g,a),m=w(y,a),_=w(d,a),x=w(f,a),b=[];S(b,m,0),S(b,v,1),b.push(I(x),I(m),I(_),I(v)),n.setItemLayout(r,{sign:BL(n,r,c,p,l),initBaseline:c>p?m[1]:v[1],ends:b,brushRect:M(d,f,a)})}function w(t,n){var i=[];return i[0]=n,i[1]=t,isNaN(n)||isNaN(t)?[NaN,NaN]:e.dataToPoint(i)}function S(t,e,n){var r=e.slice(),o=e.slice();r[0]=Fu(r[0]+i/2,1,!1),o[0]=Fu(o[0]-i/2,1,!0),n?t.push(r,o):t.push(o,r)}function M(t,e,n){var r=w(t,n),o=w(e,n);return r[0]-=i/2,o[0]-=i/2,{x:r[0],y:r[1],width:i,height:o[1]-r[1]}}function I(t){return t[0]=Fu(t[0],1),t}}}}};function BL(t,e,n,i,r){return n>i?-1:n0?t.get(r,e-1)<=i?1:-1:1}function FL(t,e){var n=e.rippleEffectColor||e.color;t.eachChild((function(t){t.attr({z:e.z,zlevel:e.zlevel,style:{stroke:"stroke"===e.brushType?n:null,fill:"fill"===e.brushType?n:null}})}))}var GL=function(t){function e(e,n){var i=t.call(this)||this,r=new dw(e,n),o=new Ei;return i.add(r),i.add(o),i.updateData(e,n),i}return n(e,t),e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var e=t.symbolType,n=t.color,i=this.childAt(1),r=0;r<3;r++){var o=fy(e,-1,-1,2,2,n);o.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var a=-r/3*t.period+t.effectOffset;o.animate("",!0).when(t.period,{scaleX:t.rippleScale/2,scaleY:t.rippleScale/2}).delay(a).start(),o.animateStyle(!0).when(t.period,{opacity:0}).delay(a).start(),i.add(o)}FL(i,t)},e.prototype.updateEffectAnimation=function(t){for(var e=this._effectCfg,n=this.childAt(1),i=["symbolType","period","rippleScale"],r=0;r0&&(a=this._getLineLength(i)/l*1e3),(a!==this._period||s!==this._loop)&&(i.stopAnimation(),a>0)){var h=void 0;h="function"==typeof u?u(n):u,i.__t>0&&(h=-a*i.__t),i.__t=0;var c=i.animate("",s).when(a,{__t:1}).delay(h).during((function(){r._updateSymbolPosition(i)}));s||c.done((function(){r.remove(i)})),c.start()}this._period=a,this._loop=s}},e.prototype._getLineLength=function(t){return Lt(t.__p1,t.__cp1)+Lt(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,e){t.__p1=e[0],t.__p2=e[1],t.__cp1=e[2]||[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]},e.prototype.updateData=function(t,e,n){this.childAt(0).updateData(t,e,n),this._updateEffectSymbol(t,e)},e.prototype._updateSymbolPosition=function(t){var e=t.__p1,n=t.__p2,i=t.__cp1,r=t.__t,o=[t.x,t.y],a=o.slice(),s=Uo,l=Xo;o[0]=s(e[0],i[0],n[0],r),o[1]=s(e[1],i[1],n[1],r);var u=l(e[0],i[0],n[0],r),h=l(e[1],i[1],n[1],r);t.rotation=-Math.atan2(h,u)-Math.PI/2,"line"!==this._symbolType&&"rect"!==this._symbolType&&"roundRect"!==this._symbolType||(void 0!==t.__lastT&&t.__lastT=0&&!(i[o]<=e);o--);o=Math.min(o,r-2)}else{for(o=a;oe);o++);o=Math.min(o-1,r-2)}var s=(e-i[o])/(i[o+1]-i[o]),l=n[o],u=n[o+1];t.x=l[0]*(1-s)+s*u[0],t.y=l[1]*(1-s)+s*u[1];var h=u[0]-l[0],c=u[1]-l[1];t.rotation=-Math.atan2(c,h)-Math.PI/2,this._lastFrame=o,this._lastFramePercent=e,t.ignore=!1}},e}(UL),ZL=function(){this.polyline=!1,this.curveness=0,this.segs=[]},jL=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new ZL},e.prototype.buildPath=function(t,e){var n=e.segs,i=e.curveness;if(e.polyline)for(var r=0;r0){t.moveTo(n[r++],n[r++]);for(var a=1;a0){var c=(s+u)/2-(l-h)*i,p=(l+h)/2-(u-s)*i;t.quadraticCurveTo(c,p,u,h)}else t.lineTo(u,h)}},e.prototype.findDataIndex=function(t,e){var n=this.shape,i=n.segs,r=n.curveness,o=this.style.lineWidth;if(n.polyline)for(var a=0,s=0;s0)for(var u=i[s++],h=i[s++],c=1;c0){if(Oa(u,h,(u+p)/2-(h-d)*r,(h+d)/2-(p-u)*r,p,d,o,t,e))return a}else if(ka(u,h,p,d,o,t,e))return a;a++}return-1},e}(Ka),qL=function(){function t(){this.group=new Ei}return t.prototype.isPersistent=function(){return!this._incremental},t.prototype.updateData=function(t){this.group.removeAll();var e=new jL({rectHover:!0,cursor:"default"});e.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(e,t),this.group.add(e),this._incremental=null},t.prototype.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>5e5?(this._incremental||(this._incremental=new Tu({silent:!0})),this.group.add(this._incremental)):this._incremental=null},t.prototype.incrementalUpdate=function(t,e){var n=new jL;n.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(n,e,!!this._incremental),this._incremental?this._incremental.addDisplayable(n,!0):(n.rectHover=!0,n.cursor="default",n.__startIndex=t.start,this.group.add(n))},t.prototype.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},t.prototype._setCommon=function(t,e,n){var i=e.hostModel;t.setShape({polyline:i.get("polyline"),curveness:i.get(["lineStyle","curveness"])}),t.useStyle(i.getModel("lineStyle").getLineStyle()),t.style.strokeNoScale=!0;var r=e.getVisual("style");if(r&&r.stroke&&t.setStyle("stroke",r.stroke),t.setStyle("fill",null),!n){var o=_s(t);o.seriesIndex=i.seriesIndex,t.on("mousemove",(function(e){o.dataIndex=null;var n=t.findDataIndex(e.offsetX,e.offsetY);n>0&&(o.dataIndex=n+t.__startIndex)}))}},t.prototype._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()},t}(),KL={seriesType:"lines",plan:Sf(),reset:function(t){var e=t.coordinateSystem,n=t.get("polyline"),i=t.pipelineContext.large;return{progress:function(r,o){var a=[];if(i){var s=void 0,l=r.end-r.start;if(n){for(var u=0,h=r.start;h ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?2e4:this.get("progressiveThreshold"):t},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",zlevel:0,z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e}(ff);function nk(t){return t instanceof Array||(t=[t,t]),t}var ik={seriesType:"lines",reset:function(t){var e=nk(t.get("symbol")),n=nk(t.get("symbolSize")),i=t.getData();return i.setVisual("fromSymbol",e&&e[0]),i.setVisual("toSymbol",e&&e[1]),i.setVisual("fromSymbolSize",n&&n[0]),i.setVisual("toSymbolSize",n&&n[1]),{dataEach:i.hasItemOption?function(t,e){var n=t.getItemModel(e),i=nk(n.getShallow("symbol",!0)),r=nk(n.getShallow("symbolSize",!0));i[0]&&t.setItemVisual(e,"fromSymbol",i[0]),i[1]&&t.setItemVisual(e,"toSymbol",i[1]),r[0]&&t.setItemVisual(e,"fromSymbolSize",r[0]),r[1]&&t.setItemVisual(e,"toSymbolSize",r[1])}:null}}};var rk=function(){function t(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var t=C();this.canvas=t}return t.prototype.update=function(t,e,n,i,r,o){var a=this._getBrush(),s=this._getGradient(r,"inRange"),l=this._getGradient(r,"outOfRange"),u=this.pointSize+this.blurSize,h=this.canvas,c=h.getContext("2d"),p=t.length;h.width=e,h.height=n;for(var d=0;d0){var I=o(v)?s:l;v>0&&(v=v*S+w),_[x++]=I[M],_[x++]=I[M+1],_[x++]=I[M+2],_[x++]=I[M+3]*v*256}else x+=4}return c.putImageData(m,0,0),h},t.prototype._getBrush=function(){var t=this._brushCanvas||(this._brushCanvas=C()),e=this.pointSize+this.blurSize,n=2*e;t.width=n,t.height=n;var i=t.getContext("2d");return i.clearRect(0,0,n,n),i.shadowOffsetX=n,i.shadowBlur=this.blurSize,i.shadowColor="#000",i.beginPath(),i.arc(-e,e,this.pointSize,0,2*Math.PI,!0),i.closePath(),i.fill(),t},t.prototype._getGradient=function(t,e){for(var n=this._gradientPixels,i=n[e]||(n[e]=new Uint8ClampedArray(1024)),r=[0,0,0,0],o=0,a=0;a<256;a++)t[e](a/255,!0,r),i[o++]=r[0],i[o++]=r[1],i[o++]=r[2],i[o++]=r[3];return i},t}();function ok(t){var e=t.dimensions;return"lng"===e[0]&&"lat"===e[1]}var ak=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){var i;e.eachComponent("visualMap",(function(e){e.eachTargetSeries((function(n){n===t&&(i=e)}))})),this.group.removeAll(),this._incrementalDisplayable=null;var r=t.coordinateSystem;"cartesian2d"===r.type||"calendar"===r.type?this._renderOnCartesianAndCalendar(t,n,0,t.getData().count()):ok(r)&&this._renderOnGeo(r,t,i,n)},e.prototype.incrementalPrepareRender=function(t,e,n){this.group.removeAll()},e.prototype.incrementalRender=function(t,e,n,i){var r=e.coordinateSystem;r&&(ok(r)?this.render(e,n,i):this._renderOnCartesianAndCalendar(e,i,t.start,t.end,!0))},e.prototype._renderOnCartesianAndCalendar=function(t,e,n,i,r){var o,a,s,l,u=t.coordinateSystem;if(Nw(u,"cartesian2d")){var h=u.getAxis("x"),c=u.getAxis("y");0,o=h.getBandWidth(),a=c.getBandWidth(),s=h.scale.getExtent(),l=c.scale.getExtent()}for(var p=this.group,d=t.getData(),f=t.getModel(["emphasis","itemStyle"]).getItemStyle(),g=t.getModel(["blur","itemStyle"]).getItemStyle(),y=t.getModel(["select","itemStyle"]).getItemStyle(),v=ch(t),m=t.get(["emphasis","focus"]),_=t.get(["emphasis","blurScope"]),x=Nw(u,"cartesian2d")?[d.mapDimension("x"),d.mapDimension("y"),d.mapDimension("value")]:[d.mapDimension("time"),d.mapDimension("value")],b=n;bs[1]||Il[1])continue;var T=u.dataToPoint([M,I]);w=new ls({shape:{x:Math.floor(Math.round(T[0])-o/2),y:Math.floor(Math.round(T[1])-a/2),width:Math.ceil(o),height:Math.ceil(a)},style:S})}else{if(isNaN(d.get(x[1],b)))continue;w=new ls({z2:1,shape:u.dataToRect([d.get(x[0],b)]).contentShape,style:S})}var C=d.getItemModel(b);if(d.hasItemOption){var D=C.getModel("emphasis");f=D.getModel("itemStyle").getItemStyle(),g=C.getModel(["blur","itemStyle"]).getItemStyle(),y=C.getModel(["select","itemStyle"]).getItemStyle(),m=D.get("focus"),_=D.get("blurScope"),v=ch(C)}var A=t.getRawValue(b),L="-";A&&null!=A[2]&&(L=A[2]+""),hh(w,v,{labelFetcher:t,labelDataIndex:b,defaultOpacity:S.opacity,defaultText:L}),w.ensureState("emphasis").style=f,w.ensureState("blur").style=g,w.ensureState("select").style=y,sl(w,m,_),w.incremental=r,r&&(w.states.emphasis.hoverLayer=!0),p.add(w),d.setItemGraphicEl(b,w)}},e.prototype._renderOnGeo=function(t,e,n,i){var r=n.targetVisuals.inRange,o=n.targetVisuals.outOfRange,a=e.getData(),s=this._hmLayer||this._hmLayer||new rk;s.blurSize=e.get("blurSize"),s.pointSize=e.get("pointSize"),s.minOpacity=e.get("minOpacity"),s.maxOpacity=e.get("maxOpacity");var l=t.getViewRect().clone(),u=t.getRoamTransform();l.applyTransform(u);var h=Math.max(l.x,0),c=Math.max(l.y,0),p=Math.min(l.width+l.x,i.getWidth()),d=Math.min(l.height+l.y,i.getHeight()),f=p-h,g=d-c,y=[a.mapDimension("lng"),a.mapDimension("lat"),a.mapDimension("value")],v=a.mapArray(y,(function(e,n,i){var r=t.dataToPoint([e,n]);return r[0]-=h,r[1]-=c,r.push(i),r})),m=n.getExtent(),_="visualMap.continuous"===n.type?function(t,e){var n=t[1]-t[0];return e=[(e[0]-t[0])/n,(e[1]-t[0])/n],function(t){return t>=e[0]&&t<=e[1]}}(m,n.option.range):function(t,e,n){var i=t[1]-t[0],r=(e=O(e,(function(e){return{interval:[(e.interval[0]-t[0])/i,(e.interval[1]-t[0])/i]}}))).length,o=0;return function(t){var i;for(i=o;i=0;i--){var a;if((a=e[i].interval)[0]<=t&&t<=a[1]){o=i;break}}return i>=0&&i0?1:o<0?-1:0}(n,o,r,i,c),function(t,e,n,i,r,o,a,s,l,u){var h,c=l.valueDim,p=l.categoryDim,d=Math.abs(n[p.wh]),f=t.getItemVisual(e,"symbolSize");h=F(f)?f.slice():null==f?["100%","100%"]:[f,f];h[p.index]=Zi(h[p.index],d),h[c.index]=Zi(h[c.index],i?d:Math.abs(o)),u.symbolSize=h,(u.symbolScale=[h[0]/s,h[1]/s])[c.index]*=(l.isHorizontal?-1:1)*a}(t,e,r,o,0,c.boundingLength,c.pxSign,u,i,c),function(t,e,n,i,r){var o=t.get(lk)||0;o&&(hk.attr({scaleX:e[0],scaleY:e[1],rotation:n}),hk.updateTransform(),o/=hk.getLineScale(),o*=e[i.valueDim.index]);r.valueLineWidth=o}(n,c.symbolScale,l,i,c);var p=c.symbolSize,d=n.get("symbolOffset");return F(d)&&(d=[Zi(d[0],p[0]),Zi(d[1],p[1])]),function(t,e,n,i,r,o,a,s,l,u,h,c){var p=h.categoryDim,d=h.valueDim,f=c.pxSign,g=Math.max(e[d.index]+s,0),y=g;if(i){var v=Math.abs(l),m=Q(t.get("symbolMargin"),"15%")+"",_=!1;m.lastIndexOf("!")===m.length-1&&(_=!0,m=m.slice(0,m.length-1));var x=Zi(m,e[d.index]),b=Math.max(g+2*x,0),w=_?0:2*x,S=pr(i),M=S?i:Dk((v+w)/b);b=g+2*(x=(v-M*g)/2/(_?M:M-1)),w=_?0:2*x,S||"fixed"===i||(M=u?Dk((Math.abs(u)+w)/b):0),y=M*b-w,c.repeatTimes=M,c.symbolMargin=x}var T=f*(y/2),C=c.pathPosition=[];C[p.index]=n[p.wh]/2,C[d.index]="start"===a?T:"end"===a?l-T:l/2,o&&(C[0]+=o[0],C[1]+=o[1]);var D=c.bundlePosition=[];D[p.index]=n[p.xy],D[d.index]=n[d.xy];var A=c.barRectShape=I({},n);A[d.wh]=f*Math.max(Math.abs(n[d.wh]),Math.abs(C[d.index]+T)),A[p.wh]=n[p.wh];var L=c.clipShape={};L[p.xy]=-n[p.xy],L[p.wh]=h.ecSize[p.wh],L[d.xy]=0,L[d.wh]=n[d.wh]}(n,p,r,o,0,d,s,c.valueLineWidth,c.boundingLength,c.repeatCutLength,i,c),c}function dk(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function fk(t){var e=t.symbolPatternSize,n=fy(t.symbolType,-e/2,-e/2,e,e);return n.attr({culling:!0}),"image"!==n.type&&n.setStyle({strokeNoScale:!0}),n}function gk(t,e,n,i){var r=t.__pictorialBundle,o=n.symbolSize,a=n.valueLineWidth,s=n.pathPosition,l=e.valueDim,u=n.repeatTimes||0,h=0,c=o[e.valueDim.index]+a+2*n.symbolMargin;for(Ik(t,(function(t){t.__pictorialAnimationIndex=h,t.__pictorialRepeatTimes=u,h0:i<0)&&(r=u-1-t),e[l.index]=c*(r-u/2+.5)+s[l.index],{x:e[0],y:e[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation}}}function yk(t,e,n,i){var r=t.__pictorialBundle,o=t.__pictorialMainPath;o?Tk(o,null,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation},n,i):(o=t.__pictorialMainPath=fk(n),r.add(o),Tk(o,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:0,scaleY:0,rotation:n.rotation},{scaleX:n.symbolScale[0],scaleY:n.symbolScale[1]},n,i))}function vk(t,e,n){var i=I({},e.barRectShape),r=t.__pictorialBarRect;r?Tk(r,null,{shape:i},e,n):(r=t.__pictorialBarRect=new ls({z2:2,shape:i,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),t.add(r))}function mk(t,e,n,i){if(n.symbolClip){var r=t.__pictorialClipPath,o=I({},n.clipShape),a=e.valueDim,s=n.animationModel,l=n.dataIndex;if(r)Hu(r,{shape:o},s,l);else{o[a.wh]=0,r=new ls({shape:o}),t.__pictorialBundle.setClipPath(r),t.__pictorialClipPath=r;var u={};u[a.wh]=n.clipShape[a.wh],ah[i?"updateProps":"initProps"](r,{shape:u},s,l)}}}function _k(t,e){var n=t.getItemModel(e);return n.getAnimationDelayParams=xk,n.isAnimationEnabled=bk,n}function xk(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function bk(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function wk(t,e,n,i){var r=new Ei,o=new Ei;return r.add(o),r.__pictorialBundle=o,o.x=n.bundlePosition[0],o.y=n.bundlePosition[1],n.symbolRepeat?gk(r,e,n):yk(r,0,n),vk(r,n,i),mk(r,e,n,i),r.__pictorialShapeStr=Mk(t,n),r.__pictorialSymbolMeta=n,r}function Sk(t,e,n,i){var r=i.__pictorialBarRect;r&&r.removeTextContent();var o=[];Ik(i,(function(t){o.push(t)})),i.__pictorialMainPath&&o.push(i.__pictorialMainPath),i.__pictorialClipPath&&(n=null),P(o,(function(t){Uu(t,{scaleX:0,scaleY:0},n,e,(function(){i.parent&&i.parent.remove(i)}))})),t.setItemGraphicEl(e,null)}function Mk(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function Ik(t,e,n){P(t.__pictorialBundle.children(),(function(i){i!==t.__pictorialBarRect&&e.call(n,i)}))}function Tk(t,e,n,i,r,o){e&&t.attr(e),i.symbolClip&&!r?n&&t.attr(n):n&&ah[r?"updateProps":"initProps"](t,n,i.animationModel,i.dataIndex,o)}function Ck(t,e,n){var i=n.dataIndex,r=n.itemModel,o=r.getModel("emphasis"),a=o.getModel("itemStyle").getItemStyle(),s=r.getModel(["blur","itemStyle"]).getItemStyle(),l=r.getModel(["select","itemStyle"]).getItemStyle(),u=r.getShallow("cursor"),h=o.get("focus"),c=o.get("blurScope"),p=o.get("scale");Ik(t,(function(t){if(t instanceof es){var e=t.style;t.useStyle(I({image:e.image,x:e.x,y:e.y,width:e.width,height:e.height},n.style))}else t.useStyle(n.style);var i=t.ensureState("emphasis");i.style=a,p&&(i.scaleX=1.1*t.scaleX,i.scaleY=1.1*t.scaleY),t.ensureState("blur").style=s,t.ensureState("select").style=l,u&&(t.cursor=u),t.z2=n.z2}));var d=e.valueDim.posDesc[+(n.boundingLength>0)];hh(t.__pictorialBarRect,ch(r),{labelFetcher:e.seriesModel,labelDataIndex:i,defaultText:cw(e.seriesModel.getData(),i),inheritColor:n.style.fill,defaultOpacity:n.style.opacity,defaultOutsidePosition:d}),sl(t,h,c)}function Dk(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}var Ak=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n.defaultSymbol="roundRect",n}return n(e,t),e.prototype.getInitialData=function(e){return e.stack=null,t.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=zh(qw.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),e}(qw);var Lk=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._layers=[],n}return n(e,t),e.prototype.render=function(t,e,n){var i=t.getData(),r=this,o=this.group,a=t.getLayerSeries(),s=i.getLayout("layoutInfo"),l=s.rect,u=s.boundaryGap;function h(t){return t.name}o.x=0,o.y=l.y+u[0];var c=new n_(this._layersSeries||[],a,h,h),p=[];function d(e,n,s){var l=r._layers;if("remove"!==e){for(var u,h,c=[],d=[],f=a[n].indices,g=0;go&&(o=s),i.push(s)}for(var u=0;uo&&(o=c)}return{y0:r,max:o}}(l),h=u.y0,c=n/u.max,p=o.length,d=o[0].indices.length,f=0;fMath.PI/2?"right":"left"):w&&"center"!==w?"left"===w?(v=r.r0+b,a>Math.PI/2&&(w="right")):"right"===w&&(v=r.r-b,a>Math.PI/2&&(w="left")):(v=(r.r+r.r0)/2,w="center"),d.style.align=w,d.style.verticalAlign=f(o,"verticalAlign")||"middle",d.x=v*s+r.cx,d.y=v*l+r.cy;var S=f(o,"rotate"),M=0;"radial"===S?(M=-a)<-Math.PI/2&&(M+=Math.PI):"tangential"===S?(M=Math.PI/2-a)>Math.PI/2?M-=Math.PI:M<-Math.PI/2&&(M+=Math.PI):"number"==typeof S&&(M=S*Math.PI/180),d.rotation=M})),h.dirtyStyle()},e}(Jl),Nk="sunburstRootToNode",zk="sunburstHighlight";var Ek=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n,i){var r=this;this.seriesModel=t,this.api=n,this.ecModel=e;var o=t.getData(),a=o.tree.root,s=t.getViewRoot(),l=this.group,u=t.get("renderLabelForZeroData"),h=[];s.eachNode((function(t){h.push(t)}));var c=this._oldChildren||[];!function(i,r){if(0===i.length&&0===r.length)return;function s(t){return t.getId()}function h(s,h){!function(i,r){u||!i||i.getValue()||(i=null);if(i!==a&&r!==a)if(r&&r.piece)i?(r.piece.updateData(!1,i,t,e,n),o.setItemGraphicEl(i.dataIndex,r.piece)):function(t){if(!t)return;t.piece&&(l.remove(t.piece),t.piece=null)}(r);else if(i){var s=new Rk(i,t,e,n);l.add(s),o.setItemGraphicEl(i.dataIndex,s)}}(null==s?null:i[s],null==h?null:r[h])}new n_(r,i,s,s).add(h).update(h).remove(B(h,null)).execute()}(h,c),function(i,o){o.depth>0?(r.virtualPiece?r.virtualPiece.updateData(!1,i,t,e,n):(r.virtualPiece=new Rk(i,t,e,n),l.add(r.virtualPiece)),o.piece.off("click"),r.virtualPiece.on("click",(function(t){r._rootToNode(o.parentNode)}))):r.virtualPiece&&(l.remove(r.virtualPiece),r.virtualPiece=null)}(a,s),this._initEvents(),this._oldChildren=h},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",(function(e){var n=!1;t.seriesModel.getViewRoot().eachNode((function(i){if(!n&&i.piece&&i.piece===e.target){var r=i.getModel().get("nodeClick");if("rootToNode"===r)t._rootToNode(i);else if("link"===r){var o=i.getModel(),a=o.get("link");if(a)Pc(a,o.get("target",!0)||"_blank")}n=!0}}))}))},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:Nk,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,e){var n=e.getData().getItemLayout(0);if(n){var i=t[0]-n.cx,r=t[1]-n.cy,o=Math.sqrt(i*i+r*r);return o<=n.r&&o>=n.r0}},e.type="sunburst",e}(Tf),Vk=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.ignoreStyleOnData=!0,n}return n(e,t),e.prototype.getInitialData=function(t,e){var n={name:t.name,children:t.data};Bk(n);var i=O(t.levels||[],(function(t){return new Oh(t,this,e)}),this),r=$I.createTree(n,this,(function(t){t.wrapMethod("getItemModel",(function(t,e){var n=r.getNodeByDataIndex(e),o=i[n.depth];return o&&(t.parentModel=o),t}))}));return r.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return n.treePathInfo=eT(i,this),n},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)},e.prototype.enableAriaDecal=function(){lT(this)},e.type="series.sunburst",e.defaultOption={zlevel:0,z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],levels:[],sort:"desc"},e}(ff);function Bk(t){var e=0;P(t.children,(function(t){Bk(t);var n=t.value;F(n)&&(n=n[0]),e+=n}));var n=t.value;F(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=e),n<0&&(n=0),F(t.value)?t.value[0]=n:t.value=n}var Fk=Math.PI/180;function Gk(t,e,n){e.eachSeriesByType(t,(function(t){var e=t.get("center"),i=t.get("radius");F(i)||(i=[0,i]),F(e)||(e=[e,e]);var r=n.getWidth(),o=n.getHeight(),a=Math.min(r,o),s=Zi(e[0],r),l=Zi(e[1],o),u=Zi(i[0],a/2),h=Zi(i[1],a/2),c=-t.get("startAngle")*Fk,p=t.get("minAngle")*Fk,d=t.getData().tree.root,f=t.getViewRoot(),g=f.depth,y=t.get("sort");null!=y&&Hk(f,y);var v=0;P(f.children,(function(t){!isNaN(t.getValue())&&v++}));var m=f.getValue(),_=Math.PI/(m||v)*2,x=f.depth>0,b=f.height-(x?-1:1),w=(h-u)/(b||1),S=t.get("clockwise"),M=t.get("stillShowZeroSum"),I=S?1:-1,T=function(t,e){if(t){var n=e;if(t!==d){var i=t.getValue(),r=0===m&&M?_:i*_;r1;)r=r.parentNode;var o=n.getColorFromPalette(r.name||r.dataIndex+"",e);return t.depth>1&&"string"==typeof o&&(o=Ue(o,(t.depth-1)/(i-1)*.5)),o}(r,t,i.root.height)),I(n.ensureUniqueItemVisual(r.dataIndex,"style"),o)}))}))}function Uk(t,e){return e=e||[0,0],O(["x","y"],(function(n,i){var r=this.getAxis(n),o=e[i],a=t[i]/2;return"category"===r.type?r.getBandWidth():Math.abs(r.dataToCoord(o-a)-r.dataToCoord(o+a))}),this)}function Xk(t,e){return e=e||[0,0],O([0,1],(function(n){var i=e[n],r=t[n]/2,o=[],a=[];return o[n]=i-r,a[n]=i+r,o[1-n]=a[1-n]=e[1-n],Math.abs(this.dataToPoint(o)[n]-this.dataToPoint(a)[n])}),this)}function Yk(t,e){var n=this.getAxis(),i=e instanceof Array?e[0]:e,r=(t instanceof Array?t[0]:t)/2;return"category"===n.type?n.getBandWidth():Math.abs(n.dataToCoord(i-r)-n.dataToCoord(i+r))}function Zk(t,e){return e=e||[0,0],O(["Radius","Angle"],(function(n,i){var r=this["get"+n+"Axis"](),o=e[i],a=t[i]/2,s="category"===r.type?r.getBandWidth():Math.abs(r.dataToCoord(o-a)-r.dataToCoord(o+a));return"Angle"===n&&(s=s*Math.PI/180),s}),this)}function jk(t,e,n,i){return t&&(t.legacy||!1!==t.legacy&&!n&&!i&&"tspan"!==e&&("text"===e||dt(t,"text")))}function qk(t,e,n){var i,r,o,a=t;if("text"===e)o=a;else{o={},dt(a,"text")&&(o.text=a.text),dt(a,"rich")&&(o.rich=a.rich),dt(a,"textFill")&&(o.fill=a.textFill),dt(a,"textStroke")&&(o.stroke=a.textStroke),r={type:"text",style:o,silent:!0},i={};var s=dt(a,"textPosition");n?i.position=s?a.textPosition:"inside":s&&(i.position=a.textPosition),dt(a,"textPosition")&&(i.position=a.textPosition),dt(a,"textOffset")&&(i.offset=a.textOffset),dt(a,"textRotation")&&(i.rotation=a.textRotation),dt(a,"textDistance")&&(i.distance=a.textDistance)}return Kk(o,t),P(o.rich,(function(t){Kk(t,t)})),{textConfig:i,textContent:r}}function Kk(t,e){e&&(e.font=e.textFont||e.font,dt(e,"textStrokeWidth")&&(t.lineWidth=e.textStrokeWidth),dt(e,"textAlign")&&(t.align=e.textAlign),dt(e,"textVerticalAlign")&&(t.verticalAlign=e.textVerticalAlign),dt(e,"textLineHeight")&&(t.lineHeight=e.textLineHeight),dt(e,"textWidth")&&(t.width=e.textWidth),dt(e,"textHeight")&&(t.height=e.textHeight),dt(e,"textBackgroundColor")&&(t.backgroundColor=e.textBackgroundColor),dt(e,"textPadding")&&(t.padding=e.textPadding),dt(e,"textBorderColor")&&(t.borderColor=e.textBorderColor),dt(e,"textBorderWidth")&&(t.borderWidth=e.textBorderWidth),dt(e,"textBorderRadius")&&(t.borderRadius=e.textBorderRadius),dt(e,"textBoxShadowColor")&&(t.shadowColor=e.textBoxShadowColor),dt(e,"textBoxShadowBlur")&&(t.shadowBlur=e.textBoxShadowBlur),dt(e,"textBoxShadowOffsetX")&&(t.shadowOffsetX=e.textBoxShadowOffsetX),dt(e,"textBoxShadowOffsetY")&&(t.shadowOffsetY=e.textBoxShadowOffsetY))}function $k(t,e,n){var i=t;i.textPosition=i.textPosition||n.position||"inside",null!=n.offset&&(i.textOffset=n.offset),null!=n.rotation&&(i.textRotation=n.rotation),null!=n.distance&&(i.textDistance=n.distance);var r=i.textPosition.indexOf("inside")>=0,o=t.fill||"#000";Jk(i,e);var a=null==i.textFill;return r?a&&(i.textFill=n.insideFill||"#fff",!i.textStroke&&n.insideStroke&&(i.textStroke=n.insideStroke),!i.textStroke&&(i.textStroke=o),null==i.textStrokeWidth&&(i.textStrokeWidth=2)):(a&&(i.textFill=t.fill||n.outsideFill||"#000"),!i.textStroke&&n.outsideStroke&&(i.textStroke=n.outsideStroke)),i.text=e.text,i.rich=e.rich,P(e.rich,(function(t){Jk(t,t)})),i}function Jk(t,e){e&&(dt(e,"fill")&&(t.textFill=e.fill),dt(e,"stroke")&&(t.textStroke=e.fill),dt(e,"lineWidth")&&(t.textStrokeWidth=e.lineWidth),dt(e,"font")&&(t.font=e.font),dt(e,"fontStyle")&&(t.fontStyle=e.fontStyle),dt(e,"fontWeight")&&(t.fontWeight=e.fontWeight),dt(e,"fontSize")&&(t.fontSize=e.fontSize),dt(e,"fontFamily")&&(t.fontFamily=e.fontFamily),dt(e,"align")&&(t.textAlign=e.align),dt(e,"verticalAlign")&&(t.textVerticalAlign=e.verticalAlign),dt(e,"lineHeight")&&(t.textLineHeight=e.lineHeight),dt(e,"width")&&(t.textWidth=e.width),dt(e,"height")&&(t.textHeight=e.height),dt(e,"backgroundColor")&&(t.textBackgroundColor=e.backgroundColor),dt(e,"padding")&&(t.textPadding=e.padding),dt(e,"borderColor")&&(t.textBorderColor=e.borderColor),dt(e,"borderWidth")&&(t.textBorderWidth=e.borderWidth),dt(e,"borderRadius")&&(t.textBorderRadius=e.borderRadius),dt(e,"shadowColor")&&(t.textBoxShadowColor=e.shadowColor),dt(e,"shadowBlur")&&(t.textBoxShadowBlur=e.shadowBlur),dt(e,"shadowOffsetX")&&(t.textBoxShadowOffsetX=e.shadowOffsetX),dt(e,"shadowOffsetY")&&(t.textBoxShadowOffsetY=e.shadowOffsetY),dt(e,"textShadowColor")&&(t.textShadowColor=e.textShadowColor),dt(e,"textShadowBlur")&&(t.textShadowBlur=e.textShadowBlur),dt(e,"textShadowOffsetX")&&(t.textShadowOffsetX=e.textShadowOffsetX),dt(e,"textShadowOffsetY")&&(t.textShadowOffsetY=e.textShadowOffsetY))}var Qk=La.CMD,tP=2*Math.PI,eP=["x","y"],nP=["width","height"],iP=[];function rP(t,e){return Math.abs(t-e)<1e-5}function oP(t){var e,n,i,r,o,a=t.data,s=t.len(),l=[],u=0,h=0,c=0,p=0;function d(t,n){e&&e.length>2&&l.push(e),e=[t,n]}function f(t,n,i,r){rP(t,i)&&rP(n,r)||e.push(t,n,i,r,i,r)}function g(t,n,i,r,o,a){var s=Math.abs(n-t),l=4*Math.tan(s/4)/3,u=nM:C2&&l.push(e),l}function aP(t,e){var n=t.length,i=e.length;if(n===i)return[t,e];for(var r=n0)for(var b=i/n,w=-i/2;w<=i/2;w+=b){var S=Math.sin(w),M=Math.cos(w),I=0;for(_=0;_c.width?1:0,r=nP[i],o=eP[i],a=c[r]/e,s=c[o],l=0;li[1]&&i.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:i[1],r0:i[0]},api:{coord:function(i){var r=e.dataToRadius(i[0]),o=n.dataToAngle(i[1]),a=t.coordToPoint([r,o]);return a.push(r,o*Math.PI/180),a},size:V(Zk,t)}}},calendar:function(t){var e=t.getRect(),n=t.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:t.getCellWidth(),cellHeight:t.getCellHeight(),rangeInfo:{start:n.start,end:n.end,weeks:n.weeks,dayCount:n.allDay}},api:{coord:function(e,n){return t.dataToPoint(e,n)}}}}},BP=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(t,e){return F_(this.getSource(),this)},e.prototype.getDataParams=function(e,n,i){var r=t.prototype.getDataParams.call(this,e,n);return i&&(r.info=MP(i).info),r},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,clip:!1},e}(ff),FP=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n,i){var r=this._data,o=t.getData(),a=this.group,s=aO(t,o,e,n);r||a.removeAll();var l=t.__transientTransitionOpt;if(!l||null!=l.from&&null!=l.to){var u=new bO(t,l),h=l?"multiple":"oneToOne";new n_(r?r.getIndices():[],o.getIndices(),GP(r,h,l&&l.from),GP(o,h,l&&l.to),null,h).add((function(e){lO(n,null,e,s(e,i),t,a,o,null)})).remove((function(e){vO(r.getItemGraphicEl(e),t,a)})).update((function(e,l){u.reset("oneToOne");var h=r.getItemGraphicEl(l);u.findAndAddFrom(h),u.hasFrom()&&(xO(h,a),h=null),lO(n,h,e,s(e,i),t,a,o,u),u.applyMorphing()})).updateManyToOne((function(e,l){u.reset("manyToOne");for(var h=0;h=0){!s&&(s=r[t]={});var f=E(l);for(c=0;c=0){var d=t.getAnimationStyleProps(),f=d?d.style:null;if(f){!a&&(a=r.style={});var g=E(i);for(h=0;h=p;d--)vO(e.childAt(d),r,e)}(t,e,n,i,r,s),l>=0?o.replaceAt(e,l):o.add(e),e}function hO(t,e){var n,i=MP(t),r=e.type,o=e.shape,a=e.style;return null!=r&&r!==i.customGraphicType||"path"===r&&((n=o)&&(dt(n,"pathData")||dt(n,"d")))&&mO(o)!==i.customPathData||"image"===r&&dt(a,"image")&&a.image!==i.customImagePath}function cO(t,e,n){var i=e?pO(t,e):t,r=e?dO(t,i,DP):t.style,o=t.type,a=i?i.textConfig:null,s=t.textContent,l=s?e?pO(s,e):s:null;if(r&&(n.isLegacy||jk(r,o,!!a,!!l))){n.isLegacy=!0;var u=qk(r,o,!e);!a&&u.textConfig&&(a=u.textConfig),!l&&u.textContent&&(l=u.textContent)}if(!e&&l){var h=l;!h.type&&(h.type="text")}var c=e?n[e]:n.normal;c.cfg=a,c.conOpt=l}function pO(t,e){return e?t?t[e]:null:t}function dO(t,e,n){var i=e&&e.style;return null==i&&n===DP&&t&&(i=t.styleEmphasis),i}function fO(t,e){var n=t&&t.name;return null!=n?n:"e\0\0"+e}function gO(t,e){var n=this.context,i=null!=t?n.newChildren[t]:null,r=null!=e?n.oldChildren[e]:null;uO(n.api,r,n.dataIndex,i,n.seriesModel,n.group,0,n.morphPreparation)}function yO(t){var e=this.context;vO(e.oldChildren[t],e.seriesModel,e.group)}function vO(t,e,n){if(t){var i=MP(t).leaveToProps;i?Hu(t,i,e,{cb:function(){n.remove(t)}}):n.remove(t)}}function mO(t){return t&&(t.pathData||t.d)}function _O(t){return t&&t instanceof Ka}function xO(t,e){t&&e.remove(t)}var bO=function(){function t(t,e){this._fromList=[],this._toList=[],this._toElOptionList=[],this._allPropsFinalList=[],this._toDataIndices=[],this._morphConfigList=[],this._seriesModel=t,this._transOpt=e}return t.prototype.hasFrom=function(){return!!this._fromList.length},t.prototype.findAndAddFrom=function(t){if(t&&(MP(t).canMorph&&this._fromList.push(t),t.isGroup))for(var e=t.childrenRef(),n=0;n=n?i-a:o;this._manyToOneForSingleTo(r,a>=i?null:a,s)}else if("oneToMany"===t)for(var l=Math.max(1,Math.floor(n/i)),u=0,h=0;u=n?n-u:l;this._oneToManyForSingleFrom(u,c,h>=i?null:h)}},t.prototype._oneToOneForSingleTo=function(t,e){var n,i=this._toList[t],r=this._toElOptionList[t],o=this._toDataIndices[t],a=this._allPropsFinalList[t],s=this._fromList[e],l=this._getOrCreateMorphConfig(o),u=l.duration;if(s&&gP(s)){if(UP(i,a,r.style),u){var h=yP([s],i,l,wO);this._processResultIndividuals(h,t,null)}}else{var c=u&&s&&(s!==i||(fP(n=s)||gP(n)))?s:null,p={};YP("shape",i,c,r,p,!1),YP("extra",i,c,r,p,!1),jP(i,c,r,p,!1),qP(i,c,r,r.style,p,!1),UP(i,a,r.style),c&&cP(c,i,l),XP(i,o,r,this._seriesModel,p,!1)}},t.prototype._manyToOneForSingleTo=function(t,e,n){var i=this._toList[t],r=this._toElOptionList[t];UP(i,this._allPropsFinalList[t],r.style);var o=this._getOrCreateMorphConfig(this._toDataIndices[t]);if(o.duration&&null!=e){for(var a=[],s=e;sa)return!0;if(o){var s=uM(t).seriesDataCount,l=i.getExtent();return Math.abs(l[0]-l[1])/s>a}return!1}return!0===n},t.prototype.makeElOption=function(t,e,n,i,r){},t.prototype.createPointerEl=function(t,e,n,i){var r=e.pointer;if(r){var o=SO(t).pointerEl=new ah[r.type](MO(e.pointer));t.add(o)}},t.prototype.createLabelEl=function(t,e,n,i){if(e.label){var r=SO(t).labelEl=new cs(MO(e.label));t.add(r),AO(r,i)}},t.prototype.updatePointerEl=function(t,e,n){var i=SO(t).pointerEl;i&&e.pointer&&(i.setStyle(e.pointer.style),n(i,{shape:e.pointer.shape}))},t.prototype.updateLabelEl=function(t,e,n,i){var r=SO(t).labelEl;r&&(r.setStyle(e.label.style),n(r,{x:e.label.x,y:e.label.y}),AO(r,i))},t.prototype._renderHandle=function(t){if(!this._dragging&&this.updateHandleTransform){var e,n=this._axisPointerModel,i=this._api.getZr(),r=this._handle,o=n.getModel("handle"),a=n.get("status");if(!o.get("show")||!a||"hide"===a)return r&&i.remove(r),void(this._handle=null);this._handle||(e=!0,r=this._handle=eh(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){ee(t.event)},onmousedown:IO(this._onHandleDragMove,this,0,0),drift:IO(this._onHandleDragMove,this),ondragend:IO(this._onHandleDragEnd,this)}),i.add(r)),kO(r,n,!1),r.setStyle(o.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=o.get("size");F(s)||(s=[s,s]),r.scaleX=s[0]/2,r.scaleY=s[1]/2,zf(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},t.prototype._moveHandleToValue=function(t,e){CO(this._axisPointerModel,!e&&this._moveAnimation,this._handle,LO(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},t.prototype._onHandleDragMove=function(t,e){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(LO(n),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(LO(i)),SO(n).lastProp=null,this._doDispatchAxisPointer()}},t.prototype._doDispatchAxisPointer=function(){if(this._handle){var t=this._payloadInfo,e=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]})}},t.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},t.prototype.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)},t.prototype.doClear=function(){},t.prototype.buildLabel=function(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}},t}();function CO(t,e,n,i){DO(SO(n).lastProp,i)||(SO(n).lastProp=i,e?Hu(n,i,t):(n.stopAnimation(),n.attr(i)))}function DO(t,e){if(X(t)&&X(e)){var n=!0;return P(e,(function(e,i){n=n&&DO(t[i],e)})),!!n}return t===e}function AO(t,e){t[e.get(["label","show"])?"show":"hide"]()}function LO(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function kO(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 PO(t){var e,n=t.get("type"),i=t.getModel(n+"Style");return"line"===n?(e=i.getLineStyle()).fill=null:"shadow"===n&&((e=i.getAreaStyle()).stroke=null),e}function OO(t,e,n,i,r){var o=RO(n.get("value"),e.axis,e.ecModel,n.get("seriesDataIndices"),{precision:n.get(["label","precision"]),formatter:n.get(["label","formatter"])}),a=n.getModel("label"),s=wc(a.get("padding")||0),l=a.getFont(),u=bi(o,l),h=r.position,c=u.width+s[1]+s[3],p=u.height+s[0]+s[2],d=r.align;"right"===d&&(h[0]-=c),"center"===d&&(h[0]-=c/2);var f=r.verticalAlign;"bottom"===f&&(h[1]-=p),"middle"===f&&(h[1]-=p/2),function(t,e,n,i){var r=i.getWidth(),o=i.getHeight();t[0]=Math.min(t[0]+e,r)-e,t[1]=Math.min(t[1]+n,o)-n,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}(h,c,p,i);var g=a.get("backgroundColor");g&&"auto"!==g||(g=e.get(["axisLine","lineStyle","color"])),t.label={x:h[0],y:h[1],style:ph(a,{text:o,font:l,fill:a.getTextColor(),padding:s,backgroundColor:g}),z2:10}}function RO(t,e,n,i,r){t=e.scale.parse(t);var o=e.scale.getLabel({value:t},{precision:r.precision}),a=r.formatter;if(a){var s={value:Gx(e,{value:t}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};P(i,(function(t){var e=n.getSeriesByIndex(t.seriesIndex),i=t.dataIndexInside,r=e&&e.getDataParams(i);r&&s.seriesData.push(r)})),H(a)?o=a.replace("{value}",o):G(a)&&(o=a(s))}return o}function NO(t,e,n){var i=[1,0,0,1,0,0];return Xn(i,i,n.rotation),Un(i,i,n.position),qu([t.dataToCoord(e),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}function zO(t,e,n,i,r,o){var a=tM.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=r.get(["label","margin"]),OO(e,i,r,o,{position:NO(i.axis,t,n),align:a.textAlign,verticalAlign:a.textVerticalAlign})}function EO(t,e,n){return{x1:t[n=n||0],y1:t[1-n],x2:e[n],y2:e[1-n]}}function VO(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}}function BO(t,e,n,i,r,o){return{cx:t,cy:e,r0:n,r:i,startAngle:r,endAngle:o,clockwise:!0}}var FO=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.makeElOption=function(t,e,n,i,r){var o=n.axis,a=o.grid,s=i.get("type"),l=GO(a,o).getOtherAxis(o).getGlobalExtent(),u=o.toGlobalCoord(o.dataToCoord(e,!0));if(s&&"none"!==s){var h=PO(i),c=HO[s](o,u,l);c.style=h,t.graphicKey=c.type,t.pointer=c}zO(e,t,YS(a.model,n),n,i,r)},e.prototype.getHandleTransform=function(t,e,n){var i=YS(e.axis.grid.model,e,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var r=NO(e.axis,t,i);return{x:r[0],y:r[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,e,n,i){var r=n.axis,o=r.grid,a=r.getGlobalExtent(!0),s=GO(o,r).getOtherAxis(r).getGlobalExtent(),l="x"===r.dim?0:1,u=[t.x,t.y];u[l]+=e[l],u[l]=Math.min(a[1],u[l]),u[l]=Math.max(a[0],u[l]);var h=(s[1]+s[0])/2,c=[h,h];c[l]=u[l];return{x:u[0],y:u[1],rotation:t.rotation,cursorPoint:c,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}},e}(TO);function GO(t,e){var n={};return n[e.dim+"AxisIndex"]=e.index,t.getCartesian(n)}var HO={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:EO([e,n[0]],[e,n[1]],WO(t))}},shadow:function(t,e,n){var i=Math.max(1,t.getBandWidth()),r=n[1]-n[0];return{type:"Rect",shape:VO([e-i/2,n[0]],[i,r],WO(t))}}};function WO(t){return"x"===t.dim?0:1}var UO=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="axisPointer",e.defaultOption={show:"auto",zlevel:0,z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},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}},e}(Xc),XO=kr(),YO=P;function ZO(t,e,n){if(!a.node){var i=e.getZr();XO(i).records||(XO(i).records={}),function(t,e){if(XO(t).initialized)return;function n(n,i){t.on(n,(function(n){var r=function(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}}(e);YO(XO(t).records,(function(t){t&&i(t,n,r.dispatchAction)})),function(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))}(r.pendings,e)}))}XO(t).initialized=!0,n("click",B(qO,"click")),n("mousemove",B(qO,"mousemove")),n("globalout",jO)}(i,e),(XO(i).records[t]||(XO(i).records[t]={})).handler=n}}function jO(t,e,n){t.handler("leave",null,n)}function qO(t,e,n,i){e.handler(t,n,i)}function KO(t,e){if(!a.node){var n=e.getZr();(XO(n).records||{})[t]&&(XO(n).records[t]=null)}}var $O=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){var i=e.getComponent("tooltip"),r=t.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";ZO("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})}))},e.prototype.remove=function(t,e){KO("axisPointer",e)},e.prototype.dispose=function(t,e){KO("axisPointer",e)},e.type="axisPointer",e}(wf);function JO(t,e){var n,i=[],r=t.seriesIndex;if(null==r||!(n=e.getSeriesByIndex(r)))return{point:[]};var o=n.getData(),a=Lr(o,t);if(null==a||a<0||F(a))return{point:[]};var s=o.getItemGraphicEl(a),l=n.coordinateSystem;if(n.getTooltipPosition)i=n.getTooltipPosition(a)||[];else if(l&&l.dataToPoint)if(t.isStacked){var u=l.getBaseAxis(),h=l.getOtherAxis(u).dim,c=u.dim,p="x"===h||"radius"===h?1:0,d=o.mapDimension(c),f=[];f[p]=o.get(d,a),f[1-p]=o.get(o.getCalculationInfo("stackResultDimension"),a),i=l.dataToPoint(f)||[]}else i=l.dataToPoint(o.getValues(O(l.dimensions,(function(t){return o.mapDimension(t)})),a))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),i=[g.x+g.width/2,g.y+g.height/2]}return{point:i,el:s}}var QO=kr();function tR(t,e,n){var i=t.currTrigger,r=[t.x,t.y],o=t,a=t.dispatchAction||V(n.dispatchAction,n),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){oR(r)&&(r=JO({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},e).point);var l=oR(r),u=o.axesInfo,h=s.axesInfo,c="leave"===i||oR(r),p={},d={},f={list:[],map:{}},g={showPointer:B(nR,d),showTooltip:B(iR,f)};P(s.coordSysMap,(function(t,e){var n=l||t.containPoint(r);P(s.coordSysAxesInfo[e],(function(t,e){var i=t.axis,o=function(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}}(u,t);if(!c&&n&&(!u||o)){var a=o&&o.value;null!=a||l||(a=i.pointToData(r)),null!=a&&eR(t,a,g,!1,p)}}))}));var y={};return P(h,(function(t,e){var n=t.linkGroup;n&&!d[e]&&P(n.axesInfo,(function(e,i){var r=d[i];if(e!==t&&r){var o=r.value;n.mapper&&(o=t.axis.scale.parse(n.mapper(o,rR(e),rR(t)))),y[t.key]=o}}))})),P(y,(function(t,e){eR(h[e],t,g,!0,p)})),function(t,e,n){var i=n.axesInfo=[];P(e,(function(e,n){var r=e.axisPointerModel.option,o=t[n];o?(!e.useHandle&&(r.status="show"),r.value=o.value,r.seriesDataIndices=(o.payloadBatch||[]).slice()):!e.useHandle&&(r.status="hide"),"show"===r.status&&i.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:r.value})}))}(d,h,p),function(t,e,n,i){if(oR(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})}(f,r,t,a),function(t,e,n){var i=n.getZr(),r="axisPointerLastHighlights",o=QO(i)[r]||{},a=QO(i)[r]={};P(t,(function(t,e){var n=t.axisPointerModel.option;"show"===n.status&&P(n.seriesDataIndices,(function(t){var e=t.seriesIndex+" | "+t.dataIndex;a[e]=t}))}));var s=[],l=[];P(o,(function(t,e){!a[e]&&l.push(t)})),P(a,(function(t,e){!o[e]&&s.push(t)})),l.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}(h,0,n),p}}function eR(t,e,n,i,r){var o=t.axis;if(!o.scale.isBlank()&&o.containData(e))if(t.involveSeries){var a=function(t,e){var n=e.axis,i=n.dim,r=t,o=[],a=Number.MAX_VALUE,s=-1;return P(e.seriesModels,(function(e,l){var u,h,c=e.getData().mapDimensionsAll(i);if(e.getAxisTooltipData){var p=e.getAxisTooltipData(c,t,n);h=p.dataIndices,u=p.nestestValue}else{if(!(h=e.getData().indicesOfNearest(c[0],t,"category"===n.type?.5:null)).length)return;u=e.getData().get(c[0],h[0])}if(null!=u&&isFinite(u)){var d=t-u,f=Math.abs(d);f<=a&&((f=0&&s<0)&&(a=f,s=d,r=u,o.length=0),P(h,(function(t){o.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})})))}})),{payloadBatch:o,snapToValue:r}}(e,t),s=a.payloadBatch,l=a.snapToValue;s[0]&&null==r.seriesIndex&&I(r,s[0]),!i&&t.snap&&o.containData(l)&&null!=l&&(e=l),n.showPointer(t,e,s),n.showTooltip(t,a,l)}else n.showPointer(t,e)}function nR(t,e,n,i){t[e.key]={value:n,payloadBatch:i}}function iR(t,e,n,i){var r=n.payloadBatch,o=e.axis,a=o.model,s=e.axisPointerModel;if(e.triggerTooltip&&r.length){var l=e.coordSys.model,u=cM(l),h=t.map[u];h||(h=t.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(h)),h.dataByAxis.push({axisDim:o.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:i,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:r.slice()})}}function rR(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 oR(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function aR(t){dM.registerAxisPointerClass("CartesianAxisPointer",FO),t.registerComponentModel(UO),t.registerComponentView($O),t.registerPreprocessor((function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!F(e)&&(t.axisPointer.link=[e])}})),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,(function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=aM(t,e)})),t.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},tR)}var sR=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.makeElOption=function(t,e,n,i,r){var o=n.axis;"angle"===o.dim&&(this.animationThreshold=Math.PI/18);var a=o.polar,s=a.getOtherAxis(o).getExtent(),l=o.dataToCoord(e),u=i.get("type");if(u&&"none"!==u){var h=PO(i),c=lR[u](o,a,l,s);c.style=h,t.graphicKey=c.type,t.pointer=c}var p=function(t,e,n,i,r){var o=e.axis,a=o.dataToCoord(t),s=i.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l,u,h,c=i.getRadiusAxis().getExtent();if("radius"===o.dim){var p=[1,0,0,1,0,0];Xn(p,p,s),Un(p,p,[i.cx,i.cy]),l=qu([a,-r],p);var d=e.getModel("axisLabel").get("rotate")||0,f=tM.innerTextLayout(s,d*Math.PI/180,-1);u=f.textAlign,h=f.textVerticalAlign}else{var g=c[1];l=i.coordToPoint([g+r,a]);var y=i.cx,v=i.cy;u=Math.abs(l[0]-y)/g<.3?"center":l[0]>y?"left":"right",h=Math.abs(l[1]-v)/g<.3?"middle":l[1]>v?"top":"bottom"}return{position:l,align:u,verticalAlign:h}}(e,n,0,a,i.get(["label","margin"]));OO(t,n,i,r,p)},e}(TO);var lR={line:function(t,e,n,i){return"angle"===t.dim?{type:"Line",shape:EO(e.coordToPoint([i[0],n]),e.coordToPoint([i[1],n]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:n}}},shadow:function(t,e,n,i){var r=Math.max(1,t.getBandWidth()),o=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:BO(e.cx,e.cy,i[0],i[1],(-n-r/2)*o,(r/2-n)*o)}:{type:"Sector",shape:BO(e.cx,e.cy,n-r/2,n+r/2,0,2*Math.PI)}}},uR=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.findAxisModel=function(t){var e;return this.ecModel.eachComponent(t,(function(t){t.getCoordSysModel()===this&&(e=t)}),this),e},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={zlevel:0,z:0,center:["50%","50%"],radius:"80%"},e}(Xc),hR=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",Nr).models[0]},e.type="polarAxis",e}(Xc);L(hR,Yx);var cR=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="angleAxis",e}(hR),pR=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="radiusAxis",e}(hR),dR=function(t){function e(e,n){return t.call(this,"radius",e,n)||this}return n(e,t),e.prototype.pointToData=function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},e}(hb);dR.prototype.dataToRadius=hb.prototype.dataToCoord,dR.prototype.radiusToData=hb.prototype.coordToData;var fR=kr(),gR=function(t){function e(e,n){return t.call(this,"angle",e,n||[0,360])||this}return n(e,t),e.prototype.pointToData=function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},e.prototype.calculateCategoryInterval=function(){var t=this,e=t.getLabelModel(),n=t.scale,i=n.getExtent(),r=n.count();if(i[1]-i[0]<1)return 0;var o=i[0],a=t.dataToCoord(o+1)-t.dataToCoord(o),s=Math.abs(a),l=bi(null==o?"":o+"",e.getFont(),"center","top"),u=Math.max(l.height,7)/s;isNaN(u)&&(u=1/0);var h=Math.max(0,Math.floor(u)),c=fR(t.model),p=c.lastAutoInterval,d=c.lastTickCount;return null!=p&&null!=d&&Math.abs(p-h)<=1&&Math.abs(d-r)<=1&&p>h?h=p:(c.lastTickCount=r,c.lastAutoInterval=h),h},e}(hb);gR.prototype.dataToAngle=hb.prototype.dataToCoord,gR.prototype.angleToData=hb.prototype.coordToData;var yR=function(){function t(t){this.dimensions=["radius","angle"],this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new dR,this._angleAxis=new gR,this.axisPointerEnabled=!0,this.name=t||"",this._radiusAxis.polar=this._angleAxis.polar=this}return t.prototype.containPoint=function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},t.prototype.containData=function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},t.prototype.getAxis=function(t){return this["_"+t+"Axis"]},t.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},t.prototype.getAxesByScale=function(t){var e=[],n=this._angleAxis,i=this._radiusAxis;return n.scale.type===t&&e.push(n),i.scale.type===t&&e.push(i),e},t.prototype.getAngleAxis=function(){return this._angleAxis},t.prototype.getRadiusAxis=function(){return this._radiusAxis},t.prototype.getOtherAxis=function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},t.prototype.getTooltipAxes=function(t){var e=null!=t&&"auto"!==t?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},t.prototype.dataToPoint=function(t,e){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},t.prototype.pointToData=function(t,e){var n=this.pointToCoord(t);return[this._radiusAxis.radiusToData(n[0],e),this._angleAxis.angleToData(n[1],e)]},t.prototype.pointToCoord=function(t){var e=t[0]-this.cx,n=t[1]-this.cy,i=this.getAngleAxis(),r=i.getExtent(),o=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]);i.inverse?o=a-360:a=o+360;var s=Math.sqrt(e*e+n*n);e/=s,n/=s;for(var l=Math.atan2(-n,e)/Math.PI*180,u=la;)l+=360*u;return[s,l]},t.prototype.coordToPoint=function(t){var e=t[0],n=t[1]/180*Math.PI;return[Math.cos(n)*e+this.cx,-Math.sin(n)*e+this.cy]},t.prototype.getArea=function(){var t=this.getAngleAxis(),e=this.getRadiusAxis().getExtent().slice();e[0]>e[1]&&e.reverse();var n=t.getExtent(),i=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:e[0],r:e[1],startAngle:-n[0]*i,endAngle:-n[1]*i,clockwise:t.inverse,contain:function(t,e){var n=t-this.cx,i=e-this.cy,r=n*n+i*i,o=this.r,a=this.r0;return r<=o*o&&r>=a*a}}},t.prototype.convertToPixel=function(t,e,n){return vR(e)===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(t,e,n){return vR(e)===this?this.pointToData(n):null},t}();function vR(t){var e=t.seriesModel,n=t.polarModel;return n&&n.coordinateSystem||e&&e.coordinateSystem}function mR(t,e){var n=this,i=n.getAngleAxis(),r=n.getRadiusAxis();if(i.scale.setExtent(1/0,-1/0),r.scale.setExtent(1/0,-1/0),t.eachSeries((function(t){if(t.coordinateSystem===n){var e=t.getData();P(Xx(e,"radius"),(function(t){r.scale.unionExtentFromData(e,t)})),P(Xx(e,"angle"),(function(t){i.scale.unionExtentFromData(e,t)}))}})),Vx(i.scale,i.model),Vx(r.scale,r.model),"category"===i.type&&!i.onBand){var o=i.getExtent(),a=360/i.scale.count();i.inverse?o[1]+=a:o[1]-=a,i.setExtent(o[0],o[1])}}function _R(t,e){if(t.type=e.get("type"),t.scale=Bx(e),t.onBand=e.get("boundaryGap")&&"category"===t.type,t.inverse=e.get("inverse"),function(t){return"angleAxis"===t.mainType}(e)){t.inverse=t.inverse!==e.get("clockwise");var n=e.get("startAngle");t.setExtent(n,n+(t.inverse?-360:360))}e.axis=t,t.model=e}var xR={dimensions:yR.prototype.dimensions,create:function(t,e){var n=[];return t.eachComponent("polar",(function(t,i){var r=new yR(i+"");r.update=mR;var o=r.getRadiusAxis(),a=r.getAngleAxis(),s=t.findAxisModel("radiusAxis"),l=t.findAxisModel("angleAxis");_R(o,s),_R(a,l),function(t,e,n){var i=e.get("center"),r=n.getWidth(),o=n.getHeight();t.cx=Zi(i[0],r),t.cy=Zi(i[1],o);var a=t.getRadiusAxis(),s=Math.min(r,o)/2,l=e.get("radius");null==l?l=[0,"100%"]:F(l)||(l=[0,l]);var u=[Zi(l[0],s),Zi(l[1],s)];a.inverse?a.setExtent(u[1],u[0]):a.setExtent(u[0],u[1])}(r,t,e),n.push(r),t.coordinateSystem=r,r.model=t})),t.eachSeries((function(t){if("polar"===t.get("coordinateSystem")){var e=t.getReferringComponents("polar",Nr).models[0];0,t.coordinateSystem=e.coordinateSystem}})),n}},bR=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function wR(t,e,n){e[1]>e[0]&&(e=e.slice().reverse());var i=t.coordToPoint([e[0],n]),r=t.coordToPoint([e[1],n]);return{x1:i[0],y1:i[1],x2:r[0],y2:r[1]}}function SR(t){return t.getRadiusAxis().inverse?0:1}function MR(t){var e=t[0],n=t[t.length-1];e&&n&&Math.abs(Math.abs(e.coord-n.coord)-360)<1e-4&&t.pop()}var IR=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.axisPointerClass="PolarAxisPointer",n}return n(e,t),e.prototype.render=function(t,e){if(this.group.removeAll(),t.get("show")){var n=t.axis,i=n.polar,r=i.getRadiusAxis().getExtent(),o=n.getTicksCoords(),a=n.getMinorTicksCoords(),s=O(n.getViewLabels(),(function(t){t=w(t);var e=n.scale,i="ordinal"===e.type?e.getRawOrdinalNumber(t.tickValue):t.tickValue;return t.coord=n.dataToCoord(i),t}));MR(s),MR(o),P(bR,(function(e){!t.get([e,"show"])||n.scale.isBlank()&&"axisLine"!==e||TR[e](this.group,t,i,o,a,r,s)}),this)}},e.type="angleAxis",e}(dM),TR={axisLine:function(t,e,n,i,r,o){var a,s=e.getModel(["axisLine","lineStyle"]),l=SR(n),u=l?0:1;(a=0===o[u]?new Nl({shape:{cx:n.cx,cy:n.cy,r:o[l]},style:s.getLineStyle(),z2:1,silent:!0}):new tu({shape:{cx:n.cx,cy:n.cy,r:o[l],r0:o[u]},style:s.getLineStyle(),z2:1,silent:!0})).style.fill=null,t.add(a)},axisTick:function(t,e,n,i,r,o){var a=e.getModel("axisTick"),s=(a.get("inside")?-1:1)*a.get("length"),l=o[SR(n)],u=O(i,(function(t){return new uu({shape:wR(n,[l,l+s],t.coord)})}));t.add(Vu(u,{style:T(a.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(t,e,n,i,r,o){if(r.length){for(var a=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(a.get("inside")?-1:1)*s.get("length"),u=o[SR(n)],h=[],c=0;cf?"left":"right",v=Math.abs(d[1]-g)/p<.3?"middle":d[1]>g?"top":"bottom";if(s&&s[c]){var m=s[c];X(m)&&m.textStyle&&(a=new Oh(m.textStyle,l,l.ecModel))}var _=new cs({silent:tM.isLabelSilent(e),style:ph(a,{x:d[0],y:d[1],fill:a.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:i.formattedLabel,align:y,verticalAlign:v})});if(t.add(_),h){var x=tM.makeAxisEventDataBase(e);x.targetType="axisLabel",x.value=i.rawLabel,_s(_).eventData=x}}),this)},splitLine:function(t,e,n,i,r,o){var a=e.getModel("splitLine").getModel("lineStyle"),s=a.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],h=0;h=0?"p":"n",T=x;m&&(i[s][M]||(i[s][M]={p:x,n:x}),T=i[s][M][I]);var C=void 0,D=void 0,A=void 0,L=void 0;if("radius"===c.dim){var k=c.dataToCoord(S)-x,P=o.dataToCoord(M);Math.abs(k)=e.y&&t[1]<=e.y+e.height:n.contain(n.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},t.prototype.pointToData=function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t["horizontal"===e.orient?0:1]))]},t.prototype.dataToPoint=function(t){var e=this.getAxis(),n=this.getRect(),i=[],r="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),i[r]=e.toGlobalCoord(e.dataToCoord(+t)),i[1-r]=0===r?n.y+n.height/2:n.x+n.width/2,i},t.prototype.convertToPixel=function(t,e,n){return XR(e)===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(t,e,n){return XR(e)===this?this.pointToData(n):null},t}();function XR(t){var e=t.seriesModel,n=t.singleAxisModel;return n&&n.coordinateSystem||e&&e.coordinateSystem}var YR={create:function(t,e){var n=[];return t.eachComponent("singleAxis",(function(i,r){var o=new UR(i,t,e);o.name="single_"+r,o.resize(i,e),i.coordinateSystem=o,n.push(o)})),t.eachSeries((function(t){if("singleAxis"===t.get("coordinateSystem")){var e=t.getReferringComponents("singleAxis",Nr).models[0];t.coordinateSystem=e&&e.coordinateSystem}})),n},dimensions:UR.prototype.dimensions},ZR=["x","y"],jR=["width","height"],qR=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.makeElOption=function(t,e,n,i,r){var o=n.axis,a=o.coordinateSystem,s=JR(a,1-$R(o)),l=a.dataToPoint(e)[0],u=i.get("type");if(u&&"none"!==u){var h=PO(i),c=KR[u](o,l,s);c.style=h,t.graphicKey=c.type,t.pointer=c}zO(e,t,ER(n),n,i,r)},e.prototype.getHandleTransform=function(t,e,n){var i=ER(e,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var r=NO(e.axis,t,i);return{x:r[0],y:r[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,e,n,i){var r=n.axis,o=r.coordinateSystem,a=$R(r),s=JR(o,a),l=[t.x,t.y];l[a]+=e[a],l[a]=Math.min(s[1],l[a]),l[a]=Math.max(s[0],l[a]);var u=JR(o,1-a),h=(u[1]+u[0])/2,c=[h,h];return c[a]=l[a],{x:l[0],y:l[1],rotation:t.rotation,cursorPoint:c,tooltipOption:{verticalAlign:"middle"}}},e}(TO),KR={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:EO([e,n[0]],[e,n[1]],$R(t))}},shadow:function(t,e,n){var i=t.getBandWidth(),r=n[1]-n[0];return{type:"Rect",shape:VO([e-i/2,n[0]],[i,r],$R(t))}}};function $R(t){return t.isHorizontal()?0:1}function JR(t,e){var n=t.getRect();return[n[ZR[e]],n[ZR[e]]+n[jR[e]]]}var QR=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="single",e}(wf);var tN=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.init=function(e,n,i){var r=Hc(e);t.prototype.init.apply(this,arguments),eN(e,r)},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),eN(this.option,e)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.defaultOption={zlevel:0,z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",nameMap:"en",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",nameMap:"en",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}(Xc);function eN(t,e){var n,i=t.cellSize;1===(n=F(i)?i:t.cellSize=[i,i]).length&&(n[1]=n[0]);var r=O([0,1],(function(t){return function(t,e){return null!=t[Nc[e][0]]||null!=t[Nc[e][1]]&&null!=t[Nc[e][2]]}(e,t)&&(n[t]="auto"),null!=n[t]&&"auto"!==n[t]}));Gc(t,e,{type:"box",ignoreSize:r})}var nN={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},iN={EN:["S","M","T","W","T","F","S"],CN:["日","一","二","三","四","五","六"]},rN=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){var i=this.group;i.removeAll();var r=t.coordinateSystem,o=r.getRangeInfo(),a=r.getOrient();this._renderDayRect(t,o,i),this._renderLines(t,o,a,i),this._renderYearText(t,o,a,i),this._renderMonthText(t,a,i),this._renderWeekText(t,o,a,i)},e.prototype._renderDayRect=function(t,e,n){for(var i=t.coordinateSystem,r=t.getModel("itemStyle").getItemStyle(),o=i.getCellWidth(),a=i.getCellHeight(),s=e.start.time;s<=e.end.time;s=i.getNextNDay(s,1).time){var l=i.dataToRect([s],!1).tl,u=new ls({shape:{x:l[0],y:l[1],width:o,height:a},cursor:"default",style:r});n.add(u)}},e.prototype._renderLines=function(t,e,n,i){var r=this,o=t.coordinateSystem,a=t.getModel(["splitLine","lineStyle"]).getLineStyle(),s=t.get(["splitLine","show"]),l=a.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=e.start,h=0;u.time<=e.end.time;h++){p(u.formatedDate),0===h&&(u=o.getDateInfo(e.start.y+"-"+e.start.m));var c=u.date;c.setMonth(c.getMonth()+1),u=o.getDateInfo(c)}function p(e){r._firstDayOfMonth.push(o.getDateInfo(e)),r._firstDayPoints.push(o.dataToRect([e],!1).tl);var l=r._getLinePointsOfOneWeek(t,e,n);r._tlpoints.push(l[0]),r._blpoints.push(l[l.length-1]),s&&r._drawSplitline(l,a,i)}p(o.getNextNDay(e.end.time,1).formatedDate),s&&this._drawSplitline(r._getEdgesPoints(r._tlpoints,l,n),a,i),s&&this._drawSplitline(r._getEdgesPoints(r._blpoints,l,n),a,i)},e.prototype._getEdgesPoints=function(t,e,n){var i=[t[0].slice(),t[t.length-1].slice()],r="horizontal"===n?0:1;return i[0][r]=i[0][r]-e/2,i[1][r]=i[1][r]+e/2,i},e.prototype._drawSplitline=function(t,e,n){var i=new au({z2:20,shape:{points:t},style:e});n.add(i)},e.prototype._getLinePointsOfOneWeek=function(t,e,n){for(var i=t.coordinateSystem,r=i.getDateInfo(e),o=[],a=0;a<7;a++){var s=i.getNextNDay(r.time,a),l=i.dataToRect([s.time],!1);o[2*s.day]=l.tl,o[2*s.day+1]=l["horizontal"===n?"bl":"tr"]}return o},e.prototype._formatterLabel=function(t,e){return"string"==typeof t&&t?(n=t,P(e,(function(t,e){n=n.replace("{"+e+"}",i?Ic(t):t)})),n):"function"==typeof t?t(e):e.nameMap;var n,i},e.prototype._yearTextPositionControl=function(t,e,n,i,r){var o=e[0],a=e[1],s=["center","bottom"];"bottom"===i?(a+=r,s=["center","top"]):"left"===i?o-=r:"right"===i?(o+=r,s=["center","top"]):a-=r;var l=0;return"left"!==i&&"right"!==i||(l=Math.PI/2),{rotation:l,x:o,y:a,style:{align:s[0],verticalAlign:s[1]}}},e.prototype._renderYearText=function(t,e,n,i){var r=t.getModel("yearLabel");if(r.get("show")){var o=r.get("margin"),a=r.get("position");a||(a="horizontal"!==n?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,h="horizontal"===n?0:1,c={top:[l,s[h][1]],bottom:[l,s[1-h][1]],left:[s[1-h][0],u],right:[s[h][0],u]},p=e.start.y;+e.end.y>+e.start.y&&(p=p+"-"+e.end.y);var d=r.get("formatter"),f={start:e.start.y,end:e.end.y,nameMap:p},g=this._formatterLabel(d,f),y=new cs({z2:30,style:ph(r,{text:g})});y.attr(this._yearTextPositionControl(y,c[a],n,a,o)),i.add(y)}},e.prototype._monthTextPositionControl=function(t,e,n,i,r){var o="left",a="top",s=t[0],l=t[1];return"horizontal"===n?(l+=r,e&&(o="center"),"start"===i&&(a="bottom")):(s+=r,e&&(a="middle"),"start"===i&&(o="right")),{x:s,y:l,align:o,verticalAlign:a}},e.prototype._renderMonthText=function(t,e,n){var i=t.getModel("monthLabel");if(i.get("show")){var r=i.get("nameMap"),o=i.get("margin"),a=i.get("position"),s=i.get("align"),l=[this._tlpoints,this._blpoints];H(r)&&(r=nN[r.toUpperCase()]||[]);var u="start"===a?0:1,h="horizontal"===e?0:1;o="start"===a?-o:o;for(var c="center"===s,p=0;p=i.start.time&&n.timea.end.time&&t.reverse(),t},t.prototype._getRangeInfo=function(t){var e,n=[this.getDateInfo(t[0]),this.getDateInfo(t[1])];n[0].time>n[1].time&&(e=!0,n.reverse());var i=Math.floor(n[1].time/oN)-Math.floor(n[0].time/oN)+1,r=new Date(n[0].time),o=r.getDate(),a=n[1].date.getDate();r.setDate(o+i-1);var s=r.getDate();if(s!==a)for(var l=r.getTime()-n[1].time>0?1:-1;(s=r.getDate())!==a&&(r.getTime()-n[1].time)*l>0;)i-=l,r.setDate(s-l);var u=Math.floor((i+n[0].day+6)/7),h=e?1-u:u-1;return e&&n.reverse(),{range:[n[0].formatedDate,n[1].formatedDate],start:n[0],end:n[1],allDay:i,weeks:u,nthWeek:h,fweek:n[0].day,lweek:n[1].day}},t.prototype._getDateByWeeksAndDay=function(t,e,n){var i=this._getRangeInfo(n);if(t>i.weeks||0===t&&ei.lweek)return null;var r=7*(t-1)-i.fweek+e,o=new Date(i.start.time);return o.setDate(+i.start.d+r),this.getDateInfo(o)},t.create=function(e,n){var i=[];return e.eachComponent("calendar",(function(r){var o=new t(r,e,n);i.push(o),r.coordinateSystem=o})),e.eachSeries((function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("calendarIndex")||0])})),i},t.dimensions=["time","value"],t}();function sN(t){var e=t.calendarModel,n=t.seriesModel;return e?e.coordinateSystem:n?n.coordinateSystem:null}var lN=kr(),uN={path:null,compoundPath:null,group:Ei,image:es,text:cs},hN=function(t){var e=t.graphic;F(e)?e[0]&&e[0].elements?t.graphic=[t.graphic[0]]:t.graphic=[{elements:e}]:e&&!e.elements&&(t.graphic=[{elements:[e]}])},cN=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.preventAutoZ=!0,n}return n(e,t),e.prototype.mergeOption=function(e,n){var i=this.option.elements;this.option.elements=null,t.prototype.mergeOption.call(this,e,n),this.option.elements=i},e.prototype.optionUpdated=function(t,e){var n=this.option,i=(e?n:t).elements,r=n.elements=e?[]:n.elements,o=[];this._flatten(i,o,null);var a=Mr(r,o,"normalMerge"),s=this._elOptionsToUpdate=[];P(a,(function(t,e){var n=t.newOption;n&&(s.push(n),function(t,e){var n=t.existing;if(e.id=t.keyInfo.id,!e.type&&n&&(e.type=n.type),null==e.parentId){var i=e.parentOption;i?e.parentId=i.id:n&&(e.parentId=n.parentId)}e.parentOption=null}(t,n),function(t,e,n){var i=I({},n),r=t[e],o=n.$action||"merge";if("merge"===o){if(r)S(r,i,!0),Gc(r,i,{ignoreSize:!0}),Wc(n,r);else t[e]=i}else"replace"===o?t[e]=i:"remove"===o&&r&&(t[e]=null)}(r,e,n),function(t,e){if(!t)return;if(t.hv=e.hv=[gN(e,["left","right"]),gN(e,["top","bottom"])],"group"===t.type){var n=t,i=e;null==n.width&&(n.width=i.width=0),null==n.height&&(n.height=i.height=0)}}(r[e],n))}),this);for(var l=r.length-1;l>=0;l--)null==r[l]?r.splice(l,1):delete r[l].$action},e.prototype._flatten=function(t,e,n){P(t,(function(t){if(t){n&&(t.parentOption=n),e.push(t);var i=t.children;"group"===t.type&&i&&this._flatten(i,e,t),delete t.children}}),this)},e.prototype.useElOptionsToUpdate=function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t},e.type="graphic",e.defaultOption={elements:[]},e}(Xc),pN=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.init=function(){this._elMap=ht()},e.prototype.render=function(t,e,n){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,n)},e.prototype._updateElements=function(t){var e=t.useElOptionsToUpdate();if(e){var n=this._elMap,i=this.group;P(e,(function(e){var r=Cr(e.id,null),o=null!=r?n.get(r):null,a=Cr(e.parentId,null),s=null!=a?n.get(a):i,l=e.type,u=e.style;"text"===l&&u&&e.hv&&e.hv[1]&&(u.textVerticalAlign=u.textBaseline=u.verticalAlign=u.align=null);var h=e.textContent,c=e.textConfig;if(u&&jk(u,l,!!c,!!h)){var p=qk(u,l,!0);!c&&p.textConfig&&(c=e.textConfig=p.textConfig),!h&&p.textContent&&(h=p.textContent)}var d=function(t){return t=I({},t),P(["id","parentId","$action","hv","bounding","textContent"].concat(Rc),(function(e){delete t[e]})),t}(e);var f=e.$action||"merge";"merge"===f?o?o.attr(d):dN(r,s,d,n):"replace"===f?(fN(o,n),dN(r,s,d,n)):"remove"===f&&fN(o,n);var g=n.get(r);if(g&&h)if("merge"===f){var y=g.getTextContent();y?y.attr(h):g.setTextContent(new cs(h))}else"replace"===f&&g.setTextContent(new cs(h));if(g){var v=lN(g);v.__ecGraphicWidthOption=e.width,v.__ecGraphicHeightOption=e.height,function(t,e,n){var i=_s(t).eventData;t.silent||t.ignore||i||(i=_s(t).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:t.name});i&&(i.info=n.info)}(g,t,e),oh({el:g,componentModel:t,itemName:g.name,itemTooltipOption:e.tooltip})}}))}},e.prototype._relocate=function(t,e){for(var n=t.option.elements,i=this.group,r=this._elMap,o=e.getWidth(),a=e.getHeight(),s=0;s=0;s--){var c,p,d;if(d=null!=(p=Cr((c=n[s]).id,null))?r.get(p):null){var f=d.parent;h=lN(f);Bc(d,c,f===i?{width:o,height:a}:{width:h.__ecGraphicWidth,height:h.__ecGraphicHeight},null,{hv:c.hv,boundingMode:c.bounding})}}},e.prototype._clear=function(){var t=this._elMap;t.each((function(e){fN(e,t)})),this._elMap=ht()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(wf);function dN(t,e,n,i){var r=n.type;var o=dt(uN,r)?uN[r]:Ru(r);var a=new o(n);e.add(a),i.set(t,a),lN(a).__ecGraphicId=t}function fN(t,e){var n=t&&t.parent;n&&("group"===t.type&&t.traverse((function(t){fN(t,e)})),e.removeKey(lN(t).__ecGraphicId),n.remove(t))}function gN(t,e){var n;return P(e,(function(e){null!=t[e]&&"auto"!==t[e]&&(n=!0)})),n}var yN=["x","y","radius","angle","single"],vN=["cartesian2d","polar","singleAxis"];function mN(t){return t+"Axis"}function _N(t,e){var n,i=ht(),r=[],o=ht();t.eachComponent({mainType:"dataZoom",query:e},(function(t){o.get(t.uid)||s(t)}));do{n=!1,t.eachComponent("dataZoom",a)}while(n);function a(t){!o.get(t.uid)&&function(t){var e=!1;return t.eachTargetAxis((function(t,n){var r=i.get(t);r&&r[n]&&(e=!0)})),e}(t)&&(s(t),n=!0)}function s(t){o.set(t.uid,!0),r.push(t),t.eachTargetAxis((function(t,e){(i.get(t)||i.set(t,[]))[e]=!0}))}return r}function xN(t){var e=t.ecModel,n={infoList:[],infoMap:ht()};return t.eachTargetAxis((function(t,i){var r=e.getComponent(mN(t),i);if(r){var o=r.getCoordSysModel();if(o){var a=o.uid,s=n.infoMap.get(a);s||(s={model:o,axisModels:[]},n.infoList.push(s),n.infoMap.set(a,s)),s.axisModels.push(r)}}})),n}var bN=function(){function t(){this.indexList=[],this.indexMap=[]}return t.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},t}(),wN=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._autoThrottle=!0,n._noTarget=!0,n._rangePropMode=["percent","percent"],n}return n(e,t),e.prototype.init=function(t,e,n){var i=SN(t);this.settledOption=i,this.mergeDefaultAndTheme(t,n),this._doInit(i)},e.prototype.mergeOption=function(t){var e=SN(t);S(this.option,t,!0),S(this.settledOption,e,!0),this._doInit(e)},e.prototype._doInit=function(t){var e=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var n=this.settledOption;P([["start","startValue"],["end","endValue"]],(function(t,i){"value"===this._rangePropMode[i]&&(e[t[0]]=n[t[0]]=null)}),this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),e=this._targetAxisInfoMap=ht();this._fillSpecifiedTargetAxis(e)?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(e,this._orient)),this._noTarget=!0,e.each((function(t){t.indexList.length&&(this._noTarget=!1)}),this)},e.prototype._fillSpecifiedTargetAxis=function(t){var e=!1;return P(yN,(function(n){var i=this.getReferringComponents(mN(n),zr);if(i.specified){e=!0;var r=new bN;P(i.models,(function(t){r.add(t.componentIndex)})),t.set(n,r)}}),this),e},e.prototype._fillAutoTargetAxisByOrient=function(t,e){var n=this.ecModel,i=!0;if(i){var r="vertical"===e?"y":"x";o(n.findComponents({mainType:r+"Axis"}),r)}i&&o(n.findComponents({mainType:"singleAxis",filter:function(t){return t.get("orient",!0)===e}}),"single");function o(e,n){var r=e[0];if(r){var o=new bN;if(o.add(r.componentIndex),t.set(n,o),i=!1,"x"===n||"y"===n){var a=r.getReferringComponents("grid",Nr).models[0];a&&P(e,(function(t){r.componentIndex!==t.componentIndex&&a===t.getReferringComponents("grid",Nr).models[0]&&o.add(t.componentIndex)}))}}}i&&P(yN,(function(e){if(i){var r=n.findComponents({mainType:mN(e),filter:function(t){return"category"===t.get("type",!0)}});if(r[0]){var o=new bN;o.add(r[0].componentIndex),t.set(e,o),i=!1}}}),this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis((function(e){!t&&(t=e)}),this),"y"===t?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var e=this.ecModel.option;this.option.throttle=e.animation&&e.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var e=this._rangePropMode,n=this.get("rangeMode");P([["start","startValue"],["end","endValue"]],(function(i,r){var o=null!=t[i[0]],a=null!=t[i[1]];o&&!a?e[r]="percent":!o&&a?e[r]="value":n?e[r]=n[r]:o&&(e[r]="percent")}))},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis((function(e,n){null==t&&(t=this.ecModel.getComponent(mN(e),n))}),this),t},e.prototype.eachTargetAxis=function(t,e){this._targetAxisInfoMap.each((function(n,i){P(n.indexList,(function(n){t.call(e,i,n)}))}))},e.prototype.getAxisProxy=function(t,e){var n=this.getAxisModel(t,e);if(n)return n.__dzAxisProxy},e.prototype.getAxisModel=function(t,e){var n=this._targetAxisInfoMap.get(t);if(n&&n.indexMap[e])return this.ecModel.getComponent(mN(t),e)},e.prototype.setRawRange=function(t){var e=this.option,n=this.settledOption;P([["start","startValue"],["end","endValue"]],(function(i){null==t[i[0]]&&null==t[i[1]]||(e[i[0]]=n[i[0]]=t[i[0]],e[i[1]]=n[i[1]]=t[i[1]])}),this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var e=this.option;P(["start","startValue","end","endValue"],(function(n){e[n]=t[n]}))},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var n=this.findRepresentativeAxisProxy();return n?n.getDataValueWindow():void 0},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var e,n=this._targetAxisInfoMap.keys(),i=0;i=0}(e)){var n=mN(this._dimName),i=e.getReferringComponents(n,Nr).models[0];i&&this._axisIndex===i.componentIndex&&t.push(e)}}),this),t},t.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},t.prototype.getMinMaxSpan=function(){return w(this._minMaxSpan)},t.prototype.calculateDataWindow=function(t){var e,n=this._dataExtent,i=this.getAxisModel().axis.scale,r=this._dataZoomModel.getRangePropMode(),o=[0,100],a=[],s=[];CN(["start","end"],(function(l,u){var h=t[l],c=t[l+"Value"];"percent"===r[u]?(null==h&&(h=o[u]),c=i.parse(Yi(h,o,n))):(e=!0,h=Yi(c=null==c?n[u]:i.parse(c),n,o)),s[u]=c,a[u]=h})),DN(s),DN(a);var l=this._minMaxSpan;function u(t,e,n,r,o){var a=o?"Span":"ValueSpan";PD(0,t,n,"all",l["min"+a],l["max"+a]);for(var s=0;s<2;s++)e[s]=Yi(t[s],n,r,!0),o&&(e[s]=i.parse(e[s]))}return e?u(s,a,n,o,!1):u(a,s,o,n,!0),{valueWindow:s,percentWindow:a}},t.prototype.reset=function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=function(t,e,n){var i=[1/0,-1/0];CN(n,(function(t){!function(t,e,n){e&&P(Xx(e,n),(function(n){var i=e.getApproximateExtent(n);i[0]t[1]&&(t[1]=i[1])}))}(i,t.getData(),e)}));var r=t.getAxisModel(),o=Nx(r.axis.scale,r,i).calculate();return[o.min,o.max]}(this,this._dimName,e),this._updateMinMaxSpan();var n=this.calculateDataWindow(t.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},t.prototype.filterData=function(t,e){if(t===this._dataZoomModel){var n=this._dimName,i=this.getTargetSeriesModels(),r=t.get("filterMode"),o=this._valueWindow;"none"!==r&&CN(i,(function(t){var e=t.getData(),i=e.mapDimensionsAll(n);i.length&&("weakFilter"===r?e.filterSelf((function(t){for(var n,r,a,s=0;so[1];if(u&&!h&&!c)return!0;u&&(a=!0),h&&(n=!0),c&&(r=!0)}return a&&n&&r})):CN(i,(function(n){if("empty"===r)t.setData(e=e.map(n,(function(t){return function(t){return t>=o[0]&&t<=o[1]}(t)?t:NaN})));else{var i={};i[n]=o,e.selectRange(i)}})),CN(i,(function(t){e.setApproximateExtent(o,t)})))}))}},t.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},e=this._dataZoomModel,n=this._dataExtent;CN(["min","max"],(function(i){var r=e.get(i+"Span"),o=e.get(i+"ValueSpan");null!=o&&(o=this.getAxisModel().axis.scale.parse(o)),null!=o?r=Yi(n[0]+o,n,[0,100],!0):null!=r&&(o=Yi(r,[0,100],n,!0)-n[0]),t[i+"Span"]=r,t[i+"ValueSpan"]=o}),this)},t.prototype._setAxisModel=function(){var t=this.getAxisModel(),e=this._percentWindow,n=this._valueWindow;if(e){var i=Ji(n,[0,500]);i=Math.min(i,20);var r=t.axis.scale.rawExtentInfo;0!==e[0]&&r.setDeterminedMinMax("min",+n[0].toFixed(i)),100!==e[1]&&r.setDeterminedMinMax("max",+n[1].toFixed(i)),r.freeze()}},t}();var LN={getTargetSeries:function(t){function e(e){t.eachComponent("dataZoom",(function(n){n.eachTargetAxis((function(i,r){var o=t.getComponent(mN(i),r);e(i,r,o,n)}))}))}e((function(t,e,n,i){n.__dzAxisProxy=null}));var n=[];e((function(e,i,r,o){r.__dzAxisProxy||(r.__dzAxisProxy=new AN(e,i,o,t),n.push(r.__dzAxisProxy))}));var i=ht();return P(n,(function(t){P(t.getTargetSeriesModels(),(function(t){i.set(t.uid,t)}))})),i},overallReset:function(t,e){t.eachComponent("dataZoom",(function(t){t.eachTargetAxis((function(e,n){t.getAxisProxy(e,n).reset(t)})),t.eachTargetAxis((function(n,i){t.getAxisProxy(n,i).filterData(t,e)}))})),t.eachComponent("dataZoom",(function(t){var e=t.findRepresentativeAxisProxy();if(e){var n=e.getDataPercentWindow(),i=e.getDataValueWindow();t.setCalculatedRange({start:n[0],end:n[1],startValue:i[0],endValue:i[1]})}}))}};var kN=!1;function PN(t){kN||(kN=!0,t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,LN),function(t){t.registerAction("dataZoom",(function(t,e){P(_N(e,t),(function(e){e.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})}))}))}(t),t.registerSubTypeDefaulter("dataZoom",(function(){return"slider"})))}function ON(t){t.registerComponentModel(MN),t.registerComponentView(TN),PN(t)}var RN=function(){},NN={};function zN(t,e){NN[t]=e}function EN(t){return NN[t]}var VN=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.optionUpdated=function(){t.prototype.optionUpdated.apply(this,arguments);var e=this.ecModel;P(this.option.feature,(function(t,n){var i=EN(n);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(e)),S(t,i.defaultOption))}))},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,zlevel:0,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},e}(Xc);function BN(t,e){var n=wc(e.get("padding")),i=e.getItemStyle(["color","opacity"]);return i.fill=e.get("backgroundColor"),t=new ls({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})}var FN=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.render=function(t,e,n,i){var r=this.group;if(r.removeAll(),t.get("show")){var o=+t.get("itemSize"),a=t.get("feature")||{},s=this._features||(this._features={}),l=[];P(a,(function(t,e){l.push(e)})),new n_(this._featureNames||[],l).add(u).update(u).remove(B(u,null)).execute(),this._featureNames=l,function(t,e,n){var i=e.getBoxLayoutParams(),r=e.get("padding"),o={width:n.getWidth(),height:n.getHeight()},a=Vc(i,o,r);Ec(e.get("orient"),t,e.get("itemGap"),a.width,a.height),Bc(t,i,o,r)}(r,t,n),r.add(BN(r.getBoundingRect(),t)),r.eachChild((function(t){var e=t.__title,i=t.ensureState("emphasis"),a=i.textConfig||(i.textConfig={}),s=t.getTextContent(),l=s&&s.states.emphasis;if(l&&!G(l)&&e){var u=l.style||(l.style={}),h=bi(e,cs.makeFont(u)),c=t.x+r.x,p=!1;t.y+r.y+o+h.height>n.getHeight()&&(a.position="top",p=!0);var d=p?-5-h.height:o+8;c+h.width/2>n.getWidth()?(a.position=["100%",d],u.align="right"):c-h.width/2<0&&(a.position=[0,d],u.align="left")}}))}function u(u,h){var c,p=l[u],d=l[h],f=a[p],g=new Oh(f,t,t.ecModel);if(i&&null!=i.newTitle&&i.featureName===p&&(f.title=i.newTitle),p&&!d){if(function(t){return 0===t.indexOf("my")}(p))c={onclick:g.option.onclick,featureName:p};else{var y=EN(p);if(!y)return;c=new y}s[p]=c}else if(!(c=s[d]))return;c.uid=Nh("toolbox-feature"),c.model=g,c.ecModel=e,c.api=n;var v=c instanceof RN;p||!d?!g.get("show")||v&&c.unusable?v&&c.remove&&c.remove(e,n):(!function(i,a,s){var l,u,h=i.getModel("iconStyle"),c=i.getModel(["emphasis","iconStyle"]),p=a instanceof RN&&a.getIcons?a.getIcons():i.get("icon"),d=i.get("title")||{};"string"==typeof p?(l={})[s]=p:l=p;"string"==typeof d?(u={})[s]=d:u=d;var f=i.iconPaths={};P(l,(function(s,l){var p=eh(s,{},{x:-o/2,y:-o/2,width:o,height:o});p.setStyle(h.getItemStyle()),p.ensureState("emphasis").style=c.getItemStyle();var d=new cs({style:{text:u[l],align:c.get("textAlign"),borderRadius:c.get("textBorderRadius"),padding:c.get("textPadding"),fill:null},ignore:!0});p.setTextContent(d),oh({el:p,componentModel:t,itemName:l,formatterParamsExtra:{title:u[l]}}),p.__title=u[l],p.on("mouseover",(function(){var e=c.getItemStyle(),n="vertical"===t.get("orient")?null==t.get("right")?"right":"left":null==t.get("bottom")?"bottom":"top";d.setStyle({fill:c.get("textFill")||e.fill||e.stroke||"#000",backgroundColor:c.get("textBackgroundColor")}),p.setTextConfig({position:c.get("textPosition")||n}),d.ignore=!t.get("showTitle"),js(this)})).on("mouseout",(function(){"emphasis"!==i.get(["iconStatus",l])&&qs(this),d.hide()})),("emphasis"===i.get(["iconStatus",l])?js:qs)(p),r.add(p),p.on("click",V(a.onclick,a,e,n,l)),f[l]=p}))}(g,c,p),g.setIconStatus=function(t,e){var n=this.option,i=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[t]=e,i[t]&&("emphasis"===e?js:qs)(i[t])},c instanceof RN&&c.render&&c.render(g,e,n,i)):v&&c.dispose&&c.dispose(e,n)}},e.prototype.updateView=function(t,e,n,i){P(this._features,(function(t){t instanceof RN&&t.updateView&&t.updateView(t.model,e,n,i)}))},e.prototype.remove=function(t,e){P(this._features,(function(n){n instanceof RN&&n.remove&&n.remove(t,e)})),this.group.removeAll()},e.prototype.dispose=function(t,e){P(this._features,(function(n){n instanceof RN&&n.dispose&&n.dispose(t,e)}))},e.type="toolbox",e}(wf);var GN=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.onclick=function(t,e){var n=this.model,i=n.get("name")||t.get("title.0.text")||"echarts",r="svg"===e.getZr().painter.getType(),o=r?"svg":n.get("type",!0)||"png",s=e.getConnectedDataURL({type:o,backgroundColor:n.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")});if("function"!=typeof MouseEvent||!a.browser.newEdge&&(a.browser.ie||a.browser.edge))if(window.navigator.msSaveOrOpenBlob||r){var l=s.split(","),u=l[0].indexOf("base64")>-1,h=r?decodeURIComponent(l[1]):l[1];u&&(h=window.atob(h));var c=i+"."+o;if(window.navigator.msSaveOrOpenBlob){for(var p=h.length,d=new Uint8Array(p);p--;)d[p]=h.charCodeAt(p);var f=new Blob([d]);window.navigator.msSaveOrOpenBlob(f,c)}else{var g=document.createElement("iframe");document.body.appendChild(g);var y=g.contentWindow,v=y.document;v.open("image/svg+xml","replace"),v.write(h),v.close(),y.focus(),v.execCommand("SaveAs",!0,c),document.body.removeChild(g)}}else{var m=n.get("lang"),_='',x=window.open();x.document.write(_),x.document.title=i}else{var b=document.createElement("a");b.download=i+"."+o,b.target="_blank",b.href=s;var w=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});b.dispatchEvent(w)}},e.getDefaultOption=function(t){return{show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:t.getLocale(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:t.getLocale(["toolbox","saveAsImage","lang"])}},e}(RN);GN.prototype.unusable=!a.canvasSupported;var HN="__ec_magicType_stack__",WN=[["line","bar"],["stack"]],UN=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getIcons=function(){var t=this.model,e=t.get("icon"),n={};return P(t.get("type"),(function(t){e[t]&&(n[t]=e[t])})),n},e.getDefaultOption=function(t){return{show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:t.getLocale(["toolbox","magicType","title"]),option:{},seriesIndex:{}}},e.prototype.onclick=function(t,e,n){var i=this.model,r=i.get(["seriesIndex",n]);if(XN[n]){var o,a={series:[]};P(WN,(function(t){D(t,n)>=0&&P(t,(function(t){i.setIconStatus(t,"normal")}))})),i.setIconStatus(n,"emphasis"),t.eachComponent({mainType:"series",query:null==r?null:{seriesIndex:r}},(function(t){var e=t.subType,r=t.id,o=XN[n](e,r,t,i);o&&(T(o,t.option),a.series.push(o));var s=t.coordinateSystem;if(s&&"cartesian2d"===s.type&&("line"===n||"bar"===n)){var l=s.getAxesByScale("ordinal")[0];if(l){var u=l.dim+"Axis",h=t.getReferringComponents(u,Nr).models[0].componentIndex;a[u]=a[u]||[];for(var c=0;c<=h;c++)a[u][h]=a[u][h]||{};a[u][h].boundaryGap="bar"===n}}}));var s=n;"stack"===n&&(o=S({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title),"emphasis"!==i.get(["iconStatus",n])&&(s="tiled")),e.dispatchAction({type:"changeMagicType",currentType:s,newOption:a,newTitle:o,featureName:"magicType"})}},e}(RN),XN={line:function(t,e,n,i){if("bar"===t)return S({id:e,type:"line",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","line"])||{},!0)},bar:function(t,e,n,i){if("line"===t)return S({id:e,type:"bar",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","bar"])||{},!0)},stack:function(t,e,n,i){var r=n.get("stack")===HN;if("line"===t||"bar"===t)return i.setIconStatus("stack",r?"normal":"emphasis"),S({id:e,stack:r?"":HN},i.get(["option","stack"])||{},!0)}};Hm({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},(function(t,e){e.mergeOption(t.newOption)}));var YN=new Array(60).join("-"),ZN="\t";function jN(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var qN=new RegExp("[\t]+","g");function KN(t,e){var n=t.split(new RegExp("\n*"+YN+"\n*","g")),i={series:[]};return P(n,(function(t,n){if(function(t){if(t.slice(0,t.indexOf("\n")).indexOf(ZN)>=0)return!0}(t)){var r=function(t){for(var e=t.split(/\n+/g),n=[],i=O(jN(e.shift()).split(qN),(function(t){return{name:t,data:[]}})),r=0;r=0)&&t(r,i._targetInfoList)}))}return t.prototype.setOutputRanges=function(t,e){return this.matchOutputRanges(t,e,(function(t,e,n){if((t.coordRanges||(t.coordRanges=[])).push(e),!t.coordRange){t.coordRange=e;var i=hz[t.brushType](0,n,e);t.__rangeOffset={offset:pz[t.brushType](i.values,t.range,[1,1]),xyMinMax:i.xyMinMax}}})),t},t.prototype.matchOutputRanges=function(t,e,n){P(t,(function(t){var i=this.findTargetInfo(t,e);i&&!0!==i&&P(i.coordSyses,(function(i){var r=hz[t.brushType](1,i,t.range,!0);n(t,r.values,i,e)}))}),this)},t.prototype.setInputRanges=function(t,e){P(t,(function(t){var n,i,r,o,a,s=this.findTargetInfo(t,e);if(t.range=t.range||[],s&&!0!==s){t.panelId=s.panelId;var l=hz[t.brushType](0,s.coordSys,t.coordRange),u=t.__rangeOffset;t.range=u?pz[t.brushType](l.values,u.offset,(n=l.xyMinMax,i=u.xyMinMax,r=fz(n),o=fz(i),a=[r[0]/o[0],r[1]/o[1]],isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a)):l.values}}),this)},t.prototype.makePanelOpts=function(t,e){return O(this._targetInfoList,(function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:e?e(n):null,clipPath:RA(i),isTargetByCursor:zA(i,t,n.coordSysModel),getLinearBrushOtherExtent:NA(i)}}))},t.prototype.controlSeries=function(t,e,n){var i=this.findTargetInfo(t,n);return!0===i||i&&D(i.coordSyses,e.coordinateSystem)>=0},t.prototype.findTargetInfo=function(t,e){for(var n=this._targetInfoList,i=az(e,t),r=0;rt[1]&&t.reverse(),t}function az(t,e){return Or(t,e,{includeMainTypes:iz})}var sz={grid:function(t,e){var n=t.xAxisModels,i=t.yAxisModels,r=t.gridModels,o=ht(),a={},s={};(n||i||r)&&(P(n,(function(t){var e=t.axis.grid.model;o.set(e.id,e),a[e.id]=!0})),P(i,(function(t){var e=t.axis.grid.model;o.set(e.id,e),s[e.id]=!0})),P(r,(function(t){o.set(t.id,t),a[t.id]=!0,s[t.id]=!0})),o.each((function(t){var r=t.coordinateSystem,o=[];P(r.getCartesians(),(function(t,e){(D(n,t.getAxis("x").model)>=0||D(i,t.getAxis("y").model)>=0)&&o.push(t)})),e.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:o[0],coordSyses:o,getPanelRect:uz.grid,xAxisDeclared:a[t.id],yAxisDeclared:s[t.id]})})))},geo:function(t,e){P(t.geoModels,(function(t){var n=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:n,coordSyses:[n],getPanelRect:uz.geo})}))}},lz=[function(t,e){var n=t.xAxisModel,i=t.yAxisModel,r=t.gridModel;return!r&&n&&(r=n.axis.grid.model),!r&&i&&(r=i.axis.grid.model),r&&r===e.gridModel},function(t,e){var n=t.geoModel;return n&&n===e.geoModel}],uz={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(ju(t)),e}},hz={lineX:B(cz,0),lineY:B(cz,1),rect:function(t,e,n,i){var r=t?e.pointToData([n[0][0],n[1][0]],i):e.dataToPoint([n[0][0],n[1][0]],i),o=t?e.pointToData([n[0][1],n[1][1]],i):e.dataToPoint([n[0][1],n[1][1]],i),a=[oz([r[0],o[0]]),oz([r[1],o[1]])];return{values:a,xyMinMax:a}},polygon:function(t,e,n,i){var r=[[1/0,-1/0],[1/0,-1/0]];return{values:O(n,(function(n){var o=t?e.pointToData(n,i):e.dataToPoint(n,i);return r[0][0]=Math.min(r[0][0],o[0]),r[1][0]=Math.min(r[1][0],o[1]),r[0][1]=Math.max(r[0][1],o[0]),r[1][1]=Math.max(r[1][1],o[1]),o})),xyMinMax:r}}};function cz(t,e,n,i){var r=n.getAxis(["x","y"][t]),o=oz(O([0,1],(function(t){return e?r.coordToData(r.toLocalCoord(i[t]),!0):r.toGlobalCoord(r.dataToCoord(i[t]))}))),a=[];return a[t]=o,a[1-t]=[NaN,NaN],{values:o,xyMinMax:a}}var pz={lineX:B(dz,0),lineY:B(dz,1),rect:function(t,e,n){return[[t[0][0]-n[0]*e[0][0],t[0][1]-n[0]*e[0][1]],[t[1][0]-n[1]*e[1][0],t[1][1]-n[1]*e[1][1]]]},polygon:function(t,e,n){return O(t,(function(t,i){return[t[0]-n[0]*e[i][0],t[1]-n[1]*e[i][1]]}))}};function dz(t,e,n,i){return[e[0]-i[t]*n[0],e[1]-i[t]*n[1]]}function fz(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}var gz,yz,vz=P,mz=_r+"toolbox-dataZoom_",_z=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.render=function(t,e,n,i){this._brushController||(this._brushController=new iA(n.getZr()),this._brushController.on("brush",V(this._onBrush,this)).mount()),function(t,e,n,i,r){var o=n._isZoomActive;i&&"takeGlobalCursor"===i.type&&(o="dataZoomSelect"===i.key&&i.dataZoomSelectActive);n._isZoomActive=o,t.setIconStatus("zoom",o?"emphasis":"normal");var a=new rz(bz(t),e,{include:["grid"]}).makePanelOpts(r,(function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"}));n._brushController.setPanels(a).enableBrush(!(!o||!a.length)&&{brushType:"auto",brushStyle:t.getModel("brushStyle").getItemStyle()})}(t,e,this,i,n),function(t,e){t.setIconStatus("back",function(t){return ez(t).length}(e)>1?"emphasis":"normal")}(t,e)},e.prototype.onclick=function(t,e,n){xz[n].call(this)},e.prototype.remove=function(t,e){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(t,e){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(t){var e=t.areas;if(t.isEnd&&e.length){var n={},i=this.ecModel;this._brushController.updateCovers([]),new rz(bz(this.model),i,{include:["grid"]}).matchOutputRanges(e,i,(function(t,e,n){if("cartesian2d"===n.type){var i=t.brushType;"rect"===i?(r("x",n,e[0]),r("y",n,e[1])):r({lineX:"x",lineY:"y"}[i],n,e)}})),function(t,e){var n=ez(t);QN(e,(function(e,i){for(var r=n.length-1;r>=0&&!n[r][i];r--);if(r<0){var o=t.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(o){var a=o.getPercentRange();n[0][i]={dataZoomId:i,start:a[0],end:a[1]}}}})),n.push(e)}(i,n),this._dispatchZoomAction(n)}function r(t,e,r){var o=e.getAxis(t),a=o.model,s=function(t,e,n){var i;return n.eachComponent({mainType:"dataZoom",subType:"select"},(function(n){n.getAxisModel(t,e.componentIndex)&&(i=n)})),i}(t,a,i),l=s.findRepresentativeAxisProxy(a).getMinMaxSpan();null==l.minValueSpan&&null==l.maxValueSpan||(r=PD(0,r.slice(),o.scale.getExtent(),0,l.minValueSpan,l.maxValueSpan)),s&&(n[s.id]={dataZoomId:s.id,startValue:r[0],endValue:r[1]})}},e.prototype._dispatchZoomAction=function(t){var e=[];vz(t,(function(t,n){e.push(w(t))})),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},e.getDefaultOption=function(t){return{show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:t.getLocale(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}}},e}(RN),xz={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(function(t){var e=ez(t),n=e[e.length-1];e.length>1&&e.pop();var i={};return QN(n,(function(t,n){for(var r=e.length-1;r>=0;r--)if(t=e[r][n]){i[n]=t;break}})),i}(this.ecModel))}};function bz(t){var e={xAxisIndex:t.get("xAxisIndex",!0),yAxisIndex:t.get("yAxisIndex",!0),xAxisId:t.get("xAxisId",!0),yAxisId:t.get("yAxisId",!0)};return null==e.xAxisIndex&&null==e.xAxisId&&(e.xAxisIndex="all"),null==e.yAxisIndex&&null==e.yAxisId&&(e.yAxisIndex="all"),e}gz="dataZoom",yz=function(t){var e=t.getComponent("toolbox",0),n=["feature","dataZoom"];if(e&&null!=e.get(n)){var i=e.getModel(n),r=[],o=Or(t,bz(i));return vz(o.xAxisModels,(function(t){return a(t,"xAxis","xAxisIndex")})),vz(o.yAxisModels,(function(t){return a(t,"yAxis","yAxisIndex")})),r}function a(t,e,n){var o=t.componentIndex,a={type:"select",$fromToolbox:!0,filterMode:i.get("filterMode",!0)||"filter",id:mz+e+o};a[n]=o,r.push(a)}},rt(null==dp.get(gz)&&yz),dp.set(gz,yz);var wz=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={zlevel:0,z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},e}(Xc);function Sz(t){var e=t.get("confine");return null!=e?!!e:"richText"===t.get("renderMode")}function Mz(t){if(a.domSupported)for(var e=document.documentElement.style,n=0,i=t.length;n-1?(o+="top:50%",a+="translateY(-50%) rotate("+("left"===r?-225:-45)+"deg)"):(o+="left:50%",a+="translateX(-50%) rotate("+("top"===r?225:45)+"deg)");var s=e+" solid 1px;";return'
'}(n.get("backgroundColor"),i,r)),H(t))o.innerHTML=t;else if(t){o.innerHTML="",F(t)||(t=[t]);for(var a=0;a=0?this._tryShow(n,i):"leave"===e&&this._hide(i))}),this))},e.prototype._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(){!n.isDisposed()&&i.manuallyShowTip(t,e,n,{x:i._lastX,y:i._lastY,dataByCoordSys:i._lastDataByCoordSys})}))}},e.prototype.manuallyShowTip=function(t,e,n,i){if(i.from!==this.uid&&!a.node){var r=Xz(i,n);this._ticket="";var o=i.dataByCoordSys,s=function(t,e,n){var i=Rr(t).queryOptionMap,r=i.keys()[0];if(!r||"series"===r)return;var o,a=Er(e,r,i.get(r),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(!a)return;if(n.getViewOfComponentModel(a).group.traverse((function(e){var n=_s(e).tooltipConfig;if(n&&n.name===t.name)return o=e,!0})),o)return{componentMainType:r,componentIndex:a.componentIndex,el:o}}(i,e,n);if(s){var l=s.el.getBoundingRect().clone();l.applyTransform(s.el.transform),this._tryShow({offsetX:l.x+l.width/2,offsetY:l.y+l.height/2,target:s.el,position:i.position,positionDefault:"bottom"},r)}else if(i.tooltip&&null!=i.x&&null!=i.y){var u=Hz;u.x=i.x,u.y=i.y,u.update(),_s(u).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:u},r)}else if(o)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:o,tooltipOption:i.tooltipOption},r);else if(null!=i.seriesIndex){if(this._manuallyAxisShowTip(t,e,n,i))return;var h=JO(i,e),c=h.point[0],p=h.point[1];null!=c&&null!=p&&this._tryShow({offsetX:c,offsetY:p,target:h.el,position:i.position,positionDefault:"bottom"},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},r))}},e.prototype.manuallyHideTip=function(t,e,n,i){var r=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&r.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(Xz(i,n))},e.prototype._manuallyAxisShowTip=function(t,e,n,i){var r=i.seriesIndex,o=i.dataIndex,a=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=r&&null!=o&&null!=a){var s=e.getSeriesByIndex(r);if(s)if("axis"===Uz([s.getData().getItemModel(o),s,(s.coordinateSystem||{}).model],this._tooltipModel).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:r,dataIndex:o,position:i.position}),!0}},e.prototype._tryShow=function(t,e){var n=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var i=t.dataByCoordSys;if(i&&i.length)this._showAxisTooltip(i,t);else if(n){var r,o;this._lastDataByCoordSys=null,iy(n,(function(t){return null!=_s(t).dataIndex?(r=t,!0):null!=_s(t).tooltipConfig?(o=t,!0):void 0}),!0),r?this._showSeriesItemTooltip(t,r,e):o?this._showComponentItemTooltip(t,o,e):this._hide(e)}else this._lastDataByCoordSys=null,this._hide(e)}},e.prototype._showOrMove=function(t,e){var n=t.get("showDelay");e=V(e,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(e,n):e()},e.prototype._showAxisTooltip=function(t,e){var n=this._ecModel,i=this._tooltipModel,r=[e.offsetX,e.offsetY],o=Uz([e.tooltipOption],i),a=this._renderMode,s=[],l=tf("section",{blocks:[],noHeader:!0}),u=[],h=new hf;Fz(t,(function(t){Fz(t.dataByAxis,(function(t){var e=n.getComponent(t.axisDim+"Axis",t.axisIndex),i=t.value;if(e&&null!=i){var r=RO(i,e.axis,n,t.seriesDataIndices,t.valueLabelOpt),o=tf("section",{header:r,noHeader:!ot(r),sortBlocks:!0,blocks:[]});l.blocks.push(o),P(t.seriesDataIndices,(function(l){var c=n.getSeriesByIndex(l.seriesIndex),p=l.dataIndexInside,d=c.getDataParams(p);d.axisDim=t.axisDim,d.axisIndex=t.axisIndex,d.axisType=t.axisType,d.axisId=t.axisId,d.axisValue=Gx(e.axis,{value:i}),d.axisValueLabel=r,d.marker=h.makeTooltipMarker("item",kc(d.color),a);var f=Cd(c.formatTooltip(p,!0,null));f.markupFragment&&o.blocks.push(f.markupFragment),f.markupText&&u.push(f.markupText),s.push(d)}))}}))})),l.blocks.reverse(),u.reverse();var c=e.position,p=o.get("order"),d=rf(l,h,a,p,n.get("useUTC"),o.get("textStyle"));d&&u.unshift(d);var f="richText"===a?"\n\n":"
",g=u.join(f);this._showOrMove(o,(function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(o,c,r[0],r[1],this._tooltipContent,s):this._showTooltipContent(o,g,s,Math.random()+"",r[0],r[1],c,null,h)}))},e.prototype._showSeriesItemTooltip=function(t,e,n){var i=this._ecModel,r=_s(e),o=r.seriesIndex,a=i.getSeriesByIndex(o),s=r.dataModel||a,l=r.dataIndex,u=r.dataType,h=s.getData(u),c=this._renderMode,p=t.positionDefault,d=Uz([h.getItemModel(l),s,a&&(a.coordinateSystem||{}).model],this._tooltipModel,p?{position:p}:null),f=d.get("trigger");if(null==f||"item"===f){var g=s.getDataParams(l,u),y=new hf;g.marker=y.makeTooltipMarker("item",kc(g.color),c);var v=Cd(s.formatTooltip(l,!1,u)),m=d.get("order"),_=v.markupFragment?rf(v.markupFragment,y,c,m,i.get("useUTC"),d.get("textStyle")):v.markupText,x="item_"+s.name+"_"+l;this._showOrMove(d,(function(){this._showTooltipContent(d,_,g,x,t.offsetX,t.offsetY,t.position,t.target,y)})),n({type:"showTip",dataIndexInside:l,dataIndex:h.getRawIndex(l),seriesIndex:o,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,e,n){var i=_s(e),r=i.tooltipConfig.option||{};if(H(r)){r={content:r,formatter:r}}var o=[r],a=this._ecModel.getComponent(i.componentMainType,i.componentIndex);a&&o.push(a),o.push({formatter:r.content});var s=t.positionDefault,l=Uz(o,this._tooltipModel,s?{position:s}:null),u=l.get("content"),h=Math.random()+"",c=new hf;this._showOrMove(l,(function(){var n=w(l.get("formatterParams")||{});this._showTooltipContent(l,u,n,h,t.offsetX,t.offsetY,t.position,e,c)})),n({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,e,n,i,r,o,a,s,l){if(this._ticket="",t.get("showContent")&&t.get("show")){var u=this._tooltipContent,h=t.get("formatter");a=a||t.get("position");var c=e,p=this._getNearestPoint([r,o],n,t.get("trigger"),t.get("borderColor")).color;if(h&&H(h)){var d=t.ecModel.get("useUTC"),f=F(n)?n[0]:n;c=h,f&&f.axisType&&f.axisType.indexOf("time")>=0&&(c=ic(f.axisValue,c,d)),c=Ac(c,n,!0)}else if(G(h)){var g=Bz((function(e,i){e===this._ticket&&(u.setContent(i,l,t,p,a),this._updatePosition(t,a,r,o,u,n,s))}),this);this._ticket=i,c=h(n,i,g)}u.setContent(c,l,t,p,a),u.show(t,p),this._updatePosition(t,a,r,o,u,n,s)}},e.prototype._getNearestPoint=function(t,e,n,i){return"axis"===n||F(e)?{color:i||("html"===this._renderMode?"#fff":"none")}:F(e)?void 0:{color:i||e.color||e.borderColor}},e.prototype._updatePosition=function(t,e,n,i,r,o,a){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var u=r.getSize(),h=t.get("align"),c=t.get("verticalAlign"),p=a&&a.getBoundingRect().clone();if(a&&p.applyTransform(a.transform),G(e)&&(e=e([n,i],o,r.el,p,{viewSize:[s,l],contentSize:u.slice()})),F(e))n=Gz(e[0],s),i=Gz(e[1],l);else if(X(e)){var d=e;d.width=u[0],d.height=u[1];var f=Vc(d,{width:s,height:l});n=f.x,i=f.y,h=null,c=null}else if(H(e)&&a){var g=function(t,e,n){var i=n[0],r=n[1],o=10,a=5,s=0,l=0,u=e.width,h=e.height;switch(t){case"inside":s=e.x+u/2-i/2,l=e.y+h/2-r/2;break;case"top":s=e.x+u/2-i/2,l=e.y-r-o;break;case"bottom":s=e.x+u/2-i/2,l=e.y+h+o;break;case"left":s=e.x-i-o-a,l=e.y+h/2-r/2;break;case"right":s=e.x+u+o+a,l=e.y+h/2-r/2}return[s,l]}(e,p,u);n=g[0],i=g[1]}else{g=function(t,e,n,i,r,o,a){var s=n.getOuterSize(),l=s.width,u=s.height;null!=o&&(t+l+o+2>i?t-=l+o:t+=o);null!=a&&(e+u+a>r?e-=u+a:e+=a);return[t,e]}(n,i,r,s,l,h?null:20,c?null:20);n=g[0],i=g[1]}if(h&&(n-=Yz(h)?u[0]/2:"right"===h?u[0]:0),c&&(i-=Yz(c)?u[1]/2:"bottom"===c?u[1]:0),Sz(t)){g=function(t,e,n,i,r){var o=n.getOuterSize(),a=o.width,s=o.height;return t=Math.min(t+a,i)-a,e=Math.min(e+s,r)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}(n,i,r,s,l);n=g[0],i=g[1]}r.moveTo(n,i)},e.prototype._updateContentNotChangedOnAxis=function(t){var e=this._lastDataByCoordSys,n=!!e&&e.length===t.length;return n&&Fz(e,(function(e,i){var r=e.dataByAxis||[],o=(t[i]||{}).dataByAxis||[];(n=n&&r.length===o.length)&&Fz(r,(function(t,e){var i=o[e]||{},r=t.seriesDataIndices||[],a=i.seriesDataIndices||[];(n=n&&t.value===i.value&&t.axisType===i.axisType&&t.axisId===i.axisId&&r.length===a.length)&&Fz(r,(function(t,e){var i=a[e];n=n&&t.seriesIndex===i.seriesIndex&&t.dataIndex===i.dataIndex}))}))})),this._lastDataByCoordSys=t,!!n},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,e){a.node||(this._tooltipContent.dispose(),KO("itemTooltip",e))},e.type="tooltip",e}(wf);function Uz(t,e,n){var i,r=e.ecModel;n?(i=new Oh(n,r,r),i=new Oh(e.option,i,r)):i=e;for(var o=t.length-1;o>=0;o--){var a=t[o];a&&(a instanceof Oh&&(a=a.get("tooltip",!0)),H(a)&&(a={formatter:a}),a&&(i=new Oh(a,i,r)))}return i}function Xz(t,e){return t.dispatchAction||V(e.dispatchAction,e)}function Yz(t){return"center"===t||"middle"===t}var Zz=["rect","polygon","keep","clear"];function jz(t,e){var n=xr(t?t.brush:[]);if(n.length){var i=[];P(n,(function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(i=i.concat(e))}));var r=t&&t.toolbox;F(r)&&(r=r[0]),r||(r={feature:{}},t.toolbox=[r]);var o=r.feature||(r.feature={}),a=o.brush||(o.brush={}),s=a.type||(a.type=[]);s.push.apply(s,i),function(t){var e={};P(t,(function(t){e[t]=1})),t.length=0,P(e,(function(e,n){t.push(n)}))}(s),e&&!s.length&&s.push.apply(s,Zz)}}var qz=P;function Kz(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return!0}function $z(t,e,n){var i={};return qz(e,(function(e){var r,o=i[e]=((r=function(){}).prototype.__hidden=r.prototype,new r);qz(t[e],(function(t,i){if(TT.isValidType(i)){var r={type:i,visual:t};n&&n(r,e),o[i]=new TT(r),"opacity"===i&&((r=w(r)).type="colorAlpha",o.__hidden.__alphaForOpacity=new TT(r))}}))})),i}function Jz(t,e,n){var i;P(n,(function(t){e.hasOwnProperty(t)&&Kz(e[t])&&(i=!0)})),i&&P(n,(function(n){e.hasOwnProperty(n)&&Kz(e[n])?t[n]=w(e[n]):delete t[n]}))}var Qz={lineX:tE(0),lineY:tE(1),rect:{point:function(t,e,n){return t&&n.boundingRect.contain(t[0],t[1])},rect:function(t,e,n){return t&&n.boundingRect.intersect(t)}},polygon:{point:function(t,e,n){return t&&n.boundingRect.contain(t[0],t[1])&&uv(n.range,t[0],t[1])},rect:function(t,e,n){var i=n.range;if(!t||i.length<=1)return!1;var r=t.x,o=t.y,a=t.width,s=t.height,l=i[0];return!!(uv(i,r,o)||uv(i,r+a,o)||uv(i,r,o+s)||uv(i,r+a,o+s)||gi.create(t).contain(l[0],l[1])||nh(r,o,r+a,o,i)||nh(r,o,r,o+s,i)||nh(r+a,o,r+a,o+s,i)||nh(r,o+s,r+a,o+s,i))||void 0}}};function tE(t){var e=["x","y"],n=["width","height"];return{point:function(e,n,i){if(e){var r=i.range;return eE(e[t],r)}},rect:function(i,r,o){if(i){var a=o.range,s=[i[e[t]],i[e[t]]+i[n[t]]];return s[1]e[0][1]&&(e[0][1]=o[0]),o[1]e[1][1]&&(e[1][1]=o[1])}return e&&hE(e)}};function hE(t){return new gi(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var cE=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.init=function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new iA(e.getZr())).on("brush",V(this._onBrush,this)).mount()},e.prototype.render=function(t,e,n,i){this.model=t,this._updateController(t,e,n,i)},e.prototype.updateTransform=function(t,e,n,i){oE(e),this._updateController(t,e,n,i)},e.prototype.updateVisual=function(t,e,n,i){this.updateTransform(t,e,n,i)},e.prototype.updateView=function(t,e,n,i){this._updateController(t,e,n,i)},e.prototype._updateController=function(t,e,n,i){(!i||i.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(n)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var e=this.model.id,n=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:e,areas:w(n),$from:e}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:e,areas:w(n),$from:e})},e.type="brush",e}(wf),pE=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.areas=[],n.brushOption={},n}return n(e,t),e.prototype.optionUpdated=function(t,e){var n=this.option;!e&&Jz(n,t,["inBrush","outOfBrush"]);var i=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:"#ddd"},i.hasOwnProperty("liftZ")||(i.liftZ=5)},e.prototype.setAreas=function(t){t&&(this.areas=O(t,(function(t){return dE(this.option,t)}),this))},e.prototype.setBrushOption=function(t){this.brushOption=dE(this.option,t),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},e}(Xc);function dE(t,e){return S({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new Oh(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}var fE=["rect","polygon","lineX","lineY","keep","clear"],gE=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.render=function(t,e,n){var i,r,o;e.eachComponent({mainType:"brush"},(function(t){i=t.brushType,r=t.brushOption.brushMode||"single",o=o||!!t.areas.length})),this._brushType=i,this._brushMode=r,P(t.get("type",!0),(function(e){t.setIconStatus(e,("keep"===e?"multiple"===r:"clear"===e?o:e===i)?"emphasis":"normal")}))},e.prototype.updateView=function(t,e,n){this.render(t,e,n)},e.prototype.getIcons=function(){var t=this.model,e=t.get("icon",!0),n={};return P(t.get("type",!0),(function(t){e[t]&&(n[t]=e[t])})),n},e.prototype.onclick=function(t,e,n){var i=this._brushType,r=this._brushMode;"clear"===n?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===n?i:i!==n&&n,brushMode:"keep"===n?"multiple"===r?"single":"multiple":r}})},e.getDefaultOption=function(t){return{show:!0,type:fE.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:t.getLocale(["toolbox","brush","title"])}},e}(RN);var yE=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.layoutMode={type:"box",ignoreSize:!0},n}return n(e,t),e.type="title",e.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:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},e}(Xc),vE=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){if(this.group.removeAll(),t.get("show")){var i=this.group,r=t.getModel("textStyle"),o=t.getModel("subtextStyle"),a=t.get("textAlign"),s=tt(t.get("textBaseline"),t.get("textVerticalAlign")),l=new cs({style:ph(r,{text:t.get("text"),fill:r.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),h=t.get("subtext"),c=new cs({style:ph(o,{text:h,fill:o.getTextColor(),y:u.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),p=t.get("link"),d=t.get("sublink"),f=t.get("triggerEvent",!0);l.silent=!p&&!f,c.silent=!d&&!f,p&&l.on("click",(function(){Pc(p,"_"+t.get("target"))})),d&&c.on("click",(function(){Pc(d,"_"+t.get("subtarget"))})),_s(l).eventData=_s(c).eventData=f?{componentType:"title",componentIndex:t.componentIndex}:null,i.add(l),h&&i.add(c);var g=i.getBoundingRect(),y=t.getBoxLayoutParams();y.width=g.width,y.height=g.height;var v=Vc(y,{width:n.getWidth(),height:n.getHeight()},t.get("padding"));a||("middle"===(a=t.get("left")||t.get("right"))&&(a="center"),"right"===a?v.x+=v.width:"center"===a&&(v.x+=v.width/2)),s||("center"===(s=t.get("top")||t.get("bottom"))&&(s="middle"),"bottom"===s?v.y+=v.height:"middle"===s&&(v.y+=v.height/2),s=s||"top"),i.x=v.x,i.y=v.y,i.markRedraw();var m={align:a,verticalAlign:s};l.setStyle(m),c.setStyle(m),g=i.getBoundingRect();var _=v.margin,x=t.getItemStyle(["color","opacity"]);x.fill=t.get("backgroundColor");var b=new ls({shape:{x:g.x-_[3],y:g.y-_[0],width:g.width+_[1]+_[3],height:g.height+_[0]+_[2],r:t.get("borderRadius")},style:x,subPixelOptimize:!0,silent:!0});i.add(b)}},e.type="title",e}(wf);var mE=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.layoutMode="box",n}return n(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n),this._initData()},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(t){null==t&&(t=this.option.currentIndex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(t>=e&&(t=e-1),t<0&&(t=0)),this.option.currentIndex=t},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(t){this.option.autoPlay=!!t},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var t,e=this.option,n=e.data||[],i=e.axisType,r=this._names=[];"category"===i?(t=[],P(n,(function(e,n){var i,o=Cr(Sr(e),"");X(e)?(i=w(e)).value=n:i=n,t.push(i),r.push(o)}))):t=n;var o={category:"ordinal",time:"time",value:"number"}[i]||"number";(this._data=new L_([{name:"value",type:o}],this)).initData(t,r)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if("category"===this.get("axisType"))return this._names.slice()},e.type="timeline",e.defaultOption={zlevel:0,z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},e}(Xc),_E=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="timeline.slider",e.defaultOption=zh(mE.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),e}(mE);L(_E,Td.prototype);var xE=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="timeline",e}(wf),bE=function(t){function e(e,n,i,r){var o=t.call(this,e,n,i)||this;return o.type=r||"value",o}return n(e,t),e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return"horizontal"===this.model.get("orient")},e}(hb),wE=Math.PI,SE=kr(),ME=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.init=function(t,e){this.api=e},e.prototype.render=function(t,e,n){if(this.model=t,this.api=n,this.ecModel=e,this.group.removeAll(),t.get("show",!0)){var i=this._layout(t,n),r=this._createGroup("_mainGroup"),o=this._createGroup("_labelGroup"),a=this._axis=this._createAxis(i,t);t.formatTooltip=function(t){return tf("nameValue",{noName:!0,value:a.scale.getLabel({value:t})})},P(["AxisLine","AxisTick","Control","CurrentPointer"],(function(e){this["_render"+e](i,r,a,t)}),this),this._renderAxisLabel(i,o,a,t),this._position(i,t)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(t,e){var n,i,r,o,a=t.get(["label","position"]),s=t.get("orient"),l=function(t,e){return Vc(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},t.get("padding"))}(t,e),u={horizontal:"center",vertical:(n=null==a||"auto"===a?"horizontal"===s?l.y+l.height/2=0||"+"===n?"left":"right"},h={horizontal:n>=0||"+"===n?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:wE/2},p="vertical"===s?l.height:l.width,d=t.getModel("controlStyle"),f=d.get("show",!0),g=f?d.get("itemSize"):0,y=f?d.get("itemGap"):0,v=g+y,m=t.get(["label","rotate"])||0;m=m*wE/180;var _=d.get("position",!0),x=f&&d.get("showPlayBtn",!0),b=f&&d.get("showPrevBtn",!0),w=f&&d.get("showNextBtn",!0),S=0,M=p;"left"===_||"bottom"===_?(x&&(i=[0,0],S+=v),b&&(r=[S,0],S+=v),w&&(o=[M-g,0],M-=v)):(x&&(i=[M-g,0],M-=v),b&&(r=[0,0],S+=v),w&&(o=[M-g,0],M-=v));var I=[S,M];return t.get("inverse")&&I.reverse(),{viewRect:l,mainLength:p,orient:s,rotation:c[s],labelRotation:m,labelPosOpt:n,labelAlign:t.get(["label","align"])||u[s],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||h[s],playPosition:i,prevBtnPosition:r,nextBtnPosition:o,axisExtent:I,controlSize:g,controlGap:y}},e.prototype._position=function(t,e){var n=this._mainGroup,i=this._labelGroup,r=t.viewRect;if("vertical"===t.orient){var o=[1,0,0,1,0,0],a=r.x,s=r.y+r.height;Un(o,o,[-a,-s]),Xn(o,o,-wE/2),Un(o,o,[a,s]),(r=r.clone()).applyTransform(o)}var l=y(r),u=y(n.getBoundingRect()),h=y(i.getBoundingRect()),c=[n.x,n.y],p=[i.x,i.y];p[0]=c[0]=l[0][0];var d,f=t.labelPosOpt;null==f||H(f)?(v(c,u,l,1,d="+"===f?0:1),v(p,h,l,1,1-d)):(v(c,u,l,1,d=f>=0?0:1),p[1]=c[1]+f);function g(t){t.originX=l[0][0]-t.x,t.originY=l[1][0]-t.y}function y(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function v(t,e,n,i,r){t[i]+=n[i][r]-e[i][r]}n.setPosition(c),i.setPosition(p),n.rotation=i.rotation=t.rotation,g(n),g(i)},e.prototype._createAxis=function(t,e){var n=e.getData(),i=e.get("axisType"),r=function(t,e){if(e=e||t.get("type"))switch(e){case"category":return new $_({ordinalMeta:t.getCategories(),extent:[1/0,-1/0]});case"time":return new dx({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new Q_}}(e,i);r.getTicks=function(){return n.mapArray(["value"],(function(t){return{value:t}}))};var o=n.getDataExtent("value");r.setExtent(o[0],o[1]),r.niceTicks();var a=new bE("value",r,t.axisExtent,i);return a.model=e,a},e.prototype._createGroup=function(t){var e=this[t]=new Ei;return this.group.add(e),e},e.prototype._renderAxisLine=function(t,e,n,i){var r=n.getExtent();if(i.get(["lineStyle","show"])){var o=new uu({shape:{x1:r[0],y1:0,x2:r[1],y2:0},style:I({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});e.add(o);var a=this._progressLine=new uu({shape:{x1:r[0],x2:this._currentPointer?this._currentPointer.x:r[0],y1:0,y2:0},style:T({lineCap:"round",lineWidth:o.style.lineWidth},i.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});e.add(a)}},e.prototype._renderAxisTick=function(t,e,n,i){var r=this,o=i.getData(),a=n.scale.getTicks();this._tickSymbols=[],P(a,(function(t){var a=n.dataToCoord(t.value),s=o.getItemModel(t.value),l=s.getModel("itemStyle"),u=s.getModel(["emphasis","itemStyle"]),h=s.getModel(["progress","itemStyle"]),c={x:a,y:0,onclick:V(r._changeTimeline,r,t.value)},p=IE(s,l,e,c);p.ensureState("emphasis").style=u.getItemStyle(),p.ensureState("progress").style=h.getItemStyle(),sl(p);var d=_s(p);s.get("tooltip")?(d.dataIndex=t.value,d.dataModel=i):d.dataIndex=d.dataModel=null,r._tickSymbols.push(p)}))},e.prototype._renderAxisLabel=function(t,e,n,i){var r=this;if(n.getLabelModel().get("show")){var o=i.getData(),a=n.getViewLabels();this._tickLabels=[],P(a,(function(i){var a=i.tickValue,s=o.getItemModel(a),l=s.getModel("label"),u=s.getModel(["emphasis","label"]),h=s.getModel(["progress","label"]),c=n.dataToCoord(i.tickValue),p=new cs({x:c,y:0,rotation:t.labelRotation-t.rotation,onclick:V(r._changeTimeline,r,a),silent:!1,style:ph(l,{text:i.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});p.ensureState("emphasis").style=ph(u),p.ensureState("progress").style=ph(h),e.add(p),sl(p),SE(p).dataIndex=a,r._tickLabels.push(p)}))}},e.prototype._renderControl=function(t,e,n,i){var r=t.controlSize,o=t.rotation,a=i.getModel("controlStyle").getItemStyle(),s=i.getModel(["emphasis","controlStyle"]).getItemStyle(),l=i.getPlayState(),u=i.get("inverse",!0);function h(t,n,l,u){if(t){var h=Ii(tt(i.get(["controlStyle",n+"BtnSize"]),r),r),c=function(t,e,n,i){var r=i.style,o=eh(t.get(["controlStyle",e]),i||{},new gi(n[0],n[1],n[2],n[3]));r&&o.setStyle(r);return o}(i,n+"Icon",[0,-h/2,h,h],{x:t[0],y:t[1],originX:r/2,originY:0,rotation:u?-o:0,rectHover:!0,style:a,onclick:l});c.ensureState("emphasis").style=s,e.add(c),sl(c)}}h(t.nextBtnPosition,"next",V(this._changeTimeline,this,u?"-":"+")),h(t.prevBtnPosition,"prev",V(this._changeTimeline,this,u?"+":"-")),h(t.playPosition,l?"stop":"play",V(this._handlePlayClick,this,!l),!0)},e.prototype._renderCurrentPointer=function(t,e,n,i){var r=i.getData(),o=i.getCurrentIndex(),a=r.getItemModel(o).getModel("checkpointStyle"),s=this,l={onCreate:function(t){t.draggable=!0,t.drift=V(s._handlePointerDrag,s),t.ondragend=V(s._handlePointerDragend,s),TE(t,s._progressLine,o,n,i,!0)},onUpdate:function(t){TE(t,s._progressLine,o,n,i)}};this._currentPointer=IE(a,a,this._mainGroup,{},this._currentPointer,l)},e.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},e.prototype._handlePointerDrag=function(t,e,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,e){var n=this._toAxisCoord(t)[0],i=qi(this._axis.getExtent().slice());n>i[1]&&(n=i[1]),n=0&&(a[o]=+a[o].toFixed(c)),[a,h]}var zE={min:B(NE,"min"),max:B(NE,"max"),average:B(NE,"average"),median:B(NE,"median")};function EE(t,e){var n=t.getData(),i=t.coordinateSystem;if(e&&!function(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}(e)&&!F(e.coord)&&i){var r=i.dimensions,o=VE(e,n,i,t);if((e=w(e)).type&&zE[e.type]&&o.baseAxis&&o.valueAxis){var a=D(r,o.baseAxis.dim),s=D(r,o.valueAxis.dim),l=zE[e.type](n,o.baseDataDim,o.valueDataDim,a,s);e.coord=l[0],e.value=l[1]}else{for(var u=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],h=0;h<2;h++)zE[u[h]]&&(u[h]=GE(n,n.mapDimension(r[h]),u[h]));e.coord=u}}return e}function VE(t,e,n,i){var r={};return null!=t.valueIndex||null!=t.valueDim?(r.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,r.valueAxis=n.getAxis(function(t,e){var n=t.getData(),i=n.dimensions;e=n.getDimension(e);for(var r=0;r=0&&"number"==typeof l&&(l=+l.toFixed(Math.min(f,20))),p.coord[h]=d.coord[h]=l,r=[p,d,{type:a,valueIndex:i.valueIndex,value:l}]}else r=[]}var g=[EE(t,r[0]),EE(t,r[1]),I({},r[2])];return g[2].type=g[2].type||null,S(g[2],g[0]),S(g[2],g[1]),g};function qE(t){return!isNaN(t)&&!isFinite(t)}function KE(t,e,n,i){var r=1-t,o=i.dimensions[t];return qE(e[r])&&qE(n[r])&&e[t]===n[t]&&i.getAxis(o).containData(e[t])}function $E(t,e){if("cartesian2d"===t.type){var n=e[0].coord,i=e[1].coord;if(n&&i&&(KE(1,n,i,t)||KE(0,n,i,t)))return!0}return BE(t,e[0])&&BE(t,e[1])}function JE(t,e,n,i,r){var o,a=i.coordinateSystem,s=t.getItemModel(e),l=Zi(s.get("x"),r.getWidth()),u=Zi(s.get("y"),r.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition)o=i.getMarkerPosition(t.getValues(t.dimensions,e));else{var h=a.dimensions,c=t.get(h[0],e),p=t.get(h[1],e);o=a.dataToPoint([c,p])}if(Nw(a,"cartesian2d")){var d=a.getAxis("x"),f=a.getAxis("y");h=a.dimensions;qE(t.get(h[0],e))?o[0]=d.toGlobalCoord(d.getExtent()[n?0:1]):qE(t.get(h[1],e))&&(o[1]=f.toGlobalCoord(f.getExtent()[n?0:1]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}else o=[l,u];t.setItemLayout(e,o)}var QE=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.updateTransform=function(t,e,n){e.eachSeries((function(t){var e=OE.getMarkerModelFromSeries(t,"markLine");if(e){var i=e.getData(),r=ZE(e).from,o=ZE(e).to;r.each((function(e){JE(r,e,!0,t,n),JE(o,e,!1,t,n)})),i.each((function(t){i.setItemLayout(t,[r.getItemLayout(t),o.getItemLayout(t)])})),this.markerGroupMap.get(t.id).updateLayout()}}),this)},e.prototype.renderSeries=function(t,e,n,i){var r=t.coordinateSystem,o=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,new VC);this.group.add(l.group);var u=function(t,e,n){var i;i=t?O(t&&t.dimensions,(function(t){return T({name:t},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{})})):[{name:"value",type:"float"}];var r=new L_(i,n),o=new L_(i,n),a=new L_([],n),s=O(n.get("data"),B(jE,e,t,n));t&&(s=N(s,B($E,t)));var l=t?FE:function(t){return t.value};return r.initData(O(s,(function(t){return t[0]})),null,l),o.initData(O(s,(function(t){return t[1]})),null,l),a.initData(O(s,(function(t){return t[2]}))),a.hasItemOption=!0,{from:r,to:o,line:a}}(r,t,e),h=u.from,c=u.to,p=u.line;ZE(e).from=h,ZE(e).to=c,e.setData(p);var d=e.get("symbol"),f=e.get("symbolSize"),g=e.get("symbolRotate"),y=e.get("symbolOffset");function v(e,n,r){var o=e.getItemModel(n);JE(e,n,r,t,i);var s=o.getModel("itemStyle").getItemStyle();null==s.fill&&(s.fill=mg(a,"color")),e.setItemVisual(n,{symbolKeepAspect:o.get("symbolKeepAspect"),symbolOffset:tt(o.get("symbolOffset"),y[r?0:1]),symbolRotate:tt(o.get("symbolRotate",!0),g[r?0:1]),symbolSize:tt(o.get("symbolSize"),f[r?0:1]),symbol:tt(o.get("symbol",!0),d[r?0:1]),style:s})}F(d)||(d=[d,d]),F(f)||(f=[f,f]),F(g)||(g=[g,g]),F(y)||(y=[y,y]),u.from.each((function(t){v(h,t,!0),v(c,t,!1)})),p.each((function(t){var e=p.getItemModel(t).getModel("lineStyle").getLineStyle();p.setItemLayout(t,[h.getItemLayout(t),c.getItemLayout(t)]),null==e.stroke&&(e.stroke=h.getItemVisual(t,"style").fill),p.setItemVisual(t,{fromSymbolKeepAspect:h.getItemVisual(t,"symbolKeepAspect"),fromSymbolOffset:h.getItemVisual(t,"symbolOffset"),fromSymbolRotate:h.getItemVisual(t,"symbolRotate"),fromSymbolSize:h.getItemVisual(t,"symbolSize"),fromSymbol:h.getItemVisual(t,"symbol"),toSymbolKeepAspect:c.getItemVisual(t,"symbolKeepAspect"),toSymbolOffset:c.getItemVisual(t,"symbolOffset"),toSymbolRotate:c.getItemVisual(t,"symbolRotate"),toSymbolSize:c.getItemVisual(t,"symbolSize"),toSymbol:c.getItemVisual(t,"symbol"),style:e})})),l.updateData(p),u.line.eachItemGraphicEl((function(t,n){t.traverse((function(t){_s(t).dataModel=e}))})),this.markKeep(l),l.group.silent=e.get("silent")||t.get("silent")},e.type="markLine",e}(WE);var tV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.createMarkerModelFromSeries=function(t,n,i){return new e(t,n,i)},e.type="markArea",e.defaultOption={zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(OE),eV=kr(),nV=function(t,e,n,i){var r=EE(t,i[0]),o=EE(t,i[1]),a=r.coord,s=o.coord;a[0]=Q(a[0],-1/0),a[1]=Q(a[1],-1/0),s[0]=Q(s[0],1/0),s[1]=Q(s[1],1/0);var l=M([{},r,o]);return l.coord=[r.coord,o.coord],l.x0=r.x,l.y0=r.y,l.x1=o.x,l.y1=o.y,l};function iV(t){return!isNaN(t)&&!isFinite(t)}function rV(t,e,n,i){var r=1-t;return iV(e[r])&&iV(n[r])}function oV(t,e){var n=e.coord[0],i=e.coord[1];return!!(Nw(t,"cartesian2d")&&n&&i&&(rV(1,n,i)||rV(0,n,i)))||(BE(t,{coord:n,x:e.x0,y:e.y0})||BE(t,{coord:i,x:e.x1,y:e.y1}))}function aV(t,e,n,i,r){var o,a=i.coordinateSystem,s=t.getItemModel(e),l=Zi(s.get(n[0]),r.getWidth()),u=Zi(s.get(n[1]),r.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition)o=i.getMarkerPosition(t.getValues(n,e));else{var h=[d=t.get(n[0],e),f=t.get(n[1],e)];a.clampData&&a.clampData(h,h),o=a.dataToPoint(h,!0)}if(Nw(a,"cartesian2d")){var c=a.getAxis("x"),p=a.getAxis("y"),d=t.get(n[0],e),f=t.get(n[1],e);iV(d)?o[0]=c.toGlobalCoord(c.getExtent()["x0"===n[0]?0:1]):iV(f)&&(o[1]=p.toGlobalCoord(p.getExtent()["y0"===n[1]?0:1]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}else o=[l,u];return o}var sV=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],lV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.updateTransform=function(t,e,n){e.eachSeries((function(t){var e=OE.getMarkerModelFromSeries(t,"markArea");if(e){var i=e.getData();i.each((function(e){var r=O(sV,(function(r){return aV(i,e,r,t,n)}));i.setItemLayout(e,r),i.getItemGraphicEl(e).setShape("points",r)}))}}),this)},e.prototype.renderSeries=function(t,e,n,i){var r=t.coordinateSystem,o=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,{group:new Ei});this.group.add(l.group),this.markKeep(l);var u=function(t,e,n){var i,r,o=["x0","y0","x1","y1"];t?(i=O(t&&t.dimensions,(function(t){var n=e.getData();return T({name:t},n.getDimensionInfo(n.mapDimension(t))||{})})),r=new L_(O(o,(function(t,e){return{name:t,type:i[e%2].type}})),n)):r=new L_(i=[{name:"value",type:"float"}],n);var a=O(n.get("data"),B(nV,e,t,n));t&&(a=N(a,B(oV,t)));var s=t?function(t,e,n,i){return t.coord[Math.floor(i/2)][i%2]}:function(t){return t.value};return r.initData(a,null,s),r.hasItemOption=!0,r}(r,t,e);e.setData(u),u.each((function(e){var n=O(sV,(function(n){return aV(u,e,n,t,i)})),o=r.getAxis("x").scale,s=r.getAxis("y").scale,l=o.getExtent(),h=s.getExtent(),c=[o.parse(u.get("x0",e)),o.parse(u.get("x1",e))],p=[s.parse(u.get("y0",e)),s.parse(u.get("y1",e))];qi(c),qi(p);var d=!!(l[0]>c[1]||l[1]p[1]||h[1]=0},e.prototype.getOrient=function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.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,symbolRotate:"inherit",inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",decal:"inherit",shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit",shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:" sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},e}(Xc),hV=B,cV=P,pV=Ei,dV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.newlineDisabled=!1,n}return n(e,t),e.prototype.init=function(){this.group.add(this._contentGroup=new pV),this.group.add(this._selectorGroup=new pV),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(t,e,n){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),t.get("show",!0)){var r=t.get("align"),o=t.get("orient");r&&"auto"!==r||(r="right"===t.get("left")&&"vertical"===o?"right":"left");var a=t.get("selector",!0),s=t.get("selectorPosition",!0);!a||s&&"auto"!==s||(s="horizontal"===o?"end":"start"),this.renderInner(r,t,e,n,a,o,s);var l=t.getBoxLayoutParams(),u={width:n.getWidth(),height:n.getHeight()},h=t.get("padding"),c=Vc(l,u,h),p=this.layoutInner(t,r,c,i,a,s),d=Vc(T({width:p.width,height:p.height},l),u,h);this.group.x=d.x-p.x,this.group.y=d.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=BN(p,t))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(t,e,n,i,r,o,a){var s=this.getContentGroup(),l=ht(),u=e.get("selectedMode"),h=[];n.eachRawSeries((function(t){!t.get("legendHoverLink")&&h.push(t.id)})),cV(e.getData(),(function(r,o){var a=r.get("name");if(!this.newlineDisabled&&(""===a||"\n"===a)){var c=new pV;return c.newline=!0,void s.add(c)}var p=n.getSeriesByName(a)[0];if(!l.get(a)){if(p){var d=p.getData(),f=d.getVisual("legendLineStyle")||{},g=d.getVisual("legendIcon"),y=d.getVisual("style");this._createItem(p,a,o,r,e,t,f,y,g,u).on("click",hV(fV,a,null,i,h)).on("mouseover",hV(yV,p.name,null,i,h)).on("mouseout",hV(vV,p.name,null,i,h)),l.set(a,!0)}else n.eachRawSeries((function(n){if(!l.get(a)&&n.legendVisualProvider){var s=n.legendVisualProvider;if(!s.containName(a))return;var c=s.indexOfName(a),p=s.getItemVisual(c,"style"),d=s.getItemVisual(c,"legendIcon"),f=He(p.fill);f&&0===f[3]&&(f[3]=.2,p.fill=Je(f,"rgba")),this._createItem(n,a,o,r,e,t,{},p,d,u).on("click",hV(fV,null,a,i,h)).on("mouseover",hV(yV,null,a,i,h)).on("mouseout",hV(vV,null,a,i,h)),l.set(a,!0)}}),this);0}}),this),r&&this._createSelector(r,e,i,o,a)},e.prototype._createSelector=function(t,e,n,i,r){var o=this.getSelectorGroup();cV(t,(function(t){var i=t.type,r=new cs({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:"all"===i?"legendAllSelect":"legendInverseSelect"})}});o.add(r),hh(r,{normal:e.getModel("selectorLabel"),emphasis:e.getModel(["emphasis","selectorLabel"])},{defaultText:t.title}),sl(r)}))},e.prototype._createItem=function(t,e,n,i,r,o,a,s,l,u){var h=t.visualDrawType,c=r.get("itemWidth"),p=r.get("itemHeight"),d=r.isSelected(e),f=i.get("symbolRotate"),g=i.get("icon"),y=function(t,e,n,i,r,o,a){for(var s=e.getModel("itemStyle"),l=Lh.concat([["decal"]]),u={},h=0;h0?2:0:u[p]=y}var d=e.getModel("lineStyle"),f=Ch.concat([["inactiveColor"],["inactiveWidth"]]),g={};for(h=0;h0?2:0:g[p]=y}if("auto"===u.fill&&(u.fill=r.fill),"auto"===u.stroke&&(u.stroke=r.fill),"auto"===g.stroke&&(g.stroke=r.fill),!a){var v=e.get("inactiveBorderWidth"),m=u[t.indexOf("empty")>-1?"fill":"stroke"];u.lineWidth="auto"===v?r.lineWidth>0&&m?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),g.stroke=n.get("inactiveColor"),g.lineWidth=n.get("inactiveWidth")}return{itemStyle:u,lineStyle:g}}(l=g||l||"roundRect",i,r.getModel("lineStyle"),a,s,h,d),v=new pV,m=i.getModel("textStyle");if("function"!=typeof t.getLegendIcon||g&&"inherit"!==g){var _="inherit"===g&&t.getData().getVisual("symbol")?"inherit"===f?t.getData().getVisual("symbolRotate"):f:0;v.add(function(t){var e=t.icon||"roundRect",n=fy(e,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill);n.setStyle(t.itemStyle),n.rotation=(t.iconRotate||0)*Math.PI/180,n.setOrigin([t.itemWidth/2,t.itemHeight/2]),e.indexOf("empty")>-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2);return n}({itemWidth:c,itemHeight:p,icon:l,iconRotate:_,itemStyle:y.itemStyle,lineStyle:y.lineStyle}))}else v.add(t.getLegendIcon({itemWidth:c,itemHeight:p,icon:l,iconRotate:f,itemStyle:y.itemStyle,lineStyle:y.lineStyle}));var x="left"===o?c+5:-5,b=o,w=r.get("formatter"),S=e;"string"==typeof w&&w?S=w.replace("{name}",null!=e?e:""):"function"==typeof w&&(S=w(e));var M=i.get("inactiveColor");v.add(new cs({style:ph(m,{text:S,x:x,y:p/2,fill:d?m.getTextColor():M,align:b,verticalAlign:"middle"})}));var I=new ls({shape:v.getBoundingRect(),invisible:!0}),T=i.getModel("tooltip");return T.get("show")&&oh({el:I,componentModel:r,itemName:e,itemTooltipOption:T.option}),v.add(I),v.eachChild((function(t){t.silent=!0})),I.silent=!u,this.getContentGroup().add(v),sl(v),v.__legendDataIndex=n,v},e.prototype.layoutInner=function(t,e,n,i,r,o){var a=this.getContentGroup(),s=this.getSelectorGroup();Ec(t.get("orient"),a,t.get("itemGap"),n.width,n.height);var l=a.getBoundingRect(),u=[-l.x,-l.y];if(s.markRedraw(),a.markRedraw(),r){Ec("horizontal",s,t.get("selectorItemGap",!0));var h=s.getBoundingRect(),c=[-h.x,-h.y],p=t.get("selectorButtonGap",!0),d=t.getOrient().index,f=0===d?"width":"height",g=0===d?"height":"width",y=0===d?"y":"x";"end"===o?c[d]+=l[f]+p:u[d]+=h[f]+p,c[1-d]+=l[g]/2-h[g]/2,s.x=c[0],s.y=c[1],a.x=u[0],a.y=u[1];var v={x:0,y:0};return v[f]=l[f]+p+h[f],v[g]=Math.max(l[g],h[g]),v[y]=Math.min(0,h[y]+c[1-d]),v}return a.x=u[0],a.y=u[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(wf);function fV(t,e,n,i){vV(t,e,n,i),n.dispatchAction({type:"legendToggleSelect",name:null!=t?t:e}),yV(t,e,n,i)}function gV(t){for(var e,n=t.getZr().storage.getDisplayList(),i=0,r=n.length;in[r],f=[-c.x,-c.y];e||(f[i]=l[s]);var g=[0,0],y=[-p.x,-p.y],v=tt(t.get("pageButtonGap",!0),t.get("itemGap",!0));d&&("end"===t.get("pageButtonPosition",!0)?y[i]+=n[r]-p[r]:g[i]+=p[r]+v);y[1-i]+=c[o]/2-p[o]/2,l.setPosition(f),u.setPosition(g),h.setPosition(y);var m={x:0,y:0};if(m[r]=d?n[r]:c[r],m[o]=Math.max(c[o],p[o]),m[a]=Math.min(0,p[a]+y[1-i]),u.__rectSize=n[r],d){var _={x:0,y:0};_[r]=Math.max(n[r]-p[r]-v,0),_[o]=m[o],u.setClipPath(new ls({shape:_})),u.__rectSize=_[r]}else h.eachChild((function(t){t.attr({invisible:!0,silent:!0})}));var x=this._getPageInfo(t);return null!=x.pageIndex&&Hu(l,{x:x.contentPosition[0],y:x.contentPosition[1]},d?t:null),this._updatePageInfoView(t,x),m},e.prototype._pageGo=function(t,e,n){var i=this._getPageInfo(e)[t];null!=i&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:e.id})},e.prototype._updatePageInfoView=function(t,e){var n=this._controllerGroup;P(["pagePrev","pageNext"],(function(i){var r=null!=e[i+"DataIndex"],o=n.childOfName(i);o&&(o.setStyle("fill",r?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),o.cursor=r?"pointer":"default")}));var i=n.childOfName("pageText"),r=t.get("pageFormatter"),o=e.pageIndex,a=null!=o?o+1:0,s=e.pageCount;i&&r&&i.setStyle("text",H(r)?r.replace("{current}",null==a?"":a+"").replace("{total}",null==s?"":s+""):r({current:a,total:s}))},e.prototype._getPageInfo=function(t){var e=t.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,r=t.getOrient().index,o=MV[r],a=IV[r],s=this._findTargetItemIndex(e),l=n.children(),u=l[s],h=l.length,c=h?1:0,p={contentPosition:[n.x,n.y],pageCount:c,pageIndex:c-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return p;var d=m(u);p.contentPosition[r]=-d.s;for(var f=s+1,g=d,y=d,v=null;f<=h;++f)(!(v=m(l[f]))&&y.e>g.s+i||v&&!_(v,g.s))&&(g=y.i>g.i?y:v)&&(null==p.pageNextDataIndex&&(p.pageNextDataIndex=g.i),++p.pageCount),y=v;for(f=s-1,g=d,y=d,v=null;f>=-1;--f)(v=m(l[f]))&&_(y,v.s)||!(g.i=e&&t.s<=e+i}},e.prototype._findTargetItemIndex=function(t){return this._showController?(this.getContentGroup().eachChild((function(i,r){var o=i.__legendDataIndex;null==n&&null!=o&&(n=r),o===t&&(e=r)})),null!=e?e:n):0;var e,n},e.type="legend.scroll",e}(dV);function CV(t){Qm(xV),t.registerComponentModel(bV),t.registerComponentView(TV),function(t){t.registerAction("legendScroll","legendscroll",(function(t,e){var n=t.scrollDataIndex;null!=n&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},(function(t){t.setScrollDataIndex(n)}))}))}(t)}var DV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="dataZoom.inside",e.defaultOption=zh(wN.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(wN),AV=kr();function LV(t,e,n){AV(t).coordSysRecordMap.each((function(t){var i=t.dataZoomInfoMap.get(e.uid);i&&(i.getRange=n)}))}function kV(t,e){if(e){t.removeKey(e.model.uid);var n=e.controller;n&&n.dispose()}}function PV(t,e){t.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:e})}function OV(t,e,n,i){return t.coordinateSystem.containPoint([n,i])}function RV(t){t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,(function(t,e){var n=AV(e),i=n.coordSysRecordMap||(n.coordSysRecordMap=ht());i.each((function(t){t.dataZoomInfoMap=null})),t.eachComponent({mainType:"dataZoom",subType:"inside"},(function(t){P(xN(t).infoList,(function(n){var r=n.model.uid,o=i.get(r)||i.set(r,function(t,e){var n={model:e,containsPoint:B(OV,e),dispatchAction:B(PV,t),dataZoomInfoMap:null,controller:null},i=n.controller=new WM(t.getZr());return P(["pan","zoom","scrollMove"],(function(t){i.on(t,(function(e){var i=[];n.dataZoomInfoMap.each((function(r){if(e.isAvailableBehavior(r.model.option)){var o=(r.getRange||{})[t],a=o&&o(r.dzReferCoordSysInfo,n.model.mainType,n.controller,e);!r.model.get("disabled",!0)&&a&&i.push({dataZoomId:r.model.id,start:a[0],end:a[1]})}})),i.length&&n.dispatchAction(i)}))})),n}(e,n.model));(o.dataZoomInfoMap||(o.dataZoomInfoMap=ht())).set(t.uid,{dzReferCoordSysInfo:n,model:t,getRange:null})}))})),i.each((function(t){var e,n=t.controller,r=t.dataZoomInfoMap;if(r){var o=r.keys()[0];null!=o&&(e=r.get(o))}if(e){var a=function(t){var e,n="type_",i={type_true:2,type_move:1,type_false:0,type_undefined:-1},r=!0;return t.each((function(t){var o=t.model,a=!o.get("disabled",!0)&&(!o.get("zoomLock",!0)||"move");i[n+a]>i[n+e]&&(e=a),r=r&&o.get("preventDefaultMouseMove",!0)})),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!r}}}(r);n.enable(a.controlType,a.opt),n.setPointerChecker(t.containsPoint),zf(t,"dispatchAction",e.model.get("throttle",!0),"fixRate")}else kV(i,t)}))}))}var NV=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dataZoom.inside",e}return n(e,t),e.prototype.render=function(e,n,i){t.prototype.render.apply(this,arguments),e.noTarget()?this._clear():(this.range=e.getPercentRange(),LV(i,e,{pan:V(zV.pan,this),zoom:V(zV.zoom,this),scrollMove:V(zV.scrollMove,this)}))},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){!function(t,e){for(var n=AV(t).coordSysRecordMap,i=n.keys(),r=0;r0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(o[1]-o[0])+o[0],u=Math.max(1/i.scale,0);o[0]=(o[0]-l)*u+l,o[1]=(o[1]-l)*u+l;var h=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return PD(0,o,[0,100],0,h.minSpan,h.maxSpan),this.range=o,r[0]!==o[0]||r[1]!==o[1]?o:void 0}},pan:EV((function(t,e,n,i,r,o){var a=VV[i]([o.oldX,o.oldY],[o.newX,o.newY],e,r,n);return a.signal*(t[1]-t[0])*a.pixel/a.pixelLength})),scrollMove:EV((function(t,e,n,i,r,o){return VV[i]([0,0],[o.scrollDelta,o.scrollDelta],e,r,n).signal*(t[1]-t[0])*o.scrollDelta}))};function EV(t){return function(e,n,i,r){var o=this.range,a=o.slice(),s=e.axisModels[0];if(s)return PD(t(a,s,e,n,i,r),a,[0,100],"all"),this.range=a,o[0]!==a[0]||o[1]!==a[1]?a:void 0}}var VV={grid:function(t,e,n,i,r){var o=n.axis,a={},s=r.model.coordinateSystem.getRect();return t=t||[0,0],"x"===o.dim?(a.pixel=e[0]-t[0],a.pixelLength=s.width,a.pixelStart=s.x,a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=s.height,a.pixelStart=s.y,a.signal=o.inverse?-1:1),a},polar:function(t,e,n,i,r){var o=n.axis,a={},s=r.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),"radiusAxis"===n.mainType?(a.pixel=e[0]-t[0],a.pixelLength=l[1]-l[0],a.pixelStart=l[0],a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=u[1]-u[0],a.pixelStart=u[0],a.signal=o.inverse?-1:1),a},singleAxis:function(t,e,n,i,r){var o=n.axis,a=r.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===o.orient?(s.pixel=e[0]-t[0],s.pixelLength=a.width,s.pixelStart=a.x,s.signal=o.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=a.height,s.pixelStart=a.y,s.signal=o.inverse?-1:1),s}};function BV(t){PN(t),t.registerComponentModel(DV),t.registerComponentView(NV),RV(t)}var FV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=zh(wN.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),e}(wN),GV=ls,HV="horizontal",WV="vertical",UV=["line","bar","candlestick","scatter"],XV={easing:"cubicOut",duration:100},YV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._displayables={},n}return n(e,t),e.prototype.init=function(t,e){this.api=e,this._onBrush=V(this._onBrush,this),this._onBrushEnd=V(this._onBrushEnd,this)},e.prototype.render=function(e,n,i,r){if(t.prototype.render.apply(this,arguments),zf(this,"_dispatchZoomAction",e.get("throttle"),"fixRate"),this._orient=e.getOrient(),!1!==e.get("show")){if(e.noTarget())return this._clear(),void this.group.removeAll();r&&"dataZoom"===r.type&&r.from===this.uid||this._buildView(),this._updateView()}else this.group.removeAll()},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){var t,e,n;(n=(t=this)[e="_dispatchZoomAction"])&&n[Pf]&&(t[e]=n[Pf]);var i=this.api.getZr();i.off("mousemove",this._onBrush),i.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var e=this._displayables.sliderGroup=new Ei;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,e=this.api,n=t.get("brushSelect")?7:0,i=this._findCoordRect(),r={width:e.getWidth(),height:e.getHeight()},o=this._orient===HV?{right:r.width-i.x-i.width,top:r.height-30-7-n,width:i.width,height:30}:{right:7,top:i.y,width:30,height:i.height},a=Hc(t.option);P(["right","top","width","height"],(function(t){"ph"===a[t]&&(a[t]=o[t])}));var s=Vc(a,r);this._location={x:s.x,y:s.y},this._size=[s.width,s.height],this._orient===WV&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,e=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),r=i&&i.get("inverse"),o=this._displayables.sliderGroup,a=(this._dataShadowInfo||{}).otherAxisInverse;o.attr(n!==HV||r?n===HV&&r?{scaleY:a?1:-1,scaleX:-1}:n!==WV||r?{scaleY:a?-1:1,scaleX:-1,rotation:Math.PI/2}:{scaleY:a?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:a?1:-1,scaleX:1});var s=t.getBoundingRect([o]);t.x=e.x-s.x,t.y=e.y-s.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,e=this._size,n=this._displayables.sliderGroup,i=t.get("brushSelect");n.add(new GV({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var r=new GV({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:V(this._onClickPanel,this)}),o=this.api.getZr();i?(r.on("mousedown",this._onBrushStart,this),r.cursor="crosshair",o.on("mousemove",this._onBrush),o.on("mouseup",this._onBrushEnd)):(o.off("mousemove",this._onBrush),o.off("mouseup",this._onBrushEnd)),n.add(r)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],t){var e=this._size,n=t.series,i=n.getRawData(),r=n.getShadowDim?n.getShadowDim():t.otherDim;if(null!=r){var o=i.getDataExtent(r),a=.3*(o[1]-o[0]);o=[o[0]-a,o[1]+a];var s,l=[0,e[1]],u=[0,e[0]],h=[[e[0],0],[0,0]],c=[],p=u[1]/(i.count()-1),d=0,f=Math.round(i.count()/e[0]);i.each([r],(function(t,e){if(f>0&&e%f)d+=p;else{var n=null==t||isNaN(t)||""===t,i=n?0:Yi(t,o,l,!0);n&&!s&&e?(h.push([h[h.length-1][0],0]),c.push([c[c.length-1][0],0])):!n&&s&&(h.push([d,0]),c.push([d,0])),h.push([d,i]),c.push([d,i]),d+=p,s=n}}));for(var g=this.dataZoomModel,y=0;y<3;y++){var v=m(1===y);this._displayables.sliderGroup.add(v),this._displayables.dataShadowSegs.push(v)}}}function m(t){var e=g.getModel(t?"selectedDataBackground":"dataBackground"),n=new Ei,i=new ru({shape:{points:h},segmentIgnoreThreshold:1,style:e.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),r=new au({shape:{points:c},segmentIgnoreThreshold:1,style:e.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return n.add(i),n.add(r),n}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,e=t.get("showDataShadow");if(!1!==e){var n,i=this.ecModel;return t.eachTargetAxis((function(r,o){P(t.getAxisProxy(r,o).getTargetSeriesModels(),(function(t){if(!(n||!0!==e&&D(UV,t.get("type"))<0)){var a,s=i.getComponent(mN(r),o).axis,l={x:"y",y:"x",radius:"angle",angle:"radius"}[r],u=t.coordinateSystem;null!=l&&u.getOtherAxis&&(a=u.getOtherAxis(s).inverse),l=t.getData().mapDimension(l),n={thisAxis:s,series:t,thisDim:r,otherDim:l,otherAxisInverse:a}}}),this)}),this),n}},e.prototype._renderHandle=function(){var t=this.group,e=this._displayables,n=e.handles=[null,null],i=e.handleLabels=[null,null],r=this._displayables.sliderGroup,o=this._size,a=this.dataZoomModel,s=this.api,l=a.get("borderRadius")||0,u=a.get("brushSelect"),h=e.filler=new GV({silent:u,style:{fill:a.get("fillerColor")},textConfig:{position:"inside"}});r.add(h),r.add(new GV({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:o[0],height:o[1],r:l},style:{stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}})),P([0,1],(function(e){var o=a.get("handleIcon");!cy[o]&&o.indexOf("path://")<0&&o.indexOf("image://")<0&&(o="path://"+o);var s=fy(o,-1,0,2,2,null,!0);s.attr({cursor:ZV(this._orient),draggable:!0,drift:V(this._onDragMove,this,e),ondragend:V(this._onDragEnd,this),onmouseover:V(this._showDataInfo,this,!0),onmouseout:V(this._showDataInfo,this,!1),z2:5});var l=s.getBoundingRect(),u=a.get("handleSize");this._handleHeight=Zi(u,this._size[1]),this._handleWidth=l.width/l.height*this._handleHeight,s.setStyle(a.getModel("handleStyle").getItemStyle()),s.style.strokeNoScale=!0,s.rectHover=!0,s.ensureState("emphasis").style=a.getModel(["emphasis","handleStyle"]).getItemStyle(),sl(s);var h=a.get("handleColor");null!=h&&(s.style.fill=h),r.add(n[e]=s);var c=a.getModel("textStyle");t.add(i[e]=new cs({silent:!0,invisible:!0,style:ph(c,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:c.getTextColor(),font:c.getFont()}),z2:10}))}),this);var c=h;if(u){var p=Zi(a.get("moveHandleSize"),o[1]),d=e.moveHandle=new ls({style:a.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:o[1]-.5,height:p}}),f=.8*p,g=e.moveHandleIcon=fy(a.get("moveHandleIcon"),-f/2,-f/2,f,f,"#fff",!0);g.silent=!0,g.y=o[1]+p/2-.5,d.ensureState("emphasis").style=a.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var y=Math.min(o[1]/2,Math.max(p,10));(c=e.moveZone=new ls({invisible:!0,shape:{y:o[1]-y,height:p+y}})).on("mouseover",(function(){s.enterEmphasis(d)})).on("mouseout",(function(){s.leaveEmphasis(d)})),r.add(d),r.add(g),r.add(c)}c.attr({draggable:!0,cursor:ZV(this._orient),drift:V(this._onDragMove,this,"all"),ondragstart:V(this._showDataInfo,this,!0),ondragend:V(this._onDragEnd,this),onmouseover:V(this._showDataInfo,this,!0),onmouseout:V(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[Yi(t[0],[0,100],e,!0),Yi(t[1],[0,100],e,!0)]},e.prototype._updateInterval=function(t,e){var n=this.dataZoomModel,i=this._handleEnds,r=this._getViewExtent(),o=n.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100];PD(e,i,r,n.get("zoomLock")?"all":t,null!=o.minSpan?Yi(o.minSpan,a,r,!0):null,null!=o.maxSpan?Yi(o.maxSpan,a,r,!0):null);var s=this._range,l=this._range=qi([Yi(i[0],r,a,!0),Yi(i[1],r,a,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},e.prototype._updateView=function(t){var e=this._displayables,n=this._handleEnds,i=qi(n.slice()),r=this._size;P([0,1],(function(t){var i=e.handles[t],o=this._handleHeight;i.attr({scaleX:o/2,scaleY:o/2,x:n[t]+(t?-1:1),y:r[1]/2-o/2})}),this),e.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:r[1]});var o={x:i[0],width:i[1]-i[0]};e.moveHandle&&(e.moveHandle.setShape(o),e.moveZone.setShape(o),e.moveZone.getBoundingRect(),e.moveHandleIcon&&e.moveHandleIcon.attr("x",o.x+o.width/2));for(var a=e.dataShadowSegs,s=[0,i[0],i[1],r[0]],l=0;le[0]||n[1]<0||n[1]>e[1])){var i=this._handleEnds,r=(i[0]+i[1])/2,o=this._updateInterval("all",n[0]-r);this._updateView(),o&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var e=t.offsetX,n=t.offsetY;this._brushStart=new ai(e,n),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(this._brushing){var e=this._displayables.brushRect;if(this._brushing=!1,e){e.attr("ignore",!0);var n=e.shape;if(!(+new Date-this._brushStartTime<200&&Math.abs(n.width)<5)){var i=this._getViewExtent(),r=[0,100];this._range=qi([Yi(n.x,i,r,!0),Yi(n.x+n.width,i,r,!0)]),this._handleEnds=[n.x,n.x+n.width],this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(ee(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,e){var n=this._displayables,i=this.dataZoomModel,r=n.brushRect;r||(r=n.brushRect=new GV({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(r)),r.attr("ignore",!1);var o=this._brushStart,a=this._displayables.sliderGroup,s=a.transformCoordToLocal(t,e),l=a.transformCoordToLocal(o.x,o.y),u=this._size;s[0]=Math.max(Math.min(u[0],s[0]),0),r.setShape({x:l[0],y:0,width:s[0]-l[0],height:u[1]})},e.prototype._dispatchZoomAction=function(t){var e=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?XV:null,start:e[0],end:e[1]})},e.prototype._findCoordRect=function(){var t,e=xN(this.dataZoomModel).infoList;if(!t&&e.length){var n=e[0].model.coordinateSystem;t=n.getRect&&n.getRect()}if(!t){var i=this.api.getWidth(),r=this.api.getHeight();t={x:.2*i,y:.2*r,width:.6*i,height:.6*r}}return t},e.type="dataZoom.slider",e}(IN);function ZV(t){return"vertical"===t?"ns-resize":"ew-resize"}function jV(t){t.registerComponentModel(FV),t.registerComponentView(YV),PN(t)}var qV=function(t,e,n){var i=w((KV[t]||{})[e]);return n&&F(i)?i[i.length-1]:i},KV={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},$V=TT.mapVisual,JV=TT.eachVisual,QV=F,tB=P,eB=qi,nB=Yi,iB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.stateList=["inRange","outOfRange"],n.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],n.layoutMode={type:"box",ignoreSize:!0},n.dataBound=[-1/0,1/0],n.targetVisuals={},n.controllerVisuals={},n}return n(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n)},e.prototype.optionUpdated=function(t,e){var n=this.option;a.canvasSupported||(n.realtime=!1),!e&&Jz(n,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var e=this.stateList;t=V(t,this),this.controllerVisuals=$z(this.option.controller,e,t),this.targetVisuals=$z(this.option.target,e,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,e=[];return null==t||"all"===t?this.ecModel.eachSeries((function(t,n){e.push(n)})):e=xr(t),e},e.prototype.eachTargetSeries=function(t,e){P(this.getTargetSeriesIndices(),(function(n){var i=this.ecModel.getSeriesByIndex(n);i&&t.call(e,i)}),this)},e.prototype.isTargetSeries=function(t){var e=!1;return this.eachTargetSeries((function(n){n===t&&(e=!0)})),e},e.prototype.formatValueText=function(t,e,n){var i,r=this.option,o=r.precision,a=this.dataBound,s=r.formatter;n=n||["<",">"],F(t)&&(t=t.slice(),i=!0);var l=e?t:i?[u(t[0]),u(t[1])]:u(t);return H(s)?s.replace("{value}",i?l[0]:l).replace("{value2}",i?l[1]:l):G(s)?i?s(t[0],t[1]):s(t):i?t[0]===a[0]?n[0]+" "+l[1]:t[1]===a[1]?n[1]+" "+l[0]:l[0]+" - "+l[1]:l;function u(t){return t===a[0]?"min":t===a[1]?"max":(+t).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,e=eB([t.min,t.max]);this._dataExtent=e},e.prototype.getDataDimension=function(t){var e=this.option.dimension,n=t.dimensions;if(null!=e||n.length){if(null!=e)return t.getDimension(e);for(var i=t.dimensions,r=i.length-1;r>=0;r--){var o=i[r];if(!t.getDimensionInfo(o).isCalculationCoord)return o}}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var t=this.ecModel,e=this.option,n={inRange:e.inRange,outOfRange:e.outOfRange},i=e.target||(e.target={}),r=e.controller||(e.controller={});S(i,n),S(r,n);var o=this.isCategory();function a(n){QV(e.color)&&!n.inRange&&(n.inRange={color:e.color.slice().reverse()}),n.inRange=n.inRange||{color:t.get("gradientColor")}}a.call(this,i),a.call(this,r),function(t,e,n){var i=t[e],r=t[n];i&&!r&&(r=t[n]={},tB(i,(function(t,e){if(TT.isValidType(e)){var n=qV(e,"inactive",o);null!=n&&(r[e]=n,"color"!==e||r.hasOwnProperty("opacity")||r.hasOwnProperty("colorAlpha")||(r.opacity=[0,0]))}})))}.call(this,i,"inRange","outOfRange"),function(t){var e=(t.inRange||{}).symbol||(t.outOfRange||{}).symbol,n=(t.inRange||{}).symbolSize||(t.outOfRange||{}).symbolSize,i=this.get("inactiveColor"),r=this.getItemSymbol()||"roundRect";tB(this.stateList,(function(a){var s=this.itemSize,l=t[a];l||(l=t[a]={color:o?i:[i]}),null==l.symbol&&(l.symbol=e&&w(e)||(o?r:[r])),null==l.symbolSize&&(l.symbolSize=n&&w(n)||(o?s[0]:[s[0],s[0]])),l.symbol=$V(l.symbol,(function(t){return"none"===t?r:t}));var u=l.symbolSize;if(null!=u){var h=-1/0;JV(u,(function(t){t>h&&(h=t)})),l.symbolSize=$V(u,(function(t){return nB(t,[0,h],[0,s[0]],!0)}))}}),this)}.call(this,r)},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(t){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(t){return null},e.prototype.getVisualMeta=function(t){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,zlevel:0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},e}(Xc),rB=[20,140],oB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.optionUpdated=function(e,n){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual((function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()})),this._resetRange()},e.prototype.resetItemSize=function(){t.prototype.resetItemSize.apply(this,arguments);var e=this.itemSize;(null==e[0]||isNaN(e[0]))&&(e[0]=rB[0]),(null==e[1]||isNaN(e[1]))&&(e[1]=rB[1])},e.prototype._resetRange=function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):F(e)&&(e[0]>e[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},e.prototype.completeVisualOption=function(){t.prototype.completeVisualOption.apply(this,arguments),P(this.stateList,(function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=e[1]/3)}),this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),e=qi((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]=n[1]||t<=e[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var e=[];return this.eachTargetSeries((function(n){var i=[],r=n.getData();r.each(this.getDataDimension(r),(function(e,n){t[0]<=e&&e<=t[1]&&i.push(n)}),this),e.push({seriesId:n.id,dataIndex:i})}),this),e},e.prototype.getVisualMeta=function(t){var e=aB(this,"outOfRange",this.getExtent()),n=aB(this,"inRange",this.option.range.slice()),i=[];function r(e,n){i.push({value:e,color:t(e,n)})}for(var o=0,a=0,s=n.length,l=e.length;at[1])break;n.push({color:this.getControllerVisual(o,"color",e),offset:r/100})}return n.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),n},e.prototype._createBarPoints=function(t,e){var n=this.visualMapModel.itemSize;return[[n[0]-e[0],t[0]],[n[0],t[0]],[n[0],t[1]],[n[0]-e[1],t[1]]]},e.prototype._createBarGroup=function(t){var e=this._orient,n=this.visualMapModel.get("inverse");return new Ei("horizontal"!==e||n?"horizontal"===e&&n?{scaleX:"bottom"===t?-1:1,rotation:-Math.PI/2}:"vertical"!==e||n?{scaleX:"left"===t?1:-1}:{scaleX:"left"===t?1:-1,scaleY:-1}:{scaleX:"bottom"===t?1:-1,rotation:Math.PI/2})},e.prototype._updateHandle=function(t,e){if(this._useHandle){var n=this._shapes,i=this.visualMapModel,r=n.handleThumbs,o=n.handleLabels,a=i.itemSize,s=i.getExtent();pB([0,1],(function(l){var u=r[l];u.setStyle("fill",e.handlesColor[l]),u.y=t[l];var h=cB(t[l],[0,a[1]],s,!0),c=this.getControllerVisual(h,"symbolSize");u.scaleX=u.scaleY=c/a[0],u.x=a[0]-c/2;var p=qu(n.handleLabelPoints[l],ju(u,this.group));o[l].setStyle({x:p[0],y:p[1],text:i.formatValueText(this._dataInterval[l]),verticalAlign:"middle",align:"vertical"===this._orient?this._applyTransform("left",n.mainGroup):"center"})}),this)}},e.prototype._showIndicator=function(t,e,n,i){var r=this.visualMapModel,o=r.getExtent(),a=r.itemSize,s=[0,a[1]],l=this._shapes,u=l.indicator;if(u){u.attr("invisible",!1);var h=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0}),c=this.getControllerVisual(t,"symbolSize"),p=cB(t,o,s,!0),d=a[0]-c/2,f={x:u.x,y:u.y};u.y=p,u.x=d;var g=qu(l.indicatorLabelPoint,ju(u,this.group)),y=l.indicatorLabel;y.attr("invisible",!1);var v=this._applyTransform("left",l.mainGroup),m="horizontal"===this._orient;y.setStyle({text:(n||"")+r.formatValueText(e),verticalAlign:m?v:"middle",align:m?"center":v});var _={x:d,y:p,style:{fill:h}},x={style:{x:g[0],y:g[1]}};if(r.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var b={duration:100,easing:"cubicInOut",additive:!0};u.x=f.x,u.y=f.y,u.animateTo(_,b),y.animateTo(x,b)}else u.attr(_),y.attr(x);this._firstShowIndicator=!1;var w=this._shapes.handleLabels;if(w)for(var S=0;Sr[1]&&(u[1]=1/0),e&&(u[0]===-1/0?this._showIndicator(l,u[1],"< ",a):u[1]===1/0?this._showIndicator(l,u[0],"> ",a):this._showIndicator(l,l,"≈ ",a));var h=this._hoverLinkDataIndices,c=[];(e||vB(n))&&(c=this._hoverLinkDataIndices=n.findTargetDataIndices(u));var p=function(t,e){var n={},i={};return r(t||[],n),r(e||[],i,n),[o(n),o(i)];function r(t,e,n){for(var i=0,r=t.length;i0:t.splitNumber>0)&&!t.calculable?"piecewise":"continuous"})),t.registerAction(_B,xB),P(bB,(function(e){t.registerVisual(t.PRIORITY.VISUAL.COMPONENT,e)})),t.registerPreprocessor(MB))}function DB(t){t.registerComponentModel(oB),t.registerComponentView(gB),CB(t)}var AB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._pieceList=[],n}return n(e,t),e.prototype.optionUpdated=function(e,n){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var i=this._mode=this._determineMode();this._pieceList=[],LB[this._mode].call(this,this._pieceList),this._resetSelected(e,n);var r=this.option.categories;this.resetVisual((function(t,e){"categories"===i?(t.mappingMethod="category",t.categories=w(r)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=O(this._pieceList,(function(t){return t=w(t),"inRange"!==e&&(t.visual=null),t})))}))},e.prototype.completeVisualOption=function(){var e=this.option,n={},i=TT.listVisualTypes(),r=this.isCategory();function o(t,e,n){return t&&t[e]&&t[e].hasOwnProperty(n)}P(e.pieces,(function(t){P(i,(function(e){t.hasOwnProperty(e)&&(n[e]=1)}))})),P(n,(function(t,n){var i=!1;P(this.stateList,(function(t){i=i||o(e,t,n)||o(e.target,t,n)}),this),!i&&P(this.stateList,(function(t){(e[t]||(e[t]={}))[n]=qV(n,"inRange"===t?"active":"inactive",r)}))}),this),t.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,e){var n=this.option,i=this._pieceList,r=(e?n:t).selected||{};if(n.selected=r,P(i,(function(t,e){var n=this.getSelectedMapKey(t);r.hasOwnProperty(n)||(r[n]=!0)}),this),"single"===n.selectedMode){var o=!1;P(i,(function(t,e){var n=this.getSelectedMapKey(t);r[n]&&(o?r[n]=!1:o=!0)}),this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(t){return"categories"===this._mode?t.value+"":t.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(t){this.option.selected=w(t)},e.prototype.getValueState=function(t){var e=TT.findPieceIndex(t,this._pieceList);return null!=e&&this.option.selected[this.getSelectedMapKey(this._pieceList[e])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var e=[],n=this._pieceList;return this.eachTargetSeries((function(i){var r=[],o=i.getData();o.each(this.getDataDimension(o),(function(e,i){TT.findPieceIndex(e,n)===t&&r.push(i)}),this),e.push({seriesId:i.id,dataIndex:r})}),this),e},e.prototype.getRepresentValue=function(t){var e;if(this.isCategory())e=t.value;else if(null!=t.value)e=t.value;else{var n=t.interval||[];e=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return e},e.prototype.getVisualMeta=function(t){if(!this.isCategory()){var e=[],n=["",""],i=this,r=this._pieceList.slice();if(r.length){var o=r[0].interval[0];o!==-1/0&&r.unshift({interval:[-1/0,o]}),(o=r[r.length-1].interval[1])!==1/0&&r.push({interval:[o,1/0]})}else r.push({interval:[-1/0,1/0]});var a=-1/0;return P(r,(function(t){var e=t.interval;e&&(e[0]>a&&s([a,e[0]],"outOfRange"),s(e.slice()),a=e[1])}),this),{stops:e,outerColors:n}}function s(r,o){var a=i.getRepresentValue({interval:r});o||(o=i.getValueState(a));var s=t(a,o);r[0]===-1/0?n[0]=s:r[1]===1/0?n[1]=s:e.push({value:r[0],color:s},{value:r[1],color:s})}},e.type="visualMap.piecewise",e.defaultOption=zh(iB.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e}(iB),LB={splitNumber:function(t){var e=this.option,n=Math.min(e.precision,20),i=this.getExtent(),r=e.splitNumber;r=Math.max(parseInt(r,10),1),e.splitNumber=r;for(var o=(i[1]-i[0])/r;+o.toFixed(n)!==o&&n<5;)n++;e.precision=n,o=+o.toFixed(n),e.minOpen&&t.push({interval:[-1/0,i[0]],close:[0,0]});for(var a=0,s=i[0];a","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,n)}),this)}};function kB(t,e){var n=t.inverse;("vertical"===t.orient?!n:n)&&e.reverse()}var PB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.doRender=function(){var t=this.group;t.removeAll();var e=this.visualMapModel,n=e.get("textGap"),i=e.textStyleModel,r=i.getFont(),o=i.getTextColor(),a=this._getItemAlign(),s=e.itemSize,l=this._getViewData(),u=l.endsText,h=Q(e.get("showLabel",!0),!u);u&&this._renderEndsText(t,u[0],s,h,a),P(l.viewPieceList,(function(i){var l=i.piece,u=new Ei;u.onclick=V(this._onItemClick,this,l),this._enableHoverLink(u,i.indexInModelPieceList);var c=e.getRepresentValue(l);if(this._createItemSymbol(u,c,[0,0,s[0],s[1]]),h){var p=this.visualMapModel.getValueState(c);u.add(new cs({style:{x:"right"===a?-n:s[0]+n,y:s[1]/2,text:l.text,verticalAlign:"middle",align:a,font:r,fill:o,opacity:"outOfRange"===p?.5:1}}))}t.add(u)}),this),u&&this._renderEndsText(t,u[1],s,h,a),Ec(e.get("orient"),t,e.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,e){var n=this;t.on("mouseover",(function(){return i("highlight")})).on("mouseout",(function(){return i("downplay")}));var i=function(t){var i=n.visualMapModel;i.option.hoverLink&&n.api.dispatchAction({type:t,batch:hB(i.findTargetDataIndices(e),i)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return uB(t,this.api,t.itemSize);var n=e.align;return n&&"auto"!==n||(n="left"),n},e.prototype._renderEndsText=function(t,e,n,i,r){if(e){var o=new Ei,a=this.visualMapModel.textStyleModel;o.add(new cs({style:{x:i?"right"===r?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:i?r:"center",text:e,font:a.getFont(),fill:a.getTextColor()}})),t.add(o)}},e.prototype._getViewData=function(){var t=this.visualMapModel,e=O(t.getPieceList(),(function(t,e){return{piece:t,indexInModelPieceList:e}})),n=t.get("text"),i=t.get("orient"),r=t.get("inverse");return("horizontal"===i?r:!r)?e.reverse():n&&(n=n.slice().reverse()),{viewPieceList:e,endsText:n}},e.prototype._createItemSymbol=function(t,e,n){t.add(fy(this.getControllerVisual(e,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(e,"color")))},e.prototype._onItemClick=function(t){var e=this.visualMapModel,n=e.option,i=w(n.selected),r=e.getSelectedMapKey(t);"single"===n.selectedMode?(i[r]=!0,P(i,(function(t,e){i[e]=e===r}))):i[r]=!i[r],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:i})},e.type="visualMap.piecewise",e}(sB);function OB(t){t.registerComponentModel(AB),t.registerComponentView(PB),CB(t)}var RB={label:{enabled:!0},decal:{show:!1}},NB=kr(),zB={};function EB(t,e){var n=t.getModel("aria");if(n.get("enabled")){var i=w(RB);S(i.label,t.getLocaleModel().get("aria"),!1),S(n.option,i,!1),function(){if(n.getModel("decal").get("show")){var e=ht();t.eachSeries((function(t){if(t.useColorPaletteOnData){var n=e.get(t.type);n||(n={},e.set(t.type,n)),NB(t).scope=n}})),t.eachRawSeries((function(e){if(!t.isSeriesFiltered(e))if("function"!=typeof e.enableAriaDecal){var n=e.getData();if(e.useColorPaletteOnData){var i=e.getRawData(),r={},o=NB(e).scope;n.each((function(t){var e=n.getRawIndex(t);r[e]=t}));var a=i.count();i.each((function(t){var s=r[t],l=i.getName(t)||t+"",h=xp(e.ecModel,l,o,a),c=n.getItemVisual(s,"decal");n.setItemVisual(s,"decal",u(c,h))}))}else{var s=xp(e.ecModel,e.name,zB,t.getSeriesCount()),l=n.getVisual("decal");n.setVisual("decal",u(l,s))}}else e.enableAriaDecal();function u(t,e){var n=t?I(I({},e),t):e;return n.dirty=!0,n}}))}}(),function(){var i=t.getLocaleModel().get("aria"),o=n.getModel("label");if(o.option=T(o.option,i),!o.get("enabled"))return;var a=e.getZr().dom;if(o.get("description"))return void a.setAttribute("aria-label",o.get("description"));var s,l=t.getSeriesCount(),u=o.get(["data","maxCount"])||10,h=o.get(["series","maxCount"])||10,c=Math.min(l,h);if(l<1)return;var p=function(){var e=t.get("title");e&&e.length&&(e=e[0]);return e&&e.text}();if(p){var d=o.get(["general","withTitle"]);s=r(d,{title:p})}else s=o.get(["general","withoutTitle"]);var f=[],g=l>1?o.get(["series","multiple","prefix"]):o.get(["series","single","prefix"]);s+=r(g,{seriesCount:l}),t.eachSeries((function(e,n){if(n1?o.get(["series","multiple",a]):o.get(["series","single",a]),{seriesId:e.seriesIndex,seriesName:e.get("name"),seriesType:(_=e.subType,t.getLocaleModel().get(["series","typeNames"])[_]||"自定义图")});var s=e.getData();if(s.count()>u)i+=r(o.get(["data","partialData"]),{displayCnt:u});else i+=o.get(["data","allData"]);for(var h=[],p=0;p":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},FB=function(){function t(t){if(null==(this._condVal=H(t)?new RegExp(t):$(t)?t:null)){var e="";0,vr(e)}}return t.prototype.evaluate=function(t){var e=typeof t;return"string"===e?this._condVal.test(t):"number"===e&&this._condVal.test(t+"")},t}(),GB=function(){function t(){}return t.prototype.evaluate=function(){return this.value},t}(),HB=function(){function t(){}return t.prototype.evaluate=function(){for(var t=this.children,e=0;e { + const fnBody = value !== null && value !== undefined ? value.toString() : '' + + if (value instanceof Function || typeof value === 'function') { + if (fnBody.indexOf('function') !== 0) { + return ARROWFN_PREFIX + fnBody + } + + return fnBody + } + + if (value instanceof RegExp) { + return REGEXP_PREFIX + fnBody + } + + return value + } + + const reviver = (key, value) => { + if (typeof value !== 'string') { + return value + } + else if (value.indexOf('function') === 0) { + /* eslint-disable-next-line no-eval */ + return eval(`(${value})`) + } + else { + return value + } + + if ( + value.indexOf(ARROWFN_PREFIX) === 0 || + value.indexOf(REGEXP_PREFIX) === 0 + ) { + /* eslint-disable-next-line no-eval */ + return eval(value.slice(8)) + } + } + + return { + stringify: (obj, space) => JSON.stringify(obj, replacer, space), + parse: str => JSON.parse(str, reviver) + } +}) diff --git a/IoTGateway/wwwroot/echarts/macarons.js b/IoTGateway/wwwroot/echarts/macarons.js new file mode 100644 index 0000000..f80fac6 --- /dev/null +++ b/IoTGateway/wwwroot/echarts/macarons.js @@ -0,0 +1,442 @@ + +(function (root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['exports', 'echarts'], factory); + } else if (typeof exports === 'object' && typeof exports.nodeName !== 'string') { + // CommonJS + factory(exports, require('echarts')); + } else { + // Browser globals + factory({}, root.echarts); + } +}(this, function (exports, echarts) { + var log = function (msg) { + if (typeof console !== 'undefined') { + console && console.error && console.error(msg); + } + }; + if (!echarts) { + log('ECharts is not Loaded'); + return; + } + echarts.registerTheme('macarons', { + "color": [ + "#2ec7c9", + "#b6a2de", + "#5ab1ef", + "#ffb980", + "#d87a80", + "#8d98b3", + "#e5cf0d", + "#97b552", + "#95706d", + "#dc69aa", + "#07a2a4", + "#9a7fd1", + "#588dd5", + "#f5994e", + "#c05050", + "#59678c", + "#c9ab00", + "#7eb00a", + "#6f5553", + "#c14089" + ], + "backgroundColor": "rgba(0,0,0,0)", + "textStyle": {}, + "title": { + "textStyle": { + "color": "#008acd" + }, + "subtextStyle": { + "color": "#aaaaaa" + } + }, + "line": { + "itemStyle": { + "borderWidth": 1 + }, + "lineStyle": { + "width": 2 + }, + "symbolSize": 3, + "symbol": "emptyCircle", + "smooth": true + }, + "radar": { + "itemStyle": { + "borderWidth": 1 + }, + "lineStyle": { + "width": 2 + }, + "symbolSize": 3, + "symbol": "emptyCircle", + "smooth": true + }, + "bar": { + "itemStyle": { + "barBorderWidth": 0, + "barBorderColor": "#ccc" + } + }, + "pie": { + "itemStyle": { + "borderWidth": 0, + "borderColor": "#ccc" + } + }, + "scatter": { + "itemStyle": { + "borderWidth": 0, + "borderColor": "#ccc" + } + }, + "boxplot": { + "itemStyle": { + "borderWidth": 0, + "borderColor": "#ccc" + } + }, + "parallel": { + "itemStyle": { + "borderWidth": 0, + "borderColor": "#ccc" + } + }, + "sankey": { + "itemStyle": { + "borderWidth": 0, + "borderColor": "#ccc" + } + }, + "funnel": { + "itemStyle": { + "borderWidth": 0, + "borderColor": "#ccc" + } + }, + "gauge": { + "itemStyle": { + "borderWidth": 0, + "borderColor": "#ccc" + } + }, + "candlestick": { + "itemStyle": { + "color": "#d87a80", + "color0": "#2ec7c9", + "borderColor": "#d87a80", + "borderColor0": "#2ec7c9", + "borderWidth": 1 + } + }, + "graph": { + "itemStyle": { + "borderWidth": 0, + "borderColor": "#ccc" + }, + "lineStyle": { + "width": 1, + "color": "#aaaaaa" + }, + "symbolSize": 3, + "symbol": "emptyCircle", + "smooth": true, + "color": [ + "#2ec7c9", + "#b6a2de", + "#5ab1ef", + "#ffb980", + "#d87a80", + "#8d98b3", + "#e5cf0d", + "#97b552", + "#95706d", + "#dc69aa", + "#07a2a4", + "#9a7fd1", + "#588dd5", + "#f5994e", + "#c05050", + "#59678c", + "#c9ab00", + "#7eb00a", + "#6f5553", + "#c14089" + ], + "label": { + "color": "#eeeeee" + } + }, + "map": { + "itemStyle": { + "areaColor": "#dddddd", + "borderColor": "#eeeeee", + "borderWidth": 0.5 + }, + "label": { + "color": "#d87a80" + }, + "emphasis": { + "itemStyle": { + "areaColor": "rgba(254,153,78,1)", + "borderColor": "#444", + "borderWidth": 1 + }, + "label": { + "color": "rgb(100,0,0)" + } + } + }, + "geo": { + "itemStyle": { + "areaColor": "#dddddd", + "borderColor": "#eeeeee", + "borderWidth": 0.5 + }, + "label": { + "color": "#d87a80" + }, + "emphasis": { + "itemStyle": { + "areaColor": "rgba(254,153,78,1)", + "borderColor": "#444", + "borderWidth": 1 + }, + "label": { + "color": "rgb(100,0,0)" + } + } + }, + "categoryAxis": { + "axisLine": { + "show": true, + "lineStyle": { + "color": "#008acd" + } + }, + "axisTick": { + "show": true, + "lineStyle": { + "color": "#333" + } + }, + "axisLabel": { + "show": true, + "color": "#333" + }, + "splitLine": { + "show": false, + "lineStyle": { + "color": [ + "#eee" + ] + } + }, + "splitArea": { + "show": false, + "areaStyle": { + "color": [ + "rgba(250,250,250,0.3)", + "rgba(200,200,200,0.3)" + ] + } + } + }, + "valueAxis": { + "axisLine": { + "show": true, + "lineStyle": { + "color": "#008acd" + } + }, + "axisTick": { + "show": true, + "lineStyle": { + "color": "#333" + } + }, + "axisLabel": { + "show": true, + "color": "#333" + }, + "splitLine": { + "show": true, + "lineStyle": { + "color": [ + "#eee" + ] + } + }, + "splitArea": { + "show": true, + "areaStyle": { + "color": [ + "rgba(250,250,250,0.3)", + "rgba(200,200,200,0.3)" + ] + } + } + }, + "logAxis": { + "axisLine": { + "show": true, + "lineStyle": { + "color": "#008acd" + } + }, + "axisTick": { + "show": true, + "lineStyle": { + "color": "#333" + } + }, + "axisLabel": { + "show": true, + "color": "#333" + }, + "splitLine": { + "show": true, + "lineStyle": { + "color": [ + "#eee" + ] + } + }, + "splitArea": { + "show": true, + "areaStyle": { + "color": [ + "rgba(250,250,250,0.3)", + "rgba(200,200,200,0.3)" + ] + } + } + }, + "timeAxis": { + "axisLine": { + "show": true, + "lineStyle": { + "color": "#008acd" + } + }, + "axisTick": { + "show": true, + "lineStyle": { + "color": "#333" + } + }, + "axisLabel": { + "show": true, + "color": "#333" + }, + "splitLine": { + "show": true, + "lineStyle": { + "color": [ + "#eee" + ] + } + }, + "splitArea": { + "show": false, + "areaStyle": { + "color": [ + "rgba(250,250,250,0.3)", + "rgba(200,200,200,0.3)" + ] + } + } + }, + "toolbox": { + "iconStyle": { + "borderColor": "#2ec7c9" + }, + "emphasis": { + "iconStyle": { + "borderColor": "#18a4a6" + } + } + }, + "legend": { + "textStyle": { + "color": "#333333" + } + }, + "tooltip": { + "axisPointer": { + "lineStyle": { + "color": "#008acd", + "width": "1" + }, + "crossStyle": { + "color": "#008acd", + "width": "1" + } + } + }, + "timeline": { + "lineStyle": { + "color": "#008acd", + "width": 1 + }, + "itemStyle": { + "color": "#008acd", + "borderWidth": 1 + }, + "controlStyle": { + "color": "#008acd", + "borderColor": "#008acd", + "borderWidth": 0.5 + }, + "checkpointStyle": { + "color": "#2ec7c9", + "borderColor": "#2ec7c9" + }, + "label": { + "color": "#008acd" + }, + "emphasis": { + "itemStyle": { + "color": "#a9334c" + }, + "controlStyle": { + "color": "#008acd", + "borderColor": "#008acd", + "borderWidth": 0.5 + }, + "label": { + "color": "#008acd" + } + } + }, + "visualMap": { + "color": [ + "#5ab1ef", + "#e0ffff" + ] + }, + "dataZoom": { + "backgroundColor": "rgba(47,69,84,0)", + "dataBackgroundColor": "#efefff", + "fillerColor": "rgba(182,162,222,0.2)", + "handleColor": "#008acd", + "handleSize": "100%", + "textStyle": { + "color": "#333333" + } + }, + "markPoint": { + "label": { + "color": "#eeeeee" + }, + "emphasis": { + "label": { + "color": "#eeeeee" + } + } + } + }); +})); diff --git a/IoTGateway/wwwroot/echarts/roma.js b/IoTGateway/wwwroot/echarts/roma.js new file mode 100644 index 0000000..c6a8772 --- /dev/null +++ b/IoTGateway/wwwroot/echarts/roma.js @@ -0,0 +1,442 @@ + +(function (root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['exports', 'echarts'], factory); + } else if (typeof exports === 'object' && typeof exports.nodeName !== 'string') { + // CommonJS + factory(exports, require('echarts')); + } else { + // Browser globals + factory({}, root.echarts); + } +}(this, function (exports, echarts) { + var log = function (msg) { + if (typeof console !== 'undefined') { + console && console.error && console.error(msg); + } + }; + if (!echarts) { + log('ECharts is not Loaded'); + return; + } + echarts.registerTheme('roma', { + "color": [ + "#e01f54", + "#001852", + "#f5e8c8", + "#b8d2c7", + "#c6b38e", + "#a4d8c2", + "#f3d999", + "#d3758f", + "#dcc392", + "#2e4783", + "#82b6e9", + "#ff6347", + "#a092f1", + "#0a915d", + "#eaf889", + "#6699ff", + "#ff6666", + "#3cb371", + "#d5b158", + "#38b6b6" + ], + "backgroundColor": "rgba(0,0,0,0)", + "textStyle": {}, + "title": { + "textStyle": { + "color": "#333333" + }, + "subtextStyle": { + "color": "#aaaaaa" + } + }, + "line": { + "itemStyle": { + "borderWidth": 1 + }, + "lineStyle": { + "width": 2 + }, + "symbolSize": 4, + "symbol": "emptyCircle", + "smooth": false + }, + "radar": { + "itemStyle": { + "borderWidth": 1 + }, + "lineStyle": { + "width": 2 + }, + "symbolSize": 4, + "symbol": "emptyCircle", + "smooth": false + }, + "bar": { + "itemStyle": { + "barBorderWidth": 0, + "barBorderColor": "#ccc" + } + }, + "pie": { + "itemStyle": { + "borderWidth": 0, + "borderColor": "#ccc" + } + }, + "scatter": { + "itemStyle": { + "borderWidth": 0, + "borderColor": "#ccc" + } + }, + "boxplot": { + "itemStyle": { + "borderWidth": 0, + "borderColor": "#ccc" + } + }, + "parallel": { + "itemStyle": { + "borderWidth": 0, + "borderColor": "#ccc" + } + }, + "sankey": { + "itemStyle": { + "borderWidth": 0, + "borderColor": "#ccc" + } + }, + "funnel": { + "itemStyle": { + "borderWidth": 0, + "borderColor": "#ccc" + } + }, + "gauge": { + "itemStyle": { + "borderWidth": 0, + "borderColor": "#ccc" + } + }, + "candlestick": { + "itemStyle": { + "color": "#e01f54", + "color0": "#001852", + "borderColor": "#f5e8c8", + "borderColor0": "#b8d2c7", + "borderWidth": 1 + } + }, + "graph": { + "itemStyle": { + "borderWidth": 0, + "borderColor": "#ccc" + }, + "lineStyle": { + "width": 1, + "color": "#aaaaaa" + }, + "symbolSize": 4, + "symbol": "emptyCircle", + "smooth": false, + "color": [ + "#e01f54", + "#001852", + "#f5e8c8", + "#b8d2c7", + "#c6b38e", + "#a4d8c2", + "#f3d999", + "#d3758f", + "#dcc392", + "#2e4783", + "#82b6e9", + "#ff6347", + "#a092f1", + "#0a915d", + "#eaf889", + "#6699ff", + "#ff6666", + "#3cb371", + "#d5b158", + "#38b6b6" + ], + "label": { + "color": "#eeeeee" + } + }, + "map": { + "itemStyle": { + "areaColor": "#eeeeee", + "borderColor": "#444444", + "borderWidth": 0.5 + }, + "label": { + "color": "#000000" + }, + "emphasis": { + "itemStyle": { + "areaColor": "rgba(255,215,0,0.8)", + "borderColor": "#444", + "borderWidth": 1 + }, + "label": { + "color": "rgb(100,0,0)" + } + } + }, + "geo": { + "itemStyle": { + "areaColor": "#eeeeee", + "borderColor": "#444444", + "borderWidth": 0.5 + }, + "label": { + "color": "#000000" + }, + "emphasis": { + "itemStyle": { + "areaColor": "rgba(255,215,0,0.8)", + "borderColor": "#444", + "borderWidth": 1 + }, + "label": { + "color": "rgb(100,0,0)" + } + } + }, + "categoryAxis": { + "axisLine": { + "show": true, + "lineStyle": { + "color": "#333" + } + }, + "axisTick": { + "show": true, + "lineStyle": { + "color": "#333" + } + }, + "axisLabel": { + "show": true, + "color": "#333" + }, + "splitLine": { + "show": false, + "lineStyle": { + "color": [ + "#ccc" + ] + } + }, + "splitArea": { + "show": false, + "areaStyle": { + "color": [ + "rgba(250,250,250,0.3)", + "rgba(200,200,200,0.3)" + ] + } + } + }, + "valueAxis": { + "axisLine": { + "show": true, + "lineStyle": { + "color": "#333" + } + }, + "axisTick": { + "show": true, + "lineStyle": { + "color": "#333" + } + }, + "axisLabel": { + "show": true, + "color": "#333" + }, + "splitLine": { + "show": true, + "lineStyle": { + "color": [ + "#ccc" + ] + } + }, + "splitArea": { + "show": false, + "areaStyle": { + "color": [ + "rgba(250,250,250,0.3)", + "rgba(200,200,200,0.3)" + ] + } + } + }, + "logAxis": { + "axisLine": { + "show": true, + "lineStyle": { + "color": "#333" + } + }, + "axisTick": { + "show": true, + "lineStyle": { + "color": "#333" + } + }, + "axisLabel": { + "show": true, + "color": "#333" + }, + "splitLine": { + "show": true, + "lineStyle": { + "color": [ + "#ccc" + ] + } + }, + "splitArea": { + "show": false, + "areaStyle": { + "color": [ + "rgba(250,250,250,0.3)", + "rgba(200,200,200,0.3)" + ] + } + } + }, + "timeAxis": { + "axisLine": { + "show": true, + "lineStyle": { + "color": "#333" + } + }, + "axisTick": { + "show": true, + "lineStyle": { + "color": "#333" + } + }, + "axisLabel": { + "show": true, + "color": "#333" + }, + "splitLine": { + "show": true, + "lineStyle": { + "color": [ + "#ccc" + ] + } + }, + "splitArea": { + "show": false, + "areaStyle": { + "color": [ + "rgba(250,250,250,0.3)", + "rgba(200,200,200,0.3)" + ] + } + } + }, + "toolbox": { + "iconStyle": { + "borderColor": "#999999" + }, + "emphasis": { + "iconStyle": { + "borderColor": "#666666" + } + } + }, + "legend": { + "textStyle": { + "color": "#333333" + } + }, + "tooltip": { + "axisPointer": { + "lineStyle": { + "color": "#cccccc", + "width": 1 + }, + "crossStyle": { + "color": "#cccccc", + "width": 1 + } + } + }, + "timeline": { + "lineStyle": { + "color": "#293c55", + "width": 1 + }, + "itemStyle": { + "color": "#293c55", + "borderWidth": 1 + }, + "controlStyle": { + "color": "#293c55", + "borderColor": "#293c55", + "borderWidth": 0.5 + }, + "checkpointStyle": { + "color": "#e43c59", + "borderColor": "#c23531" + }, + "label": { + "color": "#293c55" + }, + "emphasis": { + "itemStyle": { + "color": "#a9334c" + }, + "controlStyle": { + "color": "#293c55", + "borderColor": "#293c55", + "borderWidth": 0.5 + }, + "label": { + "color": "#293c55" + } + } + }, + "visualMap": { + "color": [ + "#e01f54", + "#e7dbc3" + ] + }, + "dataZoom": { + "backgroundColor": "rgba(47,69,84,0)", + "dataBackgroundColor": "rgba(47,69,84,0.3)", + "fillerColor": "rgba(167,183,204,0.4)", + "handleColor": "#a7b7cc", + "handleSize": "100%", + "textStyle": { + "color": "#333333" + } + }, + "markPoint": { + "label": { + "color": "#eeeeee" + }, + "emphasis": { + "label": { + "color": "#eeeeee" + } + } + } + }); +})); diff --git a/IoTGateway/wwwroot/echarts/vintage.js b/IoTGateway/wwwroot/echarts/vintage.js new file mode 100644 index 0000000..b44817b --- /dev/null +++ b/IoTGateway/wwwroot/echarts/vintage.js @@ -0,0 +1,423 @@ + +(function (root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['exports', 'echarts'], factory); + } else if (typeof exports === 'object' && typeof exports.nodeName !== 'string') { + // CommonJS + factory(exports, require('echarts')); + } else { + // Browser globals + factory({}, root.echarts); + } +}(this, function (exports, echarts) { + var log = function (msg) { + if (typeof console !== 'undefined') { + console && console.error && console.error(msg); + } + }; + if (!echarts) { + log('ECharts is not Loaded'); + return; + } + echarts.registerTheme('vintage', { + "color": [ + "#d87c7c", + "#919e8b", + "#d7ab82", + "#6e7074", + "#61a0a8", + "#efa18d", + "#787464", + "#cc7e63", + "#724e58", + "#4b565b" + ], + "backgroundColor": "rgba(254,248,239,1)", + "textStyle": {}, + "title": { + "textStyle": { + "color": "#333333" + }, + "subtextStyle": { + "color": "#aaaaaa" + } + }, + "line": { + "itemStyle": { + "borderWidth": 1 + }, + "lineStyle": { + "width": 2 + }, + "symbolSize": 4, + "symbol": "emptyCircle", + "smooth": false + }, + "radar": { + "itemStyle": { + "borderWidth": 1 + }, + "lineStyle": { + "width": 2 + }, + "symbolSize": 4, + "symbol": "emptyCircle", + "smooth": false + }, + "bar": { + "itemStyle": { + "barBorderWidth": 0, + "barBorderColor": "#ccc" + } + }, + "pie": { + "itemStyle": { + "borderWidth": 0, + "borderColor": "#ccc" + } + }, + "scatter": { + "itemStyle": { + "borderWidth": 0, + "borderColor": "#ccc" + } + }, + "boxplot": { + "itemStyle": { + "borderWidth": 0, + "borderColor": "#ccc" + } + }, + "parallel": { + "itemStyle": { + "borderWidth": 0, + "borderColor": "#ccc" + } + }, + "sankey": { + "itemStyle": { + "borderWidth": 0, + "borderColor": "#ccc" + } + }, + "funnel": { + "itemStyle": { + "borderWidth": 0, + "borderColor": "#ccc" + } + }, + "gauge": { + "itemStyle": { + "borderWidth": 0, + "borderColor": "#ccc" + } + }, + "candlestick": { + "itemStyle": { + "color": "#c23531", + "color0": "#314656", + "borderColor": "#c23531", + "borderColor0": "#314656", + "borderWidth": 1 + } + }, + "graph": { + "itemStyle": { + "borderWidth": 0, + "borderColor": "#ccc" + }, + "lineStyle": { + "width": 1, + "color": "#aaa" + }, + "symbolSize": 4, + "symbol": "emptyCircle", + "smooth": false, + "color": [ + "#d87c7c", + "#919e8b", + "#d7ab82", + "#6e7074", + "#61a0a8", + "#efa18d", + "#787464", + "#cc7e63", + "#724e58", + "#4b565b" + ], + "label": { + "color": "#eee" + } + }, + "map": { + "itemStyle": { + "areaColor": "#eeeeee", + "borderColor": "#444444", + "borderWidth": 0.5 + }, + "label": { + "color": "#000000" + }, + "emphasis": { + "itemStyle": { + "areaColor": "rgba(255,215,0,0.8)", + "borderColor": "#444444", + "borderWidth": 1 + }, + "label": { + "color": "rgb(100,0,0)" + } + } + }, + "geo": { + "itemStyle": { + "areaColor": "#eeeeee", + "borderColor": "#444444", + "borderWidth": 0.5 + }, + "label": { + "color": "#000000" + }, + "emphasis": { + "itemStyle": { + "areaColor": "rgba(255,215,0,0.8)", + "borderColor": "#444444", + "borderWidth": 1 + }, + "label": { + "color": "rgb(100,0,0)" + } + } + }, + "categoryAxis": { + "axisLine": { + "show": true, + "lineStyle": { + "color": "#333" + } + }, + "axisTick": { + "show": true, + "lineStyle": { + "color": "#333" + } + }, + "axisLabel": { + "show": true, + "color": "#333" + }, + "splitLine": { + "show": false, + "lineStyle": { + "color": [ + "#ccc" + ] + } + }, + "splitArea": { + "show": false, + "areaStyle": { + "color": [ + "rgba(250,250,250,0.3)", + "rgba(200,200,200,0.3)" + ] + } + } + }, + "valueAxis": { + "axisLine": { + "show": true, + "lineStyle": { + "color": "#333" + } + }, + "axisTick": { + "show": true, + "lineStyle": { + "color": "#333" + } + }, + "axisLabel": { + "show": true, + "color": "#333" + }, + "splitLine": { + "show": true, + "lineStyle": { + "color": [ + "#ccc" + ] + } + }, + "splitArea": { + "show": false, + "areaStyle": { + "color": [ + "rgba(250,250,250,0.3)", + "rgba(200,200,200,0.3)" + ] + } + } + }, + "logAxis": { + "axisLine": { + "show": true, + "lineStyle": { + "color": "#333" + } + }, + "axisTick": { + "show": true, + "lineStyle": { + "color": "#333" + } + }, + "axisLabel": { + "show": true, + "color": "#333" + }, + "splitLine": { + "show": true, + "lineStyle": { + "color": [ + "#ccc" + ] + } + }, + "splitArea": { + "show": false, + "areaStyle": { + "color": [ + "rgba(250,250,250,0.3)", + "rgba(200,200,200,0.3)" + ] + } + } + }, + "timeAxis": { + "axisLine": { + "show": true, + "lineStyle": { + "color": "#333" + } + }, + "axisTick": { + "show": true, + "lineStyle": { + "color": "#333" + } + }, + "axisLabel": { + "show": true, + "color": "#333" + }, + "splitLine": { + "show": true, + "lineStyle": { + "color": [ + "#ccc" + ] + } + }, + "splitArea": { + "show": false, + "areaStyle": { + "color": [ + "rgba(250,250,250,0.3)", + "rgba(200,200,200,0.3)" + ] + } + } + }, + "toolbox": { + "iconStyle": { + "borderColor": "#999999" + }, + "emphasis": { + "iconStyle": { + "borderColor": "#666666" + } + } + }, + "legend": { + "textStyle": { + "color": "#333333" + } + }, + "tooltip": { + "axisPointer": { + "lineStyle": { + "color": "#cccccc", + "width": 1 + }, + "crossStyle": { + "color": "#cccccc", + "width": 1 + } + } + }, + "timeline": { + "lineStyle": { + "color": "#293c55", + "width": 1 + }, + "itemStyle": { + "color": "#293c55", + "borderWidth": 1 + }, + "controlStyle": { + "color": "#293c55", + "borderColor": "#293c55", + "borderWidth": 0.5 + }, + "checkpointStyle": { + "color": "#e43c59", + "borderColor": "#c23531" + }, + "label": { + "color": "#293c55" + }, + "emphasis": { + "itemStyle": { + "color": "#a9334c" + }, + "controlStyle": { + "color": "#293c55", + "borderColor": "#293c55", + "borderWidth": 0.5 + }, + "label": { + "color": "#293c55" + } + } + }, + "visualMap": { + "color": [ + "#bf444c", + "#d88273", + "#f6efa6" + ] + }, + "dataZoom": { + "backgroundColor": "rgba(47,69,84,0)", + "dataBackgroundColor": "rgba(47,69,84,0.3)", + "fillerColor": "rgba(167,183,204,0.4)", + "handleColor": "#a7b7cc", + "handleSize": "100%", + "textStyle": { + "color": "#333333" + } + }, + "markPoint": { + "label": { + "color": "#eee" + }, + "emphasis": { + "label": { + "color": "#eee" + } + } + } + }); +})); diff --git a/IoTGateway/wwwroot/echarts/walden.js b/IoTGateway/wwwroot/echarts/walden.js new file mode 100644 index 0000000..b002fea --- /dev/null +++ b/IoTGateway/wwwroot/echarts/walden.js @@ -0,0 +1,414 @@ + +(function (root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['exports', 'echarts'], factory); + } else if (typeof exports === 'object' && typeof exports.nodeName !== 'string') { + // CommonJS + factory(exports, require('echarts')); + } else { + // Browser globals + factory({}, root.echarts); + } +}(this, function (exports, echarts) { + var log = function (msg) { + if (typeof console !== 'undefined') { + console && console.error && console.error(msg); + } + }; + if (!echarts) { + log('ECharts is not Loaded'); + return; + } + echarts.registerTheme('walden', { + "color": [ + "#3fb1e3", + "#6be6c1", + "#626c91", + "#a0a7e6", + "#c4ebad", + "#96dee8" + ], + "backgroundColor": "rgba(252,252,252,0)", + "textStyle": {}, + "title": { + "textStyle": { + "color": "#666666" + }, + "subtextStyle": { + "color": "#999999" + } + }, + "line": { + "itemStyle": { + "borderWidth": "2" + }, + "lineStyle": { + "width": "3" + }, + "symbolSize": "8", + "symbol": "emptyCircle", + "smooth": false + }, + "radar": { + "itemStyle": { + "borderWidth": "2" + }, + "lineStyle": { + "width": "3" + }, + "symbolSize": "8", + "symbol": "emptyCircle", + "smooth": false + }, + "bar": { + "itemStyle": { + "barBorderWidth": 0, + "barBorderColor": "#ccc" + } + }, + "pie": { + "itemStyle": { + "borderWidth": 0, + "borderColor": "#ccc" + } + }, + "scatter": { + "itemStyle": { + "borderWidth": 0, + "borderColor": "#ccc" + } + }, + "boxplot": { + "itemStyle": { + "borderWidth": 0, + "borderColor": "#ccc" + } + }, + "parallel": { + "itemStyle": { + "borderWidth": 0, + "borderColor": "#ccc" + } + }, + "sankey": { + "itemStyle": { + "borderWidth": 0, + "borderColor": "#ccc" + } + }, + "funnel": { + "itemStyle": { + "borderWidth": 0, + "borderColor": "#ccc" + } + }, + "gauge": { + "itemStyle": { + "borderWidth": 0, + "borderColor": "#ccc" + } + }, + "candlestick": { + "itemStyle": { + "color": "#e6a0d2", + "color0": "transparent", + "borderColor": "#e6a0d2", + "borderColor0": "#3fb1e3", + "borderWidth": "2" + } + }, + "graph": { + "itemStyle": { + "borderWidth": 0, + "borderColor": "#ccc" + }, + "lineStyle": { + "width": "1", + "color": "#cccccc" + }, + "symbolSize": "8", + "symbol": "emptyCircle", + "smooth": false, + "color": [ + "#3fb1e3", + "#6be6c1", + "#626c91", + "#a0a7e6", + "#c4ebad", + "#96dee8" + ], + "label": { + "color": "#ffffff" + } + }, + "map": { + "itemStyle": { + "areaColor": "#eeeeee", + "borderColor": "#aaaaaa", + "borderWidth": 0.5 + }, + "label": { + "color": "#ffffff" + }, + "emphasis": { + "itemStyle": { + "areaColor": "rgba(63,177,227,0.25)", + "borderColor": "#3fb1e3", + "borderWidth": 1 + }, + "label": { + "color": "#3fb1e3" + } + } + }, + "geo": { + "itemStyle": { + "areaColor": "#eeeeee", + "borderColor": "#aaaaaa", + "borderWidth": 0.5 + }, + "label": { + "color": "#ffffff" + }, + "emphasis": { + "itemStyle": { + "areaColor": "rgba(63,177,227,0.25)", + "borderColor": "#3fb1e3", + "borderWidth": 1 + }, + "label": { + "color": "#3fb1e3" + } + } + }, + "categoryAxis": { + "axisLine": { + "show": true, + "lineStyle": { + "color": "#cccccc" + } + }, + "axisTick": { + "show": false, + "lineStyle": { + "color": "#333" + } + }, + "axisLabel": { + "show": true, + "color": "#999999" + }, + "splitLine": { + "show": true, + "lineStyle": { + "color": [ + "#eeeeee" + ] + } + }, + "splitArea": { + "show": false, + "areaStyle": { + "color": [ + "rgba(250,250,250,0.05)", + "rgba(200,200,200,0.02)" + ] + } + } + }, + "valueAxis": { + "axisLine": { + "show": true, + "lineStyle": { + "color": "#cccccc" + } + }, + "axisTick": { + "show": false, + "lineStyle": { + "color": "#333" + } + }, + "axisLabel": { + "show": true, + "color": "#999999" + }, + "splitLine": { + "show": true, + "lineStyle": { + "color": [ + "#eeeeee" + ] + } + }, + "splitArea": { + "show": false, + "areaStyle": { + "color": [ + "rgba(250,250,250,0.05)", + "rgba(200,200,200,0.02)" + ] + } + } + }, + "logAxis": { + "axisLine": { + "show": true, + "lineStyle": { + "color": "#cccccc" + } + }, + "axisTick": { + "show": false, + "lineStyle": { + "color": "#333" + } + }, + "axisLabel": { + "show": true, + "color": "#999999" + }, + "splitLine": { + "show": true, + "lineStyle": { + "color": [ + "#eeeeee" + ] + } + }, + "splitArea": { + "show": false, + "areaStyle": { + "color": [ + "rgba(250,250,250,0.05)", + "rgba(200,200,200,0.02)" + ] + } + } + }, + "timeAxis": { + "axisLine": { + "show": true, + "lineStyle": { + "color": "#cccccc" + } + }, + "axisTick": { + "show": false, + "lineStyle": { + "color": "#333" + } + }, + "axisLabel": { + "show": true, + "color": "#999999" + }, + "splitLine": { + "show": true, + "lineStyle": { + "color": [ + "#eeeeee" + ] + } + }, + "splitArea": { + "show": false, + "areaStyle": { + "color": [ + "rgba(250,250,250,0.05)", + "rgba(200,200,200,0.02)" + ] + } + } + }, + "toolbox": { + "iconStyle": { + "borderColor": "#999999" + }, + "emphasis": { + "iconStyle": { + "borderColor": "#666666" + } + } + }, + "legend": { + "textStyle": { + "color": "#999999" + } + }, + "tooltip": { + "axisPointer": { + "lineStyle": { + "color": "#cccccc", + "width": 1 + }, + "crossStyle": { + "color": "#cccccc", + "width": 1 + } + } + }, + "timeline": { + "lineStyle": { + "color": "#626c91", + "width": 1 + }, + "itemStyle": { + "color": "#626c91", + "borderWidth": 1 + }, + "controlStyle": { + "color": "#626c91", + "borderColor": "#626c91", + "borderWidth": 0.5 + }, + "checkpointStyle": { + "color": "#3fb1e3", + "borderColor": "#3fb1e3" + }, + "label": { + "color": "#626c91" + }, + "emphasis": { + "itemStyle": { + "color": "#626c91" + }, + "controlStyle": { + "color": "#626c91", + "borderColor": "#626c91", + "borderWidth": 0.5 + }, + "label": { + "color": "#626c91" + } + } + }, + "visualMap": { + "color": [ + "#2a99c9", + "#afe8ff" + ] + }, + "dataZoom": { + "backgroundColor": "rgba(255,255,255,0)", + "dataBackgroundColor": "rgba(222,222,222,1)", + "fillerColor": "rgba(114,230,212,0.25)", + "handleColor": "#cccccc", + "handleSize": "100%", + "textStyle": { + "color": "#999999" + } + }, + "markPoint": { + "label": { + "color": "#ffffff" + }, + "emphasis": { + "label": { + "color": "#ffffff" + } + } + } + }); +})); diff --git a/IoTGateway/wwwroot/echarts/westeros.js b/IoTGateway/wwwroot/echarts/westeros.js new file mode 100644 index 0000000..a4ad14a --- /dev/null +++ b/IoTGateway/wwwroot/echarts/westeros.js @@ -0,0 +1,415 @@ + +(function (root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['exports', 'echarts'], factory); + } else if (typeof exports === 'object' && typeof exports.nodeName !== 'string') { + // CommonJS + factory(exports, require('echarts')); + } else { + // Browser globals + factory({}, root.echarts); + } +}(this, function (exports, echarts) { + var log = function (msg) { + if (typeof console !== 'undefined') { + console && console.error && console.error(msg); + } + }; + if (!echarts) { + log('ECharts is not Loaded'); + return; + } + echarts.registerTheme('westeros', { + "color": [ + "#516b91", + "#59c4e6", + "#edafda", + "#93b7e3", + "#a5e7f0", + "#cbb0e3" + ], + "backgroundColor": "rgba(0,0,0,0)", + "textStyle": {}, + "title": { + "textStyle": { + "color": "#516b91" + }, + "subtextStyle": { + "color": "#93b7e3" + } + }, + "line": { + "itemStyle": { + "borderWidth": "2" + }, + "lineStyle": { + "width": "2" + }, + "symbolSize": "6", + "symbol": "emptyCircle", + "smooth": true + }, + "radar": { + "itemStyle": { + "borderWidth": "2" + }, + "lineStyle": { + "width": "2" + }, + "symbolSize": "6", + "symbol": "emptyCircle", + "smooth": true + }, + "bar": { + "itemStyle": { + "barBorderWidth": 0, + "barBorderColor": "#ccc" + } + }, + "pie": { + "itemStyle": { + "borderWidth": 0, + "borderColor": "#ccc" + } + }, + "scatter": { + "itemStyle": { + "borderWidth": 0, + "borderColor": "#ccc" + } + }, + "boxplot": { + "itemStyle": { + "borderWidth": 0, + "borderColor": "#ccc" + } + }, + "parallel": { + "itemStyle": { + "borderWidth": 0, + "borderColor": "#ccc" + } + }, + "sankey": { + "itemStyle": { + "borderWidth": 0, + "borderColor": "#ccc" + } + }, + "funnel": { + "itemStyle": { + "borderWidth": 0, + "borderColor": "#ccc" + } + }, + "gauge": { + "itemStyle": { + "borderWidth": 0, + "borderColor": "#ccc" + } + }, + "candlestick": { + "itemStyle": { + "color": "#edafda", + "color0": "transparent", + "borderColor": "#d680bc", + "borderColor0": "#8fd3e8", + "borderWidth": "2" + } + }, + "graph": { + "itemStyle": { + "borderWidth": 0, + "borderColor": "#ccc" + }, + "lineStyle": { + "width": 1, + "color": "#aaa" + }, + "symbolSize": "6", + "symbol": "emptyCircle", + "smooth": true, + "color": [ + "#516b91", + "#59c4e6", + "#edafda", + "#93b7e3", + "#a5e7f0", + "#cbb0e3" + ], + "label": { + "color": "#eee" + } + }, + "map": { + "itemStyle": { + "areaColor": "#f3f3f3", + "borderColor": "#516b91", + "borderWidth": 0.5 + }, + "label": { + "color": "#000" + }, + "emphasis": { + "itemStyle": { + "areaColor": "#a5e7f0", + "borderColor": "#516b91", + "borderWidth": 1 + }, + "label": { + "color": "#516b91" + } + } + }, + "geo": { + "itemStyle": { + "areaColor": "#f3f3f3", + "borderColor": "#516b91", + "borderWidth": 0.5 + }, + "label": { + "color": "#000" + }, + "emphasis": { + "itemStyle": { + "areaColor": "#a5e7f0", + "borderColor": "#516b91", + "borderWidth": 1 + }, + "label": { + "color": "#516b91" + } + } + }, + "categoryAxis": { + "axisLine": { + "show": true, + "lineStyle": { + "color": "#cccccc" + } + }, + "axisTick": { + "show": false, + "lineStyle": { + "color": "#333" + } + }, + "axisLabel": { + "show": true, + "color": "#999999" + }, + "splitLine": { + "show": true, + "lineStyle": { + "color": [ + "#eeeeee" + ] + } + }, + "splitArea": { + "show": false, + "areaStyle": { + "color": [ + "rgba(250,250,250,0.05)", + "rgba(200,200,200,0.02)" + ] + } + } + }, + "valueAxis": { + "axisLine": { + "show": true, + "lineStyle": { + "color": "#cccccc" + } + }, + "axisTick": { + "show": false, + "lineStyle": { + "color": "#333" + } + }, + "axisLabel": { + "show": true, + "color": "#999999" + }, + "splitLine": { + "show": true, + "lineStyle": { + "color": [ + "#eeeeee" + ] + } + }, + "splitArea": { + "show": false, + "areaStyle": { + "color": [ + "rgba(250,250,250,0.05)", + "rgba(200,200,200,0.02)" + ] + } + } + }, + "logAxis": { + "axisLine": { + "show": true, + "lineStyle": { + "color": "#cccccc" + } + }, + "axisTick": { + "show": false, + "lineStyle": { + "color": "#333" + } + }, + "axisLabel": { + "show": true, + "color": "#999999" + }, + "splitLine": { + "show": true, + "lineStyle": { + "color": [ + "#eeeeee" + ] + } + }, + "splitArea": { + "show": false, + "areaStyle": { + "color": [ + "rgba(250,250,250,0.05)", + "rgba(200,200,200,0.02)" + ] + } + } + }, + "timeAxis": { + "axisLine": { + "show": true, + "lineStyle": { + "color": "#cccccc" + } + }, + "axisTick": { + "show": false, + "lineStyle": { + "color": "#333" + } + }, + "axisLabel": { + "show": true, + "color": "#999999" + }, + "splitLine": { + "show": true, + "lineStyle": { + "color": [ + "#eeeeee" + ] + } + }, + "splitArea": { + "show": false, + "areaStyle": { + "color": [ + "rgba(250,250,250,0.05)", + "rgba(200,200,200,0.02)" + ] + } + } + }, + "toolbox": { + "iconStyle": { + "borderColor": "#999999" + }, + "emphasis": { + "iconStyle": { + "borderColor": "#666666" + } + } + }, + "legend": { + "textStyle": { + "color": "#999999" + } + }, + "tooltip": { + "axisPointer": { + "lineStyle": { + "color": "#cccccc", + "width": 1 + }, + "crossStyle": { + "color": "#cccccc", + "width": 1 + } + } + }, + "timeline": { + "lineStyle": { + "color": "#8fd3e8", + "width": 1 + }, + "itemStyle": { + "color": "#8fd3e8", + "borderWidth": 1 + }, + "controlStyle": { + "color": "#8fd3e8", + "borderColor": "#8fd3e8", + "borderWidth": 0.5 + }, + "checkpointStyle": { + "color": "#8fd3e8", + "borderColor": "#8a7ca8" + }, + "label": { + "color": "#8fd3e8" + }, + "emphasis": { + "itemStyle": { + "color": "#8fd3e8" + }, + "controlStyle": { + "color": "#8fd3e8", + "borderColor": "#8fd3e8", + "borderWidth": 0.5 + }, + "label": { + "color": "#8fd3e8" + } + } + }, + "visualMap": { + "color": [ + "#516b91", + "#59c4e6", + "#a5e7f0" + ] + }, + "dataZoom": { + "backgroundColor": "rgba(0,0,0,0)", + "dataBackgroundColor": "rgba(255,255,255,0.3)", + "fillerColor": "rgba(167,183,204,0.4)", + "handleColor": "#a7b7cc", + "handleSize": "100%", + "textStyle": { + "color": "#333" + } + }, + "markPoint": { + "label": { + "color": "#eee" + }, + "emphasis": { + "label": { + "color": "#eee" + } + } + } + }); +})); diff --git a/IoTGateway/wwwroot/echarts/wonderland.js b/IoTGateway/wwwroot/echarts/wonderland.js new file mode 100644 index 0000000..8e77799 --- /dev/null +++ b/IoTGateway/wwwroot/echarts/wonderland.js @@ -0,0 +1,415 @@ + +(function (root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['exports', 'echarts'], factory); + } else if (typeof exports === 'object' && typeof exports.nodeName !== 'string') { + // CommonJS + factory(exports, require('echarts')); + } else { + // Browser globals + factory({}, root.echarts); + } +}(this, function (exports, echarts) { + var log = function (msg) { + if (typeof console !== 'undefined') { + console && console.error && console.error(msg); + } + }; + if (!echarts) { + log('ECharts is not Loaded'); + return; + } + echarts.registerTheme('wonderland', { + "color": [ + "#4ea397", + "#22c3aa", + "#7bd9a5", + "#d0648a", + "#f58db2", + "#f2b3c9" + ], + "backgroundColor": "rgba(255,255,255,0)", + "textStyle": {}, + "title": { + "textStyle": { + "color": "#666666" + }, + "subtextStyle": { + "color": "#999999" + } + }, + "line": { + "itemStyle": { + "borderWidth": "2" + }, + "lineStyle": { + "width": "3" + }, + "symbolSize": "8", + "symbol": "emptyCircle", + "smooth": false + }, + "radar": { + "itemStyle": { + "borderWidth": "2" + }, + "lineStyle": { + "width": "3" + }, + "symbolSize": "8", + "symbol": "emptyCircle", + "smooth": false + }, + "bar": { + "itemStyle": { + "barBorderWidth": 0, + "barBorderColor": "#ccc" + } + }, + "pie": { + "itemStyle": { + "borderWidth": 0, + "borderColor": "#ccc" + } + }, + "scatter": { + "itemStyle": { + "borderWidth": 0, + "borderColor": "#ccc" + } + }, + "boxplot": { + "itemStyle": { + "borderWidth": 0, + "borderColor": "#ccc" + } + }, + "parallel": { + "itemStyle": { + "borderWidth": 0, + "borderColor": "#ccc" + } + }, + "sankey": { + "itemStyle": { + "borderWidth": 0, + "borderColor": "#ccc" + } + }, + "funnel": { + "itemStyle": { + "borderWidth": 0, + "borderColor": "#ccc" + } + }, + "gauge": { + "itemStyle": { + "borderWidth": 0, + "borderColor": "#ccc" + } + }, + "candlestick": { + "itemStyle": { + "color": "#d0648a", + "color0": "transparent", + "borderColor": "#d0648a", + "borderColor0": "#22c3aa", + "borderWidth": "1" + } + }, + "graph": { + "itemStyle": { + "borderWidth": 0, + "borderColor": "#ccc" + }, + "lineStyle": { + "width": "1", + "color": "#cccccc" + }, + "symbolSize": "8", + "symbol": "emptyCircle", + "smooth": false, + "color": [ + "#4ea397", + "#22c3aa", + "#7bd9a5", + "#d0648a", + "#f58db2", + "#f2b3c9" + ], + "label": { + "color": "#ffffff" + } + }, + "map": { + "itemStyle": { + "areaColor": "#eeeeee", + "borderColor": "#999999", + "borderWidth": 0.5 + }, + "label": { + "color": "#28544e" + }, + "emphasis": { + "itemStyle": { + "areaColor": "rgba(34,195,170,0.25)", + "borderColor": "#22c3aa", + "borderWidth": 1 + }, + "label": { + "color": "#349e8e" + } + } + }, + "geo": { + "itemStyle": { + "areaColor": "#eeeeee", + "borderColor": "#999999", + "borderWidth": 0.5 + }, + "label": { + "color": "#28544e" + }, + "emphasis": { + "itemStyle": { + "areaColor": "rgba(34,195,170,0.25)", + "borderColor": "#22c3aa", + "borderWidth": 1 + }, + "label": { + "color": "#349e8e" + } + } + }, + "categoryAxis": { + "axisLine": { + "show": true, + "lineStyle": { + "color": "#cccccc" + } + }, + "axisTick": { + "show": false, + "lineStyle": { + "color": "#333" + } + }, + "axisLabel": { + "show": true, + "color": "#999999" + }, + "splitLine": { + "show": true, + "lineStyle": { + "color": [ + "#eeeeee" + ] + } + }, + "splitArea": { + "show": false, + "areaStyle": { + "color": [ + "rgba(250,250,250,0.05)", + "rgba(200,200,200,0.02)" + ] + } + } + }, + "valueAxis": { + "axisLine": { + "show": true, + "lineStyle": { + "color": "#cccccc" + } + }, + "axisTick": { + "show": false, + "lineStyle": { + "color": "#333" + } + }, + "axisLabel": { + "show": true, + "color": "#999999" + }, + "splitLine": { + "show": true, + "lineStyle": { + "color": [ + "#eeeeee" + ] + } + }, + "splitArea": { + "show": false, + "areaStyle": { + "color": [ + "rgba(250,250,250,0.05)", + "rgba(200,200,200,0.02)" + ] + } + } + }, + "logAxis": { + "axisLine": { + "show": true, + "lineStyle": { + "color": "#cccccc" + } + }, + "axisTick": { + "show": false, + "lineStyle": { + "color": "#333" + } + }, + "axisLabel": { + "show": true, + "color": "#999999" + }, + "splitLine": { + "show": true, + "lineStyle": { + "color": [ + "#eeeeee" + ] + } + }, + "splitArea": { + "show": false, + "areaStyle": { + "color": [ + "rgba(250,250,250,0.05)", + "rgba(200,200,200,0.02)" + ] + } + } + }, + "timeAxis": { + "axisLine": { + "show": true, + "lineStyle": { + "color": "#cccccc" + } + }, + "axisTick": { + "show": false, + "lineStyle": { + "color": "#333" + } + }, + "axisLabel": { + "show": true, + "color": "#999999" + }, + "splitLine": { + "show": true, + "lineStyle": { + "color": [ + "#eeeeee" + ] + } + }, + "splitArea": { + "show": false, + "areaStyle": { + "color": [ + "rgba(250,250,250,0.05)", + "rgba(200,200,200,0.02)" + ] + } + } + }, + "toolbox": { + "iconStyle": { + "borderColor": "#999999" + }, + "emphasis": { + "iconStyle": { + "borderColor": "#666666" + } + } + }, + "legend": { + "textStyle": { + "color": "#999999" + } + }, + "tooltip": { + "axisPointer": { + "lineStyle": { + "color": "#cccccc", + "width": 1 + }, + "crossStyle": { + "color": "#cccccc", + "width": 1 + } + } + }, + "timeline": { + "lineStyle": { + "color": "#4ea397", + "width": 1 + }, + "itemStyle": { + "color": "#4ea397", + "borderWidth": 1 + }, + "controlStyle": { + "color": "#4ea397", + "borderColor": "#4ea397", + "borderWidth": 0.5 + }, + "checkpointStyle": { + "color": "#4ea397", + "borderColor": "#3cebd2" + }, + "label": { + "color": "#4ea397" + }, + "emphasis": { + "itemStyle": { + "color": "#4ea397" + }, + "controlStyle": { + "color": "#4ea397", + "borderColor": "#4ea397", + "borderWidth": 0.5 + }, + "label": { + "color": "#4ea397" + } + } + }, + "visualMap": { + "color": [ + "#d0648a", + "#22c3aa", + "#adfff1" + ] + }, + "dataZoom": { + "backgroundColor": "rgba(255,255,255,0)", + "dataBackgroundColor": "rgba(222,222,222,1)", + "fillerColor": "rgba(114,230,212,0.25)", + "handleColor": "#cccccc", + "handleSize": "100%", + "textStyle": { + "color": "#999999" + } + }, + "markPoint": { + "label": { + "color": "#ffffff" + }, + "emphasis": { + "label": { + "color": "#ffffff" + } + } + } + }); +})); diff --git a/IoTGateway/wwwroot/favicon.ico b/IoTGateway/wwwroot/favicon.ico new file mode 100644 index 0000000..0c3ef18 Binary files /dev/null and b/IoTGateway/wwwroot/favicon.ico differ diff --git a/IoTGateway/wwwroot/font-awesome/font-awesome.css b/IoTGateway/wwwroot/font-awesome/font-awesome.css new file mode 100644 index 0000000..486a098 --- /dev/null +++ b/IoTGateway/wwwroot/font-awesome/font-awesome.css @@ -0,0 +1,2337 @@ +/*! + * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */ +/* FONT PATH + * -------------------------- */ +@font-face { + font-family: 'fa'; + src: url('../fonts/fontawesome-webfont.eot?v=4.7.0'); + src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'), url('../fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'), url('../fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'), url('../fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'), url('../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg'); + font-weight: normal; + font-style: normal; +} +.fa { + display: inline-block; + font: normal normal normal 14px/1 FontAwesome; + font-size: inherit; + text-rendering: auto; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} +/* makes the font 33% larger relative to the icon container */ +.fa-lg { + font-size: 1.33333333em; + line-height: 0.75em; + vertical-align: -15%; +} +.fa-2x { + font-size: 2em; +} +.fa-3x { + font-size: 3em; +} +.fa-4x { + font-size: 4em; +} +.fa-5x { + font-size: 5em; +} +.fa-fw { + width: 1.28571429em; + text-align: center; +} +.fa-ul { + padding-left: 0; + margin-left: 2.14285714em; + list-style-type: none; +} +.fa-ul > li { + position: relative; +} +.fa-li { + position: absolute; + left: -2.14285714em; + width: 2.14285714em; + top: 0.14285714em; + text-align: center; +} +.fa-li.fa-lg { + left: -1.85714286em; +} +.fa-border { + padding: .2em .25em .15em; + border: solid 0.08em #eeeeee; + border-radius: .1em; +} +.fa-pull-left { + float: left; +} +.fa-pull-right { + float: right; +} +.fa.fa-pull-left { + margin-right: .3em; +} +.fa.fa-pull-right { + margin-left: .3em; +} +/* Deprecated as of 4.4.0 */ +.pull-right { + float: right; +} +.pull-left { + float: left; +} +.fa.pull-left { + margin-right: .3em; +} +.fa.pull-right { + margin-left: .3em; +} +.fa-spin { + -webkit-animation: fa-spin 2s infinite linear; + animation: fa-spin 2s infinite linear; +} +.fa-pulse { + -webkit-animation: fa-spin 1s infinite steps(8); + animation: fa-spin 1s infinite steps(8); +} +@-webkit-keyframes fa-spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(359deg); + transform: rotate(359deg); + } +} +@keyframes fa-spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(359deg); + transform: rotate(359deg); + } +} +.fa-rotate-90 { + -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=1)"; + -webkit-transform: rotate(90deg); + -ms-transform: rotate(90deg); + transform: rotate(90deg); +} +.fa-rotate-180 { + -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2)"; + -webkit-transform: rotate(180deg); + -ms-transform: rotate(180deg); + transform: rotate(180deg); +} +.fa-rotate-270 { + -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=3)"; + -webkit-transform: rotate(270deg); + -ms-transform: rotate(270deg); + transform: rotate(270deg); +} +.fa-flip-horizontal { + -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)"; + -webkit-transform: scale(-1, 1); + -ms-transform: scale(-1, 1); + transform: scale(-1, 1); +} +.fa-flip-vertical { + -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)"; + -webkit-transform: scale(1, -1); + -ms-transform: scale(1, -1); + transform: scale(1, -1); +} +:root .fa-rotate-90, +:root .fa-rotate-180, +:root .fa-rotate-270, +:root .fa-flip-horizontal, +:root .fa-flip-vertical { + filter: none; +} +.fa-stack { + position: relative; + display: inline-block; + width: 2em; + height: 2em; + line-height: 2em; + vertical-align: middle; +} +.fa-stack-1x, +.fa-stack-2x { + position: absolute; + left: 0; + width: 100%; + text-align: center; +} +.fa-stack-1x { + line-height: inherit; +} +.fa-stack-2x { + font-size: 2em; +} +.fa-inverse { + color: #ffffff; +} +/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen + readers do not read off random characters that represent icons */ +.fa-glass:before { + content: "\f000"; +} +.fa-music:before { + content: "\f001"; +} +.fa-search:before { + content: "\f002"; +} +.fa-envelope-o:before { + content: "\f003"; +} +.fa-heart:before { + content: "\f004"; +} +.fa-star:before { + content: "\f005"; +} +.fa-star-o:before { + content: "\f006"; +} +.fa-user:before { + content: "\f007"; +} +.fa-film:before { + content: "\f008"; +} +.fa-th-large:before { + content: "\f009"; +} +.fa-th:before { + content: "\f00a"; +} +.fa-th-list:before { + content: "\f00b"; +} +.fa-check:before { + content: "\f00c"; +} +.fa-remove:before, +.fa-close:before, +.fa-times:before { + content: "\f00d"; +} +.fa-search-plus:before { + content: "\f00e"; +} +.fa-search-minus:before { + content: "\f010"; +} +.fa-power-off:before { + content: "\f011"; +} +.fa-signal:before { + content: "\f012"; +} +.fa-gear:before, +.fa-cog:before { + content: "\f013"; +} +.fa-trash-o:before { + content: "\f014"; +} +.fa-home:before { + content: "\f015"; +} +.fa-file-o:before { + content: "\f016"; +} +.fa-clock-o:before { + content: "\f017"; +} +.fa-road:before { + content: "\f018"; +} +.fa-download:before { + content: "\f019"; +} +.fa-arrow-circle-o-down:before { + content: "\f01a"; +} +.fa-arrow-circle-o-up:before { + content: "\f01b"; +} +.fa-inbox:before { + content: "\f01c"; +} +.fa-play-circle-o:before { + content: "\f01d"; +} +.fa-rotate-right:before, +.fa-repeat:before { + content: "\f01e"; +} +.fa-refresh:before { + content: "\f021"; +} +.fa-list-alt:before { + content: "\f022"; +} +.fa-lock:before { + content: "\f023"; +} +.fa-flag:before { + content: "\f024"; +} +.fa-headphones:before { + content: "\f025"; +} +.fa-volume-off:before { + content: "\f026"; +} +.fa-volume-down:before { + content: "\f027"; +} +.fa-volume-up:before { + content: "\f028"; +} +.fa-qrcode:before { + content: "\f029"; +} +.fa-barcode:before { + content: "\f02a"; +} +.fa-tag:before { + content: "\f02b"; +} +.fa-tags:before { + content: "\f02c"; +} +.fa-book:before { + content: "\f02d"; +} +.fa-bookmark:before { + content: "\f02e"; +} +.fa-print:before { + content: "\f02f"; +} +.fa-camera:before { + content: "\f030"; +} +.fa-font:before { + content: "\f031"; +} +.fa-bold:before { + content: "\f032"; +} +.fa-italic:before { + content: "\f033"; +} +.fa-text-height:before { + content: "\f034"; +} +.fa-text-width:before { + content: "\f035"; +} +.fa-align-left:before { + content: "\f036"; +} +.fa-align-center:before { + content: "\f037"; +} +.fa-align-right:before { + content: "\f038"; +} +.fa-align-justify:before { + content: "\f039"; +} +.fa-list:before { + content: "\f03a"; +} +.fa-dedent:before, +.fa-outdent:before { + content: "\f03b"; +} +.fa-indent:before { + content: "\f03c"; +} +.fa-video-camera:before { + content: "\f03d"; +} +.fa-photo:before, +.fa-image:before, +.fa-picture-o:before { + content: "\f03e"; +} +.fa-pencil:before { + content: "\f040"; +} +.fa-map-marker:before { + content: "\f041"; +} +.fa-adjust:before { + content: "\f042"; +} +.fa-tint:before { + content: "\f043"; +} +.fa-edit:before, +.fa-pencil-square-o:before { + content: "\f044"; +} +.fa-share-square-o:before { + content: "\f045"; +} +.fa-check-square-o:before { + content: "\f046"; +} +.fa-arrows:before { + content: "\f047"; +} +.fa-step-backward:before { + content: "\f048"; +} +.fa-fast-backward:before { + content: "\f049"; +} +.fa-backward:before { + content: "\f04a"; +} +.fa-play:before { + content: "\f04b"; +} +.fa-pause:before { + content: "\f04c"; +} +.fa-stop:before { + content: "\f04d"; +} +.fa-forward:before { + content: "\f04e"; +} +.fa-fast-forward:before { + content: "\f050"; +} +.fa-step-forward:before { + content: "\f051"; +} +.fa-eject:before { + content: "\f052"; +} +.fa-chevron-left:before { + content: "\f053"; +} +.fa-chevron-right:before { + content: "\f054"; +} +.fa-plus-circle:before { + content: "\f055"; +} +.fa-minus-circle:before { + content: "\f056"; +} +.fa-times-circle:before { + content: "\f057"; +} +.fa-check-circle:before { + content: "\f058"; +} +.fa-question-circle:before { + content: "\f059"; +} +.fa-info-circle:before { + content: "\f05a"; +} +.fa-crosshairs:before { + content: "\f05b"; +} +.fa-times-circle-o:before { + content: "\f05c"; +} +.fa-check-circle-o:before { + content: "\f05d"; +} +.fa-ban:before { + content: "\f05e"; +} +.fa-arrow-left:before { + content: "\f060"; +} +.fa-arrow-right:before { + content: "\f061"; +} +.fa-arrow-up:before { + content: "\f062"; +} +.fa-arrow-down:before { + content: "\f063"; +} +.fa-mail-forward:before, +.fa-share:before { + content: "\f064"; +} +.fa-expand:before { + content: "\f065"; +} +.fa-compress:before { + content: "\f066"; +} +.fa-plus:before { + content: "\f067"; +} +.fa-minus:before { + content: "\f068"; +} +.fa-asterisk:before { + content: "\f069"; +} +.fa-exclamation-circle:before { + content: "\f06a"; +} +.fa-gift:before { + content: "\f06b"; +} +.fa-leaf:before { + content: "\f06c"; +} +.fa-fire:before { + content: "\f06d"; +} +.fa-eye:before { + content: "\f06e"; +} +.fa-eye-slash:before { + content: "\f070"; +} +.fa-warning:before, +.fa-exclamation-triangle:before { + content: "\f071"; +} +.fa-plane:before { + content: "\f072"; +} +.fa-calendar:before { + content: "\f073"; +} +.fa-random:before { + content: "\f074"; +} +.fa-comment:before { + content: "\f075"; +} +.fa-magnet:before { + content: "\f076"; +} +.fa-chevron-up:before { + content: "\f077"; +} +.fa-chevron-down:before { + content: "\f078"; +} +.fa-retweet:before { + content: "\f079"; +} +.fa-shopping-cart:before { + content: "\f07a"; +} +.fa-folder:before { + content: "\f07b"; +} +.fa-folder-open:before { + content: "\f07c"; +} +.fa-arrows-v:before { + content: "\f07d"; +} +.fa-arrows-h:before { + content: "\f07e"; +} +.fa-bar-chart-o:before, +.fa-bar-chart:before { + content: "\f080"; +} +.fa-twitter-square:before { + content: "\f081"; +} +.fa-facebook-square:before { + content: "\f082"; +} +.fa-camera-retro:before { + content: "\f083"; +} +.fa-key:before { + content: "\f084"; +} +.fa-gears:before, +.fa-cogs:before { + content: "\f085"; +} +.fa-comments:before { + content: "\f086"; +} +.fa-thumbs-o-up:before { + content: "\f087"; +} +.fa-thumbs-o-down:before { + content: "\f088"; +} +.fa-star-half:before { + content: "\f089"; +} +.fa-heart-o:before { + content: "\f08a"; +} +.fa-sign-out:before { + content: "\f08b"; +} +.fa-linkedin-square:before { + content: "\f08c"; +} +.fa-thumb-tack:before { + content: "\f08d"; +} +.fa-external-link:before { + content: "\f08e"; +} +.fa-sign-in:before { + content: "\f090"; +} +.fa-trophy:before { + content: "\f091"; +} +.fa-github-square:before { + content: "\f092"; +} +.fa-upload:before { + content: "\f093"; +} +.fa-lemon-o:before { + content: "\f094"; +} +.fa-phone:before { + content: "\f095"; +} +.fa-square-o:before { + content: "\f096"; +} +.fa-bookmark-o:before { + content: "\f097"; +} +.fa-phone-square:before { + content: "\f098"; +} +.fa-twitter:before { + content: "\f099"; +} +.fa-facebook-f:before, +.fa-facebook:before { + content: "\f09a"; +} +.fa-github:before { + content: "\f09b"; +} +.fa-unlock:before { + content: "\f09c"; +} +.fa-credit-card:before { + content: "\f09d"; +} +.fa-feed:before, +.fa-rss:before { + content: "\f09e"; +} +.fa-hdd-o:before { + content: "\f0a0"; +} +.fa-bullhorn:before { + content: "\f0a1"; +} +.fa-bell:before { + content: "\f0f3"; +} +.fa-certificate:before { + content: "\f0a3"; +} +.fa-hand-o-right:before { + content: "\f0a4"; +} +.fa-hand-o-left:before { + content: "\f0a5"; +} +.fa-hand-o-up:before { + content: "\f0a6"; +} +.fa-hand-o-down:before { + content: "\f0a7"; +} +.fa-arrow-circle-left:before { + content: "\f0a8"; +} +.fa-arrow-circle-right:before { + content: "\f0a9"; +} +.fa-arrow-circle-up:before { + content: "\f0aa"; +} +.fa-arrow-circle-down:before { + content: "\f0ab"; +} +.fa-globe:before { + content: "\f0ac"; +} +.fa-wrench:before { + content: "\f0ad"; +} +.fa-tasks:before { + content: "\f0ae"; +} +.fa-filter:before { + content: "\f0b0"; +} +.fa-briefcase:before { + content: "\f0b1"; +} +.fa-arrows-alt:before { + content: "\f0b2"; +} +.fa-group:before, +.fa-users:before { + content: "\f0c0"; +} +.fa-chain:before, +.fa-link:before { + content: "\f0c1"; +} +.fa-cloud:before { + content: "\f0c2"; +} +.fa-flask:before { + content: "\f0c3"; +} +.fa-cut:before, +.fa-scissors:before { + content: "\f0c4"; +} +.fa-copy:before, +.fa-files-o:before { + content: "\f0c5"; +} +.fa-paperclip:before { + content: "\f0c6"; +} +.fa-save:before, +.fa-floppy-o:before { + content: "\f0c7"; +} +.fa-square:before { + content: "\f0c8"; +} +.fa-navicon:before, +.fa-reorder:before, +.fa-bars:before { + content: "\f0c9"; +} +.fa-list-ul:before { + content: "\f0ca"; +} +.fa-list-ol:before { + content: "\f0cb"; +} +.fa-strikethrough:before { + content: "\f0cc"; +} +.fa-underline:before { + content: "\f0cd"; +} +.fa-table:before { + content: "\f0ce"; +} +.fa-magic:before { + content: "\f0d0"; +} +.fa-truck:before { + content: "\f0d1"; +} +.fa-pinterest:before { + content: "\f0d2"; +} +.fa-pinterest-square:before { + content: "\f0d3"; +} +.fa-google-plus-square:before { + content: "\f0d4"; +} +.fa-google-plus:before { + content: "\f0d5"; +} +.fa-money:before { + content: "\f0d6"; +} +.fa-caret-down:before { + content: "\f0d7"; +} +.fa-caret-up:before { + content: "\f0d8"; +} +.fa-caret-left:before { + content: "\f0d9"; +} +.fa-caret-right:before { + content: "\f0da"; +} +.fa-columns:before { + content: "\f0db"; +} +.fa-unsorted:before, +.fa-sort:before { + content: "\f0dc"; +} +.fa-sort-down:before, +.fa-sort-desc:before { + content: "\f0dd"; +} +.fa-sort-up:before, +.fa-sort-asc:before { + content: "\f0de"; +} +.fa-envelope:before { + content: "\f0e0"; +} +.fa-linkedin:before { + content: "\f0e1"; +} +.fa-rotate-left:before, +.fa-undo:before { + content: "\f0e2"; +} +.fa-legal:before, +.fa-gavel:before { + content: "\f0e3"; +} +.fa-dashboard:before, +.fa-tachometer:before { + content: "\f0e4"; +} +.fa-comment-o:before { + content: "\f0e5"; +} +.fa-comments-o:before { + content: "\f0e6"; +} +.fa-flash:before, +.fa-bolt:before { + content: "\f0e7"; +} +.fa-sitemap:before { + content: "\f0e8"; +} +.fa-umbrella:before { + content: "\f0e9"; +} +.fa-paste:before, +.fa-clipboard:before { + content: "\f0ea"; +} +.fa-lightbulb-o:before { + content: "\f0eb"; +} +.fa-exchange:before { + content: "\f0ec"; +} +.fa-cloud-download:before { + content: "\f0ed"; +} +.fa-cloud-upload:before { + content: "\f0ee"; +} +.fa-user-md:before { + content: "\f0f0"; +} +.fa-stethoscope:before { + content: "\f0f1"; +} +.fa-suitcase:before { + content: "\f0f2"; +} +.fa-bell-o:before { + content: "\f0a2"; +} +.fa-coffee:before { + content: "\f0f4"; +} +.fa-cutlery:before { + content: "\f0f5"; +} +.fa-file-text-o:before { + content: "\f0f6"; +} +.fa-building-o:before { + content: "\f0f7"; +} +.fa-hospital-o:before { + content: "\f0f8"; +} +.fa-ambulance:before { + content: "\f0f9"; +} +.fa-medkit:before { + content: "\f0fa"; +} +.fa-fighter-jet:before { + content: "\f0fb"; +} +.fa-beer:before { + content: "\f0fc"; +} +.fa-h-square:before { + content: "\f0fd"; +} +.fa-plus-square:before { + content: "\f0fe"; +} +.fa-angle-double-left:before { + content: "\f100"; +} +.fa-angle-double-right:before { + content: "\f101"; +} +.fa-angle-double-up:before { + content: "\f102"; +} +.fa-angle-double-down:before { + content: "\f103"; +} +.fa-angle-left:before { + content: "\f104"; +} +.fa-angle-right:before { + content: "\f105"; +} +.fa-angle-up:before { + content: "\f106"; +} +.fa-angle-down:before { + content: "\f107"; +} +.fa-desktop:before { + content: "\f108"; +} +.fa-laptop:before { + content: "\f109"; +} +.fa-tablet:before { + content: "\f10a"; +} +.fa-mobile-phone:before, +.fa-mobile:before { + content: "\f10b"; +} +.fa-circle-o:before { + content: "\f10c"; +} +.fa-quote-left:before { + content: "\f10d"; +} +.fa-quote-right:before { + content: "\f10e"; +} +.fa-spinner:before { + content: "\f110"; +} +.fa-circle:before { + content: "\f111"; +} +.fa-mail-reply:before, +.fa-reply:before { + content: "\f112"; +} +.fa-github-alt:before { + content: "\f113"; +} +.fa-folder-o:before { + content: "\f114"; +} +.fa-folder-open-o:before { + content: "\f115"; +} +.fa-smile-o:before { + content: "\f118"; +} +.fa-frown-o:before { + content: "\f119"; +} +.fa-meh-o:before { + content: "\f11a"; +} +.fa-gamepad:before { + content: "\f11b"; +} +.fa-keyboard-o:before { + content: "\f11c"; +} +.fa-flag-o:before { + content: "\f11d"; +} +.fa-flag-checkered:before { + content: "\f11e"; +} +.fa-terminal:before { + content: "\f120"; +} +.fa-code:before { + content: "\f121"; +} +.fa-mail-reply-all:before, +.fa-reply-all:before { + content: "\f122"; +} +.fa-star-half-empty:before, +.fa-star-half-full:before, +.fa-star-half-o:before { + content: "\f123"; +} +.fa-location-arrow:before { + content: "\f124"; +} +.fa-crop:before { + content: "\f125"; +} +.fa-code-fork:before { + content: "\f126"; +} +.fa-unlink:before, +.fa-chain-broken:before { + content: "\f127"; +} +.fa-question:before { + content: "\f128"; +} +.fa-info:before { + content: "\f129"; +} +.fa-exclamation:before { + content: "\f12a"; +} +.fa-superscript:before { + content: "\f12b"; +} +.fa-subscript:before { + content: "\f12c"; +} +.fa-eraser:before { + content: "\f12d"; +} +.fa-puzzle-piece:before { + content: "\f12e"; +} +.fa-microphone:before { + content: "\f130"; +} +.fa-microphone-slash:before { + content: "\f131"; +} +.fa-shield:before { + content: "\f132"; +} +.fa-calendar-o:before { + content: "\f133"; +} +.fa-fire-extinguisher:before { + content: "\f134"; +} +.fa-rocket:before { + content: "\f135"; +} +.fa-maxcdn:before { + content: "\f136"; +} +.fa-chevron-circle-left:before { + content: "\f137"; +} +.fa-chevron-circle-right:before { + content: "\f138"; +} +.fa-chevron-circle-up:before { + content: "\f139"; +} +.fa-chevron-circle-down:before { + content: "\f13a"; +} +.fa-html5:before { + content: "\f13b"; +} +.fa-css3:before { + content: "\f13c"; +} +.fa-anchor:before { + content: "\f13d"; +} +.fa-unlock-alt:before { + content: "\f13e"; +} +.fa-bullseye:before { + content: "\f140"; +} +.fa-ellipsis-h:before { + content: "\f141"; +} +.fa-ellipsis-v:before { + content: "\f142"; +} +.fa-rss-square:before { + content: "\f143"; +} +.fa-play-circle:before { + content: "\f144"; +} +.fa-ticket:before { + content: "\f145"; +} +.fa-minus-square:before { + content: "\f146"; +} +.fa-minus-square-o:before { + content: "\f147"; +} +.fa-level-up:before { + content: "\f148"; +} +.fa-level-down:before { + content: "\f149"; +} +.fa-check-square:before { + content: "\f14a"; +} +.fa-pencil-square:before { + content: "\f14b"; +} +.fa-external-link-square:before { + content: "\f14c"; +} +.fa-share-square:before { + content: "\f14d"; +} +.fa-compass:before { + content: "\f14e"; +} +.fa-toggle-down:before, +.fa-caret-square-o-down:before { + content: "\f150"; +} +.fa-toggle-up:before, +.fa-caret-square-o-up:before { + content: "\f151"; +} +.fa-toggle-right:before, +.fa-caret-square-o-right:before { + content: "\f152"; +} +.fa-euro:before, +.fa-eur:before { + content: "\f153"; +} +.fa-gbp:before { + content: "\f154"; +} +.fa-dollar:before, +.fa-usd:before { + content: "\f155"; +} +.fa-rupee:before, +.fa-inr:before { + content: "\f156"; +} +.fa-cny:before, +.fa-rmb:before, +.fa-yen:before, +.fa-jpy:before { + content: "\f157"; +} +.fa-ruble:before, +.fa-rouble:before, +.fa-rub:before { + content: "\f158"; +} +.fa-won:before, +.fa-krw:before { + content: "\f159"; +} +.fa-bitcoin:before, +.fa-btc:before { + content: "\f15a"; +} +.fa-file:before { + content: "\f15b"; +} +.fa-file-text:before { + content: "\f15c"; +} +.fa-sort-alpha-asc:before { + content: "\f15d"; +} +.fa-sort-alpha-desc:before { + content: "\f15e"; +} +.fa-sort-amount-asc:before { + content: "\f160"; +} +.fa-sort-amount-desc:before { + content: "\f161"; +} +.fa-sort-numeric-asc:before { + content: "\f162"; +} +.fa-sort-numeric-desc:before { + content: "\f163"; +} +.fa-thumbs-up:before { + content: "\f164"; +} +.fa-thumbs-down:before { + content: "\f165"; +} +.fa-youtube-square:before { + content: "\f166"; +} +.fa-youtube:before { + content: "\f167"; +} +.fa-xing:before { + content: "\f168"; +} +.fa-xing-square:before { + content: "\f169"; +} +.fa-youtube-play:before { + content: "\f16a"; +} +.fa-dropbox:before { + content: "\f16b"; +} +.fa-stack-overflow:before { + content: "\f16c"; +} +.fa-instagram:before { + content: "\f16d"; +} +.fa-flickr:before { + content: "\f16e"; +} +.fa-adn:before { + content: "\f170"; +} +.fa-bitbucket:before { + content: "\f171"; +} +.fa-bitbucket-square:before { + content: "\f172"; +} +.fa-tumblr:before { + content: "\f173"; +} +.fa-tumblr-square:before { + content: "\f174"; +} +.fa-long-arrow-down:before { + content: "\f175"; +} +.fa-long-arrow-up:before { + content: "\f176"; +} +.fa-long-arrow-left:before { + content: "\f177"; +} +.fa-long-arrow-right:before { + content: "\f178"; +} +.fa-apple:before { + content: "\f179"; +} +.fa-windows:before { + content: "\f17a"; +} +.fa-android:before { + content: "\f17b"; +} +.fa-linux:before { + content: "\f17c"; +} +.fa-dribbble:before { + content: "\f17d"; +} +.fa-skype:before { + content: "\f17e"; +} +.fa-foursquare:before { + content: "\f180"; +} +.fa-trello:before { + content: "\f181"; +} +.fa-female:before { + content: "\f182"; +} +.fa-male:before { + content: "\f183"; +} +.fa-gittip:before, +.fa-gratipay:before { + content: "\f184"; +} +.fa-sun-o:before { + content: "\f185"; +} +.fa-moon-o:before { + content: "\f186"; +} +.fa-archive:before { + content: "\f187"; +} +.fa-bug:before { + content: "\f188"; +} +.fa-vk:before { + content: "\f189"; +} +.fa-weibo:before { + content: "\f18a"; +} +.fa-renren:before { + content: "\f18b"; +} +.fa-pagelines:before { + content: "\f18c"; +} +.fa-stack-exchange:before { + content: "\f18d"; +} +.fa-arrow-circle-o-right:before { + content: "\f18e"; +} +.fa-arrow-circle-o-left:before { + content: "\f190"; +} +.fa-toggle-left:before, +.fa-caret-square-o-left:before { + content: "\f191"; +} +.fa-dot-circle-o:before { + content: "\f192"; +} +.fa-wheelchair:before { + content: "\f193"; +} +.fa-vimeo-square:before { + content: "\f194"; +} +.fa-turkish-lira:before, +.fa-try:before { + content: "\f195"; +} +.fa-plus-square-o:before { + content: "\f196"; +} +.fa-space-shuttle:before { + content: "\f197"; +} +.fa-slack:before { + content: "\f198"; +} +.fa-envelope-square:before { + content: "\f199"; +} +.fa-wordpress:before { + content: "\f19a"; +} +.fa-openid:before { + content: "\f19b"; +} +.fa-institution:before, +.fa-bank:before, +.fa-university:before { + content: "\f19c"; +} +.fa-mortar-board:before, +.fa-graduation-cap:before { + content: "\f19d"; +} +.fa-yahoo:before { + content: "\f19e"; +} +.fa-google:before { + content: "\f1a0"; +} +.fa-reddit:before { + content: "\f1a1"; +} +.fa-reddit-square:before { + content: "\f1a2"; +} +.fa-stumbleupon-circle:before { + content: "\f1a3"; +} +.fa-stumbleupon:before { + content: "\f1a4"; +} +.fa-delicious:before { + content: "\f1a5"; +} +.fa-digg:before { + content: "\f1a6"; +} +.fa-pied-piper-pp:before { + content: "\f1a7"; +} +.fa-pied-piper-alt:before { + content: "\f1a8"; +} +.fa-drupal:before { + content: "\f1a9"; +} +.fa-joomla:before { + content: "\f1aa"; +} +.fa-language:before { + content: "\f1ab"; +} +.fa-fax:before { + content: "\f1ac"; +} +.fa-building:before { + content: "\f1ad"; +} +.fa-child:before { + content: "\f1ae"; +} +.fa-paw:before { + content: "\f1b0"; +} +.fa-spoon:before { + content: "\f1b1"; +} +.fa-cube:before { + content: "\f1b2"; +} +.fa-cubes:before { + content: "\f1b3"; +} +.fa-behance:before { + content: "\f1b4"; +} +.fa-behance-square:before { + content: "\f1b5"; +} +.fa-steam:before { + content: "\f1b6"; +} +.fa-steam-square:before { + content: "\f1b7"; +} +.fa-recycle:before { + content: "\f1b8"; +} +.fa-automobile:before, +.fa-car:before { + content: "\f1b9"; +} +.fa-cab:before, +.fa-taxi:before { + content: "\f1ba"; +} +.fa-tree:before { + content: "\f1bb"; +} +.fa-spotify:before { + content: "\f1bc"; +} +.fa-deviantart:before { + content: "\f1bd"; +} +.fa-soundcloud:before { + content: "\f1be"; +} +.fa-database:before { + content: "\f1c0"; +} +.fa-file-pdf-o:before { + content: "\f1c1"; +} +.fa-file-word-o:before { + content: "\f1c2"; +} +.fa-file-excel-o:before { + content: "\f1c3"; +} +.fa-file-powerpoint-o:before { + content: "\f1c4"; +} +.fa-file-photo-o:before, +.fa-file-picture-o:before, +.fa-file-image-o:before { + content: "\f1c5"; +} +.fa-file-zip-o:before, +.fa-file-archive-o:before { + content: "\f1c6"; +} +.fa-file-sound-o:before, +.fa-file-audio-o:before { + content: "\f1c7"; +} +.fa-file-movie-o:before, +.fa-file-video-o:before { + content: "\f1c8"; +} +.fa-file-code-o:before { + content: "\f1c9"; +} +.fa-vine:before { + content: "\f1ca"; +} +.fa-codepen:before { + content: "\f1cb"; +} +.fa-jsfiddle:before { + content: "\f1cc"; +} +.fa-life-bouy:before, +.fa-life-buoy:before, +.fa-life-saver:before, +.fa-support:before, +.fa-life-ring:before { + content: "\f1cd"; +} +.fa-circle-o-notch:before { + content: "\f1ce"; +} +.fa-ra:before, +.fa-resistance:before, +.fa-rebel:before { + content: "\f1d0"; +} +.fa-ge:before, +.fa-empire:before { + content: "\f1d1"; +} +.fa-git-square:before { + content: "\f1d2"; +} +.fa-git:before { + content: "\f1d3"; +} +.fa-y-combinator-square:before, +.fa-yc-square:before, +.fa-hacker-news:before { + content: "\f1d4"; +} +.fa-tencent-weibo:before { + content: "\f1d5"; +} +.fa-qq:before { + content: "\f1d6"; +} +.fa-wechat:before, +.fa-weixin:before { + content: "\f1d7"; +} +.fa-send:before, +.fa-paper-plane:before { + content: "\f1d8"; +} +.fa-send-o:before, +.fa-paper-plane-o:before { + content: "\f1d9"; +} +.fa-history:before { + content: "\f1da"; +} +.fa-circle-thin:before { + content: "\f1db"; +} +.fa-header:before { + content: "\f1dc"; +} +.fa-paragraph:before { + content: "\f1dd"; +} +.fa-sliders:before { + content: "\f1de"; +} +.fa-share-alt:before { + content: "\f1e0"; +} +.fa-share-alt-square:before { + content: "\f1e1"; +} +.fa-bomb:before { + content: "\f1e2"; +} +.fa-soccer-ball-o:before, +.fa-futbol-o:before { + content: "\f1e3"; +} +.fa-tty:before { + content: "\f1e4"; +} +.fa-binoculars:before { + content: "\f1e5"; +} +.fa-plug:before { + content: "\f1e6"; +} +.fa-slideshare:before { + content: "\f1e7"; +} +.fa-twitch:before { + content: "\f1e8"; +} +.fa-yelp:before { + content: "\f1e9"; +} +.fa-newspaper-o:before { + content: "\f1ea"; +} +.fa-wifi:before { + content: "\f1eb"; +} +.fa-calculator:before { + content: "\f1ec"; +} +.fa-paypal:before { + content: "\f1ed"; +} +.fa-google-wallet:before { + content: "\f1ee"; +} +.fa-cc-visa:before { + content: "\f1f0"; +} +.fa-cc-mastercard:before { + content: "\f1f1"; +} +.fa-cc-discover:before { + content: "\f1f2"; +} +.fa-cc-amex:before { + content: "\f1f3"; +} +.fa-cc-paypal:before { + content: "\f1f4"; +} +.fa-cc-stripe:before { + content: "\f1f5"; +} +.fa-bell-slash:before { + content: "\f1f6"; +} +.fa-bell-slash-o:before { + content: "\f1f7"; +} +.fa-trash:before { + content: "\f1f8"; +} +.fa-copyright:before { + content: "\f1f9"; +} +.fa-at:before { + content: "\f1fa"; +} +.fa-eyedropper:before { + content: "\f1fb"; +} +.fa-paint-brush:before { + content: "\f1fc"; +} +.fa-birthday-cake:before { + content: "\f1fd"; +} +.fa-area-chart:before { + content: "\f1fe"; +} +.fa-pie-chart:before { + content: "\f200"; +} +.fa-line-chart:before { + content: "\f201"; +} +.fa-lastfm:before { + content: "\f202"; +} +.fa-lastfm-square:before { + content: "\f203"; +} +.fa-toggle-off:before { + content: "\f204"; +} +.fa-toggle-on:before { + content: "\f205"; +} +.fa-bicycle:before { + content: "\f206"; +} +.fa-bus:before { + content: "\f207"; +} +.fa-ioxhost:before { + content: "\f208"; +} +.fa-angellist:before { + content: "\f209"; +} +.fa-cc:before { + content: "\f20a"; +} +.fa-shekel:before, +.fa-sheqel:before, +.fa-ils:before { + content: "\f20b"; +} +.fa-meanpath:before { + content: "\f20c"; +} +.fa-buysellads:before { + content: "\f20d"; +} +.fa-connectdevelop:before { + content: "\f20e"; +} +.fa-dashcube:before { + content: "\f210"; +} +.fa-forumbee:before { + content: "\f211"; +} +.fa-leanpub:before { + content: "\f212"; +} +.fa-sellsy:before { + content: "\f213"; +} +.fa-shirtsinbulk:before { + content: "\f214"; +} +.fa-simplybuilt:before { + content: "\f215"; +} +.fa-skyatlas:before { + content: "\f216"; +} +.fa-cart-plus:before { + content: "\f217"; +} +.fa-cart-arrow-down:before { + content: "\f218"; +} +.fa-diamond:before { + content: "\f219"; +} +.fa-ship:before { + content: "\f21a"; +} +.fa-user-secret:before { + content: "\f21b"; +} +.fa-motorcycle:before { + content: "\f21c"; +} +.fa-street-view:before { + content: "\f21d"; +} +.fa-heartbeat:before { + content: "\f21e"; +} +.fa-venus:before { + content: "\f221"; +} +.fa-mars:before { + content: "\f222"; +} +.fa-mercury:before { + content: "\f223"; +} +.fa-intersex:before, +.fa-transgender:before { + content: "\f224"; +} +.fa-transgender-alt:before { + content: "\f225"; +} +.fa-venus-double:before { + content: "\f226"; +} +.fa-mars-double:before { + content: "\f227"; +} +.fa-venus-mars:before { + content: "\f228"; +} +.fa-mars-stroke:before { + content: "\f229"; +} +.fa-mars-stroke-v:before { + content: "\f22a"; +} +.fa-mars-stroke-h:before { + content: "\f22b"; +} +.fa-neuter:before { + content: "\f22c"; +} +.fa-genderless:before { + content: "\f22d"; +} +.fa-facebook-official:before { + content: "\f230"; +} +.fa-pinterest-p:before { + content: "\f231"; +} +.fa-whatsapp:before { + content: "\f232"; +} +.fa-server:before { + content: "\f233"; +} +.fa-user-plus:before { + content: "\f234"; +} +.fa-user-times:before { + content: "\f235"; +} +.fa-hotel:before, +.fa-bed:before { + content: "\f236"; +} +.fa-viacoin:before { + content: "\f237"; +} +.fa-train:before { + content: "\f238"; +} +.fa-subway:before { + content: "\f239"; +} +.fa-medium:before { + content: "\f23a"; +} +.fa-yc:before, +.fa-y-combinator:before { + content: "\f23b"; +} +.fa-optin-monster:before { + content: "\f23c"; +} +.fa-opencart:before { + content: "\f23d"; +} +.fa-expeditedssl:before { + content: "\f23e"; +} +.fa-battery-4:before, +.fa-battery:before, +.fa-battery-full:before { + content: "\f240"; +} +.fa-battery-3:before, +.fa-battery-three-quarters:before { + content: "\f241"; +} +.fa-battery-2:before, +.fa-battery-half:before { + content: "\f242"; +} +.fa-battery-1:before, +.fa-battery-quarter:before { + content: "\f243"; +} +.fa-battery-0:before, +.fa-battery-empty:before { + content: "\f244"; +} +.fa-mouse-pointer:before { + content: "\f245"; +} +.fa-i-cursor:before { + content: "\f246"; +} +.fa-object-group:before { + content: "\f247"; +} +.fa-object-ungroup:before { + content: "\f248"; +} +.fa-sticky-note:before { + content: "\f249"; +} +.fa-sticky-note-o:before { + content: "\f24a"; +} +.fa-cc-jcb:before { + content: "\f24b"; +} +.fa-cc-diners-club:before { + content: "\f24c"; +} +.fa-clone:before { + content: "\f24d"; +} +.fa-balance-scale:before { + content: "\f24e"; +} +.fa-hourglass-o:before { + content: "\f250"; +} +.fa-hourglass-1:before, +.fa-hourglass-start:before { + content: "\f251"; +} +.fa-hourglass-2:before, +.fa-hourglass-half:before { + content: "\f252"; +} +.fa-hourglass-3:before, +.fa-hourglass-end:before { + content: "\f253"; +} +.fa-hourglass:before { + content: "\f254"; +} +.fa-hand-grab-o:before, +.fa-hand-rock-o:before { + content: "\f255"; +} +.fa-hand-stop-o:before, +.fa-hand-paper-o:before { + content: "\f256"; +} +.fa-hand-scissors-o:before { + content: "\f257"; +} +.fa-hand-lizard-o:before { + content: "\f258"; +} +.fa-hand-spock-o:before { + content: "\f259"; +} +.fa-hand-pointer-o:before { + content: "\f25a"; +} +.fa-hand-peace-o:before { + content: "\f25b"; +} +.fa-trademark:before { + content: "\f25c"; +} +.fa-registered:before { + content: "\f25d"; +} +.fa-creative-commons:before { + content: "\f25e"; +} +.fa-gg:before { + content: "\f260"; +} +.fa-gg-circle:before { + content: "\f261"; +} +.fa-tripadvisor:before { + content: "\f262"; +} +.fa-odnoklassniki:before { + content: "\f263"; +} +.fa-odnoklassniki-square:before { + content: "\f264"; +} +.fa-get-pocket:before { + content: "\f265"; +} +.fa-wikipedia-w:before { + content: "\f266"; +} +.fa-safari:before { + content: "\f267"; +} +.fa-chrome:before { + content: "\f268"; +} +.fa-firefox:before { + content: "\f269"; +} +.fa-opera:before { + content: "\f26a"; +} +.fa-internet-explorer:before { + content: "\f26b"; +} +.fa-tv:before, +.fa-television:before { + content: "\f26c"; +} +.fa-contao:before { + content: "\f26d"; +} +.fa-500px:before { + content: "\f26e"; +} +.fa-amazon:before { + content: "\f270"; +} +.fa-calendar-plus-o:before { + content: "\f271"; +} +.fa-calendar-minus-o:before { + content: "\f272"; +} +.fa-calendar-times-o:before { + content: "\f273"; +} +.fa-calendar-check-o:before { + content: "\f274"; +} +.fa-industry:before { + content: "\f275"; +} +.fa-map-pin:before { + content: "\f276"; +} +.fa-map-signs:before { + content: "\f277"; +} +.fa-map-o:before { + content: "\f278"; +} +.fa-map:before { + content: "\f279"; +} +.fa-commenting:before { + content: "\f27a"; +} +.fa-commenting-o:before { + content: "\f27b"; +} +.fa-houzz:before { + content: "\f27c"; +} +.fa-vimeo:before { + content: "\f27d"; +} +.fa-black-tie:before { + content: "\f27e"; +} +.fa-fonticons:before { + content: "\f280"; +} +.fa-reddit-alien:before { + content: "\f281"; +} +.fa-edge:before { + content: "\f282"; +} +.fa-credit-card-alt:before { + content: "\f283"; +} +.fa-codiepie:before { + content: "\f284"; +} +.fa-modx:before { + content: "\f285"; +} +.fa-fort-awesome:before { + content: "\f286"; +} +.fa-usb:before { + content: "\f287"; +} +.fa-product-hunt:before { + content: "\f288"; +} +.fa-mixcloud:before { + content: "\f289"; +} +.fa-scribd:before { + content: "\f28a"; +} +.fa-pause-circle:before { + content: "\f28b"; +} +.fa-pause-circle-o:before { + content: "\f28c"; +} +.fa-stop-circle:before { + content: "\f28d"; +} +.fa-stop-circle-o:before { + content: "\f28e"; +} +.fa-shopping-bag:before { + content: "\f290"; +} +.fa-shopping-basket:before { + content: "\f291"; +} +.fa-hashtag:before { + content: "\f292"; +} +.fa-bluetooth:before { + content: "\f293"; +} +.fa-bluetooth-b:before { + content: "\f294"; +} +.fa-percent:before { + content: "\f295"; +} +.fa-gitlab:before { + content: "\f296"; +} +.fa-wpbeginner:before { + content: "\f297"; +} +.fa-wpforms:before { + content: "\f298"; +} +.fa-envira:before { + content: "\f299"; +} +.fa-universal-access:before { + content: "\f29a"; +} +.fa-wheelchair-alt:before { + content: "\f29b"; +} +.fa-question-circle-o:before { + content: "\f29c"; +} +.fa-blind:before { + content: "\f29d"; +} +.fa-audio-description:before { + content: "\f29e"; +} +.fa-volume-control-phone:before { + content: "\f2a0"; +} +.fa-braille:before { + content: "\f2a1"; +} +.fa-assistive-listening-systems:before { + content: "\f2a2"; +} +.fa-asl-interpreting:before, +.fa-american-sign-language-interpreting:before { + content: "\f2a3"; +} +.fa-deafness:before, +.fa-hard-of-hearing:before, +.fa-deaf:before { + content: "\f2a4"; +} +.fa-glide:before { + content: "\f2a5"; +} +.fa-glide-g:before { + content: "\f2a6"; +} +.fa-signing:before, +.fa-sign-language:before { + content: "\f2a7"; +} +.fa-low-vision:before { + content: "\f2a8"; +} +.fa-viadeo:before { + content: "\f2a9"; +} +.fa-viadeo-square:before { + content: "\f2aa"; +} +.fa-snapchat:before { + content: "\f2ab"; +} +.fa-snapchat-ghost:before { + content: "\f2ac"; +} +.fa-snapchat-square:before { + content: "\f2ad"; +} +.fa-pied-piper:before { + content: "\f2ae"; +} +.fa-first-order:before { + content: "\f2b0"; +} +.fa-yoast:before { + content: "\f2b1"; +} +.fa-themeisle:before { + content: "\f2b2"; +} +.fa-google-plus-circle:before, +.fa-google-plus-official:before { + content: "\f2b3"; +} +.fa-fa:before, +.fa-font-awesome:before { + content: "\f2b4"; +} +.fa-handshake-o:before { + content: "\f2b5"; +} +.fa-envelope-open:before { + content: "\f2b6"; +} +.fa-envelope-open-o:before { + content: "\f2b7"; +} +.fa-linode:before { + content: "\f2b8"; +} +.fa-address-book:before { + content: "\f2b9"; +} +.fa-address-book-o:before { + content: "\f2ba"; +} +.fa-vcard:before, +.fa-address-card:before { + content: "\f2bb"; +} +.fa-vcard-o:before, +.fa-address-card-o:before { + content: "\f2bc"; +} +.fa-user-circle:before { + content: "\f2bd"; +} +.fa-user-circle-o:before { + content: "\f2be"; +} +.fa-user-o:before { + content: "\f2c0"; +} +.fa-id-badge:before { + content: "\f2c1"; +} +.fa-drivers-license:before, +.fa-id-card:before { + content: "\f2c2"; +} +.fa-drivers-license-o:before, +.fa-id-card-o:before { + content: "\f2c3"; +} +.fa-quora:before { + content: "\f2c4"; +} +.fa-free-code-camp:before { + content: "\f2c5"; +} +.fa-telegram:before { + content: "\f2c6"; +} +.fa-thermometer-4:before, +.fa-thermometer:before, +.fa-thermometer-full:before { + content: "\f2c7"; +} +.fa-thermometer-3:before, +.fa-thermometer-three-quarters:before { + content: "\f2c8"; +} +.fa-thermometer-2:before, +.fa-thermometer-half:before { + content: "\f2c9"; +} +.fa-thermometer-1:before, +.fa-thermometer-quarter:before { + content: "\f2ca"; +} +.fa-thermometer-0:before, +.fa-thermometer-empty:before { + content: "\f2cb"; +} +.fa-shower:before { + content: "\f2cc"; +} +.fa-bathtub:before, +.fa-s15:before, +.fa-bath:before { + content: "\f2cd"; +} +.fa-podcast:before { + content: "\f2ce"; +} +.fa-window-maximize:before { + content: "\f2d0"; +} +.fa-window-minimize:before { + content: "\f2d1"; +} +.fa-window-restore:before { + content: "\f2d2"; +} +.fa-times-rectangle:before, +.fa-window-close:before { + content: "\f2d3"; +} +.fa-times-rectangle-o:before, +.fa-window-close-o:before { + content: "\f2d4"; +} +.fa-bandcamp:before { + content: "\f2d5"; +} +.fa-grav:before { + content: "\f2d6"; +} +.fa-etsy:before { + content: "\f2d7"; +} +.fa-imdb:before { + content: "\f2d8"; +} +.fa-ravelry:before { + content: "\f2d9"; +} +.fa-eercast:before { + content: "\f2da"; +} +.fa-microchip:before { + content: "\f2db"; +} +.fa-snowflake-o:before { + content: "\f2dc"; +} +.fa-superpowers:before { + content: "\f2dd"; +} +.fa-wpexplorer:before { + content: "\f2de"; +} +.fa-meetup:before { + content: "\f2e0"; +} +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + border: 0; +} +.sr-only-focusable:active, +.sr-only-focusable:focus { + position: static; + width: auto; + height: auto; + margin: 0; + overflow: visible; + clip: auto; +} diff --git a/IoTGateway/wwwroot/font/iconfont.css b/IoTGateway/wwwroot/font/iconfont.css new file mode 100644 index 0000000..cb6251a --- /dev/null +++ b/IoTGateway/wwwroot/font/iconfont.css @@ -0,0 +1,257 @@ +@font-face {font-family: "_wtmicon"; + src: url('iconfont.eot?t=1567088881156'); /* IE9 */ + src: url('iconfont.eot?t=1567088881156#iefix') format('embedded-opentype'), /* IE6-IE8 */ + url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAACMAAAsAAAAARaAAACKwAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCLKgruDNdeATYCJAOBdAt8AAQgBYRtB4Y0Gy45ZQRsHAAktm882f9/TKBjiKXOAOrnJ7I6l1aX2KEMgbNaHU9EVVucXlom7S/kwH6Fw8MsOxytkJ5Md7GVkUdrmoP9Y1/iFbppEQ7hYJo70LhvxmzTA5+YbCglETVF9+VaOvNwA1yRATIhNgVBIShIKbo0KNl2z8bYENCQbMlSuxDE3B68Th2bGT6u46GSGj/wc/s/d3eM5V2QC2ADRqujcmOkA5Ea6WPIKEcIJiAxIq0aUhMs6E/Y6NT3Gqx4omK8/mbuR529kh3/tk924ADXTzy3vAEL7jhwMJXwk73aq2QnfJDwJ4BA5zYAoLIT5gHsgbXxprBtsvNAhdvXaZ/eZ4Yldbzx7vcy5skgY3FgE9ui3buf7tvWDhECBQA9Tmy/k3szvnB3sQUrbUOOj8zmI45bZ50WPfO6fZKVtB75cldRndphMhEWWOF1Az9RPiFnIkgMRMB8On1XXVzG7ZOKVx6W8tu7TbqT5Ph0khNJIdlxgG0XLAdVf8hnf8axAKgLNPRBTn5fnaJTwAlwAxwWoBVhGHmZxg7LXls1xh7y6BUsHHlqzZg/Y+7r0drnN8pVuBFBMByrG2vHFOj2yozu30UnApG73FOB8kZ5y4HoMnnA/kUGg7DFVtAnhqxa2wz4wG9/aWjKEqj0Frj0+/Aalg2S2vIU/H81MzkkejsGbdACu9CK6iuxtnxh8iC7mE7S7/Fp0YDckzDgtRs/cbIM+X74/qpsTvO7uUH/7d2nv0dZ18LG3rdJZqg033I3u2bz7J6hAPJ2VXwpqZ36PmmTq1bm7mXDxXcF4bvK+ERJsk9d+L/AK1aiAqgY18kShlSmy3bcHgKRRKZQaXQGk8XmcHl8gVBkZW1jayeWSGVyhVKl1mh1ensHRydnF1eUdoDWvaD6Nj/3FrWlAalQ8yEtqB0hrahdIG2oAyEFdSykFz/wkHY0yyEdaJSQTjQ5kC40eZBuNPmQHjSbdX0HdTfo+kHdA7oBUPeCbhDU26AbAnUedMOgPgLdCKifATKKkCBjCBkyjlAgEwgVMonQIFMIBplGjCAziDFkFjGDzCHmkHmEDVlAOJBFhAtZQniQZcQCsoJYQlaRhZA1xA2yjnhCNhAZZBOJgmwh0ZBtZAlkB4mB7CJJkD0kQ8FOVQLkAMmHHCLlkCNkk4IndTNATpD9kFOkF3KGHIScI4cgF8hhyCVyBHKF9EOukQHIDX4vTHEL3JlDvAP/h9tg/PESKT+42wwuUdj0IURLjN202QJIPCwRgAYibKq7EgJHkNbUXDgqTiaRaJmaujkpcUcjSW/MWsFdopGNcxWC5PAmQw4dpCoJUez389PcmGxmpBsSudxFKXjugdRqQx1VtvxpThEhEUSJBsQhz7nV1njbFR/RkLMIPTKYuxPjYifXCWmHByZyW/VICW1HGj9krDli3NKtzl1XLLrZ59QMeO2TsSEu+n0bu2I0HiUoWOmEmu82rVJQL3H9QfYhkN0VslobU3TRN0bZarpvQUc+PgzuA34NWljyfSRtvAgykBkkCFy8Nc1mGgc68bgSioBnY78cuFK03Cfg7f7dsVpj3sg2PLB1MdpmAsOxYGyjIWTzVrCWXN6FYbt5/0OzS0OzQM9cEXIPuePToWuJKK3alYH80PrQwPmRounqsgEtz1LMGwsf5JHMJd6zuiTawDrIvXSPNbRV/dEzcvustOF+4GK03qV3qRJ+5ShT8jc/ldXoM3p2qT9UWN5IkNSF1SGjuJIC0yW51oOtWLaZRnNWPuc8ySxuOX7lOOWK+avHRBiwcAzYanzRM2NdYudXdG6TVVlayEQGgyBYBmTpgPMzmB2/0PfEM7TNE/uAv+GS+LZ+zqo+3Gh6jiVfvp64sunf3A3onR78sZk43Gh/sUeMD1+A3uVGc/zp+6IpdYEgMBdxBbrjkpnwW5bCi9S1A4o4CmbKAngr5FfdCdVAwJ2NFG68pZQLqaZYAAxiFD84GfXnnXvAFXt0w1DhHFb65b7f5RIvxBsDoSQMY+hYyqoDyqAWwJa4CFzCedZHlGtGR0rLNmZUOnUilqmlgqnC4yoC79ZHVOqIfumr6HPum4R/EijkYxFYVHyhNPoVUwZmH0r5nmJaqs5y8posaTS3o2dZ2k5lxPK7gQDcJD6CtCjOdxUMKuwBxfCwR5lZHhkm2l/j1uhQbWve9C5RzEDa2cLuwvAEakP3sf9Hs0m4bIs3w6Vtj1xYLRgOl2EXTMDbgRh2Q0khtXaAwrodi3idvFxNugThAeJIdAgXV1wROdABTgjIoqQEnRWlniaKi4QWNVf7bF64GaXfsCuf4Fqx8koc3i3Tz93dr/H/YDCrxWpsRXwZgCgWD8QGKnC6oeUM7DH30+7hCKrSDG0lOg/fp1FjvdY5vHkG5b5MKL1MIrXBvJ4d2APnk8H92fCB5TE6nJmhwiW68e72Rv4uGzm6bYQieXb18KhOszZduraJEbHlwd4Wzf5Gj5/YOS4wH1s7Mibep5svX9/MqSDs3HnB6LFihhJLDjHKL56iwM9foFwc38KxKB3lgl15WB+IqJKSFva8Gn+6aMjUMXZCsW6jEOVO+CKiQ7MZtNoQeFWdaee5VTO/xnakaEkSJrjCS7DZg6gRK7Q6J8Us2/SbtvKxWUgNJWKzjQpDK4I/u8vBJ9d0PSoCDbMapMAcNCFrCKdSAhy7CJMNTgcfQ5CghwHwJb05MdebDNh6nvKXhcwZwCRh6EL3NxEBmwW46Pqht1YiAOgE3bjw2lmpsKqQO0U+RMQfIueWB0L5pfXw+ZVBo7QaDDLDhDYDMGBCCQZmVP9KBPdkjkzNQkAZ0Yhu6eYUQRDHEUbj914mAZMUwrg40Bd0qkVihZNRp7qGdbI4J9ohVGMd3CXcVxGt58OWuk1Wlrv39hqcWvqBbp1xzeK9Vr3uwn2tNLocKKHaC6FsivH3mC6+tMo67t+QbXGFkJqjBWk7xvM7ysZPHPIAZPq1QWVA7Xvuk2QVtVZNVOQIT2fDLioD/Ldib5hw6RqU43iI6JwIE5qQuEtlGPh7xekB50FSu5IZTtAkn24HDZEY6g7IbMj0Mph/Kzvw560Y4Q8N6LRCZSl1XP7mrL3wQx7pXLQWEHaJaL7vz/NdG36+b1Kc/3OWC3rM2ToHHNAS6pYntlHW0bWKpVZP44hahmLXiHZOL7joJuNFEe/RXmYMHBBgEHkBkoS1pLNw7M7COPseEKkB/8bNFgDsPx+CKb08du4SHTDDy0WgEcQ0MoT/AAaEFwfAPbCdplcPMYedvcTb/17PGVDiZZE9Di7xAb56A6m3pS8iphxWgrobZcLdLebfDUem7XNlEZDdHn4aF8HhjLAhJ+mf7o0fVOEoRiEawDxQRNfhXjkOsHP1ilc/X1ka7TJniKQfki7Ks5Pya95GD+RLwN0pN1NkkRoHEcZiBwvkdba+nP/P/HGDp3e9S2OXaqlAEjrVLkQo3y+LyNpSA3CeQ4n3UhYEyaU2i509fC7uj7L0l8M8UDq+20X7WVlKCqs5wJGahwU+F2xG0j+D/QVelWa6ISHhRvPnozL0d5BbPSPXEmYOgF04rYOTE5vGW4vOvvEWN/0PD+SXclD95S6rc41pQzzuhe97kHbQ8vgTd6guEg9MQ6Wt5FWht0rdMt4zNvLRTUOcxpqp2PsX++gQ1JL7bSWYKenN+XTSXa2rZTu1O5n7OVzvaxhk2M5Sg8cZiBTQdAGpCE0eYm6AkHqimGEkCYU2VvmYP7lb6pQvxKPcbqGT1ALKwSiiLBbayHM0l5OYbehedw5xhuMYir/CIT2hHntK+zPwQDHD4RfZDp5Js868sJiqLXhkCsSEIGx6LBlrpZpmVTqiWyqkOj1yXDkZuH4NqkcKPQ9wk54kST6eaFMsHok41LFYwbx0agv0jrGc1xNfy+/KlA8efvCkV2GSVZTJDBQyx6ims2nfHxM7bqlj6bTTE5muSB5PifEcCst2TVdL5Un/CEqwX98n69tp7uCN1MaDRpaL2ubt01fGe+bVY0nME1fL27h2OCC/16ERuUXCb8Um65fMDjxotX4KhWfnWB9YkCy10H1KRpbHuQb/cC/HJNDbMRHbN7YdoNkxHxz+X+oT7dB/Qu/JDo/7fmBj1oDeQSnEwhpE52OJE1Vp6iNNhDbmuSt8h0idZbOXxVy2ISehrG08uCuTzcQA3QMSbZW2YWgF2mrN51JiPhkiu5nQUGlrQHP58cDLkBmgvTLTRq7q69k7xGOFjEOdhuy0pNFtxjpoG4k0wLrUmzKC2FPn6WDPq3VyqX9d+wlYTC2KqVmiEt8xTFCHj02aUXEtvtCngzW4B+Zo2sIp4Z6FVaW+kvHTh2g/lkV3T3MLdHYuQS/Vu9Vb9zurwNlbg153MVm7cPnG/e2L8nl181HHpWz6frKq7oqX6wRxr9/NBivQ6823gA7IqE50fTLEqzk9tzdV252oZLV0JLpnVFuNWUUjtGgEutPweozKtgM1BHOBxhxUb/puulrZgSoxSxvx3KuMrkYKD1RJG3m+2N9BL+lLGNBl5Buxgmmphq7MbUrLAb+88zPVUrA/P6ZCb6SaDkHHx8Cbdq++x7UXE6rC+9o6DBIDWFK8Z60l52ejEaRjPUIo4i0OTefKGnokTUM/D0C1B+uQ+lOFrY4eqMMNleOF0z2vxZc35vPPw/1CPZldup54caLSvjf1whCOCsc7d98mWBZFuHHxi8lusousCLqzoXQX4Z020OnPvIZaqVXv31B5J74WtyngsqOMfwUX6ebjRRSm0/1JxzBKyx0km5/m1TKagymR691dybKEx7LpXXQyU7ervCfFlGWRqUrWtSkmp3xTRxNxVzfGltWGQT8SdNR+WV7wZjIXdEIhSrMbFZZl7Fx/sV2HKCs0nUp/oXguZ4lk+14EhVonaY2ya/xPFmG6u1Rw3yvU4tTViBypMOFAnE7vnnTWx6L9q+oVekxQ97Mb6c6lePlkdPuYrmQbz77V/VeGhfExnOEr/Xcs26luPz1JtIunv9n1hh6PEz3oOZY5dI+vcJJlEgGj/n+i+rZbgm/WU1M1mPuYg1pYLwx9DF+QSggtBFND84Fn/LVr6RTfUCYrKVksM+RPlSZLFBjpN9YpEhIsT3qFN3glT0KCSadYp4hYsGKuxoAZxTRA590kIrf5UDWfdDoS4ftZp4kNN2rkEKYA5e2zQXob1D/4aavv37cNTcRtPHlyE7oRVfQV2ASvG3ELE0zD7t49uTgn2v3lTlx5b285rgInwmKBLGTDXoFprNlYuXssRcHLv9o/vXGj+Odbt+47nL/qknl6oylpzgP83CE8050QSXDLnABqI2S6HZ8J965pehdJwt4ynJroLIUQkDunjnQR41o4FD3VzuTDQttzhd6JSAJS6DMWKeBS9dRwYzS5Ni/liSChy+UvJUii3AqRJCZKnkoQGRI1qzv/PEhy5c6VgV48vQKIrwygjx6hA/H+W8IzMp4tX2673r6JrkZK5bfMzPCALQnowL8O/Q+2oNPT6BZNmD6zBbcZp6L9vJnmJJQJI8zeRwWaTvnGFLKdFS7XmFuJwR/6zvvYWR3Mt3kfYSb0zHBxLmT7xphNefe9OrV7kZ3P+b4PxGCwfr2weZAaN/aNGpVr0mvk+BN1oMWGpjLyCA62d7DB30MuRPVTotYfP97cR+2nfhsDq09CjMljYsJ9HtI0OvbZYiweC7N1paR7BKvcEVymn1smOughpRpERsbGaqEB9fygi0eZl2nWtMtMrbuX+5MzxKUH0fBGNSsIX48CoodFvvGMrgevlQyGUvTljuOd5nvnq5ihVDLQS13k/l8/aIjpiKBuv8emRpxYa7z2RN8x7HvbI6gdycbJJO+bDp3Ev3+PP5kW2vt1zrFuJsevbQnac+1aTwVQEzBAlFej7cwOn5lpcVcS/mSkfi5jTKxgc0Z8LJ9PiI3faTb3Di2OIMQJynUvquL5w2si50cbrnNxWowJX9zMtR+f2A8sPbTbIEYu3wEpyfjYpnWi6ciH17rNIwxTnajjLePU7oUzkEmUqzPVcuLyGu87ZGJMzLDcWfn3jA/TQ+aVGJPLwpTGQTOPjQ9jAjBH+bpYQCfPdaLlLl1nrJKVIvCs9XA1TUhcQUFcBRBDkG8zwQP5b/4yk8vE5jG0NK17n5sToSbVtWOEXQvqG9AwmawqOhqNWKsM2ms2W/md8c1oIakqtorU1jACDDmJpsY6sRsAaBLwCl83ZRuaoNwQLWEROzMi0oBTegBTm5gRm1WVFIlWDXDQpvc73kGtO1lCdtdmzoG6u1fbghf97JD9vsIKSko0v7SApTuDkRaSPucc6XXaLWr/7GRYGlWcxvCYmh33ivwtyo0zF5VITRMH7xad8MXdJGTlDNFyOxLlvmVlgfFhJ3NYQ7m0E2G+8rKy+MDEDqOA5W61kKRsK4EC+WsKwl7AB9HiGPzUZTgcxsTG0H//RSswZghEOxOMublmF/rjj+gu3Kbxc61YBsY07l/ruXFOfxR7ZRE3KtNzQ6wgtaE21fKCqvwQ+OHmlapplYtwyoIeyATNA18JiebStLOOQjsxTEx6RmCBmr/zqY1MuD06e/STT1lu634e3mvWPKh58rZ9mzWx7SO1ZbtmuGOioxkCQCc5zIikrjQsoYgtbWqQubzDUl27rKBmy2bJ8zlKmvkdisSSeUmNldpLFDVfjxY8OVvMCPwx/njQceVsECO8mbI+g8a6oF1QFk4OdlggMlf4llgVtEmxs9HLqHhMLSeOEeVqvEnQ89w/O9VkgOL7598fDzh+4fmFlqnW6tbvq9qq20DxYHZHTUw2q9apJSCROPYHHZTV1Eg8QXxWvXaxeJgeYlQq0T0lgRcKvjTFa77q0XQYHQnPRJlq6gaKcNx9vK3i/cvA+91lby2L2H62v9m8uZ6pOaUTeF6JG5lsd/2zztkl0fHSunznzgNHjmWqISh46p+GLq+xk2171Znaka6BQtG1sps/fa6Ep8PbfdG4u7dz3NjtFjyhUMN242hK7lpmQEBQljM7HOFHKdYqFFpYaNjW7FZ3Dw1H4x+Q61b673erEW4JCIifj1JAVOcTia0Pur4w7SZadT9ZQeeyVfkG+dv7d5y3GbKeO7MvpmqbiP+coTOiovWWVJFujKrDcRdh28gG6ZVUHd5RpKugOgRvIwUo0ryaf9zvZ2pqjzdxa/e5u428SBccY1g0VUGnnU7shOq67Qmp153s1/3rmf7Wj0hi93LBF43la93JfLK7Fle5Tyj43tzyEsbEVKUtanfbada0Nkywo7VUJVGzjfYc5wqGPLdvMGk3rsDCBDsBYfwiVVVKE/AEUHJ2RWi9okqD4M4YYRqLm+o+Q4t3x5hoX7yjlTHleTDVFZcu5XEg8IMfEMSDXLatYlsZ+R0ezTy1ub1hTul8Ny+tjOFB76YxafzQjmm6B+Odk1SAV27VtrLUEwZYJ0+UE75p3JRIH/HKOxK2XgZmhnEbGES8pM02/JExgXY6vg9ZoGAFmhDoZ1b/SUH/A0tHR76NGz2QJHfiO12n4Ba8kF9meljQlSSsRMCf53N5INzjQnzmowGP07ujZ15XRSrB0yJyYeUaOoG+ZoruTaJumgsPxwVLDLH6o/RkIrnTk66cPYsZOByc5PnQ10xS/GPDHNMDqabXkCtfvwhByWIN9lmHp9r6pzMtedx6/CNDOu8hEWKbiSkW+CGQq/QP5yythiZIBNa/9AWMJhLlTiLD2yLbQGz8fj2durBiwqZ2O+LnwVKoYBgQKg6TqN8+swi2Xr4UGXre7xwjhcRoPM9IJjMmWimLk7ISGEECCzyuhEhv9AtsmFOQ6XnpA8d0XCXY4R+beSM/frTNzejmqDBLW9/vyQTWZ/oixl4y5d8Epq9lNl5qYr6XTnXtnBTWbseXebDyKmEYGG48RMKecVkEO28ZRZ5wRRzJvrrKWGBluROPGjKbfmGWhdn/deuDQ63oVbc5kdlExhwnu01LLA1waiIj9IlkCF9K7+1gRyVi3jqmO49e80G5o+jZM06PCLQen2ISbZzSmRY8TgP6mECfNB7XgaNTKvLzsjgmuV0zjvmQKBvy8hTmPAKBHuPTRyQwfqc5YWtI5J9D6O6ceNSfNZVHozgn1/LrE1hDFFC4b5ZgBoTyPUTq3L8MgsDIh2wgGGVK+pfQQ/uSIlu5fAnimuh4s0TG3WsZSUTiVxYn4CSRiCIJkeDEMSvuBpfKZGYWq39UXJDuD3pst23pEiduX84LMDgfIvRvSLSjXqd3NL6W/jQmRbDr7OSM8ky1phlTHbiAW12rXXrXiiwIAcLqPt5IWQOJuJymphxceqCndBmSlYXIQBqnkJDd4rgxtcuOUOih4twk5DgFSBFZVpYMWR5tyOU5uKYmXA4kKmtekFfIh14MPKRK+p2XcLe7tsm0qav230QXdv+68tmFq19YHK7Fsw93Memuu3adNIFs0qRKHg6zRIY7phbbTETogMO1f240kpODLKExuQIaM1gMjIwyEWkkM9GIxVQWl0WzDqbG50MIsiQnB/Q1schMKOoGQ6yxjqtXOzBrPsqsO7DL3ljHLBFLhqt60/NoIyM0NdqNpl4pNQ1FwQcF6I45rabFwx1ZV/atybBI++eaz2uN1ua9ugduhr8/Z+XLHTH69uuvvNhCr0xRnTX7i16h2RPw24ps1/oyycLKXZIbXnjPi+CRpSYR0SaRS0ekL7phza6Ebqm+Z/wLVaSioWKpSWT0Q6HvokviyoYNRjbrqsbARhW7MiJVcxbKAovsXwlvl/fECdw9hNeolHOq5IzVFTY268SJsLP2/MVWypG7x76I0Jihwf73RcFpvXLp6nw5UcBuHzy6gsrkau7+3crWXGVvXrd5z0nh1s19NRUNxZEVRlVGPfrbSJxpVKxpdL/IsKHL9cWWb1YFq6xU+tQd4cIqaSroFZ8oNP7qTYbcWyeqX+s6t96lG1xH/rQOzbBX0UOo9Z8VDRmRaS53N77ULF06I/9ThO5H81IVWdyg+i00PHwqagYCjNBTLJFU8yQAaKyqI7EAd1eye90RxxgBkrx2bXIFECtCkm274MmO4mINp1iJh/7mxcaeO5caD0cCD2CTfGwaVts+Q8zLmZ8kLyDwks4/NC/M4McMlPfydXnHTp9I+eFGaTfcmxafhtHATeJO6KntIvUUrk6e5d760Lrdld1a3urBs7T74VWFeWxt2/cvYcu48Sn7a+Kg0X6GnPFTUr7prf7xkyc8O3quVQ7drpGRYyVnNK6mW1IufTVPownxWsidLtXv2LrClMRHGCm8O27/6k5iKC6CEfKxwtYtL5Kl+IetKPPY09ZNisTJLj4HeOBhS2FIcCEijz4jux3bz7dpTMfKPCtv1EiMQ9GtPKnMSP3IRVwMfFRSDcZelMUbKIylq8GReL8t1OJHsyNDGB127Zx01iI9yBbuU3RBwRryUdfsnHLuCewoc7x2LUs7kEf7D1pkyrl2eyhPW+qnXMAPyVGPy+Pa2TZsTVrSfaZqOEYcjTxuXK3mkaiFsFQoqVw/U+f42/pSYbqLsPpNlFV7ph3CT5NGbWTe+hCzk8YI1W8kkeaEhKSmhlQAMQEDmkjg/Psih4VLS1P90bAHqX+GnEvv7M/RMtNFh7rMOAVsa8eqUv+oQj8JaNM2Ltd8CDE5v4tBJezbF366yrMKOSoa5m7nDVetDXZV2fBfz3eJ9wbstp+wRE12MtZK2Qbb8eTw02zHTCDjd6Jk/2PE7BDbo+tu5R2VCiu9ivxPF3Vyd3KH4cEDbinD1PN/qUH9kjRheUF5YRqSNVvzzComhab32rFtVa5jdgm6z53Z6TBDd9vQ5r7BvjlsVVnA9l7QsuPkwcFh/afCjyCFidKe0Tp3ps5XufgwP/2uOFu2MyTBWj5davqCuO9w5R+XPPbizkaqnBdICeSuc91WTEFYUg9ebEriMfNQpj8nJq6JTGYIq7IXN3gNXqsDz3H+5+K8NRIReun0g1a1xLzC9ldvvyKHCrD6C5KWtWklfYLZ2SzUSs4fCpAU4rcm2R//Qwgcdcf+ciuCwRCw+mJ5eaHDay/nNZzqlORqzmoX5c6d8SUulaap8VblNmvSy9M4md2r79IgxupLBihnpu8/EZqFiv67crgHY2JEZAapuqz/Kjzlx7g4cBdPT/d6z9rZKjx8nXJWjs/41E3vC9hz0G/nilaSgNMqDgnpPxs+BDW//7x7dNP9/paVqWWjb766KGsuPc6LQ3/vo0ScfWVOhdhvWYLQ5vWdOyqYnMIbLvi9Lw5NEHitiwH96Du49k2BaYr5/8ey6e1EG0gxtn/zg+mWYAOkDouEG+E2e7POh4kJExJi2pnceNnTn3b3EaV+Z6yM3oDsL20XyfNkwqfDG+DP4YyQT+93geyp+g5bmPTp3FaxZmPvtjVnbVdbncJBVTsU11XloKhrW9v19FzDpq9txZxiB+kydK1/psq1hHXscFGIjZLCzjXjPaOs2N2nOnCgINnV4fWLZlk+9vUBN7d2e5adNFT03VGo0V8YHwC9GhVaBbNq9Aru6SGzhz+gwQB6PR5QRP/x372IqGrmcoYiVAqg1ymRwPhujqMZB45yJT6vRfk0wvMoQN64rh8LOm2sqvtL6lpUi9PR8s1fUjeGijDRstAyWakLaZo43/mBn3B+By7D/Wil4s6hicd4ifr5LvshrGU/DT+tWUS+c2SUFxCnXeapU1LfPJgHQKZJQBzvpR0NQ/Qv8KtmfCdqdMX43w/i3oLvserAaVy0+C6OoAVIAImHidcvoG72H1AEQP9/VoCqvsOiytIugq6/yysNpZX6EM0FAMAZ/O/GAYD2ttIfpR9d/D8f3cKN/S97FfSAt0QKHhrubEFeYPR+gbp1FQAQAfeXvir8P4eOhwDuQ/7RfyGBpwWAsRL6j6Q/ACAqYGIgjAIpigMA8nUpgP8TqWTBfTVpJpGxSYguacXjwBAseBSIYAvwO7vwBkABD54ARBDzZHCGiK1TwAhWAQoIngQATtA44xFgwCiPAwzO8igwYBbgd77HG4ApPOUJwEBQngxJiJFHCtghPpq8WASPUSDqgEKjJZP85F76bN/2F8acgl37cdM/tI7QEFxPF+/571GjpTGAK+Kb9zKQ1mTBu9TuHaapCXJrEgz9SXmfP53PkhQ4gZ21Ji8WwZtHjwJRn5JCo6XdT+4lLsiIb/0vjDkFGzBD99H/oXUYrntwPV0igPdUR5ohL05XxDd/tWRgTGlNFrzjjuI/+FgmWGNydwmG/qQSRPOn83V+Mio9sdWyekq1b6aXwTHDWCZXV2goVX9s+LrW0tbRrUcQJVlRNd0wLdtxPT8Io9V6s93FSZrlRVnVTdv1+8PxdL5ch1sEaVFnpAVNyko0CnSseG2xnGHHxjPF/Bxc6RAK1ybOCfTOcz8s1UbHAkix6UlKcegJjFO0iEXk1iFAC9SLh5NUB4dTqHNa1KlgwBHKUzowLQED0quUgTRphHaqpSiWvVE09yxS148iacTzwhV6EHCkrfahRmEKUc+ThqMnPVg3PGTWvEQ9apS5106ObyyKA6gnQfAwfFJNgseOD/ygqwP6wpzhLd2cxKB8r+GZKUlC6EAiRwXQXG1JbSAcEjwSZ1Q56bj75vtL9/nrj+77j++6n3687/749n5aIq2tGF2h6mrWkegoHW3tEjNSQmpkwm+qp4QwgmFUDJ3mu5ipyBteqmlQ0dYy/ZTx4ND/T8d3NAgVVKwHoDkwBooW4Re7cdhFV3DcSdys5AKRyAgJM7s5G9D3VwYa0sOZWjMgqkj1+Eb7Dm6hoHpEQoWnqdPlFWjplOEQRA4dHO2Dk3NFyUvLTOhcvpT4xqmUbYhaAAA=') format('woff2'), + url('iconfont.woff?t=1567088881156') format('woff'), + url('iconfont.ttf?t=1567088881156') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */ + url('iconfont.svg?t=1567088881156#_wtmicon') format('svg'); /* iOS 4.1- */ +} + +._wtmicon { + font-family: "_wtmicon" !important; + font-size: 16px; + font-style: normal; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +._wtmicon-renminbi:before { + content: "\e63d"; +} + +._wtmicon-wxbzhanghu:before { + content: "\e61e"; +} + +._wtmicon-wxbsousuotuiguang:before { + content: "\e620"; +} + +._wtmicon-iconfontmingpian:before { + content: "\e629"; +} + +._wtmicon-iconfontriyongbaihuo:before { + content: "\e62c"; +} + +._wtmicon-file:before { + content: "\e804"; +} + +._wtmicon-tiaoshi:before { + content: "\eb61"; +} + +._wtmicon-guanfangbanben:before { + content: "\eb63"; +} + +._wtmicon-quanxianshenpi:before { + content: "\eb65"; +} + +._wtmicon-yingyongguanli:before { + content: "\eb67"; +} + +._wtmicon-zhanghaoquanxianguanli:before { + content: "\eb68"; +} + +._wtmicon-folder:before { + content: "\e650"; +} + +._wtmicon-icon_shezhi:before { + content: "\eb8d"; +} + +._wtmicon-tubiao-bingtu:before { + content: "\eb95"; +} + +._wtmicon-tubiao-qiapian:before { + content: "\eb96"; +} + +._wtmicon-tubiao-zhexiantu:before { + content: "\eb97"; +} + +._wtmicon-zuzhiqunzu:before { + content: "\ebd8"; +} + +._wtmicon-yingwen:before { + content: "\ebe0"; +} + +._wtmicon-zhongwen:before { + content: "\ebe2"; +} + +._wtmicon--lumingpai:before { + content: "\ebfb"; +} + +._wtmicon-fabu:before { + content: "\ec09"; +} + +._wtmicon-xiayibu:before { + content: "\ec0a"; +} + +._wtmicon-shangyibu:before { + content: "\ec0b"; +} + +._wtmicon-xiangxiazhanhang:before { + content: "\ec0c"; +} + +._wtmicon-xiangshangzhanhang:before { + content: "\ec0d"; +} + +._wtmicon-tupianjiazaishibai:before { + content: "\ec0e"; +} + +._wtmicon-huanyuanhuabu:before { + content: "\ec13"; +} + +._wtmicon-quanping:before { + content: "\ec14"; +} + +._wtmicon-DOC:before { + content: "\ec17"; +} + +._wtmicon-BMP:before { + content: "\ec18"; +} + +._wtmicon-GIF:before { + content: "\ec19"; +} + +._wtmicon-JPG:before { + content: "\ec1a"; +} + +._wtmicon-PNG:before { + content: "\ec1b"; +} + +._wtmicon-weizhigeshi:before { + content: "\ec1c"; +} + +._wtmicon-yunduanxiazai:before { + content: "\ec1d"; +} + +._wtmicon-yunduanshangchuan:before { + content: "\ec1e"; +} + +._wtmicon-wentijieda:before { + content: "\ec2e"; +} + +._wtmicon-dingwei:before { + content: "\ec32"; +} + +._wtmicon-xiaoxitongzhi:before { + content: "\ec35"; +} + +._wtmicon-xinhao:before { + content: "\ec4a"; +} + +._wtmicon-lanya:before { + content: "\ec4b"; +} + +._wtmicon-Wi-Fi:before { + content: "\ec4c"; +} + +._wtmicon-chaxun:before { + content: "\ec4d"; +} + +._wtmicon-anquan:before { + content: "\ec4e"; +} + +._wtmicon-hanshu:before { + content: "\ec56"; +} + +._wtmicon-chucun:before { + content: "\ec5e"; +} + +._wtmicon-bug:before { + content: "\ec63"; +} + +._wtmicon-js:before { + content: "\ec68"; +} + +._wtmicon-wuxiandianbo:before { + content: "\ec79"; +} + +._wtmicon-dianzan_kuai:before { + content: "\ec8c"; +} + +._wtmicon-zhihuan:before { + content: "\ec8d"; +} + +._wtmicon-aixin_shixin:before { + content: "\eca1"; +} + +._wtmicon-aixin:before { + content: "\eca2"; +} + +._wtmicon-shengyin_shiti:before { + content: "\eca5"; +} + +._wtmicon-shengyinkai:before { + content: "\eca6"; +} + +._wtmicon-shoucang_shixin:before { + content: "\eca7"; +} + +._wtmicon-shoucang:before { + content: "\eca8"; +} + +._wtmicon-shengyinwu:before { + content: "\eca9"; +} + +._wtmicon-shengyinjingyin:before { + content: "\ecaa"; +} + +._wtmicon-fenxiangfangshi:before { + content: "\ed2e"; +} + diff --git a/IoTGateway/wwwroot/font/iconfont.eot b/IoTGateway/wwwroot/font/iconfont.eot new file mode 100644 index 0000000..1c5e5fb Binary files /dev/null and b/IoTGateway/wwwroot/font/iconfont.eot differ diff --git a/IoTGateway/wwwroot/font/iconfont.svg b/IoTGateway/wwwroot/font/iconfont.svg new file mode 100644 index 0000000..017fe62 --- /dev/null +++ b/IoTGateway/wwwroot/font/iconfont.svg @@ -0,0 +1,206 @@ + + + + + +Created by iconfont + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/IoTGateway/wwwroot/font/iconfont.ttf b/IoTGateway/wwwroot/font/iconfont.ttf new file mode 100644 index 0000000..b94309f Binary files /dev/null and b/IoTGateway/wwwroot/font/iconfont.ttf differ diff --git a/IoTGateway/wwwroot/font/iconfont.woff b/IoTGateway/wwwroot/font/iconfont.woff new file mode 100644 index 0000000..59e3ef3 Binary files /dev/null and b/IoTGateway/wwwroot/font/iconfont.woff differ diff --git a/IoTGateway/wwwroot/font/iconfont.woff2 b/IoTGateway/wwwroot/font/iconfont.woff2 new file mode 100644 index 0000000..1d0ed57 Binary files /dev/null and b/IoTGateway/wwwroot/font/iconfont.woff2 differ diff --git a/IoTGateway/wwwroot/images/code.png b/IoTGateway/wwwroot/images/code.png new file mode 100644 index 0000000..5319389 Binary files /dev/null and b/IoTGateway/wwwroot/images/code.png differ diff --git a/IoTGateway/wwwroot/images/icon-login01.png b/IoTGateway/wwwroot/images/icon-login01.png new file mode 100644 index 0000000..467d861 Binary files /dev/null and b/IoTGateway/wwwroot/images/icon-login01.png differ diff --git a/IoTGateway/wwwroot/images/icon-login02.png b/IoTGateway/wwwroot/images/icon-login02.png new file mode 100644 index 0000000..ed07cb4 Binary files /dev/null and b/IoTGateway/wwwroot/images/icon-login02.png differ diff --git a/IoTGateway/wwwroot/images/icon-login03.png b/IoTGateway/wwwroot/images/icon-login03.png new file mode 100644 index 0000000..8a303ea Binary files /dev/null and b/IoTGateway/wwwroot/images/icon-login03.png differ diff --git a/IoTGateway/wwwroot/images/icon-login04.png b/IoTGateway/wwwroot/images/icon-login04.png new file mode 100644 index 0000000..15371c8 Binary files /dev/null and b/IoTGateway/wwwroot/images/icon-login04.png differ diff --git a/IoTGateway/wwwroot/images/login-bj.png b/IoTGateway/wwwroot/images/login-bj.png new file mode 100644 index 0000000..02a9c63 Binary files /dev/null and b/IoTGateway/wwwroot/images/login-bj.png differ diff --git a/IoTGateway/wwwroot/images/logo.png b/IoTGateway/wwwroot/images/logo.png new file mode 100644 index 0000000..7ec54f0 Binary files /dev/null and b/IoTGateway/wwwroot/images/logo.png differ diff --git a/IoTGateway/wwwroot/images/wangguan.png b/IoTGateway/wwwroot/images/wangguan.png new file mode 100644 index 0000000..94c3266 Binary files /dev/null and b/IoTGateway/wwwroot/images/wangguan.png differ diff --git a/IoTGateway/wwwroot/images/wangguan_1.png b/IoTGateway/wwwroot/images/wangguan_1.png new file mode 100644 index 0000000..703e394 Binary files /dev/null and b/IoTGateway/wwwroot/images/wangguan_1.png differ diff --git a/IoTGateway/wwwroot/jquery.cookie.js b/IoTGateway/wwwroot/jquery.cookie.js new file mode 100644 index 0000000..4e1aa68 --- /dev/null +++ b/IoTGateway/wwwroot/jquery.cookie.js @@ -0,0 +1,89 @@ +/*jslint browser: true */ /*global jQuery: true */ + +/** + * jQuery Cookie plugin + * + * Copyright (c) 2010 Klaus Hartl (stilbuero.de) + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + * + */ + +// TODO JsDoc + +/** + * Create a cookie with the given key and value and other optional parameters. + * + * @example $.cookie('the_cookie', 'the_value'); + * @desc Set the value of a cookie. + * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true }); + * @desc Create a cookie with all available options. + * @example $.cookie('the_cookie', 'the_value'); + * @desc Create a session cookie. + * @example $.cookie('the_cookie', null); + * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain + * used when the cookie was set. + * + * @param String key The key of the cookie. + * @param String value The value of the cookie. + * @param Object options An object literal containing key/value pairs to provide optional cookie attributes. + * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object. + * If a negative value is specified (e.g. a date in the past), the cookie will be deleted. + * If set to null or omitted, the cookie will be a session cookie and will not be retained + * when the the browser exits. + * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie). + * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie). + * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will + * require a secure protocol (like HTTPS). + * @type undefined + * + * @name $.cookie + * @cat Plugins/Cookie + * @author Klaus Hartl/klaus.hartl@stilbuero.de + */ + +/** + * Get the value of a cookie with the given key. + * + * @example $.cookie('the_cookie'); + * @desc Get the value of a cookie. + * + * @param String key The key of the cookie. + * @return The value of the cookie. + * @type String + * + * @name $.cookie + * @cat Plugins/Cookie + * @author Klaus Hartl/klaus.hartl@stilbuero.de + */ +jQuery.cookie = function (key, value, options) { + + // key and value given, set cookie... + if (arguments.length > 1 && (value === null || typeof value !== "object")) { + options = jQuery.extend({}, options); + + if (value === null) { + options.expires = -1; + } + + if (typeof options.expires === 'number') { + var days = options.expires, t = options.expires = new Date(); + t.setDate(t.getDate() + days); + } + + return (document.cookie = [ + encodeURIComponent(key), '=', + options.raw ? String(value) : encodeURIComponent(String(value)), + options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE + options.path ? '; path=' + options.path : '', + options.domain ? '; domain=' + options.domain : '', + options.secure ? '; secure' : '' + ].join('')); + } + + // key and possibly options given, get cookie... + options = value || {}; + var result, decode = options.raw ? function (s) { return s; } : decodeURIComponent; + return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null; +}; diff --git a/IoTGateway/wwwroot/jquery.min.js b/IoTGateway/wwwroot/jquery.min.js new file mode 100644 index 0000000..644d35e --- /dev/null +++ b/IoTGateway/wwwroot/jquery.min.js @@ -0,0 +1,4 @@ +/*! jQuery v3.2.1 | (c) JS Foundation and other contributors | jquery.org/license */ +!function(a,b){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){"use strict";var c=[],d=a.document,e=Object.getPrototypeOf,f=c.slice,g=c.concat,h=c.push,i=c.indexOf,j={},k=j.toString,l=j.hasOwnProperty,m=l.toString,n=m.call(Object),o={};function p(a,b){b=b||d;var c=b.createElement("script");c.text=a,b.head.appendChild(c).parentNode.removeChild(c)}var q="3.2.1",r=function(a,b){return new r.fn.init(a,b)},s=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,t=/^-ms-/,u=/-([a-z])/g,v=function(a,b){return b.toUpperCase()};r.fn=r.prototype={jquery:q,constructor:r,length:0,toArray:function(){return f.call(this)},get:function(a){return null==a?f.call(this):a<0?this[a+this.length]:this[a]},pushStack:function(a){var b=r.merge(this.constructor(),a);return b.prevObject=this,b},each:function(a){return r.each(this,a)},map:function(a){return this.pushStack(r.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(f.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(a<0?b:0);return this.pushStack(c>=0&&c0&&b-1 in a)}var x=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=function(a,b){for(var c=0,d=a.length;c+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(N),U=new RegExp("^"+L+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L+"|[*])"),ATTR:new RegExp("^"+M),PSEUDO:new RegExp("^"+N),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),aa=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:d<0?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ba=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ca=function(a,b){return b?"\0"===a?"\ufffd":a.slice(0,-1)+"\\"+a.charCodeAt(a.length-1).toString(16)+" ":"\\"+a},da=function(){m()},ea=ta(function(a){return a.disabled===!0&&("form"in a||"label"in a)},{dir:"parentNode",next:"legend"});try{G.apply(D=H.call(v.childNodes),v.childNodes),D[v.childNodes.length].nodeType}catch(fa){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s=b&&b.ownerDocument,w=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==w&&9!==w&&11!==w)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==w&&(l=Z.exec(a)))if(f=l[1]){if(9===w){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(s&&(j=s.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(l[2])return G.apply(d,b.getElementsByTagName(a)),d;if((f=l[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==w)s=b,r=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(ba,ca):b.setAttribute("id",k=u),o=g(a),h=o.length;while(h--)o[h]="#"+k+" "+sa(o[h]);r=o.join(","),s=$.test(a)&&qa(b.parentNode)||b}if(r)try{return G.apply(d,s.querySelectorAll(r)),d}catch(x){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(P,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("fieldset");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&a.sourceIndex-b.sourceIndex;if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return function(b){return"form"in b?b.parentNode&&b.disabled===!1?"label"in b?"label"in b.parentNode?b.parentNode.disabled===a:b.disabled===a:b.isDisabled===a||b.isDisabled!==!a&&ea(b)===a:b.disabled===a:"label"in b&&b.disabled===a}}function pa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function qa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return!!b&&"HTML"!==b.nodeName},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),v!==n&&(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(n.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){return a.getAttribute("id")===b}},d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}}):(d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}},d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c,d,e,f=b.getElementById(a);if(f){if(c=f.getAttributeNode("id"),c&&c.value===a)return[f];e=b.getElementsByName(a),d=0;while(f=e[d++])if(c=f.getAttributeNode("id"),c&&c.value===a)return[f]}return[]}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){if("undefined"!=typeof b.getElementsByClassName&&p)return b.getElementsByClassName(a)},r=[],q=[],(c.qsa=Y.test(n.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){a.innerHTML="";var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+K+"*[*^$|!~]?="),2!==a.querySelectorAll(":enabled").length&&q.push(":enabled",":disabled"),o.appendChild(a).disabled=!0,2!==a.querySelectorAll(":disabled").length&&q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Y.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"*"),s.call(a,"[s!='']:x"),r.push("!=",N)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Y.test(o.compareDocumentPosition),t=b||Y.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?I(k,a)-I(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?I(k,a)-I(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?la(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(S,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.escape=function(a){return(a+"").replace(ba,ca)},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(_,aa),a[3]=(a[3]||a[4]||a[5]||"").replace(_,aa),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return V.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&T.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(_,aa).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:!b||(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(O," ")+" ").indexOf(c)>-1:"|="===b&&(e===c||e.slice(0,c.length+1)===c+"-"))}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(P,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(_,aa),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return U.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(_,aa).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:oa(!1),disabled:oa(!0),checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:pa(function(){return[0]}),last:pa(function(a,b){return[b-1]}),eq:pa(function(a,b,c){return[c<0?c+b:c]}),even:pa(function(a,b){for(var c=0;c=0;)a.push(d);return a}),gt:pa(function(a,b,c){for(var d=c<0?c+b:c;++d1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function va(a,b,c){for(var d=0,e=b.length;d-1&&(f[j]=!(g[j]=l))}}else r=wa(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ya(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ta(function(a){return a===b},h,!0),l=ta(function(a){return I(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];i1&&ua(m),i>1&&sa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(P,"$1"),c,i0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=E.call(i));u=wa(u)}G.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&ga.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=ya(b[c]),f[u]?d.push(f):e.push(f);f=A(a,za(e,d)),f.selector=a}return f},i=ga.select=function(a,b,c,e){var f,i,j,k,l,m="function"==typeof a&&a,n=!e&&g(a=m.selector||a);if(c=c||[],1===n.length){if(i=n[0]=n[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&9===b.nodeType&&p&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(_,aa),b)||[])[0],!b)return c;m&&(b=b.parentNode),a=a.slice(i.shift().value.length)}f=V.needsContext.test(a)?0:i.length;while(f--){if(j=i[f],d.relative[k=j.type])break;if((l=d.find[k])&&(e=l(j.matches[0].replace(_,aa),$.test(i[0].type)&&qa(b.parentNode)||b))){if(i.splice(f,1),a=e.length&&sa(i),!a)return G.apply(c,e),c;break}}}return(m||h(a,n))(e,b,!p,c,!b||$.test(a)&&qa(b.parentNode)||b),c},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("fieldset"))}),ja(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){if(!c)return a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){if(!c&&"input"===a.nodeName.toLowerCase())return a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(J,function(a,b,c){var d;if(!c)return a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);r.find=x,r.expr=x.selectors,r.expr[":"]=r.expr.pseudos,r.uniqueSort=r.unique=x.uniqueSort,r.text=x.getText,r.isXMLDoc=x.isXML,r.contains=x.contains,r.escapeSelector=x.escape;var y=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&r(a).is(c))break;d.push(a)}return d},z=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},A=r.expr.match.needsContext;function B(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()}var C=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,D=/^.[^:#\[\.,]*$/;function E(a,b,c){return r.isFunction(b)?r.grep(a,function(a,d){return!!b.call(a,d,a)!==c}):b.nodeType?r.grep(a,function(a){return a===b!==c}):"string"!=typeof b?r.grep(a,function(a){return i.call(b,a)>-1!==c}):D.test(b)?r.filter(b,a,c):(b=r.filter(b,a),r.grep(a,function(a){return i.call(b,a)>-1!==c&&1===a.nodeType}))}r.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?r.find.matchesSelector(d,a)?[d]:[]:r.find.matches(a,r.grep(b,function(a){return 1===a.nodeType}))},r.fn.extend({find:function(a){var b,c,d=this.length,e=this;if("string"!=typeof a)return this.pushStack(r(a).filter(function(){for(b=0;b1?r.uniqueSort(c):c},filter:function(a){return this.pushStack(E(this,a||[],!1))},not:function(a){return this.pushStack(E(this,a||[],!0))},is:function(a){return!!E(this,"string"==typeof a&&A.test(a)?r(a):a||[],!1).length}});var F,G=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,H=r.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||F,"string"==typeof a){if(e="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:G.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof r?b[0]:b,r.merge(this,r.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),C.test(e[1])&&r.isPlainObject(b))for(e in b)r.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}return f=d.getElementById(e[2]),f&&(this[0]=f,this.length=1),this}return a.nodeType?(this[0]=a,this.length=1,this):r.isFunction(a)?void 0!==c.ready?c.ready(a):a(r):r.makeArray(a,this)};H.prototype=r.fn,F=r(d);var I=/^(?:parents|prev(?:Until|All))/,J={children:!0,contents:!0,next:!0,prev:!0};r.fn.extend({has:function(a){var b=r(a,this),c=b.length;return this.filter(function(){for(var a=0;a-1:1===c.nodeType&&r.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?r.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?i.call(r(a),this[0]):i.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(r.uniqueSort(r.merge(this.get(),r(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function K(a,b){while((a=a[b])&&1!==a.nodeType);return a}r.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return y(a,"parentNode")},parentsUntil:function(a,b,c){return y(a,"parentNode",c)},next:function(a){return K(a,"nextSibling")},prev:function(a){return K(a,"previousSibling")},nextAll:function(a){return y(a,"nextSibling")},prevAll:function(a){return y(a,"previousSibling")},nextUntil:function(a,b,c){return y(a,"nextSibling",c)},prevUntil:function(a,b,c){return y(a,"previousSibling",c)},siblings:function(a){return z((a.parentNode||{}).firstChild,a)},children:function(a){return z(a.firstChild)},contents:function(a){return B(a,"iframe")?a.contentDocument:(B(a,"template")&&(a=a.content||a),r.merge([],a.childNodes))}},function(a,b){r.fn[a]=function(c,d){var e=r.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=r.filter(d,e)),this.length>1&&(J[a]||r.uniqueSort(e),I.test(a)&&e.reverse()),this.pushStack(e)}});var L=/[^\x20\t\r\n\f]+/g;function M(a){var b={};return r.each(a.match(L)||[],function(a,c){b[c]=!0}),b}r.Callbacks=function(a){a="string"==typeof a?M(a):r.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=e||a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h-1)f.splice(c,1),c<=h&&h--}),this},has:function(a){return a?r.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=g=[],c||b||(f=c=""),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j};function N(a){return a}function O(a){throw a}function P(a,b,c,d){var e;try{a&&r.isFunction(e=a.promise)?e.call(a).done(b).fail(c):a&&r.isFunction(e=a.then)?e.call(a,b,c):b.apply(void 0,[a].slice(d))}catch(a){c.apply(void 0,[a])}}r.extend({Deferred:function(b){var c=[["notify","progress",r.Callbacks("memory"),r.Callbacks("memory"),2],["resolve","done",r.Callbacks("once memory"),r.Callbacks("once memory"),0,"resolved"],["reject","fail",r.Callbacks("once memory"),r.Callbacks("once memory"),1,"rejected"]],d="pending",e={state:function(){return d},always:function(){return f.done(arguments).fail(arguments),this},"catch":function(a){return e.then(null,a)},pipe:function(){var a=arguments;return r.Deferred(function(b){r.each(c,function(c,d){var e=r.isFunction(a[d[4]])&&a[d[4]];f[d[1]](function(){var a=e&&e.apply(this,arguments);a&&r.isFunction(a.promise)?a.promise().progress(b.notify).done(b.resolve).fail(b.reject):b[d[0]+"With"](this,e?[a]:arguments)})}),a=null}).promise()},then:function(b,d,e){var f=0;function g(b,c,d,e){return function(){var h=this,i=arguments,j=function(){var a,j;if(!(b=f&&(d!==O&&(h=void 0,i=[a]),c.rejectWith(h,i))}};b?k():(r.Deferred.getStackHook&&(k.stackTrace=r.Deferred.getStackHook()),a.setTimeout(k))}}return r.Deferred(function(a){c[0][3].add(g(0,a,r.isFunction(e)?e:N,a.notifyWith)),c[1][3].add(g(0,a,r.isFunction(b)?b:N)),c[2][3].add(g(0,a,r.isFunction(d)?d:O))}).promise()},promise:function(a){return null!=a?r.extend(a,e):e}},f={};return r.each(c,function(a,b){var g=b[2],h=b[5];e[b[1]]=g.add,h&&g.add(function(){d=h},c[3-a][2].disable,c[0][2].lock),g.add(b[3].fire),f[b[0]]=function(){return f[b[0]+"With"](this===f?void 0:this,arguments),this},f[b[0]+"With"]=g.fireWith}),e.promise(f),b&&b.call(f,f),f},when:function(a){var b=arguments.length,c=b,d=Array(c),e=f.call(arguments),g=r.Deferred(),h=function(a){return function(c){d[a]=this,e[a]=arguments.length>1?f.call(arguments):c,--b||g.resolveWith(d,e)}};if(b<=1&&(P(a,g.done(h(c)).resolve,g.reject,!b),"pending"===g.state()||r.isFunction(e[c]&&e[c].then)))return g.then();while(c--)P(e[c],h(c),g.reject);return g.promise()}});var Q=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;r.Deferred.exceptionHook=function(b,c){a.console&&a.console.warn&&b&&Q.test(b.name)&&a.console.warn("jQuery.Deferred exception: "+b.message,b.stack,c)},r.readyException=function(b){a.setTimeout(function(){throw b})};var R=r.Deferred();r.fn.ready=function(a){return R.then(a)["catch"](function(a){r.readyException(a)}),this},r.extend({isReady:!1,readyWait:1,ready:function(a){(a===!0?--r.readyWait:r.isReady)||(r.isReady=!0,a!==!0&&--r.readyWait>0||R.resolveWith(d,[r]))}}),r.ready.then=R.then;function S(){d.removeEventListener("DOMContentLoaded",S), +a.removeEventListener("load",S),r.ready()}"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(r.ready):(d.addEventListener("DOMContentLoaded",S),a.addEventListener("load",S));var T=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===r.type(c)){e=!0;for(h in c)T(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,r.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(r(a),c)})),b))for(;h1,null,!0)},removeData:function(a){return this.each(function(){X.remove(this,a)})}}),r.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=W.get(a,b),c&&(!d||Array.isArray(c)?d=W.access(a,b,r.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=r.queue(a,b),d=c.length,e=c.shift(),f=r._queueHooks(a,b),g=function(){r.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return W.get(a,c)||W.access(a,c,{empty:r.Callbacks("once memory").add(function(){W.remove(a,[b+"queue",c])})})}}),r.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length\x20\t\r\n\f]+)/i,la=/^$|\/(?:java|ecma)script/i,ma={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};ma.optgroup=ma.option,ma.tbody=ma.tfoot=ma.colgroup=ma.caption=ma.thead,ma.th=ma.td;function na(a,b){var c;return c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[],void 0===b||b&&B(a,b)?r.merge([a],c):c}function oa(a,b){for(var c=0,d=a.length;c-1)e&&e.push(f);else if(j=r.contains(f.ownerDocument,f),g=na(l.appendChild(f),"script"),j&&oa(g),c){k=0;while(f=g[k++])la.test(f.type||"")&&c.push(f)}return l}!function(){var a=d.createDocumentFragment(),b=a.appendChild(d.createElement("div")),c=d.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),o.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="",o.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var ra=d.documentElement,sa=/^key/,ta=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ua=/^([^.]*)(?:\.(.+)|)/;function va(){return!0}function wa(){return!1}function xa(){try{return d.activeElement}catch(a){}}function ya(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)ya(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=wa;else if(!e)return a;return 1===f&&(g=e,e=function(a){return r().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=r.guid++)),a.each(function(){r.event.add(this,b,e,d,c)})}r.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=W.get(a);if(q){c.handler&&(f=c,c=f.handler,e=f.selector),e&&r.find.matchesSelector(ra,e),c.guid||(c.guid=r.guid++),(i=q.events)||(i=q.events={}),(g=q.handle)||(g=q.handle=function(b){return"undefined"!=typeof r&&r.event.triggered!==b.type?r.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(L)||[""],j=b.length;while(j--)h=ua.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n&&(l=r.event.special[n]||{},n=(e?l.delegateType:l.bindType)||n,l=r.event.special[n]||{},k=r.extend({type:n,origType:p,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&r.expr.match.needsContext.test(e),namespace:o.join(".")},f),(m=i[n])||(m=i[n]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,o,g)!==!1||a.addEventListener&&a.addEventListener(n,g)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),r.event.global[n]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=W.hasData(a)&&W.get(a);if(q&&(i=q.events)){b=(b||"").match(L)||[""],j=b.length;while(j--)if(h=ua.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){l=r.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=i[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&p!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||r.removeEvent(a,n,q.handle),delete i[n])}else for(n in i)r.event.remove(a,n+b[j],c,d,!0);r.isEmptyObject(i)&&W.remove(a,"handle events")}},dispatch:function(a){var b=r.event.fix(a),c,d,e,f,g,h,i=new Array(arguments.length),j=(W.get(this,"events")||{})[b.type]||[],k=r.event.special[b.type]||{};for(i[0]=b,c=1;c=1))for(;j!==this;j=j.parentNode||this)if(1===j.nodeType&&("click"!==a.type||j.disabled!==!0)){for(f=[],g={},c=0;c-1:r.find(e,this,null,[j]).length),g[e]&&f.push(d);f.length&&h.push({elem:j,handlers:f})}return j=this,i\x20\t\r\n\f]*)[^>]*)\/>/gi,Aa=/\s*$/g;function Ea(a,b){return B(a,"table")&&B(11!==b.nodeType?b:b.firstChild,"tr")?r(">tbody",a)[0]||a:a}function Fa(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function Ga(a){var b=Ca.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ha(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(W.hasData(a)&&(f=W.access(a),g=W.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;c1&&"string"==typeof q&&!o.checkClone&&Ba.test(q))return a.each(function(e){var f=a.eq(e);s&&(b[0]=q.call(this,e,f.html())),Ja(f,b,c,d)});if(m&&(e=qa(b,a[0].ownerDocument,!1,a,d),f=e.firstChild,1===e.childNodes.length&&(e=f),f||d)){for(h=r.map(na(e,"script"),Fa),i=h.length;l")},clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=r.contains(a.ownerDocument,a);if(!(o.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||r.isXMLDoc(a)))for(g=na(h),f=na(a),d=0,e=f.length;d0&&oa(g,!i&&na(a,"script")),h},cleanData:function(a){for(var b,c,d,e=r.event.special,f=0;void 0!==(c=a[f]);f++)if(U(c)){if(b=c[W.expando]){if(b.events)for(d in b.events)e[d]?r.event.remove(c,d):r.removeEvent(c,d,b.handle);c[W.expando]=void 0}c[X.expando]&&(c[X.expando]=void 0)}}}),r.fn.extend({detach:function(a){return Ka(this,a,!0)},remove:function(a){return Ka(this,a)},text:function(a){return T(this,function(a){return void 0===a?r.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=a)})},null,a,arguments.length)},append:function(){return Ja(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ea(this,a);b.appendChild(a)}})},prepend:function(){return Ja(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ea(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return Ja(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return Ja(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(r.cleanData(na(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null!=a&&a,b=null==b?a:b,this.map(function(){return r.clone(this,a,b)})},html:function(a){return T(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!Aa.test(a)&&!ma[(ka.exec(a)||["",""])[1].toLowerCase()]){a=r.htmlPrefilter(a);try{for(;c1)}});function _a(a,b,c,d,e){return new _a.prototype.init(a,b,c,d,e)}r.Tween=_a,_a.prototype={constructor:_a,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||r.easing._default,this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(r.cssNumber[c]?"":"px")},cur:function(){var a=_a.propHooks[this.prop];return a&&a.get?a.get(this):_a.propHooks._default.get(this)},run:function(a){var b,c=_a.propHooks[this.prop];return this.options.duration?this.pos=b=r.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):_a.propHooks._default.set(this),this}},_a.prototype.init.prototype=_a.prototype,_a.propHooks={_default:{get:function(a){var b;return 1!==a.elem.nodeType||null!=a.elem[a.prop]&&null==a.elem.style[a.prop]?a.elem[a.prop]:(b=r.css(a.elem,a.prop,""),b&&"auto"!==b?b:0)},set:function(a){r.fx.step[a.prop]?r.fx.step[a.prop](a):1!==a.elem.nodeType||null==a.elem.style[r.cssProps[a.prop]]&&!r.cssHooks[a.prop]?a.elem[a.prop]=a.now:r.style(a.elem,a.prop,a.now+a.unit)}}},_a.propHooks.scrollTop=_a.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},r.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2},_default:"swing"},r.fx=_a.prototype.init,r.fx.step={};var ab,bb,cb=/^(?:toggle|show|hide)$/,db=/queueHooks$/;function eb(){bb&&(d.hidden===!1&&a.requestAnimationFrame?a.requestAnimationFrame(eb):a.setTimeout(eb,r.fx.interval),r.fx.tick())}function fb(){return a.setTimeout(function(){ab=void 0}),ab=r.now()}function gb(a,b){var c,d=0,e={height:a};for(b=b?1:0;d<4;d+=2-b)c=ca[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function hb(a,b,c){for(var d,e=(kb.tweeners[b]||[]).concat(kb.tweeners["*"]),f=0,g=e.length;f1)},removeAttr:function(a){return this.each(function(){r.removeAttr(this,a)})}}),r.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return"undefined"==typeof a.getAttribute?r.prop(a,b,c):(1===f&&r.isXMLDoc(a)||(e=r.attrHooks[b.toLowerCase()]||(r.expr.match.bool.test(b)?lb:void 0)),void 0!==c?null===c?void r.removeAttr(a,b):e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:(a.setAttribute(b,c+""),c):e&&"get"in e&&null!==(d=e.get(a,b))?d:(d=r.find.attr(a,b), +null==d?void 0:d))},attrHooks:{type:{set:function(a,b){if(!o.radioValue&&"radio"===b&&B(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},removeAttr:function(a,b){var c,d=0,e=b&&b.match(L);if(e&&1===a.nodeType)while(c=e[d++])a.removeAttribute(c)}}),lb={set:function(a,b,c){return b===!1?r.removeAttr(a,c):a.setAttribute(c,c),c}},r.each(r.expr.match.bool.source.match(/\w+/g),function(a,b){var c=mb[b]||r.find.attr;mb[b]=function(a,b,d){var e,f,g=b.toLowerCase();return d||(f=mb[g],mb[g]=e,e=null!=c(a,b,d)?g:null,mb[g]=f),e}});var nb=/^(?:input|select|textarea|button)$/i,ob=/^(?:a|area)$/i;r.fn.extend({prop:function(a,b){return T(this,r.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[r.propFix[a]||a]})}}),r.extend({prop:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return 1===f&&r.isXMLDoc(a)||(b=r.propFix[b]||b,e=r.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=r.find.attr(a,"tabindex");return b?parseInt(b,10):nb.test(a.nodeName)||ob.test(a.nodeName)&&a.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),o.optSelected||(r.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null},set:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}}),r.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){r.propFix[this.toLowerCase()]=this});function pb(a){var b=a.match(L)||[];return b.join(" ")}function qb(a){return a.getAttribute&&a.getAttribute("class")||""}r.fn.extend({addClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).addClass(a.call(this,b,qb(this)))});if("string"==typeof a&&a){b=a.match(L)||[];while(c=this[i++])if(e=qb(c),d=1===c.nodeType&&" "+pb(e)+" "){g=0;while(f=b[g++])d.indexOf(" "+f+" ")<0&&(d+=f+" ");h=pb(d),e!==h&&c.setAttribute("class",h)}}return this},removeClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).removeClass(a.call(this,b,qb(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof a&&a){b=a.match(L)||[];while(c=this[i++])if(e=qb(c),d=1===c.nodeType&&" "+pb(e)+" "){g=0;while(f=b[g++])while(d.indexOf(" "+f+" ")>-1)d=d.replace(" "+f+" "," ");h=pb(d),e!==h&&c.setAttribute("class",h)}}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):r.isFunction(a)?this.each(function(c){r(this).toggleClass(a.call(this,c,qb(this),b),b)}):this.each(function(){var b,d,e,f;if("string"===c){d=0,e=r(this),f=a.match(L)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else void 0!==a&&"boolean"!==c||(b=qb(this),b&&W.set(this,"__className__",b),this.setAttribute&&this.setAttribute("class",b||a===!1?"":W.get(this,"__className__")||""))})},hasClass:function(a){var b,c,d=0;b=" "+a+" ";while(c=this[d++])if(1===c.nodeType&&(" "+pb(qb(c))+" ").indexOf(b)>-1)return!0;return!1}});var rb=/\r/g;r.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=r.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,r(this).val()):a,null==e?e="":"number"==typeof e?e+="":Array.isArray(e)&&(e=r.map(e,function(a){return null==a?"":a+""})),b=r.valHooks[this.type]||r.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=r.valHooks[e.type]||r.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(rb,""):null==c?"":c)}}}),r.extend({valHooks:{option:{get:function(a){var b=r.find.attr(a,"value");return null!=b?b:pb(r.text(a))}},select:{get:function(a){var b,c,d,e=a.options,f=a.selectedIndex,g="select-one"===a.type,h=g?null:[],i=g?f+1:e.length;for(d=f<0?i:g?f:0;d-1)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),r.each(["radio","checkbox"],function(){r.valHooks[this]={set:function(a,b){if(Array.isArray(b))return a.checked=r.inArray(r(a).val(),b)>-1}},o.checkOn||(r.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var sb=/^(?:focusinfocus|focusoutblur)$/;r.extend(r.event,{trigger:function(b,c,e,f){var g,h,i,j,k,m,n,o=[e||d],p=l.call(b,"type")?b.type:b,q=l.call(b,"namespace")?b.namespace.split("."):[];if(h=i=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!sb.test(p+r.event.triggered)&&(p.indexOf(".")>-1&&(q=p.split("."),p=q.shift(),q.sort()),k=p.indexOf(":")<0&&"on"+p,b=b[r.expando]?b:new r.Event(p,"object"==typeof b&&b),b.isTrigger=f?2:3,b.namespace=q.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=e),c=null==c?[b]:r.makeArray(c,[b]),n=r.event.special[p]||{},f||!n.trigger||n.trigger.apply(e,c)!==!1)){if(!f&&!n.noBubble&&!r.isWindow(e)){for(j=n.delegateType||p,sb.test(j+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),i=h;i===(e.ownerDocument||d)&&o.push(i.defaultView||i.parentWindow||a)}g=0;while((h=o[g++])&&!b.isPropagationStopped())b.type=g>1?j:n.bindType||p,m=(W.get(h,"events")||{})[b.type]&&W.get(h,"handle"),m&&m.apply(h,c),m=k&&h[k],m&&m.apply&&U(h)&&(b.result=m.apply(h,c),b.result===!1&&b.preventDefault());return b.type=p,f||b.isDefaultPrevented()||n._default&&n._default.apply(o.pop(),c)!==!1||!U(e)||k&&r.isFunction(e[p])&&!r.isWindow(e)&&(i=e[k],i&&(e[k]=null),r.event.triggered=p,e[p](),r.event.triggered=void 0,i&&(e[k]=i)),b.result}},simulate:function(a,b,c){var d=r.extend(new r.Event,c,{type:a,isSimulated:!0});r.event.trigger(d,null,b)}}),r.fn.extend({trigger:function(a,b){return this.each(function(){r.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];if(c)return r.event.trigger(a,b,c,!0)}}),r.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(a,b){r.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),r.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),o.focusin="onfocusin"in a,o.focusin||r.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){r.event.simulate(b,a.target,r.event.fix(a))};r.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=W.access(d,b);e||d.addEventListener(a,c,!0),W.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=W.access(d,b)-1;e?W.access(d,b,e):(d.removeEventListener(a,c,!0),W.remove(d,b))}}});var tb=a.location,ub=r.now(),vb=/\?/;r.parseXML=function(b){var c;if(!b||"string"!=typeof b)return null;try{c=(new a.DOMParser).parseFromString(b,"text/xml")}catch(d){c=void 0}return c&&!c.getElementsByTagName("parsererror").length||r.error("Invalid XML: "+b),c};var wb=/\[\]$/,xb=/\r?\n/g,yb=/^(?:submit|button|image|reset|file)$/i,zb=/^(?:input|select|textarea|keygen)/i;function Ab(a,b,c,d){var e;if(Array.isArray(b))r.each(b,function(b,e){c||wb.test(a)?d(a,e):Ab(a+"["+("object"==typeof e&&null!=e?b:"")+"]",e,c,d)});else if(c||"object"!==r.type(b))d(a,b);else for(e in b)Ab(a+"["+e+"]",b[e],c,d)}r.param=function(a,b){var c,d=[],e=function(a,b){var c=r.isFunction(b)?b():b;d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(null==c?"":c)};if(Array.isArray(a)||a.jquery&&!r.isPlainObject(a))r.each(a,function(){e(this.name,this.value)});else for(c in a)Ab(c,a[c],b,e);return d.join("&")},r.fn.extend({serialize:function(){return r.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=r.prop(this,"elements");return a?r.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!r(this).is(":disabled")&&zb.test(this.nodeName)&&!yb.test(a)&&(this.checked||!ja.test(a))}).map(function(a,b){var c=r(this).val();return null==c?null:Array.isArray(c)?r.map(c,function(a){return{name:b.name,value:a.replace(xb,"\r\n")}}):{name:b.name,value:c.replace(xb,"\r\n")}}).get()}});var Bb=/%20/g,Cb=/#.*$/,Db=/([?&])_=[^&]*/,Eb=/^(.*?):[ \t]*([^\r\n]*)$/gm,Fb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Gb=/^(?:GET|HEAD)$/,Hb=/^\/\//,Ib={},Jb={},Kb="*/".concat("*"),Lb=d.createElement("a");Lb.href=tb.href;function Mb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(L)||[];if(r.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Nb(a,b,c,d){var e={},f=a===Jb;function g(h){var i;return e[h]=!0,r.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Ob(a,b){var c,d,e=r.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&r.extend(!0,a,d),a}function Pb(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}if(f)return f!==i[0]&&i.unshift(f),c[f]}function Qb(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}r.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:tb.href,type:"GET",isLocal:Fb.test(tb.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Kb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":r.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Ob(Ob(a,r.ajaxSettings),b):Ob(r.ajaxSettings,a)},ajaxPrefilter:Mb(Ib),ajaxTransport:Mb(Jb),ajax:function(b,c){"object"==typeof b&&(c=b,b=void 0),c=c||{};var e,f,g,h,i,j,k,l,m,n,o=r.ajaxSetup({},c),p=o.context||o,q=o.context&&(p.nodeType||p.jquery)?r(p):r.event,s=r.Deferred(),t=r.Callbacks("once memory"),u=o.statusCode||{},v={},w={},x="canceled",y={readyState:0,getResponseHeader:function(a){var b;if(k){if(!h){h={};while(b=Eb.exec(g))h[b[1].toLowerCase()]=b[2]}b=h[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return k?g:null},setRequestHeader:function(a,b){return null==k&&(a=w[a.toLowerCase()]=w[a.toLowerCase()]||a,v[a]=b),this},overrideMimeType:function(a){return null==k&&(o.mimeType=a),this},statusCode:function(a){var b;if(a)if(k)y.always(a[y.status]);else for(b in a)u[b]=[u[b],a[b]];return this},abort:function(a){var b=a||x;return e&&e.abort(b),A(0,b),this}};if(s.promise(y),o.url=((b||o.url||tb.href)+"").replace(Hb,tb.protocol+"//"),o.type=c.method||c.type||o.method||o.type,o.dataTypes=(o.dataType||"*").toLowerCase().match(L)||[""],null==o.crossDomain){j=d.createElement("a");try{j.href=o.url,j.href=j.href,o.crossDomain=Lb.protocol+"//"+Lb.host!=j.protocol+"//"+j.host}catch(z){o.crossDomain=!0}}if(o.data&&o.processData&&"string"!=typeof o.data&&(o.data=r.param(o.data,o.traditional)),Nb(Ib,o,c,y),k)return y;l=r.event&&o.global,l&&0===r.active++&&r.event.trigger("ajaxStart"),o.type=o.type.toUpperCase(),o.hasContent=!Gb.test(o.type),f=o.url.replace(Cb,""),o.hasContent?o.data&&o.processData&&0===(o.contentType||"").indexOf("application/x-www-form-urlencoded")&&(o.data=o.data.replace(Bb,"+")):(n=o.url.slice(f.length),o.data&&(f+=(vb.test(f)?"&":"?")+o.data,delete o.data),o.cache===!1&&(f=f.replace(Db,"$1"),n=(vb.test(f)?"&":"?")+"_="+ub++ +n),o.url=f+n),o.ifModified&&(r.lastModified[f]&&y.setRequestHeader("If-Modified-Since",r.lastModified[f]),r.etag[f]&&y.setRequestHeader("If-None-Match",r.etag[f])),(o.data&&o.hasContent&&o.contentType!==!1||c.contentType)&&y.setRequestHeader("Content-Type",o.contentType),y.setRequestHeader("Accept",o.dataTypes[0]&&o.accepts[o.dataTypes[0]]?o.accepts[o.dataTypes[0]]+("*"!==o.dataTypes[0]?", "+Kb+"; q=0.01":""):o.accepts["*"]);for(m in o.headers)y.setRequestHeader(m,o.headers[m]);if(o.beforeSend&&(o.beforeSend.call(p,y,o)===!1||k))return y.abort();if(x="abort",t.add(o.complete),y.done(o.success),y.fail(o.error),e=Nb(Jb,o,c,y)){if(y.readyState=1,l&&q.trigger("ajaxSend",[y,o]),k)return y;o.async&&o.timeout>0&&(i=a.setTimeout(function(){y.abort("timeout")},o.timeout));try{k=!1,e.send(v,A)}catch(z){if(k)throw z;A(-1,z)}}else A(-1,"No Transport");function A(b,c,d,h){var j,m,n,v,w,x=c;k||(k=!0,i&&a.clearTimeout(i),e=void 0,g=h||"",y.readyState=b>0?4:0,j=b>=200&&b<300||304===b,d&&(v=Pb(o,y,d)),v=Qb(o,v,y,j),j?(o.ifModified&&(w=y.getResponseHeader("Last-Modified"),w&&(r.lastModified[f]=w),w=y.getResponseHeader("etag"),w&&(r.etag[f]=w)),204===b||"HEAD"===o.type?x="nocontent":304===b?x="notmodified":(x=v.state,m=v.data,n=v.error,j=!n)):(n=x,!b&&x||(x="error",b<0&&(b=0))),y.status=b,y.statusText=(c||x)+"",j?s.resolveWith(p,[m,x,y]):s.rejectWith(p,[y,x,n]),y.statusCode(u),u=void 0,l&&q.trigger(j?"ajaxSuccess":"ajaxError",[y,o,j?m:n]),t.fireWith(p,[y,x]),l&&(q.trigger("ajaxComplete",[y,o]),--r.active||r.event.trigger("ajaxStop")))}return y},getJSON:function(a,b,c){return r.get(a,b,c,"json")},getScript:function(a,b){return r.get(a,void 0,b,"script")}}),r.each(["get","post"],function(a,b){r[b]=function(a,c,d,e){return r.isFunction(c)&&(e=e||d,d=c,c=void 0),r.ajax(r.extend({url:a,type:b,dataType:e,data:c,success:d},r.isPlainObject(a)&&a))}}),r._evalUrl=function(a){return r.ajax({url:a,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},r.fn.extend({wrapAll:function(a){var b;return this[0]&&(r.isFunction(a)&&(a=a.call(this[0])),b=r(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this},wrapInner:function(a){return r.isFunction(a)?this.each(function(b){r(this).wrapInner(a.call(this,b))}):this.each(function(){var b=r(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=r.isFunction(a);return this.each(function(c){r(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(a){return this.parent(a).not("body").each(function(){r(this).replaceWith(this.childNodes)}),this}}),r.expr.pseudos.hidden=function(a){return!r.expr.pseudos.visible(a)},r.expr.pseudos.visible=function(a){return!!(a.offsetWidth||a.offsetHeight||a.getClientRects().length)},r.ajaxSettings.xhr=function(){try{return new a.XMLHttpRequest}catch(b){}};var Rb={0:200,1223:204},Sb=r.ajaxSettings.xhr();o.cors=!!Sb&&"withCredentials"in Sb,o.ajax=Sb=!!Sb,r.ajaxTransport(function(b){var c,d;if(o.cors||Sb&&!b.crossDomain)return{send:function(e,f){var g,h=b.xhr();if(h.open(b.type,b.url,b.async,b.username,b.password),b.xhrFields)for(g in b.xhrFields)h[g]=b.xhrFields[g];b.mimeType&&h.overrideMimeType&&h.overrideMimeType(b.mimeType),b.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");for(g in e)h.setRequestHeader(g,e[g]);c=function(a){return function(){c&&(c=d=h.onload=h.onerror=h.onabort=h.onreadystatechange=null,"abort"===a?h.abort():"error"===a?"number"!=typeof h.status?f(0,"error"):f(h.status,h.statusText):f(Rb[h.status]||h.status,h.statusText,"text"!==(h.responseType||"text")||"string"!=typeof h.responseText?{binary:h.response}:{text:h.responseText},h.getAllResponseHeaders()))}},h.onload=c(),d=h.onerror=c("error"),void 0!==h.onabort?h.onabort=d:h.onreadystatechange=function(){4===h.readyState&&a.setTimeout(function(){c&&d()})},c=c("abort");try{h.send(b.hasContent&&b.data||null)}catch(i){if(c)throw i}},abort:function(){c&&c()}}}),r.ajaxPrefilter(function(a){a.crossDomain&&(a.contents.script=!1)}),r.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(a){return r.globalEval(a),a}}}),r.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),r.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(e,f){b=r(" + + + diff --git a/IoTGateway/wwwroot/layui/css/modules/layim/html/find.html b/IoTGateway/wwwroot/layui/css/modules/layim/html/find.html new file mode 100644 index 0000000..ff5cab1 --- /dev/null +++ b/IoTGateway/wwwroot/layui/css/modules/layim/html/find.html @@ -0,0 +1,38 @@ + + + + + + + +发现 + + + + + + +
+
此为自定义的【查找】页面,因需求不一,所以官方暂不提供该模版结构与样式,实际使用时,可移至该文件到你的项目中,对页面自行把控。 +
文件所在目录(相对于layui.js):/css/modules/layim/html/find.html
+
+ + + + + + + diff --git a/IoTGateway/wwwroot/layui/css/modules/layim/html/getmsg.json b/IoTGateway/wwwroot/layui/css/modules/layim/html/getmsg.json new file mode 100644 index 0000000..3d9b9d4 --- /dev/null +++ b/IoTGateway/wwwroot/layui/css/modules/layim/html/getmsg.json @@ -0,0 +1,87 @@ +{ + "code": 0, + "pages": 1, + "data": [ + { + "id": 76, + "content": "申请添加你为好友", + "uid": 168, + "from": 166488, + "from_group": 0, + "type": 1, + "remark": "有问题要问", + "href": null, + "read": 1, + "time": "刚刚", + "user": { + "id": 166488, + "avatar": "http://q.qlogo.cn/qqapp/101235792/B704597964F9BD0DB648292D1B09F7E8/100", + "username": "李彦宏", + "sign": null + } + }, + { + "id": 75, + "content": "申请添加你为好友", + "uid": 168, + "from": 347592, + "from_group": 0, + "type": 1, + "remark": "你好啊!", + "href": null, + "read": 1, + "time": "刚刚", + "user": { + "id": 347592, + "avatar": "http://q.qlogo.cn/qqapp/101235792/B78751375E0531675B1272AD994BA875/100", + "username": "麻花疼", + "sign": null + } + }, + { + "id": 62, + "content": "雷军 拒绝了你的好友申请", + "uid": 168, + "from": null, + "from_group": null, + "type": 1, + "remark": null, + "href": null, + "read": 1, + "time": "10天前", + "user": { + "id": null + } + }, + { + "id": 60, + "content": "马小云 已经同意你的好友申请", + "uid": 168, + "from": null, + "from_group": null, + "type": 1, + "remark": null, + "href": null, + "read": 1, + "time": "10天前", + "user": { + "id": null + } + }, + { + "id": 61, + "content": "贤心 已经同意你的好友申请", + "uid": 168, + "from": null, + "from_group": null, + "type": 1, + "remark": null, + "href": null, + "read": 1, + "time": "10天前", + "user": { + "id": null + } + } + ] +} \ No newline at end of file diff --git a/IoTGateway/wwwroot/layui/css/modules/layim/html/msgbox.html b/IoTGateway/wwwroot/layui/css/modules/layim/html/msgbox.html new file mode 100644 index 0000000..0adf002 --- /dev/null +++ b/IoTGateway/wwwroot/layui/css/modules/layim/html/msgbox.html @@ -0,0 +1,208 @@ + + + + + + + +消息盒子 + + + + + + +
    + +
    +
    注意:这些都是模拟数据,实际使用时,需将其中的模拟接口改为你的项目真实接口。 +
    该模版文件所在目录(相对于layui.js):/css/modules/layim/html/msgbox.html
    +
    + + + + + + + + + + diff --git a/IoTGateway/wwwroot/layui/css/modules/layim/layim.css b/IoTGateway/wwwroot/layui/css/modules/layim/layim.css new file mode 100644 index 0000000..69ad58a --- /dev/null +++ b/IoTGateway/wwwroot/layui/css/modules/layim/layim.css @@ -0,0 +1,2 @@ +/** layui-v2.4.5 MIT License By https://www.layui.com */ + html #layuicss-skinlayimcss{display:none;position:absolute;width:1989px}body .layui-layim,body .layui-layim-chat{border:1px solid #D9D9D9;border-color:rgba(0,0,0,.05);background-repeat:no-repeat;background-color:#F6F6F6;color:#333;font-family:\5FAE\8F6F\96C5\9ED1}body .layui-layim-chat{background-size:cover}body .layui-layim .layui-layer-title{height:110px;border-bottom:none;background:0 0}.layui-layim-main{position:relative;top:-98px;left:0}body .layui-layim .layui-layer-content,body .layui-layim-chat .layui-layer-content{overflow:visible}.layui-layim cite,.layui-layim em,.layui-layim-chat cite,.layui-layim-chat em{font-style:normal}.layui-layim-info{height:50px;font-size:0;padding:0 15px}.layui-layim-info *{font-size:14px}.layim-tab-content li h5 *,.layui-layim-info div,.layui-layim-skin li,.layui-layim-tab li,.layui-layim-tool li{display:inline-block;vertical-align:top;*zoom:1;*display:inline}.layim-tab-content li h5 span,.layui-layim-info .layui-layim-user,.layui-layim-list li p,.layui-layim-list li span,.layui-layim-remark{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.layui-layim-info .layui-layim-user{max-width:150px;margin-right:5px;font-size:16px}.layui-layim-status{position:relative;top:2px;line-height:19px;cursor:pointer}.layim-status-online{color:#3FDD86}.layim-status-hide{color:#DD691D}.layim-menu-box{display:none;position:absolute;z-index:100;top:24px;left:-31px;padding:5px 0;width:85px;border:1px solid #E2E2E2;border-radius:2px;background-color:#fff;box-shadow:1px 1px 20px rgba(0,0,0,.1)}.layim-menu-box li{position:relative;line-height:22px;padding-left:30px;font-size:12px}.layim-menu-box li cite{padding-right:5px;font-size:14px}.layim-menu-box li i{display:none;position:absolute;left:8px;top:0;font-weight:700;color:#5FB878}.layim-menu-box .layim-this i{display:block}.layim-menu-box li:hover{background-color:#eee}.layui-layim-remark{position:relative;left:-6px;display:block;width:100%;border:1px solid transparent;margin-top:8px;padding:0 5px;height:26px;line-height:26px;background:0 0;border-radius:2px}.layui-layim-remark:focus,.layui-layim-remark:hover{border:1px solid #d2d2d2;border-color:rgba(0,0,0,.15)}.layui-layim-remark:focus{background-color:#fff}.layui-layim-tab{margin-top:10px;padding:9px 0;font-size:0}.layui-layim-tab li{position:relative;width:33.33%;height:24px;line-height:24px;font-size:22px;text-align:center;color:#666;color:rgba(0,0,0,.6);cursor:pointer}.layim-tab-two li{width:50%}.layui-layim-tab li.layim-this:after{content:'';position:absolute;left:0;bottom:-9px;width:100%;height:3px;background-color:#3FDD86}.layui-layim-tab li.layim-hide{display:none}.layui-layim-tab li:hover{opacity:.8;filter:Alpha(opacity=80)}.layim-tab-content{display:none;padding:10px 0;height:349px;overflow:hidden;background-color:#fff;background-color:rgba(255,255,255,.9)}.layim-tab-content:hover{overflow-y:auto}.layim-tab-content li h5{position:relative;margin-right:15px;padding-left:30px;height:28px;line-height:28px;cursor:pointer;font-size:0;white-space:nowrap;overflow:hidden}.layim-tab-content li h5 *{font-size:14px}.layim-tab-content li h5 span{max-width:125px}.layim-tab-content li h5 i{position:absolute;left:12px;top:0;color:#C9BDBB}.layim-tab-content li h5 em{padding-left:5px;color:#999}.layim-tab-content li h5[lay-type=true] i{top:2px}.layim-tab-content li ul{display:none;margin-bottom:10px}.layui-layim-list li{position:relative;height:42px;padding:5px 15px 5px 60px;font-size:0;cursor:pointer}.layui-layim-list li:hover{background-color:#F2F2F2;background-color:rgba(0,0,0,.05)}.layui-layim-list li.layim-null{height:20px;line-height:20px;padding:0;font-size:14px;color:#999;text-align:center;cursor:default}.layui-layim-list li.layim-null:hover{background:0 0}.layui-layim-list li *{display:inline-block;*display:inline;*zoom:1;vertical-align:top;font-size:14px}.layui-layim-list li span{margin-top:4px;max-width:155px}.layui-layim-list li img{position:absolute;left:15px;top:8px;width:36px;height:36px;border-radius:100%}.layui-layim-list li p{display:block;padding-right:30px;line-height:18px;font-size:12px;color:#999}.layui-layim-list li .layim-msg-status{display:none;position:absolute;right:10px;bottom:7px;padding:0 5px;height:16px;line-height:16px;border-radius:16px;text-align:center;font-size:10px;background-color:#F74C31;color:#fff}.layim-list-gray{-webkit-filter:grayscale(100%);-ms-filter:grayscale(100%);filter:grayscale(100%);filter:gray}.layui-layim-tool{padding:0 10px;font-size:0;background-color:#F6F6F6;border-radius:0 0 2px 2px}.layui-layim-tool li{position:relative;width:48px;height:37px;line-height:40px;text-align:center;font-size:22px;cursor:pointer}.layui-layim-tool li:active{background-color:#e2e2e2}.layui-layim-tool .layim-tool-msgbox{line-height:37px}.layui-layim-tool .layim-tool-find{line-height:38px}.layui-layim-tool .layim-tool-skin{font-size:26px}.layim-tool-msgbox span{display:none;position:absolute;left:12px;top:-12px;height:20px;line-height:20px;padding:0 10px;border-radius:2px;background-color:#33DF83;color:#fff;font-size:12px;-webkit-animation-duration:1s;animation-duration:1s}.layim-tool-msgbox .layer-anim-05{display:block}.layui-layim-search{display:none;position:absolute;bottom:5px;left:5px;height:28px;line-height:28px}.layui-layim-search input{width:210px;padding:0 30px 0 10px;height:30px;line-height:30px;border:none;border-radius:3px;background-color:#ddd}.layui-layim-search label{position:absolute;right:6px;top:4px;font-size:20px;cursor:pointer;color:#333;font-weight:400}.layui-layim-skin{margin:10px 0 0 10px;font-size:0}.layui-layim-skin li{margin:0 10px 10px 0;line-height:60px;text-align:center;background-color:#f6f6f6}.layui-layim-skin li,.layui-layim-skin li img{width:86px;height:60px;cursor:pointer}.layui-layim-skin li img:hover{opacity:.8;filter:Alpha(opacity=80)}.layui-layim-skin li cite{font-size:14px;font-style:normal}body .layui-layim-chat{background-color:#fff}body .layui-layim-chat-list{width:760px}body .layui-layim-chat .layui-layer-title{height:80px;border-bottom:none;background-color:#F8F8F8;background-color:rgba(245,245,245,.7)}body .layui-layim-chat .layui-layer-content{background:0 0}.layim-chat-list li *,.layui-layim-min .layui-layer-content *{display:inline-block;*display:inline;*zoom:1;vertical-align:top;font-size:14px}.layim-chat-list{display:none;position:absolute;z-index:1000;top:-80px;width:200px;height:100%;background-color:#D9D9D9;overflow:hidden;font-size:0}.layim-chat-list:hover{overflow-y:auto}.layim-chat-list li,.layui-layim-min .layui-layer-content{position:relative;margin:5px;padding:5px 30px 5px 5px;line-height:40px;cursor:pointer;border-radius:3px}.layim-chat-list li img,.layui-layim-min .layui-layer-content img{width:40px;height:40px;border-radius:100%}.layui-layim-photos{cursor:crosshair}.layim-chat-list li{white-space:nowrap}.layim-chat-list li span,.layui-layim-min .layui-layer-content span{width:100px;padding-left:10px;font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.layim-chat-list li span cite{color:#999;padding-left:10px}.layim-chat-list li:hover{background-color:#E2E2E2}.layim-chat-list li.layim-this{background-color:#F3F3F3}.layim-chat-list li .layui-icon{display:none;position:absolute;right:5px;top:7px;color:#555;font-size:22px}.layim-chat-list li .layui-icon:hover{color:#c00}.layim-chat-list li:hover .layui-icon{display:inline-block}.layim-chat-system{margin:10px 0;text-align:center}.layim-chat-system span{display:inline-block;line-height:30px;padding:0 15px;border-radius:3px;background-color:#e2e2e2;cursor:default;font-size:14px}.layim-chat{display:none;position:relative;background-color:#fff;background-color:rgba(255,255,255,.9)}.layim-chat-title{position:absolute;top:-80px;height:80px}.layim-chat-other{position:relative;top:15px;left:15px;padding-left:60px;cursor:default}.layim-chat-other img{position:absolute;left:0;top:0;width:50px;height:50px;border-radius:100%}.layim-chat-username{position:relative;top:5px;font-size:18px}.layim-chat-status{margin-top:6px;font-size:14px;color:#999}.layim-chat-group .layim-chat-other .layim-chat-username{cursor:pointer}.layim-chat-group .layim-chat-other .layim-chat-username em{padding:0 10px;color:#999}.layim-chat-main{height:262px;padding:15px 15px 5px;overflow-x:hidden;overflow-y:auto}.layim-chat-main ul li{position:relative;font-size:0;margin-bottom:10px;padding-left:60px;min-height:68px}.layim-chat-text,.layim-chat-user{display:inline-block;*display:inline;*zoom:1;vertical-align:top;font-size:14px}.layim-chat-user{position:absolute;left:3px}.layim-chat-user img{width:40px;height:40px;border-radius:100%}.layim-chat-user cite{position:absolute;left:60px;top:-2px;width:500px;line-height:24px;font-size:12px;white-space:nowrap;color:#999;text-align:left;font-style:normal}.layim-chat-user cite i{padding-left:15px;font-style:normal}.layim-chat-text{position:relative;line-height:22px;margin-top:25px;padding:8px 15px;background-color:#e2e2e2;border-radius:3px;color:#333;word-break:break-all;max-width:462px\9}.layim-chat-text:after{content:'';position:absolute;left:-10px;top:13px;width:0;height:0;border-style:solid dashed dashed;border-color:#e2e2e2 transparent transparent;overflow:hidden;border-width:10px}.layim-chat-text a{color:#33DF83}.layim-chat-text img{max-width:100%;vertical-align:middle}.layim-chat-text .layui-layim-file,.layui-layim-file{display:block;text-align:center}.layim-chat-text .layui-layim-file{color:#333}.layui-layim-file:hover{opacity:.9}.layui-layim-file i{font-size:80px;line-height:80px}.layui-layim-file cite{display:block;line-height:20px;font-size:14px}.layui-layim-audio{text-align:center;cursor:pointer}.layui-layim-audio .layui-icon{position:relative;top:5px;font-size:24px}.layui-layim-audio p{margin-top:3px}.layui-layim-video{width:120px;height:80px;line-height:80px;background-color:#333;text-align:center;border-radius:3px}.layui-layim-video .layui-icon{font-size:36px;cursor:pointer;color:#fff}.layim-chat-main ul .layim-chat-system{min-height:0;padding:0}.layim-chat-main ul .layim-chat-mine{text-align:right;padding-left:0;padding-right:60px}.layim-chat-mine .layim-chat-user{left:auto;right:3px}.layim-chat-mine .layim-chat-user cite{left:auto;right:60px;text-align:right}.layim-chat-mine .layim-chat-user cite i{padding-left:0;padding-right:15px}.layim-chat-mine .layim-chat-text{margin-left:0;text-align:left;background-color:#5FB878;color:#fff}.layim-chat-mine .layim-chat-text:after{left:auto;right:-10px;border-top-color:#5FB878}.layim-chat-mine .layim-chat-text a{color:#fff}.layim-chat-footer{border-top:1px solid #F1F1F1}.layim-chat-tool{position:relative;padding:0 8px;height:38px;line-height:38px;font-size:0}.layim-chat-tool span{position:relative;margin:0 10px;display:inline-block;*display:inline;*zoom:1;vertical-align:top;font-size:24px;cursor:pointer}.layim-chat-tool .layim-tool-log{position:absolute;right:5px;font-size:14px}.layim-tool-log i{position:relative;top:2px;margin-right:5px;font-size:20px;color:#999}.layim-tool-image input{position:absolute;font-size:0;left:0;top:0;width:100%;height:100%;opacity:.01;filter:Alpha(opacity=1);cursor:pointer}body .layui-layim-face{margin:10px 0 0 -18px;border:none;background:0 0}body .layui-layim-face .layui-layer-content{padding:0;background-color:#fff;color:#666;box-shadow:none}.layui-layim-face .layui-layer-TipsG{display:none}.layui-layim-face ul{position:relative;width:372px;padding:10px;border:1px solid #D9D9D9;background-color:#fff;box-shadow:0 0 20px rgba(0,0,0,.2)}.layui-layim-face ul li{cursor:pointer;float:left;border:1px solid #e8e8e8;height:22px;width:26px;overflow:hidden;margin:-1px 0 0 -1px;padding:4px 2px;text-align:center}.layui-layim-face ul li:hover{position:relative;z-index:2;border:1px solid #eb7350;background:#fff9ec}.layim-chat-textarea{margin-left:10px}.layim-chat-textarea textarea{display:block;width:100%;padding:5px 0 0;height:68px;line-height:20px;border:none;overflow:auto;resize:none;background:0 0}.layim-chat-textarea textarea:focus{outline:0}.layim-chat-bottom{position:relative;height:46px}.layim-chat-send{position:absolute;right:15px;top:3px;height:32px;line-height:32px;font-size:0;cursor:pointer}.layim-chat-send span{display:inline-block;*display:inline;*zoom:1;vertical-align:top;font-size:14px;line-height:32px;margin-left:5px;padding:0 20px;background-color:#5FB878;color:#fff;border-radius:3px}.layim-chat-send span:hover{background-color:#69BC80}.layim-chat-send span:active{background-color:#59B573}.layim-chat-send .layim-send-btn{border-radius:3px 0 0 3px}.layim-chat-send .layim-send-set{position:relative;width:30px;height:32px;margin-left:0;padding:0;border-left:1px solid #85C998;border-radius:0 3px 3px 0}.layim-send-set .layui-edge{position:absolute;top:14px;left:9px;border-width:6px;border-top-style:solid;border-top-color:#fff}.layim-chat-send .layim-menu-box{left:auto;right:0;top:33px;width:180px;padding:10px 0}.layim-chat-send .layim-menu-box li{padding-right:15px;line-height:28px}body .layui-layim-min{border:1px solid #D9D9D9}.layui-layim-min .layui-layer-content{margin:0 5px;padding:5px 10px;white-space:nowrap}.layui-layim-close .layui-layer-content span{width:auto;max-width:120px}body .layui-layim-members{margin:25px 0 0 -75px;border:none;background:0 0}body .layui-layim-members .layui-layer-content{padding:0;background:0 0;color:#666;box-shadow:none}.layui-layim-members .layui-layer-TipsG{display:none}.layui-layim-members ul{position:relative;width:578px;height:200px;padding:10px 10px 0;border:1px solid #D9D9D9;background-color:#fff;background-color:rgba(255,255,255,.9);box-shadow:none;overflow:hidden;font-size:0}.layui-layim-members ul:hover{overflow:auto}.layim-add-img,.layim-add-remark,.layui-layim-members li{display:inline-block;*display:inline;*zoom:1;vertical-align:top;font-size:14px}.layui-layim-members li{width:112px;margin:10px 0;text-align:center}.layui-layim-members li a{position:relative;display:inline-block;max-width:100%}.layui-layim-members li a:after{content:'';position:absolute;width:46px;height:46px;left:50%;margin-left:-23px;top:0;border:1px solid #eee;border-color:rgba(0,0,0,.1);border-radius:100%}.layui-layim-members li img{width:48px;height:48px;border-radius:100%}.layui-layim-members li:hover{opacity:.9}.layui-layim-members li a cite{display:block;padding:0 3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}body .layui-layim-contextmenu{margin:70px 0 0 30px;width:200px;padding:5px 0;border:1px solid #ccc;background:#fff;border-radius:0;box-shadow:0 0 5px rgba(0,0,0,.2)}body .layui-layim-contextmenu .layui-layer-content{padding:0;background-color:#fff;color:#333;font-size:14px;box-shadow:none}.layui-layim-contextmenu .layui-layer-TipsG{display:none}.layui-layim-contextmenu li{padding:0 15px 0 35px;cursor:pointer;line-height:30px}.layui-layim-contextmenu li:hover{background-color:#F2F2F2}.layim-add-box{margin:15px;font-size:0}.layim-add-img img,.layim-add-remark p{margin-bottom:10px}.layim-add-img{width:100px;margin-right:20px;text-align:center}.layim-add-img img{width:100px;height:100px}.layim-add-remark{width:280px}.layim-add-remark .layui-select{width:100%;margin-bottom:10px}.layim-add-remark .layui-textarea{height:80px;min-height:80px;resize:none}.layim-tab-content,.layui-layim-face ul,.layui-layim-tab{margin-bottom:0}.layim-tab-content li h5{margin-top:0;margin-bottom:0},.layui-layim-face img{vertical-align:bottom}.layim-chat-other span{color:#444}.layim-chat-other span cite{padding:0 15px;color:#999}.layim-chat-other:hover{text-decoration:none} \ No newline at end of file diff --git a/IoTGateway/wwwroot/layui/css/modules/layim/mobile/layim.css b/IoTGateway/wwwroot/layui/css/modules/layim/mobile/layim.css new file mode 100644 index 0000000..129721b --- /dev/null +++ b/IoTGateway/wwwroot/layui/css/modules/layim/mobile/layim.css @@ -0,0 +1,2 @@ +/** layui-v2.4.5 MIT License By https://www.layui.com */ + .layim-tab-content li h5,.layui-layim-list li{border-bottom:1px solid #f2f2f2;cursor:pointer}html #layuicss-skinlayim-mobilecss{display:none;position:absolute;width:1989px}.layim-tab-content li h5 *,.layui-layim-skin li,.layui-layim-tab li,.layui-layim-tool li{display:inline-block;vertical-align:top;*zoom:1;*display:inline}.layim-tab-content li h5 span,.layui-layim-list li p,.layui-layim-list li span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.layui-layim-tab{position:absolute;bottom:0;left:0;right:0;height:50px;border-top:1px solid #f2f2f2;background-color:#fff}.layui-layim-tab li{position:relative;width:33.33%;height:50px;text-align:center;color:#666;color:rgba(0,0,0,.6);cursor:pointer}.layui-layim-tab li .layui-icon{position:relative;top:7px;font-size:25px}.layui-layim-tab li span{position:relative;bottom:-3px;display:block;font-size:12px}.layui-layim-tab li[lay-type=more] .layui-icon{top:4px;font-size:22px}.layui-layim-tab li.layim-this{color:#3FDD86}.layim-new{display:none;position:absolute;top:5px;left:50%;margin-left:15px;width:10px;height:10px;border-radius:10px;background-color:#F74C31;color:#fff}.layim-list-top .layim-new{position:relative;vertical-align:top;top:10px;left:initial;margin-left:5px}.layim-list-top i.layui-show{display:inline-block!important}.layim-tab-content,.layim-tab-content li ul{display:none}.layui-layim{position:fixed;left:0;right:0;top:50px;bottom:50px;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch}.layim-tab-content li h5{position:relative;padding-left:35px;height:45px;line-height:45px;font-size:0;white-space:nowrap;overflow:hidden}.layim-tab-content li h5 *{font-size:17px}.layim-tab-content li h5 span{max-width:80%}.layim-tab-content li h5 i{position:absolute;left:12px;top:0;color:#C9BDBB}.layim-tab-content li h5 em{padding-left:5px;color:#999}.layim-list-friend,.layim-list-group{background-color:#fff}.layui-layim-list li{position:relative;height:42px;padding:5px 15px 5px 60px;font-size:0}.layui-layim-list li:active{background-color:#F2F2F2;background-color:rgba(0,0,0,.05)}.layui-layim-list li.layim-null{height:20px;line-height:20px;padding:10px 0;color:#999;text-align:center;cursor:default;font-size:14px}.layim-list-history li.layim-null{padding:30px 0;border-bottom:none;background-color:#eee}.layui-layim-list li *{display:inline-block;*display:inline;*zoom:1;vertical-align:top;font-size:17px}.layui-layim-list li span{margin-top:2px;max-width:155px;font-size:17px}.layui-layim-list li img{position:absolute;left:12px;top:8px;width:36px;height:36px;border-radius:100%}.layui-layim-list li p{display:block;padding-right:30px;line-height:18px;font-size:13px;color:#999}.layui-layim-list li .layim-msg-status{display:none;position:absolute;right:10px;bottom:7px;padding:0 5px;height:17px;line-height:17px;border-radius:17px;text-align:center;font-size:10px;background-color:#F74C31;color:#fff}.layim-list-gray{-webkit-filter:grayscale(100%);-ms-filter:grayscale(100%);filter:grayscale(100%);filter:gray}.layim-list-top{background-color:#fff;font-size:17px}.layim-list-top li{position:relative;padding:0 15px 0 50px;line-height:45px;border-bottom:1px solid #f2f2f2;cursor:pointer}.layim-list-top li:last-child{margin-bottom:10px;border-bottom:none}.layim-list-top li .layui-icon{position:absolute;left:12px;top:0;margin-right:10px;color:#36373C;font-size:24px}.layim-list-top li[layim-event=newFriend] .layui-icon{left:15px}.layim-panel,.layim-title{position:fixed;left:0;right:0;top:0}.layim-list-top li[layim-event=group] .layui-icon{font-size:20px}.layim-list-top li[layim-event=about] .layui-icon{font-size:25px}.layim-panel{bottom:0;background-color:#eee;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:.2s;animation-duration:.2s}.layim-title{height:50px;line-height:50px;padding:0 15px;background-color:#36373C;color:#fff;font-size:18px}.layim-chat-status{padding-left:15px;font-size:14px;opacity:.7}.layim-title .layim-chat-back{display:inline-block;vertical-align:middle;position:relative;padding:0 15px;margin-left:-10px;top:0;font-size:24px;cursor:pointer}.layim-chat-detail{position:absolute;right:0;top:0;padding:0 15px;font-size:18px;cursor:pointer}.layim-chat-main,.layim-content{position:fixed;top:50px;left:0;right:0;overflow-y:auto;overflow-x:hidden}.layim-chat-detail:active,.layim-title .layim-chat-back:active{opacity:.8}.layui-layim .layim-title{text-align:left}.layui-layim .layim-title p{padding:0 15px}.layim-content{bottom:0}.layim-chat-main{width:100%;bottom:85px;padding:15px;-webkit-box-sizing:border-box!important;-moz-box-sizing:border-box!important;box-sizing:border-box!important}.layim-chat-main ul{overflow-x:hidden}.layim-chat-main ul li{position:relative;font-size:0;margin-bottom:10px;padding-left:60px;min-height:68px}.layim-chat-text,.layim-chat-user{display:inline-block;*display:inline;*zoom:1;vertical-align:top;font-size:15px}.layim-chat-user{position:absolute;left:3px}.layim-chat-user img{width:40px;height:40px;border-radius:100%}.layim-chat-user cite{position:absolute;left:60px;top:-2px;width:500px;line-height:24px;font-size:12px;white-space:nowrap;color:#999;text-align:left;font-style:normal}.layim-chat-user cite i{padding-left:15px;font-style:normal}.layim-chat-text{position:relative;min-height:22px;line-height:22px;margin-top:25px;padding:8px 15px;background-color:#fff;border-radius:3px;color:#333;word-break:break-all}.layim-chat-text:after{content:'';position:absolute;left:-10px;top:13px;width:0;height:0;border-style:solid dashed dashed;border-color:#fff transparent transparent;overflow:hidden;border-width:10px}.layim-chat-text a{color:#33DF83}.layim-chat-text img{max-width:100%;vertical-align:middle}.layim-chat-text .layui-layim-file,.layui-layim-file{display:block;text-align:center}.layim-chat-text .layui-layim-file{color:#333}.layui-layim-file:active{opacity:.9}.layui-layim-file i{font-size:80px;line-height:80px}.layui-layim-file cite{display:block;line-height:20px;font-size:17px}.layui-layim-audio{text-align:center;cursor:pointer}.layui-layim-audio .layui-icon{position:relative;top:5px;font-size:24px}.layui-layim-audio p{margin-top:3px}.layui-layim-video{width:120px;height:80px;line-height:80px;background-color:#333;text-align:center;border-radius:3px}.layui-layim-video .layui-icon{font-size:36px;cursor:pointer;color:#fff}.layim-chat-main ul .layim-chat-mine{text-align:right;padding-left:0;padding-right:60px}.layim-chat-mine .layim-chat-user{left:auto;right:3px}.layim-chat-mine .layim-chat-user cite{left:auto;right:60px;text-align:right}.layim-chat-mine .layim-chat-user cite i{padding-left:0;padding-right:15px}.layim-chat-mine .layim-chat-text{margin-left:0;text-align:left;background-color:#5FB878;color:#fff}.layim-chat-mine .layim-chat-text:after{left:auto;right:-10px;border-top-color:#5FB878}.layim-chat-mine .layim-chat-text a{color:#fff}.layim-chat-main ul .layim-chat-system{min-height:0;margin:20px 0 5px;padding:0}.layim-chat-system{margin:10px 0;text-align:center}.layim-chat-system span{display:inline-block;line-height:30px;padding:0 15px;border-radius:3px;background-color:#ddd;color:#fff;font-size:14px;cursor:pointer}.layim-chat-footer{position:fixed;bottom:0;left:10px;right:10px;height:80px}.layim-chat-send{display:-webkit-box;display:-webkit-flex;display:flex}.layim-chat-send input{-webkit-box-flex:1;-webkit-flex:1;flex:1;height:40px;padding-left:5px;border:0;background-color:#fff;border-radius:3px}.layim-chat-send button{border-radius:3px;height:40px;padding:0 20px;border:0;margin-left:10px;background-color:#5FB878;color:#fff}.layim-chat-tool{position:relative;width:100%;overflow-x:auto;padding:0;height:38px;line-height:38px;margin-top:3px;font-size:0;white-space:nowrap}.layim-chat-tool span{position:relative;margin:0 15px;display:inline-block;*display:inline;*zoom:1;vertical-align:top;font-size:28px;cursor:pointer}.layim-chat-tool .layim-tool-log{position:absolute;right:5px;font-size:14px}.layim-tool-log i{position:relative;top:2px;margin-right:5px;font-size:20px;color:#999}.layim-tool-image input{position:absolute;font-size:0;left:0;top:0;width:100%;height:100%;opacity:.01;filter:Alpha(opacity=1);cursor:pointer}.layim-layer{position:fixed;bottom:85px;left:10px;right:10px;margin:0 auto}.layui-layim-face{position:relative;max-height:180px;overflow:auto;padding:10px;font-size:0}.layui-layim-face li{cursor:pointer;display:inline-block;vertical-align:bottom;padding:5px 2px;text-align:center;width:10%;-webkit-box-sizing:border-box!important;-moz-box-sizing:border-box!important;box-sizing:border-box!important}.layui-layim-face li img{width:22px;height:22px}.layim-about{font-size:17px}.layim-about .layui-m-layercont{text-align:left}.layim-about .layui-m-layercont p{line-height:30px}.layim-about .layui-m-layercont a{color:#01AAED} \ No newline at end of file diff --git a/IoTGateway/wwwroot/layui/css/modules/layim/skin/1.jpg b/IoTGateway/wwwroot/layui/css/modules/layim/skin/1.jpg new file mode 100644 index 0000000..d9f9926 Binary files /dev/null and b/IoTGateway/wwwroot/layui/css/modules/layim/skin/1.jpg differ diff --git a/IoTGateway/wwwroot/layui/css/modules/layim/skin/2.jpg b/IoTGateway/wwwroot/layui/css/modules/layim/skin/2.jpg new file mode 100644 index 0000000..0bffb50 Binary files /dev/null and b/IoTGateway/wwwroot/layui/css/modules/layim/skin/2.jpg differ diff --git a/IoTGateway/wwwroot/layui/css/modules/layim/skin/3.jpg b/IoTGateway/wwwroot/layui/css/modules/layim/skin/3.jpg new file mode 100644 index 0000000..53ba921 Binary files /dev/null and b/IoTGateway/wwwroot/layui/css/modules/layim/skin/3.jpg differ diff --git a/IoTGateway/wwwroot/layui/css/modules/layim/skin/4.jpg b/IoTGateway/wwwroot/layui/css/modules/layim/skin/4.jpg new file mode 100644 index 0000000..83b4738 Binary files /dev/null and b/IoTGateway/wwwroot/layui/css/modules/layim/skin/4.jpg differ diff --git a/IoTGateway/wwwroot/layui/css/modules/layim/skin/5.jpg b/IoTGateway/wwwroot/layui/css/modules/layim/skin/5.jpg new file mode 100644 index 0000000..8ed74b9 Binary files /dev/null and b/IoTGateway/wwwroot/layui/css/modules/layim/skin/5.jpg differ diff --git a/IoTGateway/wwwroot/layui/css/modules/layim/skin/logo.jpg b/IoTGateway/wwwroot/layui/css/modules/layim/skin/logo.jpg new file mode 100644 index 0000000..26c7358 Binary files /dev/null and b/IoTGateway/wwwroot/layui/css/modules/layim/skin/logo.jpg differ diff --git a/IoTGateway/wwwroot/layui/css/modules/layim/voice/default.mp3 b/IoTGateway/wwwroot/layui/css/modules/layim/voice/default.mp3 new file mode 100644 index 0000000..90013c5 Binary files /dev/null and b/IoTGateway/wwwroot/layui/css/modules/layim/voice/default.mp3 differ diff --git a/IoTGateway/wwwroot/layui/font/iconfont.eot b/IoTGateway/wwwroot/layui/font/iconfont.eot new file mode 100644 index 0000000..622d7ec Binary files /dev/null and b/IoTGateway/wwwroot/layui/font/iconfont.eot differ diff --git a/IoTGateway/wwwroot/layui/font/iconfont.svg b/IoTGateway/wwwroot/layui/font/iconfont.svg new file mode 100644 index 0000000..999ca1f --- /dev/null +++ b/IoTGateway/wwwroot/layui/font/iconfont.svg @@ -0,0 +1,554 @@ + + + + + +Created by iconfont + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/IoTGateway/wwwroot/layui/font/iconfont.ttf b/IoTGateway/wwwroot/layui/font/iconfont.ttf new file mode 100644 index 0000000..06e30f9 Binary files /dev/null and b/IoTGateway/wwwroot/layui/font/iconfont.ttf differ diff --git a/IoTGateway/wwwroot/layui/font/iconfont.woff b/IoTGateway/wwwroot/layui/font/iconfont.woff new file mode 100644 index 0000000..66a1783 Binary files /dev/null and b/IoTGateway/wwwroot/layui/font/iconfont.woff differ diff --git a/IoTGateway/wwwroot/layui/font/iconfont.woff2 b/IoTGateway/wwwroot/layui/font/iconfont.woff2 new file mode 100644 index 0000000..47e9980 Binary files /dev/null and b/IoTGateway/wwwroot/layui/font/iconfont.woff2 differ diff --git a/IoTGateway/wwwroot/layui/images/face/0.gif b/IoTGateway/wwwroot/layui/images/face/0.gif new file mode 100644 index 0000000..a63f0d5 Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/0.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/1.gif b/IoTGateway/wwwroot/layui/images/face/1.gif new file mode 100644 index 0000000..b2b78b2 Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/1.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/10.gif b/IoTGateway/wwwroot/layui/images/face/10.gif new file mode 100644 index 0000000..556c7e3 Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/10.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/11.gif b/IoTGateway/wwwroot/layui/images/face/11.gif new file mode 100644 index 0000000..2bfc58b Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/11.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/12.gif b/IoTGateway/wwwroot/layui/images/face/12.gif new file mode 100644 index 0000000..1c321c7 Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/12.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/13.gif b/IoTGateway/wwwroot/layui/images/face/13.gif new file mode 100644 index 0000000..300bbc2 Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/13.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/14.gif b/IoTGateway/wwwroot/layui/images/face/14.gif new file mode 100644 index 0000000..43b6d0a Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/14.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/15.gif b/IoTGateway/wwwroot/layui/images/face/15.gif new file mode 100644 index 0000000..c9f25fa Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/15.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/16.gif b/IoTGateway/wwwroot/layui/images/face/16.gif new file mode 100644 index 0000000..34f28e4 Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/16.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/17.gif b/IoTGateway/wwwroot/layui/images/face/17.gif new file mode 100644 index 0000000..39cd035 Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/17.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/18.gif b/IoTGateway/wwwroot/layui/images/face/18.gif new file mode 100644 index 0000000..7bce299 Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/18.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/19.gif b/IoTGateway/wwwroot/layui/images/face/19.gif new file mode 100644 index 0000000..adac542 Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/19.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/2.gif b/IoTGateway/wwwroot/layui/images/face/2.gif new file mode 100644 index 0000000..7edbb58 Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/2.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/20.gif b/IoTGateway/wwwroot/layui/images/face/20.gif new file mode 100644 index 0000000..50631a6 Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/20.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/21.gif b/IoTGateway/wwwroot/layui/images/face/21.gif new file mode 100644 index 0000000..b984212 Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/21.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/22.gif b/IoTGateway/wwwroot/layui/images/face/22.gif new file mode 100644 index 0000000..1f0bd8b Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/22.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/23.gif b/IoTGateway/wwwroot/layui/images/face/23.gif new file mode 100644 index 0000000..e05e0f9 Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/23.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/24.gif b/IoTGateway/wwwroot/layui/images/face/24.gif new file mode 100644 index 0000000..f35928a Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/24.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/25.gif b/IoTGateway/wwwroot/layui/images/face/25.gif new file mode 100644 index 0000000..0b4a883 Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/25.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/26.gif b/IoTGateway/wwwroot/layui/images/face/26.gif new file mode 100644 index 0000000..45c4fb5 Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/26.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/27.gif b/IoTGateway/wwwroot/layui/images/face/27.gif new file mode 100644 index 0000000..7a4c013 Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/27.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/28.gif b/IoTGateway/wwwroot/layui/images/face/28.gif new file mode 100644 index 0000000..fc5a0cf Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/28.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/29.gif b/IoTGateway/wwwroot/layui/images/face/29.gif new file mode 100644 index 0000000..5dd7442 Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/29.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/3.gif b/IoTGateway/wwwroot/layui/images/face/3.gif new file mode 100644 index 0000000..86df67b Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/3.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/30.gif b/IoTGateway/wwwroot/layui/images/face/30.gif new file mode 100644 index 0000000..b751f98 Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/30.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/31.gif b/IoTGateway/wwwroot/layui/images/face/31.gif new file mode 100644 index 0000000..c9476d7 Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/31.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/32.gif b/IoTGateway/wwwroot/layui/images/face/32.gif new file mode 100644 index 0000000..9931b06 Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/32.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/33.gif b/IoTGateway/wwwroot/layui/images/face/33.gif new file mode 100644 index 0000000..59111a3 Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/33.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/34.gif b/IoTGateway/wwwroot/layui/images/face/34.gif new file mode 100644 index 0000000..a334548 Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/34.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/35.gif b/IoTGateway/wwwroot/layui/images/face/35.gif new file mode 100644 index 0000000..a932264 Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/35.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/36.gif b/IoTGateway/wwwroot/layui/images/face/36.gif new file mode 100644 index 0000000..6de432a Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/36.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/37.gif b/IoTGateway/wwwroot/layui/images/face/37.gif new file mode 100644 index 0000000..d05f2da Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/37.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/38.gif b/IoTGateway/wwwroot/layui/images/face/38.gif new file mode 100644 index 0000000..8b1c88a Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/38.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/39.gif b/IoTGateway/wwwroot/layui/images/face/39.gif new file mode 100644 index 0000000..38b84a5 Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/39.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/4.gif b/IoTGateway/wwwroot/layui/images/face/4.gif new file mode 100644 index 0000000..d52200c Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/4.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/40.gif b/IoTGateway/wwwroot/layui/images/face/40.gif new file mode 100644 index 0000000..ae42991 Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/40.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/41.gif b/IoTGateway/wwwroot/layui/images/face/41.gif new file mode 100644 index 0000000..b9c715c Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/41.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/42.gif b/IoTGateway/wwwroot/layui/images/face/42.gif new file mode 100644 index 0000000..0eb1434 Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/42.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/43.gif b/IoTGateway/wwwroot/layui/images/face/43.gif new file mode 100644 index 0000000..ac0b700 Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/43.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/44.gif b/IoTGateway/wwwroot/layui/images/face/44.gif new file mode 100644 index 0000000..ad44497 Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/44.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/45.gif b/IoTGateway/wwwroot/layui/images/face/45.gif new file mode 100644 index 0000000..6837fca Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/45.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/46.gif b/IoTGateway/wwwroot/layui/images/face/46.gif new file mode 100644 index 0000000..d62916d Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/46.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/47.gif b/IoTGateway/wwwroot/layui/images/face/47.gif new file mode 100644 index 0000000..58a0836 Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/47.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/48.gif b/IoTGateway/wwwroot/layui/images/face/48.gif new file mode 100644 index 0000000..7ffd161 Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/48.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/49.gif b/IoTGateway/wwwroot/layui/images/face/49.gif new file mode 100644 index 0000000..959b992 Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/49.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/5.gif b/IoTGateway/wwwroot/layui/images/face/5.gif new file mode 100644 index 0000000..4e8b09f Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/5.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/50.gif b/IoTGateway/wwwroot/layui/images/face/50.gif new file mode 100644 index 0000000..6e22e7f Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/50.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/51.gif b/IoTGateway/wwwroot/layui/images/face/51.gif new file mode 100644 index 0000000..ad3f4d3 Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/51.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/52.gif b/IoTGateway/wwwroot/layui/images/face/52.gif new file mode 100644 index 0000000..39f8a22 Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/52.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/53.gif b/IoTGateway/wwwroot/layui/images/face/53.gif new file mode 100644 index 0000000..a181ee7 Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/53.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/54.gif b/IoTGateway/wwwroot/layui/images/face/54.gif new file mode 100644 index 0000000..e289d92 Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/54.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/55.gif b/IoTGateway/wwwroot/layui/images/face/55.gif new file mode 100644 index 0000000..4351083 Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/55.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/56.gif b/IoTGateway/wwwroot/layui/images/face/56.gif new file mode 100644 index 0000000..e0eff22 Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/56.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/57.gif b/IoTGateway/wwwroot/layui/images/face/57.gif new file mode 100644 index 0000000..0bf130f Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/57.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/58.gif b/IoTGateway/wwwroot/layui/images/face/58.gif new file mode 100644 index 0000000..0f06508 Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/58.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/59.gif b/IoTGateway/wwwroot/layui/images/face/59.gif new file mode 100644 index 0000000..7081e4f Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/59.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/6.gif b/IoTGateway/wwwroot/layui/images/face/6.gif new file mode 100644 index 0000000..f7715bf Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/6.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/60.gif b/IoTGateway/wwwroot/layui/images/face/60.gif new file mode 100644 index 0000000..6e15f89 Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/60.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/61.gif b/IoTGateway/wwwroot/layui/images/face/61.gif new file mode 100644 index 0000000..f092d7e Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/61.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/62.gif b/IoTGateway/wwwroot/layui/images/face/62.gif new file mode 100644 index 0000000..7fe4984 Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/62.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/63.gif b/IoTGateway/wwwroot/layui/images/face/63.gif new file mode 100644 index 0000000..cf8e23e Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/63.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/64.gif b/IoTGateway/wwwroot/layui/images/face/64.gif new file mode 100644 index 0000000..a779719 Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/64.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/65.gif b/IoTGateway/wwwroot/layui/images/face/65.gif new file mode 100644 index 0000000..7bb98f2 Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/65.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/66.gif b/IoTGateway/wwwroot/layui/images/face/66.gif new file mode 100644 index 0000000..bb6d077 Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/66.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/67.gif b/IoTGateway/wwwroot/layui/images/face/67.gif new file mode 100644 index 0000000..6e33f7c Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/67.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/68.gif b/IoTGateway/wwwroot/layui/images/face/68.gif new file mode 100644 index 0000000..1a6c400 Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/68.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/69.gif b/IoTGateway/wwwroot/layui/images/face/69.gif new file mode 100644 index 0000000..a02f0b2 Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/69.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/7.gif b/IoTGateway/wwwroot/layui/images/face/7.gif new file mode 100644 index 0000000..e6d4db8 Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/7.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/70.gif b/IoTGateway/wwwroot/layui/images/face/70.gif new file mode 100644 index 0000000..416c5c1 Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/70.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/71.gif b/IoTGateway/wwwroot/layui/images/face/71.gif new file mode 100644 index 0000000..c17d60c Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/71.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/8.gif b/IoTGateway/wwwroot/layui/images/face/8.gif new file mode 100644 index 0000000..66f967b Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/8.gif differ diff --git a/IoTGateway/wwwroot/layui/images/face/9.gif b/IoTGateway/wwwroot/layui/images/face/9.gif new file mode 100644 index 0000000..6044740 Binary files /dev/null and b/IoTGateway/wwwroot/layui/images/face/9.gif differ diff --git a/IoTGateway/wwwroot/layui/lay/modules/all.js b/IoTGateway/wwwroot/layui/lay/modules/all.js new file mode 100644 index 0000000..769686b --- /dev/null +++ b/IoTGateway/wwwroot/layui/lay/modules/all.js @@ -0,0 +1,33 @@ +/** + + @Name:用于加载所有内置模块 + @License:MIT + + */ + +layui.define(function(){ + var mods = [] + ,builtin = layui.cache.builtin; + layui.each(builtin, function(modName){ + (modName === 'all' || modName === 'layui.all') || mods.push(modName); + }); + layui.cache.startTime = new Date().getTime(); + + return mods; +}(), function(exports){ + "use strict"; + + var MOD_NAME = 'all' + + //外部接口 + ,all = { + config: {} + ,time: function(){ + var time = new Date().getTime() - layui.cache.startTime; + delete layui.cache.startTime; + return time; + }() + }; + + exports(MOD_NAME, all); +}); diff --git a/IoTGateway/wwwroot/layui/lay/modules/carousel.js b/IoTGateway/wwwroot/layui/lay/modules/carousel.js new file mode 100644 index 0000000..6f56bde --- /dev/null +++ b/IoTGateway/wwwroot/layui/lay/modules/carousel.js @@ -0,0 +1,314 @@ +/** + + @Name:carousel 轮播模块 + @License:MIT + + */ + +layui.define('jquery', function(exports){ + "use strict"; + + var $ = layui.$ + ,hint = layui.hint() + ,device = layui.device() + + //外部接口 + ,carousel = { + config: {} //全局配置项 + + //设置全局项 + ,set: function(options){ + var that = this; + that.config = $.extend({}, that.config, options); + return that; + } + + //事件 + ,on: function(events, callback){ + return layui.onevent.call(this, MOD_NAME, events, callback); + } + } + + //字符常量 + ,MOD_NAME = 'carousel', ELEM = '.layui-carousel', THIS = 'layui-this', SHOW = 'layui-show', HIDE = 'layui-hide', DISABLED = 'layui-disabled' + + ,ELEM_ITEM = '>*[carousel-item]>*', ELEM_LEFT = 'layui-carousel-left', ELEM_RIGHT = 'layui-carousel-right', ELEM_PREV = 'layui-carousel-prev', ELEM_NEXT = 'layui-carousel-next', ELEM_ARROW = 'layui-carousel-arrow', ELEM_IND = 'layui-carousel-ind' + + //构造器 + ,Class = function(options){ + var that = this; + that.config = $.extend({}, that.config, carousel.config, options); + that.render(); + }; + + //默认配置 + Class.prototype.config = { + width: '600px' + ,height: '280px' + ,full: false //是否全屏 + ,arrow: 'hover' //切换箭头默认显示状态:hover/always/none + ,indicator: 'inside' //指示器位置:inside/outside/none + ,autoplay: true //是否自动切换 + ,interval: 3000 //自动切换的时间间隔,不能低于800ms + ,anim: '' //动画类型:default/updown/fade + ,trigger: 'click' //指示器的触发方式:click/hover + ,index: 0 //初始开始的索引 + }; + + //轮播渲染 + Class.prototype.render = function(){ + var that = this + ,options = that.config; + + options.elem = $(options.elem); + if(!options.elem[0]) return; + that.elemItem = options.elem.find(ELEM_ITEM); + + if(options.index < 0) options.index = 0; + if(options.index >= that.elemItem.length) options.index = that.elemItem.length - 1; + if(options.interval < 800) options.interval = 800; + + //是否全屏模式 + if(options.full){ + options.elem.css({ + position: 'fixed' + ,width: '100%' + ,height: '100%' + ,zIndex: 9999 + }); + } else { + options.elem.css({ + width: options.width + ,height: options.height + }); + } + + options.elem.attr('lay-anim', options.anim); + + //初始焦点状态 + that.elemItem.eq(options.index).addClass(THIS); + + //指示器等动作 + if(that.elemItem.length <= 1) return; + that.indicator(); + that.arrow(); + that.autoplay(); + that.events(); + }; + + //重置轮播 + Class.prototype.reload = function(options){ + var that = this; + clearInterval(that.timer); + that.config = $.extend({}, that.config, options); + that.render(); + }; + + //获取上一个等待条目的索引 + Class.prototype.prevIndex = function(){ + var that = this + ,options = that.config; + + var prevIndex = options.index - 1; + if(prevIndex < 0){ + prevIndex = that.elemItem.length - 1; + } + return prevIndex; + }; + + //获取下一个等待条目的索引 + Class.prototype.nextIndex = function(){ + var that = this + ,options = that.config; + + var nextIndex = options.index + 1; + if(nextIndex >= that.elemItem.length){ + nextIndex = 0; + } + return nextIndex; + }; + + //索引递增 + Class.prototype.addIndex = function(num){ + var that = this + ,options = that.config; + + num = num || 1; + options.index = options.index + num; + + //index不能超过轮播总数量 + if(options.index >= that.elemItem.length){ + options.index = 0; + } + }; + + //索引递减 + Class.prototype.subIndex = function(num){ + var that = this + ,options = that.config; + + num = num || 1; + options.index = options.index - num; + + //index不能超过轮播总数量 + if(options.index < 0){ + options.index = that.elemItem.length - 1; + } + }; + + //自动轮播 + Class.prototype.autoplay = function(){ + var that = this + ,options = that.config; + + if(!options.autoplay) return; + clearInterval(that.timer); + + that.timer = setInterval(function(){ + that.slide(); + }, options.interval); + }; + + //箭头 + Class.prototype.arrow = function(){ + var that = this + ,options = that.config; + + //模板 + var tplArrow = $([ + '' + ,'' + ].join('')); + + //预设基础属性 + options.elem.attr('lay-arrow', options.arrow); + + //避免重复插入 + if(options.elem.find('.'+ELEM_ARROW)[0]){ + options.elem.find('.'+ELEM_ARROW).remove(); + }; + options.elem.append(tplArrow); + + //事件 + tplArrow.on('click', function(){ + var othis = $(this) + ,type = othis.attr('lay-type') + that.slide(type); + }); + }; + + //指示器 + Class.prototype.indicator = function(){ + var that = this + ,options = that.config; + + //模板 + var tplInd = that.elemInd = $(['
      ' + ,function(){ + var li = []; + layui.each(that.elemItem, function(index){ + li.push(''); + }); + return li.join(''); + }() + ,'
    '].join('')); + + //预设基础属性 + options.elem.attr('lay-indicator', options.indicator); + + //避免重复插入 + if(options.elem.find('.'+ELEM_IND)[0]){ + options.elem.find('.'+ELEM_IND).remove(); + }; + options.elem.append(tplInd); + + if(options.anim === 'updown'){ + tplInd.css('margin-top', -(tplInd.height()/2)); + } + + //事件 + tplInd.find('li').on(options.trigger === 'hover' ? 'mouseover' : options.trigger, function(){ + var othis = $(this) + ,index = othis.index(); + if(index > options.index){ + that.slide('add', index - options.index); + } else if(index < options.index){ + that.slide('sub', options.index - index); + } + }); + }; + + //滑动切换 + Class.prototype.slide = function(type, num){ + var that = this + ,elemItem = that.elemItem + ,options = that.config + ,thisIndex = options.index + ,filter = options.elem.attr('lay-filter'); + + if(that.haveSlide) return; + + //滑动方向 + if(type === 'sub'){ + that.subIndex(num); + elemItem.eq(options.index).addClass(ELEM_PREV); + setTimeout(function(){ + elemItem.eq(thisIndex).addClass(ELEM_RIGHT); + elemItem.eq(options.index).addClass(ELEM_RIGHT); + }, 50); + } else { //默认递增滑 + that.addIndex(num); + elemItem.eq(options.index).addClass(ELEM_NEXT); + setTimeout(function(){ + elemItem.eq(thisIndex).addClass(ELEM_LEFT); + elemItem.eq(options.index).addClass(ELEM_LEFT); + }, 50); + }; + + //移除过度类 + setTimeout(function(){ + elemItem.removeClass(THIS + ' ' + ELEM_PREV + ' ' + ELEM_NEXT + ' ' + ELEM_LEFT + ' ' + ELEM_RIGHT); + elemItem.eq(options.index).addClass(THIS); + that.haveSlide = false; //解锁 + }, 300); + + //指示器焦点 + that.elemInd.find('li').eq(options.index).addClass(THIS) + .siblings().removeClass(THIS); + + that.haveSlide = true; + + layui.event.call(this, MOD_NAME, 'change('+ filter +')', { + index: options.index + ,prevIndex: thisIndex + ,item: elemItem.eq(options.index) + }); + }; + + //事件处理 + Class.prototype.events = function(){ + var that = this + ,options = that.config; + + if(options.elem.data('haveEvents')) return; + + //移入移出容器 + options.elem.on('mouseenter', function(){ + clearInterval(that.timer); + }).on('mouseleave', function(){ + that.autoplay(); + }); + + options.elem.data('haveEvents', true); + }; + + //核心入口 + carousel.render = function(options){ + var inst = new Class(options); + return inst; + }; + + exports(MOD_NAME, carousel); +}); + + diff --git a/IoTGateway/wwwroot/layui/lay/modules/code.js b/IoTGateway/wwwroot/layui/lay/modules/code.js new file mode 100644 index 0000000..87d0d48 --- /dev/null +++ b/IoTGateway/wwwroot/layui/lay/modules/code.js @@ -0,0 +1,60 @@ +/** + + @Name:code 代码修饰器 + @License:MIT + + */ + +layui.define('jquery', function(exports){ + "use strict"; + + var $ = layui.$; + + exports('code', function(options){ + var elems = []; + options = options || {}; + options.elem = $(options.elem||'.layui-code'); + options.lang = 'lang' in options ? options.lang : 'code'; + + options.elem.each(function(){ + elems.push(this); + }); + + layui.each(elems.reverse(), function(index, item){ + var othis = $(item), html = othis.html(); + + //转义HTML标签 + if(othis.attr('lay-encode') || options.encode){ + html = html.replace(/&(?!#?[a-zA-Z0-9]+;)/g, '&') + .replace(//g, '>').replace(/'/g, ''').replace(/"/g, '"') + } + + othis.html('
    1. ' + html.replace(/[\r\t\n]+/g, '
    2. ') + '
    ') + + if(!othis.find('>.layui-code-h3')[0]){ + othis.prepend('

    '+ (othis.attr('lay-title')||options.title||'</>') + ''+ (othis.attr('lay-lang')||options.lang||'') +'' + '

    '); + } + + var ol = othis.find('>.layui-code-ol'); + othis.addClass('layui-box layui-code-view'); + + //识别皮肤 + if(othis.attr('lay-skin') || options.skin){ + othis.addClass('layui-code-' +(othis.attr('lay-skin') || options.skin)); + } + + //按行数适配左边距 + if((ol.find('li').length/100|0) > 0){ + ol.css('margin-left', (ol.find('li').length/100|0) + 'px'); + } + + //设置最大高度 + if(othis.attr('lay-height') || options.height){ + ol.css('max-height', othis.attr('lay-height') || options.height); + } + + }); + + }); +}).addcss('modules/code.css?v=1', 'skincodecss'); + diff --git a/IoTGateway/wwwroot/layui/lay/modules/colorpicker.js b/IoTGateway/wwwroot/layui/lay/modules/colorpicker.js new file mode 100644 index 0000000..7e22fa3 --- /dev/null +++ b/IoTGateway/wwwroot/layui/lay/modules/colorpicker.js @@ -0,0 +1,720 @@ +/** + + @Title: colorpicker 颜色选择器组件 + @License:MIT + + */ + +layui.define('jquery', function(exports){ + "use strict"; + + var $ = layui.jquery + + //外部接口 + ,colorpicker = { + config: {} + ,index: layui.colorpicker ? (layui.colorpicker.index + 10000) : 0 + + //设置全局项 + ,set: function(options){ + var that = this; + that.config = $.extend({}, that.config, options); + return that; + } + + //事件 + ,on: function(events, callback){ + return layui.onevent.call(this, 'colorpicker', events, callback); + } + } + + //操作当前实例 + ,thisColorPicker = function(){ + var that = this + ,options = that.config; + + return { + config: options + } + } + + //字符常量 + ,MOD_NAME = 'colorpicker', SHOW = 'layui-show', THIS = 'layui-this', ELEM = 'layui-colorpicker' + + ,ELEM_MAIN = '.layui-colorpicker-main', ICON_PICKER_DOWN = 'layui-icon-down', ICON_PICKER_CLOSE = 'layui-icon-close' + ,PICKER_TRIG_SPAN = 'layui-colorpicker-trigger-span', PICKER_TRIG_I = 'layui-colorpicker-trigger-i', PICKER_SIDE = 'layui-colorpicker-side', PICKER_SIDE_SLIDER = 'layui-colorpicker-side-slider' + ,PICKER_BASIS = 'layui-colorpicker-basis', PICKER_ALPHA_BG = 'layui-colorpicker-alpha-bgcolor', PICKER_ALPHA_SLIDER = 'layui-colorpicker-alpha-slider', PICKER_BASIS_CUR = 'layui-colorpicker-basis-cursor', PICKER_INPUT = 'layui-colorpicker-main-input' + + //RGB转HSB + ,RGBToHSB = function(rgb){ + var hsb = {h:0, s:0, b:0}; + var min = Math.min(rgb.r, rgb.g, rgb.b); + var max = Math.max(rgb.r, rgb.g, rgb.b); + var delta = max - min; + hsb.b = max; + hsb.s = max != 0 ? 255*delta/max : 0; + if(hsb.s != 0){ + if(rgb.r == max){ + hsb.h = (rgb.g - rgb.b) / delta; + }else if(rgb.g == max){ + hsb.h = 2 + (rgb.b - rgb.r) / delta; + }else{ + hsb.h = 4 + (rgb.r - rgb.g) / delta; + } + }else{ + hsb.h = -1; + }; + if(max == min){ + hsb.h = 0; + }; + hsb.h *= 60; + if(hsb.h < 0) { + hsb.h += 360; + }; + hsb.s *= 100/255; + hsb.b *= 100/255; + return hsb; + } + + //HEX转HSB + ,HEXToHSB = function(hex){ + var hex = hex.indexOf('#') > -1 ? hex.substring(1) : hex; + if(hex.length == 3){ + var num = hex.split(""); + hex = num[0]+num[0]+num[1]+num[1]+num[2]+num[2] + }; + hex = parseInt(hex, 16); + var rgb = {r:hex >> 16, g:(hex & 0x00FF00) >> 8, b:(hex & 0x0000FF)}; + return RGBToHSB(rgb); + } + + //HSB转RGB + ,HSBToRGB = function(hsb){ + var rgb = {}; + var h = hsb.h; + var s = hsb.s*255/100; + var b = hsb.b*255/100; + if(s == 0){ + rgb.r = rgb.g = rgb.b = b; + }else{ + var t1 = b; + var t2 = (255 - s) * b /255; + var t3 = (t1 - t2) * (h % 60) /60; + if(h == 360) h = 0; + if(h < 60) {rgb.r=t1; rgb.b=t2; rgb.g=t2+t3} + else if(h < 120) {rgb.g=t1; rgb.b=t2; rgb.r=t1-t3} + else if(h < 180) {rgb.g=t1; rgb.r=t2; rgb.b=t2+t3} + else if(h < 240) {rgb.b=t1; rgb.r=t2; rgb.g=t1-t3} + else if(h < 300) {rgb.b=t1; rgb.g=t2; rgb.r=t2+t3} + else if(h < 360) {rgb.r=t1; rgb.g=t2; rgb.b=t1-t3} + else {rgb.r=0; rgb.g=0; rgb.b=0} + } + return {r:Math.round(rgb.r), g:Math.round(rgb.g), b:Math.round(rgb.b)}; + } + + //HSB转HEX + ,HSBToHEX = function(hsb){ + var rgb = HSBToRGB(hsb); + var hex = [ + rgb.r.toString(16) + ,rgb.g.toString(16) + ,rgb.b.toString(16) + ]; + $.each(hex, function(nr, val){ + if(val.length == 1){ + hex[nr] = '0' + val; + } + }); + return hex.join(''); + } + + //转化成所需rgb格式 + ,RGBSTo = function(rgbs){ + var regexp = /[0-9]{1,3}/g; + var re = rgbs.match(regexp) || []; + return {r:re[0], g:re[1], b:re[2]}; + } + + ,$win = $(window) + ,$doc = $(document) + + //构造器 + ,Class = function(options){ + var that = this; + that.index = ++colorpicker.index; + that.config = $.extend({}, that.config, colorpicker.config, options); + that.render(); + }; + + //默认配置 + Class.prototype.config = { + color: '' //默认颜色,默认没有 + ,size: null //选择器大小 + ,alpha: false //是否开启透明度 + ,format: 'hex' //颜色显示/输入格式,可选 rgb,hex + ,predefine: false //预定义颜色是否开启 + ,colors: [ //默认预定义颜色列表 + '#009688', '#5FB878', '#1E9FFF', '#FF5722', '#FFB800', '#01AAED', '#999', '#c00', '#ff8c00','#ffd700' + ,'#90ee90', '#00ced1', '#1e90ff', '#c71585', 'rgb(0, 186, 189)', 'rgb(255, 120, 0)', 'rgb(250, 212, 0)', '#393D49', 'rgba(0,0,0,.5)', 'rgba(255, 69, 0, 0.68)', 'rgba(144, 240, 144, 0.5)', 'rgba(31, 147, 255, 0.73)' + ] + }; + + //初始颜色选择框 + Class.prototype.render = function(){ + var that = this + ,options = that.config + + //颜色选择框对象 + ,elemColorBox = $(['
    ' + ,'' + ,'' + ,'' + ,'' + ,'' + ,'
    '].join('')) + + //初始化颜色选择框 + var othis = $(options.elem); + options.size && elemColorBox.addClass('layui-colorpicker-'+ options.size); //初始化颜色选择框尺寸 + + //插入颜色选择框 + othis.addClass('layui-inline').html( + that.elemColorBox = elemColorBox + ); + + //获取背景色值 + that.color = that.elemColorBox.find('.'+ PICKER_TRIG_SPAN)[0].style.background; + + //相关事件 + that.events(); + }; + + //渲染颜色选择器 + Class.prototype.renderPicker = function(){ + var that = this + ,options = that.config + ,elemColorBox = that.elemColorBox[0] + + //颜色选择器对象 + ,elemPicker = that.elemPicker = $(['
    ' + //颜色面板 + ,'
    ' + ,'
    ' + ,'
    ' + ,'
    ' + ,'
    ' + ,'
    ' + ,'
    ' + ,'
    ' + ,'
    ' + ,'
    ' + + //透明度条块 + ,'
    ' + ,'
    ' + ,'
    ' + ,'
    ' + ,'
    ' + + //预设颜色列表 + ,function(){ + if(options.predefine){ + var list = ['
    ']; + layui.each(options.colors, function(i, v){ + list.push(['
    ' + ,'
    ' + ,'
    '].join('')); + }); + list.push('
    '); + return list.join(''); + } else { + return ''; + } + }() + + //底部表单元素区域 + ,'
    ' + ,'
    ' + ,'' + ,'
    ' + ,'
    ' + ,'' + ,'' + ,'' + ,'
    '].join('')) + + ,elemColorBoxSpan = that.elemColorBox.find('.' + PICKER_TRIG_SPAN)[0]; + + //如果当前点击的颜色盒子已经存在选择器,则关闭 + if($(ELEM_MAIN)[0] && $(ELEM_MAIN).data('index') == that.index){ + that.removePicker(Class.thisElemInd); + } else { //插入颜色选择器 + that.removePicker(Class.thisElemInd); + $('body').append(elemPicker); + } + + Class.thisElemInd = that.index; //记录最新打开的选择器索引 + Class.thisColor = elemColorBox.style.background //记录最新打开的选择器颜色选中值 + + that.position(); + that.pickerEvents(); + }; + + //颜色选择器移除 + Class.prototype.removePicker = function(index){ + var that = this + ,options = that.config; + $('#layui-colorpicker'+ (index || that.index)).remove(); + return that; + }; + + //定位算法 + Class.prototype.position = function(){ + var that = this + ,options = that.config + ,elem = that.bindElem || that.elemColorBox[0] + ,elemPicker = that.elemPicker[0] + ,rect = elem.getBoundingClientRect() //绑定元素的坐标 + ,elemWidth = elemPicker.offsetWidth //控件的宽度 + ,elemHeight = elemPicker.offsetHeight //控件的高度 + + //滚动条高度 + ,scrollArea = function(type){ + type = type ? 'scrollLeft' : 'scrollTop'; + return document.body[type] | document.documentElement[type]; + } + ,winArea = function(type){ + return document.documentElement[type ? 'clientWidth' : 'clientHeight'] + }, margin = 5, left = rect.left, top = rect.bottom; + + left = left - (elemWidth - elem.offsetWidth)/2; + top = top + margin + + //如果右侧超出边界 + if(left + elemWidth + margin > winArea('width')){ + left = winArea('width') - elemWidth - margin; + } else if(left < margin){ //如果左侧超出边界 + left = margin; + } + + //如果底部超出边界 + if(top + elemHeight + margin > winArea()){ + top = rect.top > elemHeight //顶部是否有足够区域显示完全 + ? rect.top - elemHeight + : winArea() - elemHeight; + top = top - margin*2; + } + + if(options.position){ + elemPicker.style.position = options.position; + } + elemPicker.style.left = left + (options.position === 'fixed' ? 0 : scrollArea(1)) + 'px'; + elemPicker.style.top = top + (options.position === 'fixed' ? 0 : scrollArea()) + 'px'; + }; + + //颜色选择器赋值 + Class.prototype.val = function(){ + var that = this + ,options = that.config + + ,elemColorBox = that.elemColorBox.find('.' + PICKER_TRIG_SPAN) + ,elemPickerInput = that.elemPicker.find('.' + PICKER_INPUT) + ,e = elemColorBox[0] + ,bgcolor = e.style.backgroundColor; + + //判断是否有背景颜色 + if(bgcolor){ + + //转化成hsb格式 + var hsb = RGBToHSB(RGBSTo(bgcolor)) + ,type = elemColorBox.attr('lay-type'); + + //同步滑块的位置及颜色选择器的选择 + that.select(hsb.h, hsb.s, hsb.b); + + //如果格式要求为rgb + if(type === 'torgb'){ + elemPickerInput.find('input').val(bgcolor); + }; + + //如果格式要求为rgba + if(type === 'rgba'){ + var rgb = RGBSTo(bgcolor); + + //如果开启透明度而没有设置,则给默认值 + if((bgcolor.match(/[0-9]{1,3}/g) || []).length == 3){ + elemPickerInput.find('input').val('rgba('+ rgb.r +', '+ rgb.g +', '+ rgb.b +', 1)'); + that.elemPicker.find('.'+ PICKER_ALPHA_SLIDER).css("left", 280); + } else { + elemPickerInput.find('input').val(bgcolor); + var left = bgcolor.slice(bgcolor.lastIndexOf(",") + 1, bgcolor.length - 1) * 280; + that.elemPicker.find('.'+ PICKER_ALPHA_SLIDER).css("left", left); + }; + + //设置span背景色 + that.elemPicker.find('.'+ PICKER_ALPHA_BG)[0].style.background = 'linear-gradient(to right, rgba('+ rgb.r +', '+ rgb.g +', '+ rgb.b +', 0), rgb('+ rgb.r +', '+ rgb.g +', '+ rgb.b +'))'; + }; + + }else{ + //如果没有背景颜色则默认到最初始的状态 + that.select(0,100,100); + elemPickerInput.find('input').val(""); + that.elemPicker.find('.'+ PICKER_ALPHA_BG)[0].style.background = ''; + that.elemPicker.find('.'+ PICKER_ALPHA_SLIDER).css("left", 280); + } + }; + + //颜色选择器滑动 / 点击 + Class.prototype.side = function(){ + var that = this + ,options = that.config + + ,span = that.elemColorBox.find('.' + PICKER_TRIG_SPAN) + ,type = span.attr('lay-type') + + ,side = that.elemPicker.find('.' + PICKER_SIDE) + ,slider = that.elemPicker.find('.' + PICKER_SIDE_SLIDER) + ,basis = that.elemPicker.find('.' + PICKER_BASIS) + ,choose = that.elemPicker.find('.' + PICKER_BASIS_CUR) + ,alphacolor = that.elemPicker.find('.' + PICKER_ALPHA_BG) + ,alphaslider = that.elemPicker.find('.' + PICKER_ALPHA_SLIDER) + + ,_h = slider[0].offsetTop/180*360 + ,_b = 100 - (choose[0].offsetTop + 3)/180*100 + ,_s = (choose[0].offsetLeft + 3)/260*100 + ,_a = Math.round(alphaslider[0].offsetLeft/280*100)/100 + + ,i = that.elemColorBox.find('.' + PICKER_TRIG_I) + ,pre = that.elemPicker.find('.layui-colorpicker-pre').children('div') + + ,change = function(x,y,z,a){ + that.select(x, y, z); + var rgb = HSBToRGB({h:x, s:y, b:z}); + i.addClass(ICON_PICKER_DOWN).removeClass(ICON_PICKER_CLOSE); + span[0].style.background = 'rgb('+ rgb.r +', '+ rgb.g +', '+ rgb.b +')'; + + if(type === 'torgb'){ + that.elemPicker.find('.' + PICKER_INPUT).find('input').val('rgb('+ rgb.r +', '+ rgb.g +', '+ rgb.b +')'); + }; + + if(type === 'rgba'){ + var left = 0; + left = a * 280; + alphaslider.css("left", left); + that.elemPicker.find('.' + PICKER_INPUT).find('input').val('rgba('+ rgb.r +', '+ rgb.g +', '+ rgb.b +', '+ a +')'); + span[0].style.background = 'rgba('+ rgb.r +', '+ rgb.g +', '+ rgb.b +', '+ a +')'; + alphacolor[0].style.background = 'linear-gradient(to right, rgba('+ rgb.r +', '+ rgb.g +', '+ rgb.b +', 0), rgb('+ rgb.r +', '+ rgb.g +', '+ rgb.b +'))' + }; + + //回调更改的颜色 + options.change && options.change(that.elemPicker.find('.' + PICKER_INPUT).find('input').val()); + } + + //拖拽元素 + ,elemMove = $(['
    maxh)top = maxh; + var h = top/180*360; + _h = h; + change(h, _s, _b, _a); + e.preventDefault(); + }; + + createMoveElem(move); + e.preventDefault(); + }); + + side.on('click', function(e){ + var top = e.clientY - $(this).offset().top; + if(top < 0)top = 0; + if(top > this.offsetHeight)top = this.offsetHeight; + var h = top/180*360; + _h = h; + change(h, _s, _b, _a); + e.preventDefault(); + }); + + //中间小圆点颜色选择 + choose.on('mousedown', function(e){ + var oldtop = this.offsetTop + ,oldleft = this.offsetLeft + ,oldy = e.clientY + ,oldx = e.clientX; + var move = function(e){ + var top = oldtop + (e.clientY - oldy) + ,left = oldleft + (e.clientX - oldx) + ,maxh = basis[0].offsetHeight - 3 + ,maxw = basis[0].offsetWidth - 3; + if(top < -3)top = -3; + if(top > maxh)top = maxh; + if(left < -3)left = -3; + if(left > maxw)left = maxw; + var s = (left + 3)/260*100 + ,b = 100 - (top + 3)/180*100; + _b = b; + _s = s; + change(_h, s, b, _a); + e.preventDefault(); + }; + layui.stope(e); + createMoveElem(move); + e.preventDefault(); + }); + + basis.on('mousedown', function(e){ + var top = e.clientY - $(this).offset().top - 3 + $win.scrollTop() + ,left = e.clientX - $(this).offset().left - 3 + $win.scrollLeft() + if(top < -3)top = -3; + if(top > this.offsetHeight - 3)top = this.offsetHeight - 3; + if(left < -3)left = -3; + if(left > this.offsetWidth - 3)left = this.offsetWidth - 3; + var s = (left + 3)/260*100 + ,b = 100 - (top + 3)/180*100; + _b = b; + _s = s; + change(_h, s, b, _a); + e.preventDefault(); + choose.trigger(e, 'mousedown'); + }); + + //底部透明度选择 + alphaslider.on('mousedown', function(e){ + var oldleft = this.offsetLeft + ,oldx = e.clientX; + var move = function(e){ + var left = oldleft + (e.clientX - oldx) + ,maxw = alphacolor[0].offsetWidth; + if(left < 0)left = 0; + if(left > maxw)left = maxw; + var a = Math.round(left /280*100) /100; + _a = a; + change(_h, _s, _b, a); + e.preventDefault(); + }; + + createMoveElem(move); + e.preventDefault(); + }); + alphacolor.on('click', function(e){ + var left = e.clientX - $(this).offset().left + if(left < 0)left = 0; + if(left > this.offsetWidth)left = this.offsetWidth; + var a = Math.round(left /280*100) /100; + _a = a; + change(_h, _s, _b, a); + e.preventDefault(); + }); + + //预定义颜色选择 + pre.each(function(){ + $(this).on('click', function(){ + $(this).parent('.layui-colorpicker-pre').addClass('selected').siblings().removeClass('selected'); + var color = this.style.backgroundColor + ,hsb = RGBToHSB(RGBSTo(color)) + ,a = color.slice(color.lastIndexOf(",") + 1, color.length - 1),left; + _h = hsb.h; + _s = hsb.s; + _b = hsb.b; + if((color.match(/[0-9]{1,3}/g) || []).length == 3) a = 1; + _a = a; + left = a * 280; + change(hsb.h, hsb.s, hsb.b, a); + }) + }); + }; + + //颜色选择器hsb转换 + Class.prototype.select = function(h, s, b, type){ + var that = this + ,options = that.config + ,hex = HSBToHEX({h:h, s:100, b:100}) + ,color = HSBToHEX({h:h, s:s, b:b}) + ,sidetop = h/360*180 + ,top = 180 - b/100*180 - 3 + ,left = s/100*260 - 3; + + that.elemPicker.find('.' + PICKER_SIDE_SLIDER).css("top", sidetop); //滑块的top + that.elemPicker.find('.' + PICKER_BASIS)[0].style.background = '#' + hex; //颜色选择器的背景 + + //选择器的top left + that.elemPicker.find('.' + PICKER_BASIS_CUR).css({ + "top": top + ,"left": left + }); + + if(type === 'change') return; + + //选中的颜色 + that.elemPicker.find('.' + PICKER_INPUT).find('input').val('#' + color); + }; + + Class.prototype.pickerEvents = function(){ + var that = this + ,options = that.config + + ,elemColorBoxSpan = that.elemColorBox.find('.' + PICKER_TRIG_SPAN) //颜色盒子 + ,elemPickerInput = that.elemPicker.find('.' + PICKER_INPUT + ' input') //颜色选择器表单 + + ,pickerEvents = { + //清空 + clear: function(othis){ + elemColorBoxSpan[0].style.background =''; + that.elemColorBox.find('.' + PICKER_TRIG_I).removeClass(ICON_PICKER_DOWN).addClass(ICON_PICKER_CLOSE); + that.color = ''; + + options.done && options.done(''); + that.removePicker(); + } + + //确认 + ,confirm: function(othis, change){ + var value = elemPickerInput.val() + ,colorValue = value + ,hsb = {}; + + if(value.indexOf(',') > -1){ + hsb = RGBToHSB(RGBSTo(value)); + that.select(hsb.h, hsb.s, hsb.b); + elemColorBoxSpan[0].style.background = (colorValue = '#' + HSBToHEX(hsb)); + + if((value.match(/[0-9]{1,3}/g) || []).length > 3 && elemColorBoxSpan.attr('lay-type') === 'rgba'){ + var left = value.slice(value.lastIndexOf(",") + 1, value.length - 1) * 280; + that.elemPicker.find('.' + PICKER_ALPHA_SLIDER).css("left", left); + elemColorBoxSpan[0].style.background = value; + colorValue = value; + }; + } else { + hsb = HEXToHSB(value); + elemColorBoxSpan[0].style.background = (colorValue = '#' + HSBToHEX(hsb)); + that.elemColorBox.find('.' + PICKER_TRIG_I).removeClass(ICON_PICKER_CLOSE).addClass(ICON_PICKER_DOWN); + }; + + if(change === 'change'){ + that.select(hsb.h, hsb.s, hsb.b, change); + options.change && options.change(colorValue); + return; + } + that.color = value; + + options.done && options.done(value); + that.removePicker(); + } + }; + + //选择器面板点击事件 + that.elemPicker.on('click', '*[colorpicker-events]', function(){ + var othis = $(this) + ,attrEvent = othis.attr('colorpicker-events'); + pickerEvents[attrEvent] && pickerEvents[attrEvent].call(this, othis); + }); + + //输入框事件 + elemPickerInput.on('keyup', function(e){ + var othis = $(this) + pickerEvents.confirm.call(this, othis, e.keyCode === 13 ? null : 'change'); + }); + } + + //颜色选择器输入 + Class.prototype.events = function(){ + var that = this + ,options = that.config + + ,elemColorBoxSpan = that.elemColorBox.find('.' + PICKER_TRIG_SPAN) + + //弹出颜色选择器 + that.elemColorBox.on('click' , function(){ + that.renderPicker(); + if($(ELEM_MAIN)[0]){ + that.val(); + that.side(); + }; + }); + + if(!options.elem[0] || that.elemColorBox[0].eventHandler) return; + + //绑定关闭控件事件 + $doc.on('click', function(e){ + //如果点击的元素是颜色框 + if($(e.target).hasClass(ELEM) + || $(e.target).parents('.'+ELEM)[0] + ) return; + + //如果点击的元素是选择器 + if($(e.target).hasClass(ELEM_MAIN.replace(/\./g, '')) + || $(e.target).parents(ELEM_MAIN)[0] + ) return; + + if(!that.elemPicker) return; + + if(that.color){ + var hsb = RGBToHSB(RGBSTo(that.color)); + that.select(hsb.h, hsb.s, hsb.b); + } else { + that.elemColorBox.find('.' + PICKER_TRIG_I).removeClass(ICON_PICKER_DOWN).addClass(ICON_PICKER_CLOSE); + } + elemColorBoxSpan[0].style.background = that.color || ''; + + that.removePicker(); + }); + + //自适应定位 + $win.on('resize', function(){ + if(!that.elemPicker || !$(ELEM_MAIN)[0]){ + return false; + } + that.position(); + }); + + that.elemColorBox[0].eventHandler = true; + }; + + //核心入口 + colorpicker.render = function(options){ + var inst = new Class(options); + return thisColorPicker.call(inst); + }; + + exports(MOD_NAME, colorpicker); +}); diff --git a/IoTGateway/wwwroot/layui/lay/modules/demo.js b/IoTGateway/wwwroot/layui/lay/modules/demo.js new file mode 100644 index 0000000..354b4ea --- /dev/null +++ b/IoTGateway/wwwroot/layui/lay/modules/demo.js @@ -0,0 +1,135 @@ +/** + + @Name:MODULE_DEMO_NAME 模块组件通用结构 + @License:MIT + + */ + +layui.define([''], function(exports){ + "use strict"; + + var $ = layui.$ + + //模块名 + ,MOD_NAME = 'MODULE_DEMO_NAME' + ,MOD_INDEX = 'layui_'+ MOD_NAME +'_index' //模块索引名 + + //外部接口 + ,MODULE_DEMO_NAME = { + config: {} + ,index: layui[MOD_NAME] ? (layui[MOD_NAME].index + 10000) : 0 + + //设置全局项 + ,set: function(options){ + var that = this; + that.config = $.extend({}, that.config, options); + return that; + } + + //事件 + ,on: function(events, callback){ + return layui.onevent.call(this, MOD_NAME, events, callback); + } + } + + //操作当前实例 + ,thisModule = function(){ + var that = this + ,options = that.config + ,id = options.id || that.index; + + thisModule.that[id] = that; //记录当前实例对象 + + return { + config: options + //重置实例 + ,reload: function(options){ + that.reload.call(that, options); + } + } + } + + //字符常量 + ,STR_ELEM = 'layui-MODULE_DEMO_NAME', STR_HIDE = 'layui-hide', STR_DISABLED = 'layui-disabled', STR_NONE = 'layui-none' + + //主模板 + ,TPL_MAIN = [''].join('') + + //构造器 + ,Class = function(options){ + var that = this; + that.index = ++MODULE_DEMO_NAME.index; + that.config = $.extend({}, that.config, MODULE_DEMO_NAME.config, options); + that.render(); + }; + + //默认配置 + Class.prototype.config = { + + }; + + //重载实例 + Class.prototype.reload = function(options){ + var that = this; + + layui.each(options, function(key, item){ + if(item.constructor === Array) delete that.config[key]; + }); + + that.config = $.extend(true, {}, that.config, options); + that.render(); + }; + + //渲染 + Class.prototype.render = function(){ + var that = this + ,options = that.config; + + //解析模板 + var thisElem = that.elem = $(laytpl(TPL_MAIN).render({ + data: options + ,index: that.index //索引 + })); + + var othis = options.elem = $(options.elem); + if(!othis[0]) return; + + + + that.events(); //事件 + }; + + //事件 + Class.prototype.events = function(){ + var that = this + ,options = that.config; + + + }; + + //记录所有实例 + thisModule.that = {}; //记录所有实例对象 + + //获取当前实例对象 + thisModule.getThis = function(id){ + var that = thisModule.that[id]; + if(!that) hint.error(id ? (MOD_NAME +' instance with ID \''+ id +'\' not found') : 'ID argument required'); + return that + }; + + //重载实例 + MODULE_DEMO_NAME.reload = function(id, options){ + var that = thisModule.that[id]; + that.reload(options); + + return thisModule.call(that); + }; + + //核心入口 + MODULE_DEMO_NAME.render = function(options){ + var inst = new Class(options); + return thisModule.call(inst); + }; + + exports(MOD_NAME, MODULE_DEMO_NAME); +}); diff --git a/IoTGateway/wwwroot/layui/lay/modules/dropdown.js b/IoTGateway/wwwroot/layui/lay/modules/dropdown.js new file mode 100644 index 0000000..22b917c --- /dev/null +++ b/IoTGateway/wwwroot/layui/lay/modules/dropdown.js @@ -0,0 +1,527 @@ +/** + + @Name:dropdown 下拉菜单组件 + @License:MIT + + */ + +layui.define(['jquery', 'laytpl', 'lay'], function(exports){ + "use strict"; + + var $ = layui.$ + ,laytpl = layui.laytpl + ,hint = layui.hint() + ,device = layui.device() + ,clickOrMousedown = (device.mobile ? 'click' : 'mousedown') + + //模块名 + ,MOD_NAME = 'dropdown' + ,MOD_INDEX = 'layui_'+ MOD_NAME +'_index' //模块索引名 + + //外部接口 + ,dropdown = { + config: {} + ,index: layui[MOD_NAME] ? (layui[MOD_NAME].index + 10000) : 0 + + //设置全局项 + ,set: function(options){ + var that = this; + that.config = $.extend({}, that.config, options); + return that; + } + + //事件 + ,on: function(events, callback){ + return layui.onevent.call(this, MOD_NAME, events, callback); + } + } + + //操作当前实例 + ,thisModule = function(){ + var that = this + ,options = that.config + ,id = options.id; + + thisModule.that[id] = that; //记录当前实例对象 + + return { + config: options + //重置实例 + ,reload: function(options){ + that.reload.call(that, options); + } + } + } + + //字符常量 + ,STR_ELEM = 'layui-dropdown', STR_HIDE = 'layui-hide', STR_DISABLED = 'layui-disabled', STR_NONE = 'layui-none' + ,STR_ITEM_UP = 'layui-menu-item-up', STR_ITEM_DOWN = 'layui-menu-item-down', STR_MENU_TITLE = 'layui-menu-body-title', STR_ITEM_GROUP = 'layui-menu-item-group', STR_ITEM_PARENT = 'layui-menu-item-parent', STR_ITEM_DIV = 'layui-menu-item-divider', STR_ITEM_CHECKED = 'layui-menu-item-checked', STR_ITEM_CHECKED2 = 'layui-menu-item-checked2', STR_MENU_PANEL = 'layui-menu-body-panel', STR_MENU_PANEL_L = 'layui-menu-body-panel-left' + + ,STR_GROUP_TITLE = '.'+ STR_ITEM_GROUP + '>.'+ STR_MENU_TITLE + + //构造器 + ,Class = function(options){ + var that = this; + that.index = ++dropdown.index; + that.config = $.extend({}, that.config, dropdown.config, options); + that.init(); + }; + + //默认配置 + Class.prototype.config = { + trigger: 'click' //事件类型 + ,content: '' //自定义菜单内容 + ,className: '' //自定义样式类名 + ,style: '' //设置面板 style 属性 + ,show: false //是否初始即显示菜单面板 + ,isAllowSpread: true //是否允许菜单组展开收缩 + ,isSpreadItem: true //是否初始展开子菜单 + ,data: [] //菜单数据结构 + ,delay: 300 //延迟关闭的毫秒数,若 trigger 为 hover 时才生效 + }; + + //重载实例 + Class.prototype.reload = function(options){ + var that = this; + that.config = $.extend({}, that.config, options); + that.init(true); + }; + + //初始化准备 + Class.prototype.init = function(rerender){ + var that = this + ,options = that.config + ,elem = options.elem = $(options.elem); + + //若 elem 非唯一 + if(elem.length > 1){ + layui.each(elem, function(){ + dropdown.render($.extend({}, options, { + elem: this + })); + }); + return that; + } + + //若重复执行 render,则视为 reload 处理 + if(!rerender && elem[0] && elem.data(MOD_INDEX)){; + var newThat = thisModule.getThis(elem.data(MOD_INDEX)); + if(!newThat) return; + + return newThat.reload(options); + }; + + //初始化 id 参数 + options.id = ('id' in options) ? options.id : that.index; + + if(options.show) that.render(rerender); //初始即显示 + that.events(); //事件 + }; + + //渲染 + Class.prototype.render = function(rerender){ + var that = this + ,options = that.config + ,elemBody = $('body') + + //默认菜单内容 + ,getDefaultView = function(){ + var elemUl = $('
      '); + if(options.data.length > 0 ){ + eachItemView(elemUl, options.data) + } else { + elemUl.html('
    • no menu
    • '); + } + return elemUl; + } + + //遍历菜单项 + ,eachItemView = function(views, data){ + //var views = []; + layui.each(data, function(index, item){ + //是否存在子级 + var isChild = item.child && item.child.length > 0 + ,isSpreadItem = ('isSpreadItem' in item) ? item.isSpreadItem : options.isSpreadItem + ,title = item.templet + ? laytpl(item.templet).render(item) + : (options.templet ? laytpl(options.templet).render(item) : item.title) + + //初始类型 + ,type = function(){ + if(isChild){ + item.type = item.type || 'parent'; + } + if(item.type){ + return ({ + group: 'group' + ,parent: 'parent' + ,'-': '-' + })[item.type] || 'parent'; + } + return ''; + }(); + + if(type !== '-' && (!item.title && !item.id && !isChild)) return; + + //列表元素 + var viewLi = $(['' + + //标题区 + ,function(){ + //是否超文本 + var viewText = ('href' in item) ? ( + ''+ title +'' + ) : title; + + //是否存在子级 + if(isChild){ + return '
      '+ viewText + function(){ + if(type === 'parent'){ + return ''; + } else if(type === 'group' && options.isAllowSpread){ + return ''; + } else { + return ''; + } + }() +'
      ' + + } + return '
      '+ viewText +'
      '; + }() + ,''].join('')); + + viewLi.data('item', item); + + //子级区 + if(isChild){ + var elemPanel = $('
      ') + ,elemUl = $('
        '); + + if(type === 'parent'){ + elemPanel.append(eachItemView(elemUl, item.child)); + viewLi.append(elemPanel); + } else { + viewLi.append(eachItemView(elemUl, item.child)); + } + } + + views.append(viewLi); + }); + return views; + } + + //主模板 + ,TPL_MAIN = ['
        ' + ,'
        '].join(''); + + //如果是右键事件,则每次触发事件时,将允许重新渲染 + if(options.trigger === 'contextmenu' || lay.isTopElem(options.elem[0])) rerender = true; + + //判断是否已经打开了下拉菜单面板 + if(!rerender && options.elem.data(MOD_INDEX +'_opened')) return; + + //记录模板对象 + that.elemView = $(TPL_MAIN); + that.elemView.append(options.content || getDefaultView()); + + //初始化某些属性 + if(options.className) that.elemView.addClass(options.className); + if(options.style) that.elemView.attr('style', options.style); + + + //记录当前执行的实例索引 + dropdown.thisId = options.id; + + //插入视图 + that.remove(); //移除非当前绑定元素的面板 + elemBody.append(that.elemView); + options.elem.data(MOD_INDEX +'_opened', true); + + //坐标定位 + that.position(); + thisModule.prevElem = that.elemView; //记录当前打开的元素,以便在下次关闭 + thisModule.prevElem.data('prevElem', options.elem); //将当前绑定的元素,记录在打开元素的 data 对象中 + + //阻止全局事件 + that.elemView.find('.layui-menu').on(clickOrMousedown, function(e){ + lay.stope(e); + }); + + //触发菜单列表事件 + that.elemView.find('.layui-menu li').on('click', function(e){ + var othis = $(this) + ,data = othis.data('item') || {} + ,isChild = data.child && data.child.length > 0; + + if(!isChild && data.type !== '-'){ + that.remove(); + typeof options.click === 'function' && options.click(data, othis); + } + }); + + //触发菜单组展开收缩 + that.elemView.find(STR_GROUP_TITLE).on('click', function(e){ + var othis = $(this) + ,elemGroup = othis.parent() + ,data = elemGroup.data('item') || {} + + if(data.type === 'group' && options.isAllowSpread){ + thisModule.spread(elemGroup); + } + }); + + //如果是鼠标移入事件,则鼠标移出时自动关闭 + if(options.trigger === 'mouseenter'){ + that.elemView.on('mouseenter', function(){ + clearTimeout(thisModule.timer); + }).on('mouseleave', function(){ + that.delayRemove(); + }); + } + + }; + + //位置定位 + Class.prototype.position = function(obj){ + var that = this + ,options = that.config; + + lay.position(options.elem[0], that.elemView[0], { + position: options.position + ,e: that.e + ,clickType: options.trigger === 'contextmenu' ? 'right' : null + }); + }; + + //删除视图 + Class.prototype.remove = function(){ + var that = this + ,options = that.config + ,elemPrev = thisModule.prevElem; + + //若存在已打开的面板元素,则移除 + if(elemPrev){ + elemPrev.data('prevElem') && ( + elemPrev.data('prevElem').data(MOD_INDEX +'_opened', false) + ); + elemPrev.remove(); + } + }; + + //延迟删除视图 + Class.prototype.delayRemove = function(){ + var that = this + ,options = that.config; + clearTimeout(thisModule.timer); + + thisModule.timer = setTimeout(function(){ + that.remove(); + }, options.delay); + }; + + //事件 + Class.prototype.events = function(){ + var that = this + ,options = that.config; + + //如果传入 hover,则解析为 mouseenter + if(options.trigger === 'hover') options.trigger = 'mouseenter'; + + //解除上一个事件 + if(that.prevElem) that.prevElem.off(options.trigger, that.prevElemCallback); + + //记录被绑定的元素及回调 + that.prevElem = options.elem; + that.prevElemCallback = function(e){ + clearTimeout(thisModule.timer); + that.e = e; + that.render(); + e.preventDefault(); + + //组件打开完毕的时间 + typeof options.ready === 'function' && options.ready(that.elemView, options.elem, that.e.target); + }; + + //触发元素事件 + options.elem.on(options.trigger, that.prevElemCallback); + + //如果是鼠标移入事件 + if(options.trigger === 'mouseenter'){ + //直行鼠标移出事件 + options.elem.on('mouseleave', function(){ + that.delayRemove(); + }); + } + }; + + //记录所有实例 + thisModule.that = {}; //记录所有实例对象 + + //获取当前实例对象 + thisModule.getThis = function(id){ + var that = thisModule.that[id]; + if(!that) hint.error(id ? (MOD_NAME +' instance with ID \''+ id +'\' not found') : 'ID argument required'); + return that; + }; + + //设置菜单组展开和收缩状态 + thisModule.spread = function(othis){ + //菜单组展开和收缩 + var elemIcon = othis.children('.'+ STR_MENU_TITLE).find('.layui-icon'); + if(othis.hasClass(STR_ITEM_UP)){ + othis.removeClass(STR_ITEM_UP).addClass(STR_ITEM_DOWN); + elemIcon.removeClass('layui-icon-down').addClass('layui-icon-up'); + } else { + othis.removeClass(STR_ITEM_DOWN).addClass(STR_ITEM_UP); + elemIcon.removeClass('layui-icon-up').addClass('layui-icon-down') + } + }; + + //全局事件 + ;!function(){ + var _WIN = $(window) + ,_DOC = $(document); + + //自适应定位 + _WIN.on('resize', function(){ + if(!dropdown.thisId) return; + var that = thisModule.getThis(dropdown.thisId); + if(!that) return; + + if(!that.elemView[0] || !$('.'+ STR_ELEM)[0]){ + return false; + } + + var options = that.config; + + if(options.trigger === 'contextmenu'){ + that.remove(); + } else { + that.position(); + } + }); + + + + //点击任意处关闭 + _DOC.on(clickOrMousedown, function(e){ + if(!dropdown.thisId) return; + var that = thisModule.getThis(dropdown.thisId) + if(!that) return; + + var options = that.config; + + //如果触发的是绑定的元素,或者属于绑定元素的子元素,则不关闭 + //满足条件:当前绑定的元素不是 body document,或者不是鼠标右键事件 + if(!(lay.isTopElem(options.elem[0]) || options.trigger === 'contextmenu')){ + if( + e.target === options.elem[0] || + options.elem.find(e.target)[0] || + e.target === that.elemView[0] || + (that.elemView && that.elemView.find(e.target)[0]) + ) return; + } + + that.remove(); + }); + + //基础菜单的静态元素事件 + var ELEM_LI = '.layui-menu:not(.layui-dropdown-menu) li'; + _DOC.on('click', ELEM_LI, function(e){ + var othis = $(this) + ,parent = othis.parents('.layui-menu').eq(0) + ,isChild = othis.hasClass(STR_ITEM_GROUP) || othis.hasClass(STR_ITEM_PARENT) + ,filter = parent.attr('lay-filter') || parent.attr('id') + ,options = lay.options(this); + + //非触发元素 + if(othis.hasClass(STR_ITEM_DIV)) return; + + //非菜单组 + if(!isChild){ + //选中 + parent.find('.'+ STR_ITEM_CHECKED).removeClass(STR_ITEM_CHECKED); //清除选中样式 + parent.find('.'+ STR_ITEM_CHECKED2).removeClass(STR_ITEM_CHECKED2); //清除父级菜单选中样式 + othis.addClass(STR_ITEM_CHECKED); //添加选中样式 + othis.parents('.'+ STR_ITEM_PARENT).addClass(STR_ITEM_CHECKED2); //添加父级菜单选中样式 + + //触发事件 + layui.event.call(this, MOD_NAME, 'click('+ filter +')', options); + } + }); + + //基础菜单的展开收缩事件 + _DOC.on('click', (ELEM_LI + STR_GROUP_TITLE), function(e){ + var othis = $(this) + ,elemGroup = othis.parents('.'+ STR_ITEM_GROUP +':eq(0)') + ,options = lay.options(elemGroup[0]); + + if(('isAllowSpread' in options) ? options.isAllowSpread : true){ + thisModule.spread(elemGroup); + }; + }); + + //判断子级菜单是否超出屏幕 + var ELEM_LI_PAR = '.layui-menu .'+ STR_ITEM_PARENT + _DOC.on('mouseenter', ELEM_LI_PAR, function(e){ + var othis = $(this) + ,elemPanel = othis.find('.'+ STR_MENU_PANEL); + + if(!elemPanel[0]) return; + var rect = elemPanel[0].getBoundingClientRect(); + + //是否超出右侧屏幕 + if(rect.right > _WIN.width()){ + elemPanel.addClass(STR_MENU_PANEL_L); + //不允许超出左侧屏幕 + rect = elemPanel[0].getBoundingClientRect(); + if(rect.left < 0){ + elemPanel.removeClass(STR_MENU_PANEL_L); + } + } + + //是否超出底部屏幕 + if(rect.bottom > _WIN.height()){ + elemPanel.eq(0).css('margin-top', -(rect.bottom - _WIN.height())); + }; + }).on('mouseleave', ELEM_LI_PAR, function(e){ + var othis = $(this) + ,elemPanel = othis.children('.'+ STR_MENU_PANEL); + + elemPanel.removeClass(STR_MENU_PANEL_L); + elemPanel.css('margin-top', 0); + }); + + }(); + + //重载实例 + dropdown.reload = function(id, options){ + var that = thisModule.getThis(id); + if(!that) return this; + + that.reload(options); + return thisModule.call(that); + }; + + //核心入口 + dropdown.render = function(options){ + var inst = new Class(options); + return thisModule.call(inst); + }; + + exports(MOD_NAME, dropdown); +}); diff --git a/IoTGateway/wwwroot/layui/lay/modules/element.js b/IoTGateway/wwwroot/layui/lay/modules/element.js new file mode 100644 index 0000000..7453128 --- /dev/null +++ b/IoTGateway/wwwroot/layui/lay/modules/element.js @@ -0,0 +1,471 @@ +/** + + @Name:element 常用元素操作 + @License:MIT + + */ + +layui.define('jquery', function(exports){ + "use strict"; + + var $ = layui.$ + ,hint = layui.hint() + ,device = layui.device() + + ,MOD_NAME = 'element', THIS = 'layui-this', SHOW = 'layui-show' + + ,Element = function(){ + this.config = {}; + }; + + //全局设置 + Element.prototype.set = function(options){ + var that = this; + $.extend(true, that.config, options); + return that; + }; + + //表单事件 + Element.prototype.on = function(events, callback){ + return layui.onevent.call(this, MOD_NAME, events, callback); + }; + + //外部Tab新增 + Element.prototype.tabAdd = function(filter, options){ + var TITLE = '.layui-tab-title' + ,tabElem = $('.layui-tab[lay-filter='+ filter +']') + ,titElem = tabElem.children(TITLE) + ,barElem = titElem.children('.layui-tab-bar') + ,contElem = tabElem.children('.layui-tab-content') + ,li = '
      • '+ (options.title||'unnaming') +'
      • '; + + barElem[0] ? barElem.before(li) : titElem.append(li); + contElem.append('
        '+ (options.content||'') +'
        '); + call.hideTabMore(true); + call.tabAuto(); + return this; + }; + + //外部Tab删除 + Element.prototype.tabDelete = function(filter, layid){ + var TITLE = '.layui-tab-title' + ,tabElem = $('.layui-tab[lay-filter='+ filter +']') + ,titElem = tabElem.children(TITLE) + ,liElem = titElem.find('>li[lay-id="'+ layid +'"]'); + call.tabDelete(null, liElem); + return this; + }; + + //外部Tab切换 + Element.prototype.tabChange = function(filter, layid){ + var TITLE = '.layui-tab-title' + ,tabElem = $('.layui-tab[lay-filter='+ filter +']') + ,titElem = tabElem.children(TITLE) + ,liElem = titElem.find('>li[lay-id="'+ layid +'"]'); + call.tabClick.call(liElem[0], null, null, liElem); + return this; + }; + + //自定义Tab选项卡 + Element.prototype.tab = function(options){ + options = options || {}; + dom.on('click', options.headerElem, function(e){ + var index = $(this).index(); + call.tabClick.call(this, e, index, null, options); + }); + }; + + + //动态改变进度条 + Element.prototype.progress = function(filter, percent){ + var ELEM = 'layui-progress' + ,elem = $('.'+ ELEM +'[lay-filter='+ filter +']') + ,elemBar = elem.find('.'+ ELEM +'-bar') + ,text = elemBar.find('.'+ ELEM +'-text'); + elemBar.css('width', percent); + text.text(percent); + return this; + }; + + var NAV_ELEM = '.layui-nav', NAV_ITEM = 'layui-nav-item', NAV_BAR = 'layui-nav-bar' + ,NAV_TREE = 'layui-nav-tree', NAV_CHILD = 'layui-nav-child', NAV_MORE = 'layui-nav-more' + ,NAV_ANIM = 'layui-anim layui-anim-upbit' + + //基础事件体 + ,call = { + //Tab点击 + tabClick: function(e, index, liElem, options){ + options = options || {}; + var othis = liElem || $(this) + ,index = index || othis.parent().children('li').index(othis) + ,parents = options.headerElem ? othis.parent() : othis.parents('.layui-tab').eq(0) + ,item = options.bodyElem ? $(options.bodyElem) : parents.children('.layui-tab-content').children('.layui-tab-item') + ,elemA = othis.find('a') + ,filter = parents.attr('lay-filter'); + + if(!(elemA.attr('href') !== 'javascript:;' && elemA.attr('target') === '_blank')){ + othis.addClass(THIS).siblings().removeClass(THIS); + item.eq(index).addClass(SHOW).siblings().removeClass(SHOW); + } + + layui.event.call(this, MOD_NAME, 'tab('+ filter +')', { + elem: parents + ,index: index + }); + } + + //Tab删除 + ,tabDelete: function(e, othis){ + var li = othis || $(this).parent(), index = li.index() + ,parents = li.parents('.layui-tab').eq(0) + ,item = parents.children('.layui-tab-content').children('.layui-tab-item') + ,filter = parents.attr('lay-filter'); + + if(li.hasClass(THIS)){ + if(li.next()[0]){ + call.tabClick.call(li.next()[0], null, index + 1); + } else if(li.prev()[0]){ + call.tabClick.call(li.prev()[0], null, index - 1); + } + } + + li.remove(); + item.eq(index).remove(); + setTimeout(function(){ + call.tabAuto(); + }, 50); + + layui.event.call(this, MOD_NAME, 'tabDelete('+ filter +')', { + elem: parents + ,index: index + }); + } + + //Tab自适应 + ,tabAuto: function(){ + var SCROLL = 'layui-tab-scroll', MORE = 'layui-tab-more', BAR = 'layui-tab-bar' + ,CLOSE = 'layui-tab-close', that = this; + + $('.layui-tab').each(function(){ + var othis = $(this) + ,title = othis.children('.layui-tab-title') + ,item = othis.children('.layui-tab-content').children('.layui-tab-item') + ,STOPE = 'lay-stope="tabmore"' + ,span = $(''); + + if(that === window && device.ie != 8){ + call.hideTabMore(true) + } + + //允许关闭 + if(othis.attr('lay-allowClose')){ + title.find('li').each(function(){ + var li = $(this); + if(!li.find('.'+CLOSE)[0]){ + var close = $(''); + close.on('click', call.tabDelete); + li.append(close); + } + }); + } + + if(typeof othis.attr('lay-unauto') === 'string') return; + + //响应式 + if(title.prop('scrollWidth') > title.outerWidth()+1){ + if(title.find('.'+BAR)[0]) return; + title.append(span); + othis.attr('overflow', ''); + span.on('click', function(e){ + title[this.title ? 'removeClass' : 'addClass'](MORE); + this.title = this.title ? '' : '收缩'; + }); + } else { + title.find('.'+BAR).remove(); + othis.removeAttr('overflow'); + } + }); + } + //隐藏更多Tab + ,hideTabMore: function(e){ + var tsbTitle = $('.layui-tab-title'); + if(e === true || $(e.target).attr('lay-stope') !== 'tabmore'){ + tsbTitle.removeClass('layui-tab-more'); + tsbTitle.find('.layui-tab-bar').attr('title',''); + } + } + + //点击一级菜单 + /* + ,clickThis: function(){ + var othis = $(this), parents = othis.parents(NAV_ELEM) + ,filter = parents.attr('lay-filter') + ,elemA = othis.find('a') + ,unselect = typeof othis.attr('lay-unselect') === 'string'; + + if(othis.find('.'+NAV_CHILD)[0]) return; + + if(!(elemA.attr('href') !== 'javascript:;' && elemA.attr('target') === '_blank') && !unselect){ + parents.find('.'+THIS).removeClass(THIS); + othis.addClass(THIS); + } + + layui.event.call(this, MOD_NAME, 'nav('+ filter +')', othis); + } + ) + */ + + //点击菜单 - a标签触发 + ,clickThis: function(){ + var othis = $(this) + ,parents = othis.parents(NAV_ELEM) + ,filter = parents.attr('lay-filter') + ,parent = othis.parent() + ,child = othis.siblings('.'+NAV_CHILD) + ,unselect = typeof parent.attr('lay-unselect') === 'string'; + + if(!(othis.attr('href') !== 'javascript:;' && othis.attr('target') === '_blank') && !unselect){ + if(!child[0]){ + parents.find('.'+THIS).removeClass(THIS); + parent.addClass(THIS); + } + } + + //如果是垂直菜单 + if(parents.hasClass(NAV_TREE)){ + child.removeClass(NAV_ANIM); + + //如果有子菜单,则展开 + if(child[0]){ + parent[child.css('display') === 'none' ? 'addClass': 'removeClass'](NAV_ITEM+'ed'); + if(parents.attr('lay-shrink') === 'all'){ + parent.siblings().removeClass(NAV_ITEM + 'ed'); + } + } + } + + layui.event.call(this, MOD_NAME, 'nav('+ filter +')', othis); + } + + //点击子菜单选中 + /* + ,clickChild: function(){ + var othis = $(this), parents = othis.parents(NAV_ELEM) + ,filter = parents.attr('lay-filter'); + parents.find('.'+THIS).removeClass(THIS); + othis.addClass(THIS); + layui.event.call(this, MOD_NAME, 'nav('+ filter +')', othis); + } + */ + + //折叠面板 + ,collapse: function(){ + var othis = $(this), icon = othis.find('.layui-colla-icon') + ,elemCont = othis.siblings('.layui-colla-content') + ,parents = othis.parents('.layui-collapse').eq(0) + ,filter = parents.attr('lay-filter') + ,isNone = elemCont.css('display') === 'none'; + + //是否手风琴 + if(typeof parents.attr('lay-accordion') === 'string'){ + var show = parents.children('.layui-colla-item').children('.'+SHOW); + show.siblings('.layui-colla-title').children('.layui-colla-icon').html(''); + show.removeClass(SHOW); + } + + elemCont[isNone ? 'addClass' : 'removeClass'](SHOW); + icon.html(isNone ? '' : ''); + + layui.event.call(this, MOD_NAME, 'collapse('+ filter +')', { + title: othis + ,content: elemCont + ,show: isNone + }); + } + }; + + //初始化元素操作 + Element.prototype.init = function(type, filter){ + var that = this, elemFilter = function(){ + return filter ? ('[lay-filter="' + filter +'"]') : ''; + }(), items = { + + //Tab选项卡 + tab: function(){ + call.tabAuto.call({}); + } + + //导航菜单 + ,nav: function(){ + var TIME = 200, timer = {}, timerMore = {}, timeEnd = {}, follow = function(bar, nav, index){ + var othis = $(this), child = othis.find('.'+NAV_CHILD); + + if(nav.hasClass(NAV_TREE)){ + bar.css({ + top: othis.position().top + ,height: othis.children('a').outerHeight() + ,opacity: 1 + }); + } else { + child.addClass(NAV_ANIM); + bar.css({ + left: othis.position().left + parseFloat(othis.css('marginLeft')) + ,top: othis.position().top + othis.height() - bar.height() + }); + + timer[index] = setTimeout(function(){ + bar.css({ + width: othis.width() + ,opacity: 1 + }); + }, device.ie && device.ie < 10 ? 0 : TIME); + + clearTimeout(timeEnd[index]); + if(child.css('display') === 'block'){ + clearTimeout(timerMore[index]); + } + timerMore[index] = setTimeout(function(){ + child.addClass(SHOW) + othis.find('.'+NAV_MORE).addClass(NAV_MORE+'d'); + }, 300); + } + } + + $(NAV_ELEM + elemFilter).each(function(index){ + var othis = $(this) + ,bar = $('') + ,itemElem = othis.find('.'+NAV_ITEM); + + //Hover滑动效果 + if(!othis.find('.'+NAV_BAR)[0]){ + othis.append(bar); + itemElem.on('mouseenter', function(){ + follow.call(this, bar, othis, index); + }).on('mouseleave', function(){ + if(!othis.hasClass(NAV_TREE)){ + clearTimeout(timerMore[index]); + timerMore[index] = setTimeout(function(){ + othis.find('.'+NAV_CHILD).removeClass(SHOW); + othis.find('.'+NAV_MORE).removeClass(NAV_MORE+'d'); + }, 300); + } + }); + othis.on('mouseleave', function(){ + clearTimeout(timer[index]) + timeEnd[index] = setTimeout(function(){ + if(othis.hasClass(NAV_TREE)){ + bar.css({ + height: 0 + ,top: bar.position().top + bar.height()/2 + ,opacity: 0 + }); + } else { + bar.css({ + width: 0 + ,left: bar.position().left + bar.width()/2 + ,opacity: 0 + }); + } + }, TIME); + }); + } + + //展开子菜单 + itemElem.find('a').each(function(){ + var thisA = $(this) + ,parent = thisA.parent() + ,child = thisA.siblings('.'+NAV_CHILD); + + //输出小箭头 + if(child[0] && !thisA.children('.'+NAV_MORE)[0]){ + thisA.append(''); + } + + thisA.off('click', call.clickThis).on('click', call.clickThis); //点击菜单 + }); + }); + } + + //面包屑 + ,breadcrumb: function(){ + var ELEM = '.layui-breadcrumb'; + + $(ELEM + elemFilter).each(function(){ + var othis = $(this) + ,ATTE_SPR = 'lay-separator' + ,separator = othis.attr(ATTE_SPR) || '/' + ,aNode = othis.find('a'); + if(aNode.next('span['+ ATTE_SPR +']')[0]) return; + aNode.each(function(index){ + if(index === aNode.length - 1) return; + $(this).after(''+ separator +''); + }); + othis.css('visibility', 'visible'); + }); + } + + //进度条 + ,progress: function(){ + var ELEM = 'layui-progress'; + $('.' + ELEM + elemFilter).each(function(){ + var othis = $(this) + ,elemBar = othis.find('.layui-progress-bar') + ,percent = elemBar.attr('lay-percent'); + + elemBar.css('width', function(){ + return /^.+\/.+$/.test(percent) + ? (new Function('return '+ percent)() * 100) + '%' + : percent; + }()); + + if(othis.attr('lay-showPercent')){ + setTimeout(function(){ + elemBar.html(''+ percent +''); + },350); + } + }); + } + + //折叠面板 + ,collapse: function(){ + var ELEM = 'layui-collapse'; + + $('.' + ELEM + elemFilter).each(function(){ + var elemItem = $(this).find('.layui-colla-item') + elemItem.each(function(){ + var othis = $(this) + ,elemTitle = othis.find('.layui-colla-title') + ,elemCont = othis.find('.layui-colla-content') + ,isNone = elemCont.css('display') === 'none'; + + //初始状态 + elemTitle.find('.layui-colla-icon').remove(); + elemTitle.append(''+ (isNone ? '' : '') +''); + + //点击标题 + elemTitle.off('click', call.collapse).on('click', call.collapse); + }); + + }); + } + }; + + return items[type] ? items[type]() : layui.each(items, function(index, item){ + item(); + }); + }; + + Element.prototype.render = Element.prototype.init; + + var element = new Element(), dom = $(document); + element.render(); + + var TITLE = '.layui-tab-title li'; + dom.on('click', TITLE, call.tabClick); //Tab切换 + dom.on('click', call.hideTabMore); //隐藏展开的Tab + $(window).on('resize', call.tabAuto); //自适应 + + exports(MOD_NAME, element); +}); + diff --git a/IoTGateway/wwwroot/layui/lay/modules/flow.js b/IoTGateway/wwwroot/layui/lay/modules/flow.js new file mode 100644 index 0000000..9739f07 --- /dev/null +++ b/IoTGateway/wwwroot/layui/lay/modules/flow.js @@ -0,0 +1,176 @@ +/** + + @Name flow 流加载组件 + @License:MIT + + */ + + +layui.define('jquery', function(exports){ + "use strict"; + + var $ = layui.$, Flow = function(options){} + ,ELEM_MORE = 'layui-flow-more' + ,ELEM_LOAD = ''; + + //主方法 + Flow.prototype.load = function(options){ + var that = this, page = 0, lock, isOver, lazyimg, timer; + options = options || {}; + + var elem = $(options.elem); if(!elem[0]) return; + var scrollElem = $(options.scrollElem || document); //滚动条所在元素 + var mb = options.mb || 50; //与底部的临界距离 + var isAuto = 'isAuto' in options ? options.isAuto : true; //是否自动滚动加载 + var end = options.end || '没有更多了'; //“末页”显示文案 + + //滚动条所在元素是否为document + var notDocment = options.scrollElem && options.scrollElem !== document; + + //加载更多 + var ELEM_TEXT = '加载更多' + ,more = $(''); + + if(!elem.find('.layui-flow-more')[0]){ + elem.append(more); + } + + //加载下一个元素 + var next = function(html, over){ + html = $(html); + more.before(html); + over = over == 0 ? true : null; + over ? more.html(end) : more.find('a').html(ELEM_TEXT); + isOver = over; + lock = null; + lazyimg && lazyimg(); + }; + + //触发请求 + var done = function(){ + lock = true; + more.find('a').html(ELEM_LOAD); + typeof options.done === 'function' && options.done(++page, next); + }; + + done(); + + //不自动滚动加载 + more.find('a').on('click', function(){ + var othis = $(this); + if(isOver) return; + lock || done(); + }); + + //如果允许图片懒加载 + if(options.isLazyimg){ + var lazyimg = that.lazyimg({ + elem: options.elem + ' img' + ,scrollElem: options.scrollElem + }); + } + + if(!isAuto) return that; + + scrollElem.on('scroll', function(){ + var othis = $(this), top = othis.scrollTop(); + + if(timer) clearTimeout(timer); + if(isOver || !elem.width()) return; //如果已经结束,或者元素处于隐藏状态,则不执行滚动加载 + + timer = setTimeout(function(){ + //计算滚动所在容器的可视高度 + var height = notDocment ? othis.height() : $(window).height(); + + //计算滚动所在容器的实际高度 + var scrollHeight = notDocment + ? othis.prop('scrollHeight') + : document.documentElement.scrollHeight; + + //临界点 + if(scrollHeight - top - height <= mb){ + lock || done(); + } + }, 100); + }); + + return that; + }; + + //图片懒加载 + Flow.prototype.lazyimg = function(options){ + var that = this, index = 0, haveScroll; + options = options || {}; + + var scrollElem = $(options.scrollElem || document); //滚动条所在元素 + var elem = options.elem || 'img'; + + //滚动条所在元素是否为document + var notDocment = options.scrollElem && options.scrollElem !== document; + + //显示图片 + var show = function(item, height){ + var start = scrollElem.scrollTop(), end = start + height; + var elemTop = notDocment ? function(){ + return item.offset().top - scrollElem.offset().top + start; + }() : item.offset().top; + + /* 始终只加载在当前屏范围内的图片 */ + if(elemTop >= start && elemTop <= end){ + if(!item.attr('src')){ + var src = item.attr('lay-src'); + layui.img(src, function(){ + var next = that.lazyimg.elem.eq(index); + item.attr('src', src).removeAttr('lay-src'); + + /* 当前图片加载就绪后,检测下一个图片是否在当前屏 */ + next[0] && render(next); + index++; + }); + } + } + }, render = function(othis, scroll){ + + //计算滚动所在容器的可视高度 + var height = notDocment ? (scroll||scrollElem).height() : $(window).height(); + var start = scrollElem.scrollTop(), end = start + height; + + that.lazyimg.elem = $(elem); + + if(othis){ + show(othis, height); + } else { + //计算未加载过的图片 + for(var i = 0; i < that.lazyimg.elem.length; i++){ + var item = that.lazyimg.elem.eq(i), elemTop = notDocment ? function(){ + return item.offset().top - scrollElem.offset().top + start; + }() : item.offset().top; + + show(item, height); + index = i; + + //如果图片的top坐标,超出了当前屏,则终止后续图片的遍历 + if(elemTop > end) break; + } + } + }; + + render(); + + if(!haveScroll){ + var timer; + scrollElem.on('scroll', function(){ + var othis = $(this); + if(timer) clearTimeout(timer) + timer = setTimeout(function(){ + render(null, othis); + }, 50); + }); + haveScroll = true; + } + return render; + }; + + //暴露接口 + exports('flow', new Flow()); +}); diff --git a/IoTGateway/wwwroot/layui/lay/modules/form.js b/IoTGateway/wwwroot/layui/lay/modules/form.js new file mode 100644 index 0000000..33e82af --- /dev/null +++ b/IoTGateway/wwwroot/layui/lay/modules/form.js @@ -0,0 +1,719 @@ +/** + + @Name:form 表单组件 + @License:MIT + + */ + +layui.define('layer', function(exports){ + "use strict"; + + var $ = layui.$ + ,layer = layui.layer + ,hint = layui.hint() + ,device = layui.device() + + ,MOD_NAME = 'form', ELEM = '.layui-form', THIS = 'layui-this' + ,SHOW = 'layui-show', HIDE = 'layui-hide', DISABLED = 'layui-disabled' + + ,Form = function(){ + this.config = { + verify: { + required: [ + /[\S]+/ + ,'必填项不能为空' + ] + ,phone: [ + /^1\d{10}$/ + ,'请输入正确的手机号' + ] + ,email: [ + /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/ + ,'邮箱格式不正确' + ] + ,url: [ + /(^#)|(^http(s*):\/\/[^\s]+\.[^\s]+)/ + ,'链接格式不正确' + ] + ,number: function(value){ + if(!value || isNaN(value)) return '只能填写数字' + } + ,date: [ + /^(\d{4})[-\/](\d{1}|0\d{1}|1[0-2])([-\/](\d{1}|0\d{1}|[1-2][0-9]|3[0-1]))*$/ + ,'日期格式不正确' + ] + ,identity: [ + /(^\d{15}$)|(^\d{17}(x|X|\d)$)/ + ,'请输入正确的身份证号' + ] + } + }; + }; + + //全局设置 + Form.prototype.set = function(options){ + var that = this; + $.extend(true, that.config, options); + return that; + }; + + //验证规则设定 + Form.prototype.verify = function(settings){ + var that = this; + $.extend(true, that.config.verify, settings); + return that; + }; + + //表单事件 + Form.prototype.on = function(events, callback){ + return layui.onevent.call(this, MOD_NAME, events, callback); + }; + + //赋值/取值 + Form.prototype.val = function(filter, object){ + var that = this + ,formElem = $(ELEM + '[lay-filter="' + filter +'"]'); + + //遍历 + formElem.each(function(index, item){ + var itemForm = $(this); + + //赋值 + layui.each(object, function(key, value){ + var itemElem = itemForm.find('[name="'+ key +'"]') + ,type; + + //如果对应的表单不存在,则不执行 + if(!itemElem[0]) return; + type = itemElem[0].type; + + //如果为复选框 + if(type === 'checkbox'){ + itemElem[0].checked = value; + } else if(type === 'radio') { //如果为单选框 + itemElem.each(function(){ + if(this.value == value ){ + this.checked = true + } + }); + } else { //其它类型的表单 + itemElem.val(value); + } + }); + }); + + form.render(null, filter); + + //返回值 + return that.getValue(filter); + }; + + //取值 + Form.prototype.getValue = function(filter, itemForm){ + itemForm = itemForm || $(ELEM + '[lay-filter="' + filter +'"]').eq(0); + + var nameIndex = {} //数组 name 索引 + ,field = {} + ,fieldElem = itemForm.find('input,select,textarea') //获取所有表单域 + + layui.each(fieldElem, function(_, item){ + item.name = (item.name || '').replace(/^\s*|\s*&/, ''); + + if(!item.name) return; + + //用于支持数组 name + if(/^.*\[\]$/.test(item.name)){ + var key = item.name.match(/^(.*)\[\]$/g)[0]; + nameIndex[key] = nameIndex[key] | 0; + item.name = item.name.replace(/^(.*)\[\]$/, '$1['+ (nameIndex[key]++) +']'); + } + + if(/^checkbox|radio$/.test(item.type) && !item.checked) return; + field[item.name] = item.value; + }); + + return field; + }; + + //表单控件渲染 + Form.prototype.render = function(type, filter){ + var that = this + ,elemForm = $(ELEM + function(){ + return filter ? ('[lay-filter="' + filter +'"]') : ''; + }()) + ,items = { + + //下拉选择框 + select: function(){ + var TIPS = '请选择', CLASS = 'layui-form-select', TITLE = 'layui-select-title' + ,NONE = 'layui-select-none', initValue = '', thatInput + ,selects = elemForm.find('select') + + //隐藏 select + ,hide = function(e, clear){ + if(!$(e.target).parent().hasClass(TITLE) || clear){ + $('.'+CLASS).removeClass(CLASS+'ed ' + CLASS+'up'); + thatInput && initValue && thatInput.val(initValue); + } + thatInput = null; + } + + //各种事件 + ,events = function(reElem, disabled, isSearch){ + var select = $(this) + ,title = reElem.find('.' + TITLE) + ,input = title.find('input') + ,dl = reElem.find('dl') + ,dds = dl.children('dd') + ,index = this.selectedIndex //当前选中的索引 + ,nearElem; //select 组件当前选中的附近元素,用于辅助快捷键功能 + + if(disabled) return; + + //展开下拉 + var showDown = function(){ + var top = reElem.offset().top + reElem.outerHeight() + 5 - $win.scrollTop() + ,dlHeight = dl.outerHeight(); + + index = select[0].selectedIndex; //获取最新的 selectedIndex + reElem.addClass(CLASS+'ed'); + dds.removeClass(HIDE); + nearElem = null; + + //初始选中样式 + dds.eq(index).addClass(THIS).siblings().removeClass(THIS); + + //上下定位识别 + if(top + dlHeight > $win.height() && top >= dlHeight){ + reElem.addClass(CLASS + 'up'); + } + + followScroll(); + } + + //隐藏下拉 + ,hideDown = function(choose){ + reElem.removeClass(CLASS+'ed ' + CLASS+'up'); + input.blur(); + nearElem = null; + + if(choose) return; + + notOption(input.val(), function(none){ + var selectedIndex = select[0].selectedIndex; + + //未查询到相关值 + if(none){ + initValue = $(select[0].options[selectedIndex]).html(); //重新获得初始选中值 + + //如果是第一项,且文本值等于 placeholder,则清空初始值 + if(selectedIndex === 0 && initValue === input.attr('placeholder')){ + initValue = ''; + }; + + //如果有选中值,则将输入框纠正为该值。否则清空输入框 + input.val(initValue || ''); + } + }); + } + + //定位下拉滚动条 + ,followScroll = function(){ + var thisDd = dl.children('dd.'+ THIS); + + if(!thisDd[0]) return; + + var posTop = thisDd.position().top + ,dlHeight = dl.height() + ,ddHeight = thisDd.height(); + + //若选中元素在滚动条不可见底部 + if(posTop > dlHeight){ + dl.scrollTop(posTop + dl.scrollTop() - dlHeight + ddHeight - 5); + } + + //若选择玄素在滚动条不可见顶部 + if(posTop < 0){ + dl.scrollTop(posTop + dl.scrollTop() - 5); + } + }; + + //点击标题区域 + title.on('click', function(e){ + reElem.hasClass(CLASS+'ed') ? ( + hideDown() + ) : ( + hide(e, true), + showDown() + ); + dl.find('.'+NONE).remove(); + }); + + //点击箭头获取焦点 + title.find('.layui-edge').on('click', function(){ + input.focus(); + }); + + //select 中 input 键盘事件 + input.on('keyup', function(e){ //键盘松开 + var keyCode = e.keyCode; + + //Tab键展开 + if(keyCode === 9){ + showDown(); + } + }).on('keydown', function(e){ //键盘按下 + var keyCode = e.keyCode; + + //Tab键隐藏 + if(keyCode === 9){ + hideDown(); + } + + //标注 dd 的选中状态 + var setThisDd = function(prevNext, thisElem1){ + var nearDd, cacheNearElem + e.preventDefault(); + + //得到当前队列元素 + var thisElem = function(){ + var thisDd = dl.children('dd.'+ THIS); + + //如果是搜索状态,且按 Down 键,且当前可视 dd 元素在选中元素之前, + //则将当前可视 dd 元素的上一个元素作为虚拟的当前选中元素,以保证递归不中断 + if(dl.children('dd.'+ HIDE)[0] && prevNext === 'next'){ + var showDd = dl.children('dd:not(.'+ HIDE +',.'+ DISABLED +')') + ,firstIndex = showDd.eq(0).index(); + if(firstIndex >=0 && firstIndex < thisDd.index() && !showDd.hasClass(THIS)){ + return showDd.eq(0).prev()[0] ? showDd.eq(0).prev() : dl.children(':last'); + } + } + + if(thisElem1 && thisElem1[0]){ + return thisElem1; + } + if(nearElem && nearElem[0]){ + return nearElem; + } + + return thisDd; + //return dds.eq(index); + }(); + + cacheNearElem = thisElem[prevNext](); //当前元素的附近元素 + nearDd = thisElem[prevNext]('dd:not(.'+ HIDE +')'); //当前可视元素的 dd 元素 + + //如果附近的元素不存在,则停止执行,并清空 nearElem + if(!cacheNearElem[0]) return nearElem = null; + + //记录附近的元素,让其成为下一个当前元素 + nearElem = thisElem[prevNext](); + + //如果附近不是 dd ,或者附近的 dd 元素是禁用状态,则进入递归查找 + if((!nearDd[0] || nearDd.hasClass(DISABLED)) && nearElem[0]){ + return setThisDd(prevNext, nearElem); + } + + nearDd.addClass(THIS).siblings().removeClass(THIS); //标注样式 + followScroll(); //定位滚动条 + }; + + if(keyCode === 38) setThisDd('prev'); //Up 键 + if(keyCode === 40) setThisDd('next'); //Down 键 + + //Enter 键 + if(keyCode === 13){ + e.preventDefault(); + dl.children('dd.'+THIS).trigger('click'); + } + }); + + //检测值是否不属于 select 项 + var notOption = function(value, callback, origin){ + var num = 0; + layui.each(dds, function(){ + var othis = $(this) + ,text = othis.text() + ,not = text.indexOf(value) === -1; + if(value === '' || (origin === 'blur') ? value !== text : not) num++; + origin === 'keyup' && othis[not ? 'addClass' : 'removeClass'](HIDE); + }); + var none = num === dds.length; + return callback(none), none; + }; + + //搜索匹配 + var search = function(e){ + var value = this.value, keyCode = e.keyCode; + + if(keyCode === 9 || keyCode === 13 + || keyCode === 37 || keyCode === 38 + || keyCode === 39 || keyCode === 40 + ){ + return false; + } + + notOption(value, function(none){ + if(none){ + dl.find('.'+NONE)[0] || dl.append('

        无匹配项

        '); + } else { + dl.find('.'+NONE).remove(); + } + }, 'keyup'); + + if(value === ''){ + dl.find('.'+NONE).remove(); + } + + followScroll(); //定位滚动条 + }; + + if(isSearch){ + input.on('keyup', search).on('blur', function(e){ + var selectedIndex = select[0].selectedIndex; + + thatInput = input; //当前的 select 中的 input 元素 + initValue = $(select[0].options[selectedIndex]).html(); //重新获得初始选中值 + + //如果是第一项,且文本值等于 placeholder,则清空初始值 + if(selectedIndex === 0 && initValue === input.attr('placeholder')){ + initValue = ''; + }; + + setTimeout(function(){ + notOption(input.val(), function(none){ + initValue || input.val(''); //none && !initValue + }, 'blur'); + }, 200); + }); + } + + //选择 + dds.on('click', function(){ + var othis = $(this), value = othis.attr('lay-value'); + var filter = select.attr('lay-filter'); //获取过滤器 + + if(othis.hasClass(DISABLED)) return false; + + if(othis.hasClass('layui-select-tips')){ + input.val(''); + } else { + input.val(othis.text()); + othis.addClass(THIS); + } + + othis.siblings().removeClass(THIS); + select.val(value).removeClass('layui-form-danger') + layui.event.call(this, MOD_NAME, 'select('+ filter +')', { + elem: select[0] + ,value: value + ,othis: reElem + }); + + hideDown(true); + return false; + }); + + reElem.find('dl>dt').on('click', function(e){ + return false; + }); + + $(document).off('click', hide).on('click', hide); //点击其它元素关闭 select + } + + selects.each(function(index, select){ + var othis = $(this) + ,hasRender = othis.next('.'+CLASS) + ,disabled = this.disabled + ,value = select.value + ,selected = $(select.options[select.selectedIndex]) //获取当前选中项 + ,optionsFirst = select.options[0]; + + if(typeof othis.attr('lay-ignore') === 'string') return othis.show(); + + var isSearch = typeof othis.attr('lay-search') === 'string' + ,placeholder = optionsFirst ? ( + optionsFirst.value ? TIPS : (optionsFirst.innerHTML || TIPS) + ) : TIPS; + + //替代元素 + var reElem = $(['
        ' + ,'
        ' + ,('') //禁用状态 + ,'
        ' + ,'
        ' + ,function(options){ + var arr = []; + layui.each(options, function(index, item){ + if(index === 0 && !item.value){ + arr.push('
        '+ (item.innerHTML || TIPS) +'
        '); + } else if(item.tagName.toLowerCase() === 'optgroup'){ + arr.push('
        '+ item.label +'
        '); + } else { + arr.push('
        '+ item.innerHTML +'
        '); + } + }); + arr.length === 0 && arr.push('
        没有选项
        '); + return arr.join(''); + }(othis.find('*')) +'
        ' + ,'
        '].join('')); + + hasRender[0] && hasRender.remove(); //如果已经渲染,则Rerender + othis.after(reElem); + events.call(this, reElem, disabled, isSearch); + }); + } + + //复选框/开关 + ,checkbox: function(){ + var CLASS = { + checkbox: ['layui-form-checkbox', 'layui-form-checked', 'checkbox'] + ,_switch: ['layui-form-switch', 'layui-form-onswitch', 'switch'] + } + ,checks = elemForm.find('input[type=checkbox]') + + ,events = function(reElem, RE_CLASS){ + var check = $(this); + + //勾选 + reElem.on('click', function(){ + var filter = check.attr('lay-filter') //获取过滤器 + ,text = (check.attr('lay-text')||'').split('|'); + + if(check[0].disabled) return; + + check[0].checked ? ( + check[0].checked = false + ,reElem.removeClass(RE_CLASS[1]).find('em').text(text[1]) + ) : ( + check[0].checked = true + ,reElem.addClass(RE_CLASS[1]).find('em').text(text[0]) + ); + + layui.event.call(check[0], MOD_NAME, RE_CLASS[2]+'('+ filter +')', { + elem: check[0] + ,value: check[0].value + ,othis: reElem + }); + }); + } + + checks.each(function(index, check){ + var othis = $(this), skin = othis.attr('lay-skin') + ,text = (othis.attr('lay-text') || '').split('|'), disabled = this.disabled; + if(skin === 'switch') skin = '_'+skin; + var RE_CLASS = CLASS[skin] || CLASS.checkbox; + + if(typeof othis.attr('lay-ignore') === 'string') return othis.show(); + + //替代元素 + var hasRender = othis.next('.' + RE_CLASS[0]) + ,reElem = $(['
        ' + ,function(){ //不同风格的内容 + var title = check.title.replace(/\s/g, '') + ,type = { + //复选框 + checkbox: [ + (title ? (''+ check.title +'') : '') + ,'' + ].join('') + + //开关 + ,_switch: ''+ ((check.checked ? text[0] : text[1]) || '') +'' + }; + return type[skin] || type['checkbox']; + }() + ,'
        '].join('')); + + hasRender[0] && hasRender.remove(); //如果已经渲染,则Rerender + othis.after(reElem); + events.call(this, reElem, RE_CLASS); + }); + } + + //单选框 + ,radio: function(){ + var CLASS = 'layui-form-radio', ICON = ['', ''] + ,radios = elemForm.find('input[type=radio]') + + ,events = function(reElem){ + var radio = $(this), ANIM = 'layui-anim-scaleSpring'; + + reElem.on('click', function(){ + var name = radio[0].name, forms = radio.parents(ELEM); + var filter = radio.attr('lay-filter'); //获取过滤器 + var sameRadio = forms.find('input[name='+ name.replace(/(\.|#|\[|\])/g, '\\$1') +']'); //找到相同name的兄弟 + + if(radio[0].disabled) return; + + layui.each(sameRadio, function(){ + var next = $(this).next('.'+CLASS); + this.checked = false; + next.removeClass(CLASS+'ed'); + next.find('.layui-icon').removeClass(ANIM).html(ICON[1]); + }); + + radio[0].checked = true; + reElem.addClass(CLASS+'ed'); + reElem.find('.layui-icon').addClass(ANIM).html(ICON[0]); + + layui.event.call(radio[0], MOD_NAME, 'radio('+ filter +')', { + elem: radio[0] + ,value: radio[0].value + ,othis: reElem + }); + }); + }; + + radios.each(function(index, radio){ + var othis = $(this), hasRender = othis.next('.' + CLASS), disabled = this.disabled; + + if(typeof othis.attr('lay-ignore') === 'string') return othis.show(); + hasRender[0] && hasRender.remove(); //如果已经渲染,则Rerender + + //替代元素 + var reElem = $(['
        ' //禁用状态 + ,''+ ICON[radio.checked ? 0 : 1] +'' + ,'
        '+ function(){ + var title = radio.title || ''; + if(typeof othis.next().attr('lay-radio') === 'string'){ + title = othis.next().html(); + othis.next().remove(); + } + return title + }() +'
        ' + ,'
        '].join('')); + + othis.after(reElem); + events.call(this, reElem); + }); + } + }; + type ? ( + items[type] ? items[type]() : hint.error('不支持的'+ type + '表单渲染') + ) : layui.each(items, function(index, item){ + item(); + }); + return that; + }; + + //表单提交校验 + var submit = function(){ + var stop = null //验证不通过状态 + ,verify = form.config.verify //验证规则 + ,DANGER = 'layui-form-danger' //警示样式 + ,field = {} //字段集合 + ,button = $(this) //当前触发的按钮 + ,elem = button.parents(ELEM) //当前所在表单域 + ,verifyElem = elem.find('*[lay-verify]') //获取需要校验的元素 + ,formElem = button.parents('form')[0] //获取当前所在的 form 元素,如果存在的话 + ,filter = button.attr('lay-filter'); //获取过滤器 + + + //开始校验 + layui.each(verifyElem, function(_, item){ + var othis = $(this) + ,vers = othis.attr('lay-verify').split('|') + ,verType = othis.attr('lay-verType') //提示方式 + ,value = othis.val(); + + othis.removeClass(DANGER); //移除警示样式 + + //遍历元素绑定的验证规则 + layui.each(vers, function(_, thisVer){ + var isTrue //是否命中校验 + ,errorText = '' //错误提示文本 + ,isFn = typeof verify[thisVer] === 'function'; + + //匹配验证规则 + if(verify[thisVer]){ + var isTrue = isFn ? errorText = verify[thisVer](value, item) : !verify[thisVer][0].test(value); + errorText = errorText || verify[thisVer][1]; + + if(thisVer === 'required'){ + errorText = othis.attr('lay-reqText') || errorText; + } + + //如果是必填项或者非空命中校验,则阻止提交,弹出提示 + if(isTrue){ + //提示层风格 + if(verType === 'tips'){ + layer.tips(errorText, function(){ + if(typeof othis.attr('lay-ignore') !== 'string'){ + if(item.tagName.toLowerCase() === 'select' || /^checkbox|radio$/.test(item.type)){ + return othis.next(); + } + } + return othis; + }(), {tips: 1}); + } else if(verType === 'alert') { + layer.alert(errorText, {title: '提示', shadeClose: true}); + } + //如果返回的为字符或数字,则自动弹出默认提示框;否则由 verify 方法中处理提示 + else if(/\bstring|number\b/.test(typeof errorText)){ + layer.msg(errorText, {icon: 5, shift: 6}); + } + + //非移动设备自动定位焦点 + if(!device.android && !device.ios){ + setTimeout(function(){ + item.focus(); + }, 7); + } + + othis.addClass(DANGER); + return stop = true; + } + } + }); + if(stop) return stop; + }); + + if(stop) return false; + + //获取当前表单值 + field = form.getValue(null, elem); + + //返回字段 + return layui.event.call(this, MOD_NAME, 'submit('+ filter +')', { + elem: this + ,form: formElem + ,field: field + }); + }; + + //自动完成渲染 + var form = new Form() + ,$dom = $(document), $win = $(window); + + form.render(); + + //表单reset重置渲染 + $dom.on('reset', ELEM, function(){ + var filter = $(this).attr('lay-filter'); + setTimeout(function(){ + form.render(null, filter); + }, 50); + }); + + //表单提交事件 + $dom.on('submit', ELEM, submit) + .on('click', '*[lay-submit]', submit); + + exports(MOD_NAME, form); +}); + + diff --git a/IoTGateway/wwwroot/layui/lay/modules/jquery.js b/IoTGateway/wwwroot/layui/lay/modules/jquery.js new file mode 100644 index 0000000..bc82158 --- /dev/null +++ b/IoTGateway/wwwroot/layui/lay/modules/jquery.js @@ -0,0 +1,10981 @@ +/*! + * jQuery JavaScript Library v1.12.4 + * http://jquery.com/ + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: 2016-05-20T17:17Z + */ + +(function( global, factory ) { + + if ( typeof module === "object" && typeof module.exports === "object" ) { + // For CommonJS and CommonJS-like environments where a proper `window` + // is present, execute the factory and get jQuery. + // For environments that do not have a `window` with a `document` + // (such as Node.js), expose a factory as module.exports. + // This accentuates the need for the creation of a real `window`. + // e.g. var jQuery = require("jquery")(window); + // See ticket #14549 for more info. + module.exports = global.document ? + factory( global, true ) : + function( w ) { + if ( !w.document ) { + throw new Error( "jQuery requires a window with a document" ); + } + return factory( w ); + }; + } else { + factory( global ); + } + +// Pass this if window is not defined yet +}(typeof window !== "undefined" ? window : this, function( window, noGlobal ) { + +// Support: Firefox 18+ +// Can't be in strict mode, several libs including ASP.NET trace +// the stack via arguments.caller.callee and Firefox dies if +// you try to trace through "use strict" call chains. (#13335) +//"use strict"; +var deletedIds = []; + +var document = window.document; + +var slice = deletedIds.slice; + +var concat = deletedIds.concat; + +var push = deletedIds.push; + +var indexOf = deletedIds.indexOf; + +var class2type = {}; + +var toString = class2type.toString; + +var hasOwn = class2type.hasOwnProperty; + +var support = {}; + + + +var + version = "1.12.4", + + // Define a local copy of jQuery + jQuery = function( selector, context ) { + + // The jQuery object is actually just the init constructor 'enhanced' + // Need init if jQuery is called (just allow error to be thrown if not included) + return new jQuery.fn.init( selector, context ); + }, + + // Support: Android<4.1, IE<9 + // Make sure we trim BOM and NBSP + rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, + + // Matches dashed string for camelizing + rmsPrefix = /^-ms-/, + rdashAlpha = /-([\da-z])/gi, + + // Used by jQuery.camelCase as callback to replace() + fcamelCase = function( all, letter ) { + return letter.toUpperCase(); + }; + +jQuery.fn = jQuery.prototype = { + + // The current version of jQuery being used + jquery: version, + + constructor: jQuery, + + // Start with an empty selector + selector: "", + + // The default length of a jQuery object is 0 + length: 0, + + toArray: function() { + return slice.call( this ); + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + return num != null ? + + // Return just the one element from the set + ( num < 0 ? this[ num + this.length ] : this[ num ] ) : + + // Return all the elements in a clean array + slice.call( this ); + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems ) { + + // Build a new jQuery matched element set + var ret = jQuery.merge( this.constructor(), elems ); + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + ret.context = this.context; + + // Return the newly-formed element set + return ret; + }, + + // Execute a callback for every element in the matched set. + each: function( callback ) { + return jQuery.each( this, callback ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map( this, function( elem, i ) { + return callback.call( elem, i, elem ); + } ) ); + }, + + slice: function() { + return this.pushStack( slice.apply( this, arguments ) ); + }, + + first: function() { + return this.eq( 0 ); + }, + + last: function() { + return this.eq( -1 ); + }, + + eq: function( i ) { + var len = this.length, + j = +i + ( i < 0 ? len : 0 ); + return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] ); + }, + + end: function() { + return this.prevObject || this.constructor(); + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: push, + sort: deletedIds.sort, + splice: deletedIds.splice +}; + +jQuery.extend = jQuery.fn.extend = function() { + var src, copyIsArray, copy, name, options, clone, + target = arguments[ 0 ] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + + // skip the boolean and the target + target = arguments[ i ] || {}; + i++; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target !== "object" && !jQuery.isFunction( target ) ) { + target = {}; + } + + // extend jQuery itself if only one argument is passed + if ( i === length ) { + target = this; + i--; + } + + for ( ; i < length; i++ ) { + + // Only deal with non-null/undefined values + if ( ( options = arguments[ i ] ) != null ) { + + // Extend the base object + for ( name in options ) { + src = target[ name ]; + copy = options[ name ]; + + // Prevent never-ending loop + if ( target === copy ) { + continue; + } + + // Recurse if we're merging plain objects or arrays + if ( deep && copy && ( jQuery.isPlainObject( copy ) || + ( copyIsArray = jQuery.isArray( copy ) ) ) ) { + + if ( copyIsArray ) { + copyIsArray = false; + clone = src && jQuery.isArray( src ) ? src : []; + + } else { + clone = src && jQuery.isPlainObject( src ) ? src : {}; + } + + // Never move original objects, clone them + target[ name ] = jQuery.extend( deep, clone, copy ); + + // Don't bring in undefined values + } else if ( copy !== undefined ) { + target[ name ] = copy; + } + } + } + } + + // Return the modified object + return target; +}; + +jQuery.extend( { + + // Unique for each copy of jQuery on the page + expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), + + // Assume jQuery is ready without the ready module + isReady: true, + + error: function( msg ) { + throw new Error( msg ); + }, + + noop: function() {}, + + // See test/unit/core.js for details concerning isFunction. + // Since version 1.3, DOM methods and functions like alert + // aren't supported. They return false on IE (#2968). + isFunction: function( obj ) { + return jQuery.type( obj ) === "function"; + }, + + isArray: Array.isArray || function( obj ) { + return jQuery.type( obj ) === "array"; + }, + + isWindow: function( obj ) { + /* jshint eqeqeq: false */ + return obj != null && obj == obj.window; + }, + + isNumeric: function( obj ) { + + // parseFloat NaNs numeric-cast false positives (null|true|false|"") + // ...but misinterprets leading-number strings, particularly hex literals ("0x...") + // subtraction forces infinities to NaN + // adding 1 corrects loss of precision from parseFloat (#15100) + var realStringObj = obj && obj.toString(); + return !jQuery.isArray( obj ) && ( realStringObj - parseFloat( realStringObj ) + 1 ) >= 0; + }, + + isEmptyObject: function( obj ) { + var name; + for ( name in obj ) { + return false; + } + return true; + }, + + isPlainObject: function( obj ) { + var key; + + // Must be an Object. + // Because of IE, we also have to check the presence of the constructor property. + // Make sure that DOM nodes and window objects don't pass through, as well + if ( !obj || jQuery.type( obj ) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { + return false; + } + + try { + + // Not own constructor property must be Object + if ( obj.constructor && + !hasOwn.call( obj, "constructor" ) && + !hasOwn.call( obj.constructor.prototype, "isPrototypeOf" ) ) { + return false; + } + } catch ( e ) { + + // IE8,9 Will throw exceptions on certain host objects #9897 + return false; + } + + // Support: IE<9 + // Handle iteration over inherited properties before own properties. + if ( !support.ownFirst ) { + for ( key in obj ) { + return hasOwn.call( obj, key ); + } + } + + // Own properties are enumerated firstly, so to speed up, + // if last one is own, then all properties are own. + for ( key in obj ) {} + + return key === undefined || hasOwn.call( obj, key ); + }, + + type: function( obj ) { + if ( obj == null ) { + return obj + ""; + } + return typeof obj === "object" || typeof obj === "function" ? + class2type[ toString.call( obj ) ] || "object" : + typeof obj; + }, + + // Workarounds based on findings by Jim Driscoll + // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context + globalEval: function( data ) { + if ( data && jQuery.trim( data ) ) { + + // We use execScript on Internet Explorer + // We use an anonymous function so that context is window + // rather than jQuery in Firefox + ( window.execScript || function( data ) { + window[ "eval" ].call( window, data ); // jscs:ignore requireDotNotation + } )( data ); + } + }, + + // Convert dashed to camelCase; used by the css and data modules + // Microsoft forgot to hump their vendor prefix (#9572) + camelCase: function( string ) { + return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); + }, + + nodeName: function( elem, name ) { + return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); + }, + + each: function( obj, callback ) { + var length, i = 0; + + if ( isArrayLike( obj ) ) { + length = obj.length; + for ( ; i < length; i++ ) { + if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { + break; + } + } + } else { + for ( i in obj ) { + if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { + break; + } + } + } + + return obj; + }, + + // Support: Android<4.1, IE<9 + trim: function( text ) { + return text == null ? + "" : + ( text + "" ).replace( rtrim, "" ); + }, + + // results is for internal usage only + makeArray: function( arr, results ) { + var ret = results || []; + + if ( arr != null ) { + if ( isArrayLike( Object( arr ) ) ) { + jQuery.merge( ret, + typeof arr === "string" ? + [ arr ] : arr + ); + } else { + push.call( ret, arr ); + } + } + + return ret; + }, + + inArray: function( elem, arr, i ) { + var len; + + if ( arr ) { + if ( indexOf ) { + return indexOf.call( arr, elem, i ); + } + + len = arr.length; + i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; + + for ( ; i < len; i++ ) { + + // Skip accessing in sparse arrays + if ( i in arr && arr[ i ] === elem ) { + return i; + } + } + } + + return -1; + }, + + merge: function( first, second ) { + var len = +second.length, + j = 0, + i = first.length; + + while ( j < len ) { + first[ i++ ] = second[ j++ ]; + } + + // Support: IE<9 + // Workaround casting of .length to NaN on otherwise arraylike objects (e.g., NodeLists) + if ( len !== len ) { + while ( second[ j ] !== undefined ) { + first[ i++ ] = second[ j++ ]; + } + } + + first.length = i; + + return first; + }, + + grep: function( elems, callback, invert ) { + var callbackInverse, + matches = [], + i = 0, + length = elems.length, + callbackExpect = !invert; + + // Go through the array, only saving the items + // that pass the validator function + for ( ; i < length; i++ ) { + callbackInverse = !callback( elems[ i ], i ); + if ( callbackInverse !== callbackExpect ) { + matches.push( elems[ i ] ); + } + } + + return matches; + }, + + // arg is for internal usage only + map: function( elems, callback, arg ) { + var length, value, + i = 0, + ret = []; + + // Go through the array, translating each of the items to their new values + if ( isArrayLike( elems ) ) { + length = elems.length; + for ( ; i < length; i++ ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret.push( value ); + } + } + + // Go through every key on the object, + } else { + for ( i in elems ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret.push( value ); + } + } + } + + // Flatten any nested arrays + return concat.apply( [], ret ); + }, + + // A global GUID counter for objects + guid: 1, + + // Bind a function to a context, optionally partially applying any + // arguments. + proxy: function( fn, context ) { + var args, proxy, tmp; + + if ( typeof context === "string" ) { + tmp = fn[ context ]; + context = fn; + fn = tmp; + } + + // Quick check to determine if target is callable, in the spec + // this throws a TypeError, but we will just return undefined. + if ( !jQuery.isFunction( fn ) ) { + return undefined; + } + + // Simulated bind + args = slice.call( arguments, 2 ); + proxy = function() { + return fn.apply( context || this, args.concat( slice.call( arguments ) ) ); + }; + + // Set the guid of unique handler to the same of original handler, so it can be removed + proxy.guid = fn.guid = fn.guid || jQuery.guid++; + + return proxy; + }, + + now: function() { + return +( new Date() ); + }, + + // jQuery.support is not used in Core but other projects attach their + // properties to it so it needs to exist. + support: support +} ); + +// JSHint would error on this code due to the Symbol not being defined in ES5. +// Defining this global in .jshintrc would create a danger of using the global +// unguarded in another place, it seems safer to just disable JSHint for these +// three lines. +/* jshint ignore: start */ +if ( typeof Symbol === "function" ) { + jQuery.fn[ Symbol.iterator ] = deletedIds[ Symbol.iterator ]; +} +/* jshint ignore: end */ + +// Populate the class2type map +jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), +function( i, name ) { + class2type[ "[object " + name + "]" ] = name.toLowerCase(); +} ); + +function isArrayLike( obj ) { + + // Support: iOS 8.2 (not reproducible in simulator) + // `in` check used to prevent JIT error (gh-2145) + // hasOwn isn't used here due to false negatives + // regarding Nodelist length in IE + var length = !!obj && "length" in obj && obj.length, + type = jQuery.type( obj ); + + if ( type === "function" || jQuery.isWindow( obj ) ) { + return false; + } + + return type === "array" || length === 0 || + typeof length === "number" && length > 0 && ( length - 1 ) in obj; +} +var Sizzle = +/*! + * Sizzle CSS Selector Engine v2.2.1 + * http://sizzlejs.com/ + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: 2015-10-17 + */ +(function( window ) { + +var i, + support, + Expr, + getText, + isXML, + tokenize, + compile, + select, + outermostContext, + sortInput, + hasDuplicate, + + // Local document vars + setDocument, + document, + docElem, + documentIsHTML, + rbuggyQSA, + rbuggyMatches, + matches, + contains, + + // Instance-specific data + expando = "sizzle" + 1 * new Date(), + preferredDoc = window.document, + dirruns = 0, + done = 0, + classCache = createCache(), + tokenCache = createCache(), + compilerCache = createCache(), + sortOrder = function( a, b ) { + if ( a === b ) { + hasDuplicate = true; + } + return 0; + }, + + // General-purpose constants + MAX_NEGATIVE = 1 << 31, + + // Instance methods + hasOwn = ({}).hasOwnProperty, + arr = [], + pop = arr.pop, + push_native = arr.push, + push = arr.push, + slice = arr.slice, + // Use a stripped-down indexOf as it's faster than native + // http://jsperf.com/thor-indexof-vs-for/5 + indexOf = function( list, elem ) { + var i = 0, + len = list.length; + for ( ; i < len; i++ ) { + if ( list[i] === elem ) { + return i; + } + } + return -1; + }, + + booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", + + // Regular expressions + + // http://www.w3.org/TR/css3-selectors/#whitespace + whitespace = "[\\x20\\t\\r\\n\\f]", + + // http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier + identifier = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", + + // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors + attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + + // Operator (capture 2) + "*([*^$|!~]?=)" + whitespace + + // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + + "*\\]", + + pseudos = ":(" + identifier + ")(?:\\((" + + // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: + // 1. quoted (capture 3; capture 4 or capture 5) + "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + + // 2. simple (capture 6) + "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + + // 3. anything else (capture 2) + ".*" + + ")\\)|)", + + // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter + rwhitespace = new RegExp( whitespace + "+", "g" ), + rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), + + rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), + rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), + + rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ), + + rpseudo = new RegExp( pseudos ), + ridentifier = new RegExp( "^" + identifier + "$" ), + + matchExpr = { + "ID": new RegExp( "^#(" + identifier + ")" ), + "CLASS": new RegExp( "^\\.(" + identifier + ")" ), + "TAG": new RegExp( "^(" + identifier + "|[*])" ), + "ATTR": new RegExp( "^" + attributes ), + "PSEUDO": new RegExp( "^" + pseudos ), + "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), + "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), + // For use in libraries implementing .is() + // We use this for POS matching in `select` + "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) + }, + + rinputs = /^(?:input|select|textarea|button)$/i, + rheader = /^h\d$/i, + + rnative = /^[^{]+\{\s*\[native \w/, + + // Easily-parseable/retrievable ID or TAG or CLASS selectors + rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, + + rsibling = /[+~]/, + rescape = /'|\\/g, + + // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters + runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), + funescape = function( _, escaped, escapedWhitespace ) { + var high = "0x" + escaped - 0x10000; + // NaN means non-codepoint + // Support: Firefox<24 + // Workaround erroneous numeric interpretation of +"0x" + return high !== high || escapedWhitespace ? + escaped : + high < 0 ? + // BMP codepoint + String.fromCharCode( high + 0x10000 ) : + // Supplemental Plane codepoint (surrogate pair) + String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); + }, + + // Used for iframes + // See setDocument() + // Removing the function wrapper causes a "Permission Denied" + // error in IE + unloadHandler = function() { + setDocument(); + }; + +// Optimize for push.apply( _, NodeList ) +try { + push.apply( + (arr = slice.call( preferredDoc.childNodes )), + preferredDoc.childNodes + ); + // Support: Android<4.0 + // Detect silently failing push.apply + arr[ preferredDoc.childNodes.length ].nodeType; +} catch ( e ) { + push = { apply: arr.length ? + + // Leverage slice if possible + function( target, els ) { + push_native.apply( target, slice.call(els) ); + } : + + // Support: IE<9 + // Otherwise append directly + function( target, els ) { + var j = target.length, + i = 0; + // Can't trust NodeList.length + while ( (target[j++] = els[i++]) ) {} + target.length = j - 1; + } + }; +} + +function Sizzle( selector, context, results, seed ) { + var m, i, elem, nid, nidselect, match, groups, newSelector, + newContext = context && context.ownerDocument, + + // nodeType defaults to 9, since context defaults to document + nodeType = context ? context.nodeType : 9; + + results = results || []; + + // Return early from calls with invalid selector or context + if ( typeof selector !== "string" || !selector || + nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { + + return results; + } + + // Try to shortcut find operations (as opposed to filters) in HTML documents + if ( !seed ) { + + if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { + setDocument( context ); + } + context = context || document; + + if ( documentIsHTML ) { + + // If the selector is sufficiently simple, try using a "get*By*" DOM method + // (excepting DocumentFragment context, where the methods don't exist) + if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) { + + // ID selector + if ( (m = match[1]) ) { + + // Document context + if ( nodeType === 9 ) { + if ( (elem = context.getElementById( m )) ) { + + // Support: IE, Opera, Webkit + // TODO: identify versions + // getElementById can match elements by name instead of ID + if ( elem.id === m ) { + results.push( elem ); + return results; + } + } else { + return results; + } + + // Element context + } else { + + // Support: IE, Opera, Webkit + // TODO: identify versions + // getElementById can match elements by name instead of ID + if ( newContext && (elem = newContext.getElementById( m )) && + contains( context, elem ) && + elem.id === m ) { + + results.push( elem ); + return results; + } + } + + // Type selector + } else if ( match[2] ) { + push.apply( results, context.getElementsByTagName( selector ) ); + return results; + + // Class selector + } else if ( (m = match[3]) && support.getElementsByClassName && + context.getElementsByClassName ) { + + push.apply( results, context.getElementsByClassName( m ) ); + return results; + } + } + + // Take advantage of querySelectorAll + if ( support.qsa && + !compilerCache[ selector + " " ] && + (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { + + if ( nodeType !== 1 ) { + newContext = context; + newSelector = selector; + + // qSA looks outside Element context, which is not what we want + // Thanks to Andrew Dupont for this workaround technique + // Support: IE <=8 + // Exclude object elements + } else if ( context.nodeName.toLowerCase() !== "object" ) { + + // Capture the context ID, setting it first if necessary + if ( (nid = context.getAttribute( "id" )) ) { + nid = nid.replace( rescape, "\\$&" ); + } else { + context.setAttribute( "id", (nid = expando) ); + } + + // Prefix every selector in the list + groups = tokenize( selector ); + i = groups.length; + nidselect = ridentifier.test( nid ) ? "#" + nid : "[id='" + nid + "']"; + while ( i-- ) { + groups[i] = nidselect + " " + toSelector( groups[i] ); + } + newSelector = groups.join( "," ); + + // Expand context for sibling selectors + newContext = rsibling.test( selector ) && testContext( context.parentNode ) || + context; + } + + if ( newSelector ) { + try { + push.apply( results, + newContext.querySelectorAll( newSelector ) + ); + return results; + } catch ( qsaError ) { + } finally { + if ( nid === expando ) { + context.removeAttribute( "id" ); + } + } + } + } + } + } + + // All others + return select( selector.replace( rtrim, "$1" ), context, results, seed ); +} + +/** + * Create key-value caches of limited size + * @returns {function(string, object)} Returns the Object data after storing it on itself with + * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) + * deleting the oldest entry + */ +function createCache() { + var keys = []; + + function cache( key, value ) { + // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) + if ( keys.push( key + " " ) > Expr.cacheLength ) { + // Only keep the most recent entries + delete cache[ keys.shift() ]; + } + return (cache[ key + " " ] = value); + } + return cache; +} + +/** + * Mark a function for special use by Sizzle + * @param {Function} fn The function to mark + */ +function markFunction( fn ) { + fn[ expando ] = true; + return fn; +} + +/** + * Support testing using an element + * @param {Function} fn Passed the created div and expects a boolean result + */ +function assert( fn ) { + var div = document.createElement("div"); + + try { + return !!fn( div ); + } catch (e) { + return false; + } finally { + // Remove from its parent by default + if ( div.parentNode ) { + div.parentNode.removeChild( div ); + } + // release memory in IE + div = null; + } +} + +/** + * Adds the same handler for all of the specified attrs + * @param {String} attrs Pipe-separated list of attributes + * @param {Function} handler The method that will be applied + */ +function addHandle( attrs, handler ) { + var arr = attrs.split("|"), + i = arr.length; + + while ( i-- ) { + Expr.attrHandle[ arr[i] ] = handler; + } +} + +/** + * Checks document order of two siblings + * @param {Element} a + * @param {Element} b + * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b + */ +function siblingCheck( a, b ) { + var cur = b && a, + diff = cur && a.nodeType === 1 && b.nodeType === 1 && + ( ~b.sourceIndex || MAX_NEGATIVE ) - + ( ~a.sourceIndex || MAX_NEGATIVE ); + + // Use IE sourceIndex if available on both nodes + if ( diff ) { + return diff; + } + + // Check if b follows a + if ( cur ) { + while ( (cur = cur.nextSibling) ) { + if ( cur === b ) { + return -1; + } + } + } + + return a ? 1 : -1; +} + +/** + * Returns a function to use in pseudos for input types + * @param {String} type + */ +function createInputPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for buttons + * @param {String} type + */ +function createButtonPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return (name === "input" || name === "button") && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for positionals + * @param {Function} fn + */ +function createPositionalPseudo( fn ) { + return markFunction(function( argument ) { + argument = +argument; + return markFunction(function( seed, matches ) { + var j, + matchIndexes = fn( [], seed.length, argument ), + i = matchIndexes.length; + + // Match elements found at the specified indexes + while ( i-- ) { + if ( seed[ (j = matchIndexes[i]) ] ) { + seed[j] = !(matches[j] = seed[j]); + } + } + }); + }); +} + +/** + * Checks a node for validity as a Sizzle context + * @param {Element|Object=} context + * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value + */ +function testContext( context ) { + return context && typeof context.getElementsByTagName !== "undefined" && context; +} + +// Expose support vars for convenience +support = Sizzle.support = {}; + +/** + * Detects XML nodes + * @param {Element|Object} elem An element or a document + * @returns {Boolean} True iff elem is a non-HTML XML node + */ +isXML = Sizzle.isXML = function( elem ) { + // documentElement is verified for cases where it doesn't yet exist + // (such as loading iframes in IE - #4833) + var documentElement = elem && (elem.ownerDocument || elem).documentElement; + return documentElement ? documentElement.nodeName !== "HTML" : false; +}; + +/** + * Sets document-related variables once based on the current document + * @param {Element|Object} [doc] An element or document object to use to set the document + * @returns {Object} Returns the current document + */ +setDocument = Sizzle.setDocument = function( node ) { + var hasCompare, parent, + doc = node ? node.ownerDocument || node : preferredDoc; + + // Return early if doc is invalid or already selected + if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { + return document; + } + + // Update global variables + document = doc; + docElem = document.documentElement; + documentIsHTML = !isXML( document ); + + // Support: IE 9-11, Edge + // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936) + if ( (parent = document.defaultView) && parent.top !== parent ) { + // Support: IE 11 + if ( parent.addEventListener ) { + parent.addEventListener( "unload", unloadHandler, false ); + + // Support: IE 9 - 10 only + } else if ( parent.attachEvent ) { + parent.attachEvent( "onunload", unloadHandler ); + } + } + + /* Attributes + ---------------------------------------------------------------------- */ + + // Support: IE<8 + // Verify that getAttribute really returns attributes and not properties + // (excepting IE8 booleans) + support.attributes = assert(function( div ) { + div.className = "i"; + return !div.getAttribute("className"); + }); + + /* getElement(s)By* + ---------------------------------------------------------------------- */ + + // Check if getElementsByTagName("*") returns only elements + support.getElementsByTagName = assert(function( div ) { + div.appendChild( document.createComment("") ); + return !div.getElementsByTagName("*").length; + }); + + // Support: IE<9 + support.getElementsByClassName = rnative.test( document.getElementsByClassName ); + + // Support: IE<10 + // Check if getElementById returns elements by name + // The broken getElementById methods don't pick up programatically-set names, + // so use a roundabout getElementsByName test + support.getById = assert(function( div ) { + docElem.appendChild( div ).id = expando; + return !document.getElementsByName || !document.getElementsByName( expando ).length; + }); + + // ID find and filter + if ( support.getById ) { + Expr.find["ID"] = function( id, context ) { + if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { + var m = context.getElementById( id ); + return m ? [ m ] : []; + } + }; + Expr.filter["ID"] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + return elem.getAttribute("id") === attrId; + }; + }; + } else { + // Support: IE6/7 + // getElementById is not reliable as a find shortcut + delete Expr.find["ID"]; + + Expr.filter["ID"] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + var node = typeof elem.getAttributeNode !== "undefined" && + elem.getAttributeNode("id"); + return node && node.value === attrId; + }; + }; + } + + // Tag + Expr.find["TAG"] = support.getElementsByTagName ? + function( tag, context ) { + if ( typeof context.getElementsByTagName !== "undefined" ) { + return context.getElementsByTagName( tag ); + + // DocumentFragment nodes don't have gEBTN + } else if ( support.qsa ) { + return context.querySelectorAll( tag ); + } + } : + + function( tag, context ) { + var elem, + tmp = [], + i = 0, + // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too + results = context.getElementsByTagName( tag ); + + // Filter out possible comments + if ( tag === "*" ) { + while ( (elem = results[i++]) ) { + if ( elem.nodeType === 1 ) { + tmp.push( elem ); + } + } + + return tmp; + } + return results; + }; + + // Class + Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { + if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) { + return context.getElementsByClassName( className ); + } + }; + + /* QSA/matchesSelector + ---------------------------------------------------------------------- */ + + // QSA and matchesSelector support + + // matchesSelector(:active) reports false when true (IE9/Opera 11.5) + rbuggyMatches = []; + + // qSa(:focus) reports false when true (Chrome 21) + // We allow this because of a bug in IE8/9 that throws an error + // whenever `document.activeElement` is accessed on an iframe + // So, we allow :focus to pass through QSA all the time to avoid the IE error + // See http://bugs.jquery.com/ticket/13378 + rbuggyQSA = []; + + if ( (support.qsa = rnative.test( document.querySelectorAll )) ) { + // Build QSA regex + // Regex strategy adopted from Diego Perini + assert(function( div ) { + // Select is set to empty string on purpose + // This is to test IE's treatment of not explicitly + // setting a boolean content attribute, + // since its presence should be enough + // http://bugs.jquery.com/ticket/12359 + docElem.appendChild( div ).innerHTML = "" + + ""; + + // Support: IE8, Opera 11-12.16 + // Nothing should be selected when empty strings follow ^= or $= or *= + // The test attribute must be unknown in Opera but "safe" for WinRT + // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section + if ( div.querySelectorAll("[msallowcapture^='']").length ) { + rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); + } + + // Support: IE8 + // Boolean attributes and "value" are not treated correctly + if ( !div.querySelectorAll("[selected]").length ) { + rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); + } + + // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+ + if ( !div.querySelectorAll( "[id~=" + expando + "-]" ).length ) { + rbuggyQSA.push("~="); + } + + // Webkit/Opera - :checked should return selected option elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + // IE8 throws error here and will not see later tests + if ( !div.querySelectorAll(":checked").length ) { + rbuggyQSA.push(":checked"); + } + + // Support: Safari 8+, iOS 8+ + // https://bugs.webkit.org/show_bug.cgi?id=136851 + // In-page `selector#id sibing-combinator selector` fails + if ( !div.querySelectorAll( "a#" + expando + "+*" ).length ) { + rbuggyQSA.push(".#.+[+~]"); + } + }); + + assert(function( div ) { + // Support: Windows 8 Native Apps + // The type and name attributes are restricted during .innerHTML assignment + var input = document.createElement("input"); + input.setAttribute( "type", "hidden" ); + div.appendChild( input ).setAttribute( "name", "D" ); + + // Support: IE8 + // Enforce case-sensitivity of name attribute + if ( div.querySelectorAll("[name=d]").length ) { + rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); + } + + // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) + // IE8 throws error here and will not see later tests + if ( !div.querySelectorAll(":enabled").length ) { + rbuggyQSA.push( ":enabled", ":disabled" ); + } + + // Opera 10-11 does not throw on post-comma invalid pseudos + div.querySelectorAll("*,:x"); + rbuggyQSA.push(",.*:"); + }); + } + + if ( (support.matchesSelector = rnative.test( (matches = docElem.matches || + docElem.webkitMatchesSelector || + docElem.mozMatchesSelector || + docElem.oMatchesSelector || + docElem.msMatchesSelector) )) ) { + + assert(function( div ) { + // Check to see if it's possible to do matchesSelector + // on a disconnected node (IE 9) + support.disconnectedMatch = matches.call( div, "div" ); + + // This should fail with an exception + // Gecko does not error, returns false instead + matches.call( div, "[s!='']:x" ); + rbuggyMatches.push( "!=", pseudos ); + }); + } + + rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); + rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); + + /* Contains + ---------------------------------------------------------------------- */ + hasCompare = rnative.test( docElem.compareDocumentPosition ); + + // Element contains another + // Purposefully self-exclusive + // As in, an element does not contain itself + contains = hasCompare || rnative.test( docElem.contains ) ? + function( a, b ) { + var adown = a.nodeType === 9 ? a.documentElement : a, + bup = b && b.parentNode; + return a === bup || !!( bup && bup.nodeType === 1 && ( + adown.contains ? + adown.contains( bup ) : + a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 + )); + } : + function( a, b ) { + if ( b ) { + while ( (b = b.parentNode) ) { + if ( b === a ) { + return true; + } + } + } + return false; + }; + + /* Sorting + ---------------------------------------------------------------------- */ + + // Document order sorting + sortOrder = hasCompare ? + function( a, b ) { + + // Flag for duplicate removal + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + // Sort on method existence if only one input has compareDocumentPosition + var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; + if ( compare ) { + return compare; + } + + // Calculate position if both inputs belong to the same document + compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ? + a.compareDocumentPosition( b ) : + + // Otherwise we know they are disconnected + 1; + + // Disconnected nodes + if ( compare & 1 || + (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { + + // Choose the first element that is related to our preferred document + if ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) { + return -1; + } + if ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) { + return 1; + } + + // Maintain original order + return sortInput ? + ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : + 0; + } + + return compare & 4 ? -1 : 1; + } : + function( a, b ) { + // Exit early if the nodes are identical + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + var cur, + i = 0, + aup = a.parentNode, + bup = b.parentNode, + ap = [ a ], + bp = [ b ]; + + // Parentless nodes are either documents or disconnected + if ( !aup || !bup ) { + return a === document ? -1 : + b === document ? 1 : + aup ? -1 : + bup ? 1 : + sortInput ? + ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : + 0; + + // If the nodes are siblings, we can do a quick check + } else if ( aup === bup ) { + return siblingCheck( a, b ); + } + + // Otherwise we need full lists of their ancestors for comparison + cur = a; + while ( (cur = cur.parentNode) ) { + ap.unshift( cur ); + } + cur = b; + while ( (cur = cur.parentNode) ) { + bp.unshift( cur ); + } + + // Walk down the tree looking for a discrepancy + while ( ap[i] === bp[i] ) { + i++; + } + + return i ? + // Do a sibling check if the nodes have a common ancestor + siblingCheck( ap[i], bp[i] ) : + + // Otherwise nodes in our document sort first + ap[i] === preferredDoc ? -1 : + bp[i] === preferredDoc ? 1 : + 0; + }; + + return document; +}; + +Sizzle.matches = function( expr, elements ) { + return Sizzle( expr, null, null, elements ); +}; + +Sizzle.matchesSelector = function( elem, expr ) { + // Set document vars if needed + if ( ( elem.ownerDocument || elem ) !== document ) { + setDocument( elem ); + } + + // Make sure that attribute selectors are quoted + expr = expr.replace( rattributeQuotes, "='$1']" ); + + if ( support.matchesSelector && documentIsHTML && + !compilerCache[ expr + " " ] && + ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && + ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { + + try { + var ret = matches.call( elem, expr ); + + // IE 9's matchesSelector returns false on disconnected nodes + if ( ret || support.disconnectedMatch || + // As well, disconnected nodes are said to be in a document + // fragment in IE 9 + elem.document && elem.document.nodeType !== 11 ) { + return ret; + } + } catch (e) {} + } + + return Sizzle( expr, document, null, [ elem ] ).length > 0; +}; + +Sizzle.contains = function( context, elem ) { + // Set document vars if needed + if ( ( context.ownerDocument || context ) !== document ) { + setDocument( context ); + } + return contains( context, elem ); +}; + +Sizzle.attr = function( elem, name ) { + // Set document vars if needed + if ( ( elem.ownerDocument || elem ) !== document ) { + setDocument( elem ); + } + + var fn = Expr.attrHandle[ name.toLowerCase() ], + // Don't get fooled by Object.prototype properties (jQuery #13807) + val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? + fn( elem, name, !documentIsHTML ) : + undefined; + + return val !== undefined ? + val : + support.attributes || !documentIsHTML ? + elem.getAttribute( name ) : + (val = elem.getAttributeNode(name)) && val.specified ? + val.value : + null; +}; + +Sizzle.error = function( msg ) { + throw new Error( "Syntax error, unrecognized expression: " + msg ); +}; + +/** + * Document sorting and removing duplicates + * @param {ArrayLike} results + */ +Sizzle.uniqueSort = function( results ) { + var elem, + duplicates = [], + j = 0, + i = 0; + + // Unless we *know* we can detect duplicates, assume their presence + hasDuplicate = !support.detectDuplicates; + sortInput = !support.sortStable && results.slice( 0 ); + results.sort( sortOrder ); + + if ( hasDuplicate ) { + while ( (elem = results[i++]) ) { + if ( elem === results[ i ] ) { + j = duplicates.push( i ); + } + } + while ( j-- ) { + results.splice( duplicates[ j ], 1 ); + } + } + + // Clear input after sorting to release objects + // See https://github.com/jquery/sizzle/pull/225 + sortInput = null; + + return results; +}; + +/** + * Utility function for retrieving the text value of an array of DOM nodes + * @param {Array|Element} elem + */ +getText = Sizzle.getText = function( elem ) { + var node, + ret = "", + i = 0, + nodeType = elem.nodeType; + + if ( !nodeType ) { + // If no nodeType, this is expected to be an array + while ( (node = elem[i++]) ) { + // Do not traverse comment nodes + ret += getText( node ); + } + } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { + // Use textContent for elements + // innerText usage removed for consistency of new lines (jQuery #11153) + if ( typeof elem.textContent === "string" ) { + return elem.textContent; + } else { + // Traverse its children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + ret += getText( elem ); + } + } + } else if ( nodeType === 3 || nodeType === 4 ) { + return elem.nodeValue; + } + // Do not include comment or processing instruction nodes + + return ret; +}; + +Expr = Sizzle.selectors = { + + // Can be adjusted by the user + cacheLength: 50, + + createPseudo: markFunction, + + match: matchExpr, + + attrHandle: {}, + + find: {}, + + relative: { + ">": { dir: "parentNode", first: true }, + " ": { dir: "parentNode" }, + "+": { dir: "previousSibling", first: true }, + "~": { dir: "previousSibling" } + }, + + preFilter: { + "ATTR": function( match ) { + match[1] = match[1].replace( runescape, funescape ); + + // Move the given value to match[3] whether quoted or unquoted + match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape ); + + if ( match[2] === "~=" ) { + match[3] = " " + match[3] + " "; + } + + return match.slice( 0, 4 ); + }, + + "CHILD": function( match ) { + /* matches from matchExpr["CHILD"] + 1 type (only|nth|...) + 2 what (child|of-type) + 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) + 4 xn-component of xn+y argument ([+-]?\d*n|) + 5 sign of xn-component + 6 x of xn-component + 7 sign of y-component + 8 y of y-component + */ + match[1] = match[1].toLowerCase(); + + if ( match[1].slice( 0, 3 ) === "nth" ) { + // nth-* requires argument + if ( !match[3] ) { + Sizzle.error( match[0] ); + } + + // numeric x and y parameters for Expr.filter.CHILD + // remember that false/true cast respectively to 0/1 + match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); + match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); + + // other types prohibit arguments + } else if ( match[3] ) { + Sizzle.error( match[0] ); + } + + return match; + }, + + "PSEUDO": function( match ) { + var excess, + unquoted = !match[6] && match[2]; + + if ( matchExpr["CHILD"].test( match[0] ) ) { + return null; + } + + // Accept quoted arguments as-is + if ( match[3] ) { + match[2] = match[4] || match[5] || ""; + + // Strip excess characters from unquoted arguments + } else if ( unquoted && rpseudo.test( unquoted ) && + // Get excess from tokenize (recursively) + (excess = tokenize( unquoted, true )) && + // advance to the next closing parenthesis + (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { + + // excess is a negative index + match[0] = match[0].slice( 0, excess ); + match[2] = unquoted.slice( 0, excess ); + } + + // Return only captures needed by the pseudo filter method (type and argument) + return match.slice( 0, 3 ); + } + }, + + filter: { + + "TAG": function( nodeNameSelector ) { + var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); + return nodeNameSelector === "*" ? + function() { return true; } : + function( elem ) { + return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; + }; + }, + + "CLASS": function( className ) { + var pattern = classCache[ className + " " ]; + + return pattern || + (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && + classCache( className, function( elem ) { + return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" ); + }); + }, + + "ATTR": function( name, operator, check ) { + return function( elem ) { + var result = Sizzle.attr( elem, name ); + + if ( result == null ) { + return operator === "!="; + } + if ( !operator ) { + return true; + } + + result += ""; + + return operator === "=" ? result === check : + operator === "!=" ? result !== check : + operator === "^=" ? check && result.indexOf( check ) === 0 : + operator === "*=" ? check && result.indexOf( check ) > -1 : + operator === "$=" ? check && result.slice( -check.length ) === check : + operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 : + operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : + false; + }; + }, + + "CHILD": function( type, what, argument, first, last ) { + var simple = type.slice( 0, 3 ) !== "nth", + forward = type.slice( -4 ) !== "last", + ofType = what === "of-type"; + + return first === 1 && last === 0 ? + + // Shortcut for :nth-*(n) + function( elem ) { + return !!elem.parentNode; + } : + + function( elem, context, xml ) { + var cache, uniqueCache, outerCache, node, nodeIndex, start, + dir = simple !== forward ? "nextSibling" : "previousSibling", + parent = elem.parentNode, + name = ofType && elem.nodeName.toLowerCase(), + useCache = !xml && !ofType, + diff = false; + + if ( parent ) { + + // :(first|last|only)-(child|of-type) + if ( simple ) { + while ( dir ) { + node = elem; + while ( (node = node[ dir ]) ) { + if ( ofType ? + node.nodeName.toLowerCase() === name : + node.nodeType === 1 ) { + + return false; + } + } + // Reverse direction for :only-* (if we haven't yet done so) + start = dir = type === "only" && !start && "nextSibling"; + } + return true; + } + + start = [ forward ? parent.firstChild : parent.lastChild ]; + + // non-xml :nth-child(...) stores cache data on `parent` + if ( forward && useCache ) { + + // Seek `elem` from a previously-cached index + + // ...in a gzip-friendly way + node = parent; + outerCache = node[ expando ] || (node[ expando ] = {}); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ node.uniqueID ] || + (outerCache[ node.uniqueID ] = {}); + + cache = uniqueCache[ type ] || []; + nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; + diff = nodeIndex && cache[ 2 ]; + node = nodeIndex && parent.childNodes[ nodeIndex ]; + + while ( (node = ++nodeIndex && node && node[ dir ] || + + // Fallback to seeking `elem` from the start + (diff = nodeIndex = 0) || start.pop()) ) { + + // When found, cache indexes on `parent` and break + if ( node.nodeType === 1 && ++diff && node === elem ) { + uniqueCache[ type ] = [ dirruns, nodeIndex, diff ]; + break; + } + } + + } else { + // Use previously-cached element index if available + if ( useCache ) { + // ...in a gzip-friendly way + node = elem; + outerCache = node[ expando ] || (node[ expando ] = {}); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ node.uniqueID ] || + (outerCache[ node.uniqueID ] = {}); + + cache = uniqueCache[ type ] || []; + nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; + diff = nodeIndex; + } + + // xml :nth-child(...) + // or :nth-last-child(...) or :nth(-last)?-of-type(...) + if ( diff === false ) { + // Use the same loop as above to seek `elem` from the start + while ( (node = ++nodeIndex && node && node[ dir ] || + (diff = nodeIndex = 0) || start.pop()) ) { + + if ( ( ofType ? + node.nodeName.toLowerCase() === name : + node.nodeType === 1 ) && + ++diff ) { + + // Cache the index of each encountered element + if ( useCache ) { + outerCache = node[ expando ] || (node[ expando ] = {}); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ node.uniqueID ] || + (outerCache[ node.uniqueID ] = {}); + + uniqueCache[ type ] = [ dirruns, diff ]; + } + + if ( node === elem ) { + break; + } + } + } + } + } + + // Incorporate the offset, then check against cycle size + diff -= last; + return diff === first || ( diff % first === 0 && diff / first >= 0 ); + } + }; + }, + + "PSEUDO": function( pseudo, argument ) { + // pseudo-class names are case-insensitive + // http://www.w3.org/TR/selectors/#pseudo-classes + // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters + // Remember that setFilters inherits from pseudos + var args, + fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || + Sizzle.error( "unsupported pseudo: " + pseudo ); + + // The user may use createPseudo to indicate that + // arguments are needed to create the filter function + // just as Sizzle does + if ( fn[ expando ] ) { + return fn( argument ); + } + + // But maintain support for old signatures + if ( fn.length > 1 ) { + args = [ pseudo, pseudo, "", argument ]; + return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? + markFunction(function( seed, matches ) { + var idx, + matched = fn( seed, argument ), + i = matched.length; + while ( i-- ) { + idx = indexOf( seed, matched[i] ); + seed[ idx ] = !( matches[ idx ] = matched[i] ); + } + }) : + function( elem ) { + return fn( elem, 0, args ); + }; + } + + return fn; + } + }, + + pseudos: { + // Potentially complex pseudos + "not": markFunction(function( selector ) { + // Trim the selector passed to compile + // to avoid treating leading and trailing + // spaces as combinators + var input = [], + results = [], + matcher = compile( selector.replace( rtrim, "$1" ) ); + + return matcher[ expando ] ? + markFunction(function( seed, matches, context, xml ) { + var elem, + unmatched = matcher( seed, null, xml, [] ), + i = seed.length; + + // Match elements unmatched by `matcher` + while ( i-- ) { + if ( (elem = unmatched[i]) ) { + seed[i] = !(matches[i] = elem); + } + } + }) : + function( elem, context, xml ) { + input[0] = elem; + matcher( input, null, xml, results ); + // Don't keep the element (issue #299) + input[0] = null; + return !results.pop(); + }; + }), + + "has": markFunction(function( selector ) { + return function( elem ) { + return Sizzle( selector, elem ).length > 0; + }; + }), + + "contains": markFunction(function( text ) { + text = text.replace( runescape, funescape ); + return function( elem ) { + return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; + }; + }), + + // "Whether an element is represented by a :lang() selector + // is based solely on the element's language value + // being equal to the identifier C, + // or beginning with the identifier C immediately followed by "-". + // The matching of C against the element's language value is performed case-insensitively. + // The identifier C does not have to be a valid language name." + // http://www.w3.org/TR/selectors/#lang-pseudo + "lang": markFunction( function( lang ) { + // lang value must be a valid identifier + if ( !ridentifier.test(lang || "") ) { + Sizzle.error( "unsupported lang: " + lang ); + } + lang = lang.replace( runescape, funescape ).toLowerCase(); + return function( elem ) { + var elemLang; + do { + if ( (elemLang = documentIsHTML ? + elem.lang : + elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { + + elemLang = elemLang.toLowerCase(); + return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; + } + } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); + return false; + }; + }), + + // Miscellaneous + "target": function( elem ) { + var hash = window.location && window.location.hash; + return hash && hash.slice( 1 ) === elem.id; + }, + + "root": function( elem ) { + return elem === docElem; + }, + + "focus": function( elem ) { + return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); + }, + + // Boolean properties + "enabled": function( elem ) { + return elem.disabled === false; + }, + + "disabled": function( elem ) { + return elem.disabled === true; + }, + + "checked": function( elem ) { + // In CSS3, :checked should return both checked and selected elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + var nodeName = elem.nodeName.toLowerCase(); + return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); + }, + + "selected": function( elem ) { + // Accessing this property makes selected-by-default + // options in Safari work properly + if ( elem.parentNode ) { + elem.parentNode.selectedIndex; + } + + return elem.selected === true; + }, + + // Contents + "empty": function( elem ) { + // http://www.w3.org/TR/selectors/#empty-pseudo + // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), + // but not by others (comment: 8; processing instruction: 7; etc.) + // nodeType < 6 works because attributes (2) do not appear as children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + if ( elem.nodeType < 6 ) { + return false; + } + } + return true; + }, + + "parent": function( elem ) { + return !Expr.pseudos["empty"]( elem ); + }, + + // Element/input types + "header": function( elem ) { + return rheader.test( elem.nodeName ); + }, + + "input": function( elem ) { + return rinputs.test( elem.nodeName ); + }, + + "button": function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === "button" || name === "button"; + }, + + "text": function( elem ) { + var attr; + return elem.nodeName.toLowerCase() === "input" && + elem.type === "text" && + + // Support: IE<8 + // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" + ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" ); + }, + + // Position-in-collection + "first": createPositionalPseudo(function() { + return [ 0 ]; + }), + + "last": createPositionalPseudo(function( matchIndexes, length ) { + return [ length - 1 ]; + }), + + "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { + return [ argument < 0 ? argument + length : argument ]; + }), + + "even": createPositionalPseudo(function( matchIndexes, length ) { + var i = 0; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "odd": createPositionalPseudo(function( matchIndexes, length ) { + var i = 1; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; --i >= 0; ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; ++i < length; ) { + matchIndexes.push( i ); + } + return matchIndexes; + }) + } +}; + +Expr.pseudos["nth"] = Expr.pseudos["eq"]; + +// Add button/input type pseudos +for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { + Expr.pseudos[ i ] = createInputPseudo( i ); +} +for ( i in { submit: true, reset: true } ) { + Expr.pseudos[ i ] = createButtonPseudo( i ); +} + +// Easy API for creating new setFilters +function setFilters() {} +setFilters.prototype = Expr.filters = Expr.pseudos; +Expr.setFilters = new setFilters(); + +tokenize = Sizzle.tokenize = function( selector, parseOnly ) { + var matched, match, tokens, type, + soFar, groups, preFilters, + cached = tokenCache[ selector + " " ]; + + if ( cached ) { + return parseOnly ? 0 : cached.slice( 0 ); + } + + soFar = selector; + groups = []; + preFilters = Expr.preFilter; + + while ( soFar ) { + + // Comma and first run + if ( !matched || (match = rcomma.exec( soFar )) ) { + if ( match ) { + // Don't consume trailing commas as valid + soFar = soFar.slice( match[0].length ) || soFar; + } + groups.push( (tokens = []) ); + } + + matched = false; + + // Combinators + if ( (match = rcombinators.exec( soFar )) ) { + matched = match.shift(); + tokens.push({ + value: matched, + // Cast descendant combinators to space + type: match[0].replace( rtrim, " " ) + }); + soFar = soFar.slice( matched.length ); + } + + // Filters + for ( type in Expr.filter ) { + if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || + (match = preFilters[ type ]( match ))) ) { + matched = match.shift(); + tokens.push({ + value: matched, + type: type, + matches: match + }); + soFar = soFar.slice( matched.length ); + } + } + + if ( !matched ) { + break; + } + } + + // Return the length of the invalid excess + // if we're just parsing + // Otherwise, throw an error or return tokens + return parseOnly ? + soFar.length : + soFar ? + Sizzle.error( selector ) : + // Cache the tokens + tokenCache( selector, groups ).slice( 0 ); +}; + +function toSelector( tokens ) { + var i = 0, + len = tokens.length, + selector = ""; + for ( ; i < len; i++ ) { + selector += tokens[i].value; + } + return selector; +} + +function addCombinator( matcher, combinator, base ) { + var dir = combinator.dir, + checkNonElements = base && dir === "parentNode", + doneName = done++; + + return combinator.first ? + // Check against closest ancestor/preceding element + function( elem, context, xml ) { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + return matcher( elem, context, xml ); + } + } + } : + + // Check against all ancestor/preceding elements + function( elem, context, xml ) { + var oldCache, uniqueCache, outerCache, + newCache = [ dirruns, doneName ]; + + // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching + if ( xml ) { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + if ( matcher( elem, context, xml ) ) { + return true; + } + } + } + } else { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + outerCache = elem[ expando ] || (elem[ expando ] = {}); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {}); + + if ( (oldCache = uniqueCache[ dir ]) && + oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { + + // Assign to newCache so results back-propagate to previous elements + return (newCache[ 2 ] = oldCache[ 2 ]); + } else { + // Reuse newcache so results back-propagate to previous elements + uniqueCache[ dir ] = newCache; + + // A match means we're done; a fail means we have to keep checking + if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) { + return true; + } + } + } + } + } + }; +} + +function elementMatcher( matchers ) { + return matchers.length > 1 ? + function( elem, context, xml ) { + var i = matchers.length; + while ( i-- ) { + if ( !matchers[i]( elem, context, xml ) ) { + return false; + } + } + return true; + } : + matchers[0]; +} + +function multipleContexts( selector, contexts, results ) { + var i = 0, + len = contexts.length; + for ( ; i < len; i++ ) { + Sizzle( selector, contexts[i], results ); + } + return results; +} + +function condense( unmatched, map, filter, context, xml ) { + var elem, + newUnmatched = [], + i = 0, + len = unmatched.length, + mapped = map != null; + + for ( ; i < len; i++ ) { + if ( (elem = unmatched[i]) ) { + if ( !filter || filter( elem, context, xml ) ) { + newUnmatched.push( elem ); + if ( mapped ) { + map.push( i ); + } + } + } + } + + return newUnmatched; +} + +function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { + if ( postFilter && !postFilter[ expando ] ) { + postFilter = setMatcher( postFilter ); + } + if ( postFinder && !postFinder[ expando ] ) { + postFinder = setMatcher( postFinder, postSelector ); + } + return markFunction(function( seed, results, context, xml ) { + var temp, i, elem, + preMap = [], + postMap = [], + preexisting = results.length, + + // Get initial elements from seed or context + elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), + + // Prefilter to get matcher input, preserving a map for seed-results synchronization + matcherIn = preFilter && ( seed || !selector ) ? + condense( elems, preMap, preFilter, context, xml ) : + elems, + + matcherOut = matcher ? + // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, + postFinder || ( seed ? preFilter : preexisting || postFilter ) ? + + // ...intermediate processing is necessary + [] : + + // ...otherwise use results directly + results : + matcherIn; + + // Find primary matches + if ( matcher ) { + matcher( matcherIn, matcherOut, context, xml ); + } + + // Apply postFilter + if ( postFilter ) { + temp = condense( matcherOut, postMap ); + postFilter( temp, [], context, xml ); + + // Un-match failing elements by moving them back to matcherIn + i = temp.length; + while ( i-- ) { + if ( (elem = temp[i]) ) { + matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); + } + } + } + + if ( seed ) { + if ( postFinder || preFilter ) { + if ( postFinder ) { + // Get the final matcherOut by condensing this intermediate into postFinder contexts + temp = []; + i = matcherOut.length; + while ( i-- ) { + if ( (elem = matcherOut[i]) ) { + // Restore matcherIn since elem is not yet a final match + temp.push( (matcherIn[i] = elem) ); + } + } + postFinder( null, (matcherOut = []), temp, xml ); + } + + // Move matched elements from seed to results to keep them synchronized + i = matcherOut.length; + while ( i-- ) { + if ( (elem = matcherOut[i]) && + (temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) { + + seed[temp] = !(results[temp] = elem); + } + } + } + + // Add elements to results, through postFinder if defined + } else { + matcherOut = condense( + matcherOut === results ? + matcherOut.splice( preexisting, matcherOut.length ) : + matcherOut + ); + if ( postFinder ) { + postFinder( null, results, matcherOut, xml ); + } else { + push.apply( results, matcherOut ); + } + } + }); +} + +function matcherFromTokens( tokens ) { + var checkContext, matcher, j, + len = tokens.length, + leadingRelative = Expr.relative[ tokens[0].type ], + implicitRelative = leadingRelative || Expr.relative[" "], + i = leadingRelative ? 1 : 0, + + // The foundational matcher ensures that elements are reachable from top-level context(s) + matchContext = addCombinator( function( elem ) { + return elem === checkContext; + }, implicitRelative, true ), + matchAnyContext = addCombinator( function( elem ) { + return indexOf( checkContext, elem ) > -1; + }, implicitRelative, true ), + matchers = [ function( elem, context, xml ) { + var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( + (checkContext = context).nodeType ? + matchContext( elem, context, xml ) : + matchAnyContext( elem, context, xml ) ); + // Avoid hanging onto element (issue #299) + checkContext = null; + return ret; + } ]; + + for ( ; i < len; i++ ) { + if ( (matcher = Expr.relative[ tokens[i].type ]) ) { + matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; + } else { + matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); + + // Return special upon seeing a positional matcher + if ( matcher[ expando ] ) { + // Find the next relative operator (if any) for proper handling + j = ++i; + for ( ; j < len; j++ ) { + if ( Expr.relative[ tokens[j].type ] ) { + break; + } + } + return setMatcher( + i > 1 && elementMatcher( matchers ), + i > 1 && toSelector( + // If the preceding token was a descendant combinator, insert an implicit any-element `*` + tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) + ).replace( rtrim, "$1" ), + matcher, + i < j && matcherFromTokens( tokens.slice( i, j ) ), + j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), + j < len && toSelector( tokens ) + ); + } + matchers.push( matcher ); + } + } + + return elementMatcher( matchers ); +} + +function matcherFromGroupMatchers( elementMatchers, setMatchers ) { + var bySet = setMatchers.length > 0, + byElement = elementMatchers.length > 0, + superMatcher = function( seed, context, xml, results, outermost ) { + var elem, j, matcher, + matchedCount = 0, + i = "0", + unmatched = seed && [], + setMatched = [], + contextBackup = outermostContext, + // We must always have either seed elements or outermost context + elems = seed || byElement && Expr.find["TAG"]( "*", outermost ), + // Use integer dirruns iff this is the outermost matcher + dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1), + len = elems.length; + + if ( outermost ) { + outermostContext = context === document || context || outermost; + } + + // Add elements passing elementMatchers directly to results + // Support: IE<9, Safari + // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id + for ( ; i !== len && (elem = elems[i]) != null; i++ ) { + if ( byElement && elem ) { + j = 0; + if ( !context && elem.ownerDocument !== document ) { + setDocument( elem ); + xml = !documentIsHTML; + } + while ( (matcher = elementMatchers[j++]) ) { + if ( matcher( elem, context || document, xml) ) { + results.push( elem ); + break; + } + } + if ( outermost ) { + dirruns = dirrunsUnique; + } + } + + // Track unmatched elements for set filters + if ( bySet ) { + // They will have gone through all possible matchers + if ( (elem = !matcher && elem) ) { + matchedCount--; + } + + // Lengthen the array for every element, matched or not + if ( seed ) { + unmatched.push( elem ); + } + } + } + + // `i` is now the count of elements visited above, and adding it to `matchedCount` + // makes the latter nonnegative. + matchedCount += i; + + // Apply set filters to unmatched elements + // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount` + // equals `i`), unless we didn't visit _any_ elements in the above loop because we have + // no element matchers and no seed. + // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that + // case, which will result in a "00" `matchedCount` that differs from `i` but is also + // numerically zero. + if ( bySet && i !== matchedCount ) { + j = 0; + while ( (matcher = setMatchers[j++]) ) { + matcher( unmatched, setMatched, context, xml ); + } + + if ( seed ) { + // Reintegrate element matches to eliminate the need for sorting + if ( matchedCount > 0 ) { + while ( i-- ) { + if ( !(unmatched[i] || setMatched[i]) ) { + setMatched[i] = pop.call( results ); + } + } + } + + // Discard index placeholder values to get only actual matches + setMatched = condense( setMatched ); + } + + // Add matches to results + push.apply( results, setMatched ); + + // Seedless set matches succeeding multiple successful matchers stipulate sorting + if ( outermost && !seed && setMatched.length > 0 && + ( matchedCount + setMatchers.length ) > 1 ) { + + Sizzle.uniqueSort( results ); + } + } + + // Override manipulation of globals by nested matchers + if ( outermost ) { + dirruns = dirrunsUnique; + outermostContext = contextBackup; + } + + return unmatched; + }; + + return bySet ? + markFunction( superMatcher ) : + superMatcher; +} + +compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { + var i, + setMatchers = [], + elementMatchers = [], + cached = compilerCache[ selector + " " ]; + + if ( !cached ) { + // Generate a function of recursive functions that can be used to check each element + if ( !match ) { + match = tokenize( selector ); + } + i = match.length; + while ( i-- ) { + cached = matcherFromTokens( match[i] ); + if ( cached[ expando ] ) { + setMatchers.push( cached ); + } else { + elementMatchers.push( cached ); + } + } + + // Cache the compiled function + cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); + + // Save selector and tokenization + cached.selector = selector; + } + return cached; +}; + +/** + * A low-level selection function that works with Sizzle's compiled + * selector functions + * @param {String|Function} selector A selector or a pre-compiled + * selector function built with Sizzle.compile + * @param {Element} context + * @param {Array} [results] + * @param {Array} [seed] A set of elements to match against + */ +select = Sizzle.select = function( selector, context, results, seed ) { + var i, tokens, token, type, find, + compiled = typeof selector === "function" && selector, + match = !seed && tokenize( (selector = compiled.selector || selector) ); + + results = results || []; + + // Try to minimize operations if there is only one selector in the list and no seed + // (the latter of which guarantees us context) + if ( match.length === 1 ) { + + // Reduce context if the leading compound selector is an ID + tokens = match[0] = match[0].slice( 0 ); + if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && + support.getById && context.nodeType === 9 && documentIsHTML && + Expr.relative[ tokens[1].type ] ) { + + context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; + if ( !context ) { + return results; + + // Precompiled matchers will still verify ancestry, so step up a level + } else if ( compiled ) { + context = context.parentNode; + } + + selector = selector.slice( tokens.shift().value.length ); + } + + // Fetch a seed set for right-to-left matching + i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; + while ( i-- ) { + token = tokens[i]; + + // Abort if we hit a combinator + if ( Expr.relative[ (type = token.type) ] ) { + break; + } + if ( (find = Expr.find[ type ]) ) { + // Search, expanding context for leading sibling combinators + if ( (seed = find( + token.matches[0].replace( runescape, funescape ), + rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context + )) ) { + + // If seed is empty or no tokens remain, we can return early + tokens.splice( i, 1 ); + selector = seed.length && toSelector( tokens ); + if ( !selector ) { + push.apply( results, seed ); + return results; + } + + break; + } + } + } + } + + // Compile and execute a filtering function if one is not provided + // Provide `match` to avoid retokenization if we modified the selector above + ( compiled || compile( selector, match ) )( + seed, + context, + !documentIsHTML, + results, + !context || rsibling.test( selector ) && testContext( context.parentNode ) || context + ); + return results; +}; + +// One-time assignments + +// Sort stability +support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; + +// Support: Chrome 14-35+ +// Always assume duplicates if they aren't passed to the comparison function +support.detectDuplicates = !!hasDuplicate; + +// Initialize against the default document +setDocument(); + +// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) +// Detached nodes confoundingly follow *each other* +support.sortDetached = assert(function( div1 ) { + // Should return 1, but returns 4 (following) + return div1.compareDocumentPosition( document.createElement("div") ) & 1; +}); + +// Support: IE<8 +// Prevent attribute/property "interpolation" +// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx +if ( !assert(function( div ) { + div.innerHTML = ""; + return div.firstChild.getAttribute("href") === "#" ; +}) ) { + addHandle( "type|href|height|width", function( elem, name, isXML ) { + if ( !isXML ) { + return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); + } + }); +} + +// Support: IE<9 +// Use defaultValue in place of getAttribute("value") +if ( !support.attributes || !assert(function( div ) { + div.innerHTML = ""; + div.firstChild.setAttribute( "value", "" ); + return div.firstChild.getAttribute( "value" ) === ""; +}) ) { + addHandle( "value", function( elem, name, isXML ) { + if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { + return elem.defaultValue; + } + }); +} + +// Support: IE<9 +// Use getAttributeNode to fetch booleans when getAttribute lies +if ( !assert(function( div ) { + return div.getAttribute("disabled") == null; +}) ) { + addHandle( booleans, function( elem, name, isXML ) { + var val; + if ( !isXML ) { + return elem[ name ] === true ? name.toLowerCase() : + (val = elem.getAttributeNode( name )) && val.specified ? + val.value : + null; + } + }); +} + +return Sizzle; + +})( window ); + + + +jQuery.find = Sizzle; +jQuery.expr = Sizzle.selectors; +jQuery.expr[ ":" ] = jQuery.expr.pseudos; +jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort; +jQuery.text = Sizzle.getText; +jQuery.isXMLDoc = Sizzle.isXML; +jQuery.contains = Sizzle.contains; + + + +var dir = function( elem, dir, until ) { + var matched = [], + truncate = until !== undefined; + + while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) { + if ( elem.nodeType === 1 ) { + if ( truncate && jQuery( elem ).is( until ) ) { + break; + } + matched.push( elem ); + } + } + return matched; +}; + + +var siblings = function( n, elem ) { + var matched = []; + + for ( ; n; n = n.nextSibling ) { + if ( n.nodeType === 1 && n !== elem ) { + matched.push( n ); + } + } + + return matched; +}; + + +var rneedsContext = jQuery.expr.match.needsContext; + +var rsingleTag = ( /^<([\w-]+)\s*\/?>(?:<\/\1>|)$/ ); + + + +var risSimple = /^.[^:#\[\.,]*$/; + +// Implement the identical functionality for filter and not +function winnow( elements, qualifier, not ) { + if ( jQuery.isFunction( qualifier ) ) { + return jQuery.grep( elements, function( elem, i ) { + /* jshint -W018 */ + return !!qualifier.call( elem, i, elem ) !== not; + } ); + + } + + if ( qualifier.nodeType ) { + return jQuery.grep( elements, function( elem ) { + return ( elem === qualifier ) !== not; + } ); + + } + + if ( typeof qualifier === "string" ) { + if ( risSimple.test( qualifier ) ) { + return jQuery.filter( qualifier, elements, not ); + } + + qualifier = jQuery.filter( qualifier, elements ); + } + + return jQuery.grep( elements, function( elem ) { + return ( jQuery.inArray( elem, qualifier ) > -1 ) !== not; + } ); +} + +jQuery.filter = function( expr, elems, not ) { + var elem = elems[ 0 ]; + + if ( not ) { + expr = ":not(" + expr + ")"; + } + + return elems.length === 1 && elem.nodeType === 1 ? + jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] : + jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { + return elem.nodeType === 1; + } ) ); +}; + +jQuery.fn.extend( { + find: function( selector ) { + var i, + ret = [], + self = this, + len = self.length; + + if ( typeof selector !== "string" ) { + return this.pushStack( jQuery( selector ).filter( function() { + for ( i = 0; i < len; i++ ) { + if ( jQuery.contains( self[ i ], this ) ) { + return true; + } + } + } ) ); + } + + for ( i = 0; i < len; i++ ) { + jQuery.find( selector, self[ i ], ret ); + } + + // Needed because $( selector, context ) becomes $( context ).find( selector ) + ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret ); + ret.selector = this.selector ? this.selector + " " + selector : selector; + return ret; + }, + filter: function( selector ) { + return this.pushStack( winnow( this, selector || [], false ) ); + }, + not: function( selector ) { + return this.pushStack( winnow( this, selector || [], true ) ); + }, + is: function( selector ) { + return !!winnow( + this, + + // If this is a positional/relative selector, check membership in the returned set + // so $("p:first").is("p:last") won't return true for a doc with two "p". + typeof selector === "string" && rneedsContext.test( selector ) ? + jQuery( selector ) : + selector || [], + false + ).length; + } +} ); + + +// Initialize a jQuery object + + +// A central reference to the root jQuery(document) +var rootjQuery, + + // A simple way to check for HTML strings + // Prioritize #id over to avoid XSS via location.hash (#9521) + // Strict HTML recognition (#11290: must start with <) + rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, + + init = jQuery.fn.init = function( selector, context, root ) { + var match, elem; + + // HANDLE: $(""), $(null), $(undefined), $(false) + if ( !selector ) { + return this; + } + + // init accepts an alternate rootjQuery + // so migrate can support jQuery.sub (gh-2101) + root = root || rootjQuery; + + // Handle HTML strings + if ( typeof selector === "string" ) { + if ( selector.charAt( 0 ) === "<" && + selector.charAt( selector.length - 1 ) === ">" && + selector.length >= 3 ) { + + // Assume that strings that start and end with <> are HTML and skip the regex check + match = [ null, selector, null ]; + + } else { + match = rquickExpr.exec( selector ); + } + + // Match html or make sure no context is specified for #id + if ( match && ( match[ 1 ] || !context ) ) { + + // HANDLE: $(html) -> $(array) + if ( match[ 1 ] ) { + context = context instanceof jQuery ? context[ 0 ] : context; + + // scripts is true for back-compat + // Intentionally let the error be thrown if parseHTML is not present + jQuery.merge( this, jQuery.parseHTML( + match[ 1 ], + context && context.nodeType ? context.ownerDocument || context : document, + true + ) ); + + // HANDLE: $(html, props) + if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) { + for ( match in context ) { + + // Properties of context are called as methods if possible + if ( jQuery.isFunction( this[ match ] ) ) { + this[ match ]( context[ match ] ); + + // ...and otherwise set as attributes + } else { + this.attr( match, context[ match ] ); + } + } + } + + return this; + + // HANDLE: $(#id) + } else { + elem = document.getElementById( match[ 2 ] ); + + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + + // Handle the case where IE and Opera return items + // by name instead of ID + if ( elem.id !== match[ 2 ] ) { + return rootjQuery.find( selector ); + } + + // Otherwise, we inject the element directly into the jQuery object + this.length = 1; + this[ 0 ] = elem; + } + + this.context = document; + this.selector = selector; + return this; + } + + // HANDLE: $(expr, $(...)) + } else if ( !context || context.jquery ) { + return ( context || root ).find( selector ); + + // HANDLE: $(expr, context) + // (which is just equivalent to: $(context).find(expr) + } else { + return this.constructor( context ).find( selector ); + } + + // HANDLE: $(DOMElement) + } else if ( selector.nodeType ) { + this.context = this[ 0 ] = selector; + this.length = 1; + return this; + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( jQuery.isFunction( selector ) ) { + return typeof root.ready !== "undefined" ? + root.ready( selector ) : + + // Execute immediately if ready is not present + selector( jQuery ); + } + + if ( selector.selector !== undefined ) { + this.selector = selector.selector; + this.context = selector.context; + } + + return jQuery.makeArray( selector, this ); + }; + +// Give the init function the jQuery prototype for later instantiation +init.prototype = jQuery.fn; + +// Initialize central reference +rootjQuery = jQuery( document ); + + +var rparentsprev = /^(?:parents|prev(?:Until|All))/, + + // methods guaranteed to produce a unique set when starting from a unique set + guaranteedUnique = { + children: true, + contents: true, + next: true, + prev: true + }; + +jQuery.fn.extend( { + has: function( target ) { + var i, + targets = jQuery( target, this ), + len = targets.length; + + return this.filter( function() { + for ( i = 0; i < len; i++ ) { + if ( jQuery.contains( this, targets[ i ] ) ) { + return true; + } + } + } ); + }, + + closest: function( selectors, context ) { + var cur, + i = 0, + l = this.length, + matched = [], + pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? + jQuery( selectors, context || this.context ) : + 0; + + for ( ; i < l; i++ ) { + for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) { + + // Always skip document fragments + if ( cur.nodeType < 11 && ( pos ? + pos.index( cur ) > -1 : + + // Don't pass non-elements to Sizzle + cur.nodeType === 1 && + jQuery.find.matchesSelector( cur, selectors ) ) ) { + + matched.push( cur ); + break; + } + } + } + + return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched ); + }, + + // Determine the position of an element within + // the matched set of elements + index: function( elem ) { + + // No argument, return index in parent + if ( !elem ) { + return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; + } + + // index in selector + if ( typeof elem === "string" ) { + return jQuery.inArray( this[ 0 ], jQuery( elem ) ); + } + + // Locate the position of the desired element + return jQuery.inArray( + + // If it receives a jQuery object, the first element is used + elem.jquery ? elem[ 0 ] : elem, this ); + }, + + add: function( selector, context ) { + return this.pushStack( + jQuery.uniqueSort( + jQuery.merge( this.get(), jQuery( selector, context ) ) + ) + ); + }, + + addBack: function( selector ) { + return this.add( selector == null ? + this.prevObject : this.prevObject.filter( selector ) + ); + } +} ); + +function sibling( cur, dir ) { + do { + cur = cur[ dir ]; + } while ( cur && cur.nodeType !== 1 ); + + return cur; +} + +jQuery.each( { + parent: function( elem ) { + var parent = elem.parentNode; + return parent && parent.nodeType !== 11 ? parent : null; + }, + parents: function( elem ) { + return dir( elem, "parentNode" ); + }, + parentsUntil: function( elem, i, until ) { + return dir( elem, "parentNode", until ); + }, + next: function( elem ) { + return sibling( elem, "nextSibling" ); + }, + prev: function( elem ) { + return sibling( elem, "previousSibling" ); + }, + nextAll: function( elem ) { + return dir( elem, "nextSibling" ); + }, + prevAll: function( elem ) { + return dir( elem, "previousSibling" ); + }, + nextUntil: function( elem, i, until ) { + return dir( elem, "nextSibling", until ); + }, + prevUntil: function( elem, i, until ) { + return dir( elem, "previousSibling", until ); + }, + siblings: function( elem ) { + return siblings( ( elem.parentNode || {} ).firstChild, elem ); + }, + children: function( elem ) { + return siblings( elem.firstChild ); + }, + contents: function( elem ) { + return jQuery.nodeName( elem, "iframe" ) ? + elem.contentDocument || elem.contentWindow.document : + jQuery.merge( [], elem.childNodes ); + } +}, function( name, fn ) { + jQuery.fn[ name ] = function( until, selector ) { + var ret = jQuery.map( this, fn, until ); + + if ( name.slice( -5 ) !== "Until" ) { + selector = until; + } + + if ( selector && typeof selector === "string" ) { + ret = jQuery.filter( selector, ret ); + } + + if ( this.length > 1 ) { + + // Remove duplicates + if ( !guaranteedUnique[ name ] ) { + ret = jQuery.uniqueSort( ret ); + } + + // Reverse order for parents* and prev-derivatives + if ( rparentsprev.test( name ) ) { + ret = ret.reverse(); + } + } + + return this.pushStack( ret ); + }; +} ); +var rnotwhite = ( /\S+/g ); + + + +// Convert String-formatted options into Object-formatted ones +function createOptions( options ) { + var object = {}; + jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) { + object[ flag ] = true; + } ); + return object; +} + +/* + * Create a callback list using the following parameters: + * + * options: an optional list of space-separated options that will change how + * the callback list behaves or a more traditional option object + * + * By default a callback list will act like an event callback list and can be + * "fired" multiple times. + * + * Possible options: + * + * once: will ensure the callback list can only be fired once (like a Deferred) + * + * memory: will keep track of previous values and will call any callback added + * after the list has been fired right away with the latest "memorized" + * values (like a Deferred) + * + * unique: will ensure a callback can only be added once (no duplicate in the list) + * + * stopOnFalse: interrupt callings when a callback returns false + * + */ +jQuery.Callbacks = function( options ) { + + // Convert options from String-formatted to Object-formatted if needed + // (we check in cache first) + options = typeof options === "string" ? + createOptions( options ) : + jQuery.extend( {}, options ); + + var // Flag to know if list is currently firing + firing, + + // Last fire value for non-forgettable lists + memory, + + // Flag to know if list was already fired + fired, + + // Flag to prevent firing + locked, + + // Actual callback list + list = [], + + // Queue of execution data for repeatable lists + queue = [], + + // Index of currently firing callback (modified by add/remove as needed) + firingIndex = -1, + + // Fire callbacks + fire = function() { + + // Enforce single-firing + locked = options.once; + + // Execute callbacks for all pending executions, + // respecting firingIndex overrides and runtime changes + fired = firing = true; + for ( ; queue.length; firingIndex = -1 ) { + memory = queue.shift(); + while ( ++firingIndex < list.length ) { + + // Run callback and check for early termination + if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false && + options.stopOnFalse ) { + + // Jump to end and forget the data so .add doesn't re-fire + firingIndex = list.length; + memory = false; + } + } + } + + // Forget the data if we're done with it + if ( !options.memory ) { + memory = false; + } + + firing = false; + + // Clean up if we're done firing for good + if ( locked ) { + + // Keep an empty list if we have data for future add calls + if ( memory ) { + list = []; + + // Otherwise, this object is spent + } else { + list = ""; + } + } + }, + + // Actual Callbacks object + self = { + + // Add a callback or a collection of callbacks to the list + add: function() { + if ( list ) { + + // If we have memory from a past run, we should fire after adding + if ( memory && !firing ) { + firingIndex = list.length - 1; + queue.push( memory ); + } + + ( function add( args ) { + jQuery.each( args, function( _, arg ) { + if ( jQuery.isFunction( arg ) ) { + if ( !options.unique || !self.has( arg ) ) { + list.push( arg ); + } + } else if ( arg && arg.length && jQuery.type( arg ) !== "string" ) { + + // Inspect recursively + add( arg ); + } + } ); + } )( arguments ); + + if ( memory && !firing ) { + fire(); + } + } + return this; + }, + + // Remove a callback from the list + remove: function() { + jQuery.each( arguments, function( _, arg ) { + var index; + while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { + list.splice( index, 1 ); + + // Handle firing indexes + if ( index <= firingIndex ) { + firingIndex--; + } + } + } ); + return this; + }, + + // Check if a given callback is in the list. + // If no argument is given, return whether or not list has callbacks attached. + has: function( fn ) { + return fn ? + jQuery.inArray( fn, list ) > -1 : + list.length > 0; + }, + + // Remove all callbacks from the list + empty: function() { + if ( list ) { + list = []; + } + return this; + }, + + // Disable .fire and .add + // Abort any current/pending executions + // Clear all callbacks and values + disable: function() { + locked = queue = []; + list = memory = ""; + return this; + }, + disabled: function() { + return !list; + }, + + // Disable .fire + // Also disable .add unless we have memory (since it would have no effect) + // Abort any pending executions + lock: function() { + locked = true; + if ( !memory ) { + self.disable(); + } + return this; + }, + locked: function() { + return !!locked; + }, + + // Call all callbacks with the given context and arguments + fireWith: function( context, args ) { + if ( !locked ) { + args = args || []; + args = [ context, args.slice ? args.slice() : args ]; + queue.push( args ); + if ( !firing ) { + fire(); + } + } + return this; + }, + + // Call all the callbacks with the given arguments + fire: function() { + self.fireWith( this, arguments ); + return this; + }, + + // To know if the callbacks have already been called at least once + fired: function() { + return !!fired; + } + }; + + return self; +}; + + +jQuery.extend( { + + Deferred: function( func ) { + var tuples = [ + + // action, add listener, listener list, final state + [ "resolve", "done", jQuery.Callbacks( "once memory" ), "resolved" ], + [ "reject", "fail", jQuery.Callbacks( "once memory" ), "rejected" ], + [ "notify", "progress", jQuery.Callbacks( "memory" ) ] + ], + state = "pending", + promise = { + state: function() { + return state; + }, + always: function() { + deferred.done( arguments ).fail( arguments ); + return this; + }, + then: function( /* fnDone, fnFail, fnProgress */ ) { + var fns = arguments; + return jQuery.Deferred( function( newDefer ) { + jQuery.each( tuples, function( i, tuple ) { + var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ]; + + // deferred[ done | fail | progress ] for forwarding actions to newDefer + deferred[ tuple[ 1 ] ]( function() { + var returned = fn && fn.apply( this, arguments ); + if ( returned && jQuery.isFunction( returned.promise ) ) { + returned.promise() + .progress( newDefer.notify ) + .done( newDefer.resolve ) + .fail( newDefer.reject ); + } else { + newDefer[ tuple[ 0 ] + "With" ]( + this === promise ? newDefer.promise() : this, + fn ? [ returned ] : arguments + ); + } + } ); + } ); + fns = null; + } ).promise(); + }, + + // Get a promise for this deferred + // If obj is provided, the promise aspect is added to the object + promise: function( obj ) { + return obj != null ? jQuery.extend( obj, promise ) : promise; + } + }, + deferred = {}; + + // Keep pipe for back-compat + promise.pipe = promise.then; + + // Add list-specific methods + jQuery.each( tuples, function( i, tuple ) { + var list = tuple[ 2 ], + stateString = tuple[ 3 ]; + + // promise[ done | fail | progress ] = list.add + promise[ tuple[ 1 ] ] = list.add; + + // Handle state + if ( stateString ) { + list.add( function() { + + // state = [ resolved | rejected ] + state = stateString; + + // [ reject_list | resolve_list ].disable; progress_list.lock + }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); + } + + // deferred[ resolve | reject | notify ] + deferred[ tuple[ 0 ] ] = function() { + deferred[ tuple[ 0 ] + "With" ]( this === deferred ? promise : this, arguments ); + return this; + }; + deferred[ tuple[ 0 ] + "With" ] = list.fireWith; + } ); + + // Make the deferred a promise + promise.promise( deferred ); + + // Call given func if any + if ( func ) { + func.call( deferred, deferred ); + } + + // All done! + return deferred; + }, + + // Deferred helper + when: function( subordinate /* , ..., subordinateN */ ) { + var i = 0, + resolveValues = slice.call( arguments ), + length = resolveValues.length, + + // the count of uncompleted subordinates + remaining = length !== 1 || + ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, + + // the master Deferred. + // If resolveValues consist of only a single Deferred, just use that. + deferred = remaining === 1 ? subordinate : jQuery.Deferred(), + + // Update function for both resolve and progress values + updateFunc = function( i, contexts, values ) { + return function( value ) { + contexts[ i ] = this; + values[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; + if ( values === progressValues ) { + deferred.notifyWith( contexts, values ); + + } else if ( !( --remaining ) ) { + deferred.resolveWith( contexts, values ); + } + }; + }, + + progressValues, progressContexts, resolveContexts; + + // add listeners to Deferred subordinates; treat others as resolved + if ( length > 1 ) { + progressValues = new Array( length ); + progressContexts = new Array( length ); + resolveContexts = new Array( length ); + for ( ; i < length; i++ ) { + if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { + resolveValues[ i ].promise() + .progress( updateFunc( i, progressContexts, progressValues ) ) + .done( updateFunc( i, resolveContexts, resolveValues ) ) + .fail( deferred.reject ); + } else { + --remaining; + } + } + } + + // if we're not waiting on anything, resolve the master + if ( !remaining ) { + deferred.resolveWith( resolveContexts, resolveValues ); + } + + return deferred.promise(); + } +} ); + + +// The deferred used on DOM ready +var readyList; + +jQuery.fn.ready = function( fn ) { + + // Add the callback + jQuery.ready.promise().done( fn ); + + return this; +}; + +jQuery.extend( { + + // Is the DOM ready to be used? Set to true once it occurs. + isReady: false, + + // A counter to track how many items to wait for before + // the ready event fires. See #6781 + readyWait: 1, + + // Hold (or release) the ready event + holdReady: function( hold ) { + if ( hold ) { + jQuery.readyWait++; + } else { + jQuery.ready( true ); + } + }, + + // Handle when the DOM is ready + ready: function( wait ) { + + // Abort if there are pending holds or we're already ready + if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { + return; + } + + // Remember that the DOM is ready + jQuery.isReady = true; + + // If a normal DOM Ready event fired, decrement, and wait if need be + if ( wait !== true && --jQuery.readyWait > 0 ) { + return; + } + + // If there are functions bound, to execute + readyList.resolveWith( document, [ jQuery ] ); + + // Trigger any bound ready events + if ( jQuery.fn.triggerHandler ) { + jQuery( document ).triggerHandler( "ready" ); + jQuery( document ).off( "ready" ); + } + } +} ); + +/** + * Clean-up method for dom ready events + */ +function detach() { + if ( document.addEventListener ) { + document.removeEventListener( "DOMContentLoaded", completed ); + window.removeEventListener( "load", completed ); + + } else { + document.detachEvent( "onreadystatechange", completed ); + window.detachEvent( "onload", completed ); + } +} + +/** + * The ready event handler and self cleanup method + */ +function completed() { + + // readyState === "complete" is good enough for us to call the dom ready in oldIE + if ( document.addEventListener || + window.event.type === "load" || + document.readyState === "complete" ) { + + detach(); + jQuery.ready(); + } +} + +jQuery.ready.promise = function( obj ) { + if ( !readyList ) { + + readyList = jQuery.Deferred(); + + // Catch cases where $(document).ready() is called + // after the browser event has already occurred. + // Support: IE6-10 + // Older IE sometimes signals "interactive" too soon + if ( document.readyState === "complete" || + ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) { + + // Handle it asynchronously to allow scripts the opportunity to delay ready + window.setTimeout( jQuery.ready ); + + // Standards-based browsers support DOMContentLoaded + } else if ( document.addEventListener ) { + + // Use the handy event callback + document.addEventListener( "DOMContentLoaded", completed ); + + // A fallback to window.onload, that will always work + window.addEventListener( "load", completed ); + + // If IE event model is used + } else { + + // Ensure firing before onload, maybe late but safe also for iframes + document.attachEvent( "onreadystatechange", completed ); + + // A fallback to window.onload, that will always work + window.attachEvent( "onload", completed ); + + // If IE and not a frame + // continually check to see if the document is ready + var top = false; + + try { + top = window.frameElement == null && document.documentElement; + } catch ( e ) {} + + if ( top && top.doScroll ) { + ( function doScrollCheck() { + if ( !jQuery.isReady ) { + + try { + + // Use the trick by Diego Perini + // http://javascript.nwbox.com/IEContentLoaded/ + top.doScroll( "left" ); + } catch ( e ) { + return window.setTimeout( doScrollCheck, 50 ); + } + + // detach all dom ready events + detach(); + + // and execute any waiting functions + jQuery.ready(); + } + } )(); + } + } + } + return readyList.promise( obj ); +}; + +// Kick off the DOM ready check even if the user does not +jQuery.ready.promise(); + + + + +// Support: IE<9 +// Iteration over object's inherited properties before its own +var i; +for ( i in jQuery( support ) ) { + break; +} +support.ownFirst = i === "0"; + +// Note: most support tests are defined in their respective modules. +// false until the test is run +support.inlineBlockNeedsLayout = false; + +// Execute ASAP in case we need to set body.style.zoom +jQuery( function() { + + // Minified: var a,b,c,d + var val, div, body, container; + + body = document.getElementsByTagName( "body" )[ 0 ]; + if ( !body || !body.style ) { + + // Return for frameset docs that don't have a body + return; + } + + // Setup + div = document.createElement( "div" ); + container = document.createElement( "div" ); + container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px"; + body.appendChild( container ).appendChild( div ); + + if ( typeof div.style.zoom !== "undefined" ) { + + // Support: IE<8 + // Check if natively block-level elements act like inline-block + // elements when setting their display to 'inline' and giving + // them layout + div.style.cssText = "display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1"; + + support.inlineBlockNeedsLayout = val = div.offsetWidth === 3; + if ( val ) { + + // Prevent IE 6 from affecting layout for positioned elements #11048 + // Prevent IE from shrinking the body in IE 7 mode #12869 + // Support: IE<8 + body.style.zoom = 1; + } + } + + body.removeChild( container ); +} ); + + +( function() { + var div = document.createElement( "div" ); + + // Support: IE<9 + support.deleteExpando = true; + try { + delete div.test; + } catch ( e ) { + support.deleteExpando = false; + } + + // Null elements to avoid leaks in IE. + div = null; +} )(); +var acceptData = function( elem ) { + var noData = jQuery.noData[ ( elem.nodeName + " " ).toLowerCase() ], + nodeType = +elem.nodeType || 1; + + // Do not set data on non-element DOM nodes because it will not be cleared (#8335). + return nodeType !== 1 && nodeType !== 9 ? + false : + + // Nodes accept data unless otherwise specified; rejection can be conditional + !noData || noData !== true && elem.getAttribute( "classid" ) === noData; +}; + + + + +var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, + rmultiDash = /([A-Z])/g; + +function dataAttr( elem, key, data ) { + + // If nothing was found internally, try to fetch any + // data from the HTML5 data-* attribute + if ( data === undefined && elem.nodeType === 1 ) { + + var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); + + data = elem.getAttribute( name ); + + if ( typeof data === "string" ) { + try { + data = data === "true" ? true : + data === "false" ? false : + data === "null" ? null : + + // Only convert to a number if it doesn't change the string + +data + "" === data ? +data : + rbrace.test( data ) ? jQuery.parseJSON( data ) : + data; + } catch ( e ) {} + + // Make sure we set the data so it isn't changed later + jQuery.data( elem, key, data ); + + } else { + data = undefined; + } + } + + return data; +} + +// checks a cache object for emptiness +function isEmptyDataObject( obj ) { + var name; + for ( name in obj ) { + + // if the public data object is empty, the private is still empty + if ( name === "data" && jQuery.isEmptyObject( obj[ name ] ) ) { + continue; + } + if ( name !== "toJSON" ) { + return false; + } + } + + return true; +} + +function internalData( elem, name, data, pvt /* Internal Use Only */ ) { + if ( !acceptData( elem ) ) { + return; + } + + var ret, thisCache, + internalKey = jQuery.expando, + + // We have to handle DOM nodes and JS objects differently because IE6-7 + // can't GC object references properly across the DOM-JS boundary + isNode = elem.nodeType, + + // Only DOM nodes need the global jQuery cache; JS object data is + // attached directly to the object so GC can occur automatically + cache = isNode ? jQuery.cache : elem, + + // Only defining an ID for JS objects if its cache already exists allows + // the code to shortcut on the same path as a DOM node with no cache + id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey; + + // Avoid doing any more work than we need to when trying to get data on an + // object that has no data at all + if ( ( !id || !cache[ id ] || ( !pvt && !cache[ id ].data ) ) && + data === undefined && typeof name === "string" ) { + return; + } + + if ( !id ) { + + // Only DOM nodes need a new unique ID for each element since their data + // ends up in the global cache + if ( isNode ) { + id = elem[ internalKey ] = deletedIds.pop() || jQuery.guid++; + } else { + id = internalKey; + } + } + + if ( !cache[ id ] ) { + + // Avoid exposing jQuery metadata on plain JS objects when the object + // is serialized using JSON.stringify + cache[ id ] = isNode ? {} : { toJSON: jQuery.noop }; + } + + // An object can be passed to jQuery.data instead of a key/value pair; this gets + // shallow copied over onto the existing cache + if ( typeof name === "object" || typeof name === "function" ) { + if ( pvt ) { + cache[ id ] = jQuery.extend( cache[ id ], name ); + } else { + cache[ id ].data = jQuery.extend( cache[ id ].data, name ); + } + } + + thisCache = cache[ id ]; + + // jQuery data() is stored in a separate object inside the object's internal data + // cache in order to avoid key collisions between internal data and user-defined + // data. + if ( !pvt ) { + if ( !thisCache.data ) { + thisCache.data = {}; + } + + thisCache = thisCache.data; + } + + if ( data !== undefined ) { + thisCache[ jQuery.camelCase( name ) ] = data; + } + + // Check for both converted-to-camel and non-converted data property names + // If a data property was specified + if ( typeof name === "string" ) { + + // First Try to find as-is property data + ret = thisCache[ name ]; + + // Test for null|undefined property data + if ( ret == null ) { + + // Try to find the camelCased property + ret = thisCache[ jQuery.camelCase( name ) ]; + } + } else { + ret = thisCache; + } + + return ret; +} + +function internalRemoveData( elem, name, pvt ) { + if ( !acceptData( elem ) ) { + return; + } + + var thisCache, i, + isNode = elem.nodeType, + + // See jQuery.data for more information + cache = isNode ? jQuery.cache : elem, + id = isNode ? elem[ jQuery.expando ] : jQuery.expando; + + // If there is already no cache entry for this object, there is no + // purpose in continuing + if ( !cache[ id ] ) { + return; + } + + if ( name ) { + + thisCache = pvt ? cache[ id ] : cache[ id ].data; + + if ( thisCache ) { + + // Support array or space separated string names for data keys + if ( !jQuery.isArray( name ) ) { + + // try the string as a key before any manipulation + if ( name in thisCache ) { + name = [ name ]; + } else { + + // split the camel cased version by spaces unless a key with the spaces exists + name = jQuery.camelCase( name ); + if ( name in thisCache ) { + name = [ name ]; + } else { + name = name.split( " " ); + } + } + } else { + + // If "name" is an array of keys... + // When data is initially created, via ("key", "val") signature, + // keys will be converted to camelCase. + // Since there is no way to tell _how_ a key was added, remove + // both plain key and camelCase key. #12786 + // This will only penalize the array argument path. + name = name.concat( jQuery.map( name, jQuery.camelCase ) ); + } + + i = name.length; + while ( i-- ) { + delete thisCache[ name[ i ] ]; + } + + // If there is no data left in the cache, we want to continue + // and let the cache object itself get destroyed + if ( pvt ? !isEmptyDataObject( thisCache ) : !jQuery.isEmptyObject( thisCache ) ) { + return; + } + } + } + + // See jQuery.data for more information + if ( !pvt ) { + delete cache[ id ].data; + + // Don't destroy the parent cache unless the internal data object + // had been the only thing left in it + if ( !isEmptyDataObject( cache[ id ] ) ) { + return; + } + } + + // Destroy the cache + if ( isNode ) { + jQuery.cleanData( [ elem ], true ); + + // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080) + /* jshint eqeqeq: false */ + } else if ( support.deleteExpando || cache != cache.window ) { + /* jshint eqeqeq: true */ + delete cache[ id ]; + + // When all else fails, undefined + } else { + cache[ id ] = undefined; + } +} + +jQuery.extend( { + cache: {}, + + // The following elements (space-suffixed to avoid Object.prototype collisions) + // throw uncatchable exceptions if you attempt to set expando properties + noData: { + "applet ": true, + "embed ": true, + + // ...but Flash objects (which have this classid) *can* handle expandos + "object ": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" + }, + + hasData: function( elem ) { + elem = elem.nodeType ? jQuery.cache[ elem[ jQuery.expando ] ] : elem[ jQuery.expando ]; + return !!elem && !isEmptyDataObject( elem ); + }, + + data: function( elem, name, data ) { + return internalData( elem, name, data ); + }, + + removeData: function( elem, name ) { + return internalRemoveData( elem, name ); + }, + + // For internal use only. + _data: function( elem, name, data ) { + return internalData( elem, name, data, true ); + }, + + _removeData: function( elem, name ) { + return internalRemoveData( elem, name, true ); + } +} ); + +jQuery.fn.extend( { + data: function( key, value ) { + var i, name, data, + elem = this[ 0 ], + attrs = elem && elem.attributes; + + // Special expections of .data basically thwart jQuery.access, + // so implement the relevant behavior ourselves + + // Gets all values + if ( key === undefined ) { + if ( this.length ) { + data = jQuery.data( elem ); + + if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) { + i = attrs.length; + while ( i-- ) { + + // Support: IE11+ + // The attrs elements can be null (#14894) + if ( attrs[ i ] ) { + name = attrs[ i ].name; + if ( name.indexOf( "data-" ) === 0 ) { + name = jQuery.camelCase( name.slice( 5 ) ); + dataAttr( elem, name, data[ name ] ); + } + } + } + jQuery._data( elem, "parsedAttrs", true ); + } + } + + return data; + } + + // Sets multiple values + if ( typeof key === "object" ) { + return this.each( function() { + jQuery.data( this, key ); + } ); + } + + return arguments.length > 1 ? + + // Sets one value + this.each( function() { + jQuery.data( this, key, value ); + } ) : + + // Gets one value + // Try to fetch any internally stored data first + elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : undefined; + }, + + removeData: function( key ) { + return this.each( function() { + jQuery.removeData( this, key ); + } ); + } +} ); + + +jQuery.extend( { + queue: function( elem, type, data ) { + var queue; + + if ( elem ) { + type = ( type || "fx" ) + "queue"; + queue = jQuery._data( elem, type ); + + // Speed up dequeue by getting out quickly if this is just a lookup + if ( data ) { + if ( !queue || jQuery.isArray( data ) ) { + queue = jQuery._data( elem, type, jQuery.makeArray( data ) ); + } else { + queue.push( data ); + } + } + return queue || []; + } + }, + + dequeue: function( elem, type ) { + type = type || "fx"; + + var queue = jQuery.queue( elem, type ), + startLength = queue.length, + fn = queue.shift(), + hooks = jQuery._queueHooks( elem, type ), + next = function() { + jQuery.dequeue( elem, type ); + }; + + // If the fx queue is dequeued, always remove the progress sentinel + if ( fn === "inprogress" ) { + fn = queue.shift(); + startLength--; + } + + if ( fn ) { + + // Add a progress sentinel to prevent the fx queue from being + // automatically dequeued + if ( type === "fx" ) { + queue.unshift( "inprogress" ); + } + + // clear up the last queue stop function + delete hooks.stop; + fn.call( elem, next, hooks ); + } + + if ( !startLength && hooks ) { + hooks.empty.fire(); + } + }, + + // not intended for public consumption - generates a queueHooks object, + // or returns the current one + _queueHooks: function( elem, type ) { + var key = type + "queueHooks"; + return jQuery._data( elem, key ) || jQuery._data( elem, key, { + empty: jQuery.Callbacks( "once memory" ).add( function() { + jQuery._removeData( elem, type + "queue" ); + jQuery._removeData( elem, key ); + } ) + } ); + } +} ); + +jQuery.fn.extend( { + queue: function( type, data ) { + var setter = 2; + + if ( typeof type !== "string" ) { + data = type; + type = "fx"; + setter--; + } + + if ( arguments.length < setter ) { + return jQuery.queue( this[ 0 ], type ); + } + + return data === undefined ? + this : + this.each( function() { + var queue = jQuery.queue( this, type, data ); + + // ensure a hooks for this queue + jQuery._queueHooks( this, type ); + + if ( type === "fx" && queue[ 0 ] !== "inprogress" ) { + jQuery.dequeue( this, type ); + } + } ); + }, + dequeue: function( type ) { + return this.each( function() { + jQuery.dequeue( this, type ); + } ); + }, + clearQueue: function( type ) { + return this.queue( type || "fx", [] ); + }, + + // Get a promise resolved when queues of a certain type + // are emptied (fx is the type by default) + promise: function( type, obj ) { + var tmp, + count = 1, + defer = jQuery.Deferred(), + elements = this, + i = this.length, + resolve = function() { + if ( !( --count ) ) { + defer.resolveWith( elements, [ elements ] ); + } + }; + + if ( typeof type !== "string" ) { + obj = type; + type = undefined; + } + type = type || "fx"; + + while ( i-- ) { + tmp = jQuery._data( elements[ i ], type + "queueHooks" ); + if ( tmp && tmp.empty ) { + count++; + tmp.empty.add( resolve ); + } + } + resolve(); + return defer.promise( obj ); + } +} ); + + +( function() { + var shrinkWrapBlocksVal; + + support.shrinkWrapBlocks = function() { + if ( shrinkWrapBlocksVal != null ) { + return shrinkWrapBlocksVal; + } + + // Will be changed later if needed. + shrinkWrapBlocksVal = false; + + // Minified: var b,c,d + var div, body, container; + + body = document.getElementsByTagName( "body" )[ 0 ]; + if ( !body || !body.style ) { + + // Test fired too early or in an unsupported environment, exit. + return; + } + + // Setup + div = document.createElement( "div" ); + container = document.createElement( "div" ); + container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px"; + body.appendChild( container ).appendChild( div ); + + // Support: IE6 + // Check if elements with layout shrink-wrap their children + if ( typeof div.style.zoom !== "undefined" ) { + + // Reset CSS: box-sizing; display; margin; border + div.style.cssText = + + // Support: Firefox<29, Android 2.3 + // Vendor-prefix box-sizing + "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" + + "box-sizing:content-box;display:block;margin:0;border:0;" + + "padding:1px;width:1px;zoom:1"; + div.appendChild( document.createElement( "div" ) ).style.width = "5px"; + shrinkWrapBlocksVal = div.offsetWidth !== 3; + } + + body.removeChild( container ); + + return shrinkWrapBlocksVal; + }; + +} )(); +var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source; + +var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ); + + +var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; + +var isHidden = function( elem, el ) { + + // isHidden might be called from jQuery#filter function; + // in that case, element will be second argument + elem = el || elem; + return jQuery.css( elem, "display" ) === "none" || + !jQuery.contains( elem.ownerDocument, elem ); + }; + + + +function adjustCSS( elem, prop, valueParts, tween ) { + var adjusted, + scale = 1, + maxIterations = 20, + currentValue = tween ? + function() { return tween.cur(); } : + function() { return jQuery.css( elem, prop, "" ); }, + initial = currentValue(), + unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), + + // Starting value computation is required for potential unit mismatches + initialInUnit = ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) && + rcssNum.exec( jQuery.css( elem, prop ) ); + + if ( initialInUnit && initialInUnit[ 3 ] !== unit ) { + + // Trust units reported by jQuery.css + unit = unit || initialInUnit[ 3 ]; + + // Make sure we update the tween properties later on + valueParts = valueParts || []; + + // Iteratively approximate from a nonzero starting point + initialInUnit = +initial || 1; + + do { + + // If previous iteration zeroed out, double until we get *something*. + // Use string for doubling so we don't accidentally see scale as unchanged below + scale = scale || ".5"; + + // Adjust and apply + initialInUnit = initialInUnit / scale; + jQuery.style( elem, prop, initialInUnit + unit ); + + // Update scale, tolerating zero or NaN from tween.cur() + // Break the loop if scale is unchanged or perfect, or if we've just had enough. + } while ( + scale !== ( scale = currentValue() / initial ) && scale !== 1 && --maxIterations + ); + } + + if ( valueParts ) { + initialInUnit = +initialInUnit || +initial || 0; + + // Apply relative offset (+=/-=) if specified + adjusted = valueParts[ 1 ] ? + initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] : + +valueParts[ 2 ]; + if ( tween ) { + tween.unit = unit; + tween.start = initialInUnit; + tween.end = adjusted; + } + } + return adjusted; +} + + +// Multifunctional method to get and set values of a collection +// The value/s can optionally be executed if it's a function +var access = function( elems, fn, key, value, chainable, emptyGet, raw ) { + var i = 0, + length = elems.length, + bulk = key == null; + + // Sets many values + if ( jQuery.type( key ) === "object" ) { + chainable = true; + for ( i in key ) { + access( elems, fn, i, key[ i ], true, emptyGet, raw ); + } + + // Sets one value + } else if ( value !== undefined ) { + chainable = true; + + if ( !jQuery.isFunction( value ) ) { + raw = true; + } + + if ( bulk ) { + + // Bulk operations run against the entire set + if ( raw ) { + fn.call( elems, value ); + fn = null; + + // ...except when executing function values + } else { + bulk = fn; + fn = function( elem, key, value ) { + return bulk.call( jQuery( elem ), value ); + }; + } + } + + if ( fn ) { + for ( ; i < length; i++ ) { + fn( + elems[ i ], + key, + raw ? value : value.call( elems[ i ], i, fn( elems[ i ], key ) ) + ); + } + } + } + + return chainable ? + elems : + + // Gets + bulk ? + fn.call( elems ) : + length ? fn( elems[ 0 ], key ) : emptyGet; +}; +var rcheckableType = ( /^(?:checkbox|radio)$/i ); + +var rtagName = ( /<([\w:-]+)/ ); + +var rscriptType = ( /^$|\/(?:java|ecma)script/i ); + +var rleadingWhitespace = ( /^\s+/ ); + +var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|" + + "details|dialog|figcaption|figure|footer|header|hgroup|main|" + + "mark|meter|nav|output|picture|progress|section|summary|template|time|video"; + + + +function createSafeFragment( document ) { + var list = nodeNames.split( "|" ), + safeFrag = document.createDocumentFragment(); + + if ( safeFrag.createElement ) { + while ( list.length ) { + safeFrag.createElement( + list.pop() + ); + } + } + return safeFrag; +} + + +( function() { + var div = document.createElement( "div" ), + fragment = document.createDocumentFragment(), + input = document.createElement( "input" ); + + // Setup + div.innerHTML = "
        a"; + + // IE strips leading whitespace when .innerHTML is used + support.leadingWhitespace = div.firstChild.nodeType === 3; + + // Make sure that tbody elements aren't automatically inserted + // IE will insert them into empty tables + support.tbody = !div.getElementsByTagName( "tbody" ).length; + + // Make sure that link elements get serialized correctly by innerHTML + // This requires a wrapper element in IE + support.htmlSerialize = !!div.getElementsByTagName( "link" ).length; + + // Makes sure cloning an html5 element does not cause problems + // Where outerHTML is undefined, this still works + support.html5Clone = + document.createElement( "nav" ).cloneNode( true ).outerHTML !== "<:nav>"; + + // Check if a disconnected checkbox will retain its checked + // value of true after appended to the DOM (IE6/7) + input.type = "checkbox"; + input.checked = true; + fragment.appendChild( input ); + support.appendChecked = input.checked; + + // Make sure textarea (and checkbox) defaultValue is properly cloned + // Support: IE6-IE11+ + div.innerHTML = ""; + support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; + + // #11217 - WebKit loses check when the name is after the checked attribute + fragment.appendChild( div ); + + // Support: Windows Web Apps (WWA) + // `name` and `type` must use .setAttribute for WWA (#14901) + input = document.createElement( "input" ); + input.setAttribute( "type", "radio" ); + input.setAttribute( "checked", "checked" ); + input.setAttribute( "name", "t" ); + + div.appendChild( input ); + + // Support: Safari 5.1, iOS 5.1, Android 4.x, Android 2.3 + // old WebKit doesn't clone checked state correctly in fragments + support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; + + // Support: IE<9 + // Cloned elements keep attachEvent handlers, we use addEventListener on IE9+ + support.noCloneEvent = !!div.addEventListener; + + // Support: IE<9 + // Since attributes and properties are the same in IE, + // cleanData must set properties to undefined rather than use removeAttribute + div[ jQuery.expando ] = 1; + support.attributes = !div.getAttribute( jQuery.expando ); +} )(); + + +// We have to close these tags to support XHTML (#13200) +var wrapMap = { + option: [ 1, "" ], + legend: [ 1, "
        ", "
        " ], + area: [ 1, "", "" ], + + // Support: IE8 + param: [ 1, "", "" ], + thead: [ 1, "", "
        " ], + tr: [ 2, "", "
        " ], + col: [ 2, "", "
        " ], + td: [ 3, "", "
        " ], + + // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags, + // unless wrapped in a div with non-breaking characters in front of it. + _default: support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X
        ", "
        " ] +}; + +// Support: IE8-IE9 +wrapMap.optgroup = wrapMap.option; + +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; + + +function getAll( context, tag ) { + var elems, elem, + i = 0, + found = typeof context.getElementsByTagName !== "undefined" ? + context.getElementsByTagName( tag || "*" ) : + typeof context.querySelectorAll !== "undefined" ? + context.querySelectorAll( tag || "*" ) : + undefined; + + if ( !found ) { + for ( found = [], elems = context.childNodes || context; + ( elem = elems[ i ] ) != null; + i++ + ) { + if ( !tag || jQuery.nodeName( elem, tag ) ) { + found.push( elem ); + } else { + jQuery.merge( found, getAll( elem, tag ) ); + } + } + } + + return tag === undefined || tag && jQuery.nodeName( context, tag ) ? + jQuery.merge( [ context ], found ) : + found; +} + + +// Mark scripts as having already been evaluated +function setGlobalEval( elems, refElements ) { + var elem, + i = 0; + for ( ; ( elem = elems[ i ] ) != null; i++ ) { + jQuery._data( + elem, + "globalEval", + !refElements || jQuery._data( refElements[ i ], "globalEval" ) + ); + } +} + + +var rhtml = /<|&#?\w+;/, + rtbody = / from table fragments + if ( !support.tbody ) { + + // String was a , *may* have spurious + elem = tag === "table" && !rtbody.test( elem ) ? + tmp.firstChild : + + // String was a bare or + wrap[ 1 ] === "
        " && !rtbody.test( elem ) ? + tmp : + 0; + + j = elem && elem.childNodes.length; + while ( j-- ) { + if ( jQuery.nodeName( ( tbody = elem.childNodes[ j ] ), "tbody" ) && + !tbody.childNodes.length ) { + + elem.removeChild( tbody ); + } + } + } + + jQuery.merge( nodes, tmp.childNodes ); + + // Fix #12392 for WebKit and IE > 9 + tmp.textContent = ""; + + // Fix #12392 for oldIE + while ( tmp.firstChild ) { + tmp.removeChild( tmp.firstChild ); + } + + // Remember the top-level container for proper cleanup + tmp = safe.lastChild; + } + } + } + + // Fix #11356: Clear elements from fragment + if ( tmp ) { + safe.removeChild( tmp ); + } + + // Reset defaultChecked for any radios and checkboxes + // about to be appended to the DOM in IE 6/7 (#8060) + if ( !support.appendChecked ) { + jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked ); + } + + i = 0; + while ( ( elem = nodes[ i++ ] ) ) { + + // Skip elements already in the context collection (trac-4087) + if ( selection && jQuery.inArray( elem, selection ) > -1 ) { + if ( ignored ) { + ignored.push( elem ); + } + + continue; + } + + contains = jQuery.contains( elem.ownerDocument, elem ); + + // Append to fragment + tmp = getAll( safe.appendChild( elem ), "script" ); + + // Preserve script evaluation history + if ( contains ) { + setGlobalEval( tmp ); + } + + // Capture executables + if ( scripts ) { + j = 0; + while ( ( elem = tmp[ j++ ] ) ) { + if ( rscriptType.test( elem.type || "" ) ) { + scripts.push( elem ); + } + } + } + } + + tmp = null; + + return safe; +} + + +( function() { + var i, eventName, + div = document.createElement( "div" ); + + // Support: IE<9 (lack submit/change bubble), Firefox (lack focus(in | out) events) + for ( i in { submit: true, change: true, focusin: true } ) { + eventName = "on" + i; + + if ( !( support[ i ] = eventName in window ) ) { + + // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP) + div.setAttribute( eventName, "t" ); + support[ i ] = div.attributes[ eventName ].expando === false; + } + } + + // Null elements to avoid leaks in IE. + div = null; +} )(); + + +var rformElems = /^(?:input|select|textarea)$/i, + rkeyEvent = /^key/, + rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, + rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, + rtypenamespace = /^([^.]*)(?:\.(.+)|)/; + +function returnTrue() { + return true; +} + +function returnFalse() { + return false; +} + +// Support: IE9 +// See #13393 for more info +function safeActiveElement() { + try { + return document.activeElement; + } catch ( err ) { } +} + +function on( elem, types, selector, data, fn, one ) { + var origFn, type; + + // Types can be a map of types/handlers + if ( typeof types === "object" ) { + + // ( types-Object, selector, data ) + if ( typeof selector !== "string" ) { + + // ( types-Object, data ) + data = data || selector; + selector = undefined; + } + for ( type in types ) { + on( elem, type, selector, data, types[ type ], one ); + } + return elem; + } + + if ( data == null && fn == null ) { + + // ( types, fn ) + fn = selector; + data = selector = undefined; + } else if ( fn == null ) { + if ( typeof selector === "string" ) { + + // ( types, selector, fn ) + fn = data; + data = undefined; + } else { + + // ( types, data, fn ) + fn = data; + data = selector; + selector = undefined; + } + } + if ( fn === false ) { + fn = returnFalse; + } else if ( !fn ) { + return elem; + } + + if ( one === 1 ) { + origFn = fn; + fn = function( event ) { + + // Can use an empty set, since event contains the info + jQuery().off( event ); + return origFn.apply( this, arguments ); + }; + + // Use same guid so caller can remove using origFn + fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); + } + return elem.each( function() { + jQuery.event.add( this, types, fn, data, selector ); + } ); +} + +/* + * Helper functions for managing events -- not part of the public interface. + * Props to Dean Edwards' addEvent library for many of the ideas. + */ +jQuery.event = { + + global: {}, + + add: function( elem, types, handler, data, selector ) { + var tmp, events, t, handleObjIn, + special, eventHandle, handleObj, + handlers, type, namespaces, origType, + elemData = jQuery._data( elem ); + + // Don't attach events to noData or text/comment nodes (but allow plain objects) + if ( !elemData ) { + return; + } + + // Caller can pass in an object of custom data in lieu of the handler + if ( handler.handler ) { + handleObjIn = handler; + handler = handleObjIn.handler; + selector = handleObjIn.selector; + } + + // Make sure that the handler has a unique ID, used to find/remove it later + if ( !handler.guid ) { + handler.guid = jQuery.guid++; + } + + // Init the element's event structure and main handler, if this is the first + if ( !( events = elemData.events ) ) { + events = elemData.events = {}; + } + if ( !( eventHandle = elemData.handle ) ) { + eventHandle = elemData.handle = function( e ) { + + // Discard the second event of a jQuery.event.trigger() and + // when an event is called after a page has unloaded + return typeof jQuery !== "undefined" && + ( !e || jQuery.event.triggered !== e.type ) ? + jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : + undefined; + }; + + // Add elem as a property of the handle fn to prevent a memory leak + // with IE non-native events + eventHandle.elem = elem; + } + + // Handle multiple events separated by a space + types = ( types || "" ).match( rnotwhite ) || [ "" ]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[ t ] ) || []; + type = origType = tmp[ 1 ]; + namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); + + // There *must* be a type, no attaching namespace-only handlers + if ( !type ) { + continue; + } + + // If event changes its type, use the special event handlers for the changed type + special = jQuery.event.special[ type ] || {}; + + // If selector defined, determine special event api type, otherwise given type + type = ( selector ? special.delegateType : special.bindType ) || type; + + // Update special based on newly reset type + special = jQuery.event.special[ type ] || {}; + + // handleObj is passed to all event handlers + handleObj = jQuery.extend( { + type: type, + origType: origType, + data: data, + handler: handler, + guid: handler.guid, + selector: selector, + needsContext: selector && jQuery.expr.match.needsContext.test( selector ), + namespace: namespaces.join( "." ) + }, handleObjIn ); + + // Init the event handler queue if we're the first + if ( !( handlers = events[ type ] ) ) { + handlers = events[ type ] = []; + handlers.delegateCount = 0; + + // Only use addEventListener/attachEvent if the special events handler returns false + if ( !special.setup || + special.setup.call( elem, data, namespaces, eventHandle ) === false ) { + + // Bind the global event handler to the element + if ( elem.addEventListener ) { + elem.addEventListener( type, eventHandle, false ); + + } else if ( elem.attachEvent ) { + elem.attachEvent( "on" + type, eventHandle ); + } + } + } + + if ( special.add ) { + special.add.call( elem, handleObj ); + + if ( !handleObj.handler.guid ) { + handleObj.handler.guid = handler.guid; + } + } + + // Add to the element's handler list, delegates in front + if ( selector ) { + handlers.splice( handlers.delegateCount++, 0, handleObj ); + } else { + handlers.push( handleObj ); + } + + // Keep track of which events have ever been used, for event optimization + jQuery.event.global[ type ] = true; + } + + // Nullify elem to prevent memory leaks in IE + elem = null; + }, + + // Detach an event or set of events from an element + remove: function( elem, types, handler, selector, mappedTypes ) { + var j, handleObj, tmp, + origCount, t, events, + special, handlers, type, + namespaces, origType, + elemData = jQuery.hasData( elem ) && jQuery._data( elem ); + + if ( !elemData || !( events = elemData.events ) ) { + return; + } + + // Once for each type.namespace in types; type may be omitted + types = ( types || "" ).match( rnotwhite ) || [ "" ]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[ t ] ) || []; + type = origType = tmp[ 1 ]; + namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); + + // Unbind all events (on this namespace, if provided) for the element + if ( !type ) { + for ( type in events ) { + jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); + } + continue; + } + + special = jQuery.event.special[ type ] || {}; + type = ( selector ? special.delegateType : special.bindType ) || type; + handlers = events[ type ] || []; + tmp = tmp[ 2 ] && + new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ); + + // Remove matching events + origCount = j = handlers.length; + while ( j-- ) { + handleObj = handlers[ j ]; + + if ( ( mappedTypes || origType === handleObj.origType ) && + ( !handler || handler.guid === handleObj.guid ) && + ( !tmp || tmp.test( handleObj.namespace ) ) && + ( !selector || selector === handleObj.selector || + selector === "**" && handleObj.selector ) ) { + handlers.splice( j, 1 ); + + if ( handleObj.selector ) { + handlers.delegateCount--; + } + if ( special.remove ) { + special.remove.call( elem, handleObj ); + } + } + } + + // Remove generic event handler if we removed something and no more handlers exist + // (avoids potential for endless recursion during removal of special event handlers) + if ( origCount && !handlers.length ) { + if ( !special.teardown || + special.teardown.call( elem, namespaces, elemData.handle ) === false ) { + + jQuery.removeEvent( elem, type, elemData.handle ); + } + + delete events[ type ]; + } + } + + // Remove the expando if it's no longer used + if ( jQuery.isEmptyObject( events ) ) { + delete elemData.handle; + + // removeData also checks for emptiness and clears the expando if empty + // so use it instead of delete + jQuery._removeData( elem, "events" ); + } + }, + + trigger: function( event, data, elem, onlyHandlers ) { + var handle, ontype, cur, + bubbleType, special, tmp, i, + eventPath = [ elem || document ], + type = hasOwn.call( event, "type" ) ? event.type : event, + namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : []; + + cur = tmp = elem = elem || document; + + // Don't do events on text and comment nodes + if ( elem.nodeType === 3 || elem.nodeType === 8 ) { + return; + } + + // focus/blur morphs to focusin/out; ensure we're not firing them right now + if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { + return; + } + + if ( type.indexOf( "." ) > -1 ) { + + // Namespaced trigger; create a regexp to match event type in handle() + namespaces = type.split( "." ); + type = namespaces.shift(); + namespaces.sort(); + } + ontype = type.indexOf( ":" ) < 0 && "on" + type; + + // Caller can pass in a jQuery.Event object, Object, or just an event type string + event = event[ jQuery.expando ] ? + event : + new jQuery.Event( type, typeof event === "object" && event ); + + // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) + event.isTrigger = onlyHandlers ? 2 : 3; + event.namespace = namespaces.join( "." ); + event.rnamespace = event.namespace ? + new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) : + null; + + // Clean up the event in case it is being reused + event.result = undefined; + if ( !event.target ) { + event.target = elem; + } + + // Clone any incoming data and prepend the event, creating the handler arg list + data = data == null ? + [ event ] : + jQuery.makeArray( data, [ event ] ); + + // Allow special events to draw outside the lines + special = jQuery.event.special[ type ] || {}; + if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { + return; + } + + // Determine event propagation path in advance, per W3C events spec (#9951) + // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) + if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { + + bubbleType = special.delegateType || type; + if ( !rfocusMorph.test( bubbleType + type ) ) { + cur = cur.parentNode; + } + for ( ; cur; cur = cur.parentNode ) { + eventPath.push( cur ); + tmp = cur; + } + + // Only add window if we got to document (e.g., not plain obj or detached DOM) + if ( tmp === ( elem.ownerDocument || document ) ) { + eventPath.push( tmp.defaultView || tmp.parentWindow || window ); + } + } + + // Fire handlers on the event path + i = 0; + while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) { + + event.type = i > 1 ? + bubbleType : + special.bindType || type; + + // jQuery handler + handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && + jQuery._data( cur, "handle" ); + + if ( handle ) { + handle.apply( cur, data ); + } + + // Native handler + handle = ontype && cur[ ontype ]; + if ( handle && handle.apply && acceptData( cur ) ) { + event.result = handle.apply( cur, data ); + if ( event.result === false ) { + event.preventDefault(); + } + } + } + event.type = type; + + // If nobody prevented the default action, do it now + if ( !onlyHandlers && !event.isDefaultPrevented() ) { + + if ( + ( !special._default || + special._default.apply( eventPath.pop(), data ) === false + ) && acceptData( elem ) + ) { + + // Call a native DOM method on the target with the same name name as the event. + // Can't use an .isFunction() check here because IE6/7 fails that test. + // Don't do default actions on window, that's where global variables be (#6170) + if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) { + + // Don't re-trigger an onFOO event when we call its FOO() method + tmp = elem[ ontype ]; + + if ( tmp ) { + elem[ ontype ] = null; + } + + // Prevent re-triggering of the same event, since we already bubbled it above + jQuery.event.triggered = type; + try { + elem[ type ](); + } catch ( e ) { + + // IE<9 dies on focus/blur to hidden element (#1486,#12518) + // only reproducible on winXP IE8 native, not IE9 in IE8 mode + } + jQuery.event.triggered = undefined; + + if ( tmp ) { + elem[ ontype ] = tmp; + } + } + } + } + + return event.result; + }, + + dispatch: function( event ) { + + // Make a writable jQuery.Event from the native event object + event = jQuery.event.fix( event ); + + var i, j, ret, matched, handleObj, + handlerQueue = [], + args = slice.call( arguments ), + handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [], + special = jQuery.event.special[ event.type ] || {}; + + // Use the fix-ed jQuery.Event rather than the (read-only) native event + args[ 0 ] = event; + event.delegateTarget = this; + + // Call the preDispatch hook for the mapped type, and let it bail if desired + if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { + return; + } + + // Determine handlers + handlerQueue = jQuery.event.handlers.call( this, event, handlers ); + + // Run delegates first; they may want to stop propagation beneath us + i = 0; + while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) { + event.currentTarget = matched.elem; + + j = 0; + while ( ( handleObj = matched.handlers[ j++ ] ) && + !event.isImmediatePropagationStopped() ) { + + // Triggered event must either 1) have no namespace, or 2) have namespace(s) + // a subset or equal to those in the bound event (both can have no namespace). + if ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) { + + event.handleObj = handleObj; + event.data = handleObj.data; + + ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle || + handleObj.handler ).apply( matched.elem, args ); + + if ( ret !== undefined ) { + if ( ( event.result = ret ) === false ) { + event.preventDefault(); + event.stopPropagation(); + } + } + } + } + } + + // Call the postDispatch hook for the mapped type + if ( special.postDispatch ) { + special.postDispatch.call( this, event ); + } + + return event.result; + }, + + handlers: function( event, handlers ) { + var i, matches, sel, handleObj, + handlerQueue = [], + delegateCount = handlers.delegateCount, + cur = event.target; + + // Support (at least): Chrome, IE9 + // Find delegate handlers + // Black-hole SVG instance trees (#13180) + // + // Support: Firefox<=42+ + // Avoid non-left-click in FF but don't block IE radio events (#3861, gh-2343) + if ( delegateCount && cur.nodeType && + ( event.type !== "click" || isNaN( event.button ) || event.button < 1 ) ) { + + /* jshint eqeqeq: false */ + for ( ; cur != this; cur = cur.parentNode || this ) { + /* jshint eqeqeq: true */ + + // Don't check non-elements (#13208) + // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) + if ( cur.nodeType === 1 && ( cur.disabled !== true || event.type !== "click" ) ) { + matches = []; + for ( i = 0; i < delegateCount; i++ ) { + handleObj = handlers[ i ]; + + // Don't conflict with Object.prototype properties (#13203) + sel = handleObj.selector + " "; + + if ( matches[ sel ] === undefined ) { + matches[ sel ] = handleObj.needsContext ? + jQuery( sel, this ).index( cur ) > -1 : + jQuery.find( sel, this, null, [ cur ] ).length; + } + if ( matches[ sel ] ) { + matches.push( handleObj ); + } + } + if ( matches.length ) { + handlerQueue.push( { elem: cur, handlers: matches } ); + } + } + } + } + + // Add the remaining (directly-bound) handlers + if ( delegateCount < handlers.length ) { + handlerQueue.push( { elem: this, handlers: handlers.slice( delegateCount ) } ); + } + + return handlerQueue; + }, + + fix: function( event ) { + if ( event[ jQuery.expando ] ) { + return event; + } + + // Create a writable copy of the event object and normalize some properties + var i, prop, copy, + type = event.type, + originalEvent = event, + fixHook = this.fixHooks[ type ]; + + if ( !fixHook ) { + this.fixHooks[ type ] = fixHook = + rmouseEvent.test( type ) ? this.mouseHooks : + rkeyEvent.test( type ) ? this.keyHooks : + {}; + } + copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; + + event = new jQuery.Event( originalEvent ); + + i = copy.length; + while ( i-- ) { + prop = copy[ i ]; + event[ prop ] = originalEvent[ prop ]; + } + + // Support: IE<9 + // Fix target property (#1925) + if ( !event.target ) { + event.target = originalEvent.srcElement || document; + } + + // Support: Safari 6-8+ + // Target should not be a text node (#504, #13143) + if ( event.target.nodeType === 3 ) { + event.target = event.target.parentNode; + } + + // Support: IE<9 + // For mouse/key events, metaKey==false if it's undefined (#3368, #11328) + event.metaKey = !!event.metaKey; + + return fixHook.filter ? fixHook.filter( event, originalEvent ) : event; + }, + + // Includes some event props shared by KeyEvent and MouseEvent + props: ( "altKey bubbles cancelable ctrlKey currentTarget detail eventPhase " + + "metaKey relatedTarget shiftKey target timeStamp view which" ).split( " " ), + + fixHooks: {}, + + keyHooks: { + props: "char charCode key keyCode".split( " " ), + filter: function( event, original ) { + + // Add which for key events + if ( event.which == null ) { + event.which = original.charCode != null ? original.charCode : original.keyCode; + } + + return event; + } + }, + + mouseHooks: { + props: ( "button buttons clientX clientY fromElement offsetX offsetY " + + "pageX pageY screenX screenY toElement" ).split( " " ), + filter: function( event, original ) { + var body, eventDoc, doc, + button = original.button, + fromElement = original.fromElement; + + // Calculate pageX/Y if missing and clientX/Y available + if ( event.pageX == null && original.clientX != null ) { + eventDoc = event.target.ownerDocument || document; + doc = eventDoc.documentElement; + body = eventDoc.body; + + event.pageX = original.clientX + + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - + ( doc && doc.clientLeft || body && body.clientLeft || 0 ); + event.pageY = original.clientY + + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - + ( doc && doc.clientTop || body && body.clientTop || 0 ); + } + + // Add relatedTarget, if necessary + if ( !event.relatedTarget && fromElement ) { + event.relatedTarget = fromElement === event.target ? + original.toElement : + fromElement; + } + + // Add which for click: 1 === left; 2 === middle; 3 === right + // Note: button is not normalized, so don't use it + if ( !event.which && button !== undefined ) { + event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); + } + + return event; + } + }, + + special: { + load: { + + // Prevent triggered image.load events from bubbling to window.load + noBubble: true + }, + focus: { + + // Fire native event if possible so blur/focus sequence is correct + trigger: function() { + if ( this !== safeActiveElement() && this.focus ) { + try { + this.focus(); + return false; + } catch ( e ) { + + // Support: IE<9 + // If we error on focus to hidden element (#1486, #12518), + // let .trigger() run the handlers + } + } + }, + delegateType: "focusin" + }, + blur: { + trigger: function() { + if ( this === safeActiveElement() && this.blur ) { + this.blur(); + return false; + } + }, + delegateType: "focusout" + }, + click: { + + // For checkbox, fire native event so checked state will be right + trigger: function() { + if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) { + this.click(); + return false; + } + }, + + // For cross-browser consistency, don't fire native .click() on links + _default: function( event ) { + return jQuery.nodeName( event.target, "a" ); + } + }, + + beforeunload: { + postDispatch: function( event ) { + + // Support: Firefox 20+ + // Firefox doesn't alert if the returnValue field is not set. + if ( event.result !== undefined && event.originalEvent ) { + event.originalEvent.returnValue = event.result; + } + } + } + }, + + // Piggyback on a donor event to simulate a different one + simulate: function( type, elem, event ) { + var e = jQuery.extend( + new jQuery.Event(), + event, + { + type: type, + isSimulated: true + + // Previously, `originalEvent: {}` was set here, so stopPropagation call + // would not be triggered on donor event, since in our own + // jQuery.event.stopPropagation function we had a check for existence of + // originalEvent.stopPropagation method, so, consequently it would be a noop. + // + // Guard for simulated events was moved to jQuery.event.stopPropagation function + // since `originalEvent` should point to the original event for the + // constancy with other events and for more focused logic + } + ); + + jQuery.event.trigger( e, null, elem ); + + if ( e.isDefaultPrevented() ) { + event.preventDefault(); + } + } +}; + +jQuery.removeEvent = document.removeEventListener ? + function( elem, type, handle ) { + + // This "if" is needed for plain objects + if ( elem.removeEventListener ) { + elem.removeEventListener( type, handle ); + } + } : + function( elem, type, handle ) { + var name = "on" + type; + + if ( elem.detachEvent ) { + + // #8545, #7054, preventing memory leaks for custom events in IE6-8 + // detachEvent needed property on element, by name of that event, + // to properly expose it to GC + if ( typeof elem[ name ] === "undefined" ) { + elem[ name ] = null; + } + + elem.detachEvent( name, handle ); + } + }; + +jQuery.Event = function( src, props ) { + + // Allow instantiation without the 'new' keyword + if ( !( this instanceof jQuery.Event ) ) { + return new jQuery.Event( src, props ); + } + + // Event object + if ( src && src.type ) { + this.originalEvent = src; + this.type = src.type; + + // Events bubbling up the document may have been marked as prevented + // by a handler lower down the tree; reflect the correct value. + this.isDefaultPrevented = src.defaultPrevented || + src.defaultPrevented === undefined && + + // Support: IE < 9, Android < 4.0 + src.returnValue === false ? + returnTrue : + returnFalse; + + // Event type + } else { + this.type = src; + } + + // Put explicitly provided properties onto the event object + if ( props ) { + jQuery.extend( this, props ); + } + + // Create a timestamp if incoming event doesn't have one + this.timeStamp = src && src.timeStamp || jQuery.now(); + + // Mark it as fixed + this[ jQuery.expando ] = true; +}; + +// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding +// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html +jQuery.Event.prototype = { + constructor: jQuery.Event, + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse, + + preventDefault: function() { + var e = this.originalEvent; + + this.isDefaultPrevented = returnTrue; + if ( !e ) { + return; + } + + // If preventDefault exists, run it on the original event + if ( e.preventDefault ) { + e.preventDefault(); + + // Support: IE + // Otherwise set the returnValue property of the original event to false + } else { + e.returnValue = false; + } + }, + stopPropagation: function() { + var e = this.originalEvent; + + this.isPropagationStopped = returnTrue; + + if ( !e || this.isSimulated ) { + return; + } + + // If stopPropagation exists, run it on the original event + if ( e.stopPropagation ) { + e.stopPropagation(); + } + + // Support: IE + // Set the cancelBubble property of the original event to true + e.cancelBubble = true; + }, + stopImmediatePropagation: function() { + var e = this.originalEvent; + + this.isImmediatePropagationStopped = returnTrue; + + if ( e && e.stopImmediatePropagation ) { + e.stopImmediatePropagation(); + } + + this.stopPropagation(); + } +}; + +// Create mouseenter/leave events using mouseover/out and event-time checks +// so that event delegation works in jQuery. +// Do the same for pointerenter/pointerleave and pointerover/pointerout +// +// Support: Safari 7 only +// Safari sends mouseenter too often; see: +// https://code.google.com/p/chromium/issues/detail?id=470258 +// for the description of the bug (it existed in older Chrome versions as well). +jQuery.each( { + mouseenter: "mouseover", + mouseleave: "mouseout", + pointerenter: "pointerover", + pointerleave: "pointerout" +}, function( orig, fix ) { + jQuery.event.special[ orig ] = { + delegateType: fix, + bindType: fix, + + handle: function( event ) { + var ret, + target = this, + related = event.relatedTarget, + handleObj = event.handleObj; + + // For mouseenter/leave call the handler if related is outside the target. + // NB: No relatedTarget if the mouse left/entered the browser window + if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) { + event.type = handleObj.origType; + ret = handleObj.handler.apply( this, arguments ); + event.type = fix; + } + return ret; + } + }; +} ); + +// IE submit delegation +if ( !support.submit ) { + + jQuery.event.special.submit = { + setup: function() { + + // Only need this for delegated form submit events + if ( jQuery.nodeName( this, "form" ) ) { + return false; + } + + // Lazy-add a submit handler when a descendant form may potentially be submitted + jQuery.event.add( this, "click._submit keypress._submit", function( e ) { + + // Node name check avoids a VML-related crash in IE (#9807) + var elem = e.target, + form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? + + // Support: IE <=8 + // We use jQuery.prop instead of elem.form + // to allow fixing the IE8 delegated submit issue (gh-2332) + // by 3rd party polyfills/workarounds. + jQuery.prop( elem, "form" ) : + undefined; + + if ( form && !jQuery._data( form, "submit" ) ) { + jQuery.event.add( form, "submit._submit", function( event ) { + event._submitBubble = true; + } ); + jQuery._data( form, "submit", true ); + } + } ); + + // return undefined since we don't need an event listener + }, + + postDispatch: function( event ) { + + // If form was submitted by the user, bubble the event up the tree + if ( event._submitBubble ) { + delete event._submitBubble; + if ( this.parentNode && !event.isTrigger ) { + jQuery.event.simulate( "submit", this.parentNode, event ); + } + } + }, + + teardown: function() { + + // Only need this for delegated form submit events + if ( jQuery.nodeName( this, "form" ) ) { + return false; + } + + // Remove delegated handlers; cleanData eventually reaps submit handlers attached above + jQuery.event.remove( this, "._submit" ); + } + }; +} + +// IE change delegation and checkbox/radio fix +if ( !support.change ) { + + jQuery.event.special.change = { + + setup: function() { + + if ( rformElems.test( this.nodeName ) ) { + + // IE doesn't fire change on a check/radio until blur; trigger it on click + // after a propertychange. Eat the blur-change in special.change.handle. + // This still fires onchange a second time for check/radio after blur. + if ( this.type === "checkbox" || this.type === "radio" ) { + jQuery.event.add( this, "propertychange._change", function( event ) { + if ( event.originalEvent.propertyName === "checked" ) { + this._justChanged = true; + } + } ); + jQuery.event.add( this, "click._change", function( event ) { + if ( this._justChanged && !event.isTrigger ) { + this._justChanged = false; + } + + // Allow triggered, simulated change events (#11500) + jQuery.event.simulate( "change", this, event ); + } ); + } + return false; + } + + // Delegated event; lazy-add a change handler on descendant inputs + jQuery.event.add( this, "beforeactivate._change", function( e ) { + var elem = e.target; + + if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "change" ) ) { + jQuery.event.add( elem, "change._change", function( event ) { + if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { + jQuery.event.simulate( "change", this.parentNode, event ); + } + } ); + jQuery._data( elem, "change", true ); + } + } ); + }, + + handle: function( event ) { + var elem = event.target; + + // Swallow native change events from checkbox/radio, we already triggered them above + if ( this !== elem || event.isSimulated || event.isTrigger || + ( elem.type !== "radio" && elem.type !== "checkbox" ) ) { + + return event.handleObj.handler.apply( this, arguments ); + } + }, + + teardown: function() { + jQuery.event.remove( this, "._change" ); + + return !rformElems.test( this.nodeName ); + } + }; +} + +// Support: Firefox +// Firefox doesn't have focus(in | out) events +// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787 +// +// Support: Chrome, Safari +// focus(in | out) events fire after focus & blur events, +// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order +// Related ticket - https://code.google.com/p/chromium/issues/detail?id=449857 +if ( !support.focusin ) { + jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) { + + // Attach a single capturing handler on the document while someone wants focusin/focusout + var handler = function( event ) { + jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) ); + }; + + jQuery.event.special[ fix ] = { + setup: function() { + var doc = this.ownerDocument || this, + attaches = jQuery._data( doc, fix ); + + if ( !attaches ) { + doc.addEventListener( orig, handler, true ); + } + jQuery._data( doc, fix, ( attaches || 0 ) + 1 ); + }, + teardown: function() { + var doc = this.ownerDocument || this, + attaches = jQuery._data( doc, fix ) - 1; + + if ( !attaches ) { + doc.removeEventListener( orig, handler, true ); + jQuery._removeData( doc, fix ); + } else { + jQuery._data( doc, fix, attaches ); + } + } + }; + } ); +} + +jQuery.fn.extend( { + + on: function( types, selector, data, fn ) { + return on( this, types, selector, data, fn ); + }, + one: function( types, selector, data, fn ) { + return on( this, types, selector, data, fn, 1 ); + }, + off: function( types, selector, fn ) { + var handleObj, type; + if ( types && types.preventDefault && types.handleObj ) { + + // ( event ) dispatched jQuery.Event + handleObj = types.handleObj; + jQuery( types.delegateTarget ).off( + handleObj.namespace ? + handleObj.origType + "." + handleObj.namespace : + handleObj.origType, + handleObj.selector, + handleObj.handler + ); + return this; + } + if ( typeof types === "object" ) { + + // ( types-object [, selector] ) + for ( type in types ) { + this.off( type, selector, types[ type ] ); + } + return this; + } + if ( selector === false || typeof selector === "function" ) { + + // ( types [, fn] ) + fn = selector; + selector = undefined; + } + if ( fn === false ) { + fn = returnFalse; + } + return this.each( function() { + jQuery.event.remove( this, types, fn, selector ); + } ); + }, + + trigger: function( type, data ) { + return this.each( function() { + jQuery.event.trigger( type, data, this ); + } ); + }, + triggerHandler: function( type, data ) { + var elem = this[ 0 ]; + if ( elem ) { + return jQuery.event.trigger( type, data, elem, true ); + } + } +} ); + + +var rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g, + rnoshimcache = new RegExp( "<(?:" + nodeNames + ")[\\s/>]", "i" ), + rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi, + + // Support: IE 10-11, Edge 10240+ + // In IE/Edge using regex groups here causes severe slowdowns. + // See https://connect.microsoft.com/IE/feedback/details/1736512/ + rnoInnerhtml = /\s*$/g, + safeFragment = createSafeFragment( document ), + fragmentDiv = safeFragment.appendChild( document.createElement( "div" ) ); + +// Support: IE<8 +// Manipulating tables requires a tbody +function manipulationTarget( elem, content ) { + return jQuery.nodeName( elem, "table" ) && + jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ? + + elem.getElementsByTagName( "tbody" )[ 0 ] || + elem.appendChild( elem.ownerDocument.createElement( "tbody" ) ) : + elem; +} + +// Replace/restore the type attribute of script elements for safe DOM manipulation +function disableScript( elem ) { + elem.type = ( jQuery.find.attr( elem, "type" ) !== null ) + "/" + elem.type; + return elem; +} +function restoreScript( elem ) { + var match = rscriptTypeMasked.exec( elem.type ); + if ( match ) { + elem.type = match[ 1 ]; + } else { + elem.removeAttribute( "type" ); + } + return elem; +} + +function cloneCopyEvent( src, dest ) { + if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) { + return; + } + + var type, i, l, + oldData = jQuery._data( src ), + curData = jQuery._data( dest, oldData ), + events = oldData.events; + + if ( events ) { + delete curData.handle; + curData.events = {}; + + for ( type in events ) { + for ( i = 0, l = events[ type ].length; i < l; i++ ) { + jQuery.event.add( dest, type, events[ type ][ i ] ); + } + } + } + + // make the cloned public data object a copy from the original + if ( curData.data ) { + curData.data = jQuery.extend( {}, curData.data ); + } +} + +function fixCloneNodeIssues( src, dest ) { + var nodeName, e, data; + + // We do not need to do anything for non-Elements + if ( dest.nodeType !== 1 ) { + return; + } + + nodeName = dest.nodeName.toLowerCase(); + + // IE6-8 copies events bound via attachEvent when using cloneNode. + if ( !support.noCloneEvent && dest[ jQuery.expando ] ) { + data = jQuery._data( dest ); + + for ( e in data.events ) { + jQuery.removeEvent( dest, e, data.handle ); + } + + // Event data gets referenced instead of copied if the expando gets copied too + dest.removeAttribute( jQuery.expando ); + } + + // IE blanks contents when cloning scripts, and tries to evaluate newly-set text + if ( nodeName === "script" && dest.text !== src.text ) { + disableScript( dest ).text = src.text; + restoreScript( dest ); + + // IE6-10 improperly clones children of object elements using classid. + // IE10 throws NoModificationAllowedError if parent is null, #12132. + } else if ( nodeName === "object" ) { + if ( dest.parentNode ) { + dest.outerHTML = src.outerHTML; + } + + // This path appears unavoidable for IE9. When cloning an object + // element in IE9, the outerHTML strategy above is not sufficient. + // If the src has innerHTML and the destination does not, + // copy the src.innerHTML into the dest.innerHTML. #10324 + if ( support.html5Clone && ( src.innerHTML && !jQuery.trim( dest.innerHTML ) ) ) { + dest.innerHTML = src.innerHTML; + } + + } else if ( nodeName === "input" && rcheckableType.test( src.type ) ) { + + // IE6-8 fails to persist the checked state of a cloned checkbox + // or radio button. Worse, IE6-7 fail to give the cloned element + // a checked appearance if the defaultChecked value isn't also set + + dest.defaultChecked = dest.checked = src.checked; + + // IE6-7 get confused and end up setting the value of a cloned + // checkbox/radio button to an empty string instead of "on" + if ( dest.value !== src.value ) { + dest.value = src.value; + } + + // IE6-8 fails to return the selected option to the default selected + // state when cloning options + } else if ( nodeName === "option" ) { + dest.defaultSelected = dest.selected = src.defaultSelected; + + // IE6-8 fails to set the defaultValue to the correct value when + // cloning other types of input fields + } else if ( nodeName === "input" || nodeName === "textarea" ) { + dest.defaultValue = src.defaultValue; + } +} + +function domManip( collection, args, callback, ignored ) { + + // Flatten any nested arrays + args = concat.apply( [], args ); + + var first, node, hasScripts, + scripts, doc, fragment, + i = 0, + l = collection.length, + iNoClone = l - 1, + value = args[ 0 ], + isFunction = jQuery.isFunction( value ); + + // We can't cloneNode fragments that contain checked, in WebKit + if ( isFunction || + ( l > 1 && typeof value === "string" && + !support.checkClone && rchecked.test( value ) ) ) { + return collection.each( function( index ) { + var self = collection.eq( index ); + if ( isFunction ) { + args[ 0 ] = value.call( this, index, self.html() ); + } + domManip( self, args, callback, ignored ); + } ); + } + + if ( l ) { + fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored ); + first = fragment.firstChild; + + if ( fragment.childNodes.length === 1 ) { + fragment = first; + } + + // Require either new content or an interest in ignored elements to invoke the callback + if ( first || ignored ) { + scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); + hasScripts = scripts.length; + + // Use the original fragment for the last item + // instead of the first because it can end up + // being emptied incorrectly in certain situations (#8070). + for ( ; i < l; i++ ) { + node = fragment; + + if ( i !== iNoClone ) { + node = jQuery.clone( node, true, true ); + + // Keep references to cloned scripts for later restoration + if ( hasScripts ) { + + // Support: Android<4.1, PhantomJS<2 + // push.apply(_, arraylike) throws on ancient WebKit + jQuery.merge( scripts, getAll( node, "script" ) ); + } + } + + callback.call( collection[ i ], node, i ); + } + + if ( hasScripts ) { + doc = scripts[ scripts.length - 1 ].ownerDocument; + + // Reenable scripts + jQuery.map( scripts, restoreScript ); + + // Evaluate executable scripts on first document insertion + for ( i = 0; i < hasScripts; i++ ) { + node = scripts[ i ]; + if ( rscriptType.test( node.type || "" ) && + !jQuery._data( node, "globalEval" ) && + jQuery.contains( doc, node ) ) { + + if ( node.src ) { + + // Optional AJAX dependency, but won't run scripts if not present + if ( jQuery._evalUrl ) { + jQuery._evalUrl( node.src ); + } + } else { + jQuery.globalEval( + ( node.text || node.textContent || node.innerHTML || "" ) + .replace( rcleanScript, "" ) + ); + } + } + } + } + + // Fix #11809: Avoid leaking memory + fragment = first = null; + } + } + + return collection; +} + +function remove( elem, selector, keepData ) { + var node, + elems = selector ? jQuery.filter( selector, elem ) : elem, + i = 0; + + for ( ; ( node = elems[ i ] ) != null; i++ ) { + + if ( !keepData && node.nodeType === 1 ) { + jQuery.cleanData( getAll( node ) ); + } + + if ( node.parentNode ) { + if ( keepData && jQuery.contains( node.ownerDocument, node ) ) { + setGlobalEval( getAll( node, "script" ) ); + } + node.parentNode.removeChild( node ); + } + } + + return elem; +} + +jQuery.extend( { + htmlPrefilter: function( html ) { + return html.replace( rxhtmlTag, "<$1>" ); + }, + + clone: function( elem, dataAndEvents, deepDataAndEvents ) { + var destElements, node, clone, i, srcElements, + inPage = jQuery.contains( elem.ownerDocument, elem ); + + if ( support.html5Clone || jQuery.isXMLDoc( elem ) || + !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) { + + clone = elem.cloneNode( true ); + + // IE<=8 does not properly clone detached, unknown element nodes + } else { + fragmentDiv.innerHTML = elem.outerHTML; + fragmentDiv.removeChild( clone = fragmentDiv.firstChild ); + } + + if ( ( !support.noCloneEvent || !support.noCloneChecked ) && + ( elem.nodeType === 1 || elem.nodeType === 11 ) && !jQuery.isXMLDoc( elem ) ) { + + // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 + destElements = getAll( clone ); + srcElements = getAll( elem ); + + // Fix all IE cloning issues + for ( i = 0; ( node = srcElements[ i ] ) != null; ++i ) { + + // Ensure that the destination node is not null; Fixes #9587 + if ( destElements[ i ] ) { + fixCloneNodeIssues( node, destElements[ i ] ); + } + } + } + + // Copy the events from the original to the clone + if ( dataAndEvents ) { + if ( deepDataAndEvents ) { + srcElements = srcElements || getAll( elem ); + destElements = destElements || getAll( clone ); + + for ( i = 0; ( node = srcElements[ i ] ) != null; i++ ) { + cloneCopyEvent( node, destElements[ i ] ); + } + } else { + cloneCopyEvent( elem, clone ); + } + } + + // Preserve script evaluation history + destElements = getAll( clone, "script" ); + if ( destElements.length > 0 ) { + setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); + } + + destElements = srcElements = node = null; + + // Return the cloned set + return clone; + }, + + cleanData: function( elems, /* internal */ forceAcceptData ) { + var elem, type, id, data, + i = 0, + internalKey = jQuery.expando, + cache = jQuery.cache, + attributes = support.attributes, + special = jQuery.event.special; + + for ( ; ( elem = elems[ i ] ) != null; i++ ) { + if ( forceAcceptData || acceptData( elem ) ) { + + id = elem[ internalKey ]; + data = id && cache[ id ]; + + if ( data ) { + if ( data.events ) { + for ( type in data.events ) { + if ( special[ type ] ) { + jQuery.event.remove( elem, type ); + + // This is a shortcut to avoid jQuery.event.remove's overhead + } else { + jQuery.removeEvent( elem, type, data.handle ); + } + } + } + + // Remove cache only if it was not already removed by jQuery.event.remove + if ( cache[ id ] ) { + + delete cache[ id ]; + + // Support: IE<9 + // IE does not allow us to delete expando properties from nodes + // IE creates expando attributes along with the property + // IE does not have a removeAttribute function on Document nodes + if ( !attributes && typeof elem.removeAttribute !== "undefined" ) { + elem.removeAttribute( internalKey ); + + // Webkit & Blink performance suffers when deleting properties + // from DOM nodes, so set to undefined instead + // https://code.google.com/p/chromium/issues/detail?id=378607 + } else { + elem[ internalKey ] = undefined; + } + + deletedIds.push( id ); + } + } + } + } + } +} ); + +jQuery.fn.extend( { + + // Keep domManip exposed until 3.0 (gh-2225) + domManip: domManip, + + detach: function( selector ) { + return remove( this, selector, true ); + }, + + remove: function( selector ) { + return remove( this, selector ); + }, + + text: function( value ) { + return access( this, function( value ) { + return value === undefined ? + jQuery.text( this ) : + this.empty().append( + ( this[ 0 ] && this[ 0 ].ownerDocument || document ).createTextNode( value ) + ); + }, null, value, arguments.length ); + }, + + append: function() { + return domManip( this, arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.appendChild( elem ); + } + } ); + }, + + prepend: function() { + return domManip( this, arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.insertBefore( elem, target.firstChild ); + } + } ); + }, + + before: function() { + return domManip( this, arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this ); + } + } ); + }, + + after: function() { + return domManip( this, arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this.nextSibling ); + } + } ); + }, + + empty: function() { + var elem, + i = 0; + + for ( ; ( elem = this[ i ] ) != null; i++ ) { + + // Remove element nodes and prevent memory leaks + if ( elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem, false ) ); + } + + // Remove any remaining nodes + while ( elem.firstChild ) { + elem.removeChild( elem.firstChild ); + } + + // If this is a select, ensure that it displays empty (#12336) + // Support: IE<9 + if ( elem.options && jQuery.nodeName( elem, "select" ) ) { + elem.options.length = 0; + } + } + + return this; + }, + + clone: function( dataAndEvents, deepDataAndEvents ) { + dataAndEvents = dataAndEvents == null ? false : dataAndEvents; + deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; + + return this.map( function() { + return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); + } ); + }, + + html: function( value ) { + return access( this, function( value ) { + var elem = this[ 0 ] || {}, + i = 0, + l = this.length; + + if ( value === undefined ) { + return elem.nodeType === 1 ? + elem.innerHTML.replace( rinlinejQuery, "" ) : + undefined; + } + + // See if we can take a shortcut and just use innerHTML + if ( typeof value === "string" && !rnoInnerhtml.test( value ) && + ( support.htmlSerialize || !rnoshimcache.test( value ) ) && + ( support.leadingWhitespace || !rleadingWhitespace.test( value ) ) && + !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { + + value = jQuery.htmlPrefilter( value ); + + try { + for ( ; i < l; i++ ) { + + // Remove element nodes and prevent memory leaks + elem = this[ i ] || {}; + if ( elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem, false ) ); + elem.innerHTML = value; + } + } + + elem = 0; + + // If using innerHTML throws an exception, use the fallback method + } catch ( e ) {} + } + + if ( elem ) { + this.empty().append( value ); + } + }, null, value, arguments.length ); + }, + + replaceWith: function() { + var ignored = []; + + // Make the changes, replacing each non-ignored context element with the new content + return domManip( this, arguments, function( elem ) { + var parent = this.parentNode; + + if ( jQuery.inArray( this, ignored ) < 0 ) { + jQuery.cleanData( getAll( this ) ); + if ( parent ) { + parent.replaceChild( elem, this ); + } + } + + // Force callback invocation + }, ignored ); + } +} ); + +jQuery.each( { + appendTo: "append", + prependTo: "prepend", + insertBefore: "before", + insertAfter: "after", + replaceAll: "replaceWith" +}, function( name, original ) { + jQuery.fn[ name ] = function( selector ) { + var elems, + i = 0, + ret = [], + insert = jQuery( selector ), + last = insert.length - 1; + + for ( ; i <= last; i++ ) { + elems = i === last ? this : this.clone( true ); + jQuery( insert[ i ] )[ original ]( elems ); + + // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get() + push.apply( ret, elems.get() ); + } + + return this.pushStack( ret ); + }; +} ); + + +var iframe, + elemdisplay = { + + // Support: Firefox + // We have to pre-define these values for FF (#10227) + HTML: "block", + BODY: "block" + }; + +/** + * Retrieve the actual display of a element + * @param {String} name nodeName of the element + * @param {Object} doc Document object + */ + +// Called only from within defaultDisplay +function actualDisplay( name, doc ) { + var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ), + + display = jQuery.css( elem[ 0 ], "display" ); + + // We don't have any data stored on the element, + // so use "detach" method as fast way to get rid of the element + elem.detach(); + + return display; +} + +/** + * Try to determine the default display value of an element + * @param {String} nodeName + */ +function defaultDisplay( nodeName ) { + var doc = document, + display = elemdisplay[ nodeName ]; + + if ( !display ) { + display = actualDisplay( nodeName, doc ); + + // If the simple way fails, read from inside an iframe + if ( display === "none" || !display ) { + + // Use the already-created iframe if possible + iframe = ( iframe || jQuery( "' + ,'' + ,''].join('')) + + //编辑器不兼容ie8以下 + if(device.ie && device.ie < 8){ + return textArea.removeClass('layui-hide').addClass(SHOW); + } + + haveBuild[0] && (haveBuild.remove()); + + setIframe.call(that, editor, textArea[0], set) + textArea.addClass('layui-hide').after(editor); + + return that.index; + }; + + //获得编辑器中内容 + Edit.prototype.getContent = function(index){ + var iframeWin = getWin(index); + if(!iframeWin[0]) return; + return toLower(iframeWin[0].document.body.innerHTML); + }; + + //获得编辑器中纯文本内容 + Edit.prototype.getText = function(index){ + var iframeWin = getWin(index); + if(!iframeWin[0]) return; + return $(iframeWin[0].document.body).text(); + }; + /** + * 设置编辑器内容 + * @param {[type]} index 编辑器索引 + * @param {[type]} content 要设置的内容 + * @param {[type]} flag 是否追加模式 + */ + Edit.prototype.setContent = function(index, content, flag){ + var iframeWin = getWin(index); + if(!iframeWin[0]) return; + if(flag){ + $(iframeWin[0].document.body).append(content) + }else{ + $(iframeWin[0].document.body).html(content) + }; + layedit.sync(index) + }; + //将编辑器内容同步到textarea(一般用于异步提交时) + Edit.prototype.sync = function(index){ + var iframeWin = getWin(index); + if(!iframeWin[0]) return; + var textarea = $('#'+iframeWin[1].attr('textarea')); + textarea.val(toLower(iframeWin[0].document.body.innerHTML)); + }; + + //获取编辑器选中内容 + Edit.prototype.getSelection = function(index){ + var iframeWin = getWin(index); + if(!iframeWin[0]) return; + var range = Range(iframeWin[0].document); + return document.selection ? range.text : range.toString(); + }; + + //iframe初始化 + var setIframe = function(editor, textArea, set){ + var that = this, iframe = editor.find('iframe'); + + iframe.css({ + height: set.height + }).on('load', function(){ + var conts = iframe.contents() + ,iframeWin = iframe.prop('contentWindow') + ,head = conts.find('head') + ,style = $([''].join('')) + ,body = conts.find('body'); + + head.append(style); + body.attr('contenteditable', 'true').css({ + 'min-height': set.height + }).html(textArea.value||''); + + hotkey.apply(that, [iframeWin, iframe, textArea, set]); //快捷键处理 + toolActive.call(that, iframeWin, editor, set); //触发工具 + + }); + } + + //获得iframe窗口对象 + ,getWin = function(index){ + var iframe = $('#LAY_layedit_'+ index) + ,iframeWin = iframe.prop('contentWindow'); + return [iframeWin, iframe]; + } + + //IE8下将标签处理成小写 + ,toLower = function(html){ + if(device.ie == 8){ + html = html.replace(/<.+>/g, function(str){ + return str.toLowerCase(); + }); + } + return html; + } + + //快捷键处理 + ,hotkey = function(iframeWin, iframe, textArea, set){ + var iframeDOM = iframeWin.document, body = $(iframeDOM.body); + body.on('keydown', function(e){ + var keycode = e.keyCode; + //处理回车 + if(keycode === 13){ + var range = Range(iframeDOM); + var container = getContainer(range) + ,parentNode = container.parentNode; + + if(parentNode.tagName.toLowerCase() === 'pre'){ + if(e.shiftKey) return + layer.msg('请暂时用shift+enter'); + return false; + } + iframeDOM.execCommand('formatBlock', false, '

        '); + } + }); + + //给textarea同步内容 + $(textArea).parents('form').on('submit', function(){ + var html = body.html(); + //IE8下将标签处理成小写 + if(device.ie == 8){ + html = html.replace(/<.+>/g, function(str){ + return str.toLowerCase(); + }); + } + textArea.value = html; + }); + + //处理粘贴 + body.on('paste', function(e){ + iframeDOM.execCommand('formatBlock', false, '

        '); + setTimeout(function(){ + filter.call(iframeWin, body); + textArea.value = body.html(); + }, 100); + }); + } + + //标签过滤 + ,filter = function(body){ + var iframeWin = this + ,iframeDOM = iframeWin.document; + + //清除影响版面的css属性 + body.find('*[style]').each(function(){ + var textAlign = this.style.textAlign; + this.removeAttribute('style'); + $(this).css({ + 'text-align': textAlign || '' + }) + }); + + //修饰表格 + body.find('table').addClass('layui-table'); + + //移除不安全的标签 + body.find('script,link').remove(); + } + + //Range对象兼容性处理 + ,Range = function(iframeDOM){ + return iframeDOM.selection + ? iframeDOM.selection.createRange() + : iframeDOM.getSelection().getRangeAt(0); + } + + //当前Range对象的endContainer兼容性处理 + ,getContainer = function(range){ + return range.endContainer || range.parentElement().childNodes[0] + } + + //在选区插入内联元素 + ,insertInline = function(tagName, attr, range){ + var iframeDOM = this.document + ,elem = document.createElement(tagName) + for(var key in attr){ + elem.setAttribute(key, attr[key]); + } + elem.removeAttribute('text'); + + if(iframeDOM.selection){ //IE + var text = range.text || attr.text; + if(tagName === 'a' && !text) return; + if(text){ + elem.innerHTML = text; + } + range.pasteHTML($(elem).prop('outerHTML')); + range.select(); + } else { //非IE + var text = range.toString() || attr.text; + if(tagName === 'a' && !text) return; + if(text){ + elem.innerHTML = text; + } + range.deleteContents(); + range.insertNode(elem); + } + } + + //工具选中 + ,toolCheck = function(tools, othis){ + var iframeDOM = this.document + ,CHECK = 'layedit-tool-active' + ,container = getContainer(Range(iframeDOM)) + ,item = function(type){ + return tools.find('.layedit-tool-'+type) + } + + if(othis){ + othis[othis.hasClass(CHECK) ? 'removeClass' : 'addClass'](CHECK); + } + + tools.find('>i').removeClass(CHECK); + item('unlink').addClass(ABLED); + + $(container).parents().each(function(){ + var tagName = this.tagName.toLowerCase() + ,textAlign = this.style.textAlign; + + //文字 + if(tagName === 'b' || tagName === 'strong'){ + item('b').addClass(CHECK) + } + if(tagName === 'i' || tagName === 'em'){ + item('i').addClass(CHECK) + } + if(tagName === 'u'){ + item('u').addClass(CHECK) + } + if(tagName === 'strike'){ + item('d').addClass(CHECK) + } + + //对齐 + if(tagName === 'p'){ + if(textAlign === 'center'){ + item('center').addClass(CHECK); + } else if(textAlign === 'right'){ + item('right').addClass(CHECK); + } else { + item('left').addClass(CHECK); + } + } + + //超链接 + if(tagName === 'a'){ + item('link').addClass(CHECK); + item('unlink').removeClass(ABLED); + } + }); + } + + //触发工具 + ,toolActive = function(iframeWin, editor, set){ + var iframeDOM = iframeWin.document + ,body = $(iframeDOM.body) + ,toolEvent = { + //超链接 + link: function(range){ + var container = getContainer(range) + ,parentNode = $(container).parent(); + + link.call(body, { + href: parentNode.attr('href') + ,target: parentNode.attr('target') + }, function(field){ + var parent = parentNode[0]; + if(parent.tagName === 'A'){ + parent.href = field.url; + } else { + insertInline.call(iframeWin, 'a', { + target: field.target + ,href: field.url + ,text: field.url + }, range); + } + }); + } + //清除超链接 + ,unlink: function(range){ + iframeDOM.execCommand('unlink'); + } + //表情 + ,face: function(range){ + face.call(this, function(img){ + insertInline.call(iframeWin, 'img', { + src: img.src + ,alt: img.alt + }, range); + }); + } + //图片 + ,image: function(range){ + var that = this; + layui.use('upload', function(upload){ + var uploadImage = set.uploadImage || {}; + upload.render({ + url: uploadImage.url + ,method: uploadImage.type + ,elem: $(that).find('input')[0] + ,done: function(res){ + if(res.code == 0){ + res.data = res.data || {}; + insertInline.call(iframeWin, 'img', { + src: res.data.src + ,alt: res.data.title + }, range); + } else { + layer.msg(res.msg||'上传失败'); + } + } + }); + }); + } + //插入代码 + ,code: function(range){ + code.call(body, function(pre){ + insertInline.call(iframeWin, 'pre', { + text: pre.code + ,'lay-lang': pre.lang + }, range); + }); + } + //帮助 + ,help: function(){ + layer.open({ + type: 2 + ,title: '帮助' + ,area: ['600px', '380px'] + ,shadeClose: true + ,shade: 0.1 + ,skin: 'layui-layer-msg' + ,content: ['', 'no'] + }); + } + } + ,tools = editor.find('.layui-layedit-tool') + + ,click = function(){ + var othis = $(this) + ,events = othis.attr('layedit-event') + ,command = othis.attr('lay-command'); + + if(othis.hasClass(ABLED)) return; + + body.focus(); + + var range = Range(iframeDOM) + ,container = range.commonAncestorContainer + + if(command){ + iframeDOM.execCommand(command); + if(/justifyLeft|justifyCenter|justifyRight/.test(command)){ + iframeDOM.execCommand('formatBlock', false, '

        '); + } + setTimeout(function(){ + body.focus(); + }, 10); + } else { + toolEvent[events] && toolEvent[events].call(this, range); + } + toolCheck.call(iframeWin, tools, othis); + } + + ,isClick = /image/ + + tools.find('>i').on('mousedown', function(){ + var othis = $(this) + ,events = othis.attr('layedit-event'); + if(isClick.test(events)) return; + click.call(this) + }).on('click', function(){ + var othis = $(this) + ,events = othis.attr('layedit-event'); + if(!isClick.test(events)) return; + click.call(this) + }); + + //触发内容区域 + body.on('click', function(){ + toolCheck.call(iframeWin, tools); + layer.close(face.index); + }); + } + + //超链接面板 + ,link = function(options, callback){ + var body = this, index = layer.open({ + type: 1 + ,id: 'LAY_layedit_link' + ,area: '350px' + ,shade: 0.05 + ,shadeClose: true + ,moveType: 1 + ,title: '超链接' + ,skin: 'layui-layer-msg' + ,content: ['

          ' + ,'
        • ' + ,'' + ,'
          ' + ,'' + ,'
          ' + ,'
        • ' + ,'
        • ' + ,'' + ,'
          ' + ,'' + ,'' + ,'
          ' + ,'
        • ' + ,'
        • ' + ,'' + ,'' + ,'
        • ' + ,'
        '].join('') + ,success: function(layero, index){ + var eventFilter = 'submit(layedit-link-yes)'; + form.render('radio'); + layero.find('.layui-btn-primary').on('click', function(){ + layer.close(index); + body.focus(); + }); + form.on(eventFilter, function(data){ + layer.close(link.index); + callback && callback(data.field); + }); + } + }); + link.index = index; + } + + //表情面板 + ,face = function(callback){ + //表情库 + var faces = function(){ + var alt = ["[微笑]", "[嘻嘻]", "[哈哈]", "[可爱]", "[可怜]", "[挖鼻]", "[吃惊]", "[害羞]", "[挤眼]", "[闭嘴]", "[鄙视]", "[爱你]", "[泪]", "[偷笑]", "[亲亲]", "[生病]", "[太开心]", "[白眼]", "[右哼哼]", "[左哼哼]", "[嘘]", "[衰]", "[委屈]", "[吐]", "[哈欠]", "[抱抱]", "[怒]", "[疑问]", "[馋嘴]", "[拜拜]", "[思考]", "[汗]", "[困]", "[睡]", "[钱]", "[失望]", "[酷]", "[色]", "[哼]", "[鼓掌]", "[晕]", "[悲伤]", "[抓狂]", "[黑线]", "[阴险]", "[怒骂]", "[互粉]", "[心]", "[伤心]", "[猪头]", "[熊猫]", "[兔子]", "[ok]", "[耶]", "[good]", "[NO]", "[赞]", "[来]", "[弱]", "[草泥马]", "[神马]", "[囧]", "[浮云]", "[给力]", "[围观]", "[威武]", "[奥特曼]", "[礼物]", "[钟]", "[话筒]", "[蜡烛]", "[蛋糕]"], arr = {}; + layui.each(alt, function(index, item){ + arr[item] = layui.cache.dir + 'images/face/'+ index + '.gif'; + }); + return arr; + }(); + face.hide = face.hide || function(e){ + if($(e.target).attr('layedit-event') !== 'face'){ + layer.close(face.index); + } + } + return face.index = layer.tips(function(){ + var content = []; + layui.each(faces, function(key, item){ + content.push('
      • '+ key +'
      • '); + }); + return '
          ' + content.join('') + '
        '; + }(), this, { + tips: 1 + ,time: 0 + ,skin: 'layui-box layui-util-face' + ,maxWidth: 500 + ,success: function(layero, index){ + layero.css({ + marginTop: -4 + ,marginLeft: -10 + }).find('.layui-clear>li').on('click', function(){ + callback && callback({ + src: faces[this.title] + ,alt: this.title + }); + layer.close(index); + }); + $(document).off('click', face.hide).on('click', face.hide); + } + }); + } + + //插入代码面板 + ,code = function(callback){ + var body = this, index = layer.open({ + type: 1 + ,id: 'LAY_layedit_code' + ,area: '550px' + ,shade: 0.05 + ,shadeClose: true + ,moveType: 1 + ,title: '插入代码' + ,skin: 'layui-layer-msg' + ,content: ['
          ' + ,'
        • ' + ,'' + ,'
          ' + ,'' + ,'
          ' + ,'
        • ' + ,'
        • ' + ,'' + ,'
          ' + ,'' + ,'
          ' + ,'
        • ' + ,'
        • ' + ,'' + ,'' + ,'
        • ' + ,'
        '].join('') + ,success: function(layero, index){ + var eventFilter = 'submit(layedit-code-yes)'; + form.render('select'); + layero.find('.layui-btn-primary').on('click', function(){ + layer.close(index); + body.focus(); + }); + form.on(eventFilter, function(data){ + layer.close(code.index); + callback && callback(data.field); + }); + } + }); + code.index = index; + } + + //全部工具 + ,tools = { + html: '' + ,strong: '' + ,italic: '' + ,underline: '' + ,del: '' + + ,'|': '' + + ,left: '' + ,center: '' + ,right: '' + ,link: '' + ,unlink: '' + ,face: '' + ,image: '' + ,code: '' + + ,help: '' + } + + ,edit = new Edit(); + + exports(MOD_NAME, edit); +}); diff --git a/IoTGateway/wwwroot/layui/lay/modules/layer.js b/IoTGateway/wwwroot/layui/lay/modules/layer.js new file mode 100644 index 0000000..830fbf5 --- /dev/null +++ b/IoTGateway/wwwroot/layui/lay/modules/layer.js @@ -0,0 +1,1311 @@ +/** + + @Name:layer - Web 弹出层组件 + @License:MIT + + */ + +;!function(window, undefined){ +"use strict"; + +var isLayui = window.layui && layui.define, $, win, ready = { + getPath: function(){ + var jsPath = document.currentScript ? document.currentScript.src : function(){ + var js = document.scripts + ,last = js.length - 1 + ,src; + for(var i = last; i > 0; i--){ + if(js[i].readyState === 'interactive'){ + src = js[i].src; + break; + } + } + return src || js[last].src; + }(); + return jsPath.substring(0, jsPath.lastIndexOf('/') + 1); + }(), + + config: {}, end: {}, minIndex: 0, minLeft: [], + btn: ['确定', '取消'], + + //五种原始层模式 + type: ['dialog', 'page', 'iframe', 'loading', 'tips'], + + //获取节点的style属性值 + getStyle: function(node, name){ + var style = node.currentStyle ? node.currentStyle : window.getComputedStyle(node, null); + return style[style.getPropertyValue ? 'getPropertyValue' : 'getAttribute'](name); + }, + + //载入 CSS 依赖 + link: function(href, fn, cssname){ + + //未设置路径,则不主动加载css + if(!layer.path) return; + + var head = document.getElementsByTagName("head")[0], link = document.createElement('link'); + if(typeof fn === 'string') cssname = fn; + var app = (cssname || href).replace(/\.|\//g, ''); + var id = 'layuicss-'+ app, timeout = 0; + + link.rel = 'stylesheet'; + link.href = layer.path + href; + link.id = id; + + if(!document.getElementById(id)){ + head.appendChild(link); + } + + if(typeof fn !== 'function') return; + + //轮询css是否加载完毕 + (function poll() { + if(++timeout > 8 * 1000 / 100){ + return window.console && console.error('layer.css: Invalid'); + }; + parseInt(ready.getStyle(document.getElementById(id), 'width')) === 1989 ? fn() : setTimeout(poll, 100); + }()); + } +}; + +//默认内置方法。 +var layer = { + v: '3.3.0', + ie: function(){ //ie版本 + var agent = navigator.userAgent.toLowerCase(); + return (!!window.ActiveXObject || "ActiveXObject" in window) ? ( + (agent.match(/msie\s(\d+)/) || [])[1] || '11' //由于ie11并没有msie的标识 + ) : false; + }(), + index: (window.layer && window.layer.v) ? 100000 : 0, + path: ready.getPath, + config: function(options, fn){ + options = options || {}; + layer.cache = ready.config = $.extend({}, ready.config, options); + layer.path = ready.config.path || layer.path; + typeof options.extend === 'string' && (options.extend = [options.extend]); + + if(ready.config.path) layer.ready(); + + if(!options.extend) return this; + + isLayui + ? layui.addcss('modules/layer/' + options.extend) + : ready.link('theme/' + options.extend); + + return this; + }, + + //主体CSS等待事件 + ready: function(callback){ + var cssname = 'layer', ver = '' + ,path = (isLayui ? 'modules/layer/' : 'theme/') + 'default/layer.css?v='+ layer.v + ver; + isLayui ? layui.addcss(path, callback, cssname) : ready.link(path, callback, cssname); + return this; + }, + + //各种快捷引用 + alert: function(content, options, yes){ + var type = typeof options === 'function'; + if(type) yes = options; + return layer.open($.extend({ + content: content, + yes: yes + }, type ? {} : options)); + }, + + confirm: function(content, options, yes, cancel){ + var type = typeof options === 'function'; + if(type){ + cancel = yes; + yes = options; + } + return layer.open($.extend({ + content: content, + btn: ready.btn, + yes: yes, + btn2: cancel + }, type ? {} : options)); + }, + + msg: function(content, options, end){ //最常用提示层 + var type = typeof options === 'function', rskin = ready.config.skin; + var skin = (rskin ? rskin + ' ' + rskin + '-msg' : '')||'layui-layer-msg'; + var anim = doms.anim.length - 1; + if(type) end = options; + return layer.open($.extend({ + content: content, + time: 3000, + shade: false, + skin: skin, + title: false, + closeBtn: false, + btn: false, + resize: false, + end: end + }, (type && !ready.config.skin) ? { + skin: skin + ' layui-layer-hui', + anim: anim + } : function(){ + options = options || {}; + if(options.icon === -1 || options.icon === undefined && !ready.config.skin){ + options.skin = skin + ' ' + (options.skin||'layui-layer-hui'); + } + return options; + }())); + }, + + load: function(icon, options){ + return layer.open($.extend({ + type: 3, + icon: icon || 0, + resize: false, + shade: 0.01 + }, options)); + }, + + tips: function(content, follow, options){ + return layer.open($.extend({ + type: 4, + content: [content, follow], + closeBtn: false, + time: 3000, + shade: false, + resize: false, + fixed: false, + maxWidth: 260 + }, options)); + } +}; + +var Class = function(setings){ + var that = this, creat = function(){ + layer.ready(function(){ + that.creat(); + }); + }; + that.index = ++layer.index; + that.config.maxWidth = $(win).width() - 15*2; //初始最大宽度:当前屏幕宽,左右留 15px 边距 + that.config = $.extend({}, that.config, ready.config, setings); + document.body ? creat() : setTimeout(function(){ + creat(); + }, 30); +}; + +Class.pt = Class.prototype; + +//缓存常用字符 +var doms = ['layui-layer', '.layui-layer-title', '.layui-layer-main', '.layui-layer-dialog', 'layui-layer-iframe', 'layui-layer-content', 'layui-layer-btn', 'layui-layer-close']; +doms.anim = ['layer-anim-00', 'layer-anim-01', 'layer-anim-02', 'layer-anim-03', 'layer-anim-04', 'layer-anim-05', 'layer-anim-06']; + +//默认配置 +Class.pt.config = { + type: 0, + shade: 0.3, + fixed: true, + move: doms[1], + title: '信息', + offset: 'auto', + area: 'auto', + closeBtn: 1, + time: 0, //0表示不自动关闭 + zIndex: 19891014, + maxWidth: 360, + anim: 0, + isOutAnim: true, + icon: -1, + moveType: 1, + resize: true, + scrollbar: true, //是否允许浏览器滚动条 + tips: 2 +}; + +//容器 +Class.pt.vessel = function(conType, callback){ + var that = this, times = that.index, config = that.config; + var zIndex = config.zIndex + times, titype = typeof config.title === 'object'; + var ismax = config.maxmin && (config.type === 1 || config.type === 2); + var titleHTML = (config.title ? '
        ' + + (titype ? config.title[0] : config.title) + + '
        ' : ''); + + config.zIndex = zIndex; + callback([ + //遮罩 + config.shade ? ('
        ') : '', + + //主体 + '
        ' + + (conType && config.type != 2 ? '' : titleHTML) + + '
        ' + + (config.type == 0 && config.icon !== -1 ? '' : '') + + (config.type == 1 && conType ? '' : (config.content||'')) + + '
        ' + + ''+ function(){ + var closebtn = ismax ? '' : ''; + config.closeBtn && (closebtn += ''); + return closebtn; + }() + '' + + (config.btn ? function(){ + var button = ''; + typeof config.btn === 'string' && (config.btn = [config.btn]); + for(var i = 0, len = config.btn.length; i < len; i++){ + button += ''+ config.btn[i] +'' + } + return '
        '+ button +'
        ' + }() : '') + + (config.resize ? '' : '') + + '
        ' + ], titleHTML, $('
        ')); + return that; +}; + +//创建骨架 +Class.pt.creat = function(){ + var that = this + ,config = that.config + ,times = that.index, nodeIndex + ,content = config.content + ,conType = typeof content === 'object' + ,body = $('body'); + + if(config.id && $('#'+config.id)[0]) return; + + if(typeof config.area === 'string'){ + config.area = config.area === 'auto' ? ['', ''] : [config.area, '']; + } + + //anim兼容旧版shift + if(config.shift){ + config.anim = config.shift; + } + + if(layer.ie == 6){ + config.fixed = false; + } + + switch(config.type){ + case 0: + config.btn = ('btn' in config) ? config.btn : ready.btn[0]; + layer.closeAll('dialog'); + break; + case 2: + var content = config.content = conType ? config.content : [config.content||'', 'auto']; + config.content = ''; + break; + case 3: + delete config.title; + delete config.closeBtn; + config.icon === -1 && (config.icon === 0); + layer.closeAll('loading'); + break; + case 4: + conType || (config.content = [config.content, 'body']); + config.follow = config.content[1]; + config.content = config.content[0] + ''; + delete config.title; + config.tips = typeof config.tips === 'object' ? config.tips : [config.tips, true]; + config.tipsMore || layer.closeAll('tips'); + break; + } + + //建立容器 + that.vessel(conType, function(html, titleHTML, moveElem){ + body.append(html[0]); + conType ? function(){ + (config.type == 2 || config.type == 4) ? function(){ + $('body').append(html[1]); + }() : function(){ + if(!content.parents('.'+doms[0])[0]){ + content.data('display', content.css('display')).show().addClass('layui-layer-wrap').wrap(html[1]); + $('#'+ doms[0] + times).find('.'+doms[5]).before(titleHTML); + } + }(); + }() : body.append(html[1]); + $('.layui-layer-move')[0] || body.append(ready.moveElem = moveElem); + that.layero = $('#'+ doms[0] + times); + config.scrollbar || doms.html.css('overflow', 'hidden').attr('layer-full', times); + }).auto(times); + + //遮罩 + $('#layui-layer-shade'+ that.index).css({ + 'background-color': config.shade[1] || '#000' + ,'opacity': config.shade[0]||config.shade + }); + + config.type == 2 && layer.ie == 6 && that.layero.find('iframe').attr('src', content[0]); + + //坐标自适应浏览器窗口尺寸 + config.type == 4 ? that.tips() : that.offset(); + if(config.fixed){ + win.on('resize', function(){ + that.offset(); + (/^\d+%$/.test(config.area[0]) || /^\d+%$/.test(config.area[1])) && that.auto(times); + config.type == 4 && that.tips(); + }); + } + + config.time <= 0 || setTimeout(function(){ + layer.close(that.index) + }, config.time); + that.move().callback(); + + //为兼容jQuery3.0的css动画影响元素尺寸计算 + if(doms.anim[config.anim]){ + var animClass = 'layer-anim '+ doms.anim[config.anim]; + that.layero.addClass(animClass).one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function(){ + $(this).removeClass(animClass); + }); + }; + + //记录关闭动画 + if(config.isOutAnim){ + that.layero.data('isOutAnim', true); + } +}; + +//自适应 +Class.pt.auto = function(index){ + var that = this, config = that.config, layero = $('#'+ doms[0] + index); + + if(config.area[0] === '' && config.maxWidth > 0){ + //为了修复IE7下一个让人难以理解的bug + if(layer.ie && layer.ie < 8 && config.btn){ + layero.width(layero.innerWidth()); + } + layero.outerWidth() > config.maxWidth && layero.width(config.maxWidth); + } + + var area = [layero.innerWidth(), layero.innerHeight()] + ,titHeight = layero.find(doms[1]).outerHeight() || 0 + ,btnHeight = layero.find('.'+doms[6]).outerHeight() || 0 + ,setHeight = function(elem){ + elem = layero.find(elem); + elem.height(area[1] - titHeight - btnHeight - 2*(parseFloat(elem.css('padding-top'))|0)); + }; + + switch(config.type){ + case 2: + setHeight('iframe'); + break; + default: + if(config.area[1] === ''){ + if(config.maxHeight > 0 && layero.outerHeight() > config.maxHeight){ + area[1] = config.maxHeight; + setHeight('.'+doms[5]); + } else if(config.fixed && area[1] >= win.height()){ + area[1] = win.height(); + setHeight('.'+doms[5]); + } + } else { + setHeight('.'+doms[5]); + } + break; + }; + + return that; +}; + +//计算坐标 +Class.pt.offset = function(){ + var that = this, config = that.config, layero = that.layero; + var area = [layero.outerWidth(), layero.outerHeight()]; + var type = typeof config.offset === 'object'; + that.offsetTop = (win.height() - area[1])/2; + that.offsetLeft = (win.width() - area[0])/2; + + if(type){ + that.offsetTop = config.offset[0]; + that.offsetLeft = config.offset[1]||that.offsetLeft; + } else if(config.offset !== 'auto'){ + + if(config.offset === 't'){ //上 + that.offsetTop = 0; + } else if(config.offset === 'r'){ //右 + that.offsetLeft = win.width() - area[0]; + } else if(config.offset === 'b'){ //下 + that.offsetTop = win.height() - area[1]; + } else if(config.offset === 'l'){ //左 + that.offsetLeft = 0; + } else if(config.offset === 'lt'){ //左上角 + that.offsetTop = 0; + that.offsetLeft = 0; + } else if(config.offset === 'lb'){ //左下角 + that.offsetTop = win.height() - area[1]; + that.offsetLeft = 0; + } else if(config.offset === 'rt'){ //右上角 + that.offsetTop = 0; + that.offsetLeft = win.width() - area[0]; + } else if(config.offset === 'rb'){ //右下角 + that.offsetTop = win.height() - area[1]; + that.offsetLeft = win.width() - area[0]; + } else { + that.offsetTop = config.offset; + } + + } + + if(!config.fixed){ + that.offsetTop = /%$/.test(that.offsetTop) ? + win.height()*parseFloat(that.offsetTop)/100 + : parseFloat(that.offsetTop); + that.offsetLeft = /%$/.test(that.offsetLeft) ? + win.width()*parseFloat(that.offsetLeft)/100 + : parseFloat(that.offsetLeft); + that.offsetTop += win.scrollTop(); + that.offsetLeft += win.scrollLeft(); + } + + if(layero.attr('minLeft')){ + that.offsetTop = win.height() - (layero.find(doms[1]).outerHeight() || 0); + that.offsetLeft = layero.css('left'); + } + + layero.css({top: that.offsetTop, left: that.offsetLeft}); +}; + +//Tips +Class.pt.tips = function(){ + var that = this, config = that.config, layero = that.layero; + var layArea = [layero.outerWidth(), layero.outerHeight()], follow = $(config.follow); + if(!follow[0]) follow = $('body'); + var goal = { + width: follow.outerWidth(), + height: follow.outerHeight(), + top: follow.offset().top, + left: follow.offset().left + }, tipsG = layero.find('.layui-layer-TipsG'); + + var guide = config.tips[0]; + config.tips[1] || tipsG.remove(); + + goal.autoLeft = function(){ + if(goal.left + layArea[0] - win.width() > 0){ + goal.tipLeft = goal.left + goal.width - layArea[0]; + tipsG.css({right: 12, left: 'auto'}); + } else { + goal.tipLeft = goal.left; + }; + }; + + //辨别tips的方位 + goal.where = [function(){ //上 + goal.autoLeft(); + goal.tipTop = goal.top - layArea[1] - 10; + tipsG.removeClass('layui-layer-TipsB').addClass('layui-layer-TipsT').css('border-right-color', config.tips[1]); + }, function(){ //右 + goal.tipLeft = goal.left + goal.width + 10; + goal.tipTop = goal.top; + tipsG.removeClass('layui-layer-TipsL').addClass('layui-layer-TipsR').css('border-bottom-color', config.tips[1]); + }, function(){ //下 + goal.autoLeft(); + goal.tipTop = goal.top + goal.height + 10; + tipsG.removeClass('layui-layer-TipsT').addClass('layui-layer-TipsB').css('border-right-color', config.tips[1]); + }, function(){ //左 + goal.tipLeft = goal.left - layArea[0] - 10; + goal.tipTop = goal.top; + tipsG.removeClass('layui-layer-TipsR').addClass('layui-layer-TipsL').css('border-bottom-color', config.tips[1]); + }]; + goal.where[guide-1](); + + /* 8*2为小三角形占据的空间 */ + if(guide === 1){ + goal.top - (win.scrollTop() + layArea[1] + 8*2) < 0 && goal.where[2](); + } else if(guide === 2){ + win.width() - (goal.left + goal.width + layArea[0] + 8*2) > 0 || goal.where[3]() + } else if(guide === 3){ + (goal.top - win.scrollTop() + goal.height + layArea[1] + 8*2) - win.height() > 0 && goal.where[0](); + } else if(guide === 4){ + layArea[0] + 8*2 - goal.left > 0 && goal.where[1]() + } + + layero.find('.'+doms[5]).css({ + 'background-color': config.tips[1], + 'padding-right': (config.closeBtn ? '30px' : '') + }); + layero.css({ + left: goal.tipLeft - (config.fixed ? win.scrollLeft() : 0), + top: goal.tipTop - (config.fixed ? win.scrollTop() : 0) + }); +} + +//拖拽层 +Class.pt.move = function(){ + var that = this + ,config = that.config + ,_DOC = $(document) + ,layero = that.layero + ,moveElem = layero.find(config.move) + ,resizeElem = layero.find('.layui-layer-resize') + ,dict = {}; + + if(config.move){ + moveElem.css('cursor', 'move'); + } + + moveElem.on('mousedown', function(e){ + e.preventDefault(); + if(config.move){ + dict.moveStart = true; + dict.offset = [ + e.clientX - parseFloat(layero.css('left')) + ,e.clientY - parseFloat(layero.css('top')) + ]; + ready.moveElem.css('cursor', 'move').show(); + } + }); + + resizeElem.on('mousedown', function(e){ + e.preventDefault(); + dict.resizeStart = true; + dict.offset = [e.clientX, e.clientY]; + dict.area = [ + layero.outerWidth() + ,layero.outerHeight() + ]; + ready.moveElem.css('cursor', 'se-resize').show(); + }); + + _DOC.on('mousemove', function(e){ + + //拖拽移动 + if(dict.moveStart){ + var X = e.clientX - dict.offset[0] + ,Y = e.clientY - dict.offset[1] + ,fixed = layero.css('position') === 'fixed'; + + e.preventDefault(); + + dict.stX = fixed ? 0 : win.scrollLeft(); + dict.stY = fixed ? 0 : win.scrollTop(); + + //控制元素不被拖出窗口外 + if(!config.moveOut){ + var setRig = win.width() - layero.outerWidth() + dict.stX + ,setBot = win.height() - layero.outerHeight() + dict.stY; + X < dict.stX && (X = dict.stX); + X > setRig && (X = setRig); + Y < dict.stY && (Y = dict.stY); + Y > setBot && (Y = setBot); + } + + layero.css({ + left: X + ,top: Y + }); + } + + //Resize + if(config.resize && dict.resizeStart){ + var X = e.clientX - dict.offset[0] + ,Y = e.clientY - dict.offset[1]; + + e.preventDefault(); + + layer.style(that.index, { + width: dict.area[0] + X + ,height: dict.area[1] + Y + }) + dict.isResize = true; + config.resizing && config.resizing(layero); + } + }).on('mouseup', function(e){ + if(dict.moveStart){ + delete dict.moveStart; + ready.moveElem.hide(); + config.moveEnd && config.moveEnd(layero); + } + if(dict.resizeStart){ + delete dict.resizeStart; + ready.moveElem.hide(); + } + }); + + return that; +}; + +Class.pt.callback = function(){ + var that = this, layero = that.layero, config = that.config; + that.openLayer(); + if(config.success){ + if(config.type == 2){ + layero.find('iframe').on('load', function(){ + config.success(layero, that.index); + }); + } else { + config.success(layero, that.index); + } + } + layer.ie == 6 && that.IE6(layero); + + //按钮 + layero.find('.'+ doms[6]).children('a').on('click', function(){ + var index = $(this).index(); + if(index === 0){ + if(config.yes){ + config.yes(that.index, layero) + } else if(config['btn1']){ + config['btn1'](that.index, layero) + } else { + layer.close(that.index); + } + } else { + var close = config['btn'+(index+1)] && config['btn'+(index+1)](that.index, layero); + close === false || layer.close(that.index); + } + }); + + //取消 + function cancel(){ + var close = config.cancel && config.cancel(that.index, layero); + close === false || layer.close(that.index); + } + + //右上角关闭回调 + layero.find('.'+ doms[7]).on('click', cancel); + + //点遮罩关闭 + if(config.shadeClose){ + $('#layui-layer-shade'+ that.index).on('click', function(){ + layer.close(that.index); + }); + } + + //最小化 + layero.find('.layui-layer-min').on('click', function(){ + var min = config.min && config.min(layero); + min === false || layer.min(that.index, config); + }); + + //全屏/还原 + layero.find('.layui-layer-max').on('click', function(){ + if($(this).hasClass('layui-layer-maxmin')){ + layer.restore(that.index); + config.restore && config.restore(layero); + } else { + layer.full(that.index, config); + setTimeout(function(){ + config.full && config.full(layero); + }, 100); + } + }); + + config.end && (ready.end[that.index] = config.end); +}; + +//for ie6 恢复select +ready.reselect = function(){ + $.each($('select'), function(index , value){ + var sthis = $(this); + if(!sthis.parents('.'+doms[0])[0]){ + (sthis.attr('layer') == 1 && $('.'+doms[0]).length < 1) && sthis.removeAttr('layer').show(); + } + sthis = null; + }); +}; + +Class.pt.IE6 = function(layero){ + //隐藏select + $('select').each(function(index , value){ + var sthis = $(this); + if(!sthis.parents('.'+doms[0])[0]){ + sthis.css('display') === 'none' || sthis.attr({'layer' : '1'}).hide(); + } + sthis = null; + }); +}; + +//需依赖原型的对外方法 +Class.pt.openLayer = function(){ + var that = this; + + //置顶当前窗口 + layer.zIndex = that.config.zIndex; + layer.setTop = function(layero){ + var setZindex = function(){ + layer.zIndex++; + layero.css('z-index', layer.zIndex + 1); + }; + layer.zIndex = parseInt(layero[0].style.zIndex); + layero.on('mousedown', setZindex); + return layer.zIndex; + }; +}; + +ready.record = function(layero){ + var area = [ + layero.width(), + layero.height(), + layero.position().top, + layero.position().left + parseFloat(layero.css('margin-left')) + ]; + layero.find('.layui-layer-max').addClass('layui-layer-maxmin'); + layero.attr({area: area}); +}; + +ready.rescollbar = function(index){ + if(doms.html.attr('layer-full') == index){ + if(doms.html[0].style.removeProperty){ + doms.html[0].style.removeProperty('overflow'); + } else { + doms.html[0].style.removeAttribute('overflow'); + } + doms.html.removeAttr('layer-full'); + } +}; + +/** 内置成员 */ + +window.layer = layer; + +//获取子iframe的DOM +layer.getChildFrame = function(selector, index){ + index = index || $('.'+doms[4]).attr('times'); + return $('#'+ doms[0] + index).find('iframe').contents().find(selector); +}; + +//得到当前iframe层的索引,子iframe时使用 +layer.getFrameIndex = function(name){ + return $('#'+ name).parents('.'+doms[4]).attr('times'); +}; + +//iframe层自适应宽高 +layer.iframeAuto = function(index){ + if(!index) return; + var heg = layer.getChildFrame('html', index).outerHeight(); + var layero = $('#'+ doms[0] + index); + var titHeight = layero.find(doms[1]).outerHeight() || 0; + var btnHeight = layero.find('.'+doms[6]).outerHeight() || 0; + layero.css({height: heg + titHeight + btnHeight}); + layero.find('iframe').css({height: heg}); +}; + +//重置iframe url +layer.iframeSrc = function(index, url){ + $('#'+ doms[0] + index).find('iframe').attr('src', url); +}; + +//设定层的样式 +layer.style = function(index, options, limit){ + var layero = $('#'+ doms[0] + index) + ,contElem = layero.find('.layui-layer-content') + ,type = layero.attr('type') + ,titHeight = layero.find(doms[1]).outerHeight() || 0 + ,btnHeight = layero.find('.'+doms[6]).outerHeight() || 0 + ,minLeft = layero.attr('minLeft'); + + if(type === ready.type[3] || type === ready.type[4]){ + return; + } + + if(!limit){ + if(parseFloat(options.width) <= 260){ + options.width = 260; + }; + + if(parseFloat(options.height) - titHeight - btnHeight <= 64){ + options.height = 64 + titHeight + btnHeight; + }; + } + + layero.css(options); + btnHeight = layero.find('.'+doms[6]).outerHeight(); + + if(type === ready.type[2]){ + layero.find('iframe').css({ + height: parseFloat(options.height) - titHeight - btnHeight + }); + } else { + contElem.css({ + height: parseFloat(options.height) - titHeight - btnHeight + - parseFloat(contElem.css('padding-top')) + - parseFloat(contElem.css('padding-bottom')) + }) + } +}; + +//最小化 +layer.min = function(index, options){ + var layero = $('#'+ doms[0] + index) + ,titHeight = layero.find(doms[1]).outerHeight() || 0 + ,left = layero.attr('minLeft') || (181*ready.minIndex)+'px' + ,position = layero.css('position'); + + ready.record(layero); + + if(ready.minLeft[0]){ + left = ready.minLeft[0]; + ready.minLeft.shift(); + } + + layero.attr('position', position); + + layer.style(index, { + width: 180 + ,height: titHeight + ,left: left + ,top: win.height() - titHeight + ,position: 'fixed' + ,overflow: 'hidden' + }, true); + + layero.find('.layui-layer-min').hide(); + layero.attr('type') === 'page' && layero.find(doms[4]).hide(); + ready.rescollbar(index); + + if(!layero.attr('minLeft')){ + ready.minIndex++; + } + layero.attr('minLeft', left); +}; + +//还原 +layer.restore = function(index){ + var layero = $('#'+ doms[0] + index), area = layero.attr('area').split(','); + var type = layero.attr('type'); + layer.style(index, { + width: parseFloat(area[0]), + height: parseFloat(area[1]), + top: parseFloat(area[2]), + left: parseFloat(area[3]), + position: layero.attr('position'), + overflow: 'visible' + }, true); + layero.find('.layui-layer-max').removeClass('layui-layer-maxmin'); + layero.find('.layui-layer-min').show(); + layero.attr('type') === 'page' && layero.find(doms[4]).show(); + ready.rescollbar(index); +}; + +//全屏 +layer.full = function(index){ + var layero = $('#'+ doms[0] + index), timer; + ready.record(layero); + if(!doms.html.attr('layer-full')){ + doms.html.css('overflow','hidden').attr('layer-full', index); + } + clearTimeout(timer); + timer = setTimeout(function(){ + var isfix = layero.css('position') === 'fixed'; + layer.style(index, { + top: isfix ? 0 : win.scrollTop(), + left: isfix ? 0 : win.scrollLeft(), + width: win.width(), + height: win.height() + }, true); + layero.find('.layui-layer-min').hide(); + }, 100); +}; + +//改变title +layer.title = function(name, index){ + var title = $('#'+ doms[0] + (index||layer.index)).find(doms[1]); + title.html(name); +}; + +//关闭layer总方法 +layer.close = function(index){ + layer.ready(function(){ + var layero = $('#'+ doms[0] + index), type = layero.attr('type'), closeAnim = 'layer-anim-close'; + if(!layero[0]) return; + var WRAP = 'layui-layer-wrap', remove = function(){ + if(type === ready.type[1] && layero.attr('conType') === 'object'){ + layero.children(':not(.'+ doms[5] +')').remove(); + var wrap = layero.find('.'+WRAP); + for(var i = 0; i < 2; i++){ + wrap.unwrap(); + } + wrap.css('display', wrap.data('display')).removeClass(WRAP); + } else { + //低版本IE 回收 iframe + if(type === ready.type[2]){ + try { + var iframe = $('#'+doms[4]+index)[0]; + iframe.contentWindow.document.write(''); + iframe.contentWindow.close(); + layero.find('.'+doms[5])[0].removeChild(iframe); + } catch(e){} + } + layero[0].innerHTML = ''; + layero.remove(); + } + typeof ready.end[index] === 'function' && ready.end[index](); + delete ready.end[index]; + }; + + if(layero.data('isOutAnim')){ + layero.addClass('layer-anim '+ closeAnim); + } + + $('#layui-layer-moves, #layui-layer-shade' + index).remove(); + layer.ie == 6 && ready.reselect(); + ready.rescollbar(index); + if(layero.attr('minLeft')){ + ready.minIndex--; + ready.minLeft.push(layero.attr('minLeft')); + } + + if((layer.ie && layer.ie < 10) || !layero.data('isOutAnim')){ + remove() + } else { + setTimeout(function(){ + remove(); + }, 200); + } + }); +}; + +//关闭所有层 +layer.closeAll = function(type){ + layer.ready(function(){ + $.each($('.'+doms[0]), function(){ + var othis = $(this); + var is = type ? (othis.attr('type') === type) : 1; + is && layer.close(othis.attr('times')); + is = null; + }); + }); +}; + +/** + + 拓展模块,layui开始合并在一起 + + */ + +var cache = layer.cache||{}, skin = function(type){ + return (cache.skin ? (' ' + cache.skin + ' ' + cache.skin + '-'+type) : ''); +}; + +//仿系统prompt +layer.prompt = function(options, yes){ + var style = ''; + options = options || {}; + + if(typeof options === 'function') yes = options; + + if(options.area){ + var area = options.area; + style = 'style="width: '+ area[0] +'; height: '+ area[1] + ';"'; + delete options.area; + } + var prompt, content = options.formType == 2 ? '' : function(){ + return ''; + }(); + + var success = options.success; + delete options.success; + + return layer.open($.extend({ + type: 1 + ,btn: ['确定','取消'] + ,content: content + ,skin: 'layui-layer-prompt' + skin('prompt') + ,maxWidth: win.width() + ,success: function(layero){ + prompt = layero.find('.layui-layer-input'); + prompt.val(options.value || '').focus(); + typeof success === 'function' && success(layero); + } + ,resize: false + ,yes: function(index){ + var value = prompt.val(); + if(value === ''){ + prompt.focus(); + } else if(value.length > (options.maxlength||500)) { + layer.tips('最多输入'+ (options.maxlength || 500) +'个字数', prompt, {tips: 1}); + } else { + yes && yes(value, index, prompt); + } + } + }, options)); +}; + +//tab层 +layer.tab = function(options){ + options = options || {}; + + var tab = options.tab || {} + ,THIS = 'layui-this' + ,success = options.success; + + delete options.success; + + return layer.open($.extend({ + type: 1, + skin: 'layui-layer-tab' + skin('tab'), + resize: false, + title: function(){ + var len = tab.length, ii = 1, str = ''; + if(len > 0){ + str = ''+ tab[0].title +''; + for(; ii < len; ii++){ + str += ''+ tab[ii].title +''; + } + } + return str; + }(), + content: '
          '+ function(){ + var len = tab.length, ii = 1, str = ''; + if(len > 0){ + str = '
        • '+ (tab[0].content || 'no content') +'
        • '; + for(; ii < len; ii++){ + str += '
        • '+ (tab[ii].content || 'no content') +'
        • '; + } + } + return str; + }() +'
        ', + success: function(layero){ + var btn = layero.find('.layui-layer-title').children(); + var main = layero.find('.layui-layer-tabmain').children(); + btn.on('mousedown', function(e){ + e.stopPropagation ? e.stopPropagation() : e.cancelBubble = true; + var othis = $(this), index = othis.index(); + othis.addClass(THIS).siblings().removeClass(THIS); + main.eq(index).show().siblings().hide(); + typeof options.change === 'function' && options.change(index); + }); + typeof success === 'function' && success(layero); + } + }, options)); +}; + +//相册层 +layer.photos = function(options, loop, key){ + var dict = {}; + options = options || {}; + if(!options.photos) return; + var type = options.photos.constructor === Object; + var photos = type ? options.photos : {}, data = photos.data || []; + var start = photos.start || 0; + dict.imgIndex = (start|0) + 1; + + options.img = options.img || 'img'; + + var success = options.success; + delete options.success; + + if(!type){ //页面直接获取 + var parent = $(options.photos), pushData = function(){ + data = []; + parent.find(options.img).each(function(index){ + var othis = $(this); + othis.attr('layer-index', index); + data.push({ + alt: othis.attr('alt'), + pid: othis.attr('layer-pid'), + src: othis.attr('layer-src') || othis.attr('src'), + thumb: othis.attr('src') + }); + }) + }; + + pushData(); + + if (data.length === 0) return; + + loop || parent.on('click', options.img, function(){ + var othis = $(this), index = othis.attr('layer-index'); + layer.photos($.extend(options, { + photos: { + start: index, + data: data, + tab: options.tab + }, + full: options.full + }), true); + pushData(); + }) + + //不直接弹出 + if(!loop) return; + + } else if (data.length === 0){ + return layer.msg('没有图片'); + } + + //上一张 + dict.imgprev = function(key){ + dict.imgIndex--; + if(dict.imgIndex < 1){ + dict.imgIndex = data.length; + } + dict.tabimg(key); + }; + + //下一张 + dict.imgnext = function(key,errorMsg){ + dict.imgIndex++; + if(dict.imgIndex > data.length){ + dict.imgIndex = 1; + if (errorMsg) {return}; + } + dict.tabimg(key) + }; + + //方向键 + dict.keyup = function(event){ + if(!dict.end){ + var code = event.keyCode; + event.preventDefault(); + if(code === 37){ + dict.imgprev(true); + } else if(code === 39) { + dict.imgnext(true); + } else if(code === 27) { + layer.close(dict.index); + } + } + } + + //切换 + dict.tabimg = function(key){ + if(data.length <= 1) return; + photos.start = dict.imgIndex - 1; + layer.close(dict.index); + return layer.photos(options, true, key); + setTimeout(function(){ + layer.photos(options, true, key); + }, 200); + } + + //一些动作 + dict.event = function(){ + dict.bigimg.hover(function(){ + dict.imgsee.show(); + }, function(){ + dict.imgsee.hide(); + }); + + dict.bigimg.find('.layui-layer-imgprev').on('click', function(event){ + event.preventDefault(); + dict.imgprev(); + }); + + dict.bigimg.find('.layui-layer-imgnext').on('click', function(event){ + event.preventDefault(); + dict.imgnext(); + }); + + $(document).on('keyup', dict.keyup); + }; + + //图片预加载 + function loadImage(url, callback, error) { + var img = new Image(); + img.src = url; + if(img.complete){ + return callback(img); + } + img.onload = function(){ + img.onload = null; + callback(img); + }; + img.onerror = function(e){ + img.onerror = null; + error(e); + }; + }; + + dict.loadi = layer.load(1, { + shade: 'shade' in options ? false : 0.9, + scrollbar: false + }); + + loadImage(data[start].src, function(img){ + layer.close(dict.loadi); + dict.index = layer.open($.extend({ + type: 1, + id: 'layui-layer-photos', + area: function(){ + var imgarea = [img.width, img.height]; + var winarea = [$(window).width() - 100, $(window).height() - 100]; + + //如果 实际图片的宽或者高比 屏幕大(那么进行缩放) + if(!options.full && (imgarea[0]>winarea[0]||imgarea[1]>winarea[1])){ + var wh = [imgarea[0]/winarea[0],imgarea[1]/winarea[1]];//取宽度缩放比例、高度缩放比例 + if(wh[0] > wh[1]){//取缩放比例最大的进行缩放 + imgarea[0] = imgarea[0]/wh[0]; + imgarea[1] = imgarea[1]/wh[0]; + } else if(wh[0] < wh[1]){ + imgarea[0] = imgarea[0]/wh[1]; + imgarea[1] = imgarea[1]/wh[1]; + } + } + + return [imgarea[0]+'px', imgarea[1]+'px']; + }(), + title: false, + shade: 0.9, + shadeClose: true, + closeBtn: false, + move: '.layui-layer-phimg img', + moveType: 1, + scrollbar: false, + moveOut: true, + //anim: Math.random()*5|0, + isOutAnim: false, + skin: 'layui-layer-photos' + skin('photos'), + content: '
        ' + +''+ (data[start].alt||'') +'' + +'
        ' + +(data.length > 1 ? '' : '') + +'
        '+ (data[start].alt||'') +''+ dict.imgIndex +'/'+ data.length +'
        ' + +'
        ' + +'
        ', + success: function(layero, index){ + dict.bigimg = layero.find('.layui-layer-phimg'); + dict.imgsee = layero.find('.layui-layer-imguide,.layui-layer-imgbar'); + dict.event(layero); + options.tab && options.tab(data[start], layero); + typeof success === 'function' && success(layero); + }, end: function(){ + dict.end = true; + $(document).off('keyup', dict.keyup); + } + }, options)); + }, function(){ + layer.close(dict.loadi); + layer.msg('当前图片地址异常
        是否继续查看下一张?', { + time: 30000, + btn: ['下一张', '不看了'], + yes: function(){ + data.length > 1 && dict.imgnext(true,true); + } + }); + }); +}; + +//主入口 +ready.run = function(_$){ + $ = _$; + win = $(window); + doms.html = $('html'); + layer.open = function(deliver){ + var o = new Class(deliver); + return o.index; + }; +}; + +//加载方式 +window.layui && layui.define ? ( + layer.ready() + ,layui.define('jquery', function(exports){ //layui加载 + layer.path = layui.cache.dir; + ready.run(layui.$); + + //暴露模块 + window.layer = layer; + exports('layer', layer); + }) +) : ( + (typeof define === 'function' && define.amd) ? define(['jquery'], function(){ //requirejs加载 + ready.run(window.jQuery); + return layer; + }) : function(){ //普通script标签加载 + ready.run(window.jQuery); + layer.ready(); + }() +); + +}(window); diff --git a/IoTGateway/wwwroot/layui/lay/modules/laypage.js b/IoTGateway/wwwroot/layui/lay/modules/laypage.js new file mode 100644 index 0000000..2df27fd --- /dev/null +++ b/IoTGateway/wwwroot/layui/lay/modules/laypage.js @@ -0,0 +1,309 @@ +/** + + @Name : laypage 分页组件 + @License:MIT + + */ + +layui.define(function(exports){ + "use strict"; + + var doc = document + ,id = 'getElementById' + ,tag = 'getElementsByTagName' + + //字符常量 + ,MOD_NAME = 'laypage', DISABLED = 'layui-disabled' + + //构造器 + ,Class = function(options){ + var that = this; + that.config = options || {}; + that.config.index = ++laypage.index; + that.render(true); + }; + + //判断传入的容器类型 + Class.prototype.type = function(){ + var config = this.config; + if(typeof config.elem === 'object'){ + return config.elem.length === undefined ? 2 : 3; + } + }; + + //分页视图 + Class.prototype.view = function(){ + var that = this + ,config = that.config + ,groups = config.groups = 'groups' in config ? (config.groups|0) : 5; //连续页码个数 + + //排版 + config.layout = typeof config.layout === 'object' + ? config.layout + : ['prev', 'page', 'next']; + + config.count = config.count|0; //数据总数 + config.curr = (config.curr|0) || 1; //当前页 + + //每页条数的选择项 + config.limits = typeof config.limits === 'object' + ? config.limits + : [10, 20, 30, 40, 50]; + config.limit = (config.limit|0) || 10; //默认条数 + + //总页数 + config.pages = Math.ceil(config.count/config.limit) || 1; + + //当前页不能超过总页数 + if(config.curr > config.pages){ + config.curr = config.pages; + } + + //连续分页个数不能低于0且不能大于总页数 + if(groups < 0){ + groups = 1; + } else if (groups > config.pages){ + groups = config.pages; + } + + config.prev = 'prev' in config ? config.prev : '上一页'; //上一页文本 + config.next = 'next' in config ? config.next : '下一页'; //下一页文本 + + //计算当前组 + var index = config.pages > groups + ? Math.ceil( (config.curr + (groups > 1 ? 1 : 0)) / (groups > 0 ? groups : 1) ) + : 1 + + //视图片段 + ,views = { + //上一页 + prev: function(){ + return config.prev + ? ''+ config.prev +'' + : ''; + }() + + //页码 + ,page: function(){ + var pager = []; + + //数据量为0时,不输出页码 + if(config.count < 1){ + return ''; + } + + //首页 + if(index > 1 && config.first !== false && groups !== 0){ + pager.push(''+ (config.first || 1) +''); + } + + //计算当前页码组的起始页 + var halve = Math.floor((groups-1)/2) //页码数等分 + ,start = index > 1 ? config.curr - halve : 1 + ,end = index > 1 ? (function(){ + var max = config.curr + (groups - halve - 1); + return max > config.pages ? config.pages : max; + }()) : groups; + + //防止最后一组出现“不规定”的连续页码数 + if(end - start < groups - 1){ + start = end - groups + 1; + } + + //输出左分割符 + if(config.first !== false && start > 2){ + pager.push('') + } + + //输出连续页码 + for(; start <= end; start++){ + if(start === config.curr){ + //当前页 + pager.push(''+ start +''); + } else { + pager.push(''+ start +''); + } + } + + //输出输出右分隔符 & 末页 + if(config.pages > groups && config.pages > end && config.last !== false){ + if(end + 1 < config.pages){ + pager.push(''); + } + if(groups !== 0){ + pager.push(''+ (config.last || config.pages) +''); + } + } + + return pager.join(''); + }() + + //下一页 + ,next: function(){ + return config.next + ? ''+ config.next +'' + : ''; + }() + + //数据总数 + ,count: '共 '+ config.count +' 条' + + //每页条数 + ,limit: function(){ + var options = [''; + }() + + //刷新当前页 + ,refresh: ['' + ,'' + ,''].join('') + + //跳页区域 + ,skip: function(){ + return ['到第' + ,'' + ,'页' + ,''].join(''); + }() + }; + + return ['
        ' + ,function(){ + var plate = []; + layui.each(config.layout, function(index, item){ + if(views[item]){ + plate.push(views[item]) + } + }); + return plate.join(''); + }() + ,'
        '].join(''); + }; + + //跳页的回调 + Class.prototype.jump = function(elem, isskip){ + if(!elem) return; + var that = this + ,config = that.config + ,childs = elem.children + ,btn = elem[tag]('button')[0] + ,input = elem[tag]('input')[0] + ,select = elem[tag]('select')[0] + ,skip = function(){ + var curr = input.value.replace(/\s|\D/g, '')|0; + if(curr){ + config.curr = curr; + that.render(); + } + }; + + if(isskip) return skip(); + + //页码 + for(var i = 0, len = childs.length; i < len; i++){ + if(childs[i].nodeName.toLowerCase() === 'a'){ + laypage.on(childs[i], 'click', function(){ + var curr = this.getAttribute('data-page')|0; + if(curr < 1 || curr > config.pages) return; + config.curr = curr; + that.render(); + }); + } + } + + //条数 + if(select){ + laypage.on(select, 'change', function(){ + var value = this.value; + if(config.curr*value > config.count){ + config.curr = Math.ceil(config.count/value); + } + config.limit = value; + that.render(); + }); + } + + //确定 + if(btn){ + laypage.on(btn, 'click', function(){ + skip(); + }); + } + }; + + //输入页数字控制 + Class.prototype.skip = function(elem){ + if(!elem) return; + var that = this, input = elem[tag]('input')[0]; + if(!input) return; + laypage.on(input, 'keyup', function(e){ + var value = this.value + ,keyCode = e.keyCode; + if(/^(37|38|39|40)$/.test(keyCode)) return; + if(/\D/.test(value)){ + this.value = value.replace(/\D/, ''); + } + if(keyCode === 13){ + that.jump(elem, true) + } + }); + }; + + //渲染分页 + Class.prototype.render = function(load){ + var that = this + ,config = that.config + ,type = that.type() + ,view = that.view(); + + if(type === 2){ + config.elem && (config.elem.innerHTML = view); + } else if(type === 3){ + config.elem.html(view); + } else { + if(doc[id](config.elem)){ + doc[id](config.elem).innerHTML = view; + } + } + + config.jump && config.jump(config, load); + + var elem = doc[id]('layui-laypage-' + config.index); + that.jump(elem); + + if(config.hash && !load){ + location.hash = '!'+ config.hash +'='+ config.curr; + } + + that.skip(elem); + }; + + //外部接口 + var laypage = { + //分页渲染 + render: function(options){ + var o = new Class(options); + return o.index; + } + ,index: layui.laypage ? (layui.laypage.index + 10000) : 0 + ,on: function(elem, even, fn){ + elem.attachEvent ? elem.attachEvent('on'+ even, function(e){ //for ie + e.target = e.srcElement; + fn.call(elem, e); + }) : elem.addEventListener(even, fn, false); + return this; + } + } + + exports(MOD_NAME, laypage); +}); \ No newline at end of file diff --git a/IoTGateway/wwwroot/layui/lay/modules/laytpl.js b/IoTGateway/wwwroot/layui/lay/modules/laytpl.js new file mode 100644 index 0000000..8e6adbc --- /dev/null +++ b/IoTGateway/wwwroot/layui/lay/modules/laytpl.js @@ -0,0 +1,122 @@ +/** + + @Name : laytpl 模板引擎 + @License:MIT + + */ + +layui.define(function(exports){ + + "use strict"; + + var config = { + open: '{{', + close: '}}' + }; + + var tool = { + exp: function(str){ + return new RegExp(str, 'g'); + }, + //匹配满足规则内容 + query: function(type, _, __){ + var types = [ + '#([\\s\\S])+?', //js语句 + '([^{#}])*?' //普通字段 + ][type || 0]; + return exp((_||'') + config.open + types + config.close + (__||'')); + }, + escape: function(html){ + return String(html||'').replace(/&(?!#?[a-zA-Z0-9]+;)/g, '&') + .replace(//g, '>').replace(/'/g, ''').replace(/"/g, '"'); + }, + error: function(e, tplog){ + var error = 'Laytpl Error: '; + typeof console === 'object' && console.error(error + e + '\n'+ (tplog || '')); + return error + e; + } + }; + + var exp = tool.exp, Tpl = function(tpl){ + this.tpl = tpl; + }; + + Tpl.pt = Tpl.prototype; + + window.errors = 0; + + //编译模版 + Tpl.pt.parse = function(tpl, data){ + var that = this, tplog = tpl; + var jss = exp('^'+config.open+'#', ''), jsse = exp(config.close+'$', ''); + + tpl = tpl.replace(/\s+|\r|\t|\n/g, ' ') + .replace(exp(config.open+'#'), config.open+'# ') + .replace(exp(config.close+'}'), '} '+config.close).replace(/\\/g, '\\\\') + + //不匹配指定区域的内容 + .replace(exp(config.open + '!(.+?)!' + config.close), function(str){ + str = str.replace(exp('^'+ config.open + '!'), '') + .replace(exp('!'+ config.close), '') + .replace(exp(config.open + '|' + config.close), function(tag){ + return tag.replace(/(.)/g, '\\$1') + }); + return str + }) + + //匹配JS规则内容 + .replace(/(?="|')/g, '\\').replace(tool.query(), function(str){ + str = str.replace(jss, '').replace(jsse, ''); + return '";' + str.replace(/\\/g, '') + ';view+="'; + }) + + //匹配普通字段 + .replace(tool.query(1), function(str){ + var start = '"+('; + if(str.replace(/\s/g, '') === config.open+config.close){ + return ''; + } + str = str.replace(exp(config.open+'|'+config.close), ''); + if(/^=/.test(str)){ + str = str.replace(/^=/, ''); + start = '"+_escape_('; + } + return start + str.replace(/\\/g, '') + ')+"'; + }); + + tpl = '"use strict";var view = "' + tpl + '";return view;'; + + try{ + that.cache = tpl = new Function('d, _escape_', tpl); + return tpl(data, tool.escape); + } catch(e){ + delete that.cache; + return tool.error(e, tplog); + } + }; + + Tpl.pt.render = function(data, callback){ + var that = this, tpl; + if(!data) return tool.error('no data'); + tpl = that.cache ? that.cache(data, tool.escape) : that.parse(that.tpl, data); + if(!callback) return tpl; + callback(tpl); + }; + + var laytpl = function(tpl){ + if(typeof tpl !== 'string') return tool.error('Template not found'); + return new Tpl(tpl); + }; + + laytpl.config = function(options){ + options = options || {}; + for(var i in options){ + config[i] = options[i]; + } + }; + + laytpl.v = '1.2.0'; + + exports('laytpl', laytpl); + +}); \ No newline at end of file diff --git a/IoTGateway/wwwroot/layui/lay/modules/layui.all.js b/IoTGateway/wwwroot/layui/lay/modules/layui.all.js new file mode 100644 index 0000000..35c26d4 --- /dev/null +++ b/IoTGateway/wwwroot/layui/lay/modules/layui.all.js @@ -0,0 +1,13 @@ +/** + + @Name:用于打包聚合版,该文件不会存在于构建后的目录 + + */ + +layui.define(function(exports){ + var cache = layui.cache; + layui.config({ + dir: cache.dir.replace(/lay\/dest\/$/, '') + }); + exports('layui.all', layui.v); +}); \ No newline at end of file diff --git a/IoTGateway/wwwroot/layui/lay/modules/mobile.js b/IoTGateway/wwwroot/layui/lay/modules/mobile.js new file mode 100644 index 0000000..7306fb6 --- /dev/null +++ b/IoTGateway/wwwroot/layui/lay/modules/mobile.js @@ -0,0 +1,29 @@ +/** + + @Name:layui 移动模块入口 | 构建后则为移动模块集合 + @License:MIT + + */ + + +if(!layui['layui.mobile']){ + layui.config({ + base: layui.cache.dir + 'lay/modules/mobile/' + }).extend({ + 'layer-mobile': 'layer-mobile' + ,'zepto': 'zepto' + ,'upload-mobile': 'upload-mobile' + ,'layim-mobile': 'layim-mobile' + }); +} + +layui.define([ + 'layer-mobile' + ,'zepto' + ,'layim-mobile' +], function(exports){ + exports('mobile', { + layer: layui['layer-mobile'] //弹层 + ,layim: layui['layim-mobile'] //WebIM + }); +}); \ No newline at end of file diff --git a/IoTGateway/wwwroot/layui/lay/modules/rate.js b/IoTGateway/wwwroot/layui/lay/modules/rate.js new file mode 100644 index 0000000..550d79c --- /dev/null +++ b/IoTGateway/wwwroot/layui/lay/modules/rate.js @@ -0,0 +1,218 @@ +/** + + @Title: rate 评分评星组件 + @License:MIT + + */ + +layui.define('jquery',function(exports){ + "use strict"; + var $ = layui.jquery + + //外部接口 + ,rate = { + config: {} + ,index: layui.rate ? (layui.rate.index + 10000) : 0 + + //设置全局项 + ,set: function(options){ + var that = this; + that.config = $.extend({}, that.config, options); + return that; + } + + //事件 + ,on: function(events, callback){ + return layui.onevent.call(this, MOD_NAME, events, callback); + } + } + + //操作当前实例 + ,thisRate = function(){ + var that = this + ,options = that.config; + + return { + setvalue: function(value){ + that.setvalue.call(that, value); + } + ,config: options + } + } + + //字符常量 + ,MOD_NAME = 'rate',ELEM_VIEW = 'layui-rate', ICON_RATE = 'layui-icon-rate', ICON_RATE_SOLID = 'layui-icon-rate-solid', ICON_RATE_HALF = 'layui-icon-rate-half' + + ,ICON_SOLID_HALF = 'layui-icon-rate-solid layui-icon-rate-half', ICON_SOLID_RATE = 'layui-icon-rate-solid layui-icon-rate', ICON_HALF_RATE = 'layui-icon-rate layui-icon-rate-half' + + //构造器 + ,Class = function(options){ + var that = this; + that.index = ++rate.index; + that.config = $.extend({}, that.config, rate.config, options); + that.render(); + }; + + //默认配置 + Class.prototype.config = { + length: 5 //初始长度 + ,text: false //是否显示评分等级 + ,readonly: false //是否只读 + ,half: false //是否可以半星 + ,value: 0 //星星选中个数 + ,theme: '' + }; + + //评分渲染 + Class.prototype.render = function(){ + var that = this + ,options = that.config + ,style = options.theme ? ('style="color: '+ options.theme + ';"') : ''; + + options.elem = $(options.elem); + + //最大值不能大于总长度 + if(options.value > options.length){ + options.value = options.length; + } + + //如果没有选择半星的属性,却给了小数的数值,统一向上或向下取整 + if(parseInt(options.value) !== options.value){ + if(!options.half){ + options.value = (Math.ceil(options.value) - options.value) < 0.5 ? Math.ceil(options.value): Math.floor(options.value) + } + } + + //组件模板 + var temp = '
          '; + for(var i = 1;i <= options.length;i++){ + var item = '
        • '; + + if(options.half){ + if(parseInt(options.value) !== options.value){ + if(i == Math.ceil(options.value)){ + temp = temp + '
        • '; + }else{ + temp = temp + item + } + }else{ + temp = temp + item + } + }else{ + temp = temp +item; + } + } + temp += '
        ' + (options.text ? (''+ options.value + '星') : '') + ''; + + //开始插入替代元素 + var othis = options.elem + ,hasRender = othis.next('.' + ELEM_VIEW); + + //生成替代元素 + hasRender[0] && hasRender.remove(); //如果已经渲染,则Rerender + + that.elemTemp = $(temp); + + options.span = that.elemTemp.next('span'); + + options.setText && options.setText(options.value); + + othis.html(that.elemTemp); + + othis.addClass("layui-inline"); + + //如果不是只读,那么进行触控事件 + if(!options.readonly) that.action(); + + }; + + //评分重置 + Class.prototype.setvalue = function(value){ + var that = this + ,options = that.config ; + + options.value = value ; + that.render(); + }; + + //li触控事件 + Class.prototype.action = function(){ + var that = this + ,options = that.config + ,_ul = that.elemTemp + ,wide = _ul.find("i").width(); + + _ul.children("li").each(function(index){ + var ind = index + 1 + ,othis = $(this); + + //点击 + othis.on('click', function(e){ + //将当前点击li的索引值赋给value + options.value = ind; + if(options.half){ + //获取鼠标在li上的位置 + var x = e.pageX - $(this).offset().left; + if(x <= wide / 2){ + options.value = options.value - 0.5; + } + } + + if(options.text) _ul.next("span").text(options.value + "星"); + + options.choose && options.choose(options.value); + options.setText && options.setText(options.value); + }); + + //移入 + othis.on('mousemove', function(e){ + _ul.find("i").each(function(){ + $(this).addClass(ICON_RATE).removeClass(ICON_SOLID_HALF) + }); + _ul.find("i:lt(" + ind + ")").each(function(){ + $(this).addClass(ICON_RATE_SOLID).removeClass(ICON_HALF_RATE) + }); + // 如果设置可选半星,那么判断鼠标相对li的位置 + if(options.half){ + var x = e.pageX - $(this).offset().left; + if(x <= wide / 2){ + othis.children("i").addClass(ICON_RATE_HALF).removeClass(ICON_RATE_SOLID) + } + } + }) + + //移出 + othis.on('mouseleave', function(){ + _ul.find("i").each(function(){ + $(this).addClass(ICON_RATE).removeClass(ICON_SOLID_HALF) + }); + _ul.find("i:lt(" + Math.floor(options.value) + ")").each(function(){ + $(this).addClass(ICON_RATE_SOLID).removeClass(ICON_HALF_RATE) + }); + //如果设置可选半星,根据分数判断是否有半星 + if(options.half){ + if(parseInt(options.value) !== options.value){ + _ul.children("li:eq(" + Math.floor(options.value) + ")").children("i").addClass(ICON_RATE_HALF).removeClass(ICON_SOLID_RATE) + } + } + }) + + }) + }; + + //事件处理 + Class.prototype.events = function(){ + var that = this + ,options = that.config; + }; + + //核心入口 + rate.render = function(options){ + var inst = new Class(options); + return thisRate.call(inst); + }; + + exports(MOD_NAME, rate); +}) \ No newline at end of file diff --git a/IoTGateway/wwwroot/layui/lay/modules/slider.js b/IoTGateway/wwwroot/layui/lay/modules/slider.js new file mode 100644 index 0000000..e449632 --- /dev/null +++ b/IoTGateway/wwwroot/layui/lay/modules/slider.js @@ -0,0 +1,383 @@ +/** + + @Title: slider 滑块组件 + @License:MIT + + */ + +layui.define('jquery', function(exports){ + "use strict"; + var $ = layui.jquery + + //外部接口 + ,slider = { + config: {} + ,index: layui.slider ? (layui.slider.index + 10000) : 0 + + //设置全局项 + ,set: function(options){ + var that = this; + that.config = $.extend({}, that.config, options); + return that; + } + + //事件 + ,on: function(events, callback){ + return layui.onevent.call(this, MOD_NAME, events, callback); + } + } + + //操作当前实例 + ,thisSlider = function(){ + var that = this + ,options = that.config; + + return { + setValue: function(value, index){ //设置值 + options.value = value; + return that.slide('set', value, index || 0); + } + ,config: options + } + } + + //字符常量 + ,MOD_NAME = 'slider', DISABLED = 'layui-disabled', ELEM_VIEW = 'layui-slider', SLIDER_BAR = 'layui-slider-bar', SLIDER_WRAP = 'layui-slider-wrap', SLIDER_WRAP_BTN = 'layui-slider-wrap-btn', SLIDER_TIPS = 'layui-slider-tips', SLIDER_INPUT = 'layui-slider-input', SLIDER_INPUT_TXT = 'layui-slider-input-txt', SLIDER_INPUT_BTN = 'layui-slider-input-btn', ELEM_HOVER = 'layui-slider-hover' + + //构造器 + ,Class = function(options){ + var that = this; + that.index = ++slider.index; + that.config = $.extend({}, that.config, slider.config, options); + that.render(); + }; + + //默认配置 + Class.prototype.config = { + type: 'default' //滑块类型,垂直:vertical + ,min: 0 //最小值 + ,max: 100 //最大值,默认100 + ,value: 0 //初始值,默认为0 + ,step: 1 //间隔值 + ,showstep: false //间隔点开启 + ,tips: true //文字提示,开启 + ,input: false //输入框,关闭 + ,range: false //范围选择,与输入框不能同时开启,默认关闭 + ,height: 200 //配合 type:"vertical" 使用,默认200px + ,disabled: false //滑块禁用,默认关闭 + ,theme: '#009688' //主题颜色 + }; + + //滑块渲染 + Class.prototype.render = function(){ + var that = this + ,options = that.config; + + //间隔值不能小于 1 + if(options.step < 1) options.step = 1; + + //最大值不能小于最小值 + if(options.max < options.min) options.max = options.min + options.step; + + + + //判断是否开启双滑块 + if(options.range){ + options.value = typeof(options.value) == 'object' ? options.value : [options.min, options.value]; + var minValue = Math.min(options.value[0], options.value[1]) + ,maxValue = Math.max(options.value[0], options.value[1]); + options.value[0] = minValue > options.min ? minValue : options.min; + options.value[1] = maxValue > options.min ? maxValue : options.min; + options.value[0] = options.value[0] > options.max ? options.max : options.value[0]; + options.value[1] = options.value[1] > options.max ? options.max : options.value[1]; + + var scaleFir = Math.floor((options.value[0] - options.min) / (options.max - options.min) * 100) + ,scaleSec = Math.floor((options.value[1] - options.min) / (options.max - options.min) * 100) + ,scale = scaleSec - scaleFir + '%'; + scaleFir = scaleFir + '%'; + scaleSec = scaleSec + '%'; + } else { + //如果初始值是一个数组,则获取数组的最小值 + if(typeof options.value == 'object'){ + options.value = Math.min.apply(null, options.value); + } + + //初始值不能小于最小值且不能大于最大值 + if(options.value < options.min) options.value = options.min; + if(options.value > options.max) options.value = options.max; + + var scale = Math.floor((options.value - options.min) / (options.max - options.min) * 100) + '%'; + }; + + + //如果禁用,颜色为统一的灰色 + var theme = options.disabled ? '#c2c2c2' : options.theme; + + //滑块 + var temp = '
        '+ (options.tips ? '
        ' : '') + + '
        ' + + '
        '+ (options.range ? '
        ' : '') +'
        '; + + var othis = $(options.elem) + ,hasRender = othis.next('.' + ELEM_VIEW); + //生成替代元素 + hasRender[0] && hasRender.remove(); //如果已经渲染,则Rerender + that.elemTemp = $(temp); + + //把数据缓存到滑块上 + if(options.range){ + that.elemTemp.find('.' + SLIDER_WRAP).eq(0).data('value', options.value[0]); + that.elemTemp.find('.' + SLIDER_WRAP).eq(1).data('value', options.value[1]); + }else{ + that.elemTemp.find('.' + SLIDER_WRAP).data('value', options.value); + }; + + //插入替代元素 + othis.html(that.elemTemp); + + //垂直滑块 + if(options.type === 'vertical'){ + that.elemTemp.height(options.height + 'px'); + }; + + //显示间断点 + if(options.showstep){ + var number = (options.max - options.min) / options.step, item = ''; + for(var i = 1; i < number + 1; i++) { + var step = i * 100 / number; + if(step < 100){ + item += '
        ' + } + }; + that.elemTemp.append(item); + }; + + //插入输入框 + if(options.input && !options.range){ + var elemInput = $('
        '); + othis.css("position","relative"); + othis.append(elemInput); + othis.find('.' + SLIDER_INPUT_TXT).children('input').val(options.value); + if(options.type === 'vertical'){ + elemInput.css({ + left: 0 + ,top: -48 + }); + } else { + that.elemTemp.css("margin-right", elemInput.outerWidth() + 15); + } + }; + + //给未禁止的滑块滑动事件 + if(!options.disabled){ + that.slide(); + }else{ + that.elemTemp.addClass(DISABLED); + that.elemTemp.find('.' + SLIDER_WRAP_BTN).addClass(DISABLED); + }; + + //划过滑块显示数值 + that.elemTemp.find('.' + SLIDER_WRAP_BTN).on('mouseover', function(){ + var sliderWidth = options.type === 'vertical' ? options.height : that.elemTemp[0].offsetWidth + ,sliderWrap = that.elemTemp.find('.' + SLIDER_WRAP) + ,tipsLeft = options.type === 'vertical' ? (sliderWidth - $(this).parent()[0].offsetTop - sliderWrap.height()) : $(this).parent()[0].offsetLeft + ,left = tipsLeft / sliderWidth * 100 + ,value = $(this).parent().data('value') + ,tipsTxt = options.setTips ? options.setTips(value) : value; + that.elemTemp.find('.' + SLIDER_TIPS).html(tipsTxt); + if(options.type === 'vertical'){ + that.elemTemp.find('.' + SLIDER_TIPS).css({"bottom":left + '%', "margin-bottom":"20px", "display":"inline-block"}); + }else{ + that.elemTemp.find('.' + SLIDER_TIPS).css({"left":left + '%', "display":"inline-block"}); + }; + }).on('mouseout', function(){ + that.elemTemp.find('.' + SLIDER_TIPS).css("display", "none"); + }); + }; + + //滑块滑动 + Class.prototype.slide = function(setValue, value, i){ + var that = this + ,options = that.config + ,sliderAct = that.elemTemp + ,sliderWidth = function(){ + return options.type === 'vertical' ? options.height : sliderAct[0].offsetWidth + } + ,sliderWrap = sliderAct.find('.' + SLIDER_WRAP) + ,sliderTxt = sliderAct.next('.' + SLIDER_INPUT) + ,inputValue = sliderTxt.children('.' + SLIDER_INPUT_TXT).children('input').val() + ,step = 100 / ((options.max - options.min) / Math.ceil(options.step)) + ,change = function(offsetValue, index){ + if(Math.ceil(offsetValue) * step > 100){ + offsetValue = Math.ceil(offsetValue) * step + }else{ + offsetValue = Math.round(offsetValue) * step + }; + offsetValue = offsetValue > 100 ? 100: offsetValue; + sliderWrap.eq(index).css((options.type === 'vertical' ?'bottom':'left'), offsetValue + '%'); + var firLeft = valueTo(sliderWrap[0].offsetLeft) + ,secLeft = options.range ? valueTo(sliderWrap[1].offsetLeft) : 0; + if(options.type === 'vertical'){ + sliderAct.find('.' + SLIDER_TIPS).css({"bottom":offsetValue + '%', "margin-bottom":"20px"}); + firLeft = valueTo(sliderWidth() - sliderWrap[0].offsetTop - sliderWrap.height()); + secLeft = options.range ? valueTo(sliderWidth() - sliderWrap[1].offsetTop - sliderWrap.height()) : 0; + }else{ + sliderAct.find('.' + SLIDER_TIPS).css("left",offsetValue + '%'); + }; + firLeft = firLeft > 100 ? 100: firLeft; + secLeft = secLeft > 100 ? 100: secLeft; + var minLeft = Math.min(firLeft, secLeft) + ,wrapWidth = Math.abs(firLeft - secLeft); + if(options.type === 'vertical'){ + sliderAct.find('.' + SLIDER_BAR).css({"height":wrapWidth + '%', "bottom":minLeft + '%'}); + }else{ + sliderAct.find('.' + SLIDER_BAR).css({"width":wrapWidth + '%', "left":minLeft + '%'}); + }; + var selfValue = options.min + Math.round((options.max - options.min) * offsetValue / 100); + inputValue = selfValue; + sliderTxt.children('.' + SLIDER_INPUT_TXT).children('input').val(inputValue); + sliderWrap.eq(index).data('value', selfValue); + sliderAct.find('.' + SLIDER_TIPS).html(options.setTips ? options.setTips(selfValue) : selfValue); + + //如果开启范围选择,则返回数组值 + if(options.range){ + var arrValue = [ + sliderWrap.eq(0).data('value') + ,sliderWrap.eq(1).data('value') + ]; + if(arrValue[0] > arrValue[1]) arrValue.reverse(); //如果前面的圆点超过了后面的圆点值,则调换顺序 + } + + //回调 + options.change && options.change(options.range ? arrValue : selfValue); + } + ,valueTo = function(value){ + var oldLeft = value / sliderWidth() * 100 / step + ,left = Math.round(oldLeft) * step; + if(value == sliderWidth()){ + left = Math.ceil(oldLeft) * step; + }; + return left; + } + + //拖拽元素 + ,elemMove = $(['
        sliderWidth())left = sliderWidth(); + var reaLeft = left / sliderWidth() * 100 / step; + change(reaLeft, index); + othis.addClass(ELEM_HOVER); + sliderAct.find('.' + SLIDER_TIPS).show(); + e.preventDefault(); + }; + + var up = function(){ + othis.removeClass(ELEM_HOVER); + sliderAct.find('.' + SLIDER_TIPS).hide(); + }; + + createMoveElem(move, up) + }); + }); + + //点击滑块 + sliderAct.on('click', function(e){ + var main = $('.' + SLIDER_WRAP_BTN); + if(!main.is(event.target) && main.has(event.target).length === 0 && main.length){ + var left = options.type === 'vertical' ? (sliderWidth() - e.clientY + $(this).offset().top):(e.clientX - $(this).offset().left), index; + if(left < 0)left = 0; + if(left > sliderWidth())left = sliderWidth(); + var reaLeft = left / sliderWidth() * 100 / step; + if(options.range){ + if(options.type === 'vertical'){ + index = Math.abs(left - parseInt($(sliderWrap[0]).css('bottom'))) > Math.abs(left - parseInt($(sliderWrap[1]).css('bottom'))) ? 1 : 0; + }else{ + index = Math.abs(left - sliderWrap[0].offsetLeft) > Math.abs(left - sliderWrap[1].offsetLeft) ? 1 : 0; + } + }else{ + index = 0; + }; + change(reaLeft, index); + e.preventDefault(); + } + }); + + //点击加减输入框 + sliderTxt.children('.' + SLIDER_INPUT_BTN).children('i').each(function(index){ + $(this).on('click', function(){ + inputValue = sliderTxt.children('.' + SLIDER_INPUT_TXT).children('input').val(); + if(index == 1){ //减 + inputValue = inputValue - options.step < options.min + ? options.min + : Number(inputValue) - options.step; + }else{ + inputValue = Number(inputValue) + options.step > options.max + ? options.max + : Number(inputValue) + options.step; + }; + var inputScale = (inputValue - options.min) / (options.max - options.min) * 100 / step; + change(inputScale, 0); + }); + }); + + //获取输入框值 + var getInputValue = function(){ + var realValue = this.value; + realValue = isNaN(realValue) ? 0 : realValue; + realValue = realValue < options.min ? options.min : realValue; + realValue = realValue > options.max ? options.max : realValue; + this.value = realValue; + var inputScale = (realValue - options.min) / (options.max - options.min) * 100 / step; + change(inputScale, 0); + }; + sliderTxt.children('.' + SLIDER_INPUT_TXT).children('input').on('keydown', function(e){ + if(e.keyCode === 13){ + e.preventDefault(); + getInputValue.call(this); + } + }).on('change', getInputValue); + }; + + //事件处理 + Class.prototype.events = function(){ + var that = this + ,options = that.config; + }; + + //核心入口 + slider.render = function(options){ + var inst = new Class(options); + return thisSlider.call(inst); + }; + + exports(MOD_NAME, slider); +}) \ No newline at end of file diff --git a/IoTGateway/wwwroot/layui/lay/modules/table.js b/IoTGateway/wwwroot/layui/lay/modules/table.js new file mode 100644 index 0000000..c72fe93 --- /dev/null +++ b/IoTGateway/wwwroot/layui/lay/modules/table.js @@ -0,0 +1,2025 @@ +/** + + @Name:table 表格操作组件 + @License:MIT + + */ + +layui.define(['laytpl', 'laypage', 'layer', 'form', 'util'], function(exports){ + "use strict"; + + var $ = layui.$ + ,laytpl = layui.laytpl + ,laypage = layui.laypage + ,layer = layui.layer + ,form = layui.form + ,util = layui.util + ,hint = layui.hint() + ,device = layui.device() + + //外部接口 + ,table = { + config: { + checkName: 'LAY_CHECKED' //是否选中状态的字段名 + ,indexName: 'LAY_TABLE_INDEX' //初始下标索引名,用于恢复排序 + } //全局配置项 + ,cache: {} //数据缓存 + ,index: layui.table ? (layui.table.index + 10000) : 0 + + //设置全局项 + ,set: function(options){ + var that = this; + that.config = $.extend({}, that.config, options); + return that; + } + + //事件 + ,on: function(events, callback){ + return layui.onevent.call(this, MOD_NAME, events, callback); + } + } + + //操作当前实例 + ,thisTable = function(){ + var that = this + ,options = that.config + ,id = options.id || options.index; + + if(id){ + thisTable.that[id] = that; //记录当前实例对象 + thisTable.config[id] = options; //记录当前实例配置项 + } + + return { + config: options + ,reload: function(options, deep){ + that.reload.call(that, options, deep); + } + ,setColsWidth: function(){ + that.setColsWidth.call(that); + } + ,resize: function(){ //重置表格尺寸/结构 + that.resize.call(that); + } + } + } + + //获取当前实例配置项 + ,getThisTableConfig = function(id){ + var config = thisTable.config[id]; + if(!config) hint.error(id ? ('The table instance with ID \''+ id +'\' not found') : 'ID argument required'); + return config || null; + } + + //解析自定义模板数据 + ,parseTempData = function(item3, content, tplData, text){ //表头数据、原始内容、表体数据、是否只返回文本 + var str = item3.templet ? function(){ + return typeof item3.templet === 'function' + ? item3.templet(tplData) + : laytpl($(item3.templet).html() || String(content)).render(tplData) + }() : content; + return text ? $('
        '+ str +'
        ').text() : str; + } + + //字符常量 + ,MOD_NAME = 'table', ELEM = '.layui-table', THIS = 'layui-this', SHOW = 'layui-show', HIDE = 'layui-hide', DISABLED = 'layui-disabled', NONE = 'layui-none' + + ,ELEM_VIEW = 'layui-table-view', ELEM_TOOL = '.layui-table-tool', ELEM_BOX = '.layui-table-box', ELEM_INIT = '.layui-table-init', ELEM_HEADER = '.layui-table-header', ELEM_BODY = '.layui-table-body', ELEM_MAIN = '.layui-table-main', ELEM_FIXED = '.layui-table-fixed', ELEM_FIXL = '.layui-table-fixed-l', ELEM_FIXR = '.layui-table-fixed-r', ELEM_TOTAL = '.layui-table-total', ELEM_PAGE = '.layui-table-page', ELEM_SORT = '.layui-table-sort', ELEM_EDIT = 'layui-table-edit', ELEM_HOVER = 'layui-table-hover' + + //thead区域模板 + ,TPL_HEADER = function(options){ + var rowCols = '{{#if(item2.colspan){}} colspan="{{item2.colspan}}"{{#} if(item2.rowspan){}} rowspan="{{item2.rowspan}}"{{#}}}'; + + options = options || {}; + return ['
        ' + ,'' + ,'{{# layui.each(d.data.cols, function(i1, item1){ }}' + ,'' + ,'{{# layui.each(item1, function(i2, item2){ }}' + ,'{{# if(item2.fixed && item2.fixed !== "right"){ left = true; } }}' + ,'{{# if(item2.fixed === "right"){ right = true; } }}' + ,function(){ + if(options.fixed && options.fixed !== 'right'){ + return '{{# if(item2.fixed && item2.fixed !== "right"){ }}'; + } + if(options.fixed === 'right'){ + return '{{# if(item2.fixed === "right"){ }}'; + } + return ''; + }() + ,'{{# var isSort = !(item2.colGroup) && item2.sort; }}' + ,'' + ,(options.fixed ? '{{# }; }}' : '') + ,'{{# }); }}' + ,'' + ,'{{# }); }}' + ,'' + ,'
        ' + ,'
        ' + ,'{{# if(item2.type === "checkbox"){ }}' //复选框 + ,'' + ,'{{# } else { }}' + ,'{{item2.title||""}}' + ,'{{# if(isSort){ }}' + ,'' + ,'{{# } }}' + ,'{{# } }}' + ,'
        ' + ,'
        '].join(''); + } + + //tbody区域模板 + ,TPL_BODY = ['' + ,'' + ,'
        '].join('') + + //主模板 + ,TPL_MAIN = ['
        ' + + ,'{{# if(d.data.toolbar){ }}' + ,'
        ' + ,'
        ' + ,'
        ' + ,'
        ' + ,'{{# } }}' + + ,'
        ' + ,'{{# if(d.data.loading){ }}' + ,'
        ' + ,'' + ,'
        ' + ,'{{# } }}' + + ,'{{# var left, right; }}' + ,'
        ' + ,TPL_HEADER() + ,'
        ' + ,'
        ' + ,TPL_BODY + ,'
        ' + + ,'{{# if(left){ }}' + ,'
        ' + ,'
        ' + ,TPL_HEADER({fixed: true}) + ,'
        ' + ,'
        ' + ,TPL_BODY + ,'
        ' + ,'
        ' + ,'{{# }; }}' + + ,'{{# if(right){ }}' + ,'
        ' + ,'
        ' + ,TPL_HEADER({fixed: 'right'}) + ,'
        ' + ,'
        ' + ,'
        ' + ,TPL_BODY + ,'
        ' + ,'
        ' + ,'{{# }; }}' + ,'
        ' + + ,'{{# if(d.data.totalRow){ }}' + ,'
        ' + ,'' + ,'' + , '
        ' + ,'
        ' + ,'{{# } }}' + + ,'{{# if(d.data.page){ }}' + ,'
        ' + ,'
        ' + ,'
        ' + ,'{{# } }}' + + ,'' + ,'
        '].join('') + + ,_WIN = $(window) + ,_DOC = $(document) + + //构造器 + ,Class = function(options){ + var that = this; + that.index = ++table.index; + that.config = $.extend({}, that.config, table.config, options);; + that.render(); + }; + + //初始默认配置 + Class.prototype.config = { + limit: 10 //每页显示的数量 + ,loading: true //请求数据时,是否显示loading + ,cellMinWidth: 60 //所有单元格默认最小宽度 + ,defaultToolbar: ['filter', 'exports', 'print'] //工具栏右侧图标 + ,autoSort: true //是否前端自动排序。如果否,则需自主排序(通常为服务端处理好排序) + ,text: { + none: '无数据' + } + }; + + //表格渲染 + Class.prototype.render = function(){ + var that = this + ,options = that.config; + + options.elem = $(options.elem); + options.where = options.where || {}; + options.id = options.id || options.elem.attr('id') || that.index; + + //请求参数的自定义格式 + options.request = $.extend({ + pageName: 'page' + ,limitName: 'limit' + }, options.request) + + //响应数据的自定义格式 + options.response = $.extend({ + statusName: 'code' //规定数据状态的字段名称 + ,statusCode: 0 //规定成功的状态码 + ,msgName: 'msg' //规定状态信息的字段名称 + ,dataName: 'data' //规定数据总数的字段名称 + ,totalRowName: 'totalRow' //规定数据统计的字段名称 + ,countName: 'count' + }, options.response); + + //如果 page 传入 laypage 对象 + if(typeof options.page === 'object'){ + options.limit = options.page.limit || options.limit; + options.limits = options.page.limits || options.limits; + that.page = options.page.curr = options.page.curr || 1; + delete options.page.elem; + delete options.page.jump; + } + + if(!options.elem[0]) return that; + + //高度铺满:full-差距值 + if(options.height && /^full-\d+$/.test(options.height)){ + that.fullHeightGap = options.height.split('-')[1]; + options.height = _WIN.height() - that.fullHeightGap; + } + + //初始化一些参数 + that.setInit(); + + //开始插入替代元素 + var othis = options.elem + ,hasRender = othis.next('.' + ELEM_VIEW) + + //主容器 + ,reElem = that.elem = $(laytpl(TPL_MAIN).render({ + VIEW_CLASS: ELEM_VIEW + ,data: options + ,index: that.index //索引 + })); + + options.index = that.index; + that.key = options.id || options.index; + + //生成替代元素 + hasRender[0] && hasRender.remove(); //如果已经渲染,则Rerender + othis.after(reElem); + + //各级容器 + that.layTool = reElem.find(ELEM_TOOL); + that.layBox = reElem.find(ELEM_BOX); + that.layHeader = reElem.find(ELEM_HEADER); + that.layMain = reElem.find(ELEM_MAIN); + that.layBody = reElem.find(ELEM_BODY); + that.layFixed = reElem.find(ELEM_FIXED); + that.layFixLeft = reElem.find(ELEM_FIXL); + that.layFixRight = reElem.find(ELEM_FIXR); + that.layTotal = reElem.find(ELEM_TOTAL); + that.layPage = reElem.find(ELEM_PAGE); + + //初始化工具栏 + that.renderToolbar(); + + //让表格平铺 + that.fullSize(); + + //如果多级表头,则填补表头高度 + if(options.cols.length > 1){ + //补全高度 + var th = that.layFixed.find(ELEM_HEADER).find('th'); + th.height(that.layHeader.height() - 1 - parseFloat(th.css('padding-top')) - parseFloat(th.css('padding-bottom'))); + } + + that.pullData(that.page); //请求数据 + that.events(); //事件 + }; + + //根据列类型,定制化参数 + Class.prototype.initOpts = function(item){ + var that = this + ,options = that.config + ,initWidth = { + checkbox: 48 + ,radio: 48 + ,space: 15 + ,numbers: 40 + }; + + //让 type 参数兼容旧版本 + if(item.checkbox) item.type = "checkbox"; + if(item.space) item.type = "space"; + if(!item.type) item.type = "normal"; + + if(item.type !== "normal"){ + item.unresize = true; + item.width = item.width || initWidth[item.type]; + } + }; + + //初始化一些参数 + Class.prototype.setInit = function(type){ + var that = this + ,options = that.config; + + options.clientWidth = options.width || function(){ //获取容器宽度 + //如果父元素宽度为0(一般为隐藏元素),则继续查找上层元素,直到找到真实宽度为止 + var getWidth = function(parent){ + var width, isNone; + parent = parent || options.elem.parent() + width = parent.width(); + try { + isNone = parent.css('display') === 'none'; + } catch(e){} + if(parent[0] && (!width || isNone)) return getWidth(parent.parent()); + return width; + }; + return getWidth(); + }(); + + if(type === 'width') return options.clientWidth; + + //初始化列参数 + layui.each(options.cols, function(i1, item1){ + layui.each(item1, function(i2, item2){ + + //如果列参数为空,则移除 + if(!item2){ + item1.splice(i2, 1); + return; + } + + item2.key = i1 + '-' + i2; + item2.hide = item2.hide || false; + + //设置列的父列索引 + //如果是组合列,则捕获对应的子列 + if(item2.colGroup || item2.colspan > 1){ + var childIndex = 0; + layui.each(options.cols[i1 + 1], function(i22, item22){ + //如果子列已经被标注为{HAS_PARENT},或者子列累计 colspan 数等于父列定义的 colspan,则跳出当前子列循环 + if(item22.HAS_PARENT || (childIndex > 1 && childIndex == item2.colspan)) return; + + item22.HAS_PARENT = true; + item22.parentKey = i1 + '-' + i2; + + childIndex = childIndex + parseInt(item22.colspan > 1 ? item22.colspan : 1); + }); + item2.colGroup = true; //标注是组合列 + } + + //根据列类型,定制化参数 + that.initOpts(item2); + }); + }); + + }; + + //初始工具栏 + Class.prototype.renderToolbar = function(){ + var that = this + ,options = that.config + + //添加工具栏左侧模板 + var leftDefaultTemp = [ + '
        ' + ,'
        ' + ,'
        ' + ].join('') + ,elemToolTemp = that.layTool.find('.layui-table-tool-temp'); + + if(options.toolbar === 'default'){ + elemToolTemp.html(leftDefaultTemp); + } else if(typeof options.toolbar === 'string'){ + var toolbarHtml = $(options.toolbar).html() || ''; + toolbarHtml && elemToolTemp.html( + laytpl(toolbarHtml).render(options) + ); + } + + //添加工具栏右侧面板 + var layout = { + filter: { + title: '筛选列' + ,layEvent: 'LAYTABLE_COLS' + ,icon: 'layui-icon-cols' + } + ,exports: { + title: '导出' + ,layEvent: 'LAYTABLE_EXPORT' + ,icon: 'layui-icon-export' + } + ,print: { + title: '打印' + ,layEvent: 'LAYTABLE_PRINT' + ,icon: 'layui-icon-print' + } + }, iconElem = []; + + if(typeof options.defaultToolbar === 'object'){ + layui.each(options.defaultToolbar, function(i, item){ + var thisItem = typeof item === 'string' ? layout[item] : item; + if(thisItem){ + iconElem.push('
        ' + +'' + +'
        '); + } + }); + } + that.layTool.find('.layui-table-tool-self').html(iconElem.join('')); + } + + //同步表头父列的相关值 + Class.prototype.setParentCol = function(hide, parentKey){ + var that = this + ,options = that.config + + ,parentTh = that.layHeader.find('th[data-key="'+ options.index +'-'+ parentKey +'"]') //获取父列元素 + ,parentColspan = parseInt(parentTh.attr('colspan')) || 0; + + if(parentTh[0]){ + var arrParentKey = parentKey.split('-') + ,getThisCol = options.cols[arrParentKey[0]][arrParentKey[1]]; + + hide ? parentColspan-- : parentColspan++; + + parentTh.attr('colspan', parentColspan); + parentTh[parentColspan < 1 ? 'addClass' : 'removeClass'](HIDE); + + getThisCol.colspan = parentColspan; //同步 colspan 参数 + getThisCol.hide = parentColspan < 1; //同步 hide 参数 + + //递归,继续往上查询是否有父列 + var nextParentKey = parentTh.data('parentkey'); + nextParentKey && that.setParentCol(hide, nextParentKey); + } + }; + + //多级表头补丁 + Class.prototype.setColsPatch = function(){ + var that = this + ,options = that.config + + //同步表头父列的相关值 + layui.each(options.cols, function(i1, item1){ + layui.each(item1, function(i2, item2){ + if(item2.hide){ + that.setParentCol(item2.hide, item2.parentKey); + } + }); + }); + }; + + //动态分配列宽 + Class.prototype.setColsWidth = function(){ + var that = this + ,options = that.config + ,colNums = 0 //列个数 + ,autoColNums = 0 //自动列宽的列个数 + ,autoWidth = 0 //自动列分配的宽度 + ,countWidth = 0 //所有列总宽度和 + ,cntrWidth = that.setInit('width'); + + //统计列个数 + that.eachCols(function(i, item){ + item.hide || colNums++; + }); + + //减去边框差和滚动条宽 + cntrWidth = cntrWidth - function(){ + return (options.skin === 'line' || options.skin === 'nob') ? 2 : colNums + 1; + }() - that.getScrollWidth(that.layMain[0]) - 1; + + //计算自动分配的宽度 + var getAutoWidth = function(back){ + //遍历所有列 + layui.each(options.cols, function(i1, item1){ + layui.each(item1, function(i2, item2){ + var width = 0 + ,minWidth = item2.minWidth || options.cellMinWidth; //最小宽度 + + if(!item2){ + item1.splice(i2, 1); + return; + } + + if(item2.colGroup || item2.hide) return; + + if(!back){ + width = item2.width || 0; + if(/\d+%$/.test(width)){ //列宽为百分比 + width = Math.floor((parseFloat(width) / 100) * cntrWidth); + width < minWidth && (width = minWidth); + } else if(!width){ //列宽未填写 + item2.width = width = 0; + autoColNums++; + } + } else if(autoWidth && autoWidth < minWidth){ + autoColNums--; + width = minWidth; + } + + if(item2.hide) width = 0; + countWidth = countWidth + width; + }); + }); + + //如果未填充满,则将剩余宽度平分 + (cntrWidth > countWidth && autoColNums) && ( + autoWidth = (cntrWidth - countWidth) / autoColNums + ); + } + + getAutoWidth(); + getAutoWidth(true); //重新检测分配的宽度是否低于最小列宽 + + //记录自动列数 + that.autoColNums = autoColNums; + + //设置列宽 + that.eachCols(function(i3, item3){ + var minWidth = item3.minWidth || options.cellMinWidth; + if(item3.colGroup || item3.hide) return; + + //给位分配宽的列平均分配宽 + if(item3.width === 0){ + that.getCssRule(options.index +'-'+ item3.key, function(item){ + item.style.width = Math.floor(autoWidth >= minWidth ? autoWidth : minWidth) + 'px'; + }); + } + + //给设定百分比的列分配列宽 + else if(/\d+%$/.test(item3.width)){ + that.getCssRule(options.index +'-'+ item3.key, function(item){ + item.style.width = Math.floor((parseFloat(item3.width) / 100) * cntrWidth) + 'px'; + }); + } + }); + + //填补 Math.floor 造成的数差 + var patchNums = that.layMain.width() - that.getScrollWidth(that.layMain[0]) + - that.layMain.children('table').outerWidth(); + + if(that.autoColNums && patchNums >= -colNums && patchNums <= colNums){ + var getEndTh = function(th){ + var field; + th = th || that.layHeader.eq(0).find('thead th:last-child') + field = th.data('field'); + if(!field && th.prev()[0]){ + return getEndTh(th.prev()) + } + return th + } + ,th = getEndTh() + ,key = th.data('key'); + + that.getCssRule(key, function(item){ + var width = item.style.width || th.outerWidth(); + item.style.width = (parseFloat(width) + patchNums) + 'px'; + + //二次校验,如果仍然出现横向滚动条(通常是 1px 的误差导致) + if(that.layMain.height() - that.layMain.prop('clientHeight') > 0){ + item.style.width = (parseFloat(item.style.width) - 1) + 'px'; + } + }); + } + + that.loading(!0); + }; + + //重置表格尺寸/结构 + Class.prototype.resize = function(){ + var that = this; + that.fullSize(); //让表格铺满 + that.setColsWidth(); //自适应列宽 + that.scrollPatch(); //滚动条补丁 + }; + + //表格重载 + Class.prototype.reload = function(options, deep){ + var that = this; + + options = options || {}; + delete that.haveInit; + + //如果直接传入数组 data,则移除原来的数组,以免数组发生深度拷贝 + if(options.data && options.data.constructor === Array) delete that.config.data; + + //对参数进行深度或浅扩展 + that.config = $.extend(deep, {}, that.config, options); + + //执行渲染 + that.render(); + }; + + //异常提示 + Class.prototype.errorView = function(html){ + var that = this + ,elemNone = that.layMain.find('.'+ NONE) + ,layNone = $('
        '+ (html || 'Error') +'
        '); + + if(elemNone[0]){ + that.layNone.remove(); + elemNone.remove(); + } + + that.layFixed.addClass(HIDE); + that.layMain.find('tbody').html(''); + + that.layMain.append(that.layNone = layNone); + + table.cache[that.key] = []; //格式化缓存数据 + }; + + //页码 + Class.prototype.page = 1; + + //获得数据 + Class.prototype.pullData = function(curr){ + var that = this + ,options = that.config + ,request = options.request + ,response = options.response + ,sort = function(){ + if(typeof options.initSort === 'object'){ + that.sort(options.initSort.field, options.initSort.type); + } + }; + + that.startTime = new Date().getTime(); //渲染开始时间 + + if(options.url){ //Ajax请求 + var params = {}; + params[request.pageName] = curr; + params[request.limitName] = options.limit; + + //参数 + var data = $.extend(params, options.where); + if(options.contentType && options.contentType.indexOf("application/json") == 0){ //提交 json 格式 + data = JSON.stringify(data); + } + + that.loading(); + + $.ajax({ + type: options.method || 'get' + ,url: options.url + ,contentType: options.contentType + ,data: data + ,dataType: 'json' + ,headers: options.headers || {} + ,success: function(res){ + //如果有数据解析的回调,则获得其返回的数据 + if(typeof options.parseData === 'function'){ + res = options.parseData(res) || res; + } + //检查数据格式是否符合规范 + if(res[response.statusName] != response.statusCode){ + that.renderForm(); + that.errorView( + res[response.msgName] || + ('返回的数据不符合规范,正确的成功状态码应为:"'+ response.statusName +'": '+ response.statusCode) + ); + } else { + that.renderData(res, curr, res[response.countName]), sort(); + options.time = (new Date().getTime() - that.startTime) + ' ms'; //耗时(接口请求+视图渲染) + } + that.setColsWidth(); + typeof options.done === 'function' && options.done(res, curr, res[response.countName]); + } + ,error: function(e, msg){ + that.errorView('数据接口请求异常:'+ msg); + + that.renderForm(); + that.setColsWidth(); + + typeof options.error === 'function' && options.error(e, msg); + } + }); + } else if(options.data && options.data.constructor === Array){ //已知数据 + var res = {} + ,startLimit = curr*options.limit - options.limit + + res[response.dataName] = options.data.concat().splice(startLimit, options.limit); + res[response.countName] = options.data.length; + + //记录合计行数据 + if(typeof options.totalRow === 'object'){ + res[response.totalRowName] = $.extend({}, options.totalRow); + } + + that.renderData(res, curr, res[response.countName]), sort(); + that.setColsWidth(); + typeof options.done === 'function' && options.done(res, curr, res[response.countName]); + } + }; + + //遍历表头 + Class.prototype.eachCols = function(callback){ + var that = this; + table.eachCols(null, callback, that.config.cols); + return that; + }; + + //数据渲染 + Class.prototype.renderData = function(res, curr, count, sort){ + var that = this + ,options = that.config + ,data = res[options.response.dataName] || [] //列表数据 + ,totalRowData = res[options.response.totalRowName] //合计行数据 + ,trs = [] + ,trs_fixed = [] + ,trs_fixed_r = [] + + //渲染视图 + ,render = function(){ //后续性能提升的重点 + var thisCheckedRowIndex; + if(!sort && that.sortKey){ + return that.sort(that.sortKey.field, that.sortKey.sort, true); + } + layui.each(data, function(i1, item1){ + var tds = [], tds_fixed = [], tds_fixed_r = [] + ,numbers = i1 + options.limit*(curr - 1) + 1; //序号 + + if(item1.length === 0) return; + + if(!sort){ + item1[table.config.indexName] = i1; + } + + that.eachCols(function(i3, item3){ + var field = item3.field || i3 + ,key = options.index + '-' + item3.key + ,content = item1[field]; + + if(content === undefined || content === null) content = ''; + if(item3.colGroup) return; + + //td内容 + var td = ['' + ,'
        ' + function(){ + var tplData = $.extend(true, { + LAY_INDEX: numbers + }, item1) + ,checkName = table.config.checkName; + + //渲染不同风格的列 + switch(item3.type){ + case 'checkbox': + return ''; + break; + case 'radio': + if(tplData[checkName]){ + thisCheckedRowIndex = i1; + } + return ''; + break; + case 'numbers': + return numbers; + break; + }; + + //解析工具列模板 + if(item3.toolbar){ + return laytpl($(item3.toolbar).html()||'').render(tplData); + } + return parseTempData(item3, content, tplData); + }() + ,'
        '].join(''); + + tds.push(td); + if(item3.fixed && item3.fixed !== 'right') tds_fixed.push(td); + if(item3.fixed === 'right') tds_fixed_r.push(td); + }); + + trs.push(''+ tds.join('') + ''); + trs_fixed.push(''+ tds_fixed.join('') + ''); + trs_fixed_r.push(''+ tds_fixed_r.join('') + ''); + }); + + that.layBody.scrollTop(0); + that.layMain.find('.'+ NONE).remove(); + that.layMain.find('tbody').html(trs.join('')); + that.layFixLeft.find('tbody').html(trs_fixed.join('')); + that.layFixRight.find('tbody').html(trs_fixed_r.join('')); + + that.renderForm(); + typeof thisCheckedRowIndex === 'number' && that.setThisRowChecked(thisCheckedRowIndex); + that.syncCheckAll(); + + //滚动条补丁 + that.haveInit ? that.scrollPatch() : setTimeout(function(){ + that.scrollPatch(); + }, 50); + that.haveInit = true; + + layer.close(that.tipsIndex); + + //同步表头父列的相关值 + options.HAS_SET_COLS_PATCH || that.setColsPatch(); + options.HAS_SET_COLS_PATCH = true; + }; + + table.cache[that.key] = data; //记录数据 + + //显示隐藏分页栏 + that.layPage[(count == 0 || (data.length === 0 && curr == 1)) ? 'addClass' : 'removeClass'](HIDE); + + //如果无数据 + if(data.length === 0){ + that.renderForm(); + return that.errorView(options.text.none); + } else { + that.layFixed.removeClass(HIDE); + } + + //如果执行初始排序 + if(sort){ + return render(); + } + + //正常初始化数据渲染 + render(); //渲染数据 + that.renderTotal(data, totalRowData); //数据合计 + + //同步分页状态 + if(options.page){ + options.page = $.extend({ + elem: 'layui-table-page' + options.index + ,count: count + ,limit: options.limit + ,limits: options.limits || [10,20,30,40,50,60,70,80,90] + ,groups: 3 + ,layout: ['prev', 'page', 'next', 'skip', 'count', 'limit'] + ,prev: '' + ,next: '' + ,jump: function(obj, first){ + if(!first){ + //分页本身并非需要做以下更新,下面参数的同步,主要是因为其它处理统一用到了它们 + //而并非用的是 options.page 中的参数(以确保分页未开启的情况仍能正常使用) + that.page = obj.curr; //更新页码 + options.limit = obj.limit; //更新每页条数 + + that.pullData(obj.curr); + } + } + }, options.page); + options.page.count = count; //更新总条数 + laypage.render(options.page); + } + }; + + //数据合计行 + Class.prototype.renderTotal = function(data, totalRowData){ + var that = this + ,options = that.config + ,totalNums = {}; + + if(!options.totalRow) return; + + layui.each(data, function(i1, item1){ + if(item1.length === 0) return; + + that.eachCols(function(i3, item3){ + var field = item3.field || i3 + ,content = item1[field]; + + if(item3.totalRow){ + totalNums[field] = (totalNums[field] || 0) + (parseFloat(content) || 0); + } + }); + }); + + that.dataTotal = {}; + + var tds = []; + that.eachCols(function(i3, item3){ + var field = item3.field || i3; + + //td 内容 + var content = function(){ + var text = item3.totalRowText || '' + ,thisTotalNum = parseFloat(totalNums[field]).toFixed(2) + ,tplData = {}; + + tplData[field] = thisTotalNum; + thisTotalNum = parseTempData(item3, thisTotalNum, tplData); + + //如果直接传入了合计行数据,则不输出自动计算的结果 + if(totalRowData){ + return totalRowData[item3.field] || text; + } else { + return item3.totalRow ? (thisTotalNum || text) : text; + } + }() + ,td = ['' + ,'
        ' + function(){ + var totalRow = item3.totalRow || options.totalRow; + //如果 totalRow 参数为字符类型,则解析为自定义模版 + if(typeof totalRow === 'string'){ + return laytpl(totalRow).render($.extend({ + TOTAL_NUMS: content + }, item3)) + } + return content; + }() + ,'
        '].join(''); + + item3.field && (that.dataTotal[field] = content); + tds.push(td); + }); + + that.layTotal.find('tbody').html('' + tds.join('') + ''); + }; + + //找到对应的列元素 + Class.prototype.getColElem = function(parent, key){ + var that = this + ,options = that.config; + return parent.eq(0).find('.laytable-cell-'+ (options.index + '-' + key) + ':eq(0)'); + }; + + //渲染表单 + Class.prototype.renderForm = function(type){ + form.render(type, 'LAY-table-'+ this.index); + }; + + //标记当前行选中状态 + Class.prototype.setThisRowChecked = function(index){ + var that = this + ,options = that.config + ,ELEM_CLICK = 'layui-table-click' + ,tr = that.layBody.find('tr[data-index="'+ index +'"]'); + + tr.addClass(ELEM_CLICK).siblings('tr').removeClass(ELEM_CLICK); + }; + + //数据排序 + Class.prototype.sort = function(th, type, pull, formEvent){ + var that = this + ,field + ,res = {} + ,options = that.config + ,filter = options.elem.attr('lay-filter') + ,data = table.cache[that.key], thisData; + + //字段匹配 + if(typeof th === 'string'){ + field = th; + that.layHeader.find('th').each(function(i, item){ + var othis = $(this) + ,_field = othis.data('field'); + if(_field === th){ + th = othis; + field = _field; + return false; + } + }); + } + + try { + var field = field || th.data('field') + ,key = th.data('key'); + + //如果欲执行的排序已在状态中,则不执行渲染 + if(that.sortKey && !pull){ + if(field === that.sortKey.field && type === that.sortKey.sort){ + return; + } + } + + var elemSort = that.layHeader.find('th .laytable-cell-'+ key).find(ELEM_SORT); + that.layHeader.find('th').find(ELEM_SORT).removeAttr('lay-sort'); //清除其它标题排序状态 + elemSort.attr('lay-sort', type || null); + that.layFixed.find('th') + } catch(e){ + hint.error('Table modules: sort field \''+ field +'\' not matched'); + } + + //记录排序索引和类型 + that.sortKey = { + field: field + ,sort: type + }; + + //默认为前端自动排序。如果否,则需自主排序(通常为服务端处理好排序) + if(options.autoSort){ + if(type === 'asc'){ //升序 + thisData = layui.sort(data, field); + } else if(type === 'desc'){ //降序 + thisData = layui.sort(data, field, true); + } else { //清除排序 + thisData = layui.sort(data, table.config.indexName); + delete that.sortKey; + } + } + + res[options.response.dataName] = thisData || data; + that.renderData(res, that.page, that.count, true); + + if(formEvent){ + layui.event.call(th, MOD_NAME, 'sort('+ filter +')', { + field: field + ,type: type + }); + } + }; + + //请求loading + Class.prototype.loading = function(hide){ + var that = this + ,options = that.config; + if(options.loading){ + if(hide){ + that.layInit && that.layInit.remove(); + delete that.layInit; + that.layBox.find(ELEM_INIT).remove(); + } else { + that.layInit = $(['
        ' + ,'' + ,'
        '].join('')); + that.layBox.append(that.layInit); + } + } + }; + + //同步选中值状态 + Class.prototype.setCheckData = function(index, checked){ + var that = this + ,options = that.config + ,thisData = table.cache[that.key]; + if(!thisData[index]) return; + if(thisData[index].constructor === Array) return; + thisData[index][options.checkName] = checked; + }; + + //同步全选按钮状态 + Class.prototype.syncCheckAll = function(){ + var that = this + ,options = that.config + ,checkAllElem = that.layHeader.find('input[name="layTableCheckbox"]') + ,syncColsCheck = function(checked){ + that.eachCols(function(i, item){ + if(item.type === 'checkbox'){ + item[options.checkName] = checked; + } + }); + return checked; + }; + + if(!checkAllElem[0]) return; + + if(table.checkStatus(that.key).isAll){ + if(!checkAllElem[0].checked){ + checkAllElem.prop('checked', true); + that.renderForm('checkbox'); + } + syncColsCheck(true); + } else { + if(checkAllElem[0].checked){ + checkAllElem.prop('checked', false); + that.renderForm('checkbox'); + } + syncColsCheck(false); + } + }; + + //获取cssRule + Class.prototype.getCssRule = function(key, callback){ + var that = this + ,style = that.elem.find('style')[0] + ,sheet = style.sheet || style.styleSheet || {} + ,rules = sheet.cssRules || sheet.rules; + layui.each(rules, function(i, item){ + if(item.selectorText === ('.laytable-cell-'+ key)){ + return callback(item), true; + } + }); + }; + + //让表格铺满 + Class.prototype.fullSize = function(){ + var that = this + ,options = that.config + ,height = options.height, bodyHeight; + + if(that.fullHeightGap){ + height = _WIN.height() - that.fullHeightGap; + if(height < 135) height = 135; + that.elem.css('height', height); + } + + if(!height) return; + + //减去列头区域的高度 + bodyHeight = parseFloat(height) - (that.layHeader.outerHeight() || 38); //此处的数字常量是为了防止容器处在隐藏区域无法获得高度的问题,暂时只对默认尺寸的表格做支持。 + + //减去工具栏的高度 + if(options.toolbar){ + bodyHeight = bodyHeight - (that.layTool.outerHeight() || 50); + } + + //减去统计朗的高度 + if(options.totalRow){ + bodyHeight = bodyHeight - (that.layTotal.outerHeight() || 40); + } + + //减去分页栏的高度 + if(options.page){ + bodyHeight = bodyHeight - (that.layPage.outerHeight() || 41); + } + + that.layMain.css('height', bodyHeight - 2); + }; + + //获取滚动条宽度 + Class.prototype.getScrollWidth = function(elem){ + var width = 0; + if(elem){ + width = elem.offsetWidth - elem.clientWidth; + } else { + elem = document.createElement('div'); + elem.style.width = '100px'; + elem.style.height = '100px'; + elem.style.overflowY = 'scroll'; + + document.body.appendChild(elem); + width = elem.offsetWidth - elem.clientWidth; + document.body.removeChild(elem); + } + return width; + }; + + //滚动条补丁 + Class.prototype.scrollPatch = function(){ + var that = this + ,layMainTable = that.layMain.children('table') + ,scollWidth = that.layMain.width() - that.layMain.prop('clientWidth') //纵向滚动条宽度 + ,scollHeight = that.layMain.height() - that.layMain.prop('clientHeight') //横向滚动条高度 + ,getScrollWidth = that.getScrollWidth(that.layMain[0]) //获取主容器滚动条宽度,如果有的话 + ,outWidth = layMainTable.outerWidth() - that.layMain.width() //表格内容器的超出宽度 + + //添加补丁 + ,addPatch = function(elem){ + if(scollWidth && scollHeight){ + elem = elem.eq(0); + if(!elem.find('.layui-table-patch')[0]){ + var patchElem = $('
        '); //补丁元素 + patchElem.find('div').css({ + width: scollWidth + }); + elem.find('tr').append(patchElem); + } + } else { + elem.find('.layui-table-patch').remove(); + } + } + + addPatch(that.layHeader); + addPatch(that.layTotal); + + //固定列区域高度 + var mainHeight = that.layMain.height() + ,fixHeight = mainHeight - scollHeight; + that.layFixed.find(ELEM_BODY).css('height', layMainTable.height() >= fixHeight ? fixHeight : 'auto'); + + //表格宽度小于容器宽度时,隐藏固定列 + that.layFixRight[outWidth > 0 ? 'removeClass' : 'addClass'](HIDE); + + //操作栏 + that.layFixRight.css('right', scollWidth - 1); + }; + + //事件处理 + Class.prototype.events = function(){ + var that = this + ,options = that.config + ,_BODY = $('body') + ,dict = {} + ,th = that.layHeader.find('th') + ,resizing + ,ELEM_CELL = '.layui-table-cell' + ,filter = options.elem.attr('lay-filter'); + + //工具栏操作事件 + that.layTool.on('click', '*[lay-event]', function(e){ + var othis = $(this) + ,events = othis.attr('lay-event') + ,openPanel = function(sets){ + var list = $(sets.list) + ,panel = $('
          '); + + panel.html(list); + + //限制最大高度 + if(options.height){ + panel.css('max-height', options.height - (that.layTool.outerHeight() || 50)); + } + + //插入元素 + othis.find('.layui-table-tool-panel')[0] || othis.append(panel); + that.renderForm(); + + panel.on('click', function(e){ + layui.stope(e); + }); + + sets.done && sets.done(panel, list) + }; + + layui.stope(e); + _DOC.trigger('table.tool.panel.remove'); + layer.close(that.tipsIndex); + + switch(events){ + case 'LAYTABLE_COLS': //筛选列 + openPanel({ + list: function(){ + var lis = []; + that.eachCols(function(i, item){ + if(item.field && item.type == 'normal'){ + lis.push('
        • '); + } + }); + return lis.join(''); + }() + ,done: function(){ + form.on('checkbox(LAY_TABLE_TOOL_COLS)', function(obj){ + var othis = $(obj.elem) + ,checked = this.checked + ,key = othis.data('key') + ,parentKey = othis.data('parentkey'); + + layui.each(options.cols, function(i1, item1){ + layui.each(item1, function(i2, item2){ + if(i1+ '-'+ i2 === key){ + var hide = item2.hide; + + //同步勾选列的 hide 值和隐藏样式 + item2.hide = !checked; + that.elem.find('*[data-key="'+ options.index +'-'+ key +'"]') + [checked ? 'removeClass' : 'addClass'](HIDE); + + //根据列的显示隐藏,同步多级表头的父级相关属性值 + if(hide != item2.hide){ + that.setParentCol(!checked, parentKey); + } + + //重新适配尺寸 + that.resize(); + } + }); + }); + }); + } + }); + break; + case 'LAYTABLE_EXPORT': //导出 + if(device.ie){ + layer.tips('导出功能不支持 IE,请用 Chrome 等高级浏览器导出', this, { + tips: 3 + }) + } else { + openPanel({ + list: function(){ + return [ + '
        • 导出到 Csv 文件
        • ' + ,'
        • 导出到 Excel 文件
        • ' + ].join('') + }() + ,done: function(panel, list){ + list.on('click', function(){ + var type = $(this).data('type') + table.exportFile.call(that, options.id, null, type); + }); + } + }); + } + break; + case 'LAYTABLE_PRINT': //打印 + var printWin = window.open('打印窗口', '_blank') + ,style = [''].join('') + ,html = $(that.layHeader.html()); //输出表头 + + html.append(that.layMain.find('table').html()); //输出表体 + html.append(that.layTotal.find('table').html()) //输出合计行 + + html.find('th.layui-table-patch').remove(); //移除补丁 + html.find('.layui-table-col-special').remove(); //移除特殊列 + + printWin.document.write(style + html.prop('outerHTML')); + printWin.document.close(); + printWin.print(); + printWin.close(); + break; + } + + layui.event.call(this, MOD_NAME, 'toolbar('+ filter +')', $.extend({ + event: events + ,config: options + },{})); + }); + + //拖拽调整宽度 + th.on('mousemove', function(e){ + var othis = $(this) + ,oLeft = othis.offset().left + ,pLeft = e.clientX - oLeft; + if(othis.data('unresize') || dict.resizeStart){ + return; + } + dict.allowResize = othis.width() - pLeft <= 10; //是否处于拖拽允许区域 + _BODY.css('cursor', (dict.allowResize ? 'col-resize' : '')); + }).on('mouseleave', function(){ + var othis = $(this); + if(dict.resizeStart) return; + _BODY.css('cursor', ''); + }).on('mousedown', function(e){ + var othis = $(this); + if(dict.allowResize){ + var key = othis.data('key'); + e.preventDefault(); + dict.resizeStart = true; //开始拖拽 + dict.offset = [e.clientX, e.clientY]; //记录初始坐标 + + that.getCssRule(key, function(item){ + var width = item.style.width || othis.outerWidth(); + dict.rule = item; + dict.ruleWidth = parseFloat(width); + dict.minWidth = othis.data('minwidth') || options.cellMinWidth; + }); + } + }); + + //拖拽中 + _DOC.on('mousemove', function(e){ + if(dict.resizeStart){ + e.preventDefault(); + if(dict.rule){ + var setWidth = dict.ruleWidth + e.clientX - dict.offset[0]; + if(setWidth < dict.minWidth) setWidth = dict.minWidth; + dict.rule.style.width = setWidth + 'px'; + layer.close(that.tipsIndex); + } + resizing = 1 + } + }).on('mouseup', function(e){ + if(dict.resizeStart){ + dict = {}; + _BODY.css('cursor', ''); + that.scrollPatch(); + } + if(resizing === 2){ + resizing = null; + } + }); + + //排序 + th.on('click', function(e){ + var othis = $(this) + ,elemSort = othis.find(ELEM_SORT) + ,nowType = elemSort.attr('lay-sort') + ,type; + + if(!elemSort[0] || resizing === 1) return resizing = 2; + + if(nowType === 'asc'){ + type = 'desc'; + } else if(nowType === 'desc'){ + type = null; + } else { + type = 'asc'; + } + that.sort(othis, type, null, true); + }).find(ELEM_SORT+' .layui-edge ').on('click', function(e){ + var othis = $(this) + ,index = othis.index() + ,field = othis.parents('th').eq(0).data('field') + layui.stope(e); + if(index === 0){ + that.sort(field, 'asc', null, true); + } else { + that.sort(field, 'desc', null, true); + } + }); + + //数据行中的事件返回的公共对象成员 + var commonMember = function(sets){ + var othis = $(this) + ,index = othis.parents('tr').eq(0).data('index') + ,tr = that.layBody.find('tr[data-index="'+ index +'"]') + ,data = table.cache[that.key] || []; + + + data = data[index] || {}; + + return $.extend({ + tr: tr //行元素 + ,data: table.clearCacheKey(data) //当前行数据 + ,del: function(){ //删除行数据 + table.cache[that.key][index] = []; + tr.remove(); + that.scrollPatch(); + } + ,update: function(fields){ //修改行数据 + fields = fields || {}; + layui.each(fields, function(key, value){ + if(key in data){ + var templet, td = tr.children('td[data-field="'+ key +'"]'); + data[key] = value; + that.eachCols(function(i, item2){ + if(item2.field == key && item2.templet){ + templet = item2.templet; + } + }); + td.children(ELEM_CELL).html(parseTempData({ + templet: templet + }, value, data)); + td.data('content', value); + } + }); + } + }, sets); + }; + + //复选框选择 + that.elem.on('click', 'input[name="layTableCheckbox"]+', function(){ //替代元素的 click 事件 + var checkbox = $(this).prev() + ,childs = that.layBody.find('input[name="layTableCheckbox"]') + ,index = checkbox.parents('tr').eq(0).data('index') + ,checked = checkbox[0].checked + ,isAll = checkbox.attr('lay-filter') === 'layTableAllChoose'; + + //全选 + if(isAll){ + childs.each(function(i, item){ + item.checked = checked; + that.setCheckData(i, checked); + }); + that.syncCheckAll(); + that.renderForm('checkbox'); + } else { + that.setCheckData(index, checked); + that.syncCheckAll(); + } + + layui.event.call(checkbox[0], MOD_NAME, 'checkbox('+ filter +')', commonMember.call(checkbox[0], { + checked: checked + ,type: isAll ? 'all' : 'one' + })); + }); + + //单选框选择 + that.elem.on('click', 'input[lay-type="layTableRadio"]+', function(){ + var radio = $(this).prev() + ,checked = radio[0].checked + ,thisData = table.cache[that.key] + ,index = radio.parents('tr').eq(0).data('index'); + + //重置数据单选属性 + layui.each(thisData, function(i, item){ + if(index === i){ + item[options.checkName] = true; + } else { + delete item[options.checkName]; + } + }); + that.setThisRowChecked(index); + + layui.event.call(this, MOD_NAME, 'radio('+ filter +')', commonMember.call(this, { + checked: checked + })); + }); + + //行事件 + that.layBody.on('mouseenter', 'tr', function(){ //鼠标移入行 + var othis = $(this) + ,index = othis.index(); + if(othis.data('off')) return; //不触发事件 + that.layBody.find('tr:eq('+ index +')').addClass(ELEM_HOVER) + }).on('mouseleave', 'tr', function(){ //鼠标移出行 + var othis = $(this) + ,index = othis.index(); + if(othis.data('off')) return; //不触发事件 + that.layBody.find('tr:eq('+ index +')').removeClass(ELEM_HOVER) + }).on('click', 'tr', function(){ //单击行 + setRowEvent.call(this, 'row'); + }).on('dblclick', 'tr', function(){ //双击行 + setRowEvent.call(this, 'rowDouble'); + }); + + //创建行单击、双击事件 + var setRowEvent = function(eventType){ + var othis = $(this); + if(othis.data('off')) return; //不触发事件 + layui.event.call(this, + MOD_NAME, eventType + '('+ filter +')' + ,commonMember.call(othis.children('td')[0]) + ); + }; + + //单元格编辑 + that.layBody.on('change', '.'+ELEM_EDIT, function(){ + var othis = $(this) + ,value = this.value + ,field = othis.parent().data('field') + ,index = othis.parents('tr').eq(0).data('index') + ,data = table.cache[that.key][index]; + + data[field] = value; //更新缓存中的值 + + layui.event.call(this, MOD_NAME, 'edit('+ filter +')', commonMember.call(this, { + value: value + ,field: field + })); + }).on('blur', '.'+ELEM_EDIT, function(){ + var templet + ,othis = $(this) + ,thisElem = this + ,field = othis.parent().data('field') + ,index = othis.parents('tr').eq(0).data('index') + ,data = table.cache[that.key][index]; + that.eachCols(function(i, item){ + if(item.field == field && item.templet){ + templet = item.templet; + } + }); + othis.siblings(ELEM_CELL).html(function(value){ + return parseTempData({ + templet: templet + }, value, data); + }(thisElem.value)); + othis.parent().data('content', thisElem.value); + othis.remove(); + }); + + //单元格单击事件 + that.layBody.on('click', 'td', function(e){ + var othis = $(this) + ,field = othis.data('field') + ,editType = othis.data('edit') + ,elemCell = othis.children(ELEM_CELL); + + if(othis.data('off')) return; //不触发事件 + + //显示编辑表单 + if(editType){ + var input = $(''); + input[0].value = othis.data('content') || elemCell.text(); + othis.find('.'+ELEM_EDIT)[0] || othis.append(input); + input.focus(); + layui.stope(e); + return; + } + }).on('mouseenter', 'td', function(){ + gridExpand.call(this) + }).on('mouseleave', 'td', function(){ + gridExpand.call(this, 'hide'); + }); + + //单元格展开图标 + var ELEM_GRID = 'layui-table-grid', ELEM_GRID_DOWN = 'layui-table-grid-down', ELEM_GRID_PANEL = 'layui-table-grid-panel' + ,gridExpand = function(hide){ + var othis = $(this) + ,elemCell = othis.children(ELEM_CELL); + + if(othis.data('off')) return; //不触发事件 + + if(hide){ + othis.find('.layui-table-grid-down').remove(); + } else if(elemCell.prop('scrollWidth') > elemCell.outerWidth()){ + if(elemCell.find('.'+ ELEM_GRID_DOWN)[0]) return; + othis.append('
          '); + } + }; + + //单元格展开事件 + that.layBody.on('click', '.'+ ELEM_GRID_DOWN, function(e){ + var othis = $(this) + ,td = othis.parent() + ,elemCell = td.children(ELEM_CELL); + + that.tipsIndex = layer.tips([ + '
          ' + ,elemCell.html() + ,'
          ' + ,'' + ].join(''), elemCell[0], { + tips: [3, ''] + ,time: -1 + ,anim: -1 + ,maxWidth: (device.ios || device.android) ? 300 : that.elem.width()/2 + ,isOutAnim: false + ,skin: 'layui-table-tips' + ,success: function(layero, index){ + layero.find('.layui-table-tips-c').on('click', function(){ + layer.close(index); + }); + } + }); + + layui.stope(e); + }); + + //行工具条操作事件 + that.layBody.on('click', '*[lay-event]', function(){ + var othis = $(this) + ,index = othis.parents('tr').eq(0).data('index'); + layui.event.call(this, MOD_NAME, 'tool('+ filter +')', commonMember.call(this, { + event: othis.attr('lay-event') + })); + that.setThisRowChecked(index); + }); + + //同步滚动条 + that.layMain.on('scroll', function(){ + var othis = $(this) + ,scrollLeft = othis.scrollLeft() + ,scrollTop = othis.scrollTop(); + + that.layHeader.scrollLeft(scrollLeft); + that.layTotal.scrollLeft(scrollLeft); + that.layFixed.find(ELEM_BODY).scrollTop(scrollTop); + + layer.close(that.tipsIndex); + }); + + //自适应 + _WIN.on('resize', function(){ + that.resize(); + }); + }; + + //一次性事件 + ;(function(){ + //全局点击 + _DOC.on('click', function(){ + _DOC.trigger('table.remove.tool.panel'); + }); + + //工具面板移除事件 + _DOC.on('table.remove.tool.panel', function(){ + $('.layui-table-tool-panel').remove(); + }); + })(); + + //初始化 + table.init = function(filter, settings){ + settings = settings || {}; + var that = this + ,elemTable = filter ? $('table[lay-filter="'+ filter +'"]') : $(ELEM + '[lay-data]') + ,errorTips = 'Table element property lay-data configuration item has a syntax error: '; + + //遍历数据表格 + elemTable.each(function(){ + var othis = $(this), tableData = othis.attr('lay-data'); + + try{ + tableData = new Function('return '+ tableData)(); + } catch(e){ + hint.error(errorTips + tableData, 'error') + } + + var cols = [], options = $.extend({ + elem: this + ,cols: [] + ,data: [] + ,skin: othis.attr('lay-skin') //风格 + ,size: othis.attr('lay-size') //尺寸 + ,even: typeof othis.attr('lay-even') === 'string' //偶数行背景 + }, table.config, settings, tableData); + + filter && othis.hide(); + + //获取表头数据 + othis.find('thead>tr').each(function(i){ + options.cols[i] = []; + $(this).children().each(function(ii){ + var th = $(this), itemData = th.attr('lay-data'); + + try{ + itemData = new Function('return '+ itemData)(); + } catch(e){ + return hint.error(errorTips + itemData) + } + + var row = $.extend({ + title: th.text() + ,colspan: th.attr('colspan') || 0 //列单元格 + ,rowspan: th.attr('rowspan') || 0 //行单元格 + }, itemData); + + if(row.colspan < 2) cols.push(row); + options.cols[i].push(row); + }); + }); + + //获取表体数据 + othis.find('tbody>tr').each(function(i1){ + var tr = $(this), row = {}; + //如果定义了字段名 + tr.children('td').each(function(i2, item2){ + var td = $(this) + ,field = td.data('field'); + if(field){ + return row[field] = td.html(); + } + }); + //如果未定义字段名 + layui.each(cols, function(i3, item3){ + var td = tr.children('td').eq(i3); + row[item3.field] = td.html(); + }); + options.data[i1] = row; + }); + table.render(options); + }); + + return that; + }; + + //记录所有实例 + thisTable.that = {}; //记录所有实例对象 + thisTable.config = {}; //记录所有实例配置项 + + //遍历表头 + table.eachCols = function(id, callback, cols){ + var config = thisTable.config[id] || {} + ,arrs = [], index = 0; + + cols = $.extend(true, [], cols || config.cols); + + //重新整理表头结构 + layui.each(cols, function(i1, item1){ + layui.each(item1, function(i2, item2){ + + //如果是组合列,则捕获对应的子列 + if(item2.colGroup){ + var childIndex = 0; + index++ + item2.CHILD_COLS = []; + + layui.each(cols[i1 + 1], function(i22, item22){ + //如果子列已经被标注为{PARENT_COL_INDEX},或者子列累计 colspan 数等于父列定义的 colspan,则跳出当前子列循环 + if(item22.PARENT_COL_INDEX || (childIndex > 1 && childIndex == item2.colspan)) return; + + item22.PARENT_COL_INDEX = index; + + item2.CHILD_COLS.push(item22); + childIndex = childIndex + parseInt(item22.colspan > 1 ? item22.colspan : 1); + }); + } + + if(item2.PARENT_COL_INDEX) return; //如果是子列,则不进行追加,因为已经存储在父列中 + arrs.push(item2) + }); + }); + + //重新遍历列,如果有子列,则进入递归 + var eachArrs = function(obj){ + layui.each(obj || arrs, function(i, item){ + if(item.CHILD_COLS) return eachArrs(item.CHILD_COLS); + typeof callback === 'function' && callback(i, item); + }); + }; + + eachArrs(); + }; + + //表格选中状态 + table.checkStatus = function(id){ + var nums = 0 + ,invalidNum = 0 + ,arr = [] + ,data = table.cache[id] || []; + //计算全选个数 + layui.each(data, function(i, item){ + if(item.constructor === Array){ + invalidNum++; //无效数据,或已删除的 + return; + } + if(item[table.config.checkName]){ + nums++; + arr.push(table.clearCacheKey(item)); + } + }); + return { + data: arr //选中的数据 + ,isAll: data.length ? (nums === (data.length - invalidNum)) : false //是否全选 + }; + }; + + //获取表格当前页的所有行数据 + table.getData = function(id){ + var arr = [] + ,data = table.cache[id] || []; + layui.each(data, function(i, item){ + if(item.constructor === Array){ + return; + }; + arr.push(table.clearCacheKey(item)); + }); + return arr; + }; + + //表格导出 + table.exportFile = function(id, data, type){ + var that = this; + + data = data || table.clearCacheKey(table.cache[id]); + type = type || 'csv'; + + var config = thisTable.config[id] || {} + ,textType = ({ + csv: 'text/csv' + ,xls: 'application/vnd.ms-excel' + })[type] + ,alink = document.createElement("a"); + + if(device.ie) return hint.error('IE_NOT_SUPPORT_EXPORTS'); + + alink.href = 'data:'+ textType +';charset=utf-8,\ufeff'+ encodeURIComponent(function(){ + var dataTitle = [], dataMain = [], dataTotal = []; + + //表头和表体 + layui.each(data, function(i1, item1){ + var vals = []; + if(typeof id === 'object'){ //如果 id 参数直接为表头数据 + layui.each(id, function(i, item){ + i1 == 0 && dataTitle.push(item || ''); + }); + layui.each(table.clearCacheKey(item1), function(i2, item2){ + vals.push('"'+ (item2 || '') +'"'); + }); + } else { + table.eachCols(id, function(i3, item3){ + if(item3.field && item3.type == 'normal' && !item3.hide){ + var content = item1[item3.field]; + if(content === undefined || content === null) content = ''; + + i1 == 0 && dataTitle.push(item3.title || ''); + vals.push('"'+ parseTempData(item3, content, item1, 'text') + '"'); + } + }); + } + dataMain.push(vals.join(',')); + }); + + //表合计 + layui.each(that.dataTotal, function(key, value){ + dataTotal.push(value); + }); + + return dataTitle.join(',') + '\r\n' + dataMain.join('\r\n') + '\r\n' + dataTotal.join(','); + }()); + + alink.download = (config.title || 'table_'+ (config.index || '')) + '.' + type; + document.body.appendChild(alink); + alink.click(); + document.body.removeChild(alink); + }; + + //重置表格尺寸结构 + table.resize = function(id){ + //如果指定表格唯一 id,则只执行该 id 对应的表格实例 + if(id){ + var config = getThisTableConfig(id); //获取当前实例配置项 + if(!config) return; + + thisTable.that[id].resize(); + + } else { //否则重置所有表格实例尺寸 + layui.each(thisTable.that, function(){ + this.resize(); + }); + } + }; + + //表格重载 + table.reload = function(id, options, deep){ + var config = getThisTableConfig(id); //获取当前实例配置项 + if(!config) return; + + var that = thisTable.that[id]; + that.reload(options, deep); + + return thisTable.call(that); + }; + + //核心入口 + table.render = function(options){ + var inst = new Class(options); + return thisTable.call(inst); + }; + + //清除临时Key + table.clearCacheKey = function(data){ + data = $.extend({}, data); + delete data[table.config.checkName]; + delete data[table.config.indexName]; + return data; + }; + + //自动完成渲染 + table.init(); + + exports(MOD_NAME, table); +}); + + diff --git a/IoTGateway/wwwroot/layui/lay/modules/transfer.js b/IoTGateway/wwwroot/layui/lay/modules/transfer.js new file mode 100644 index 0000000..5ac2207 --- /dev/null +++ b/IoTGateway/wwwroot/layui/lay/modules/transfer.js @@ -0,0 +1,437 @@ +/** + + @Name:transfer 穿梭框组件 + @License:MIT + + */ + +layui.define(['laytpl', 'form'], function(exports){ + "use strict"; + + var $ = layui.$ + ,laytpl = layui.laytpl + ,form = layui.form + + //模块名 + ,MOD_NAME = 'transfer' + + //外部接口 + ,transfer = { + config: {} + ,index: layui[MOD_NAME] ? (layui[MOD_NAME].index + 10000) : 0 + + //设置全局项 + ,set: function(options){ + var that = this; + that.config = $.extend({}, that.config, options); + return that; + } + + //事件 + ,on: function(events, callback){ + return layui.onevent.call(this, MOD_NAME, events, callback); + } + } + + //操作当前实例 + ,thisModule = function(){ + var that = this + ,options = that.config + ,id = options.id || that.index; + + thisModule.that[id] = that; //记录当前实例对象 + thisModule.config[id] = options; //记录当前实例配置项 + + return { + config: options + //重置实例 + ,reload: function(options){ + that.reload.call(that, options); + } + //获取右侧数据 + ,getData: function(){ + return that.getData.call(that); + } + } + } + + //获取当前实例配置项 + ,getThisModuleConfig = function(id){ + var config = thisModule.config[id]; + if(!config) hint.error('The ID option was not found in the '+ MOD_NAME +' instance'); + return config || null; + } + + //字符常量 + ,ELEM = 'layui-transfer', HIDE = 'layui-hide', DISABLED = 'layui-btn-disabled', NONE = 'layui-none' + ,ELEM_BOX = 'layui-transfer-box', ELEM_HEADER = 'layui-transfer-header', ELEM_SEARCH = 'layui-transfer-search', ELEM_ACTIVE = 'layui-transfer-active', ELEM_DATA = 'layui-transfer-data' + + //穿梭框模板 + ,TPL_BOX = function(obj){ + obj = obj || {}; + return ['
          ' + ,'
          ' + ,'' + ,'
          ' + ,'{{# if(d.data.showSearch){ }}' + ,'' + ,'{{# } }}' + ,'
            ' + ,'
            '].join(''); + } + + //主模板 + ,TPL_MAIN = ['
            ' + ,TPL_BOX({ + index: 0 + ,checkAllName: 'layTransferLeftCheckAll' + }) + ,'
            ' + ,'' + ,'' + ,'
            ' + ,TPL_BOX({ + index: 1 + ,checkAllName: 'layTransferRightCheckAll' + }) + ,'
            '].join('') + + //构造器 + ,Class = function(options){ + var that = this; + that.index = ++transfer.index; + that.config = $.extend({}, that.config, transfer.config, options); + that.render(); + }; + + //默认配置 + Class.prototype.config = { + title: ['列表一', '列表二'] + ,width: 200 + ,height: 360 + ,data: [] //数据源 + ,value: [] //选中的数据 + ,showSearch: false //是否开启搜索 + ,id: '' //唯一索引,默认自增 index + ,text: { + none: '无数据' + ,searchNone: '无匹配数据' + } + }; + + //重载实例 + Class.prototype.reload = function(options){ + var that = this; + that.config = $.extend({}, that.config, options); + that.render(); + }; + + //渲染 + Class.prototype.render = function(){ + var that = this + ,options = that.config; + + //解析模板 + var thisElem = that.elem = $(laytpl(TPL_MAIN).render({ + data: options + ,index: that.index //索引 + })); + + var othis = options.elem = $(options.elem); + if(!othis[0]) return; + + //初始化属性 + options.data = options.data || []; + options.value = options.value || []; + + //索引 + that.key = options.id || that.index; + + //插入组件结构 + othis.html(that.elem); + + //各级容器 + that.layBox = that.elem.find('.'+ ELEM_BOX) + that.layHeader = that.elem.find('.'+ ELEM_HEADER) + that.laySearch = that.elem.find('.'+ ELEM_SEARCH) + that.layData = thisElem.find('.'+ ELEM_DATA); + that.layBtn = thisElem.find('.'+ ELEM_ACTIVE + ' .layui-btn'); + + //初始化尺寸 + that.layBox.css({ + width: options.width + ,height: options.height + }); + that.layData.css({ + height: function(){ + return options.height - that.layHeader.outerHeight() - that.laySearch.outerHeight() - 2 + }() + }); + + that.renderData(); //渲染数据 + that.events(); //事件 + }; + + //渲染数据 + Class.prototype.renderData = function(){ + var that = this + ,options = that.config; + + //左右穿梭框差异数据 + var arr = [{ + checkName: 'layTransferLeftCheck' + ,views: [] + }, { + checkName: 'layTransferRightCheck' + ,views: [] + }]; + + //解析格式 + that.parseData(function(item){ + //标注为 selected 的为右边的数据 + var _index = item.selected ? 1 : 0 + ,listElem = ['
          • ' + ,'' + ,'
          • '].join(''); + arr[_index].views.push(listElem); + delete item.selected; + }); + + that.layData.eq(0).html(arr[0].views.join('')); + that.layData.eq(1).html(arr[1].views.join('')); + + that.renderCheckBtn(); + } + + //渲染表单 + Class.prototype.renderForm = function(type){ + form.render(type, 'LAY-transfer-'+ this.index); + }; + + //同步复选框和按钮状态 + Class.prototype.renderCheckBtn = function(obj){ + var that = this + ,options = that.config; + + obj = obj || {}; + + that.layBox.each(function(_index){ + var othis = $(this) + ,thisDataElem = othis.find('.'+ ELEM_DATA) + ,allElemCheckbox = othis.find('.'+ ELEM_HEADER).find('input[type="checkbox"]') + ,listElemCheckbox = thisDataElem.find('input[type="checkbox"]'); + + //同步复选框和按钮状态 + var nums = 0 + ,haveChecked = false; + listElemCheckbox.each(function(){ + var isHide = $(this).data('hide'); + if(this.checked || this.disabled || isHide){ + nums++; + } + if(this.checked && !isHide){ + haveChecked = true; + } + }); + + allElemCheckbox.prop('checked', haveChecked && nums === listElemCheckbox.length); //全选复选框状态 + that.layBtn.eq(_index)[haveChecked ? 'removeClass' : 'addClass'](DISABLED); //对应的按钮状态 + + //无数据视图 + if(!obj.stopNone){ + var isNone = thisDataElem.children('li:not(.'+ HIDE +')').length + that.noneView(thisDataElem, isNone ? '' : options.text.none); + } + }); + + that.renderForm('checkbox'); + }; + + //无数据视图 + Class.prototype.noneView = function(thisDataElem, text){ + var createNoneElem = $('

            '+ (text || '') +'

            '); + if(thisDataElem.find('.'+ NONE)[0]){ + thisDataElem.find('.'+ NONE).remove(); + } + text.replace(/\s/g, '') && thisDataElem.append(createNoneElem); + }; + + //同步 value 属性值 + Class.prototype.setValue = function(){ + var that = this + ,options = that.config + ,arr = []; + that.layBox.eq(1).find('.'+ ELEM_DATA +' input[type="checkbox"]').each(function(){ + var isHide = $(this).data('hide'); + isHide || arr.push(this.value); + }); + options.value = arr; + + return that; + }; + + //解析数据 + Class.prototype.parseData = function(callback){ + var that = this + ,options = that.config + ,newData = []; + + layui.each(options.data, function(index, item){ + //解析格式 + item = (typeof options.parseData === 'function' + ? options.parseData(item) + : item) || item; + + newData.push(item = $.extend({}, item)) + + layui.each(options.value, function(index2, item2){ + if(item2 == item.value){ + item.selected = true; + } + }); + callback && callback(item); + }); + + options.data = newData; + return that; + }; + + //获得右侧面板数据 + Class.prototype.getData = function(value){ + var that = this + ,options = that.config + ,selectedData = []; + + that.setValue(); + + layui.each(value || options.value, function(index, item){ + layui.each(options.data, function(index2, item2){ + delete item2.selected; + if(item == item2.value){ + selectedData.push(item2); + }; + }); + }); + return selectedData; + }; + + //事件 + Class.prototype.events = function(){ + var that = this + ,options = that.config; + + //左右复选框 + that.elem.on('click', 'input[lay-filter="layTransferCheckbox"]+', function(){ + var thisElemCheckbox = $(this).prev() + ,checked = thisElemCheckbox[0].checked + ,thisDataElem = thisElemCheckbox.parents('.'+ ELEM_BOX).eq(0).find('.'+ ELEM_DATA); + + if(thisElemCheckbox[0].disabled) return; + + //判断是否全选 + if(thisElemCheckbox.attr('lay-type') === 'all'){ + thisDataElem.find('input[type="checkbox"]').each(function(){ + if(this.disabled) return; + this.checked = checked; + }); + } + + that.renderCheckBtn({stopNone: true}); + }); + + //按钮事件 + that.layBtn.on('click', function(){ + var othis = $(this) + ,_index = othis.data('index') + ,thisBoxElem = that.layBox.eq(_index) + ,arr = []; + if(othis.hasClass(DISABLED)) return; + + that.layBox.eq(_index).each(function(_index){ + var othis = $(this) + ,thisDataElem = othis.find('.'+ ELEM_DATA); + + thisDataElem.children('li').each(function(){ + var thisList = $(this) + ,thisElemCheckbox = thisList.find('input[type="checkbox"]') + ,isHide = thisElemCheckbox.data('hide'); + + if(thisElemCheckbox[0].checked && !isHide){ + thisElemCheckbox[0].checked = false; + thisBoxElem.siblings('.'+ ELEM_BOX).find('.'+ ELEM_DATA).append(thisList.clone()); + thisList.remove(); + + //记录当前穿梭的数据 + arr.push(thisElemCheckbox[0].value); + } + + that.setValue(); + }); + }); + + that.renderCheckBtn(); + + //穿梭时,如果另外一个框正在搜索,则触发匹配 + var siblingInput = thisBoxElem.siblings('.'+ ELEM_BOX).find('.'+ ELEM_SEARCH +' input') + siblingInput.val() === '' || siblingInput.trigger('keyup'); + + //穿梭时的回调 + options.onchange && options.onchange(that.getData(arr), _index); + }); + + //搜索 + that.laySearch.find('input').on('keyup', function(){ + var value = this.value + ,thisDataElem = $(this).parents('.'+ ELEM_SEARCH).eq(0).siblings('.'+ ELEM_DATA) + ,thisListElem = thisDataElem.children('li'); + + thisListElem.each(function(){ + var thisList = $(this) + ,thisElemCheckbox = thisList.find('input[type="checkbox"]') + ,isMatch = thisElemCheckbox[0].title.indexOf(value) !== -1; + + thisList[isMatch ? 'removeClass': 'addClass'](HIDE); + thisElemCheckbox.data('hide', isMatch ? false : true); + }); + + that.renderCheckBtn(); + + //无匹配数据视图 + var isNone = thisListElem.length === thisDataElem.children('li.'+ HIDE).length; + that.noneView(thisDataElem, isNone ? options.text.searchNone : ''); + }); + }; + + //记录所有实例 + thisModule.that = {}; //记录所有实例对象 + thisModule.config = {}; //记录所有实例配置项 + + //重载实例 + transfer.reload = function(id, options){ + var that = thisModule.that[id]; + that.reload(options); + + return thisModule.call(that); + }; + + //获得选中的数据(右侧面板) + transfer.getData = function(id){ + var that = thisModule.that[id]; + return that.getData(); + }; + + //核心入口 + transfer.render = function(options){ + var inst = new Class(options); + return thisModule.call(inst); + }; + + exports(MOD_NAME, transfer); +}); diff --git a/IoTGateway/wwwroot/layui/lay/modules/tree.js b/IoTGateway/wwwroot/layui/lay/modules/tree.js new file mode 100644 index 0000000..5776481 --- /dev/null +++ b/IoTGateway/wwwroot/layui/lay/modules/tree.js @@ -0,0 +1,816 @@ +/** + + @Name:tree 树组件 + @License:MIT + + */ + +layui.define('form', function(exports){ + "use strict"; + + var $ = layui.$ + ,form = layui.form + ,layer = layui.layer + + //模块名 + ,MOD_NAME = 'tree' + + //外部接口 + ,tree = { + config: {} + ,index: layui[MOD_NAME] ? (layui[MOD_NAME].index + 10000) : 0 + + //设置全局项 + ,set: function(options){ + var that = this; + that.config = $.extend({}, that.config, options); + return that; + } + + //事件 + ,on: function(events, callback){ + return layui.onevent.call(this, MOD_NAME, events, callback); + } + } + + //操作当前实例 + ,thisModule = function(){ + var that = this + ,options = that.config + ,id = options.id || that.index; + + thisModule.that[id] = that; //记录当前实例对象 + thisModule.config[id] = options; //记录当前实例配置项 + + return { + config: options + //重置实例 + ,reload: function(options){ + that.reload.call(that, options); + } + ,getChecked: function(){ + return that.getChecked.call(that); + } + ,setChecked: function(id){//设置值 + return that.setChecked.call(that, id); + } + } + } + + //获取当前实例配置项 + ,getThisModuleConfig = function(id){ + var config = thisModule.config[id]; + if(!config) hint.error('The ID option was not found in the '+ MOD_NAME +' instance'); + return config || null; + } + + //字符常量 + ,SHOW = 'layui-show', HIDE = 'layui-hide', NONE = 'layui-none', DISABLED = 'layui-disabled' + + ,ELEM_VIEW = 'layui-tree', ELEM_SET = 'layui-tree-set', ICON_CLICK = 'layui-tree-iconClick' + ,ICON_ADD = 'layui-icon-addition', ICON_SUB = 'layui-icon-subtraction', ELEM_ENTRY = 'layui-tree-entry', ELEM_MAIN = 'layui-tree-main', ELEM_TEXT = 'layui-tree-txt', ELEM_PACK = 'layui-tree-pack', ELEM_SPREAD = 'layui-tree-spread' + ,ELEM_LINE_SHORT = 'layui-tree-setLineShort', ELEM_SHOW = 'layui-tree-showLine', ELEM_EXTEND = 'layui-tree-lineExtend' + + //构造器 + ,Class = function(options){ + var that = this; + that.index = ++tree.index; + that.config = $.extend({}, that.config, tree.config, options); + that.render(); + }; + + //默认配置 + Class.prototype.config = { + data: [] //数据 + + ,showCheckbox: false //是否显示复选框 + ,showLine: true //是否开启连接线 + ,accordion: false //是否开启手风琴模式 + ,onlyIconControl: false //是否仅允许节点左侧图标控制展开收缩 + ,isJump: false //是否允许点击节点时弹出新窗口跳转 + ,edit: false //是否开启节点的操作图标 + + ,text: { + defaultNodeName: '未命名' //节点默认名称 + ,none: '无数据' //数据为空时的文本提示 + } + }; + + //重载实例 + Class.prototype.reload = function(options){ + var that = this; + + layui.each(options, function(key, item){ + if(item.constructor === Array) delete that.config[key]; + }); + + that.config = $.extend(true, {}, that.config, options); + that.render(); + }; + + //主体渲染 + Class.prototype.render = function(){ + var that = this + ,options = that.config; + + that.checkids = []; + + var temp = $('
            '); + that.tree(temp); + + var othis = options.elem = $(options.elem); + if(!othis[0]) return; + + //索引 + that.key = options.id || that.index; + + //插入组件结构 + that.elem = temp; + that.elemNone = $('
            '+ options.text.none +'
            '); + othis.html(that.elem); + + if(that.elem.find('.layui-tree-set').length == 0){ + return that.elem.append(that.elemNone); + }; + + //复选框渲染 + if(options.showCheckbox){ + that.renderForm('checkbox'); + }; + + that.elem.find('.layui-tree-set').each(function(){ + var othis = $(this); + //最外层 + if(!othis.parent('.layui-tree-pack')[0]){ + othis.addClass('layui-tree-setHide'); + }; + + //没有下一个节点 上一层父级有延伸线 + if(!othis.next()[0] && othis.parents('.layui-tree-pack').eq(1).hasClass('layui-tree-lineExtend')){ + othis.addClass(ELEM_LINE_SHORT); + }; + + //没有下一个节点 外层最后一个 + if(!othis.next()[0] && !othis.parents('.layui-tree-set').eq(0).next()[0]){ + othis.addClass(ELEM_LINE_SHORT); + }; + }); + + that.events(); + }; + + //渲染表单 + Class.prototype.renderForm = function(type){ + form.render(type, 'LAY-tree-'+ this.index); + }; + + //节点解析 + Class.prototype.tree = function(elem, children){ + var that = this + ,options = that.config + ,data = children || options.data; + + //遍历数据 + layui.each(data, function(index, item){ + var hasChild = item.children && item.children.length > 0 + ,packDiv = $('
            ') + ,entryDiv = $(['
            ' + ,'
            ' + ,'
            ' + //箭头 + ,function(){ + if(options.showLine){ + if(hasChild){ + return ''; + }else{ + return ''; + }; + }else{ + return ''; + }; + }() + + //复选框 + ,function(){ + return options.showCheckbox ? '' : ''; + }() + + //节点 + ,function(){ + if(options.isJump && item.href){ + return ''+ (item.title || item.label || options.text.defaultNodeName) +''; + }else{ + return ''+ (item.title || item.label || options.text.defaultNodeName) +''; + } + }() + ,'
            ' + + //节点操作图标 + ,function(){ + if(!options.edit) return ''; + + var editIcon = { + add: '' + ,update: '' + ,del: '' + }, arr = ['
            ']; + + if(options.edit === true){ + options.edit = ['update', 'del'] + } + + if(typeof options.edit === 'object'){ + layui.each(options.edit, function(i, val){ + arr.push(editIcon[val] || '') + }); + return arr.join('') + '
            '; + } + }() + ,'
            '].join('')); + + //如果有子节点,则递归继续生成树 + if(hasChild){ + entryDiv.append(packDiv); + that.tree(packDiv, item.children); + }; + + elem.append(entryDiv); + + //若有前置节点,前置节点加连接线 + if(entryDiv.prev('.'+ELEM_SET)[0]){ + entryDiv.prev().children('.layui-tree-pack').addClass('layui-tree-showLine'); + }; + + //若无子节点,则父节点加延伸线 + if(!hasChild){ + entryDiv.parent('.layui-tree-pack').addClass('layui-tree-lineExtend'); + }; + + //展开节点操作 + that.spread(entryDiv, item); + + //选择框 + if(options.showCheckbox){ + item.checked && that.checkids.push(item.id); + that.checkClick(entryDiv, item); + } + + //操作节点 + options.edit && that.operate(entryDiv, item); + + }); + }; + + //展开节点 + Class.prototype.spread = function(elem, item){ + var that = this + ,options = that.config + ,entry = elem.children('.'+ELEM_ENTRY) + ,elemMain = entry.children('.'+ ELEM_MAIN) + ,elemIcon = entry.find('.'+ ICON_CLICK) + ,elemText = entry.find('.'+ ELEM_TEXT) + ,touchOpen = options.onlyIconControl ? elemIcon : elemMain //判断展开通过节点还是箭头图标 + ,state = ''; + + //展开收缩 + touchOpen.on('click', function(e){ + var packCont = elem.children('.'+ELEM_PACK) + ,iconClick = touchOpen.children('.layui-icon')[0] ? touchOpen.children('.layui-icon') : touchOpen.find('.layui-tree-icon').children('.layui-icon'); + + //若没有子节点 + if(!packCont[0]){ + state = 'normal'; + }else{ + if(elem.hasClass(ELEM_SPREAD)){ + elem.removeClass(ELEM_SPREAD); + packCont.slideUp(200); + iconClick.removeClass(ICON_SUB).addClass(ICON_ADD); + }else{ + elem.addClass(ELEM_SPREAD); + packCont.slideDown(200); + iconClick.addClass(ICON_SUB).removeClass(ICON_ADD); + + //是否手风琴 + if(options.accordion){ + var sibls = elem.siblings('.'+ELEM_SET); + sibls.removeClass(ELEM_SPREAD); + sibls.children('.'+ELEM_PACK).slideUp(200); + sibls.find('.layui-tree-icon').children('.layui-icon').removeClass(ICON_SUB).addClass(ICON_ADD); + }; + }; + }; + }); + + //点击回调 + elemText.on('click', function(){ + var othis = $(this); + + //判断是否禁用状态 + if(othis.hasClass(DISABLED)) return; + + //判断展开收缩状态 + if(elem.hasClass(ELEM_SPREAD)){ + state = options.onlyIconControl ? 'open' : 'close'; + } else { + state = options.onlyIconControl ? 'close' : 'open'; + } + + //点击产生的回调 + options.click && options.click({ + elem: elem + ,state: state + ,data: item + }); + }); + }; + + //计算复选框选中状态 + Class.prototype.setCheckbox = function(elem, item, elemCheckbox){ + var that = this + ,options = that.config + ,checked = elemCheckbox.prop('checked'); + + if(elemCheckbox.prop('disabled')) return; + + //同步子节点选中状态 + if(typeof item.children === 'object' || elem.find('.'+ELEM_PACK)[0]){ + var childs = elem.find('.'+ ELEM_PACK).find('input[same="layuiTreeCheck"]'); + childs.each(function(){ + if(this.disabled) return; //不可点击则跳过 + this.checked = checked; + }); + }; + + //同步父节点选中状态 + var setParentsChecked = function(thisNodeElem){ + //若无父节点,则终止递归 + if(!thisNodeElem.parents('.'+ ELEM_SET)[0]) return; + + var state + ,parentPack = thisNodeElem.parent('.'+ ELEM_PACK) + ,parentNodeElem = parentPack.parent() + ,parentCheckbox = parentPack.prev().find('input[same="layuiTreeCheck"]'); + + //如果子节点有任意一条选中,则父节点为选中状态 + if(checked){ + parentCheckbox.prop('checked', checked); + } else { //如果当前节点取消选中,则根据计算“兄弟和子孙”节点选中状态,来同步父节点选中状态 + parentPack.find('input[same="layuiTreeCheck"]').each(function(){ + if(this.checked){ + state = true; + } + }); + + //如果兄弟子孙节点全部未选中,则父节点也应为非选中状态 + state || parentCheckbox.prop('checked', false); + } + + //向父节点递归 + setParentsChecked(parentNodeElem); + }; + + setParentsChecked(elem); + + that.renderForm('checkbox'); + }; + + //复选框选择 + Class.prototype.checkClick = function(elem, item){ + var that = this + ,options = that.config + ,entry = elem.children('.'+ ELEM_ENTRY) + ,elemMain = entry.children('.'+ ELEM_MAIN); + + + + //点击复选框 + elemMain.on('click', 'input[same="layuiTreeCheck"]+', function(e){ + layui.stope(e); //阻止点击节点事件 + + var elemCheckbox = $(this).prev() + ,checked = elemCheckbox.prop('checked'); + + if(elemCheckbox.prop('disabled')) return; + + that.setCheckbox(elem, item, elemCheckbox); + + //复选框点击产生的回调 + options.oncheck && options.oncheck({ + elem: elem + ,checked: checked + ,data: item + }); + }); + }; + + //节点操作 + Class.prototype.operate = function(elem, item){ + var that = this + ,options = that.config + ,entry = elem.children('.'+ ELEM_ENTRY) + ,elemMain = entry.children('.'+ ELEM_MAIN); + + entry.children('.layui-tree-btnGroup').on('click', '.layui-icon', function(e){ + layui.stope(e); //阻止节点操作 + + var type = $(this).data("type") + ,packCont = elem.children('.'+ELEM_PACK) + ,returnObj = { + data: item + ,type: type + ,elem:elem + }; + //增加 + if(type == 'add'){ + //若节点本身无子节点 + if(!packCont[0]){ + //若开启连接线,更改图标样式 + if(options.showLine){ + elemMain.find('.'+ICON_CLICK).addClass('layui-tree-icon'); + elemMain.find('.'+ICON_CLICK).children('.layui-icon').addClass(ICON_ADD).removeClass('layui-icon-file'); + //若未开启连接线,显示箭头 + }else{ + elemMain.find('.layui-tree-iconArrow').removeClass(HIDE); + }; + //节点添加子节点容器 + elem.append('
            '); + }; + + //新增节点 + var key = options.operate && options.operate(returnObj) + ,obj = {}; + obj.title = options.text.defaultNodeName; + obj.id = key; + that.tree(elem.children('.'+ELEM_PACK), [obj]); + + //放在新增后面,因为要对元素进行操作 + if(options.showLine){ + //节点本身无子节点 + if(!packCont[0]){ + //遍历兄弟节点,判断兄弟节点是否有子节点 + var siblings = elem.siblings('.'+ELEM_SET), num = 1 + ,parentPack = elem.parent('.'+ELEM_PACK); + layui.each(siblings, function(index, i){ + if(!$(i).children('.'+ELEM_PACK)[0]){ + num = 0; + }; + }); + + //若兄弟节点都有子节点 + if(num == 1){ + //兄弟节点添加连接线 + siblings.children('.'+ELEM_PACK).addClass(ELEM_SHOW); + siblings.children('.'+ELEM_PACK).children('.'+ELEM_SET).removeClass(ELEM_LINE_SHORT); + elem.children('.'+ELEM_PACK).addClass(ELEM_SHOW); + //父级移除延伸线 + parentPack.removeClass(ELEM_EXTEND); + //同层节点最后一个更改线的状态 + parentPack.children('.'+ELEM_SET).last().children('.'+ELEM_PACK).children('.'+ELEM_SET).last().addClass(ELEM_LINE_SHORT); + }else{ + elem.children('.'+ELEM_PACK).children('.'+ELEM_SET).addClass(ELEM_LINE_SHORT); + }; + }else{ + //添加延伸线 + if(!packCont.hasClass(ELEM_EXTEND)){ + packCont.addClass(ELEM_EXTEND); + }; + //子节点添加延伸线 + elem.find('.'+ELEM_PACK).each(function(){ + $(this).children('.'+ELEM_SET).last().addClass(ELEM_LINE_SHORT); + }); + //如果前一个节点有延伸线 + if(packCont.children('.'+ELEM_SET).last().prev().hasClass(ELEM_LINE_SHORT)){ + packCont.children('.'+ELEM_SET).last().prev().removeClass(ELEM_LINE_SHORT); + }else{ + //若之前的没有,说明处于连接状态 + packCont.children('.'+ELEM_SET).last().removeClass(ELEM_LINE_SHORT); + }; + //若是最外层,要始终保持相连的状态 + if(!elem.parent('.'+ELEM_PACK)[0] && elem.next()[0]){ + packCont.children('.'+ELEM_SET).last().removeClass(ELEM_LINE_SHORT); + }; + }; + }; + if(!options.showCheckbox) return; + //若开启复选框,同步新增节点状态 + if(elemMain.find('input[same="layuiTreeCheck"]')[0].checked){ + var packLast = elem.children('.'+ELEM_PACK).children('.'+ELEM_SET).last(); + packLast.find('input[same="layuiTreeCheck"]')[0].checked = true; + }; + that.renderForm('checkbox'); + + //修改 + }else if(type == 'update'){ + var text = elemMain.children('.'+ ELEM_TEXT).html(); + elemMain.children('.'+ ELEM_TEXT).html(''); + //添加输入框,覆盖在文字上方 + elemMain.append(''); + //获取焦点 + elemMain.children('.layui-tree-editInput').val(text).focus(); + //嵌入文字移除输入框 + var getVal = function(input){ + var textNew = input.val().trim(); + textNew = textNew ? textNew : options.text.defaultNodeName; + input.remove(); + elemMain.children('.'+ ELEM_TEXT).html(textNew); + + //同步数据 + returnObj.data.title = textNew; + + //节点修改的回调 + options.operate && options.operate(returnObj); + }; + //失去焦点 + elemMain.children('.layui-tree-editInput').blur(function(){ + getVal($(this)); + }); + //回车 + elemMain.children('.layui-tree-editInput').on('keydown', function(e){ + if(e.keyCode === 13){ + e.preventDefault(); + getVal($(this)); + }; + }); + + //删除 + } else { + layer.confirm('确认删除该节点 "'+ (item.title || '') +'" 吗?', function(index){ + options.operate && options.operate(returnObj); //节点删除的回调 + returnObj.status = 'remove'; //标注节点删除 + + layer.close(index); + + //若删除最后一个,显示空数据提示 + if(!elem.prev('.'+ELEM_SET)[0] && !elem.next('.'+ELEM_SET)[0] && !elem.parent('.'+ELEM_PACK)[0]){ + elem.remove(); + that.elem.append(that.elemNone); + return; + }; + //若有兄弟节点 + if(elem.siblings('.'+ELEM_SET).children('.'+ELEM_ENTRY)[0]){ + //若开启复选框 + if(options.showCheckbox){ + //若开启复选框,进行下步操作 + var elemDel = function(elem){ + //若无父结点,则不执行 + if(!elem.parents('.'+ELEM_SET)[0]) return; + var siblingTree = elem.siblings('.'+ELEM_SET).children('.'+ELEM_ENTRY) + ,parentTree = elem.parent('.'+ELEM_PACK).prev() + ,checkState = parentTree.find('input[same="layuiTreeCheck"]')[0] + ,state = 1, num = 0; + //若父节点未勾选 + if(checkState.checked == false){ + //遍历兄弟节点 + siblingTree.each(function(i, item1){ + var input = $(item1).find('input[same="layuiTreeCheck"]')[0] + if(input.checked == false && !input.disabled){ + state = 0; + }; + //判断是否全为不可勾选框 + if(!input.disabled){ + num = 1; + }; + }); + //若有可勾选选择框并且已勾选 + if(state == 1 && num == 1){ + //勾选父节点 + checkState.checked = true; + that.renderForm('checkbox'); + //向上遍历祖先节点 + elemDel(parentTree.parent('.'+ELEM_SET)); + }; + }; + }; + elemDel(elem); + }; + //若开启连接线 + if(options.showLine){ + //遍历兄弟节点,判断兄弟节点是否有子节点 + var siblings = elem.siblings('.'+ELEM_SET), num = 1 + ,parentPack = elem.parent('.'+ELEM_PACK); + layui.each(siblings, function(index, i){ + if(!$(i).children('.'+ELEM_PACK)[0]){ + num = 0; + }; + }); + //若兄弟节点都有子节点 + if(num == 1){ + //若节点本身无子节点 + if(!packCont[0]){ + //父级去除延伸线,因为此时子节点里没有空节点 + parentPack.removeClass(ELEM_EXTEND); + siblings.children('.'+ELEM_PACK).addClass(ELEM_SHOW); + siblings.children('.'+ELEM_PACK).children('.'+ELEM_SET).removeClass(ELEM_LINE_SHORT); + }; + //若为最后一个节点 + if(!elem.next()[0]){ + elem.prev().children('.'+ELEM_PACK).children('.'+ELEM_SET).last().addClass(ELEM_LINE_SHORT); + }else{ + parentPack.children('.'+ELEM_SET).last().children('.'+ELEM_PACK).children('.'+ELEM_SET).last().addClass(ELEM_LINE_SHORT); + }; + //若为最外层最后一个节点,去除前一个结点的连接线 + if(!elem.next()[0] && !elem.parents('.'+ELEM_SET)[1] && !elem.parents('.'+ELEM_SET).eq(0).next()[0]){ + elem.prev('.'+ELEM_SET).addClass(ELEM_LINE_SHORT); + }; + }else{ + //若为最后一个节点且有延伸线 + if(!elem.next()[0] && elem.hasClass(ELEM_LINE_SHORT)){ + elem.prev().addClass(ELEM_LINE_SHORT); + }; + }; + }; + + }else{ + //若无兄弟节点 + var prevDiv = elem.parent('.'+ELEM_PACK).prev(); + //若开启了连接线 + if(options.showLine){ + prevDiv.find('.'+ICON_CLICK).removeClass('layui-tree-icon'); + prevDiv.find('.'+ICON_CLICK).children('.layui-icon').removeClass(ICON_SUB).addClass('layui-icon-file'); + //父节点所在层添加延伸线 + var pare = prevDiv.parents('.'+ELEM_PACK).eq(0); + pare.addClass(ELEM_EXTEND); + + //兄弟节点最后子节点添加延伸线 + pare.children('.'+ELEM_SET).each(function(){ + $(this).children('.'+ELEM_PACK).children('.'+ELEM_SET).last().addClass(ELEM_LINE_SHORT); + }); + }else{ + //父节点隐藏箭头 + prevDiv.find('.layui-tree-iconArrow').addClass(HIDE); + }; + //移除展开属性 + elem.parents('.'+ELEM_SET).eq(0).removeClass(ELEM_SPREAD); + //移除节点容器 + elem.parent('.'+ELEM_PACK).remove(); + }; + + elem.remove(); + }); + + }; + }); + }; + + //部分事件 + Class.prototype.events = function(){ + var that = this + ,options = that.config + ,checkWarp = that.elem.find('.layui-tree-checkedFirst'); + + //初始选中 + that.setChecked(that.checkids); + + //搜索 + that.elem.find('.layui-tree-search').on('keyup', function(){ + var input = $(this) + ,val = input.val() + ,pack = input.nextAll() + ,arr = []; + + //遍历所有的值 + pack.find('.'+ ELEM_TEXT).each(function(){ + var entry = $(this).parents('.'+ELEM_ENTRY); + //若值匹配,加一个类以作标识 + if($(this).html().indexOf(val) != -1){ + arr.push($(this).parent()); + + var select = function(div){ + div.addClass('layui-tree-searchShow'); + //向上父节点渲染 + if(div.parent('.'+ELEM_PACK)[0]){ + select(div.parent('.'+ELEM_PACK).parent('.'+ELEM_SET)); + }; + }; + select(entry.parent('.'+ELEM_SET)); + }; + }); + + //根据标志剔除 + pack.find('.'+ELEM_ENTRY).each(function(){ + var parent = $(this).parent('.'+ELEM_SET); + if(!parent.hasClass('layui-tree-searchShow')){ + parent.addClass(HIDE); + }; + }); + if(pack.find('.layui-tree-searchShow').length == 0){ + that.elem.append(that.elemNone); + }; + + //节点过滤的回调 + options.onsearch && options.onsearch({ + elem: arr + }); + }); + + //还原搜索初始状态 + that.elem.find('.layui-tree-search').on('keydown', function(){ + $(this).nextAll().find('.'+ELEM_ENTRY).each(function(){ + var parent = $(this).parent('.'+ELEM_SET); + parent.removeClass('layui-tree-searchShow '+ HIDE); + }); + if($('.layui-tree-emptyText')[0]) $('.layui-tree-emptyText').remove(); + }); + }; + + //得到选中节点 + Class.prototype.getChecked = function(){ + var that = this + ,options = that.config + ,checkId = [] + ,checkData = []; + + //遍历节点找到选中索引 + that.elem.find('.layui-form-checked').each(function(){ + checkId.push($(this).prev()[0].value); + }); + + //遍历节点 + var eachNodes = function(data, checkNode){ + layui.each(data, function(index, item){ + layui.each(checkId, function(index2, item2){ + if(item.id == item2){ + var cloneItem = $.extend({}, item); + delete cloneItem.children; + + checkNode.push(cloneItem); + + if(item.children){ + cloneItem.children = []; + eachNodes(item.children, cloneItem.children); + } + return true + } + }); + }); + }; + + eachNodes($.extend({}, options.data), checkData); + + return checkData; + }; + + //设置选中节点 + Class.prototype.setChecked = function(checkedId){ + var that = this + ,options = that.config; + + //初始选中 + that.elem.find('.'+ELEM_SET).each(function(i, item){ + var thisId = $(this).data('id') + ,input = $(item).children('.'+ELEM_ENTRY).find('input[same="layuiTreeCheck"]') + ,reInput = input.next(); + + //若返回数字 + if(typeof checkedId === 'number'){ + if(thisId == checkedId){ + if(!input[0].checked){ + reInput.click(); + }; + return false; + }; + } + //若返回数组 + else if(typeof checkedId === 'object'){ + layui.each(checkedId, function(index, value){ + if(value == thisId && !input[0].checked){ + reInput.click(); + return true; + } + }); + }; + }); + }; + + //记录所有实例 + thisModule.that = {}; //记录所有实例对象 + thisModule.config = {}; //记录所有实例配置项 + + //重载实例 + tree.reload = function(id, options){ + var that = thisModule.that[id]; + that.reload(options); + + return thisModule.call(that); + }; + + //获得选中的节点数据 + tree.getChecked = function(id){ + var that = thisModule.that[id]; + return that.getChecked(); + }; + + //设置选中节点 + tree.setChecked = function(id, checkedId){ + var that = thisModule.that[id]; + return that.setChecked(checkedId); + }; + + //核心入口 + tree.render = function(options){ + var inst = new Class(options); + return thisModule.call(inst); + }; + + exports(MOD_NAME, tree); +}) \ No newline at end of file diff --git a/IoTGateway/wwwroot/layui/lay/modules/upload.js b/IoTGateway/wwwroot/layui/lay/modules/upload.js new file mode 100644 index 0000000..14097a6 --- /dev/null +++ b/IoTGateway/wwwroot/layui/lay/modules/upload.js @@ -0,0 +1,565 @@ +/** + + @Title: upload 文件上传组件 + @License:MIT + + */ + +layui.define('layer' , function(exports){ + "use strict"; + + var $ = layui.$ + ,layer = layui.layer + ,hint = layui.hint() + ,device = layui.device() + + //外部接口 + ,upload = { + config: {} //全局配置项 + + //设置全局项 + ,set: function(options){ + var that = this; + that.config = $.extend({}, that.config, options); + return that; + } + + //事件 + ,on: function(events, callback){ + return layui.onevent.call(this, MOD_NAME, events, callback); + } + } + + //操作当前实例 + ,thisUpload = function(){ + var that = this; + return { + upload: function(files){ + that.upload.call(that, files); + } + ,reload: function(options){ + that.reload.call(that, options); + } + ,config: that.config + } + } + + //字符常量 + ,MOD_NAME = 'upload', ELEM = '.layui-upload', THIS = 'layui-this', SHOW = 'layui-show', HIDE = 'layui-hide', DISABLED = 'layui-disabled' + + ,ELEM_FILE = 'layui-upload-file', ELEM_FORM = 'layui-upload-form', ELEM_IFRAME = 'layui-upload-iframe', ELEM_CHOOSE = 'layui-upload-choose', ELEM_DRAG = 'layui-upload-drag' + + + //构造器 + ,Class = function(options){ + var that = this; + that.config = $.extend({}, that.config, upload.config, options); + that.render(); + }; + + //默认配置 + Class.prototype.config = { + accept: 'images' //允许上传的文件类型:images/file/video/audio + ,exts: '' //允许上传的文件后缀名 + ,auto: true //是否选完文件后自动上传 + ,bindAction: '' //手动上传触发的元素 + ,url: '' //上传地址 + ,field: 'file' //文件字段名 + ,acceptMime: '' //筛选出的文件类型,默认为所有文件 + ,method: 'post' //请求上传的 http 类型 + ,data: {} //请求上传的额外参数 + ,drag: true //是否允许拖拽上传 + ,size: 0 //文件限制大小,默认不限制 + ,number: 0 //允许同时上传的文件数,默认不限制 + ,multiple: false //是否允许多文件上传,不支持ie8-9 + }; + + //初始渲染 + Class.prototype.render = function(options){ + var that = this + ,options = that.config; + + options.elem = $(options.elem); + options.bindAction = $(options.bindAction); + + that.file(); + that.events(); + }; + + //追加文件域 + Class.prototype.file = function(){ + var that = this + ,options = that.config + ,elemFile = that.elemFile = $([ + '' + ].join('')) + ,next = options.elem.next(); + + if(next.hasClass(ELEM_FILE) || next.hasClass(ELEM_FORM)){ + next.remove(); + } + + //包裹ie8/9容器 + if(device.ie && device.ie < 10){ + options.elem.wrap('
            '); + } + + that.isFile() ? ( + that.elemFile = options.elem + ,options.field = options.elem[0].name + ) : options.elem.after(elemFile); + + //初始化ie8/9的Form域 + if(device.ie && device.ie < 10){ + that.initIE(); + } + }; + + //ie8-9初始化 + Class.prototype.initIE = function(){ + var that = this + ,options = that.config + ,iframe = $('') + ,elemForm = $(['
            ' + ,'
            '].join('')); + + //插入iframe + $('#'+ ELEM_IFRAME)[0] || $('body').append(iframe); + + //包裹文件域 + if(!options.elem.next().hasClass(ELEM_FORM)){ + that.elemFile.wrap(elemForm); + + //追加额外的参数 + options.elem.next('.'+ ELEM_FORM).append(function(){ + var arr = []; + layui.each(options.data, function(key, value){ + value = typeof value === 'function' ? value() : value; + arr.push('') + }); + return arr.join(''); + }()); + } + }; + + //异常提示 + Class.prototype.msg = function(content){ + return layer.msg(content, { + icon: 2 + ,shift: 6 + }); + }; + + //判断绑定元素是否为文件域本身 + Class.prototype.isFile = function(){ + var elem = this.config.elem[0]; + if(!elem) return; + return elem.tagName.toLocaleLowerCase() === 'input' && elem.type === 'file' + } + + //预读图片信息 + Class.prototype.preview = function(callback){ + var that = this; + if(window.FileReader){ + layui.each(that.chooseFiles, function(index, file){ + var reader = new FileReader(); + reader.readAsDataURL(file); + reader.onload = function(){ + callback && callback(index, file, this.result); + } + }); + } + }; + + //执行上传 + Class.prototype.upload = function(files, type){ + var that = this + ,options = that.config + ,elemFile = that.elemFile[0] + + //高级浏览器处理方式,支持跨域 + ,ajaxSend = function(){ + var successful = 0, aborted = 0 + ,items = files || that.files || that.chooseFiles || elemFile.files + ,allDone = function(){ //多文件全部上传完毕的回调 + if(options.multiple && successful + aborted === that.fileLength){ + typeof options.allDone === 'function' && options.allDone({ + total: that.fileLength + ,successful: successful + ,aborted: aborted + }); + } + }; + layui.each(items, function(index, file){ + var formData = new FormData(); + + formData.append(options.field, file); + + //追加额外的参数 + layui.each(options.data, function(key, value){ + value = typeof value === 'function' ? value() : value; + formData.append(key, value); + }); + + //提交文件 + var opts = { + url: options.url + ,type: 'post' //统一采用 post 上传 + ,data: formData + ,contentType: false + ,processData: false + ,dataType: 'json' + ,headers: options.headers || {} + //成功回调 + ,success: function(res){ + successful++; + done(index, res); + allDone(); + } + //异常回调 + ,error: function(){ + aborted++; + that.msg('请求上传接口出现异常'); + error(index); + allDone(); + } + }; + //进度条 + if(typeof options.progress === 'function'){ + opts.xhr = function(){ + var xhr = $.ajaxSettings.xhr(); + //上传进度 + xhr.upload.addEventListener("progress", function (e) { + if(e.lengthComputable) { + var percent = Math.floor((e.loaded/e.total)* 100); //百分比 + options.progress(percent, options.item[0], e); + } + }); + return xhr; + } + } + $.ajax(opts); + }); + } + + //低版本IE处理方式,不支持跨域 + ,iframeSend = function(){ + var iframe = $('#'+ ELEM_IFRAME); + + that.elemFile.parent().submit(); + + //获取响应信息 + clearInterval(Class.timer); + Class.timer = setInterval(function() { + var res, iframeBody = iframe.contents().find('body'); + try { + res = iframeBody.text(); + } catch(e) { + that.msg('获取上传后的响应信息出现异常'); + clearInterval(Class.timer); + error(); + } + if(res){ + clearInterval(Class.timer); + iframeBody.html(''); + done(0, res); + } + }, 30); + } + + //统一回调 + ,done = function(index, res){ + that.elemFile.next('.'+ ELEM_CHOOSE).remove(); + elemFile.value = ''; + if(typeof res !== 'object'){ + try { + res = JSON.parse(res); + } catch(e){ + res = {}; + return that.msg('请对上传接口返回有效JSON'); + } + } + typeof options.done === 'function' && options.done(res, index || 0, function(files){ + that.upload(files); + }); + } + + //统一网络异常回调 + ,error = function(index){ + if(options.auto){ + elemFile.value = ''; + } + typeof options.error === 'function' && options.error(index || 0, function(files){ + that.upload(files); + }); + } + + ,exts = options.exts + ,check ,value = function(){ + var arr = []; + layui.each(files || that.chooseFiles, function(i, item){ + arr.push(item.name); + }); + return arr; + }() + + //回调返回的参数 + ,args = { + //预览 + preview: function(callback){ + that.preview(callback); + } + //上传 + ,upload: function(index, file){ + var thisFile = {}; + thisFile[index] = file; + that.upload(thisFile); + } + //追加文件到队列 + ,pushFile: function(){ + that.files = that.files || {}; + layui.each(that.chooseFiles, function(index, item){ + that.files[index] = item; + }); + return that.files; + } + //重置文件 + ,resetFile: function(index, file, filename){ + var newFile = new File([file], filename); + that.files = that.files || {}; + that.files[index] = newFile; + } + } + + //提交上传 + ,send = function(){ + //选择文件的回调 + if(type === 'choose' || options.auto){ + options.choose && options.choose(args); + if(type === 'choose'){ + return; + } + } + + //上传前的回调 + options.before && options.before(args); + + //IE兼容处理 + if(device.ie){ + return device.ie > 9 ? ajaxSend() : iframeSend(); + } + + ajaxSend(); + } + + //校验文件格式 + value = value.length === 0 + ? ((elemFile.value.match(/[^\/\\]+\..+/g)||[]) || '') + : value; + + if(value.length === 0) return; + + switch(options.accept){ + case 'file': //一般文件 + if(exts && !RegExp('\\w\\.('+ exts +')$', 'i').test(escape(value))){ + that.msg('选择的文件中包含不支持的格式'); + return elemFile.value = ''; + } + break; + case 'video': //视频文件 + if(!RegExp('\\w\\.('+ (exts || 'avi|mp4|wma|rmvb|rm|flash|3gp|flv') +')$', 'i').test(escape(value))){ + that.msg('选择的视频中包含不支持的格式'); + return elemFile.value = ''; + } + break; + case 'audio': //音频文件 + if(!RegExp('\\w\\.('+ (exts || 'mp3|wav|mid') +')$', 'i').test(escape(value))){ + that.msg('选择的音频中包含不支持的格式'); + return elemFile.value = ''; + } + break; + default: //图片文件 + layui.each(value, function(i, item){ + if(!RegExp('\\w\\.('+ (exts || 'jpg|png|gif|bmp|jpeg$') +')', 'i').test(escape(item))){ + check = true; + } + }); + if(check){ + that.msg('选择的图片中包含不支持的格式'); + return elemFile.value = ''; + } + break; + } + + //检验文件数量 + that.fileLength = function(){ + var length = 0 + ,items = files || that.files || that.chooseFiles || elemFile.files; + layui.each(items, function(){ + length++; + }); + return length; + }(); + if(options.number && that.fileLength > options.number){ + return that.msg('同时最多只能上传的数量为:'+ options.number); + } + + //检验文件大小 + if(options.size > 0 && !(device.ie && device.ie < 10)){ + var limitSize; + + layui.each(that.chooseFiles, function(index, file){ + if(file.size > 1024*options.size){ + var size = options.size/1024; + size = size >= 1 ? (size.toFixed(2) + 'MB') : options.size + 'KB' + elemFile.value = ''; + limitSize = size; + } + }); + if(limitSize) return that.msg('文件不能超过'+ limitSize); + } + send(); + }; + + //重置方法 + Class.prototype.reload = function(options){ + options = options || {}; + delete options.elem; + delete options.bindAction; + + var that = this + ,options = that.config = $.extend({}, that.config, upload.config, options) + ,next = options.elem.next(); + + //更新文件域相关属性 + next.attr({ + name: options.name + ,accept: options.acceptMime + ,multiple: options.multiple + }); + }; + + //事件处理 + Class.prototype.events = function(){ + var that = this + ,options = that.config + + //设置当前选择的文件队列 + ,setChooseFile = function(files){ + that.chooseFiles = {}; + layui.each(files, function(i, item){ + var time = new Date().getTime(); + that.chooseFiles[time + '-' + i] = item; + }); + } + + //设置选择的文本 + ,setChooseText = function(files, filename){ + var elemFile = that.elemFile + ,value = files.length > 1 + ? files.length + '个文件' + : ((files[0] || {}).name || (elemFile[0].value.match(/[^\/\\]+\..+/g)||[]) || ''); + + if(elemFile.next().hasClass(ELEM_CHOOSE)){ + elemFile.next().remove(); + } + that.upload(null, 'choose'); + if(that.isFile() || options.choose) return; + elemFile.after(''+ value +''); + }; + + //点击上传容器 + options.elem.off('upload.start').on('upload.start', function(){ + var othis = $(this), data = othis.attr('lay-data'); + + if(data){ + try{ + data = new Function('return '+ data)(); + that.config = $.extend({}, options, data); + } catch(e){ + hint.error('Upload element property lay-data configuration item has a syntax error: ' + data) + } + } + + that.config.item = othis; + that.elemFile[0].click(); + }); + + //拖拽上传 + if(!(device.ie && device.ie < 10)){ + options.elem.off('upload.over').on('upload.over', function(){ + var othis = $(this) + othis.attr('lay-over', ''); + }) + .off('upload.leave').on('upload.leave', function(){ + var othis = $(this) + othis.removeAttr('lay-over'); + }) + .off('upload.drop').on('upload.drop', function(e, param){ + var othis = $(this), files = param.originalEvent.dataTransfer.files || []; + + othis.removeAttr('lay-over'); + setChooseFile(files); + + if(options.auto){ + that.upload(files); + } else { + setChooseText(files); + } + }); + } + + //文件选择 + that.elemFile.off('upload.change').on('upload.change', function(){ + var files = this.files || []; + setChooseFile(files); + options.auto ? that.upload() : setChooseText(files); //是否自动触发上传 + }); + + //手动触发上传 + options.bindAction.off('upload.action').on('upload.action', function(){ + that.upload(); + }); + + //防止事件重复绑定 + if(options.elem.data('haveEvents')) return; + + that.elemFile.on('change', function(){ + $(this).trigger('upload.change'); + }); + + options.elem.on('click', function(){ + if(that.isFile()) return; + $(this).trigger('upload.start'); + }); + + if(options.drag){ + options.elem.on('dragover', function(e){ + e.preventDefault(); + $(this).trigger('upload.over'); + }).on('dragleave', function(e){ + $(this).trigger('upload.leave'); + }).on('drop', function(e){ + e.preventDefault(); + $(this).trigger('upload.drop', e); + }); + } + + options.bindAction.on('click', function(){ + $(this).trigger('upload.action'); + }); + + options.elem.data('haveEvents', true); + }; + + //核心入口 + upload.render = function(options){ + var inst = new Class(options); + return thisUpload.call(inst); + }; + + exports(MOD_NAME, upload); +}); + diff --git a/IoTGateway/wwwroot/layui/lay/modules/util.js b/IoTGateway/wwwroot/layui/lay/modules/util.js new file mode 100644 index 0000000..10eb3ed --- /dev/null +++ b/IoTGateway/wwwroot/layui/lay/modules/util.js @@ -0,0 +1,213 @@ +/** + + @Name:util 工具集组件 + @License:MIT + +*/ + +layui.define('jquery', function(exports){ + "use strict"; + + var $ = layui.$ + + //外部接口 + ,util = { + //固定块 + fixbar: function(options){ + var ELEM = 'layui-fixbar', TOP_BAR = 'layui-fixbar-top' + ,dom = $(document), body = $('body') + ,is, timer; + + options = $.extend({ + showHeight: 200 //出现TOP的滚动条高度临界值 + }, options); + + options.bar1 = options.bar1 === true ? '' : options.bar1; + options.bar2 = options.bar2 === true ? '' : options.bar2; + options.bgcolor = options.bgcolor ? ('background-color:' + options.bgcolor) : ''; + + var icon = [options.bar1, options.bar2, ''] //图标:信息、问号、TOP + ,elem = $(['
              ' + ,options.bar1 ? '
            • '+ icon[0] +'
            • ' : '' + ,options.bar2 ? '
            • '+ icon[1] +'
            • ' : '' + ,'
            • '+ icon[2] +'
            • ' + ,'
            '].join('')) + ,topBar = elem.find('.'+TOP_BAR) + ,scroll = function(){ + var stop = dom.scrollTop(); + if(stop >= (options.showHeight)){ + is || (topBar.show(), is = 1); + } else { + is && (topBar.hide(), is = 0); + } + }; + if($('.'+ ELEM)[0]) return; + + typeof options.css === 'object' && elem.css(options.css); + body.append(elem), scroll(); + + //bar点击事件 + elem.find('li').on('click', function(){ + var othis = $(this), type = othis.attr('lay-type'); + if(type === 'top'){ + $('html,body').animate({ + scrollTop : 0 + }, 200); + } + options.click && options.click.call(this, type); + }); + + //Top显示控制 + dom.on('scroll', function(){ + clearTimeout(timer); + timer = setTimeout(function(){ + scroll(); + }, 100); + }); + } + + //倒计时 + ,countdown: function(endTime, serverTime, callback){ + var that = this + ,type = typeof serverTime === 'function' + ,end = new Date(endTime).getTime() + ,now = new Date((!serverTime || type) ? new Date().getTime() : serverTime).getTime() + ,count = end - now + ,time = [ + Math.floor(count/(1000*60*60*24)) //天 + ,Math.floor(count/(1000*60*60)) % 24 //时 + ,Math.floor(count/(1000*60)) % 60 //分 + ,Math.floor(count/1000) % 60 //秒 + ]; + + if(type) callback = serverTime; + + var timer = setTimeout(function(){ + that.countdown(endTime, now + 1000, callback); + }, 1000); + + callback && callback(count > 0 ? time : [0,0,0,0], serverTime, timer); + + if(count <= 0) clearTimeout(timer); + return timer; + } + + //某个时间在当前时间的多久前 + ,timeAgo: function(time, onlyDate){ + var that = this + ,arr = [[], []] + ,stamp = new Date().getTime() - new Date(time).getTime(); + + //返回具体日期 + if(stamp > 1000*60*60*24*31){ + stamp = new Date(time); + arr[0][0] = that.digit(stamp.getFullYear(), 4); + arr[0][1] = that.digit(stamp.getMonth() + 1); + arr[0][2] = that.digit(stamp.getDate()); + + //是否输出时间 + if(!onlyDate){ + arr[1][0] = that.digit(stamp.getHours()); + arr[1][1] = that.digit(stamp.getMinutes()); + arr[1][2] = that.digit(stamp.getSeconds()); + } + return arr[0].join('-') + ' ' + arr[1].join(':'); + } + + //30天以内,返回“多久前” + if(stamp >= 1000*60*60*24){ + return ((stamp/1000/60/60/24)|0) + '天前'; + } else if(stamp >= 1000*60*60){ + return ((stamp/1000/60/60)|0) + '小时前'; + } else if(stamp >= 1000*60*3){ //3分钟以内为:刚刚 + return ((stamp/1000/60)|0) + '分钟前'; + } else if(stamp < 0){ + return '未来'; + } else { + return '刚刚'; + } + } + + //数字前置补零 + ,digit: function(num, length){ + var str = ''; + num = String(num); + length = length || 2; + for(var i = num.length; i < length; i++){ + str += '0'; + } + return num < Math.pow(10, length) ? str + (num|0) : num; + } + + //转化为日期格式字符 + ,toDateString: function(time, format){ + var that = this + ,date = new Date(time || new Date()) + ,ymd = [ + that.digit(date.getFullYear(), 4) + ,that.digit(date.getMonth() + 1) + ,that.digit(date.getDate()) + ] + ,hms = [ + that.digit(date.getHours()) + ,that.digit(date.getMinutes()) + ,that.digit(date.getSeconds()) + ]; + + format = format || 'yyyy-MM-dd HH:mm:ss'; + + return format.replace(/yyyy/g, ymd[0]) + .replace(/MM/g, ymd[1]) + .replace(/dd/g, ymd[2]) + .replace(/HH/g, hms[0]) + .replace(/mm/g, hms[1]) + .replace(/ss/g, hms[2]); + } + + //防 xss 攻击 + ,escape: function(html){ + return String(html || '').replace(/&(?!#?[a-zA-Z0-9]+;)/g, '&') + .replace(//g, '>') + .replace(/'/g, ''').replace(/"/g, '"'); + } + + ,unescape: function(str){ + return String(str || '').replace(/\&/g, '&') + .replace(/\</g, '<').replace(/\>/g, '>') + .replace(/\'/, '\'').replace(/\"/, '"'); + } + + //批量事件 + ,event: function(attr, obj, eventType){ + var _body = $('body'); + eventType = eventType || 'click'; + + //记录事件回调集合 + obj = util.event[attr] = $.extend(true, util.event[attr], obj) || {}; + + //清除委托事件 + util.event.UTIL_EVENT_CALLBACK = util.event.UTIL_EVENT_CALLBACK || {}; + _body.off(eventType, '*['+ attr +']', util.event.UTIL_EVENT_CALLBACK[attr]) + + //绑定委托事件 + util.event.UTIL_EVENT_CALLBACK[attr] = function(){ + var othis = $(this) + ,key = othis.attr(attr); + (typeof obj[key] === 'function') && obj[key].call(this, othis); + }; + + //清除旧事件,绑定新事件 + _body.on(eventType, '*['+ attr +']', util.event.UTIL_EVENT_CALLBACK[attr]); + + return obj; + } + }; + + // DOM 尺寸变化,该创意来自:http://benalman.com/projects/jquery-resize-plugin/ + /* + !function(a,b,c){"$:nomunge";function l(){f=b[g](function(){d.each(function(){var b=a(this),c=b.width(),d=b.height(),e=a.data(this,i);(c!==e.w||d!==e.h)&&b.trigger(h,[e.w=c,e.h=d])}),l()},e[j])}var f,d=a([]),e=a.resize=a.extend(a.resize,{}),g="setTimeout",h="resize",i=h+"-special-event",j="delay",k="throttleWindow";e[j]=250,e[k]=!0,a.event.special[h]={setup:function(){if(!e[k]&&this[g])return!1;var b=a(this);d=d.add(b),a.data(this,i,{w:b.width(),h:b.height()}),1===d.length&&l()},teardown:function(){if(!e[k]&&this[g])return!1;var b=a(this);d=d.not(b),b.removeData(i),d.length||clearTimeout(f)},add:function(b){function f(b,e,f){var g=a(this),h=a.data(this,i)||{};h.w=e!==c?e:g.width(),h.h=f!==c?f:g.height(),d.apply(this,arguments)}if(!e[k]&&this[g])return!1;var d;return a.isFunction(b)?(d=b,f):(d=b.handler,b.handler=f,void 0)}}}($,window); + */ + + //暴露接口 + exports('util', util); +}); \ No newline at end of file diff --git a/IoTGateway/wwwroot/layui/layui.js b/IoTGateway/wwwroot/layui/layui.js new file mode 100644 index 0000000..acfa3c7 --- /dev/null +++ b/IoTGateway/wwwroot/layui/layui.js @@ -0,0 +1,644 @@ +/*! + + @Name: layui + @Description:Classic modular front-end UI framework + @License:MIT + + */ + +;!function(win){ + "use strict"; + + var doc = document, config = { + modules: {} //记录模块物理路径 + ,status: {} //记录模块加载状态 + ,timeout: 10 //符合规范的模块请求最长等待秒数 + ,event: {} //记录模块自定义事件 + } + + ,Layui = function(){ + this.v = '2.6.3'; //版本号 + } + + //获取layui所在目录 + ,getPath = function(){ + var jsPath = doc.currentScript ? doc.currentScript.src : function(){ + var js = doc.scripts + ,last = js.length - 1 + ,src; + for(var i = last; i > 0; i--){ + if(js[i].readyState === 'interactive'){ + src = js[i].src; + break; + } + } + return src || js[last].src; + }(); + return jsPath.substring(0, jsPath.lastIndexOf('/') + 1); + }() + + //异常提示 + ,error = function(msg, type){ + type = type || 'log'; + win.console && console[type] && console[type]('layui error hint: ' + msg); + } + + ,isOpera = typeof opera !== 'undefined' && opera.toString() === '[object Opera]' + + //内置模块 + ,modules = config.builtin = { + lay: 'lay' //基础 DOM 操作 + ,layer: 'layer' //弹层 + ,laydate: 'laydate' //日期 + ,laypage: 'laypage' //分页 + ,laytpl: 'laytpl' //模板引擎 + ,layedit: 'layedit' //富文本编辑器 + ,form: 'form' //表单集 + ,upload: 'upload' //上传 + ,dropdown: 'dropdown' //下拉菜单 + ,transfer: 'transfer' //穿梭框 + ,tree: 'tree' //树结构 + ,table: 'table' //表格 + ,element: 'element' //常用元素操作 + ,rate: 'rate' //评分组件 + ,colorpicker: 'colorpicker' //颜色选择器 + ,slider: 'slider' //滑块 + ,carousel: 'carousel' //轮播 + ,flow: 'flow' //流加载 + ,util: 'util' //工具块 + ,code: 'code' //代码修饰器 + ,jquery: 'jquery' //DOM 库(第三方) + + ,all: 'all' + ,'layui.all': 'layui.all' //聚合标识(功能性的,非真实模块) + }; + + //记录基础数据 + Layui.prototype.cache = config; + + //定义模块 + Layui.prototype.define = function(deps, factory){ + var that = this + ,type = typeof deps === 'function' + ,callback = function(){ + var setApp = function(app, exports){ + layui[app] = exports; + config.status[app] = true; + }; + typeof factory === 'function' && factory(function(app, exports){ + setApp(app, exports); + config.callback[app] = function(){ + factory(setApp); + } + }); + return this; + }; + + type && ( + factory = deps, + deps = [] + ); + + that.use(deps, callback); + return that; + }; + + //使用特定模块 + Layui.prototype.use = function(apps, callback, exports){ + var that = this + ,dir = config.dir = config.dir ? config.dir : getPath + ,head = doc.getElementsByTagName('head')[0]; + + apps = function(){ + if(typeof apps === 'string'){ + return [apps]; + } + //当第一个参数为 function 时,则自动加载所有内置模块,且执行的回调即为该 function 参数; + else if(typeof apps === 'function'){ + callback = apps; + return ['all']; + } + return apps; + }(); + + //如果页面已经存在 jQuery 1.7+ 库且所定义的模块依赖 jQuery,则不加载内部 jquery 模块 + /* + if(window.jQuery && jQuery.fn.on){ + that.each(apps, function(index, item){ + if(item === 'jquery'){ + apps.splice(index, 1); + } + }); + layui.jquery = layui.$ = jQuery; + } + */ + + var item = apps[0] + ,timeout = 0; + exports = exports || []; + + //静态资源host + config.host = config.host || (dir.match(/\/\/([\s\S]+?)\//)||['//'+ location.host +'/'])[0]; + + //加载完毕 + function onScriptLoad(e, url){ + var readyRegExp = navigator.platform === 'PLaySTATION 3' ? /^complete$/ : /^(complete|loaded)$/ + if (e.type === 'load' || (readyRegExp.test((e.currentTarget || e.srcElement).readyState))) { + config.modules[item] = url; + head.removeChild(node); + (function poll() { + if(++timeout > config.timeout * 1000 / 4){ + return error(item + ' is not a valid module', 'error'); + }; + config.status[item] ? onCallback() : setTimeout(poll, 4); + }()); + } + } + + //回调 + function onCallback(){ + exports.push(layui[item]); + apps.length > 1 ? + that.use(apps.slice(1), callback, exports) + : ( typeof callback === 'function' && function(){ + //保证文档加载完毕再执行回调 + if(layui.jquery && typeof layui.jquery === 'function'){ + return layui.jquery(function(){ + callback.apply(layui, exports); + }); + } + callback.apply(layui, exports); + }() ); + } + + //如果引入了聚合板,内置的模块则不必重复加载 + if( apps.length === 0 || (layui['layui.all'] && modules[item]) ){ + return onCallback(), that; + } + + //获取加载的模块 URL + //如果是内置模块,则按照 dir 参数拼接模块路径 + //如果是扩展模块,则判断模块路径值是否为 {/} 开头, + //如果路径值是 {/} 开头,则模块路径即为后面紧跟的字符。 + //否则,则按照 base 参数拼接模块路径 + + var url = ( modules[item] ? (dir + 'lay/modules/') + : (/^\{\/\}/.test(that.modules[item]) ? '' : (config.base || '')) + ) + (that.modules[item] || item) + '.js'; + url = url.replace(/^\{\/\}/, ''); + + //如果扩展模块(即:非内置模块)对象已经存在,则不必再加载 + if(!config.modules[item] && layui[item]){ + config.modules[item] = url; //并记录起该扩展模块的 url + } + + //首次加载模块 + if(!config.modules[item]){ + var node = doc.createElement('script'); + + node.async = true; + node.charset = 'utf-8'; + node.src = url + function(){ + var version = config.version === true + ? (config.v || (new Date()).getTime()) + : (config.version||''); + return version ? ('?v=' + version) : ''; + }(); + + head.appendChild(node); + + if(node.attachEvent && !(node.attachEvent.toString && node.attachEvent.toString().indexOf('[native code') < 0) && !isOpera){ + node.attachEvent('onreadystatechange', function(e){ + onScriptLoad(e, url); + }); + } else { + node.addEventListener('load', function(e){ + onScriptLoad(e, url); + }, false); + } + + config.modules[item] = url; + } else { //缓存 + (function poll() { + if(++timeout > config.timeout * 1000 / 4){ + return error(item + ' is not a valid module', 'error'); + }; + (typeof config.modules[item] === 'string' && config.status[item]) + ? onCallback() + : setTimeout(poll, 4); + }()); + } + + return that; + }; + + //获取节点的 style 属性值 + Layui.prototype.getStyle = function(node, name){ + var style = node.currentStyle ? node.currentStyle : win.getComputedStyle(node, null); + return style[style.getPropertyValue ? 'getPropertyValue' : 'getAttribute'](name); + }; + + //css外部加载器 + Layui.prototype.link = function(href, fn, cssname){ + var that = this + ,link = doc.createElement('link') + ,head = doc.getElementsByTagName('head')[0]; + + if(typeof fn === 'string') cssname = fn; + + var app = (cssname || href).replace(/\.|\//g, '') + ,id = link.id = 'layuicss-'+ app + ,timeout = 0; + + link.rel = 'stylesheet'; + link.href = href + (config.debug ? '?v='+new Date().getTime() : ''); + link.media = 'all'; + + if(!doc.getElementById(id)){ + head.appendChild(link); + } + + if(typeof fn !== 'function') return that; + + //轮询css是否加载完毕 + (function poll() { + if(++timeout > config.timeout * 1000 / 100){ + return error(href + ' timeout'); + }; + parseInt(that.getStyle(doc.getElementById(id), 'width')) === 1989 ? function(){ + fn(); + }() : setTimeout(poll, 100); + }()); + + return that; + }; + + //存储模块的回调 + config.callback = {}; + + //重新执行模块的工厂函数 + Layui.prototype.factory = function(modName){ + if(layui[modName]){ + return typeof config.callback[modName] === 'function' + ? config.callback[modName] + : null; + } + }; + + //css内部加载器 + Layui.prototype.addcss = function(firename, fn, cssname){ + return layui.link(config.dir + 'css/' + firename, fn, cssname); + }; + + //图片预加载 + Layui.prototype.img = function(url, callback, error) { + var img = new Image(); + img.src = url; + if(img.complete){ + return callback(img); + } + img.onload = function(){ + img.onload = null; + typeof callback === 'function' && callback(img); + }; + img.onerror = function(e){ + img.onerror = null; + typeof error === 'function' && error(e); + }; + }; + + //全局配置 + Layui.prototype.config = function(options){ + options = options || {}; + for(var key in options){ + config[key] = options[key]; + } + return this; + }; + + //记录全部模块 + Layui.prototype.modules = function(){ + var clone = {}; + for(var o in modules){ + clone[o] = modules[o]; + } + return clone; + }(); + + //拓展模块 + Layui.prototype.extend = function(options){ + var that = this; + + //验证模块是否被占用 + options = options || {}; + for(var o in options){ + if(that[o] || that.modules[o]){ + error(o+ ' Module already exists', 'error'); + } else { + that.modules[o] = options[o]; + } + } + + return that; + }; + + // location.hash 路由解析 + Layui.prototype.router = function(hash){ + var that = this + ,hash = hash || location.hash + ,data = { + path: [] + ,search: {} + ,hash: (hash.match(/[^#](#.*$)/) || [])[1] || '' + }; + + if(!/^#\//.test(hash)) return data; //禁止非路由规范 + hash = hash.replace(/^#\//, ''); + data.href = '/' + hash; + hash = hash.replace(/([^#])(#.*$)/, '$1').split('/') || []; + + //提取 Hash 结构 + that.each(hash, function(index, item){ + /^\w+=/.test(item) ? function(){ + item = item.split('='); + data.search[item[0]] = item[1]; + }() : data.path.push(item); + }); + + return data; + }; + + //URL 解析 + Layui.prototype.url = function(href){ + var that = this + ,data = { + //提取 url 路径 + pathname: function(){ + var pathname = href + ? function(){ + var str = (href.match(/\.[^.]+?\/.+/) || [])[0] || ''; + return str.replace(/^[^\/]+/, '').replace(/\?.+/, ''); + }() + : location.pathname; + return pathname.replace(/^\//, '').split('/'); + }() + + //提取 url 参数 + ,search: function(){ + var obj = {} + ,search = (href + ? function(){ + var str = (href.match(/\?.+/) || [])[0] || ''; + return str.replace(/\#.+/, ''); + }() + : location.search + ).replace(/^\?+/, '').split('&'); //去除 ?,按 & 分割参数 + + //遍历分割后的参数 + that.each(search, function(index, item){ + var _index = item.indexOf('=') + ,key = function(){ //提取 key + if(_index < 0){ + return item.substr(0, item.length); + } else if(_index === 0){ + return false; + } else { + return item.substr(0, _index); + } + }(); + //提取 value + if(key){ + obj[key] = _index > 0 ? item.substr(_index + 1) : null; + } + }); + + return obj; + }() + + //提取 Hash + ,hash: that.router(function(){ + return href + ? ((href.match(/#.+/) || [])[0] || '') + : location.hash; + }()) + }; + + return data; + }; + + //本地持久性存储 + Layui.prototype.data = function(table, settings, storage){ + table = table || 'layui'; + storage = storage || localStorage; + + if(!win.JSON || !win.JSON.parse) return; + + //如果settings为null,则删除表 + if(settings === null){ + return delete storage[table]; + } + + settings = typeof settings === 'object' + ? settings + : {key: settings}; + + try{ + var data = JSON.parse(storage[table]); + } catch(e){ + var data = {}; + } + + if('value' in settings) data[settings.key] = settings.value; + if(settings.remove) delete data[settings.key]; + storage[table] = JSON.stringify(data); + + return settings.key ? data[settings.key] : data; + }; + + //本地会话性存储 + Layui.prototype.sessionData = function(table, settings){ + return this.data(table, settings, sessionStorage); + } + + //设备信息 + Layui.prototype.device = function(key){ + var agent = navigator.userAgent.toLowerCase() + + //获取版本号 + ,getVersion = function(label){ + var exp = new RegExp(label + '/([^\\s\\_\\-]+)'); + label = (agent.match(exp)||[])[1]; + return label || false; + } + + //返回结果集 + ,result = { + os: function(){ //底层操作系统 + if(/windows/.test(agent)){ + return 'windows'; + } else if(/linux/.test(agent)){ + return 'linux'; + } else if(/iphone|ipod|ipad|ios/.test(agent)){ + return 'ios'; + } else if(/mac/.test(agent)){ + return 'mac'; + } + }() + ,ie: function(){ //ie版本 + return (!!win.ActiveXObject || "ActiveXObject" in win) ? ( + (agent.match(/msie\s(\d+)/) || [])[1] || '11' //由于ie11并没有msie的标识 + ) : false; + }() + ,weixin: getVersion('micromessenger') //是否微信 + }; + + //任意的key + if(key && !result[key]){ + result[key] = getVersion(key); + } + + //移动设备 + result.android = /android/.test(agent); + result.ios = result.os === 'ios'; + result.mobile = (result.android || result.ios) ? true : false; + + return result; + }; + + //提示 + Layui.prototype.hint = function(){ + return { + error: error + } + }; + + //遍历 + Layui.prototype.each = function(obj, fn){ + var key + ,that = this; + if(typeof fn !== 'function') return that; + obj = obj || []; + if(obj.constructor === Object){ + for(key in obj){ + if(fn.call(obj[key], key, obj[key])) break; + } + } else { + for(key = 0; key < obj.length; key++){ + if(fn.call(obj[key], key, obj[key])) break; + } + } + return that; + }; + + //将数组中的对象按其某个成员排序 + Layui.prototype.sort = function(obj, key, desc){ + var clone = JSON.parse( + JSON.stringify(obj || []) + ); + + if(!key) return clone; + + //如果是数字,按大小排序,如果是非数字,按字典序排序 + clone.sort(function(o1, o2){ + var isNum = /^-?\d+$/ + ,v1 = o1[key] + ,v2 = o2[key]; + + if(isNum.test(v1)) v1 = parseFloat(v1); + if(isNum.test(v2)) v2 = parseFloat(v2); + + if(v1 && !v2){ + return 1; + } else if(!v1 && v2){ + return -1; + } + + if(v1 > v2){ + return 1; + } else if (v1 < v2) { + return -1; + } else { + return 0; + } + }); + + desc && clone.reverse(); //倒序 + return clone; + }; + + //阻止事件冒泡 + Layui.prototype.stope = function(thisEvent){ + thisEvent = thisEvent || win.event; + try { thisEvent.stopPropagation() } catch(e){ + thisEvent.cancelBubble = true; + } + }; + + //自定义模块事件 + Layui.prototype.onevent = function(modName, events, callback){ + if(typeof modName !== 'string' + || typeof callback !== 'function') return this; + + return Layui.event(modName, events, null, callback); + }; + + //执行自定义模块事件 + Layui.prototype.event = Layui.event = function(modName, events, params, fn){ + var that = this + ,result = null + ,filter = (events || '').match(/\((.*)\)$/)||[] //提取事件过滤器字符结构,如:select(xxx) + ,eventName = (modName + '.'+ events).replace(filter[0], '') //获取事件名称,如:form.select + ,filterName = filter[1] || '' //获取过滤器名称,,如:xxx + ,callback = function(_, item){ + var res = item && item.call(that, params); + res === false && result === null && (result = false); + }; + + //如果参数传入特定字符,则执行移除事件 + if(params === 'LAYUI-EVENT-REMOVE'){ + delete (that.cache.event[eventName] || {})[filterName]; + return that; + } + + //添加事件 + if(fn){ + config.event[eventName] = config.event[eventName] || {}; + + //这里不再对多次事件监听做支持,避免更多麻烦 + //config.event[eventName][filterName] ? config.event[eventName][filterName].push(fn) : + config.event[eventName][filterName] = [fn]; + return this; + } + + //执行事件回调 + layui.each(config.event[eventName], function(key, item){ + //执行当前模块的全部事件 + if(filterName === '{*}'){ + layui.each(item, callback); + return; + } + + //执行指定事件 + key === '' && layui.each(item, callback); + (filterName && key === filterName) && layui.each(item, callback); + }); + + return result; + }; + + //新增模块事件 + Layui.prototype.on = function(events, modName, callback){ + var that = this; + return that.onevent.call(that, modName, events, callback); + } + + //移除模块事件 + Layui.prototype.off = function(events, modName){ + var that = this; + return that.event.call(that, modName, events, 'LAYUI-EVENT-REMOVE'); + }; + + win.layui = new Layui(); + +}(window); + diff --git a/IoTGateway/wwwroot/layuiadmin/component/autocomplete.js b/IoTGateway/wwwroot/layuiadmin/component/autocomplete.js new file mode 100644 index 0000000..ad04335 --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/component/autocomplete.js @@ -0,0 +1,2 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + ;layui.define(["jquery","laytpl","layer"],function(e){"use strict";layui.link("/layuiadmin/css/autocomplete.css");var hint=layui.hint(),$=layui.jquery,laytpl=layui.laytpl,layer=layui.layer,module="autocomplete",filter="layui-autocomplete",container="layui-form-autocomplete",container_focus="layui-form-autocomplete-focus",system={config:{template:['
            ','
            ',"
            ","
            "].join(""),layout:['
            {{d.text}}
            '].join(""),template_txt:"{{d.text}}",template_val:"{{d.value}}",cache:!1},index:layui.autocomplete?layui.autocomplete.index+1e4:0,data:{}},callback=function(){var e=this,t=e.config,n=t.id;return n&&(callback.config[n]=t),{config:e.config}},job=function(e){var t=this;t.index=++system.index,t.config=$.extend({},t.config,system.config,e),t.render()};job.prototype.config={text:{none:"无数据",loading:"加载中"},response:{code:"Code",data:"Data"},ajax:[],data:[],filter:""},job.prototype.render=function(){var e=this,t=e.config;if(t.elem=$(t.elem),t.where=t.where||{},!t.elem[0])return e;var n=t.elem,a=n.next("."+container),o=e.elem=$(laytpl(t.template).render({}));t.id=e.id,a[0]&&a.remove(),n.attr("autocomplete","off"),n.after(o),e.events()},job.prototype.pullData=function(){var _self=this,_config=_self.config,_elem=_config.elem,_container=_elem.next("."+container),_dom=_container.find("dl");return _config.filter?_config.cache&&_config.data[_self.index]?_self.renderData(_config.data[_self.index]):void(_config.cache&&void 0!=_config.ajax[_self.index]||(!_config.cache&&void 0!=_config.ajax[_self.index]&&_config.ajax[_self.index].abort(),_config.ajax[_self.index]=$.ajax({type:_config.method||"get",url:_config.url,data:{keywords:_config.filter},dataType:"json",beforeSend:function(){_container.addClass(container_focus),_dom.html(['
            ',_config.text.loading,"
            "].join(""))},success:function(resp){return 200!=eval("resp."+_config.response.code)?layer.msg(eval("resp."+_config.response.data)):_config.data[_self.index]=eval("resp."+_config.response.data),_self.renderData(_config.data[_self.index])},error:function(e,t,n){},complete:function(){delete _config.ajax[_self.index]}}))):_self.renderData([])},job.prototype.renderData=function(e){var t=this,n=t.config,a=n.elem,o=a.next("."+container),i=o.find("dl"),l=[];layui.each(e,function(e,t){console.log(t),"object"==typeof t||"array"==typeof t?$.each(t,function(a,o){try{return l.push(laytpl(n.layout).render({index:e,text:laytpl(n.template_txt).render(t)})),!1}catch(i){}}):l.push(laytpl(n.layout).render({index:e,text:laytpl(n.template_txt).render(t)}))}),console.log(l),i.html(l.join("")),l.length>0?o.addClass(container_focus):o.removeClass(container_focus)},job.prototype.events=function(){var e=this,t=e.config,n=t.elem,a=n.next("."+container),o=a.find("dl");n.on("focus",function(){t.filter=this.value,t.cache?e.pullData():e.renderData(t.data[e.index])}).on("input propertychange",function(){t.filter=this.value,e.pullData()}),$(document).on("click",function(i){var l=i.target,c=o.find(l),r=c.length>0?c.closest("dd"):void 0;if(l===n[0])return!1;if(void 0!==r){if(void 0!==r.attr("autocomplete-load"))return!1;n.val(laytpl(t.template_val).render(t.data[e.index][r.index()])),void 0==t.onselect||t.onselect(t.data[e.index][r.index()])}a.removeClass(container_focus)})},callback.config={},callback.job={},system.init=function(e,t){var t=t||{},n=$(e?'input[lay-filter="'+e+'"]':"input["+filter+"]");n.each(function(e,n){var a=$(n),o=a.attr("lay-data");try{o=new Function("return "+o)()}catch(i){return hint.error("autocomplete元素属性lay-data配置项存在语法错误:"+o)}var l=$.extend({elem:this},system.config,t,o);void 0==l.url&&(void 0==l.data||0===l.length)&&hint.error("autocomplete配置有误,缺少获取数据方式"),system.render(l)})},system.render=function(e){var t=new job(e);return callback.call(t)},system.init(),e(module,system)}); \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/component/common.js b/IoTGateway/wwwroot/layuiadmin/component/common.js new file mode 100644 index 0000000..82d681c --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/component/common.js @@ -0,0 +1,2 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + ;layui.define(function(e){var i=(layui.$,layui.layer,layui.laytpl,layui.setter,layui.view,layui.admin);i.events.logout=function(){i.req({url:"./json/user/logout.js",type:"get",data:{},done:function(e){i.exit()}})},e("common",{})}); \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/component/formSelects.js b/IoTGateway/wwwroot/layuiadmin/component/formSelects.js new file mode 100644 index 0000000..8181c35 --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/component/formSelects.js @@ -0,0 +1,2 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + ;layui.define(["form","jquery"],function(e){layui.form.config.verify=$.extend(layui.form.config.verify,{selectRequired:function(e,r){var a=r.attributes["wtm-name"].value,l=$(r).parents(".layui-form");if(0==l.find('input[name="'+a+'"]').length)return"必填项不能为空"}});const r={selects:{},on:function(e){if(!e||!e.layFilter)return void alert("请传入lay-filter");var a=e.layFilter;r.selects[a]=$.extend({},{layFilter:"",left:"【",right:"】",separator:"",$dom:null,arr:[]},e),layui.use(["form","jquery"],function(){var l=layui.form,t=layui.jquery,i=r.selects[a];i.$dom=t('select[lay-filter="'+i.layFilter+'"]').next(),i.$dom.find("dl").css("display","none"),r.refresh(i),r.show(i),l.on("select("+i.layFilter+")",function(a){var l=r.exchange(a);if(l){var t=!1;for(var n in i.arr)i.arr[n]&&i.arr[n].val==l.val&&(i.arr.splice(n,1),t=!0);t||i.arr.push(l)}r.refresh(i),r.show(i),i.$dom.find("dl").css("display","block"),e.selectFunc&&e.selectFunc(i.arr)}),t(document).on("click",'select[lay-filter="'+i.layFilter+'"] + div input',function(){r.show(i)}),t(document).on("click",'body:not(select[lay-filter="'+i.layFilter+'"] + div)',function(e){var r=t(e.target).parents(".layui-form-select").prev().attr("lay-filter")==i.layFilter,a="block"==i.$dom.find("dl").css("display");r?i.$dom.find("dl").css("display",a?"none":"block"):a&&i.$dom.find("dl").css("display","none")})})},show:function(e){e.$dom.find(".layui-this").removeClass("layui-this");var r="";for(var a in e.arr){var l=e.arr[a];l&&(r+=e.separator+e.left+l.name+e.right,e.$dom.find('dd[lay-value="'+l.val+'"]').addClass("layui-this"))}e.separator&&e.separator.length>0&&r.startsWith(e.separator)&&(r=r.substr(e.separator.length)),e.$dom.find(".layui-select-title input").val(r)},refresh:function(e){var r=$("select[lay-filter='"+e.layFilter+"']");r.length>0&&(r[0].name="");for(var a=$('input[name="'+e.layFilter+'"]'),l=0;l
            '}},e.inherits(i,t)}(),function(){var e=baidu.editor.utils,t=baidu.editor.dom.domUtils,i=baidu.editor.ui.UIBase,n=baidu.editor.ui.uiUtils,o=baidu.editor.ui.Mask=function(e){this.initOptions(e),this.initUIBase()};o.prototype={getHtmlTpl:function(){return'
            '},postRender:function(){var e=this;t.on(window,"resize",function(){setTimeout(function(){e.isHidden()||e._fill()})})},show:function(e){this._fill(),this.getDom().style.display="",this.getDom().style.zIndex=e},hide:function(){this.getDom().style.display="none",this.getDom().style.zIndex=""},isHidden:function(){return"none"==this.getDom().style.display},_onMouseDown:function(){return!1},_onClick:function(e,t){this.fireEvent("click",e,t)},_fill:function(){var e=this.getDom(),t=n.getViewportRect();e.style.width=t.width+"px",e.style.height=t.height+"px"}},e.inherits(o,i)}(),function(){function e(e,t){for(var i=0;i
            '+this.getContentHtmlTpl()+"
            "},getContentHtmlTpl:function(){return this.content?"string"==typeof this.content?this.content:this.content.renderHtml():""},_UIBase_postRender:o.prototype.postRender,postRender:function(){if(this.content instanceof o&&this.content.postRender(),this.captureWheel&&!this.captured){this.captured=!0;var e=(document.documentElement.clientHeight||document.body.clientHeight)-80,t=this.getDom().offsetHeight,r=i.getClientRect(this.combox.getDom()).top,a=this.getDom("content"),s=this.getDom("body").getElementsByTagName("iframe"),l=this;for(s.length&&(s=s[0]);r+t>e;)t-=30;a.style.height=t+"px",s&&(s.style.height=t+"px"),window.XMLHttpRequest?n.on(a,"onmousewheel"in document.body?"mousewheel":"DOMMouseScroll",function(e){e.preventDefault?e.preventDefault():e.returnValue=!1,e.wheelDelta?a.scrollTop-=e.wheelDelta/120*60:a.scrollTop-=e.detail/-3*60}):n.on(this.getDom(),"mousewheel",function(e){e.returnValue=!1,l.getDom("content").scrollTop-=e.wheelDelta/120*60})}this.fireEvent("postRenderAfter"),this.hide(!0),this._UIBase_postRender()},_doAutoRender:function(){!this.getDom()&&this.autoRender&&this.render()},mesureSize:function(){var e=this.getDom("content");return i.getClientRect(e)},fitSize:function(){if(this.captureWheel&&this.sized)return this.__size;this.sized=!0;var e=this.getDom("body");e.style.width="",e.style.height="";var t=this.mesureSize();if(this.captureWheel){e.style.width=-(-20-t.width)+"px";var i=parseInt(this.getDom("content").style.height,10);!window.isNaN(i)&&(t.height=i)}else e.style.width=t.width+"px";return e.style.height=t.height+"px",this.__size=t,this.captureWheel&&(this.getDom("content").style.overflow="auto"),t},showAnchor:function(e,t){this.showAnchorRect(i.getClientRect(e),t)},showAnchorRect:function(e,t,o){this._doAutoRender();var r=i.getViewportRect();this.getDom().style.visibility="hidden",this._show();var a,l,d,c,u=this.fitSize();t?(a=this.canSideLeft&&e.right+u.width>r.right&&e.left>u.width,l=this.canSideUp&&e.top+u.height>r.bottom&&e.bottom>u.height,d=a?e.left-u.width:e.right,c=l?e.bottom-u.height:e.top):(a=this.canSideLeft&&e.right+u.width>r.right&&e.left>u.width,l=this.canSideUp&&e.top+u.height>r.bottom&&e.bottom>u.height,d=a?e.right-u.width:e.left,c=l?e.top-u.height:e.bottom);var m=this.getDom();i.setViewportOffset(m,{left:d,top:c}),n.removeClasses(m,s),m.className+=" "+s[2*(l?1:0)+(a?1:0)],this.editor&&(m.style.zIndex=1*this.editor.container.style.zIndex+10,baidu.editor.ui.uiUtils.getFixedLayer().style.zIndex=99999999),this.getDom().style.visibility="visible"},showAt:function(e){var t=e.left,i=e.top,n={left:t,top:i,right:t,bottom:i,height:0,width:0};this.showAnchorRect(n,!1,!0)},_show:function(){if(this._hidden){var e=this.getDom();e.style.display="",this._hidden=!1,this.fireEvent("show")}},isHidden:function(){return this._hidden},show:function(){this._doAutoRender(),this._show()},hide:function(e){!this._hidden&&this.getDom()&&(this.getDom().style.display="none",this._hidden=!0,e||this.fireEvent("hide"))},queryAutoHide:function(e){return!e||!i.contains(this.getDom(),e)}},t.inherits(r,o),n.on(document,"mousedown",function(t){var i=t.target||t.srcElement;e(t,i)}),n.on(window,"scroll",function(t,i){e(t,i)})}(),function(){function e(e,t){for(var i='
            '+e+'
            ',n=0;n"+(60==n?'":"")+""),i+=n<70?'':"";return i+="
            '+t.getLang("themeColor")+'
            '+t.getLang("standardColor")+"
            =60?"border-width:1px;":n>=10&&n<20?"border-width:1px 1px 0 1px;":"border-width:0 1px 0 1px;")+'">
            "}var t=baidu.editor.utils,i=baidu.editor.ui.UIBase,n=baidu.editor.ui.ColorPicker=function(e){this.initOptions(e),this.noColorText=this.noColorText||this.editor.getLang("clearColor"),this.initUIBase()};n.prototype={getHtmlTpl:function(){return e(this.noColorText,this.editor)},_onTableClick:function(e){var t=e.target||e.srcElement,i=t.getAttribute("data-color");i&&this.fireEvent("pickcolor",i)},_onTableOver:function(e){var t=e.target||e.srcElement,i=t.getAttribute("data-color");i&&(this.getDom("preview").style.backgroundColor=i)},_onTableOut:function(){this.getDom("preview").style.backgroundColor=""},_onPickNoColor:function(){this.fireEvent("picknocolor")}},t.inherits(n,i);var o="ffffff,000000,eeece1,1f497d,4f81bd,c0504d,9bbb59,8064a2,4bacc6,f79646,f2f2f2,7f7f7f,ddd9c3,c6d9f0,dbe5f1,f2dcdb,ebf1dd,e5e0ec,dbeef3,fdeada,d8d8d8,595959,c4bd97,8db3e2,b8cce4,e5b9b7,d7e3bc,ccc1d9,b7dde8,fbd5b5,bfbfbf,3f3f3f,938953,548dd4,95b3d7,d99694,c3d69b,b2a2c7,92cddc,fac08f,a5a5a5,262626,494429,17365d,366092,953734,76923c,5f497a,31859b,e36c09,7f7f7f,0c0c0c,1d1b10,0f243e,244061,632423,4f6128,3f3151,205867,974806,c00000,ff0000,ffc000,ffff00,92d050,00b050,00b0f0,0070c0,002060,7030a0,".split(",")}(),function(){var e=baidu.editor.utils,t=baidu.editor.ui.uiUtils,i=baidu.editor.ui.UIBase,n=baidu.editor.ui.TablePicker=function(e){this.initOptions(e),this.initTablePicker()};n.prototype={defaultNumRows:10,defaultNumCols:10,maxNumRows:20,maxNumCols:20,numRows:10,numCols:10,lengthOfCellSide:22,initTablePicker:function(){this.initUIBase()},getHtmlTpl:function(){return'
            '},_UIBase_render:i.prototype.render,render:function(e){this._UIBase_render(e),this.getDom("label").innerHTML="0"+this.editor.getLang("t_row")+" x 0"+this.editor.getLang("t_col")},_track:function(e,t){var i=this.getDom("overlay").style,n=this.lengthOfCellSide;i.width=e*n+"px",i.height=t*n+"px";var o=this.getDom("label");o.innerHTML=e+this.editor.getLang("t_col")+" x "+t+this.editor.getLang("t_row"),this.numCols=e,this.numRows=t},_onMouseOver:function(e,i){var n=e.relatedTarget||e.fromElement;t.contains(i,n)||i===n||(this.getDom("label").innerHTML="0"+this.editor.getLang("t_col")+" x 0"+this.editor.getLang("t_row"),this.getDom("overlay").style.visibility="")},_onMouseOut:function(e,i){var n=e.relatedTarget||e.toElement;t.contains(i,n)||i===n||(this.getDom("label").innerHTML="0"+this.editor.getLang("t_col")+" x 0"+this.editor.getLang("t_row"),this.getDom("overlay").style.visibility="hidden")},_onMouseMove:function(e,i){var n=(this.getDom("overlay").style,t.getEventOffset(e)),o=this.lengthOfCellSide,r=Math.ceil(n.left/o),a=Math.ceil(n.top/o);this._track(r,a)},_onClick:function(){this.fireEvent("picktable",this.numCols,this.numRows)}},e.inherits(n,i)}(),function(){var e=baidu.editor.browser,t=baidu.editor.dom.domUtils,i=baidu.editor.ui.uiUtils,n='onmousedown="$$.Stateful_onMouseDown(event, this);" onmouseup="$$.Stateful_onMouseUp(event, this);"'+(e.ie?' onmouseenter="$$.Stateful_onMouseEnter(event, this);" onmouseleave="$$.Stateful_onMouseLeave(event, this);"':' onmouseover="$$.Stateful_onMouseOver(event, this);" onmouseout="$$.Stateful_onMouseOut(event, this);"');baidu.editor.ui.Stateful={alwalysHoverable:!1,target:null,Stateful_init:function(){this._Stateful_dGetHtmlTpl=this.getHtmlTpl,this.getHtmlTpl=this.Stateful_getHtmlTpl},Stateful_getHtmlTpl:function(){var e=this._Stateful_dGetHtmlTpl();return e.replace(/stateful/g,function(){return n})},Stateful_onMouseEnter:function(e,t){this.target=t,this.isDisabled()&&!this.alwalysHoverable||(this.addState("hover"),this.fireEvent("over"))},Stateful_onMouseLeave:function(e,t){this.isDisabled()&&!this.alwalysHoverable||(this.removeState("hover"),this.removeState("active"),this.fireEvent("out"))},Stateful_onMouseOver:function(e,t){var n=e.relatedTarget;i.contains(t,n)||t===n||this.Stateful_onMouseEnter(e,t)},Stateful_onMouseOut:function(e,t){var n=e.relatedTarget;i.contains(t,n)||t===n||this.Stateful_onMouseLeave(e,t)},Stateful_onMouseDown:function(e,t){this.isDisabled()||this.addState("active")},Stateful_onMouseUp:function(e,t){this.isDisabled()||this.removeState("active")},Stateful_postRender:function(){this.disabled&&!this.hasState("disabled")&&this.addState("disabled")},hasState:function(e){return t.hasClass(this.getStateDom(),"edui-state-"+e)},addState:function(e){this.hasState(e)||(this.getStateDom().className+=" edui-state-"+e)},removeState:function(e){this.hasState(e)&&t.removeClasses(this.getStateDom(),["edui-state-"+e])},getStateDom:function(){return this.getDom("state")},isChecked:function(){return this.hasState("checked")},setChecked:function(e){!this.isDisabled()&&e?this.addState("checked"):this.removeState("checked")},isDisabled:function(){return this.hasState("disabled")},setDisabled:function(e){e?(this.removeState("hover"),this.removeState("checked"),this.removeState("active"),this.addState("disabled")):this.removeState("disabled")}}}(),function(){var e=baidu.editor.utils,t=baidu.editor.ui.UIBase,i=baidu.editor.ui.Stateful,n=baidu.editor.ui.Button=function(e){if(e.name){var t=e.name,i=e.cssRules;e.className||(e.className="edui-for-"+t),e.cssRules=".edui-default .edui-for-"+t+" .edui-icon {"+i+"}"}this.initOptions(e),this.initButton()};n.prototype={uiName:"button",label:"",title:"",showIcon:!0,showText:!0,cssRules:"",initButton:function(){this.initUIBase(),this.Stateful_init(),this.cssRules&&e.cssRule("edui-customize-"+this.name+"-style",this.cssRules)},getHtmlTpl:function(){return'
            '+(this.showIcon?'
            ':"")+(this.showText?'
            '+this.label+"
            ":"")+"
            "},postRender:function(){this.Stateful_postRender(),this.setDisabled(this.disabled)},_onMouseDown:function(e){var t=e.target||e.srcElement,i=t&&t.tagName&&t.tagName.toLowerCase();if("input"==i||"object"==i||"object"==i)return!1},_onClick:function(){this.isDisabled()||this.fireEvent("click")},setTitle:function(e){var t=this.getDom("label");t.innerHTML=e}},e.inherits(n,t),e.extend(n.prototype,i)}(),function(){var e=baidu.editor.utils,t=baidu.editor.ui.uiUtils,i=(baidu.editor.dom.domUtils,baidu.editor.ui.UIBase),n=baidu.editor.ui.Stateful,o=baidu.editor.ui.SplitButton=function(e){this.initOptions(e),this.initSplitButton()};o.prototype={popup:null,uiName:"splitbutton",title:"",initSplitButton:function(){this.initUIBase(),this.Stateful_init();if(null!=this.popup){var e=this.popup;this.popup=null,this.setPopup(e)}},_UIBase_postRender:i.prototype.postRender,postRender:function(){this.Stateful_postRender(),this._UIBase_postRender()},setPopup:function(i){this.popup!==i&&(null!=this.popup&&this.popup.dispose(),i.addListener("show",e.bind(this._onPopupShow,this)),i.addListener("hide",e.bind(this._onPopupHide,this)),i.addListener("postrender",e.bind(function(){i.getDom("body").appendChild(t.createElementByHtml('
            ')),i.getDom().className+=" "+this.className},this)),this.popup=i)},_onPopupShow:function(){this.addState("opened")},_onPopupHide:function(){this.removeState("opened")},getHtmlTpl:function(){return'
            '},showPopup:function(){var e=t.getClientRect(this.getDom());e.top-=this.popup.SHADOW_RADIUS,e.height+=this.popup.SHADOW_RADIUS,this.popup.showAnchorRect(e)},_onArrowClick:function(e,t){this.isDisabled()||this.showPopup()},_onButtonClick:function(){this.isDisabled()||this.fireEvent("buttonclick")}},e.inherits(o,i),e.extend(o.prototype,n,!0)}(),function(){var e=baidu.editor.utils,t=baidu.editor.ui.uiUtils,i=baidu.editor.ui.ColorPicker,n=baidu.editor.ui.Popup,o=baidu.editor.ui.SplitButton,r=baidu.editor.ui.ColorButton=function(e){this.initOptions(e),this.initColorButton()};r.prototype={initColorButton:function(){var e=this;this.popup=new n({content:new i({noColorText:e.editor.getLang("clearColor"),editor:e.editor,onpickcolor:function(t,i){e._onPickColor(i)},onpicknocolor:function(t,i){e._onPickNoColor(i)}}),editor:e.editor}),this.initSplitButton()},_SplitButton_postRender:o.prototype.postRender,postRender:function(){this._SplitButton_postRender(),this.getDom("button_body").appendChild(t.createElementByHtml('
            ')),this.getDom().className+=" edui-colorbutton"},setColor:function(e){this.getDom("colorlump").style.backgroundColor=e,this.color=e},_onPickColor:function(e){this.fireEvent("pickcolor",e)!==!1&&(this.setColor(e),this.popup.hide())},_onPickNoColor:function(e){this.fireEvent("picknocolor")!==!1&&this.popup.hide(); +}},e.inherits(r,o)}(),function(){var e=baidu.editor.utils,t=baidu.editor.ui.Popup,i=baidu.editor.ui.TablePicker,n=baidu.editor.ui.SplitButton,o=baidu.editor.ui.TableButton=function(e){this.initOptions(e),this.initTableButton()};o.prototype={initTableButton:function(){var e=this;this.popup=new t({content:new i({editor:e.editor,onpicktable:function(t,i,n){e._onPickTable(i,n)}}),editor:e.editor}),this.initSplitButton()},_onPickTable:function(e,t){this.fireEvent("picktable",e,t)!==!1&&this.popup.hide()}},e.inherits(o,n)}(),function(){var e=baidu.editor.utils,t=baidu.editor.ui.UIBase,i=baidu.editor.ui.AutoTypeSetPicker=function(e){this.initOptions(e),this.initAutoTypeSetPicker()};i.prototype={initAutoTypeSetPicker:function(){this.initUIBase()},getHtmlTpl:function(){var e=this.editor,t=e.options.autotypeset,i=e.getLang("autoTypeSet"),n="textAlignValue"+e.uid,o="imageBlockLineValue"+e.uid,r="symbolConverValue"+e.uid;return'
            "+i.mergeLine+'"+i.delLine+'
            "+i.removeFormat+'"+i.indent+'
            "+i.alignment+'"+e.getLang("justifyleft")+'"+e.getLang("justifycenter")+'"+e.getLang("justifyright")+'
            "+i.imageFloat+'"+e.getLang("default")+'"+e.getLang("justifyleft")+'"+e.getLang("justifycenter")+'"+e.getLang("justifyright")+'
            "+i.removeFontsize+'"+i.removeFontFamily+'
            "+i.removeHtml+'
            "+i.pasteFilter+'
            "+i.symbol+'"+i.bdc2sb+'"+i.tobdc+'
            "},_UIBase_render:t.prototype.render},e.inherits(i,t)}(),function(){function e(e){for(var i,n={},o=e.getDom(),r=e.editor.uid,a=null,s=null,l=domUtils.getElementsByTagName(o,"input"),d=l.length-1;i=l[d--];)if(a=i.getAttribute("type"),"checkbox"==a)if(s=i.getAttribute("name"),n[s]&&delete n[s],i.checked){var c=document.getElementById(s+"Value"+r);if(c){if(/input/gi.test(c.tagName))n[s]=c.value;else for(var u,m=c.getElementsByTagName("input"),f=m.length-1;u=m[f--];)if(u.checked){n[s]=u.value;break}}else n[s]=!0}else n[s]=!1;else n[i.getAttribute("value")]=i.checked;for(var h,p=domUtils.getElementsByTagName(o,"select"),d=0;h=p[d++];){var g=h.getAttribute("name");n[g]=n[g]?h.value:""}t.extend(e.editor.options.autotypeset,n),e.editor.setPreferences("autotypeset",n)}var t=baidu.editor.utils,i=baidu.editor.ui.Popup,n=baidu.editor.ui.AutoTypeSetPicker,o=baidu.editor.ui.SplitButton,r=baidu.editor.ui.AutoTypeSetButton=function(e){this.initOptions(e),this.initAutoTypeSetButton()};r.prototype={initAutoTypeSetButton:function(){var t=this;this.popup=new i({content:new n({editor:t.editor}),editor:t.editor,hide:function(){!this._hidden&&this.getDom()&&(e(this),this.getDom().style.display="none",this._hidden=!0,this.fireEvent("hide"))}});var o=0;this.popup.addListener("postRenderAfter",function(){var i=this;if(!o){var n=this.getDom(),r=n.getElementsByTagName("button")[0];r.onclick=function(){e(i),t.editor.execCommand("autotypeset"),i.hide()},domUtils.on(n,"click",function(n){var o=n.target||n.srcElement,r=t.editor.uid;if(o&&"INPUT"==o.tagName){if("imageBlockLine"==o.name||"textAlign"==o.name||"symbolConver"==o.name)for(var a=o.checked,s=document.getElementById(o.name+"Value"+r),l=s.getElementsByTagName("input"),d={imageBlockLine:"none",textAlign:"left",symbolConver:"tobdc"},c=0;c"),o.push('
            '),2===n&&o.push("");return'
            '+o.join("")+"
            "},getStateDom:function(){return this.target},_onClick:function(e){var i=e.target||e.srcElement;/icon/.test(i.className)&&(this.items[i.parentNode.getAttribute("index")].onclick(),t.postHide(e))},_UIBase_render:n.prototype.render},e.inherits(o,n),e.extend(o.prototype,i,!0)}(),function(){var e=baidu.editor.utils,t=baidu.editor.ui.Stateful,i=baidu.editor.ui.uiUtils,n=baidu.editor.ui.UIBase,o=baidu.editor.ui.PastePicker=function(e){this.initOptions(e),this.initPastePicker()};o.prototype={initPastePicker:function(){this.initUIBase(),this.Stateful_init()},getHtmlTpl:function(){return'
            '+this.editor.getLang("pasteOpt")+'
            '},getStateDom:function(){return this.target},format:function(e){this.editor.ui._isTransfer=!0,this.editor.fireEvent("pasteTransfer",e)},_onClick:function(e){var t=domUtils.getNextDomNode(e),n=i.getViewportRect().height,o=i.getClientRect(t);o.top+o.height>n?t.style.top=-o.height-e.offsetHeight+"px":t.style.top="",/hidden/gi.test(domUtils.getComputedStyle(t,"visibility"))?(t.style.visibility="visible",domUtils.addClass(e,"edui-state-opened")):(t.style.visibility="hidden",domUtils.removeClasses(e,"edui-state-opened"))},_UIBase_render:n.prototype.render},e.inherits(o,n),e.extend(o.prototype,t,!0)}(),function(){var e=baidu.editor.utils,t=baidu.editor.ui.uiUtils,i=baidu.editor.ui.UIBase,n=baidu.editor.ui.Toolbar=function(e){this.initOptions(e),this.initToolbar()};n.prototype={items:null,initToolbar:function(){this.items=this.items||[],this.initUIBase()},add:function(e,t){void 0===t?this.items.push(e):this.items.splice(t,0,e)},getHtmlTpl:function(){for(var e=[],t=0;t'+e.join("")+""},postRender:function(){for(var e=this.getDom(),i=0;i
            '},postRender:function(){},queryAutoHide:function(){return!0}};s.prototype={items:null,uiName:"menu",initMenu:function(){this.items=this.items||[],this.initPopup(),this.initItems()},initItems:function(){for(var e=0;e'+e.join("")+""},_Popup_postRender:o.prototype.postRender,postRender:function(){for(var e=this,n=0;n
            '+this.renderLabelHtml()+"
            "},postRender:function(){var e=this;this.addListener("over",function(){e.ownerMenu.fireEvent("submenuover",e),e.subMenu&&e.delayShowSubMenu()}),this.subMenu&&(this.getDom().className+=" edui-hassubmenu",this.subMenu.render(),this.addListener("out",function(){e.delayHideSubMenu()}),this.subMenu.addListener("over",function(){clearTimeout(e._closingTimer),e._closingTimer=null,e.addState("opened")}),this.ownerMenu.addListener("hide",function(){e.hideSubMenu()}),this.ownerMenu.addListener("submenuover",function(t,i){i!==e&&e.delayHideSubMenu()}),this.subMenu._bakQueryAutoHide=this.subMenu.queryAutoHide,this.subMenu.queryAutoHide=function(t){return(!t||!i.contains(e.getDom(),t))&&this._bakQueryAutoHide(t)}),this.getDom().style.tabIndex="-1",i.makeUnselectable(this.getDom()),this.Stateful_postRender()},delayShowSubMenu:function(){var e=this;e.isDisabled()||(e.addState("opened"),clearTimeout(e._showingTimer),clearTimeout(e._closingTimer),e._closingTimer=null,e._showingTimer=setTimeout(function(){e.showSubMenu()},250))},delayHideSubMenu:function(){var e=this;e.isDisabled()||(e.removeState("opened"),clearTimeout(e._showingTimer),e._closingTimer||(e._closingTimer=setTimeout(function(){e.hasState("opened")||e.hideSubMenu(),e._closingTimer=null},400)))},renderLabelHtml:function(){return'
            '+(this.label||"")+"
            "},getStateDom:function(){return this.getDom()},queryAutoHide:function(e){if(this.subMenu&&this.hasState("opened"))return this.subMenu.queryAutoHide(e)},_onClick:function(e,t){this.hasState("disabled")||this.fireEvent("click",e,t)!==!1&&(this.subMenu?this.showSubMenu():o.postHide(e))},showSubMenu:function(){var e=i.getClientRect(this.getDom());e.right-=5,e.left+=2,e.width-=7,e.top-=4,e.bottom+=4,e.height+=8,this.subMenu.showAnchorRect(e,!0,!0)},hideSubMenu:function(){this.subMenu.hide()}},e.inherits(d,n),e.extend(d.prototype,r,!0)}(),function(){var e=baidu.editor.utils,t=baidu.editor.ui.uiUtils,i=baidu.editor.ui.Menu,n=baidu.editor.ui.SplitButton,o=baidu.editor.ui.Combox=function(e){this.initOptions(e),this.initCombox()};o.prototype={uiName:"combox",onbuttonclick:function(){this.showPopup()},initCombox:function(){var e=this;this.items=this.items||[];for(var t=0;tn.right&&(a=n.right-o.width);var s=e.top;s+o.height>n.bottom&&(s=n.bottom-o.height),i.style.left=Math.max(a,0)+"px",i.style.top=Math.max(s,0)+"px"},showAtCenter:function(){var e=r.getViewportRect();if(this.fullscreen){var t=this.getDom(),i=this.getDom("content");t.style.display="block";var n=UE.ui.uiUtils.getClientRect(t),a=UE.ui.uiUtils.getClientRect(i);t.style.left="-100000px",i.style.width=e.width-n.width+a.width+"px",i.style.height=e.height-n.height+a.height+"px",t.style.width=e.width+"px",t.style.height=e.height+"px",t.style.left=0,this._originalContext={html:{overflowX:document.documentElement.style.overflowX,overflowY:document.documentElement.style.overflowY},body:{overflowX:document.body.style.overflowX,overflowY:document.body.style.overflowY}},document.documentElement.style.overflowX="hidden",document.documentElement.style.overflowY="hidden",document.body.style.overflowX="hidden",document.body.style.overflowY="hidden"}else{this.getDom().style.display="";var s=this.fitSize(),l=0|this.getDom("titlebar").offsetHeight,d=e.width/2-s.width/2,c=e.height/2-(s.height-l)/2-l,u=this.getDom();this.safeSetOffset({left:Math.max(0|d,0),top:Math.max(0|c,0)}),o.hasClass(u,"edui-state-centered")||(u.className+=" edui-state-centered")}this._show()},getContentHtml:function(){var e="";return"string"==typeof this.content?e=this.content:this.iframeUrl&&(e=''),e},getHtmlTpl:function(){var e="";if(this.buttons){for(var t=[],i=0;i
            '+t.join("")+"
            "}return'
            '+(this.title||"")+"
            "+this.closeButton.renderHtml()+'
            '+(this.autoReset?"":this.getContentHtml())+"
            "+e+"
            "},postRender:function(){this.modalMask.getDom()||(this.modalMask.render(),this.modalMask.hide()),this.dragMask.getDom()||(this.dragMask.render(),this.dragMask.hide());var e=this;if(this.addListener("show",function(){e.modalMask.show(this.getDom().style.zIndex-2)}),this.addListener("hide",function(){e.modalMask.hide()}),this.buttons)for(var t=0;t',e.editor.container.style.zIndex&&(this.getDom().style.zIndex=1*e.editor.container.style.zIndex+1))}}),this.onbuttonclick=function(){this.showPopup()},this.initSplitButton()}},e.inherits(n,i)}(),function(){function e(e){var t=e.target||e.srcElement,i=a.findParent(t,function(e){return a.hasClass(e,"edui-shortcutmenu")||a.hasClass(e,"edui-popup")},!0);if(!i)for(var n,o=0;n=s[o++];)n.hide()}var t,i=baidu.editor.ui,n=i.UIBase,o=i.uiUtils,r=baidu.editor.utils,a=baidu.editor.dom.domUtils,s=[],l=!1,d=i.ShortCutMenu=function(e){this.initOptions(e),this.initShortCutMenu()};d.postHide=e,d.prototype={isHidden:!0,SPACE:5,initShortCutMenu:function(){this.items=this.items||[],this.initUIBase(),this.initItems(),this.initEvent(),s.push(this)},initEvent:function(){var e=this,i=e.editor.document;a.on(i,"mousemove",function(i){if(e.isHidden===!1){if(e.getSubMenuMark()||"contextmenu"==e.eventType)return;var n=!0,o=e.getDom(),r=o.offsetWidth,a=o.offsetHeight,s=r/2+e.SPACE,l=a/2,d=Math.abs(i.screenX-e.left),c=Math.abs(i.screenY-e.top);clearTimeout(t),t=setTimeout(function(){c>0&&cl&&cl+70&&c0&&ds&&ds+70&&d'+e+""}},r.inherits(d,n),a.on(document,"mousedown",function(t){e(t)}),a.on(window,"scroll",function(t){e(t)})}(),function(){var e=baidu.editor.utils,t=baidu.editor.ui.UIBase,i=baidu.editor.ui.Breakline=function(e){this.initOptions(e),this.initSeparator()};i.prototype={uiName:"Breakline",initSeparator:function(){this.initUIBase()},getHtmlTpl:function(){return"
            "}},e.inherits(i,t)}(),function(){var e=baidu.editor.utils,t=baidu.editor.dom.domUtils,i=baidu.editor.ui.UIBase,n=baidu.editor.ui.Message=function(e){this.initOptions(e),this.initMessage()};n.prototype={initMessage:function(){this.initUIBase()},getHtmlTpl:function(){return'
            ×
            '},reset:function(e){var t=this;e.keepshow||(clearTimeout(this.timer),t.timer=setTimeout(function(){t.hide()},e.timeout||4e3)),void 0!==e.content&&t.setContent(e.content),void 0!==e.type&&t.setType(e.type),t.show()},postRender:function(){var e=this,i=this.getDom("closer");i&&t.on(i,"click",function(){e.hide()})},setContent:function(e){this.getDom("content").innerHTML=e},setType:function(e){e=e||"info";var t=this.getDom("body");t.className=t.className.replace(/edui-message-type-[\w-]+/,"edui-message-type-"+e)},getContent:function(){return this.getDom("content").innerHTML},getType:function(){var e=this.getDom("body").match(/edui-message-type-([\w-]+)/);return e?e[1]:""},show:function(){this.getDom().style.display="block"},hide:function(){var e=this.getDom();e&&(e.style.display="none",e.parentNode&&e.parentNode.removeChild(e))}},e.inherits(n,i)}(),function(){var e=baidu.editor.utils,t=baidu.editor.ui,i=t.Dialog;t.buttons={},t.Dialog=function(e){var t=new i(e);return t.addListener("hide",function(){if(t.editor){var e=t.editor;try{if(browser.gecko){var i=e.window.scrollY,n=e.window.scrollX;e.body.focus(),e.window.scrollTo(n,i)}else e.focus()}catch(o){}}}),t};for(var n,o={anchor:"~/dialogs/anchor/anchor.html",insertimage:"~/dialogs/image/image.html",link:"~/dialogs/link/link.html",spechars:"~/dialogs/spechars/spechars.html",searchreplace:"~/dialogs/searchreplace/searchreplace.html",map:"~/dialogs/map/map.html",gmap:"~/dialogs/gmap/gmap.html",insertvideo:"~/dialogs/video/video.html",help:"~/dialogs/help/help.html",preview:"~/dialogs/preview/preview.html",emotion:"~/dialogs/emotion/emotion.html",wordimage:"~/dialogs/wordimage/wordimage.html",attachment:"~/dialogs/attachment/attachment.html",insertframe:"~/dialogs/insertframe/insertframe.html",edittip:"~/dialogs/table/edittip.html",edittable:"~/dialogs/table/edittable.html",edittd:"~/dialogs/table/edittd.html",webapp:"~/dialogs/webapp/webapp.html",snapscreen:"~/dialogs/snapscreen/snapscreen.html",scrawl:"~/dialogs/scrawl/scrawl.html",music:"~/dialogs/music/music.html",template:"~/dialogs/template/template.html",background:"~/dialogs/background/background.html",charts:"~/dialogs/charts/charts.html"},r=["undo","redo","formatmatch","bold","italic","underline","fontborder","touppercase","tolowercase","strikethrough","subscript","superscript","source","indent","outdent","blockquote","pasteplain","pagebreak","selectall","print","horizontal","removeformat","time","date","unlink","insertparagraphbeforetable","insertrow","insertcol","mergeright","mergedown","deleterow","deletecol","splittorows","splittocols","splittocells","mergecells","deletetable","drafts"],a=0;n=r[a++];)n=n.toLowerCase(),t[n]=function(e){return function(i){var n=new t.Button({className:"edui-for-"+e,title:i.options.labelMap[e]||i.getLang("labelMap."+e)||"",onclick:function(){i.execCommand(e)},theme:i.options.theme,showText:!1});return t.buttons[e]=n,i.addListener("selectionchange",function(t,o,r){var a=i.queryCommandState(e);a==-1?(n.setDisabled(!0),n.setChecked(!1)):r||(n.setDisabled(!1),n.setChecked(a))}),n}}(n);t.cleardoc=function(e){var i=new t.Button({className:"edui-for-cleardoc",title:e.options.labelMap.cleardoc||e.getLang("labelMap.cleardoc")||"",theme:e.options.theme,onclick:function(){confirm(e.getLang("confirmClear"))&&e.execCommand("cleardoc")}});return t.buttons.cleardoc=i,e.addListener("selectionchange",function(){i.setDisabled(e.queryCommandState("cleardoc")==-1)}),i};var s={justify:["left","right","center","justify"],imagefloat:["none","left","center","right"],directionality:["ltr","rtl"]};for(var l in s)!function(e,i){for(var n,o=0;n=i[o++];)!function(i){t[e.replace("float","")+i]=function(n){var o=new t.Button({className:"edui-for-"+e.replace("float","")+i,title:n.options.labelMap[e.replace("float","")+i]||n.getLang("labelMap."+e.replace("float","")+i)||"",theme:n.options.theme,onclick:function(){n.execCommand(e,i)}});return t.buttons[e]=o,n.addListener("selectionchange",function(t,r,a){ +o.setDisabled(n.queryCommandState(e)==-1),o.setChecked(n.queryCommandValue(e)==i&&!a)}),o}}(n)}(l,s[l]);for(var n,a=0;n=["backcolor","forecolor"][a++];)t[n]=function(e){return function(i){var n=new t.ColorButton({className:"edui-for-"+e,color:"default",title:i.options.labelMap[e]||i.getLang("labelMap."+e)||"",editor:i,onpickcolor:function(t,n){i.execCommand(e,n)},onpicknocolor:function(){i.execCommand(e,"default"),this.setColor("transparent"),this.color="default"},onbuttonclick:function(){i.execCommand(e,this.color)}});return t.buttons[e]=n,i.addListener("selectionchange",function(){n.setDisabled(i.queryCommandState(e)==-1)}),n}}(n);var d={noOk:["searchreplace","help","spechars","webapp","preview"],ok:["attachment","anchor","link","insertimage","map","gmap","insertframe","wordimage","insertvideo","insertframe","edittip","edittable","edittd","scrawl","template","music","background","charts"]};for(var l in d)!function(i,n){for(var r,a=0;r=n[a++];)browser.opera&&"searchreplace"===r||!function(n){t[n]=function(r,a,s){a=a||(r.options.iframeUrlMap||{})[n]||o[n],s=r.options.labelMap[n]||r.getLang("labelMap."+n)||"";var l;a&&(l=new t.Dialog(e.extend({iframeUrl:r.ui.mapUrl(a),editor:r,className:"edui-for-"+n,title:s,holdScroll:"insertimage"===n,fullscreen:/charts|preview/.test(n),closeDialog:r.getLang("closeDialog")},"ok"==i?{buttons:[{className:"edui-okbutton",label:r.getLang("ok"),editor:r,onclick:function(){l.close(!0)}},{className:"edui-cancelbutton",label:r.getLang("cancel"),editor:r,onclick:function(){l.close(!1)}}]}:{})),r.ui._dialogs[n+"Dialog"]=l);var d=new t.Button({className:"edui-for-"+n,title:s,onclick:function(){if(l)switch(n){case"wordimage":var e=r.execCommand("wordimage");e&&e.length&&(l.render(),l.open());break;case"scrawl":r.queryCommandState("scrawl")!=-1&&(l.render(),l.open());break;default:l.render(),l.open()}},theme:r.options.theme,disabled:"scrawl"==n&&r.queryCommandState("scrawl")==-1||"charts"==n});return t.buttons[n]=d,r.addListener("selectionchange",function(){var e={edittable:1};if(!(n in e)){var t=r.queryCommandState(n);d.getDom()&&(d.setDisabled(t==-1),d.setChecked(t))}}),d}}(r.toLowerCase())}(l,d[l]);t.snapscreen=function(e,i,n){n=e.options.labelMap.snapscreen||e.getLang("labelMap.snapscreen")||"";var r=new t.Button({className:"edui-for-snapscreen",title:n,onclick:function(){e.execCommand("snapscreen")},theme:e.options.theme});if(t.buttons.snapscreen=r,i=i||(e.options.iframeUrlMap||{}).snapscreen||o.snapscreen){var a=new t.Dialog({iframeUrl:e.ui.mapUrl(i),editor:e,className:"edui-for-snapscreen",title:n,buttons:[{className:"edui-okbutton",label:e.getLang("ok"),editor:e,onclick:function(){a.close(!0)}},{className:"edui-cancelbutton",label:e.getLang("cancel"),editor:e,onclick:function(){a.close(!1)}}]});a.render(),e.ui._dialogs.snapscreenDialog=a}return e.addListener("selectionchange",function(){r.setDisabled(e.queryCommandState("snapscreen")==-1)}),r},t.insertcode=function(i,n,o){n=i.options.insertcode||[],o=i.options.labelMap.insertcode||i.getLang("labelMap.insertcode")||"";var r=[];e.each(n,function(e,t){r.push({label:e,value:t,theme:i.options.theme,renderLabelHtml:function(){return'
            '+(this.label||"")+"
            "}})});var a=new t.Combox({editor:i,items:r,onselect:function(e,t){i.execCommand("insertcode",this.items[t].value)},onbuttonclick:function(){this.showPopup()},title:o,initValue:o,className:"edui-for-insertcode",indexByValue:function(e){if(e)for(var t,i=0;t=this.items[i];i++)if(t.value.indexOf(e)!=-1)return i;return-1}});return t.buttons.insertcode=a,i.addListener("selectionchange",function(e,t,n){if(!n){var r=i.queryCommandState("insertcode");if(r==-1)a.setDisabled(!0);else{a.setDisabled(!1);var s=i.queryCommandValue("insertcode");if(!s)return void a.setValue(o);s&&(s=s.replace(/['"]/g,"").split(",")[0]),a.setValue(s)}}}),a},t.fontfamily=function(i,n,o){if(n=i.options.fontfamily||[],o=i.options.labelMap.fontfamily||i.getLang("labelMap.fontfamily")||"",n.length){for(var r,a=0,s=[];r=n[a];a++){var l=i.getLang("fontfamily")[r.name]||"";!function(t,n){s.push({label:t,value:n,theme:i.options.theme,renderLabelHtml:function(){return'
            '+(this.label||"")+"
            "}})}(r.label||l,r.val)}var d=new t.Combox({editor:i,items:s,onselect:function(e,t){i.execCommand("FontFamily",this.items[t].value)},onbuttonclick:function(){this.showPopup()},title:o,initValue:o,className:"edui-for-fontfamily",indexByValue:function(e){if(e)for(var t,i=0;t=this.items[i];i++)if(t.value.indexOf(e)!=-1)return i;return-1}});return t.buttons.fontfamily=d,i.addListener("selectionchange",function(e,t,n){if(!n){var o=i.queryCommandState("FontFamily");if(o==-1)d.setDisabled(!0);else{d.setDisabled(!1);var r=i.queryCommandValue("FontFamily");r&&(r=r.replace(/['"]/g,"").split(",")[0]),d.setValue(r)}}}),d}},t.fontsize=function(e,i,n){if(n=e.options.labelMap.fontsize||e.getLang("labelMap.fontsize")||"",i=i||e.options.fontsize||[],i.length){for(var o=[],r=0;r'+(this.label||"")+""}})}var s=new t.Combox({editor:e,items:o,title:n,initValue:n,onselect:function(t,i){e.execCommand("FontSize",this.items[i].value)},onbuttonclick:function(){this.showPopup()},className:"edui-for-fontsize"});return t.buttons.fontsize=s,e.addListener("selectionchange",function(t,i,n){if(!n){var o=e.queryCommandState("FontSize");o==-1?s.setDisabled(!0):(s.setDisabled(!1),s.setValue(e.queryCommandValue("FontSize")))}}),s}},t.paragraph=function(i,n,o){if(o=i.options.labelMap.paragraph||i.getLang("labelMap.paragraph")||"",n=i.options.paragraph||[],!e.isEmptyObject(n)){var r=[];for(var a in n)r.push({value:a,label:n[a]||i.getLang("paragraph")[a],theme:i.options.theme,renderLabelHtml:function(){return'
            '+(this.label||"")+"
            "}});var s=new t.Combox({editor:i,items:r,title:o,initValue:o,className:"edui-for-paragraph",onselect:function(e,t){i.execCommand("Paragraph",this.items[t].value)},onbuttonclick:function(){this.showPopup()}});return t.buttons.paragraph=s,i.addListener("selectionchange",function(e,t,n){if(!n){var o=i.queryCommandState("Paragraph");if(o==-1)s.setDisabled(!0);else{s.setDisabled(!1);var r=i.queryCommandValue("Paragraph"),a=s.indexByValue(r);a!=-1?s.setValue(r):s.setValue(s.initValue)}}}),s}},t.customstyle=function(e){var i=e.options.customstyle||[],n=e.options.labelMap.customstyle||e.getLang("labelMap.customstyle")||"";if(i.length){for(var o,r=e.getLang("customstyle"),a=0,s=[];o=i[a++];)!function(t){var i={};i.label=t.label?t.label:r[t.name],i.style=t.style,i.className=t.className,i.tag=t.tag,s.push({label:i.label,value:i,theme:e.options.theme,renderLabelHtml:function(){return'
            <'+i.tag+" "+(i.className?' class="'+i.className+'"':"")+(i.style?' style="'+i.style+'"':"")+">"+i.label+"
            "}})}(o);var l=new t.Combox({editor:e,items:s,title:n,initValue:n,className:"edui-for-customstyle",onselect:function(t,i){e.execCommand("customstyle",this.items[i].value)},onbuttonclick:function(){this.showPopup()},indexByValue:function(e){for(var t,i=0;t=this.items[i++];)if(t.label==e)return i-1;return-1}});return t.buttons.customstyle=l,e.addListener("selectionchange",function(t,i,n){if(!n){var o=e.queryCommandState("customstyle");if(o==-1)l.setDisabled(!0);else{l.setDisabled(!1);var r=e.queryCommandValue("customstyle"),a=l.indexByValue(r);a!=-1?l.setValue(r):l.setValue(l.initValue)}}}),l}},t.inserttable=function(e,i,n){n=e.options.labelMap.inserttable||e.getLang("labelMap.inserttable")||"";var o=new t.TableButton({editor:e,title:n,className:"edui-for-inserttable",onpicktable:function(t,i,n){e.execCommand("InsertTable",{numRows:n,numCols:i,border:1})},onbuttonclick:function(){this.showPopup()}});return t.buttons.inserttable=o,e.addListener("selectionchange",function(){o.setDisabled(e.queryCommandState("inserttable")==-1)}),o},t.lineheight=function(e){var i=e.options.lineheight||[];if(i.length){for(var n,o=0,r=[];n=i[o++];)r.push({label:n,value:n,theme:e.options.theme,onclick:function(){e.execCommand("lineheight",this.value)}});var a=new t.MenuButton({editor:e,className:"edui-for-lineheight",title:e.options.labelMap.lineheight||e.getLang("labelMap.lineheight")||"",items:r,onbuttonclick:function(){var t=e.queryCommandValue("LineHeight")||this.value;e.execCommand("LineHeight",t)}});return t.buttons.lineheight=a,e.addListener("selectionchange",function(){var t=e.queryCommandState("LineHeight");if(t==-1)a.setDisabled(!0);else{a.setDisabled(!1);var i=e.queryCommandValue("LineHeight");i&&a.setValue((i+"").replace(/cm/,"")),a.setChecked(t)}}),a}};for(var c,u=["top","bottom"],m=0;c=u[m++];)!function(e){t["rowspacing"+e]=function(i){var n=i.options["rowspacing"+e]||[];if(!n.length)return null;for(var o,r=0,a=[];o=n[r++];)a.push({label:o,value:o,theme:i.options.theme,onclick:function(){i.execCommand("rowspacing",this.value,e)}});var s=new t.MenuButton({editor:i,className:"edui-for-rowspacing"+e,title:i.options.labelMap["rowspacing"+e]||i.getLang("labelMap.rowspacing"+e)||"",items:a,onbuttonclick:function(){var t=i.queryCommandValue("rowspacing",e)||this.value;i.execCommand("rowspacing",t,e)}});return t.buttons[e]=s,i.addListener("selectionchange",function(){var t=i.queryCommandState("rowspacing",e);if(t==-1)s.setDisabled(!0);else{s.setDisabled(!1);var n=i.queryCommandValue("rowspacing",e);n&&s.setValue((n+"").replace(/%/,"")),s.setChecked(t)}}),s}}(c);for(var f,h=["insertorderedlist","insertunorderedlist"],p=0;f=h[p++];)!function(e){t[e]=function(i){var n=i.options[e],o=function(){i.execCommand(e,this.value)},r=[];for(var a in n)r.push({label:n[a]||i.getLang()[e][a]||"",value:a,theme:i.options.theme,onclick:o});var s=new t.MenuButton({editor:i,className:"edui-for-"+e,title:i.getLang("labelMap."+e)||"",items:r,onbuttonclick:function(){var t=i.queryCommandValue(e)||this.value;i.execCommand(e,t)}});return t.buttons[e]=s,i.addListener("selectionchange",function(){var t=i.queryCommandState(e);if(t==-1)s.setDisabled(!0);else{s.setDisabled(!1);var n=i.queryCommandValue(e);s.setValue(n),s.setChecked(t)}}),s}}(f);t.fullscreen=function(e,i){i=e.options.labelMap.fullscreen||e.getLang("labelMap.fullscreen")||"";var n=new t.Button({className:"edui-for-fullscreen",title:i,theme:e.options.theme,onclick:function(){e.ui&&e.ui.setFullScreen(!e.ui.isFullScreen()),this.setChecked(e.ui.isFullScreen())}});return t.buttons.fullscreen=n,e.addListener("selectionchange",function(){var t=e.queryCommandState("fullscreen");n.setDisabled(t==-1),n.setChecked(e.ui.isFullScreen())}),n},t.emotion=function(e,i){var n="emotion",r=new t.MultiMenuPop({title:e.options.labelMap[n]||e.getLang("labelMap."+n)||"",editor:e,className:"edui-for-"+n,iframeUrl:e.ui.mapUrl(i||(e.options.iframeUrlMap||{})[n]||o[n])});return t.buttons[n]=r,e.addListener("selectionchange",function(){r.setDisabled(e.queryCommandState(n)==-1)}),r},t.autotypeset=function(e){var i=new t.AutoTypeSetButton({editor:e,title:e.options.labelMap.autotypeset||e.getLang("labelMap.autotypeset")||"",className:"edui-for-autotypeset",onbuttonclick:function(){e.execCommand("autotypeset")}});return t.buttons.autotypeset=i,e.addListener("selectionchange",function(){i.setDisabled(e.queryCommandState("autotypeset")==-1)}),i},t.simpleupload=function(e){var i="simpleupload",n=new t.Button({className:"edui-for-"+i,title:e.options.labelMap[i]||e.getLang("labelMap."+i)||"",onclick:function(){},theme:e.options.theme,showText:!1});return t.buttons[i]=n,e.addListener("ready",function(){var t=n.getDom("body"),i=t.children[0];e.fireEvent("simpleuploadbtnready",i)}),e.addListener("selectionchange",function(t,o,r){var a=e.queryCommandState(i);a==-1?(n.setDisabled(!0),n.setChecked(!1)):r||(n.setDisabled(!1),n.setChecked(a))}),n}}(),function(){function e(e){this.initOptions(e),this.initEditorUI()}var t=baidu.editor.utils,i=baidu.editor.ui.uiUtils,n=baidu.editor.ui.UIBase,o=baidu.editor.dom.domUtils,r=[];e.prototype={uiName:"editor",initEditorUI:function(){function e(e,t){e.setOpt({wordCount:!0,maximumWords:1e4,wordCountMsg:e.options.wordCountMsg||e.getLang("wordCountMsg"),wordOverFlowMsg:e.options.wordOverFlowMsg||e.getLang("wordOverFlowMsg")});var i=e.options,n=i.maximumWords,o=i.wordCountMsg,r=i.wordOverFlowMsg,a=t.getDom("wordcount");if(i.wordCount){var s=e.getContentLength(!0);s>n?(a.innerHTML=r,e.fireEvent("wordcountoverflow")):a.innerHTML=o.replace("{#leave}",n-s).replace("{#count}",s)}}this.editor.ui=this,this._dialogs={},this.initUIBase(),this._initToolbars();var t=this.editor,i=this;t.addListener("ready",function(){function n(){e(t,i),o.un(t.document,"click",arguments.callee)}t.getDialog=function(e){return t.ui._dialogs[e+"Dialog"]},o.on(t.window,"scroll",function(e){baidu.editor.ui.Popup.postHide(e)}),t.ui._actualFrameWidth=t.options.initialFrameWidth,UE.browser.ie&&6===UE.browser.version&&t.container.ownerDocument.execCommand("BackgroundImageCache",!1,!0),t.options.elementPathEnabled&&(t.ui.getDom("elementpath").innerHTML='
            '+t.getLang("elementPathTip")+":
            "),t.options.wordCount&&(o.on(t.document,"click",n),t.ui.getDom("wordcount").innerHTML=t.getLang("wordCountTip")),t.ui._scale(),t.options.scaleEnabled?(t.autoHeightEnabled&&t.disableAutoHeight(),i.enableScale()):i.disableScale(),t.options.elementPathEnabled||t.options.wordCount||t.options.scaleEnabled||(t.ui.getDom("elementpath").style.display="none",t.ui.getDom("wordcount").style.display="none",t.ui.getDom("scale").style.display="none"),t.selection.isFocus()&&t.fireEvent("selectionchange",!1,!0)}),t.addListener("mousedown",function(e,t){var i=t.target||t.srcElement;baidu.editor.ui.Popup.postHide(t,i),baidu.editor.ui.ShortCutMenu.postHide(t)}),t.addListener("delcells",function(){UE.ui.edittip&&new UE.ui.edittip(t),t.getDialog("edittip").open()});var n,r,a=!1;t.addListener("afterpaste",function(){t.queryCommandState("pasteplain")||(baidu.editor.ui.PastePicker&&(n=new baidu.editor.ui.Popup({content:new baidu.editor.ui.PastePicker({editor:t}),editor:t,className:"edui-wordpastepop"}),n.render()),a=!0)}),t.addListener("afterinserthtml",function(){clearTimeout(r),r=setTimeout(function(){if(n&&(a||t.ui._isTransfer)){if(n.isHidden()){var e=o.createElement(t.document,"span",{style:"line-height:0px;",innerHTML:"\ufeff"}),i=t.selection.getRange();i.insertNode(e);var r=getDomNode(e,"firstChild","previousSibling");r&&n.showAnchor(3==r.nodeType?r.parentNode:r),o.remove(e)}else n.show();delete t.ui._isTransfer,a=!1}},200)}),t.addListener("contextmenu",function(e,t){baidu.editor.ui.Popup.postHide(t)}),t.addListener("keydown",function(e,t){n&&n.dispose(t);var i=t.keyCode||t.which;t.altKey&&90==i&&UE.ui.buttons.fullscreen.onclick()}),t.addListener("wordcount",function(t){e(this,i)}),t.addListener("selectionchange",function(){t.options.elementPathEnabled&&i[(t.queryCommandState("elementpath")==-1?"dis":"en")+"ableElementPath"](),t.options.scaleEnabled&&i[(t.queryCommandState("scale")==-1?"dis":"en")+"ableScale"]()});var s=new baidu.editor.ui.Popup({editor:t,content:"",className:"edui-bubble",_onEditButtonClick:function(){this.hide(),t.ui._dialogs.linkDialog.open()},_onImgEditButtonClick:function(e){this.hide(),t.ui._dialogs[e]&&t.ui._dialogs[e].open()},_onImgSetFloat:function(e){this.hide(),t.execCommand("imagefloat",e)},_setIframeAlign:function(e){var t=s.anchorEl,i=t.cloneNode(!0);switch(e){case-2:i.setAttribute("align","");break;case-1:i.setAttribute("align","left");break;case 1:i.setAttribute("align","right")}t.parentNode.insertBefore(i,t),o.remove(t),s.anchorEl=i,s.showAnchor(s.anchorEl)},_updateIframe:function(){var e=t._iframe=s.anchorEl;o.hasClass(e,"ueditor_baidumap")?(t.selection.getRange().selectNode(e).select(),t.ui._dialogs.mapDialog.open(),s.hide()):(t.ui._dialogs.insertframeDialog.open(),s.hide())},_onRemoveButtonClick:function(e){t.execCommand(e),this.hide()},queryAutoHide:function(e){return e&&e.ownerDocument==t.document&&("img"==e.tagName.toLowerCase()||o.findParentByTagName(e,"a",!0))?e!==s.anchorEl:baidu.editor.ui.Popup.prototype.queryAutoHide.call(this,e)}});s.render(),t.options.imagePopup&&(t.addListener("mouseover",function(e,i){i=i||window.event;var n=i.target||i.srcElement;if(t.ui._dialogs.insertframeDialog&&/iframe/gi.test(n.tagName)){var o=s.formatHtml(""+t.getLang("property")+': '+t.getLang("default")+'  '+t.getLang("justifyleft")+'  '+t.getLang("justifyright")+'   '+t.getLang("modify")+"");o?(s.getDom("content").innerHTML=o,s.anchorEl=n,s.showAnchor(s.anchorEl)):s.hide()}}),t.addListener("selectionchange",function(e,i){if(i){var n="",r="",a=t.selection.getRange().getClosedNode(),l=t.ui._dialogs;if(a&&"IMG"==a.tagName){var d="insertimageDialog";if(a.className.indexOf("edui-faked-video")==-1&&a.className.indexOf("edui-upload-video")==-1||(d="insertvideoDialog"),a.className.indexOf("edui-faked-webapp")!=-1&&(d="webappDialog"),a.src.indexOf("http://api.map.baidu.com")!=-1&&(d="mapDialog"),a.className.indexOf("edui-faked-music")!=-1&&(d="musicDialog"),a.src.indexOf("http://maps.google.com/maps/api/staticmap")!=-1&&(d="gmapDialog"),a.getAttribute("anchorname")&&(d="anchorDialog",n=s.formatHtml(""+t.getLang("property")+': '+t.getLang("modify")+"  "+t.getLang("delete")+"")),a.getAttribute("word_img")&&(t.word_img=[a.getAttribute("word_img")],d="wordimageDialog"),(o.hasClass(a,"loadingclass")||o.hasClass(a,"loaderrorclass"))&&(d=""),!l[d])return;r=""+t.getLang("property")+': '+t.getLang("default")+'  '+t.getLang("justifyleft")+'  '+t.getLang("justifyright")+'  '+t.getLang("justifycenter")+"  '+t.getLang("modify")+"",!n&&(n=s.formatHtml(r))}if(t.ui._dialogs.linkDialog){var c,u=t.queryCommandValue("link");if(u&&(c=u.getAttribute("_href")||u.getAttribute("href",2))){var m=c;c.length>30&&(m=c.substring(0,20)+"..."),n&&(n+='
            '),n+=s.formatHtml(""+t.getLang("anthorMsg")+': '+m+' '+t.getLang("modify")+' '+t.getLang("clear")+""),s.showAnchor(u)}}n?(s.getDom("content").innerHTML=n,s.anchorEl=a||u,s.showAnchor(s.anchorEl)):s.hide()}}))},_initToolbars:function(){for(var e=this.editor,i=this.toolbars||[],n=[],o=0;o
            '+(this.toolbars.length?'
            '+this.renderToolbarBoxHtml()+"
            ":"")+'
            '},showWordImageDialog:function(){this._dialogs.wordimageDialog.open()},renderToolbarBoxHtml:function(){for(var e=[],t=0;t'+i+"");t.innerHTML='
            '+this.editor.getLang("elementPathTip")+": "+n.join(" > ")+"
            "}else t.style.display="none"},disableElementPath:function(){var e=this.getDom("elementpath");e.innerHTML="",e.style.display="none",this.elementPathEnabled=!1},enableElementPath:function(){var e=this.getDom("elementpath");e.style.display="",this.elementPathEnabled=!0,this._updateElementPath()},_scale:function(){function e(){h=o.getXY(s),p||(p=a.options.minFrameHeight+d.offsetHeight+c.offsetHeight),m.style.cssText="position:absolute;left:0;display:;top:0;background-color:#41ABFF;opacity:0.4;filter: Alpha(opacity=40);width:"+s.offsetWidth+"px;height:"+s.offsetHeight+"px;z-index:"+(a.options.zIndex+1),o.on(r,"mousemove",t),o.on(l,"mouseup",i),o.on(r,"mouseup",i)}function t(e){n();var t=e||window.event;v=t.pageX||r.documentElement.scrollLeft+t.clientX,b=t.pageY||r.documentElement.scrollTop+t.clientY,y=v-h.x,C=b-h.y,y>=g&&(f=!0,m.style.width=y+"px"),C>=p&&(f=!0,m.style.height=C+"px")}function i(){f&&(f=!1,a.ui._actualFrameWidth=m.offsetWidth-2,s.style.width=a.ui._actualFrameWidth+"px",a.setHeight(m.offsetHeight-c.offsetHeight-d.offsetHeight-2,!0)),m&&(m.style.display="none"),n(),o.un(r,"mousemove",t),o.un(l,"mouseup",i),o.un(r,"mouseup",i)}function n(){browser.ie?r.selection.clear():window.getSelection().removeAllRanges()}var r=document,a=this.editor,s=a.container,l=a.document,d=this.getDom("toolbarbox"),c=this.getDom("bottombar"),u=this.getDom("scale"),m=this.getDom("scalelayer"),f=!1,h=null,p=0,g=a.options.minFrameWidth,v=0,b=0,y=0,C=0,N=this;this.editor.addListener("fullscreenchanged",function(e,t){if(t)N.disableScale();else if(N.editor.options.scaleEnabled){N.enableScale();var i=N.editor.document.createElement("span");N.editor.body.appendChild(i),N.editor.body.style.height=Math.max(o.getXY(i).y,N.editor.iframe.offsetHeight-20)+"px",o.remove(i)}}),this.enableScale=function(){1!=a.queryCommandState("source")&&(u.style.display="",this.scaleEnabled=!0,o.on(u,"mousedown",e))},this.disableScale=function(){u.style.display="none",this.scaleEnabled=!1,o.un(u,"mousedown",e)}},isFullScreen:function(){return this._fullscreen},postRender:function(){n.prototype.postRender.call(this);for(var e=0;e[\n\r\t]+([ ]{4})+/g,">").replace(/[\n\r\t]+([ ]{4})+[\n\r\t]+<"),i.className&&(t.className=i.className),i.style.cssText&&(t.style.cssText=i.style.cssText),/textarea/i.test(i.tagName)?(n.textarea=i,n.textarea.style.display="none"):i.parentNode.removeChild(i),i.id&&(t.id=i.id,o.removeAttributes(i,"id")),i=t,i.innerHTML=""}o.addClass(i,"edui-"+n.options.theme),n.ui.render(i);var s=n.options;n.container=n.ui.getDom();for(var l,d=o.findParents(i,!0),c=[],u=0;l=d[u];u++)c[u]=l.style.display,l.style.display="block";if(s.initialFrameWidth)s.minFrameWidth=s.initialFrameWidth;else{s.minFrameWidth=s.initialFrameWidth=i.offsetWidth;var m=i.style.width;/%$/.test(m)&&(s.initialFrameWidth=m)}s.initialFrameHeight?s.minFrameHeight=s.initialFrameHeight:s.initialFrameHeight=s.minFrameHeight=i.offsetHeight;for(var l,u=0;l=d[u];u++)l.style.display=c[u];i.style.height&&(i.style.height=""),n.container.style.width=s.initialFrameWidth+(/%$/.test(s.initialFrameWidth)?"":"px"),n.container.style.zIndex=s.zIndex,r.call(n,n.ui.getDom("iframeholder")),n.fireEvent("afteruiready")}n.langIsReady?t():n.addListener("langReady",t)})},n},UE.getEditor=function(e,t){var i=a[e];return i||(i=a[e]=new UE.ui.Editor(t),i.render(e)),i},UE.loadEditor=function(e,t){var i=a[e];return i?(i.destroy(),i=a[e]=new UE.ui.Editor(t),i.render(e)):(i=a[e]=new UE.ui.Editor(t),i.render(e)),i},UE.delEditor=function(e){var t;(t=a[e])&&(t.key&&t.destroy(),delete a[e])},UE.registerUI=function(e,i,n,o){t.each(e.split(/\s+/),function(e){UE._customizeUI[e]={id:o,execFn:i,index:n}})}}(),UE.registerUI("message",function(e){function t(){var e=a.ui.getDom("toolbarbox");e&&(i.style.top=e.offsetHeight+3+"px"),i.style.zIndex=Math.max(a.options.zIndex,a.iframe.style.zIndex)+1}var i,n=baidu.editor.ui,o=n.Message,r=[],a=e;a.addListener("ready",function(){i=document.getElementById(a.ui.id+"_message_holder"),t(),setTimeout(function(){t()},500)}),a.addListener("showmessage",function(e,n){n=utils.isString(n)?{content:n}:n;var s=new o({timeout:n.timeout,type:n.type,content:n.content,keepshow:n.keepshow,editor:a}),l=n.id||"msg_"+(+new Date).toString(36);return s.render(i),r[l]=s,s.reset(n),t(),l}),a.addListener("updatemessage",function(e,t,n){n=utils.isString(n)?{content:n}:n;var o=r[t];o.render(i),o&&o.reset(n)}),a.addListener("hidemessage",function(e,t){var i=r[t];i&&i.hide()})}),UE.registerUI("autosave",function(e){var t=null,i=null;e.on("afterautosave",function(){clearTimeout(t),t=setTimeout(function(){i&&e.trigger("hidemessage",i),i=e.trigger("showmessage",{content:e.getLang("autosave.success"),timeout:2e3})},2e3)})}),exports("ueditor",window.UE)}); \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/component/ueditorconfig.js b/IoTGateway/wwwroot/layuiadmin/component/ueditorconfig.js new file mode 100644 index 0000000..7edb6c8 --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/component/ueditorconfig.js @@ -0,0 +1,2 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + ;layui.define([],function(e){function s(e,s){return l(e||self.document.URL||self.location.href,s||t())}function t(){var e=document.getElementsByTagName("script");return e[e.length-1].src}function l(e,s){var t=s;return/^(\/|\\\\)/.test(s)?t=/^.+?\w(\/|\\\\)/.exec(e)[0]+s.replace(/^(\/|\\\\)/,""):/^[a-z]+:/i.test(s)||(e=e.split("#")[0].split("?")[0].replace(/[^\\\/]+$/,""),t=e+""+s),a(t)}function a(e){var s=/^[a-z]+:\/\//.exec(e)[0],t=null,l=[];for(e=e.replace(s,"").split("?")[0].split("#")[0],e=e.replace(/\\/g,"/").split(/\//),e[e.length-1]="";e.length;)".."===(t=e.shift())?l.pop():"."!==t&&l.push(t);return s+l.join("/")}var i=function(e){var s=document.cookie,t=s.indexOf(e);if(t!=-1){t=t+e.length+1;var l=s.indexOf(";",t);l==-1&&(l=s.length);var a=unescape(s.substring(t,l))}return a},r="",n=i(".AspNetCore.Culture"),o=/c=[a-z-]+\|uic=([a-z-]+)/i;if(n&&o.test(n)){var c=n.match(o);c[1].indexOf("en")!=-1?r="en":c[1].indexOf("zh")!=-1&&(r="zh-cn")}if(""==r){var d=(navigator.language||navigator.browserLanguage||navigator.userLanguage).toLowerCase();r=d.indexOf("en")!=-1?"en":"zh-cn"}var g="/layuiadmin/ueditor/";window.UEDITOR_CONFIG={UEDITOR_HOME_URL:g,serverUrl:g.replace("layuiadmin/ueditor/","")+"_Framework/",toolbars:[["fullscreen","source","|","undo","redo","|","selectall","cleardoc","|","bold","italic","underline","fontborder","strikethrough","superscript","subscript","removeformat","formatmatch","autotypeset","blockquote","pasteplain","|","forecolor","backcolor","insertorderedlist","insertunorderedlist","|","rowspacingtop","rowspacingbottom","lineheight","|","customstyle","paragraph","fontfamily","fontsize","|","directionalityltr","directionalityrtl","indent","|","justifyleft","justifycenter","justifyright","justifyjustify","|","touppercase","tolowercase","|","link","unlink","anchor","|","imagenone","imageleft","imageright","imagecenter","|","simpleupload","insertimage","emotion","scrawl","attachment","map","insertcode","pagebreak","template","background","|","horizontal","date","time","spechars","|","inserttable","deletetable","insertparagraphbeforetable","insertrow","deleterow","insertcol","deletecol","mergecells","mergeright","mergedown","splittocells","splittorows","splittocols","|","print","preview","searchreplace"]],lang:r,langPath:g+"lang/",xssFilterRules:!0,inputXssFilter:!0,outputXssFilter:!0,whitList:{a:["target","href","title","class","style"],abbr:["title","class","style"],address:["class","style"],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","loop","preload","src","class","style"],b:["class","style"],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite","class","style"],br:[],caption:["class","style"],center:[],cite:[],code:["class","style"],col:["align","valign","span","width","class","style"],colgroup:["align","valign","span","width","class","style"],dd:["class","style"],del:["datetime"],details:["open"],div:["class","style"],dl:["class","style"],dt:["class","style"],em:["class","style"],font:["color","size","face"],footer:[],h1:["class","style"],h2:["class","style"],h3:["class","style"],h4:["class","style"],h5:["class","style"],h6:["class","style"],header:[],hr:[],i:["class","style"],img:["src","alt","title","width","height","id","_src","loadingclass","class","data-latex"],ins:["datetime"],li:["class","style"],mark:[],nav:[],ol:["class","style"],p:["class","style"],pre:["class","style"],s:[],section:[],small:[],span:["class","style"],sub:["class","style"],sup:["class","style"],strong:["class","style"],table:["width","border","align","valign","class","style"],tbody:["align","valign","class","style"],td:["width","rowspan","colspan","align","valign","class","style"],tfoot:["align","valign","class","style"],th:["width","rowspan","colspan","align","valign","class","style"],thead:["align","valign","class","style"],tr:["rowspan","align","valign","class","style"],tt:[],u:[],ul:["class","style"],video:["autoplay","controls","loop","preload","src","height","width","class","style"]}},window.UE={getUEBasePath:s},layui.define("ueditor",function(e){e("ueditorconfig",window.UEDITOR_CONFIG)})}); \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/config.js b/IoTGateway/wwwroot/layuiadmin/config.js new file mode 100644 index 0000000..6f19f44 --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/config.js @@ -0,0 +1,142 @@ +/** + + @Name:全局配置 + @Author:贤心 + @Site:http://www.layui.com/admin/ + @License:LPPL(layui付费产品协议) + + */ + +layui.define(['laytpl', 'layer', 'element', 'util'], function (exports) { + exports('setter', { + container: 'LAY_app' //容器ID + , base: layui.cache.base //记录layuiAdmin文件夹所在路径 + + , views: '/' //视图所在目录 + , entry: 'Home/FrontPage' //默认视图文件名 + , engine: '' //视图文件后缀名 + , layout: 'Home/Layout' + , pageTabs: $.cookie("pagemode") === 'Tab' //是否开启页面选项卡功能。单页版不推荐开启 + + + , name: 'IoTGateway' + , tableName: 'layuiAdmin' //本地存储表名 + , MOD_NAME: '_wtm' //模块事件名 + + , debug: true //是否开启调试模式。如开启,接口异常时会抛出异常 URL 等信息 + + , interceptor: false //是否开启未登入拦截 + + //自定义请求字段 + , request: { + tokenName: 'access_token' //自动携带 token 的字段名。可设置 false 不携带。 + } + + //自定义响应字段 + , response: { + statusName: 'Code' //数据状态的字段名称 + , statusCode: { + ok: 200 //数据状态一切正常的状态码 + , logout: 1001 //登录状态失效的状态码 + } + , msgName: 'Msg' //状态信息的字段名称 + , dataName: 'Data' //数据详情的字段名称 + } + + //独立页面路由,可随意添加(无需写参数) + , indPage: [ + '/user/login' //登入页 + , '/user/reg' //注册页 + , '/user/forget' //找回密码 + , '/template/tips/test' //独立页的一个测试 demo + ] + + //扩展的第三方模块 + , extend: [ + 'echarts', //echarts 核心包 + 'echartsTheme' //echarts 主题 + ] + + //主题配置 + , theme: { + //内置主题配色方案 + color: [{ + main: '#344058' + , logo: '#0085E8' + , selected: '#1E9FFF' + , header: '#1E9FFF' + , alias: 'default' //海洋头 + }, { + main: '#03152A' + , selected: '#3B91FF' + , alias: 'dark-blue' //藏蓝 + }, { + main: '#2E241B' + , selected: '#A48566' + , alias: 'coffee' //咖啡 + }, { + main: '#50314F' + , selected: '#7A4D7B' + , alias: 'purple-red' //紫红 + }, { + main: '#344058' + , logo: '#1E9FFF' + , selected: '#1E9FFF' + , alias: 'ocean' //海洋 + }, { + main: '#3A3D49' + , logo: '#2F9688' + , selected: '#5FB878' + , alias: 'green' //墨绿 + }, { + main: '#20222A' + , logo: '#F78400' + , selected: '#F78400' + , alias: 'red' //橙色 + }, { + main: '#28333E' + , logo: '#AA3130' + , selected: '#AA3130' + , alias: 'fashion-red' //时尚红 + }, { + main: '#24262F' + , logo: '#3A3D49' + , selected: '#009688' + , alias: 'classic-black' //经典黑 + }, { + logo: '#226A62' + , header: '#2F9688' + , alias: 'green-header' //墨绿头 + }, { + main: '#20222A' //主题色 + , selected: '#009688' //选中色 + , alias: 'ocean-header' //默认别名 + }, { + header: '#393D49' + , alias: 'classic-black-header' //经典黑 + }, { + main: '#50314F' + , logo: '#50314F' + , selected: '#7A4D7B' + , header: '#50314F' + , alias: 'purple-red-header' //紫红头 + }, { + main: '#28333E' + , logo: '#28333E' + , selected: '#AA3130' + , header: '#AA3130' + , alias: 'fashion-red-header' //时尚红头 + }, { + main: '#28333E' + , logo: '#009688' + , selected: '#009688' + , header: '#009688' + , alias: 'green-header' //墨绿头 + }] + + //初始的颜色索引,对应上面的配色方案数组索引 + //如果本地已经有主题色记录,则以本地记录为优先,除非请求本地数据(localStorage) + , initColorIndex: 0 + } + }); +}); diff --git a/IoTGateway/wwwroot/layuiadmin/css/autocomplete.css b/IoTGateway/wwwroot/layuiadmin/css/autocomplete.css new file mode 100644 index 0000000..83ec3d2 --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/css/autocomplete.css @@ -0,0 +1,2 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + .layui-form-autocomplete{position:relative}.layui-form-autocomplete dl{display:none;position:absolute;left:0;top:0;padding:5px 0;z-index:999;min-width:100%;border:1px solid #d2d2d2;max-height:300px;overflow-y:auto;background-color:#fff;border-radius:2px;box-shadow:0 2px 4px rgba(0,0,0,.12);box-sizing:border-box}.layui-form-autocomplete dl dd,.layui-form-autocomplete dl dt{padding:0 10px;line-height:36px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.layui-form-autocomplete dl dt{font-size:12px;color:#999}.layui-form-autocomplete dl dd{cursor:pointer}.layui-form-autocomplete dl dd:hover{background-color:#f2f2f2}.layui-form-autocomplete .layui-autocomplete-group dd{padding-left:20px}.layui-form-autocomplete dl dd.layui-autocomplete-tips{padding-left:10px!important;color:#999}.layui-form-autocomplete dl dd.layui-this{background-color:#5FB878;color:#fff}.layui-form-autocomplete-focus dl{display:block} \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/index.js b/IoTGateway/wwwroot/layuiadmin/index.js new file mode 100644 index 0000000..31d5e6e --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/index.js @@ -0,0 +1,2 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + ;layui.extend({setter:"config",admin:"lib/admin",view:"lib/view"}).define(["setter","admin","table"],function(e){var a=layui.setter,t=layui.element,i=layui.admin,n=i.tabsPage,l=layui.view,o=layui.table,r={autoSort:!1,request:{pageName:"Searcher.Page",limitName:"Searcher.Limit"},response:{statusName:"Code",statusCode:200,msgName:"Msg",countName:"Count",dataName:"Data"},loading:!0,totalRow:!1,even:!0,page:!0,limit:20,limits:[10,20,50,80,100,150,200]},s=function(){var e=layui.router(),o=e.path,r=i.correctRouter(e.path.join("/"));o.length||(o=[""]),""===o[o.length-1]&&(o[o.length-1]=a.entry);var u=function(e){s.haveInit&&y(".layui-layer").each(function(){var e=y(this),a=e.attr("times");e.hasClass("layui-layim")||layer.close(a)}),s.haveInit=!0,y(d).scrollTop(0),delete n.type};return"tab"===n.type&&("/"!==r||"/"===r&&i.tabsBody().html())?(i.tabsBodyChange(n.index),u(n.type)):(l().render(o.join("/")).then(function(l){var o,s=y("#LAY_app_tabsheader>li");s.each(function(e){var a=y(this),t=a.attr("lay-id");t===r&&(o=!0,n.index=e)}),a.pageTabs&&"/"!==r&&(o||(y(d).append('
            '),n.index=s.length,t.tabAdd(c,{title:""+(l.title||"新标签页")+"",id:r,attr:e.href}))),this.container=i.tabsBody(n.index),a.pageTabs||this.container.scrollTop(0),t.tabChange(c,r),i.tabsBodyChange(n.index)}).done(function(){layui.use("common",layui.cache.callback.common),h.on("resize",layui.data.resize),t.render("breadcrumb","breadcrumb"),i.tabsBody(n.index).on("scroll",function(){var e=y(this),a=y(".layui-laydate"),t=y(".layui-layer")[0];a[0]&&(a.each(function(){var e=y(this);e.hasClass("layui-laydate-static")||e.remove()}),e.find("input").blur()),t&&layer.closeAll("tips")})}),void u())},u=function(e){var t,n=layui.router(),o=l(a.container),r=i.correctRouter(n.path.join("/"));if(layui.each(a.indPage,function(e,a){if(r===a)return t=!0}),layui.config({base:a.base+"component/"}),t||"/user/login"===r)o.render(n.path.join("/")).done(function(){i.pageType="alone"});else{if(a.interceptor){var u=layui.data(a.tableName);if(!u[a.request.tokenName])return location.hash="/user/login/redirect="+encodeURIComponent(r)}"console"===i.pageType?s():o.render(a.layout).done(function(){s(),layui.element.render(),i.screen()<2&&i.sideFlexible(),i.pageType="console"})}},d="#LAY_app_body",c="layadmin-layout-tabs",y=layui.$,h=y(window);layui.link(a.base+"style/admin.css?v="+(i.v+"-1"),function(){u()},"layuiAdmin"),window.onhashchange=function(){u(),layui.event.call(this,a.MOD_NAME,"hash({*})",layui.router())},layui.each(a.extend,function(e,t){var i={};i[t]="{/}"+a.base+"lib/extend/"+t,layui.extend(i)}),o.set(r),e("index",{render:s})}); \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/lib/admin.js b/IoTGateway/wwwroot/layuiadmin/lib/admin.js new file mode 100644 index 0000000..5a92db3 --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/lib/admin.js @@ -0,0 +1,2 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + ;layui.define("view",function(e){var a=layui.jquery,t=layui.laytpl,i=layui.element,n=layui.setter,l=layui.view,s=layui.device(),r=a(window),o=a("body"),u=a("#"+n.container),c="layui-show",d="layui-this",y="layui-disabled",m="#LAY_app_body",f="LAY_app_flexible",h="layadmin-side-spread-sm",p="layadmin-tabsbody-item",v="layui-icon-shrink-right",b="layui-icon-spread-left",g="layadmin-side-shrink",x="LAY-system-side-menu",C={v:"1.2.1 pro",req:l.req,exit:l.exit,escape:function(e){return String(e||"").replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")},on:function(e,a){return layui.onevent.call(this,n.MOD_NAME,e,a)},popup:l.popup,popupRight:function(e){return C.popup.index=layer.open(a.extend({type:1,id:"LAY_adminPopupR",anim:-1,title:!1,closeBtn:!1,offset:"r",shade:.1,shadeClose:!0,skin:"layui-anim layui-anim-rl layui-layer-adminRight",area:"300px"},e))},sendAuthCode:function(e){e=a.extend({seconds:60,elemPhone:"#LAY_phone",elemVercode:"#LAY_vercode"},e);var t,i=e.seconds,n=function(l){var s=a(e.elem);i--,i<0?(s.removeClass(y).html("获取验证码"),i=e.seconds,clearInterval(t)):s.addClass(y).html(i+"秒后重获"),l||(t=setInterval(function(){n(!0)},1e3))};o.off("click",e.elem).on("click",e.elem,function(){e.elemPhone=a(e.elemPhone),e.elemVercode=a(e.elemVercode);var t=e.elemPhone,l=t.val();if(i===e.seconds&&!a(this).hasClass(y)){if(!/^1\d{10}$/.test(l))return t.focus(),layer.msg("请输入正确的手机号");if("object"==typeof e.ajax){var s=e.ajax.success;delete e.ajax.success}C.req(a.extend(!0,{url:"/auth/code",type:"get",data:{phone:l},success:function(a){layer.msg("验证码已发送至你的手机,请注意查收",{icon:1,shade:0}),e.elemVercode.focus(),n(),s&&s(a)}},e.ajax))}})},screen:function(){var e=r.width();return e>1200?3:e>992?2:e>768?1:0},sideFlexible:function(e){var t=u,i=a("#"+f),l=C.screen();"spread"===e?(i.removeClass(b).addClass(v),l<2?t.addClass(h):t.removeClass(h),t.removeClass(g)):(i.removeClass(v).addClass(b),l<2?t.removeClass(g):t.addClass(g),t.removeClass(h)),layui.event.call(this,n.MOD_NAME,"side({*})",{status:e})},resizeTable:function(e){var t=this,i=function(){t.tabsBody(C.tabsPage.index).find(".layui-table-view").each(function(){var e=a(this).attr("lay-id");layui.table.resize(e)})};layui.table&&(e?setTimeout(i,e):i())},theme:function(e){var i=(n.theme,layui.data(n.tableName)),l="LAY_layadmin_theme",s=document.createElement("style"),r=t([".layui-side-menu,",".layadmin-pagetabs .layui-tab-title li:after,",".layadmin-pagetabs .layui-tab-title li.layui-this:after,",".layui-layer-admin .layui-layer-title,",".layadmin-side-shrink .layui-side-menu .layui-nav>.layui-nav-item>.layui-nav-child","{background-color:{{d.color.main}} !important;}",".layui-nav-tree .layui-this,",".layui-nav-tree .layui-this>a,",".layui-nav-tree .layui-nav-child dd.layui-this,",".layui-nav-tree .layui-nav-child dd.layui-this a","{background-color:{{d.color.selected}} !important;}",".layui-layout-admin .layui-logo{background-color:{{d.color.logo || d.color.main}} !important;}","{{# if(d.color.header){ }}",".layui-layout-admin .layui-header{background-color:{{ d.color.header }};}",".layui-layout-admin .layui-header a,",".layui-layout-admin .layui-header a cite{color: #f8f8f8;}",".layui-layout-admin .layui-header a:hover{color: #fff;}",".layui-layout-admin .layui-header .layui-nav .layui-nav-more{border-top-color: #fbfbfb;}",".layui-layout-admin .layui-header .layui-nav .layui-nav-mored{border-color: transparent; border-bottom-color: #fbfbfb;}",".layui-layout-admin .layui-header .layui-nav .layui-this:after, .layui-layout-admin .layui-header .layui-nav-bar{background-color: #fff; background-color: rgba(255,255,255,.5);}",".layadmin-pagetabs .layui-tab-title li:after{display: none;}","{{# } }}"].join("")).render(e=a.extend({},i.theme,e)),u=document.getElementById(l);"styleSheet"in s?(s.setAttribute("type","text/css"),s.styleSheet.cssText=r):s.innerHTML=r,s.id=l,u&&o[0].removeChild(u),o[0].appendChild(s),o.attr("layadmin-themealias",e.color.alias),i.theme=i.theme||{},layui.each(e,function(e,a){i.theme[e]=a}),layui.data(n.tableName,{key:"theme",value:i.theme})},initTheme:function(e){var a=n.theme;e=e||0,a.color[e]&&(a.color[e].index=e,C.theme({color:a.color[e]}))},tabsPage:{},tabsHeader:function(e){return a("#LAY_app_tabsheader").children("li").eq(e||0)},tabsBody:function(e){return a(m).find("."+p).eq(e||0)},tabsBodyChange:function(e){C.tabsHeader(e).attr("lay-attr",layui.router().href),C.tabsBody(e).addClass(c).siblings().removeClass(c),k.rollPage("auto",e)},resize:function(e){var a=layui.router(),t=a.path.join("-");C.resizeFn[t]&&(r.off("resize",C.resizeFn[t]),delete C.resizeFn[t]),"off"!==e&&(e(),C.resizeFn[t]=e,r.on("resize",C.resizeFn[t]))},resizeFn:{},runResize:function(){var e=layui.router(),a=e.path.join("-");C.resizeFn[a]&&C.resizeFn[a]()},delResize:function(){this.resize("off")},closeThisTabs:function(){C.tabsPage.index&&a(z).eq(C.tabsPage.index).find(".layui-tab-close").trigger("click")},fullScreen:function(){var e=document.documentElement,a=e.requestFullScreen||e.webkitRequestFullScreen||e.mozRequestFullScreen||e.msRequestFullscreen;"undefined"!=typeof a&&a&&a.call(e)},exitScreen:function(){document.documentElement;document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen()},correctRouter:function(e){return/^\//.test(e)||(e="/"+e),e.replace(/^(\/+)/,"/").replace(new RegExp("/"+n.entry+"$"),"/")}},k=C.events={flexible:function(e){var a=e.find("#"+f),t=a.hasClass(b);C.sideFlexible(t?"spread":null),C.resizeTable(350)},refresh:function(){layui.index.render()},serach:function(e){e.off("keypress").on("keypress",function(a){if(this.value.replace(/\s/g,"")&&13===a.keyCode){var t=e.attr("lay-action"),i=e.attr("lay-text")||"搜索";t+=this.value,i=i+' '+C.escape(this.value)+"",location.hash=C.correctRouter(t),k.serach.keys||(k.serach.keys={}),k.serach.keys[C.tabsPage.index]=this.value,this.value===k.serach.keys[C.tabsPage.index]&&k.refresh(e),this.value=""}})},message:function(e){e.find(".layui-badge-dot").remove()},theme:function(){C.popupRight({id:"LAY_adminPopupTheme",success:function(){l(this.id).render("layuiadmin/views/system/theme.html")}})},note:function(e){var a=C.screen()<2,t=layui.data(n.tableName).note;k.note.index=C.popup({title:"便签",shade:0,offset:["41px",a?null:e.offset().left-250+"px"],anim:-1,id:"LAY_adminNote",skin:"layadmin-note layui-anim layui-anim-upbit",content:'',resize:!1,success:function(e,a){var i=e.find("textarea"),l=void 0===t?"便签中的内容会存储在本地,这样即便你关掉了浏览器,在下次打开时,依然会读取到上一次的记录。是个非常小巧实用的本地备忘录":t;i.val(l).focus().on("keyup",function(){layui.data(n.tableName,{key:"note",value:this.value})})}})},fullscreen:function(e){var a="layui-icon-screen-full",t="layui-icon-screen-restore",i=e.children("i");i.hasClass(a)?(C.fullScreen(),i.addClass(t).removeClass(a)):(C.exitScreen(),i.addClass(a).removeClass(t))},about:function(){C.popupRight({id:"LAY_adminPopupAbout",success:function(){l(this.id).render("layuiadmin/views/system/about.html")}})},more:function(){C.popupRight({id:"LAY_adminPopupMore",success:function(){l(this.id).render("layuiadmin/views/system/more.html")}})},back:function(){history.back()},setTheme:function(e){var a=e.data("index");e.siblings(".layui-this").data("index");e.hasClass(d)||(e.addClass(d).siblings(".layui-this").removeClass(d),C.initTheme(a))},rollPage:function(e,t){var i=a("#LAY_app_tabsheader"),n=i.children("li"),l=(i.prop("scrollWidth"),i.outerWidth()),s=parseFloat(i.css("left"));if("left"===e){if(!s&&s<=0)return;var r=-s-l;n.each(function(e,t){var n=a(t),l=n.position().left;if(l>=r)return i.css("left",-l),!1})}else"auto"===e?!function(){var e,r=n.eq(t);if(r[0]){if(e=r.position().left,e<-s)return i.css("left",-e);if(e+r.outerWidth()>=l-s){var o=e+r.outerWidth()-(l-s);n.each(function(e,t){var n=a(t),l=n.position().left;if(l+s>0&&l-s>o)return i.css("left",-l),!1})}}}():n.each(function(e,t){var n=a(t),r=n.position().left;if(r+n.outerWidth()>=l-s)return i.css("left",-r),!1})},leftPage:function(){k.rollPage("left")},rightPage:function(){k.rollPage()},closeThisTabs:function(){C.closeThisTabs()},closeOtherTabs:function(e){var t="LAY-system-pagetabs-remove";"all"===e?(a(z+":gt(0)").remove(),a(m).find("."+p+":gt(0)").remove()):(a(z).each(function(e,i){e&&e!=C.tabsPage.index&&(a(i).addClass(t),C.tabsBody(e).addClass(t))}),a("."+t).remove())},closeAllTabs:function(){k.closeOtherTabs("all"),location.hash=""},shade:function(){C.sideFlexible()}};!function(){var e=layui.data(n.tableName);e.theme?C.theme(e.theme):n.theme&&C.initTheme(n.theme.initColorIndex),o.addClass("layui-layout-body"),C.screen()<1&&delete n.pageTabs,n.pageTabs||u.addClass("layadmin-tabspage-none"),s.ie&&s.ie<10&&l.error("IE"+s.ie+"下访问可能不佳,推荐使用:Chrome / Firefox / Edge 等高级浏览器",{offset:"auto",id:"LAY_errorIE"})}(),C.on("hash(side)",function(e){var t=e.path,i=function(e){return{list:e.children(".layui-nav-child"),name:e.data("name"),jump:e.data("jump")}},n=a("#"+x),l="layui-nav-itemed",s=function(e){var n=C.correctRouter(t.join("/"));e.each(function(e,s){var r=a(s),o=i(r),u=o.list.children("dd"),c=t[0]==o.name||o.jump&&n==C.correctRouter(o.jump);if(u.each(function(e,s){var r=a(s),u=i(r),y=u.list.children("dd"),m=t[0]==o.name&&t[1]==u.name||u.jump&&n==C.correctRouter(u.jump);if(1==m&&(c=!0),y.each(function(e,s){var r=a(s),y=i(r),f=t[0]==o.name&&t[1]==u.name&&t[2]==y.name||y.jump&&n==C.correctRouter(y.jump);if(f){m=!0,c=!0;var h=y.list[0]?l:d;return r.addClass(h).siblings().removeClass(h),!1}}),m){var f=u.list[0]?l:d;return r.addClass(f).siblings().removeClass(f),!1}}),c){var y=o.list[0]?l:d;return r.addClass(y).siblings().removeClass(y),!1}})};n.find("."+d).removeClass(d),C.screen()<2&&C.sideFlexible(),s(n.children("li"))}),i.on("nav(layadmin-system-side-menu)",function(e){e.siblings(".layui-nav-child")[0]&&u.hasClass(g)&&(C.sideFlexible("spread"),layer.close(e.data("index"))),C.tabsPage.type="nav"}),i.on("nav(layadmin-pagetabs-nav)",function(e){var a=e.parent();a.removeClass(d),a.parent().removeClass(c)});var F=function(e){var a=e.attr("lay-id"),t=e.attr("lay-attr"),i=e.index();location.hash=a===n.entry?"/":t||"/",C.tabsBodyChange(i)},z="#LAY_app_tabsheader>li";o.on("click",z,function(){var e=a(this),t=e.index();return C.tabsPage.type="tab",C.tabsPage.index=t,"iframe"===e.attr("lay-attr")?C.tabsBodyChange(t):(F(e),C.runResize(),void C.resizeTable())}),i.on("tabDelete(layadmin-layout-tabs)",function(e){var t=a(z+".layui-this");e.index&&C.tabsBody(e.index).remove(),F(t),C.delResize()}),o.on("click","*[lay-href]",function(){var e=a(this),t=e.attr("lay-href");layui.router();C.tabsPage.elem=e,location.hash=C.correctRouter(t)}),o.on("click","*[layadmin-event]",function(){var e=a(this),t=e.attr("layadmin-event");k[t]&&k[t].call(this,e)}),o.on("mouseenter","*[lay-tips]",function(){var e=a(this);if(!e.parent().hasClass("layui-nav-item")||u.hasClass(g)){var t=e.attr("lay-tips"),i=e.attr("lay-offset"),n=e.attr("lay-direction"),l=layer.tips(t,this,{tips:n||1,time:-1,success:function(e,a){i&&e.css("margin-left",i+"px")}});e.data("index",l)}}).on("mouseleave","*[lay-tips]",function(){layer.close(a(this).data("index"))});var P=null,A=layui.data.resizeSystem=function(){layer.closeAll("tips");var e=C.screen();null!=P&&e===P||(A.lock||setTimeout(function(){console.log("screen:"+e),console.log("lastScreen:"+P),C.sideFlexible(e<2?"":"spread"),delete A.lock,P=e},100),A.lock=!0)};r.on("resize",layui.data.resizeSystem),e("admin",C)}); \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/lib/extend/echarts.js b/IoTGateway/wwwroot/layuiadmin/lib/extend/echarts.js new file mode 100644 index 0000000..6b75de1 --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/lib/extend/echarts.js @@ -0,0 +1,26 @@ + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + + +!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,e){"createCanvas"===t&&(nw=null),ew[t]=e}function i(t){if(null==t||"object"!=typeof t)return t;var e=t,n=Y_.call(t);if("[object Array]"===n){if(!O(t)){e=[];for(var o=0,a=t.length;o=0){var o="touchend"!==n?e.targetTouches[0]:e.changedTouches[0];o&&st(t,o,e,i)}else st(t,e,e,i),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;var a=e.button;return null==e.which&&void 0!==a&&gw.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function ht(t,e,i){pw?t.addEventListener(e,i):t.attachEvent("on"+e,i)}function ct(t,e,i){pw?t.removeEventListener(e,i):t.detachEvent("on"+e,i)}function dt(t){return 2===t.which||3===t.which}function ft(t){var e=t[1][0]-t[0][0],i=t[1][1]-t[0][1];return Math.sqrt(e*e+i*i)}function pt(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}function gt(t,e,i){return{type:t,event:i,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:i.zrX,offsetY:i.zrY,gestureEvent:i.gestureEvent,pinchX:i.pinchX,pinchY:i.pinchY,pinchScale:i.pinchScale,wheelDelta:i.zrDelta,zrByTouch:i.zrByTouch,which:i.which,stop:mt}}function mt(t){mw(this.event)}function vt(){}function yt(t,e,i){if(t[t.rectHover?"rectContain":"contain"](e,i)){for(var n,o=t;o;){if(o.clipPath&&!o.clipPath.contain(e,i))return!1;o.silent&&(n=!0),o=o.parent}return!n||xw}return!1}function xt(){var t=new bw(6);return _t(t),t}function _t(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function wt(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 bt(t,e,i){var n=e[0]*i[0]+e[2]*i[1],o=e[1]*i[0]+e[3]*i[1],a=e[0]*i[2]+e[2]*i[3],r=e[1]*i[2]+e[3]*i[3],s=e[0]*i[4]+e[2]*i[5]+e[4],l=e[1]*i[4]+e[3]*i[5]+e[5];return t[0]=n,t[1]=o,t[2]=a,t[3]=r,t[4]=s,t[5]=l,t}function St(t,e,i){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+i[0],t[5]=e[5]+i[1],t}function Mt(t,e,i){var n=e[0],o=e[2],a=e[4],r=e[1],s=e[3],l=e[5],u=Math.sin(i),h=Math.cos(i);return t[0]=n*h+r*u,t[1]=-n*u+r*h,t[2]=o*h+s*u,t[3]=-o*u+h*s,t[4]=h*a+u*l,t[5]=h*l-u*a,t}function It(t,e,i){var n=i[0],o=i[1];return t[0]=e[0]*n,t[1]=e[1]*o,t[2]=e[2]*n,t[3]=e[3]*o,t[4]=e[4]*n,t[5]=e[5]*o,t}function Tt(t,e){var i=e[0],n=e[2],o=e[4],a=e[1],r=e[3],s=e[5],l=i*r-a*n;return l?(l=1/l,t[0]=r*l,t[1]=-a*l,t[2]=-n*l,t[3]=i*l,t[4]=(n*s-r*o)*l,t[5]=(a*o-i*s)*l,t):null}function At(t){var e=xt();return wt(e,t),e}function Dt(t){return t>Iw||t<-Iw}function Ct(t){this._target=t.target,this._life=t.life||1e3,this._delay=t.delay||0,this._initialized=!1,this.loop=null!=t.loop&&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 Lt(t){return(t=Math.round(t))<0?0:t>255?255:t}function kt(t){return(t=Math.round(t))<0?0:t>360?360:t}function Pt(t){return t<0?0:t>1?1:t}function Nt(t){return Lt(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100*255:parseInt(t,10))}function Ot(t){return Pt(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100:parseFloat(t))}function Et(t,e,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}function Rt(t,e,i){return t+(e-t)*i}function zt(t,e,i,n,o){return t[0]=e,t[1]=i,t[2]=n,t[3]=o,t}function Bt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function Vt(t,e){Vw&&Bt(Vw,e),Vw=Bw.put(t,Vw||e.slice())}function Gt(t,e){if(t){e=e||[];var i=Bw.get(t);if(i)return Bt(e,i);var n=(t+="").replace(/ /g,"").toLowerCase();if(n in zw)return Bt(e,zw[n]),Vt(t,e),e;if("#"!==n.charAt(0)){var o=n.indexOf("("),a=n.indexOf(")");if(-1!==o&&a+1===n.length){var r=n.substr(0,o),s=n.substr(o+1,a-(o+1)).split(","),l=1;switch(r){case"rgba":if(4!==s.length)return void zt(e,0,0,0,1);l=Ot(s.pop());case"rgb":return 3!==s.length?void zt(e,0,0,0,1):(zt(e,Nt(s[0]),Nt(s[1]),Nt(s[2]),l),Vt(t,e),e);case"hsla":return 4!==s.length?void zt(e,0,0,0,1):(s[3]=Ot(s[3]),Ft(s,e),Vt(t,e),e);case"hsl":return 3!==s.length?void zt(e,0,0,0,1):(Ft(s,e),Vt(t,e),e);default:return}}zt(e,0,0,0,1)}else{if(4===n.length)return(u=parseInt(n.substr(1),16))>=0&&u<=4095?(zt(e,(3840&u)>>4|(3840&u)>>8,240&u|(240&u)>>4,15&u|(15&u)<<4,1),Vt(t,e),e):void zt(e,0,0,0,1);if(7===n.length){var u=parseInt(n.substr(1),16);return u>=0&&u<=16777215?(zt(e,(16711680&u)>>16,(65280&u)>>8,255&u,1),Vt(t,e),e):void zt(e,0,0,0,1)}}}}function Ft(t,e){var i=(parseFloat(t[0])%360+360)%360/360,n=Ot(t[1]),o=Ot(t[2]),a=o<=.5?o*(n+1):o+n-o*n,r=2*o-a;return e=e||[],zt(e,Lt(255*Et(r,a,i+1/3)),Lt(255*Et(r,a,i)),Lt(255*Et(r,a,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function Wt(t){if(t){var e,i,n=t[0]/255,o=t[1]/255,a=t[2]/255,r=Math.min(n,o,a),s=Math.max(n,o,a),l=s-r,u=(s+r)/2;if(0===l)e=0,i=0;else{i=u<.5?l/(s+r):l/(2-s-r);var h=((s-n)/6+l/2)/l,c=((s-o)/6+l/2)/l,d=((s-a)/6+l/2)/l;n===s?e=d-c:o===s?e=1/3+h-d:a===s&&(e=2/3+c-h),e<0&&(e+=1),e>1&&(e-=1)}var f=[360*e,i,u];return null!=t[3]&&f.push(t[3]),f}}function Ht(t,e){var i=Gt(t);if(i){for(var n=0;n<3;n++)i[n]=e<0?i[n]*(1-e)|0:(255-i[n])*e+i[n]|0,i[n]>255?i[n]=255:t[n]<0&&(i[n]=0);return qt(i,4===i.length?"rgba":"rgb")}}function Zt(t){var e=Gt(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function Ut(t,e,i){if(e&&e.length&&t>=0&&t<=1){i=i||[];var n=t*(e.length-1),o=Math.floor(n),a=Math.ceil(n),r=e[o],s=e[a],l=n-o;return i[0]=Lt(Rt(r[0],s[0],l)),i[1]=Lt(Rt(r[1],s[1],l)),i[2]=Lt(Rt(r[2],s[2],l)),i[3]=Pt(Rt(r[3],s[3],l)),i}}function Xt(t,e,i){if(e&&e.length&&t>=0&&t<=1){var n=t*(e.length-1),o=Math.floor(n),a=Math.ceil(n),r=Gt(e[o]),s=Gt(e[a]),l=n-o,u=qt([Lt(Rt(r[0],s[0],l)),Lt(Rt(r[1],s[1],l)),Lt(Rt(r[2],s[2],l)),Pt(Rt(r[3],s[3],l))],"rgba");return i?{color:u,leftIndex:o,rightIndex:a,value:n}:u}}function jt(t,e,i,n){if(t=Gt(t))return t=Wt(t),null!=e&&(t[0]=kt(e)),null!=i&&(t[1]=Ot(i)),null!=n&&(t[2]=Ot(n)),qt(Ft(t),"rgba")}function Yt(t,e){if((t=Gt(t))&&null!=e)return t[3]=Pt(e),qt(t,"rgba")}function qt(t,e){if(t&&t.length){var i=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(i+=","+t[3]),e+"("+i+")"}}function Kt(t,e){return t[e]}function $t(t,e,i){t[e]=i}function Jt(t,e,i){return(e-t)*i+t}function Qt(t,e,i){return i>.5?e:t}function te(t,e,i,n,o){var a=t.length;if(1===o)for(s=0;so)t.length=o;else for(r=n;r=0&&!(m[i]<=e);i--);i=Math.min(i,u-2)}else{for(i=L;ie);i++);i=Math.min(i-1,u-2)}L=i,k=e;var n=m[i+1]-m[i];if(0!==n)if(I=(e-m[i])/n,l)if(A=v[i],T=v[0===i?i:i-1],D=v[i>u-2?u-1:i+1],C=v[i>u-3?u-1:i+2],d)ne(T,A,D,C,I,I*I,I*I*I,r(t,o),g);else{if(f)a=ne(T,A,D,C,I,I*I,I*I*I,P,1),a=re(P);else{if(p)return Qt(A,D,I);a=oe(T,A,D,C,I,I*I,I*I*I)}s(t,o,a)}else if(d)te(v[i],v[i+1],I,r(t,o),g);else{var a;if(f)te(v[i],v[i+1],I,P,1),a=re(P);else{if(p)return Qt(v[i],v[i+1],I);a=Jt(v[i],v[i+1],I)}s(t,o,a)}},ondestroy:i});return e&&"spline"!==e&&(N.easing=e),N}}}function ue(t,e,i,n,o,a,r,s){_(n)?(a=o,o=n,n=0):x(o)?(a=o,o="linear",n=0):x(n)?(a=n,n=0):x(i)?(a=i,i=500):i||(i=500),t.stopAnimation(),he(t,"",t,e,i,n,s);var l=t.animators.slice(),u=l.length;u||a&&a();for(var h=0;h0&&t.animate(e,!1).when(null==o?500:o,s).delay(a||0)}function ce(t,e,i,n){if(e){var o={};o[e]={},o[e][i]=n,t.attr(o)}else t.attr(i,n)}function de(t,e,i,n){i<0&&(t+=i,i=-i),n<0&&(e+=n,n=-n),this.x=t,this.y=e,this.width=i,this.height=n}function fe(t){for(var e=0;t>=eb;)e|=1&t,t>>=1;return t+e}function pe(t,e,i,n){var o=e+1;if(o===i)return 1;if(n(t[o++],t[e])<0){for(;o=0;)o++;return o-e}function ge(t,e,i){for(i--;e>>1])<0?l=a:s=a+1;var u=n-s;switch(u){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(;u>0;)t[s+u]=t[s+u-1],u--}t[s]=r}}function ve(t,e,i,n,o,a){var r=0,s=0,l=1;if(a(t,e[i+o])>0){for(s=n-o;l0;)r=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),r+=o,l+=o}else{for(s=o+1;ls&&(l=s);var u=r;r=o-l,l=o-u}for(r++;r>>1);a(t,e[i+h])>0?r=h+1:l=h}return l}function ye(t,e,i,n,o,a){var r=0,s=0,l=1;if(a(t,e[i+o])<0){for(s=o+1;ls&&(l=s);var u=r;r=o-l,l=o-u}else{for(s=n-o;l=0;)r=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),r+=o,l+=o}for(r++;r>>1);a(t,e[i+h])<0?l=h:r=h+1}return l}function xe(t,e){function i(i){var s=a[i],u=r[i],h=a[i+1],c=r[i+1];r[i]=u+c,i===l-3&&(a[i+1]=a[i+2],r[i+1]=r[i+2]),l--;var d=ye(t[h],t,s,u,0,e);s+=d,0!==(u-=d)&&0!==(c=ve(t[s+u-1],t,h,c,c-1,e))&&(u<=c?n(s,u,h,c):o(s,u,h,c))}function n(i,n,o,a){var r=0;for(r=0;r=ib||f>=ib);if(p)break;g<0&&(g=0),g+=2}if((s=g)<1&&(s=1),1===n){for(r=0;r=0;r--)t[f+r]=t[d+r];if(0===n){v=!0;break}}if(t[c--]=u[h--],1==--a){v=!0;break}if(0!=(m=a-ve(t[l],u,0,a,a-1,e))){for(a-=m,f=(c-=m)+1,d=(h-=m)+1,r=0;r=ib||m>=ib);if(v)break;p<0&&(p=0),p+=2}if((s=p)<1&&(s=1),1===a){for(f=(c-=n)+1,d=(l-=n)+1,r=n-1;r>=0;r--)t[f+r]=t[d+r];t[c]=u[h]}else{if(0===a)throw new Error;for(d=c-(a-1),r=0;r=0;r--)t[f+r]=t[d+r];t[c]=u[h]}else for(d=c-(a-1),r=0;r1;){var t=l-2;if(t>=1&&r[t-1]<=r[t]+r[t+1]||t>=2&&r[t-2]<=r[t]+r[t-1])r[t-1]r[t+1])break;i(t)}},this.forceMergeRuns=function(){for(;l>1;){var t=l-2;t>0&&r[t-1]s&&(l=s),me(t,i,i+l,i+a,e),a=l}r.pushRun(i,a),r.mergeRuns(),o-=a,i+=a}while(0!==o);r.forceMergeRuns()}}function we(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}function be(t,e,i){var n=null==e.x?0:e.x,o=null==e.x2?1:e.x2,a=null==e.y?0:e.y,r=null==e.y2?0:e.y2;return e.global||(n=n*i.width+i.x,o=o*i.width+i.x,a=a*i.height+i.y,r=r*i.height+i.y),n=isNaN(n)?0:n,o=isNaN(o)?1:o,a=isNaN(a)?0:a,r=isNaN(r)?0:r,t.createLinearGradient(n,a,o,r)}function Se(t,e,i){var n=i.width,o=i.height,a=Math.min(n,o),r=null==e.x?.5:e.x,s=null==e.y?.5:e.y,l=null==e.r?.5:e.r;return e.global||(r=r*n+i.x,s=s*o+i.y,l*=a),t.createRadialGradient(r,s,0,r,s,l)}function Me(){return!1}function Ie(t,e,i){var n=iw(),o=e.getWidth(),a=e.getHeight(),r=n.style;return r&&(r.position="absolute",r.left=0,r.top=0,r.width=o+"px",r.height=a+"px",n.setAttribute("data-zr-dom-id",t)),n.width=o*i,n.height=a*i,n}function Te(t){if("string"==typeof t){var e=mb.get(t);return e&&e.image}return t}function Ae(t,e,i,n,o){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!i)return e;var a=mb.get(t),r={hostEl:i,cb:n,cbPayload:o};return a?!Ce(e=a.image)&&a.pending.push(r):((e=new Image).onload=e.onerror=De,mb.put(t,e.__cachedImgObj={image:e,pending:[r]}),e.src=e.__zrImageSrc=t),e}return t}return e}function De(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;exb&&(yb=0,vb={}),yb++,vb[i]=o,o}function ke(t,e,i,n,o,a,r,s){return r?Ne(t,e,i,n,o,a,r,s):Pe(t,e,i,n,o,a,s)}function Pe(t,e,i,n,o,a,r){var s=He(t,e,o,a,r),l=Le(t,e);o&&(l+=o[1]+o[3]);var u=s.outerHeight,h=new de(Oe(0,l,i),Ee(0,u,n),l,u);return h.lineHeight=s.lineHeight,h}function Ne(t,e,i,n,o,a,r,s){var l=Ze(t,{rich:r,truncate:s,font:e,textAlign:i,textPadding:o,textLineHeight:a}),u=l.outerWidth,h=l.outerHeight;return new de(Oe(0,u,i),Ee(0,h,n),u,h)}function Oe(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function Ee(t,e,i){return"middle"===i?t-=e/2:"bottom"===i&&(t-=e),t}function Re(t,e,i){var n=e.x,o=e.y,a=e.height,r=e.width,s=a/2,l="left",u="top";switch(t){case"left":n-=i,o+=s,l="right",u="middle";break;case"right":n+=i+r,o+=s,u="middle";break;case"top":n+=r/2,o-=i,l="center",u="bottom";break;case"bottom":n+=r/2,o+=a+i,l="center";break;case"inside":n+=r/2,o+=s,l="center",u="middle";break;case"insideLeft":n+=i,o+=s,u="middle";break;case"insideRight":n+=r-i,o+=s,l="right",u="middle";break;case"insideTop":n+=r/2,o+=i,l="center";break;case"insideBottom":n+=r/2,o+=a-i,l="center",u="bottom";break;case"insideTopLeft":n+=i,o+=i;break;case"insideTopRight":n+=r-i,o+=i,l="right";break;case"insideBottomLeft":n+=i,o+=a-i,u="bottom";break;case"insideBottomRight":n+=r-i,o+=a-i,l="right",u="bottom"}return{x:n,y:o,textAlign:l,textVerticalAlign:u}}function ze(t,e,i,n,o){if(!e)return"";var a=(t+"").split("\n");o=Be(e,i,n,o);for(var r=0,s=a.length;r=r;l++)s-=r;var u=Le(i,e);return u>s&&(i="",u=0),s=t-u,n.ellipsis=i,n.ellipsisWidth=u,n.contentWidth=s,n.containerWidth=t,n}function Ve(t,e){var i=e.containerWidth,n=e.font,o=e.contentWidth;if(!i)return"";var a=Le(t,n);if(a<=i)return t;for(var r=0;;r++){if(a<=o||r>=e.maxIterations){t+=e.ellipsis;break}var s=0===r?Ge(t,o,e.ascCharWidth,e.cnCharWidth):a>0?Math.floor(t.length*o/a):0;a=Le(t=t.substr(0,s),n)}return""===t&&(t=e.placeholder),t}function Ge(t,e,i,n){for(var o=0,a=0,r=t.length;au)t="",r=[];else if(null!=h)for(var c=Be(h-(i?i[1]+i[3]:0),e,o.ellipsis,{minChar:o.minChar,placeholder:o.placeholder}),d=0,f=r.length;do&&Ue(i,t.substring(o,a)),Ue(i,n[2],n[1]),o=_b.lastIndex}of)return{lines:[],width:0,height:0};k.textWidth=Le(k.text,_);var b=y.textWidth,S=null==b||"auto"===b;if("string"==typeof b&&"%"===b.charAt(b.length-1))k.percentWidth=b,u.push(k),b=0;else{if(S){b=k.textWidth;var M=y.textBackgroundColor,I=M&&M.image;I&&Ce(I=Te(I))&&(b=Math.max(b,I.width*w/I.height))}var T=x?x[1]+x[3]:0;b+=T;var C=null!=d?d-m:null;null!=C&&Cl&&(i*=l/(c=i+n),n*=l/c),o+a>l&&(o*=l/(c=o+a),a*=l/c),n+o>u&&(n*=u/(c=n+o),o*=u/c),i+a>u&&(i*=u/(c=i+a),a*=u/c),t.moveTo(r+i,s),t.lineTo(r+l-n,s),0!==n&&t.arc(r+l-n,s+n,n,-Math.PI/2,0),t.lineTo(r+l,s+u-o),0!==o&&t.arc(r+l-o,s+u-o,o,0,Math.PI/2),t.lineTo(r+a,s+u),0!==a&&t.arc(r+a,s+u-a,a,Math.PI/2,Math.PI),t.lineTo(r,s+i),0!==i&&t.arc(r+i,s+i,i,Math.PI,1.5*Math.PI)}function Ye(t){return qe(t),d(t.rich,qe),t}function qe(t){if(t){t.font=Xe(t);var e=t.textAlign;"middle"===e&&(e="center"),t.textAlign=null==e||Mb[e]?e:"left";var i=t.textVerticalAlign||t.textBaseline;"center"===i&&(i="middle"),t.textVerticalAlign=null==i||Ib[i]?i:"top",t.textPadding&&(t.textPadding=L(t.textPadding))}}function Ke(t,e,i,n,o,a){n.rich?Je(t,e,i,n,o,a):$e(t,e,i,n,o,a)}function $e(t,e,i,n,o,a){var r,s=ii(n),l=!1,u=e.__attrCachedBy===rb.PLAIN_TEXT;a!==sb?(a&&(r=a.style,l=!s&&u&&r),e.__attrCachedBy=s?rb.NONE:rb.PLAIN_TEXT):u&&(e.__attrCachedBy=rb.NONE);var h=n.font||Sb;l&&h===(r.font||Sb)||(e.font=h);var c=t.__computedFont;t.__styleFont!==h&&(t.__styleFont=h,c=t.__computedFont=e.font);var d=n.textPadding,f=n.textLineHeight,p=t.__textCotentBlock;p&&!t.__dirtyText||(p=t.__textCotentBlock=He(i,c,d,f,n.truncate));var g=p.outerHeight,m=p.lines,v=p.lineHeight,y=ai(g,n,o),x=y.baseX,_=y.baseY,w=y.textAlign||"left",b=y.textVerticalAlign;ti(e,n,o,x,_);var S=Ee(_,g,b),M=x,I=S;if(s||d){var T=Le(i,c);d&&(T+=d[1]+d[3]);var A=Oe(x,T,w);s&&ni(t,e,n,A,S,T,g),d&&(M=hi(x,w,d),I+=d[0])}e.textAlign=w,e.textBaseline="middle",e.globalAlpha=n.opacity||1;for(B=0;B=0&&"right"===(_=b[C]).textAlign;)ei(t,e,_,n,M,v,D,"right"),I-=_.width,D-=_.width,C--;for(A+=(a-(A-m)-(y-D)-I)/2;T<=C;)ei(t,e,_=b[T],n,M,v,A+_.width/2,"center"),A+=_.width,T++;v+=M}}function ti(t,e,i,n,o){if(i&&e.textRotation){var a=e.textOrigin;"center"===a?(n=i.width/2+i.x,o=i.height/2+i.y):a&&(n=a[0]+i.x,o=a[1]+i.y),t.translate(n,o),t.rotate(-e.textRotation),t.translate(-n,-o)}}function ei(t,e,i,n,o,a,r,s){var l=n.rich[i.styleName]||{};l.text=i.text;var u=i.textVerticalAlign,h=a+o/2;"top"===u?h=a+i.height/2:"bottom"===u&&(h=a+o-i.height/2),!i.isLineHolder&&ii(l)&&ni(t,e,l,"right"===s?r-i.width:"center"===s?r-i.width/2:r,h-i.height/2,i.width,i.height);var c=i.textPadding;c&&(r=hi(r,s,c),h-=i.height/2-c[2]-i.textHeight/2),ri(e,"shadowBlur",D(l.textShadowBlur,n.textShadowBlur,0)),ri(e,"shadowColor",l.textShadowColor||n.textShadowColor||"transparent"),ri(e,"shadowOffsetX",D(l.textShadowOffsetX,n.textShadowOffsetX,0)),ri(e,"shadowOffsetY",D(l.textShadowOffsetY,n.textShadowOffsetY,0)),ri(e,"textAlign",s),ri(e,"textBaseline","middle"),ri(e,"font",i.font||Sb);var d=si(l.textStroke||n.textStroke,p),f=li(l.textFill||n.textFill),p=A(l.textStrokeWidth,n.textStrokeWidth);d&&(ri(e,"lineWidth",p),ri(e,"strokeStyle",d),e.strokeText(i.text,r,h)),f&&(ri(e,"fillStyle",f),e.fillText(i.text,r,h))}function ii(t){return!!(t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor)}function ni(t,e,i,n,o,a,r){var s=i.textBackgroundColor,l=i.textBorderWidth,u=i.textBorderColor,h=_(s);if(ri(e,"shadowBlur",i.textBoxShadowBlur||0),ri(e,"shadowColor",i.textBoxShadowColor||"transparent"),ri(e,"shadowOffsetX",i.textBoxShadowOffsetX||0),ri(e,"shadowOffsetY",i.textBoxShadowOffsetY||0),h||l&&u){e.beginPath();var c=i.textBorderRadius;c?je(e,{x:n,y:o,width:a,height:r,r:c}):e.rect(n,o,a,r),e.closePath()}if(h)if(ri(e,"fillStyle",s),null!=i.fillOpacity){f=e.globalAlpha;e.globalAlpha=i.fillOpacity*i.opacity,e.fill(),e.globalAlpha=f}else e.fill();else if(w(s)){var d=s.image;(d=Ae(d,null,t,oi,s))&&Ce(d)&&e.drawImage(d,n,o,a,r)}if(l&&u)if(ri(e,"lineWidth",l),ri(e,"strokeStyle",u),null!=i.strokeOpacity){var f=e.globalAlpha;e.globalAlpha=i.strokeOpacity*i.opacity,e.stroke(),e.globalAlpha=f}else e.stroke()}function oi(t,e){e.image=t}function ai(t,e,i){var n=e.x||0,o=e.y||0,a=e.textAlign,r=e.textVerticalAlign;if(i){var s=e.textPosition;if(s instanceof Array)n=i.x+ui(s[0],i.width),o=i.y+ui(s[1],i.height);else{var l=Re(s,i,e.textDistance);n=l.x,o=l.y,a=a||l.textAlign,r=r||l.textVerticalAlign}var u=e.textOffset;u&&(n+=u[0],o+=u[1])}return{baseX:n,baseY:o,textAlign:a,textVerticalAlign:r}}function ri(t,e,i){return t[e]=ab(t,e,i),t[e]}function si(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function li(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function ui(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function hi(t,e,i){return"right"===e?t-i[1]:"center"===e?t+i[3]/2-i[1]/2:t+i[3]}function ci(t,e){return null!=t&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)}function di(t){t=t||{},Kw.call(this,t);for(var e in t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new ub(t.style,this),this._rect=null,this.__clipPaths=[]}function fi(t){di.call(this,t)}function pi(t){return parseInt(t,10)}function gi(t){return!!t&&(!!t.__builtin__||"function"==typeof t.resize&&"function"==typeof t.refresh)}function mi(t,e,i){return Cb.copy(t.getBoundingRect()),t.transform&&Cb.applyTransform(t.transform),Lb.width=e,Lb.height=i,!Cb.intersect(Lb)}function vi(t,e){if(t===e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var i=0;i=i.length&&i.push({option:t})}}),i}function Ni(t){var e=R();Zb(t,function(t,i){var n=t.exist;n&&e.set(n.id,t)}),Zb(t,function(t,i){var n=t.option;k(!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={})}),Zb(t,function(t,i){var n=t.exist,o=t.option,a=t.keyInfo;if(Ub(o)){if(a.name=null!=o.name?o.name+"":n?n.name:jb+i,n)a.id=n.id;else if(null!=o.id)a.id=o.id+"";else{var r=0;do{a.id="\0"+a.name+"\0"+r++}while(e.get(a.id))}e.set(a.id,t)}})}function Oi(t){var e=t.name;return!(!e||!e.indexOf(jb))}function Ei(t){return Ub(t)&&t.id&&0===(t.id+"").indexOf("\0_ec_\0")}function Ri(t,e){function i(t,e,i){for(var n=0,o=t.length;n-rS&&trS||t<-rS}function tn(t,e,i,n,o){var a=1-o;return a*a*(a*t+3*o*e)+o*o*(o*n+3*a*i)}function en(t,e,i,n,o){var a=1-o;return 3*(((e-t)*a+2*(i-e)*o)*a+(n-i)*o*o)}function nn(t,e,i,n,o,a){var r=n+3*(e-i)-t,s=3*(i-2*e+t),l=3*(e-t),u=t-o,h=s*s-3*r*l,c=s*l-9*r*u,d=l*l-3*s*u,f=0;if(Ji(h)&&Ji(c))Ji(s)?a[0]=0:(M=-l/s)>=0&&M<=1&&(a[f++]=M);else{var p=c*c-4*h*d;if(Ji(p)){var g=c/h,m=-g/2;(M=-s/r+g)>=0&&M<=1&&(a[f++]=M),m>=0&&m<=1&&(a[f++]=m)}else if(p>0){var v=aS(p),y=h*s+1.5*r*(-c+v),x=h*s+1.5*r*(-c-v);(M=(-s-((y=y<0?-oS(-y,uS):oS(y,uS))+(x=x<0?-oS(-x,uS):oS(x,uS))))/(3*r))>=0&&M<=1&&(a[f++]=M)}else{var _=(2*h*s-3*r*c)/(2*aS(h*h*h)),w=Math.acos(_)/3,b=aS(h),S=Math.cos(w),M=(-s-2*b*S)/(3*r),m=(-s+b*(S+lS*Math.sin(w)))/(3*r),I=(-s+b*(S-lS*Math.sin(w)))/(3*r);M>=0&&M<=1&&(a[f++]=M),m>=0&&m<=1&&(a[f++]=m),I>=0&&I<=1&&(a[f++]=I)}}return f}function on(t,e,i,n,o){var a=6*i-12*e+6*t,r=9*e+3*n-3*t-9*i,s=3*e-3*t,l=0;if(Ji(r))Qi(a)&&(c=-s/a)>=0&&c<=1&&(o[l++]=c);else{var u=a*a-4*r*s;if(Ji(u))o[0]=-a/(2*r);else if(u>0){var h=aS(u),c=(-a+h)/(2*r),d=(-a-h)/(2*r);c>=0&&c<=1&&(o[l++]=c),d>=0&&d<=1&&(o[l++]=d)}}return l}function an(t,e,i,n,o,a){var r=(e-t)*o+t,s=(i-e)*o+e,l=(n-i)*o+i,u=(s-r)*o+r,h=(l-s)*o+s,c=(h-u)*o+u;a[0]=t,a[1]=r,a[2]=u,a[3]=c,a[4]=c,a[5]=h,a[6]=l,a[7]=n}function rn(t,e,i,n,o,a,r,s,l,u,h){var c,d,f,p,g,m=.005,v=1/0;hS[0]=l,hS[1]=u;for(var y=0;y<1;y+=.05)cS[0]=tn(t,i,o,r,y),cS[1]=tn(e,n,a,s,y),(p=hw(hS,cS))=0&&p=0&&c<=1&&(o[l++]=c);else{var u=r*r-4*a*s;if(Ji(u))(c=-r/(2*a))>=0&&c<=1&&(o[l++]=c);else if(u>0){var h=aS(u),c=(-r+h)/(2*a),d=(-r-h)/(2*a);c>=0&&c<=1&&(o[l++]=c),d>=0&&d<=1&&(o[l++]=d)}}return l}function hn(t,e,i){var n=t+i-2*e;return 0===n?.5:(t-e)/n}function cn(t,e,i,n,o){var a=(e-t)*n+t,r=(i-e)*n+e,s=(r-a)*n+a;o[0]=t,o[1]=a,o[2]=s,o[3]=s,o[4]=r,o[5]=i}function dn(t,e,i,n,o,a,r,s,l){var u,h=.005,c=1/0;hS[0]=r,hS[1]=s;for(var d=0;d<1;d+=.05)cS[0]=sn(t,i,o,d),cS[1]=sn(e,n,a,d),(m=hw(hS,cS))=0&&m1e-4)return s[0]=t-i,s[1]=e-n,l[0]=t+i,void(l[1]=e+n);if(yS[0]=mS(o)*i+t,yS[1]=gS(o)*n+e,xS[0]=mS(a)*i+t,xS[1]=gS(a)*n+e,u(s,yS,xS),h(l,yS,xS),(o%=vS)<0&&(o+=vS),(a%=vS)<0&&(a+=vS),o>a&&!r?a+=vS:oo&&(_S[0]=mS(f)*i+t,_S[1]=gS(f)*n+e,u(s,_S,s),h(l,_S,l))}function yn(t,e,i,n,o,a,r){if(0===o)return!1;var s=o,l=0,u=t;if(r>e+s&&r>n+s||rt+s&&a>i+s||ae+c&&h>n+c&&h>a+c&&h>s+c||ht+c&&u>i+c&&u>o+c&&u>r+c||ue+u&&l>n+u&&l>a+u||lt+u&&s>i+u&&s>o+u||si||h+uo&&(o+=zS);var d=Math.atan2(l,s);return d<0&&(d+=zS),d>=n&&d<=o||d+zS>=n&&d+zS<=o}function Sn(t,e,i,n,o,a){if(a>e&&a>n||ao?r:0}function Mn(t,e){return Math.abs(t-e)e&&u>n&&u>a&&u>s||u1&&In(),c=tn(e,n,a,s,WS[0]),p>1&&(d=tn(e,n,a,s,WS[1]))),2===p?me&&s>n&&s>a||s=0&&u<=1){for(var h=0,c=sn(e,n,a,u),d=0;di||s<-i)return 0;u=Math.sqrt(i*i-s*s);FS[0]=-u,FS[1]=u;var l=Math.abs(n-o);if(l<1e-4)return 0;if(l%VS<1e-4){n=0,o=VS;p=a?1:-1;return r>=FS[0]+t&&r<=FS[1]+t?p:0}if(a){var u=n;n=wn(o),o=wn(u)}else n=wn(n),o=wn(o);n>o&&(o+=VS);for(var h=0,c=0;c<2;c++){var d=FS[c];if(d+t>r){var f=Math.atan2(s,d),p=a?1:-1;f<0&&(f=VS+f),(f>=n&&f<=o||f+VS>=n&&f+VS<=o)&&(f>Math.PI/2&&f<1.5*Math.PI&&(p=-p),h+=p)}}return h}function Cn(t,e,i,n,o){for(var a=0,r=0,s=0,l=0,u=0,h=0;h1&&(i||(a+=Sn(r,s,l,u,n,o))),1===h&&(l=r=t[h],u=s=t[h+1]),c){case BS.M:r=l=t[h++],s=u=t[h++];break;case BS.L:if(i){if(yn(r,s,t[h],t[h+1],e,n,o))return!0}else a+=Sn(r,s,t[h],t[h+1],n,o)||0;r=t[h++],s=t[h++];break;case BS.C:if(i){if(xn(r,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],e,n,o))return!0}else a+=Tn(r,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],n,o)||0;r=t[h++],s=t[h++];break;case BS.Q:if(i){if(_n(r,s,t[h++],t[h++],t[h],t[h+1],e,n,o))return!0}else a+=An(r,s,t[h++],t[h++],t[h],t[h+1],n,o)||0;r=t[h++],s=t[h++];break;case BS.A:var d=t[h++],f=t[h++],p=t[h++],g=t[h++],m=t[h++],v=t[h++];h+=1;var y=1-t[h++],x=Math.cos(m)*p+d,_=Math.sin(m)*g+f;h>1?a+=Sn(r,s,x,_,n,o):(l=x,u=_);var w=(n-d)*g/p+d;if(i){if(bn(d,f,g,m,m+v,y,e,w,o))return!0}else a+=Dn(d,f,g,m,m+v,y,w,o);r=Math.cos(m+v)*p+d,s=Math.sin(m+v)*g+f;break;case BS.R:l=r=t[h++],u=s=t[h++];var x=l+t[h++],_=u+t[h++];if(i){if(yn(l,u,x,u,e,n,o)||yn(x,u,x,_,e,n,o)||yn(x,_,l,_,e,n,o)||yn(l,_,l,u,e,n,o))return!0}else a+=Sn(x,u,x,_,n,o),a+=Sn(l,_,l,u,n,o);break;case BS.Z:if(i){if(yn(r,s,l,u,e,n,o))return!0}else a+=Sn(r,s,l,u,n,o);r=l,s=u}}return i||Mn(s,u)||(a+=Sn(r,s,l,u,n,o)||0),0!==a}function Ln(t,e,i){return Cn(t,0,!1,e,i)}function kn(t,e,i,n){return Cn(t,e,!0,i,n)}function Pn(t){di.call(this,t),this.path=null}function Nn(t,e,i,n,o,a,r,s,l,u,h){var c=l*(tM/180),d=QS(c)*(t-i)/2+JS(c)*(e-n)/2,f=-1*JS(c)*(t-i)/2+QS(c)*(e-n)/2,p=d*d/(r*r)+f*f/(s*s);p>1&&(r*=$S(p),s*=$S(p));var g=(o===a?-1:1)*$S((r*r*(s*s)-r*r*(f*f)-s*s*(d*d))/(r*r*(f*f)+s*s*(d*d)))||0,m=g*r*f/s,v=g*-s*d/r,y=(t+i)/2+QS(c)*m-JS(c)*v,x=(e+n)/2+JS(c)*m+QS(c)*v,_=nM([1,0],[(d-m)/r,(f-v)/s]),w=[(d-m)/r,(f-v)/s],b=[(-1*d-m)/r,(-1*f-v)/s],S=nM(w,b);iM(w,b)<=-1&&(S=tM),iM(w,b)>=1&&(S=0),0===a&&S>0&&(S-=2*tM),1===a&&S<0&&(S+=2*tM),h.addData(u,y,x,r,s,_,S,c,a)}function On(t){if(!t)return new ES;for(var e,i=0,n=0,o=i,a=n,r=new ES,s=ES.CMD,l=t.match(oM),u=0;u=2){if(o&&"spline"!==o){var a=fM(n,o,i,e.smoothConstraint);t.moveTo(n[0][0],n[0][1]);for(var r=n.length,s=0;s<(i?r:r-1);s++){var l=a[2*s],u=a[2*s+1],h=n[(s+1)%r];t.bezierCurveTo(l[0],l[1],u[0],u[1],h[0],h[1])}}else{"spline"===o&&(n=dM(n,i)),t.moveTo(n[0][0],n[0][1]);for(var s=1,c=n.length;s=0)?(i={textFill:null,textStroke:t.textStroke,textStrokeWidth:t.textStrokeWidth},t.textFill="#fff",null==t.textStroke&&(t.textStroke=a,null==t.textStrokeWidth&&(t.textStrokeWidth=2))):null!=a&&(i={textFill:null},t.textFill=a),i&&(t.insideRollback=i)}}function bo(t){var e=t.insideRollback;e&&(t.textFill=e.textFill,t.textStroke=e.textStroke,t.textStrokeWidth=e.textStrokeWidth,t.insideRollback=null)}function So(t,e){var i=e||e.getModel("textStyle");return P([t.fontStyle||i&&i.getShallow("fontStyle")||"",t.fontWeight||i&&i.getShallow("fontWeight")||"",(t.fontSize||i&&i.getShallow("fontSize")||12)+"px",t.fontFamily||i&&i.getShallow("fontFamily")||"sans-serif"].join(" "))}function Mo(t,e,i,n,o,a){if("function"==typeof o&&(a=o,o=null),n&&n.isAnimationEnabled()){var r=t?"Update":"",s=n.getShallow("animationDuration"+r),l=n.getShallow("animationEasing"+r),u=n.getShallow("animationDelay"+r);"function"==typeof u&&(u=u(o,n.getAnimationDelayParams?n.getAnimationDelayParams(e,o):null)),"function"==typeof s&&(s=s(o)),s>0?e.animateTo(i,s,u||0,l,a,!!a):(e.stopAnimation(),e.attr(i),a&&a())}else e.stopAnimation(),e.attr(i),a&&a()}function Io(t,e,i,n,o){Mo(!0,t,e,i,n,o)}function To(t,e,i,n,o){Mo(!1,t,e,i,n,o)}function Ao(t,e){for(var i=_t([]);t&&t!==e;)bt(i,t.getLocalTransform(),i),t=t.parent;return i}function Do(t,e,i){return e&&!c(e)&&(e=Tw.getLocalTransform(e)),i&&(e=Tt([],e)),Q([],t,e)}function Co(t,e,i){var n=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),o=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),a=["left"===t?-n:"right"===t?n:0,"top"===t?-o:"bottom"===t?o:0];return a=Do(a,e,i),Math.abs(a[0])>Math.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function Lo(t,e,i,n){function o(t){var e={position:F(t.position),rotation:t.rotation};return t.shape&&(e.shape=a({},t.shape)),e}if(t&&e){var r=function(t){var e={};return t.traverse(function(t){!t.isGroup&&t.anid&&(e[t.anid]=t)}),e}(t);e.traverse(function(t){if(!t.isGroup&&t.anid){var e=r[t.anid];if(e){var n=o(t);t.attr(o(e)),Io(t,n,i,t.dataIndex)}}})}}function ko(t,e){return f(t,function(t){var i=t[0];i=LM(i,e.x),i=kM(i,e.x+e.width);var n=t[1];return n=LM(n,e.y),n=kM(n,e.y+e.height),[i,n]})}function Po(t,e,i){var n=(e=a({rectHover:!0},e)).style={strokeNoScale:!0};if(i=i||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(n.image=t.slice(8),r(n,i),new fi(e)):Xn(t.replace("path://",""),e,i,"center")}function No(t,e,i){this.parentModel=e,this.ecModel=i,this.option=t}function Oo(t,e,i){for(var n=0;n0){if(t<=e[0])return i[0];if(t>=e[1])return i[1]}else{if(t>=e[0])return i[0];if(t<=e[1])return i[1]}else{if(t===e[0])return i[0];if(t===e[1])return i[1]}return(t-e[0])/o*a+i[0]}function Vo(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?zo(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t}function Go(t,e,i){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),i?t:+t}function Fo(t){return t.sort(function(t,e){return t-e}),t}function Wo(t){if(t=+t,isNaN(t))return 0;for(var e=1,i=0;Math.round(t*e)/e!==t;)e*=10,i++;return i}function Ho(t){var e=t.toString(),i=e.indexOf("e");if(i>0){var n=+e.slice(i+1);return n<0?-n:0}var o=e.indexOf(".");return o<0?0:e.length-1-o}function Zo(t,e){var i=Math.log,n=Math.LN10,o=Math.floor(i(t[1]-t[0])/n),a=Math.round(i(Math.abs(e[1]-e[0]))/n),r=Math.min(Math.max(-o+a,0),20);return isFinite(r)?r:20}function Uo(t,e,i){if(!t[e])return 0;var n=p(t,function(t,e){return t+(isNaN(e)?0:e)},0);if(0===n)return 0;for(var o=Math.pow(10,i),a=f(t,function(t){return(isNaN(t)?0:t)/n*o*100}),r=100*o,s=f(a,function(t){return Math.floor(t)}),l=p(s,function(t,e){return t+e},0),u=f(a,function(t,e){return t-s[e]});lh&&(h=u[d],c=d);++s[c],u[c]=0,++l}return s[e]/o}function Xo(t){var e=2*Math.PI;return(t%e+e)%e}function jo(t){return t>-UM&&t=-20?+t.toFixed(n<0?-n:0):t}function Jo(t){function e(t,i,n){return t.interval[n]=0}function ta(t){return isNaN(t)?"-":(t=(t+"").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function ea(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 ia(t){return null==t?"":(t+"").replace(KM,function(t,e){return $M[e]})}function na(t,e,i){y(e)||(e=[e]);var n=e.length;if(!n)return"";for(var o=e[0].$vars||[],a=0;a':'':{renderMode:o,content:"{marker"+a+"|} ",style:{color:i}}:""}function ra(t,e){return t+="","0000".substr(0,e-t.length)+t}function sa(t,e,i){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var n=Yo(e),o=i?"UTC":"",a=n["get"+o+"FullYear"](),r=n["get"+o+"Month"]()+1,s=n["get"+o+"Date"](),l=n["get"+o+"Hours"](),u=n["get"+o+"Minutes"](),h=n["get"+o+"Seconds"](),c=n["get"+o+"Milliseconds"]();return t=t.replace("MM",ra(r,2)).replace("M",r).replace("yyyy",a).replace("yy",a%100).replace("dd",ra(s,2)).replace("d",s).replace("hh",ra(l,2)).replace("h",l).replace("mm",ra(u,2)).replace("m",u).replace("ss",ra(h,2)).replace("s",h).replace("SSS",ra(c,3))}function la(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t}function ua(t,e,i,n,o){var a=0,r=0;null==n&&(n=1/0),null==o&&(o=1/0);var s=0;e.eachChild(function(l,u){var h,c,d=l.position,f=l.getBoundingRect(),p=e.childAt(u+1),g=p&&p.getBoundingRect();if("horizontal"===t){var m=f.width+(g?-g.x+f.x:0);(h=a+m)>n||l.newline?(a=0,h=m,r+=s+i,s=f.height):s=Math.max(s,f.height)}else{var v=f.height+(g?-g.y+f.y:0);(c=r+v)>o||l.newline?(a+=s+i,r=0,c=v,s=f.width):s=Math.max(s,f.width)}l.newline||(d[0]=a,d[1]=r,"horizontal"===t?a=h+i:r=c+i)})}function ha(t,e,i){var n=e.width,o=e.height,a=Vo(t.x,n),r=Vo(t.y,o),s=Vo(t.x2,n),l=Vo(t.y2,o);return(isNaN(a)||isNaN(parseFloat(t.x)))&&(a=0),(isNaN(s)||isNaN(parseFloat(t.x2)))&&(s=n),(isNaN(r)||isNaN(parseFloat(t.y)))&&(r=0),(isNaN(l)||isNaN(parseFloat(t.y2)))&&(l=o),i=qM(i||0),{width:Math.max(s-a-i[1]-i[3],0),height:Math.max(l-r-i[0]-i[2],0)}}function ca(t,e,i){i=qM(i||0);var n=e.width,o=e.height,a=Vo(t.left,n),r=Vo(t.top,o),s=Vo(t.right,n),l=Vo(t.bottom,o),u=Vo(t.width,n),h=Vo(t.height,o),c=i[2]+i[0],d=i[1]+i[3],f=t.aspect;switch(isNaN(u)&&(u=n-s-d-a),isNaN(h)&&(h=o-l-c-r),null!=f&&(isNaN(u)&&isNaN(h)&&(f>n/o?u=.8*n:h=.8*o),isNaN(u)&&(u=f*h),isNaN(h)&&(h=u/f)),isNaN(a)&&(a=n-s-u-d),isNaN(r)&&(r=o-l-h-c),t.left||t.right){case"center":a=n/2-u/2-i[3];break;case"right":a=n-u-d}switch(t.top||t.bottom){case"middle":case"center":r=o/2-h/2-i[0];break;case"bottom":r=o-h-c}a=a||0,r=r||0,isNaN(u)&&(u=n-d-a-(s||0)),isNaN(h)&&(h=o-c-r-(l||0));var p=new de(a+i[3],r+i[0],u,h);return p.margin=i,p}function da(t,e,i,n,o){var a=!o||!o.hv||o.hv[0],s=!o||!o.hv||o.hv[1],l=o&&o.boundingMode||"all";if(a||s){var u;if("raw"===l)u="group"===t.type?new de(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(u=t.getBoundingRect(),t.needLocalTransform()){var h=t.getLocalTransform();(u=u.clone()).applyTransform(h)}e=ca(r({width:u.width,height:u.height},e),i,n);var c=t.position,d=a?e.x-u.x:0,f=s?e.y-u.y:0;t.attr("position","raw"===l?[d,f]:[c[0]+d,c[1]+f])}}function fa(t,e){return null!=t[oI[e][0]]||null!=t[oI[e][1]]&&null!=t[oI[e][2]]}function pa(t,e,i){function n(i,n){var r={},l=0,u={},h=0;if(iI(i,function(e){u[e]=t[e]}),iI(i,function(t){o(e,t)&&(r[t]=u[t]=e[t]),a(r,t)&&l++,a(u,t)&&h++}),s[n])return a(e,i[1])?u[i[2]]=null:a(e,i[2])&&(u[i[1]]=null),u;if(2!==h&&l){if(l>=2)return r;for(var c=0;ce)return t[n];return t[i-1]}function ya(t){var e=t.get("coordinateSystem"),i={coordSysName:e,coordSysDims:[],axisMap:R(),categoryAxisMap:R()},n=fI[e];if(n)return n(t,i,i.axisMap,i.categoryAxisMap),i}function xa(t){return"category"===t.get("type")}function _a(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===vI?{}:[]),this.sourceFormat=t.sourceFormat||yI,this.seriesLayoutBy=t.seriesLayoutBy||_I,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&R(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}function wa(t){var e=t.option.source,i=yI;if(S(e))i=xI;else if(y(e)){0===e.length&&(i=gI);for(var n=0,o=e.length;n=e:"max"===i?t<=e:t===e}function Xa(t,e){return t.join(",")===e.join(",")}function ja(t,e){AI(e=e||{},function(e,i){if(null!=e){var n=t[i];if(lI.hasClass(i)){e=Di(e);var o=Pi(n=Di(n),e);t[i]=CI(o,function(t){return t.option&&t.exist?LI(t.exist,t.option,!0):t.exist||t.option})}else t[i]=LI(n,e,!0)}})}function Ya(t){var e=t&&t.itemStyle;if(e)for(var i=0,o=OI.length;i=0;p--){var g=t[p];if(s||(d=g.data.rawIndexOf(g.stackedByDimension,c)),d>=0){var m=g.data.getByRawIndex(g.stackResultDimension,d);if(h>=0&&m>0||h<=0&&m<0){h+=m,f=m;break}}}return n[0]=h,n[1]=f,n});r.hostModel.setData(l),e.data=l})}function rr(t,e){_a.isInstance(t)||(t=_a.seriesDataToSource(t)),this._source=t;var i=this._data=t.data,n=t.sourceFormat;n===xI&&(this._offset=0,this._dimSize=e,this._data=i),a(this,GI[n===gI?n+"_"+t.seriesLayoutBy:n])}function sr(){return this._data.length}function lr(t){return this._data[t]}function ur(t){for(var e=0;ee.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function Mr(t,e){d(t.CHANGABLE_METHODS,function(i){t.wrapMethod(i,v(Ir,e))})}function Ir(t){var e=Tr(t);e&&e.setOutputEnd(this.count())}function Tr(t){var e=(t.ecModel||{}).scheduler,i=e&&e.getPipeline(t.uid);if(i){var n=i.currentTask;if(n){var o=n.agentStubMap;o&&(n=o.get(t.uid))}return n}}function Ar(){this.group=new tb,this.uid=Ro("viewChart"),this.renderTask=gr({plan:Lr,reset:kr}),this.renderTask.context={view:this}}function Dr(t,e){if(t&&(t.trigger(e),"group"===t.type))for(var i=0;i=0?n():c=setTimeout(n,-a),u=o};return d.clear=function(){c&&(clearTimeout(c),c=null)},d.debounceNextCall=function(t){l=t},d}function Nr(t,e,i,n){var o=t[e];if(o){var a=o[iT]||o,r=o[oT];if(o[nT]!==i||r!==n){if(null==i||!n)return t[e]=a;(o=t[e]=Pr(a,i,"debounce"===n))[iT]=a,o[oT]=n,o[nT]=i}return o}}function Or(t,e){var i=t[e];i&&i[iT]&&(t[e]=i[iT])}function Er(t,e,i,n){this.ecInstance=t,this.api=e,this.unfinished;var i=this._dataProcessorHandlers=i.slice(),n=this._visualHandlers=n.slice();this._allHandlers=i.concat(n),this._stageTaskMap=R()}function Rr(t,e,i,n,o){function a(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}o=o||{};var r;d(e,function(e,s){if(!o.visualType||o.visualType===e.visualType){var l=t._stageTaskMap.get(e.uid),u=l.seriesTaskMap,h=l.overallTask;if(h){var c,d=h.agentStubMap;d.each(function(t){a(o,t)&&(t.dirty(),c=!0)}),c&&h.dirty(),hT(h,n);var f=t.getPerformArgs(h,o.block);d.each(function(t){t.perform(f)}),r|=h.perform(f)}else u&&u.each(function(s,l){a(o,s)&&s.dirty();var u=t.getPerformArgs(s,o.block);u.skip=!e.performRawSeries&&i.isSeriesFiltered(s.context.model),hT(s,n),r|=s.perform(u)})}}),t.unfinished|=r}function zr(t,e,i,n,o){function a(i){var a=i.uid,s=r.get(a)||r.set(a,gr({plan:Hr,reset:Zr,count:Xr}));s.context={model:i,ecModel:n,api:o,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:t},jr(t,i,s)}var r=i.seriesTaskMap||(i.seriesTaskMap=R()),s=e.seriesType,l=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(a):s?n.eachRawSeriesByType(s,a):l&&l(n,o).each(a);var u=t._pipelineMap;r.each(function(t,e){u.get(e)||(t.dispose(),r.removeKey(e))})}function Br(t,e,i,n,o){function a(e){var i=e.uid,n=s.get(i);n||(n=s.set(i,gr({reset:Gr,onDirty:Wr})),r.dirty()),n.context={model:e,overallProgress:h,modifyOutputEnd:c},n.agent=r,n.__block=h,jr(t,e,n)}var r=i.overallTask=i.overallTask||gr({reset:Vr});r.context={ecModel:n,api:o,overallReset:e.overallReset,scheduler:t};var s=r.agentStubMap=r.agentStubMap||R(),l=e.seriesType,u=e.getTargetSeries,h=!0,c=e.modifyOutputEnd;l?n.eachRawSeriesByType(l,a):u?u(n,o).each(a):(h=!1,d(n.getSeries(),a));var f=t._pipelineMap;s.each(function(t,e){f.get(e)||(t.dispose(),r.dirty(),s.removeKey(e))})}function Vr(t){t.overallReset(t.ecModel,t.api,t.payload)}function Gr(t,e){return t.overallProgress&&Fr}function Fr(){this.agent.dirty(),this.getDownstream().dirty()}function Wr(){this.agent&&this.agent.dirty()}function Hr(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function Zr(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=Di(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?f(e,function(t,e){return Ur(e)}):cT}function Ur(t){return function(e,i){var n=i.data,o=i.resetDefines[t];if(o&&o.dataEach)for(var a=e.start;a0?parseInt(n,10)/100:n?parseFloat(n):0;var o=i.getAttribute("stop-color")||"#000000";e.addColorStop(n,o)}i=i.nextSibling}}function Qr(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),r(e.__inheritedStyle,t.__inheritedStyle))}function ts(t){for(var e=P(t).split(_T),i=[],n=0;n0;a-=2){var r=o[a],s=o[a-1];switch(n=n||xt(),s){case"translate":r=P(r).split(_T),St(n,n,[parseFloat(r[0]),parseFloat(r[1]||0)]);break;case"scale":r=P(r).split(_T),It(n,n,[parseFloat(r[0]),parseFloat(r[1]||r[0])]);break;case"rotate":r=P(r).split(_T),Mt(n,n,parseFloat(r[0]));break;case"skew":r=P(r).split(_T),console.warn("Skew transform is not supported yet");break;case"matrix":r=P(r).split(_T);n[0]=parseFloat(r[0]),n[1]=parseFloat(r[1]),n[2]=parseFloat(r[2]),n[3]=parseFloat(r[3]),n[4]=parseFloat(r[4]),n[5]=parseFloat(r[5])}}e.setLocalTransform(n)}}function os(t){var e=t.getAttribute("style"),i={};if(!e)return i;var n={};TT.lastIndex=0;for(var o;null!=(o=TT.exec(e));)n[o[1]]=o[2];for(var a in ST)ST.hasOwnProperty(a)&&null!=n[a]&&(i[ST[a]]=n[a]);return i}function as(t,e,i){var n=e/t.width,o=i/t.height,a=Math.min(n,o);return{scale:[a,a],position:[-(t.x+t.width/2)*a+e/2,-(t.y+t.height/2)*a+i/2]}}function rs(t,e){return(new $r).parse(t,e)}function ss(t){return function(e,i,n){e=e&&e.toLowerCase(),fw.prototype[t].call(this,e,i,n)}}function ls(){fw.call(this)}function us(t,e,n){function o(t,e){return t.__prio-e.__prio}n=n||{},"string"==typeof e&&(e=JT[e]),this.id,this.group,this._dom=t;var a=this._zr=Ii(t,{renderer:n.renderer||"canvas",devicePixelRatio:n.devicePixelRatio,width:n.width,height:n.height});this._throttledZrFlush=Pr(m(a.flush,a),17),(e=i(e))&&BI(e,!0),this._theme=e,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new Fa;var r=this._api=As(this);_e($T,o),_e(YT,o),this._scheduler=new Er(this,r,YT,$T),fw.call(this,this._ecEventProcessor=new Ds),this._messageCenter=new ls,this._initEvents(),this.resize=m(this.resize,this),this._pendingActions=[],a.animation.on("frame",this._onframe,this),vs(a,this),N(this)}function hs(t,e,i){var n,o=this._model,a=this._coordSysMgr.getCoordinateSystems();e=Vi(o,e);for(var r=0;re.get("hoverLayerThreshold")&&!U_.node&&i.traverse(function(t){t.isGroup||(t.useHoverLayer=!0)})}function Is(t,e){var i=t.get("blendMode")||null;e.group.traverse(function(t){t.isGroup||t.style.blend!==i&&t.setStyle("blend",i),t.eachPendingDisplayable&&t.eachPendingDisplayable(function(t){t.setStyle("blend",i)})})}function Ts(t,e){var i=t.get("z"),n=t.get("zlevel");e.group.traverse(function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=n&&(t.zlevel=n))})}function As(t){var e=t._coordSysMgr;return a(new Ga(t),{getCoordinateSystems:m(e.getCoordinateSystems,e),getComponentByElement:function(e){for(;e;){var i=e.__ecComponentInfo;if(null!=i)return t._model.getComponent(i.mainType,i.index);e=e.parent}}})}function Ds(){this.eventInfo}function Cs(t){function e(t,e){for(var n=0;n65535?dA:pA}function Js(t){var e=t.constructor;return e===Array?t.slice():new e(t)}function Qs(t,e){d(gA.concat(e.__wrappedMethods||[]),function(i){e.hasOwnProperty(i)&&(t[i]=e[i])}),t.__wrappedMethods=e.__wrappedMethods,d(mA,function(n){t[n]=i(e[n])}),t._calculationInfo=a(e._calculationInfo)}function tl(t,e,i,n,o){var a=cA[e.type],r=n-1,s=e.name,l=t[s][r];if(l&&l.length=0?this._indices[t]:-1}function al(t,e){var i=t._idList[e];return null==i&&(i=il(t,t._idDimIdx,e)),null==i&&(i=hA+e),i}function rl(t){return y(t)||(t=[t]),t}function sl(t,e){var i=t.dimensions,n=new vA(f(i,t.getDimensionInfo,t),t.hostModel);Qs(n,t);for(var o=n._storage={},a=t._storage,r=0;r=0?(o[s]=ll(a[s]),n._rawExtent[s]=ul(),n._extent[s]=null):o[s]=a[s])}return n}function ll(t){for(var e=new Array(t.length),i=0;in&&(r=o.interval=n);var s=o.intervalPrecision=Ml(r);return Tl(o.niceTickExtent=[MA(Math.ceil(t[0]/r)*r,s),MA(Math.floor(t[1]/r)*r,s)],t),o}function Ml(t){return Ho(t)+2}function Il(t,e,i){t[e]=Math.max(Math.min(t[e],i[1]),i[0])}function Tl(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),Il(t,0,e),Il(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function Al(t,e,i,n){var o=[];if(!t)return o;e[0]1e4)return[];return e[1]>(o.length?o[o.length-1]:i[1])&&o.push(e[1]),o}function Dl(t){return t.get("stack")||AA+t.seriesIndex}function Cl(t){return t.dim+t.index}function Ll(t){var e=[],i=t.axis;if("category"===i.type){for(var n=i.getBandWidth(),o=0;o=0?"p":"n",b=m;p&&(o[r][_]||(o[r][_]={p:m,n:m}),b=o[r][_][w]);var S,M,I,T;if(g)S=b,M=(A=i.dataToPoint([x,_]))[1]+l,I=A[0]-m,T=u,Math.abs(I)a[1]?(n=a[1],o=a[0]):(n=a[0],o=a[1]);var r=e.toGlobalCoord(e.dataToCoord(0));return ro&&(r=o),r}function Vl(t,e){return VA(t,BA(e))}function Gl(t,e){var i,n,o,a=t.type,r=e.getMin(),s=e.getMax(),l=null!=r,u=null!=s,h=t.getExtent();"ordinal"===a?i=e.getCategories().length:(y(n=e.get("boundaryGap"))||(n=[n||0,n||0]),"boolean"==typeof n[0]&&(n=[0,0]),n[0]=Vo(n[0],1),n[1]=Vo(n[1],1),o=h[1]-h[0]||Math.abs(h[0])),null==r&&(r="ordinal"===a?i?0:NaN:h[0]-n[0]*o),null==s&&(s="ordinal"===a?i?i-1:NaN:h[1]+n[1]*o),"dataMin"===r?r=h[0]:"function"==typeof r&&(r=r({min:h[0],max:h[1]})),"dataMax"===s?s=h[1]:"function"==typeof s&&(s=s({min:h[0],max:h[1]})),(null==r||!isFinite(r))&&(r=NaN),(null==s||!isFinite(s))&&(s=NaN),t.setBlank(I(r)||I(s)||"ordinal"===a&&!t.getOrdinalMeta().categories.length),e.getNeedCrossZero()&&(r>0&&s>0&&!l&&(r=0),r<0&&s<0&&!u&&(s=0));var c=e.ecModel;if(c&&"time"===a){var f,p=kl("bar",c);if(d(p,function(t){f|=t.getBaseAxis()===e.axis}),f){var g=Pl(p),m=Fl(r,s,e,g);r=m.min,s=m.max}}return[r,s]}function Fl(t,e,i,n){var o=i.axis.getExtent(),a=o[1]-o[0],r=Ol(n,i.axis);if(void 0===r)return{min:t,max:e};var s=1/0;d(r,function(t){s=Math.min(t.offset,s)});var l=-1/0;d(r,function(t){l=Math.max(t.offset+t.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,h=e-t,c=h/(1-(s+l)/a)-h;return e+=c*(l/u),t-=c*(s/u),{min:t,max:e}}function Wl(t,e){var i=Gl(t,e),n=null!=e.getMin(),o=null!=e.getMax(),a=e.get("splitNumber");"log"===t.type&&(t.base=e.get("logBase"));var r=t.type;t.setExtent(i[0],i[1]),t.niceExtent({splitNumber:a,fixMin:n,fixMax:o,minInterval:"interval"===r||"time"===r?e.get("minInterval"):null,maxInterval:"interval"===r||"time"===r?e.get("maxInterval"):null});var s=e.get("interval");null!=s&&t.setInterval&&t.setInterval(s)}function Hl(t,e){if(e=e||t.get("type"))switch(e){case"category":return new SA(t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),[1/0,-1/0]);case"value":return new TA;default:return(xl.getClass(e)||TA).create(t)}}function Zl(t){var e=t.scale.getExtent(),i=e[0],n=e[1];return!(i>0&&n>0||i<0&&n<0)}function Ul(t){var e=t.getLabelModel().get("formatter"),i="category"===t.type?t.scale.getExtent()[0]:null;return"string"==typeof e?e=function(e){return function(i){return i=t.scale.getLabel(i),e.replace("{value}",null!=i?i:"")}}(e):"function"==typeof e?function(n,o){return null!=i&&(o=n-i),e(Xl(t,n),o)}:function(e){return t.scale.getLabel(e)}}function Xl(t,e){return"category"===t.type?t.scale.getLabel(e):e}function jl(t){var e=t.model,i=t.scale;if(e.get("axisLabel.show")&&!i.isBlank()){var n,o,a="category"===t.type,r=i.getExtent();o=a?i.count():(n=i.getTicks()).length;var s,l=t.getLabelModel(),u=Ul(t),h=1;o>40&&(h=Math.ceil(o/40));for(var c=0;c>1^-(1&s),l=l>>1^-(1&l),o=s+=o,a=l+=a,n.push([s/i,l/i])}return n}function ou(t){return"category"===t.type?ru(t):uu(t)}function au(t,e){return"category"===t.type?lu(t,e):{ticks:t.scale.getTicks()}}function ru(t){var e=t.getLabelModel(),i=su(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:i.labelCategoryInterval}:i}function su(t,e){var i=hu(t,"labels"),n=ql(e),o=cu(i,n);if(o)return o;var a,r;return a=x(n)?vu(t,n):mu(t,r="auto"===n?fu(t):n),du(i,n,{labels:a,labelCategoryInterval:r})}function lu(t,e){var i=hu(t,"ticks"),n=ql(e),o=cu(i,n);if(o)return o;var a,r;if(e.get("show")&&!t.scale.isBlank()||(a=[]),x(n))a=vu(t,n,!0);else if("auto"===n){var s=su(t,t.getLabelModel());r=s.labelCategoryInterval,a=f(s.labels,function(t){return t.tickValue})}else a=mu(t,r=n,!0);return du(i,n,{ticks:a,tickCategoryInterval:r})}function uu(t){var e=t.scale.getTicks(),i=Ul(t);return{labels:f(e,function(e,n){return{formattedLabel:i(e,n),rawLabel:t.scale.getLabel(e),tickValue:e}})}}function hu(t,e){return nD(t)[e]||(nD(t)[e]=[])}function cu(t,e){for(var i=0;i40&&(s=Math.max(1,Math.floor(r/40)));for(var l=a[0],u=t.dataToCoord(l+1)-t.dataToCoord(l),h=Math.abs(u*Math.cos(n)),c=Math.abs(u*Math.sin(n)),d=0,f=0;l<=a[1];l+=s){var p=0,g=0,m=ke(i(l),e.font,"center","top");p=1.3*m.width,g=1.3*m.height,d=Math.max(d,p,7),f=Math.max(f,g,7)}var v=d/h,y=f/c;isNaN(v)&&(v=1/0),isNaN(y)&&(y=1/0);var x=Math.max(0,Math.floor(Math.min(v,y))),_=nD(t.model),w=_.lastAutoInterval,b=_.lastTickCount;return null!=w&&null!=b&&Math.abs(w-x)<=1&&Math.abs(b-r)<=1&&w>x?x=w:(_.lastTickCount=r,_.lastAutoInterval=x),x}function gu(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function mu(t,e,i){function n(t){l.push(i?t:{formattedLabel:o(t),rawLabel:a.getLabel(t),tickValue:t})}var o=Ul(t),a=t.scale,r=a.getExtent(),s=t.getLabelModel(),l=[],u=Math.max((e||0)+1,1),h=r[0],c=a.count();0!==h&&u>1&&c/u>2&&(h=Math.round(Math.ceil(h/u)*u));var d=Kl(t),f=s.get("showMinLabel")||d,p=s.get("showMaxLabel")||d;f&&h!==r[0]&&n(r[0]);for(var g=h;g<=r[1];g+=u)n(g);return p&&g!==r[1]&&n(r[1]),l}function vu(t,e,i){var n=t.scale,o=Ul(t),a=[];return d(n.getTicks(),function(t){var r=n.getLabel(t);e(t,r)&&a.push(i?t:{formattedLabel:o(t),rawLabel:r,tickValue:t})}),a}function yu(t,e){var i=(t[1]-t[0])/e/2;t[0]+=i,t[1]-=i}function xu(t,e,i,n,o){function a(t,e){return h?t>e:t0&&(t.coord-=u/(2*(e+1)))}),s={coord:e[r-1].coord+u},e.push(s)}var h=l[0]>l[1];a(e[0].coord,l[0])&&(o?e[0].coord=l[0]:e.shift()),o&&a(l[0],e[0].coord)&&e.unshift({coord:l[0]}),a(l[1],s.coord)&&(o?s.coord=l[1]:e.pop()),o&&a(s.coord,l[1])&&e.push({coord:l[1]})}}function _u(t,e){var i=t.mapDimension("defaultedLabel",!0),n=i.length;if(1===n)return fr(t,e,i[0]);if(n){for(var o=[],a=0;a0?i=n[0]:n[1]<0&&(i=n[1]),i}function Ou(t,e,i,n){var o=NaN;t.stacked&&(o=i.get(i.getCalculationInfo("stackedOverDimension"),n)),isNaN(o)&&(o=t.valueStart);var a=t.baseDataOffset,r=[];return r[a]=i.get(t.baseDim,n),r[1-a]=o,e.dataToPoint(r)}function Eu(t,e){var i=[];return e.diff(t).add(function(t){i.push({cmd:"+",idx:t})}).update(function(t,e){i.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){i.push({cmd:"-",idx:t})}).execute(),i}function Ru(t){return isNaN(t[0])||isNaN(t[1])}function zu(t,e,i,n,o,a,r,s,l,u,h){return"none"!==u&&u?Bu.apply(this,arguments):Vu.apply(this,arguments)}function Bu(t,e,i,n,o,a,r,s,l,u,h){for(var c=0,d=i,f=0;f=o||d<0)break;if(Ru(p)){if(h){d+=a;continue}break}if(d===i)t[a>0?"moveTo":"lineTo"](p[0],p[1]);else if(l>0){var g=e[c],m="y"===u?1:0,v=(p[m]-g[m])*l;_D(bD,g),bD[m]=g[m]+v,_D(SD,p),SD[m]=p[m]-v,t.bezierCurveTo(bD[0],bD[1],SD[0],SD[1],p[0],p[1])}else t.lineTo(p[0],p[1]);c=d,d+=a}return f}function Vu(t,e,i,n,o,a,r,s,l,u,h){for(var c=0,d=i,f=0;f=o||d<0)break;if(Ru(p)){if(h){d+=a;continue}break}if(d===i)t[a>0?"moveTo":"lineTo"](p[0],p[1]),_D(bD,p);else if(l>0){var g=d+a,m=e[g];if(h)for(;m&&Ru(e[g]);)m=e[g+=a];var v=.5,y=e[c];if(!(m=e[g])||Ru(m))_D(SD,p);else{Ru(m)&&!h&&(m=p),U(wD,m,y);var x,_;if("x"===u||"y"===u){var w="x"===u?0:1;x=Math.abs(p[w]-y[w]),_=Math.abs(p[w]-m[w])}else x=uw(p,y),_=uw(p,m);xD(SD,p,wD,-l*(1-(v=_/(_+x))))}vD(bD,bD,s),yD(bD,bD,r),vD(SD,SD,s),yD(SD,SD,r),t.bezierCurveTo(bD[0],bD[1],SD[0],SD[1],p[0],p[1]),xD(bD,p,wD,l*v)}else t.lineTo(p[0],p[1]);c=d,d+=a}return f}function Gu(t,e){var i=[1/0,1/0],n=[-1/0,-1/0];if(e)for(var o=0;on[0]&&(n[0]=a[0]),a[1]>n[1]&&(n[1]=a[1])}return{min:e?i:n,max:e?n:i}}function Fu(t,e){if(t.length===e.length){for(var i=0;ie[0]?1:-1;e[0]+=n*i,e[1]-=n*i}return e}function Zu(t,e,i){if(!i.valueDim)return[];for(var n=[],o=0,a=e.count();oa[1]&&a.reverse();var r=o.getExtent(),s=Math.PI/180;i&&(a[0]-=.5,a[1]+=.5);var l=new hM({shape:{cx:Go(t.cx,1),cy:Go(t.cy,1),r0:Go(a[0],1),r:Go(a[1],1),startAngle:-r[0]*s,endAngle:-r[1]*s,clockwise:o.inverse}});return e&&(l.shape.endAngle=-r[0]*s,To(l,{shape:{endAngle:-r[1]*s}},n)),l}function ju(t,e,i,n){return"polar"===t.type?Xu(t,e,i,n):Uu(t,e,i,n)}function Yu(t,e,i){for(var n=e.getBaseAxis(),o="x"===n.dim||"radius"===n.dim?0:1,a=[],r=0;r=0;a--){var r=i[a].dimension,s=t.dimensions[r],l=t.getDimensionInfo(s);if("x"===(n=l&&l.coordDim)||"y"===n){o=i[a];break}}if(o){var u=e.getAxis(n),h=f(o.stops,function(t){return{coord:u.toGlobalCoord(u.dataToCoord(t.value)),color:t.color}}),c=h.length,p=o.outerColors.slice();c&&h[0].coord>h[c-1].coord&&(h.reverse(),p.reverse());var g=h[0].coord-10,m=h[c-1].coord+10,v=m-g;if(v<.001)return"transparent";d(h,function(t){t.offset=(t.coord-g)/v}),h.push({offset:c?h[c-1].offset:.5,color:p[1]||"transparent"}),h.unshift({offset:c?h[0].offset:.5,color:p[0]||"transparent"});var y=new TM(0,0,0,0,h,!0);return y[n]=g,y[n+"2"]=m,y}}}function Ku(t,e,i){var n=t.get("showAllSymbol"),o="auto"===n;if(!n||o){var a=i.getAxesByScale("ordinal")[0];if(a&&(!o||!$u(a,e))){var r=e.mapDimension(a.dim),s={};return d(a.getViewLabels(),function(t){s[t.tickValue]=1}),function(t){return!s.hasOwnProperty(e.get(r,t))}}}}function $u(t,e){var i=t.getExtent(),n=Math.abs(i[1]-i[0])/t.scale.count();isNaN(n)&&(n=0);for(var o=e.count(),a=Math.max(1,Math.round(o/5)),r=0;rn)return!1;return!0}function Ju(t){return this._axes[t]}function Qu(t){LD.call(this,t)}function th(t,e){return e.type||(e.data?"category":"value")}function eh(t,e,i){return t.getCoordSysModel()===e}function ih(t,e,i){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,i),this.model=t}function nh(t,e,i,n){function o(t){return t.dim+"_"+t.index}i.getAxesOnZeroOf=function(){return a?[a]:[]};var a,r=t[e],s=i.model,l=s.get("axisLine.onZero"),u=s.get("axisLine.onZeroAxisIndex");if(l){if(null!=u)oh(r[u])&&(a=r[u]);else for(var h in r)if(r.hasOwnProperty(h)&&oh(r[h])&&!n[o(r[h])]){a=r[h];break}a&&(n[o(a)]=!0)}}function oh(t){return t&&"category"!==t.type&&"time"!==t.type&&Zl(t)}function ah(t,e){var i=t.getExtent(),n=i[0]+i[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return n-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return n-t+e}}function rh(t,e){return f(VD,function(e){return t.getReferringComponents(e)[0]})}function sh(t){return"cartesian2d"===t.get("coordinateSystem")}function lh(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e}function uh(t,e,i,n){var o,a,r=Xo(i-t.rotation),s=n[0]>n[1],l="start"===e&&!s||"start"!==e&&s;return jo(r-GD/2)?(a=l?"bottom":"top",o="center"):jo(r-1.5*GD)?(a=l?"top":"bottom",o="center"):(a="middle",o=r<1.5*GD&&r>GD/2?l?"left":"right":l?"right":"left"),{rotation:r,textAlign:o,textVerticalAlign:a}}function hh(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)}function ch(t,e,i){if(!Kl(t.axis)){var n=t.get("axisLabel.showMinLabel"),o=t.get("axisLabel.showMaxLabel");e=e||[],i=i||[];var a=e[0],r=e[1],s=e[e.length-1],l=e[e.length-2],u=i[0],h=i[1],c=i[i.length-1],d=i[i.length-2];!1===n?(dh(a),dh(u)):fh(a,r)&&(n?(dh(r),dh(h)):(dh(a),dh(u))),!1===o?(dh(s),dh(c)):fh(l,s)&&(o?(dh(l),dh(d)):(dh(s),dh(c)))}}function dh(t){t&&(t.ignore=!0)}function fh(t,e,i){var n=t&&t.getBoundingRect().clone(),o=e&&e.getBoundingRect().clone();if(n&&o){var a=_t([]);return Mt(a,a,-t.rotation),n.applyTransform(bt([],a,t.getLocalTransform())),o.applyTransform(bt([],a,e.getLocalTransform())),n.intersect(o)}}function ph(t){return"middle"===t||"center"===t}function gh(t,e,i){var n=e.axis;if(e.get("axisTick.show")&&!n.scale.isBlank()){for(var o=e.getModel("axisTick"),a=o.getModel("lineStyle"),s=o.get("length"),l=n.getTicksCoords(),u=[],h=[],c=t._transform,d=[],f=0;f=0||t===e}function Sh(t){var e=Mh(t);if(e){var i=e.axisPointerModel,n=e.axis.scale,o=i.option,a=i.get("status"),r=i.get("value");null!=r&&(r=n.parse(r));var s=Th(i);null==a&&(o.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==r||r>l[1])&&(r=l[1]),r0?"bottom":"top":o.width>0?"left":"right";l||kh(t.style,d,n,u,a,i,p),fo(t,d)}function Rh(t,e){var i=t.get(tC)||0;return Math.min(i,Math.abs(e.width),Math.abs(e.height))}function zh(t,e,i){var n=t.getData(),o=[],a=n.getLayout("valueAxisHorizontal")?1:0;o[1-a]=n.getLayout("valueAxisStart");var r=new nC({shape:{points:n.getLayout("largePoints")},incremental:!!i,__startPoint:o,__valueIdx:a});e.add(r),Bh(r,t,n)}function Bh(t,e,i){var n=i.getVisual("borderColor")||i.getVisual("color"),o=e.getModel("itemStyle").getItemStyle(["color","borderColor"]);t.useStyle(o),t.style.fill=null,t.style.stroke=n,t.style.lineWidth=i.getLayout("barWidth")}function Vh(t,e,i,n){var o=e.getData(),a=this.dataIndex,r=o.getName(a),s=e.get("selectedOffset");n.dispatchAction({type:"pieToggleSelect",from:t,name:r,seriesId:e.id}),o.each(function(t){Gh(o.getItemGraphicEl(t),o.getItemLayout(t),e.isSelected(o.getName(t)),s,i)})}function Gh(t,e,i,n,o){var a=(e.startAngle+e.endAngle)/2,r=Math.cos(a),s=Math.sin(a),l=i?n:0,u=[r*l,s*l];o?t.animate().when(200,{position:u}).start("bounceOut"):t.attr("position",u)}function Fh(t,e){function i(){a.ignore=a.hoverIgnore,r.ignore=r.hoverIgnore}function n(){a.ignore=a.normalIgnore,r.ignore=r.normalIgnore}tb.call(this);var o=new hM({z2:2}),a=new gM,r=new rM;this.add(o),this.add(a),this.add(r),this.updateData(t,e,!0),this.on("emphasis",i).on("normal",n).on("mouseover",i).on("mouseout",n)}function Wh(t,e,i,n,o,a,r){function s(e,i){for(var n=e;n>=0&&(t[n].y-=i,!(n>0&&t[n].y>t[n-1].y+t[n-1].height));n--);}function l(t,e,i,n,o,a){for(var r=e?Number.MAX_VALUE:0,s=0,l=t.length;s=r&&(d=r-10),!e&&d<=r&&(d=r+10),t[s].x=i+d*a,r=d}}t.sort(function(t,e){return t.y-e.y});for(var u,h=0,c=t.length,d=[],f=[],p=0;pe&&a+1t[a].y+t[a].height)return void s(a,n/2);s(i-1,n/2)}(p,c,-u),h=t[p].y+t[p].height;r-h<0&&s(c-1,h-r);for(p=0;p=i?f.push(t[p]):d.push(t[p]);l(d,!1,e,i,n,o),l(f,!0,e,i,n,o)}function Hh(t,e,i,n,o,a){for(var r=[],s=[],l=0;l3?1.4:o>1?1.2:1.1;hc(this,"zoom","zoomOnMouseWheel",t,{scale:n>0?s:1/s,originX:a,originY:r})}if(i){var l=Math.abs(n);hc(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:(n>0?1:-1)*(l>3?.4:l>1?.15:.05),originX:a,originY:r})}}}function uc(t){ic(this._zr,"globalPan")||hc(this,"zoom",null,t,{scale:t.pinchScale>1?1.1:1/1.1,originX:t.pinchX,originY:t.pinchY})}function hc(t,e,i,n,o){t.pointerChecker&&t.pointerChecker(n,o.originX,o.originY)&&(mw(n.event),cc(t,e,i,n,o))}function cc(t,e,i,n,o){o.isAvailableBehavior=m(dc,null,i,n),t.trigger(e,o)}function dc(t,e,i){var n=i[t];return!t||n&&(!_(n)||e.event[n+"Key"])}function fc(t,e,i){var n=t.target,o=n.position;o[0]+=e,o[1]+=i,n.dirty()}function pc(t,e,i,n){var o=t.target,a=t.zoomLimit,r=o.position,s=o.scale,l=t.zoom=t.zoom||1;if(l*=e,a){var u=a.min||0,h=a.max||1/0;l=Math.max(Math.min(h,l),u)}var c=l/t.zoom;t.zoom=l,r[0]-=(i-r[0])*(c-1),r[1]-=(n-r[1])*(c-1),s[0]*=c,s[1]*=c,o.dirty()}function gc(t,e,i){var n=e.getComponentByElement(t.topTarget),o=n&&n.coordinateSystem;return n&&n!==i&&!RC[n.mainType]&&o&&o.model!==i}function mc(t,e){var i=t.getItemStyle(),n=t.get("areaColor");return null!=n&&(i.fill=n),i}function vc(t,e,i,n,o){i.off("click"),i.off("mousedown"),e.get("selectedMode")&&(i.on("mousedown",function(){t._mouseDownFlag=!0}),i.on("click",function(a){if(t._mouseDownFlag){t._mouseDownFlag=!1;for(var r=a.target;!r.__regions;)r=r.parent;if(r){var s={type:("geo"===e.mainType?"geo":"map")+"ToggleSelect",batch:f(r.__regions,function(t){return{name:t.name,from:o.uid}})};s[e.mainType+"Id"]=e.id,n.dispatchAction(s),yc(e,i)}}}))}function yc(t,e){e.eachChild(function(e){d(e.__regions,function(i){e.trigger(t.isSelected(i.name)?"emphasis":"normal")})})}function xc(t,e){var i=new tb;this.uid=Ro("ec_map_draw"),this._controller=new oc(t.getZr()),this._controllerHost={target:e?i:null},this.group=i,this._updateGroup=e,this._mouseDownFlag,this._mapName,this._initialized,i.add(this._regionsGroup=new tb),i.add(this._backgroundGroup=new tb)}function _c(t){var e=this[zC];e&&e.recordVersion===this[BC]&&wc(e,t)}function wc(t,e){var i=t.circle,n=t.labelModel,o=t.hoverLabelModel,a=t.emphasisText,r=t.normalText;e?(i.style.extendFrom(mo({},o,{text:o.get("show")?a:null},{isRectText:!0,useInsideStyle:!1},!0)),i.__mapOriginalZ2=i.z2,i.z2+=NM):(mo(i.style,n,{text:n.get("show")?r:null,textPosition:n.getShallow("position")||"bottom"},{isRectText:!0,useInsideStyle:!1}),i.dirty(!1),null!=i.__mapOriginalZ2&&(i.z2=i.__mapOriginalZ2,i.__mapOriginalZ2=null))}function bc(t,e,i){var n=t.getZoom(),o=t.getCenter(),a=e.zoom,r=t.dataToPoint(o);if(null!=e.dx&&null!=e.dy){r[0]-=e.dx,r[1]-=e.dy;o=t.pointToData(r);t.setCenter(o)}if(null!=a){if(i){var s=i.min||0,l=i.max||1/0;a=Math.max(Math.min(n*a,l),s)/n}t.scale[0]*=a,t.scale[1]*=a;var u=t.position,h=(e.originX-u[0])*(a-1),c=(e.originY-u[1])*(a-1);u[0]-=h,u[1]-=c,t.updateTransform();o=t.pointToData(r);t.setCenter(o),t.setZoom(a*n)}return{center:t.getCenter(),zoom:t.getZoom()}}function Sc(){Tw.call(this)}function Mc(t){this.name=t,this.zoomLimit,Tw.call(this),this._roamTransformable=new Sc,this._rawTransformable=new Sc,this._center,this._zoom}function Ic(t,e,i,n){var o=i.seriesModel,a=o?o.coordinateSystem:null;return a===this?a[t](n):null}function Tc(t,e,i,n){Mc.call(this,t),this.map=e;var o=OC.load(e,i);this._nameCoordMap=o.nameCoordMap,this._regionsMap=o.regionsMap,this._invertLongitute=null==n||n,this.regions=o.regions,this._rect=o.boundingRect}function Ac(t,e,i,n){var o=i.geoModel,a=i.seriesModel,r=o?o.coordinateSystem:a?a.coordinateSystem||(a.getReferringComponents("geo")[0]||{}).coordinateSystem:null;return r===this?r[t](n):null}function Dc(t,e){var i=t.get("boundingCoords");if(null!=i){var n=i[0],o=i[1];isNaN(n[0])||isNaN(n[1])||isNaN(o[0])||isNaN(o[1])||this.setBoundingRect(n[0],n[1],o[0]-n[0],o[1]-n[1])}var a,r=this.getBoundingRect(),s=t.get("layoutCenter"),l=t.get("layoutSize"),u=e.getWidth(),h=e.getHeight(),c=r.width/r.height*this.aspectScale,d=!1;s&&l&&(s=[Vo(s[0],u),Vo(s[1],h)],l=Vo(l,Math.min(u,h)),isNaN(s[0])||isNaN(s[1])||isNaN(l)||(d=!0));if(d){var f={};c>1?(f.width=l,f.height=l/c):(f.height=l,f.width=l*c),f.y=s[1]-f.height/2,f.x=s[0]-f.width/2}else(a=t.getBoxLayoutParams()).aspect=c,f=ca(a,{width:u,height:h});this.setViewRect(f.x,f.y,f.width,f.height),this.setCenter(t.get("center")),this.setZoom(t.get("zoom"))}function Cc(t,e){d(e.get("geoCoord"),function(e,i){t.addGeoCoord(i,e)})}function Lc(t,e){var i={};return d(t,function(t){t.each(t.mapDimension("value"),function(e,n){var o="ec-"+t.getName(n);i[o]=i[o]||[],isNaN(e)||i[o].push(e)})}),t[0].map(t[0].mapDimension("value"),function(n,o){for(var a="ec-"+t[0].getName(o),r=0,s=1/0,l=-1/0,u=i[a].length,h=0;h=0;o--){var a=i[o];a.hierNode={defaultAncestor:null,ancestor:a,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},n.push(a)}}function Wc(t,e){var i=t.isExpand?t.children:[],n=t.parentNode.children,o=t.hierNode.i?n[t.hierNode.i-1]:null;if(i.length){jc(t);var a=(i[0].hierNode.prelim+i[i.length-1].hierNode.prelim)/2;o?(t.hierNode.prelim=o.hierNode.prelim+e(t,o),t.hierNode.modifier=t.hierNode.prelim-a):t.hierNode.prelim=a}else o&&(t.hierNode.prelim=o.hierNode.prelim+e(t,o));t.parentNode.hierNode.defaultAncestor=Yc(t,o,t.parentNode.hierNode.defaultAncestor||n[0],e)}function Hc(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function Zc(t){return arguments.length?t:Qc}function Uc(t,e){var i={};return t-=Math.PI/2,i.x=e*Math.cos(t),i.y=e*Math.sin(t),i}function Xc(t,e){return ca(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function jc(t){for(var e=t.children,i=e.length,n=0,o=0;--i>=0;){var a=e[i];a.hierNode.prelim+=n,a.hierNode.modifier+=n,o+=a.hierNode.change,n+=a.hierNode.shift+o}}function Yc(t,e,i,n){if(e){for(var o=t,a=t,r=a.parentNode.children[0],s=e,l=o.hierNode.modifier,u=a.hierNode.modifier,h=r.hierNode.modifier,c=s.hierNode.modifier;s=qc(s),a=Kc(a),s&&a;){o=qc(o),r=Kc(r),o.hierNode.ancestor=t;var d=s.hierNode.prelim+c-a.hierNode.prelim-u+n(s,a);d>0&&(Jc($c(s,t,i),t,d),u+=d,l+=d),c+=s.hierNode.modifier,u+=a.hierNode.modifier,l+=o.hierNode.modifier,h+=r.hierNode.modifier}s&&!qc(o)&&(o.hierNode.thread=s,o.hierNode.modifier+=c-l),a&&!Kc(r)&&(r.hierNode.thread=a,r.hierNode.modifier+=u-h,i=t)}return i}function qc(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function Kc(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function $c(t,e,i){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:i}function Jc(t,e,i){var n=i/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=n,e.hierNode.shift+=i,e.hierNode.modifier+=i,e.hierNode.prelim+=i,t.hierNode.change+=n}function Qc(t,e){return t.parentNode===e.parentNode?1:2}function td(t,e){var i=t.getItemLayout(e);return i&&!isNaN(i.x)&&!isNaN(i.y)&&"none"!==t.getItemVisual(e,"symbol")}function ed(t,e,i){return i.itemModel=e,i.itemStyle=e.getModel("itemStyle").getItemStyle(),i.hoverItemStyle=e.getModel("emphasis.itemStyle").getItemStyle(),i.lineStyle=e.getModel("lineStyle").getLineStyle(),i.labelModel=e.getModel("label"),i.hoverLabelModel=e.getModel("emphasis.label"),!1===t.isExpand&&0!==t.children.length?i.symbolInnerColor=i.itemStyle.fill:i.symbolInnerColor="#fff",i}function id(t,e,i,n,o,a){var s=!i,l=t.tree.getNodeByDataIndex(e),a=ed(l,l.getModel(),a),u=t.tree.root,h=l.parentNode===u?l:l.parentNode||l,c=t.getItemGraphicEl(h.dataIndex),d=h.getLayout(),f=c?{x:c.position[0],y:c.position[1],rawX:c.__radialOldRawX,rawY:c.__radialOldRawY}:d,p=l.getLayout();s?(i=new wu(t,e,a)).attr("position",[f.x,f.y]):i.updateData(t,e,a),i.__radialOldRawX=i.__radialRawX,i.__radialOldRawY=i.__radialRawY,i.__radialRawX=p.rawX,i.__radialRawY=p.rawY,n.add(i),t.setItemGraphicEl(e,i),Io(i,{position:[p.x,p.y]},o);var g=i.getSymbolPath();if("radial"===a.layout){var m,v,y=u.children[0],x=y.getLayout(),_=y.children.length;if(p.x===x.x&&!0===l.isExpand){var w={};w.x=(y.children[0].getLayout().x+y.children[_-1].getLayout().x)/2,w.y=(y.children[0].getLayout().y+y.children[_-1].getLayout().y)/2,(m=Math.atan2(w.y-x.y,w.x-x.x))<0&&(m=2*Math.PI+m),(v=w.xx.x)||(m-=Math.PI);var b=v?"left":"right";g.setStyle({textPosition:b,textRotation:-m,textOrigin:"center",verticalAlign:"middle"})}if(l.parentNode&&l.parentNode!==u){var S=i.__edge;S||(S=i.__edge=new bM({shape:od(a,f,f),style:r({opacity:0,strokeNoScale:!0},a.lineStyle)})),Io(S,{shape:od(a,d,p),style:{opacity:1}},o),n.add(S)}}function nd(t,e,i,n,o,a){for(var r,s=t.tree.getNodeByDataIndex(e),l=t.tree.root,a=ed(s,s.getModel(),a),u=s.parentNode===l?s:s.parentNode||s;null==(r=u.getLayout());)u=u.parentNode===l?u:u.parentNode||u;Io(i,{position:[r.x+1,r.y+1]},o,function(){n.remove(i),t.setItemGraphicEl(e,null)}),i.fadeOut(null,{keepLabel:!0});var h=i.__edge;h&&Io(h,{shape:od(a,r,r),style:{opacity:0}},o,function(){n.remove(h)})}function od(t,e,i){var n,o,a,r,s,l,u,h,c=t.orient;if("radial"===t.layout){s=e.rawX,u=e.rawY,l=i.rawX,h=i.rawY;var d=Uc(s,u),f=Uc(s,u+(h-u)*t.curvature),p=Uc(l,h+(u-h)*t.curvature),g=Uc(l,h);return{x1:d.x,y1:d.y,x2:g.x,y2:g.y,cpx1:f.x,cpy1:f.y,cpx2:p.x,cpy2:p.y}}return s=e.x,u=e.y,l=i.x,h=i.y,"LR"!==c&&"RL"!==c||(n=s+(l-s)*t.curvature,o=u,a=l+(s-l)*t.curvature,r=h),"TB"!==c&&"BT"!==c||(n=s,o=u+(h-u)*t.curvature,a=l,r=h+(u-h)*t.curvature),{x1:s,y1:u,x2:l,y2:h,cpx1:n,cpy1:o,cpx2:a,cpy2:r}}function ad(t,e,i){for(var n,o=[t],a=[];n=o.pop();)if(a.push(n),n.isExpand){var r=n.children;if(r.length)for(var s=0;s=0;a--)n.push(o[a])}}function sd(t,e){var i=Xc(t,e);t.layoutInfo=i;var n=t.get("layout"),o=0,a=0,r=null;"radial"===n?(o=2*Math.PI,a=Math.min(i.height,i.width)/2,r=Zc(function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth})):(o=i.width,a=i.height,r=Zc());var s=t.getData().tree.root,l=s.children[0];if(l){Fc(s),ad(l,Wc,r),s.hierNode.modifier=-l.hierNode.prelim,rd(l,Hc);var u=l,h=l,c=l;rd(l,function(t){var e=t.getLayout().x;eh.getLayout().x&&(h=t),t.depth>c.depth&&(c=t)});var d=u===h?1:r(u,h)/2,f=d-u.getLayout().x,p=0,g=0,m=0,v=0;if("radial"===n)p=o/(h.getLayout().x+d+f),g=a/(c.depth-1||1),rd(l,function(t){m=(t.getLayout().x+f)*p,v=(t.depth-1)*g;var e=Uc(m,v);t.setLayout({x:e.x,y:e.y,rawX:m,rawY:v},!0)});else{var y=t.getOrient();"RL"===y||"LR"===y?(g=a/(h.getLayout().x+d+f),p=o/(c.depth-1||1),rd(l,function(t){v=(t.getLayout().x+f)*g,m="LR"===y?(t.depth-1)*p:o-(t.depth-1)*p,t.setLayout({x:m,y:v},!0)})):"TB"!==y&&"BT"!==y||(p=o/(h.getLayout().x+d+f),g=a/(c.depth-1||1),rd(l,function(t){m=(t.getLayout().x+f)*p,v="TB"===y?(t.depth-1)*g:a-(t.depth-1)*g,t.setLayout({x:m,y:v},!0)}))}}}function ld(t,e,i){if(t&&l(e,t.type)>=0){var n=i.getData().tree.root,o=t.targetNode;if("string"==typeof o&&(o=n.getNodeById(o)),o&&n.contains(o))return{node:o};var a=t.targetNodeId;if(null!=a&&(o=n.getNodeById(a)))return{node:o}}}function ud(t){for(var e=[];t;)(t=t.parentNode)&&e.push(t);return e.reverse()}function hd(t,e){return l(ud(t),e)>=0}function cd(t,e){for(var i=[];t;){var n=t.dataIndex;i.push({name:t.name,dataIndex:n,value:e.getRawValue(n)}),t=t.parentNode}return i.reverse(),i}function dd(t){var e=0;d(t.children,function(t){dd(t);var i=t.value;y(i)&&(i=i[0]),e+=i});var i=t.value;y(i)&&(i=i[0]),(null==i||isNaN(i))&&(i=e),i<0&&(i=0),y(t.value)?t.value[0]=i:t.value=i}function fd(t,e){var i=e.get("color");if(i){var n;return d(t=t||[],function(t){var e=new No(t),i=e.get("color");(e.get("itemStyle.color")||i&&"none"!==i)&&(n=!0)}),n||((t[0]||(t[0]={})).color=i.slice()),t}}function pd(t){this.group=new tb,t.add(this.group)}function gd(t,e,i,n,o,a){var r=[[o?t:t-UC,e],[t+i,e],[t+i,e+n],[o?t:t-UC,e+n]];return!a&&r.splice(2,0,[t+i+UC,e+n/2]),!o&&r.push([t,e+n/2]),r}function md(t,e,i){t.eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.componentIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:i&&i.dataIndex,name:i&&i.name},treePathInfo:i&&cd(i,e)}}function vd(){var t,e=[],i={};return{add:function(t,n,o,a,r){return _(a)&&(r=a,a=0),!i[t.id]&&(i[t.id]=1,e.push({el:t,target:n,time:o,delay:a,easing:r}),!0)},done:function(e){return t=e,this},start:function(){for(var n=e.length,o=0,a=e.length;o=0;a--)null==i[a]&&(delete n[e[a]],e.pop())}function bd(t,e){var i=t.visual,n=[];w(i)?sL(i,function(t){n.push(t)}):null!=i&&n.push(i);var o={color:1,symbol:1};e||1!==n.length||o.hasOwnProperty(t.type)||(n[1]=n[0]),Ld(t,n)}function Sd(t){return{applyVisual:function(e,i,n){e=this.mapValueToVisual(e),n("color",t(i("color"),e))},_doMap:Dd([0,1])}}function Md(t){var e=this.option.visual;return e[Math.round(Bo(t,[0,1],[0,e.length-1],!0))]||{}}function Id(t){return function(e,i,n){n(t,this.mapValueToVisual(e))}}function Td(t){var e=this.option.visual;return e[this.option.loop&&t!==uL?t%e.length:t]}function Ad(){return this.option.visual[0]}function Dd(t){return{linear:function(e){return Bo(e,t,this.option.visual,!0)},category:Td,piecewise:function(e,i){var n=Cd.call(this,i);return null==n&&(n=Bo(e,t,this.option.visual,!0)),n},fixed:Ad}}function Cd(t){var e=this.option,i=e.pieceList;if(e.hasSpecialVisual){var n=i[hL.findPieceIndex(t,i)];if(n&&n.visual)return n.visual[this.type]}}function Ld(t,e){return t.visual=e,"color"===t.type&&(t.parsedVisual=f(e,function(t){return Gt(t)})),e}function kd(t,e,i){return t?e<=i:e=o.length||t===o[t.depth])&&Pd(t,Vd(r,h,t,e,g,a),i,n,o,a)})}else l=Od(h),t.setVisual("color",l)}}function Nd(t,e,i,n){var o=a({},e);return d(["color","colorAlpha","colorSaturation"],function(a){var r=t.get(a,!0);null==r&&i&&(r=i[a]),null==r&&(r=e[a]),null==r&&(r=n.get(a)),null!=r&&(o[a]=r)}),o}function Od(t){var e=Rd(t,"color");if(e){var i=Rd(t,"colorAlpha"),n=Rd(t,"colorSaturation");return n&&(e=jt(e,null,null,n)),i&&(e=Yt(e,i)),e}}function Ed(t,e){return null!=e?jt(e,null,null,t):null}function Rd(t,e){var i=t[e];if(null!=i&&"none"!==i)return i}function zd(t,e,i,n,o,a){if(a&&a.length){var r=Bd(e,"color")||null!=o.color&&"none"!==o.color&&(Bd(e,"colorAlpha")||Bd(e,"colorSaturation"));if(r){var s=e.get("visualMin"),l=e.get("visualMax"),u=i.dataExtent.slice();null!=s&&su[1]&&(u[1]=l);var h=e.get("colorMappingBy"),c={type:r.name,dataExtent:u,visual:r.range};"color"!==c.type||"index"!==h&&"id"!==h?c.mappingMethod="linear":(c.mappingMethod="category",c.loop=!0);var d=new hL(c);return d.__drColorMappingBy=h,d}}}function Bd(t,e){var i=t.get(e);return fL(i)&&i.length?{name:e,range:i}:null}function Vd(t,e,i,n,o,r){var s=a({},e);if(o){var l=o.type,u="color"===l&&o.__drColorMappingBy,h="index"===u?n:"id"===u?r.mapIdToIndex(i.getId()):i.getValue(t.get("visualDimension"));s[l]=o.mapValueToVisual(h)}return s}function Gd(t,e,i,n){var o,a;if(!t.isRemoved()){var r=t.getLayout();o=r.width,a=r.height;var s=(f=t.getModel()).get(_L),l=f.get(wL)/2,u=Kd(f),h=Math.max(s,u),c=s-l,d=h-l,f=t.getModel();t.setLayout({borderWidth:s,upperHeight:h,upperLabelHeight:u},!0);var p=(o=mL(o-2*c,0))*(a=mL(a-c-d,0)),g=Fd(t,f,p,e,i,n);if(g.length){var m={x:c,y:d,width:o,height:a},v=vL(o,a),y=1/0,x=[];x.area=0;for(var _=0,w=g.length;_=0;l--){var u=o["asc"===n?r-l-1:l].getValue();u/i*es[1]&&(s[1]=e)})}else s=[NaN,NaN];return{sum:n,dataExtent:s}}function Ud(t,e,i){for(var n,o=0,a=1/0,r=0,s=t.length;ro&&(o=n));var l=t.area*t.area,u=e*e*i;return l?mL(u*o/l,l/(u*a)):1/0}function Xd(t,e,i,n,o){var a=e===i.width?0:1,r=1-a,s=["x","y"],l=["width","height"],u=i[s[a]],h=e?t.area/e:0;(o||h>i[l[r]])&&(h=i[l[r]]);for(var c=0,d=t.length;cXM&&(u=XM),a=s}u=0?n+=u:n-=u:p>=0?n-=u:n+=u}return n}function pf(t,e){return t.getVisual("opacity")||t.getModel().get(e)}function gf(t,e,i){var n=t.getGraphicEl(),o=pf(t,e);null!=i&&(null==o&&(o=1),o*=i),n.downplay&&n.downplay(),n.traverse(function(t){if("group"!==t.type){var e=t.lineLabelOriginalOpacity;null!=e&&null==i||(e=o),t.setStyle("opacity",e)}})}function mf(t,e){var i=pf(t,e),n=t.getGraphicEl();n.highlight&&n.highlight(),n.traverse(function(t){"group"!==t.type&&t.setStyle("opacity",i)})}function vf(t){return t instanceof Array||(t=[t,t]),t}function yf(t){var e=t.coordinateSystem;if(!e||"view"===e.type){var i=t.getGraph();i.eachNode(function(t){var e=t.getModel();t.setLayout([+e.get("x"),+e.get("y")])}),xf(i)}}function xf(t){t.eachEdge(function(t){var e=t.getModel().get("lineStyle.curveness")||0,i=F(t.node1.getLayout()),n=F(t.node2.getLayout()),o=[i,n];+e&&o.push([(i[0]+n[0])/2-(i[1]-n[1])*e,(i[1]+n[1])/2-(n[0]-i[0])*e]),t.setLayout(o)})}function _f(t){var e=t.coordinateSystem;if(!e||"view"===e.type){var i=e.getBoundingRect(),n=t.getData(),o=n.graph,a=0,r=n.getSum("value"),s=2*Math.PI/(r||n.count()),l=i.width/2+i.x,u=i.height/2+i.y,h=Math.min(i.width,i.height)/2;o.eachNode(function(t){var e=t.getValue("value");a+=s*(r?e:1)/2,t.setLayout([h*Math.cos(a)+l,h*Math.sin(a)+u]),a+=s*(r?e:1)/2}),n.setLayout({cx:l,cy:u}),o.eachEdge(function(t){var e,i=t.getModel().get("lineStyle.curveness")||0,n=F(t.node1.getLayout()),o=F(t.node2.getLayout()),a=(n[0]+o[0])/2,r=(n[1]+o[1])/2;+i&&(e=[l*(i*=3)+a*(1-i),u*i+r*(1-i)]),t.setLayout([n,o,e])})}}function wf(t,e,i){for(var n=i.rect,o=n.width,a=n.height,r=[n.x+o/2,n.y+a/2],s=null==i.gravity?.1:i.gravity,l=0;l0?-1:i<0?1:e?-1:1}}function Pf(t,e){return Math.min(e[1],Math.max(e[0],t))}function Nf(t,e,i){this._axesMap=R(),this._axesLayout={},this.dimensions=t.dimensions,this._rect,this._model=t,this._init(t,e,i)}function Of(t,e){return ek(ik(t,e[0]),e[1])}function Ef(t,e){var i=e.layoutLength/(e.axisCount-1);return{position:i*t,axisNameAvailableWidth:i,axisLabelShow:!0}}function Rf(t,e){var i,n,o=e.layoutLength,a=e.axisExpandWidth,r=e.axisCount,s=e.axisCollapseWidth,l=e.winInnerIndices,u=s,h=!1;return tmk}function $f(t){var e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}function Jf(t,e,i,n){var o=new tb;return o.add(new yM({name:"main",style:ip(i),silent:!0,draggable:!0,cursor:"move",drift:uk(t,e,o,"nswe"),ondragend:uk(qf,e,{isEnd:!0})})),hk(n,function(i){o.add(new yM({name:i,style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:uk(t,e,o,i),ondragend:uk(qf,e,{isEnd:!0})}))}),o}function Qf(t,e,i,n){var o=n.brushStyle.lineWidth||0,a=fk(o,vk),r=i[0][0],s=i[1][0],l=r-o/2,u=s-o/2,h=i[0][1],c=i[1][1],d=h-a+o/2,f=c-a+o/2,p=h-r,g=c-s,m=p+o,v=g+o;ep(t,e,"main",r,s,p,g),n.transformable&&(ep(t,e,"w",l,u,a,v),ep(t,e,"e",d,u,a,v),ep(t,e,"n",l,u,m,a),ep(t,e,"s",l,f,m,a),ep(t,e,"nw",l,u,a,a),ep(t,e,"ne",d,u,a,a),ep(t,e,"sw",l,f,a,a),ep(t,e,"se",d,f,a,a))}function tp(t,e){var i=e.__brushOption,n=i.transformable,o=e.childAt(0);o.useStyle(ip(i)),o.attr({silent:!n,cursor:n?"move":"default"}),hk(["w","e","n","s","se","sw","ne","nw"],function(i){var o=e.childOfName(i),a=ap(t,i);o&&o.attr({silent:!n,invisible:!n,cursor:n?_k[a]+"-resize":null})})}function ep(t,e,i,n,o,a,r){var s=e.childOfName(i);s&&s.setShape(hp(up(t,e,[[n,o],[n+a,o+r]])))}function ip(t){return r({strokeNoScale:!0},t.brushStyle)}function np(t,e,i,n){var o=[dk(t,i),dk(e,n)],a=[fk(t,i),fk(e,n)];return[[o[0],a[0]],[o[1],a[1]]]}function op(t){return Ao(t.group)}function ap(t,e){if(e.length>1)return("e"===(n=[ap(t,(e=e.split(""))[0]),ap(t,e[1])])[0]||"w"===n[0])&&n.reverse(),n.join("");var i={left:"w",right:"e",top:"n",bottom:"s"},n=Co({w:"left",e:"right",n:"top",s:"bottom"}[e],op(t));return i[n]}function rp(t,e,i,n,o,a,r,s){var l=n.__brushOption,u=t(l.range),h=lp(i,a,r);hk(o.split(""),function(t){var e=xk[t];u[e[0]][e[1]]+=h[e[0]]}),l.range=e(np(u[0][0],u[1][0],u[0][1],u[1][1])),Zf(i,n),qf(i,{isEnd:!1})}function sp(t,e,i,n,o){var a=e.__brushOption.range,r=lp(t,i,n);hk(a,function(t){t[0]+=r[0],t[1]+=r[1]}),Zf(t,e),qf(t,{isEnd:!1})}function lp(t,e,i){var n=t.group,o=n.transformCoordToLocal(e,i),a=n.transformCoordToLocal(0,0);return[o[0]-a[0],o[1]-a[1]]}function up(t,e,n){var o=jf(t,e);return o&&!0!==o?o.clipPath(n,t._transform):i(n)}function hp(t){var e=dk(t[0][0],t[1][0]),i=dk(t[0][1],t[1][1]);return{x:e,y:i,width:fk(t[0][0],t[1][0])-e,height:fk(t[0][1],t[1][1])-i}}function cp(t,e,i){if(t._brushType){var n=t._zr,o=t._covers,a=Xf(t,e,i);if(!t._dragging)for(var r=0;r0;a--)Yp(s,l*=.99,r),jp(s,o,i,n,r),tg(s,l,r),jp(s,o,i,n,r)}function Up(t,e){var i=[],n="vertical"===e?"y":"x",o=Zi(t,function(t){return t.getLayout()[n]});return o.keys.sort(function(t,e){return t-e}),d(o.keys,function(t){i.push(o.buckets.get(t))}),i}function Xp(t,e,i,n,o,a,r){var s=[];d(e,function(t){var e=t.length,i=0,l=0;d(t,function(t){i+=t.getLayout().value}),l="vertical"===r?(o-(e-1)*a)/i:(n-(e-1)*a)/i,s.push(l)}),s.sort(function(t,e){return t-e});var l=s[0];d(e,function(t){d(t,function(t,e){var i=t.getLayout().value*l;"vertical"===r?(t.setLayout({x:e},!0),t.setLayout({dx:i},!0)):(t.setLayout({y:e},!0),t.setLayout({dy:i},!0))})}),d(i,function(t){var e=+t.getValue()*l;t.setLayout({dy:e},!0)})}function jp(t,e,i,n,o){d(t,function(t){var a,r,s,l=0,u=t.length;if("vertical"===o){var h;for(t.sort(function(t,e){return t.getLayout().x-e.getLayout().x}),s=0;s0&&(h=a.getLayout().x+r,a.setLayout({x:h},!0)),l=a.getLayout().x+a.getLayout().dx+e;if((r=l-e-n)>0)for(h=a.getLayout().x-r,a.setLayout({x:h},!0),l=h,s=u-2;s>=0;--s)(r=(a=t[s]).getLayout().x+a.getLayout().dx+e-l)>0&&(h=a.getLayout().x-r,a.setLayout({x:h},!0)),l=a.getLayout().x}else{var c;for(t.sort(function(t,e){return t.getLayout().y-e.getLayout().y}),s=0;s0&&(c=a.getLayout().y+r,a.setLayout({y:c},!0)),l=a.getLayout().y+a.getLayout().dy+e;if((r=l-e-i)>0)for(c=a.getLayout().y-r,a.setLayout({y:c},!0),l=c,s=u-2;s>=0;--s)(r=(a=t[s]).getLayout().y+a.getLayout().dy+e-l)>0&&(c=a.getLayout().y-r,a.setLayout({y:c},!0)),l=a.getLayout().y}})}function Yp(t,e,i){d(t.slice().reverse(),function(t){d(t,function(t){if(t.outEdges.length){var n=Qp(t.outEdges,qp,i)/Qp(t.outEdges,Jp,i);if("vertical"===i){var o=t.getLayout().x+(n-$p(t,i))*e;t.setLayout({x:o},!0)}else{var a=t.getLayout().y+(n-$p(t,i))*e;t.setLayout({y:a},!0)}}})})}function qp(t,e){return $p(t.node2,e)*t.getValue()}function Kp(t,e){return $p(t.node1,e)*t.getValue()}function $p(t,e){return"vertical"===e?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function Jp(t){return t.getValue()}function Qp(t,e,i){for(var n=0,o=t.length,a=-1;++a0?"P":"N",a=n.getVisual("borderColor"+o)||n.getVisual("color"+o),r=i.getModel(Gk).getItemStyle(Wk);e.useStyle(r),e.style.fill=null,e.style.stroke=a}function fg(t,e,i,n,o){return i>n?-1:i0?t.get(o,e-1)<=n?1:-1:1}function pg(t,e){var i,n=t.getBaseAxis(),o="category"===n.type?n.getBandWidth():(i=n.getExtent(),Math.abs(i[1]-i[0])/e.count()),a=Vo(A(t.get("barMaxWidth"),o),o),r=Vo(A(t.get("barMinWidth"),1),o),s=t.get("barWidth");return null!=s?Vo(s,o):Math.max(Math.min(o/2,a),r)}function gg(t){return y(t)||(t=[+t,+t]),t}function mg(t,e){t.eachChild(function(t){t.attr({z:e.z,zlevel:e.zlevel,style:{stroke:"stroke"===e.brushType?e.color:null,fill:"fill"===e.brushType?e.color:null}})})}function vg(t,e){tb.call(this);var i=new wu(t,e),n=new tb;this.add(i),this.add(n),n.beforeUpdate=function(){this.attr(i.getScale())},this.updateData(t,e)}function yg(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(t.data=f(e,function(t){var e={coords:[t[0].coord,t[1].coord]};return t[0].name&&(e.fromName=t[0].name),t[1].name&&(e.toName=t[1].name),o([e,t[0],t[1]])}))}function xg(t,e,i){tb.call(this),this.add(this.createLine(t,e,i)),this._updateEffectSymbol(t,e)}function _g(t,e,i){tb.call(this),this._createPolyline(t,e,i)}function wg(t,e,i){xg.call(this,t,e,i),this._lastFrame=0,this._lastFramePercent=0}function bg(){this.group=new tb}function Sg(t){return t instanceof Array||(t=[t,t]),t}function Mg(){var t=iw();this.canvas=t,this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={}}function Ig(t,e,i){var n=t[1]-t[0],o=(e=f(e,function(e){return{interval:[(e.interval[0]-t[0])/n,(e.interval[1]-t[0])/n]}})).length,a=0;return function(t){for(n=a;n=0;n--){var r=e[n].interval;if(r[0]<=t&&t<=r[1]){a=n;break}}return n>=0&&n=e[0]&&t<=e[1]}}function Ag(t){var e=t.dimensions;return"lng"===e[0]&&"lat"===e[1]}function Dg(t,e,i,n){var o=t.getItemLayout(e),a=i.get("symbolRepeat"),r=i.get("symbolClip"),s=i.get("symbolPosition")||"start",l=(i.get("symbolRotate")||0)*Math.PI/180||0,u=i.get("symbolPatternSize")||2,h=i.isAnimationEnabled(),c={dataIndex:e,layout:o,itemModel:i,symbolType:t.getItemVisual(e,"symbol")||"circle",color:t.getItemVisual(e,"color"),symbolClip:r,symbolRepeat:a,symbolRepeatDirection:i.get("symbolRepeatDirection"),symbolPatternSize:u,rotation:l,animationModel:h?i:null,hoverAnimation:h&&i.get("hoverAnimation"),z2:i.getShallow("z",!0)||0};Cg(i,a,o,n,c),kg(t,e,o,a,r,c.boundingLength,c.pxSign,u,n,c),Pg(i,c.symbolScale,l,n,c);var d=c.symbolSize,f=i.get("symbolOffset");return y(f)&&(f=[Vo(f[0],d[0]),Vo(f[1],d[1])]),Ng(i,d,o,a,r,f,s,c.valueLineWidth,c.boundingLength,c.repeatCutLength,n,c),c}function Cg(t,e,i,n,o){var a,r=n.valueDim,s=t.get("symbolBoundingData"),l=n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()),u=l.toGlobalCoord(l.dataToCoord(0)),h=1-+(i[r.wh]<=0);if(y(s)){var c=[Lg(l,s[0])-u,Lg(l,s[1])-u];c[1]0?1:a<0?-1:0}function Lg(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function kg(t,e,i,n,o,a,r,s,l,u){var h=l.valueDim,c=l.categoryDim,d=Math.abs(i[c.wh]),f=t.getItemVisual(e,"symbolSize");y(f)?f=f.slice():(null==f&&(f="100%"),f=[f,f]),f[c.index]=Vo(f[c.index],d),f[h.index]=Vo(f[h.index],n?d:Math.abs(a)),u.symbolSize=f,(u.symbolScale=[f[0]/s,f[1]/s])[h.index]*=(l.isHorizontal?-1:1)*r}function Pg(t,e,i,n,o){var a=t.get(cP)||0;a&&(fP.attr({scale:e.slice(),rotation:i}),fP.updateTransform(),a/=fP.getLineScale(),a*=e[n.valueDim.index]),o.valueLineWidth=a}function Ng(t,e,i,n,o,r,s,l,u,h,c,d){var f=c.categoryDim,p=c.valueDim,g=d.pxSign,m=Math.max(e[p.index]+l,0),v=m;if(n){var y=Math.abs(u),x=T(t.get("symbolMargin"),"15%")+"",_=!1;x.lastIndexOf("!")===x.length-1&&(_=!0,x=x.slice(0,x.length-1)),x=Vo(x,e[p.index]);var w=Math.max(m+2*x,0),b=_?0:2*x,S=Qo(n),M=S?n:Kg((y+b)/w);w=m+2*(x=(y-M*m)/2/(_?M:M-1)),b=_?0:2*x,S||"fixed"===n||(M=h?Kg((Math.abs(h)+b)/w):0),v=M*w-b,d.repeatTimes=M,d.symbolMargin=x}var I=g*(v/2),A=d.pathPosition=[];A[f.index]=i[f.wh]/2,A[p.index]="start"===s?I:"end"===s?u-I:u/2,r&&(A[0]+=r[0],A[1]+=r[1]);var D=d.bundlePosition=[];D[f.index]=i[f.xy],D[p.index]=i[p.xy];var C=d.barRectShape=a({},i);C[p.wh]=g*Math.max(Math.abs(i[p.wh]),Math.abs(A[p.index]+I)),C[f.wh]=i[f.wh];var L=d.clipShape={};L[f.xy]=-i[f.xy],L[f.wh]=c.ecSize[f.wh],L[p.xy]=0,L[p.wh]=i[p.wh]}function Og(t){var e=t.symbolPatternSize,i=Jl(t.symbolType,-e/2,-e/2,e,e,t.color);return i.attr({culling:!0}),"image"!==i.type&&i.setStyle({strokeNoScale:!0}),i}function Eg(t,e,i,n){function o(t){var e=l.slice(),n=i.pxSign,o=t;return("start"===i.symbolRepeatDirection?n>0:n<0)&&(o=h-1-t),e[u.index]=d*(o-h/2+.5)+l[u.index],{position:e,scale:i.symbolScale.slice(),rotation:i.rotation}}var a=t.__pictorialBundle,r=i.symbolSize,s=i.valueLineWidth,l=i.pathPosition,u=e.valueDim,h=i.repeatTimes||0,c=0,d=r[e.valueDim.index]+s+2*i.symbolMargin;for(jg(t,function(t){t.__pictorialAnimationIndex=c,t.__pictorialRepeatTimes=h,c0)],d=t.__pictorialBarRect;kh(d.style,h,a,n,e.seriesModel,o,c),fo(d,h)}function Kg(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}function $g(t,e,i){this.dimension="single",this.dimensions=["single"],this._axis=null,this._rect,this._init(t,e,i),this.model=t}function Jg(t,e){e=e||{};var i=t.coordinateSystem,n=t.axis,o={},a=n.position,r=n.orient,s=i.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};o.position=["vertical"===r?u.vertical[a]:l[0],"horizontal"===r?u.horizontal[a]:l[3]];var h={horizontal:0,vertical:1};o.rotation=Math.PI/2*h[r];var c={top:-1,bottom:1,right:1,left:-1};o.labelDirection=o.tickDirection=o.nameDirection=c[a],t.get("axisTick.inside")&&(o.tickDirection=-o.tickDirection),T(e.labelInside,t.get("axisLabel.inside"))&&(o.labelDirection=-o.labelDirection);var d=e.rotate;return null==d&&(d=t.get("axisLabel.rotate")),o.labelRotation="top"===a?-d:d,o.z2=1,o}function Qg(t,e,i,n,o){var r=t.axis;if(!r.scale.isBlank()&&r.containData(e))if(t.involveSeries){var s=tm(e,t),l=s.payloadBatch,u=s.snapToValue;l[0]&&null==o.seriesIndex&&a(o,l[0]),!n&&t.snap&&r.containData(u)&&null!=u&&(e=u),i.showPointer(t,e,l,o),i.showTooltip(t,s,u)}else i.showPointer(t,e)}function tm(t,e){var i=e.axis,n=i.dim,o=t,a=[],r=Number.MAX_VALUE,s=-1;return _P(e.seriesModels,function(e,l){var u,h,c=e.getData().mapDimension(n,!0);if(e.getAxisTooltipData){var d=e.getAxisTooltipData(c,t,i);h=d.dataIndices,u=d.nestestValue}else{if(!(h=e.getData().indicesOfNearest(c[0],t,"category"===i.type?.5:null)).length)return;u=e.getData().get(c[0],h[0])}if(null!=u&&isFinite(u)){var f=t-u,p=Math.abs(f);p<=r&&((p=0&&s<0)&&(r=p,s=f,o=u,a.length=0),_P(h,function(t){a.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})}))}}),{payloadBatch:a,snapToValue:o}}function em(t,e,i,n){t[e.key]={value:i,payloadBatch:n}}function im(t,e,i,n){var o=i.payloadBatch,a=e.axis,r=a.model,s=e.axisPointerModel;if(e.triggerTooltip&&o.length){var l=e.coordSys.model,u=Ah(l),h=t.map[u];h||(h=t.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(h)),h.dataByAxis.push({axisDim:a.dim,axisIndex:r.componentIndex,axisType:r.type,axisId:r.id,value:n,valueLabelOpt:{precision:s.get("label.precision"),formatter:s.get("label.formatter")},seriesDataIndices:o.slice()})}}function nm(t,e,i){var n=i.axesInfo=[];_P(e,function(e,i){var o=e.axisPointerModel.option,a=t[i];a?(!e.useHandle&&(o.status="show"),o.value=a.value,o.seriesDataIndices=(a.payloadBatch||[]).slice()):!e.useHandle&&(o.status="hide"),"show"===o.status&&n.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:o.value})})}function om(t,e,i,n){if(!lm(e)&&t.list.length){var o=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:i.tooltipOption,position:i.position,dataIndexInside:o.dataIndexInside,dataIndex:o.dataIndex,seriesIndex:o.seriesIndex,dataByCoordSys:t.list})}else n({type:"hideTip"})}function am(t,e,i){var n=i.getZr(),o=bP(n).axisPointerLastHighlights||{},a=bP(n).axisPointerLastHighlights={};_P(t,function(t,e){var i=t.axisPointerModel.option;"show"===i.status&&_P(i.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;a[e]=t})});var r=[],s=[];d(o,function(t,e){!a[e]&&s.push(t)}),d(a,function(t,e){!o[e]&&r.push(t)}),s.length&&i.dispatchAction({type:"downplay",escapeConnect:!0,batch:s}),r.length&&i.dispatchAction({type:"highlight",escapeConnect:!0,batch:r})}function rm(t,e){for(var i=0;i<(t||[]).length;i++){var n=t[i];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}function sm(t){var e=t.axis.model,i={},n=i.axisDim=t.axis.dim;return i.axisIndex=i[n+"AxisIndex"]=e.componentIndex,i.axisName=i[n+"AxisName"]=e.name,i.axisId=i[n+"AxisId"]=e.id,i}function lm(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function um(t,e,i){if(!U_.node){var n=e.getZr();SP(n).records||(SP(n).records={}),hm(n,e),(SP(n).records[t]||(SP(n).records[t]={})).handler=i}}function hm(t,e){function i(i,n){t.on(i,function(i){var o=pm(e);MP(SP(t).records,function(t){t&&n(t,i,o.dispatchAction)}),cm(o.pendings,e)})}SP(t).initialized||(SP(t).initialized=!0,i("click",v(fm,"click")),i("mousemove",v(fm,"mousemove")),i("globalout",dm))}function cm(t,e){var i,n=t.showTip.length,o=t.hideTip.length;n?i=t.showTip[n-1]:o&&(i=t.hideTip[o-1]),i&&(i.dispatchAction=null,e.dispatchAction(i))}function dm(t,e,i){t.handler("leave",null,i)}function fm(t,e,i,n){e.handler(t,i,n)}function pm(t){var e={showTip:[],hideTip:[]},i=function(n){var o=e[n.type];o?o.push(n):(n.dispatchAction=i,t.dispatchAction(n))};return{dispatchAction:i,pendings:e}}function gm(t,e){if(!U_.node){var i=e.getZr();(SP(i).records||{})[t]&&(SP(i).records[t]=null)}}function mm(){}function vm(t,e,i,n){ym(TP(i).lastProp,n)||(TP(i).lastProp=n,e?Io(i,n,t):(i.stopAnimation(),i.attr(n)))}function ym(t,e){if(w(t)&&w(e)){var i=!0;return d(e,function(e,n){i=i&&ym(t[n],e)}),!!i}return t===e}function xm(t,e){t[e.get("label.show")?"show":"hide"]()}function _m(t){return{position:t.position.slice(),rotation:t.rotation||0}}function wm(t,e,i){var n=e.get("z"),o=e.get("zlevel");t&&t.traverse(function(t){"group"!==t.type&&(null!=n&&(t.z=n),null!=o&&(t.zlevel=o),t.silent=i)})}function bm(t){var e,i=t.get("type"),n=t.getModel(i+"Style");return"line"===i?(e=n.getLineStyle()).fill=null:"shadow"===i&&((e=n.getAreaStyle()).stroke=null),e}function Sm(t,e,i,n,o){var a=Im(i.get("value"),e.axis,e.ecModel,i.get("seriesDataIndices"),{precision:i.get("label.precision"),formatter:i.get("label.formatter")}),r=i.getModel("label"),s=qM(r.get("padding")||0),l=r.getFont(),u=ke(a,l),h=o.position,c=u.width+s[1]+s[3],d=u.height+s[0]+s[2],f=o.align;"right"===f&&(h[0]-=c),"center"===f&&(h[0]-=c/2);var p=o.verticalAlign;"bottom"===p&&(h[1]-=d),"middle"===p&&(h[1]-=d/2),Mm(h,c,d,n);var g=r.get("backgroundColor");g&&"auto"!==g||(g=e.get("axisLine.lineStyle.color")),t.label={shape:{x:0,y:0,width:c,height:d,r:r.get("borderRadius")},position:h.slice(),style:{text:a,textFont:l,textFill:r.getTextColor(),textPosition:"inside",fill:g,stroke:r.get("borderColor")||"transparent",lineWidth:r.get("borderWidth")||0,shadowBlur:r.get("shadowBlur"),shadowColor:r.get("shadowColor"),shadowOffsetX:r.get("shadowOffsetX"),shadowOffsetY:r.get("shadowOffsetY")},z2:10}}function Mm(t,e,i,n){var o=n.getWidth(),a=n.getHeight();t[0]=Math.min(t[0]+e,o)-e,t[1]=Math.min(t[1]+i,a)-i,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}function Im(t,e,i,n,o){t=e.scale.parse(t);var a=e.scale.getLabel(t,{precision:o.precision}),r=o.formatter;if(r){var s={value:Xl(e,t),seriesData:[]};d(n,function(t){var e=i.getSeriesByIndex(t.seriesIndex),n=t.dataIndexInside,o=e&&e.getDataParams(n);o&&s.seriesData.push(o)}),_(r)?a=r.replace("{value}",a):x(r)&&(a=r(s))}return a}function Tm(t,e,i){var n=xt();return Mt(n,n,i.rotation),St(n,n,i.position),Do([t.dataToCoord(e),(i.labelOffset||0)+(i.labelDirection||1)*(i.labelMargin||0)],n)}function Am(t,e,i,n,o,a){var r=FD.innerTextLayout(i.rotation,0,i.labelDirection);i.labelMargin=o.get("label.margin"),Sm(e,n,o,a,{position:Tm(n.axis,t,i),align:r.textAlign,verticalAlign:r.textVerticalAlign})}function Dm(t,e,i){return i=i||0,{x1:t[i],y1:t[1-i],x2:e[i],y2:e[1-i]}}function Cm(t,e,i){return i=i||0,{x:t[i],y:t[1-i],width:e[i],height:e[1-i]}}function Lm(t,e,i,n,o,a){return{cx:t,cy:e,r0:i,r:n,startAngle:o,endAngle:a,clockwise:!0}}function km(t,e){var i={};return i[e.dim+"AxisIndex"]=e.index,t.getCartesian(i)}function Pm(t){return"x"===t.dim?0:1}function Nm(t){return t.isHorizontal()?0:1}function Om(t,e){var i=t.getRect();return[i[kP[e]],i[kP[e]]+i[PP[e]]]}function Em(t,e,i){var n=new yM({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return To(n,{shape:{width:t.width+20,height:t.height+20}},e,i),n}function Rm(t,e,i){if(t.count())for(var n,o=e.coordinateSystem,a=e.getLayerSeries(),r=t.mapDimension("single"),s=t.mapDimension("value"),l=f(a,function(e){return f(e.indices,function(e){var i=o.dataToPoint(t.get(r,e));return i[1]=t.get(s,e),i})}),u=zm(l),h=u.y0,c=i/u.max,d=a.length,p=a[0].indices.length,g=0;ga&&(a=u),n.push(u)}for(var h=0;ha&&(a=d)}return r.y0=o,r.max=a,r}function Bm(t){var e=0;d(t.children,function(t){Bm(t);var i=t.value;y(i)&&(i=i[0]),e+=i});var i=t.value;y(i)&&(i=i[0]),(null==i||isNaN(i))&&(i=e),i<0&&(i=0),y(t.value)?t.value[0]=i:t.value=i}function Vm(t,e,i){function n(){r.ignore=r.hoverIgnore}function o(){r.ignore=r.normalIgnore}tb.call(this);var a=new hM({z2:zP});a.seriesIndex=e.seriesIndex;var r=new rM({z2:BP,silent:t.getModel("label").get("silent")});this.add(a),this.add(r),this.updateData(!0,t,"normal",e,i),this.on("emphasis",n).on("normal",o).on("mouseover",n).on("mouseout",o)}function Gm(t,e,i){var n=t.getVisual("color"),o=t.getVisual("visualMeta");o&&0!==o.length||(n=null);var a=t.getModel("itemStyle").get("color");if(a)return a;if(n)return n;if(0===t.depth)return i.option.color[0];var r=i.option.color.length;return a=i.option.color[Fm(t)%r]}function Fm(t){for(var e=t;e.depth>1;)e=e.parentNode;return l(t.getAncestors()[0].children,e)}function Wm(t,e,i){return i!==RP.NONE&&(i===RP.SELF?t===e:i===RP.ANCESTOR?t===e||t.isAncestorOf(e):t===e||t.isDescendantOf(e))}function Hm(t,e,i){e.getData().setItemVisual(t.dataIndex,"color",i)}function Zm(t,e){var i=t.children||[];t.children=Um(i,e),i.length&&d(t.children,function(t){Zm(t,e)})}function Um(t,e){if("function"==typeof e)return t.sort(e);var i="asc"===e;return t.sort(function(t,e){var n=(t.getValue()-e.getValue())*(i?1:-1);return 0===n?(t.dataIndex-e.dataIndex)*(i?-1:1):n})}function Xm(t,e){return e=e||[0,0],f(["x","y"],function(i,n){var o=this.getAxis(i),a=e[n],r=t[n]/2;return"category"===o.type?o.getBandWidth():Math.abs(o.dataToCoord(a-r)-o.dataToCoord(a+r))},this)}function jm(t,e){return e=e||[0,0],f([0,1],function(i){var n=e[i],o=t[i]/2,a=[],r=[];return a[i]=n-o,r[i]=n+o,a[1-i]=r[1-i]=e[1-i],Math.abs(this.dataToPoint(a)[i]-this.dataToPoint(r)[i])},this)}function Ym(t,e){var i=this.getAxis(),n=e instanceof Array?e[0]:e,o=(t instanceof Array?t[0]:t)/2;return"category"===i.type?i.getBandWidth():Math.abs(i.dataToCoord(n-o)-i.dataToCoord(n+o))}function qm(t,e){return f(["Radius","Angle"],function(i,n){var o=this["get"+i+"Axis"](),a=e[n],r=t[n]/2,s="dataTo"+i,l="category"===o.type?o.getBandWidth():Math.abs(o[s](a-r)-o[s](a+r));return"Angle"===i&&(l=l*Math.PI/180),l},this)}function Km(t){var e,i=t.type;if("path"===i){var n=t.shape,o=null!=n.width&&null!=n.height?{x:n.x||0,y:n.y||0,width:n.width,height:n.height}:null,a=lv(n);(e=Xn(a,null,o,n.layout||"center")).__customPathData=a}else"image"===i?(e=new fi({})).__customImagePath=t.style.image:"text"===i?(e=new rM({})).__customText=t.style.text:e=new(0,zM[i.charAt(0).toUpperCase()+i.slice(1)]);return e.__customGraphicType=i,e.name=t.name,e}function $m(t,e,n,o,a,r,s){var l={},u=n.style||{};if(n.shape&&(l.shape=i(n.shape)),n.position&&(l.position=n.position.slice()),n.scale&&(l.scale=n.scale.slice()),n.origin&&(l.origin=n.origin.slice()),n.rotation&&(l.rotation=n.rotation),"image"===t.type&&n.style){h=l.style={};d(["x","y","width","height"],function(e){Jm(e,h,u,t.style,r)})}if("text"===t.type&&n.style){var h=l.style={};d(["x","y"],function(e){Jm(e,h,u,t.style,r)}),!u.hasOwnProperty("textFill")&&u.fill&&(u.textFill=u.fill),!u.hasOwnProperty("textStroke")&&u.stroke&&(u.textStroke=u.stroke)}if("group"!==t.type&&(t.useStyle(u),r)){t.style.opacity=0;var c=u.opacity;null==c&&(c=1),To(t,{style:{opacity:c}},o,e)}r?t.attr(l):Io(t,l,o,e),n.hasOwnProperty("z2")&&t.attr("z2",n.z2||0),n.hasOwnProperty("silent")&&t.attr("silent",n.silent),n.hasOwnProperty("invisible")&&t.attr("invisible",n.invisible),n.hasOwnProperty("ignore")&&t.attr("ignore",n.ignore),n.hasOwnProperty("info")&&t.attr("info",n.info);var f=n.styleEmphasis,p=!1===f;t.__cusHasEmphStl&&null==f||!t.__cusHasEmphStl&&p||(ro(t,f),t.__cusHasEmphStl=!p),s&&po(t,!p)}function Jm(t,e,i,n,o){null==i[t]||o||(e[t]=i[t],i[t]=n[t])}function Qm(t,e,i,n){function o(t){null==t&&(t=h),v&&(c=e.getItemModel(t),d=c.getModel(UP),f=c.getModel(XP),p=e.getItemVisual(t,"color"),v=!1)}var s=t.get("renderItem"),l=t.coordinateSystem,u={};l&&(u=l.prepareCustoms?l.prepareCustoms():YP[l.type](l));var h,c,d,f,p,g=r({getWidth:n.getWidth,getHeight:n.getHeight,getZr:n.getZr,getDevicePixelRatio:n.getDevicePixelRatio,value:function(t,i){return null==i&&(i=h),e.get(e.getDimension(t||0),i)},style:function(i,n){null==n&&(n=h),o(n);var r=c.getModel(HP).getItemStyle();null!=p&&(r.fill=p);var s=e.getItemVisual(n,"opacity");return null!=s&&(r.opacity=s),mo(r,d,null,{autoColor:p,isRectText:!0}),r.text=d.getShallow("show")?A(t.getFormattedLabel(n,"normal"),_u(e,n)):null,i&&a(r,i),r},styleEmphasis:function(i,n){null==n&&(n=h),o(n);var r=c.getModel(ZP).getItemStyle();return mo(r,f,null,{isRectText:!0},!0),r.text=f.getShallow("show")?D(t.getFormattedLabel(n,"emphasis"),t.getFormattedLabel(n,"normal"),_u(e,n)):null,i&&a(r,i),r},visual:function(t,i){return null==i&&(i=h),e.getItemVisual(i,t)},barLayout:function(t){if(l.getBaseAxis)return Ll(r({axis:l.getBaseAxis()},t),n)},currentSeriesIndices:function(){return i.getCurrentSeriesIndices()},font:function(t){return So(t,i)}},u.api||{}),m={context:{},seriesId:t.id,seriesName:t.name,seriesIndex:t.seriesIndex,coordSys:u.coordSys,dataInsideLength:e.count(),encode:tv(t.getData())},v=!0;return function(t,i){return h=t,v=!0,s&&s(r({dataIndexInside:t,dataIndex:e.getRawIndex(t),actionType:i?i.type:null},m),g)}}function tv(t){var e={};return d(t.dimensions,function(i,n){var o=t.getDimensionInfo(i);if(!o.isExtraCoord){var a=o.coordDim;(e[a]=e[a]||[])[o.coordDimIndex]=n}}),e}function ev(t,e,i,n,o,a){return(t=iv(t,e,i,n,o,a,!0))&&a.setItemGraphicEl(e,t),t}function iv(t,e,i,n,o,a,r){var s=!i,l=(i=i||{}).type,u=i.shape,h=i.style;if(t&&(s||null!=l&&l!==t.__customGraphicType||"path"===l&&uv(u)&&lv(u)!==t.__customPathData||"image"===l&&hv(h,"image")&&h.image!==t.__customImagePath||"text"===l&&hv(u,"text")&&h.text!==t.__customText)&&(o.remove(t),t=null),!s){var c=!t;return!t&&(t=Km(i)),$m(t,e,i,n,a,c,r),"group"===l&&nv(t,e,i,n,a),o.add(t),t}}function nv(t,e,i,n,o){var a=i.children,r=a?a.length:0,s=i.$mergeChildren,l="byName"===s||i.diffChildrenByName,u=!1===s;if(r||l||u)if(l)ov({oldChildren:t.children()||[],newChildren:a||[],dataIndex:e,animatableModel:n,group:t,data:o});else{u&&t.removeAll();for(var h=0;hn?t-=l+a:t+=a),null!=r&&(e+u+r>o?e-=u+r:e+=r),[t,e]}function Ov(t,e,i,n,o){var a=i.getOuterSize(),r=a.width,s=a.height;return t=Math.min(t+r,n)-r,e=Math.min(e+s,o)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}function Ev(t,e,i){var n=i[0],o=i[1],a=0,r=0,s=e.width,l=e.height;switch(t){case"inside":a=e.x+s/2-n/2,r=e.y+l/2-o/2;break;case"top":a=e.x+s/2-n/2,r=e.y-o-5;break;case"bottom":a=e.x+s/2-n/2,r=e.y+l+5;break;case"left":a=e.x-n-5,r=e.y+l/2-o/2;break;case"right":a=e.x+s+5,r=e.y+l/2-o/2}return[a,r]}function Rv(t){return"center"===t||"middle"===t}function zv(t){return t.get("stack")||"__ec_stack_"+t.seriesIndex}function Bv(t){return t.dim}function Vv(t,e){var i={};d(t,function(t,e){var n=t.getData(),o=t.coordinateSystem.getBaseAxis(),a=o.getExtent(),r="category"===o.type?o.getBandWidth():Math.abs(a[1]-a[0])/n.count(),s=i[Bv(o)]||{bandWidth:r,remainedWidth:r,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},l=s.stacks;i[Bv(o)]=s;var u=zv(t);l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var h=Vo(t.get("barWidth"),r),c=Vo(t.get("barMaxWidth"),r),d=t.get("barGap"),f=t.get("barCategoryGap");h&&!l[u].width&&(h=Math.min(s.remainedWidth,h),l[u].width=h,s.remainedWidth-=h),c&&(l[u].maxWidth=c),null!=d&&(s.gap=d),null!=f&&(s.categoryGap=f)});var n={};return d(i,function(t,e){n[e]={};var i=t.stacks,o=t.bandWidth,a=Vo(t.categoryGap,o),r=Vo(t.gap,1),s=t.remainedWidth,l=t.autoWidthCount,u=(s-a)/(l+(l-1)*r);u=Math.max(u,0),d(i,function(t,e){var i=t.maxWidth;i&&ie[0]&&(e=e.slice().reverse());var n=t.coordToPoint([e[0],i]),o=t.coordToPoint([e[1],i]);return{x1:n[0],y1:n[1],x2:o[0],y2:o[1]}}function jv(t){return t.getRadiusAxis().inverse?0:1}function Yv(t){var e=t[0],i=t[t.length-1];e&&i&&Math.abs(Math.abs(e.coord-i.coord)-360)<1e-4&&t.pop()}function qv(t,e,i){return{position:[t.cx,t.cy],rotation:i/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:e.getModel("axisLabel").get("rotate"),z2:1}}function Kv(t,e,i,n,o){var a=e.axis,r=a.dataToCoord(t),s=n.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l,u,h,c=n.getRadiusAxis().getExtent();if("radius"===a.dim){var d=xt();Mt(d,d,s),St(d,d,[n.cx,n.cy]),l=Do([r,-o],d);var f=e.getModel("axisLabel").get("rotate")||0,p=FD.innerTextLayout(s,f*Math.PI/180,-1);u=p.textAlign,h=p.textVerticalAlign}else{var g=c[1];l=n.coordToPoint([g+o,r]);var m=n.cx,v=n.cy;u=Math.abs(l[0]-m)/g<.3?"center":l[0]>m?"left":"right",h=Math.abs(l[1]-v)/g<.3?"middle":l[1]>v?"top":"bottom"}return{position:l,align:u,verticalAlign:h}}function $v(t,e){e.update="updateView",Es(e,function(e,i){var n={};return i.eachComponent({mainType:"geo",query:e},function(i){i[t](e.name),d(i.coordinateSystem.regions,function(t){n[t.name]=i.isSelected(t.name)||!1})}),{selected:n,name:e.name}})}function Jv(t){var e={};d(t,function(t){e[t]=1}),t.length=0,d(e,function(e,i){t.push(i)})}function Qv(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return!0}function ty(t,e,n){function o(){var t=function(){};return t.prototype.__hidden=t.prototype,new t}var a={};return MN(e,function(e){var r=a[e]=o();MN(t[e],function(t,o){if(hL.isValidType(o)){var a={type:o,visual:t};n&&n(a,e),r[o]=new hL(a),"opacity"===o&&((a=i(a)).type="colorAlpha",r.__hidden.__alphaForOpacity=new hL(a))}})}),a}function ey(t,e,n){var o;d(n,function(t){e.hasOwnProperty(t)&&Qv(e[t])&&(o=!0)}),o&&d(n,function(n){e.hasOwnProperty(n)&&Qv(e[n])?t[n]=i(e[n]):delete t[n]})}function iy(t,e,i,n,o,a){function r(t){return i.getItemVisual(h,t)}function s(t,e){i.setItemVisual(h,t,e)}function l(t,l){h=null==a?t:l;var c=i.getRawDataItem(h);if(!c||!1!==c.visualMap)for(var d=n.call(o,t),f=e[d],p=u[d],g=0,m=p.length;g1)return!1;var h=uy(i-t,o-t,n-e,a-e)/l;return!(h<0||h>1)}function ly(t){return t<=1e-6&&t>=-1e-6}function uy(t,e,i,n){return t*n-e*i}function hy(t,e,i){var n=this._targetInfoList=[],o={},a=dy(e,t);TN(PN,function(t,e){(!i||!i.include||AN(i.include,e)>=0)&&t(a,n,o)})}function cy(t){return t[0]>t[1]&&t.reverse(),t}function dy(t,e){return Vi(t,e,{includeMainTypes:LN})}function fy(t,e,i,n){var o=i.getAxis(["x","y"][t]),a=cy(f([0,1],function(t){return e?o.coordToData(o.toLocalCoord(n[t])):o.toGlobalCoord(o.dataToCoord(n[t]))})),r=[];return r[t]=a,r[1-t]=[NaN,NaN],{values:a,xyMinMax:r}}function py(t,e,i,n){return[e[0]-n[t]*i[0],e[1]-n[t]*i[1]]}function gy(t,e){var i=my(t),n=my(e),o=[i[0]/n[0],i[1]/n[1]];return isNaN(o[0])&&(o[0]=1),isNaN(o[1])&&(o[1]=1),o}function my(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}function vy(t,e,i,n,o){if(o){var a=t.getZr();a[VN]||(a[BN]||(a[BN]=yy),Nr(a,BN,i,e)(t,n))}}function yy(t,e){if(!t.isDisposed()){var i=t.getZr();i[VN]=!0,t.dispatchAction({type:"brushSelect",batch:e}),i[VN]=!1}}function xy(t,e,i,n){for(var o=0,a=e.length;o=0}function Ny(t,e,i){function n(t,e){return l(e.nodes,t)>=0}function o(t,n){var o=!1;return e(function(e){d(i(t,e)||[],function(t){n.records[e.name][t]&&(o=!0)})}),o}function a(t,n){n.nodes.push(t),e(function(e){d(i(t,e)||[],function(t){n.records[e.name][t]=!0})})}return function(i){var r={nodes:[],records:{}};if(e(function(t){r.records[t.name]={}}),!i)return r;a(i,r);var s;do{s=!1,t(function(t){!n(t,r)&&o(t,r)&&(a(t,r),s=!0)})}while(s);return r}}function Oy(t,e,i){var n=[1/0,-1/0];return $N(i,function(t){var i=t.getData();i&&$N(i.mapDimension(e,!0),function(t){var e=i.getApproximateExtent(t);e[0]n[1]&&(n[1]=e[1])})}),n[1]0?0:NaN);var r=i.getMax(!0);return null!=r&&"dataMax"!==r&&"function"!=typeof r?e[1]=r:o&&(e[1]=a>0?a-1:NaN),i.get("scale",!0)||(e[0]>0&&(e[0]=0),e[1]<0&&(e[1]=0)),e}function Ry(t,e){var i=t.getAxisModel(),n=t._percentWindow,o=t._valueWindow;if(n){var a=Zo(o,[0,500]);a=Math.min(a,20);var r=e||0===n[0]&&100===n[1];i.setRange(r?null:+o[0].toFixed(a),r?null:+o[1].toFixed(a))}}function zy(t){var e=t._minMaxSpan={},i=t._dataZoomModel;$N(["min","max"],function(n){e[n+"Span"]=i.get(n+"Span");var o=i.get(n+"ValueSpan");if(null!=o&&(e[n+"ValueSpan"]=o,null!=(o=t.getAxisModel().axis.scale.parse(o)))){var a=t._dataExtent;e[n+"Span"]=Bo(a[0]+o,a,[0,100],!0)}})}function By(t){var e={};return tO(["start","end","startValue","endValue","throttle"],function(i){t.hasOwnProperty(i)&&(e[i]=t[i])}),e}function Vy(t,e){var i=t._rangePropMode,n=t.get("rangeMode");tO([["start","startValue"],["end","endValue"]],function(t,o){var a=null!=e[t[0]],r=null!=e[t[1]];a&&!r?i[o]="percent":!a&&r?i[o]="value":n?i[o]=n[o]:a&&(i[o]="percent")})}function Gy(t){return{x:"y",y:"x",radius:"angle",angle:"radius"}[t]}function Fy(t){return"vertical"===t?"ns-resize":"ew-resize"}function Wy(t,e){var i=Uy(t),n=e.dataZoomId,o=e.coordId;d(i,function(t,i){var a=t.dataZoomInfos;a[n]&&l(e.allCoordIds,o)<0&&(delete a[n],t.count--)}),jy(i);var a=i[o];a||((a=i[o]={coordId:o,dataZoomInfos:{},count:0}).controller=Xy(t,a),a.dispatchAction=v(Yy,t)),!a.dataZoomInfos[n]&&a.count++,a.dataZoomInfos[n]=e;var r=qy(a.dataZoomInfos);a.controller.enable(r.controlType,r.opt),a.controller.setPointerChecker(e.containsPoint),Nr(a,"dispatchAction",e.dataZoomModel.get("throttle",!0),"fixRate")}function Hy(t,e){var i=Uy(t);d(i,function(t){t.controller.dispose();var i=t.dataZoomInfos;i[e]&&(delete i[e],t.count--)}),jy(i)}function Zy(t){return t.type+"\0_"+t.id}function Uy(t){var e=t.getZr();return e[fO]||(e[fO]={})}function Xy(t,e){var i=new oc(t.getZr());return d(["pan","zoom","scrollMove"],function(t){i.on(t,function(i){var n=[];d(e.dataZoomInfos,function(o){if(i.isAvailableBehavior(o.dataZoomModel.option)){var a=(o.getRange||{})[t],r=a&&a(e.controller,i);!o.dataZoomModel.get("disabled",!0)&&r&&n.push({dataZoomId:o.dataZoomId,start:r[0],end:r[1]})}}),n.length&&e.dispatchAction(n)})}),i}function jy(t){d(t,function(e,i){e.count||(e.controller.dispose(),delete t[i])})}function Yy(t,e){t.dispatchAction({type:"dataZoom",batch:e})}function qy(t){var e,i={type_true:2,type_move:1,type_false:0,type_undefined:-1},n=!0;return d(t,function(t){var o=t.dataZoomModel,a=!o.get("disabled",!0)&&(!o.get("zoomLock",!0)||"move");i["type_"+a]>i["type_"+e]&&(e=a),n&=o.get("preventDefaultMouseMove",!0)}),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!n}}}function Ky(t){return function(e,i,n,o){var a=this._range,r=a.slice(),s=e.axisModels[0];if(s){var l=t(r,s,e,i,n,o);return QL(l,r,[0,100],"all"),this._range=r,a[0]!==r[0]||a[1]!==r[1]?r:void 0}}}function $y(t,e){return t&&t.hasOwnProperty&&t.hasOwnProperty(e)}function Jy(t,e,i,n){for(var o=e.targetVisuals[n],a=hL.prepareVisualTypes(o),r={color:t.getData().getVisual("color")},s=0,l=a.length;s=0&&(r[a]=+r[a].toFixed(h)),r}function fx(t,e){var n=t.getData(),o=t.coordinateSystem;if(e&&!cx(e)&&!y(e.coord)&&o){var a=o.dimensions,r=px(e,n,o,t);if((e=i(e)).type&&YO[e.type]&&r.baseAxis&&r.valueAxis){var s=XO(a,r.baseAxis.dim),l=XO(a,r.valueAxis.dim);e.coord=YO[e.type](n,r.baseDataDim,r.valueDataDim,s,l),e.value=e.coord[l]}else{for(var u=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],h=0;h<2;h++)YO[u[h]]&&(u[h]=yx(n,n.mapDimension(a[h]),u[h]));e.coord=u}}return e}function px(t,e,i,n){var o={};return null!=t.valueIndex||null!=t.valueDim?(o.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,o.valueAxis=i.getAxis(gx(n,o.valueDataDim)),o.baseAxis=i.getOtherAxis(o.valueAxis),o.baseDataDim=e.mapDimension(o.baseAxis.dim)):(o.baseAxis=n.getBaseAxis(),o.valueAxis=i.getOtherAxis(o.baseAxis),o.baseDataDim=e.mapDimension(o.baseAxis.dim),o.valueDataDim=e.mapDimension(o.valueAxis.dim)),o}function gx(t,e){var i=t.getData(),n=i.dimensions;e=i.getDimension(e);for(var o=0;o=0)return!0}function Yx(t){for(var e=t.split(/\n+/g),i=[],n=f(Xx(e.shift()).split(pE),function(t){return{name:t,data:[]}}),o=0;o=0&&!i[o][n];o--);if(o<0){var a=t.queryComponents({mainType:"dataZoom",subType:"select",id:n})[0];if(a){var r=a.getPercentRange();i[0][n]={dataZoomId:n,start:r[0],end:r[1]}}}}),i.push(e)}function t_(t){var e=n_(t),i=e[e.length-1];e.length>1&&e.pop();var n={};return gE(i,function(t,i){for(var o=e.length-1;o>=0;o--)if(t=e[o][i]){n[i]=t;break}}),n}function e_(t){t[mE]=null}function i_(t){return n_(t).length}function n_(t){var e=t[mE];return e||(e=t[mE]=[{}]),e}function o_(t,e,i){(this._brushController=new zf(i.getZr())).on("brush",m(this._onBrush,this)).mount(),this._isZoomActive}function a_(t){var e={};return d(["xAxisIndex","yAxisIndex"],function(i){e[i]=t[i],null==e[i]&&(e[i]="all"),(!1===e[i]||"none"===e[i])&&(e[i]=[])}),e}function r_(t,e){t.setIconStatus("back",i_(e)>1?"emphasis":"normal")}function s_(t,e,i,n,o){var a=i._isZoomActive;n&&"takeGlobalCursor"===n.type&&(a="dataZoomSelect"===n.key&&n.dataZoomSelectActive),i._isZoomActive=a,t.setIconStatus("zoom",a?"emphasis":"normal");var r=new hy(a_(t.option),e,{include:["grid"]});i._brushController.setPanels(r.makePanelOpts(o,function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"})).enableBrush(!!a&&{brushType:"auto",brushStyle:{lineWidth:0,fill:"rgba(0,0,0,0.2)"}})}function l_(t){this.model=t}function u_(t){return SE(t)}function h_(){if(!TE&&AE){TE=!0;var t=AE.styleSheets;t.length<31?AE.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):t[0].addRule(".zrvml","behavior:url(#default#VML)")}}function c_(t){return parseInt(t,10)}function d_(t,e){h_(),this.root=t,this.storage=e;var i=document.createElement("div"),n=document.createElement("div");i.style.cssText="display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;",n.style.cssText="position:absolute;left:0;top:0;",t.appendChild(i),this._vmlRoot=n,this._vmlViewport=i,this.resize();var o=e.delFromStorage,a=e.addToStorage;e.delFromStorage=function(t){o.call(e,t),t&&t.onRemove&&t.onRemove(n)},e.addToStorage=function(t){t.onAdd&&t.onAdd(n),a.call(e,t)},this._firstPaint=!0}function f_(t){return function(){Yw('In IE8.0 VML mode painter not support method "'+t+'"')}}function p_(t){return document.createElementNS(sR,t)}function g_(t){return cR(1e4*t)/1e4}function m_(t){return t-vR}function v_(t,e){var i=e?t.textFill:t.fill;return null!=i&&i!==hR}function y_(t,e){var i=e?t.textStroke:t.stroke;return null!=i&&i!==hR}function x_(t,e){e&&__(t,"transform","matrix("+uR.call(e,",")+")")}function __(t,e,i){(!i||"linear"!==i.type&&"radial"!==i.type)&&t.setAttribute(e,i)}function w_(t,e,i){t.setAttributeNS("http://www.w3.org/1999/xlink",e,i)}function b_(t,e,i,n){if(v_(e,i)){var o=i?e.textFill:e.fill;o="transparent"===o?hR:o,"none"!==t.getAttribute("clip-path")&&o===hR&&(o="rgba(0, 0, 0, 0.002)"),__(t,"fill",o),__(t,"fill-opacity",null!=e.fillOpacity?e.fillOpacity*e.opacity:e.opacity)}else __(t,"fill",hR);if(y_(e,i)){var a=i?e.textStroke:e.stroke;__(t,"stroke",a="transparent"===a?hR:a),__(t,"stroke-width",(i?e.textStrokeWidth:e.lineWidth)/(!i&&e.strokeNoScale?n.getLineScale():1)),__(t,"paint-order",i?"stroke":"fill"),__(t,"stroke-opacity",null!=e.strokeOpacity?e.strokeOpacity:e.opacity),e.lineDash?(__(t,"stroke-dasharray",e.lineDash.join(",")),__(t,"stroke-dashoffset",cR(e.lineDashOffset||0))):__(t,"stroke-dasharray",""),e.lineCap&&__(t,"stroke-linecap",e.lineCap),e.lineJoin&&__(t,"stroke-linejoin",e.lineJoin),e.miterLimit&&__(t,"stroke-miterlimit",e.miterLimit)}else __(t,"stroke",hR)}function S_(t){for(var e=[],i=t.data,n=t.len(),o=0;o=gR||!m_(g)&&(d>-pR&&d<0||d>pR)==!!p;var y=g_(s+u*fR(c)),x=g_(l+h*dR(c));m&&(d=p?gR-1e-4:1e-4-gR,v=!0,9===o&&e.push("M",y,x));var _=g_(s+u*fR(c+d)),w=g_(l+h*dR(c+d));e.push("A",g_(u),g_(h),cR(f*mR),+v,+p,_,w);break;case lR.Z:a="Z";break;case lR.R:var _=g_(i[o++]),w=g_(i[o++]),b=g_(i[o++]),S=g_(i[o++]);e.push("M",_,w,"L",_+b,w,"L",_+b,w+S,"L",_,w+S,"L",_,w)}a&&e.push(a);for(var M=0;M=11),domSupported:"undefined"!=typeof document}}(navigator.userAgent),X_={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},j_={"[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},Y_=Object.prototype.toString,q_=Array.prototype,K_=q_.forEach,$_=q_.filter,J_=q_.slice,Q_=q_.map,tw=q_.reduce,ew={},iw=function(){return ew.createCanvas()};ew.createCanvas=function(){return document.createElement("canvas")};var nw,ow="__ec_primitive__";E.prototype={constructor:E,get:function(t){return this.data.hasOwnProperty(t)?this.data[t]:null},set:function(t,e){return this.data[t]=e},each:function(t,e){void 0!==e&&(t=m(t,e));for(var i in this.data)this.data.hasOwnProperty(i)&&t(this.data[i],i)},removeKey:function(t){delete this.data[t]}};var aw=(Object.freeze||Object)({$override:e,clone:i,merge:n,mergeAll:o,extend:a,defaults:r,createCanvas:iw,getContext:s,indexOf:l,inherits:u,mixin:h,isArrayLike:c,each:d,map:f,reduce:p,filter:g,find:function(t,e,i){if(t&&e)for(var n=0,o=t.length;n3&&(n=dw.call(n,1));for(var a=e.length,r=0;r4&&(n=dw.call(n,1,n.length-1));for(var a=n[n.length-1],r=e.length,s=0;s1&&n&&n.length>1){var a=ft(n)/ft(o);!isFinite(a)&&(a=1),e.pinchScale=a;var r=pt(n);return e.pinchX=r[0],e.pinchY=r[1],{type:"pinch",target:t[0].target,event:e}}}}},xw="silent";vt.prototype.dispose=function(){};var _w=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],ww=function(t,e,i,n){fw.call(this),this.storage=t,this.painter=e,this.painterRoot=n,i=i||new vt,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,it.call(this),this.setHandlerProxy(i)};ww.prototype={constructor:ww,setHandlerProxy:function(t){this.proxy&&this.proxy.dispose(),t&&(d(_w,function(e){t.on&&t.on(e,this[e],this)},this),t.handler=this),this.proxy=t},mousemove:function(t){var e=t.zrX,i=t.zrY,n=this._hovered,o=n.target;o&&!o.__zr&&(o=(n=this.findHover(n.x,n.y)).target);var a=this._hovered=this.findHover(e,i),r=a.target,s=this.proxy;s.setCursor&&s.setCursor(r?r.cursor:"default"),o&&r!==o&&this.dispatchToElement(n,"mouseout",t),this.dispatchToElement(a,"mousemove",t),r&&r!==o&&this.dispatchToElement(a,"mouseover",t)},mouseout:function(t){this.dispatchToElement(this._hovered,"mouseout",t);var e,i=t.toElement||t.relatedTarget;do{i=i&&i.parentNode}while(i&&9!==i.nodeType&&!(e=i===this.painterRoot));!e&&this.trigger("globalout",{event:t})},resize:function(t){this._hovered={}},dispatch:function(t,e){var i=this[t];i&&i.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,i){var n=(t=t||{}).target;if(!n||!n.silent){for(var o="on"+e,a=gt(e,t,i);n&&(n[o]&&(a.cancelBubble=n[o].call(n,a)),n.trigger(e,a),n=n.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(e,a),this.painter&&this.painter.eachOtherLayer(function(t){"function"==typeof t[o]&&t[o].call(t,a),t.trigger&&t.trigger(e,a)}))}},findHover:function(t,e,i){for(var n=this.storage.getDisplayList(),o={x:t,y:e},a=n.length-1;a>=0;a--){var r;if(n[a]!==i&&!n[a].ignore&&(r=yt(n[a],t,e))&&(!o.topTarget&&(o.topTarget=n[a]),r!==xw)){o.target=n[a];break}}return o},processGesture:function(t,e){this._gestureMgr||(this._gestureMgr=new vw);var i=this._gestureMgr;"start"===e&&i.clear();var n=i.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&i.clear(),n){var o=n.type;t.gestureEvent=o,this.dispatchToElement({target:n.target},o,n.event)}}},d(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){ww.prototype[t]=function(e){var i=this.findHover(e.zrX,e.zrY),n=i.target;if("mousedown"===t)this._downEl=n,this._downPoint=[e.zrX,e.zrY],this._upEl=n;else if("mouseup"===t)this._upEl=n;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||uw(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(i,t,e)}}),h(ww,fw),h(ww,it);var bw="undefined"==typeof Float32Array?Array:Float32Array,Sw=(Object.freeze||Object)({create:xt,identity:_t,copy:wt,mul:bt,translate:St,rotate:Mt,scale:It,invert:Tt,clone:At}),Mw=_t,Iw=5e-5,Tw=function(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},Aw=Tw.prototype;Aw.transform=null,Aw.needLocalTransform=function(){return Dt(this.rotation)||Dt(this.position[0])||Dt(this.position[1])||Dt(this.scale[0]-1)||Dt(this.scale[1]-1)};var Dw=[];Aw.updateTransform=function(){var t=this.parent,e=t&&t.transform,i=this.needLocalTransform(),n=this.transform;if(i||e){n=n||xt(),i?this.getLocalTransform(n):Mw(n),e&&(i?bt(n,t.transform,n):wt(n,t.transform)),this.transform=n;var o=this.globalScaleRatio;if(null!=o&&1!==o){this.getGlobalScale(Dw);var a=Dw[0]<0?-1:1,r=Dw[1]<0?-1:1,s=((Dw[0]-a)*o+a)/Dw[0]||0,l=((Dw[1]-r)*o+r)/Dw[1]||0;n[0]*=s,n[1]*=s,n[2]*=l,n[3]*=l}this.invTransform=this.invTransform||xt(),Tt(this.invTransform,n)}else n&&Mw(n)},Aw.getLocalTransform=function(t){return Tw.getLocalTransform(this,t)},Aw.setTransform=function(t){var e=this.transform,i=t.dpr||1;e?t.setTransform(i*e[0],i*e[1],i*e[2],i*e[3],i*e[4],i*e[5]):t.setTransform(i,0,0,i,0,0)},Aw.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var Cw=[],Lw=xt();Aw.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],i=t[2]*t[2]+t[3]*t[3],n=this.position,o=this.scale;Dt(e-1)&&(e=Math.sqrt(e)),Dt(i-1)&&(i=Math.sqrt(i)),t[0]<0&&(e=-e),t[3]<0&&(i=-i),n[0]=t[4],n[1]=t[5],o[0]=e,o[1]=i,this.rotation=Math.atan2(-t[1]/i,t[0]/e)}},Aw.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(bt(Cw,t.invTransform,e),e=Cw);var i=this.origin;i&&(i[0]||i[1])&&(Lw[4]=i[0],Lw[5]=i[1],bt(Cw,e,Lw),Cw[4]-=i[0],Cw[5]-=i[1],e=Cw),this.setLocalTransform(e)}},Aw.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},Aw.transformCoordToLocal=function(t,e){var i=[t,e],n=this.invTransform;return n&&Q(i,i,n),i},Aw.transformCoordToGlobal=function(t,e){var i=[t,e],n=this.transform;return n&&Q(i,i,n),i},Tw.getLocalTransform=function(t,e){Mw(e=e||[]);var i=t.origin,n=t.scale||[1,1],o=t.rotation||0,a=t.position||[0,0];return i&&(e[4]-=i[0],e[5]-=i[1]),It(e,e,n),o&&Mt(e,e,o),i&&(e[4]+=i[0],e[5]+=i[1]),e[4]+=a[0],e[5]+=a[1],e};var kw={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*(2-Math.pow(2,-10*(t-1)))},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,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*Math.asin(1/i)/(2*Math.PI),-i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4))},elasticOut:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*Math.asin(1/i)/(2*Math.PI),i*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*Math.asin(1/i)/(2*Math.PI),(t*=2)<1?i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4)*.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?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-kw.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?.5*kw.bounceIn(2*t):.5*kw.bounceOut(2*t-1)+.5}};Ct.prototype={constructor:Ct,step:function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),this._paused)this._pausedTime+=e;else{var i=(t-this._startTime-this._pausedTime)/this._life;if(!(i<0)){i=Math.min(i,1);var n=this.easing,o="string"==typeof n?kw[n]:n,a="function"==typeof o?o(i):i;return this.fire("frame",a),1===i?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){this[t="on"+t]&&this[t](this._target,e)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var Pw=function(){this.head=null,this.tail=null,this._len=0},Nw=Pw.prototype;Nw.insert=function(t){var e=new Ow(t);return this.insertEntry(e),e},Nw.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++},Nw.remove=function(t){var e=t.prev,i=t.next;e?e.next=i:this.head=i,i?i.prev=e:this.tail=e,t.next=t.prev=null,this._len--},Nw.len=function(){return this._len},Nw.clear=function(){this.head=this.tail=null,this._len=0};var Ow=function(t){this.value=t,this.next,this.prev},Ew=function(t){this._list=new Pw,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null},Rw=Ew.prototype;Rw.put=function(t,e){var i=this._list,n=this._map,o=null;if(null==n[t]){var a=i.len(),r=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var s=i.head;i.remove(s),delete n[s.key],o=s.value,this._lastRemovedEntry=s}r?r.value=e:r=new Ow(e),r.key=t,i.insertEntry(r),n[t]=r}return o},Rw.get=function(t){var e=this._map[t],i=this._list;if(null!=e)return e!==i.tail&&(i.remove(e),i.insertEntry(e)),e.value},Rw.clear=function(){this._list.clear(),this._map={}};var zw={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]},Bw=new Ew(20),Vw=null,Gw=Ut,Fw=Xt,Ww=(Object.freeze||Object)({parse:Gt,lift:Ht,toHex:Zt,fastLerp:Ut,fastMapToColor:Gw,lerp:Xt,mapToColor:Fw,modifyHSL:jt,modifyAlpha:Yt,stringify:qt}),Hw=Array.prototype.slice,Zw=function(t,e,i,n){this._tracks={},this._target=t,this._loop=e||!1,this._getter=i||Kt,this._setter=n||$t,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};Zw.prototype={when:function(t,e){var i=this._tracks;for(var n in e)if(e.hasOwnProperty(n)){if(!i[n]){i[n]=[];var o=this._getter(this._target,n);if(null==o)continue;0!==t&&i[n].push({time:0,value:ae(o)})}i[n].push({time:t,value:e[n]})}return this},during:function(t){return this._onframeList.push(t),this},pause:function(){for(var t=0;t=i.x&&t<=i.x+i.width&&e>=i.y&&e<=i.y+i.height},clone:function(){return new de(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}}},de.create=function(t){return new de(t.x,t.y,t.width,t.height)};var tb=function(t){t=t||{},Kw.call(this,t);for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};tb.prototype={constructor:tb,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,i=0;i=0&&(i.splice(n,0,t),this._doAdd(t))}return this},_doAdd:function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__storage,i=this.__zr;e&&e!==t.__storage&&(e.addToStorage(t),t instanceof tb&&t.addChildrenToStorage(e)),i&&i.refresh()},remove:function(t){var e=this.__zr,i=this.__storage,n=this._children,o=l(n,t);return o<0?this:(n.splice(o,1),t.parent=null,i&&(i.delFromStorage(t),t instanceof tb&&t.delChildrenFromStorage(i)),e&&e.refresh(),this)},removeAll:function(){var t,e,i=this._children,n=this.__storage;for(e=0;e=0&&(this.delFromStorage(t),this._roots.splice(o,1),t instanceof tb&&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:we};var ob={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1},ab=function(t,e,i){return ob.hasOwnProperty(e)?i*=t.dpr:i},rb={NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},sb=9,lb=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],ub=function(t){this.extendFrom(t,!1)};ub.prototype={constructor:ub,fill:"#000",stroke:null,opacity:1,fillOpacity:null,strokeOpacity:null,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,i){var n=this,o=i&&i.style,a=!o||t.__attrCachedBy!==rb.STYLE_BIND;t.__attrCachedBy=rb.STYLE_BIND;for(var r=0;r0},extendFrom:function(t,e){if(t)for(var i in t)!t.hasOwnProperty(i)||!0!==e&&(!1===e?this.hasOwnProperty(i):null==t[i])||(this[i]=t[i])},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,i){for(var n=("radial"===e.type?Se:be)(t,e,i),o=e.colorStops,a=0;a=0&&i.splice(n,1),t.__hoverMir=null},clearHover:function(t){for(var e=this._hoverElements,i=0;i15)break}s.__drawIndex=m,s.__drawIndex0&&t>n[0]){for(r=0;rt);r++);a=i[n[r]]}if(n.splice(r+1,0,t),i[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)}else Yw("Layer of zlevel "+t+" is not valid")},eachLayer:function(t,e){var i,n,o=this._zlevelList;for(n=0;n0?.01:0),this._needsManuallyCompositing),a.__builtin__||Yw("ZLevel "+s+" has been used by unkown layer "+a.id),a!==i&&(a.__used=!0,a.__startIndex!==o&&(a.__dirty=!0),a.__startIndex=o,a.incremental?a.__drawIndex=-1:a.__drawIndex=o,e(o),i=a),r.__dirty&&(a.__dirty=!0,a.incremental&&a.__drawIndex<0&&(a.__drawIndex=o))}e(o),this.eachBuiltinLayer(function(t,e){!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 i=this._layerConfig;i[t]?n(i[t],e,!0):i[t]=e;for(var o=0;o=0&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),i=0;i=0||n&&l(n,r)<0)){var s=e.getShallow(r);null!=s&&(o[t[a][0]]=s)}}return o}},tS=Qb([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),eS={getLineStyle:function(t){var e=tS(this,t),i=this.getLineDash(e.lineWidth);return i&&(e.lineDash=i),e},getLineDash:function(t){null==t&&(t=1);var e=this.get("type"),i=Math.max(t,2),n=4*t;return"solid"===e||null==e?null:"dashed"===e?[n,n]:[i,i]}},iS=Qb([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),nS={getAreaStyle:function(t,e){return iS(this,t,e)}},oS=Math.pow,aS=Math.sqrt,rS=1e-8,sS=1e-4,lS=aS(3),uS=1/3,hS=V(),cS=V(),dS=V(),fS=Math.min,pS=Math.max,gS=Math.sin,mS=Math.cos,vS=2*Math.PI,yS=V(),xS=V(),_S=V(),wS=[],bS=[],SS={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},MS=[],IS=[],TS=[],AS=[],DS=Math.min,CS=Math.max,LS=Math.cos,kS=Math.sin,PS=Math.sqrt,NS=Math.abs,OS="undefined"!=typeof Float32Array,ES=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};ES.prototype={constructor:ES,_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=NS(1/Xw/t)||0,this._uy=NS(1/Xw/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(SS.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 i=NS(t-this._xi)>this._ux||NS(e-this._yi)>this._uy||this._len<5;return this.addData(SS.L,t,e),this._ctx&&i&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),i&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,i,n,o,a){return this.addData(SS.C,t,e,i,n,o,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,i,n,o,a):this._ctx.bezierCurveTo(t,e,i,n,o,a)),this._xi=o,this._yi=a,this},quadraticCurveTo:function(t,e,i,n){return this.addData(SS.Q,t,e,i,n),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,i,n):this._ctx.quadraticCurveTo(t,e,i,n)),this._xi=i,this._yi=n,this},arc:function(t,e,i,n,o,a){return this.addData(SS.A,t,e,i,i,n,o-n,0,a?0:1),this._ctx&&this._ctx.arc(t,e,i,n,o,a),this._xi=LS(o)*i+t,this._yi=kS(o)*i+e,this},arcTo:function(t,e,i,n,o){return this._ctx&&this._ctx.arcTo(t,e,i,n,o),this},rect:function(t,e,i,n){return this._ctx&&this._ctx.rect(t,e,i,n),this.addData(SS.R,t,e,i,n),this},closePath:function(){this.addData(SS.Z);var t=this._ctx,e=this._x0,i=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,i),t.closePath()),this._xi=e,this._yi=i,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,i=0;ie.length&&(this._expandData(),e=this.data);for(var i=0;i0&&f<=t||h<0&&f>=t||0===h&&(c>0&&p<=e||c<0&&p>=e);)f+=h*(i=r[n=this._dashIdx]),p+=c*i,this._dashIdx=(n+1)%g,h>0&&fl||c>0&&pu||s[n%2?"moveTo":"lineTo"](h>=0?DS(f,t):CS(f,t),c>=0?DS(p,e):CS(p,e));h=f-t,c=p-e,this._dashOffset=-PS(h*h+c*c)},_dashedBezierTo:function(t,e,i,n,o,a){var r,s,l,u,h,c=this._dashSum,d=this._dashOffset,f=this._lineDash,p=this._ctx,g=this._xi,m=this._yi,v=tn,y=0,x=this._dashIdx,_=f.length,w=0;for(d<0&&(d=c+d),d%=c,r=0;r<1;r+=.1)s=v(g,t,i,o,r+.1)-v(g,t,i,o,r),l=v(m,e,n,a,r+.1)-v(m,e,n,a,r),y+=PS(s*s+l*l);for(;x<_&&!((w+=f[x])>d);x++);for(r=(w-d)/y;r<=1;)u=v(g,t,i,o,r),h=v(m,e,n,a,r),x%2?p.moveTo(u,h):p.lineTo(u,h),r+=f[x]/y,x=(x+1)%_;x%2!=0&&p.lineTo(o,a),s=o-u,l=a-h,this._dashOffset=-PS(s*s+l*l)},_dashedQuadraticTo:function(t,e,i,n){var o=i,a=n;i=(i+2*t)/3,n=(n+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,i,n,o,a)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,OS&&(this.data=new Float32Array(t)))},getBoundingRect:function(){MS[0]=MS[1]=TS[0]=TS[1]=Number.MAX_VALUE,IS[0]=IS[1]=AS[0]=AS[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,i=0,n=0,o=0,a=0;al||NS(r-o)>u||c===h-1)&&(t.lineTo(a,r),n=a,o=r);break;case SS.C:t.bezierCurveTo(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),n=s[c-2],o=s[c-1];break;case SS.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),n=s[c-2],o=s[c-1];break;case SS.A:var f=s[c++],p=s[c++],g=s[c++],m=s[c++],v=s[c++],y=s[c++],x=s[c++],_=s[c++],w=g>m?g:m,b=g>m?1:g/m,S=g>m?m/g:1,M=v+y;Math.abs(g-m)>.001?(t.translate(f,p),t.rotate(x),t.scale(b,S),t.arc(0,0,w,v,M,1-_),t.scale(1/b,1/S),t.rotate(-x),t.translate(-f,-p)):t.arc(f,p,w,v,M,1-_),1===c&&(e=LS(v)*g+f,i=kS(v)*m+p),n=LS(M)*g+f,o=kS(M)*m+p;break;case SS.R:e=n=s[c],i=o=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case SS.Z:t.closePath(),n=e,o=i}}}},ES.CMD=SS;var RS=2*Math.PI,zS=2*Math.PI,BS=ES.CMD,VS=2*Math.PI,GS=1e-4,FS=[-1,-1,-1],WS=[-1,-1],HS=fb.prototype.getCanvasPattern,ZS=Math.abs,US=new ES(!0);Pn.prototype={constructor:Pn,type:"path",__dirtyPath:!0,strokeContainThreshold:5,subPixelOptimize:!1,brush:function(t,e){var i=this.style,n=this.path||US,o=i.hasStroke(),a=i.hasFill(),r=i.fill,s=i.stroke,l=a&&!!r.colorStops,u=o&&!!s.colorStops,h=a&&!!r.image,c=o&&!!s.image;if(i.bind(t,this,e),this.setTransform(t),this.__dirty){var d;l&&(d=d||this.getBoundingRect(),this._fillGradient=i.getGradient(t,r,d)),u&&(d=d||this.getBoundingRect(),this._strokeGradient=i.getGradient(t,s,d))}l?t.fillStyle=this._fillGradient:h&&(t.fillStyle=HS.call(r,t)),u?t.strokeStyle=this._strokeGradient:c&&(t.strokeStyle=HS.call(s,t));var f=i.lineDash,p=i.lineDashOffset,g=!!t.setLineDash,m=this.getGlobalScale();if(n.setScale(m[0],m[1]),this.__dirtyPath||f&&!g&&o?(n.beginPath(t),f&&!g&&(n.setLineDash(f),n.setLineDashOffset(p)),this.buildPath(n,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(t.beginPath(),this.path.rebuildPath(t)),a)if(null!=i.fillOpacity){v=t.globalAlpha;t.globalAlpha=i.fillOpacity*i.opacity,n.fill(t),t.globalAlpha=v}else n.fill(t);if(f&&g&&(t.setLineDash(f),t.lineDashOffset=p),o)if(null!=i.strokeOpacity){var v=t.globalAlpha;t.globalAlpha=i.strokeOpacity*i.opacity,n.stroke(t),t.globalAlpha=v}else n.stroke(t);f&&g&&t.setLineDash([]),null!=i.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))},buildPath:function(t,e,i){},createPathProxy:function(){this.path=new ES},getBoundingRect:function(){var t=this._rect,e=this.style,i=!t;if(i){var n=this.path;n||(n=this.path=new ES),this.__dirtyPath&&(n.beginPath(),this.buildPath(n,this.shape,!1)),t=n.getBoundingRect()}if(this._rect=t,e.hasStroke()){var o=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||i){o.copy(t);var a=e.lineWidth,r=e.strokeNoScale?this.getLineScale():1;e.hasFill()||(a=Math.max(a,this.strokeContainThreshold||4)),r>1e-10&&(o.width+=a/r,o.height+=a/r,o.x-=a/r/2,o.y-=a/r/2)}return o}return t},contain:function(t,e){var i=this.transformCoordToLocal(t,e),n=this.getBoundingRect(),o=this.style;if(t=i[0],e=i[1],n.contain(t,e)){var a=this.path.data;if(o.hasStroke()){var r=o.lineWidth,s=o.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(o.hasFill()||(r=Math.max(r,this.strokeContainThreshold)),kn(a,r/s,t,e)))return!0}if(o.hasFill())return Ln(a,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=this.__dirtyText=!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):di.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var i=this.shape;if(i){if(w(t))for(var n in t)t.hasOwnProperty(n)&&(i[n]=t[n]);else i[t]=e;this.dirty(!0)}return this},getLineScale:function(){var t=this.transform;return t&&ZS(t[0]-1)>1e-10&&ZS(t[3]-1)>1e-10?Math.sqrt(ZS(t[0]*t[3]-t[2]*t[1])):1}},Pn.extend=function(t){var e=function(e){Pn.call(this,e),t.style&&this.style.extendFrom(t.style,!1);var i=t.shape;if(i){this.shape=this.shape||{};var n=this.shape;for(var o in i)!n.hasOwnProperty(o)&&i.hasOwnProperty(o)&&(n[o]=i[o])}t.init&&t.init.call(this,e)};u(e,Pn);for(var i in t)"style"!==i&&"shape"!==i&&(e.prototype[i]=t[i]);return e},u(Pn,di);var XS=ES.CMD,jS=[[],[],[]],YS=Math.sqrt,qS=Math.atan2,KS=function(t,e){var i,n,o,a,r,s,l=t.data,u=XS.M,h=XS.C,c=XS.L,d=XS.R,f=XS.A,p=XS.Q;for(o=0,a=0;o=11?function(){var e,i=this.__clipPaths,n=this.style;if(i)for(var o=0;oi-2?i-1:c+1],u=t[c>i-3?i-1:c+2]);var p=d*d,g=d*p;n.push([Bn(s[0],f[0],l[0],u[0],d,p,g),Bn(s[1],f[1],l[1],u[1],d,p,g)])}return n},fM=function(t,e,i,n){var o,a,r,s,l=[],u=[],h=[],c=[];if(n){r=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,f=t.length;d=i&&a>=o)return{x:i,y:o,width:n-i,height:a-o}},createIcon:Po,Group:tb,Image:fi,Text:rM,Circle:sM,Sector:hM,Ring:cM,Polygon:pM,Polyline:gM,Rect:yM,Line:_M,BezierCurve:bM,Arc:SM,IncrementalDisplayable:Zn,CompoundPath:MM,LinearGradient:TM,RadialGradient:AM,BoundingRect:de}),BM=["textStyle","color"],VM={getTextColor:function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(BM):null)},getFont:function(){return So({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},getTextRect:function(t){return ke(t,this.getFont(),this.getShallow("align"),this.getShallow("verticalAlign")||this.getShallow("baseline"),this.getShallow("padding"),this.getShallow("lineHeight"),this.getShallow("rich"),this.getShallow("truncateText"))}},GM=Qb([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]),FM={getItemStyle:function(t,e){var i=GM(this,t,e),n=this.getBorderLineDash();return n&&(i.lineDash=n),i},getBorderLineDash:function(){var t=this.get("borderType");return"solid"===t||null==t?null:"dashed"===t?[5,5]:[1,1]}},WM=h,HM=Bi();No.prototype={constructor:No,init:null,mergeOption:function(t){n(this.option,t,!0)},get:function(t,e){return null==t?this.option:Oo(this.option,this.parsePath(t),!e&&Eo(this,t))},getShallow:function(t,e){var i=this.option,n=null==i?i:i[t],o=!e&&Eo(this,t);return null==n&&o&&(n=o.getShallow(t)),n},getModel:function(t,e){var i,n=null==t?this.option:Oo(this.option,t=this.parsePath(t));return e=e||(i=Eo(this,t))&&i.getModel(t),new No(n,e,this.ecModel)},isEmpty:function(){return null==this.option},restoreData:function(){},clone:function(){return new(0,this.constructor)(i(this.option))},setReadOnly:function(t){},parsePath:function(t){return"string"==typeof t&&(t=t.split(".")),t},customizeGetParent:function(t){HM(this).getParent=t},isAnimationEnabled:function(){if(!U_.node){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}}},ji(No),Yi(No),WM(No,eS),WM(No,nS),WM(No,VM),WM(No,FM);var ZM=0,UM=1e-4,XM=9007199254740991,jM=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/,YM=(Object.freeze||Object)({linearMap:Bo,parsePercent:Vo,round:Go,asc:Fo,getPrecision:Wo,getPrecisionSafe:Ho,getPixelPrecision:Zo,getPercentWithPrecision:Uo,MAX_SAFE_INTEGER:XM,remRadian:Xo,isRadianAroundZero:jo,parseDate:Yo,quantity:qo,nice:$o,quantile:function(t,e){var i=(t.length-1)*e+1,n=Math.floor(i),o=+t[n-1],a=i-n;return a?o+a*(t[n]-o):o},reformIntervals:Jo,isNumeric:Qo}),qM=L,KM=/([&<>"'])/g,$M={"&":"&","<":"<",">":">",'"':""","'":"'"},JM=["a","b","c","d","e","f","g"],QM=function(t,e){return"{"+t+(null==e?"":e)+"}"},tI=ze,eI=(Object.freeze||Object)({addCommas:ta,toCamelCase:ea,normalizeCssArray:qM,encodeHTML:ia,formatTpl:na,formatTplSimple:oa,getTooltipMarker:aa,formatTime:sa,capitalFirst:la,truncateText:tI,getTextBoundingRect:function(t){return ke(t.text,t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich,t.truncate)},getTextRect:function(t,e,i,n,o,a,r,s){return ke(t,e,i,n,o,s,a,r)}}),iI=d,nI=["left","right","top","bottom","width","height"],oI=[["width","left","right"],["height","top","bottom"]],aI=ua,rI=(v(ua,"vertical"),v(ua,"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")}}}),sI=Bi(),lI=No.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(t,e,i,n){No.call(this,t,e,i,n),this.uid=Ro("ec_cpt_model")},init:function(t,e,i,n){this.mergeDefaultAndTheme(t,i)},mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,o=i?ga(t):{};n(t,e.getTheme().get(this.mainType)),n(t,this.getDefaultOption()),i&&pa(t,o,i)},mergeOption:function(t,e){n(this.option,t,!0);var i=this.layoutMode;i&&pa(this.option,t,i)},optionUpdated:function(t,e){},getDefaultOption:function(){var t=sI(this);if(!t.defaultOption){for(var e=[],i=this.constructor;i;){var o=i.prototype.defaultOption;o&&e.push(o),i=i.superClass}for(var a={},r=e.length-1;r>=0;r--)a=n(a,e[r],!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)})}});$i(lI,{registerWhenExtend:!0}),function(t){var e={};t.registerSubTypeDefaulter=function(t,i){t=Ui(t),e[t.main]=i},t.determineSubType=function(i,n){var o=n.type;if(!o){var a=Ui(i).main;t.hasSubTypes(i)&&e[a]&&(o=e[a](n))}return o}}(lI),function(t,e){function i(t){var i={},a=[];return d(t,function(r){var s=n(i,r),u=o(s.originalDeps=e(r),t);s.entryCount=u.length,0===s.entryCount&&a.push(r),d(u,function(t){l(s.predecessor,t)<0&&s.predecessor.push(t);var e=n(i,t);l(e.successor,t)<0&&e.successor.push(r)})}),{graph:i,noEntryList:a}}function n(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}function o(t,e){var i=[];return d(t,function(t){l(e,t)>=0&&i.push(t)}),i}t.topologicalTravel=function(t,e,n,o){function a(t){s[t].entryCount--,0===s[t].entryCount&&l.push(t)}if(t.length){var r=i(e),s=r.graph,l=r.noEntryList,u={};for(d(t,function(t){u[t]=!0});l.length;){var h=l.pop(),c=s[h],f=!!u[h];f&&(n.call(o,h,c.originalDeps.slice()),delete u[h]),d(c.successor,f?function(t){u[t]=!0,a(t)}:a)}d(u,function(){throw new Error("Circle dependency may exists")})}}}(lI,function(t){var e=[];return d(lI.getClassesByMainType(t),function(t){e=e.concat(t.prototype.dependencies||[])}),e=f(e,function(t){return Ui(t).main}),"dataset"!==t&&l(e,"dataset")<=0&&e.unshift("dataset"),e}),h(lI,rI);var uI="";"undefined"!=typeof navigator&&(uI=navigator.platform||"");var hI={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:uI.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},cI=Bi(),dI={clearColorPalette:function(){cI(this).colorIdx=0,cI(this).colorNameMap={}},getColorFromPalette:function(t,e,i){var n=cI(e=e||this),o=n.colorIdx||0,a=n.colorNameMap=n.colorNameMap||{};if(a.hasOwnProperty(t))return a[t];var r=Di(this.get("color",!0)),s=this.get("colorLayer",!0),l=null!=i&&s?va(s,i):r;if((l=l||r)&&l.length){var u=l[o];return t&&(a[t]=u),n.colorIdx=(o+1)%l.length,u}}},fI={cartesian2d:function(t,e,i,n){var o=t.getReferringComponents("xAxis")[0],a=t.getReferringComponents("yAxis")[0];e.coordSysDims=["x","y"],i.set("x",o),i.set("y",a),xa(o)&&(n.set("x",o),e.firstCategoryDimIndex=0),xa(a)&&(n.set("y",a),e.firstCategoryDimIndex=1)},singleAxis:function(t,e,i,n){var o=t.getReferringComponents("singleAxis")[0];e.coordSysDims=["single"],i.set("single",o),xa(o)&&(n.set("single",o),e.firstCategoryDimIndex=0)},polar:function(t,e,i,n){var o=t.getReferringComponents("polar")[0],a=o.findAxisModel("radiusAxis"),r=o.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],i.set("radius",a),i.set("angle",r),xa(a)&&(n.set("radius",a),e.firstCategoryDimIndex=0),xa(r)&&(n.set("angle",r),e.firstCategoryDimIndex=1)},geo:function(t,e,i,n){e.coordSysDims=["lng","lat"]},parallel:function(t,e,i,n){var o=t.ecModel,a=o.getComponent("parallel",t.get("parallelIndex")),r=e.coordSysDims=a.dimensions.slice();d(a.parallelAxisIndex,function(t,a){var s=o.getComponent("parallelAxis",t),l=r[a];i.set(l,s),xa(s)&&null==e.firstCategoryDimIndex&&(n.set(l,s),e.firstCategoryDimIndex=a)})}},pI="original",gI="arrayRows",mI="objectRows",vI="keyedColumns",yI="unknown",xI="typedArray",_I="column",wI="row";_a.seriesDataToSource=function(t){return new _a({data:t,sourceFormat:S(t)?xI:pI,fromDataset:!1})},Yi(_a);var bI=Bi(),SI="\0_ec_inner",MI=No.extend({init:function(t,e,i,n){i=i||{},this.option=null,this._theme=new No(i),this._optionManager=n},setOption:function(t,e){k(!(SI in t),"please use chart.getOption()"),this._optionManager.setOption(t,e),this.resetOption(null)},resetOption:function(t){var e=!1,i=this._optionManager;if(!t||"recreate"===t){var n=i.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this.mergeOption(n)):Ea.call(this,n),e=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var o=i.getTimelineOption(this);o&&(this.mergeOption(o),e=!0)}if(!t||"recreate"===t||"media"===t){var a=i.getMediaOption(this,this._api);a.length&&d(a,function(t){this.mergeOption(t,e=!0)},this)}return e},mergeOption:function(t){var e=this.option,o=this._componentsMap,r=[];Sa(this),d(t,function(t,o){null!=t&&(lI.hasClass(o)?o&&r.push(o):e[o]=null==e[o]?i(t):n(e[o],t,!0))}),lI.topologicalTravel(r,lI.getAllClassMainTypes(),function(i,n){var r=Di(t[i]),s=Pi(o.get(i),r);Ni(s),d(s,function(t,e){var n=t.option;w(n)&&(t.keyInfo.mainType=i,t.keyInfo.subType=za(i,n,t.exist))});var l=Ra(o,n);e[i]=[],o.set(i,[]),d(s,function(t,n){var r=t.exist,s=t.option;if(k(w(s)||r,"Empty component definition"),s){var u=lI.getClass(i,t.keyInfo.subType,!0);if(r&&r instanceof u)r.name=t.keyInfo.name,r.mergeOption(s,this),r.optionUpdated(s,!1);else{var h=a({dependentModels:l,componentIndex:n},t.keyInfo);a(r=new u(s,this,this,h),h),r.init(s,this,this,h),r.optionUpdated(null,!0)}}else r.mergeOption({},this),r.optionUpdated({},!1);o.get(i)[n]=r,e[i][n]=r.option},this),"series"===i&&Ba(this,o.get("series"))},this),this._seriesIndicesMap=R(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var t=i(this.option);return d(t,function(e,i){if(lI.hasClass(i)){for(var n=(e=Di(e)).length-1;n>=0;n--)Ei(e[n])&&e.splice(n,1);t[i]=e}}),delete t[SI],t},getTheme:function(){return this._theme},getComponent:function(t,e){var i=this._componentsMap.get(t);if(i)return i[e||0]},queryComponents:function(t){var e=t.mainType;if(!e)return[];var i=t.index,n=t.id,o=t.name,a=this._componentsMap.get(e);if(!a||!a.length)return[];var r;if(null!=i)y(i)||(i=[i]),r=g(f(i,function(t){return a[t]}),function(t){return!!t});else if(null!=n){var s=y(n);r=g(a,function(t){return s&&l(n,t.id)>=0||!s&&t.id===n})}else if(null!=o){var u=y(o);r=g(a,function(t){return u&&l(o,t.name)>=0||!u&&t.name===o})}else r=a.slice();return Va(r,t)},findComponents:function(t){var e=t.query,i=t.mainType,n=function(t){var e=i+"Index",n=i+"Id",o=i+"Name";return!t||null==t[e]&&null==t[n]&&null==t[o]?null:{mainType:i,index:t[e],id:t[n],name:t[o]}}(e);return function(e){return t.filter?g(e,t.filter):e}(Va(n?this.queryComponents(n):this._componentsMap.get(i),t))},eachComponent:function(t,e,i){var n=this._componentsMap;"function"==typeof t?(i=e,e=t,n.each(function(t,n){d(t,function(t,o){e.call(i,n,t,o)})})):_(t)?d(n.get(t),e,i):w(t)&&d(this.findComponents(t),e,i)},getSeriesByName:function(t){return g(this._componentsMap.get("series"),function(e){return e.name===t})},getSeriesByIndex:function(t){return this._componentsMap.get("series")[t]},getSeriesByType:function(t){return g(this._componentsMap.get("series"),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){d(this._seriesIndices,function(i){var n=this._componentsMap.get("series")[i];t.call(e,n,i)},this)},eachRawSeries:function(t,e){d(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(t,e,i){d(this._seriesIndices,function(n){var o=this._componentsMap.get("series")[n];o.subType===t&&e.call(i,o,n)},this)},eachRawSeriesByType:function(t,e,i){return d(this.getSeriesByType(t),e,i)},isSeriesFiltered:function(t){return null==this._seriesIndicesMap.get(t.componentIndex)},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(t,e){Ba(this,g(this._componentsMap.get("series"),t,e))},restoreData:function(t){var e=this._componentsMap;Ba(this,e.get("series"));var i=[];e.each(function(t,e){i.push(e)}),lI.topologicalTravel(i,lI.getAllClassMainTypes(),function(i,n){d(e.get(i),function(e){("series"!==i||!Na(e,t))&&e.restoreData()})})}});h(MI,dI);var II=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"],TI={};Fa.prototype={constructor:Fa,create:function(t,e){var i=[];d(TI,function(n,o){var a=n.create(t,e);i=i.concat(a||[])}),this._coordinateSystems=i},update:function(t,e){d(this._coordinateSystems,function(i){i.update&&i.update(t,e)})},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},Fa.register=function(t,e){TI[t]=e},Fa.get=function(t){return TI[t]};var AI=d,DI=i,CI=f,LI=n,kI=/^(min|max)?(.+)$/;Wa.prototype={constructor:Wa,setOption:function(t,e){t&&d(Di(t.series),function(t){t&&t.data&&S(t.data)&&N(t.data)}),t=DI(t,!0);var i=this._optionBackup,n=Ha.call(this,t,e,!i);this._newBaseOption=n.baseOption,i?(ja(i.baseOption,n.baseOption),n.timelineOptions.length&&(i.timelineOptions=n.timelineOptions),n.mediaList.length&&(i.mediaList=n.mediaList),n.mediaDefault&&(i.mediaDefault=n.mediaDefault)):this._optionBackup=n},mountOption:function(t){var e=this._optionBackup;return this._timelineOptions=CI(e.timelineOptions,DI),this._mediaList=CI(e.mediaList,DI),this._mediaDefault=DI(e.mediaDefault),this._currentMediaIndices=[],DI(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,i=this._timelineOptions;if(i.length){var n=t.getComponent("timeline");n&&(e=DI(i[n.getCurrentIndex()],!0))}return e},getMediaOption:function(t){var e=this._api.getWidth(),i=this._api.getHeight(),n=this._mediaList,o=this._mediaDefault,a=[],r=[];if(!n.length&&!o)return r;for(var s=0,l=n.length;s=1)&&(t=1),t}var i=this._upstream,n=t&&t.skip;if(this._dirty&&i){var o=this.context;o.data=o.outputData=i.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!n&&(a=this._plan(this.context));var r=e(this._modBy),s=this._modDataCount||0,l=e(t&&t.modBy),u=t&&t.modDataCount||0;r===l&&s===u||(a="reset");var h;(this._dirty||"reset"===a)&&(this._dirty=!1,h=yr(this,n)),this._modBy=l,this._modDataCount=u;var c=t&&t.step;if(this._dueEnd=i?i._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,f=Math.min(null!=c?this._dueIndex+c:1/0,this._dueEnd);if(!n&&(h||d=i?null:t1&&a>0?e:t}};return s}();UI.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},UI.unfinished=function(){return this._progress&&this._dueIndex":"\n",s="richText"===n,l={},u=0,h=this.getData(),c=h.mapDimension("defaultedTooltip",!0),f=c.length,g=this.getRawValue(t),m=y(g),v=h.getItemVisual(t,"color");w(v)&&v.colorStops&&(v=(v.colorStops[0]||{}).color),v=v||"transparent";var x=(f>1||m&&!f?function(i){function o(t,i){var o=h.getDimensionInfo(i);if(o&&!1!==o.otherDims.tooltip){var c=o.type,d="sub"+a.seriesIndex+"at"+u,p=aa({color:v,type:"subItem",renderMode:n,markerId:d}),g="string"==typeof p?p:p.content,m=(r?g+ia(o.displayName||"-")+": ":"")+ia("ordinal"===c?t+"":"time"===c?e?"":sa("yyyy/MM/dd hh:mm:ss",t):ta(t));m&&f.push(m),s&&(l[d]=v,++u)}}var r=p(i,function(t,e,i){var n=h.getDimensionInfo(i);return t|=n&&!1!==n.tooltip&&null!=n.displayName},0),f=[];c.length?d(c,function(e){o(fr(h,t,e),e)}):d(i,o);var g=r?s?"\n":"
            ":"",m=g+f.join(g||", ");return{renderMode:n,content:m,style:l}}(g):o(f?fr(h,t,c[0]):m?g[0]:g)).content,_=a.seriesIndex+"at"+u,b=aa({color:v,type:"item",renderMode:n,markerId:_});l[_]=v,++u;var S=h.getName(t),M=this.name;Oi(this)||(M=""),M=M?ia(M)+(e?": ":r):"";var I="string"==typeof b?b:b.content;return{html:e?I+M+x:M+I+(S?ia(S)+": "+x:x),markers:l}},isAnimationEnabled:function(){if(U_.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,i){var n=this.ecModel,o=dI.getColorFromPalette.call(this,t,e,i);return o||(o=n.getColorFromPalette(t,e,i)),o},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});h(YI,ZI),h(YI,dI);var qI=function(){this.group=new tb,this.uid=Ro("viewComponent")};qI.prototype={constructor:qI,init:function(t,e){},render:function(t,e,i,n){},dispose:function(){},filterForExposedEvent:null};var KI=qI.prototype;KI.updateView=KI.updateLayout=KI.updateVisual=function(t,e,i,n){},ji(qI),$i(qI,{registerWhenExtend:!0});var $I=function(){var t=Bi();return function(e){var i=t(e),n=e.pipelineContext,o=i.large,a=i.progressiveRender,r=i.large=n.large,s=i.progressiveRender=n.progressiveRender;return!!(o^r||a^s)&&"reset"}},JI=Bi(),QI=$I();Ar.prototype={type:"chart",init:function(t,e){},render:function(t,e,i,n){},highlight:function(t,e,i,n){Cr(t.getData(),n,"emphasis")},downplay:function(t,e,i,n){Cr(t.getData(),n,"normal")},remove:function(t,e){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};var tT=Ar.prototype;tT.updateView=tT.updateLayout=tT.updateVisual=function(t,e,i,n){this.render(t,e,i,n)},ji(Ar),$i(Ar,{registerWhenExtend:!0}),Ar.markUpdateMethod=function(t,e){JI(t).updateMethod=e};var eT={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)}}},iT="\0__throttleOriginMethod",nT="\0__throttleRate",oT="\0__throttleType",aT={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var i=t.getData(),n=(t.visualColorAccessPath||"itemStyle.color").split("."),o=t.get(n)||t.getColorFromPalette(t.name,null,e.getSeriesCount());if(i.setVisual("color",o),!e.isSeriesFiltered(t)){"function"!=typeof o||o instanceof IM||i.each(function(e){i.setItemVisual(e,"color",o(t.getDataParams(e)))});return{dataEach:i.hasItemOption?function(t,e){var i=t.getItemModel(e).get(n,!0);null!=i&&t.setItemVisual(e,"color",i)}:null}}}},rT={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:""}}}},sT=function(t,e){function i(t,e){if("string"!=typeof t)return t;var i=t;return d(e,function(t,e){i=i.replace(new RegExp("\\{\\s*"+e+"\\s*\\}","g"),t)}),i}function n(t){var e=a.get(t);if(null==e){for(var i=t.split("."),n=rT.aria,o=0;o1?"series.multiple.prefix":"series.single.prefix"),{seriesCount:r}),e.eachSeries(function(t,e){if(e1?"multiple":"single")+".";a=i(a=n(s?u+"withName":u+"withoutName"),{seriesId:t.seriesIndex,seriesName:t.get("name"),seriesType:o(t.subType)});var c=t.getData();window.data=c,c.count()>l?a+=i(n("data.partialData"),{displayCnt:l}):a+=n("data.allData");for(var d=[],p=0;pi.blockIndex?i.step:null,a=n&&n.modDataCount;return{step:o,modBy:null!=a?Math.ceil(a/o):null,modDataCount:a}}},uT.getPipeline=function(t){return this._pipelineMap.get(t)},uT.updateStreamModes=function(t,e){var i=this._pipelineMap.get(t.uid),n=t.getData().count(),o=i.progressiveEnabled&&e.incrementalPrepareRender&&n>=i.threshold,a=t.get("large")&&n>=t.get("largeThreshold"),r="mod"===t.get("progressiveChunkMode")?n:null;t.pipelineContext=i.context={progressiveRender:o,modDataCount:r,large:a}},uT.restorePipelines=function(t){var e=this,i=e._pipelineMap=R();t.eachSeries(function(t){var n=t.getProgressive(),o=t.uid;i.set(o,{id:o,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:n&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(n||700),count:0}),jr(e,t,t.dataTask)})},uT.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.ecInstance.getModel(),i=this.api;d(this._allHandlers,function(n){var o=t.get(n.uid)||t.set(n.uid,[]);n.reset&&zr(this,n,o,e,i),n.overallReset&&Br(this,n,o,e,i)},this)},uT.prepareView=function(t,e,i,n){var o=t.renderTask,a=o.context;a.model=e,a.ecModel=i,a.api=n,o.__block=!t.incrementalPrepareRender,jr(this,e,o)},uT.performDataProcessorTasks=function(t,e){Rr(this,this._dataProcessorHandlers,t,e,{block:!0})},uT.performVisualTasks=function(t,e,i){Rr(this,this._visualHandlers,t,e,i)},uT.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e|=t.dataTask.perform()}),this.unfinished|=e},uT.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})};var hT=uT.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},cT=Ur(0);Er.wrapStageHandler=function(t,e){return x(t)&&(t={overallReset:t,seriesType:Yr(t)}),t.uid=Ro("stageHandler"),e&&(t.visualType=e),t};var dT,fT={},pT={};qr(fT,MI),qr(pT,Ga),fT.eachSeriesByType=fT.eachRawSeriesByType=function(t){dT=t},fT.eachComponent=function(t){"series"===t.mainType&&t.subType&&(dT=t.subType)};var gT=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],mT={color:gT,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],gT]},vT=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],yT={color:vT,backgroundColor:"#333",tooltip:{axisPointer:{lineStyle:{color:"#eee"},crossStyle:{color:"#eee"}}},legend:{textStyle:{color:"#eee"}},textStyle:{color:"#eee"},title:{textStyle:{color:"#eee"}},toolbox:{iconStyle:{normal:{borderColor:"#eee"}}},dataZoom:{textStyle:{color:"#eee"}},visualMap:{textStyle:{color:"#eee"}},timeline:{lineStyle:{color:"#eee"},itemStyle:{normal:{color:vT[1]}},label:{normal:{textStyle:{color:"#eee"}}},controlStyle:{normal:{color:"#eee",borderColor:"#eee"}}},timeAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},logAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},valueAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},categoryAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},line:{symbol:"circle"},graph:{color:vT},gauge:{title:{textStyle:{color:"#eee"}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}};yT.categoryAxis.splitLine.show=!1,lI.extend({type:"dataset",defaultOption:{seriesLayoutBy:_I,sourceHeader:null,dimensions:null,source:null},optionUpdated:function(){wa(this)}}),qI.extend({type:"dataset"});var xT=Pn.extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(t,e){var i=.5522848,n=e.cx,o=e.cy,a=e.rx,r=e.ry,s=a*i,l=r*i;t.moveTo(n-a,o),t.bezierCurveTo(n-a,o-l,n-s,o-r,n,o-r),t.bezierCurveTo(n+s,o-r,n+a,o-l,n+a,o),t.bezierCurveTo(n+a,o+l,n+s,o+r,n,o+r),t.bezierCurveTo(n-s,o+r,n-a,o+l,n-a,o),t.closePath()}}),_T=/[\s,]+/;$r.prototype.parse=function(t,e){e=e||{};var i=Kr(t);if(!i)throw new Error("Illegal svg");var n=new tb;this._root=n;var o=i.getAttribute("viewBox")||"",a=parseFloat(i.getAttribute("width")||e.width),r=parseFloat(i.getAttribute("height")||e.height);isNaN(a)&&(a=null),isNaN(r)&&(r=null),es(i,n,null,!0);for(var s=i.firstChild;s;)this._parseNode(s,n),s=s.nextSibling;var l,u;if(o){var h=P(o).split(_T);h.length>=4&&(l={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(l&&null!=a&&null!=r&&(u=as(l,a,r),!e.ignoreViewBox)){var c=n;(n=new tb).add(c),c.scale=u.scale.slice(),c.position=u.position.slice()}return e.ignoreRootClip||null==a||null==r||n.setClipPath(new yM({shape:{x:0,y:0,width:a,height:r}})),{root:n,width:a,height:r,viewBoxRect:l,viewBoxTransform:u}},$r.prototype._parseNode=function(t,e){var i=t.nodeName.toLowerCase();"defs"===i?this._isDefine=!0:"text"===i&&(this._isText=!0);var n;if(this._isDefine){if(r=bT[i]){var o=r.call(this,t),a=t.getAttribute("id");a&&(this._defs[a]=o)}}else{var r=wT[i];r&&(n=r.call(this,t,e),e.add(n))}for(var s=t.firstChild;s;)1===s.nodeType&&this._parseNode(s,n),3===s.nodeType&&this._isText&&this._parseText(s,n),s=s.nextSibling;"defs"===i?this._isDefine=!1:"text"===i&&(this._isText=!1)},$r.prototype._parseText=function(t,e){if(1===t.nodeType){var i=t.getAttribute("dx")||0,n=t.getAttribute("dy")||0;this._textX+=parseFloat(i),this._textY+=parseFloat(n)}var o=new rM({style:{text:t.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});Qr(e,o),es(t,o,this._defs);var a=o.style.fontSize;a&&a<9&&(o.style.fontSize=9,o.scale=o.scale||[1,1],o.scale[0]*=a/9,o.scale[1]*=a/9);var r=o.getBoundingRect();return this._textX+=r.width,e.add(o),o};var wT={g:function(t,e){var i=new tb;return Qr(e,i),es(t,i,this._defs),i},rect:function(t,e){var i=new yM;return Qr(e,i),es(t,i,this._defs),i.setShape({x:parseFloat(t.getAttribute("x")||0),y:parseFloat(t.getAttribute("y")||0),width:parseFloat(t.getAttribute("width")||0),height:parseFloat(t.getAttribute("height")||0)}),i},circle:function(t,e){var i=new sM;return Qr(e,i),es(t,i,this._defs),i.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),r:parseFloat(t.getAttribute("r")||0)}),i},line:function(t,e){var i=new _M;return Qr(e,i),es(t,i,this._defs),i.setShape({x1:parseFloat(t.getAttribute("x1")||0),y1:parseFloat(t.getAttribute("y1")||0),x2:parseFloat(t.getAttribute("x2")||0),y2:parseFloat(t.getAttribute("y2")||0)}),i},ellipse:function(t,e){var i=new xT;return Qr(e,i),es(t,i,this._defs),i.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),rx:parseFloat(t.getAttribute("rx")||0),ry:parseFloat(t.getAttribute("ry")||0)}),i},polygon:function(t,e){var i=t.getAttribute("points");i&&(i=ts(i));var n=new pM({shape:{points:i||[]}});return Qr(e,n),es(t,n,this._defs),n},polyline:function(t,e){var i=new Pn;Qr(e,i),es(t,i,this._defs);var n=t.getAttribute("points");return n&&(n=ts(n)),new gM({shape:{points:n||[]}})},image:function(t,e){var i=new fi;return Qr(e,i),es(t,i,this._defs),i.setStyle({image:t.getAttribute("xlink:href"),x:t.getAttribute("x"),y:t.getAttribute("y"),width:t.getAttribute("width"),height:t.getAttribute("height")}),i},text:function(t,e){var i=t.getAttribute("x")||0,n=t.getAttribute("y")||0,o=t.getAttribute("dx")||0,a=t.getAttribute("dy")||0;this._textX=parseFloat(i)+parseFloat(o),this._textY=parseFloat(n)+parseFloat(a);var r=new tb;return Qr(e,r),es(t,r,this._defs),r},tspan:function(t,e){var i=t.getAttribute("x"),n=t.getAttribute("y");null!=i&&(this._textX=parseFloat(i)),null!=n&&(this._textY=parseFloat(n));var o=t.getAttribute("dx")||0,a=t.getAttribute("dy")||0,r=new tb;return Qr(e,r),es(t,r,this._defs),this._textX+=o,this._textY+=a,r},path:function(t,e){var i=Rn(t.getAttribute("d")||"");return Qr(e,i),es(t,i,this._defs),i}},bT={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||0,10),i=parseInt(t.getAttribute("y1")||0,10),n=parseInt(t.getAttribute("x2")||10,10),o=parseInt(t.getAttribute("y2")||0,10),a=new TM(e,i,n,o);return Jr(t,a),a},radialgradient:function(t){}},ST={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-align":"textAlign","alignment-baseline":"textBaseline"},MT=/url\(\s*#(.*?)\)/,IT=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g,TT=/([^\s:;]+)\s*:\s*([^:;]+)/g,AT=R(),DT={registerMap:function(t,e,i){var n;return y(e)?n=e:e.svg?n=[{type:"svg",source:e.svg,specialAreas:e.specialAreas}]:(e.geoJson&&!e.features&&(i=e.specialAreas,e=e.geoJson),n=[{type:"geoJSON",source:e,specialAreas:i}]),d(n,function(t){var e=t.type;"geoJson"===e&&(e=t.type="geoJSON"),(0,CT[e])(t)}),AT.set(t,n)},retrieveMap:function(t){return AT.get(t)}},CT={geoJSON:function(t){var e=t.source;t.geoJSON=_(e)?"undefined"!=typeof JSON&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")():e},svg:function(t){t.svgXML=Kr(t.source)}},LT=k,kT=d,PT=x,NT=w,OT=lI.parseClassType,ET={zrender:"4.0.6"},RT=1e3,zT=1e3,BT=3e3,VT={PROCESSOR:{FILTER:RT,STATISTIC:5e3},VISUAL:{LAYOUT:zT,GLOBAL:2e3,CHART:BT,COMPONENT:4e3,BRUSH:5e3}},GT="__flagInMainProcess",FT="__optionUpdated",WT=/^[a-zA-Z0-9_]+$/;ls.prototype.on=ss("on"),ls.prototype.off=ss("off"),ls.prototype.one=ss("one"),h(ls,fw);var HT=us.prototype;HT._onframe=function(){if(!this._disposed){var t=this._scheduler;if(this[FT]){var e=this[FT].silent;this[GT]=!0,cs(this),ZT.update.call(this),this[GT]=!1,this[FT]=!1,gs.call(this,e),ms.call(this,e)}else if(t.unfinished){var i=1,n=this._model;this._api;t.unfinished=!1;do{var o=+new Date;t.performSeriesTasks(n),t.performDataProcessorTasks(n),fs(this,n),t.performVisualTasks(n),bs(this,this._model,0,"remain"),i-=+new Date-o}while(i>0&&t.unfinished);t.unfinished||this._zr.flush()}}},HT.getDom=function(){return this._dom},HT.getZr=function(){return this._zr},HT.setOption=function(t,e,i){var n;if(NT(e)&&(i=e.lazyUpdate,n=e.silent,e=e.notMerge),this[GT]=!0,!this._model||e){var o=new Wa(this._api),a=this._theme,r=this._model=new MI(null,null,a,o);r.scheduler=this._scheduler,r.init(null,null,a,o)}this._model.setOption(t,qT),i?(this[FT]={silent:n},this[GT]=!1):(cs(this),ZT.update.call(this),this._zr.flush(),this[FT]=!1,this[GT]=!1,gs.call(this,n),ms.call(this,n))},HT.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},HT.getModel=function(){return this._model},HT.getOption=function(){return this._model&&this._model.getOption()},HT.getWidth=function(){return this._zr.getWidth()},HT.getHeight=function(){return this._zr.getHeight()},HT.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},HT.getRenderedCanvas=function(t){if(U_.canvasSupported)return(t=t||{}).pixelRatio=t.pixelRatio||1,t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor"),this._zr.painter.getRenderedCanvas(t)},HT.getSvgDataUrl=function(){if(U_.svgSupported){var t=this._zr;return d(t.storage.getDisplayList(),function(t){t.stopAnimation(!0)}),t.painter.pathToDataUrl()}},HT.getDataURL=function(t){var e=(t=t||{}).excludeComponents,i=this._model,n=[],o=this;kT(e,function(t){i.eachComponent({mainType:t},function(t){var e=o._componentsMap[t.__viewId];e.group.ignore||(n.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 kT(n,function(t){t.group.ignore=!1}),a},HT.getConnectedDataURL=function(t){if(U_.canvasSupported){var e=this.group,n=Math.min,o=Math.max;if(eA[e]){var a=1/0,r=1/0,s=-1/0,l=-1/0,u=[],h=t&&t.pixelRatio||1;d(tA,function(h,c){if(h.group===e){var d=h.getRenderedCanvas(i(t)),f=h.getDom().getBoundingClientRect();a=n(f.left,a),r=n(f.top,r),s=o(f.right,s),l=o(f.bottom,l),u.push({dom:d,left:f.left,top:f.top})}});var c=(s*=h)-(a*=h),f=(l*=h)-(r*=h),p=iw();p.width=c,p.height=f;var g=Ii(p);return kT(u,function(t){var e=new fi({style:{x:t.left*h-a,y:t.top*h-r,image:t.dom}});g.add(e)}),g.refreshImmediately(),p.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}},HT.convertToPixel=v(hs,"convertToPixel"),HT.convertFromPixel=v(hs,"convertFromPixel"),HT.containPixel=function(t,e){var i;return t=Vi(this._model,t),d(t,function(t,n){n.indexOf("Models")>=0&&d(t,function(t){var o=t.coordinateSystem;if(o&&o.containPoint)i|=!!o.containPoint(e);else if("seriesModels"===n){var a=this._chartsMap[t.__viewId];a&&a.containPoint&&(i|=a.containPoint(e,t))}},this)},this),!!i},HT.getVisual=function(t,e){var i=(t=Vi(this._model,t,{defaultMainType:"series"})).seriesModel.getData(),n=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?i.indexOfRawIndex(t.dataIndex):null;return null!=n?i.getItemVisual(n,e):i.getVisual(e)},HT.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},HT.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var ZT={prepareAndUpdate:function(t){cs(this),ZT.update.call(this,t)},update:function(t){var e=this._model,i=this._api,n=this._zr,o=this._coordSysMgr,a=this._scheduler;if(e){a.restoreData(e,t),a.performSeriesTasks(e),o.create(e,i),a.performDataProcessorTasks(e,t),fs(this,e),o.update(e,i),xs(e),a.performVisualTasks(e,t),_s(this,e,i,t);var r=e.get("backgroundColor")||"transparent";if(U_.canvasSupported)n.setBackgroundColor(r);else{var s=Gt(r);r=qt(s,"rgb"),0===s[3]&&(r="transparent")}Ss(e,i)}},updateTransform:function(t){var e=this._model,i=this,n=this._api;if(e){var o=[];e.eachComponent(function(a,r){var s=i.getViewOfComponentModel(r);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(r,e,n,t);l&&l.update&&o.push(s)}else o.push(s)});var a=R();e.eachSeries(function(o){var r=i._chartsMap[o.__viewId];if(r.updateTransform){var s=r.updateTransform(o,e,n,t);s&&s.update&&a.set(o.uid,1)}else a.set(o.uid,1)}),xs(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0,dirtyMap:a}),bs(i,e,0,t,a),Ss(e,this._api)}},updateView:function(t){var e=this._model;e&&(Ar.markUpdateMethod(t,"updateView"),xs(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),_s(this,this._model,this._api,t),Ss(e,this._api))},updateVisual:function(t){ZT.update.call(this,t)},updateLayout:function(t){ZT.update.call(this,t)}};HT.resize=function(t){this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var i=e.resetOption("media"),n=t&&t.silent;this[GT]=!0,i&&cs(this),ZT.update.call(this),this[GT]=!1,gs.call(this,n),ms.call(this,n)}},HT.showLoading=function(t,e){if(NT(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),QT[t]){var i=QT[t](this._api,e),n=this._zr;this._loadingFX=i,n.add(i)}},HT.hideLoading=function(){this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},HT.makeActionFromEvent=function(t){var e=a({},t);return e.type=jT[t.type],e},HT.dispatchAction=function(t,e){NT(e)||(e={silent:!!e}),XT[t.type]&&this._model&&(this[GT]?this._pendingActions.push(t):(ps.call(this,t,e.silent),e.flush?this._zr.flush(!0):!1!==e.flush&&U_.browser.weChat&&this._throttledZrFlush(),gs.call(this,e.silent),ms.call(this,e.silent)))},HT.appendData=function(t){var e=t.seriesIndex;this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0},HT.on=ss("on"),HT.off=ss("off"),HT.one=ss("one");var UT=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];HT._initEvents=function(){kT(UT,function(t){var e=function(e){var i,n=this.getModel(),o=e.target;if("globalout"===t)i={};else if(o&&null!=o.dataIndex){var r=o.dataModel||n.getSeriesByIndex(o.seriesIndex);i=r&&r.getDataParams(o.dataIndex,o.dataType,o)||{}}else o&&o.eventData&&(i=a({},o.eventData));if(i){var s=i.componentType,l=i.componentIndex;"markLine"!==s&&"markPoint"!==s&&"markArea"!==s||(s="series",l=i.seriesIndex);var u=s&&null!=l&&n.getComponent(s,l),h=u&&this["series"===u.mainType?"_chartsMap":"_componentsMap"][u.__viewId];i.event=e,i.type=t,this._ecEventProcessor.eventInfo={targetEl:o,packedEvent:i,model:u,view:h},this.trigger(t,i)}};e.zrEventfulCallAtLast=!0,this._zr.on(t,e,this)},this),kT(jT,function(t,e){this._messageCenter.on(e,function(t){this.trigger(e,t)},this)},this)},HT.isDisposed=function(){return this._disposed},HT.clear=function(){this.setOption({series:[]},!0)},HT.dispose=function(){if(!this._disposed){this._disposed=!0,Fi(this.getDom(),oA,"");var t=this._api,e=this._model;kT(this._componentsViews,function(i){i.dispose(e,t)}),kT(this._chartsViews,function(i){i.dispose(e,t)}),this._zr.dispose(),delete tA[this.id]}},h(us,fw),Ds.prototype={constructor:Ds,normalizeQuery:function(t){var e={},i={},n={};if(_(t)){var o=OT(t);e.mainType=o.main||null,e.subType=o.sub||null}else{var a=["Index","Name","Id"],r={name:1,dataIndex:1,dataType:1};d(t,function(t,o){for(var s=!1,l=0;l0&&h===o.length-u.length){var c=o.slice(0,h);"data"!==c&&(e.mainType=c,e[u.toLowerCase()]=t,s=!0)}}r.hasOwnProperty(o)&&(i[o]=t,s=!0),s||(n[o]=t)})}return{cptQuery:e,dataQuery:i,otherQuery:n}},filter:function(t,e,i){function n(t,e,i,n){return null==t[i]||e[n||i]===t[i]}var o=this.eventInfo;if(!o)return!0;var a=o.targetEl,r=o.packedEvent,s=o.model,l=o.view;if(!s||!l)return!0;var u=e.cptQuery,h=e.dataQuery;return n(u,s,"mainType")&&n(u,s,"subType")&&n(u,s,"index","componentIndex")&&n(u,s,"name")&&n(u,s,"id")&&n(h,r,"name")&&n(h,r,"dataIndex")&&n(h,r,"dataType")&&(!l.filterForExposedEvent||l.filterForExposedEvent(t,e.otherQuery,a,r))},afterTrigger:function(){this.eventInfo=null}};var XT={},jT={},YT=[],qT=[],KT=[],$T=[],JT={},QT={},tA={},eA={},iA=new Date-0,nA=new Date-0,oA="_echarts_instance_",aA=Ls;Bs(2e3,aT),Ns(BI),Os(5e3,function(t){var e=R();t.eachSeries(function(t){var i=t.get("stack");if(i){var n=e.get(i)||e.set(i,[]),o=t.getData(),a={stackResultDimension:o.getCalculationInfo("stackResultDimension"),stackedOverDimension:o.getCalculationInfo("stackedOverDimension"),stackedDimension:o.getCalculationInfo("stackedDimension"),stackedByDimension:o.getCalculationInfo("stackedByDimension"),isStackedByIndex:o.getCalculationInfo("isStackedByIndex"),data:o,seriesModel:t};if(!a.stackedDimension||!a.isStackedByIndex&&!a.stackedByDimension)return;n.length&&o.setCalculationInfo("stackedOnSeries",n[n.length-1].seriesModel),n.push(a)}}),e.each(ar)}),Gs("default",function(t,e){r(e=e||{},{text:"loading",color:"#c23531",textColor:"#000",maskColor:"rgba(255, 255, 255, 0.8)",zlevel:0});var i=new yM({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4}),n=new SM({shape:{startAngle:-lT/2,endAngle:-lT/2+.1,r:10},style:{stroke:e.color,lineCap:"round",lineWidth:5},zlevel:e.zlevel,z:10001}),o=new yM({style:{fill:"none",text:e.text,textPosition:"right",textDistance:10,textFill:e.textColor},zlevel:e.zlevel,z:10001});n.animateShape(!0).when(1e3,{endAngle:3*lT/2}).start("circularInOut"),n.animateShape(!0).when(1e3,{startAngle:3*lT/2}).delay(300).start("circularInOut");var a=new tb;return a.add(n),a.add(o),a.add(i),a.resize=function(){var e=t.getWidth()/2,a=t.getHeight()/2;n.setShape({cx:e,cy:a});var r=n.shape.r;o.setShape({x:e-r,y:a-r,width:2*r,height:2*r}),i.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},a.resize(),a}),Es({type:"highlight",event:"highlight",update:"highlight"},B),Es({type:"downplay",event:"downplay",update:"downplay"},B),Ps("light",mT),Ps("dark",yT);var rA={};Xs.prototype={constructor:Xs,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=this._old,e=this._new,i={},n=[],o=[];for(js(t,{},n,"_oldKeyGetter",this),js(e,i,o,"_newKeyGetter",this),a=0;ax[1]&&(x[1]=y)}e&&(this._nameList[d]=e[f])}this._rawCount=this._count=l,this._extent={},el(this)},yA._initDataFromProvider=function(t,e){if(!(t>=e)){for(var i,n=this._chunkSize,o=this._rawData,a=this._storage,r=this.dimensions,s=r.length,l=this._dimensionInfos,u=this._nameList,h=this._idList,c=this._rawExtent,d=this._nameRepeatCount={},f=this._chunkCount,p=0;pM[1]&&(M[1]=S)}if(!o.pure){var I=u[v];if(m&&null==I)if(null!=m.name)u[v]=I=m.name;else if(null!=i){var T=r[i],A=a[T][y];if(A){I=A[x];var D=l[T].ordinalMeta;D&&D.categories.length&&(I=D.categories[I])}}var C=null==m?null:m.id;null==C&&null!=I&&(d[I]=d[I]||0,C=I,d[I]>0&&(C+="__ec__"+d[I]),d[I]++),null!=C&&(h[v]=C)}}!o.persistent&&o.clean&&o.clean(),this._rawCount=this._count=e,this._extent={},el(this)}},yA.count=function(){return this._count},yA.getIndices=function(){var t=this._indices;if(t){var e=t.constructor,i=this._count;if(e===Array){n=new e(i);for(o=0;o=0&&e=0&&ea&&(a=s)}return i=[o,a],this._extent[t]=i,i},yA.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},yA.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},yA.getCalculationInfo=function(t){return this._calculationInfo[t]},yA.setCalculationInfo=function(t,e){lA(t)?a(this._calculationInfo,t):this._calculationInfo[t]=e},yA.getSum=function(t){var e=0;if(this._storage[t])for(var i=0,n=this.count();i=this._rawCount||t<0)return-1;var e=this._indices,i=e[t];if(null!=i&&it))return a;o=a-1}}return-1},yA.indicesOfNearest=function(t,e,i){var n=[];if(!this._storage[t])return n;null==i&&(i=1/0);for(var o=Number.MAX_VALUE,a=-1,r=0,s=this.count();r=0&&a<0)&&(o=u,a=l,n.length=0),n.push(r))}return n},yA.getRawIndex=nl,yA.getRawDataItem=function(t){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(t));for(var e=[],i=0;i=l&&w<=u||isNaN(w))&&(a[r++]=c),c++;h=!0}else if(2===n){for(var d=this._storage[s],v=this._storage[e[1]],y=t[e[1]][0],x=t[e[1]][1],f=0;f=l&&w<=u||isNaN(w))&&(b>=y&&b<=x||isNaN(b))&&(a[r++]=c),c++}h=!0}}if(!h)if(1===n)for(m=0;m=l&&w<=u||isNaN(w))&&(a[r++]=M)}else for(m=0;mt[I][1])&&(S=!1)}S&&(a[r++]=this.getRawIndex(m))}return rb[1]&&(b[1]=w)}}}return o},yA.downSample=function(t,e,i,n){for(var o=sl(this,[t]),a=o._storage,r=[],s=Math.floor(1/e),l=a[t],u=this.count(),h=this._chunkSize,c=o._rawExtent[t],d=new($s(this))(u),f=0,p=0;pu-p&&(s=u-p,r.length=s);for(var g=0;gc[1]&&(c[1]=x),d[f++]=_}return o._count=f,o._indices=d,o.getRawIndex=ol,o},yA.getItemModel=function(t){var e=this.hostModel;return new No(this.getRawDataItem(t),e,e&&e.ecModel)},yA.diff=function(t){var e=this;return new Xs(t?t.getIndices():[],this.getIndices(),function(e){return al(t,e)},function(t){return al(e,t)})},yA.getVisual=function(t){var e=this._visual;return e&&e[t]},yA.setVisual=function(t,e){if(lA(t))for(var i in t)t.hasOwnProperty(i)&&this.setVisual(i,t[i]);else this._visual=this._visual||{},this._visual[t]=e},yA.setLayout=function(t,e){if(lA(t))for(var i in t)t.hasOwnProperty(i)&&this.setLayout(i,t[i]);else this._layout[t]=e},yA.getLayout=function(t){return this._layout[t]},yA.getItemLayout=function(t){return this._itemLayouts[t]},yA.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?a(this._itemLayouts[t]||{},e):e},yA.clearItemLayouts=function(){this._itemLayouts.length=0},yA.getItemVisual=function(t,e,i){var n=this._itemVisuals[t],o=n&&n[e];return null!=o||i?o:this.getVisual(e)},yA.setItemVisual=function(t,e,i){var n=this._itemVisuals[t]||{},o=this.hasItemVisual;if(this._itemVisuals[t]=n,lA(e))for(var a in e)e.hasOwnProperty(a)&&(n[a]=e[a],o[a]=!0);else n[e]=i,o[e]=!0},yA.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};var xA=function(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType};yA.setItemGraphicEl=function(t,e){var i=this.hostModel;e&&(e.dataIndex=t,e.dataType=this.dataType,e.seriesIndex=i&&i.seriesIndex,"group"===e.type&&e.traverse(xA,e)),this._graphicEls[t]=e},yA.getItemGraphicEl=function(t){return this._graphicEls[t]},yA.eachItemGraphicEl=function(t,e){d(this._graphicEls,function(i,n){i&&t&&t.call(e,i,n)})},yA.cloneShallow=function(t){if(!t){var e=f(this.dimensions,this.getDimensionInfo,this);t=new vA(e,this.hostModel)}if(t._storage=this._storage,Qs(t,this),this._indices){var i=this._indices.constructor;t._indices=new i(this._indices)}else t._indices=null;return t.getRawIndex=t._indices?ol:nl,t},yA.wrapMethod=function(t,e){var i=this[t];"function"==typeof i&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=i.apply(this,arguments);return e.apply(this,[t].concat(C(arguments)))})},yA.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],yA.CHANGABLE_METHODS=["filterSelf","selectRange"];var _A=function(t,e){return e=e||{},hl(e.coordDimensions||[],t,{dimsDef:e.dimensionsDefine||t.dimensionsDefine,encodeDef:e.encodeDefine||t.encodeDefine,dimCount:e.dimensionsCount,generateCoord:e.generateCoord,generateCoordCount:e.generateCoordCount})};xl.prototype.parse=function(t){return t},xl.prototype.getSetting=function(t){return this._setting[t]},xl.prototype.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},xl.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},xl.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},xl.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},xl.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},xl.prototype.getExtent=function(){return this._extent.slice()},xl.prototype.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(e)||(i[1]=e)},xl.prototype.isBlank=function(){return this._isBlank},xl.prototype.setBlank=function(t){this._isBlank=t},xl.prototype.getLabel=null,ji(xl),$i(xl,{registerWhenExtend:!0}),_l.createByAxisModel=function(t){var e=t.option,i=e.data,n=i&&f(i,bl);return new _l({categories:n,needCollect:!n,deduplication:!1!==e.dedplication})};var wA=_l.prototype;wA.getOrdinal=function(t){return wl(this).get(t)},wA.parseAndCollect=function(t){var e,i=this._needCollect;if("string"!=typeof t&&!i)return t;if(i&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var n=wl(this);return null==(e=n.get(t))&&(i?(e=this.categories.length,this.categories[e]=t,n.set(t,e)):e=NaN),e};var bA=xl.prototype,SA=xl.extend({type:"ordinal",init:function(t,e){t&&!y(t)||(t=new _l({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),bA.contain.call(this,t)&&null!=this._ordinalMeta.categories[t]},normalize:function(t){return bA.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(bA.scale.call(this,t))},getTicks:function(){for(var t=[],e=this._extent,i=e[0];i<=e[1];)t.push(i),i++;return t},getLabel:function(t){if(!this.isBlank())return this._ordinalMeta.categories[t]},count:function(){return this._extent[1]-this._extent[0]+1},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},getOrdinalMeta:function(){return this._ordinalMeta},niceTicks:B,niceExtent:B});SA.create=function(){return new SA};var MA=Go,IA=Go,TA=xl.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(t,e){var i=this._extent;isNaN(t)||(i[0]=parseFloat(t)),isNaN(e)||(i[1]=parseFloat(e))},unionExtent:function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),TA.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=Ml(t)},getTicks:function(){return Al(this._interval,this._extent,this._niceExtent,this._intervalPrecision)},getLabel:function(t,e){if(null==t)return"";var i=e&&e.precision;return null==i?i=Ho(t)||0:"auto"===i&&(i=this._intervalPrecision),t=IA(t,i,!0),ta(t)},niceTicks:function(t,e,i){t=t||5;var n=this._extent,o=n[1]-n[0];if(isFinite(o)){o<0&&(o=-o,n.reverse());var a=Sl(n,t,e,i);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 i=e[0];t.fixMax?e[0]-=i/2:(e[1]+=i/2,e[0]-=i/2)}else e[1]=1;var n=e[1]-e[0];isFinite(n)||(e[0]=0,e[1]=1),this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var o=this._interval;t.fixMin||(e[0]=IA(Math.floor(e[0]/o)*o)),t.fixMax||(e[1]=IA(Math.ceil(e[1]/o)*o))}});TA.create=function(){return new TA};var AA="__ec_stack_",DA="undefined"!=typeof Float32Array?Float32Array:Array,CA={seriesType:"bar",plan:$I(),reset:function(t){if(Rl(t)&&zl(t)){var e=t.getData(),i=t.coordinateSystem,n=i.getBaseAxis(),o=i.getOtherAxis(n),a=e.mapDimension(o.dim),r=e.mapDimension(n.dim),s=o.isHorizontal(),l=s?0:1,u=Ol(Pl([t]),n,t).width;return u>.5||(u=.5),{progress:function(t,e){for(var n,h=new DA(2*t.count),c=[],d=[],f=0;null!=(n=t.next());)d[l]=e.get(a,n),d[1-l]=e.get(r,n),c=i.dataToPoint(d,null,c),h[f++]=c[0],h[f++]=c[1];e.setLayout({largePoints:h,barWidth:u,valueAxisStart:Bl(0,o),valueAxisHorizontal:s})}}}}},LA=TA.prototype,kA=Math.ceil,PA=Math.floor,NA=function(t,e,i,n){for(;i>>1;t[o][1]i&&(a=i);var r=EA.length,s=NA(EA,a,0,r),l=EA[Math.min(s,r-1)],u=l[1];"year"===l[0]&&(u*=$o(o/u/t,!0));var h=this.getSetting("useUTC")?0:60*new Date(+n[0]||+n[1]).getTimezoneOffset()*1e3,c=[Math.round(kA((n[0]-h)/u)*u+h),Math.round(PA((n[1]-h)/u)*u+h)];Tl(c,n),this._stepLvl=l,this._interval=u,this._niceExtent=c},parse:function(t){return+Yo(t)}});d(["contain","normalize"],function(t){OA.prototype[t]=function(e){return LA[t].call(this,this.parse(e))}});var EA=[["hh:mm:ss",1e3],["hh:mm:ss",5e3],["hh:mm:ss",1e4],["hh:mm:ss",15e3],["hh:mm:ss",3e4],["hh:mm\nMM-dd",6e4],["hh:mm\nMM-dd",3e5],["hh:mm\nMM-dd",6e5],["hh:mm\nMM-dd",9e5],["hh:mm\nMM-dd",18e5],["hh:mm\nMM-dd",36e5],["hh:mm\nMM-dd",72e5],["hh:mm\nMM-dd",216e5],["hh:mm\nMM-dd",432e5],["MM-dd\nyyyy",864e5],["MM-dd\nyyyy",1728e5],["MM-dd\nyyyy",2592e5],["MM-dd\nyyyy",3456e5],["MM-dd\nyyyy",432e6],["MM-dd\nyyyy",5184e5],["week",6048e5],["MM-dd\nyyyy",864e6],["week",12096e5],["week",18144e5],["month",26784e5],["week",36288e5],["month",53568e5],["week",6048e6],["quarter",8208e6],["month",107136e5],["month",13392e6],["half-year",16416e6],["month",214272e5],["month",26784e6],["year",32832e6]];OA.create=function(t){return new OA({useUTC:t.ecModel.get("useUTC")})};var RA=xl.prototype,zA=TA.prototype,BA=Ho,VA=Go,GA=Math.floor,FA=Math.ceil,WA=Math.pow,HA=Math.log,ZA=xl.extend({type:"log",base:10,$constructor:function(){xl.apply(this,arguments),this._originalScale=new TA},getTicks:function(){var t=this._originalScale,e=this._extent,i=t.getExtent();return f(zA.getTicks.call(this),function(n){var o=Go(WA(this.base,n));return o=n===e[0]&&t.__fixMin?Vl(o,i[0]):o,o=n===e[1]&&t.__fixMax?Vl(o,i[1]):o},this)},getLabel:zA.getLabel,scale:function(t){return t=RA.scale.call(this,t),WA(this.base,t)},setExtent:function(t,e){var i=this.base;t=HA(t)/HA(i),e=HA(e)/HA(i),zA.setExtent.call(this,t,e)},getExtent:function(){var t=this.base,e=RA.getExtent.call(this);e[0]=WA(t,e[0]),e[1]=WA(t,e[1]);var i=this._originalScale,n=i.getExtent();return i.__fixMin&&(e[0]=Vl(e[0],n[0])),i.__fixMax&&(e[1]=Vl(e[1],n[1])),e},unionExtent:function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=HA(t[0])/HA(e),t[1]=HA(t[1])/HA(e),RA.unionExtent.call(this,t)},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},niceTicks:function(t){t=t||10;var e=this._extent,i=e[1]-e[0];if(!(i===1/0||i<=0)){var n=qo(i);for(t/i*n<=.5&&(n*=10);!isNaN(n)&&Math.abs(n)<1&&Math.abs(n)>0;)n*=10;var o=[Go(FA(e[0]/n)*n),Go(GA(e[1]/n)*n)];this._interval=n,this._niceExtent=o}},niceExtent:function(t){zA.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});d(["contain","normalize"],function(t){ZA.prototype[t]=function(e){return e=HA(e)/HA(this.base),RA[t].call(this,e)}}),ZA.create=function(){return new ZA};var UA={getMin:function(t){var e=this.option,i=t||null==e.rangeStart?e.min:e.rangeStart;return this.axis&&null!=i&&"dataMin"!==i&&"function"!=typeof i&&!I(i)&&(i=this.axis.scale.parse(i)),i},getMax:function(t){var e=this.option,i=t||null==e.rangeEnd?e.max:e.rangeEnd;return this.axis&&null!=i&&"dataMax"!==i&&"function"!=typeof i&&!I(i)&&(i=this.axis.scale.parse(i)),i},getNeedCrossZero:function(){var t=this.option;return null==t.rangeStart&&null==t.rangeEnd&&!t.scale},getCoordSysModel:B,setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},XA=Un({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,o=e.width/2,a=e.height/2;t.moveTo(i,n-a),t.lineTo(i+o,n+a),t.lineTo(i-o,n+a),t.closePath()}}),jA=Un({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,o=e.width/2,a=e.height/2;t.moveTo(i,n-a),t.lineTo(i+o,n),t.lineTo(i,n+a),t.lineTo(i-o,n),t.closePath()}}),YA=Un({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.x,n=e.y,o=e.width/5*3,a=Math.max(o,e.height),r=o/2,s=r*r/(a-r),l=n-a+r+s,u=Math.asin(s/r),h=Math.cos(u)*r,c=Math.sin(u),d=Math.cos(u),f=.6*r,p=.7*r;t.moveTo(i-h,l+s),t.arc(i,l,r,Math.PI-u,2*Math.PI+u),t.bezierCurveTo(i+h-c*f,l+s+d*f,i,n-p,i,n),t.bezierCurveTo(i,n-p,i-h+c*f,l+s+d*f,i-h,l+s),t.closePath()}}),qA=Un({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.height,n=e.width,o=e.x,a=e.y,r=n/3*2;t.moveTo(o,a),t.lineTo(o+r,a+i),t.lineTo(o,a+i/4*3),t.lineTo(o-r,a+i),t.lineTo(o,a),t.closePath()}}),KA={line:function(t,e,i,n,o){o.x1=t,o.y1=e+n/2,o.x2=t+i,o.y2=e+n/2},rect:function(t,e,i,n,o){o.x=t,o.y=e,o.width=i,o.height=n},roundRect:function(t,e,i,n,o){o.x=t,o.y=e,o.width=i,o.height=n,o.r=Math.min(i,n)/4},square:function(t,e,i,n,o){var a=Math.min(i,n);o.x=t,o.y=e,o.width=a,o.height=a},circle:function(t,e,i,n,o){o.cx=t+i/2,o.cy=e+n/2,o.r=Math.min(i,n)/2},diamond:function(t,e,i,n,o){o.cx=t+i/2,o.cy=e+n/2,o.width=i,o.height=n},pin:function(t,e,i,n,o){o.x=t+i/2,o.y=e+n/2,o.width=i,o.height=n},arrow:function(t,e,i,n,o){o.x=t+i/2,o.y=e+n/2,o.width=i,o.height=n},triangle:function(t,e,i,n,o){o.cx=t+i/2,o.cy=e+n/2,o.width=i,o.height=n}},$A={};d({line:_M,rect:yM,roundRect:yM,square:yM,circle:sM,diamond:jA,pin:YA,arrow:qA,triangle:XA},function(t,e){$A[e]=new t});var JA=Un({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},beforeBrush:function(){var t=this.style;"pin"===this.shape.symbolType&&"inside"===t.textPosition&&(t.textPosition=["50%","40%"],t.textAlign="center",t.textVerticalAlign="middle")},buildPath:function(t,e,i){var n=e.symbolType,o=$A[n];"none"!==e.symbolType&&(o||(o=$A[n="rect"]),KA[n](e.x,e.y,e.width,e.height,o.shape),o.buildPath(t,o.shape,i))}}),QA={isDimensionStacked:pl,enableDataStack:fl,getStackedDimension:gl},tD=(Object.freeze||Object)({createList:function(t){return ml(t.getSource(),t)},getLayoutRect:ca,dataStack:QA,createScale:function(t,e){var i=e;No.isInstance(e)||h(i=new No(e),UA);var n=Hl(i);return n.setExtent(t[0],t[1]),Wl(n,i),n},mixinAxisModelCommonMethods:function(t){h(t,UA)},completeDimensions:hl,createDimensions:_A,createSymbol:Jl}),eD=1e-8;eu.prototype={constructor:eu,properties:null,getBoundingRect:function(){var t=this._rect;if(t)return t;for(var e=Number.MAX_VALUE,i=[e,e],n=[-e,-e],o=[],a=[],r=this.geometries,s=0;s0}),function(t){var e=t.properties,i=t.geometry,n=i.coordinates,o=[];"Polygon"===i.type&&o.push({type:"polygon",exterior:n[0],interiors:n.slice(1)}),"MultiPolygon"===i.type&&d(n,function(t){t[0]&&o.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})});var a=new eu(e.name,o,e.cp);return a.properties=e,a})},nD=Bi(),oD=[0,1],aD=function(t,e,i){this.dim=t,this.scale=e,this._extent=i||[0,0],this.inverse=!1,this.onBand=!1};aD.prototype={constructor:aD,contain:function(t){var e=this._extent,i=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]);return t>=i&&t<=n},containData:function(t){return this.contain(this.dataToCoord(t))},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(t){return Zo(t||this.scale.getExtent(),this._extent)},setExtent:function(t,e){var i=this._extent;i[0]=t,i[1]=e},dataToCoord:function(t,e){var i=this._extent,n=this.scale;return t=n.normalize(t),this.onBand&&"ordinal"===n.type&&yu(i=i.slice(),n.count()),Bo(t,oD,i,e)},coordToData:function(t,e){var i=this._extent,n=this.scale;this.onBand&&"ordinal"===n.type&&yu(i=i.slice(),n.count());var o=Bo(t,i,oD,e);return this.scale.scale(o)},pointToData:function(t,e){},getTicksCoords:function(t){var e=(t=t||{}).tickModel||this.getTickModel(),i=au(this,e),n=f(i.ticks,function(t){return{coord:this.dataToCoord(t),tickValue:t}},this),o=e.get("alignWithLabel");return xu(this,n,i.tickCategoryInterval,o,t.clamp),n},getViewLabels:function(){return ou(this).labels},getLabelModel:function(){return this.model.getModel("axisLabel")},getTickModel:function(){return this.model.getModel("axisTick")},getBandWidth:function(){var t=this._extent,e=this.scale.getExtent(),i=e[1]-e[0]+(this.onBand?1:0);0===i&&(i=1);var n=Math.abs(t[1]-t[0]);return Math.abs(n)/i},isHorizontal:null,getRotate:null,calculateCategoryInterval:function(){return pu(this)}};var rD=iD,sD={};d(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],function(t){sD[t]=aw[t]});var lD={};d(["extendShape","extendPath","makePath","makeImage","mergePath","resizePath","createIcon","setHoverStyle","setLabelStyle","setTextStyle","setText","getFont","updateProps","initProps","getTransform","clipPointsByRect","clipRectByRect","Group","Image","Text","Circle","Sector","Ring","Polygon","Polyline","Rect","Line","BezierCurve","Arc","IncrementalDisplayable","CompoundPath","LinearGradient","RadialGradient","BoundingRect"],function(t){lD[t]=zM[t]}),YI.extend({type:"series.line",dependencies:["grid","polar"],getInitialData:function(t,e){return ml(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:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0}});var uD=wu.prototype,hD=wu.getSymbolSize=function(t,e){var i=t.getItemVisual(e,"symbolSize");return i instanceof Array?i.slice():[+i,+i]};uD._createSymbol=function(t,e,i,n,o){this.removeAll();var a=Jl(t,-1,-1,2,2,e.getItemVisual(i,"color"),o);a.attr({z2:100,culling:!0,scale:bu(n)}),a.drift=Su,this._symbolType=t,this.add(a)},uD.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(t)},uD.getSymbolPath=function(){return this.childAt(0)},uD.getScale=function(){return this.childAt(0).scale},uD.highlight=function(){this.childAt(0).trigger("emphasis")},uD.downplay=function(){this.childAt(0).trigger("normal")},uD.setZ=function(t,e){var i=this.childAt(0);i.zlevel=t,i.z=e},uD.setDraggable=function(t){var e=this.childAt(0);e.draggable=t,e.cursor=t?"move":"pointer"},uD.updateData=function(t,e,i){this.silent=!1;var n=t.getItemVisual(e,"symbol")||"circle",o=t.hostModel,a=hD(t,e),r=n!==this._symbolType;if(r){var s=t.getItemVisual(e,"symbolKeepAspect");this._createSymbol(n,t,e,a,s)}else(l=this.childAt(0)).silent=!1,Io(l,{scale:bu(a)},o,e);if(this._updateCommon(t,e,a,i),r){var l=this.childAt(0),u=i&&i.fadeIn,h={scale:l.scale.slice()};u&&(h.style={opacity:l.style.opacity}),l.scale=[0,0],u&&(l.style.opacity=0),To(l,h,o,e)}this._seriesModel=o};var cD=["itemStyle"],dD=["emphasis","itemStyle"],fD=["label"],pD=["emphasis","label"];uD._updateCommon=function(t,e,i,n){var o=this.childAt(0),r=t.hostModel,s=t.getItemVisual(e,"color");"image"!==o.type&&o.useStyle({strokeNoScale:!0});var l=n&&n.itemStyle,u=n&&n.hoverItemStyle,h=n&&n.symbolRotate,c=n&&n.symbolOffset,d=n&&n.labelModel,f=n&&n.hoverLabelModel,p=n&&n.hoverAnimation,g=n&&n.cursorStyle;if(!n||t.hasItemOption){var m=n&&n.itemModel?n.itemModel:t.getItemModel(e);l=m.getModel(cD).getItemStyle(["color"]),u=m.getModel(dD).getItemStyle(),h=m.getShallow("symbolRotate"),c=m.getShallow("symbolOffset"),d=m.getModel(fD),f=m.getModel(pD),p=m.getShallow("hoverAnimation"),g=m.getShallow("cursor")}else u=a({},u);var v=o.style;o.attr("rotation",(h||0)*Math.PI/180||0),c&&o.attr("position",[Vo(c[0],i[0]),Vo(c[1],i[1])]),g&&o.attr("cursor",g),o.setColor(s,n&&n.symbolInnerColor),o.setStyle(l);var y=t.getItemVisual(e,"opacity");null!=y&&(v.opacity=y);var x=t.getItemVisual(e,"liftZ"),_=o.__z2Origin;null!=x?null==_&&(o.__z2Origin=o.z2,o.z2+=x):null!=_&&(o.z2=_,o.__z2Origin=null);var w=n&&n.useNameLabel;go(v,u,d,f,{labelFetcher:r,labelDataIndex:e,defaultText:function(e,i){return w?t.getName(e):_u(t,e)},isRectText:!0,autoColor:s}),o.off("mouseover").off("mouseout").off("emphasis").off("normal"),o.hoverStyle=u,fo(o),o.__symbolOriginalScale=bu(i),p&&r.isAnimationEnabled()&&o.on("mouseover",Mu).on("mouseout",Iu).on("emphasis",Tu).on("normal",Au)},uD.fadeOut=function(t,e){var i=this.childAt(0);this.silent=i.silent=!0,!(e&&e.keepLabel)&&(i.style.text=null),Io(i,{style:{opacity:0},scale:[0,0]},this._seriesModel,this.dataIndex,t)},u(wu,tb);var gD=Du.prototype;gD.updateData=function(t,e){e=Lu(e);var i=this.group,n=t.hostModel,o=this._data,a=this._symbolCtor,r=ku(t);o||i.removeAll(),t.diff(o).add(function(n){var o=t.getItemLayout(n);if(Cu(t,o,n,e)){var s=new a(t,n,r);s.attr("position",o),t.setItemGraphicEl(n,s),i.add(s)}}).update(function(s,l){var u=o.getItemGraphicEl(l),h=t.getItemLayout(s);Cu(t,h,s,e)?(u?(u.updateData(t,s,r),Io(u,{position:h},n)):(u=new a(t,s)).attr("position",h),i.add(u),t.setItemGraphicEl(s,u)):i.remove(u)}).remove(function(t){var e=o.getItemGraphicEl(t);e&&e.fadeOut(function(){i.remove(e)})}).execute(),this._data=t},gD.isPersistent=function(){return!0},gD.updateLayout=function(){var t=this._data;t&&t.eachItemGraphicEl(function(e,i){var n=t.getItemLayout(i);e.attr("position",n)})},gD.incrementalPrepareUpdate=function(t){this._seriesScope=ku(t),this._data=null,this.group.removeAll()},gD.incrementalUpdate=function(t,e,i){i=Lu(i);for(var n=t.start;n0&&Ru(i[o-1]);o--);for(;n0&&Ru(i[a-1]);a--);for(;o=0){var r=o.getItemGraphicEl(a);if(!r){var s=o.getItemLayout(a);if(!s)return;(r=new wu(o,a)).position=s,r.setZ(t.get("zlevel"),t.get("z")),r.ignore=isNaN(s[0])||isNaN(s[1]),r.__temp=!0,o.setItemGraphicEl(a,r),r.stopSymbolAnimation(!0),this.group.add(r)}r.highlight()}else Ar.prototype.highlight.call(this,t,e,i,n)},downplay:function(t,e,i,n){var o=t.getData(),a=zi(o,n);if(null!=a&&a>=0){var r=o.getItemGraphicEl(a);r&&(r.__temp?(o.setItemGraphicEl(a,null),this.group.remove(r)):r.downplay())}else Ar.prototype.downplay.call(this,t,e,i,n)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new MD({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e,e},_newPolygon:function(t,e){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new ID({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(i),this._polygon=i,i},_updateAnimation:function(t,e,i,n,o,a){var r=this._polyline,s=this._polygon,l=t.hostModel,u=mD(this._data,t,this._stackedOnPoints,e,this._coordSys,i,this._valueOrigin,a),h=u.current,c=u.stackedOnCurrent,d=u.next,f=u.stackedOnNext;o&&(h=Yu(u.current,i,o),c=Yu(u.stackedOnCurrent,i,o),d=Yu(u.next,i,o),f=Yu(u.stackedOnNext,i,o)),r.shape.__points=u.current,r.shape.points=h,Io(r,{shape:{points:d}},l),s&&(s.setShape({points:h,stackedOnPoints:c}),Io(s,{shape:{points:d,stackedOnPoints:f}},l));for(var p=[],g=u.status,m=0;me&&(e=t[i]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,i=0;ie[1]&&e.reverse(),e},getOtherAxis:function(){this.grid.getOtherAxis()},pointToData:function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},toLocalCoord:null,toGlobalCoord:null},u(kD,aD);var PD={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)"]}}},ND={};ND.categoryAxis=n({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},PD),ND.valueAxis=n({boundaryGap:[0,0],splitNumber:5},PD),ND.timeAxis=r({scale:!0,min:"dataMin",max:"dataMax"},ND.valueAxis),ND.logAxis=r({scale:!0,logBase:10},ND.valueAxis);var OD=["value","category","time","log"],ED=function(t,e,i,a){d(OD,function(r){e.extend({type:t+"Axis."+r,mergeDefaultAndTheme:function(e,o){var a=this.layoutMode,s=a?ga(e):{};n(e,o.getTheme().get(r+"Axis")),n(e,this.getDefaultOption()),e.type=i(t,e),a&&pa(e,s,a)},optionUpdated:function(){"category"===this.option.type&&(this.__ordinalMeta=_l.createByAxisModel(this))},getCategories:function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:o([{},ND[r+"Axis"],a],!0)})}),lI.registerSubTypeDefaulter(t+"Axis",v(i,t))},RD=lI.extend({type:"cartesian2dAxis",axis:null,init:function(){RD.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){RD.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){RD.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});n(RD.prototype,UA);var zD={offset:0};ED("x",RD,th,zD),ED("y",RD,th,zD),lI.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 BD=ih.prototype;BD.type="grid",BD.axisPointerEnabled=!0,BD.getRect=function(){return this._rect},BD.update=function(t,e){var i=this._axesMap;this._updateScale(t,this.model),d(i.x,function(t){Wl(t.scale,t.model)}),d(i.y,function(t){Wl(t.scale,t.model)});var n={};d(i.x,function(t){nh(i,"y",t,n)}),d(i.y,function(t){nh(i,"x",t,n)}),this.resize(this.model,e)},BD.resize=function(t,e,i){function n(){d(a,function(t){var e=t.isHorizontal(),i=e?[0,o.width]:[0,o.height],n=t.inverse?1:0;t.setExtent(i[n],i[1-n]),ah(t,e?o.x:o.y)})}var o=ca(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=o;var a=this._axesList;n(),!i&&t.get("containLabel")&&(d(a,function(t){if(!t.model.get("axisLabel.inside")){var e=jl(t);if(e){var i=t.isHorizontal()?"height":"width",n=t.model.get("axisLabel.margin");o[i]-=e[i]+n,"top"===t.position?o.y+=e.height+n:"left"===t.position&&(o.x+=e.width+n)}}}),n())},BD.getAxis=function(t,e){var i=this._axesMap[t];if(null!=i){if(null==e)for(var n in i)if(i.hasOwnProperty(n))return i[n];return i[e]}},BD.getAxes=function(){return this._axesList.slice()},BD.getCartesian=function(t,e){if(null!=t&&null!=e){var i="x"+t+"y"+e;return this._coordsMap[i]}w(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var n=0,o=this._coordsList;nu[1]?-1:1,c=["start"===o?u[0]-h*l:"end"===o?u[1]+h*l:(u[0]+u[1])/2,ph(o)?t.labelOffset+r*l:0],d=e.get("nameRotate");null!=d&&(d=d*GD/180);var f;ph(o)?n=HD(t.rotation,null!=d?d:t.rotation,r):(n=uh(t,o,d||0,u),null!=(f=t.axisNameAvailableWidth)&&(f=Math.abs(f/Math.sin(n.rotation)),!isFinite(f)&&(f=null)));var p=s.getFont(),g=e.get("nameTruncate",!0)||{},m=g.ellipsis,v=T(t.nameTruncateMaxWidth,g.maxWidth,f),y=null!=m&&null!=v?tI(i,v,p,m,{minChar:2,placeholder:g.placeholder}):i,x=e.get("tooltip",!0),_=e.mainType,w={componentType:_,name:i,$vars:["name"]};w[_+"Index"]=e.componentIndex;var b=new rM({anid:"name",__fullText:i,__truncatedText:y,position:c,rotation:n.rotation,silent:hh(e),z2:1,tooltip:x&&x.show?a({content:i,formatter:function(){return i},formatterParams:w},x):null});mo(b.style,s,{text:y,textFont:p,textFill:s.getTextColor()||e.get("axisLine.lineStyle.color"),textAlign:n.textAlign,textVerticalAlign:n.textVerticalAlign}),e.get("triggerEvent")&&(b.eventData=lh(e),b.eventData.targetType="axisName",b.eventData.name=i),this._dumbGroup.add(b),b.updateTransform(),this.group.add(b),b.decomposeTransform()}}},HD=FD.innerTextLayout=function(t,e,i){var n,o,a=Xo(e-t);return jo(a)?(o=i>0?"top":"bottom",n="center"):jo(a-GD)?(o=i>0?"bottom":"top",n="center"):(o="middle",n=a>0&&a0?"right":"left":i>0?"left":"right"),{rotation:a,textAlign:n,textVerticalAlign:o}},ZD=d,UD=v,XD=Ws({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(t,e,i,n){this.axisPointerClass&&Sh(t),XD.superApply(this,"render",arguments),Dh(this,t,0,i,0,!0)},updateAxisPointer:function(t,e,i,n,o){Dh(this,t,0,i,0,!1)},remove:function(t,e){var i=this._axisPointer;i&&i.remove(e),XD.superApply(this,"remove",arguments)},dispose:function(t,e){Ch(this,e),XD.superApply(this,"dispose",arguments)}}),jD=[];XD.registerAxisPointerClass=function(t,e){jD[t]=e},XD.getAxisPointerClass=function(t){return t&&jD[t]};var YD=["axisLine","axisTickLabel","axisName"],qD=["splitArea","splitLine"],KD=XD.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(t,e,i,n){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new tb,this.group.add(this._axisGroup),t.get("show")){var a=t.getCoordSysModel(),r=Lh(a,t),s=new FD(t,r);d(YD,s.add,s),this._axisGroup.add(s.getGroup()),d(qD,function(e){t.get(e+".show")&&this["_"+e](t,a)},this),Lo(o,this._axisGroup,t),KD.superCall(this,"render",t,e,i,n)}},remove:function(){this._splitAreaColors=null},_splitLine:function(t,e){var i=t.axis;if(!i.scale.isBlank()){var n=t.getModel("splitLine"),o=n.getModel("lineStyle"),a=o.get("color");a=y(a)?a:[a];for(var s=e.coordinateSystem.getRect(),l=i.isHorizontal(),u=0,h=i.getTicksCoords({tickModel:n}),c=[],d=[],f=o.getLineStyle(),p=0;p1){var c;"string"==typeof o?c=DD[o]:"function"==typeof o&&(c=o),c&&t.setData(n.downSample(n.mapDimension(s.dim),1/h,c,CD))}}}}}("line"));var $D=YI.extend({type:"series.__base_bar__",getInitialData:function(t,e){return ml(this.getSource(),this)},getMarkerPosition:function(t){var e=this.coordinateSystem;if(e){var i=e.dataToPoint(e.clampData(t)),n=this.getData(),o=n.getLayout("offset"),a=n.getLayout("size");return i[e.getBaseAxis().isHorizontal()?0:1]+=o+a/2,i}return[NaN,NaN]},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",itemStyle:{},emphasis:{}}});$D.extend({type:"series.bar",dependencies:["grid","polar"],brushSelector:"rect",getProgressive:function(){return!!this.get("large")&&this.get("progressive")},getProgressiveThreshold:function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return e>t&&(t=e),t}});var JD=Qb([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),QD={getBarItemStyle:function(t){var e=JD(this,t);if(this.getBorderLineDash){var i=this.getBorderLineDash();i&&(e.lineDash=i)}return e}},tC=["itemStyle","barBorderWidth"];a(No.prototype,QD),Zs({type:"bar",render:function(t,e,i){this._updateDrawMode(t);var n=t.get("coordinateSystem");return"cartesian2d"!==n&&"polar"!==n||(this._isLargeDraw?this._renderLarge(t,e,i):this._renderNormal(t,e,i)),this.group},incrementalPrepareRender:function(t,e,i){this._clear(),this._updateDrawMode(t)},incrementalRender:function(t,e,i,n){this._incrementalRenderLarge(t,e)},_updateDrawMode:function(t){var e=t.pipelineContext.large;(null==this._isLargeDraw||e^this._isLargeDraw)&&(this._isLargeDraw=e,this._clear())},_renderNormal:function(t,e,i){var n,o=this.group,a=t.getData(),r=this._data,s=t.coordinateSystem,l=s.getBaseAxis();"cartesian2d"===s.type?n=l.isHorizontal():"polar"===s.type&&(n="angle"===l.dim);var u=t.isAnimationEnabled()?t:null;a.diff(r).add(function(e){if(a.hasValue(e)){var i=a.getItemModel(e),r=iC[s.type](a,e,i),l=eC[s.type](a,e,i,r,n,u);a.setItemGraphicEl(e,l),o.add(l),Eh(l,a,e,i,r,t,n,"polar"===s.type)}}).update(function(e,i){var l=r.getItemGraphicEl(i);if(a.hasValue(e)){var h=a.getItemModel(e),c=iC[s.type](a,e,h);l?Io(l,{shape:c},u,e):l=eC[s.type](a,e,h,c,n,u,!0),a.setItemGraphicEl(e,l),o.add(l),Eh(l,a,e,h,c,t,n,"polar"===s.type)}else o.remove(l)}).remove(function(t){var e=r.getItemGraphicEl(t);"cartesian2d"===s.type?e&&Nh(t,u,e):e&&Oh(t,u,e)}).execute(),this._data=a},_renderLarge:function(t,e,i){this._clear(),zh(t,this.group)},_incrementalRenderLarge:function(t,e){zh(e,this.group,!0)},dispose:B,remove:function(t){this._clear(t)},_clear:function(t){var e=this.group,i=this._data;t&&t.get("animation")&&i&&!this._isLargeDraw?i.eachItemGraphicEl(function(e){"sector"===e.type?Oh(e.dataIndex,t,e):Nh(e.dataIndex,t,e)}):e.removeAll(),this._data=null}});var eC={cartesian2d:function(t,e,i,n,o,r,s){var l=new yM({shape:a({},n)});if(r){var u=l.shape,h=o?"height":"width",c={};u[h]=0,c[h]=n[h],zM[s?"updateProps":"initProps"](l,{shape:c},r,e)}return l},polar:function(t,e,i,n,o,a,s){var l=n.startAngle0?1:-1,r=n.height>0?1:-1;return{x:n.x+a*o/2,y:n.y+r*o/2,width:n.width-a*o,height:n.height-r*o}},polar:function(t,e,i){var n=t.getItemLayout(e);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle}}},nC=Pn.extend({type:"largeBar",shape:{points:[]},buildPath:function(t,e){for(var i=e.points,n=this.__startPoint,o=this.__valueIdx,a=0;a0&&"scale"!==u){var d=o.getItemLayout(0),f=Math.max(i.getWidth(),i.getHeight())/2,p=m(r.removeClipPath,r);r.setClipPath(this._createClipPath(d.cx,d.cy,f,d.startAngle,d.clockwise,p,t))}else r.removeClipPath();this._data=o}},dispose:function(){},_createClipPath:function(t,e,i,n,o,a,r){var s=new hM({shape:{cx:t,cy:e,r0:0,r:i,startAngle:n,endAngle:n,clockwise:o}});return To(s,{shape:{endAngle:n+(o?1:-1)*Math.PI*2}},r,a),s},containPoint:function(t,e){var i=e.getData().getItemLayout(0);if(i){var n=t[0]-i.cx,o=t[1]-i.cy,a=Math.sqrt(n*n+o*o);return a<=i.r&&a>=i.r0}}});var lC=function(t,e){d(e,function(e){e.update="updateView",Es(e,function(i,n){var o={};return n.eachComponent({mainType:"series",subType:t,query:i},function(t){t[e.method]&&t[e.method](i.name,i.dataIndex);var n=t.getData();n.each(function(e){var i=n.getName(e);o[i]=t.isSelected(i)||!1})}),{name:i.name,selected:o}})})},uC=function(t){return{getTargetSeries:function(e){var i={},n=R();return e.eachSeriesByType(t,function(t){t.__paletteScope=i,n.set(t.uid,t)}),n},reset:function(t,e){var i=t.getRawData(),n={},o=t.getData();o.each(function(t){var e=o.getRawIndex(t);n[e]=t}),i.each(function(e){var a=n[e],r=null!=a&&o.getItemVisual(a,"color",!0);if(r)i.setItemVisual(e,"color",r);else{var s=i.getItemModel(e).get("itemStyle.color")||t.getColorFromPalette(i.getName(e)||e+"",t.__paletteScope,i.count());i.setItemVisual(e,"color",s),null!=a&&o.setItemVisual(a,"color",s)}})}}},hC=function(t,e,i,n){var o,a,r=t.getData(),s=[],l=!1;r.each(function(i){var n,u,h,c,d=r.getItemLayout(i),f=r.getItemModel(i),p=f.getModel("label"),g=p.get("position")||f.get("emphasis.label.position"),m=f.getModel("labelLine"),v=m.get("length"),y=m.get("length2"),x=(d.startAngle+d.endAngle)/2,_=Math.cos(x),w=Math.sin(x);o=d.cx,a=d.cy;var b="inside"===g||"inner"===g;if("center"===g)n=d.cx,u=d.cy,c="center";else{var S=(b?(d.r+d.r0)/2*_:d.r*_)+o,M=(b?(d.r+d.r0)/2*w:d.r*w)+a;if(n=S+3*_,u=M+3*w,!b){var I=S+_*(v+e-d.r),T=M+w*(v+e-d.r),A=I+(_<0?-1:1)*y,D=T;n=A+(_<0?-5:5),u=D,h=[[S,M],[I,T],[A,D]]}c=b?"center":_>0?"left":"right"}var C=p.getFont(),L=p.get("rotate")?_<0?-x+Math.PI:-x:0,k=ke(t.getFormattedLabel(i,"normal")||r.getName(i),C,c,"top");l=!!L,d.label={x:n,y:u,position:g,height:k.height,len:v,len2:y,linePoints:h,textAlign:c,verticalAlign:"middle",rotation:L,inside:b},b||s.push(d.label)}),!l&&t.get("avoidLabelOverlap")&&Hh(s,o,a,e,i,n)},cC=2*Math.PI,dC=Math.PI/180,fC=function(t){return{seriesType:t,reset:function(t,e){var i=e.findComponents({mainType:"legend"});if(i&&i.length){var n=t.getData();n.filterSelf(function(t){for(var e=n.getName(t),o=0;o=0;s--){var l=2*s,u=n[l]-a/2,h=n[l+1]-r/2;if(t>=u&&e>=h&&t<=u+a&&e<=h+r)return s}return-1}}),gC=Uh.prototype;gC.isPersistent=function(){return!this._incremental},gC.updateData=function(t){this.group.removeAll();var e=new pC({rectHover:!0,cursor:"default"});e.setShape({points:t.getLayout("symbolPoints")}),this._setCommon(e,t),this.group.add(e),this._incremental=null},gC.updateLayout=function(t){if(!this._incremental){var e=t.getLayout("symbolPoints");this.group.eachChild(function(t){if(null!=t.startIndex){var i=2*(t.endIndex-t.startIndex),n=4*t.startIndex*2;e=new Float32Array(e.buffer,n,i)}t.setShape("points",e)})}},gC.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>2e6?(this._incremental||(this._incremental=new Zn({silent:!0})),this.group.add(this._incremental)):this._incremental=null},gC.incrementalUpdate=function(t,e){var i;this._incremental?(i=new pC,this._incremental.addDisplayable(i,!0)):((i=new pC({rectHover:!0,cursor:"default",startIndex:t.start,endIndex:t.end})).incremental=!0,this.group.add(i)),i.setShape({points:e.getLayout("symbolPoints")}),this._setCommon(i,e,!!this._incremental)},gC._setCommon=function(t,e,i){var n=e.hostModel,o=e.getVisual("symbolSize");t.setShape("size",o instanceof Array?o:[o,o]),t.symbolProxy=Jl(e.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var a=t.shape.size[0]<4;t.useStyle(n.getModel("itemStyle").getItemStyle(a?["color","shadowBlur","shadowColor"]:["color"]));var r=e.getVisual("color");r&&t.setColor(r),i||(t.seriesIndex=n.seriesIndex,t.on("mousemove",function(e){t.dataIndex=null;var i=t.findDataIndex(e.offsetX,e.offsetY);i>=0&&(t.dataIndex=i+(t.startIndex||0))}))},gC.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},gC._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()},Zs({type:"scatter",render:function(t,e,i){var n=t.getData();this._updateSymbolDraw(n,t).updateData(n),this._finished=!0},incrementalPrepareRender:function(t,e,i){var n=t.getData();this._updateSymbolDraw(n,t).incrementalPrepareUpdate(n),this._finished=!1},incrementalRender:function(t,e,i){this._symbolDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},updateTransform:function(t,e,i){var n=t.getData();if(this.group.dirty(),!this._finished||n.count()>1e4||!this._symbolDraw.isPersistent())return{update:!0};var o=AD().reset(t);o.progress&&o.progress({start:0,end:n.count()},n),this._symbolDraw.updateLayout(n)},_updateSymbolDraw:function(t,e){var i=this._symbolDraw,n=e.pipelineContext.large;return i&&n===this._isLargeDraw||(i&&i.remove(),i=this._symbolDraw=n?new Uh:new Du,this._isLargeDraw=n,this.group.removeAll()),this.group.add(i.group),i},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},dispose:function(){}}),Bs(TD("scatter","circle")),zs(AD("scatter")),u(Xh,aD),jh.prototype.getIndicatorAxes=function(){return this._indicatorAxes},jh.prototype.dataToPoint=function(t,e){var i=this._indicatorAxes[e];return this.coordToPoint(i.dataToCoord(t),e)},jh.prototype.coordToPoint=function(t,e){var i=this._indicatorAxes[e].angle;return[this.cx+t*Math.cos(i),this.cy-t*Math.sin(i)]},jh.prototype.pointToData=function(t){var e=t[0]-this.cx,i=t[1]-this.cy,n=Math.sqrt(e*e+i*i);e/=n,i/=n;for(var o,a=Math.atan2(-i,e),r=1/0,s=-1,l=0;ln[0]&&isFinite(c)&&isFinite(n[0]))}else{r.getTicks().length-1>a&&(u=i(u));var d=Math.round((n[0]+n[1])/2/u)*u,f=Math.round(a/2);r.setExtent(Go(d-f*u),Go(d+(a-f)*u)),r.setInterval(u)}})},jh.dimensions=[],jh.create=function(t,e){var i=[];return t.eachComponent("radar",function(n){var o=new jh(n,t,e);i.push(o),n.coordinateSystem=o}),t.eachSeriesByType("radar",function(t){"radar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("radarIndex")||0])}),i},Fa.register("radar",jh);var mC=ND.valueAxis,vC=(Fs({type:"radar",optionUpdated:function(){var t=this.get("boundaryGap"),e=this.get("splitNumber"),o=this.get("scale"),s=this.get("axisLine"),l=this.get("axisTick"),u=this.get("axisLabel"),h=this.get("name"),c=this.get("name.show"),d=this.get("name.formatter"),p=this.get("nameGap"),g=this.get("triggerEvent"),m=f(this.get("indicator")||[],function(f){null!=f.max&&f.max>0&&!f.min?f.min=0:null!=f.min&&f.min<0&&!f.max&&(f.max=0);var m=h;if(null!=f.color&&(m=r({color:f.color},h)),f=n(i(f),{boundaryGap:t,splitNumber:e,scale:o,axisLine:s,axisTick:l,axisLabel:u,name:f.text,nameLocation:"end",nameGap:p,nameTextStyle:m,triggerEvent:g},!1),c||(f.name=""),"string"==typeof d){var v=f.name;f.name=d.replace("{value}",null!=v?v:"")}else"function"==typeof d&&(f.name=d(f.name,f));var y=a(new No(f,null,this.ecModel),UA);return y.mainType="radar",y.componentIndex=this.componentIndex,y},this);this.getIndicatorModels=function(){return m}},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"75%",startAngle:90,name:{show:!0},boundaryGap:[0,0],splitNumber:5,nameGap:15,scale:!1,shape:"polygon",axisLine:n({lineStyle:{color:"#bbb"}},mC.axisLine),axisLabel:Yh(mC.axisLabel,!1),axisTick:Yh(mC.axisTick,!1),splitLine:Yh(mC.splitLine,!0),splitArea:Yh(mC.splitArea,!0),indicator:[]}}),["axisLine","axisTickLabel","axisName"]);Ws({type:"radar",render:function(t,e,i){this.group.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},_buildAxes:function(t){var e=t.coordinateSystem;d(f(e.getIndicatorAxes(),function(t){return new FD(t.model,{position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}),function(t){d(vC,t.add,t),this.group.add(t.getGroup())},this)},_buildSplitLineAndArea:function(t){function e(t,e,i){var n=i%e.length;return t[n]=t[n]||[],n}var i=t.coordinateSystem,n=i.getIndicatorAxes();if(n.length){var o=t.get("shape"),a=t.getModel("splitLine"),s=t.getModel("splitArea"),l=a.getModel("lineStyle"),u=s.getModel("areaStyle"),h=a.get("show"),c=s.get("show"),p=l.get("color"),g=u.get("color");p=y(p)?p:[p],g=y(g)?g:[g];var m=[],v=[];if("circle"===o)for(var x=n[0].getTicksCoords(),_=i.cx,w=i.cy,b=0;b"+f(i,function(i,n){var o=e.get(e.mapDimension(i.dim),t);return ia(i.name+" : "+o)}).join("
            ")},defaultOption:{zlevel:0,z:2,coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid"},label:{position:"top"},symbol:"emptyCircle",symbolSize:4}});Zs({type:"radar",render:function(t,e,n){function o(t,e){var i=t.getItemVisual(e,"symbol")||"circle",n=t.getItemVisual(e,"color");if("none"!==i){var o=qh(t.getItemVisual(e,"symbolSize")),a=Jl(i,-1,-1,2,2,n);return a.attr({style:{strokeNoScale:!0},z2:100,scale:[o[0]/2,o[1]/2]}),a}}function a(e,i,n,a,r,s){n.removeAll();for(var l=0;l"+ia(n+" : "+i)},getTooltipPosition:function(t){if(null!=t){var e=this.getData().getName(t),i=this.coordinateSystem,n=i.getRegion(e);return n&&i.dataToPoint(n.center)}},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},defaultOption:{zlevel:0,z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:.75,showLegendSymbol:!0,dataRangeHoverLink:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}}}}),aC);var EC="\0_ec_interaction_mutex";Es({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},function(){}),h(oc,fw);var RC={axisPointer:1,tooltip:1,brush:1};xc.prototype={constructor:xc,draw:function(t,e,i,n,o){var a="geo"===t.mainType,r=t.getData&&t.getData();a&&e.eachComponent({mainType:"series",subType:"map"},function(e){r||e.getHostGeoModel()!==t||(r=e.getData())});var s=t.coordinateSystem;this._updateBackground(s);var l=this._regionsGroup,u=this.group,h=s.scale,c={position:s.position,scale:h};!l.childAt(0)||o?u.attr(c):Io(u,c,t),l.removeAll();var f=["itemStyle"],p=["emphasis","itemStyle"],g=["label"],m=["emphasis","label"],v=R();d(s.regions,function(e){var i=v.get(e.name)||v.set(e.name,new tb),n=new MM({shape:{paths:[]}});i.add(n);var o,s=(C=t.getRegionModel(e.name)||t).getModel(f),u=C.getModel(p),c=mc(s),y=mc(u),x=C.getModel(g),_=C.getModel(m);if(r){o=r.indexOfName(e.name);var w=r.getItemVisual(o,"color",!0);w&&(c.fill=w)}d(e.geometries,function(t){if("polygon"===t.type){n.shape.paths.push(new pM({shape:{points:t.exterior}}));for(var e=0;e<(t.interiors?t.interiors.length:0);e++)n.shape.paths.push(new pM({shape:{points:t.interiors[e]}}))}}),n.setStyle(c),n.style.strokeNoScale=!0,n.culling=!0;var b=x.get("show"),S=_.get("show"),M=r&&isNaN(r.get(r.mapDimension("value"),o)),I=r&&r.getItemLayout(o);if(a||M&&(b||S)||I&&I.showLabel){var T,A=a?e.name:o;(!r||o>=0)&&(T=t);var D=new rM({position:e.center.slice(),scale:[1/h[0],1/h[1]],z2:10,silent:!0});go(D.style,D.hoverStyle={},x,_,{labelFetcher:T,labelDataIndex:A,defaultText:e.name,useInsideStyle:!1},{textAlign:"center",textVerticalAlign:"middle"}),i.add(D)}if(r)r.setItemGraphicEl(o,i);else{var C=t.getRegionModel(e.name);n.eventData={componentType:"geo",componentIndex:t.componentIndex,geoIndex:t.componentIndex,name:e.name,region:C&&C.option||{}}}(i.__regions||(i.__regions=[])).push(e),fo(i,y,{hoverSilentOnTouch:!!t.get("selectedMode")}),l.add(i)}),this._updateController(t,e,i),vc(this,t,l,i,n),yc(t,l)},remove:function(){this._regionsGroup.removeAll(),this._backgroundGroup.removeAll(),this._controller.dispose(),this._mapName&&OC.removeGraphic(this._mapName,this.uid),this._mapName=null,this._controllerHost={}},_updateBackground:function(t){var e=t.map;this._mapName!==e&&d(OC.makeGraphic(e,this.uid),function(t){this._backgroundGroup.add(t)},this),this._mapName=e},_updateController:function(t,e,i){function n(){var e={type:"geoRoam",componentType:l};return e[l+"Id"]=t.id,e}var o=t.coordinateSystem,r=this._controller,s=this._controllerHost;s.zoomLimit=t.get("scaleLimit"),s.zoom=o.getZoom(),r.enable(t.get("roam")||!1);var l=t.mainType;r.off("pan").on("pan",function(t){this._mouseDownFlag=!1,fc(s,t.dx,t.dy),i.dispatchAction(a(n(),{dx:t.dx,dy:t.dy}))},this),r.off("zoom").on("zoom",function(t){if(this._mouseDownFlag=!1,pc(s,t.scale,t.originX,t.originY),i.dispatchAction(a(n(),{zoom:t.scale,originX:t.originX,originY:t.originY})),this._updateGroup){var e=this.group.scale;this._regionsGroup.traverse(function(t){"text"===t.type&&t.attr("scale",[1/e[0],1/e[1]])})}},this),r.setPointerChecker(function(e,n,a){return o.getViewRectAfterRoam().contain(n,a)&&!gc(e,i,t)})}};var zC="__seriesMapHighDown",BC="__seriesMapCallKey";Zs({type:"map",render:function(t,e,i,n){if(!n||"mapToggleSelect"!==n.type||n.from!==this.uid){var o=this.group;if(o.removeAll(),!t.getHostGeoModel()){if(n&&"geoRoam"===n.type&&"series"===n.componentType&&n.seriesId===t.id)(a=this._mapDraw)&&o.add(a.group);else if(t.needsDrawMap){var a=this._mapDraw||new xc(i,!0);o.add(a.group),a.draw(t,e,i,this,n),this._mapDraw=a}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;t.get("showLegendSymbol")&&e.getComponent("legend")&&this._renderSymbols(t,e,i)}}},remove:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},dispose:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},_renderSymbols:function(t,e,i){var n=t.originalData,o=this.group;n.each(n.mapDimension("value"),function(e,i){if(!isNaN(e)){var r=n.getItemLayout(i);if(r&&r.point){var s=r.point,l=r.offset,u=new sM({style:{fill:t.getData().getVisual("color")},shape:{cx:s[0]+9*l,cy:s[1],r:3},silent:!0,z2:8+(l?0:NM+1)});if(!l){var h=t.mainSeries.getData(),c=n.getName(i),d=h.indexOfName(c),f=n.getItemModel(i),p=f.getModel("label"),g=f.getModel("emphasis.label"),m=h.getItemGraphicEl(d),y=A(t.getFormattedLabel(d,"normal"),c),x=A(t.getFormattedLabel(d,"emphasis"),y),_=m[zC],w=Math.random();if(!_){_=m[zC]={};var b=v(_c,!0),S=v(_c,!1);m.on("mouseover",b).on("mouseout",S).on("emphasis",b).on("normal",S)}m[BC]=w,a(_,{recordVersion:w,circle:u,labelModel:p,hoverLabelModel:g,emphasisText:x,normalText:y}),wc(_,!1)}o.add(u)}}})}}),Es({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(t,e){var i=t.componentType||"series";e.eachComponent({mainType:i,query:t},function(e){var n=e.coordinateSystem;if("geo"===n.type){var o=bc(n,t,e.get("scaleLimit"));e.setCenter&&e.setCenter(o.center),e.setZoom&&e.setZoom(o.zoom),"series"===i&&d(e.seriesGroup,function(t){t.setCenter(o.center),t.setZoom(o.zoom)})}})});var VC=Q;h(Sc,Tw),Mc.prototype={constructor:Mc,type:"view",dimensions:["x","y"],setBoundingRect:function(t,e,i,n){return this._rect=new de(t,e,i,n),this._rect},getBoundingRect:function(){return this._rect},setViewRect:function(t,e,i,n){this.transformTo(t,e,i,n),this._viewRect=new de(t,e,i,n)},transformTo:function(t,e,i,n){var o=this.getBoundingRect(),a=this._rawTransformable;a.transform=o.calculateTransform(new de(t,e,i,n)),a.decomposeTransform(),this._updateTransform()},setCenter:function(t){t&&(this._center=t,this._updateCenterAndZoom())},setZoom:function(t){t=t||1;var e=this.zoomLimit;e&&(null!=e.max&&(t=Math.min(e.max,t)),null!=e.min&&(t=Math.max(e.min,t))),this._zoom=t,this._updateCenterAndZoom()},getDefaultCenter:function(){var t=this.getBoundingRect();return[t.x+t.width/2,t.y+t.height/2]},getCenter:function(){return this._center||this.getDefaultCenter()},getZoom:function(){return this._zoom||1},getRoamTransform:function(){return this._roamTransformable.getLocalTransform()},_updateCenterAndZoom:function(){var t=this._rawTransformable.getLocalTransform(),e=this._roamTransformable,i=this.getDefaultCenter(),n=this.getCenter(),o=this.getZoom();n=Q([],n,t),i=Q([],i,t),e.origin=n,e.position=[i[0]-n[0],i[1]-n[1]],e.scale=[o,o],this._updateTransform()},_updateTransform:function(){var t=this._roamTransformable,e=this._rawTransformable;e.parent=t,t.updateTransform(),e.updateTransform(),wt(this.transform||(this.transform=[]),e.transform||xt()),this._rawTransform=e.getLocalTransform(),this.invTransform=this.invTransform||[],Tt(this.invTransform,this.transform),this.decomposeTransform()},getViewRect:function(){return this._viewRect},getViewRectAfterRoam:function(){var t=this.getBoundingRect().clone();return t.applyTransform(this.transform),t},dataToPoint:function(t,e,i){var n=e?this._rawTransform:this.transform;return i=i||[],n?VC(i,t,n):G(i,t)},pointToData:function(t){var e=this.invTransform;return e?VC([],t,e):[t[0],t[1]]},convertToPixel:v(Ic,"dataToPoint"),convertFromPixel:v(Ic,"pointToData"),containPoint:function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])}},h(Mc,Tw),Tc.prototype={constructor:Tc,type:"geo",dimensions:["lng","lat"],containCoord:function(t){for(var e=this.regions,i=0;ie&&(e=n.height)}this.height=e+1},getNodeById:function(t){if(this.getId()===t)return this;for(var e=0,i=this.children,n=i.length;e=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},getLayout:function(){return this.hostTree.data.getItemLayout(this.dataIndex)},getModel:function(t){if(!(this.dataIndex<0)){var e,i=this.hostTree,n=i.data.getItemModel(this.dataIndex),o=this.getLevelModel();return o||0!==this.children.length&&(0===this.children.length||!1!==this.isExpand)||(e=this.getLeavesModel()),n.getModel(t,(o||e||i.hostModel).getModel(t))}},getLevelModel:function(){return(this.hostTree.levelModels||[])[this.depth]},getLeavesModel:function(){return this.hostTree.leavesModel},setVisual:function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},getVisual:function(t,e){return this.hostTree.data.getItemVisual(this.dataIndex,t,e)},getRawIndex:function(){return this.hostTree.data.getRawIndex(this.dataIndex)},getId:function(){return this.hostTree.data.getId(this.dataIndex)},isAncestorOf:function(t){for(var e=t.parentNode;e;){if(e===this)return!0;e=e.parentNode}return!1},isDescendantOf:function(t){return t!==this&&t.isAncestorOf(this)}},Vc.prototype={constructor:Vc,type:"tree",eachNode:function(t,e,i){this.root.eachNode(t,e,i)},getNodeByDataIndex:function(t){var e=this.data.getRawIndex(t);return this._nodes[e]},getNodeByName:function(t){return this.root.getNodeByName(t)},update:function(){for(var t=this.data,e=this._nodes,i=0,n=e.length;ia&&(a=t.depth)});var r=t.expandAndCollapse&&t.initialTreeDepth>=0?t.initialTreeDepth:a;return o.root.eachNode("preorder",function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=r}),o.data},getOrient:function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(t="TB"),t},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},formatTooltip:function(t){for(var e=this.getData().tree,i=e.root.children[0],n=e.getNodeByDataIndex(t),o=n.getValue(),a=n.name;n&&n!==i;)a=n.parentNode.name+"."+a,n=n.parentNode;return ia(a+(isNaN(o)||null==o?"":" : "+o))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderColor:"#c23531",borderWidth:1.5},label:{show:!0,color:"#555"},leaves:{label:{show:!0}},animationEasing:"linear",animationDuration:700,animationDurationUpdate:1e3}}),Zs({type:"tree",init:function(t,e){this._oldTree,this._mainGroup=new tb,this._controller=new oc(e.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},render:function(t,e,i,n){var o=t.getData(),a=t.layoutInfo,r=this._mainGroup,s=t.get("layout");"radial"===s?r.attr("position",[a.x+a.width/2,a.y+a.height/2]):r.attr("position",[a.x,a.y]),this._updateViewCoordSys(t),this._updateController(t,e,i);var l=this._data,u={expandAndCollapse:t.get("expandAndCollapse"),layout:s,orient:t.getOrient(),curvature:t.get("lineStyle.curveness"),symbolRotate:t.get("symbolRotate"),symbolOffset:t.get("symbolOffset"),hoverAnimation:t.get("hoverAnimation"),useNameLabel:!0,fadeIn:!0};o.diff(l).add(function(e){td(o,e)&&id(o,e,null,r,t,u)}).update(function(e,i){var n=l.getItemGraphicEl(i);td(o,e)?id(o,e,n,r,t,u):n&&nd(l,i,n,r,t,u)}).remove(function(e){var i=l.getItemGraphicEl(e);i&&nd(l,e,i,r,t,u)}).execute(),this._nodeScaleRatio=t.get("nodeScaleRatio"),this._updateNodeAndLinkScale(t),!0===u.expandAndCollapse&&o.eachItemGraphicEl(function(e,n){e.off("click").on("click",function(){i.dispatchAction({type:"treeExpandAndCollapse",seriesId:t.id,dataIndex:n})})}),this._data=o},_updateViewCoordSys:function(t){var e=t.getData(),i=[];e.each(function(t){var n=e.getItemLayout(t);!n||isNaN(n.x)||isNaN(n.y)||i.push([+n.x,+n.y])});var n=[],o=[];fn(i,n,o),o[0]-n[0]==0&&(o[0]+=1,n[0]-=1),o[1]-n[1]==0&&(o[1]+=1,n[1]-=1);var a=t.coordinateSystem=new Mc;a.zoomLimit=t.get("scaleLimit"),a.setBoundingRect(n[0],n[1],o[0]-n[0],o[1]-n[1]),a.setCenter(t.get("center")),a.setZoom(t.get("zoom")),this.group.attr({position:a.position,scale:a.scale}),this._viewCoordSys=a},_updateController:function(t,e,i){var n=this._controller,o=this._controllerHost,a=this.group;n.setPointerChecker(function(e,n,o){var r=a.getBoundingRect();return r.applyTransform(a.transform),r.contain(n,o)&&!gc(e,i,t)}),n.enable(t.get("roam")),o.zoomLimit=t.get("scaleLimit"),o.zoom=t.coordinateSystem.getZoom(),n.off("pan").off("zoom").on("pan",function(e){fc(o,e.dx,e.dy),i.dispatchAction({seriesId:t.id,type:"treeRoam",dx:e.dx,dy:e.dy})},this).on("zoom",function(e){pc(o,e.scale,e.originX,e.originY),i.dispatchAction({seriesId:t.id,type:"treeRoam",zoom:e.scale,originX:e.originX,originY:e.originY}),this._updateNodeAndLinkScale(t)},this)},_updateNodeAndLinkScale:function(t){var e=t.getData(),i=this._getNodeGlobalScale(t),n=[i,i];e.eachItemGraphicEl(function(t,e){t.attr("scale",n)})},_getNodeGlobalScale:function(t){var e=t.coordinateSystem;if("view"!==e.type)return 1;var i=this._nodeScaleRatio,n=e.scale,o=n&&n[0]||1;return((e.getZoom()-1)*i+1)/o},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={}},remove:function(){this._mainGroup.removeAll(),this._data=null}}),Es({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"tree",query:t},function(e){var i=t.dataIndex,n=e.getData().tree.getNodeByDataIndex(i);n.isExpand=!n.isExpand})}),Es({type:"treeRoam",event:"treeRoam",update:"none"},function(t,e){e.eachComponent({mainType:"series",subType:"tree",query:t},function(e){var i=bc(e.coordinateSystem,t);e.setCenter&&e.setCenter(i.center),e.setZoom&&e.setZoom(i.zoom)})});Bs(TD("tree","circle")),zs(function(t,e){t.eachSeriesByType("tree",function(t){sd(t,e)})}),YI.extend({type:"series.treemap",layoutMode:"box",dependencies:["grid","polar"],_viewRoot:null,defaultOption:{progressive:0,hoverLayerThreshold:1/0,left:"center",top:"middle",right:null,bottom:null,width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.1024,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",borderColor:"rgba(255,255,255,0.7)",borderWidth:1,shadowColor:"rgba(150,150,150,1)",shadowBlur:3,shadowOffsetX:0,shadowOffsetY:0,textStyle:{color:"#fff"}},emphasis:{textStyle:{}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",ellipsis:!0},upperLabel:{show:!1,position:[0,"50%"],height:20,color:"#fff",ellipsis:!0,verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],color:"#fff",ellipsis:!0,verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},getInitialData:function(t,e){var i={name:t.name,children:t.data};dd(i);var n=t.levels||[];n=t.levels=fd(n,e);var o={};return o.levels=n,Vc.createTree(i,this,o).data},optionUpdated:function(){this.resetViewRoot()},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),n=ta(y(i)?i[0]:i);return ia(e.getName(t)+": "+n)},getDataParams:function(t){var e=YI.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=cd(i,this),e},setLayoutInfo:function(t){this.layoutInfo=this.layoutInfo||{},a(this.layoutInfo,t)},mapIdToIndex:function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=R(),this._idIndexMapCount=0);var i=e.get(t);return null==i&&e.set(t,i=this._idIndexMapCount++),i},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)}});var UC=5;pd.prototype={constructor:pd,render:function(t,e,i,n){var o=t.getModel("breadcrumb"),a=this.group;if(a.removeAll(),o.get("show")&&i){var r=o.getModel("itemStyle"),s=r.getModel("textStyle"),l={pos:{left:o.get("left"),right:o.get("right"),top:o.get("top"),bottom:o.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:o.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(i,l,s),this._renderContent(t,l,r,s,n),da(a,l.pos,l.box)}},_prepare:function(t,e,i){for(var n=t;n;n=n.parentNode){var o=n.getModel().get("name"),a=i.getTextRect(o),r=Math.max(a.width+16,e.emptyItemWidth);e.totalWidth+=r+8,e.renderList.push({node:n,text:o,width:r})}},_renderContent:function(t,e,i,n,o){for(var a=0,s=e.emptyItemWidth,l=t.get("breadcrumb.height"),u=ha(e.pos,e.box),h=e.totalWidth,c=e.renderList,d=c.length-1;d>=0;d--){var f=c[d],p=f.node,g=f.width,m=f.text;h>u.width&&(h-=g-s,g=s,m=null);var y=new pM({shape:{points:gd(a,0,g,l,d===c.length-1,0===d)},style:r(i.getItemStyle(),{lineJoin:"bevel",text:m,textFill:n.getTextColor(),textFont:n.getFont()}),z:10,onclick:v(o,p)});this.group.add(y),md(y,t,p),a+=g+8}},remove:function(){this.group.removeAll()}};var XC=m,jC=tb,YC=yM,qC=d,KC=["label"],$C=["emphasis","label"],JC=["upperLabel"],QC=["emphasis","upperLabel"],tL=10,eL=1,iL=2,nL=Qb([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),oL=function(t){var e=nL(t);return e.stroke=e.fill=e.lineWidth=null,e};Zs({type:"treemap",init:function(t,e){this._containerGroup,this._storage={nodeGroup:[],background:[],content:[]},this._oldTree,this._breadcrumb,this._controller,this._state="ready"},render:function(t,e,i,n){if(!(l(e.findComponents({mainType:"series",subType:"treemap",query:n}),t)<0)){this.seriesModel=t,this.api=i,this.ecModel=e;var o=ld(n,["treemapZoomToNode","treemapRootToNode"],t),a=n&&n.type,r=t.layoutInfo,s=!this._oldTree,u=this._storage,h="treemapRootToNode"===a&&o&&u?{rootNodeGroup:u.nodeGroup[o.node.getRawIndex()],direction:n.direction}:null,c=this._giveContainerGroup(r),d=this._doRender(c,t,h);s||a&&"treemapZoomToNode"!==a&&"treemapRootToNode"!==a?d.renderFinally():this._doAnimation(c,d,t,h),this._resetController(i),this._renderBreadcrumb(t,i,o)}},_giveContainerGroup:function(t){var e=this._containerGroup;return e||(e=this._containerGroup=new jC,this._initEvents(e),this.group.add(e)),e.attr("position",[t.x,t.y]),e},_doRender:function(t,e,i){function n(t,e,i,o,a){function r(t){return t.getId()}function s(r,s){var l=null!=r?t[r]:null,u=null!=s?e[s]:null,c=h(l,u,i,a);c&&n(l&&l.viewChildren||[],u&&u.viewChildren||[],c,o,a+1)}o?(e=t,qC(t,function(t,e){!t.isRemoved()&&s(e,e)})):new Xs(e,t,r,r).add(s).update(s).remove(v(s,null)).execute()}var o=e.getData().tree,a=this._oldTree,r={nodeGroup:[],background:[],content:[]},s={nodeGroup:[],background:[],content:[]},l=this._storage,u=[],h=v(yd,e,s,l,i,r,u);n(o.root?[o.root]:[],a&&a.root?[a.root]:[],t,o===a||!a,0);var c=function(t){var e={nodeGroup:[],background:[],content:[]};return t&&qC(t,function(t,i){var n=e[i];qC(t,function(t){t&&(n.push(t),t.__tmWillDelete=1)})}),e}(l);return this._oldTree=o,this._storage=s,{lastsForAnimation:r,willDeleteEls:c,renderFinally:function(){qC(c,function(t){qC(t,function(t){t.parent&&t.parent.remove(t)})}),qC(u,function(t){t.invisible=!0,t.dirty()})}}},_doAnimation:function(t,e,i,n){if(i.get("animation")){var o=i.get("animationDurationUpdate"),r=i.get("animationEasing"),s=vd();qC(e.willDeleteEls,function(t,e){qC(t,function(t,i){if(!t.invisible){var a,l=t.parent;if(n&&"drillDown"===n.direction)a=l===n.rootNodeGroup?{shape:{x:0,y:0,width:l.__tmNodeWidth,height:l.__tmNodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var u=0,h=0;l.__tmWillDelete||(u=l.__tmNodeWidth/2,h=l.__tmNodeHeight/2),a="nodeGroup"===e?{position:[u,h],style:{opacity:0}}:{shape:{x:u,y:h,width:0,height:0},style:{opacity:0}}}a&&s.add(t,a,o,r)}})}),qC(this._storage,function(t,i){qC(t,function(t,n){var l=e.lastsForAnimation[i][n],u={};l&&("nodeGroup"===i?l.old&&(u.position=t.position.slice(),t.attr("position",l.old)):(l.old&&(u.shape=a({},t.shape),t.setShape(l.old)),l.fadein?(t.setStyle("opacity",0),u.style={opacity:1}):1!==t.style.opacity&&(u.style={opacity:1})),s.add(t,u,o,r))})},this),this._state="animating",s.done(XC(function(){this._state="ready",e.renderFinally()},this)).start()}},_resetController:function(t){var e=this._controller;e||((e=this._controller=new oc(t.getZr())).enable(this.seriesModel.get("roam")),e.on("pan",XC(this._onPan,this)),e.on("zoom",XC(this._onZoom,this)));var i=new de(0,0,t.getWidth(),t.getHeight());e.setPointerChecker(function(t,e,n){return i.contain(e,n)})},_clearController:function(){var t=this._controller;t&&(t.dispose(),t=null)},_onPan:function(t){if("animating"!==this._state&&(Math.abs(t.dx)>3||Math.abs(t.dy)>3)){var e=this.seriesModel.getData().tree.root;if(!e)return;var i=e.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+t.dx,y:i.y+t.dy,width:i.width,height:i.height}})}},_onZoom:function(t){var e=t.originX,i=t.originY;if("animating"!==this._state){var n=this.seriesModel.getData().tree.root;if(!n)return;var o=n.getLayout();if(!o)return;var a=new de(o.x,o.y,o.width,o.height),r=this.seriesModel.layoutInfo;e-=r.x,i-=r.y;var s=xt();St(s,s,[-e,-i]),It(s,s,[t.scale,t.scale]),St(s,s,[e,i]),a.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:a.x,y:a.y,width:a.width,height:a.height}})}},_initEvents:function(t){t.on("click",function(t){if("ready"===this._state){var e=this.seriesModel.get("nodeClick",!0);if(e){var i=this.findTarget(t.offsetX,t.offsetY);if(i){var n=i.node;if(n.getLayout().isLeafRoot)this._rootToNode(i);else if("zoomToNode"===e)this._zoomToNode(i);else if("link"===e){var o=n.hostTree.data.getItemModel(n.dataIndex),a=o.get("link",!0),r=o.get("target",!0)||"blank";a&&window.open(a,r)}}}}},this)},_renderBreadcrumb:function(t,e,i){i||(i=null!=t.get("leafDepth",!0)?{node:t.getViewRoot()}:this.findTarget(e.getWidth()/2,e.getHeight()/2))||(i={node:t.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new pd(this.group))).render(t,e,i.node,XC(function(e){"animating"!==this._state&&(hd(t.getViewRoot(),e)?this._rootToNode({node:e}):this._zoomToNode({node:e}))},this))},remove:function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage={nodeGroup:[],background:[],content:[]},this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},dispose:function(){this._clearController()},_zoomToNode:function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},_rootToNode:function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},findTarget:function(t,e){var i;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},function(n){var o=this._storage.background[n.getRawIndex()];if(o){var a=o.transformCoordToLocal(t,e),r=o.shape;if(!(r.x<=a[0]&&a[0]<=r.x+r.width&&r.y<=a[1]&&a[1]<=r.y+r.height))return!1;i={node:n,offsetX:a[0],offsetY:a[1]}}},this),i}});for(var aL=["treemapZoomToNode","treemapRender","treemapMove"],rL=0;rL=0&&t.call(e,i[o],o)},TL.eachEdge=function(t,e){for(var i=this.edges,n=i.length,o=0;o=0&&i[o].node1.dataIndex>=0&&i[o].node2.dataIndex>=0&&t.call(e,i[o],o)},TL.breadthFirstTraverse=function(t,e,i,n){if(Jd.isInstance(e)||(e=this._nodesMap[$d(e)]),e){for(var o="out"===i?"outEdges":"in"===i?"inEdges":"edges",a=0;a=0&&i.node2.dataIndex>=0});for(var o=0,a=n.length;o=0&&this[t][e].setItemVisual(this.dataIndex,i,n)},getVisual:function(i,n){return this[t][e].getItemVisual(this.dataIndex,i,n)},setLayout:function(i,n){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,i,n)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}};h(Jd,AL("hostGraph","data")),h(Qd,AL("hostGraph","edgeData")),IL.Node=Jd,IL.Edge=Qd,Yi(Jd),Yi(Qd);var DL=function(t,e,i,n,o){for(var a=new IL(n),r=0;r "+f)),h++)}var p,g=i.get("coordinateSystem");if("cartesian2d"===g||"polar"===g)p=ml(t,i);else{var m=Fa.get(g),v=m&&"view"!==m.type?m.dimensions||[]:[];l(v,"value")<0&&v.concat(["value"]);var y=_A(t,{coordDimensions:v});(p=new vA(y,i)).initData(t)}var x=new vA(["value"],i);return x.initData(u,s),o&&o(p,x),kc({mainData:p,struct:a,structAttr:"graph",datas:{node:p,edge:x},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a},CL=Hs({type:"series.graph",init:function(t){CL.superApply(this,"init",arguments),this.legendDataProvider=function(){return this._categoriesData},this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeOption:function(t){CL.superApply(this,"mergeOption",arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeDefaultAndTheme:function(t){CL.superApply(this,"mergeDefaultAndTheme",arguments),Ci(t,["edgeLabel"],["show"])},getInitialData:function(t,e){var i=t.edges||t.links||[],n=t.data||t.nodes||[],o=this;if(n&&i)return DL(n,i,this,!0,function(t,i){function n(t){return(t=this.parsePath(t))&&"label"===t[0]?r:t&&"emphasis"===t[0]&&"label"===t[1]?l:this.parentModel}t.wrapMethod("getItemModel",function(t){var e=o._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t});var a=o.getModel("edgeLabel"),r=new No({label:a.option},a.parentModel,e),s=o.getModel("emphasis.edgeLabel"),l=new No({emphasis:{label:s.option}},s.parentModel,e);i.wrapMethod("getItemModel",function(t){return t.customizeGetParent(n),t})}).data},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},getCategoriesData:function(){return this._categoriesData},formatTooltip:function(t,e,i){if("edge"===i){var n=this.getData(),o=this.getDataParams(t,i),a=n.graph.getEdgeByIndex(t),r=n.getName(a.node1.dataIndex),s=n.getName(a.node2.dataIndex),l=[];return null!=r&&l.push(r),null!=s&&l.push(s),l=ia(l.join(" > ")),o.value&&(l+=" : "+ia(o.value)),l}return CL.superApply(this,"formatTooltip",arguments)},_updateCategoriesData:function(){var t=f(this.option.categories||[],function(t){return null!=t.value?t:a({value:0},t)}),e=new vA(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray(function(t){return e.getItemModel(t,!0)})},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},isAnimationEnabled:function(){return CL.superCall(this,"isAnimationEnabled")&&!("force"===this.get("layout")&&this.get("force.layoutAnimation"))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",legendHoverLink:!0,hoverAnimation:!0,layout:null,focusNodeAdjacency:!1,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle"},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,curveness:0,opacity:.5},emphasis:{label:{show:!0}}}}),LL=_M.prototype,kL=bM.prototype,PL=Un({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildPath:function(t,e){(tf(e)?LL:kL).buildPath(t,e)},pointAt:function(t){return tf(this.shape)?LL.pointAt.call(this,t):kL.pointAt.call(this,t)},tangentAt:function(t){var e=this.shape,i=tf(e)?[e.x2-e.x1,e.y2-e.y1]:kL.tangentAt.call(this,t);return q(i,i)}}),NL=["fromSymbol","toSymbol"],OL=rf.prototype;OL.beforeUpdate=function(){var t=this,e=t.childOfName("fromSymbol"),i=t.childOfName("toSymbol"),n=t.childOfName("label");if(e||i||!n.ignore){for(var o=1,a=this.parent;a;)a.scale&&(o/=a.scale[0]),a=a.parent;var r=t.childOfName("line");if(this.__dirty||r.__dirty){var s=r.shape.percent,l=r.pointAt(0),u=r.pointAt(s),h=U([],u,l);if(q(h,h),e&&(e.attr("position",l),c=r.tangentAt(0),e.attr("rotation",Math.PI/2-Math.atan2(c[1],c[0])),e.attr("scale",[o*s,o*s])),i){i.attr("position",u);var c=r.tangentAt(1);i.attr("rotation",-Math.PI/2-Math.atan2(c[1],c[0])),i.attr("scale",[o*s,o*s])}if(!n.ignore){n.attr("position",u);var d,f,p,g=5*o;if("end"===n.__position)d=[h[0]*g+u[0],h[1]*g+u[1]],f=h[0]>.8?"left":h[0]<-.8?"right":"center",p=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";else if("middle"===n.__position){var m=s/2,v=[(c=r.tangentAt(m))[1],-c[0]],y=r.pointAt(m);v[1]>0&&(v[0]=-v[0],v[1]=-v[1]),d=[y[0]+v[0]*g,y[1]+v[1]*g],f="center",p="bottom";var x=-Math.atan2(c[1],c[0]);u[0].8?"right":h[0]<-.8?"left":"center",p=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";n.attr({style:{textVerticalAlign:n.__verticalAlign||p,textAlign:n.__textAlign||f},position:d,scale:[o,o]})}}}},OL._createLine=function(t,e,i){var n=t.hostModel,o=of(t.getItemLayout(e));o.shape.percent=0,To(o,{shape:{percent:1}},n,e),this.add(o);var a=new rM({name:"label",lineLabelOriginalOpacity:1});this.add(a),d(NL,function(i){var n=nf(i,t,e);this.add(n),this[ef(i)]=t.getItemVisual(e,i)},this),this._updateCommonStl(t,e,i)},OL.updateData=function(t,e,i){var n=t.hostModel,o=this.childOfName("line"),a=t.getItemLayout(e),r={shape:{}};af(r.shape,a),Io(o,r,n,e),d(NL,function(i){var n=t.getItemVisual(e,i),o=ef(i);if(this[o]!==n){this.remove(this.childOfName(i));var a=nf(i,t,e);this.add(a)}this[o]=n},this),this._updateCommonStl(t,e,i)},OL._updateCommonStl=function(t,e,i){var n=t.hostModel,o=this.childOfName("line"),a=i&&i.lineStyle,s=i&&i.hoverLineStyle,l=i&&i.labelModel,u=i&&i.hoverLabelModel;if(!i||t.hasItemOption){var h=t.getItemModel(e);a=h.getModel("lineStyle").getLineStyle(),s=h.getModel("emphasis.lineStyle").getLineStyle(),l=h.getModel("label"),u=h.getModel("emphasis.label")}var c=t.getItemVisual(e,"color"),f=D(t.getItemVisual(e,"opacity"),a.opacity,1);o.useStyle(r({strokeNoScale:!0,fill:"none",stroke:c,opacity:f},a)),o.hoverStyle=s,d(NL,function(t){var e=this.childOfName(t);e&&(e.setColor(c),e.setStyle({opacity:f}))},this);var p,g,m=l.getShallow("show"),v=u.getShallow("show"),y=this.childOfName("label");if((m||v)&&(p=c||"#000",null==(g=n.getFormattedLabel(e,"normal",t.dataType)))){var x=n.getRawValue(e);g=null==x?t.getName(e):isFinite(x)?Go(x):x}var _=m?g:null,w=v?A(n.getFormattedLabel(e,"emphasis",t.dataType),g):null,b=y.style;null==_&&null==w||(mo(y.style,l,{text:_},{autoColor:p}),y.__textAlign=b.textAlign,y.__verticalAlign=b.textVerticalAlign,y.__position=l.get("position")||"middle"),y.hoverStyle=null!=w?{text:w,textFill:u.getTextColor(!0),fontStyle:u.getShallow("fontStyle"),fontWeight:u.getShallow("fontWeight"),fontSize:u.getShallow("fontSize"),fontFamily:u.getShallow("fontFamily")}:{text:null},y.ignore=!m&&!v,fo(this)},OL.highlight=function(){this.trigger("emphasis")},OL.downplay=function(){this.trigger("normal")},OL.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},OL.setLinePoints=function(t){var e=this.childOfName("line");af(e.shape,t),e.dirty()},u(rf,tb);var EL=sf.prototype;EL.isPersistent=function(){return!0},EL.updateData=function(t){var e=this,i=e.group,n=e._lineData;e._lineData=t,n||i.removeAll();var o=hf(t);t.diff(n).add(function(i){lf(e,t,i,o)}).update(function(i,a){uf(e,n,t,a,i,o)}).remove(function(t){i.remove(n.getItemGraphicEl(t))}).execute()},EL.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl(function(e,i){e.updateLayout(t,i)},this)},EL.incrementalPrepareUpdate=function(t){this._seriesScope=hf(t),this._lineData=null,this.group.removeAll()},EL.incrementalUpdate=function(t,e){for(var i=t.start;i=o/3?1:2),l=e.y-n(r)*a*(a>=o/3?1:2);r=e.angle-Math.PI/2,t.moveTo(s,l),t.lineTo(e.x+i(r)*a,e.y+n(r)*a),t.lineTo(e.x+i(e.angle)*o,e.y+n(e.angle)*o),t.lineTo(e.x-i(r)*a,e.y-n(r)*a),t.lineTo(s,l)}}),YL=2*Math.PI,qL=(Ar.extend({type:"gauge",render:function(t,e,i){this.group.removeAll();var n=t.get("axisLine.lineStyle.color"),o=Sf(t,i);this._renderMain(t,e,i,n,o)},dispose:function(){},_renderMain:function(t,e,i,n,o){for(var a=this.group,r=t.getModel("axisLine").getModel("lineStyle"),s=t.get("clockwise"),l=-t.get("startAngle")/180*Math.PI,u=-t.get("endAngle")/180*Math.PI,h=(u-l)%YL,c=l,d=r.get("width"),f=0;f=t&&(0===e?0:n[e-1][0]).4?"bottom":"middle",textAlign:A<-.4?"left":A>.4?"right":"center"},{autoColor:P}),silent:!0}))}if(g.get("show")&&T!==v){for(var N=0;N<=y;N++){var A=Math.cos(w),D=Math.sin(w),O=new _M({shape:{x1:A*c+u,y1:D*c+h,x2:A*(c-_)+u,y2:D*(c-_)+h},silent:!0,style:I});"auto"===I.stroke&&O.setStyle({stroke:n((T+N/y)/v)}),l.add(O),w+=S}w-=S}else w+=b}},_renderPointer:function(t,e,i,n,o,a,r,s){var l=this.group,u=this._data;if(t.get("pointer.show")){var h=[+t.get("min"),+t.get("max")],c=[a,r],d=t.getData(),f=d.mapDimension("value");d.diff(u).add(function(e){var i=new jL({shape:{angle:a}});To(i,{shape:{angle:Bo(d.get(f,e),h,c,!0)}},t),l.add(i),d.setItemGraphicEl(e,i)}).update(function(e,i){var n=u.getItemGraphicEl(i);Io(n,{shape:{angle:Bo(d.get(f,e),h,c,!0)}},t),l.add(n),d.setItemGraphicEl(e,n)}).remove(function(t){var e=u.getItemGraphicEl(t);l.remove(e)}).execute(),d.eachItemGraphicEl(function(t,e){var i=d.getItemModel(e),a=i.getModel("pointer");t.setShape({x:o.cx,y:o.cy,width:Vo(a.get("width"),o.r),r:Vo(a.get("length"),o.r)}),t.useStyle(i.getModel("itemStyle").getItemStyle()),"auto"===t.style.fill&&t.setStyle("fill",n(Bo(d.get(f,e),h,[0,1],!0))),fo(t,i.getModel("emphasis.itemStyle").getItemStyle())}),this._data=d}else u&&u.eachItemGraphicEl(function(t){l.remove(t)})},_renderTitle:function(t,e,i,n,o){var a=t.getData(),r=a.mapDimension("value"),s=t.getModel("title");if(s.get("show")){var l=s.get("offsetCenter"),u=o.cx+Vo(l[0],o.r),h=o.cy+Vo(l[1],o.r),c=+t.get("min"),d=+t.get("max"),f=n(Bo(t.getData().get(r,0),[c,d],[0,1],!0));this.group.add(new rM({silent:!0,style:mo({},s,{x:u,y:h,text:a.getName(0),textAlign:"center",textVerticalAlign:"middle"},{autoColor:f,forceRich:!0})}))}},_renderDetail:function(t,e,i,n,o){var a=t.getModel("detail"),r=+t.get("min"),s=+t.get("max");if(a.get("show")){var l=a.get("offsetCenter"),u=o.cx+Vo(l[0],o.r),h=o.cy+Vo(l[1],o.r),c=Vo(a.get("width"),o.r),d=Vo(a.get("height"),o.r),f=t.getData(),p=f.get(f.mapDimension("value"),0),g=n(Bo(p,[r,s],[0,1],!0));this.group.add(new rM({silent:!0,style:mo({},a,{x:u,y:h,text:Mf(p,a.get("formatter")),textWidth:isNaN(c)?null:c,textHeight:isNaN(d)?null:d,textAlign:"center",textVerticalAlign:"middle"},{autoColor:g,forceRich:!0})}))}}}),Hs({type:"series.funnel",init:function(t){qL.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()},this._defaultLabelLine(t)},getInitialData:function(t,e){return oC(this,["value"])},_defaultLabelLine:function(t){Ci(t,"labelLine",["show"]);var e=t.labelLine,i=t.emphasis.labelLine;e.show=e.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},getDataParams:function(t){var e=this.getData(),i=qL.superCall(this,"getDataParams",t),n=e.mapDimension("value"),o=e.getSum(n);return i.percent=o?+(e.get(n,t)/o*100).toFixed(2):0,i.$vars.push("percent"),i},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1,type:"solid"}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}}}})),KL=If.prototype,$L=["itemStyle","opacity"];KL.updateData=function(t,e,i){var n=this.childAt(0),o=t.hostModel,a=t.getItemModel(e),s=t.getItemLayout(e),l=t.getItemModel(e).get($L);l=null==l?1:l,n.useStyle({}),i?(n.setShape({points:s.points}),n.setStyle({opacity:0}),To(n,{style:{opacity:l}},o,e)):Io(n,{style:{opacity:l},shape:{points:s.points}},o,e);var u=a.getModel("itemStyle"),h=t.getItemVisual(e,"color");n.setStyle(r({lineJoin:"round",fill:h},u.getItemStyle(["opacity"]))),n.hoverStyle=u.getModel("emphasis").getItemStyle(),this._updateLabel(t,e),fo(this)},KL._updateLabel=function(t,e){var i=this.childAt(1),n=this.childAt(2),o=t.hostModel,a=t.getItemModel(e),r=t.getItemLayout(e).label,s=t.getItemVisual(e,"color");Io(i,{shape:{points:r.linePoints||r.linePoints}},o,e),Io(n,{style:{x:r.x,y:r.y}},o,e),n.attr({rotation:r.rotation,origin:[r.x,r.y],z2:10});var l=a.getModel("label"),u=a.getModel("emphasis.label"),h=a.getModel("labelLine"),c=a.getModel("emphasis.labelLine"),s=t.getItemVisual(e,"color");go(n.style,n.hoverStyle={},l,u,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:t.getName(e),autoColor:s,useInsideStyle:!!r.inside},{textAlign:r.textAlign,textVerticalAlign:r.verticalAlign}),n.ignore=n.normalIgnore=!l.get("show"),n.hoverIgnore=!u.get("show"),i.ignore=i.normalIgnore=!h.get("show"),i.hoverIgnore=!c.get("show"),i.setStyle({stroke:s}),i.setStyle(h.getModel("lineStyle").getLineStyle()),i.hoverStyle=c.getModel("lineStyle").getLineStyle()},u(If,tb);Ar.extend({type:"funnel",render:function(t,e,i){var n=t.getData(),o=this._data,a=this.group;n.diff(o).add(function(t){var e=new If(n,t);n.setItemGraphicEl(t,e),a.add(e)}).update(function(t,e){var i=o.getItemGraphicEl(e);i.updateData(n,t),a.add(i),n.setItemGraphicEl(t,i)}).remove(function(t){var e=o.getItemGraphicEl(t);a.remove(e)}).execute(),this._data=n},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}});Bs(uC("funnel")),zs(function(t,e,i){t.eachSeriesByType("funnel",function(t){var i=t.getData(),n=i.mapDimension("value"),o=t.get("sort"),a=Tf(t,e),r=Af(i,o),s=[Vo(t.get("minSize"),a.width),Vo(t.get("maxSize"),a.width)],l=i.getDataExtent(n),u=t.get("min"),h=t.get("max");null==u&&(u=Math.min(l[0],0)),null==h&&(h=l[1]);var c=t.get("funnelAlign"),d=t.get("gap"),f=(a.height-d*(i.count()-1))/i.count(),p=a.y,g=function(t,e){var o,r=Bo(i.get(n,t)||0,[u,h],s,!0);switch(c){case"left":o=a.x;break;case"center":o=a.x+(a.width-r)/2;break;case"right":o=a.x+a.width-r}return[[o,e],[o+r,e]]};"ascending"===o&&(f=-f,d=-d,p+=a.height,r=r.reverse());for(var m=0;ma&&(e[1-n]=e[n]+h.sign*a),e},tk=d,ek=Math.min,ik=Math.max,nk=Math.floor,ok=Math.ceil,ak=Go,rk=Math.PI;Nf.prototype={type:"parallel",constructor:Nf,_init:function(t,e,i){var n=t.dimensions,o=t.parallelAxisIndex;tk(n,function(t,i){var n=o[i],a=e.getComponent("parallelAxis",n),r=this._axesMap.set(t,new JL(t,Hl(a),[0,0],a.get("type"),n)),s="category"===r.type;r.onBand=s&&a.get("boundaryGap"),r.inverse=a.get("inverse"),a.axis=r,r.model=a,r.coordinateSystem=a.coordinateSystem=this},this)},update:function(t,e){this._updateAxesFromSeries(this._model,t)},containPoint:function(t){var e=this._makeLayoutInfo(),i=e.axisBase,n=e.layoutBase,o=e.pixelDimIndex,a=t[1-o],r=t[o];return a>=i&&a<=i+e.axisLength&&r>=n&&r<=n+e.layoutLength},getModel:function(){return this._model},_updateAxesFromSeries:function(t,e){e.eachSeries(function(i){if(t.contains(i,e)){var n=i.getData();tk(this.dimensions,function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(n,n.mapDimension(t)),Wl(e.scale,e.model)},this)}},this)},resize:function(t,e){this._rect=ca(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},getRect:function(){return this._rect},_makeLayoutInfo:function(){var t,e=this._model,i=this._rect,n=["x","y"],o=["width","height"],a=e.get("layout"),r="horizontal"===a?0:1,s=i[o[r]],l=[0,s],u=this.dimensions.length,h=Of(e.get("axisExpandWidth"),l),c=Of(e.get("axisExpandCount")||0,[0,u]),d=e.get("axisExpandable")&&u>3&&u>c&&c>1&&h>0&&s>0,f=e.get("axisExpandWindow");f?(t=Of(f[1]-f[0],l),f[1]=f[0]+t):(t=Of(h*(c-1),l),(f=[h*(e.get("axisExpandCenter")||nk(u/2))-t/2])[1]=f[0]+t);var p=(s-t)/(u-c);p<3&&(p=0);var g=[nk(ak(f[0]/h,1))+1,ok(ak(f[1]/h,1))-1],m=p/h*f[0];return{layout:a,pixelDimIndex:r,layoutBase:i[n[r]],layoutLength:s,axisBase:i[n[1-r]],axisLength:i[o[1-r]],axisExpandable:d,axisExpandWidth:h,axisCollapseWidth:p,axisExpandWindow:f,axisCount:u,winInnerIndices:g,axisExpandWindow0Pos:m}},_layoutAxes:function(){var t=this._rect,e=this._axesMap,i=this.dimensions,n=this._makeLayoutInfo(),o=n.layout;e.each(function(t){var e=[0,n.axisLength],i=t.inverse?1:0;t.setExtent(e[i],e[1-i])}),tk(i,function(e,i){var a=(n.axisExpandable?Rf:Ef)(i,n),r={horizontal:{x:a.position,y:n.axisLength},vertical:{x:0,y:a.position}},s={horizontal:rk/2,vertical:0},l=[r[o].x+t.x,r[o].y+t.y],u=s[o],h=xt();Mt(h,h,u),St(h,h,l),this._axesLayout[e]={position:l,rotation:u,transform:h,axisNameAvailableWidth:a.axisNameAvailableWidth,axisLabelShow:a.axisLabelShow,nameTruncateMaxWidth:a.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},getAxis:function(t){return this._axesMap.get(t)},dataToPoint:function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},eachActiveState:function(t,e,i,n){null==i&&(i=0),null==n&&(n=t.count());var o=this._axesMap,a=this.dimensions,r=[],s=[];d(a,function(e){r.push(t.mapDimension(e)),s.push(o.get(e).model)});for(var l=this.hasAxisBrushed(),u=i;uo*(1-h[0])?(l="jump",r=s-o*(1-h[2])):(r=s-o*h[1])>=0&&(r=s-o*(1-h[1]))<=0&&(r=0),(r*=e.axisExpandWidth/u)?QL(r,n,a,"all"):l="none";else{o=n[1]-n[0];(n=[ik(0,a[1]*s/o-o/2)])[1]=ek(a[1],n[0]+o),n[0]=n[1]-o}return{axisExpandWindow:n,behavior:l}}},Fa.register("parallel",{create:function(t,e){var i=[];return t.eachComponent("parallel",function(n,o){var a=new Nf(n,t,e);a.name="parallel_"+o,a.resize(n,e),n.coordinateSystem=a,a.model=n,i.push(a)}),t.eachSeries(function(e){if("parallel"===e.get("coordinateSystem")){var i=t.queryComponents({mainType:"parallel",index:e.get("parallelIndex"),id:e.get("parallelId")})[0];e.coordinateSystem=i.coordinateSystem}}),i}});var sk=lI.extend({type:"baseParallelAxis",axis:null,activeIntervals:[],getAreaSelectStyle:function(){return Qb([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},setActiveIntervals:function(t){var e=this.activeIntervals=i(t);if(e)for(var n=e.length-1;n>=0;n--)Fo(e[n])},getActiveState:function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t||isNaN(t))return"inactive";if(1===e.length){var i=e[0];if(i[0]<=t&&t<=i[1])return"active"}else for(var n=0,o=e.length;n5)return;var n=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);"none"!==n.behavior&&this._dispatchExpand({axisExpandWindow:n.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!this._mouseDownPoint&&Ip(this,"mousemove")){var e=this._model,i=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),n=i.behavior;"jump"===n&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===n?null:{axisExpandWindow:i.axisExpandWindow,animation:"jump"===n&&null})}}};Ns(function(t){Cf(t),Lf(t)}),YI.extend({type:"series.parallel",dependencies:["parallel"],visualColorAccessPath:"lineStyle.color",getInitialData:function(t,e){var i=this.getSource();return Tp(i,this),ml(i,this)},getRawIndicesByActiveState:function(t){var e=this.coordinateSystem,i=this.getData(),n=[];return e.eachActiveState(i,function(e,o){t===e&&n.push(i.getRawIndex(o))}),n},defaultOption:{zlevel:0,z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"}});var Dk=.3,Ck=(Ar.extend({type:"parallel",init:function(){this._dataGroup=new tb,this.group.add(this._dataGroup),this._data,this._initialized},render:function(t,e,i,n){var o=this._dataGroup,a=t.getData(),r=this._data,s=t.coordinateSystem,l=s.dimensions,u=kp(t);if(a.diff(r).add(function(t){Pp(Lp(a,o,t,l,s),a,t,u)}).update(function(e,i){var o=r.getItemGraphicEl(i),h=Cp(a,e,l,s);a.setItemGraphicEl(e,o),Io(o,{shape:{points:h}},n&&!1===n.animation?null:t,e),Pp(o,a,e,u)}).remove(function(t){var e=r.getItemGraphicEl(t);o.remove(e)}).execute(),!this._initialized){this._initialized=!0;var h=Dp(s,t,function(){setTimeout(function(){o.removeClipPath()})});o.setClipPath(h)}this._data=a},incrementalPrepareRender:function(t,e,i){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},incrementalRender:function(t,e,i){for(var n=e.getData(),o=e.coordinateSystem,a=o.dimensions,r=kp(e),s=t.start;sn&&(n=e)}),d(e,function(e){var o=new hL({type:"color",mappingMethod:"linear",dataExtent:[i,n],visual:t.get("color")}).mapValueToVisual(e.getLayout().value);e.setVisual("color",o);var a=e.getModel().get("itemStyle.color");null!=a&&e.setVisual("color",a)})}})});var Ok={_baseAxisDim:null,getInitialData:function(t,e){var i,n,o=e.getComponent("xAxis",this.get("xAxisIndex")),a=e.getComponent("yAxis",this.get("yAxisIndex")),r=o.get("type"),s=a.get("type");"category"===r?(t.layout="horizontal",i=o.getOrdinalMeta(),n=!0):"category"===s?(t.layout="vertical",i=a.getOrdinalMeta(),n=!0):t.layout=t.layout||"horizontal";var l=["x","y"],u="horizontal"===t.layout?0:1,h=this._baseAxisDim=l[u],c=l[1-u],f=[o,a],p=f[u].get("type"),g=f[1-u].get("type"),m=t.data;if(m&&n){var v=[];d(m,function(t,e){var i;t.value&&y(t.value)?(i=t.value.slice(),t.value.unshift(e)):y(t)?(i=t.slice(),t.unshift(e)):i=t,v.push(i)}),t.data=v}var x=this.defaultValueDimensions;return oC(this,{coordDimensions:[{name:h,type:qs(p),ordinalMeta:i,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:c,type:qs(g),dimsDef:x.slice()}],dimensionsCount:x.length+1})},getBaseAxis:function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis}};h(YI.extend({type:"series.boxplot",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:2,shadowOffsetY:2,shadowColor:"rgba(0,0,0,0.4)"}},animationEasing:"elasticOut",animationDuration:800}}),Ok,!0);var Ek=["itemStyle"],Rk=["emphasis","itemStyle"],zk=(Ar.extend({type:"boxplot",render:function(t,e,i){var n=t.getData(),o=this.group,a=this._data;this._data||o.removeAll();var r="horizontal"===t.get("layout")?1:0;n.diff(a).add(function(t){if(n.hasValue(t)){var e=ig(n.getItemLayout(t),n,t,r,!0);n.setItemGraphicEl(t,e),o.add(e)}}).update(function(t,e){var i=a.getItemGraphicEl(e);if(n.hasValue(t)){var s=n.getItemLayout(t);i?ng(s,i,n,t):i=ig(s,n,t,r),o.add(i),n.setItemGraphicEl(t,i)}else o.remove(i)}).remove(function(t){var e=a.getItemGraphicEl(t);e&&o.remove(e)}).execute(),this._data=n},remove:function(t){var e=this.group,i=this._data;this._data=null,i&&i.eachItemGraphicEl(function(t){t&&e.remove(t)})},dispose:B}),Pn.extend({type:"boxplotBoxPath",shape:{},buildPath:function(t,e){var i=e.points,n=0;for(t.moveTo(i[n][0],i[n][1]),n++;n<4;n++)t.lineTo(i[n][0],i[n][1]);for(t.closePath();n0?jk:Yk)}function n(t,e){return e.get(t>0?Uk:Xk)}var o=t.getData(),a=t.pipelineContext.large;if(o.setVisual({legendSymbol:"roundRect",colorP:i(1,t),colorN:i(-1,t),borderColorP:n(1,t),borderColorN:n(-1,t)}),!e.isSeriesFiltered(t))return!a&&{progress:function(t,e){for(var o;null!=(o=t.next());){var a=e.getItemModel(o),r=e.getItemLayout(o).sign;e.setItemVisual(o,{color:i(r,a),borderColor:n(r,a)})}}}}},Kk="undefined"!=typeof Float32Array?Float32Array:Array,$k={seriesType:"candlestick",plan:$I(),reset:function(t){var e=t.coordinateSystem,i=t.getData(),n=pg(t,i),o=0,a=1,r=["x","y"],s=i.mapDimension(r[o]),l=i.mapDimension(r[a],!0),u=l[0],h=l[1],c=l[2],d=l[3];if(i.setLayout({candleWidth:n,isSimpleBox:n<=1.3}),!(null==s||l.length<4))return{progress:t.pipelineContext.large?function(t,i){for(var n,r,l=new Kk(5*t.count),f=0,p=[],g=[];null!=(r=t.next());){var m=i.get(s,r),v=i.get(u,r),y=i.get(h,r),x=i.get(c,r),_=i.get(d,r);isNaN(m)||isNaN(x)||isNaN(_)?(l[f++]=NaN,f+=4):(l[f++]=fg(i,r,v,y,h),p[o]=m,p[a]=x,n=e.dataToPoint(p,null,g),l[f++]=n?n[0]:NaN,l[f++]=n?n[1]:NaN,p[a]=_,n=e.dataToPoint(p,null,g),l[f++]=n?n[1]:NaN)}i.setLayout("largePoints",l)}:function(t,i){function r(t,i){var n=[];return n[o]=i,n[a]=t,isNaN(i)||isNaN(t)?[NaN,NaN]:e.dataToPoint(n)}function l(t,e,i){var a=e.slice(),r=e.slice();a[o]=Jn(a[o]+n/2,1,!1),r[o]=Jn(r[o]-n/2,1,!0),i?t.push(a,r):t.push(r,a)}function f(t){return t[o]=Jn(t[o],1),t}for(var p;null!=(p=t.next());){var g=i.get(s,p),m=i.get(u,p),v=i.get(h,p),y=i.get(c,p),x=i.get(d,p),_=Math.min(m,v),w=Math.max(m,v),b=r(_,g),S=r(w,g),M=r(y,g),I=r(x,g),T=[];l(T,S,0),l(T,b,1),T.push(f(I),f(S),f(M),f(b)),i.setItemLayout(p,{sign:fg(i,p,m,v,h),initBaseline:m>v?S[a]:b[a],ends:T,brushRect:function(t,e,i){var s=r(t,i),l=r(e,i);return s[o]-=n/2,l[o]-=n/2,{x:s[0],y:s[1],width:a?n:l[0]-s[0],height:a?l[1]-s[1]:n}}(y,x,g)})}}}}};Ns(function(t){t&&y(t.series)&&d(t.series,function(t){w(t)&&"k"===t.type&&(t.type="candlestick")})}),Bs(qk),zs($k),YI.extend({type:"series.effectScatter",dependencies:["grid","polar"],getInitialData:function(t,e){return ml(this.getSource(),this)},brushSelector:"point",defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",rippleEffect:{period:4,scale:2.5,brushType:"fill"},symbolSize:10}});var Jk=vg.prototype;Jk.stopEffectAnimation=function(){this.childAt(1).removeAll()},Jk.startEffectAnimation=function(t){for(var e=t.symbolType,i=t.color,n=this.childAt(1),o=0;o<3;o++){var a=Jl(e,-1,-1,2,2,i);a.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scale:[.5,.5]});var r=-o/3*t.period+t.effectOffset;a.animate("",!0).when(t.period,{scale:[t.rippleScale/2,t.rippleScale/2]}).delay(r).start(),a.animateStyle(!0).when(t.period,{opacity:0}).delay(r).start(),n.add(a)}mg(n,t)},Jk.updateEffectAnimation=function(t){for(var e=this._effectCfg,i=this.childAt(1),n=["symbolType","period","rippleScale"],o=0;o "))},preventIncremental:function(){return!!this.get("effect.show")},getProgressive:function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},getProgressiveThreshold:function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?2e4:this.get("progressiveThreshold"):t},defaultOption:{coordinateSystem:"geo",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,label:{show:!1,position:"end"},lineStyle:{opacity:.5}}}),iP=xg.prototype;iP.createLine=function(t,e,i){return new rf(t,e,i)},iP._updateEffectSymbol=function(t,e){var i=t.getItemModel(e).getModel("effect"),n=i.get("symbolSize"),o=i.get("symbol");y(n)||(n=[n,n]);var a=i.get("color")||t.getItemVisual(e,"color"),r=this.childAt(1);this._symbolType!==o&&(this.remove(r),(r=Jl(o,-.5,-.5,1,1,a)).z2=100,r.culling=!0,this.add(r)),r&&(r.setStyle("shadowColor",a),r.setStyle(i.getItemStyle(["color"])),r.attr("scale",n),r.setColor(a),r.attr("scale",n),this._symbolType=o,this._updateEffectAnimation(t,i,e))},iP._updateEffectAnimation=function(t,e,i){var n=this.childAt(1);if(n){var o=this,a=t.getItemLayout(i),r=1e3*e.get("period"),s=e.get("loop"),l=e.get("constantSpeed"),u=T(e.get("delay"),function(e){return e/t.count()*r/3}),h="function"==typeof u;if(n.ignore=!0,this.updateAnimationPoints(n,a),l>0&&(r=this.getLineLength(n)/l*1e3),r!==this._period||s!==this._loop){n.stopAnimation();var c=u;h&&(c=u(i)),n.__t>0&&(c=-r*n.__t),n.__t=0;var d=n.animate("",s).when(r,{__t:1}).delay(c).during(function(){o.updateSymbolPosition(n)});s||d.done(function(){o.remove(n)}),d.start()}this._period=r,this._loop=s}},iP.getLineLength=function(t){return uw(t.__p1,t.__cp1)+uw(t.__cp1,t.__p2)},iP.updateAnimationPoints=function(t,e){t.__p1=e[0],t.__p2=e[1],t.__cp1=e[2]||[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]},iP.updateData=function(t,e,i){this.childAt(0).updateData(t,e,i),this._updateEffectSymbol(t,e)},iP.updateSymbolPosition=function(t){var e=t.__p1,i=t.__p2,n=t.__cp1,o=t.__t,a=t.position,r=sn,s=ln;a[0]=r(e[0],n[0],i[0],o),a[1]=r(e[1],n[1],i[1],o);var l=s(e[0],n[0],i[0],o),u=s(e[1],n[1],i[1],o);t.rotation=-Math.atan2(u,l)-Math.PI/2,t.ignore=!1},iP.updateLayout=function(t,e){this.childAt(0).updateLayout(t,e);var i=t.getItemModel(e).getModel("effect");this._updateEffectAnimation(t,i,e)},u(xg,tb);var nP=_g.prototype;nP._createPolyline=function(t,e,i){var n=t.getItemLayout(e),o=new gM({shape:{points:n}});this.add(o),this._updateCommonStl(t,e,i)},nP.updateData=function(t,e,i){var n=t.hostModel;Io(this.childAt(0),{shape:{points:t.getItemLayout(e)}},n,e),this._updateCommonStl(t,e,i)},nP._updateCommonStl=function(t,e,i){var n=this.childAt(0),o=t.getItemModel(e),a=t.getItemVisual(e,"color"),s=i&&i.lineStyle,l=i&&i.hoverLineStyle;i&&!t.hasItemOption||(s=o.getModel("lineStyle").getLineStyle(),l=o.getModel("emphasis.lineStyle").getLineStyle()),n.useStyle(r({strokeNoScale:!0,fill:"none",stroke:a},s)),n.hoverStyle=l,fo(this)},nP.updateLayout=function(t,e){this.childAt(0).setShape("points",t.getItemLayout(e))},u(_g,tb);var oP=wg.prototype;oP.createLine=function(t,e,i){return new _g(t,e,i)},oP.updateAnimationPoints=function(t,e){this._points=e;for(var i=[0],n=0,o=1;o=0&&!(n[r]<=e);r--);r=Math.min(r,o-2)}else{for(var r=a;re);r++);r=Math.min(r-1,o-2)}J(t.position,i[r],i[r+1],(e-n[r])/(n[r+1]-n[r]));var s=i[r+1][0]-i[r][0],l=i[r+1][1]-i[r][1];t.rotation=-Math.atan2(l,s)-Math.PI/2,this._lastFrame=r,this._lastFramePercent=e,t.ignore=!1}},u(wg,xg);var aP=Un({shape:{polyline:!1,curveness:0,segs:[]},buildPath:function(t,e){var i=e.segs,n=e.curveness;if(e.polyline)for(r=0;r0){t.moveTo(i[r++],i[r++]);for(var a=1;a0){var c=(s+u)/2-(l-h)*n,d=(l+h)/2-(u-s)*n;t.quadraticCurveTo(c,d,u,h)}else t.lineTo(u,h)}},findDataIndex:function(t,e){var i=this.shape,n=i.segs,o=i.curveness;if(i.polyline)for(var a=0,r=0;r0)for(var l=n[r++],u=n[r++],h=1;h0){if(_n(l,u,(l+c)/2-(u-d)*o,(u+d)/2-(c-l)*o,c,d))return a}else if(yn(l,u,c,d))return a;a++}return-1}}),rP=bg.prototype;rP.isPersistent=function(){return!this._incremental},rP.updateData=function(t){this.group.removeAll();var e=new aP({rectHover:!0,cursor:"default"});e.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(e,t),this.group.add(e),this._incremental=null},rP.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>5e5?(this._incremental||(this._incremental=new Zn({silent:!0})),this.group.add(this._incremental)):this._incremental=null},rP.incrementalUpdate=function(t,e){var i=new aP;i.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(i,e,!!this._incremental),this._incremental?this._incremental.addDisplayable(i,!0):(i.rectHover=!0,i.cursor="default",i.__startIndex=t.start,this.group.add(i))},rP.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},rP._setCommon=function(t,e,i){var n=e.hostModel;t.setShape({polyline:n.get("polyline"),curveness:n.get("lineStyle.curveness")}),t.useStyle(n.getModel("lineStyle").getLineStyle()),t.style.strokeNoScale=!0;var o=e.getVisual("color");o&&t.setStyle("stroke",o),t.setStyle("fill"),i||(t.seriesIndex=n.seriesIndex,t.on("mousemove",function(e){t.dataIndex=null;var i=t.findDataIndex(e.offsetX,e.offsetY);i>0&&(t.dataIndex=i+t.__startIndex)}))},rP._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};var sP={seriesType:"lines",plan:$I(),reset:function(t){var e=t.coordinateSystem,i=t.get("polyline"),n=t.pipelineContext.large;return{progress:function(o,a){var r=[];if(n){var s,l=o.end-o.start;if(i){for(var u=0,h=o.start;h0){var I=a(v)?s:l;v>0&&(v=v*S+b),x[_++]=I[M],x[_++]=I[M+1],x[_++]=I[M+2],x[_++]=I[M+3]*v*256}else _+=4}return c.putImageData(y,0,0),h},_getBrush:function(){var t=this._brushCanvas||(this._brushCanvas=iw()),e=this.pointSize+this.blurSize,i=2*e;t.width=i,t.height=i;var n=t.getContext("2d");return n.clearRect(0,0,i,i),n.shadowOffsetX=i,n.shadowBlur=this.blurSize,n.shadowColor="#000",n.beginPath(),n.arc(-e,e,this.pointSize,0,2*Math.PI,!0),n.closePath(),n.fill(),t},_getGradient:function(t,e,i){for(var n=this._gradientPixels,o=n[i]||(n[i]=new Uint8ClampedArray(1024)),a=[0,0,0,0],r=0,s=0;s<256;s++)e[i](s/255,!0,a),o[r++]=a[0],o[r++]=a[1],o[r++]=a[2],o[r++]=a[3];return o}},Zs({type:"heatmap",render:function(t,e,i){var n;e.eachComponent("visualMap",function(e){e.eachTargetSeries(function(i){i===t&&(n=e)})}),this.group.removeAll(),this._incrementalDisplayable=null;var o=t.coordinateSystem;"cartesian2d"===o.type||"calendar"===o.type?this._renderOnCartesianAndCalendar(t,i,0,t.getData().count()):Ag(o)&&this._renderOnGeo(o,t,n,i)},incrementalPrepareRender:function(t,e,i){this.group.removeAll()},incrementalRender:function(t,e,i,n){e.coordinateSystem&&this._renderOnCartesianAndCalendar(e,n,t.start,t.end,!0)},_renderOnCartesianAndCalendar:function(t,e,i,n,o){var r,s,l=t.coordinateSystem;if("cartesian2d"===l.type){var u=l.getAxis("x"),h=l.getAxis("y");r=u.getBandWidth(),s=h.getBandWidth()}for(var c=this.group,d=t.getData(),f=t.getModel("itemStyle").getItemStyle(["color"]),p=t.getModel("emphasis.itemStyle").getItemStyle(),g=t.getModel("label"),m=t.getModel("emphasis.label"),v=l.type,y="cartesian2d"===v?[d.mapDimension("x"),d.mapDimension("y"),d.mapDimension("value")]:[d.mapDimension("time"),d.mapDimension("value")],x=i;x=e.y&&t[1]<=e.y+e.height:i.contain(i.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},pointToData:function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t["horizontal"===e.orient?0:1]))]},dataToPoint:function(t){var e=this.getAxis(),i=this.getRect(),n=[],o="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),n[o]=e.toGlobalCoord(e.dataToCoord(+t)),n[1-o]=0===o?i.y+i.height/2:i.x+i.width/2,n}},Fa.register("single",{create:function(t,e){var i=[];return t.eachComponent("singleAxis",function(n,o){var a=new $g(n,t,e);a.name="single_"+o,a.resize(n,e),n.coordinateSystem=a,i.push(a)}),t.eachSeries(function(e){if("singleAxis"===e.get("coordinateSystem")){var i=t.queryComponents({mainType:"singleAxis",index:e.get("singleAxisIndex"),id:e.get("singleAxisId")})[0];e.coordinateSystem=i&&i.coordinateSystem}}),i},dimensions:$g.prototype.dimensions});var gP=["axisLine","axisTickLabel","axisName"],mP=XD.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(t,e,i,n){var o=this.group;o.removeAll();var a=Jg(t),r=new FD(t,a);d(gP,r.add,r),o.add(r.getGroup()),t.get("splitLine.show")&&this._splitLine(t),mP.superCall(this,"render",t,e,i,n)},_splitLine:function(t){var e=t.axis;if(!e.scale.isBlank()){var i=t.getModel("splitLine"),n=i.getModel("lineStyle"),o=n.get("width"),a=n.get("color");a=a instanceof Array?a:[a];for(var r=t.coordinateSystem.getRect(),s=e.isHorizontal(),l=[],u=0,h=e.getTicksCoords({tickModel:i}),c=[],d=[],f=0;f=0)&&i({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})})},remove:function(t,e){gm(e.getZr(),"axisPointer"),IP.superApply(this._model,"remove",arguments)},dispose:function(t,e){gm("axisPointer",e),IP.superApply(this._model,"dispose",arguments)}}),TP=Bi(),AP=i,DP=m;(mm.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(t,e,i,n){var o=e.get("value"),a=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=i,n||this._lastValue!==o||this._lastStatus!==a){this._lastValue=o,this._lastStatus=a;var r=this._group,s=this._handle;if(!a||"hide"===a)return r&&r.hide(),void(s&&s.hide());r&&r.show(),s&&s.show();var l={};this.makeElOption(l,o,t,e,i);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(i),this._lastGraphicKey=u;var h=this._moveAnimation=this.determineAnimation(t,e);if(r){var c=v(vm,e,h);this.updatePointerEl(r,l,c,e),this.updateLabelEl(r,l,c,e)}else r=this._group=new tb,this.createPointerEl(r,l,t,e),this.createLabelEl(r,l,t,e),i.getZr().add(r);wm(r,e,!0),this._renderHandle(o)}},remove:function(t){this.clear(t)},dispose:function(t){this.clear(t)},determineAnimation:function(t,e){var i=e.get("animation"),n=t.axis,o="category"===n.type,a=e.get("snap");if(!a&&!o)return!1;if("auto"===i||null==i){var r=this.animationThreshold;if(o&&n.getBandWidth()>r)return!0;if(a){var s=Mh(t).seriesDataCount,l=n.getExtent();return Math.abs(l[0]-l[1])/s>r}return!1}return!0===i},makeElOption:function(t,e,i,n,o){},createPointerEl:function(t,e,i,n){var o=e.pointer;if(o){var a=TP(t).pointerEl=new zM[o.type](AP(e.pointer));t.add(a)}},createLabelEl:function(t,e,i,n){if(e.label){var o=TP(t).labelEl=new yM(AP(e.label));t.add(o),xm(o,n)}},updatePointerEl:function(t,e,i){var n=TP(t).pointerEl;n&&(n.setStyle(e.pointer.style),i(n,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,i,n){var o=TP(t).labelEl;o&&(o.setStyle(e.label.style),i(o,{shape:e.label.shape,position:e.label.position}),xm(o,n))},_renderHandle:function(t){if(!this._dragging&&this.updateHandleTransform){var e=this._axisPointerModel,i=this._api.getZr(),n=this._handle,o=e.getModel("handle"),a=e.get("status");if(!o.get("show")||!a||"hide"===a)return n&&i.remove(n),void(this._handle=null);var r;this._handle||(r=!0,n=this._handle=Po(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){mw(t.event)},onmousedown:DP(this._onHandleDragMove,this,0,0),drift:DP(this._onHandleDragMove,this),ondragend:DP(this._onHandleDragEnd,this)}),i.add(n)),wm(n,e,!1);var s=["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];n.setStyle(o.getItemStyle(null,s));var l=o.get("size");y(l)||(l=[l,l]),n.attr("scale",[l[0]/2,l[1]/2]),Nr(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,r)}},_moveHandleToValue:function(t,e){vm(this._axisPointerModel,!e&&this._moveAnimation,this._handle,_m(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform(_m(i),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr(_m(n)),TP(i).lastProp=null,this._doDispatchAxisPointer()}},_doDispatchAxisPointer:function(){if(this._handle){var t=this._payloadInfo,e=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]})}},_onHandleDragEnd:function(t){if(this._dragging=!1,this._handle){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(),i=this._group,n=this._handle;e&&i&&(this._lastGraphicKey=null,i&&e.remove(i),n&&e.remove(n),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(t,e,i){return i=i||0,{x:t[i],y:t[1-i],width:e[i],height:e[1-i]}}}).constructor=mm,ji(mm);var CP=mm.extend({makeElOption:function(t,e,i,n,o){var a=i.axis,r=a.grid,s=n.get("type"),l=km(r,a).getOtherAxis(a).getGlobalExtent(),u=a.toGlobalCoord(a.dataToCoord(e,!0));if(s&&"none"!==s){var h=bm(n),c=LP[s](a,u,l,h);c.style=h,t.graphicKey=c.type,t.pointer=c}Am(e,t,Lh(r.model,i),i,n,o)},getHandleTransform:function(t,e,i){var n=Lh(e.axis.grid.model,e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:Tm(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i,n){var o=i.axis,a=o.grid,r=o.getGlobalExtent(!0),s=km(a,o).getOtherAxis(o).getGlobalExtent(),l="x"===o.dim?0:1,u=t.position;u[l]+=e[l],u[l]=Math.min(r[1],u[l]),u[l]=Math.max(r[0],u[l]);var h=(s[1]+s[0])/2,c=[h,h];c[l]=u[l];var d=[{verticalAlign:"middle"},{align:"center"}];return{position:u,rotation:t.rotation,cursorPoint:c,tooltipOption:d[l]}}}),LP={line:function(t,e,i,n){var o=Dm([e,i[0]],[e,i[1]],Pm(t));return Kn({shape:o,style:n}),{type:"Line",shape:o}},shadow:function(t,e,i,n){var o=Math.max(1,t.getBandWidth()),a=i[1]-i[0];return{type:"Rect",shape:Cm([e-o/2,i[0]],[o,a],Pm(t))}}};XD.registerAxisPointerClass("CartesianAxisPointer",CP),Ns(function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!y(e)&&(t.axisPointer.link=[e])}}),Os(VT.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=vh(t,e)}),Es({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},function(t,e,i){var n=t.currTrigger,o=[t.x,t.y],a=t,r=t.dispatchAction||m(i.dispatchAction,i),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){lm(o)&&(o=xP({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},e).point);var l=lm(o),u=a.axesInfo,h=s.axesInfo,c="leave"===n||lm(o),d={},f={},p={list:[],map:{}},g={showPointer:wP(em,f),showTooltip:wP(im,p)};_P(s.coordSysMap,function(t,e){var i=l||t.containPoint(o);_P(s.coordSysAxesInfo[e],function(t,e){var n=t.axis,a=rm(u,t);if(!c&&i&&(!u||a)){var r=a&&a.value;null!=r||l||(r=n.pointToData(o)),null!=r&&Qg(t,r,g,!1,d)}})});var v={};return _P(h,function(t,e){var i=t.linkGroup;i&&!f[e]&&_P(i.axesInfo,function(e,n){var o=f[n];if(e!==t&&o){var a=o.value;i.mapper&&(a=t.axis.scale.parse(i.mapper(a,sm(e),sm(t)))),v[t.key]=a}})}),_P(v,function(t,e){Qg(h[e],t,g,!0,d)}),nm(f,h,d),om(p,o,t,r),am(h,0,i),d}});var kP=["x","y"],PP=["width","height"],NP=mm.extend({makeElOption:function(t,e,i,n,o){var a=i.axis,r=a.coordinateSystem,s=Om(r,1-Nm(a)),l=r.dataToPoint(e)[0],u=n.get("type");if(u&&"none"!==u){var h=bm(n),c=OP[u](a,l,s,h);c.style=h,t.graphicKey=c.type,t.pointer=c}Am(e,t,Jg(i),i,n,o)},getHandleTransform:function(t,e,i){var n=Jg(e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:Tm(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i,n){var o=i.axis,a=o.coordinateSystem,r=Nm(o),s=Om(a,r),l=t.position;l[r]+=e[r],l[r]=Math.min(s[1],l[r]),l[r]=Math.max(s[0],l[r]);var u=Om(a,1-r),h=(u[1]+u[0])/2,c=[h,h];return c[r]=l[r],{position:l,rotation:t.rotation,cursorPoint:c,tooltipOption:{verticalAlign:"middle"}}}}),OP={line:function(t,e,i,n){var o=Dm([e,i[0]],[e,i[1]],Nm(t));return Kn({shape:o,style:n}),{type:"Line",shape:o}},shadow:function(t,e,i,n){var o=t.getBandWidth(),a=i[1]-i[0];return{type:"Rect",shape:Cm([e-o/2,i[0]],[o,a],Nm(t))}}};XD.registerAxisPointerClass("SingleAxisPointer",NP),Ws({type:"single"});var EP=YI.extend({type:"series.themeRiver",dependencies:["singleAxis"],nameMap:null,init:function(t){EP.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()}},fixData:function(t){var e=t.length,i=[];Zi(t,function(t){return t[2]}).buckets.each(function(t,e){i.push({name:e,dataList:t})});for(var n=i.length,o=-1,a=-1,r=0;ro&&(o=s,a=r)}for(var l=0;lMath.PI/2?"right":"left"):x&&"center"!==x?"left"===x?(f=u.r0+y,p>Math.PI/2&&(x="right")):"right"===x&&(f=u.r-y,p>Math.PI/2&&(x="left")):(f=(u.r+u.r0)/2,x="center"),d.attr("style",{text:l,textAlign:x,textVerticalAlign:n("verticalAlign")||"middle",opacity:n("opacity")});var _=f*g+u.cx,w=f*m+u.cy;d.attr("position",[_,w]);var b=n("rotate"),S=0;"radial"===b?(S=-p)<-Math.PI/2&&(S+=Math.PI):"tangential"===b?(S=Math.PI/2-p)>Math.PI/2?S-=Math.PI:S<-Math.PI/2&&(S+=Math.PI):"number"==typeof b&&(S=b*Math.PI/180),d.attr("rotation",S)},VP._initEvents=function(t,e,i,n){t.off("mouseover").off("mouseout").off("emphasis").off("normal");var o=this,a=function(){o.onEmphasis(n)},r=function(){o.onNormal()};i.isAnimationEnabled()&&t.on("mouseover",a).on("mouseout",r).on("emphasis",a).on("normal",r).on("downplay",function(){o.onDownplay()}).on("highlight",function(){o.onHighlight()})},u(Vm,tb);Ar.extend({type:"sunburst",init:function(){},render:function(t,e,i,n){function o(i,n){if(c||!i||i.getValue()||(i=null),i!==l&&n!==l)if(n&&n.piece)i?(n.piece.updateData(!1,i,"normal",t,e),s.setItemGraphicEl(i.dataIndex,n.piece)):a(n);else if(i){var o=new Vm(i,t,e);h.add(o),s.setItemGraphicEl(i.dataIndex,o)}}function a(t){t&&t.piece&&(h.remove(t.piece),t.piece=null)}var r=this;this.seriesModel=t,this.api=i,this.ecModel=e;var s=t.getData(),l=s.tree.root,u=t.getViewRoot(),h=this.group,c=t.get("renderLabelForZeroData"),d=[];u.eachNode(function(t){d.push(t)});var f=this._oldChildren||[];if(function(t,e){function i(t){return t.getId()}function n(i,n){o(null==i?null:t[i],null==n?null:e[n])}0===t.length&&0===e.length||new Xs(e,t,i,i).add(n).update(n).remove(v(n,null)).execute()}(d,f),function(i,n){if(n.depth>0){r.virtualPiece?r.virtualPiece.updateData(!1,i,"normal",t,e):(r.virtualPiece=new Vm(i,t,e),h.add(r.virtualPiece)),n.piece._onclickEvent&&n.piece.off("click",n.piece._onclickEvent);var o=function(t){r._rootToNode(n.parentNode)};n.piece._onclickEvent=o,r.virtualPiece.on("click",o)}else r.virtualPiece&&(h.remove(r.virtualPiece),r.virtualPiece=null)}(l,u),n&&n.highlight&&n.highlight.piece){var p=t.getShallow("highlightPolicy");n.highlight.piece.onEmphasis(p)}else if(n&&n.unhighlight){var g=this.virtualPiece;!g&&l.children.length&&(g=l.children[0].piece),g&&g.onNormal()}this._initEvents(),this._oldChildren=d},dispose:function(){},_initEvents:function(){var t=this,e=function(e){var i=!1;t.seriesModel.getViewRoot().eachNode(function(n){if(!i&&n.piece&&n.piece.childAt(0)===e.target){var o=n.getModel().get("nodeClick");if("rootToNode"===o)t._rootToNode(n);else if("link"===o){var a=n.getModel(),r=a.get("link");if(r){var s=a.get("target",!0)||"_blank";window.open(r,s)}}i=!0}})};this.group._onclickEvent&&this.group.off("click",this.group._onclickEvent),this.group.on("click",e),this.group._onclickEvent=e},_rootToNode:function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:"sunburstRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},containPoint:function(t,e){var i=e.getData().getItemLayout(0);if(i){var n=t[0]-i.cx,o=t[1]-i.cy,a=Math.sqrt(n*n+o*o);return a<=i.r&&a>=i.r0}}});var GP="sunburstRootToNode";Es({type:GP,update:"updateView"},function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},function(e,i){var n=ld(t,[GP],e);if(n){var o=e.getViewRoot();o&&(t.direction=hd(o,n.node)?"rollUp":"drillDown"),e.resetViewRoot(n.node)}})});var FP="sunburstHighlight";Es({type:FP,update:"updateView"},function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},function(e,i){var n=ld(t,[FP],e);n&&(t.highlight=n.node)})});Es({type:"sunburstUnhighlight",update:"updateView"},function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},function(e,i){t.unhighlight=!0})});var WP=Math.PI/180;Bs(v(uC,"sunburst")),zs(v(function(t,e,i,n){e.eachSeriesByType(t,function(t){var e=t.get("center"),n=t.get("radius");y(n)||(n=[0,n]),y(e)||(e=[e,e]);var o=i.getWidth(),a=i.getHeight(),r=Math.min(o,a),s=Vo(e[0],o),l=Vo(e[1],a),u=Vo(n[0],r/2),h=Vo(n[1],r/2),c=-t.get("startAngle")*WP,f=t.get("minAngle")*WP,p=t.getData().tree.root,g=t.getViewRoot(),m=g.depth,v=t.get("sort");null!=v&&Zm(g,v);var x=0;d(g.children,function(t){!isNaN(t.getValue())&&x++});var _=g.getValue(),w=Math.PI/(_||x)*2,b=g.depth>0,S=g.height-(b?-1:1),M=(h-u)/(S||1),I=t.get("clockwise"),T=t.get("stillShowZeroSum"),A=I?1:-1,D=function(t,e){if(t){var i=e;if(t!==p){var n=t.getValue(),o=0===_&&T?w:n*w;on[1]&&n.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:n[1],r0:n[0]},api:{coord:m(function(n){var o=e.dataToRadius(n[0]),a=i.dataToAngle(n[1]),r=t.coordToPoint([o,a]);return r.push(o,a*Math.PI/180),r}),size:m(qm,t)}}},calendar:function(t){var e=t.getRect(),i=t.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:t.getCellWidth(),cellHeight:t.getCellHeight(),rangeInfo:{start:i.start,end:i.end,weeks:i.weeks,dayCount:i.allDay}},api:{coord:function(e,i){return t.dataToPoint(e,i)}}}}};YI.extend({type:"series.custom",dependencies:["grid","polar","geo","singleAxis","calendar"],defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,useTransform:!0},getInitialData:function(t,e){return ml(this.getSource(),this)},getDataParams:function(t,e,i){var n=YI.prototype.getDataParams.apply(this,arguments);return i&&(n.info=i.info),n}}),Ar.extend({type:"custom",_data:null,render:function(t,e,i,n){var o=this._data,a=t.getData(),r=this.group,s=Qm(t,a,e,i);a.diff(o).add(function(e){ev(null,e,s(e,n),t,r,a)}).update(function(e,i){ev(o.getItemGraphicEl(i),e,s(e,n),t,r,a)}).remove(function(t){var e=o.getItemGraphicEl(t);e&&r.remove(e)}).execute(),this._data=a},incrementalPrepareRender:function(t,e,i){this.group.removeAll(),this._data=null},incrementalRender:function(t,e,i,n,o){for(var a=e.getData(),r=Qm(e,a,i,n),s=t.start;s=0;l--)null==o[l]?o.splice(l,1):delete o[l].$action},_flatten:function(t,e,i){d(t,function(t){if(t){i&&(t.parentOption=i),e.push(t);var n=t.children;"group"===t.type&&n&&this._flatten(n,e,t),delete t.children}},this)},useElOptionsToUpdate:function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t}});Ws({type:"graphic",init:function(t,e){this._elMap=R(),this._lastGraphicModel},render:function(t,e,i){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,i)},_updateElements:function(t){var e=t.useElOptionsToUpdate();if(e){var i=this._elMap,n=this.group;d(e,function(e){var o=e.$action,a=e.id,r=i.get(a),s=e.parentId,l=null!=s?i.get(s):n,u=e.style;"text"===e.type&&u&&(e.hv&&e.hv[1]&&(u.textVerticalAlign=u.textBaseline=null),!u.hasOwnProperty("textFill")&&u.fill&&(u.textFill=u.fill),!u.hasOwnProperty("textStroke")&&u.stroke&&(u.textStroke=u.stroke));var h=fv(e);o&&"merge"!==o?"replace"===o?(dv(r,i),cv(a,l,h,i)):"remove"===o&&dv(r,i):r?r.attr(h):cv(a,l,h,i);var c=i.get(a);c&&(c.__ecGraphicWidth=e.width,c.__ecGraphicHeight=e.height,yv(c,t))})}},_relocate:function(t,e){for(var i=t.option.elements,n=this.group,o=this._elMap,a=i.length-1;a>=0;a--){var r=i[a],s=o.get(r.id);if(s){var l=s.parent;da(s,r,l===n?{width:e.getWidth(),height:e.getHeight()}:{width:l.__ecGraphicWidth||0,height:l.__ecGraphicHeight||0},null,{hv:r.hv,boundingMode:r.bounding})}}},_clear:function(){var t=this._elMap;t.each(function(e){dv(e,t)}),this._elMap=R()},dispose:function(){this._clear()}});var KP=Fs({type:"legend.plain",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(t,e,i){this.mergeDefaultAndTheme(t,i),t.selected=t.selected||{}},mergeOption:function(t){KP.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,i=0;i=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}}});Es("legendToggleSelect","legendselectchanged",v(xv,"toggleSelected")),Es("legendSelect","legendselected",v(xv,"select")),Es("legendUnSelect","legendunselected",v(xv,"unSelect"));var $P=v,JP=d,QP=tb,tN=Ws({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new QP),this._backgroundEl,this._isFirstRender=!0},getContentGroup:function(){return this._contentGroup},render:function(t,e,i){var n=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),t.get("show",!0)){var o=t.get("align");o&&"auto"!==o||(o="right"===t.get("left")&&"vertical"===t.get("orient")?"right":"left"),this.renderInner(o,t,e,i);var a=t.getBoxLayoutParams(),s={width:i.getWidth(),height:i.getHeight()},l=t.get("padding"),u=ca(a,s,l),h=this.layoutInner(t,o,u,n),c=ca(r({width:h.width,height:h.height},a),s,l);this.group.attr("position",[c.x-h.x,c.y-h.y]),this.group.add(this._backgroundEl=wv(h,t))}},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl)},renderInner:function(t,e,i,n){var o=this.getContentGroup(),a=R(),r=e.get("selectedMode"),s=[];i.eachRawSeries(function(t){!t.get("legendHoverLink")&&s.push(t.id)}),JP(e.getData(),function(l,u){var h=l.get("name");if(this.newlineDisabled||""!==h&&"\n"!==h){var c=i.getSeriesByName(h)[0];if(!a.get(h))if(c){var d=c.getData(),f=d.getVisual("color");"function"==typeof f&&(f=f(c.getDataParams(0)));var p=d.getVisual("legendSymbol")||"roundRect",g=d.getVisual("symbol");this._createItem(h,u,l,e,p,g,t,f,r).on("click",$P(bv,h,n)).on("mouseover",$P(Sv,c.name,null,n,s)).on("mouseout",$P(Mv,c.name,null,n,s)),a.set(h,!0)}else i.eachRawSeries(function(i){if(!a.get(h)&&i.legendDataProvider){var o=i.legendDataProvider(),c=o.indexOfName(h);if(c<0)return;var d=o.getItemVisual(c,"color");this._createItem(h,u,l,e,"roundRect",null,t,d,r).on("click",$P(bv,h,n)).on("mouseover",$P(Sv,null,h,n,s)).on("mouseout",$P(Mv,null,h,n,s)),a.set(h,!0)}},this)}else o.add(new QP({newline:!0}))},this)},_createItem:function(t,e,i,n,o,r,s,l,u){var h=n.get("itemWidth"),c=n.get("itemHeight"),d=n.get("inactiveColor"),f=n.get("symbolKeepAspect"),p=n.isSelected(t),g=new QP,m=i.getModel("textStyle"),v=i.get("icon"),y=i.getModel("tooltip"),x=y.parentModel;if(o=v||o,g.add(Jl(o,0,0,h,c,p?l:d,null==f||f)),!v&&r&&(r!==o||"none"===r)){var _=.8*c;"none"===r&&(r="circle"),g.add(Jl(r,(h-_)/2,(c-_)/2,_,_,p?l:d,null==f||f))}var w="left"===s?h+5:-5,b=s,S=n.get("formatter"),M=t;"string"==typeof S&&S?M=S.replace("{name}",null!=t?t:""):"function"==typeof S&&(M=S(t)),g.add(new rM({style:mo({},m,{text:M,x:w,y:c/2,textFill:p?m.getTextColor():d,textAlign:b,textVerticalAlign:"middle"})}));var I=new yM({shape:g.getBoundingRect(),invisible:!0,tooltip:y.get("show")?a({content:t,formatter:x.get("formatter",!0)||function(){return t},formatterParams:{componentType:"legend",legendIndex:n.componentIndex,name:t,$vars:["name"]}},y.option):null});return g.add(I),g.eachChild(function(t){t.silent=!0}),I.silent=!u,this.getContentGroup().add(g),fo(g),g.__legendDataIndex=e,g},layoutInner:function(t,e,i){var n=this.getContentGroup();aI(t.get("orient"),n,t.get("itemGap"),i.width,i.height);var o=n.getBoundingRect();return n.attr("position",[-o.x,-o.y]),this.group.getBoundingRect()},remove:function(){this.getContentGroup().removeAll(),this._isFirstRender=!0}});Os(function(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries(function(t){for(var i=0;ii[l],p=[-c.x,-c.y];n||(p[s]=o.position[s]);var g=[0,0],m=[-d.x,-d.y],v=A(t.get("pageButtonGap",!0),t.get("itemGap",!0));f&&("end"===t.get("pageButtonPosition",!0)?m[s]+=i[l]-d[l]:g[s]+=d[l]+v),m[1-s]+=c[u]/2-d[u]/2,o.attr("position",p),a.attr("position",g),r.attr("position",m);var y=this.group.getBoundingRect();if((y={x:0,y:0})[l]=f?i[l]:c[l],y[u]=Math.max(c[u],d[u]),y[h]=Math.min(0,d[h]+m[1-s]),a.__rectSize=i[l],f){var x={x:0,y:0};x[l]=Math.max(i[l]-d[l]-v,0),x[u]=y[u],a.setClipPath(new yM({shape:x})),a.__rectSize=x[l]}else r.eachChild(function(t){t.attr({invisible:!0,silent:!0})});var _=this._getPageInfo(t);return null!=_.pageIndex&&Io(o,{position:_.contentPosition},!!f&&t),this._updatePageInfoView(t,_),y},_pageGo:function(t,e,i){var n=this._getPageInfo(e)[t];null!=n&&i.dispatchAction({type:"legendScroll",scrollDataIndex:n,legendId:e.id})},_updatePageInfoView:function(t,e){var i=this._controllerGroup;d(["pagePrev","pageNext"],function(n){var o=null!=e[n+"DataIndex"],a=i.childOfName(n);a&&(a.setStyle("fill",o?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),a.cursor=o?"pointer":"default")});var n=i.childOfName("pageText"),o=t.get("pageFormatter"),a=e.pageIndex,r=null!=a?a+1:0,s=e.pageCount;n&&o&&n.setStyle("text",_(o)?o.replace("{current}",r).replace("{total}",s):o({current:r,total:s}))},_getPageInfo:function(t){function e(t){if(t){var e=t.getBoundingRect(),i=e[l]+t.position[r];return{s:i,e:i+e[s],i:t.__legendDataIndex}}}function i(t,e){return t.e>=e&&t.s<=e+a}var n=t.get("scrollDataIndex",!0),o=this.getContentGroup(),a=this._containerGroup.__rectSize,r=t.getOrient().index,s=nN[r],l=oN[r],u=this._findTargetItemIndex(n),h=o.children(),c=h[u],d=h.length,f=d?1:0,p={contentPosition:o.position.slice(),pageCount:f,pageIndex:f-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!c)return p;var g=e(c);p.contentPosition[r]=-g.s;for(var m=u+1,v=g,y=g,x=null;m<=d;++m)(!(x=e(h[m]))&&y.e>v.s+a||x&&!i(x,v.s))&&(v=y.i>v.i?y:x)&&(null==p.pageNextDataIndex&&(p.pageNextDataIndex=v.i),++p.pageCount),y=x;for(var m=u-1,v=g,y=g,x=null;m>=-1;--m)(x=e(h[m]))&&i(y,x.s)||!(v.i=0;){var r=o.indexOf("|}"),s=o.substr(a+"{marker".length,r-a-"{marker".length);s.indexOf("sub")>-1?n["marker"+s]={textWidth:4,textHeight:4,textBorderRadius:2,textBackgroundColor:e[s],textOffset:[3,0]}:n["marker"+s]={textWidth:10,textHeight:10,textBorderRadius:5,textBackgroundColor:e[s]},a=(o=o.substr(r+1)).indexOf("{marker")}this.el=new rM({style:{rich:n,text:t,textLineHeight:20,textBackgroundColor:i.get("backgroundColor"),textBorderRadius:i.get("borderRadius"),textFill:i.get("textStyle.color"),textPadding:i.get("padding")},z:i.get("z")}),this._zr.add(this.el);var l=this;this.el.on("mouseover",function(){l._enterable&&(clearTimeout(l._hideTimeout),l._show=!0),l._inContent=!0}),this.el.on("mouseout",function(){l._enterable&&l._show&&l.hideLater(l._hideDelay),l._inContent=!1})},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el.getBoundingRect();return[t.width,t.height]},moveTo:function(t,e){this.el&&this.el.attr("position",[t,e])},hide:function(){this.el.hide(),this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(m(this.hide,this),t)):this.hide())},isShow:function(){return this._show},getOuterSize:function(){return this.getSize()}};var uN=m,hN=d,cN=Vo,dN=new yM({shape:{x:-1,y:-1,width:2,height:2}});Ws({type:"tooltip",init:function(t,e){if(!U_.node){var i=t.getComponent("tooltip").get("renderMode");this._renderMode=Hi(i);var n;"html"===this._renderMode?(n=new Cv(e.getDom(),e),this._newLine="
            "):(n=new Lv(e),this._newLine="\n"),this._tooltipContent=n}},render:function(t,e,i){if(!U_.node){this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=i,this._lastDataByCoordSys=null,this._alwaysShowContent=t.get("alwaysShowContent");var n=this._tooltipContent;n.update(),n.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow()}},_initGlobalListener:function(){var t=this._tooltipModel.get("triggerOn");um("itemTooltip",this._api,uN(function(e,i,n){"none"!==t&&(t.indexOf(e)>=0?this._tryShow(i,n):"leave"===e&&this._hide(n))},this))},_keepShow:function(){var t=this._tooltipModel,e=this._ecModel,i=this._api;if(null!=this._lastX&&null!=this._lastY&&"none"!==t.get("triggerOn")){var n=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){n.manuallyShowTip(t,e,i,{x:n._lastX,y:n._lastY})})}},manuallyShowTip:function(t,e,i,n){if(n.from!==this.uid&&!U_.node){var o=Pv(n,i);this._ticket="";var a=n.dataByCoordSys;if(n.tooltip&&null!=n.x&&null!=n.y){var r=dN;r.position=[n.x,n.y],r.update(),r.tooltip=n.tooltip,this._tryShow({offsetX:n.x,offsetY:n.y,target:r},o)}else if(a)this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,event:{},dataByCoordSys:n.dataByCoordSys,tooltipOption:n.tooltipOption},o);else if(null!=n.seriesIndex){if(this._manuallyAxisShowTip(t,e,i,n))return;var s=xP(n,e),l=s.point[0],u=s.point[1];null!=l&&null!=u&&this._tryShow({offsetX:l,offsetY:u,position:n.position,target:s.el,event:{}},o)}else null!=n.x&&null!=n.y&&(i.dispatchAction({type:"updateAxisPointer",x:n.x,y:n.y}),this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,target:i.getZr().findHover(n.x,n.y).target,event:{}},o))}},manuallyHideTip:function(t,e,i,n){var o=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,n.from!==this.uid&&this._hide(Pv(n,i))},_manuallyAxisShowTip:function(t,e,i,n){var o=n.seriesIndex,a=n.dataIndex,r=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=o&&null!=a&&null!=r){var s=e.getSeriesByIndex(o);if(s&&"axis"===(t=kv([s.getData().getItemModel(a),s,(s.coordinateSystem||{}).model,t])).get("trigger"))return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:a,position:n.position}),!0}},_tryShow:function(t,e){var i=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var n=t.dataByCoordSys;n&&n.length?this._showAxisTooltip(n,t):i&&null!=i.dataIndex?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(t,i,e)):i&&i.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(t,i,e)):(this._lastDataByCoordSys=null,this._hide(e))}},_showOrMove:function(t,e){var i=t.get("showDelay");e=m(e,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(e,i):e()},_showAxisTooltip:function(t,e){var i=this._ecModel,o=this._tooltipModel,a=[e.offsetX,e.offsetY],r=[],s=[],l=kv([e.tooltipOption,o]),u=this._renderMode,h=this._newLine,c={};hN(t,function(t){hN(t.dataByAxis,function(t){var e=i.getComponent(t.axisDim+"Axis",t.axisIndex),o=t.value,a=[];if(e&&null!=o){var l=Im(o,e.axis,i,t.seriesDataIndices,t.valueLabelOpt);d(t.seriesDataIndices,function(r){var h=i.getSeriesByIndex(r.seriesIndex),d=r.dataIndexInside,f=h&&h.getDataParams(d);if(f.axisDim=t.axisDim,f.axisIndex=t.axisIndex,f.axisType=t.axisType,f.axisId=t.axisId,f.axisValue=Xl(e.axis,o),f.axisValueLabel=l,f){s.push(f);var p,g=h.formatTooltip(d,!0,null,u);if(w(g)){p=g.html;var m=g.markers;n(c,m)}else p=g;a.push(p)}});var f=l;"html"!==u?r.push(a.join(h)):r.push((f?ia(f)+h:"")+a.join(h))}})},this),r.reverse(),r=r.join(this._newLine+this._newLine);var f=e.position;this._showOrMove(l,function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(l,f,a[0],a[1],this._tooltipContent,s):this._showTooltipContent(l,r,s,Math.random(),a[0],a[1],f,void 0,c)})},_showSeriesItemTooltip:function(t,e,i){var n=this._ecModel,o=e.seriesIndex,a=n.getSeriesByIndex(o),r=e.dataModel||a,s=e.dataIndex,l=e.dataType,u=r.getData(),h=kv([u.getItemModel(s),r,a&&(a.coordinateSystem||{}).model,this._tooltipModel]),c=h.get("trigger");if(null==c||"item"===c){var d,f,p=r.getDataParams(s,l),g=r.formatTooltip(s,!1,l,this._renderMode);w(g)?(d=g.html,f=g.markers):(d=g,f=null);var m="item_"+r.name+"_"+s;this._showOrMove(h,function(){this._showTooltipContent(h,d,p,m,t.offsetX,t.offsetY,t.position,t.target,f)}),i({type:"showTip",dataIndexInside:s,dataIndex:u.getRawIndex(s),seriesIndex:o,from:this.uid})}},_showComponentItemTooltip:function(t,e,i){var n=e.tooltip;if("string"==typeof n){var o=n;n={content:o,formatter:o}}var a=new No(n,this._tooltipModel,this._ecModel),r=a.get("content"),s=Math.random();this._showOrMove(a,function(){this._showTooltipContent(a,r,a.get("formatterParams")||{},s,t.offsetX,t.offsetY,t.position,e)}),i({type:"showTip",from:this.uid})},_showTooltipContent:function(t,e,i,n,o,a,r,s,l){if(this._ticket="",t.get("showContent")&&t.get("show")){var u=this._tooltipContent,h=t.get("formatter");r=r||t.get("position");var c=e;if(h&&"string"==typeof h)c=na(h,i,!0);else if("function"==typeof h){var d=uN(function(e,n){e===this._ticket&&(u.setContent(n,l,t),this._updatePosition(t,r,o,a,u,i,s))},this);this._ticket=n,c=h(i,n,d)}u.setContent(c,l,t),u.show(t),this._updatePosition(t,r,o,a,u,i,s)}},_updatePosition:function(t,e,i,n,o,a,r){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var u=o.getSize(),h=t.get("align"),c=t.get("verticalAlign"),d=r&&r.getBoundingRect().clone();if(r&&d.applyTransform(r.transform),"function"==typeof e&&(e=e([i,n],a,o.el,d,{viewSize:[s,l],contentSize:u.slice()})),y(e))i=cN(e[0],s),n=cN(e[1],l);else if(w(e)){e.width=u[0],e.height=u[1];var f=ca(e,{width:s,height:l});i=f.x,n=f.y,h=null,c=null}else"string"==typeof e&&r?(i=(p=Ev(e,d,u))[0],n=p[1]):(i=(p=Nv(i,n,o,s,l,h?null:20,c?null:20))[0],n=p[1]);if(h&&(i-=Rv(h)?u[0]/2:"right"===h?u[0]:0),c&&(n-=Rv(c)?u[1]/2:"bottom"===c?u[1]:0),t.get("confine")){var p=Ov(i,n,o,s,l);i=p[0],n=p[1]}o.moveTo(i,n)},_updateContentNotChangedOnAxis:function(t){var e=this._lastDataByCoordSys,i=!!e&&e.length===t.length;return i&&hN(e,function(e,n){var o=e.dataByAxis||{},a=(t[n]||{}).dataByAxis||[];(i&=o.length===a.length)&&hN(o,function(t,e){var n=a[e]||{},o=t.seriesDataIndices||[],r=n.seriesDataIndices||[];(i&=t.value===n.value&&t.axisType===n.axisType&&t.axisId===n.axisId&&o.length===r.length)&&hN(o,function(t,e){var n=r[e];i&=t.seriesIndex===n.seriesIndex&&t.dataIndex===n.dataIndex})})}),this._lastDataByCoordSys=t,!!i},_hide:function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},dispose:function(t,e){U_.node||(this._tooltipContent.hide(),gm("itemTooltip",e))}}),Es({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},function(){}),Es({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},function(){}),Gv.prototype={constructor:Gv,pointToData:function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},dataToRadius:aD.prototype.dataToCoord,radiusToData:aD.prototype.coordToData},u(Gv,aD);var fN=Bi();Fv.prototype={constructor:Fv,pointToData:function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},dataToAngle:aD.prototype.dataToCoord,angleToData:aD.prototype.coordToData,calculateCategoryInterval:function(){var t=this,e=t.getLabelModel(),i=t.scale,n=i.getExtent(),o=i.count();if(n[1]-n[0]<1)return 0;var a=n[0],r=t.dataToCoord(a+1)-t.dataToCoord(a),s=Math.abs(r),l=ke(a,e.getFont(),"center","top"),u=Math.max(l.height,7)/s;isNaN(u)&&(u=1/0);var h=Math.max(0,Math.floor(u)),c=fN(t.model),d=c.lastAutoInterval,f=c.lastTickCount;return null!=d&&null!=f&&Math.abs(d-h)<=1&&Math.abs(f-o)<=1&&d>h?h=d:(c.lastTickCount=o,c.lastAutoInterval=h),h}},u(Fv,aD);var pN=function(t){this.name=t||"",this.cx=0,this.cy=0,this._radiusAxis=new Gv,this._angleAxis=new Fv,this._radiusAxis.polar=this._angleAxis.polar=this};pN.prototype={type:"polar",axisPointerEnabled:!0,constructor:pN,dimensions:["radius","angle"],model:null,containPoint:function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},containData:function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},getAxis:function(t){return this["_"+t+"Axis"]},getAxes:function(){return[this._radiusAxis,this._angleAxis]},getAxesByScale:function(t){var e=[],i=this._angleAxis,n=this._radiusAxis;return i.scale.type===t&&e.push(i),n.scale.type===t&&e.push(n),e},getAngleAxis:function(){return this._angleAxis},getRadiusAxis:function(){return this._radiusAxis},getOtherAxis:function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},getTooltipAxes:function(t){var e=null!=t&&"auto"!==t?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},dataToPoint:function(t,e){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},pointToData:function(t,e){var i=this.pointToCoord(t);return[this._radiusAxis.radiusToData(i[0],e),this._angleAxis.angleToData(i[1],e)]},pointToCoord:function(t){var e=t[0]-this.cx,i=t[1]-this.cy,n=this.getAngleAxis(),o=n.getExtent(),a=Math.min(o[0],o[1]),r=Math.max(o[0],o[1]);n.inverse?a=r-360:r=a+360;var s=Math.sqrt(e*e+i*i);e/=s,i/=s;for(var l=Math.atan2(-i,e)/Math.PI*180,u=lr;)l+=360*u;return[s,l]},coordToPoint:function(t){var e=t[0],i=t[1]/180*Math.PI;return[Math.cos(i)*e+this.cx,-Math.sin(i)*e+this.cy]}};var gN=lI.extend({type:"polarAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"polar",index:this.option.polarIndex,id:this.option.polarId})[0]}});n(gN.prototype,UA);var mN={angle:{startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:!1}},radius:{splitNumber:5}};ED("angle",gN,Wv,mN.angle),ED("radius",gN,Wv,mN.radius),Fs({type:"polar",dependencies:["polarAxis","angleAxis"],coordinateSystem:null,findAxisModel:function(t){var e;return this.ecModel.eachComponent(t,function(t){t.getCoordSysModel()===this&&(e=t)},this),e},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"80%"}});var vN={dimensions:pN.prototype.dimensions,create:function(t,e){var i=[];return t.eachComponent("polar",function(t,n){var o=new pN(n);o.update=Zv;var a=o.getRadiusAxis(),r=o.getAngleAxis(),s=t.findAxisModel("radiusAxis"),l=t.findAxisModel("angleAxis");Uv(a,s),Uv(r,l),Hv(o,t,e),i.push(o),t.coordinateSystem=o,o.model=t}),t.eachSeries(function(e){if("polar"===e.get("coordinateSystem")){var i=t.queryComponents({mainType:"polar",index:e.get("polarIndex"),id:e.get("polarId")})[0];e.coordinateSystem=i.coordinateSystem}}),i}};Fa.register("polar",vN);var yN=["axisLine","axisLabel","axisTick","splitLine","splitArea"];XD.extend({type:"angleAxis",axisPointerClass:"PolarAxisPointer",render:function(t,e){if(this.group.removeAll(),t.get("show")){var n=t.axis,o=n.polar,a=o.getRadiusAxis().getExtent(),r=n.getTicksCoords(),s=f(n.getViewLabels(),function(t){return(t=i(t)).coord=n.dataToCoord(t.tickValue),t});Yv(s),Yv(r),d(yN,function(e){!t.get(e+".show")||n.scale.isBlank()&&"axisLine"!==e||this["_"+e](t,o,r,a,s)},this)}},_axisLine:function(t,e,i,n){var o=t.getModel("axisLine.lineStyle"),a=new sM({shape:{cx:e.cx,cy:e.cy,r:n[jv(e)]},style:o.getLineStyle(),z2:1,silent:!0});a.style.fill=null,this.group.add(a)},_axisTick:function(t,e,i,n){var o=t.getModel("axisTick"),a=(o.get("inside")?-1:1)*o.get("length"),s=n[jv(e)],l=f(i,function(t){return new _M({shape:Xv(e,[s,s+a],t.coord)})});this.group.add(OM(l,{style:r(o.getModel("lineStyle").getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")})}))},_axisLabel:function(t,e,i,n,o){var a=t.getCategories(!0),r=t.getModel("axisLabel"),s=r.get("margin");d(o,function(i,o){var l=r,u=i.tickValue,h=n[jv(e)],c=e.coordToPoint([h+s,i.coord]),d=e.cx,f=e.cy,p=Math.abs(c[0]-d)/h<.3?"center":c[0]>d?"left":"right",g=Math.abs(c[1]-f)/h<.3?"middle":c[1]>f?"top":"bottom";a&&a[u]&&a[u].textStyle&&(l=new No(a[u].textStyle,r,r.ecModel));var m=new rM({silent:!0});this.group.add(m),mo(m.style,l,{x:c[0],y:c[1],textFill:l.getTextColor()||t.get("axisLine.lineStyle.color"),text:i.formattedLabel,textAlign:p,textVerticalAlign:g})},this)},_splitLine:function(t,e,i,n){var o=t.getModel("splitLine").getModel("lineStyle"),a=o.get("color"),s=0;a=a instanceof Array?a:[a];for(var l=[],u=0;u=0?"p":"n",M=y;v&&(n[r][b]||(n[r][b]={p:y,n:y}),M=n[r][b][S]);var I,T,A,D;if("radius"===h.dim){var C=h.dataToRadius(w)-y,L=a.dataToAngle(b);Math.abs(C)=0},kN.findTargetInfo=function(t,e){for(var i=this._targetInfoList,n=dy(e,t),o=0;o=0||AN(n,t.getAxis("y").model)>=0)&&a.push(t)}),e.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:a[0],coordSyses:a,getPanelRect:ON.grid,xAxisDeclared:r[t.id],yAxisDeclared:s[t.id]})}))},geo:function(t,e){TN(t.geoModels,function(t){var i=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:i,coordSyses:[i],getPanelRect:ON.geo})})}},NN=[function(t,e){var i=t.xAxisModel,n=t.yAxisModel,o=t.gridModel;return!o&&i&&(o=i.axis.grid.model),!o&&n&&(o=n.axis.grid.model),o&&o===e.gridModel},function(t,e){var i=t.geoModel;return i&&i===e.geoModel}],ON={grid:function(){return this.coordSys.grid.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(Ao(t)),e}},EN={lineX:DN(fy,0),lineY:DN(fy,1),rect:function(t,e,i){var n=e[CN[t]]([i[0][0],i[1][0]]),o=e[CN[t]]([i[0][1],i[1][1]]),a=[cy([n[0],o[0]]),cy([n[1],o[1]])];return{values:a,xyMinMax:a}},polygon:function(t,e,i){var n=[[1/0,-1/0],[1/0,-1/0]];return{values:f(i,function(i){var o=e[CN[t]](i);return n[0][0]=Math.min(n[0][0],o[0]),n[1][0]=Math.min(n[1][0],o[1]),n[0][1]=Math.max(n[0][1],o[0]),n[1][1]=Math.max(n[1][1],o[1]),o}),xyMinMax:n}}},RN={lineX:DN(py,0),lineY:DN(py,1),rect:function(t,e,i){return[[t[0][0]-i[0]*e[0][0],t[0][1]-i[0]*e[0][1]],[t[1][0]-i[1]*e[1][0],t[1][1]-i[1]*e[1][1]]]},polygon:function(t,e,i){return f(t,function(t,n){return[t[0]-i[0]*e[n][0],t[1]-i[1]*e[n][1]]})}},zN=["inBrush","outOfBrush"],BN="__ecBrushSelect",VN="__ecInBrushSelectEvent",GN=VT.VISUAL.BRUSH;zs(GN,function(t,e,i){t.eachComponent({mainType:"brush"},function(e){i&&"takeGlobalCursor"===i.type&&e.setBrushOption("brush"===i.key?i.brushOption:{brushType:!1}),(e.brushTargetManager=new hy(e.option,t)).setInputRanges(e.areas,t)})}),Bs(GN,function(t,e,n){var o,a,s=[];t.eachComponent({mainType:"brush"},function(e,n){function l(t){return"all"===m||v[t]}function u(t){return!!t.length}function h(t,e){var i=t.coordinateSystem;w|=i.hasAxisBrushed(),l(e)&&i.eachActiveState(t.getData(),function(t,e){"active"===t&&(x[e]=1)})}function c(i,n,o){var a=_y(i);if(a&&!wy(e,n)&&(d(b,function(n){a[n.brushType]&&e.brushTargetManager.controlSeries(n,i,t)&&o.push(n),w|=u(o)}),l(n)&&u(o))){var r=i.getData();r.each(function(t){xy(a,o,r,t)&&(x[t]=1)})}}var p={brushId:e.id,brushIndex:n,brushName:e.name,areas:i(e.areas),selected:[]};s.push(p);var g=e.option,m=g.brushLink,v=[],x=[],_=[],w=0;n||(o=g.throttleType,a=g.throttleDelay);var b=f(e.areas,function(t){return by(r({boundingRect:FN[t.brushType](t)},t))}),S=ty(e.option,zN,function(t){t.mappingMethod="fixed"});y(m)&&d(m,function(t){v[t]=1}),t.eachSeries(function(t,e){var i=_[e]=[];"parallel"===t.subType?h(t,e):c(t,e,i)}),t.eachSeries(function(t,e){var i={seriesId:t.id,seriesIndex:e,seriesName:t.name,dataIndex:[]};p.selected.push(i);var n=_y(t),o=_[e],a=t.getData(),r=l(e)?function(t){return x[t]?(i.dataIndex.push(a.getRawIndex(t)),"inBrush"):"outOfBrush"}:function(t){return xy(n,o,a,t)?(i.dataIndex.push(a.getRawIndex(t)),"inBrush"):"outOfBrush"};(l(e)?w:u(o))&&iy(zN,S,a,r)})}),vy(e,o,a,s,n)});var FN={lineX:B,lineY:B,rect:function(t){return Sy(t.range)},polygon:function(t){for(var e,i=t.range,n=0,o=i.length;ne[0][1]&&(e[0][1]=a[0]),a[1]e[1][1]&&(e[1][1]=a[1])}return e&&Sy(e)}},WN=["#ddd"];Fs({type:"brush",dependencies:["geo","grid","xAxis","yAxis","parallel","series"],defaultOption:{toolbox:null,brushLink:null,seriesIndex:"all",geoIndex:null,xAxisIndex:null,yAxisIndex:null,brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(120,140,180,0.3)",borderColor:"rgba(120,140,180,0.8)"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},areas:[],brushType:null,brushOption:{},coordInfoList:[],optionUpdated:function(t,e){var i=this.option;!e&&ey(i,t,["inBrush","outOfBrush"]);var n=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:WN},n.hasOwnProperty("liftZ")||(n.liftZ=5)},setAreas:function(t){t&&(this.areas=f(t,function(t){return My(this.option,t)},this))},setBrushOption:function(t){this.brushOption=My(this.option,t),this.brushType=this.brushOption.brushType}});Ws({type:"brush",init:function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new zf(e.getZr())).on("brush",m(this._onBrush,this)).mount()},render:function(t){return this.model=t,Iy.apply(this,arguments)},updateTransform:Iy,updateView:Iy,dispose:function(){this._brushController.dispose()},_onBrush:function(t,e){var n=this.model.id;this.model.brushTargetManager.setOutputRanges(t,this.ecModel),(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:n,areas:i(t),$from:n})}}),Es({type:"brush",event:"brush"},function(t,e){e.eachComponent({mainType:"brush",query:t},function(e){e.setAreas(t.areas)})}),Es({type:"brushSelect",event:"brushSelected",update:"none"},function(){});var HN={},ZN=rT.toolbox.brush;Dy.defaultOption={show:!0,type:["rect","polygon","lineX","lineY","keep","clear"],icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:i(ZN.title)};var UN=Dy.prototype;UN.render=UN.updateView=function(t,e,i){var n,o,a;e.eachComponent({mainType:"brush"},function(t){n=t.brushType,o=t.brushOption.brushMode||"single",a|=t.areas.length}),this._brushType=n,this._brushMode=o,d(t.get("type",!0),function(e){t.setIconStatus(e,("keep"===e?"multiple"===o:"clear"===e?a:e===n)?"emphasis":"normal")})},UN.getIcons=function(){var t=this.model,e=t.get("icon",!0),i={};return d(t.get("type",!0),function(t){e[t]&&(i[t]=e[t])}),i},UN.onclick=function(t,e,i){var n=this._brushType,o=this._brushMode;"clear"===i?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===i?n:n!==i&&i,brushMode:"keep"===i?"multiple"===o?"single":"multiple":o}})},Ty("brush",Dy),Ns(function(t,e){var i=t&&t.brush;if(y(i)||(i=i?[i]:[]),i.length){var n=[];d(i,function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(n=n.concat(e))});var o=t&&t.toolbox;y(o)&&(o=o[0]),o||(o={feature:{}},t.toolbox=[o]);var a=o.feature||(o.feature={}),r=a.brush||(a.brush={}),s=r.type||(r.type=[]);s.push.apply(s,n),Jv(s),e&&!s.length&&s.push.apply(s,SN)}});Cy.prototype={constructor:Cy,type:"calendar",dimensions:["time","value"],getDimensionsInfo:function(){return[{name:"time",type:"time"},"value"]},getRangeInfo:function(){return this._rangeInfo},getModel:function(){return this._model},getRect:function(){return this._rect},getCellWidth:function(){return this._sw},getCellHeight:function(){return this._sh},getOrient:function(){return this._orient},getFirstDayOfWeek:function(){return this._firstDayOfWeek},getDateInfo:function(t){var e=(t=Yo(t)).getFullYear(),i=t.getMonth()+1;i=i<10?"0"+i:i;var n=t.getDate();n=n<10?"0"+n:n;var o=t.getDay();return o=Math.abs((o+7-this.getFirstDayOfWeek())%7),{y:e,m:i,d:n,day:o,time:t.getTime(),formatedDate:e+"-"+i+"-"+n,date:t}},getNextNDay:function(t,e){return 0===(e=e||0)?this.getDateInfo(t):((t=new Date(this.getDateInfo(t).time)).setDate(t.getDate()+e),this.getDateInfo(t))},update:function(t,e){function i(t,e){return null!=t[e]&&"auto"!==t[e]}this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var n=this._rangeInfo.weeks||1,o=["width","height"],a=this._model.get("cellSize").slice(),r=this._model.getBoxLayoutParams(),s="horizontal"===this._orient?[n,7]:[7,n];d([0,1],function(t){i(a,t)&&(r[o[t]]=a[t]*s[t])});var l={width:e.getWidth(),height:e.getHeight()},u=this._rect=ca(r,l);d([0,1],function(t){i(a,t)||(a[t]=u[o[t]]/s[t])}),this._sw=a[0],this._sh=a[1]},dataToPoint:function(t,e){y(t)&&(t=t[0]),null==e&&(e=!0);var i=this.getDateInfo(t),n=this._rangeInfo,o=i.formatedDate;if(e&&!(i.time>=n.start.time&&i.timea.end.time&&t.reverse(),t},_getRangeInfo:function(t){var e;(t=[this.getDateInfo(t[0]),this.getDateInfo(t[1])])[0].time>t[1].time&&(e=!0,t.reverse());var i=Math.floor(t[1].time/864e5)-Math.floor(t[0].time/864e5)+1,n=new Date(t[0].time),o=n.getDate(),a=t[1].date.getDate();if(n.setDate(o+i-1),n.getDate()!==a)for(var r=n.getTime()-t[1].time>0?1:-1;n.getDate()!==a&&(n.getTime()-t[1].time)*r>0;)i-=r,n.setDate(o+i-1);var s=Math.floor((i+t[0].day+6)/7),l=e?1-s:s-1;return e&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:i,weeks:s,nthWeek:l,fweek:t[0].day,lweek:t[1].day}},_getDateByWeeksAndDay:function(t,e,i){var n=this._getRangeInfo(i);if(t>n.weeks||0===t&&en.lweek)return!1;var o=7*(t-1)-n.fweek+e,a=new Date(n.start.time);return a.setDate(n.start.d+o),this.getDateInfo(a)}},Cy.dimensions=Cy.prototype.dimensions,Cy.getDimensionsInfo=Cy.prototype.getDimensionsInfo,Cy.create=function(t,e){var i=[];return t.eachComponent("calendar",function(n){var o=new Cy(n,t,e);i.push(o),n.coordinateSystem=o}),t.eachSeries(function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("calendarIndex")||0])}),i},Fa.register("calendar",Cy);var XN=lI.extend({type:"calendar",coordinateSystem:null,defaultOption:{zlevel:0,z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",nameMap:"en",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",nameMap:"en",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},init:function(t,e,i,n){var o=ga(t);XN.superApply(this,"init",arguments),ky(t,o)},mergeOption:function(t,e){XN.superApply(this,"mergeOption",arguments),ky(this.option,t)}}),jN={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},YN={EN:["S","M","T","W","T","F","S"],CN:["日","一","二","三","四","五","六"]};Ws({type:"calendar",_tlpoints:null,_blpoints:null,_firstDayOfMonth:null,_firstDayPoints:null,render:function(t,e,i){var n=this.group;n.removeAll();var o=t.coordinateSystem,a=o.getRangeInfo(),r=o.getOrient();this._renderDayRect(t,a,n),this._renderLines(t,a,r,n),this._renderYearText(t,a,r,n),this._renderMonthText(t,r,n),this._renderWeekText(t,a,r,n)},_renderDayRect:function(t,e,i){for(var n=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),a=n.getCellWidth(),r=n.getCellHeight(),s=e.start.time;s<=e.end.time;s=n.getNextNDay(s,1).time){var l=n.dataToRect([s],!1).tl,u=new yM({shape:{x:l[0],y:l[1],width:a,height:r},cursor:"default",style:o});i.add(u)}},_renderLines:function(t,e,i,n){function o(e){a._firstDayOfMonth.push(r.getDateInfo(e)),a._firstDayPoints.push(r.dataToRect([e],!1).tl);var o=a._getLinePointsOfOneWeek(t,e,i);a._tlpoints.push(o[0]),a._blpoints.push(o[o.length-1]),l&&a._drawSplitline(o,s,n)}var a=this,r=t.coordinateSystem,s=t.getModel("splitLine.lineStyle").getLineStyle(),l=t.get("splitLine.show"),u=s.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var h=e.start,c=0;h.time<=e.end.time;c++){o(h.formatedDate),0===c&&(h=r.getDateInfo(e.start.y+"-"+e.start.m));var d=h.date;d.setMonth(d.getMonth()+1),h=r.getDateInfo(d)}o(r.getNextNDay(e.end.time,1).formatedDate),l&&this._drawSplitline(a._getEdgesPoints(a._tlpoints,u,i),s,n),l&&this._drawSplitline(a._getEdgesPoints(a._blpoints,u,i),s,n)},_getEdgesPoints:function(t,e,i){var n=[t[0].slice(),t[t.length-1].slice()],o="horizontal"===i?0:1;return n[0][o]=n[0][o]-e/2,n[1][o]=n[1][o]+e/2,n},_drawSplitline:function(t,e,i){var n=new gM({z2:20,shape:{points:t},style:e});i.add(n)},_getLinePointsOfOneWeek:function(t,e,i){var n=t.coordinateSystem;e=n.getDateInfo(e);for(var o=[],a=0;a<7;a++){var r=n.getNextNDay(e.time,a),s=n.dataToRect([r.time],!1);o[2*r.day]=s.tl,o[2*r.day+1]=s["horizontal"===i?"bl":"tr"]}return o},_formatterLabel:function(t,e){return"string"==typeof t&&t?oa(t,e):"function"==typeof t?t(e):e.nameMap},_yearTextPositionControl:function(t,e,i,n,o){e=e.slice();var a=["center","bottom"];"bottom"===n?(e[1]+=o,a=["center","top"]):"left"===n?e[0]-=o:"right"===n?(e[0]+=o,a=["center","top"]):e[1]-=o;var r=0;return"left"!==n&&"right"!==n||(r=Math.PI/2),{rotation:r,position:e,style:{textAlign:a[0],textVerticalAlign:a[1]}}},_renderYearText:function(t,e,i,n){var o=t.getModel("yearLabel");if(o.get("show")){var a=o.get("margin"),r=o.get("position");r||(r="horizontal"!==i?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,h="horizontal"===i?0:1,c={top:[l,s[h][1]],bottom:[l,s[1-h][1]],left:[s[1-h][0],u],right:[s[h][0],u]},d=e.start.y;+e.end.y>+e.start.y&&(d=d+"-"+e.end.y);var f=o.get("formatter"),p={start:e.start.y,end:e.end.y,nameMap:d},g=this._formatterLabel(f,p),m=new rM({z2:30});mo(m.style,o,{text:g}),m.attr(this._yearTextPositionControl(m,c[r],i,r,a)),n.add(m)}},_monthTextPositionControl:function(t,e,i,n,o){var a="left",r="top",s=t[0],l=t[1];return"horizontal"===i?(l+=o,e&&(a="center"),"start"===n&&(r="bottom")):(s+=o,e&&(r="middle"),"start"===n&&(a="right")),{x:s,y:l,textAlign:a,textVerticalAlign:r}},_renderMonthText:function(t,e,i){var n=t.getModel("monthLabel");if(n.get("show")){var o=n.get("nameMap"),r=n.get("margin"),s=n.get("position"),l=n.get("align"),u=[this._tlpoints,this._blpoints];_(o)&&(o=jN[o.toUpperCase()]||[]);var h="start"===s?0:1,c="horizontal"===e?0:1;r="start"===s?-r:r;for(var d="center"===l,f=0;f=r[0]&&t<=r[1]}if(t===this._dataZoomModel){var n=this._dimName,o=this.getTargetSeriesModels(),a=t.get("filterMode"),r=this._valueWindow;"none"!==a&&$N(o,function(t){var e=t.getData(),o=e.mapDimension(n,!0);o.length&&("weakFilter"===a?e.filterSelf(function(t){for(var i,n,a,s=0;sr[1];if(u&&!h&&!c)return!0;u&&(a=!0),h&&(i=!0),c&&(n=!0)}return a&&i&&n}):$N(o,function(n){if("empty"===a)t.setData(e.map(n,function(t){return i(t)?t:NaN}));else{var o={};o[n]=r,e.selectRange(o)}}),$N(o,function(t){e.setApproximateExtent(r,t)}))})}}};var tO=d,eO=KN,iO=Fs({type:"dataZoom",dependencies:["xAxis","yAxis","zAxis","radiusAxis","angleAxis","singleAxis","series"],defaultOption:{zlevel:0,z:4,orient:null,xAxisIndex:null,yAxisIndex:null,filterMode:"filter",throttle:null,start:0,end:100,startValue:null,endValue:null,minSpan:null,maxSpan:null,minValueSpan:null,maxValueSpan:null,rangeMode:null},init:function(t,e,i){this._dataIntervalByAxis={},this._dataInfo={},this._axisProxies={},this.textStyleModel,this._autoThrottle=!0,this._rangePropMode=["percent","percent"];var n=By(t);this.mergeDefaultAndTheme(t,i),this.doInit(n)},mergeOption:function(t){var e=By(t);n(this.option,t,!0),this.doInit(e)},doInit:function(t){var e=this.option;U_.canvasSupported||(e.realtime=!1),this._setDefaultThrottle(t),Vy(this,t),tO([["start","startValue"],["end","endValue"]],function(t,i){"value"===this._rangePropMode[i]&&(e[t[0]]=null)},this),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var t=this._axisProxies;this.eachTargetAxis(function(e,i,n,o){var a=this.dependentModels[e.axis][i],r=a.__dzAxisProxy||(a.__dzAxisProxy=new QN(e.name,i,this,o));t[e.name+"_"+i]=r},this)},_resetTarget:function(){var t=this.option,e=this._judgeAutoMode();eO(function(e){var i=e.axisIndex;t[i]=Di(t[i])},this),"axisIndex"===e?this._autoSetAxisIndex():"orient"===e&&this._autoSetOrient()},_judgeAutoMode:function(){var t=this.option,e=!1;eO(function(i){null!=t[i.axisIndex]&&(e=!0)},this);var i=t.orient;return null==i&&e?"orient":e?void 0:(null==i&&(t.orient="horizontal"),"axisIndex")},_autoSetAxisIndex:function(){var t=!0,e=this.get("orient",!0),i=this.option,n=this.dependentModels;if(t){var o="vertical"===e?"y":"x";n[o+"Axis"].length?(i[o+"AxisIndex"]=[0],t=!1):tO(n.singleAxis,function(n){t&&n.get("orient",!0)===e&&(i.singleAxisIndex=[n.componentIndex],t=!1)})}t&&eO(function(e){if(t){var n=[],o=this.dependentModels[e.axis];if(o.length&&!n.length)for(var a=0,r=o.length;a0?100:20}},getFirstTargetAxisModel:function(){var t;return eO(function(e){if(null==t){var i=this.get(e.axisIndex);i.length&&(t=this.dependentModels[e.axis][i[0]])}},this),t},eachTargetAxis:function(t,e){var i=this.ecModel;eO(function(n){tO(this.get(n.axisIndex),function(o){t.call(e,n,o,this,i)},this)},this)},getAxisProxy:function(t,e){return this._axisProxies[t+"_"+e]},getAxisModel:function(t,e){var i=this.getAxisProxy(t,e);return i&&i.getAxisModel()},setRawRange:function(t,e){var i=this.option;tO([["start","startValue"],["end","endValue"]],function(e){null==t[e[0]]&&null==t[e[1]]||(i[e[0]]=t[e[0]],i[e[1]]=t[e[1]])},this),!e&&Vy(this,t)},getPercentRange:function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},getValueRange:function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var i=this.findRepresentativeAxisProxy();return i?i.getDataValueWindow():void 0},findRepresentativeAxisProxy:function(t){if(t)return t.__dzAxisProxy;var e=this._axisProxies;for(var i in e)if(e.hasOwnProperty(i)&&e[i].hostedBy(this))return e[i];for(var i in e)if(e.hasOwnProperty(i)&&!e[i].hostedBy(this))return e[i]},getRangePropMode:function(){return this._rangePropMode.slice()}}),nO=qI.extend({type:"dataZoom",render:function(t,e,i,n){this.dataZoomModel=t,this.ecModel=e,this.api=i},getTargetCoordInfo:function(){function t(t,e,i,n){for(var o,a=0;a0&&e%g)p+=f;else{var i=null==t||isNaN(t)||""===t,n=i?0:aO(t,a,u,!0);i&&!l&&e?(c.push([c[c.length-1][0],0]),d.push([d[d.length-1][0],0])):!i&&l&&(c.push([p,0]),d.push([p,0])),c.push([p,n]),d.push([p,n]),p+=f,l=i}});var m=this.dataZoomModel;this._displayables.barGroup.add(new pM({shape:{points:c},style:r({fill:m.get("dataBackgroundColor")},m.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new gM({shape:{points:d},style:m.getModel("dataBackground.lineStyle").getLineStyle(),silent:!0,z2:-19}))}}},_prepareDataShadowInfo:function(){var t=this.dataZoomModel,e=t.get("showDataShadow");if(!1!==e){var i,n=this.ecModel;return t.eachTargetAxis(function(o,a){d(t.getAxisProxy(o.name,a).getTargetSeriesModels(),function(t){if(!(i||!0!==e&&l(cO,t.get("type"))<0)){var r,s=n.getComponent(o.axis,a).axis,u=Gy(o.name),h=t.coordinateSystem;null!=u&&h.getOtherAxis&&(r=h.getOtherAxis(s).inverse),u=t.getData().mapDimension(u),i={thisAxis:s,series:t,thisDim:o.name,otherDim:u,otherAxisInverse:r}}},this)},this),i}},_renderHandle:function(){var t=this._displayables,e=t.handles=[],i=t.handleLabels=[],n=this._displayables.barGroup,o=this._size,a=this.dataZoomModel;n.add(t.filler=new oO({draggable:!0,cursor:Fy(this._orient),drift:sO(this._onDragMove,this,"all"),onmousemove:function(t){mw(t.event)},ondragstart:sO(this._showDataInfo,this,!0),ondragend:sO(this._onDragEnd,this),onmouseover:sO(this._showDataInfo,this,!0),onmouseout:sO(this._showDataInfo,this,!1),style:{fill:a.get("fillerColor"),textPosition:"inside"}})),n.add(new oO($n({silent:!0,shape:{x:0,y:0,width:o[0],height:o[1]},style:{stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}}))),lO([0,1],function(t){var o=Po(a.get("handleIcon"),{cursor:Fy(this._orient),draggable:!0,drift:sO(this._onDragMove,this,t),onmousemove:function(t){mw(t.event)},ondragend:sO(this._onDragEnd,this),onmouseover:sO(this._showDataInfo,this,!0),onmouseout:sO(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),r=o.getBoundingRect();this._handleHeight=Vo(a.get("handleSize"),this._size[1]),this._handleWidth=r.width/r.height*this._handleHeight,o.setStyle(a.getModel("handleStyle").getItemStyle());var s=a.get("handleColor");null!=s&&(o.style.fill=s),n.add(e[t]=o);var l=a.textStyleModel;this.group.add(i[t]=new rM({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textVerticalAlign:"middle",textAlign:"center",textFill:l.getTextColor(),textFont:l.getFont()},z2:10}))},this)},_resetInterval:function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[aO(t[0],[0,100],e,!0),aO(t[1],[0,100],e,!0)]},_updateInterval:function(t,e){var i=this.dataZoomModel,n=this._handleEnds,o=this._getViewExtent(),a=i.findRepresentativeAxisProxy().getMinMaxSpan(),r=[0,100];QL(e,n,o,i.get("zoomLock")?"all":t,null!=a.minSpan?aO(a.minSpan,r,o,!0):null,null!=a.maxSpan?aO(a.maxSpan,r,o,!0):null);var s=this._range,l=this._range=rO([aO(n[0],o,r,!0),aO(n[1],o,r,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},_updateView:function(t){var e=this._displayables,i=this._handleEnds,n=rO(i.slice()),o=this._size;lO([0,1],function(t){var n=e.handles[t],a=this._handleHeight;n.attr({scale:[a/2,a/2],position:[i[t],o[1]/2-a/2]})},this),e.filler.setShape({x:n[0],y:0,width:n[1]-n[0],height:o[1]}),this._updateDataInfo(t)},_updateDataInfo:function(t){function e(t){var e=Ao(n.handles[t].parent,this.group),i=Co(0===t?"right":"left",e),s=this._handleWidth/2+hO,l=Do([c[t]+(0===t?-s:s),this._size[1]/2],e);o[t].setStyle({x:l[0],y:l[1],textVerticalAlign:a===uO?"middle":i,textAlign:a===uO?i:"center",text:r[t]})}var i=this.dataZoomModel,n=this._displayables,o=n.handleLabels,a=this._orient,r=["",""];if(i.get("showDetail")){var s=i.findRepresentativeAxisProxy();if(s){var l=s.getAxisModel().axis,u=this._range,h=t?s.calculateDataWindow({start:u[0],end:u[1]}).valueWindow:s.getDataValueWindow();r=[this._formatLabel(h[0],l),this._formatLabel(h[1],l)]}}var c=rO(this._handleEnds.slice());e.call(this,0),e.call(this,1)},_formatLabel:function(t,e){var i=this.dataZoomModel,n=i.get("labelFormatter"),o=i.get("labelPrecision");null!=o&&"auto"!==o||(o=e.getPixelPrecision());var a=null==t||isNaN(t)?"":"category"===e.type||"time"===e.type?e.scale.getLabel(Math.round(t)):t.toFixed(Math.min(o,20));return x(n)?n(t,a):_(n)?n.replace("{value}",a):a},_showDataInfo:function(t){t=this._dragging||t;var e=this._displayables.handleLabels;e[0].attr("invisible",!t),e[1].attr("invisible",!t)},_onDragMove:function(t,e,i){this._dragging=!0;var n=Do([e,i],this._displayables.barGroup.getLocalTransform(),!0),o=this._updateInterval(t,n[0]),a=this.dataZoomModel.get("realtime");this._updateView(!a),o&&a&&this._dispatchZoomAction()},_onDragEnd:function(){this._dragging=!1,this._showDataInfo(!1),!this.dataZoomModel.get("realtime")&&this._dispatchZoomAction()},_onClickPanelClick:function(t){var e=this._size,i=this._displayables.barGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(i[0]<0||i[0]>e[0]||i[1]<0||i[1]>e[1])){var n=this._handleEnds,o=(n[0]+n[1])/2,a=this._updateInterval("all",i[0]-o);this._updateView(),a&&this._dispatchZoomAction()}},_dispatchZoomAction:function(){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,start:t[0],end:t[1]})},_findCoordRect:function(){var t;if(lO(this.getTargetCoordInfo(),function(e){if(!t&&e.length){var i=e[0].model.coordinateSystem;t=i.getRect&&i.getRect()}}),!t){var e=this.api.getWidth(),i=this.api.getHeight();t={x:.2*e,y:.2*i,width:.6*e,height:.6*i}}return t}});iO.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}});var fO="\0_ec_dataZoom_roams",pO=m,gO=nO.extend({type:"dataZoom.inside",init:function(t,e){this._range},render:function(t,e,i,n){gO.superApply(this,"render",arguments),this._range=t.getPercentRange(),d(this.getTargetCoordInfo(),function(e,n){var o=f(e,function(t){return Zy(t.model)});d(e,function(e){var a=e.model,r={};d(["pan","zoom","scrollMove"],function(t){r[t]=pO(mO[t],this,e,n)},this),Wy(i,{coordId:Zy(a),allCoordIds:o,containsPoint:function(t,e,i){return a.coordinateSystem.containPoint([e,i])},dataZoomId:t.id,dataZoomModel:t,getRange:r})},this)},this)},dispose:function(){Hy(this.api,this.dataZoomModel.id),gO.superApply(this,"dispose",arguments),this._range=null}}),mO={zoom:function(t,e,i,n){var o=this._range,a=o.slice(),r=t.axisModels[0];if(r){var s=vO[e](null,[n.originX,n.originY],r,i,t),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],u=Math.max(1/n.scale,0);a[0]=(a[0]-l)*u+l,a[1]=(a[1]-l)*u+l;var h=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return QL(0,a,[0,100],0,h.minSpan,h.maxSpan),this._range=a,o[0]!==a[0]||o[1]!==a[1]?a:void 0}},pan:Ky(function(t,e,i,n,o,a){var r=vO[n]([a.oldX,a.oldY],[a.newX,a.newY],e,o,i);return r.signal*(t[1]-t[0])*r.pixel/r.pixelLength}),scrollMove:Ky(function(t,e,i,n,o,a){return vO[n]([0,0],[a.scrollDelta,a.scrollDelta],e,o,i).signal*(t[1]-t[0])*a.scrollDelta})},vO={grid:function(t,e,i,n,o){var a=i.axis,r={},s=o.model.coordinateSystem.getRect();return t=t||[0,0],"x"===a.dim?(r.pixel=e[0]-t[0],r.pixelLength=s.width,r.pixelStart=s.x,r.signal=a.inverse?1:-1):(r.pixel=e[1]-t[1],r.pixelLength=s.height,r.pixelStart=s.y,r.signal=a.inverse?-1:1),r},polar:function(t,e,i,n,o){var a=i.axis,r={},s=o.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),"radiusAxis"===i.mainType?(r.pixel=e[0]-t[0],r.pixelLength=l[1]-l[0],r.pixelStart=l[0],r.signal=a.inverse?1:-1):(r.pixel=e[1]-t[1],r.pixelLength=u[1]-u[0],r.pixelStart=u[0],r.signal=a.inverse?-1:1),r},singleAxis:function(t,e,i,n,o){var a=i.axis,r=o.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===a.orient?(s.pixel=e[0]-t[0],s.pixelLength=r.width,s.pixelStart=r.x,s.signal=a.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=r.height,s.pixelStart=r.y,s.signal=a.inverse?-1:1),s}};Os({getTargetSeries:function(t){var e=R();return t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,i,n){d(n.getAxisProxy(t.name,i).getTargetSeriesModels(),function(t){e.set(t.uid,t)})})}),e},modifyOutputEnd:!0,overallReset:function(t,e){t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,i,n){n.getAxisProxy(t.name,i).reset(n,e)}),t.eachTargetAxis(function(t,i,n){n.getAxisProxy(t.name,i).filterData(n,e)})}),t.eachComponent("dataZoom",function(t){var e=t.findRepresentativeAxisProxy(),i=e.getDataPercentWindow(),n=e.getDataValueWindow();t.setRawRange({start:i[0],end:i[1],startValue:n[0],endValue:n[1]},!0)})}}),Es("dataZoom",function(t,e){var i=Ny(m(e.eachComponent,e,"dataZoom"),KN,function(t,e){return t.get(e.axisIndex)}),n=[];e.eachComponent({mainType:"dataZoom",query:t},function(t,e){n.push.apply(n,i(t).nodes)}),d(n,function(e,i){e.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})});var yO=d,xO=function(t){var e=t&&t.visualMap;y(e)||(e=e?[e]:[]),yO(e,function(t){if(t){$y(t,"splitList")&&!$y(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var e=t.pieces;e&&y(e)&&yO(e,function(t){w(t)&&($y(t,"start")&&!$y(t,"min")&&(t.min=t.start),$y(t,"end")&&!$y(t,"max")&&(t.max=t.end))})}})};lI.registerSubTypeDefaulter("visualMap",function(t){return t.categories||(t.pieces?t.pieces.length>0:t.splitNumber>0)&&!t.calculable?"piecewise":"continuous"});var _O=VT.VISUAL.COMPONENT;Bs(_O,{createOnAllSeries:!0,reset:function(t,e){var i=[];return e.eachComponent("visualMap",function(e){var n=t.pipelineContext;!e.isTargetSeries(t)||n&&n.large||i.push(ny(e.stateList,e.targetVisuals,m(e.getValueState,e),e.getDataDimension(t.getData())))}),i}}),Bs(_O,{createOnAllSeries:!0,reset:function(t,e){var i=t.getData(),n=[];e.eachComponent("visualMap",function(e){if(e.isTargetSeries(t)){var o=e.getVisualMeta(m(Jy,null,t,e))||{stops:[],outerColors:[]},a=e.getDataDimension(i),r=i.getDimensionInfo(a);null!=r&&(o.dimension=r.index,n.push(o))}}),t.getData().setVisual("visualMeta",n)}});var wO={get:function(t,e,n){var o=i((bO[t]||{})[e]);return n&&y(o)?o[o.length-1]:o}},bO={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},SO=hL.mapVisual,MO=hL.eachVisual,IO=y,TO=d,AO=Fo,DO=Bo,CO=B,LO=Fs({type:"visualMap",dependencies:["series"],stateList:["inRange","outOfRange"],replacableOptionKeys:["inRange","outOfRange","target","controller","color"],dataBound:[-1/0,1/0],layoutMode:{type:"box",ignoreSize:!0},defaultOption:{show:!0,zlevel:0,z:4,seriesIndex:"all",min:0,max:200,dimension:null,inRange:null,outOfRange:null,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,color:null,formatter:null,text:null,textStyle:{color:"#333"}},init:function(t,e,i){this._dataExtent,this.targetVisuals={},this.controllerVisuals={},this.textStyleModel,this.itemSize,this.mergeDefaultAndTheme(t,i)},optionUpdated:function(t,e){var i=this.option;U_.canvasSupported||(i.realtime=!1),!e&&ey(i,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},resetVisual:function(t){var e=this.stateList;t=m(t,this),this.controllerVisuals=ty(this.option.controller,e,t),this.targetVisuals=ty(this.option.target,e,t)},getTargetSeriesIndices:function(){var t=this.option.seriesIndex,e=[];return null==t||"all"===t?this.ecModel.eachSeries(function(t,i){e.push(i)}):e=Di(t),e},eachTargetSeries:function(t,e){d(this.getTargetSeriesIndices(),function(i){t.call(e,this.ecModel.getSeriesByIndex(i))},this)},isTargetSeries:function(t){var e=!1;return this.eachTargetSeries(function(i){i===t&&(e=!0)}),e},formatValueText:function(t,e,i){function n(t){return t===l[0]?"min":t===l[1]?"max":(+t).toFixed(Math.min(s,20))}var o,a,r=this.option,s=r.precision,l=this.dataBound,u=r.formatter;return i=i||["<",">"],y(t)&&(t=t.slice(),o=!0),a=e?t:o?[n(t[0]),n(t[1])]:n(t),_(u)?u.replace("{value}",o?a[0]:a).replace("{value2}",o?a[1]:a):x(u)?o?u(t[0],t[1]):u(t):o?t[0]===l[0]?i[0]+" "+a[1]:t[1]===l[1]?i[1]+" "+a[0]:a[0]+" - "+a[1]:a},resetExtent:function(){var t=this.option,e=AO([t.min,t.max]);this._dataExtent=e},getDataDimension:function(t){var e=this.option.dimension,i=t.dimensions;if(null!=e||i.length){if(null!=e)return t.getDimension(e);for(var n=t.dimensions,o=n.length-1;o>=0;o--){var a=n[o];if(!t.getDimensionInfo(a).isCalculationCoord)return a}}},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){function t(t){IO(o.color)&&!t.inRange&&(t.inRange={color:o.color.slice().reverse()}),t.inRange=t.inRange||{color:e.get("gradientColor")},TO(this.stateList,function(e){var i=t[e];if(_(i)){var n=wO.get(i,"active",l);n?(t[e]={},t[e][i]=n):delete t[e]}},this)}var e=this.ecModel,o=this.option,a={inRange:o.inRange,outOfRange:o.outOfRange},r=o.target||(o.target={}),s=o.controller||(o.controller={});n(r,a),n(s,a);var l=this.isCategory();t.call(this,r),t.call(this,s),function(t,e,i){var n=t[e],o=t[i];n&&!o&&(o=t[i]={},TO(n,function(t,e){if(hL.isValidType(e)){var i=wO.get(e,"inactive",l);null!=i&&(o[e]=i,"color"!==e||o.hasOwnProperty("opacity")||o.hasOwnProperty("colorAlpha")||(o.opacity=[0,0]))}}))}.call(this,r,"inRange","outOfRange"),function(t){var e=(t.inRange||{}).symbol||(t.outOfRange||{}).symbol,n=(t.inRange||{}).symbolSize||(t.outOfRange||{}).symbolSize,o=this.get("inactiveColor");TO(this.stateList,function(a){var r=this.itemSize,s=t[a];s||(s=t[a]={color:l?o:[o]}),null==s.symbol&&(s.symbol=e&&i(e)||(l?"roundRect":["roundRect"])),null==s.symbolSize&&(s.symbolSize=n&&i(n)||(l?r[0]:[r[0],r[0]])),s.symbol=SO(s.symbol,function(t){return"none"===t||"square"===t?"roundRect":t});var u=s.symbolSize;if(null!=u){var h=-1/0;MO(u,function(t){t>h&&(h=t)}),s.symbolSize=SO(u,function(t){return DO(t,[0,h],[0,r[0]],!0)})}},this)}.call(this,s)},resetItemSize:function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},isCategory:function(){return!!this.option.categories},setSelected:CO,getValueState:CO,getVisualMeta:CO}),kO=[20,140],PO=LO.extend({type:"visualMap.continuous",defaultOption:{align:"auto",calculable:!1,range:null,realtime:!0,itemHeight:null,itemWidth:null,hoverLink:!0,hoverLinkDataSize:null,hoverLinkOnHandle:null},optionUpdated:function(t,e){PO.superApply(this,"optionUpdated",arguments),this.resetExtent(),this.resetVisual(function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()}),this._resetRange()},resetItemSize:function(){PO.superApply(this,"resetItemSize",arguments);var t=this.itemSize;"horizontal"===this._orient&&t.reverse(),(null==t[0]||isNaN(t[0]))&&(t[0]=kO[0]),(null==t[1]||isNaN(t[1]))&&(t[1]=kO[1])},_resetRange:function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):y(e)&&(e[0]>e[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},completeVisualOption:function(){LO.prototype.completeVisualOption.apply(this,arguments),d(this.stateList,function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=0)},this)},setSelected:function(t){this.option.range=t.slice(),this._resetRange()},getSelected:function(){var t=this.getExtent(),e=Fo((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]=i[1]||t<=e[1])?"inRange":"outOfRange"},findTargetDataIndices:function(t){var e=[];return this.eachTargetSeries(function(i){var n=[],o=i.getData();o.each(this.getDataDimension(o),function(e,i){t[0]<=e&&e<=t[1]&&n.push(i)},this),e.push({seriesId:i.id,dataIndex:n})},this),e},getVisualMeta:function(t){function e(e,i){o.push({value:e,color:t(e,i)})}for(var i=Qy(0,0,this.getExtent()),n=Qy(0,0,this.option.range.slice()),o=[],a=0,r=0,s=n.length,l=i.length;rt[1])break;i.push({color:this.getControllerVisual(a,"color",e),offset:o/100})}return i.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),i},_createBarPoints:function(t,e){var i=this.visualMapModel.itemSize;return[[i[0]-e[0],t[0]],[i[0],t[0]],[i[0],t[1]],[i[0]-e[1],t[1]]]},_createBarGroup:function(t){var e=this._orient,i=this.visualMapModel.get("inverse");return new tb("horizontal"!==e||i?"horizontal"===e&&i?{scale:"bottom"===t?[-1,1]:[1,1],rotation:-Math.PI/2}:"vertical"!==e||i?{scale:"left"===t?[1,1]:[-1,1]}:{scale:"left"===t?[1,-1]:[-1,-1]}:{scale:"bottom"===t?[1,1]:[-1,1],rotation:Math.PI/2})},_updateHandle:function(t,e){if(this._useHandle){var i=this._shapes,n=this.visualMapModel,o=i.handleThumbs,a=i.handleLabels;EO([0,1],function(r){var s=o[r];s.setStyle("fill",e.handlesColor[r]),s.position[1]=t[r];var l=Do(i.handleLabelPoints[r],Ao(s,this.group));a[r].setStyle({x:l[0],y:l[1],text:n.formatValueText(this._dataInterval[r]),textVerticalAlign:"middle",textAlign:this._applyTransform("horizontal"===this._orient?0===r?"bottom":"top":"left",i.barGroup)})},this)}},_showIndicator:function(t,e,i,n){var o=this.visualMapModel,a=o.getExtent(),r=o.itemSize,s=[0,r[1]],l=OO(t,a,s,!0),u=this._shapes,h=u.indicator;if(h){h.position[1]=l,h.attr("invisible",!1),h.setShape("points",ox(!!i,n,l,r[1]));var c={convertOpacityToAlpha:!0},d=this.getControllerVisual(t,"color",c);h.setStyle("fill",d);var f=Do(u.indicatorLabelPoint,Ao(h,this.group)),p=u.indicatorLabel;p.attr("invisible",!1);var g=this._applyTransform("left",u.barGroup),m=this._orient;p.setStyle({text:(i||"")+o.formatValueText(e),textVerticalAlign:"horizontal"===m?g:"middle",textAlign:"horizontal"===m?"center":g,x:f[0],y:f[1]})}},_enableHoverLinkToSeries:function(){var t=this;this._shapes.barGroup.on("mousemove",function(e){if(t._hovering=!0,!t._dragging){var i=t.visualMapModel.itemSize,n=t._applyTransform([e.offsetX,e.offsetY],t._shapes.barGroup,!0,!0);n[1]=RO(zO(0,n[1]),i[1]),t._doHoverLinkToSeries(n[1],0<=n[0]&&n[0]<=i[0])}}).on("mouseout",function(){t._hovering=!1,!t._dragging&&t._clearHoverLinkToSeries()})},_enableHoverLinkFromSeries:function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},_doHoverLinkToSeries:function(t,e){var i=this.visualMapModel,n=i.itemSize;if(i.option.hoverLink){var o=[0,n[1]],a=i.getExtent();t=RO(zO(o[0],t),o[1]);var r=ax(i,a,o),s=[t-r,t+r],l=OO(t,o,a,!0),u=[OO(s[0],o,a,!0),OO(s[1],o,a,!0)];s[0]o[1]&&(u[1]=1/0),e&&(u[0]===-1/0?this._showIndicator(l,u[1],"< ",r):u[1]===1/0?this._showIndicator(l,u[0],"> ",r):this._showIndicator(l,l,"≈ ",r));var h=this._hoverLinkDataIndices,c=[];(e||rx(i))&&(c=this._hoverLinkDataIndices=i.findTargetDataIndices(u));var d=Ri(h,c);this._dispatchHighDown("downplay",ex(d[0])),this._dispatchHighDown("highlight",ex(d[1]))}},_hoverLinkFromSeriesMouseOver:function(t){var e=t.target,i=this.visualMapModel;if(e&&null!=e.dataIndex){var n=this.ecModel.getSeriesByIndex(e.seriesIndex);if(i.isTargetSeries(n)){var o=n.getData(e.dataType),a=o.get(i.getDataDimension(o),e.dataIndex,!0);isNaN(a)||this._showIndicator(a,a)}}},_hideIndicator:function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0)},_clearHoverLinkToSeries:function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",ex(t)),t.length=0},_clearHoverLinkFromSeries:function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},_applyTransform:function(t,e,i,n){var o=Ao(e,n?null:this.group);return zM[y(t)?"applyTransform":"transformDirection"](t,o,i)},_dispatchHighDown:function(t,e){e&&e.length&&this.api.dispatchAction({type:t,batch:e})},dispose:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},remove:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()}});Es({type:"selectDataRange",event:"dataRangeSelected",update:"update"},function(t,e){e.eachComponent({mainType:"visualMap",query:t},function(e){e.setSelected(t.selected)})}),Ns(xO);var FO=LO.extend({type:"visualMap.piecewise",defaultOption:{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieceList:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0,showLabel:null},optionUpdated:function(t,e){FO.superApply(this,"optionUpdated",arguments),this._pieceList=[],this.resetExtent();var n=this._mode=this._determineMode();WO[this._mode].call(this),this._resetSelected(t,e);var o=this.option.categories;this.resetVisual(function(t,e){"categories"===n?(t.mappingMethod="category",t.categories=i(o)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=f(this._pieceList,function(t){var t=i(t);return"inRange"!==e&&(t.visual=null),t}))})},completeVisualOption:function(){function t(t,e,i){return t&&t[e]&&(w(t[e])?t[e].hasOwnProperty(i):t[e]===i)}var e=this.option,i={},n=hL.listVisualTypes(),o=this.isCategory();d(e.pieces,function(t){d(n,function(e){t.hasOwnProperty(e)&&(i[e]=1)})}),d(i,function(i,n){var a=0;d(this.stateList,function(i){a|=t(e,i,n)||t(e.target,i,n)},this),!a&&d(this.stateList,function(t){(e[t]||(e[t]={}))[n]=wO.get(n,"inRange"===t?"active":"inactive",o)})},this),LO.prototype.completeVisualOption.apply(this,arguments)},_resetSelected:function(t,e){var i=this.option,n=this._pieceList,o=(e?i:t).selected||{};if(i.selected=o,d(n,function(t,e){var i=this.getSelectedMapKey(t);o.hasOwnProperty(i)||(o[i]=!0)},this),"single"===i.selectedMode){var a=!1;d(n,function(t,e){var i=this.getSelectedMapKey(t);o[i]&&(a?o[i]=!1:a=!0)},this)}},getSelectedMapKey:function(t){return"categories"===this._mode?t.value+"":t.index+""},getPieceList:function(){return this._pieceList},_determineMode:function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},setSelected:function(t){this.option.selected=i(t)},getValueState:function(t){var e=hL.findPieceIndex(t,this._pieceList);return null!=e&&this.option.selected[this.getSelectedMapKey(this._pieceList[e])]?"inRange":"outOfRange"},findTargetDataIndices:function(t){var e=[];return this.eachTargetSeries(function(i){var n=[],o=i.getData();o.each(this.getDataDimension(o),function(e,i){hL.findPieceIndex(e,this._pieceList)===t&&n.push(i)},this),e.push({seriesId:i.id,dataIndex:n})},this),e},getRepresentValue:function(t){var e;if(this.isCategory())e=t.value;else if(null!=t.value)e=t.value;else{var i=t.interval||[];e=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return e},getVisualMeta:function(t){function e(e,a){var r=o.getRepresentValue({interval:e});a||(a=o.getValueState(r));var s=t(r,a);e[0]===-1/0?n[0]=s:e[1]===1/0?n[1]=s:i.push({value:e[0],color:s},{value:e[1],color:s})}if(!this.isCategory()){var i=[],n=[],o=this,a=this._pieceList.slice();if(a.length){var r=a[0].interval[0];r!==-1/0&&a.unshift({interval:[-1/0,r]}),(r=a[a.length-1].interval[1])!==1/0&&a.push({interval:[r,1/0]})}else a.push({interval:[-1/0,1/0]});var s=-1/0;return d(a,function(t){var i=t.interval;i&&(i[0]>s&&e([s,i[0]],"outOfRange"),e(i.slice()),s=i[1])},this),{stops:i,outerColors:n}}}}),WO={splitNumber:function(){var t=this.option,e=this._pieceList,i=Math.min(t.precision,20),n=this.getExtent(),o=t.splitNumber;o=Math.max(parseInt(o,10),1),t.splitNumber=o;for(var a=(n[1]-n[0])/o;+a.toFixed(i)!==a&&i<5;)i++;t.precision=i,a=+a.toFixed(i);var r=0;t.minOpen&&e.push({index:r++,interval:[-1/0,n[0]],close:[0,0]});for(var s=n[0],l=r+o;r","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,i)},this)}};NO.extend({type:"visualMap.piecewise",doRender:function(){var t=this.group;t.removeAll();var e=this.visualMapModel,i=e.get("textGap"),n=e.textStyleModel,o=n.getFont(),a=n.getTextColor(),r=this._getItemAlign(),s=e.itemSize,l=this._getViewData(),u=l.endsText,h=T(e.get("showLabel",!0),!u);u&&this._renderEndsText(t,u[0],s,h,r),d(l.viewPieceList,function(n){var l=n.piece,u=new tb;u.onclick=m(this._onItemClick,this,l),this._enableHoverLink(u,n.indexInModelPieceList);var c=e.getRepresentValue(l);if(this._createItemSymbol(u,c,[0,0,s[0],s[1]]),h){var d=this.visualMapModel.getValueState(c);u.add(new rM({style:{x:"right"===r?-i:s[0]+i,y:s[1]/2,text:l.text,textVerticalAlign:"middle",textAlign:r,textFont:o,textFill:a,opacity:"outOfRange"===d?.5:1}}))}t.add(u)},this),u&&this._renderEndsText(t,u[1],s,h,r),aI(e.get("orient"),t,e.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},_enableHoverLink:function(t,e){function i(t){var i=this.visualMapModel;i.option.hoverLink&&this.api.dispatchAction({type:t,batch:ex(i.findTargetDataIndices(e))})}t.on("mouseover",m(i,this,"highlight")).on("mouseout",m(i,this,"downplay"))},_getItemAlign:function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return tx(t,this.api,t.itemSize);var i=e.align;return i&&"auto"!==i||(i="left"),i},_renderEndsText:function(t,e,i,n,o){if(e){var a=new tb,r=this.visualMapModel.textStyleModel;a.add(new rM({style:{x:n?"right"===o?i[0]:0:i[0]/2,y:i[1]/2,textVerticalAlign:"middle",textAlign:n?o:"center",text:e,textFont:r.getFont(),textFill:r.getTextColor()}})),t.add(a)}},_getViewData:function(){var t=this.visualMapModel,e=f(t.getPieceList(),function(t,e){return{piece:t,indexInModelPieceList:e}}),i=t.get("text"),n=t.get("orient"),o=t.get("inverse");return("horizontal"===n?o:!o)?e.reverse():i&&(i=i.slice().reverse()),{viewPieceList:e,endsText:i}},_createItemSymbol:function(t,e,i){t.add(Jl(this.getControllerVisual(e,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(e,"color")))},_onItemClick:function(t){var e=this.visualMapModel,n=e.option,o=i(n.selected),a=e.getSelectedMapKey(t);"single"===n.selectedMode?(o[a]=!0,d(o,function(t,e){o[e]=e===a})):o[a]=!o[a],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}});Ns(xO);var HO=ta,ZO=ia,UO=Fs({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,i,n){this.mergeDefaultAndTheme(t,i),this.mergeOption(t,i,n.createdBySelf,!0)},isAnimationEnabled:function(){if(U_.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},mergeOption:function(t,e,i,n){var o=this.constructor,r=this.mainType+"Model";i||e.eachSeries(function(t){var i=t.get(this.mainType,!0),s=t[r];i&&i.data?(s?s.mergeOption(i,e,!0):(n&&ux(i),d(i.data,function(t){t instanceof Array?(ux(t[0]),ux(t[1])):ux(t)}),a(s=new o(i,this,e),{mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0}),s.__hostSeries=t),t[r]=s):t[r]=null},this)},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),n=y(i)?f(i,HO).join(", "):HO(i),o=e.getName(t),a=ZO(this.name);return(null!=i||o)&&(a+="
            "),o&&(a+=ZO(o),null!=i&&(a+=" : ")),null!=i&&(a+=ZO(n)),a},getData:function(){return this._data},setData:function(t){this._data=t}});h(UO,ZI),UO.extend({type:"markPoint",defaultOption:{zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}}});var XO=l,jO=v,YO={min:jO(dx,"min"),max:jO(dx,"max"),average:jO(dx,"average")},qO=Ws({type:"marker",init:function(){this.markerGroupMap=R()},render:function(t,e,i){var n=this.markerGroupMap;n.each(function(t){t.__keep=!1});var o=this.type+"Model";e.eachSeries(function(t){var n=t[o];n&&this.renderSeries(t,n,e,i)},this),n.each(function(t){!t.__keep&&this.group.remove(t.group)},this)},renderSeries:function(){}});qO.extend({type:"markPoint",updateTransform:function(t,e,i){e.eachSeries(function(t){var e=t.markPointModel;e&&(xx(e.getData(),t,i),this.markerGroupMap.get(t.id).updateLayout(e))},this)},renderSeries:function(t,e,i,n){var o=t.coordinateSystem,a=t.id,r=t.getData(),s=this.markerGroupMap,l=s.get(a)||s.set(a,new Du),u=_x(o,t,e);e.setData(u),xx(e.getData(),t,n),u.each(function(t){var i=u.getItemModel(t),n=i.getShallow("symbolSize");"function"==typeof n&&(n=n(e.getRawValue(t),e.getDataParams(t))),u.setItemVisual(t,{symbolSize:n,color:i.get("itemStyle.color")||r.getVisual("color"),symbol:i.getShallow("symbol")})}),l.updateData(u),this.group.add(l.group),u.eachItemGraphicEl(function(t){t.traverse(function(t){t.dataModel=e})}),l.__keep=!0,l.group.silent=e.get("silent")||t.get("silent")}}),Ns(function(t){t.markPoint=t.markPoint||{}}),UO.extend({type:"markLine",defaultOption:{zlevel:0,z:5,symbol:["circle","arrow"],symbolSize:[8,16],precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end"},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"}});var KO=function(t,e,o,r){var s=t.getData(),l=r.type;if(!y(r)&&("min"===l||"max"===l||"average"===l||"median"===l||null!=r.xAxis||null!=r.yAxis)){var u,h;if(null!=r.yAxis||null!=r.xAxis)u=null!=r.yAxis?"y":"x",e.getAxis(u),h=T(r.yAxis,r.xAxis);else{var c=px(r,s,e,t);u=c.valueDataDim,c.valueAxis,h=yx(s,u,l)}var d="x"===u?0:1,f=1-d,p=i(r),g={};p.type=null,p.coord=[],g.coord=[],p.coord[f]=-1/0,g.coord[f]=1/0;var m=o.get("precision");m>=0&&"number"==typeof h&&(h=+h.toFixed(Math.min(m,20))),p.coord[d]=g.coord[d]=h,r=[p,g,{type:l,valueIndex:r.valueIndex,value:h}]}return r=[fx(t,r[0]),fx(t,r[1]),a({},r[2])],r[2].type=r[2].type||"",n(r[2],r[0]),n(r[2],r[1]),r};qO.extend({type:"markLine",updateTransform:function(t,e,i){e.eachSeries(function(t){var e=t.markLineModel;if(e){var n=e.getData(),o=e.__from,a=e.__to;o.each(function(e){Ix(o,e,!0,t,i),Ix(a,e,!1,t,i)}),n.each(function(t){n.setItemLayout(t,[o.getItemLayout(t),a.getItemLayout(t)])}),this.markerGroupMap.get(t.id).updateLayout()}},this)},renderSeries:function(t,e,i,n){function o(e,i,o){var a=e.getItemModel(i);Ix(e,i,o,t,n),e.setItemVisual(i,{symbolSize:a.get("symbolSize")||g[o?0:1],symbol:a.get("symbol",!0)||p[o?0:1],color:a.get("itemStyle.color")||s.getVisual("color")})}var a=t.coordinateSystem,r=t.id,s=t.getData(),l=this.markerGroupMap,u=l.get(r)||l.set(r,new sf);this.group.add(u.group);var h=Tx(a,t,e),c=h.from,d=h.to,f=h.line;e.__from=c,e.__to=d,e.setData(f);var p=e.get("symbol"),g=e.get("symbolSize");y(p)||(p=[p,p]),"number"==typeof g&&(g=[g,g]),h.from.each(function(t){o(c,t,!0),o(d,t,!1)}),f.each(function(t){var e=f.getItemModel(t).get("lineStyle.color");f.setItemVisual(t,{color:e||c.getItemVisual(t,"color")}),f.setItemLayout(t,[c.getItemLayout(t),d.getItemLayout(t)]),f.setItemVisual(t,{fromSymbolSize:c.getItemVisual(t,"symbolSize"),fromSymbol:c.getItemVisual(t,"symbol"),toSymbolSize:d.getItemVisual(t,"symbolSize"),toSymbol:d.getItemVisual(t,"symbol")})}),u.updateData(f),h.line.eachItemGraphicEl(function(t,i){t.traverse(function(t){t.dataModel=e})}),u.__keep=!0,u.group.silent=e.get("silent")||t.get("silent")}}),Ns(function(t){t.markLine=t.markLine||{}}),UO.extend({type:"markArea",defaultOption:{zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}}});var $O=function(t,e,i,n){var a=fx(t,n[0]),r=fx(t,n[1]),s=T,l=a.coord,u=r.coord;l[0]=s(l[0],-1/0),l[1]=s(l[1],-1/0),u[0]=s(u[0],1/0),u[1]=s(u[1],1/0);var h=o([{},a,r]);return h.coord=[a.coord,r.coord],h.x0=a.x,h.y0=a.y,h.x1=r.x,h.y1=r.y,h},JO=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];qO.extend({type:"markArea",updateTransform:function(t,e,i){e.eachSeries(function(t){var e=t.markAreaModel;if(e){var n=e.getData();n.each(function(e){var o=f(JO,function(o){return Lx(n,e,o,t,i)});n.setItemLayout(e,o),n.getItemGraphicEl(e).setShape("points",o)})}},this)},renderSeries:function(t,e,i,n){var o=t.coordinateSystem,a=t.id,s=t.getData(),l=this.markerGroupMap,u=l.get(a)||l.set(a,{group:new tb});this.group.add(u.group),u.__keep=!0;var h=kx(o,t,e);e.setData(h),h.each(function(e){h.setItemLayout(e,f(JO,function(i){return Lx(h,e,i,t,n)})),h.setItemVisual(e,{color:s.getVisual("color")})}),h.diff(u.__data).add(function(t){var e=new pM({shape:{points:h.getItemLayout(t)}});h.setItemGraphicEl(t,e),u.group.add(e)}).update(function(t,i){var n=u.__data.getItemGraphicEl(i);Io(n,{shape:{points:h.getItemLayout(t)}},e,t),u.group.add(n),h.setItemGraphicEl(t,n)}).remove(function(t){var e=u.__data.getItemGraphicEl(t);u.group.remove(e)}).execute(),h.eachItemGraphicEl(function(t,i){var n=h.getItemModel(i),o=n.getModel("label"),a=n.getModel("emphasis.label"),s=h.getItemVisual(i,"color");t.useStyle(r(n.getModel("itemStyle").getItemStyle(),{fill:Yt(s,.4),stroke:s})),t.hoverStyle=n.getModel("emphasis.itemStyle").getItemStyle(),go(t.style,t.hoverStyle,o,a,{labelFetcher:e,labelDataIndex:i,defaultText:h.getName(i)||"",isRectText:!0,autoColor:s}),fo(t,{}),t.dataModel=e}),u.__data=h,u.group.silent=e.get("silent")||t.get("silent")}}),Ns(function(t){t.markArea=t.markArea||{}});lI.registerSubTypeDefaulter("timeline",function(){return"slider"}),Es({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(t,e){var i=e.getComponent("timeline");return i&&null!=t.currentIndex&&(i.setCurrentIndex(t.currentIndex),!i.get("loop",!0)&&i.isIndexMax()&&i.setPlayState(!1)),e.resetOption("timeline"),r({currentIndex:i.option.currentIndex},t)}),Es({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(t,e){var i=e.getComponent("timeline");i&&null!=t.playState&&i.setPlayState(t.playState)});var QO=lI.extend({type:"timeline",layoutMode:"box",defaultOption:{zlevel:0,z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},init:function(t,e,i){this._data,this._names,this.mergeDefaultAndTheme(t,i),this._initData()},mergeOption:function(t){QO.superApply(this,"mergeOption",arguments),this._initData()},setCurrentIndex:function(t){null==t&&(t=this.option.currentIndex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(t>=e&&(t=e-1),t<0&&(t=0)),this.option.currentIndex=t},getCurrentIndex:function(){return this.option.currentIndex},isIndexMax:function(){return this.getCurrentIndex()>=this._data.count()-1},setPlayState:function(t){this.option.autoPlay=!!t},getPlayState:function(){return!!this.option.autoPlay},_initData:function(){var t=this.option,e=t.data||[],n=t.axisType,o=this._names=[];if("category"===n){var a=[];d(e,function(t,e){var n,r=Li(t);w(t)?(n=i(t)).value=e:n=e,a.push(n),_(r)||null!=r&&!isNaN(r)||(r=""),o.push(r+"")}),e=a}var r={category:"ordinal",time:"time"}[n]||"number";(this._data=new vA([{name:"value",type:r}],this)).initData(e,o)},getData:function(){return this._data},getCategories:function(){if("category"===this.get("axisType"))return this._names.slice()}});h(QO.extend({type:"timeline.slider",defaultOption:{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"emptyCircle",symbolSize:10,lineStyle:{show:!0,width:2,color:"#304654"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#304654"},itemStyle:{color:"#304654",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:13,color:"#c23531",borderWidth:5,borderColor:"rgba(194,53,49, 0.5)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:22,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"path://M18.6,50.8l22.5-22.5c0.2-0.2,0.3-0.4,0.3-0.7c0-0.3-0.1-0.5-0.3-0.7L18.7,4.4c-0.1-0.1-0.2-0.3-0.2-0.5 c0-0.4,0.3-0.8,0.8-0.8c0.2,0,0.5,0.1,0.6,0.3l23.5,23.5l0,0c0.2,0.2,0.3,0.4,0.3,0.7c0,0.3-0.1,0.5-0.3,0.7l-0.1,0.1L19.7,52 c-0.1,0.1-0.3,0.2-0.5,0.2c-0.4,0-0.8-0.3-0.8-0.8C18.4,51.2,18.5,51,18.6,50.8z",prevIcon:"path://M43,52.8L20.4,30.3c-0.2-0.2-0.3-0.4-0.3-0.7c0-0.3,0.1-0.5,0.3-0.7L42.9,6.4c0.1-0.1,0.2-0.3,0.2-0.5 c0-0.4-0.3-0.8-0.8-0.8c-0.2,0-0.5,0.1-0.6,0.3L18.3,28.8l0,0c-0.2,0.2-0.3,0.4-0.3,0.7c0,0.3,0.1,0.5,0.3,0.7l0.1,0.1L41.9,54 c0.1,0.1,0.3,0.2,0.5,0.2c0.4,0,0.8-0.3,0.8-0.8C43.2,53.2,43.1,53,43,52.8z",color:"#304654",borderColor:"#304654",borderWidth:1},emphasis:{label:{show:!0,color:"#c23531"},itemStyle:{color:"#c23531"},controlStyle:{color:"#c23531",borderColor:"#c23531",borderWidth:2}},data:[]}}),ZI);var tE=qI.extend({type:"timeline"}),eE=function(t,e,i,n){aD.call(this,t,e,i),this.type=n||"value",this.model=null};eE.prototype={constructor:eE,getLabelModel:function(){return this.model.getModel("label")},isHorizontal:function(){return"horizontal"===this.model.get("orient")}},u(eE,aD);var iE=m,nE=d,oE=Math.PI;tE.extend({type:"timeline.slider",init:function(t,e){this.api=e,this._axis,this._viewRect,this._timer,this._currentPointer,this._mainGroup,this._labelGroup},render:function(t,e,i,n){if(this.model=t,this.api=i,this.ecModel=e,this.group.removeAll(),t.get("show",!0)){var o=this._layout(t,i),a=this._createGroup("mainGroup"),r=this._createGroup("labelGroup"),s=this._axis=this._createAxis(o,t);t.formatTooltip=function(t){return ia(s.scale.getLabel(t))},nE(["AxisLine","AxisTick","Control","CurrentPointer"],function(e){this["_render"+e](o,a,s,t)},this),this._renderAxisLabel(o,r,s,t),this._position(o,t)}this._doPlayStop()},remove:function(){this._clearTimer(),this.group.removeAll()},dispose:function(){this._clearTimer()},_layout:function(t,e){var i=t.get("label.position"),n=t.get("orient"),o=Ex(t,e);null==i||"auto"===i?i="horizontal"===n?o.y+o.height/2=0||"+"===i?"left":"right"},r={horizontal:i>=0||"+"===i?"top":"bottom",vertical:"middle"},s={horizontal:0,vertical:oE/2},l="vertical"===n?o.height:o.width,u=t.getModel("controlStyle"),h=u.get("show",!0),c=h?u.get("itemSize"):0,d=h?u.get("itemGap"):0,f=c+d,p=t.get("label.rotate")||0;p=p*oE/180;var g,m,v,y,x=u.get("position",!0),_=h&&u.get("showPlayBtn",!0),w=h&&u.get("showPrevBtn",!0),b=h&&u.get("showNextBtn",!0),S=0,M=l;return"left"===x||"bottom"===x?(_&&(g=[0,0],S+=f),w&&(m=[S,0],S+=f),b&&(v=[M-c,0],M-=f)):(_&&(g=[M-c,0],M-=f),w&&(m=[0,0],S+=f),b&&(v=[M-c,0],M-=f)),y=[S,M],t.get("inverse")&&y.reverse(),{viewRect:o,mainLength:l,orient:n,rotation:s[n],labelRotation:p,labelPosOpt:i,labelAlign:t.get("label.align")||a[n],labelBaseline:t.get("label.verticalAlign")||t.get("label.baseline")||r[n],playPosition:g,prevBtnPosition:m,nextBtnPosition:v,axisExtent:y,controlSize:c,controlGap:d}},_position:function(t,e){function i(t){var e=t.position;t.origin=[c[0][0]-e[0],c[1][0]-e[1]]}function n(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function o(t,e,i,n,o){t[n]+=i[n][o]-e[n][o]}var a=this._mainGroup,r=this._labelGroup,s=t.viewRect;if("vertical"===t.orient){var l=xt(),u=s.x,h=s.y+s.height;St(l,l,[-u,-h]),Mt(l,l,-oE/2),St(l,l,[u,h]),(s=s.clone()).applyTransform(l)}var c=n(s),d=n(a.getBoundingRect()),f=n(r.getBoundingRect()),p=a.position,g=r.position;g[0]=p[0]=c[0][0];var m=t.labelPosOpt;if(isNaN(m))o(p,d,c,1,v="+"===m?0:1),o(g,f,c,1,1-v);else{var v=m>=0?0:1;o(p,d,c,1,v),g[1]=p[1]+m}a.attr("position",p),r.attr("position",g),a.rotation=r.rotation=t.rotation,i(a),i(r)},_createAxis:function(t,e){var i=e.getData(),n=e.get("axisType"),o=Hl(e,n);o.getTicks=function(){return i.mapArray(["value"],function(t){return t})};var a=i.getDataExtent("value");o.setExtent(a[0],a[1]),o.niceTicks();var r=new eE("value",o,t.axisExtent,n);return r.model=e,r},_createGroup:function(t){var e=this["_"+t]=new tb;return this.group.add(e),e},_renderAxisLine:function(t,e,i,n){var o=i.getExtent();n.get("lineStyle.show")&&e.add(new _M({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:a({lineCap:"round"},n.getModel("lineStyle").getLineStyle()),silent:!0,z2:1}))},_renderAxisTick:function(t,e,i,n){var o=n.getData(),a=i.scale.getTicks();nE(a,function(t){var a=i.dataToCoord(t),r=o.getItemModel(t),s=r.getModel("itemStyle"),l=r.getModel("emphasis.itemStyle"),u={position:[a,0],onclick:iE(this._changeTimeline,this,t)},h=zx(r,s,e,u);fo(h,l.getItemStyle()),r.get("tooltip")?(h.dataIndex=t,h.dataModel=n):h.dataIndex=h.dataModel=null},this)},_renderAxisLabel:function(t,e,i,n){if(i.getLabelModel().get("show")){var o=n.getData(),a=i.getViewLabels();nE(a,function(n){var a=n.tickValue,r=o.getItemModel(a),s=r.getModel("label"),l=r.getModel("emphasis.label"),u=i.dataToCoord(n.tickValue),h=new rM({position:[u,0],rotation:t.labelRotation-t.rotation,onclick:iE(this._changeTimeline,this,a),silent:!1});mo(h.style,s,{text:n.formattedLabel,textAlign:t.labelAlign,textVerticalAlign:t.labelBaseline}),e.add(h),fo(h,mo({},l))},this)}},_renderControl:function(t,e,i,n){function o(t,i,o,h){if(t){var c=Rx(n,i,u,{position:t,origin:[a/2,0],rotation:h?-r:0,rectHover:!0,style:s,onclick:o});e.add(c),fo(c,l)}}var a=t.controlSize,r=t.rotation,s=n.getModel("controlStyle").getItemStyle(),l=n.getModel("emphasis.controlStyle").getItemStyle(),u=[0,-a/2,a,a],h=n.getPlayState(),c=n.get("inverse",!0);o(t.nextBtnPosition,"controlStyle.nextIcon",iE(this._changeTimeline,this,c?"-":"+")),o(t.prevBtnPosition,"controlStyle.prevIcon",iE(this._changeTimeline,this,c?"+":"-")),o(t.playPosition,"controlStyle."+(h?"stopIcon":"playIcon"),iE(this._handlePlayClick,this,!h),!0)},_renderCurrentPointer:function(t,e,i,n){var o=n.getData(),a=n.getCurrentIndex(),r=o.getItemModel(a).getModel("checkpointStyle"),s=this,l={onCreate:function(t){t.draggable=!0,t.drift=iE(s._handlePointerDrag,s),t.ondragend=iE(s._handlePointerDragend,s),Bx(t,a,i,n,!0)},onUpdate:function(t){Bx(t,a,i,n)}};this._currentPointer=zx(r,r,this._mainGroup,{},this._currentPointer,l)},_handlePlayClick:function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},_handlePointerDrag:function(t,e,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},_handlePointerDragend:function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},_pointerChangeTimeline:function(t,e){var i=this._toAxisCoord(t)[0],n=Fo(this._axis.getExtent().slice());i>n[1]&&(i=n[1]),ii.getHeight()&&(n.textPosition="top",l=!0);var u=l?-5-o.height:s+8;a+o.width/2>i.getWidth()?(n.textPosition=["100%",u],n.textAlign="right"):a-o.width/2<0&&(n.textPosition=[0,u],n.textAlign="left")}})}},updateView:function(t,e,i,n){d(this._features,function(t){t.updateView&&t.updateView(t.model,e,i,n)})},remove:function(t,e){d(this._features,function(i){i.remove&&i.remove(t,e)}),this.group.removeAll()},dispose:function(t,e){d(this._features,function(i){i.dispose&&i.dispose(t,e)})}});var rE=rT.toolbox.saveAsImage;Gx.defaultOption={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:rE.title,type:"png",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:rE.lang.slice()},Gx.prototype.unusable=!U_.canvasSupported,Gx.prototype.onclick=function(t,e){var i=this.model,n=i.get("name")||t.get("title.0.text")||"echarts",o=document.createElement("a"),a=i.get("type",!0)||"png";o.download=n+"."+a,o.target="_blank";var r=e.getConnectedDataURL({type:a,backgroundColor:i.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")});if(o.href=r,"function"!=typeof MouseEvent||U_.browser.ie||U_.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var s=atob(r.split(",")[1]),l=s.length,u=new Uint8Array(l);l--;)u[l]=s.charCodeAt(l);var h=new Blob([u]);window.navigator.msSaveOrOpenBlob(h,n+"."+a)}else{var c=i.get("lang"),d='';window.open().document.write(d)}else{var f=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});o.dispatchEvent(f)}},Ty("saveAsImage",Gx);var sE=rT.toolbox.magicType;Fx.defaultOption={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z",tiled:"M2.3,2.2h22.8V25H2.3V2.2z M35,2.2h22.8V25H35V2.2zM2.3,35h22.8v22.8H2.3V35z M35,35h22.8v22.8H35V35z"},title:i(sE.title),option:{},seriesIndex:{}};var lE=Fx.prototype;lE.getIcons=function(){var t=this.model,e=t.get("icon"),i={};return d(t.get("type"),function(t){e[t]&&(i[t]=e[t])}),i};var uE={line:function(t,e,i,o){if("bar"===t)return n({id:e,type:"line",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},o.get("option.line")||{},!0)},bar:function(t,e,i,o){if("line"===t)return n({id:e,type:"bar",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},o.get("option.bar")||{},!0)},stack:function(t,e,i,o){if("line"===t||"bar"===t)return n({id:e,stack:"__ec_magicType_stack__"},o.get("option.stack")||{},!0)},tiled:function(t,e,i,o){if("line"===t||"bar"===t)return n({id:e,stack:""},o.get("option.tiled")||{},!0)}},hE=[["line","bar"],["stack","tiled"]];lE.onclick=function(t,e,i){var n=this.model,o=n.get("seriesIndex."+i);if(uE[i]){var a={series:[]};d(hE,function(t){l(t,i)>=0&&d(t,function(t){n.setIconStatus(t,"normal")})}),n.setIconStatus(i,"emphasis"),t.eachComponent({mainType:"series",query:null==o?null:{seriesIndex:o}},function(e){var o=e.subType,s=e.id,l=uE[i](o,s,e,n);l&&(r(l,e.option),a.series.push(l));var u=e.coordinateSystem;if(u&&"cartesian2d"===u.type&&("line"===i||"bar"===i)){var h=u.getAxesByScale("ordinal")[0];if(h){var c=h.dim+"Axis",d=t.queryComponents({mainType:c,index:e.get(name+"Index"),id:e.get(name+"Id")})[0].componentIndex;a[c]=a[c]||[];for(var f=0;f<=d;f++)a[c][d]=a[c][d]||{};a[c][d].boundaryGap="bar"===i}}}),e.dispatchAction({type:"changeMagicType",currentType:i,newOption:a})}},Es({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)}),Ty("magicType",Fx);var cE=rT.toolbox.dataView,dE=new Array(60).join("-"),fE="\t",pE=new RegExp("["+fE+"]+","g");$x.defaultOption={show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:i(cE.title),lang:i(cE.lang),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"},$x.prototype.onclick=function(t,e){function i(){n.removeChild(a),x._dom=null}var n=e.getDom(),o=this.model;this._dom&&n.removeChild(this._dom);var a=document.createElement("div");a.style.cssText="position:absolute;left:5px;top:5px;bottom:5px;right:5px;",a.style.backgroundColor=o.get("backgroundColor")||"#fff";var r=document.createElement("h4"),s=o.get("lang")||[];r.innerHTML=s[0]||o.get("title"),r.style.cssText="margin: 10px 20px;",r.style.color=o.get("textColor");var l=document.createElement("div"),u=document.createElement("textarea");l.style.cssText="display:block;width:100%;overflow:auto;";var h=o.get("optionToContent"),c=o.get("contentToOption"),d=Ux(t);if("function"==typeof h){var f=h(e.getOption());"string"==typeof f?l.innerHTML=f:M(f)&&l.appendChild(f)}else l.appendChild(u),u.readOnly=o.get("readOnly"),u.style.cssText="width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;",u.style.color=o.get("textColor"),u.style.borderColor=o.get("textareaBorderColor"),u.style.backgroundColor=o.get("textareaColor"),u.value=d.value;var p=d.meta,g=document.createElement("div");g.style.cssText="position:absolute;bottom:0;left:0;right:0;";var m="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",v=document.createElement("div"),y=document.createElement("div");m+=";background-color:"+o.get("buttonColor"),m+=";color:"+o.get("buttonTextColor");var x=this;ht(v,"click",i),ht(y,"click",function(){var t;try{t="function"==typeof c?c(l,e.getOption()):Kx(u.value,p)}catch(t){throw i(),new Error("Data view format error "+t)}t&&e.dispatchAction({type:"changeDataView",newOption:t}),i()}),v.innerHTML=s[1],y.innerHTML=s[2],y.style.cssText=m,v.style.cssText=m,!o.get("readOnly")&&g.appendChild(y),g.appendChild(v),ht(u,"keydown",function(t){if(9===(t.keyCode||t.which)){var e=this.value,i=this.selectionStart,n=this.selectionEnd;this.value=e.substring(0,i)+fE+e.substring(n),this.selectionStart=this.selectionEnd=i+1,mw(t)}}),a.appendChild(r),a.appendChild(l),a.appendChild(g),l.style.height=n.clientHeight-80+"px",n.appendChild(a),this._dom=a},$x.prototype.remove=function(t,e){this._dom&&e.getDom().removeChild(this._dom)},$x.prototype.dispose=function(t,e){this.remove(t,e)},Ty("dataView",$x),Es({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(t,e){var i=[];d(t.newOption.series,function(t){var n=e.getSeriesByName(t.name)[0];if(n){var o=n.get("data");i.push({name:t.name,data:Jx(t.data,o)})}else i.push(a({type:"scatter"},t))}),e.mergeOption(r({series:i},t.newOption))});var gE=d,mE="\0_ec_hist_store";iO.extend({type:"dataZoom.select"}),nO.extend({type:"dataZoom.select"});var vE=rT.toolbox.dataZoom,yE=d,xE="\0_ec_\0toolbox-dataZoom_";o_.defaultOption={show:!0,icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:i(vE.title)};var _E=o_.prototype;_E.render=function(t,e,i,n){this.model=t,this.ecModel=e,this.api=i,s_(t,e,this,n,i),r_(t,e)},_E.onclick=function(t,e,i){wE[i].call(this)},_E.remove=function(t,e){this._brushController.unmount()},_E.dispose=function(t,e){this._brushController.dispose()};var wE={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(t_(this.ecModel))}};_E._onBrush=function(t,e){function i(t,e,i){var r=e.getAxis(t),s=r.model,l=n(t,s,a),u=l.findRepresentativeAxisProxy(s).getMinMaxSpan();null==u.minValueSpan&&null==u.maxValueSpan||(i=QL(0,i.slice(),r.scale.getExtent(),0,u.minValueSpan,u.maxValueSpan)),l&&(o[l.id]={dataZoomId:l.id,startValue:i[0],endValue:i[1]})}function n(t,e,i){var n;return i.eachComponent({mainType:"dataZoom",subType:"select"},function(i){i.getAxisModel(t,e.componentIndex)&&(n=i)}),n}if(e.isEnd&&t.length){var o={},a=this.ecModel;this._brushController.updateCovers([]),new hy(a_(this.model.option),a,{include:["grid"]}).matchOutputRanges(t,a,function(t,e,n){if("cartesian2d"===n.type){var o=t.brushType;"rect"===o?(i("x",n,e[0]),i("y",n,e[1])):i({lineX:"x",lineY:"y"}[o],n,e)}}),Qx(a,o),this._dispatchZoomAction(o)}},_E._dispatchZoomAction=function(t){var e=[];yE(t,function(t,n){e.push(i(t))}),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},Ty("dataZoom",o_),Ns(function(t){function e(t,e){if(e){var o=t+"Index",a=e[o];null==a||"all"===a||y(a)||(a=!1===a||"none"===a?[]:[a]),i(t,function(e,i){if(null==a||"all"===a||-1!==l(a,i)){var r={type:"select",$fromToolbox:!0,id:xE+t+i};r[o]=i,n.push(r)}})}}function i(e,i){var n=t[e];y(n)||(n=n?[n]:[]),yE(n,i)}if(t){var n=t.dataZoom||(t.dataZoom=[]);y(n)||(t.dataZoom=n=[n]);var o=t.toolbox;if(o&&(y(o)&&(o=o[0]),o&&o.feature)){var a=o.feature.dataZoom;e("xAxis",a),e("yAxis",a)}}});var bE=rT.toolbox.restore;l_.defaultOption={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:bE.title},l_.prototype.onclick=function(t,e,i){e_(t),e.dispatchAction({type:"restore",from:this.uid})},Ty("restore",l_),Es({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")});var SE,ME="urn:schemas-microsoft-com:vml",IE="undefined"==typeof window?null:window,TE=!1,AE=IE&&IE.document;if(AE&&!U_.canvasSupported)try{!AE.namespaces.zrvml&&AE.namespaces.add("zrvml",ME),SE=function(t){return AE.createElement("')}}catch(t){SE=function(t){return AE.createElement("<"+t+' xmlns="'+ME+'" class="zrvml">')}}var DE=ES.CMD,CE=Math.round,LE=Math.sqrt,kE=Math.abs,PE=Math.cos,NE=Math.sin,OE=Math.max;if(!U_.canvasSupported){var EE=21600,RE=EE/2,zE=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=EE+","+EE,t.coordorigin="0,0"},BE=function(t){return String(t).replace(/&/g,"&").replace(/"/g,""")},VE=function(t,e,i){return"rgb("+[t,e,i].join(",")+")"},GE=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},FE=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},WE=function(t,e,i){return 1e5*(parseFloat(t)||0)+1e3*(parseFloat(e)||0)+i},HE=function(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t},ZE=function(t,e,i){var n=Gt(e);i=+i,isNaN(i)&&(i=1),n&&(t.color=VE(n[0],n[1],n[2]),t.opacity=i*n[3])},UE=function(t){var e=Gt(t);return[VE(e[0],e[1],e[2]),e[3]]},XE=function(t,e,i){var n=e.fill;if(null!=n)if(n instanceof IM){var o,a=0,r=[0,0],s=0,l=1,u=i.getBoundingRect(),h=u.width,c=u.height;if("linear"===n.type){o="gradient";var d=i.transform,f=[n.x*h,n.y*c],p=[n.x2*h,n.y2*c];d&&(Q(f,f,d),Q(p,p,d));var g=p[0]-f[0],m=p[1]-f[1];(a=180*Math.atan2(g,m)/Math.PI)<0&&(a+=360),a<1e-6&&(a=0)}else{o="gradientradial";var f=[n.x*h,n.y*c],d=i.transform,v=i.scale,y=h,x=c;r=[(f[0]-u.x)/y,(f[1]-u.y)/x],d&&Q(f,f,d),y/=v[0]*EE,x/=v[1]*EE;var _=OE(y,x);s=0/_,l=2*n.r/_-s}var w=n.colorStops.slice();w.sort(function(t,e){return t.offset-e.offset});for(var b=w.length,S=[],M=[],I=0;I=2){var D=S[0][0],C=S[1][0],L=S[0][1]*e.opacity,k=S[1][1]*e.opacity;t.type=o,t.method="none",t.focus="100%",t.angle=a,t.color=D,t.color2=C,t.colors=M.join(","),t.opacity=k,t.opacity2=L}"radial"===o&&(t.focusposition=r.join(","))}else ZE(t,n,e.opacity)},jE=function(t,e){null!=e.lineDash&&(t.dashstyle=e.lineDash.join(" ")),null==e.stroke||e.stroke instanceof IM||ZE(t,e.stroke,e.opacity)},YE=function(t,e,i,n){var o="fill"===e,a=t.getElementsByTagName(e)[0];null!=i[e]&&"none"!==i[e]&&(o||!o&&i.lineWidth)?(t[o?"filled":"stroked"]="true",i[e]instanceof IM&&FE(t,a),a||(a=u_(e)),o?XE(a,i,n):jE(a,i),GE(t,a)):(t[o?"filled":"stroked"]="false",FE(t,a))},qE=[[],[],[]],KE=function(t,e){var i,n,o,a,r,s,l=DE.M,u=DE.C,h=DE.L,c=DE.A,d=DE.Q,f=[],p=t.data,g=t.len();for(a=0;a.01?N&&(O+=.0125):Math.abs(E-D)<1e-4?N&&OA?x-=.0125:x+=.0125:N&&ED?y+=.0125:y-=.0125),f.push(R,CE(((A-C)*M+b)*EE-RE),",",CE(((D-L)*I+S)*EE-RE),",",CE(((A+C)*M+b)*EE-RE),",",CE(((D+L)*I+S)*EE-RE),",",CE((O*M+b)*EE-RE),",",CE((E*I+S)*EE-RE),",",CE((y*M+b)*EE-RE),",",CE((x*I+S)*EE-RE)),r=y,s=x;break;case DE.R:var z=qE[0],B=qE[1];z[0]=p[a++],z[1]=p[a++],B[0]=z[0]+p[a++],B[1]=z[1]+p[a++],e&&(Q(z,z,e),Q(B,B,e)),z[0]=CE(z[0]*EE-RE),B[0]=CE(B[0]*EE-RE),z[1]=CE(z[1]*EE-RE),B[1]=CE(B[1]*EE-RE),f.push(" m ",z[0],",",z[1]," l ",B[0],",",z[1]," l ",B[0],",",B[1]," l ",z[0],",",B[1]);break;case DE.Z:f.push(" x ")}if(i>0){f.push(n);for(var V=0;V100&&(tR=0,QE={});var i,n=eR.style;try{n.font=t,i=n.fontFamily.split(",")[0]}catch(t){}e={style:n.fontStyle||"normal",variant:n.fontVariant||"normal",weight:n.fontWeight||"normal",size:0|parseFloat(n.fontSize||12),family:i||"Microsoft YaHei"},QE[t]=e,tR++}return e};!function(t,e){bb[t]=e}("measureText",function(t,e){var i=AE;JE||((JE=i.createElement("div")).style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",AE.body.appendChild(JE));try{JE.style.font=e}catch(t){}return JE.innerHTML="",JE.appendChild(i.createTextNode(t)),{width:JE.offsetWidth}});for(var nR=new de,oR=[Db,di,fi,Pn,rM],aR=0;aR=o&&u+1>=a){for(var h=[],c=0;c=o&&c+1>=a)return T_(0,s.components);l[i]=s}else l[i]=void 0}r++}();if(d)return d}},pushComponent:function(t,e,i){var n=t[t.length-1];n&&n.added===e&&n.removed===i?t[t.length-1]={count:n.count+1,added:e,removed:i}:t.push({count:1,added:e,removed:i})},extractCommon:function(t,e,i,n){for(var o=e.length,a=i.length,r=t.newPos,s=r-n,l=0;r+1=0;--n)if(e[n]===t)return!0;return!1}),i):null:i[0]},D_.prototype.update=function(t,e){if(t){var i=this.getDefs(!1);if(t[this._domName]&&i.contains(t[this._domName]))"function"==typeof e&&e(t);else{var n=this.add(t);n&&(t[this._domName]=n)}}},D_.prototype.addDom=function(t){this.getDefs(!0).appendChild(t)},D_.prototype.removeDom=function(t){var e=this.getDefs(!1);e&&t[this._domName]&&(e.removeChild(t[this._domName]),t[this._domName]=null)},D_.prototype.getDoms=function(){var t=this.getDefs(!1);if(!t)return[];var e=[];return d(this._tagNames,function(i){var n=t.getElementsByTagName(i);e=e.concat([].slice.call(n))}),e},D_.prototype.markAllUnused=function(){var t=this;d(this.getDoms(),function(e){e[t._markLabel]="0"})},D_.prototype.markUsed=function(t){t&&(t[this._markLabel]="1")},D_.prototype.removeUnused=function(){var t=this.getDefs(!1);if(t){var e=this;d(this.getDoms(),function(i){"1"!==i[e._markLabel]&&t.removeChild(i)})}},D_.prototype.getSvgProxy=function(t){return t instanceof Pn?yR:t instanceof fi?xR:t instanceof rM?_R:yR},D_.prototype.getTextSvgElement=function(t){return t.__textSvgEl},D_.prototype.getSvgElement=function(t){return t.__svgEl},u(C_,D_),C_.prototype.addWithoutUpdate=function(t,e){if(e&&e.style){var i=this;d(["fill","stroke"],function(n){if(e.style[n]&&("linear"===e.style[n].type||"radial"===e.style[n].type)){var o,a=e.style[n],r=i.getDefs(!0);a._dom?(o=a._dom,r.contains(a._dom)||i.addDom(o)):o=i.add(a),i.markUsed(e);var s=o.getAttribute("id");t.setAttribute(n,"url(#"+s+")")}})}},C_.prototype.add=function(t){var e;if("linear"===t.type)e=this.createElement("linearGradient");else{if("radial"!==t.type)return Yw("Illegal gradient type."),null;e=this.createElement("radialGradient")}return t.id=t.id||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-gradient-"+t.id),this.updateDom(t,e),this.addDom(e),e},C_.prototype.update=function(t){var e=this;D_.prototype.update.call(this,t,function(){var i=t.type,n=t._dom.tagName;"linear"===i&&"linearGradient"===n||"radial"===i&&"radialGradient"===n?e.updateDom(t,t._dom):(e.removeDom(t),e.add(t))})},C_.prototype.updateDom=function(t,e){if("linear"===t.type)e.setAttribute("x1",t.x),e.setAttribute("y1",t.y),e.setAttribute("x2",t.x2),e.setAttribute("y2",t.y2);else{if("radial"!==t.type)return void Yw("Illegal gradient type.");e.setAttribute("cx",t.x),e.setAttribute("cy",t.y),e.setAttribute("r",t.r)}t.global?e.setAttribute("gradientUnits","userSpaceOnUse"):e.setAttribute("gradientUnits","objectBoundingBox"),e.innerHTML="";for(var i=t.colorStops,n=0,o=i.length;n0){var n,o,a=this.getDefs(!0),r=e[0],s=i?"_textDom":"_dom";r[s]?(o=r[s].getAttribute("id"),n=r[s],a.contains(n)||a.appendChild(n)):(o="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,(n=this.createElement("clipPath")).setAttribute("id",o),a.appendChild(n),r[s]=n);var l=this.getSvgProxy(r);if(r.transform&&r.parent.invTransform&&!i){var u=Array.prototype.slice.call(r.transform);bt(r.transform,r.parent.invTransform,r.transform),l.brush(r),r.transform=u}else l.brush(r);var h=this.getSvgElement(r);n.innerHTML="",n.appendChild(h.cloneNode()),t.setAttribute("clip-path","url(#"+o+")"),e.length>1&&this.updateDom(n,e.slice(1),i)}else t&&t.setAttribute("clip-path","none")},L_.prototype.markUsed=function(t){var e=this;t.__clipPaths&&t.__clipPaths.length>0&&d(t.__clipPaths,function(t){t._dom&&D_.prototype.markUsed.call(e,t._dom),t._textDom&&D_.prototype.markUsed.call(e,t._textDom)})},u(k_,D_),k_.prototype.addWithoutUpdate=function(t,e){if(e&&P_(e.style)){var i,n=e.style;n._shadowDom?(i=n._shadowDom,this.getDefs(!0).contains(n._shadowDom)||this.addDom(i)):i=this.add(e),this.markUsed(e);var o=i.getAttribute("id");t.style.filter="url(#"+o+")"}},k_.prototype.add=function(t){var e=this.createElement("filter"),i=t.style;return i._shadowDomId=i._shadowDomId||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-shadow-"+i._shadowDomId),this.updateDom(t,e),this.addDom(e),e},k_.prototype.update=function(t,e){var i=e.style;if(P_(i)){var n=this;D_.prototype.update.call(this,e,function(t){n.updateDom(e,t._shadowDom)})}else this.remove(t,i)},k_.prototype.remove=function(t,e){null!=e._shadowDomId&&(this.removeDom(e),t.style.filter="")},k_.prototype.updateDom=function(t,e){var i=e.getElementsByTagName("feDropShadow");i=0===i.length?this.createElement("feDropShadow"):i[0];var n,o,a,r,s=t.style,l=t.scale?t.scale[0]||1:1,u=t.scale?t.scale[1]||1:1;if(s.shadowBlur||s.shadowOffsetX||s.shadowOffsetY)n=s.shadowOffsetX||0,o=s.shadowOffsetY||0,a=s.shadowBlur,r=s.shadowColor;else{if(!s.textShadowBlur)return void this.removeDom(e,s);n=s.textShadowOffsetX||0,o=s.textShadowOffsetY||0,a=s.textShadowBlur,r=s.textShadowColor}i.setAttribute("dx",n/l),i.setAttribute("dy",o/u),i.setAttribute("flood-color",r);var h=a/2/l+" "+a/2/u;i.setAttribute("stdDeviation",h),e.setAttribute("x","-100%"),e.setAttribute("y","-100%"),e.setAttribute("width",Math.ceil(a/2*200)+"%"),e.setAttribute("height",Math.ceil(a/2*200)+"%"),e.appendChild(i),s._shadowDom=e},k_.prototype.markUsed=function(t){var e=t.style;e&&e._shadowDom&&D_.prototype.markUsed.call(this,e._shadowDom)};var IR=function(t,e,i,n){this.root=t,this.storage=e,this._opts=i=a({},i||{});var o=p_("svg");o.setAttribute("xmlns","http://www.w3.org/2000/svg"),o.setAttribute("version","1.1"),o.setAttribute("baseProfile","full"),o.style.cssText="user-select:none;position:absolute;left:0;top:0;",this.gradientManager=new C_(n,o),this.clipPathManager=new L_(n,o),this.shadowManager=new k_(n,o);var r=document.createElement("div");r.style.cssText="overflow:hidden;position:relative",this._svgRoot=o,this._viewport=r,t.appendChild(r),r.appendChild(o),this.resize(i.width,i.height),this._visibleList=[]};IR.prototype={constructor:IR,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(){var t=this.storage.getDisplayList(!0);this._paintList(t)},setBackgroundColor:function(t){this._viewport.style.background=t},_paintList:function(t){this.gradientManager.markAllUnused(),this.clipPathManager.markAllUnused(),this.shadowManager.markAllUnused();var e,i=this._svgRoot,n=this._visibleList,o=t.length,a=[];for(e=0;e=0;--n)if(e[n]===t)return!0;return!1}),i):null:i[0]},resize:function(t,e){var i=this._viewport;i.style.display="none";var n=this._opts;if(null!=t&&(n.width=t),null!=e&&(n.height=e),t=this._getSize(0),e=this._getSize(1),i.style.display="",this._width!==t||this._height!==e){this._width=t,this._height=e;var o=i.style;o.width=t+"px",o.height=e+"px";var a=this._svgRoot;a.setAttribute("width",t),a.setAttribute("height",e)}},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,i=["width","height"][t],n=["clientWidth","clientHeight"][t],o=["paddingLeft","paddingTop"][t],a=["paddingRight","paddingBottom"][t];if(null!=e[i]&&"auto"!==e[i])return parseFloat(e[i]);var r=this.root,s=document.defaultView.getComputedStyle(r);return(r[n]||N_(s[i])||N_(r.style[i]))-(N_(s[o])||0)-(N_(s[a])||0)|0},dispose:function(){this.root.innerHTML="",this._svgRoot=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removeChild(this._viewport)},pathToDataUrl:function(){return this.refresh(),"data:image/svg+xml;charset=UTF-8,"+this._svgRoot.outerHTML}},d(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(t){IR.prototype[t]=F_(t)}),Ti("svg",IR),t.version="4.2.1",t.dependencies=ET,t.PRIORITY=VT,t.init=function(t,e,i){var n=ks(t);if(n)return n;var o=new us(t,e,i);return o.id="ec_"+iA++,tA[o.id]=o,Fi(t,oA,o.id),Cs(o),o},t.connect=function(t){if(y(t)){var e=t;t=null,kT(e,function(e){null!=e.group&&(t=e.group)}),t=t||"g_"+nA++,kT(e,function(e){e.group=t})}return eA[t]=!0,t},t.disConnect=Ls,t.disconnect=aA,t.dispose=function(t){"string"==typeof t?t=tA[t]:t instanceof us||(t=ks(t)),t instanceof us&&!t.isDisposed()&&t.dispose()},t.getInstanceByDom=ks,t.getInstanceById=function(t){return tA[t]},t.registerTheme=Ps,t.registerPreprocessor=Ns,t.registerProcessor=Os,t.registerPostUpdate=function(t){KT.push(t)},t.registerAction=Es,t.registerCoordinateSystem=Rs,t.getCoordinateSystemDimensions=function(t){var e=Fa.get(t);if(e)return e.getDimensionsInfo?e.getDimensionsInfo():e.dimensions.slice()},t.registerLayout=zs,t.registerVisual=Bs,t.registerLoading=Gs,t.extendComponentModel=Fs,t.extendComponentView=Ws,t.extendSeriesModel=Hs,t.extendChartView=Zs,t.setCanvasCreator=function(t){e("createCanvas",t)},t.registerMap=function(t,e,i){DT.registerMap(t,e,i)},t.getMap=function(t){var e=DT.retrieveMap(t);return e&&e[0]&&{geoJson:e[0].geoJSON,specialAreas:e[0].specialAreas}},t.dataTool=rA,t.zrender=Hb,t.number=YM,t.format=eI,t.throttle=Pr,t.helper=tD,t.matrix=Sw,t.vector=cw,t.color=Ww,t.parseGeoJSON=iD,t.parseGeoJson=rD,t.util=sD,t.graphic=lD,t.List=vA,t.Model=No,t.Axis=aD,t.env=U_}); + +layui.define('echartsTheme', function(exports){ + exports('echarts', echarts); +}); diff --git a/IoTGateway/wwwroot/layuiadmin/lib/extend/echartsTheme.js b/IoTGateway/wwwroot/layuiadmin/lib/extend/echartsTheme.js new file mode 100644 index 0000000..c23b81e --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/lib/extend/echartsTheme.js @@ -0,0 +1,2 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + ;layui.define(function(e){e("echartsTheme",{color:["#009688","#1E9FFF","#5FB878","#FFB980","#D87A80","#8d98b3","#e5cf0d","#97b552","#95706d","#dc69aa","#07a2a4","#9a7fd1","#588dd5","#f5994e","#c05050","#59678c","#c9ab00","#7eb00a","#6f5553","#c14089"],title:{textStyle:{fontWeight:"normal",color:"#666"}},dataRange:{itemWidth:15,color:["#009688","#e0ffff"]},toolbox:{color:["#1e90ff","#1e90ff","#1e90ff","#1e90ff"],effectiveColor:"#ff4500"},tooltip:{backgroundColor:"rgba(50,50,50,0.5)",axisPointer:{type:"line",lineStyle:{color:"#009688"},crossStyle:{color:"#008acd"},shadowStyle:{color:"rgba(200,200,200,0.2)"}}},dataZoom:{dataBackgroundColor:"#efefff",fillerColor:"rgba(182,162,222,0.2)",handleColor:"#008acd"},grid:{borderColor:"#eee"},categoryAxis:{axisLine:{lineStyle:{color:"#009688"}},axisTick:{show:!1},splitLine:{lineStyle:{color:["#eee"]}}},valueAxis:{axisLine:{lineStyle:{color:"#009688"}},splitArea:{show:!0,areaStyle:{color:["rgba(250,250,250,0.1)","rgba(200,200,200,0.1)"]}},splitLine:{lineStyle:{color:["#eee"]}}},polar:{axisLine:{lineStyle:{color:"#ddd"}},splitArea:{show:!0,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(200,200,200,0.2)"]}},splitLine:{lineStyle:{color:"#ddd"}}},timeline:{lineStyle:{color:"#009688"},controlStyle:{normal:{color:"#009688"},emphasis:{color:"#009688"}},symbol:"emptyCircle",symbolSize:3},bar:{itemStyle:{normal:{barBorderRadius:2},emphasis:{barBorderRadius:2}}},line:{smooth:!0,symbol:"emptyCircle",symbolSize:3},k:{itemStyle:{normal:{color:"#d87a80",color0:"#2ec7c9",lineStyle:{color:"#d87a80",color0:"#2ec7c9"}}}},scatter:{symbol:"circle",symbolSize:4},radar:{symbol:"emptyCircle",symbolSize:3},map:{itemStyle:{normal:{areaStyle:{color:"#ddd"},label:{textStyle:{color:"#d87a80"}}},emphasis:{areaStyle:{color:"#fe994e"}}}},force:{itemStyle:{normal:{linkStyle:{color:"#1e90ff"}}}},chord:{itemStyle:{normal:{borderWidth:1,borderColor:"rgba(128, 128, 128, 0.5)",chordStyle:{lineStyle:{color:"rgba(128, 128, 128, 0.5)"}}},emphasis:{borderWidth:1,borderColor:"rgba(128, 128, 128, 0.5)",chordStyle:{lineStyle:{color:"rgba(128, 128, 128, 0.5)"}}}}},gauge:{axisLine:{lineStyle:{color:[[.2,"#2ec7c9"],[.8,"#5ab1ef"],[1,"#d87a80"]],width:10}},axisTick:{splitNumber:10,length:15,lineStyle:{color:"auto"}},splitLine:{length:22,lineStyle:{color:"auto"}},pointer:{width:5}},textStyle:{fontFamily:"微软雅黑, Arial, Verdana, sans-serif"}})}); \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/lib/view.js b/IoTGateway/wwwroot/layuiadmin/lib/view.js new file mode 100644 index 0000000..b9c6def --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/lib/view.js @@ -0,0 +1,2 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + ;layui.define(["laytpl","layer"],function(e){var t=layui.jquery,a=layui.laytpl,n=layui.layer,r=layui.setter,i=(layui.device(),layui.hint()),o=function(e){return new d(e)},s="LAY_app_body",d=function(e){this.id=e,this.container=t("#"+(e||s))};String.prototype.endsWith||(String.prototype.endsWith=function(e,t){return(void 0===t||t>this.length)&&(t=this.length),this.substring(t-e.length,t)===e}),String.prototype.startsWith||(String.prototype.startsWith=function(e,t){return t=t||0,this.substring(t,e.length)===e}),o.loading=function(e){e.append(this.elemLoad=t(''))},o.removeLoad=function(){this.elemLoad&&this.elemLoad.remove()},o.exit=function(){layui.data(r.tableName,{key:r.request.tokenName,remove:!0}),location.hash="/user/login"},o.req=function(e){var a=e.success,n=(e.error,r.request),i=r.response,s=function(){return r.debug?"
            URL:"+e.url:""};if(e.data=e.data||{},e.headers=e.headers||{},n.tokenName){var d="string"==typeof e.data?JSON.parse(e.data):e.data;e.data[n.tokenName]=n.tokenName in d?e.data[n.tokenName]:layui.data(r.tableName)[n.tokenName]||"",e.headers[n.tokenName]=n.tokenName in e.headers?e.headers[n.tokenName]:layui.data(r.tableName)[n.tokenName]||""}return delete e.success,delete e.error,t.ajax(t.extend({type:"get",dataType:"json",success:function(t){var n=i.statusCode;if(t[i.statusName]==n.ok)"function"==typeof e.done&&e.done(t);else if(t[i.statusName]==n.logout)o.exit();else{var r=["Error: "+(t[i.msgName]||"返回状态码异常"),s()].join("");o.error(r)}"function"==typeof a&&a(t)},error:function(e,t){var a=["请求异常,请重试
            错误信息:"+t,s()].join("");o.error(a),"function"==typeof a&&a(res)}},e))},o.popup=function(e){var a=e.success,r=e.skin;return delete e.success,delete e.skin,n.open(t.extend({type:1,title:"提示",content:"",id:"LAY-system-view-popup",skin:"layui-layer-admin"+(r?" "+r:""),shadeClose:!0,closeBtn:!1,success:function(e,r){var i=t('');e.append(i),i.on("click",function(){n.close(r)}),"function"==typeof a&&a.apply(this,arguments)}},e))},o.error=function(e,a){return o.popup(t.extend({content:e,maxWidth:300,offset:"t",anim:6,id:"LAY_adminError"},a))},d.prototype.render=function(e,a){var n=this;layui.router();e=r.views+e+r.engine,t("#"+s).children(".layadmin-loading").remove(),o.loading(n.container);var i=/^\/((http(s?))?:\/\/.*)/i;return i.test(e)&&(e="/_Framework/OutSide?url="+i.exec(e)[1]),t.ajax({url:e,type:"get",dataType:"html",data:{v:layui.cache.version},success:function(r,i,s){e.endsWith(".html")||e.startsWith("/Home/Layout")||(r='
            '+r+"
            "),r="
            "+r+"
            ";var d=t(r).find("title"),l=d.text()||(r.match(/\([\s\S]*)\<\/title>/)||[])[1];void 0!==l&&""!==l||(l=s.getResponseHeader("X-wtm-PageTitle"),l&&(l=decodeURIComponent(escape(window.atob(s.getResponseHeader("X-wtm-PageTitle"))))));var u={title:l,body:r};d.remove(),n.params=a||{},n.then&&(n.then(u),delete n.then),n.parse(r),o.removeLoad(),n.done&&(n.done(u),delete n.done)},error:function(e){o.removeLoad();var t=e.getResponseHeader("Location");return 401==e.status&&t?(window.location=t,!1):n.render.isError?o.error("请求视图文件异常,状态:"+e.status):(404===e.status?n.render("layuiadmin/views/template/tips/404.html"):n.render("layuiadmin/views/template/tips/error.html"),void(n.render.isError=!0))}}),n},d.prototype.parse=function(e,n,r){var s=this,d="object"==typeof e,l=d?e:t(e),u=d?e:l.find("*[template]"),c=function(e){var n=a(e.dataElem.html()),i=t.extend({params:p.params},e.res);e.dataElem.after(n.render(i)),"function"==typeof r&&r();try{e.done&&new Function("d",e.done)(i)}catch(o){console.error(e.dataElem[0],"\n存在错误回调脚本\n\n",o)}},p=layui.router();l.find("title").remove(),s.container[n?"after":"html"](l.children()),p.params=s.params||{};for(var y=u.length;y>0;y--)!function(){var e=u.eq(y-1),t=e.attr("lay-done")||e.attr("lay-then"),n=a(e.attr("lay-url")||"").render(p),r=a(e.attr("lay-data")||"").render(p),s=a(e.attr("lay-headers")||"").render(p);try{r=new Function("return "+r+";")()}catch(d){i.error("lay-data: "+d.message),r={}}try{s=new Function("return "+s+";")()}catch(d){i.error("lay-headers: "+d.message),s=s||{}}n?o.req({type:e.attr("lay-type")||"get",url:n,data:r,dataType:"json",headers:s,success:function(a){c({dataElem:e,res:a,done:t})}}):c({dataElem:e,done:t})}();return s},d.prototype.send=function(e,t){var n=a(e||this.container.html()).render(t||{});return this.container.html(n),this},d.prototype.refresh=function(e){var t=this,a=t.container.next(),n=a.attr("lay-templateid");return t.id!=n?t:(t.parse(t.container,"refresh",function(){t.container.siblings('[lay-templateid="'+t.id+'"]:last').remove(),"function"==typeof e&&e()}),t)},d.prototype.then=function(e){return this.then=e,this},d.prototype.done=function(e){return this.done=e,this},e("view",o)}); \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/pindex.js b/IoTGateway/wwwroot/layuiadmin/pindex.js new file mode 100644 index 0000000..5185af4 --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/pindex.js @@ -0,0 +1,2 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + ;layui.extend({setter:"config",admin:"lib/admin",view:"lib/view"}).define(["setter","admin","table"],function(e){var a=layui.setter,t=layui.element,i=layui.admin,n=i.tabsPage,l=layui.view,o=layui.table,r={autoSort:!1,request:{pageName:"Searcher.Page",limitName:"Searcher.Limit"},response:{statusName:"Code",statusCode:200,msgName:"Msg",countName:"Count",dataName:"Data"},loading:!0,totalRow:!1,even:!0,page:!0,limit:20,limits:[10,20,50,80,100,150,200]},u=function(){var e=layui.router(),o=e.path,r=i.correctRouter(e.path.join("/"));o.length||(o=[""]),""===o[o.length-1]&&(o[o.length-1]=a.entry);var s=function(e){u.haveInit&&y(".layui-layer").each(function(){var e=y(this),a=e.attr("times");e.hasClass("layui-layim")||layer.close(a)}),u.haveInit=!0,y(c).scrollTop(0),delete n.type};return"tab"===n.type&&("/"!==r||"/"===r&&i.tabsBody().html())?(i.tabsBodyChange(n.index),s(n.type)):(l().render(o.join("/")).then(function(e){}).done(function(){layui.use("common",layui.cache.callback.common),d.on("resize",layui.data.resize),t.render("breadcrumb","breadcrumb"),i.tabsBody(n.index).on("scroll",function(){var e=y(this),a=y(".layui-laydate"),t=y(".layui-layer")[0];a[0]&&(a.each(function(){var e=y(this);e.hasClass("layui-laydate-static")||e.remove()}),e.find("input").blur()),t&&layer.closeAll("tips")})}),void s())},s=function(e){var t,n=layui.router(),o=l(a.container),r=i.correctRouter(n.path.join("/"));if(layui.each(a.indPage,function(e,a){if(r===a)return t=!0}),layui.config({base:a.base+"component/"}),t||"/user/login"===r)o.render(n.path.join("/")).done(function(){i.pageType="alone"});else{if(a.interceptor){var s=layui.data(a.tableName);if(!s[a.request.tokenName])return location.hash="/user/login/redirect="+encodeURIComponent(r)}u()}},c="#LAY_app_body",y=layui.$,d=y(window);layui.link(a.base+"style/admin.css?v="+(i.v+"-1"),function(){s()},"layuiAdmin"),window.onhashchange=function(){s(),layui.event.call(this,a.MOD_NAME,"hash({*})",layui.router())},layui.each(a.extend,function(e,t){var i={};i[t]="{/}"+a.base+"lib/extend/"+t,layui.extend(i)}),o.set(r),e("pindex",{render:u})}); \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/style/admin.css b/IoTGateway/wwwroot/layuiadmin/style/admin.css new file mode 100644 index 0000000..6db7289 --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/style/admin.css @@ -0,0 +1,2 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + html #layuicss-layuiAdmin{display:none;position:absolute;width:1989px}::-webkit-input-placeholder{color:#ccc}html{background-color:#fff;color:#666}.layadmin-tabsbody-item,[template]{display:none}[lay-href],[lay-tips],[layadmin-event]{cursor:pointer}.layui-layout-admin .layui-header{position:fixed;top:0;left:0;width:100%;height:50px}.layui-layout-admin .layui-header .layui-nav .layui-nav-child a{color:#333}.layui-layout-admin .layui-side{width:220px;top:0;z-index:1001}.layui-layout-admin .layui-header .layui-nav .layui-nav-item,.layui-layout-admin .layui-logo{height:50px;line-height:50px}.layui-layout-admin .layui-logo{position:fixed;left:0;top:0;z-index:1002;width:220px;height:49px;padding:0 15px;box-sizing:border-box;overflow:hidden;font-weight:300;background-repeat:no-repeat;background-position:center center}.layadmin-pagetabs,.layui-layout-admin .layui-body,.layui-layout-admin .layui-footer,.layui-layout-admin .layui-layout-left{left:220px}.layadmin-pagetabs{position:fixed;top:50px;right:0;z-index:999}.layadmin-pagetabs .layui-breadcrumb{padding:0 15px}.layui-layout-admin .layui-body{position:fixed;top:90px;bottom:0}.layui-layout-admin .layui-body .layadmin-tabsbody-item{position:absolute;top:0;bottom:0;left:0;right:0;overflow:hidden;overflow-y:auto}.layui-layout-admin .layui-header .layui-nav-img{width:26px;height:26px}.layui-layout-admin .layui-header .layui-nav-child{top:55px}.layui-layout-admin .layui-header .layui-layout-right .layui-nav-child{left:auto;right:0}.layui-layout-admin .layui-header .layui-nav .layui-nav-child dd.layui-this,.layui-layout-admin .layui-header .layui-nav .layui-nav-child dd.layui-this a{background:0 0}.layadmin-pagetabs,.layui-layout-admin .layui-body,.layui-layout-admin .layui-footer,.layui-layout-admin .layui-header .layui-layout-right,.layui-layout-admin .layui-header .layui-nav .layui-nav-item,.layui-layout-admin .layui-layout-left,.layui-layout-admin .layui-logo,.layui-layout-admin .layui-side{transition:all .3s;-webkit-transition:all .3s}.layui-icon-login-qq{color:#3492ED}.layui-icon-login-wechat{color:#4DAF29}.layui-icon-login-weibo{color:#CF1900}.layui-form[wid100] .layui-form-label{width:100px}.layui-form[wid100] .layui-input-block{margin-left:130px}@media screen and (max-width:450px){.layui-form[wid100] .layui-form-item .layui-input-inline{margin-left:132px}.layui-form[wid100] .layui-form-item .layui-input-inline+.layui-form-mid{margin-left:130px}}.layui-form-item .layui-input-company{width:auto;padding-right:10px;line-height:38px}.layui-bg-white{background-color:#fff}.layadmin-loading{position:absolute;left:50%;top:50%;margin:-16px -15px;font-size:30px;color:#c2c2c2}.layadmin-fixed{position:fixed;left:0;top:0;z-index:999}.layadmin-link{color:#029789!important}.layadmin-link:hover{opacity:.8}.layui-layer-admin .layui-layer-title{height:50px;line-height:50px;border:0;background-color:#20222A;color:#fff}.layui-layer-admin i[close]{position:absolute;padding:5px;right:10px;top:12px;color:#fff;cursor:pointer}.layui-layer-admin .layui-layer-content{padding:20px;line-height:22px}.layui-layer-admin .layui-layer-content cite{font-style:normal;color:#FF5722}.layui-layer-adminRight{top:50px!important;bottom:0;box-shadow:1px 1px 10px rgba(0,0,0,.1);border-radius:0;overflow:auto}.layadmin-note .layui-layer-content{padding:0}.layadmin-note textarea{display:block;width:300px;height:132px;min-width:300px;min-height:132px;line-height:20px;padding:10px 20px;border:none;box-sizing:border-box;color:#666;word-wrap:break-word}.layui-layout-admin .layui-layout-left{padding:0 10px}.layui-layout-admin .layui-layout-left .layui-nav-item{margin:0 20px}.layui-layout-admin .layui-input-search{display:inline-block;vertical-align:middle;height:32px;border:none;cursor:text}.layui-layout-admin .layui-layout-left a,.layui-layout-admin .layui-layout-right{padding:0}.layui-header .layui-nav-item .layui-icon{position:relative;top:1px;font-size:16px}.layui-header .layui-layout-right .layui-badge-dot{margin-left:11px}.layui-header .layui-nav .layui-this:after,.layui-layout-admin .layui-header .layui-nav-bar{top:0!important;bottom:auto;height:3px;background-color:#fff;background-color:rgba(255,255,255,.3)}.layadmin-body-shade{position:fixed;display:none;left:0;right:0;top:0;bottom:0;background-color:rgba(0,0,0,.3);z-index:1000}.layui-side-menu .layui-side-scroll{width:240px}.layui-side-menu .layui-nav{width:220px;margin-top:50px;background:0 0}.layui-side-menu .layui-nav .layui-nav-item a{height:40px;line-height:40px;padding-left:45px;padding-right:30px}.layui-side-menu .layui-nav .layui-nav-item>a{padding-top:8px;padding-bottom:8px}.layui-side-menu .layui-nav .layui-nav-item a:hover{background:0 0}.layui-side-menu .layui-nav .layui-nav-itemed>.layui-nav-child{padding:5px 0}.layui-side-menu .layui-nav .layui-nav-item .layui-icon{position:absolute;top:50%;left:20px;margin-top:-19px}.layui-side-menu .layui-nav .layui-nav-child .layui-nav-child{background:0 0!important}.layui-side-menu .layui-nav .layui-nav-child .layui-nav-child a{padding-left:60px}.layui-side-menu .layui-nav .layui-nav-more{right:15px}@media screen and (max-width:992px){.layui-layout-admin .layui-side{transform:translate3d(-220px,0,0);-webkit-transform:translate3d(-220px,0,0);width:220px}.layadmin-pagetabs,.layui-layout-admin .layui-body,.layui-layout-admin .layui-footer,.layui-layout-admin .layui-layout-left{left:0}}.layadmin-side-shrink .layui-layout-admin .layui-logo{width:60px;background-image:url(res/logo.png)}.layadmin-side-shrink .layui-layout-admin .layui-logo span{display:none}.layadmin-side-shrink .layui-side{left:0;width:60px}.layadmin-side-shrink .layadmin-pagetabs,.layadmin-side-shrink .layui-layout-admin .layui-body,.layadmin-side-shrink .layui-layout-admin .layui-footer,.layadmin-side-shrink .layui-layout-admin .layui-layout-left{left:60px}.layadmin-side-shrink .layui-side-menu .layui-nav{position:static;width:60px}.layadmin-side-shrink .layui-side-menu .layui-nav-item{position:static}.layadmin-side-shrink .layui-side-menu .layui-nav-item>a{padding-right:0}.layadmin-side-shrink .layui-side-menu .layui-nav-item cite,.layadmin-side-shrink .layui-side-menu .layui-nav>.layui-nav-item>.layui-nav-child,.layadmin-side-shrink .layui-side-menu .layui-nav>.layui-nav-item>a .layui-nav-more{display:none;padding:8px 0;width:200px}.layadmin-side-shrink .layui-side-menu .layui-nav>.layui-nav-itemed>a{background:rgba(0,0,0,.3)}.layadmin-side-spread-sm .layadmin-pagetabs,.layadmin-side-spread-sm .layui-layout-admin .layui-body,.layadmin-side-spread-sm .layui-layout-admin .layui-footer,.layadmin-side-spread-sm .layui-layout-admin .layui-layout-left{left:0;transform:translate3d(220px,0,0);-webkit-transform:translate3d(220px,0,0)}.layadmin-side-spread-sm .layui-layout-admin .layui-layout-right{transform:translate3d(220px,0,0);-webkit-transform:translate3d(220px,0,0)}.layadmin-side-spread-sm .layui-side{transform:translate3d(0,0,0);-webkit-transform:translate3d(0,0,0)}.layadmin-side-spread-sm .layadmin-body-shade{display:block}.layadmin-pagetabs .layui-tab-title li:first-child .layui-tab-close,.layadmin-tabs-select.layui-nav .layui-nav-bar,.layadmin-tabs-select.layui-nav .layui-nav-more{display:none}.layadmin-pagetabs{height:40px;line-height:40px;padding:0 80px 0 40px;background-color:#fff;box-sizing:border-box;box-shadow:0 1px 2px 0 rgba(0,0,0,.1)}.layadmin-pagetabs .layadmin-tabs-control{position:absolute;top:0;width:40px;height:100%;text-align:center;cursor:pointer;transition:all .3s;-webkit-transition:all .3s;box-sizing:border-box;border-left:1px solid #f6f6f6}.layadmin-pagetabs .layadmin-tabs-control:hover{background-color:#f6f6f6}.layadmin-pagetabs .layui-icon-prev{left:0;border-left:none;border-right:1px solid #f6f6f6}.layadmin-pagetabs .layui-icon-next{right:40px}.layadmin-pagetabs .layui-icon-down{right:0}.layadmin-tabs-select.layui-nav{position:absolute;left:0;top:0;width:100%;height:100%;padding:0;background:0 0}.layadmin-tabs-select.layui-nav .layui-nav-item{line-height:40px}.layadmin-tabs-select.layui-nav .layui-nav-item>a{height:40px}.layadmin-tabs-select.layui-nav .layui-nav-item a{color:#666}.layadmin-tabs-select.layui-nav .layui-nav-child{top:40px;left:auto;right:0}.layadmin-tabs-select.layui-nav .layui-nav-child dd.layui-this,.layadmin-tabs-select.layui-nav .layui-nav-child dd.layui-this a{background-color:#f2f2f2!important;color:#333}.layadmin-pagetabs .layui-tab{margin:0;overflow:hidden}.layadmin-pagetabs .layui-tab-title{height:40px;border:none}.layadmin-pagetabs .layui-tab-title li{min-width:0;line-height:40px;max-width:160px;text-overflow:ellipsis;padding-right:40px;overflow:hidden;border-right:1px solid #f6f6f6;vertical-align:top}.layadmin-pagetabs .layui-tab-title li:first-child{padding-right:15px}.layadmin-pagetabs .layui-tab-title li .layui-tab-close{position:absolute;right:8px;top:50%;margin:-7px 0 0;width:16px;height:16px;line-height:16px;border-radius:50%;font-size:12px}.layadmin-pagetabs .layui-tab-title li:after{content:'';position:absolute;top:0;left:0;width:0;height:2px;border-radius:0;background-color:#292B34;transition:all .3s;-webkit-transition:all .3s}.layadmin-pagetabs .layui-tab-title li:hover:after{width:100%}.layadmin-pagetabs .layui-tab-title li.layui-this,.layadmin-pagetabs .layui-tab-title li:hover{background-color:#f6f6f6}.layadmin-pagetabs .layui-tab-title li.layui-this:after{width:100%;border:none;height:2px;background-color:#292B34}.layadmin-tabspage-none .layui-layout-admin .layui-header{border-bottom:none;box-shadow:0 1px 2px 0 rgba(0,0,0,.05)}.layadmin-tabspage-none .layui-layout-admin .layui-body{top:50px}.layadmin-tabspage-none .layadmin-header{display:block}.layadmin-tabspage-none .layadmin-header .layui-breadcrumb{border-top:1px solid #f6f6f6}.layui-layout-admin .layui-header{border-bottom:1px solid #f6f6f6;box-sizing:border-box;background-color:#fff}.layui-layout-admin .layui-header a,.layui-layout-admin .layui-header a cite{color:#333}.layui-layout-admin .layui-header a:hover{color:#000}.layui-layout-admin .layui-header .layui-nav .layui-nav-more{border-top-color:#666}.layui-layout-admin .layui-header .layui-nav .layui-nav-mored{border-color:transparent transparent #666}.layui-layout-admin .layui-header .layui-nav .layui-this:after,.layui-layout-admin .layui-header .layui-nav-bar{height:2px;background-color:#20222A}.layui-layout-admin .layui-logo{background-color:#20222A;box-shadow:0 1px 2px 0 rgba(0,0,0,.15)}.layadmin-setTheme-side,.layui-side-menu{box-shadow:1px 0 2px 0 rgba(0,0,0,.05)}.layui-layout-admin .layui-logo,.layui-layout-admin .layui-logo a{color:#fff;color:rgba(255,255,255,.8)}.layui-layout-admin .layui-footer{padding:10px 0;text-align:center;box-shadow:0 -1px 2px 0 rgba(0,0,0,.05)}.layadmin-setTheme-side,.layui-side-menu{background-color:#20222A;color:#fff}.layadmin-setTheme-header,.layui-layout-admin .layui-footer{background-color:#fff}.layui-tab-admin .layui-tab-title{background-color:#393D49;color:#fff}.layui-fluid{padding:15px}.layadmin-header{display:none;height:50px;line-height:50px;margin-bottom:0;border-radius:0}.layadmin-header .layui-breadcrumb{padding:0 15px}.layui-card-header{position:relative}.layui-card-header .layui-icon{line-height:initial;position:absolute;right:15px;top:50%;margin-top:-7px}.layadmin-iframe{position:absolute;width:100%;height:100%;left:0;top:0;right:0;bottom:0}.layadmin-carousel{height:185px!important;background-color:#fff}.layadmin-carousel .layui-carousel-ind li{background-color:#e2e2e2}.layadmin-carousel .layui-carousel-ind li:hover{background-color:#c2c2c2}.layadmin-carousel .layui-carousel-ind li.layui-this{background-color:#999}.layadmin-carousel .layui-carousel,.layadmin-carousel>[carousel-item]>*{background-color:#fff}.layadmin-carousel .layui-col-space10{margin:0}.layadmin-carousel .layui-carousel-ind{position:absolute;top:-41px;text-align:right}.layadmin-carousel .layui-carousel-ind ul{background:0 0}.layui-card .layui-tab-brief .layui-tab-title{height:42px;border-bottom-color:#f6f6f6}.layui-card .layui-tab-brief .layui-tab-title li{margin:0 15px;padding:0;line-height:42px}.layui-card .layui-tab-brief .layui-tab-title li.layui-this{color:#333}.layui-card .layui-tab-brief .layui-tab-title .layui-this:after{height:43px}.layui-card .layui-tab-brief .layui-tab-content{padding:15px}.layui-card .layui-table-view{margin:0}.layadmin-shortcut li{text-align:center}.layadmin-shortcut li .layui-icon{display:inline-block;width:100%;height:60px;line-height:60px;text-align:center;border-radius:2px;font-size:30px;background-color:#F8F8F8;color:#333;transition:all .3s;-webkit-transition:all .3s}.layadmin-shortcut li cite{position:relative;top:2px;display:block;color:#666;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-size:14px}.layadmin-shortcut li:hover .layui-icon{background-color:#f2f2f2}.layadmin-backlog .layadmin-backlog-body{display:block;padding:10px 15px;background-color:#f8f8f8;color:#999;border-radius:2px;transition:all .3s;-webkit-transition:all .3s}.layadmin-backlog-body h3{padding-bottom:10px;font-size:12px}.layadmin-backlog-body p cite{font-style:normal;font-size:30px;font-weight:300;color:#009688}.layadmin-backlog-body:hover{background-color:#f2f2f2;color:#888}.layadmin-dataview{height:332px!important}.layadmin-dataview>[carousel-item]:before{display:none}.layadmin-dataview>[carousel-item]>div{height:332px}.layadmin-takerates{padding-top:5px}.layadmin-takerates .layui-progress{margin:50px 0 60px}.layadmin-takerates .layui-progress:last-child{margin-bottom:10px}.layadmin-takerates .layui-progress h3{position:absolute;right:0;top:-35px;color:#999;font-size:14px}.layadmin-takerates .layui-progress-bar{text-align:left}.layadmin-takerates .layui-progress-text{top:-35px;line-height:26px;font-size:26px}.layadmin-news{height:60px!important;padding:5px 0}.layadmin-news a{display:block;line-height:60px;text-align:center}.layadmin-news .layui-carousel-ind{height:45px}.layadmin-list li{margin-bottom:6px;padding-bottom:6px;border-bottom-color:#f6f6f6;list-style-position:inside;list-style-type:disc;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.layadmin-list li a{color:#666}.layadmin-list li a:hover{color:#009688}.layadmin-list li:last-child{border:none;padding:0;margin:0}.layadmin-text p{margin-bottom:10px;text-indent:2em}.layadmin-text p:last-child{margin:0}.layadmin-font-em{font-size:13px;color:#758697}.layui-card-header .layui-a-tips{position:absolute;right:15px;color:#01AAED}.layuiadmin-card-text{background-color:#f8f8f8;color:#777;padding:24px}.layuiadmin-card-text .layui-text-top{padding-bottom:10px}.layuiadmin-card-text .layui-text-top i{margin-right:10px;font-size:24px;color:#009688}.layuiadmin-card-text .layui-text-top a{line-height:24px;font-size:16px;vertical-align:top}.layuiadmin-card-text .layui-text-center{height:44px;line-height:22px;margin-bottom:10px;overflow:hidden}.layuiadmin-card-text .layui-text-bottom{position:relative}.layuiadmin-badge,.layuiadmin-btn-group,.layuiadmin-span-color{position:absolute;right:15px}.layuiadmin-card-text .layui-text-bottom a{color:#777;font-size:12px;text-overflow:ellipsis;word-break:break-all}.layuiadmin-card-text .layui-text-bottom span{color:#CCC;font-size:12px;position:absolute;right:0}.layuiadmin-card-link a:hover,.layuiadmin-card-team li a:hover,.layuiadmin-card-text a:hover{color:#01AAED;transition:all .3s}.layuiadmin-card-status{padding:0 10px 10px}.layuiadmin-card-status dd{padding:15px 0;border-bottom:1px solid #EEE;display:-webkit-flex;display:flex}.layuiadmin-card-status dd:last-child{border:none}.layuiadmin-card-status dd div.layui-status-img,.layuiadmin-card-team .layui-team-img{width:32px;height:32px;border-radius:50%;background-color:#009688;margin-right:15px}.layuiadmin-card-status dd div.layui-status-img a{width:100%;height:100%;display:inline-block;text-align:center;line-height:32px}.layuiadmin-card-status dd div.layui-status-img img,.layuiadmin-card-team .layui-team-img img{width:50%;height:50%}.layuiadmin-card-status dd div a{color:#01AAED}.layuiadmin-card-status dd div span{color:#BBB}.layuiadmin-card-link{padding-left:10px;font-size:0}.layuiadmin-card-link a{display:inline-block;width:25%;color:#666;font-size:14px;margin-bottom:12px}.layuiadmin-card-link button{vertical-align:top}.layuiadmin-card-link button:hover{color:#009688}.layuiadmin-card-team li{padding:10px 0 10px 10px}.layuiadmin-card-team .layui-team-img{display:inline-block;margin-right:8px;width:24px;height:24px;text-align:center;line-height:24px}.layuiadmin-card-team span{color:#777}.layuiadmin-badge{top:50%;margin-top:-9px;color:#01AAED}.layuiadmin-card-list{padding:15px}.layuiadmin-card-list p.layuiadmin-big-font{font-size:36px;color:#666;line-height:36px;padding:5px 0 10px;overflow:hidden;text-overflow:ellipsis;word-break:break-all;white-space:nowrap}.layuiadmin-card-list p.layuiadmin-normal-font{padding-bottom:10px;font-size:20px;color:#666;line-height:24px}.layuiadmin-span-color{font-size:14px}.layuiadmin-span-color i{padding-left:5px}.layuiadmin-card-status li{position:relative;padding:10px 0;border-bottom:1px solid #EEE}.layuiadmin-card-status li h3{padding-bottom:5px;font-weight:700}.layuiadmin-card-status li p{padding-bottom:10px}.layuiadmin-card-status li>span{color:#999}.layuiadmin-home2-usernote .layuiadmin-reply{display:none;position:absolute;right:0;bottom:12px}.layuiadmin-home2-usernote li:hover .layuiadmin-reply{display:block}.layuiadmin-page-table td span{color:#2F4056}.layuiadmin-page-table td span.first{color:#FF5722}.layuiadmin-page-table td span.second{color:#FFB800}.layuiadmin-page-table td span.third{color:#5FB878}.layuiAdmin-msg-detail h1{font-size:16px}.layuiAdmin-msg-detail .layui-card-header{height:auto;line-height:30px;padding:15px}.layuiAdmin-msg-detail .layui-card-header span{padding:0 5px;color:#999}.layuiAdmin-msg-detail .layui-card-header span:first-child{padding-left:0}.layuiAdmin-msg-detail .layui-card-body{padding:15px}.layuiadmin-content-bread{padding-bottom:20px}.layuiadmin-order-progress{position:relative;top:12px}.layui-card-header.layuiadmin-card-header-auto{padding-top:15px;padding-bottom:15px;height:auto}.layuiadmin-card-header-auto i.layuiadmin-button-btn{position:relative;right:0;top:0;vertical-align:middle}.layuiadmin-card-header-auto .layui-form-item:last-child{margin-bottom:0}.layadmin-setTheme{padding:15px;overflow-x:hidden}.layadmin-setTheme>h5{padding:20px 0 10px;color:#000}.layadmin-setTheme>h5:first-child{padding-top:0}.layadmin-setTheme-color{width:330px;font-size:0}.layadmin-setTheme-color li{position:relative;display:inline-block;vertical-align:top;width:80px;height:50px;margin:0 15px 15px 0;background-color:#f2f2f2;cursor:pointer;font-size:12px;color:#666}.layadmin-setTheme-color li:after{content:'';position:absolute;z-index:20;top:50%;left:50%;width:1px;height:0;border:1px solid #f2f2f2;transition:all .3s;-webkit-transition:all .3s;opacity:0}.layadmin-setTheme-color li.layui-this:after,.layadmin-setTheme-color li:hover:after{width:100%;height:100%;padding:4px;top:-5px;left:-5px;border-color:#5FB878;opacity:1}.layadmin-setTheme-header{position:relative;z-index:10;height:10px;border-top:1px solid #f2f2f2;border-right:1px solid #f2f2f2}.layadmin-setTheme-side{position:absolute;left:0;top:0;width:20px;height:100%;z-index:11}.layadmin-setTheme-logo{position:absolute;left:0;top:0;width:100%;height:10px;box-shadow:0 1px 2px 0 rgba(0,0,0,.15)}.layadmin-form-right{text-align:right}.layadmin-about p{margin-bottom:10px}.layadmin-menu-list .layui-card-header{height:50px;line-height:50px;font-size:16px}.layadmin-menu-list .layui-card-header:active{background-color:#f2f2f2}.layadmin-menu-list .layui-card-header .layui-icon{position:relative;top:1px;left:0;display:inline-block;margin:0 10px;font-size:18px}@-webkit-keyframes layui-rl{from{-webkit-transform:translate3d(100%,0,0)}to{-webkit-transform:translate3d(0,0,0)}}@keyframes layui-rl{from{transform:translate3d(100%,0,0)}to{transform:translate3d(0,0,0)}}.layui-anim-rl{-webkit-animation-name:layui-rl;animation-name:layui-rl}@-webkit-keyframes layui-lr{from{-webkit-transform:translate3d(0 0,0);opacity:1}to{-webkit-transform:translate3d(100%,0,0);opacity:1}}@keyframes layui-lr{from{transform:translate3d(0,0,0)}to{transform:translate3d(100%,0,0)}}.layui-anim-lr,.layui-anim-rl.layer-anim-close{-webkit-animation-name:layui-lr;animation-name:layui-lr}.layadmin-tips{margin-top:30px;text-align:center}.layadmin-tips .layui-icon[face]{display:inline-block;font-size:300px;color:#393D49}.layadmin-tips .layui-text{width:500px;margin:30px auto;padding-top:20px;border-top:5px solid #009688;font-size:16px}.layadmin-tips h1{font-size:100px;line-height:100px;color:#009688}.layadmin-tips .layui-text .layui-anim{display:inline-block}@media screen and (max-width:768px){.layadmin-panel-selection{margin:0;width:auto}.layui-body .layui-nav .layui-nav-item{display:block}.layui-layout-admin .layui-body .layadmin-tabsbody-item{-webkit-overflow-scrolling:touch;overflow:auto}} \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/style/res/bg-none.jpg b/IoTGateway/wwwroot/layuiadmin/style/res/bg-none.jpg new file mode 100644 index 0000000..b7c9e7b Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/style/res/bg-none.jpg differ diff --git a/IoTGateway/wwwroot/layuiadmin/style/res/logo.png b/IoTGateway/wwwroot/layuiadmin/style/res/logo.png new file mode 100644 index 0000000..a932133 Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/style/res/logo.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/style/res/wangguan.png b/IoTGateway/wwwroot/layuiadmin/style/res/wangguan.png new file mode 100644 index 0000000..0c43999 Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/style/res/wangguan.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/style/res/wangguan_1.png b/IoTGateway/wwwroot/layuiadmin/style/res/wangguan_1.png new file mode 100644 index 0000000..e4f41c5 Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/style/res/wangguan_1.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/config.json b/IoTGateway/wwwroot/layuiadmin/ueditor/config.json new file mode 100644 index 0000000..49a4b54 --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/config.json @@ -0,0 +1,94 @@ +/* 前后端通信相关的配置,注释只允许使用多行方式 */ +{ + /* 上传图片配置项 */ + "imageActionName": "UploadForLayUIUEditor", /* 执行上传图片的action名称 */ + "imageFieldName": "FileID", /* 提交的图片表单名称 */ + "imageMaxSize": 2048000, /* 上传大小限制,单位B */ + "imageAllowFiles": [".png", ".jpg", ".jpeg", ".gif", ".bmp"], /* 上传图片格式显示 */ + "imageCompressEnable": true, /* 是否压缩图片,默认是true */ + "imageCompressBorder": 1600, /* 图片压缩最长边限制 */ + "imageInsertAlign": "none", /* 插入的图片浮动方式 */ + "imageUrlPrefix": "", /* 图片访问路径前缀 默认返回全路径*/ + "imagePathFormat": "upload/image/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */ + /* {filename} 会替换成原文件名,配置这项需要注意中文乱码问题 */ + /* {rand:6} 会替换成随机数,后面的数字是随机数的位数 */ + /* {time} 会替换成时间戳 */ + /* {yyyy} 会替换成四位年份 */ + /* {yy} 会替换成两位年份 */ + /* {mm} 会替换成两位月份 */ + /* {dd} 会替换成两位日期 */ + /* {hh} 会替换成两位小时 */ + /* {ii} 会替换成两位分钟 */ + /* {ss} 会替换成两位秒 */ + /* 非法字符 \ : * ? " < > | */ + /* 具请体看线上文档: fex.baidu.com/ueditor/#use-format_upload_filename */ + + /* 涂鸦图片上传配置项 */ + "scrawlActionName": "UploadForLayUIUEditor", /* 执行上传涂鸦的action名称 */ + "scrawlFieldName": "FileID", /* 提交的图片表单名称 */ + "scrawlPathFormat": "upload/image/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */ + "scrawlMaxSize": 2048000, /* 上传大小限制,单位B */ + "scrawlUrlPrefix": "", /* 图片访问路径前缀 */ + "scrawlInsertAlign": "none", + + /* 截图工具上传 */ + "snapscreenActionName": "UploadForLayUIUEditor", /* 执行上传截图的action名称 */ + "snapscreenPathFormat": "upload/image/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */ + "snapscreenUrlPrefix": "", /* 图片访问路径前缀 */ + "snapscreenInsertAlign": "none", /* 插入的图片浮动方式 */ + + /* 抓取远程图片配置 */ + "catcherLocalDomain": ["127.0.0.1", "localhost", "img.baidu.com"], + "catcherActionName": "catchimage", /* 执行抓取远程图片的action名称 */ + "catcherFieldName": "source", /* 提交的图片列表表单名称 */ + "catcherPathFormat": "upload/image/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */ + "catcherUrlPrefix": "", /* 图片访问路径前缀 */ + "catcherMaxSize": 2048000, /* 上传大小限制,单位B */ + "catcherAllowFiles": [".png", ".jpg", ".jpeg", ".gif", ".bmp"], /* 抓取图片格式显示 */ + + /* 上传视频配置 */ + "videoActionName": "UploadForLayUIUEditor", /* 执行上传视频的action名称 */ + "videoFieldName": "FileID", /* 提交的视频表单名称 */ + "videoPathFormat": "upload/video/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */ + "videoUrlPrefix": "", /* 视频访问路径前缀 */ + "videoMaxSize": 102400000, /* 上传大小限制,单位B,默认100MB */ + "videoAllowFiles": [ + ".flv", ".swf", ".mkv", ".avi", ".rm", ".rmvb", ".mpeg", ".mpg", + ".ogg", ".ogv", ".mov", ".wmv", ".mp4", ".webm", ".mp3", ".wav", ".mid"], /* 上传视频格式显示 */ + + /* 上传文件配置 */ + "fileActionName": "UploadForLayUIUEditor", /* controller里,执行上传视频的action名称 */ + "fileFieldName": "FileID", /* 提交的文件表单名称 */ + "filePathFormat": "upload/file/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */ + "fileUrlPrefix": "", /* 文件访问路径前缀 */ + "fileMaxSize": 51200000, /* 上传大小限制,单位B,默认50MB */ + "fileAllowFiles": [ + ".png", ".jpg", ".jpeg", ".gif", ".bmp", + ".flv", ".swf", ".mkv", ".avi", ".rm", ".rmvb", ".mpeg", ".mpg", + ".ogg", ".ogv", ".mov", ".wmv", ".mp4", ".webm", ".mp3", ".wav", ".mid", + ".rar", ".zip", ".tar", ".gz", ".7z", ".bz2", ".cab", ".iso", + ".doc", ".docx", ".xls", ".xlsx", ".ppt", ".pptx", ".pdf", ".txt", ".md", ".xml" + ], /* 上传文件格式显示 */ + + /* 列出指定目录下的图片 */ + "imageManagerActionName": "listimage", /* 执行图片管理的action名称 */ + "imageManagerListPath": "", /* 指定要列出图片的目录 */ + "imageManagerListSize": 20, /* 每次列出文件数量 */ + "imageManagerUrlPrefix": "", /* 图片访问路径前缀 */ + "imageManagerInsertAlign": "none", /* 插入的图片浮动方式 */ + "imageManagerAllowFiles": [".png", ".jpg", ".jpeg", ".gif", ".bmp"], /* 列出的文件类型 */ + + /* 列出指定目录下的文件 */ + "fileManagerActionName": "listfile", /* 执行文件管理的action名称 */ + "fileManagerListPath": "upload/file", /* 指定要列出文件的目录 */ + "fileManagerUrlPrefix": "/ueditor/net/", /* 文件访问路径前缀 */ + "fileManagerListSize": 20, /* 每次列出文件数量 */ + "fileManagerAllowFiles": [ + ".png", ".jpg", ".jpeg", ".gif", ".bmp", + ".flv", ".swf", ".mkv", ".avi", ".rm", ".rmvb", ".mpeg", ".mpg", + ".ogg", ".ogv", ".mov", ".wmv", ".mp4", ".webm", ".mp3", ".wav", ".mid", + ".rar", ".zip", ".tar", ".gz", ".7z", ".bz2", ".cab", ".iso", + ".doc", ".docx", ".xls", ".xlsx", ".ppt", ".pptx", ".pdf", ".txt", ".md", ".xml" + ] /* 列出的文件类型 */ + +} diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/anchor/anchor.html b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/anchor/anchor.html new file mode 100644 index 0000000..8a45771 --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/anchor/anchor.html @@ -0,0 +1 @@ +
            \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/attachment/attachment.css b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/attachment/attachment.css new file mode 100644 index 0000000..721142d --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/attachment/attachment.css @@ -0,0 +1,2 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + @charset "utf-8";.tabbody,.wrapper{position:relative}.wrapper{zoom:1;width:630px;*width:626px;height:380px;margin:0 auto;padding:10px;font-family:sans-serif}.tabhead{float:left}.tabbody{width:100%;height:346px;clear:both}.tabbody .panel{position:absolute;width:0;height:0;background:#fff;overflow:hidden;display:none}.tabbody .panel.focus{width:100%;height:346px;display:block}.tabbody #upload.panel{width:0;height:0;overflow:hidden;position:absolute!important;clip:rect(1px,1px,1px,1px);background:#fff;display:block}.tabbody #upload.panel.focus{width:100%;height:346px;display:block;clip:auto}#upload .queueList{margin:0;width:100%;height:100%;position:absolute;overflow:hidden}#upload p{margin:0}.element-invisible{width:0!important;height:0!important;border:0;padding:0;margin:0;overflow:hidden;position:absolute!important;clip:rect(1px,1px,1px,1px)}#upload .placeholder{margin:10px;border:2px dashed #e6e6e6;*border:0 dashed #e6e6e6;height:172px;padding-top:150px;text-align:center;background:url(images/image.png) center 70px no-repeat;color:#ccc;font-size:18px;position:relative;top:0;*top:10px}#upload .placeholder .webuploader-pick{font-size:18px;background:#00b7ee;border-radius:3px;line-height:44px;padding:0 30px;*width:120px;color:#fff;display:inline-block;margin:0 auto 20px;cursor:pointer;box-shadow:0 1px 1px rgba(0,0,0,.1)}#upload .placeholder .webuploader-pick-hover{background:#00a2d4}#filePickerContainer{text-align:center}#upload .placeholder .flashTip{color:#666;font-size:12px;position:absolute;width:100%;text-align:center;bottom:20px}#upload .placeholder .flashTip a{color:#0785d1;text-decoration:none}#upload .placeholder .flashTip a:hover{text-decoration:underline}#upload .placeholder.webuploader-dnd-over{border-color:#999}#upload .filelist{list-style:none;margin:0;padding:0;overflow-x:hidden;overflow-y:auto;position:relative;height:300px}#upload .filelist:after{content:'';display:block;width:0;height:0;overflow:hidden;clear:both}#upload .filelist li{width:113px;height:113px;background:url(images/bg.png);text-align:center;margin:9px 0 0 9px;*margin:6px 0 0 6px;position:relative;display:block;float:left;overflow:hidden;font-size:12px}#upload .filelist li p.log{position:relative;top:-45px}#upload .filelist li p.title{position:absolute;left:0;width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;top:5px;text-indent:5px;text-align:left}#upload .filelist li p.progress{position:absolute;width:100%;bottom:0;left:0;height:8px;overflow:hidden;z-index:50;margin:0;border-radius:0;background:0 0;-webkit-box-shadow:0 0 0}#upload .filelist li p.progress span{display:none;overflow:hidden;width:0;height:100%;background:url(images/progress.png) repeat-x #1483d8;-webit-transition:width .2s linear;-moz-transition:width .2s linear;-o-transition:width .2s linear;-ms-transition:width .2s linear;transition:width .2s linear;-webkit-animation:progressmove 2s linear infinite;-moz-animation:progressmove 2s linear infinite;-o-animation:progressmove 2s linear infinite;-ms-animation:progressmove 2s linear infinite;animation:progressmove 2s linear infinite;-webkit-transform:translateZ(0)}@-webkit-keyframes progressmove{0%{background-position:0 0}100%{background-position:17px 0}}@-moz-keyframes progressmove{0%{background-position:0 0}100%{background-position:17px 0}}@keyframes progressmove{0%{background-position:0 0}100%{background-position:17px 0}}#upload .filelist li p.imgWrap{position:relative;z-index:2;line-height:113px;vertical-align:middle;overflow:hidden;width:113px;height:113px;-webkit-transform-origin:50% 50%;-moz-transform-origin:50% 50%;-o-transform-origin:50% 50%;-ms-transform-origin:50% 50%;transform-origin:50% 50%;-webit-transition:.2s ease-out;-moz-transition:.2s ease-out;-o-transition:.2s ease-out;-ms-transition:.2s ease-out;transition:.2s ease-out}#upload .filelist li p.imgWrap.notimage{margin-top:0;width:111px;height:111px;border:1px solid #eee}#upload .filelist li p.imgWrap.notimage i.file-preview{margin-top:15px}#upload .filelist li img{width:100%}#upload .filelist li p.error{background:#f43838;color:#fff;position:absolute;bottom:0;left:0;height:28px;line-height:28px;width:100%;z-index:100;display:none}#upload .filelist li .success{display:block;position:absolute;left:0;bottom:0;height:40px;width:100%;z-index:200;background:url(images/success.png) right bottom no-repeat;background-image:url(images/success.gif)\9}#upload .filelist li.filePickerBlock{width:113px;height:113px;background:url(images/image.png) center 12px no-repeat;border:1px solid #eee;border-radius:0}#upload .filelist li.filePickerBlock div.webuploader-pick{width:100%;height:100%;margin:0;padding:0;opacity:0;background:0 0;font-size:0}#upload .filelist div.file-panel{position:absolute;height:0;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#80000000', endColorstr='#80000000')\9;background:rgba(0,0,0,.5);width:100%;top:0;left:0;overflow:hidden;z-index:300}#upload .filelist div.file-panel span{width:24px;height:24px;display:inline;float:right;text-indent:-9999px;overflow:hidden;background:url(images/icons.png) no-repeat;background:url(images/icons.gif) no-repeat\9;margin:5px 1px 1px;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#upload .filelist div.file-panel span.rotateLeft{display:none;background-position:0 -24px}#upload .filelist div.file-panel span.rotateLeft:hover{background-position:0 0}#upload .filelist div.file-panel span.rotateRight{display:none;background-position:-24px -24px}#upload .filelist div.file-panel span.rotateRight:hover{background-position:-24px 0}#upload .filelist div.file-panel span.cancel{background-position:-48px -24px}#upload .filelist div.file-panel span.cancel:hover{background-position:-48px 0}#upload .statusBar{height:45px;border-bottom:1px solid #dadada;margin:0 10px;padding:0;line-height:45px;vertical-align:middle;position:relative}#upload .statusBar .progress{border:1px solid #1483d8;width:198px;background:#fff;height:18px;position:absolute;top:12px;display:none;text-align:center;line-height:18px;color:#6dbfff;margin:0 10px 0 0}#upload .statusBar .progress span.percentage{width:0;height:100%;left:0;top:0;background:#1483d8;position:absolute}#upload .statusBar .progress span.text{position:relative;z-index:10}#upload .statusBar .info{display:inline-block;font-size:14px;color:#666}#upload .statusBar .btns{position:absolute;top:7px;right:0;line-height:30px}#filePickerBtn{display:inline-block;float:left}#upload .statusBar .btns .uploadBtn,#upload .statusBar .btns .uploadBtn.state-paused,#upload .statusBar .btns .uploadBtn.state-uploading,#upload .statusBar .btns .webuploader-pick{background:#fff;border:1px solid #cfcfcf;color:#565656;padding:0 18px;display:inline-block;border-radius:3px;margin-left:10px;cursor:pointer;font-size:14px;float:left;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#upload .statusBar .btns .uploadBtn.state-paused:hover,#upload .statusBar .btns .uploadBtn.state-uploading:hover,#upload .statusBar .btns .uploadBtn:hover,#upload .statusBar .btns .webuploader-pick-hover{background:#f0f0f0}#upload .statusBar .btns .uploadBtn,#upload .statusBar .btns .uploadBtn.state-paused{background:#00b7ee;color:#fff;border-color:transparent}#upload .statusBar .btns .uploadBtn.state-paused:hover,#upload .statusBar .btns .uploadBtn:hover{background:#00a2d4}#upload .statusBar .btns .uploadBtn.disabled{pointer-events:none;filter:alpha(opacity=60);-moz-opacity:.6;-khtml-opacity:.6;opacity:.6}#online{width:100%;height:336px;padding:10px 0 0}#online li,#online li.clearFloat,#online ul{padding:0;display:block}#online #fileList{width:100%;height:100%;overflow-x:hidden;overflow-y:auto;position:relative}#online ul{list-style:none;margin:0}#online li{float:left;list-style:none;width:113px;height:113px;margin:0 0 9px 9px;*margin:0 0 6px 6px;background-color:#eee;overflow:hidden;cursor:pointer;position:relative}#online li.clearFloat{float:none;clear:both;width:0;height:0;margin:0}#online li img{cursor:pointer}#online li div.file-wrapper{cursor:pointer;position:absolute;display:block;width:111px;height:111px;border:1px solid #eee;background:url(images/bg.png)}#online li div span.file-title{display:block;padding:0 3px;margin:3px 0 0;font-size:12px;height:13px;color:#555;text-align:center;width:107px;white-space:nowrap;word-break:break-all;overflow:hidden;text-overflow:ellipsis}#online li .icon{cursor:pointer;width:113px;height:113px;position:absolute;top:0;left:0;z-index:2;border:0;background-repeat:no-repeat}#online li .icon:hover,#online li.selected .icon:hover{width:107px;height:107px;border:3px solid #1094fa}#online li.selected .icon{background-image:url(images/success.png);background-image:url(images/success.gif)\9;background-position:75px 75px}#online li.selected .icon:hover{background-position:72px 72px}i.file-preview{display:block;margin:10px auto;width:70px;height:70px;background-image:url(images/file-icons.png);background-image:url(images/file-icons.gif)\9;background-position:-140px center;background-repeat:no-repeat}i.file-preview.file-type-dir{background-position:0 center}i.file-preview.file-type-file{background-position:-140px center}i.file-preview.file-type-filelist{background-position:-210px center}i.file-preview.file-type-7z,i.file-preview.file-type-bz2,i.file-preview.file-type-gz,i.file-preview.file-type-rar,i.file-preview.file-type-tar,i.file-preview.file-type-zip{background-position:-280px center}i.file-preview.file-type-xls,i.file-preview.file-type-xlsx{background-position:-350px center}i.file-preview.file-type-doc,i.file-preview.file-type-docx{background-position:-420px center}i.file-preview.file-type-ppt,i.file-preview.file-type-pptx{background-position:-490px center}i.file-preview.file-type-vsd{background-position:-560px center}i.file-preview.file-type-pdf{background-position:-630px center}i.file-preview.file-type-asp,i.file-preview.file-type-css,i.file-preview.file-type-htm,i.file-preview.file-type-html,i.file-preview.file-type-js,i.file-preview.file-type-json,i.file-preview.file-type-jsp,i.file-preview.file-type-md,i.file-preview.file-type-php,i.file-preview.file-type-txt,i.file-preview.file-type-xml{background-position:-700px center}i.file-preview.file-type-apk{background-position:-770px center}i.file-preview.file-type-exe{background-position:-840px center}i.file-preview.file-type-ipa{background-position:-910px center}i.file-preview.file-type-avi,i.file-preview.file-type-flv,i.file-preview.file-type-mkv,i.file-preview.file-type-mov,i.file-preview.file-type-mp4,i.file-preview.file-type-mpeg,i.file-preview.file-type-mpg,i.file-preview.file-type-ogv,i.file-preview.file-type-rm,i.file-preview.file-type-rmvb,i.file-preview.file-type-swf,i.file-preview.file-type-webm{background-position:-980px center}i.file-preview.file-type-mid,i.file-preview.file-type-mp3,i.file-preview.file-type-ogg,i.file-preview.file-type-wav,i.file-preview.file-type-wmv{background-position:-1050px center}i.file-preview.file-type-bmp,i.file-preview.file-type-gif,i.file-preview.file-type-jpeg,i.file-preview.file-type-jpg,i.file-preview.file-type-png,i.file-preview.file-type-psd{background-position:-140px center} \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/attachment/attachment.html b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/attachment/attachment.html new file mode 100644 index 0000000..7a9a0dc --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/attachment/attachment.html @@ -0,0 +1 @@ +ueditor图片对话框
            0%
            \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/attachment/attachment.js b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/attachment/attachment.js new file mode 100644 index 0000000..71f0d4e --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/attachment/attachment.js @@ -0,0 +1,2 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + ;!function(){function initTabs(){for(var e=$G("tabhead").children,t=0;t'+"还有2个未上传文件".replace(/[\d]/,s)+""),!1;break;case"online":t=onlineFile.getInsertList()}editor.execCommand("insertfile",t)}}function UploadFile(e){this.$wrap=e.constructor==String?$("#"+e):$(e),this.init()}function OnlineFile(e){this.container=utils.isString(e)?document.getElementById(e):e,this.init()}var uploadFile,onlineFile;window.onload=function(){initTabs(),initButtons()},UploadFile.prototype={init:function(){this.fileList=[],this.initContainer(),this.initUploader()},initContainer:function(){this.$queue=this.$wrap.find(".filelist")},initUploader:function(){function e(e){var t=r('
          • '+e.name+'

          • '),i=r('
            '+lang.uploadDelete+''+lang.uploadTurnRight+''+lang.uploadTurnLeft+"
            ").appendTo(t),a=t.find("p.progress span"),s=t.find("p.imgWrap"),l=r('

            ').hide().appendTo(t),o=function(e){switch(e){case"exceed_size":text=lang.errorExceedSize;break;case"interrupt":text=lang.errorInterrupt;break;case"http":text=lang.errorHttp;break;case"not_allow_type":text=lang.errorFileType;break;default:text=lang.errorUploadRetry}l.text(text).show()};"invalid"===e.getStatus()?o(e.statusText):(s.text(lang.uploadPreview),"|png|jpg|jpeg|bmp|gif|".indexOf("|"+e.ext.toLowerCase()+"|")==-1?s.empty().addClass("notimage").append(''+e.name+""):browser.ie&&browser.version<=7?s.text(lang.uploadNoPreview):n.makeThumb(e,function(e,t){if(e||!t)s.text(lang.uploadNoPreview);else{var i=r('');s.empty().append(i),i.on("error",function(){s.text(lang.uploadNoPreview)})}},b,x),F[e.id]=[e.size,0],e.rotation=0,e.ext&&S.indexOf(e.ext.toLowerCase())!=-1||(o("not_allow_type"),n.removeFile(e))),e.on("statuschange",function(s,n){"progress"===n?a.hide().width(0):"queued"===n&&(t.off("mouseenter mouseleave"),i.remove()),"error"===s||"invalid"===s?(o(e.statusText),F[e.id][1]=1):"interrupt"===s?o("interrupt"):"queued"===s?F[e.id][1]=0:"progress"===s&&(l.hide(),a.css("display","block")),t.removeClass("state-"+n).addClass("state-"+s)}),t.on("mouseenter",function(){i.stop().animate({height:30})}),t.on("mouseleave",function(){i.stop().animate({height:0})}),i.on("click","span",function(){var t,i=r(this).index();switch(i){case 0:return void n.removeFile(e);case 1:e.rotation+=90;break;case 2:e.rotation-=90}U?(t="rotate("+e.rotation+"deg)",s.css({"-webkit-transform":t,"-mos-transform":t,"-o-transform":t,transform:t})):s.css("filter","progid:DXImageTransform.Microsoft.BasicImage(rotation="+~~(e.rotation/90%4+4)%4+")")}),t.insertBefore(f)}function t(e){var t=r("#"+e.id);delete F[e.id],i(),t.off().find(".file-panel").off().end().remove()}function i(){var e,t=0,i=0,a=g.children();r.each(F,function(e,a){i+=a[0],t+=a[0]*a[1]}),e=i?t/i:0,a.eq(0).text(Math.round(100*e)+"%"),a.eq(1).css("width",Math.round(100*e)+"%"),s()}function a(e,t){if(e!=w){var i=n.getStats();switch(c.removeClass("state-"+w),c.addClass("state-"+e),e){case"pedding":d.addClass("element-invisible"),u.addClass("element-invisible"),h.removeClass("element-invisible"),g.hide(),p.hide(),n.refresh();break;case"ready":h.addClass("element-invisible"),d.removeClass("element-invisible"),u.removeClass("element-invisible"),g.hide(),p.show(),c.text(lang.uploadStart),n.refresh();break;case"uploading":g.show(),p.hide(),c.text(lang.uploadPause);break;case"paused":g.show(),p.hide(),c.text(lang.uploadContinue);break;case"confirm":if(g.show(),p.hide(),c.text(lang.uploadStart),i=n.getStats(),i.successNum&&!i.uploadFailNum)return void a("finish");break;case"finish":g.hide(),p.show(),i.uploadFailNum?c.text(lang.uploadRetry):c.text(lang.uploadStart)}w=e,s()}l.getQueueCount()?c.removeClass("disabled"):c.addClass("disabled")}function s(){var e,t="";"ready"===w?t=lang.updateStatusReady.replace("_",m).replace("_KB",WebUploader.formatSize(v)):"confirm"===w?(e=n.getStats(),e.uploadFailNum&&(t=lang.updateStatusConfirm.replace("_",e.successNum).replace("_",e.successNum))):(e=n.getStats(),t=lang.updateStatusFinish.replace("_",m).replace("_KB",WebUploader.formatSize(v)).replace("_",e.successNum),e.uploadFailNum&&(t+=lang.updateStatusError.replace("_",e.uploadFailNum))),p.html(t)}var n,l=this,r=jQuery,o=l.$wrap,d=o.find(".filelist"),u=o.find(".statusBar"),p=u.find(".info"),c=o.find(".uploadBtn"),f=(o.find(".filePickerBtn"),o.find(".filePickerBlock")),h=o.find(".placeholder"),g=u.find(".progress").hide(),m=0,v=0,C=window.devicePixelRatio||1,b=113*C,x=113*C,w="",F={},U=function(){var e=document.createElement("p").style,t="transition"in e||"WebkitTransition"in e||"MozTransition"in e||"msTransition"in e||"OTransition"in e;return e=null,t}(),y=editor.getActionUrl(editor.getOpt("fileActionName")),k=editor.getOpt("fileMaxSize"),S=(editor.getOpt("fileAllowFiles")||[]).join("").replace(/\./g,",").replace(/^[,]/,"");return WebUploader.Uploader.support()?editor.getOpt("fileActionName")?(n=l.uploader=WebUploader.create({pick:{id:"#filePickerReady",label:lang.uploadSelectFile},swf:"../../third-party/webuploader/Uploader.swf",server:y,fileVal:editor.getOpt("fileFieldName"),duplicate:!0,fileSingleSizeLimit:k,compress:!1}),n.addButton({id:"#filePickerBlock"}),n.addButton({id:"#filePickerBtn",label:lang.uploadAddFile}),a("pedding"),n.on("fileQueued",function(t){m++,v+=t.size,1===m&&(h.addClass("element-invisible"),u.show()),e(t)}),n.on("fileDequeued",function(e){m--,v-=e.size,t(e),i()}),n.on("filesQueued",function(e){n.isInProgress()||"pedding"!=w&&"finish"!=w&&"confirm"!=w&&"ready"!=w||a("ready"),i()}),n.on("all",function(e,t){switch(e){case"uploadFinished":a("confirm",t);break;case"startUpload":var i=utils.serializeParam(editor.queryCommandValue("serverparam"))||"",s=utils.formatUrl(y+(y.indexOf("?")==-1?"?":"&")+"encode=utf-8&"+i);n.option("server",s),a("uploading",t);break;case"stopUpload":a("paused",t)}}),n.on("uploadBeforeSend",function(e,t,i){i.X_Requested_With="XMLHttpRequest"}),n.on("uploadProgress",function(e,t){var a=r("#"+e.id),s=a.find(".progress span");s.css("width",100*t+"%"),F[e.id][1]=t,i()}),n.on("uploadSuccess",function(e,t){var i=r("#"+e.id);try{var a=t._raw||t,s=utils.str2json(a);"200"==s.Code?(l.fileList.push(s.Data),i.append('')):i.find(".error").text(s.Msg).show()}catch(n){i.find(".error").text(lang.errorServerUpload).show()}}),n.on("uploadError",function(e,t){}),n.on("error",function(t,i){"Q_TYPE_DENIED"!=t&&"F_EXCEED_SIZE"!=t||e(i)}),n.on("uploadComplete",function(e,t){}),c.on("click",function(){return!r(this).hasClass("disabled")&&void("ready"===w?n.upload():"paused"===w?n.upload():"uploading"===w&&n.stop())}),c.addClass("state-"+w),void i()):void r("#filePickerReady").after(r("
            ").html(lang.errorLoadConfig)).hide():void r("#filePickerReady").after(r("
            ").html(lang.errorNotSupport)).hide()},getQueueCount:function(){var e,t,i,a=0,s=this.uploader.getFiles();for(t=0;e=s[t++];)i=e.getStatus(),"queued"!=i&&"uploading"!=i&&"progress"!=i||a++;return a},getInsertList:function(){for(var e=[],t=editor.getOpt("fileUrlPrefix"),i=0;i=json.total&&(_this.listEnd=!0),_this.isLoadingData=!1)}catch(e){if(r.responseText.indexOf("ue_separate_ue")!=-1){var list=r.responseText.split(r.responseText);_this.pushData(list),_this.listIndex=parseInt(list.length),_this.listEnd=!0,_this.isLoadingData=!1}}},onerror:function(){_this.isLoadingData=!1}}))},pushData:function(e){var t,i,a,s,n,l=this,r=editor.getOpt("fileManagerUrlPrefix");for(t=0;t=n?(e.width=t,e.height=i*n/s,e.style.marginLeft="-"+parseInt((e.width-t)/2)+"px"):(e.width=t*s/n,e.height=i,e.style.marginTop="-"+parseInt((e.height-i)/2)+"px"):s>=n?(e.width=t*s/n,e.height=i,e.style.marginLeft="-"+parseInt((e.width-t)/2)+"px"):(e.width=t,e.height=i*n/s,e.style.marginTop="-"+parseInt((e.height-i)/2)+"px")},getInsertList:function(){var e,t=this.list.children,i=[];for(e=0;e
            :
            :
            :x:px  y:px
            \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/background/background.js b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/background/background.js new file mode 100644 index 0000000..363fef9 --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/background/background.js @@ -0,0 +1,2 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + ;!function(){function initTabs(){for(var t=$G("tabHeads").children,e=0;e=json.total&&(_this.listEnd=!0),_this.isLoadingData=!1)}catch(e){if(r.responseText.indexOf("ue_separate_ue")!=-1){var list=r.responseText.split(r.responseText);_this.pushData(list),_this.listIndex=parseInt(list.length),_this.listEnd=!0,_this.isLoadingData=!1}}},onerror:function(){_this.isLoadingData=!1}})}},pushData:function(t){var e,i,o,n,a=this,r=editor.getOpt("imageManagerUrlPrefix");for(e=0;e=a?(t.width=e,t.height=i*a/n,t.style.marginLeft="-"+parseInt((t.width-e)/2)+"px"):(t.width=e*n/a,t.height=i,t.style.marginTop="-"+parseInt((t.height-i)/2)+"px"):n>=a?(t.width=e*n/a,t.height=i,t.style.marginLeft="-"+parseInt((t.width-e)/2)+"px"):(t.width=e,t.height=i*a/n,t.style.marginTop="-"+parseInt((t.height-i)/2)+"px")},getInsertList:function(){var t,e=this.list.children,i=[],o=getAlign();for(t=0;t"+this.point.name+": "+Math.round(100*this.point.percentage)/100+" %"}}}}}]; \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/charts/charts.css b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/charts/charts.css new file mode 100644 index 0000000..071679d --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/charts/charts.css @@ -0,0 +1,2 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + body,html{width:100%;height:100%;margin:0;padding:0;overflow-x:hidden}.main{width:100%;overflow:hidden}.table-view{height:100%;float:left;margin:20px;width:40%}.table-view .table-container{width:100%;margin-bottom:50px;overflow:scroll}.table-view th{padding:5px 10px;background-color:#F7F7F7}.table-view td{width:50px;text-align:center;padding:0}.table-container input{width:40px;padding:5px;border:none;outline:0}.table-view caption{font-size:18px;text-align:left}.charts-view{width:50%;margin-left:49%;height:400px}.charts-container{border-left:1px solid #c3c3c3}.charts-format fieldset{padding-left:20px;margin-bottom:50px}.charts-format legend{padding-left:10px;padding-right:10px}.format-item-container{padding:20px}.format-item-container label{display:block;margin:10px 0}.charts-format .data-item{border:1px solid #000;outline:0;padding:2px 3px}.charts-type{margin-top:50px;height:300px}.scroll-view{border:1px solid #c3c3c3;border-left:none;border-right:none;overflow:hidden}.scroll-container{margin:20px;width:100%;overflow:hidden}.scroll-bed{width:10000px;_margin-top:20px;-webkit-transition:margin-left .5s ease;-moz-transition:margin-left .5s ease;transition:margin-left .5s ease}.view-box{display:inline-block;*display:inline;*zoom:1;margin-right:20px;border:2px solid #fff;line-height:0;overflow:hidden;cursor:pointer}.view-box img{border:1px solid #cecece}.view-box.selected{border-color:#7274A7}.button-container{margin-bottom:20px;text-align:center}.button-container a{display:inline-block;width:100px;height:25px;line-height:25px;border:1px solid #c2ccd1;margin-right:30px;text-decoration:none;color:#000;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.button-container a:HOVER{background:#fcfcfc}.button-container a:ACTIVE{border-top-color:#c2ccd1;box-shadow:inset 0 5px 4px -4px rgba(49,49,64,.1)}.edui-charts-not-data{height:100px;line-height:100px;text-align:center} \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/charts/charts.html b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/charts/charts.html new file mode 100644 index 0000000..afb626b --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/charts/charts.html @@ -0,0 +1 @@ +chart


            \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/charts/charts.js b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/charts/charts.js new file mode 100644 index 0000000..a9ade53 --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/charts/charts.js @@ -0,0 +1,2 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + ;function initChartsTypeView(){for(var e=[],t=0,a=chartsConfig.length;t
            ');$("#scrollBed").html(e.join(""))}function renderTable(e){for(var t,a=[],r=0;t=e.rows[r];r++){tableData[r]=[],a[r]=[];for(var i,n=0;i=t.cells[n];n++){var l=getCellValue(i);r>0&&n>0&&(l=+l),0===r||0===n?a[r].push(""+l+""):a[r].push(''),tableData[r][n]=l}a[r]=a[r].join("")}$("#tableContainer").html(''+a.join("")+"
            ")}function initUserConfig(e){var t={};e&&(e=e.split(";"),$.each(e,function(e,a){a=a.split(":"),t[a[0]]=a[1]}),setUserConfig(t))}function initEvent(){var e=null,t=chartsConfig.length-1,a=$("#scrollBed .view-box");$(".charts-format").delegate(".format-ctrl","change",function(){renderCharts()}),$(".table-view").delegate(".data-item","focus",function(){e=this.value}).delegate(".data-item","blur",function(){this.value!==e&&renderCharts(),e=null}),$("#buttonContainer").delegate("a","click",function(e){e.preventDefault(),"prev"===this.getAttribute("data-title")?currentChartType>0&&(currentChartType--,updateViewType(currentChartType)):currentChartType未找到数据
            ")},dialog.onok=function(){var e=(document.forms["data-form"],getUserConfig());e.chartType=currentChartType,syncTableData(),editor.execCommand("charts",e)}; \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/charts/images/charts0.png b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/charts/images/charts0.png new file mode 100644 index 0000000..9485e5e Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/charts/images/charts0.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/charts/images/charts1.png b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/charts/images/charts1.png new file mode 100644 index 0000000..b5a0039 Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/charts/images/charts1.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/charts/images/charts2.png b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/charts/images/charts2.png new file mode 100644 index 0000000..7c91a39 Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/charts/images/charts2.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/charts/images/charts3.png b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/charts/images/charts3.png new file mode 100644 index 0000000..a6bc29b Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/charts/images/charts3.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/charts/images/charts4.png b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/charts/images/charts4.png new file mode 100644 index 0000000..742006a Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/charts/images/charts4.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/charts/images/charts5.png b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/charts/images/charts5.png new file mode 100644 index 0000000..c49a296 Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/charts/images/charts5.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/emotion/emotion.css b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/emotion/emotion.css new file mode 100644 index 0000000..a5117fa --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/emotion/emotion.css @@ -0,0 +1,2 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + .jd img{background:url(images/jxface2.gif?v=1.1) left top no-repeat;cursor:pointer;width:35px;height:35px;display:block}.pp img{background:url(images/fface.gif?v=1.1) left top no-repeat;cursor:pointer;width:25px;height:25px;display:block}.bb img,.cat img,.ldw img,.tsj img,.youa img{cursor:pointer;width:35px;height:35px;display:block}.ldw img{background:url(images/wface.gif?v=1.1) left top no-repeat}.tsj img{background:url(images/tface.gif?v=1.1) left top no-repeat}.cat img{background:url(images/cface.gif?v=1.1) left top no-repeat}.bb img{background:url(images/bface.gif?v=1.1) left top no-repeat}.youa img{background:url(images/yface.gif?v=1.1) left top no-repeat}.smileytable td{height:37px}#tabPanel{margin-left:5px;overflow:hidden}#tabContent{float:left;background:#FFF}#tabContent div{display:none;width:480px;overflow:hidden}#tabIconReview.show{left:17px;display:block}.menuFocus{background:#ACCD3C}.menuDefault{background:#FFF}#tabIconReview{position:absolute;left:406px;left:398px\9;top:41px;z-index:65533;width:90px;height:76px}img.review{width:90px;height:76px;border:2px solid #9cb945;background:center no-repeat #FFF}.wrapper .tabbody{position:relative;float:left;clear:both;padding:10px;width:95%}.tabbody table{width:100%}.tabbody td{border:1px solid #BAC498}.tabbody td span{display:block;zoom:1;padding:0 4px} \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/emotion/emotion.html b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/emotion/emotion.html new file mode 100644 index 0000000..796ba33 --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/emotion/emotion.html @@ -0,0 +1 @@ +
            \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/emotion/emotion.js b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/emotion/emotion.js new file mode 100644 index 0000000..fd69527 --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/emotion/emotion.js @@ -0,0 +1,2 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + ;function initImgName(){for(var e in emotion.SmilmgName){var t=emotion.SmilmgName[e],o=emotion.SmileyBox[e],i="";if(o.length)return;for(var a=1;a<=t[1];a++)i=t[0],a<10&&(i+="0"),i=i+a+".gif",o.push(i)}}function initEvtHandler(e){for(var t=$G(e),o=0,i=0;o'],y=0,b=emotion.SmileyBox[e].length,f=11;y");for(var v=0;v'),u.push(""),u.push(''),u.push("")):u.push(''),u.push("");u.push("")}u.push(""),u=u.join(""),l.innerHTML=u}function over(e,t,o){e.style.backgroundColor="#ACCD3C",$G("faceReview").style.backgroundImage="url("+t+")",1==o&&($G("tabIconReview").className="show"),$G("tabIconReview").style.display="block"}function out(e){e.style.backgroundColor="transparent";var t=$G("tabIconReview");t.className="",t.style.display="none"}function createTabList(e){for(var t={},o=0;o帮助

            UEditor

            ctrl+b
            ctrl+c
            ctrl+x
            ctrl+v
            ctrl+y
            ctrl+z
            ctrl+i
            ctrl+u
            ctrl+a
            shift+enter
            alt+z
            \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/help/help.js b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/help/help.js new file mode 100644 index 0000000..de29785 --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/help/help.js @@ -0,0 +1,2 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + ;function clickHandler(e,n,t){for(var c=0,i=e.length;cueditor图片对话框
              px   px
            px
            px
            0%
            \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/image/image.js b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/image/image.js new file mode 100644 index 0000000..99d3e2c --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/image/image.js @@ -0,0 +1,3 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + ;!function(){function initTabs(){for(var C=$G("tabhead").children,B=0;B'+"还有2个未上传文件".replace(/[\d]/,A)+""),!1;break;case"online":D=onlineImage.getInsertList();break;case"search":D=searchImage.getInsertList(),B=!0}D&&(editor.execCommand("insertimage",D),B&&editor.fireEvent("catchRemoteImage"))}}function initAlign(){domUtils.on($G("alignIcon"),"click",function(C){var B=C.target||C.srcElement;B.className&&B.className.indexOf("-align")!=-1&&setAlign(B.getAttribute("data-align"))})}function setAlign(C){C=C||"none";var B=$G("alignIcon").children;for(i=0;it.offsetWidth?C:t.offsetWidth-2*A,B=E&&F?C*F/E:"",D&&(t.innerHTML='')},getInsertList:function(){var C=this.getData();return C.url?[{src:C.url,_src:C.url,width:C.width||"",height:C.height||"",border:C.border||"",floatStyle:C.align||"",vspace:C.vhSpace||"",title:C.title||"",alt:C.title||"",style:"width:"+C.width+"px;height:"+C.height+"px;"}]:[]}},UploadImage.prototype={init:function(){this.imageList=[],this.initContainer(),this.initUploader()},initContainer:function(){this.$queue=this.$wrap.find(".filelist")},initUploader:function(){function C(C){var B=t('
          • '+C.name+'

          • '),D=t('
            '+lang.uploadDelete+''+lang.uploadTurnRight+''+lang.uploadTurnLeft+"
            ").appendTo(B),E=B.find("p.progress span"),F=B.find("p.imgWrap"),e=t('

            ').hide().appendTo(B),i=function(C){switch(C){case"exceed_size":text=lang.errorExceedSize;break;case"interrupt":text=lang.errorInterrupt;break;case"http":text=lang.errorHttp;break;case"not_allow_type":text=lang.errorFileType;break;default:text=lang.errorUploadRetry}e.text(text).show()};"invalid"===C.getStatus()?i(C.statusText):(F.text(lang.uploadPreview),browser.ie&&browser.version<=7?F.text(lang.uploadNoPreview):A.makeThumb(C,function(C,B){if(C||!B)F.text(lang.uploadNoPreview);else{var D=t('');F.empty().append(D),D.on("error",function(){F.text(lang.uploadNoPreview)})}},g,p),f[C.id]=[C.size,0],C.rotation=0,C.ext&&w.indexOf(C.ext.toLowerCase())!=-1||(i("not_allow_type"),A.removeFile(C))),C.on("statuschange",function(F,A){"progress"===A?E.hide().width(0):"queued"===A&&(B.off("mouseenter mouseleave"),D.remove()),"error"===F||"invalid"===F?(i(C.statusText),f[C.id][1]=1):"interrupt"===F?i("interrupt"):"queued"===F?f[C.id][1]=0:"progress"===F&&(e.hide(),E.css("display","block")),B.removeClass("state-"+A).addClass("state-"+F)}),B.on("mouseenter",function(){D.stop().animate({height:30})}),B.on("mouseleave",function(){D.stop().animate({height:0})}),D.on("click","span",function(){var B,D=t(this).index();switch(D){case 0:return void A.removeFile(C);case 1:C.rotation+=90;break;case 2:C.rotation-=90}v?(B="rotate("+C.rotation+"deg)",F.css({"-webkit-transform":B,"-mos-transform":B,"-o-transform":B,transform:B})):F.css("filter","progid:DXImageTransform.Microsoft.BasicImage(rotation="+~~(C.rotation/90%4+4)%4+")")}),B.insertBefore(o)}function B(C){var B=t("#"+C.id);delete f[C.id],D(),B.off().find(".file-panel").off().end().remove()}function D(){var C,B=0,D=0,E=d.children();t.each(f,function(C,E){D+=E[0],B+=E[0]*E[1]}),C=D?B/D:0,E.eq(0).text(Math.round(100*C)+"%"),E.eq(1).css("width",Math.round(100*C)+"%"),F()}function E(C,B){if(C!=m){var D=A.getStats();switch(r.removeClass("state-"+m),r.addClass("state-"+C),C){case"pedding":a.addClass("element-invisible"),s.addClass("element-invisible"),l.removeClass("element-invisible"),d.hide(),n.hide(),A.refresh();break;case"ready":l.addClass("element-invisible"),a.removeClass("element-invisible"),s.removeClass("element-invisible"),d.hide(),n.show(),r.text(lang.uploadStart),A.refresh();break;case"uploading":d.show(),n.hide(),r.text(lang.uploadPause);break;case"paused":d.show(),n.hide(),r.text(lang.uploadContinue);break;case"confirm":if(d.show(),n.hide(),r.text(lang.uploadStart),D=A.getStats(),D.successNum&&!D.uploadFailNum)return void E("finish");break;case"finish":d.hide(),n.show(),D.uploadFailNum?r.text(lang.uploadRetry):r.text(lang.uploadStart)}m=C,F()}e.getQueueCount()?r.removeClass("disabled"):r.addClass("disabled")}function F(){var C,B="";"ready"===m?B=lang.updateStatusReady.replace("_",c).replace("_KB",WebUploader.formatSize(u)):"confirm"===m?(C=A.getStats(),C.uploadFailNum&&(B=lang.updateStatusConfirm.replace("_",C.successNum).replace("_",C.successNum))):(C=A.getStats(),B=lang.updateStatusFinish.replace("_",c).replace("_KB",WebUploader.formatSize(u)).replace("_",C.successNum),C.uploadFailNum&&(B+=lang.updateStatusError.replace("_",C.uploadFailNum))),n.html(B)}var A,e=this,t=jQuery,i=e.$wrap,a=i.find(".filelist"),s=i.find(".statusBar"),n=s.find(".info"),r=i.find(".uploadBtn"),o=(i.find(".filePickerBtn"),i.find(".filePickerBlock")),l=i.find(".placeholder"),d=s.find(".progress").hide(),c=0,u=0,h=window.devicePixelRatio||1,g=113*h,p=113*h,m="",f={},v=function(){var C=document.createElement("p").style,B="transition"in C||"WebkitTransition"in C||"MozTransition"in C||"msTransition"in C||"OTransition"in C;return C=null,B}(),b=editor.getActionUrl(editor.getOpt("imageActionName")),w=(editor.getOpt("imageAllowFiles")||[]).join("").replace(/\./g,",").replace(/^[,]/,""),I=editor.getOpt("imageMaxSize"),x=editor.getOpt("imageCompressBorder");return WebUploader.Uploader.support()?editor.getOpt("imageActionName")?(A=e.uploader=WebUploader.create({pick:{id:"#filePickerReady",label:lang.uploadSelectFile},accept:{title:"Images",extensions:w,mimeTypes:"image/*"},swf:"../../third-party/webuploader/Uploader.swf",server:b,fileVal:editor.getOpt("imageFieldName"),duplicate:!0,fileSingleSizeLimit:I,compress:!!editor.getOpt("imageCompressEnable")&&{width:x,height:x,quality:90,allowMagnify:!1,crop:!1,preserveHeaders:!0}}),A.addButton({id:"#filePickerBlock"}),A.addButton({id:"#filePickerBtn",label:lang.uploadAddFile}),E("pedding"),A.on("fileQueued",function(B){c++,u+=B.size,1===c&&(l.addClass("element-invisible"),s.show()),C(B)}),A.on("fileDequeued",function(C){c--,u-=C.size,B(C),D()}),A.on("filesQueued",function(C){A.isInProgress()||"pedding"!=m&&"finish"!=m&&"confirm"!=m&&"ready"!=m||E("ready"),D()}),A.on("all",function(C,B){switch(C){case"uploadFinished":E("confirm",B);break;case"startUpload":var D=utils.serializeParam(editor.queryCommandValue("serverparam"))||"",F=utils.formatUrl(b+(b.indexOf("?")==-1?"?":"&")+"encode=utf-8&"+D);A.option("server",F),E("uploading",B);break;case"stopUpload":E("paused",B)}}),A.on("uploadBeforeSend",function(C,B,D){D.X_Requested_With="XMLHttpRequest"}),A.on("uploadProgress",function(C,B){var E=t("#"+C.id),F=E.find(".progress span");F.css("width",100*B+"%"),f[C.id][1]=B,D()}),A.on("uploadSuccess",function(C,B){var D=t("#"+C.id);try{var E=B;"200"==E.Code?(e.imageList.push(E.Data),D.append('')):D.find(".error").text(E.Msg).show()}catch(F){D.find(".error").text(lang.errorServerUpload).show()}}),A.on("uploadError",function(C,B){}),A.on("error",function(B,D){"Q_TYPE_DENIED"!=B&&"F_EXCEED_SIZE"!=B||C(D)}),A.on("uploadComplete",function(C,B){}),r.on("click",function(){return!t(this).hasClass("disabled")&&void("ready"===m?A.upload():"paused"===m?A.upload():"uploading"===m&&A.stop())}),r.addClass("state-"+m),void D()):void t("#filePickerReady").after(t("
            ").html(lang.errorLoadConfig)).hide():void t("#filePickerReady").after(t("
            ").html(lang.errorNotSupport)).hide()},getQueueCount:function(){var C,B,D,E=0,F=this.uploader.getFiles();for(B=0;C=F[B++];)D=C.getStatus(),"queued"!=D&&"uploading"!=D&&"progress"!=D||E++;return E},destroy:function(){this.$wrap.remove()},getInsertList:function(){var C,B,D=[],E=getAlign(),F=editor.getOpt("imageUrlPrefix");for(C=0;C=json.total&&(_this.listEnd=!0),_this.isLoadingData=!1)}catch(e){if(r.responseText.indexOf("ue_separate_ue")!=-1){var list=r.responseText.split(r.responseText);_this.pushData(list),_this.listIndex=parseInt(list.length),_this.listEnd=!0,_this.isLoadingData=!1}}},onerror:function(){_this.isLoadingData=!1}})}},pushData:function(C){var B,D,E,F,A=this,e=editor.getOpt("imageManagerUrlPrefix");for(B=0;B=A?(C.width=B,C.height=D*A/F,C.style.marginLeft="-"+parseInt((C.width-B)/2)+"px"):(C.width=B*F/A,C.height=D,C.style.marginTop="-"+parseInt((C.height-D)/2)+"px"):F>=A?(C.width=B*F/A,C.height=D,C.style.marginLeft="-"+parseInt((C.width-B)/2)+"px"):(C.width=B,C.height=D*A/F,C.style.marginTop="-"+parseInt((C.height-D)/2)+"px")},getInsertList:function(){var C,B=this.list.children,D=[],E=getAlign();for(C=0;C=19968&&A<=40869){var e=A-19968;B+="%"+D.substr(4*e,2)+"%"+D.substr(4*e+2,2)}else B+="%"+C.charCodeAt(E).toString(16)}return B},scale:function(C,B,D){var E=C.width,F=C.height;E>=F?(C.width=B*E/F,C.height=D,C.style.marginLeft="-"+parseInt((C.width-B)/2)+"px"):(C.width=B,C.height=D*F/E,C.style.marginTop="-"+parseInt((C.height-D)/2)+"px")},getImageData:function(){var C=this,B=$G("searchTxt").value,D=($G("searchType").value,editor.options.keepOriginName?"1":"0","http://image.baidu.com/search/index?tn=baiduimage&ipn=r&ct=201326592&cl=2&lm=-1&st=-1&fm=result&fr=&sf=1&fmq=1569221553883_R&pv=&ic=0&nc=1&z=0&hd=0&latest=0©right=0&se=1&showtab=0&fb=0&width=&height=&face=0&istype=2&ie=utf-8&sid=&word="+C.encodeToGb2312(B));$G("searchListUl").innerHTML=lang.searchLoading,ajax.request(D,{dataType:"jsonp",charset:"GB18030",onsuccess:function(B){var D=[];if(B&&B.data)for(var E=0;E
            \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/map/map.html b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/map/map.html new file mode 100644 index 0000000..9549845 --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/map/map.html @@ -0,0 +1 @@ +
            ::
            \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/map/show.html b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/map/show.html new file mode 100644 index 0000000..3cd4e5a --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/map/show.html @@ -0,0 +1 @@ +百度地图API自定义地图
            \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/preview/preview.html b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/preview/preview.html new file mode 100644 index 0000000..29822c4 --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/preview/preview.html @@ -0,0 +1 @@ +
            \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/scrawl/images/addimg.png b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/scrawl/images/addimg.png new file mode 100644 index 0000000..03a8713 Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/scrawl/images/addimg.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/scrawl/images/brush.png b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/scrawl/images/brush.png new file mode 100644 index 0000000..efa6fdb Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/scrawl/images/brush.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/scrawl/images/delimg.png b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/scrawl/images/delimg.png new file mode 100644 index 0000000..5a892e4 Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/scrawl/images/delimg.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/scrawl/images/delimgH.png b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/scrawl/images/delimgH.png new file mode 100644 index 0000000..2f0c5c9 Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/scrawl/images/delimgH.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/scrawl/images/empty.png b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/scrawl/images/empty.png new file mode 100644 index 0000000..0375196 Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/scrawl/images/empty.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/scrawl/images/emptyH.png b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/scrawl/images/emptyH.png new file mode 100644 index 0000000..838ca72 Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/scrawl/images/emptyH.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/scrawl/images/eraser.png b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/scrawl/images/eraser.png new file mode 100644 index 0000000..63e87ce Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/scrawl/images/eraser.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/scrawl/images/redo.png b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/scrawl/images/redo.png new file mode 100644 index 0000000..12cd9bb Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/scrawl/images/redo.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/scrawl/images/redoH.png b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/scrawl/images/redoH.png new file mode 100644 index 0000000..d9f33d3 Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/scrawl/images/redoH.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/scrawl/images/scale.png b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/scrawl/images/scale.png new file mode 100644 index 0000000..935a3f3 Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/scrawl/images/scale.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/scrawl/images/scaleH.png b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/scrawl/images/scaleH.png new file mode 100644 index 0000000..72e64a9 Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/scrawl/images/scaleH.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/scrawl/images/size.png b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/scrawl/images/size.png new file mode 100644 index 0000000..8366845 Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/scrawl/images/size.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/scrawl/images/undo.png b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/scrawl/images/undo.png new file mode 100644 index 0000000..084c7cc Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/scrawl/images/undo.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/scrawl/images/undoH.png b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/scrawl/images/undoH.png new file mode 100644 index 0000000..fde7eb3 Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/scrawl/images/undoH.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/scrawl/scrawl.css b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/scrawl/scrawl.css new file mode 100644 index 0000000..d12bb62 --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/scrawl/scrawl.css @@ -0,0 +1,2 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + .border_style1,.colorBar a{box-shadow:2px 2px 5px #d3d6da}body{margin:0}table{width:100%}table td{padding:2px 4px;vertical-align:middle}a{text-decoration:none}em{font-style:normal}.border_style1{border:1px solid #ccc;border-radius:5px}.main{margin:8px;overflow:hidden}.colorBar,.operateBar{margin-top:10px;font-size:12px;text-align:center}.hot{float:left;height:335px}.drawBoard{position:relative;cursor:crosshair}.brushBorad{position:absolute;left:0;top:0;z-index:998}.picBoard{border:none;text-align:center;line-height:300px;cursor:default}.operateBar span{margin-left:10px}.drawToolbar{float:right;width:110px;height:300px;overflow:hidden}.colorBar a{display:block;width:10px;height:10px;border:1px solid #1006F1;border-radius:3px;opacity:.3}.sectionBar{margin-top:15px;font-size:12px;text-align:center}.sectionBar a{display:inline-block;width:10px;height:12px;color:#888;text-indent:-999px;opacity:.3}.size1{background:url(images/size.png) 1px center no-repeat}.size2{background:url(images/size.png) -10px center no-repeat}.size3{background:url(images/size.png) -22px center no-repeat}.size4{background:url(images/size.png) -35px center no-repeat}.addImgH{position:relative}.addImgH_form{position:absolute;left:18px;top:-1px;width:75px;height:21px;opacity:0;cursor:pointer}.addImgH_form input,.maskLayer{width:100%}.maskLayerNull{display:none}.maskLayer{position:absolute;top:0;left:0;height:100%;opacity:.7;background-color:#fff;text-align:center;font-weight:700;line-height:300px;z-index:1000}.addImgH .icon,.brushIcon,.clearBoard .icon,.clearBoardH .icon,.eraserIcon,.nextStep .icon,.nextStepH .icon,.previousStep .icon,.previousStepH .icon,.removeImg .icon,.removeImgH .icon,.scaleBoard .icon,.scaleBoardH .icon{display:inline-block;width:16px;height:16px}.previousStepH .icon{background-image:url(images/undoH.png);cursor:pointer}.previousStepH .text{color:#888;cursor:pointer}.previousStep .icon{background-image:url(images/undo.png);cursor:default}.previousStep .text{color:#ccc;cursor:default}.nextStepH .icon{background-image:url(images/redoH.png);cursor:pointer}.nextStepH .text{color:#888;cursor:pointer}.nextStep .icon{background-image:url(images/redo.png);cursor:default}.nextStep .text{color:#ccc;cursor:default}.clearBoardH .icon{background-image:url(images/emptyH.png);cursor:pointer}.clearBoardH .text{color:#888;cursor:pointer}.clearBoard .icon{background-image:url(images/empty.png);cursor:default}.clearBoard .text{color:#ccc;cursor:default}.scaleBoardH .icon{background-image:url(images/scaleH.png);cursor:pointer}.scaleBoardH .text{color:#888;cursor:pointer}.scaleBoard .icon{background-image:url(images/scale.png);cursor:default}.scaleBoard .text{color:#ccc;cursor:default}.removeImgH .icon{background-image:url(images/delimgH.png);cursor:pointer}.removeImgH .text{color:#888;cursor:pointer}.removeImg .icon{background-image:url(images/delimg.png);cursor:default}.removeImg .text{color:#ccc;cursor:default}.addImgH .icon{vertical-align:top;background-image:url(images/addimg.png)}.addImgH .text{color:#888;cursor:pointer}.brushIcon{background-image:url(images/brush.png)}.eraserIcon{background-image:url(images/eraser.png)} \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/scrawl/scrawl.html b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/scrawl/scrawl.html new file mode 100644 index 0000000..2564196 --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/scrawl/scrawl.html @@ -0,0 +1 @@ +
            1 3 5 7
            1 3 5 7
            \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/scrawl/scrawl.js b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/scrawl/scrawl.js new file mode 100644 index 0000000..f494120 --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/scrawl/scrawl.js @@ -0,0 +1,2 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + ;function ue_callback(e,t){function a(e,t,a,i){var r,o=0,s=0,n=e.width||a,l=e.height||i;(n>t||l>t)&&(n>=l?(o=n-t)&&(r=(o/n).toFixed(2),e.height=l-l*r,e.width=t):(s=l-t)&&(r=(s/l).toFixed(2),e.width=n-n*r,e.height=t))}var i=document,r=$G("J_picBoard"),o=i.createElement("img");removeMaskLayer(),"SUCCESS"==t?(r.innerHTML="",o.onload=function(){a(this,300),r.appendChild(o);var e=new scrawl;e.btn2Highlight("J_removeImg"),e.btn2Highlight("J_sacleBoard")},o.src=e):alert(t)}function removeMaskLayer(){var e=$G("J_maskLayer");e.className="maskLayerNull",e.innerHTML="",dialog.buttons[0].setDisabled(!1)}function addMaskLayer(e){var t=$G("J_maskLayer");dialog.buttons[0].setDisabled(!0),t.className="maskLayer",t.innerHTML=e}function exec(scrawlObj){if(scrawlObj.isScrawl){addMaskLayer(lang.scrawlUpLoading);var base64=scrawlObj.getCanvasData();if(base64){var options={timeout:1e5,onsuccess:function(xhr){if(!scrawlObj.isCancelScrawl){var responseObj;if(responseObj=eval("("+xhr.responseText+")"),"200"==responseObj.Code){var imgObj={},url=editor.options.scrawlUrlPrefix+responseObj.Data.src;imgObj.src=url,imgObj._src=url,imgObj.alt=responseObj.Data.FileName||"",imgObj.title=responseObj.Data.FileName||"",editor.execCommand("insertImage",imgObj),dialog.close()}else alert(responseObj.Msg)}},onerror:function(){alert(lang.imageError),dialog.close()}};options[editor.getOpt("scrawlFieldName")]=base64;var actionUrl=editor.getActionUrl(editor.getOpt("scrawlActionName")),params=utils.serializeParam(editor.queryCommandValue("serverparam"))||"",url=utils.formatUrl(actionUrl+(actionUrl.indexOf("?")==-1?"?":"&")+params);ajax.request(url,options)}}else addMaskLayer(lang.noScarwl+"   ")}var scrawl=function(e){e&&this.initOptions(e)};!function(){var e=$G("J_brushBoard"),t=e.getContext("2d"),a=[],i=0;scrawl.prototype={isScrawl:!1,brushWidth:-1,brushColor:"",initOptions:function(e){var t=this;t.originalState(e),t._buildToolbarColor(e.colorList),t._addBoardListener(e.saveNum),t._addOPerateListener(e.saveNum),t._addColorBarListener(),t._addBrushBarListener(),t._addEraserBarListener(),t._addAddImgListener(),t._addRemoveImgListenter(),t._addScalePicListenter(),t._addClearSelectionListenter(),t._originalColorSelect(e.drawBrushColor),t._originalBrushSelect(e.drawBrushSize),t._clearSelection()},originalState:function(e){var a=this;a.brushWidth=e.drawBrushSize,a.brushColor=e.drawBrushColor,t.lineWidth=a.brushWidth,t.strokeStyle=a.brushColor,t.fillStyle="transparent",t.lineCap="round",t.fill()},_buildToolbarColor:function(e){var t=null,a=[];a.push("");for(var i,r=0;i=e[r++];)(r-1)%5==0&&(1!=r&&a.push(""),a.push("")),t="#"+i,a.push("");a.push("
            "),$G("J_colorBar").innerHTML=a.join("")},_addBoardListener:function(r){var o,s=this,n=0,l=-1,c=-1,d=!1,h=!1,u=!1,p=0,m="";n=parseInt(domUtils.getComputedStyle($G("J_wrap"),"margin-left")),a.push(t.getImageData(0,0,t.canvas.width,t.canvas.height)),i+=1,domUtils.on(e,["mousedown","mousemove","mouseup","mouseout"],function(e){switch(o=browser.webkit?e.which:p,e.type){case"mousedown":p=1,m=1,d=!0,u=!1,h=!1,s.isScrawl=!0,l=e.clientX-n,c=e.clientY-n,t.beginPath();break;case"mousemove":if(!m&&0==o)return;if(!m&&o&&(l=e.clientX-n,c=e.clientY-n,t.beginPath(),m=1),u||!d)return;var a=e.clientX-n,i=e.clientY-n;t.moveTo(l,c),t.lineTo(a,i),t.stroke(),l=a,c=i,h=!0;break;case"mouseup":if(p=0,!d)return;h||(t.arc(l,c,t.lineWidth,0,2*Math.PI,!1),t.fillStyle=t.strokeStyle,t.fill()),t.closePath(),s._saveOPerate(r),d=!1,h=!1,u=!0,l=-1,c=-1;break;case"mouseout":if(m="",p=0,1==o)return;t.closePath()}})},_addOPerateListener:function(e){var r=this;domUtils.on($G("J_previousStep"),"click",function(){i>1&&(i-=1,t.clearRect(0,0,t.canvas.width,t.canvas.height),t.putImageData(a[i-1],0,0),r.btn2Highlight("J_nextStep"),1==i&&r.btn2disable("J_previousStep"))}),domUtils.on($G("J_nextStep"),"click",function(){i>0&&i");return a.innerHTML=t.join(""),a}var a=[[1,1,-1,-1],[0,1,0,-1],[0,1,1,-1],[1,0,-1,0],[0,0,1,0],[1,0,-1,1],[0,0,0,1],[0,0,1,1]];ScaleBoy.prototype={init:function(){e();var a=this,i=a.dom=t();return a.scaleMousemove.fp=a,domUtils.on(i,"mousedown",function(e){var t=e.target||e.srcElement;a.start={x:e.clientX,y:e.clientY},t.className.indexOf("hand")!=-1&&(a.dir=t.className.replace("hand","")),domUtils.on(document.body,"mousemove",a.scaleMousemove),e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}),domUtils.on(document.body,"mouseup",function(e){a.start&&(domUtils.un(document.body,"mousemove",a.scaleMousemove),a.moved&&a.updateScaledElement({position:{x:i.style.left,y:i.style.top},size:{w:i.style.width,h:i.style.height}}),delete a.start,delete a.moved,delete a.dir)}),i},startScale:function(e){var t=this,a=t.dom;a.style.cssText="visibility:visible;top:"+e.style.top+";left:"+e.style.left+";width:"+e.offsetWidth+"px;height:"+e.offsetHeight+"px;",t.scalingElement=e},updateScaledElement:function(e){var t=this.scalingElement,a=e.position,i=e.size;a&&("undefined"!=typeof a.x&&(t.style.left=a.x),"undefined"!=typeof a.y&&(t.style.top=a.y)),i&&(i.w&&(t.style.width=i.w),i.h&&(t.style.height=i.h))},updateStyleByDir:function(e,t){var i,r=this,o=r.dom;a.def=[1,1,0,0],0!=a[e][0]&&(i=parseInt(o.style.left)+t.x,o.style.left=r._validScaledProp("left",i)+"px"),0!=a[e][1]&&(i=parseInt(o.style.top)+t.y,o.style.top=r._validScaledProp("top",i)+"px"),0!=a[e][2]&&(i=o.clientWidth+a[e][2]*t.x,o.style.width=r._validScaledProp("width",i)+"px"),0!=a[e][3]&&(i=o.clientHeight+a[e][3]*t.y,o.style.height=r._validScaledProp("height",i)+"px"),"def"===e&&r.updateScaledElement({position:{x:o.style.left,y:o.style.top}})},scaleMousemove:function(e){var t=arguments.callee.fp,a=t.start,i=t.dir||"def",r={x:e.clientX-a.x,y:e.clientY-a.y};t.updateStyleByDir(i,r),arguments.callee.fp.start={x:e.clientX,y:e.clientY},arguments.callee.fp.moved=1},_validScaledProp:function(e,t){var a=this.dom,i=$G("J_picBoard");switch(t=isNaN(t)?0:t,e){case"left":return t<0?0:t+a.clientWidth>i.clientWidth?i.clientWidth-a.clientWidth:t;case"top":return t<0?0:t+a.clientHeight>i.clientHeight?i.clientHeight-a.clientHeight:t;case"width":return t<=0?1:t+a.offsetLeft>i.clientWidth?i.clientWidth-a.offsetLeft:t;case"height":return t<=0?1:t+a.offsetTop>i.clientHeight?i.clientHeight-a.offsetTop:t}}}}(); \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/searchreplace/searchreplace.html b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/searchreplace/searchreplace.html new file mode 100644 index 0000000..0175200 --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/searchreplace/searchreplace.html @@ -0,0 +1 @@ +
            :
             
            :
            :
             
            \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/searchreplace/searchreplace.js b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/searchreplace/searchreplace.js new file mode 100644 index 0000000..8a697ae --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/searchreplace/searchreplace.js @@ -0,0 +1,2 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + ;function clickHandler(e,t,a){for(var r=0,n=e.length;r
            \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/spechars/spechars.js b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/spechars/spechars.js new file mode 100644 index 0000000..73d96d0 --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/spechars/spechars.js @@ -0,0 +1,2 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + ;function toArray(t){return t.split(",")}var charsContent=[{name:"tsfh",title:lang.tsfh,content:toArray("、,。,·,ˉ,ˇ,¨,〃,々,—,~,‖,…,‘,’,“,”,〔,〕,〈,〉,《,》,「,」,『,』,〖,〗,【,】,±,×,÷,∶,∧,∨,∑,∏,∪,∩,∈,∷,√,⊥,∥,∠,⌒,⊙,∫,∮,≡,≌,≈,∽,∝,≠,≮,≯,≤,≥,∞,∵,∴,♂,♀,°,′,″,℃,$,¤,¢,£,‰,§,№,☆,★,○,●,◎,◇,◆,□,■,△,▲,※,→,←,↑,↓,〓,〡,〢,〣,〤,〥,〦,〧,〨,〩,㊣,㎎,㎏,㎜,㎝,㎞,㎡,㏄,㏎,㏑,㏒,㏕,︰,¬,¦,℡,ˊ,ˋ,˙,–,―,‥,‵,℅,℉,↖,↗,↘,↙,∕,∟,∣,≒,≦,≧,⊿,═,║,╒,╓,╔,╕,╖,╗,╘,╙,╚,╛,╜,╝,╞,╟,╠,╡,╢,╣,╤,╥,╦,╧,╨,╩,╪,╫,╬,╭,╮,╯,╰,╱,╲,╳,▁,▂,▃,▄,▅,▆,▇,�,█,▉,▊,▋,▌,▍,▎,▏,▓,▔,▕,▼,▽,◢,◣,◤,◥,☉,⊕,〒,〝,〞")},{name:"lmsz",title:lang.lmsz,content:toArray("ⅰ,ⅱ,ⅲ,ⅳ,ⅴ,ⅵ,ⅶ,ⅷ,ⅸ,ⅹ,Ⅰ,Ⅱ,Ⅲ,Ⅳ,Ⅴ,Ⅵ,Ⅶ,Ⅷ,Ⅸ,Ⅹ,Ⅺ,Ⅻ")},{name:"szfh",title:lang.szfh,content:toArray("⒈,⒉,⒊,⒋,⒌,⒍,⒎,⒏,⒐,⒑,⒒,⒓,⒔,⒕,⒖,⒗,⒘,⒙,⒚,⒛,⑴,⑵,⑶,⑷,⑸,⑹,⑺,⑻,⑼,⑽,⑾,⑿,⒀,⒁,⒂,⒃,⒄,⒅,⒆,⒇,①,②,③,④,⑤,⑥,⑦,⑧,⑨,⑩,㈠,㈡,㈢,㈣,㈤,㈥,㈦,㈧,㈨,㈩")},{name:"rwfh",title:lang.rwfh,content:toArray("ぁ,あ,ぃ,い,ぅ,う,ぇ,え,ぉ,お,か,が,き,ぎ,く,ぐ,け,げ,こ,ご,さ,ざ,し,じ,す,ず,せ,ぜ,そ,ぞ,た,だ,ち,ぢ,っ,つ,づ,て,で,と,ど,な,に,ぬ,ね,の,は,ば,ぱ,ひ,び,ぴ,ふ,ぶ,ぷ,へ,べ,ぺ,ほ,ぼ,ぽ,ま,み,む,め,も,ゃ,や,ゅ,ゆ,ょ,よ,ら,り,る,れ,ろ,ゎ,わ,ゐ,ゑ,を,ん,ァ,ア,ィ,イ,ゥ,ウ,ェ,エ,ォ,オ,カ,ガ,キ,ギ,ク,グ,ケ,ゲ,コ,ゴ,サ,ザ,シ,ジ,ス,ズ,セ,ゼ,ソ,ゾ,タ,ダ,チ,ヂ,ッ,ツ,ヅ,テ,デ,ト,ド,ナ,ニ,ヌ,ネ,ノ,ハ,バ,パ,ヒ,ビ,ピ,フ,ブ,プ,ヘ,ベ,ペ,ホ,ボ,ポ,マ,ミ,ム,メ,モ,ャ,ヤ,ュ,ユ,ョ,ヨ,ラ,リ,ル,レ,ロ,ヮ,ワ,ヰ,ヱ,ヲ,ン,ヴ,ヵ,ヶ")},{name:"xlzm",title:lang.xlzm,content:toArray("Α,Β,Γ,Δ,Ε,Ζ,Η,Θ,Ι,Κ,Λ,Μ,Ν,Ξ,Ο,Π,Ρ,Σ,Τ,Υ,Φ,Χ,Ψ,Ω,α,β,γ,δ,ε,ζ,η,θ,ι,κ,λ,μ,ν,ξ,ο,π,ρ,σ,τ,υ,φ,χ,ψ,ω")},{name:"ewzm",title:lang.ewzm,content:toArray("А,Б,В,Г,Д,Е,Ё,Ж,З,И,Й,К,Л,М,Н,О,П,Р,С,Т,У,Ф,Х,Ц,Ч,Ш,Щ,Ъ,Ы,Ь,Э,Ю,Я,а,б,в,г,д,е,ё,ж,з,и,й,к,л,м,н,о,п,р,с,т,у,ф,х,ц,ч,ш,щ,ъ,ы,ь,э,ю,я")},{name:"pyzm",title:lang.pyzm,content:toArray("ā,á,ǎ,à,ē,é,ě,è,ī,í,ǐ,ì,ō,ó,ǒ,ò,ū,ú,ǔ,ù,ǖ,ǘ,ǚ,ǜ,ü")},{name:"yyyb",title:lang.yyyb,content:toArray("i:,i,e,æ,ʌ,ə:,ə,u:,u,ɔ:,ɔ,a:,ei,ai,ɔi,əu,au,iə,εə,uə,p,t,k,b,d,g,f,s,ʃ,θ,h,v,z,ʒ,ð,tʃ,tr,ts,dʒ,dr,dz,m,n,ŋ,l,r,w,j,")},{name:"zyzf",title:lang.zyzf,content:toArray("ㄅ,ㄆ,ㄇ,ㄈ,ㄉ,ㄊ,ㄋ,ㄌ,ㄍ,ㄎ,ㄏ,ㄐ,ㄑ,ㄒ,ㄓ,ㄔ,ㄕ,ㄖ,ㄗ,ㄘ,ㄙ,ㄚ,ㄛ,ㄜ,ㄝ,ㄞ,ㄟ,ㄠ,ㄡ,ㄢ,ㄣ,ㄤ,ㄥ,ㄦ,ㄧ,ㄨ")}];!function(t){for(var e,n=0;e=t[n++];){var a=document.createElement("span");a.setAttribute("tabSrc",e.name),a.innerHTML=e.title,1==n&&(a.className="focus"),domUtils.on(a,"click",function(){for(var t,e=$G("tabHeads").children,n=0;t=e[n++];)t.className="";e=$G("tabBodys").children;for(var t,n=0;t=e[n++];)t.style.display="none";this.className="focus",$G(this.getAttribute("tabSrc")).style.display=""}),$G("tabHeads").appendChild(a),domUtils.insertAfter(a,document.createTextNode("\n"));var r=document.createElement("div");r.id=e.name,r.style.display=1==n?"":"none";for(var o,l=e.content,i=0;o=l[i++];){var s=document.createElement("span");s.innerHTML=o,domUtils.on(s,"click",function(){editor.execCommand("insertHTML",this.innerHTML),dialog.close()}),r.appendChild(s)}$G("tabBodys").appendChild(r)}}(charsContent); \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/table/dragicon.png b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/table/dragicon.png new file mode 100644 index 0000000..f26203b Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/table/dragicon.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/table/edittable.css b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/table/edittable.css new file mode 100644 index 0000000..c11ce5f --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/table/edittable.css @@ -0,0 +1,2 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + .section,.section ul,.wrapper,body{overflow:hidden}.section .preview caption,.section h3{font-weight:700}body{width:540px}.wrapper{margin:10px auto 0;font-size:12px;width:520px;height:315px}.clear{clear:both}.wrapper .left{float:left;margin-left:10px}.wrapper .right{float:right;border-left:2px dotted #EDEDED;padding-left:15px}.section{margin-bottom:15px;width:240px}.section h3{padding:5px 0;margin-bottom:10px;border-bottom:1px solid #EDEDED;font-size:12px}.section ul{list-style:none;clear:both}.section li{float:left;width:120px}.section .tone{width:80px}.section .preview{width:220px}.section .preview table{text-align:center;vertical-align:middle;color:#666}.section .preview td{border-width:1px;border-style:solid;height:22px}.section .preview th{border-style:solid;border-color:#DDD;border-width:2px 1px 1px;height:22px;background-color:#F7F7F7} \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/table/edittable.html b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/table/edittable.html new file mode 100644 index 0000000..f36621d --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/table/edittable.html @@ -0,0 +1 @@ +

            \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/table/edittable.js b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/table/edittable.js new file mode 100644 index 0000000..977af34 --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/table/edittable.js @@ -0,0 +1,2 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + ;!function(){var e,t=$G("J_title"),o=$G("J_titleCol"),n=$G("J_caption"),a=$G("J_sorttable"),i=$G("J_autoSizeContent"),r=$G("J_autoSizePage"),l=$G("J_tone"),d=$G("J_preview"),c=function(){e=this,e.init()};c.prototype={init:function(){var d=new UE.ui.ColorPicker({editor:editor}),c=new UE.ui.Popup({editor:editor,content:d});t.checked=editor.queryCommandState("inserttitle")==-1,o.checked=editor.queryCommandState("inserttitlecol")==-1,n.checked=editor.queryCommandState("insertcaption")==-1,a.checked=1==editor.queryCommandState("enablesort");var m=editor.queryCommandState("enablesort"),s=editor.queryCommandState("disablesort");a.checked=!!(m<0&&s>=0),a.disabled=!!(m<0&&s<0),a.title=m<0&&s<0?lang.errorMsg:"",e.createTable(t.checked,o.checked,n.checked),e.setAutoSize(),e.setColor(e.getColor()),domUtils.on(t,"click",e.titleHanler),domUtils.on(o,"click",e.titleColHanler),domUtils.on(n,"click",e.captionHanler),domUtils.on(a,"click",e.sorttableHanler),domUtils.on(i,"click",e.autoSizeContentHanler),domUtils.on(r,"click",e.autoSizePageHanler),domUtils.on(l,"click",function(){c.showAnchor(l)}),domUtils.on(document,"mousedown",function(){c.hide()}),d.addListener("pickcolor",function(){e.setColor(arguments[1]),c.hide()}),d.addListener("picknocolor",function(){e.setColor(""),c.hide()})},createTable:function(e,t,o){var n=[];if(n.push(""),o&&n.push(""),e){n.push(""),t&&n.push("");for(var a=0;a<5;a++)n.push("");n.push("")}for(var i=0;i<6;i++){n.push(""),t&&n.push("");for(var r=0;r<5;r++)n.push("");n.push("")}n.push("
            "+lang.captionName+"
            "+lang.titleName+""+lang.titleName+"
            "+lang.titleName+""+lang.cellsName+"
            "),d.innerHTML=n.join(""),this.updateSortSpan()},titleHanler:function(){var o=$G("J_example"),n=document.createDocumentFragment(),a=domUtils.getComputedStyle(domUtils.getElementsByTagName(o,"td")[0],"border-color"),i=o.rows[0].children.length;if(t.checked){o.insertRow(0);for(var r,l=0;l
            \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/table/edittip.html b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/table/edittip.html new file mode 100644 index 0000000..44479de --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/table/edittip.html @@ -0,0 +1 @@ +表格删除提示
            \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/template/config.js b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/template/config.js new file mode 100644 index 0000000..ef88e8a --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/template/config.js @@ -0,0 +1,2 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + ;var templates=[{pre:"pre0.png",title:lang.blank,preHtml:'

             欢迎使用UEditor!

            ',html:'

            欢迎使用UEditor!

            '},{pre:"pre1.png",title:lang.blog,preHtml:'

            深入理解Range

            UEditor二次开发

            什么是Range

            对于“插入”选项卡上的库,在设计时都充分考虑了其中的项与文档整体外观的协调性。


            Range能干什么

            在“开始”选项卡上,通过从快速样式库中为所选文本选择一种外观,您可以方便地更改文档中所选文本的格式。

            ',html:'

            [键入文档标题]

            [键入文档副标题]

            [标题 1]

            对于“插入”选项卡上的库,在设计时都充分考虑了其中的项与文档整体外观的协调性。 您可以使用这些库来插入表格、页眉、页脚、列表、封面以及其他文档构建基块。 您创建的图片、图表或关系图也将与当前的文档外观协调一致。

            [标题 2]

            在“开始”选项卡上,通过从快速样式库中为所选文本选择一种外观,您可以方便地更改文档中所选文本的格式。 您还可以使用“开始”选项卡上的其他控件来直接设置文本格式。大多数控件都允许您选择是使用当前主题外观,还是使用某种直接指定的格式。

            [标题 3]

            对于“插入”选项卡上的库,在设计时都充分考虑了其中的项与文档整体外观的协调性。 您可以使用这些库来插入表格、页眉、页脚、列表、封面以及其他文档构建基块。 您创建的图片、图表或关系图也将与当前的文档外观协调一致。


            '},{pre:"pre2.png",title:lang.resume,preHtml:'

            WEB前端开发简历


            联系电话:[键入您的电话]

            电子邮件:[键入您的电子邮件地址]

            家庭住址:[键入您的地址]

            目标职位

            WEB前端研发工程师

            学历

            1. [起止时间] [学校名称] [所学专业] [所获学位]

            工作经验


            ',html:'

            [此处键入简历标题]


            【此处插入照片】


            联系电话:[键入您的电话]


            电子邮件:[键入您的电子邮件地址]


            家庭住址:[键入您的地址]


            目标职位

            [此处键入您的期望职位]

            学历

            1. [键入起止时间] [键入学校名称] [键入所学专业] [键入所获学位]

            2. [键入起止时间] [键入学校名称] [键入所学专业] [键入所获学位]

            工作经验

            1. [键入起止时间] [键入公司名称] [键入职位名称]

              1. [键入负责项目] [键入项目简介]

              2. [键入负责项目] [键入项目简介]

            2. [键入起止时间] [键入公司名称] [键入职位名称]

              1. [键入负责项目] [键入项目简介]

            掌握技能

             [这里可以键入您所掌握的技能]

            '},{pre:"pre3.png",title:lang.richText,preHtml:'

            [此处键入文章标题]

            图文混排方法

            图片居左,文字围绕图片排版

            方法:在文字前面插入图片,设置居左对齐,然后即可在右边输入多行文


            还有没有什么其他的环绕方式呢?这里是居右环绕


            欢迎大家多多尝试,为UEditor提供更多高质量模板!

            ',html:'


            [此处键入文章标题]

            图文混排方法

            1. 图片居左,文字围绕图片排版

            方法:在文字前面插入图片,设置居左对齐,然后即可在右边输入多行文本


            2. 图片居右,文字围绕图片排版

            方法:在文字前面插入图片,设置居右对齐,然后即可在左边输入多行文本


            3. 图片居中环绕排版

            方法:亲,这个真心没有办法。。。



            还有没有什么其他的环绕方式呢?这里是居右环绕


            欢迎大家多多尝试,为UEditor提供更多高质量模板!


            占位


            占位


            占位


            占位


            占位



            '},{pre:"pre4.png",title:lang.sciPapers,preHtml:'

            [键入文章标题]

            摘要:这里可以输入很长很长很长很长很长很长很长很长很差的摘要

            标题 1

            这里可以输入很多内容,可以图文混排,可以有列表等。

            标题 2

            1. 列表 1

            2. 列表 2

              1. 多级列表 1

              2. 多级列表 2

            3. 列表 3

            标题 3

            来个文字图文混排的


            ',html:'

            [键入文章标题]

            摘要:这里可以输入很长很长很长很长很长很长很长很长很差的摘要

            标题 1

            这里可以输入很多内容,可以图文混排,可以有列表等。

            标题 2

            来个列表瞅瞅:

            1. 列表 1

            2. 列表 2

              1. 多级列表 1

              2. 多级列表 2

            3. 列表 3

            标题 3

            来个文字图文混排的

            这里可以多行

            右边是图片

            绝对没有问题的,不信你也可以试试看


            '}]; \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/template/images/bg.gif b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/template/images/bg.gif new file mode 100644 index 0000000..8c1d10a Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/template/images/bg.gif differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/template/images/pre0.png b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/template/images/pre0.png new file mode 100644 index 0000000..8f3c16a Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/template/images/pre0.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/template/images/pre1.png b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/template/images/pre1.png new file mode 100644 index 0000000..5a03f96 Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/template/images/pre1.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/template/images/pre2.png b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/template/images/pre2.png new file mode 100644 index 0000000..5a55672 Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/template/images/pre2.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/template/images/pre3.png b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/template/images/pre3.png new file mode 100644 index 0000000..d852d29 Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/template/images/pre3.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/template/images/pre4.png b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/template/images/pre4.png new file mode 100644 index 0000000..0d7bc72 Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/template/images/pre4.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/template/template.css b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/template/template.css new file mode 100644 index 0000000..78e6709 --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/template/template.css @@ -0,0 +1,2 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + .clear,li,table{clear:both}.wrap{padding:5px;font-size:14px}.left{width:425px;float:left}.right{width:160px;border:1px solid #ccc;float:right;padding:5px;margin-right:5px}.right .pre{height:332px;overflow-y:auto}.right .preitem{border:1px solid #fff;margin:5px 0;padding:2px 0}.right .preitem:hover{background-color:#fffacd;cursor:pointer;border:1px solid #ccc}.right .preitem img{display:block;margin:0 auto;width:100px}.top{height:26px;line-height:26px;padding:5px}.bottom{height:320px;width:100%;margin:0 auto}.transparent{background:url(images/bg.gif)}.bottom table tr td{border:1px dashed #ccc}#colorPicker{width:17px;height:17px;border:1px solid #CCC;display:inline-block;border-radius:3px;box-shadow:2px 2px 5px #D3D6DA}.border_style1{padding:2px;border:1px solid #ccc;border-radius:5px;box-shadow:2px 2px 5px #d3d6da}p{margin:5px 0}table{margin-bottom:10px;border-collapse:collapse;word-break:break-all}ol{padding-left:40px} \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/template/template.html b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/template/template.html new file mode 100644 index 0000000..1084428 --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/template/template.html @@ -0,0 +1 @@ +
            \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/template/template.js b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/template/template.js new file mode 100644 index 0000000..67a1d53 --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/dialogs/template/template.js @@ -0,0 +1,2 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + ;!function(){var e,t=editor,i=$G("preview"),o=$G("preitem"),r=templates,l=function(){for(var e,t="",i=0;e=r[i++];)t+='
            ";o.innerHTML=t},c=function(t){var l=r[t-1];e=l,n(),domUtils.setStyles(o.childNodes[t-1],{"background-color":"lemonChiffon",border:"#ccc 1px solid"}),i.innerHTML=l.preHtml?l.preHtml:""},n=function(){for(var e,t=o.children,i=0;e=t[i++];)domUtils.setStyles(e,{"background-color":"",border:"white 1px solid"})};dialog.onok=function(){$G("issave").checked||t.execCommand("cleardoc");var i={html:e&&e.html};t.execCommand("template",i)},l(),window.pre=c,c(2)}(); \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/lang/en/en.js b/IoTGateway/wwwroot/layuiadmin/ueditor/lang/en/en.js new file mode 100644 index 0000000..4aa857a --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/lang/en/en.js @@ -0,0 +1,2 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + ;UE.I18N.en={labelMap:{anchor:"Anchor",undo:"Undo",redo:"Redo",bold:"Bold",indent:"Indent",snapscreen:"SnapScreen",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",subscript:"SubScript",fontborder:"text border",superscript:"SuperScript",formatmatch:"Format Match",source:"Source",blockquote:"BlockQuote",pasteplain:"PastePlain",selectall:"SelectAll",print:"Print",preview:"Preview",horizontal:"Horizontal",removeformat:"RemoveFormat",time:"Time",date:"Date",unlink:"Unlink",insertrow:"InsertRow",insertcol:"InsertCol",mergeright:"MergeRight",mergedown:"MergeDown",deleterow:"DeleteRow",deletecol:"DeleteCol",splittorows:"SplitToRows",insertcode:"insert code",splittocols:"SplitToCols",splittocells:"SplitToCells",deletecaption:"DeleteCaption",inserttitle:"InsertTitle",mergecells:"MergeCells",deletetable:"DeleteTable",cleardoc:"Clear",insertparagraphbeforetable:"InsertParagraphBeforeTable",fontfamily:"FontFamily",fontsize:"FontSize",paragraph:"Paragraph",simpleupload:"Single Image",insertimage:"Multi Image",edittable:"Edit Table",edittd:"Edit Td",link:"Link",emotion:"Emotion",spechars:"Spechars",searchreplace:"SearchReplace",map:"BaiduMap",gmap:"GoogleMap",insertvideo:"Video",help:"Help",justifyleft:"JustifyLeft",justifyright:"JustifyRight",justifycenter:"JustifyCenter",justifyjustify:"Justify",forecolor:"FontColor",backcolor:"BackColor",insertorderedlist:"OL",insertunorderedlist:"UL",fullscreen:"FullScreen",directionalityltr:"EnterFromLeft",directionalityrtl:"EnterFromRight",rowspacingtop:"RowSpacingTop",rowspacingbottom:"RowSpacingBottom",pagebreak:"PageBreak",insertframe:"Iframe",imagenone:"Default",imageleft:"ImageLeft",imageright:"ImageRight",attachment:"Attachment",imagecenter:"ImageCenter",wordimage:"WordImage",lineheight:"LineHeight",edittip:"EditTip",customstyle:"CustomStyle",scrawl:"Scrawl",autotypeset:"AutoTypeset",webapp:"WebAPP",touppercase:"UpperCase",tolowercase:"LowerCase",template:"Template",background:"Background",inserttable:"InsertTable",music:"Music",charts:"charts",drafts:"Load from Drafts"},insertorderedlist:{num:"1,2,3...",num1:"1),2),3)...",num2:"(1),(2),(3)...",cn:"一,二,三....",cn1:"一),二),三)....",cn2:"(一),(二),(三)....",decimal:"1,2,3...","lower-alpha":"a,b,c...","lower-roman":"i,ii,iii...","upper-alpha":"A,B,C...","upper-roman":"I,II,III..."},insertunorderedlist:{circle:"○ Circle",disc:"● Circle dot",square:"■ Rectangle ",dash:"- Dash",dot:"。dot"},paragraph:{p:"Paragraph",h1:"Title 1",h2:"Title 2",h3:"Title 3",h4:"Title 4",h5:"Title 5",h6:"Title 6"},fontfamily:{songti:"Sim Sun",kaiti:"Sim Kai",heiti:"Sim Hei",lishu:"Sim Li",yahei:"Microsoft YaHei",andaleMono:"Andale Mono",arial:"Arial",arialBlack:"Arial Black",comicSansMs:"Comic Sans MS",impact:"Impact",timesNewRoman:"Times New Roman"},customstyle:{tc:"Title center",tl:"Title left",im:"Important",hi:"Highlight"},autoupload:{exceedSizeError:"File Size Exceed",exceedTypeError:"File Type Not Allow",jsonEncodeError:"Server Return Format Error",loading:"loading...",loadError:"load error",errorLoadConfig:"Server config not loaded, upload can not work."},simpleupload:{exceedSizeError:"File Size Exceed",exceedTypeError:"File Type Not Allow",jsonEncodeError:"Server Return Format Error",loading:"loading...",loadError:"load error",errorLoadConfig:"Server config not loaded, upload can not work."},elementPathTip:"Path",wordCountTip:"Word Count",wordCountMsg:"{#count} characters entered,{#leave} left. ",wordOverFlowMsg:'The number of characters has exceeded allowable maximum values, the server may refuse to save!',ok:"OK",cancel:"Cancel",closeDialog:"closeDialog",tableDrag:"You must import the file uiUtils.js before drag! ",autofloatMsg:"The plugin AutoFloat depends on EditorUI!",loadconfigError:"Get server config error.",loadconfigFormatError:"Server config format error.",loadconfigHttpError:"Get server config http error.",snapScreen_plugin:{browserMsg:"Only IE supported!",callBackErrorMsg:"The callback data is wrong,please check the config!",uploadErrorMsg:"Upload error,please check your server environment! "},insertcode:{as3:"ActionScript 3",bash:"Bash/Shell",cpp:"C/C++",css:"CSS",cf:"ColdFusion","c#":"C#",delphi:"Delphi",diff:"Diff",erlang:"Erlang",groovy:"Groovy",html:"HTML",java:"Java",jfx:"JavaFX",js:"JavaScript",pl:"Perl",php:"PHP",plain:"Plain Text",ps:"PowerShell",python:"Python",ruby:"Ruby",scala:"Scala",sql:"SQL",vb:"Visual Basic",xml:"XML"},confirmClear:"Do you confirm to clear the Document?",contextMenu:{"delete":"Delete",selectall:"Select all",deletecode:"Delete Code",cleardoc:"Clear Document",confirmclear:"Do you confirm to clear the Document?",unlink:"Unlink",paragraph:"Paragraph",edittable:"Table property",aligncell:"Align cell",aligntable:"Table alignment",tableleft:"Left float",tablecenter:"Center",tableright:"Right float",aligntd:"Cell alignment",edittd:"Cell property",setbordervisible:"set table edge visible",table:"Table",justifyleft:"Justify Left",justifyright:"Justify Right",justifycenter:"Justify Center",justifyjustify:"Default",deletetable:"Delete table",insertparagraphbefore:"InsertedBeforeLine",insertparagraphafter:"InsertedAfterLine",inserttable:"Insert table",insertcaption:"Insert caption",deletecaption:"Delete Caption",inserttitle:"Insert Title",deletetitle:"Delete Title",inserttitlecol:"Insert Title Col",deletetitlecol:"Delete Title Col",averageDiseRow:"AverageDise Row",averageDisCol:"AverageDis Col",deleterow:"Delete row",deletecol:"Delete col",insertrow:"Insert row",insertcol:"Insert col",insertrownext:"Insert Row Next",insertcolnext:"Insert Col Next",mergeright:"Merge right",mergeleft:"Merge left",mergedown:"Merge down",mergecells:"Merge cells",splittocells:"Split to cells",splittocols:"Split to Cols",splittorows:"Split to Rows",tablesort:"Table sorting",enablesort:"Sorting Enable",disablesort:"Sorting Disable",reversecurrent:"Reverse current",orderbyasc:"Order By ASCII",reversebyasc:"Reverse By ASCII",orderbynum:"Order By Num",reversebynum:"Reverse By Num",borderbk:"Border shading",setcolor:"interlaced color",unsetcolor:"Cancel interlacedcolor",setbackground:"Background interlaced",unsetbackground:"Cancel Bk interlaced",redandblue:"Blue and red",threecolorgradient:"Three-color gradient",copy:"Copy(Ctrl + c)",copymsg:"Browser does not support. Please use 'Ctrl + c' instead!",paste:"Paste(Ctrl + v)",pastemsg:"Browser does not support. Please use 'Ctrl + v' instead!"},copymsg:"Browser does not support. Please use 'Ctrl + c' instead!",pastemsg:"Browser does not support. Please use 'Ctrl + v' instead!",anthorMsg:"Link",clearColor:"Clear",standardColor:"Standard color",themeColor:"Theme color",property:"Property","default":"Default",modify:"Modify",justifyleft:"Justify Left",justifyright:"Justify Right",justifycenter:"Justify Center",justify:"Default",clear:"Clear",anchorMsg:"Anchor","delete":"Delete",clickToUpload:"Click to upload",unset:"Language hasn't been set!",t_row:"row",t_col:"col",pasteOpt:"Paste Option",pasteSourceFormat:"Keep Source Formatting",tagFormat:"Keep tag",pasteTextFormat:"Keep Text only",more:"More",autoTypeSet:{mergeLine:"Merge empty line",delLine:"Del empty line",removeFormat:"Remove format",indent:"Indent",alignment:"Alignment",imageFloat:"Image float",removeFontsize:"Remove font size",removeFontFamily:"Remove fontFamily",removeHtml:"Remove redundant HTML code",pasteFilter:"Paste filter",run:"Done",symbol:"Symbol Conversion",bdc2sb:"Full-width to Half-width",tobdc:"Half-width to Full-width"},background:{"static":{lang_background_normal:"Normal",lang_background_local:"Online",lang_background_set:"Background Set",lang_background_none:"No Background",lang_background_colored:"Colored Background",lang_background_color:"Color Set",lang_background_netimg:"Net-Image",lang_background_align:"Align Type",lang_background_position:"Position",repeatType:{options:["Center","Repeat-x","Repeat-y","Tile","Custom"]}},noUploadImage:"No pictures has been uploaded!",toggleSelect:"Change the active state by click!\n Image Size: "},insertimage:{"static":{lang_tab_remote:"Insert",lang_tab_upload:"Local",lang_tab_online:"Manager",lang_tab_search:"Search",lang_input_url:"Address:",lang_input_size:"Size:",lang_input_width:"Width",lang_input_height:"Height",lang_input_border:"Border:",lang_input_vhspace:"Margins:",lang_input_title:"Title:",lang_input_align:"Image Float Style:",lang_imgLoading:"Loading...",lang_start_upload:"Start Upload",lock:{title:"Lock rate"},searchType:{title:"ImageType",options:["News","Wallpaper","emotions","photo"]},searchTxt:{value:"Enter the search keyword!"},searchBtn:{value:"Search"},searchReset:{value:"Clear"},noneAlign:{title:"None Float"},leftAlign:{title:"Left Float"},rightAlign:{title:"Right Float"},centerAlign:{title:"Center In A Line"}},uploadSelectFile:"Select File",uploadAddFile:"Add File",uploadStart:"Start Upload",uploadPause:"Pause Upload",uploadContinue:"Continue Upload",uploadRetry:"Retry Upload",uploadDelete:"Delete",uploadTurnLeft:"Turn Left",uploadTurnRight:"Turn Right",uploadPreview:"Doing Preview",uploadNoPreview:"Can Not Preview",updateStatusReady:"Selected _ pictures, total _KB.",updateStatusConfirm:"_ uploaded successfully and _ upload failed",updateStatusFinish:"Total _ pictures (_KB), _ uploaded successfully",updateStatusError:" and _ upload failed",errorNotSupport:"WebUploader does not support the browser you are using. Please upgrade your browser or flash player",errorLoadConfig:"Server config not loaded, upload can not work.",errorExceedSize:"File Size Exceed",errorFileType:"File Type Not Allow",errorInterrupt:"File Upload Interrupted",errorUploadRetry:"Upload Error, Please Retry.",errorHttp:"Http Error",errorServerUpload:"Server Result Error.",remoteLockError:"Cannot Lock the Proportion between width and height",numError:"Please enter the correct Num. e.g 123,400",imageUrlError:"The image format may be wrong!",imageLoadError:"Error,please check the network or URL!",searchRemind:"Enter the search keyword!",searchLoading:"Image is loading,please wait...",searchRetry:" Sorry,can't find the image,please try again!"},attachment:{"static":{lang_tab_upload:"Upload",lang_tab_online:"Online",lang_start_upload:"Start upload",lang_drop_remind:"You can drop files here, a single maximum of 300 files"},uploadSelectFile:"Select File",uploadAddFile:"Add File",uploadStart:"Start Upload",uploadPause:"Pause Upload",uploadContinue:"Continue Upload",uploadRetry:"Retry Upload",uploadDelete:"Delete",uploadTurnLeft:"Turn Left",uploadTurnRight:"Turn Right",uploadPreview:"Doing Preview",updateStatusReady:"Selected _ files, total _KB.",updateStatusConfirm:"_ uploaded successfully and _ upload failed",updateStatusFinish:"Total _ files (_KB), _ uploaded successfully",updateStatusError:" and _ upload failed",errorNotSupport:"WebUploader does not support the browser you are using. Please upgrade your browser or flash player",errorLoadConfig:"Server config not loaded, upload can not work.",errorExceedSize:"File Size Exceed",errorFileType:"File Type Not Allow",errorInterrupt:"File Upload Interrupted",errorUploadRetry:"Upload Error, Please Retry.",errorHttp:"Http Error",errorServerUpload:"Server Result Error."},insertvideo:{"static":{lang_tab_insertV:"Video",lang_tab_searchV:"Search",lang_tab_uploadV:"Upload",lang_video_url:" URL ",lang_video_size:"Video Size",lang_videoW:"Width",lang_videoH:"Height",lang_alignment:"Alignment",videoSearchTxt:{value:"Enter the search keyword!"},videoType:{options:["All","Hot","Entertainment","Funny","Sports","Science","variety"]},videoSearchBtn:{value:"Search in Baidu"},videoSearchReset:{value:"Clear result"},lang_input_fileStatus:" No file uploaded!",startUpload:{style:"background:url(upload.png) no-repeat;"},lang_upload_size:"Video Size",lang_upload_width:"Width",lang_upload_height:"Height",lang_upload_alignment:"Alignment",lang_format_advice:"Recommends mp4 format."},numError:"Please enter the correct Num. e.g 123,400",floatLeft:"Float left",floatRight:"Float right","default":"Default",block:"Display in block",urlError:"The video url format may be wrong!",loading:"  The video is loading, please wait…",clickToSelect:"Click to select",goToSource:"Visit source video ",noVideo:"    Sorry,can't find the video,please try again!",browseFiles:"Open files",uploadSuccess:"Upload Successful!",delSuccessFile:"Remove from the success of the queue",delFailSaveFile:"Remove the save failed file",statusPrompt:" file(s) uploaded! ",flashVersionError:"The current Flash version is too low, please update FlashPlayer,then try again!",flashLoadingError:"The Flash failed loading! Please check the path or network state",fileUploadReady:"Wait for uploading...",delUploadQueue:"Remove from the uploading queue ",limitPrompt1:"Can not choose more than single",limitPrompt2:"file(s)!Please choose again!",delFailFile:"Remove failure file",fileSizeLimit:"File size exceeds the limit!",emptyFile:"Can not upload an empty file!",fileTypeError:"File type error!",unknownError:"Unknown error!",fileUploading:"Uploading,please wait...",cancelUpload:"Cancel upload",netError:"Network error",failUpload:"Upload failed",serverIOError:"Server IO error!",noAuthority:"No Permission!",fileNumLimit:"Upload limit to the number",failCheck:"Authentication fails, the upload is skipped!",fileCanceling:"Cancel, please wait...",stopUploading:"Upload has stopped...",uploadSelectFile:"Select File",uploadAddFile:"Add File",uploadStart:"Start Upload",uploadPause:"Pause Upload",uploadContinue:"Continue Upload",uploadRetry:"Retry Upload",uploadDelete:"Delete",uploadTurnLeft:"Turn Left",uploadTurnRight:"Turn Right",uploadPreview:"Doing Preview",updateStatusReady:"Selected _ files, total _KB.",updateStatusConfirm:"_ uploaded successfully and _ upload failed",updateStatusFinish:"Total _ files (_KB), _ uploaded successfully",updateStatusError:" and _ upload failed",errorNotSupport:"WebUploader does not support the browser you are using. Please upgrade your browser or flash player",errorLoadConfig:"Server config not loaded, upload can not work.",errorExceedSize:"File Size Exceed",errorFileType:"File Type Not Allow",errorInterrupt:"File Upload Interrupted",errorUploadRetry:"Upload Error, Please Retry.",errorHttp:"Http Error",errorServerUpload:"Server Result Error."},webapp:{tip1:"This function provided by Baidu APP,please apply for baidu APPKey webmaster first!",tip2:"And then open the file ueditor.config.js to set it! ",applyFor:"APPLY FOR",anthorApi:"Baidu API"},template:{"static":{lang_template_bkcolor:"Background Color",lang_template_clear:"Keep Content",lang_template_select:"Select Template"},blank:"Blank",blog:"Blog",resume:"Resume",richText:"Rich Text",scrPapers:"Scientific Papers"},scrawl:{"static":{lang_input_previousStep:"Previous",lang_input_nextsStep:"Next",lang_input_clear:"Clear",lang_input_addPic:"AddImage",lang_input_ScalePic:"ScaleImage",lang_input_removePic:"RemoveImage",J_imgTxt:{title:"Add background image"}},noScarwl:"No paint, a white paper...",scrawlUpLoading:"Image is uploading, please wait...",continueBtn:"Try again",imageError:"Image failed to load!",backgroundUploading:"Image is uploading,please wait..."},music:{"static":{lang_input_tips:"Input singer/song/album, search you interested in music!",J_searchBtn:{value:"Search songs"}},emptyTxt:"Not search to the relevant music results, please change a keyword try.",chapter:"Songs",singer:"Singer",special:"Album",listenTest:"Audition"},anchor:{"static":{lang_input_anchorName:"Anchor Name:"}},charts:{"static":{lang_data_source:"Data source:",lang_chart_format:"Chart format:",lang_data_align:"Align",lang_chart_align_same:"Consistent with the X-axis Y-axis",lang_chart_align_reverse:"X-axis Y-axis opposite",lang_chart_title:"Title",lang_chart_main_title:"main title:",lang_chart_sub_title:"sub title:",lang_chart_x_title:"X-axis title:",lang_chart_y_title:"Y-axis title:",lang_chart_tip:"Prompt",lang_cahrt_tip_prefix:"prefix:",lang_cahrt_tip_description:"仅饼图有效, 当鼠标移动到饼图中相应的块上时,提示框内的文字的前缀",lang_chart_data_unit:"Unit",lang_chart_data_unit_title:"unit:",lang_chart_data_unit_description:"显示在每个数据点上的数据的单位, 比如: 温度的单位 ℃",lang_chart_type:"Chart type:",lang_prev_btn:"Previous",lang_next_btn:"Next"}},emotion:{"static":{lang_input_choice:"Choice",lang_input_Tuzki:"Tuzki",lang_input_lvdouwa:"LvDouWa",lang_input_BOBO:"BOBO",lang_input_babyCat:"BabyCat",lang_input_bubble:"Bubble",lang_input_youa:"YouA"}},gmap:{"static":{lang_input_address:"Address:",lang_input_search:"Search",address:{value:"Beijing"}},searchError:"Unable to locate the address!"},help:{"static":{lang_input_about:"About",lang_input_shortcuts:"Shortcuts",lang_input_introduction:"UEditor is developed by Baidu Co.ltd. It is lightweight, customizable , focusing on user experience and etc. , UEditor is based on open source BSD license , allowing free use and redistribution.",lang_Txt_shortcuts:"Shortcuts",lang_Txt_func:"Function",lang_Txt_bold:"Bold",lang_Txt_copy:"Copy",lang_Txt_cut:"Cut",lang_Txt_Paste:"Paste",lang_Txt_undo:"Undo",lang_Txt_redo:"Redo",lang_Txt_italic:"Italic",lang_Txt_underline:"Underline",lang_Txt_selectAll:"Select All",lang_Txt_visualEnter:"Submit",lang_Txt_fullscreen:"Fullscreen"}},insertframe:{"static":{lang_input_address:"Address:",lang_input_width:"Width:",lang_input_height:"height:",lang_input_isScroll:"Enable scrollbars:",lang_input_frameborder:"Show frame border:",lang_input_alignMode:"Alignment:",align:{title:"Alignment",options:["Default","Left","Right","Center"]}},enterAddress:"Please enter an address!"},link:{"static":{lang_input_text:"Text:",lang_input_url:"URL:",lang_input_title:"Title:",lang_input_target:"open in new window:"},validLink:"Supports only effective when a link is selected",httpPrompt:'The hyperlink you enter should start with "http|https|ftp://"!'},map:{"static":{lang_city:"City",lang_address:"Address",city:{value:"Beijing"},lang_search:"Search",lang_dynamicmap:"Dynamic map"},cityMsg:"Please enter the city name!",errorMsg:"Can't find the place!"},searchreplace:{"static":{lang_tab_search:"Search",lang_tab_replace:"Replace",lang_search1:"Search",lang_search2:"Search",lang_replace:"Replace",lang_searchReg:'Support regular expression ,which starts and ends with a slash ,for example "/expression/"',lang_searchReg1:'Support regular expression ,which starts and ends with a slash ,for example "/expression/"',lang_case_sensitive1:"Case sense",lang_case_sensitive2:"Case sense",nextFindBtn:{value:"Next"},preFindBtn:{value:"Preview"},nextReplaceBtn:{value:"Next"},preReplaceBtn:{value:"Preview"},repalceBtn:{value:"Replace"},repalceAllBtn:{value:"Replace all"}},getEnd:"Has the search to the bottom!",getStart:"Has the search to the top!",countMsg:"Altogether replaced {#count} character(s)!"},snapscreen:{"static":{lang_showMsg:"You should install the UEditor screenshots program first!",lang_download:"Download!",lang_step1:"Step1:Download the program and then run it",lang_step2:"Step2:After complete install,try to click the button again"}},spechars:{"static":{},tsfh:"Special",lmsz:"Roman",szfh:"Numeral",rwfh:"Japanese",xlzm:"The Greek",ewzm:"Russian",pyzm:"Phonetic",yyyb:"English",zyzf:"Others"},edittable:{"static":{lang_tableStyle:"Table style",lang_insertCaption:"Add table header row",lang_insertTitle:"Add table title row",lang_insertTitleCol:"Add table title col",lang_tableSize:"Automatically adjust table size",lang_autoSizeContent:"Adaptive by form text",lang_orderbycontent:"Table of contents sortable",lang_autoSizePage:"Page width adaptive",lang_example:"Example",lang_borderStyle:"Table Border",lang_color:"Color:"},captionName:"Caption",titleName:"Title",cellsName:"text",errorMsg:"There are merged cells, can not sort."},edittip:{"static":{lang_delRow:"Delete entire row",lang_delCol:"Delete entire col"}},edittd:{"static":{lang_tdBkColor:"Background Color:"}},formula:{"static":{}},wordimage:{"static":{lang_resave:"The re-save step",uploadBtn:{src:"upload.png",alt:"Upload"},clipboard:{style:"background: url(copy.png) -153px -1px no-repeat;"},lang_step:" 1. Click top button to copy the url and then open the dialog to paste it. 2. Open after choose photos uploaded process."},fileType:"Image",flashError:"Flash initialization failed!",netError:"Network error! Please try again!",copySuccess:"URL has been copied!",flashI18n:{lang:encodeURI('{"UploadingState":"totalNum: ${a},uploadComplete: ${b}", "BeforeUpload":"waitingNum: ${a}", "ExceedSize":"Size exceed${a}", "ErrorInPreview":"Preview failed", "DefaultDescription":"Description", "LoadingImage":"Loading..."}'),uploadingTF:encodeURI('{"font":"Arial", "size":12, "color":"0x000", "bold":"true", "italic":"false", "underline":"false"}'),imageTF:encodeURI('{"font":"Arial", "size":11, "color":"red", "bold":"false", "italic":"false", "underline":"false"}'),textEncoding:"utf-8",addImageSkinURL:"addImage.png",allDeleteBtnUpSkinURL:"allDeleteBtnUpSkin.png",allDeleteBtnHoverSkinURL:"allDeleteBtnHoverSkin.png",rotateLeftBtnEnableSkinURL:"rotateLeftEnable.png",rotateLeftBtnDisableSkinURL:"rotateLeftDisable.png",rotateRightBtnEnableSkinURL:"rotateRightEnable.png",rotateRightBtnDisableSkinURL:"rotateRightDisable.png",deleteBtnEnableSkinURL:"deleteEnable.png",deleteBtnDisableSkinURL:"deleteDisable.png",backgroundURL:"",listBackgroundURL:"",buttonURL:"button.png"}},autosave:{success:"Local conservation success"}}; \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/lang/en/images/addimage.png b/IoTGateway/wwwroot/layuiadmin/ueditor/lang/en/images/addimage.png new file mode 100644 index 0000000..3a2fd17 Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/lang/en/images/addimage.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/lang/en/images/alldeletebtnhoverskin.png b/IoTGateway/wwwroot/layuiadmin/ueditor/lang/en/images/alldeletebtnhoverskin.png new file mode 100644 index 0000000..355eeab Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/lang/en/images/alldeletebtnhoverskin.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/lang/en/images/alldeletebtnupskin.png b/IoTGateway/wwwroot/layuiadmin/ueditor/lang/en/images/alldeletebtnupskin.png new file mode 100644 index 0000000..61658ce Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/lang/en/images/alldeletebtnupskin.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/lang/en/images/background.png b/IoTGateway/wwwroot/layuiadmin/ueditor/lang/en/images/background.png new file mode 100644 index 0000000..d5bf5fd Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/lang/en/images/background.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/lang/en/images/button.png b/IoTGateway/wwwroot/layuiadmin/ueditor/lang/en/images/button.png new file mode 100644 index 0000000..098874c Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/lang/en/images/button.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/lang/en/images/copy.png b/IoTGateway/wwwroot/layuiadmin/ueditor/lang/en/images/copy.png new file mode 100644 index 0000000..f982e8b Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/lang/en/images/copy.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/lang/en/images/deletedisable.png b/IoTGateway/wwwroot/layuiadmin/ueditor/lang/en/images/deletedisable.png new file mode 100644 index 0000000..c8ee750 Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/lang/en/images/deletedisable.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/lang/en/images/deleteenable.png b/IoTGateway/wwwroot/layuiadmin/ueditor/lang/en/images/deleteenable.png new file mode 100644 index 0000000..26acc88 Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/lang/en/images/deleteenable.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/lang/en/images/listbackground.png b/IoTGateway/wwwroot/layuiadmin/ueditor/lang/en/images/listbackground.png new file mode 100644 index 0000000..4f82ccd Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/lang/en/images/listbackground.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/lang/en/images/localimage.png b/IoTGateway/wwwroot/layuiadmin/ueditor/lang/en/images/localimage.png new file mode 100644 index 0000000..12c8e6a Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/lang/en/images/localimage.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/lang/en/images/music.png b/IoTGateway/wwwroot/layuiadmin/ueditor/lang/en/images/music.png new file mode 100644 index 0000000..2f495fe Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/lang/en/images/music.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/lang/en/images/rotateleftdisable.png b/IoTGateway/wwwroot/layuiadmin/ueditor/lang/en/images/rotateleftdisable.png new file mode 100644 index 0000000..741526e Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/lang/en/images/rotateleftdisable.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/lang/en/images/rotateleftenable.png b/IoTGateway/wwwroot/layuiadmin/ueditor/lang/en/images/rotateleftenable.png new file mode 100644 index 0000000..e164ddb Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/lang/en/images/rotateleftenable.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/lang/en/images/rotaterightdisable.png b/IoTGateway/wwwroot/layuiadmin/ueditor/lang/en/images/rotaterightdisable.png new file mode 100644 index 0000000..5a78c26 Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/lang/en/images/rotaterightdisable.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/lang/en/images/rotaterightenable.png b/IoTGateway/wwwroot/layuiadmin/ueditor/lang/en/images/rotaterightenable.png new file mode 100644 index 0000000..d768531 Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/lang/en/images/rotaterightenable.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/lang/en/images/upload.png b/IoTGateway/wwwroot/layuiadmin/ueditor/lang/en/images/upload.png new file mode 100644 index 0000000..7bb15b3 Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/lang/en/images/upload.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/lang/zh-cn/images/copy.png b/IoTGateway/wwwroot/layuiadmin/ueditor/lang/zh-cn/images/copy.png new file mode 100644 index 0000000..b2536aa Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/lang/zh-cn/images/copy.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/lang/zh-cn/images/localimage.png b/IoTGateway/wwwroot/layuiadmin/ueditor/lang/zh-cn/images/localimage.png new file mode 100644 index 0000000..7303c36 Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/lang/zh-cn/images/localimage.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/lang/zh-cn/images/music.png b/IoTGateway/wwwroot/layuiadmin/ueditor/lang/zh-cn/images/music.png new file mode 100644 index 0000000..354edeb Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/lang/zh-cn/images/music.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/lang/zh-cn/images/upload.png b/IoTGateway/wwwroot/layuiadmin/ueditor/lang/zh-cn/images/upload.png new file mode 100644 index 0000000..08d4d92 Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/lang/zh-cn/images/upload.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/lang/zh-cn/zh-cn.js b/IoTGateway/wwwroot/layuiadmin/ueditor/lang/zh-cn/zh-cn.js new file mode 100644 index 0000000..cdd4a72 --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/lang/zh-cn/zh-cn.js @@ -0,0 +1,2 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + ;UE.I18N["zh-cn"]={labelMap:{anchor:"锚点",undo:"撤销",redo:"重做",bold:"加粗",indent:"首行缩进",snapscreen:"截图",italic:"斜体",underline:"下划线",strikethrough:"删除线",subscript:"下标",fontborder:"字符边框",superscript:"上标",formatmatch:"格式刷",source:"源代码",blockquote:"引用",pasteplain:"纯文本粘贴模式",selectall:"全选",print:"打印",preview:"预览",horizontal:"分隔线",removeformat:"清除格式",time:"时间",date:"日期",unlink:"取消链接",insertrow:"前插入行",insertcol:"前插入列",mergeright:"右合并单元格",mergedown:"下合并单元格",deleterow:"删除行",deletecol:"删除列",splittorows:"拆分成行",splittocols:"拆分成列",splittocells:"完全拆分单元格",deletecaption:"删除表格标题",inserttitle:"插入标题",mergecells:"合并多个单元格",deletetable:"删除表格",cleardoc:"清空文档",insertparagraphbeforetable:"表格前插入行",insertcode:"代码语言",fontfamily:"字体",fontsize:"字号",paragraph:"段落格式",simpleupload:"单图上传",insertimage:"多图上传",edittable:"表格属性",edittd:"单元格属性",link:"超链接",emotion:"表情",spechars:"特殊字符",searchreplace:"查询替换",map:"Baidu地图",gmap:"Google地图",insertvideo:"视频",help:"帮助",justifyleft:"居左对齐",justifyright:"居右对齐",justifycenter:"居中对齐",justifyjustify:"两端对齐",forecolor:"字体颜色",backcolor:"背景色",insertorderedlist:"有序列表",insertunorderedlist:"无序列表",fullscreen:"全屏",directionalityltr:"从左向右输入",directionalityrtl:"从右向左输入",rowspacingtop:"段前距",rowspacingbottom:"段后距",pagebreak:"分页",insertframe:"插入Iframe",imagenone:"默认",imageleft:"左浮动",imageright:"右浮动",attachment:"附件",imagecenter:"居中",wordimage:"图片转存",lineheight:"行间距",edittip:"编辑提示",customstyle:"自定义标题",autotypeset:"自动排版",webapp:"百度应用",touppercase:"字母大写",tolowercase:"字母小写",background:"背景",template:"模板",scrawl:"涂鸦",music:"音乐",inserttable:"插入表格",drafts:"从草稿箱加载",charts:"图表"},insertorderedlist:{num:"1,2,3...",num1:"1),2),3)...",num2:"(1),(2),(3)...",cn:"一,二,三....",cn1:"一),二),三)....",cn2:"(一),(二),(三)....",decimal:"1,2,3...","lower-alpha":"a,b,c...","lower-roman":"i,ii,iii...","upper-alpha":"A,B,C...","upper-roman":"I,II,III..."},insertunorderedlist:{circle:"○ 大圆圈",disc:"● 小黑点",square:"■ 小方块 ",dash:"— 破折号",dot:" 。 小圆圈"},paragraph:{p:"段落",h1:"标题 1",h2:"标题 2",h3:"标题 3",h4:"标题 4",h5:"标题 5",h6:"标题 6"},fontfamily:{songti:"宋体",kaiti:"楷体",heiti:"黑体",lishu:"隶书",yahei:"微软雅黑",andaleMono:"andale mono",arial:"arial",arialBlack:"arial black",comicSansMs:"comic sans ms",impact:"impact",timesNewRoman:"times new roman"},customstyle:{tc:"标题居中",tl:"标题居左",im:"强调",hi:"明显强调"},autoupload:{exceedSizeError:"文件大小超出限制",exceedTypeError:"文件格式不允许",jsonEncodeError:"服务器返回格式错误",loading:"正在上传...",loadError:"上传错误",errorLoadConfig:"后端配置项没有正常加载,上传插件不能正常使用!"},simpleupload:{exceedSizeError:"文件大小超出限制",exceedTypeError:"文件格式不允许",jsonEncodeError:"服务器返回格式错误",loading:"正在上传...",loadError:"上传错误",errorLoadConfig:"后端配置项没有正常加载,上传插件不能正常使用!"},elementPathTip:"元素路径",wordCountTip:"字数统计",wordCountMsg:"当前已输入{#count}个字符, 您还可以输入{#leave}个字符。 ",wordOverFlowMsg:'字数超出最大允许值,服务器可能拒绝保存!',ok:"确认",cancel:"取消",closeDialog:"关闭对话框",tableDrag:"表格拖动必须引入uiUtils.js文件!",autofloatMsg:"工具栏浮动依赖编辑器UI,您首先需要引入UI文件!",loadconfigError:"获取后台配置项请求出错,上传功能将不能正常使用!",loadconfigFormatError:"后台配置项返回格式出错,上传功能将不能正常使用!",loadconfigHttpError:"请求后台配置项http错误,上传功能将不能正常使用!",snapScreen_plugin:{browserMsg:"仅支持IE浏览器!",callBackErrorMsg:"服务器返回数据有误,请检查配置项之后重试。",uploadErrorMsg:"截图上传失败,请检查服务器端环境! "},insertcode:{as3:"ActionScript 3",bash:"Bash/Shell",cpp:"C/C++",css:"CSS",cf:"ColdFusion","c#":"C#",delphi:"Delphi",diff:"Diff",erlang:"Erlang",groovy:"Groovy",html:"HTML",java:"Java",jfx:"JavaFX",js:"JavaScript",pl:"Perl",php:"PHP",plain:"Plain Text",ps:"PowerShell",python:"Python",ruby:"Ruby",scala:"Scala",sql:"SQL",vb:"Visual Basic",xml:"XML"},confirmClear:"确定清空当前文档么?",contextMenu:{"delete":"删除",selectall:"全选",deletecode:"删除代码",cleardoc:"清空文档",confirmclear:"确定清空当前文档么?",unlink:"删除超链接",paragraph:"段落格式",edittable:"表格属性",aligntd:"单元格对齐方式",aligntable:"表格对齐方式",tableleft:"左浮动",tablecenter:"居中显示",tableright:"右浮动",edittd:"单元格属性",setbordervisible:"设置表格边线可见",justifyleft:"左对齐",justifyright:"右对齐",justifycenter:"居中对齐",justifyjustify:"两端对齐",table:"表格",inserttable:"插入表格",deletetable:"删除表格",insertparagraphbefore:"前插入段落",insertparagraphafter:"后插入段落",deleterow:"删除当前行",deletecol:"删除当前列",insertrow:"前插入行",insertcol:"左插入列",insertrownext:"后插入行",insertcolnext:"右插入列",insertcaption:"插入表格名称",deletecaption:"删除表格名称",inserttitle:"插入表格标题行",deletetitle:"删除表格标题行",inserttitlecol:"插入表格标题列",deletetitlecol:"删除表格标题列",averageDiseRow:"平均分布各行",averageDisCol:"平均分布各列",mergeright:"向右合并",mergeleft:"向左合并",mergedown:"向下合并",mergecells:"合并单元格",splittocells:"完全拆分单元格",splittocols:"拆分成列",splittorows:"拆分成行",tablesort:"表格排序",enablesort:"设置表格可排序",disablesort:"取消表格可排序",reversecurrent:"逆序当前",orderbyasc:"按ASCII字符升序",reversebyasc:"按ASCII字符降序",orderbynum:"按数值大小升序",reversebynum:"按数值大小降序",borderbk:"边框底纹",setcolor:"表格隔行变色",unsetcolor:"取消表格隔行变色",setbackground:"选区背景隔行",unsetbackground:"取消选区背景",redandblue:"红蓝相间",threecolorgradient:"三色渐变",copy:"复制(Ctrl + c)",copymsg:"浏览器不支持,请使用 'Ctrl + c'",paste:"粘贴(Ctrl + v)",pastemsg:"浏览器不支持,请使用 'Ctrl + v'"},copymsg:"浏览器不支持,请使用 'Ctrl + c'",pastemsg:"浏览器不支持,请使用 'Ctrl + v'",anthorMsg:"链接",clearColor:"清空颜色",standardColor:"标准颜色",themeColor:"主题颜色",property:"属性","default":"默认",modify:"修改",justifyleft:"左对齐",justifyright:"右对齐",justifycenter:"居中",justify:"默认",clear:"清除",anchorMsg:"锚点","delete":"删除",clickToUpload:"点击上传",unset:"尚未设置语言文件",t_row:"行",t_col:"列",more:"更多",pasteOpt:"粘贴选项",pasteSourceFormat:"保留源格式",tagFormat:"只保留标签",pasteTextFormat:"只保留文本",autoTypeSet:{mergeLine:"合并空行",delLine:"清除空行",removeFormat:"清除格式",indent:"首行缩进",alignment:"对齐方式",imageFloat:"图片浮动",removeFontsize:"清除字号",removeFontFamily:"清除字体",removeHtml:"清除冗余HTML代码",pasteFilter:"粘贴过滤",run:"执行",symbol:"符号转换",bdc2sb:"全角转半角",tobdc:"半角转全角"},background:{"static":{lang_background_normal:"背景设置",lang_background_local:"在线图片",lang_background_set:"选项",lang_background_none:"无背景色",lang_background_colored:"有背景色",lang_background_color:"颜色设置",lang_background_netimg:"网络图片",lang_background_align:"对齐方式",lang_background_position:"精确定位",repeatType:{options:["居中","横向重复","纵向重复","平铺","自定义"]}},noUploadImage:"当前未上传过任何图片!",toggleSelect:"单击可切换选中状态\n原图尺寸: "},insertimage:{"static":{lang_tab_remote:"插入图片",lang_tab_upload:"本地上传",lang_tab_online:"在线管理",lang_tab_search:"图片搜索",lang_input_url:"地 址:",lang_input_size:"大 小:",lang_input_width:"宽度",lang_input_height:"高度",lang_input_border:"边 框:",lang_input_vhspace:"边 距:",lang_input_title:"描 述:",lang_input_align:"图片浮动方式:",lang_imgLoading:" 图片加载中……",lang_start_upload:"开始上传",lock:{title:"锁定宽高比例"},searchType:{title:"图片类型",options:["新闻","壁纸","表情","头像"]},searchTxt:{value:"请输入搜索关键词"},searchBtn:{value:"百度一下"},searchReset:{value:"清空搜索"},noneAlign:{title:"无浮动"},leftAlign:{title:"左浮动"},rightAlign:{title:"右浮动"},centerAlign:{title:"居中独占一行"}},uploadSelectFile:"点击选择图片",uploadAddFile:"继续添加",uploadStart:"开始上传",uploadPause:"暂停上传",uploadContinue:"继续上传",uploadRetry:"重试上传",uploadDelete:"删除",uploadTurnLeft:"向左旋转",uploadTurnRight:"向右旋转",uploadPreview:"预览中",uploadNoPreview:"不能预览",updateStatusReady:"选中_张图片,共_KB。",updateStatusConfirm:"已成功上传_张照片,_张照片上传失败",updateStatusFinish:"共_张(_KB),_张上传成功",updateStatusError:",_张上传失败。",errorNotSupport:"WebUploader 不支持您的浏览器!如果你使用的是IE浏览器,请尝试升级 flash 播放器。",errorLoadConfig:"后端配置项没有正常加载,上传插件不能正常使用!",errorExceedSize:"文件大小超出",errorFileType:"文件格式不允许",errorInterrupt:"文件传输中断",errorUploadRetry:"上传失败,请重试",errorHttp:"http请求错误",errorServerUpload:"服务器返回出错",remoteLockError:"宽高不正确,不能所定比例",numError:"请输入正确的长度或者宽度值!例如:123,400",imageUrlError:"不允许的图片格式或者图片域!",imageLoadError:"图片加载失败!请检查链接地址或网络状态!",searchRemind:"请输入搜索关键词",searchLoading:"图片加载中,请稍后……",searchRetry:" :( ,抱歉,没有找到图片!请重试一次!"},attachment:{"static":{lang_tab_upload:"上传附件",lang_tab_online:"在线附件",lang_start_upload:"开始上传",lang_drop_remind:"可以将文件拖到这里,单次最多可选100个文件"},uploadSelectFile:"点击选择文件",uploadAddFile:"继续添加",uploadStart:"开始上传",uploadPause:"暂停上传",uploadContinue:"继续上传",uploadRetry:"重试上传",uploadDelete:"删除",uploadTurnLeft:"向左旋转",uploadTurnRight:"向右旋转",uploadPreview:"预览中",updateStatusReady:"选中_个文件,共_KB。",updateStatusConfirm:"已成功上传_个文件,_个文件上传失败",updateStatusFinish:"共_个(_KB),_个上传成功",updateStatusError:",_张上传失败。",errorNotSupport:"WebUploader 不支持您的浏览器!如果你使用的是IE浏览器,请尝试升级 flash 播放器。",errorLoadConfig:"后端配置项没有正常加载,上传插件不能正常使用!",errorExceedSize:"文件大小超出",errorFileType:"文件格式不允许",errorInterrupt:"文件传输中断",errorUploadRetry:"上传失败,请重试",errorHttp:"http请求错误",errorServerUpload:"服务器返回出错"},insertvideo:{"static":{lang_tab_insertV:"插入视频",lang_tab_searchV:"搜索视频",lang_tab_uploadV:"上传视频",lang_video_url:"视频网址",lang_video_size:"视频尺寸",lang_videoW:"宽度",lang_videoH:"高度",lang_alignment:"对齐方式",videoSearchTxt:{value:"请输入搜索关键字!"},videoType:{options:["全部","热门","娱乐","搞笑","体育","科技","综艺"]},videoSearchBtn:{value:"百度一下"},videoSearchReset:{value:"清空结果"},lang_input_fileStatus:" 当前未上传文件",startUpload:{style:"background:url(upload.png) no-repeat;"},lang_upload_size:"视频尺寸",lang_upload_width:"宽度",lang_upload_height:"高度",lang_upload_alignment:"对齐方式",lang_format_advice:"建议使用mp4格式."},numError:"请输入正确的数值,如123,400",floatLeft:"左浮动",floatRight:"右浮动",'"default"':"默认",block:"独占一行",urlError:"输入的视频地址有误,请检查后再试!",loading:"  视频加载中,请等待……",clickToSelect:"点击选中",goToSource:"访问源视频",noVideo:"    抱歉,找不到对应的视频,请重试!",browseFiles:"浏览文件",uploadSuccess:"上传成功!",delSuccessFile:"从成功队列中移除",delFailSaveFile:"移除保存失败文件",statusPrompt:" 个文件已上传! ",flashVersionError:"当前Flash版本过低,请更新FlashPlayer后重试!",flashLoadingError:"Flash加载失败!请检查路径或网络状态",fileUploadReady:"等待上传……",delUploadQueue:"从上传队列中移除",limitPrompt1:"单次不能选择超过",limitPrompt2:"个文件!请重新选择!",delFailFile:"移除失败文件",fileSizeLimit:"文件大小超出限制!",emptyFile:"空文件无法上传!",fileTypeError:"文件类型不允许!",unknownError:"未知错误!",fileUploading:"上传中,请等待……",cancelUpload:"取消上传",netError:"网络错误",failUpload:"上传失败!",serverIOError:"服务器IO错误!",noAuthority:"无权限!",fileNumLimit:"上传个数限制",failCheck:"验证失败,本次上传被跳过!",fileCanceling:"取消中,请等待……",stopUploading:"上传已停止……",uploadSelectFile:"点击选择文件",uploadAddFile:"继续添加",uploadStart:"开始上传",uploadPause:"暂停上传",uploadContinue:"继续上传",uploadRetry:"重试上传",uploadDelete:"删除",uploadTurnLeft:"向左旋转",uploadTurnRight:"向右旋转",uploadPreview:"预览中",updateStatusReady:"选中_个文件,共_KB。",updateStatusConfirm:"成功上传_个,_个失败",updateStatusFinish:"共_个(_KB),_个成功上传",updateStatusError:",_张上传失败。",errorNotSupport:"WebUploader 不支持您的浏览器!如果你使用的是IE浏览器,请尝试升级 flash 播放器。",errorLoadConfig:"后端配置项没有正常加载,上传插件不能正常使用!",errorExceedSize:"文件大小超出",errorFileType:"文件格式不允许",errorInterrupt:"文件传输中断",errorUploadRetry:"上传失败,请重试",errorHttp:"http请求错误",errorServerUpload:"服务器返回出错"},webapp:{tip1:"本功能由百度APP提供,如看到此页面,请各位站长首先申请百度APPKey!",tip2:"申请完成之后请至ueditor.config.js中配置获得的appkey! ",applyFor:"点此申请",anthorApi:"百度API"},template:{"static":{lang_template_bkcolor:"背景颜色",lang_template_clear:"保留原有内容",lang_template_select:"选择模板"},blank:"空白文档",blog:"博客文章",resume:"个人简历",richText:"图文混排",sciPapers:"科技论文"},scrawl:{"static":{lang_input_previousStep:"上一步",lang_input_nextsStep:"下一步",lang_input_clear:"清空",lang_input_addPic:"添加背景",lang_input_ScalePic:"缩放背景",lang_input_removePic:"删除背景",J_imgTxt:{title:"添加背景图片"}},noScarwl:"尚未作画,白纸一张~",scrawlUpLoading:"涂鸦上传中,别急哦~",continueBtn:"继续",imageError:"糟糕,图片读取失败了!",backgroundUploading:"背景图片上传中,别急哦~"},music:{"static":{lang_input_tips:"输入歌手/歌曲/专辑,搜索您感兴趣的音乐!",J_searchBtn:{value:"搜索歌曲"}},emptyTxt:"未搜索到相关音乐结果,请换一个关键词试试。",chapter:"歌曲",singer:"歌手",special:"专辑",listenTest:"试听"},anchor:{"static":{lang_input_anchorName:"锚点名字:"}},charts:{"static":{lang_data_source:"数据源:",lang_chart_format:"图表格式:",lang_data_align:"数据对齐方式",lang_chart_align_same:"数据源与图表X轴Y轴一致",lang_chart_align_reverse:"数据源与图表X轴Y轴相反",lang_chart_title:"图表标题",lang_chart_main_title:"主标题:",lang_chart_sub_title:"子标题:",lang_chart_x_title:"X轴标题:",lang_chart_y_title:"Y轴标题:",lang_chart_tip:"提示文字",lang_cahrt_tip_prefix:"提示文字前缀:",lang_cahrt_tip_description:"仅饼图有效, 当鼠标移动到饼图中相应的块上时,提示框内的文字的前缀",lang_chart_data_unit:"数据单位",lang_chart_data_unit_title:"单位:",lang_chart_data_unit_description:"显示在每个数据点上的数据的单位, 比如: 温度的单位 ℃",lang_chart_type:"图表类型:",lang_prev_btn:"上一个",lang_next_btn:"下一个"}},emotion:{"static":{lang_input_choice:"精选",lang_input_Tuzki:"兔斯基",lang_input_BOBO:"BOBO",lang_input_lvdouwa:"绿豆蛙",lang_input_babyCat:"baby猫",lang_input_bubble:"泡泡",lang_input_youa:"有啊"}},gmap:{"static":{lang_input_address:"地址",lang_input_search:"搜索",address:{value:"北京"}},searchError:"无法定位到该地址!"},help:{"static":{lang_input_about:"关于UEditor",lang_input_shortcuts:"快捷键",lang_input_introduction:"UEditor是由百度web前端研发部开发的所见即所得富文本web编辑器,具有轻量,可定制,注重用户体验等特点。开源基于BSD协议,允许自由使用和修改代码。",lang_Txt_shortcuts:"快捷键",lang_Txt_func:"功能",lang_Txt_bold:"给选中字设置为加粗",lang_Txt_copy:"复制选中内容",lang_Txt_cut:"剪切选中内容",lang_Txt_Paste:"粘贴",lang_Txt_undo:"重新执行上次操作",lang_Txt_redo:"撤销上一次操作",lang_Txt_italic:"给选中字设置为斜体",lang_Txt_underline:"给选中字加下划线",lang_Txt_selectAll:"全部选中",lang_Txt_visualEnter:"软回车",lang_Txt_fullscreen:"全屏"}},insertframe:{"static":{lang_input_address:"地址:",lang_input_width:"宽度:",lang_input_height:"高度:",lang_input_isScroll:"允许滚动条:",lang_input_frameborder:"显示框架边框:",lang_input_alignMode:"对齐方式:",align:{title:"对齐方式",options:["默认","左对齐","右对齐","居中"]}},enterAddress:"请输入地址!"},link:{"static":{lang_input_text:"文本内容:",lang_input_url:"链接地址:",lang_input_title:"标题:",lang_input_target:"是否在新窗口打开:"},validLink:"只支持选中一个链接时生效",httpPrompt:"您输入的超链接中不包含http等协议名称,默认将为您添加http://前缀"},map:{"static":{lang_city:"城市",lang_address:"地址",city:{value:"北京"},lang_search:"搜索",lang_dynamicmap:"插入动态地图"},cityMsg:"请选择城市",errorMsg:"抱歉,找不到该位置!"},searchreplace:{"static":{lang_tab_search:"查找",lang_tab_replace:"替换",lang_search1:"查找",lang_search2:"查找",lang_replace:"替换",lang_searchReg:"支持正则表达式,添加前后斜杠标示为正则表达式,例如“/表达式/”",lang_searchReg1:"支持正则表达式,添加前后斜杠标示为正则表达式,例如“/表达式/”",lang_case_sensitive1:"区分大小写",lang_case_sensitive2:"区分大小写",nextFindBtn:{value:"下一个"},preFindBtn:{value:"上一个"},nextReplaceBtn:{value:"下一个"},preReplaceBtn:{value:"上一个"},repalceBtn:{value:"替换"},repalceAllBtn:{value:"全部替换"}},getEnd:"已经搜索到文章末尾!",getStart:"已经搜索到文章头部",countMsg:"总共替换了{#count}处!"},snapscreen:{"static":{lang_showMsg:"截图功能需要首先安装UEditor截图插件! ",lang_download:"点此下载",lang_step1:"第一步,下载UEditor截图插件并运行安装。",lang_step2:"第二步,插件安装完成后即可使用,如不生效,请重启浏览器后再试!"}},spechars:{"static":{},tsfh:"特殊字符",lmsz:"罗马字符",szfh:"数学字符",rwfh:"日文字符",xlzm:"希腊字母",ewzm:"俄文字符",pyzm:"拼音字母",yyyb:"英语音标",zyzf:"其他"},edittable:{"static":{lang_tableStyle:"表格样式",lang_insertCaption:"添加表格名称行",lang_insertTitle:"添加表格标题行",lang_insertTitleCol:"添加表格标题列",lang_orderbycontent:"使表格内容可排序",lang_tableSize:"自动调整表格尺寸",lang_autoSizeContent:"按表格文字自适应",lang_autoSizePage:"按页面宽度自适应",lang_example:"示例",lang_borderStyle:"表格边框",lang_color:"颜色:"},captionName:"表格名称",titleName:"标题",cellsName:"内容",errorMsg:"有合并单元格,不可排序"},edittip:{"static":{lang_delRow:"删除整行",lang_delCol:"删除整列"}},edittd:{"static":{lang_tdBkColor:"背景颜色:"}},formula:{"static":{}},wordimage:{"static":{lang_resave:"转存步骤",uploadBtn:{src:"upload.png",alt:"上传"},clipboard:{style:"background: url(copy.png) -153px -1px no-repeat;"},lang_step:"1、点击顶部复制按钮,将地址复制到剪贴板;2、点击添加照片按钮,在弹出的对话框中使用Ctrl+V粘贴地址;3、点击打开后选择图片上传流程。"},fileType:"图片",flashError:"FLASH初始化失败,请检查FLASH插件是否正确安装!",netError:"网络连接错误,请重试!",copySuccess:"图片地址已经复制!",flashI18n:{}},autosave:{saving:"保存中...",success:"本地保存成功"}}; \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/css/ueditor.css b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/css/ueditor.css new file mode 100644 index 0000000..8f99fa1 --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/css/ueditor.css @@ -0,0 +1,2 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + .edui-combox-body,.edui-default .edui-button-body,.edui-menubutton-body,.edui-splitbutton-body,div.edui-box{position:relative}.edui-default .edui-box{border:none;padding:0;margin:0;overflow:hidden}.edui-default a.edui-box{display:block;text-decoration:none;color:#000}.edui-default a.edui-box:active,.edui-default a.edui-box:hover{text-decoration:none}.edui-default table.edui-box{border-collapse:collapse}.edui-default ul.edui-box{list-style-type:none}div.edui-box{display:-moz-inline-box!important;display:inline-block!important;vertical-align:top}.edui-default .edui-clearfix{zoom:1}.edui-default .edui-clearfix:after{content:'\20';display:block;clear:both}* html div.edui-box,*:first-child+html div.edui-box{display:inline!important}.edui-default .edui-popup{position:absolute;-webkit-user-select:none;-moz-user-select:none}.edui-default .edui-popup .edui-shadow{position:absolute;z-index:-1}.edui-default .edui-popup .edui-bordereraser{position:absolute;overflow:hidden}.edui-default .edui-tablepicker .edui-canvas{position:relative}.edui-default .edui-tablepicker .edui-canvas .edui-overlay{position:absolute}.edui-default .edui-dialog-modalmask,.edui-dialog-dragmask{position:absolute;left:0;top:0;width:100%;height:100%}.edui-default .edui-label{cursor:default}.edui-default span.edui-clickable{color:#00f;cursor:pointer;text-decoration:underline}.edui-default span.edui-unclickable{color:gray;cursor:default}.edui-default .edui-toolbar{position:relative;cursor:default;-webkit-user-select:none;-moz-user-select:none;padding:1px;overflow:hidden;zoom:1;width:auto;height:auto}.edui-default .edui-toolbar .edui-button,.edui-default .edui-toolbar .edui-combox,.edui-default .edui-toolbar .edui-menubutton,.edui-default .edui-toolbar .edui-splitbutton{margin:1px}.edui-default .edui-editor{border:1px solid #d4d4d4;background-color:#fff;position:relative;overflow:visible;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.edui-editor div{width:auto;height:auto}.edui-default .edui-editor-toolbarbox{position:relative;zoom:1;-webkit-box-shadow:0 1px 4px rgba(204,204,204,.6);-moz-box-shadow:0 1px 4px rgba(204,204,204,.6);box-shadow:0 1px 4px rgba(204,204,204,.6);border-top-left-radius:2px;border-top-right-radius:2px}.edui-default .edui-editor-toolbarboxouter{border-bottom:1px solid #d4d4d4;background-color:#fafafa;background-image:-moz-linear-gradient(top,#fff,#f2f2f2);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#f2f2f2));background-image:-webkit-linear-gradient(top,#fff,#f2f2f2);background-image:-o-linear-gradient(top,#fff,#f2f2f2);background-image:linear-gradient(to bottom,#fff,#f2f2f2);background-repeat:repeat-x;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0);*zoom:1;-webkit-box-shadow:0 1px 4px rgba(0,0,0,.065);-moz-box-shadow:0 1px 4px rgba(0,0,0,.065);box-shadow:0 1px 4px rgba(0,0,0,.065)}.edui-default .edui-editor-toolbarboxinner{padding:2px}.edui-default .edui-editor-iframeholder{position:relative}.edui-default .edui-editor-bottomContainer{overflow:hidden}.edui-default .edui-editor-bottomContainer table{width:100%;height:0;overflow:hidden;border-spacing:0}.edui-default .edui-editor-bottomContainer td{white-space:nowrap;border-top:1px solid #ccc;line-height:20px;font-size:12px;font-family:Arial,Helvetica,Tahoma,Verdana,Sans-Serif}.edui-default .edui-editor-wordcount{text-align:right;margin-right:5px;color:#aaa}.edui-default .edui-editor-scale{width:12px}.edui-default .edui-editor-scale .edui-editor-icon{float:right;width:100%;height:12px;margin-top:10px;background:url(../images/scale.png) no-repeat;cursor:se-resize}.edui-default .edui-editor-breadcrumb{margin:2px 0 0 3px}.edui-default .edui-editor-breadcrumb span{cursor:pointer;text-decoration:underline;color:#00f}.edui-default .edui-toolbar .edui-for-fullscreen{float:right}.edui-default .edui-bubble .edui-popup-content{border:1px solid #DCAC6C;background-color:#fff6d9;padding:5px;font-size:10pt;font-family:"宋体"}.edui-default .edui-editor-toolbarmsg{background-color:#FFF6D9;border-bottom:1px solid #ccc;position:absolute;bottom:-25px;left:0;z-index:999999;width:99.9%}.edui-default .edui-editor-toolbarmsg-upload{font-size:14px;color:#00f;width:100px;height:16px;line-height:16px;cursor:pointer;position:absolute;top:5px;left:350px}.edui-default .edui-editor-toolbarmsg-label{font-size:12px;line-height:16px;padding:4px}.edui-default .edui-editor-toolbarmsg-close{float:right;width:20px;height:16px;line-height:16px;cursor:pointer;color:red}.edui-default .edui-list .edui-bordereraser{display:none}.edui-default .edui-listitem{padding:1px;white-space:nowrap}.edui-default .edui-list .edui-state-hover{position:relative;background-color:#fff5d4;border:1px solid #dcac6c;padding:0}.edui-default .edui-for-fontfamily .edui-listitem-label{min-width:130px;_width:120px;font-size:12px;height:22px;line-height:22px;padding-left:5px}.edui-default .edui-for-insertcode .edui-listitem-label{min-width:120px;_width:120px;font-size:12px;height:22px;line-height:22px;padding-left:5px}.edui-default .edui-for-underline .edui-listitem-label{min-width:120px;_width:120px;padding:3px 5px;font-size:12px}.edui-default .edui-for-fontsize .edui-listitem-label{min-width:120px;_width:120px;padding:3px 5px}.edui-default .edui-for-paragraph .edui-listitem-label{min-width:200px;_width:200px;padding:2px 5px}.edui-default .edui-for-lineheight .edui-listitem-label,.edui-default .edui-for-rowspacingbottom .edui-listitem-label,.edui-default .edui-for-rowspacingtop .edui-listitem-label{min-width:53px;_width:53px;padding:2px 5px}.edui-default .edui-for-customstyle .edui-listitem-label{min-width:200px;_width:200px;width:200px!important;padding:2px 5px}.edui-default .edui-menu{z-index:3000}.edui-default .edui-menu .edui-popup-content{padding:3px}.edui-default .edui-menu-body{_width:150px;min-width:170px;background:url(../images/sparator_v.png) 25px repeat-y}.edui-default .edui-menuitem{height:20px;cursor:default;vertical-align:top}.edui-default .edui-menuitem .edui-icon{width:20px!important;height:20px!important;background:url(../images/icons.png) 0 -4000px;background:url(../images/icons.gif) 0 -4000px\9}.edui-default .edui-menuitem .edui-label{font-size:12px;line-height:20px;height:20px;padding-left:10px}.edui-default .edui-state-checked .edui-menuitem-body{background:url(../images/icons-all.gif) 6px -205px no-repeat}.edui-default .edui-state-disabled .edui-menuitem-label{color:gray}.edui-default .edui-toolbar .edui-combox-body .edui-button-body{width:60px;font-size:12px;height:20px;line-height:20px;padding-left:5px;white-space:nowrap;margin:0 3px 0 0}.edui-default .edui-toolbar .edui-combox-body .edui-arrow{background:url(../images/icons.png) -741px 0;_background:url(../images/icons.gif) -741px 0;height:20px;width:9px;border-left:1px solid #CCC}.edui-default .edui-toolbar .edui-combox .edui-combox-body{border:1px solid #CCC;background-color:#fff;border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px}.edui-default .edui-toolbar .edui-combox-body .edui-splitborder{display:none}.edui-default .edui-toolbar .edui-state-hover .edui-combox-body{background-color:#fff5d4;border:1px solid #dcac6c}.edui-default .edui-toolbar .edui-state-hover .edui-combox-body .edui-arrow{border-left:1px solid #dcac6c}.edui-default .edui-toolbar .edui-state-checked .edui-combox-body{background-color:#FFE69F;border:1px solid #DCAC6C}.edui-toolbar .edui-state-checked .edui-combox-body .edui-arrow{border-left:1px solid #DCAC6C}.edui-toolbar .edui-state-disabled .edui-combox-body{background-color:#F0F0EE;opacity:.3;filter:alpha(opacity=30)}.edui-toolbar .edui-state-opened .edui-combox-body{background-color:#fff;border:1px solid gray}.edui-default .edui-toolbar .edui-button .edui-icon,.edui-default .edui-toolbar .edui-menubutton .edui-icon,.edui-default .edui-toolbar .edui-splitbutton .edui-icon{height:20px!important;width:20px!important;background-image:url(../images/icons.png);background-image:url(../images/icons.gif)\9}.edui-default .edui-toolbar .edui-button .edui-button-wrap{padding:1px;position:relative}.edui-default .edui-toolbar .edui-button .edui-state-hover .edui-button-wrap{background-color:#fff5d4;padding:0;border:1px solid #dcac6c}.edui-default .edui-toolbar .edui-button .edui-state-checked .edui-button-wrap{background-color:#ffe69f;padding:0;border:1px solid #dcac6c;border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px}.edui-default .edui-toolbar .edui-button .edui-state-active .edui-button-wrap{background-color:#fff;padding:0;border:1px solid gray}.edui-default .edui-toolbar .edui-state-disabled .edui-label{color:#ccc}.edui-default .edui-toolbar .edui-state-disabled .edui-icon{opacity:.3;filter:alpha(opacity=30)}.edui-default .edui-for-undo .edui-icon{background-position:-160px 0}.edui-default .edui-for-redo .edui-icon{background-position:-100px 0}.edui-default .edui-for-bold .edui-icon{background-position:0 0}.edui-default .edui-for-italic .edui-icon{background-position:-60px 0}.edui-default .edui-for-fontborder .edui-icon{background-position:-160px -40px}.edui-default .edui-for-underline .edui-icon{background-position:-140px 0}.edui-default .edui-for-strikethrough .edui-icon{background-position:-120px 0}.edui-default .edui-for-subscript .edui-icon{background-position:-600px 0}.edui-default .edui-for-superscript .edui-icon{background-position:-620px 0}.edui-default .edui-for-blockquote .edui-icon{background-position:-220px 0}.edui-default .edui-for-forecolor .edui-icon{background-position:-720px 0}.edui-default .edui-for-backcolor .edui-icon{background-position:-760px 0}.edui-default .edui-for-inserttable .edui-icon{background-position:-580px -20px}.edui-default .edui-for-autotypeset .edui-icon{background-position:-640px -40px}.edui-default .edui-for-justifyleft .edui-icon{background-position:-460px 0}.edui-default .edui-for-justifycenter .edui-icon{background-position:-420px 0}.edui-default .edui-for-justifyright .edui-icon{background-position:-480px 0}.edui-default .edui-for-justifyjustify .edui-icon{background-position:-440px 0}.edui-default .edui-for-insertorderedlist .edui-icon{background-position:-80px 0}.edui-default .edui-for-insertunorderedlist .edui-icon{background-position:-20px 0}.edui-default .edui-for-lineheight .edui-icon{background-position:-725px -40px}.edui-default .edui-for-rowspacingbottom .edui-icon{background-position:-745px -40px}.edui-default .edui-for-rowspacingtop .edui-icon{background-position:-765px -40px}.edui-default .edui-for-horizontal .edui-icon{background-position:-360px 0}.edui-default .edui-for-link .edui-icon{background-position:-500px 0}.edui-default .edui-for-code .edui-icon{background-position:-440px -40px}.edui-default .edui-for-insertimage .edui-icon{background-position:-726px -77px}.edui-default .edui-for-insertframe .edui-icon{background-position:-240px -40px}.edui-default .edui-for-emoticon .edui-icon{background-position:-60px -20px}.edui-default .edui-for-spechars .edui-icon{background-position:-240px 0}.edui-default .edui-for-help .edui-icon{background-position:-340px 0}.edui-default .edui-for-print .edui-icon{background-position:-440px -20px}.edui-default .edui-for-preview .edui-icon{background-position:-420px -20px}.edui-default .edui-for-selectall .edui-icon{background-position:-400px -20px}.edui-default .edui-for-searchreplace .edui-icon{background-position:-520px -20px}.edui-default .edui-for-map .edui-icon{background-position:-40px -40px}.edui-default .edui-for-gmap .edui-icon{background-position:-260px -40px}.edui-default .edui-for-insertvideo .edui-icon{background-position:-320px -20px}.edui-default .edui-for-time .edui-icon{background-position:-160px -20px}.edui-default .edui-for-date .edui-icon{background-position:-140px -20px}.edui-default .edui-for-cut .edui-icon{background-position:-680px 0}.edui-default .edui-for-copy .edui-icon{background-position:-700px 0}.edui-default .edui-for-paste .edui-icon{background-position:-560px 0}.edui-default .edui-for-formatmatch .edui-icon{background-position:-40px 0}.edui-default .edui-for-pasteplain .edui-icon{background-position:-360px -20px}.edui-default .edui-for-directionalityltr .edui-icon{background-position:-20px -20px}.edui-default .edui-for-directionalityrtl .edui-icon{background-position:-40px -20px}.edui-default .edui-for-source .edui-icon{background-position:-261px 0}.edui-default .edui-for-removeformat .edui-icon{background-position:-580px 0}.edui-default .edui-for-unlink .edui-icon{background-position:-640px 0}.edui-default .edui-for-touppercase .edui-icon{background-position:-786px 0}.edui-default .edui-for-tolowercase .edui-icon{background-position:-806px 0}.edui-default .edui-for-insertrow .edui-icon{background-position:-478px -76px}.edui-default .edui-for-insertrownext .edui-icon{background-position:-498px -76px}.edui-default .edui-for-insertcol .edui-icon{background-position:-455px -76px}.edui-default .edui-for-insertcolnext .edui-icon{background-position:-429px -76px}.edui-default .edui-for-mergeright .edui-icon{background-position:-60px -40px}.edui-default .edui-for-mergedown .edui-icon{background-position:-80px -40px}.edui-default .edui-for-splittorows .edui-icon{background-position:-100px -40px}.edui-default .edui-for-splittocols .edui-icon{background-position:-120px -40px}.edui-default .edui-for-insertparagraphbeforetable .edui-icon{background-position:-140px -40px}.edui-default .edui-for-deleterow .edui-icon{background-position:-660px -20px}.edui-default .edui-for-deletecol .edui-icon{background-position:-640px -20px}.edui-default .edui-for-splittocells .edui-icon{background-position:-800px -20px}.edui-default .edui-for-mergecells .edui-icon{background-position:-760px -20px}.edui-default .edui-for-deletetable .edui-icon{background-position:-620px -20px}.edui-default .edui-for-cleardoc .edui-icon{background-position:-520px 0}.edui-default .edui-for-fullscreen .edui-icon{background-position:-100px -20px}.edui-default .edui-for-anchor .edui-icon{background-position:-200px 0}.edui-default .edui-for-pagebreak .edui-icon{background-position:-460px -40px}.edui-default .edui-for-imagenone .edui-icon{background-position:-480px -40px}.edui-default .edui-for-imageleft .edui-icon{background-position:-500px -40px}.edui-default .edui-for-wordimage .edui-icon{background-position:-660px -40px}.edui-default .edui-for-imageright .edui-icon{background-position:-520px -40px}.edui-default .edui-for-imagecenter .edui-icon{background-position:-540px -40px}.edui-default .edui-for-indent .edui-icon{background-position:-400px 0}.edui-default .edui-for-outdent .edui-icon{background-position:-540px 0}.edui-default .edui-for-webapp .edui-icon{background-position:-601px -40px}.edui-default .edui-for-table .edui-icon{background-position:-580px -20px}.edui-default .edui-for-edittable .edui-icon{background-position:-420px -40px}.edui-default .edui-for-template .edui-icon{background-position:-339px -40px}.edui-default .edui-for-delete .edui-icon{background-position:-360px -40px}.edui-default .edui-for-attachment .edui-icon{background-position:-620px -40px}.edui-default .edui-for-edittd .edui-icon{background-position:-700px -40px}.edui-default .edui-for-snapscreen .edui-icon{background-position:-581px -40px}.edui-default .edui-for-scrawl .edui-icon{background-position:-801px -41px}.edui-default .edui-for-background .edui-icon{background-position:-680px -40px}.edui-default .edui-for-music .edui-icon{background-position:-18px -40px}.edui-default .edui-for-formula .edui-icon{background-position:-200px -40px}.edui-default .edui-for-aligntd .edui-icon{background-position:-236px -76px}.edui-default .edui-for-insertparagraphtrue .edui-icon{background-position:-625px -76px}.edui-default .edui-for-insertparagraph .edui-icon{background-position:-602px -76px}.edui-default .edui-for-insertcaption .edui-icon{background-position:-336px -76px}.edui-default .edui-for-deletecaption .edui-icon{background-position:-362px -76px}.edui-default .edui-for-inserttitle .edui-icon{background-position:-286px -76px}.edui-default .edui-for-deletetitle .edui-icon{background-position:-311px -76px}.edui-default .edui-for-aligntable .edui-icon{background-position:-440px 0}.edui-default .edui-for-tablealignment-left .edui-icon{background-position:-460px 0}.edui-default .edui-for-tablealignment-center .edui-icon{background-position:-420px 0}.edui-default .edui-for-tablealignment-right .edui-icon{background-position:-480px 0}.edui-default .edui-for-drafts .edui-icon{background-position:-560px 0}.edui-default .edui-for-charts .edui-icon{background:url(../images/charts.png) 2px 3px no-repeat!important}.edui-default .edui-for-inserttitlecol .edui-icon{background-position:-673px -76px}.edui-default .edui-for-deletetitlecol .edui-icon{background-position:-698px -76px}.edui-default .edui-for-simpleupload .edui-icon{background-position:-380px 0}.edui-default .edui-toolbar .edui-menubutton-body .edui-arrow,.edui-default .edui-toolbar .edui-splitbutton-body .edui-arrow{background:url(../images/icons.png) -741px 0;_background:url(../images/icons.gif) -741px 0;height:20px;width:9px}.edui-default .edui-toolbar .edui-menubutton .edui-menubutton-body,.edui-default .edui-toolbar .edui-splitbutton .edui-splitbutton-body{padding:1px}.edui-default .edui-toolbar .edui-splitborder{width:1px;height:20px}.edui-default .edui-toolbar .edui-state-hover .edui-splitborder{width:1px;border-left:0 solid #dcac6c}.edui-default .edui-toolbar .edui-state-active .edui-splitborder{width:0;border-left:1px solid gray}.edui-default .edui-toolbar .edui-state-opened .edui-splitborder{width:1px;border:0}.edui-default .edui-toolbar .edui-menubutton .edui-state-hover .edui-menubutton-body,.edui-default .edui-toolbar .edui-splitbutton .edui-state-hover .edui-splitbutton-body{background-color:#fff5d4;border:1px solid #dcac6c;padding:0}.edui-default .edui-toolbar .edui-menubutton .edui-state-checked .edui-menubutton-body,.edui-default .edui-toolbar .edui-splitbutton .edui-state-checked .edui-splitbutton-body{background-color:#FFE69F;border:1px solid #DCAC6C;padding:0}.edui-default .edui-toolbar .edui-menubutton .edui-state-active .edui-menubutton-body,.edui-default .edui-toolbar .edui-menubutton .edui-state-opened .edui-menubutton-body,.edui-default .edui-toolbar .edui-splitbutton .edui-state-active .edui-splitbutton-body,.edui-default .edui-toolbar .edui-splitbutton .edui-state-opened .edui-splitbutton-body{border:1px solid gray;background-color:#fff;padding:0}.edui-default .edui-state-disabled .edui-arrow{opacity:.3;_filter:alpha(opacity=30)}.edui-default .edui-for-insertorderedlist .edui-bordereraser,.edui-default .edui-for-insertunorderedlist .edui-bordereraser,.edui-default .edui-for-lineheight .edui-bordereraser,.edui-default .edui-for-rowspacingbottom .edui-bordereraser,.edui-default .edui-for-rowspacingtop .edui-bordereraser{background-color:#fff}.edui-default .edui-for-insertorderedlist .edui-popup-body .edui-icon,.edui-default .edui-for-insertunorderedlist .edui-popup-body .edui-icon,.edui-default .edui-for-lineheight .edui-popup-body .edui-icon,.edui-default .edui-for-rowspacingbottom .edui-popup-body .edui-icon,.edui-default .edui-for-rowspacingtop .edui-popup-body .edui-icon{background-image:none}.edui-default .edui-popup{z-index:3000;background-color:#fff;width:auto;height:auto}.edui-default .edui-popup .edui-shadow{left:0;top:0;width:100%;height:100%}.edui-default .edui-popup-content{border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);*border-right-width:2px;*border-bottom-width:2px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 4px rgba(0,0,0,.2);-moz-box-shadow:0 3px 4px rgba(0,0,0,.2);box-shadow:0 3px 4px rgba(0,0,0,.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;padding:5px;background:#fff}.edui-default .edui-popup .edui-bordereraser{background-color:#fff;height:3px}.edui-default .edui-menu .edui-bordereraser{height:3px}.edui-default .edui-anchor-topleft .edui-bordereraser{left:1px;top:-2px}.edui-default .edui-anchor-topright .edui-bordereraser{right:1px;top:-2px}.edui-default .edui-anchor-bottomleft .edui-bordereraser{left:0;bottom:-6px;height:7px;border-left:1px solid gray;border-right:1px solid gray}.edui-default .edui-anchor-bottomright .edui-bordereraser{right:0;bottom:-6px;height:7px;border-left:1px solid gray;border-right:1px solid gray}.edui-popup div{width:auto;height:auto}.edui-default .edui-editor-messageholder{display:block;width:150px;height:auto;border:0;margin:0;padding:0;position:absolute;top:28px;right:3px}.edui-default .edui-message{min-height:10px;text-shadow:0 1px 0 rgba(255,255,255,.5);padding:0;margin-bottom:3px;position:relative}.edui-default .edui-message-body{border-radius:3px;padding:8px 15px 8px 8px;color:#c09853;background-color:#fcf8e3;border:1px solid #fbeed5}.edui-default .edui-message-type-info{color:#3a87ad;background-color:#d9edf7;border-color:#bce8f1}.edui-default .edui-message-type-success{color:#468847;background-color:#dff0d8;border-color:#d6e9c6}.edui-default .edui-message-type-danger,.edui-default .edui-message-type-error{color:#b94a48;background-color:#f2dede;border-color:#eed3d7}.edui-default .edui-message .edui-message-closer{display:block;width:16px;height:16px;line-height:16px;position:absolute;top:0;right:0;padding:0;cursor:pointer;background:0 0;border:0;float:right;font-size:20px;font-weight:700;color:#999;text-shadow:0 1px 0 #fff;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}.edui-default .edui-message .edui-message-content{font-size:10pt;word-wrap:break-word;word-break:normal}.edui-default .edui-dialog{z-index:99999999;position:absolute}.edui-dialog div{width:auto}.edui-default .edui-dialog-wrap{margin-right:6px;margin-bottom:6px}.edui-default .edui-dialog-fullscreen-flag{margin-right:0;margin-bottom:0}.edui-default .edui-dialog-body{position:relative;padding:2px 0 0 2px;_zoom:1}.edui-default .edui-dialog-fullscreen-flag .edui-dialog-body{padding:0}.edui-default .edui-dialog-shadow{position:absolute;z-index:-1;left:0;top:0;width:100%;height:100%;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);*border-right-width:2px;*border-bottom-width:2px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.edui-default .edui-dialog-foot{background-color:#fff}.edui-default .edui-dialog-titlebar{height:26px;border-bottom:1px solid #c6c6c6;background:url(../images/dialog-title-bg.png) bottom repeat-x;position:relative;cursor:move}.edui-default .edui-dialog-caption{font-weight:700;font-size:12px;line-height:26px;padding-left:5px}.edui-default .edui-dialog-draghandle{height:26px}.edui-default .edui-dialog-closebutton{position:absolute!important;right:5px;top:3px}.edui-default .edui-dialog-closebutton .edui-button-body{height:20px;width:20px;cursor:pointer;background:url(../images/icons-all.gif) 0 -59px no-repeat}.edui-default .edui-dialog-closebutton .edui-state-hover .edui-button-body{background:url(../images/icons-all.gif) 0 -89px no-repeat}.edui-default .edui-dialog-foot{height:40px}.edui-default .edui-dialog-buttons{position:absolute;right:0}.edui-default .edui-dialog-buttons .edui-button{margin-right:10px}.edui-default .edui-dialog-buttons .edui-button .edui-button-body{background:url(../images/icons-all.gif) no-repeat;height:24px;width:96px;font-size:12px;line-height:24px;text-align:center;cursor:default}.edui-default .edui-dialog-buttons .edui-button .edui-state-hover .edui-button-body{background:url(../images/icons-all.gif) 0 -30px no-repeat}.edui-default .edui-dialog iframe{border:0;padding:0;margin:0;vertical-align:top}.edui-default .edui-dialog-modalmask{opacity:.3;filter:alpha(opacity=30);background-color:#ccc;position:absolute}.edui-default .edui-dialog-dragmask{position:absolute;background-color:transparent;cursor:move}.edui-default .edui-dialog-content{position:relative}.edui-default .dialogcontmask{cursor:move;visibility:hidden;display:block;position:absolute;width:100%;height:100%;opacity:0;filter:alpha(opacity=0)}.edui-default .edui-for-link .edui-dialog-content{width:420px;height:200px;overflow:hidden}.edui-default .edui-for-background .edui-dialog-content{width:440px;height:280px;overflow:hidden}.edui-default .edui-for-template .edui-dialog-content{width:630px;height:390px;overflow:hidden}.edui-default .edui-for-scrawl .edui-dialog-content{width:515px;*width:506px;height:360px}.edui-default .edui-for-spechars .edui-dialog-content{width:620px;height:500px;*width:630px;*height:570px}.edui-default .edui-for-insertimage .edui-dialog-content{width:650px;height:400px;overflow:hidden}.edui-default .edui-for-webapp .edui-dialog-content{width:560px;_width:565px;height:450px;overflow:hidden}.edui-default .edui-for-insertframe .edui-dialog-content{width:350px;height:200px;overflow:hidden}.edui-default .edui-for-wordimage .edui-dialog-content{width:620px;height:380px;overflow:hidden}.edui-default .edui-for-attachment .edui-dialog-content{width:650px;height:400px;overflow:hidden}.edui-default .edui-for-gmap .edui-dialog-content,.edui-default .edui-for-map .edui-dialog-content{width:550px;height:400px}.edui-default .edui-for-insertvideo .edui-dialog-content{width:590px;height:390px}.edui-default .edui-for-anchor .edui-dialog-content{width:320px;height:60px;overflow:hidden}.edui-default .edui-for-searchreplace .edui-dialog-content{width:400px;height:220px}.edui-default .edui-for-help .edui-dialog-content{width:400px;height:420px}.edui-default .edui-for-edittable .edui-dialog-content{width:540px;_width:590px;height:335px}.edui-default .edui-for-edittip .edui-dialog-content{width:225px;height:60px}.edui-default .edui-for-edittd .edui-dialog-content{width:240px;height:50px}.edui-default .edui-for-snapscreen .edui-dialog-content{width:400px;height:220px}.edui-default .edui-for-music .edui-dialog-content{width:515px;height:360px}.edui-default .edui-for-paragraph .edui-listitem-label{font-family:Tahoma,Verdana,Arial,Helvetica}.edui-default .edui-for-paragraph .edui-listitem-label .edui-for-p{font-size:22px;line-height:27px}.edui-default .edui-for-paragraph .edui-listitem-label .edui-for-h1{font-weight:bolder;font-size:32px;line-height:36px}.edui-default .edui-for-paragraph .edui-listitem-label .edui-for-h2{font-weight:bolder;font-size:27px;line-height:29px}.edui-default .edui-for-paragraph .edui-listitem-label .edui-for-h3{font-weight:bolder;font-size:19px;line-height:23px}.edui-default .edui-for-paragraph .edui-listitem-label .edui-for-h4{font-weight:bolder;font-size:16px;line-height:19px}.edui-default .edui-for-paragraph .edui-listitem-label .edui-for-h5{font-weight:bolder;font-size:13px;line-height:16px}.edui-default .edui-for-paragraph .edui-listitem-label .edui-for-h6{font-weight:bolder;font-size:12px;line-height:14px}.edui-default .edui-for-inserttable .edui-splitborder{display:none}.edui-default .edui-for-inserttable .edui-splitbutton-body .edui-arrow{width:0}.edui-default .edui-toolbar .edui-for-inserttable .edui-state-active .edui-splitborder{border-left:1px solid transparent}.edui-default .edui-tablepicker .edui-infoarea{height:14px;line-height:14px;font-size:12px;width:220px;margin-bottom:3px;clear:both}.edui-default .edui-tablepicker .edui-infoarea .edui-label{float:left}.edui-default .edui-dialog-buttons .edui-label{line-height:24px}.edui-default .edui-tablepicker .edui-infoarea .edui-clickable{float:right}.edui-default .edui-tablepicker .edui-pickarea{background:url(../images/unhighlighted.gif);height:220px;width:220px}.edui-default .edui-tablepicker .edui-pickarea .edui-overlay{background:url(../images/highlighted.gif)}.edui-default .edui-colorpicker-topbar{height:27px;width:200px}.edui-default .edui-colorpicker-preview{height:20px;border:1px inset #000;margin-left:1px;width:128px;float:left}.edui-default .edui-colorpicker-nocolor{float:right;margin-right:1px;font-size:12px;line-height:14px;height:14px;border:1px solid #333;padding:3px 5px;cursor:pointer}.edui-default .edui-colorpicker-tablefirstrow{height:30px}.edui-default .edui-colorpicker-colorcell{width:14px;height:14px;display:block;margin:0;cursor:pointer}.edui-default .edui-colorpicker-colorcell:hover{width:14px;height:14px;margin:0}.edui-default .edui-colorpicker-advbtn{display:block;text-align:center;cursor:pointer;height:20px}.arrow_down{background:url(../images/arrow_down.png) center no-repeat #fff}.arrow_up{background:url(../images/arrow_up.png) center no-repeat #fff}.edui-colorpicker-adv{position:relative;overflow:hidden;height:180px;display:none}.edui-colorpicker-hue,.edui-colorpicker-plant{border:1px solid #666}.edui-colorpicker-pad{width:150px;height:150px;left:14px;top:13px;position:absolute;background:red;overflow:hidden;cursor:crosshair}.edui-colorpicker-cover{position:absolute;top:0;left:0;width:150px;height:150px;background:url(../images/tangram-colorpicker.png) -160px -200px}.edui-colorpicker-padDot{position:absolute;top:0;left:0;width:11px;height:11px;overflow:hidden;background:url(../images/tangram-colorpicker.png) 0 -200px repeat-x;z-index:1000}.edui-colorpicker-sliderMain{position:absolute;left:171px;top:13px;width:19px;height:152px;background:url(../images/tangram-colorpicker.png) -179px -12px no-repeat}.edui-colorpicker-slider{width:100%;height:100%;cursor:pointer}.edui-colorpicker-thumb{position:absolute;top:0;cursor:pointer;height:3px;left:-1px;right:-1px;border:1px solid #000;background:#fff;opacity:.8}.edui-default .edui-autotypesetpicker .edui-autotypesetpicker-body{font-size:12px;margin-bottom:3px;clear:both}.edui-default .edui-autotypesetpicker-body table{border-collapse:separate;border-spacing:2px}.edui-default .edui-autotypesetpicker-body td{font-size:12px;word-wrap:break-word}.edui-default .edui-autotypesetpicker-body td input{margin:3px 3px 3px 4px;*margin:1px 0 0}.edui-default .edui-cellalignpicker .edui-cellalignpicker-body{width:70px;font-size:12px;cursor:default}.edui-default .edui-cellalignpicker-body table{border-collapse:separate;border-spacing:0}.edui-default .edui-cellalignpicker-body td{padding:1px}.edui-default .edui-cellalignpicker-body .edui-icon{height:20px;width:20px;padding:1px;background-image:url(../images/table-cell-align.png)}.edui-default .edui-cellalignpicker-body .edui-left{background-position:0 0}.edui-default .edui-cellalignpicker-body .edui-center{background-position:-25px 0}.edui-default .edui-cellalignpicker-body .edui-right{background-position:-51px 0}.edui-default .edui-cellalignpicker-body td.edui-state-hover .edui-left{background-position:-73px 0}.edui-default .edui-cellalignpicker-body td.edui-state-hover .edui-center{background-position:-98px 0}.edui-default .edui-cellalignpicker-body td.edui-state-hover .edui-right{background-position:-124px 0}.edui-default .edui-cellalignpicker-body td.edui-cellalign-selected .edui-left{background-position:-146px 0;background-color:#f1f4f5}.edui-default .edui-cellalignpicker-body td.edui-cellalign-selected .edui-center{background-position:-245px 0}.edui-default .edui-cellalignpicker-body td.edui-cellalign-selected .edui-right{background-position:-271px 0}.edui-default .edui-toolbar .edui-separator{width:2px;height:20px;margin:2px 4px 2px 3px;background:url(../images/icons.png) -181px 0;background:url(../images/icons.gif) -181px 0\9}.edui-default .edui-toolbar .edui-colorbutton .edui-colorlump{position:absolute;overflow:hidden;bottom:1px;left:1px;width:18px;height:4px}.edui-default .edui-for-emotion .edui-icon{background-position:-60px -20px}.edui-default .edui-for-emotion .edui-popup-content iframe{width:514px;height:380px;overflow:hidden}.edui-default .edui-for-emotion .edui-popup-content{position:relative;z-index:555}.edui-default .edui-for-emotion .edui-splitborder{display:none}.edui-default .edui-for-emotion .edui-splitbutton-body .edui-arrow{width:0}.edui-default .edui-toolbar .edui-for-emotion .edui-state-active .edui-splitborder{border-left:1px solid transparent}.edui-default .edui-hassubmenu .edui-arrow{height:20px;width:20px;float:right;background:url(../images/icons-all.gif) 10px -233px no-repeat}.edui-default .edui-menu-body .edui-menuitem{padding:1px}.edui-default .edui-menuseparator{margin:2px 0;height:1px;overflow:hidden}.edui-default .edui-menuseparator-inner{border-bottom:1px solid #e2e3e3;margin-left:29px;margin-right:1px}.edui-default .edui-menu-body .edui-state-hover{padding:0!important;background-color:#fff5d4;border:1px solid #dcac6c}.edui-default .edui-shortcutmenu{padding:2px;width:190px;height:50px;background-color:#fff;border:1px solid #ccc;border-radius:5px}.edui-default .edui-wordpastepop .edui-popup-content{border:none;padding:0;width:54px;height:21px}.edui-default .edui-pasteicon{width:100%;height:100%;background-image:url(../images/wordpaste.png);background-position:0 0}.edui-default .edui-pasteicon.edui-state-opened{background-position:0 -34px}.edui-default .edui-pastecontainer{position:relative;visibility:hidden;width:97px;background:#fff;border:1px solid #ccc}.edui-default .edui-pastecontainer .edui-title{font-weight:700;background:#F8F8FF;height:25px;line-height:25px;font-size:12px;padding-left:5px}.edui-default .edui-pastecontainer .edui-button{overflow:hidden;margin:3px 0}.edui-default .edui-pastecontainer .edui-button .edui-plaintxticon,.edui-default .edui-pastecontainer .edui-button .edui-richtxticon,.edui-default .edui-pastecontainer .edui-button .edui-tagicon{float:left;cursor:pointer;width:29px;height:29px;margin-left:5px;background-image:url(../images/wordpaste.png);background-repeat:no-repeat}.edui-default .edui-pastecontainer .edui-button .edui-richtxticon{margin-left:0;background-position:-109px 0}.edui-default .edui-pastecontainer .edui-button .edui-tagicon{background-position:-148px 1px}.edui-default .edui-pastecontainer .edui-button .edui-plaintxticon{background-position:-72px 0}.edui-default .edui-pastecontainer .edui-button .edui-state-hover .edui-richtxticon{background-position:-109px -34px}.edui-default .edui-pastecontainer .edui-button .edui-state-hover .edui-tagicon{background-position:-148px -34px}.edui-default .edui-pastecontainer .edui-button .edui-state-hover .edui-plaintxticon{background-position:-72px -34px} \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/css/ueditor.min.css b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/css/ueditor.min.css new file mode 100644 index 0000000..836e8e3 --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/css/ueditor.min.css @@ -0,0 +1,6 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + /*! + * UEditor + * version: ueditor + * build: Wed Aug 10 2016 11:06:23 GMT+0800 (CST) + */.edui-combox-body,.edui-default .edui-button-body,.edui-menubutton-body,.edui-splitbutton-body,div.edui-box{position:relative}.edui-default .edui-box{border:0;padding:0;margin:0;overflow:hidden}.edui-default a.edui-box{display:block;text-decoration:none;color:#000}.edui-default a.edui-box:active,.edui-default a.edui-box:hover{text-decoration:none}.edui-default table.edui-box{border-collapse:collapse}.edui-default ul.edui-box{list-style-type:none}div.edui-box{display:-moz-inline-box!important;display:inline-block!important;vertical-align:top}.edui-default .edui-clearfix{zoom:1}.edui-default .edui-clearfix:after{content:'\20';display:block;clear:both}* html div.edui-box,:first-child+html div.edui-box{display:inline!important}.edui-default .edui-popup{position:absolute;-webkit-user-select:none;-moz-user-select:none}.edui-default .edui-popup .edui-shadow{position:absolute;z-index:-1}.edui-default .edui-popup .edui-bordereraser{position:absolute;overflow:hidden}.edui-default .edui-tablepicker .edui-canvas{position:relative}.edui-default .edui-tablepicker .edui-canvas .edui-overlay{position:absolute}.edui-default .edui-dialog-modalmask,.edui-dialog-dragmask{position:absolute;left:0;top:0;width:100%;height:100%}.edui-default .edui-label{cursor:default}.edui-default span.edui-clickable{color:#00f;cursor:pointer;text-decoration:underline}.edui-default span.edui-unclickable{color:gray;cursor:default}.edui-default .edui-toolbar{position:relative;cursor:default;-webkit-user-select:none;-moz-user-select:none;padding:1px;overflow:hidden;zoom:1;width:auto;height:auto}.edui-default .edui-toolbar .edui-button,.edui-default .edui-toolbar .edui-combox,.edui-default .edui-toolbar .edui-menubutton,.edui-default .edui-toolbar .edui-splitbutton{margin:1px}.edui-default .edui-editor{border:1px solid #d4d4d4;background-color:#fff;position:relative;overflow:visible;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.edui-editor div{width:auto;height:auto}.edui-default .edui-editor-toolbarbox{position:relative;zoom:1;-webkit-box-shadow:0 1px 4px rgba(204,204,204,.6);-moz-box-shadow:0 1px 4px rgba(204,204,204,.6);box-shadow:0 1px 4px rgba(204,204,204,.6);border-top-left-radius:2px;border-top-right-radius:2px}.edui-default .edui-editor-toolbarboxouter{border-bottom:1px solid #d4d4d4;background-color:#fafafa;background-image:-moz-linear-gradient(top,#fff,#f2f2f2);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#f2f2f2));background-image:-webkit-linear-gradient(top,#fff,#f2f2f2);background-image:-o-linear-gradient(top,#fff,#f2f2f2);background-image:linear-gradient(to bottom,#fff,#f2f2f2);background-repeat:repeat-x;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0);*zoom:1;-webkit-box-shadow:0 1px 4px rgba(0,0,0,.065);-moz-box-shadow:0 1px 4px rgba(0,0,0,.065);box-shadow:0 1px 4px rgba(0,0,0,.065)}.edui-default .edui-editor-toolbarboxinner{padding:2px}.edui-default .edui-editor-iframeholder{position:relative}.edui-default .edui-editor-bottomContainer{overflow:hidden}.edui-default .edui-editor-bottomContainer table{width:100%;height:0;overflow:hidden;border-spacing:0}.edui-default .edui-editor-bottomContainer td{white-space:nowrap;border-top:1px solid #ccc;line-height:20px;font-size:12px;font-family:Arial,Helvetica,Tahoma,Verdana,Sans-Serif}.edui-default .edui-editor-wordcount{text-align:right;margin-right:5px;color:#aaa}.edui-default .edui-editor-scale{width:12px}.edui-default .edui-editor-scale .edui-editor-icon{float:right;width:100%;height:12px;margin-top:10px;background:url(../images/scale.png) no-repeat;cursor:se-resize}.edui-default .edui-editor-breadcrumb{margin:2px 0 0 3px}.edui-default .edui-editor-breadcrumb span{cursor:pointer;text-decoration:underline;color:#00f}.edui-default .edui-toolbar .edui-for-fullscreen{float:right}.edui-default .edui-bubble .edui-popup-content{border:1px solid #DCAC6C;background-color:#fff6d9;padding:5px;font-size:10pt;font-family:"宋体"}.edui-default .edui-editor-toolbarmsg{background-color:#FFF6D9;border-bottom:1px solid #ccc;position:absolute;bottom:-25px;left:0;z-index:1009;width:99.9%}.edui-default .edui-editor-toolbarmsg-upload{font-size:14px;color:#00f;width:100px;height:16px;line-height:16px;cursor:pointer;position:absolute;top:5px;left:350px}.edui-default .edui-editor-toolbarmsg-label{font-size:12px;line-height:16px;padding:4px}.edui-default .edui-editor-toolbarmsg-close{float:right;width:20px;height:16px;line-height:16px;cursor:pointer;color:red}.edui-default .edui-list .edui-bordereraser{display:none}.edui-default .edui-listitem{padding:1px;white-space:nowrap}.edui-default .edui-list .edui-state-hover{position:relative;background-color:#fff5d4;border:1px solid #dcac6c;padding:0}.edui-default .edui-for-fontfamily .edui-listitem-label{min-width:130px;_width:120px;font-size:12px;height:22px;line-height:22px;padding-left:5px}.edui-default .edui-for-insertcode .edui-listitem-label{min-width:120px;_width:120px;font-size:12px;height:22px;line-height:22px;padding-left:5px}.edui-default .edui-for-underline .edui-listitem-label{min-width:120px;_width:120px;padding:3px 5px;font-size:12px}.edui-default .edui-for-fontsize .edui-listitem-label{min-width:120px;_width:120px;padding:3px 5px}.edui-default .edui-for-paragraph .edui-listitem-label{min-width:200px;_width:200px;padding:2px 5px}.edui-default .edui-for-lineheight .edui-listitem-label,.edui-default .edui-for-rowspacingbottom .edui-listitem-label,.edui-default .edui-for-rowspacingtop .edui-listitem-label{min-width:53px;_width:53px;padding:2px 5px}.edui-default .edui-for-customstyle .edui-listitem-label{min-width:200px;_width:200px;width:200px!important;padding:2px 5px}.edui-default .edui-menu{z-index:3000}.edui-default .edui-menu .edui-popup-content{padding:3px}.edui-default .edui-menu-body{_width:150px;min-width:170px;background:url(../images/sparator_v.png) 25px repeat-y}.edui-default .edui-menuitem{height:20px;cursor:default;vertical-align:top}.edui-default .edui-menuitem .edui-icon{width:20px!important;height:20px!important;background:url(../images/icons.png) 0 -4000px;background:url(../images/icons.gif) 0 -4000px\9}.edui-default .edui-menuitem .edui-label{font-size:12px;line-height:20px;height:20px;padding-left:10px}.edui-default .edui-state-checked .edui-menuitem-body{background:url(../images/icons-all.gif) 6px -205px no-repeat}.edui-default .edui-state-disabled .edui-menuitem-label{color:gray}.edui-default .edui-toolbar .edui-combox-body .edui-button-body{width:60px;font-size:12px;height:20px;line-height:20px;padding-left:5px;white-space:nowrap;margin:0 3px 0 0}.edui-default .edui-toolbar .edui-combox-body .edui-arrow{background:url(../images/icons.png) -741px 0;_background:url(../images/icons.gif) -741px 0;height:20px;width:9px;border-left:1px solid #CCC}.edui-default .edui-toolbar .edui-combox .edui-combox-body{border:1px solid #CCC;background-color:#fff;border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px}.edui-default .edui-toolbar .edui-combox-body .edui-splitborder{display:none}.edui-default .edui-toolbar .edui-state-hover .edui-combox-body{background-color:#fff5d4;border:1px solid #dcac6c}.edui-default .edui-toolbar .edui-state-hover .edui-combox-body .edui-arrow{border-left:1px solid #dcac6c}.edui-default .edui-toolbar .edui-state-checked .edui-combox-body{background-color:#FFE69F;border:1px solid #DCAC6C}.edui-toolbar .edui-state-checked .edui-combox-body .edui-arrow{border-left:1px solid #DCAC6C}.edui-toolbar .edui-state-disabled .edui-combox-body{background-color:#F0F0EE;opacity:.3;filter:alpha(opacity=30)}.edui-toolbar .edui-state-opened .edui-combox-body{background-color:#fff;border:1px solid gray}.edui-default .edui-toolbar .edui-button .edui-icon,.edui-default .edui-toolbar .edui-menubutton .edui-icon,.edui-default .edui-toolbar .edui-splitbutton .edui-icon{height:20px!important;width:20px!important;background-image:url(../images/icons.png);background-image:url(../images/icons.gif)\9}.edui-default .edui-toolbar .edui-button .edui-button-wrap{padding:1px;position:relative}.edui-default .edui-toolbar .edui-button .edui-state-hover .edui-button-wrap{background-color:#fff5d4;padding:0;border:1px solid #dcac6c}.edui-default .edui-toolbar .edui-button .edui-state-checked .edui-button-wrap{background-color:#ffe69f;padding:0;border:1px solid #dcac6c;border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px}.edui-default .edui-toolbar .edui-button .edui-state-active .edui-button-wrap{background-color:#fff;padding:0;border:1px solid gray}.edui-default .edui-toolbar .edui-state-disabled .edui-label{color:#ccc}.edui-default .edui-toolbar .edui-state-disabled .edui-icon{opacity:.3;filter:alpha(opacity=30)}.edui-default .edui-for-undo .edui-icon{background-position:-160px 0}.edui-default .edui-for-redo .edui-icon{background-position:-100px 0}.edui-default .edui-for-bold .edui-icon{background-position:0 0}.edui-default .edui-for-italic .edui-icon{background-position:-60px 0}.edui-default .edui-for-fontborder .edui-icon{background-position:-160px -40px}.edui-default .edui-for-underline .edui-icon{background-position:-140px 0}.edui-default .edui-for-strikethrough .edui-icon{background-position:-120px 0}.edui-default .edui-for-subscript .edui-icon{background-position:-600px 0}.edui-default .edui-for-superscript .edui-icon{background-position:-620px 0}.edui-default .edui-for-blockquote .edui-icon{background-position:-220px 0}.edui-default .edui-for-forecolor .edui-icon{background-position:-720px 0}.edui-default .edui-for-backcolor .edui-icon{background-position:-760px 0}.edui-default .edui-for-inserttable .edui-icon{background-position:-580px -20px}.edui-default .edui-for-autotypeset .edui-icon{background-position:-640px -40px}.edui-default .edui-for-justifyleft .edui-icon{background-position:-460px 0}.edui-default .edui-for-justifycenter .edui-icon{background-position:-420px 0}.edui-default .edui-for-justifyright .edui-icon{background-position:-480px 0}.edui-default .edui-for-justifyjustify .edui-icon{background-position:-440px 0}.edui-default .edui-for-insertorderedlist .edui-icon{background-position:-80px 0}.edui-default .edui-for-insertunorderedlist .edui-icon{background-position:-20px 0}.edui-default .edui-for-lineheight .edui-icon{background-position:-725px -40px}.edui-default .edui-for-rowspacingbottom .edui-icon{background-position:-745px -40px}.edui-default .edui-for-rowspacingtop .edui-icon{background-position:-765px -40px}.edui-default .edui-for-horizontal .edui-icon{background-position:-360px 0}.edui-default .edui-for-link .edui-icon{background-position:-500px 0}.edui-default .edui-for-code .edui-icon{background-position:-440px -40px}.edui-default .edui-for-insertimage .edui-icon{background-position:-726px -77px}.edui-default .edui-for-insertframe .edui-icon{background-position:-240px -40px}.edui-default .edui-for-emoticon .edui-icon{background-position:-60px -20px}.edui-default .edui-for-spechars .edui-icon{background-position:-240px 0}.edui-default .edui-for-help .edui-icon{background-position:-340px 0}.edui-default .edui-for-print .edui-icon{background-position:-440px -20px}.edui-default .edui-for-preview .edui-icon{background-position:-420px -20px}.edui-default .edui-for-selectall .edui-icon{background-position:-400px -20px}.edui-default .edui-for-searchreplace .edui-icon{background-position:-520px -20px}.edui-default .edui-for-map .edui-icon{background-position:-40px -40px}.edui-default .edui-for-gmap .edui-icon{background-position:-260px -40px}.edui-default .edui-for-insertvideo .edui-icon{background-position:-320px -20px}.edui-default .edui-for-time .edui-icon{background-position:-160px -20px}.edui-default .edui-for-date .edui-icon{background-position:-140px -20px}.edui-default .edui-for-cut .edui-icon{background-position:-680px 0}.edui-default .edui-for-copy .edui-icon{background-position:-700px 0}.edui-default .edui-for-paste .edui-icon{background-position:-560px 0}.edui-default .edui-for-formatmatch .edui-icon{background-position:-40px 0}.edui-default .edui-for-pasteplain .edui-icon{background-position:-360px -20px}.edui-default .edui-for-directionalityltr .edui-icon{background-position:-20px -20px}.edui-default .edui-for-directionalityrtl .edui-icon{background-position:-40px -20px}.edui-default .edui-for-source .edui-icon{background-position:-261px 0}.edui-default .edui-for-removeformat .edui-icon{background-position:-580px 0}.edui-default .edui-for-unlink .edui-icon{background-position:-640px 0}.edui-default .edui-for-touppercase .edui-icon{background-position:-786px 0}.edui-default .edui-for-tolowercase .edui-icon{background-position:-806px 0}.edui-default .edui-for-insertrow .edui-icon{background-position:-478px -76px}.edui-default .edui-for-insertrownext .edui-icon{background-position:-498px -76px}.edui-default .edui-for-insertcol .edui-icon{background-position:-455px -76px}.edui-default .edui-for-insertcolnext .edui-icon{background-position:-429px -76px}.edui-default .edui-for-mergeright .edui-icon{background-position:-60px -40px}.edui-default .edui-for-mergedown .edui-icon{background-position:-80px -40px}.edui-default .edui-for-splittorows .edui-icon{background-position:-100px -40px}.edui-default .edui-for-splittocols .edui-icon{background-position:-120px -40px}.edui-default .edui-for-insertparagraphbeforetable .edui-icon{background-position:-140px -40px}.edui-default .edui-for-deleterow .edui-icon{background-position:-660px -20px}.edui-default .edui-for-deletecol .edui-icon{background-position:-640px -20px}.edui-default .edui-for-splittocells .edui-icon{background-position:-800px -20px}.edui-default .edui-for-mergecells .edui-icon{background-position:-760px -20px}.edui-default .edui-for-deletetable .edui-icon{background-position:-620px -20px}.edui-default .edui-for-cleardoc .edui-icon{background-position:-520px 0}.edui-default .edui-for-fullscreen .edui-icon{background-position:-100px -20px}.edui-default .edui-for-anchor .edui-icon{background-position:-200px 0}.edui-default .edui-for-pagebreak .edui-icon{background-position:-460px -40px}.edui-default .edui-for-imagenone .edui-icon{background-position:-480px -40px}.edui-default .edui-for-imageleft .edui-icon{background-position:-500px -40px}.edui-default .edui-for-wordimage .edui-icon{background-position:-660px -40px}.edui-default .edui-for-imageright .edui-icon{background-position:-520px -40px}.edui-default .edui-for-imagecenter .edui-icon{background-position:-540px -40px}.edui-default .edui-for-indent .edui-icon{background-position:-400px 0}.edui-default .edui-for-outdent .edui-icon{background-position:-540px 0}.edui-default .edui-for-webapp .edui-icon{background-position:-601px -40px}.edui-default .edui-for-table .edui-icon{background-position:-580px -20px}.edui-default .edui-for-edittable .edui-icon{background-position:-420px -40px}.edui-default .edui-for-template .edui-icon{background-position:-339px -40px}.edui-default .edui-for-delete .edui-icon{background-position:-360px -40px}.edui-default .edui-for-attachment .edui-icon{background-position:-620px -40px}.edui-default .edui-for-edittd .edui-icon{background-position:-700px -40px}.edui-default .edui-for-snapscreen .edui-icon{background-position:-581px -40px}.edui-default .edui-for-scrawl .edui-icon{background-position:-801px -41px}.edui-default .edui-for-background .edui-icon{background-position:-680px -40px}.edui-default .edui-for-music .edui-icon{background-position:-18px -40px}.edui-default .edui-for-formula .edui-icon{background-position:-200px -40px}.edui-default .edui-for-aligntd .edui-icon{background-position:-236px -76px}.edui-default .edui-for-insertparagraphtrue .edui-icon{background-position:-625px -76px}.edui-default .edui-for-insertparagraph .edui-icon{background-position:-602px -76px}.edui-default .edui-for-insertcaption .edui-icon{background-position:-336px -76px}.edui-default .edui-for-deletecaption .edui-icon{background-position:-362px -76px}.edui-default .edui-for-inserttitle .edui-icon{background-position:-286px -76px}.edui-default .edui-for-deletetitle .edui-icon{background-position:-311px -76px}.edui-default .edui-for-aligntable .edui-icon{background-position:-440px 0}.edui-default .edui-for-tablealignment-left .edui-icon{background-position:-460px 0}.edui-default .edui-for-tablealignment-center .edui-icon{background-position:-420px 0}.edui-default .edui-for-tablealignment-right .edui-icon{background-position:-480px 0}.edui-default .edui-for-drafts .edui-icon{background-position:-560px 0}.edui-default .edui-for-charts .edui-icon{background:url(../images/charts.png) 2px 3px no-repeat!important}.edui-default .edui-for-inserttitlecol .edui-icon{background-position:-673px -76px}.edui-default .edui-for-deletetitlecol .edui-icon{background-position:-698px -76px}.edui-default .edui-for-simpleupload .edui-icon{background-position:-380px 0}.edui-default .edui-toolbar .edui-menubutton-body .edui-arrow,.edui-default .edui-toolbar .edui-splitbutton-body .edui-arrow{background:url(../images/icons.png) -741px 0;_background:url(../images/icons.gif) -741px 0;height:20px;width:9px}.edui-default .edui-toolbar .edui-menubutton .edui-menubutton-body,.edui-default .edui-toolbar .edui-splitbutton .edui-splitbutton-body{padding:1px}.edui-default .edui-toolbar .edui-splitborder{width:1px;height:20px}.edui-default .edui-toolbar .edui-state-hover .edui-splitborder{width:1px;border-left:0 solid #dcac6c}.edui-default .edui-toolbar .edui-state-active .edui-splitborder{width:0;border-left:1px solid gray}.edui-default .edui-toolbar .edui-state-opened .edui-splitborder{width:1px;border:0}.edui-default .edui-toolbar .edui-menubutton .edui-state-hover .edui-menubutton-body,.edui-default .edui-toolbar .edui-splitbutton .edui-state-hover .edui-splitbutton-body{background-color:#fff5d4;border:1px solid #dcac6c;padding:0}.edui-default .edui-toolbar .edui-menubutton .edui-state-checked .edui-menubutton-body,.edui-default .edui-toolbar .edui-splitbutton .edui-state-checked .edui-splitbutton-body{background-color:#FFE69F;border:1px solid #DCAC6C;padding:0}.edui-default .edui-toolbar .edui-menubutton .edui-state-active .edui-menubutton-body,.edui-default .edui-toolbar .edui-menubutton .edui-state-opened .edui-menubutton-body,.edui-default .edui-toolbar .edui-splitbutton .edui-state-active .edui-splitbutton-body,.edui-default .edui-toolbar .edui-splitbutton .edui-state-opened .edui-splitbutton-body{border:1px solid gray;background-color:#fff;padding:0}.edui-default .edui-state-disabled .edui-arrow{opacity:.3;_filter:alpha(opacity=30)}.edui-default .edui-for-insertorderedlist .edui-bordereraser,.edui-default .edui-for-insertunorderedlist .edui-bordereraser,.edui-default .edui-for-lineheight .edui-bordereraser,.edui-default .edui-for-rowspacingbottom .edui-bordereraser,.edui-default .edui-for-rowspacingtop .edui-bordereraser{background-color:#fff}.edui-default .edui-for-insertorderedlist .edui-popup-body .edui-icon,.edui-default .edui-for-insertunorderedlist .edui-popup-body .edui-icon,.edui-default .edui-for-lineheight .edui-popup-body .edui-icon,.edui-default .edui-for-rowspacingbottom .edui-popup-body .edui-icon,.edui-default .edui-for-rowspacingtop .edui-popup-body .edui-icon{background-image:none}.edui-default .edui-popup{z-index:3000;background-color:#fff;width:auto;height:auto}.edui-default .edui-popup .edui-shadow{left:0;top:0;width:100%;height:100%}.edui-default .edui-popup-content{border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);*border-right-width:2px;*border-bottom-width:2px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 4px rgba(0,0,0,.2);-moz-box-shadow:0 3px 4px rgba(0,0,0,.2);box-shadow:0 3px 4px rgba(0,0,0,.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;padding:5px;background:#fff}.edui-default .edui-popup .edui-bordereraser{background-color:#fff;height:3px}.edui-default .edui-menu .edui-bordereraser{height:3px}.edui-default .edui-anchor-topleft .edui-bordereraser{left:1px;top:-2px}.edui-default .edui-anchor-topright .edui-bordereraser{right:1px;top:-2px}.edui-default .edui-anchor-bottomleft .edui-bordereraser{left:0;bottom:-6px;height:7px;border-left:1px solid gray;border-right:1px solid gray}.edui-default .edui-anchor-bottomright .edui-bordereraser{right:0;bottom:-6px;height:7px;border-left:1px solid gray;border-right:1px solid gray}.edui-popup div{width:auto;height:auto}.edui-default .edui-editor-messageholder{display:block;width:150px;height:auto;border:0;margin:0;padding:0;position:absolute;top:28px;right:3px}.edui-default .edui-message{min-height:10px;text-shadow:0 1px 0 rgba(255,255,255,.5);padding:0;margin-bottom:3px;position:relative}.edui-default .edui-message-body{border-radius:3px;padding:8px 15px 8px 8px;color:#c09853;background-color:#fcf8e3;border:1px solid #fbeed5}.edui-default .edui-message-type-info{color:#3a87ad;background-color:#d9edf7;border-color:#bce8f1}.edui-default .edui-message-type-success{color:#468847;background-color:#dff0d8;border-color:#d6e9c6}.edui-default .edui-message-type-danger,.edui-default .edui-message-type-error{color:#b94a48;background-color:#f2dede;border-color:#eed3d7}.edui-default .edui-message .edui-message-closer{display:block;width:16px;height:16px;line-height:16px;position:absolute;top:0;right:0;padding:0;cursor:pointer;background:0 0;border:0;float:right;font-size:20px;font-weight:700;color:#999;text-shadow:0 1px 0 #fff;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}.edui-default .edui-message .edui-message-content{font-size:10pt;word-wrap:break-word;word-break:normal}.edui-default .edui-dialog{z-index:2000;position:absolute}.edui-dialog div{width:auto}.edui-default .edui-dialog-wrap{margin-right:6px;margin-bottom:6px}.edui-default .edui-dialog-fullscreen-flag{margin-right:0;margin-bottom:0}.edui-default .edui-dialog-body{position:relative;padding:2px 0 0 2px;_zoom:1}.edui-default .edui-dialog-fullscreen-flag .edui-dialog-body{padding:0}.edui-default .edui-dialog-shadow{position:absolute;z-index:-1;left:0;top:0;width:100%;height:100%;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);*border-right-width:2px;*border-bottom-width:2px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.edui-default .edui-dialog-foot{background-color:#fff}.edui-default .edui-dialog-titlebar{height:26px;border-bottom:1px solid #c6c6c6;background:url(../images/dialog-title-bg.png) bottom repeat-x;position:relative;cursor:move}.edui-default .edui-dialog-caption{font-weight:700;font-size:12px;line-height:26px;padding-left:5px}.edui-default .edui-dialog-draghandle{height:26px}.edui-default .edui-dialog-closebutton{position:absolute!important;right:5px;top:3px}.edui-default .edui-dialog-closebutton .edui-button-body{height:20px;width:20px;cursor:pointer;background:url(../images/icons-all.gif) 0 -59px no-repeat}.edui-default .edui-dialog-closebutton .edui-state-hover .edui-button-body{background:url(../images/icons-all.gif) 0 -89px no-repeat}.edui-default .edui-dialog-foot{height:40px}.edui-default .edui-dialog-buttons{position:absolute;right:0}.edui-default .edui-dialog-buttons .edui-button{margin-right:10px}.edui-default .edui-dialog-buttons .edui-button .edui-button-body{background:url(../images/icons-all.gif) no-repeat;height:24px;width:96px;font-size:12px;line-height:24px;text-align:center;cursor:default}.edui-default .edui-dialog-buttons .edui-button .edui-state-hover .edui-button-body{background:url(../images/icons-all.gif) 0 -30px no-repeat}.edui-default .edui-dialog iframe{border:0;padding:0;margin:0;vertical-align:top}.edui-default .edui-dialog-modalmask{opacity:.3;filter:alpha(opacity=30);background-color:#ccc;position:absolute}.edui-default .edui-dialog-dragmask{position:absolute;background-color:transparent;cursor:move}.edui-default .edui-dialog-content{position:relative}.edui-default .dialogcontmask{cursor:move;visibility:hidden;display:block;position:absolute;width:100%;height:100%;opacity:0;filter:alpha(opacity=0)}.edui-default .edui-for-link .edui-dialog-content{width:420px;height:200px;overflow:hidden}.edui-default .edui-for-background .edui-dialog-content{width:440px;height:280px;overflow:hidden}.edui-default .edui-for-template .edui-dialog-content{width:630px;height:390px;overflow:hidden}.edui-default .edui-for-scrawl .edui-dialog-content{width:515px;*width:506px;height:360px}.edui-default .edui-for-spechars .edui-dialog-content{width:620px;height:500px;*width:630px;*height:570px}.edui-default .edui-for-insertimage .edui-dialog-content{width:650px;height:400px;overflow:hidden}.edui-default .edui-for-webapp .edui-dialog-content{width:560px;_width:565px;height:450px;overflow:hidden}.edui-default .edui-for-insertframe .edui-dialog-content{width:350px;height:200px;overflow:hidden}.edui-default .edui-for-wordimage .edui-dialog-content{width:620px;height:380px;overflow:hidden}.edui-default .edui-for-attachment .edui-dialog-content{width:650px;height:400px;overflow:hidden}.edui-default .edui-for-gmap .edui-dialog-content,.edui-default .edui-for-map .edui-dialog-content{width:550px;height:400px}.edui-default .edui-for-insertvideo .edui-dialog-content{width:590px;height:390px}.edui-default .edui-for-anchor .edui-dialog-content{width:320px;height:60px;overflow:hidden}.edui-default .edui-for-searchreplace .edui-dialog-content{width:400px;height:220px}.edui-default .edui-for-help .edui-dialog-content{width:400px;height:420px}.edui-default .edui-for-edittable .edui-dialog-content{width:540px;_width:590px;height:335px}.edui-default .edui-for-edittip .edui-dialog-content{width:225px;height:60px}.edui-default .edui-for-edittd .edui-dialog-content{width:240px;height:50px}.edui-default .edui-for-snapscreen .edui-dialog-content{width:400px;height:220px}.edui-default .edui-for-music .edui-dialog-content{width:515px;height:360px}.edui-default .edui-for-paragraph .edui-listitem-label{font-family:Tahoma,Verdana,Arial,Helvetica}.edui-default .edui-for-paragraph .edui-listitem-label .edui-for-p{font-size:22px;line-height:27px}.edui-default .edui-for-paragraph .edui-listitem-label .edui-for-h1{font-weight:bolder;font-size:32px;line-height:36px}.edui-default .edui-for-paragraph .edui-listitem-label .edui-for-h2{font-weight:bolder;font-size:27px;line-height:29px}.edui-default .edui-for-paragraph .edui-listitem-label .edui-for-h3{font-weight:bolder;font-size:19px;line-height:23px}.edui-default .edui-for-paragraph .edui-listitem-label .edui-for-h4{font-weight:bolder;font-size:16px;line-height:19px}.edui-default .edui-for-paragraph .edui-listitem-label .edui-for-h5{font-weight:bolder;font-size:13px;line-height:16px}.edui-default .edui-for-paragraph .edui-listitem-label .edui-for-h6{font-weight:bolder;font-size:12px;line-height:14px}.edui-default .edui-for-inserttable .edui-splitborder{display:none}.edui-default .edui-for-inserttable .edui-splitbutton-body .edui-arrow{width:0}.edui-default .edui-toolbar .edui-for-inserttable .edui-state-active .edui-splitborder{border-left:1px solid transparent}.edui-default .edui-tablepicker .edui-infoarea{height:14px;line-height:14px;font-size:12px;width:220px;margin-bottom:3px;clear:both}.edui-default .edui-tablepicker .edui-infoarea .edui-label{float:left}.edui-default .edui-dialog-buttons .edui-label{line-height:24px}.edui-default .edui-tablepicker .edui-infoarea .edui-clickable{float:right}.edui-default .edui-tablepicker .edui-pickarea{background:url(../images/unhighlighted.gif);height:220px;width:220px}.edui-default .edui-tablepicker .edui-pickarea .edui-overlay{background:url(../images/highlighted.gif)}.edui-default .edui-colorpicker-topbar{height:27px;width:200px}.edui-default .edui-colorpicker-preview{height:20px;border:1px inset #000;margin-left:1px;width:128px;float:left}.edui-default .edui-colorpicker-nocolor{float:right;margin-right:1px;font-size:12px;line-height:14px;height:14px;border:1px solid #333;padding:3px 5px;cursor:pointer}.edui-default .edui-colorpicker-tablefirstrow{height:30px}.edui-default .edui-colorpicker-colorcell{width:14px;height:14px;display:block;margin:0;cursor:pointer}.edui-default .edui-colorpicker-colorcell:hover{width:14px;height:14px;margin:0}.edui-default .edui-colorpicker-advbtn{display:block;text-align:center;cursor:pointer;height:20px}.arrow_down{background:url(../images/arrow_down.png) center no-repeat #fff}.arrow_up{background:url(../images/arrow_up.png) center no-repeat #fff}.edui-colorpicker-adv{position:relative;overflow:hidden;height:180px;display:none}.edui-colorpicker-hue,.edui-colorpicker-plant{border:1px solid #666}.edui-colorpicker-pad{width:150px;height:150px;left:14px;top:13px;position:absolute;background:red;overflow:hidden;cursor:crosshair}.edui-colorpicker-cover{position:absolute;top:0;left:0;width:150px;height:150px;background:url(../images/tangram-colorpicker.png) -160px -200px}.edui-colorpicker-padDot{position:absolute;top:0;left:0;width:11px;height:11px;overflow:hidden;background:url(../images/tangram-colorpicker.png) 0 -200px repeat-x;z-index:1000}.edui-colorpicker-sliderMain{position:absolute;left:171px;top:13px;width:19px;height:152px;background:url(../images/tangram-colorpicker.png) -179px -12px no-repeat}.edui-colorpicker-slider{width:100%;height:100%;cursor:pointer}.edui-colorpicker-thumb{position:absolute;top:0;cursor:pointer;height:3px;left:-1px;right:-1px;border:1px solid #000;background:#fff;opacity:.8}.edui-default .edui-autotypesetpicker .edui-autotypesetpicker-body{font-size:12px;margin-bottom:3px;clear:both}.edui-default .edui-autotypesetpicker-body table{border-collapse:separate;border-spacing:2px}.edui-default .edui-autotypesetpicker-body td{font-size:12px;word-wrap:break-word}.edui-default .edui-autotypesetpicker-body td input{margin:3px 3px 3px 4px;*margin:1px 0 0}.edui-default .edui-cellalignpicker .edui-cellalignpicker-body{width:70px;font-size:12px;cursor:default}.edui-default .edui-cellalignpicker-body table{border-collapse:separate;border-spacing:0}.edui-default .edui-cellalignpicker-body td{padding:1px}.edui-default .edui-cellalignpicker-body .edui-icon{height:20px;width:20px;padding:1px;background-image:url(../images/table-cell-align.png)}.edui-default .edui-cellalignpicker-body .edui-left{background-position:0 0}.edui-default .edui-cellalignpicker-body .edui-center{background-position:-25px 0}.edui-default .edui-cellalignpicker-body .edui-right{background-position:-51px 0}.edui-default .edui-cellalignpicker-body td.edui-state-hover .edui-left{background-position:-73px 0}.edui-default .edui-cellalignpicker-body td.edui-state-hover .edui-center{background-position:-98px 0}.edui-default .edui-cellalignpicker-body td.edui-state-hover .edui-right{background-position:-124px 0}.edui-default .edui-cellalignpicker-body td.edui-cellalign-selected .edui-left{background-position:-146px 0;background-color:#f1f4f5}.edui-default .edui-cellalignpicker-body td.edui-cellalign-selected .edui-center{background-position:-245px 0}.edui-default .edui-cellalignpicker-body td.edui-cellalign-selected .edui-right{background-position:-271px 0}.edui-default .edui-toolbar .edui-separator{width:2px;height:20px;margin:2px 4px 2px 3px;background:url(../images/icons.png) -181px 0;background:url(../images/icons.gif) -181px 0\9}.edui-default .edui-toolbar .edui-colorbutton .edui-colorlump{position:absolute;overflow:hidden;bottom:1px;left:1px;width:18px;height:4px}.edui-default .edui-for-emotion .edui-icon{background-position:-60px -20px}.edui-default .edui-for-emotion .edui-popup-content iframe{width:514px;height:380px;overflow:hidden}.edui-default .edui-for-emotion .edui-popup-content{position:relative;z-index:555}.edui-default .edui-for-emotion .edui-splitborder{display:none}.edui-default .edui-for-emotion .edui-splitbutton-body .edui-arrow{width:0}.edui-default .edui-toolbar .edui-for-emotion .edui-state-active .edui-splitborder{border-left:1px solid transparent}.edui-default .edui-hassubmenu .edui-arrow{height:20px;width:20px;float:right;background:url(../images/icons-all.gif) 10px -233px no-repeat}.edui-default .edui-menu-body .edui-menuitem{padding:1px}.edui-default .edui-menuseparator{margin:2px 0;height:1px;overflow:hidden}.edui-default .edui-menuseparator-inner{border-bottom:1px solid #e2e3e3;margin-left:29px;margin-right:1px}.edui-default .edui-menu-body .edui-state-hover{padding:0!important;background-color:#fff5d4;border:1px solid #dcac6c}.edui-default .edui-shortcutmenu{padding:2px;width:190px;height:50px;background-color:#fff;border:1px solid #ccc;border-radius:5px}.edui-default .edui-wordpastepop .edui-popup-content{border:0;padding:0;width:54px;height:21px}.edui-default .edui-pasteicon{width:100%;height:100%;background-image:url(../images/wordpaste.png);background-position:0 0}.edui-default .edui-pasteicon.edui-state-opened{background-position:0 -34px}.edui-default .edui-pastecontainer{position:relative;visibility:hidden;width:97px;background:#fff;border:1px solid #ccc}.edui-default .edui-pastecontainer .edui-title{font-weight:700;background:#F8F8FF;height:25px;line-height:25px;font-size:12px;padding-left:5px}.edui-default .edui-pastecontainer .edui-button{overflow:hidden;margin:3px 0}.edui-default .edui-pastecontainer .edui-button .edui-plaintxticon,.edui-default .edui-pastecontainer .edui-button .edui-richtxticon,.edui-default .edui-pastecontainer .edui-button .edui-tagicon{float:left;cursor:pointer;width:29px;height:29px;margin-left:5px;background-image:url(../images/wordpaste.png);background-repeat:no-repeat}.edui-default .edui-pastecontainer .edui-button .edui-richtxticon{margin-left:0;background-position:-109px 0}.edui-default .edui-pastecontainer .edui-button .edui-tagicon{background-position:-148px 1px}.edui-default .edui-pastecontainer .edui-button .edui-plaintxticon{background-position:-72px 0}.edui-default .edui-pastecontainer .edui-button .edui-state-hover .edui-richtxticon{background-position:-109px -34px}.edui-default .edui-pastecontainer .edui-button .edui-state-hover .edui-tagicon{background-position:-148px -34px}.edui-default .edui-pastecontainer .edui-button .edui-state-hover .edui-plaintxticon{background-position:-72px -34px} \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/dialogbase.css b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/dialogbase.css new file mode 100644 index 0000000..6a25686 --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/dialogbase.css @@ -0,0 +1,2 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + a.button,ins{text-decoration:none}.tabbody,.tabhead{position:relative}a,abbr,acronym,address,applet,b,big,blockquote,body,caption,center,cite,code,dd,del,dfn,div,dl,dt,em,fieldset,font,form,h1,h2,h3,h4,h5,h6,html,i,iframe,img,ins,kbd,label,legend,li,object,ol,p,pre,q,s,samp,small,span,strike,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,tt,u,ul,var{margin:0;padding:0;outline:0;font-size:100%}body{line-height:1;background-color:#fff;font:12px/1.5 sans-serif,"宋体","Arial Narrow",HELVETICA;color:#646464}ol,ul{list-style:none}blockquote,q{quotes:none}del{text-decoration:line-through}table{border-collapse:collapse;border-spacing:0}.tabhead{z-index:10}.tabhead span{display:inline-block;padding:0 5px;height:30px;border:1px solid #ccc;background:url(images/dialog-title-bg.png) repeat-x;text-align:center;line-height:30px;cursor:pointer;*margin-right:5px}.tabhead span.focus{height:31px;border-bottom:none;background:#fff}.tabbody{top:-1px;margin:0 auto;border:1px solid #ccc}a.button{display:block;text-align:center;line-height:24px;height:24px;width:95px;border:0;color:#838383;background:url(images/icons-all.gif) no-repeat}a.button:hover{background-position:0 -30px} \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/anchor.gif b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/anchor.gif new file mode 100644 index 0000000..5aa797b Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/anchor.gif differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/arrow.png b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/arrow.png new file mode 100644 index 0000000..d900886 Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/arrow.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/arrow_down.png b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/arrow_down.png new file mode 100644 index 0000000..e9257e8 Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/arrow_down.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/arrow_up.png b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/arrow_up.png new file mode 100644 index 0000000..74277af Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/arrow_up.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/button-bg.gif b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/button-bg.gif new file mode 100644 index 0000000..ec7fa2e Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/button-bg.gif differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/cancelbutton.gif b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/cancelbutton.gif new file mode 100644 index 0000000..df4bc2c Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/cancelbutton.gif differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/charts.png b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/charts.png new file mode 100644 index 0000000..713965c Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/charts.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/cursor_h.gif b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/cursor_h.gif new file mode 100644 index 0000000..d7c3e7e Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/cursor_h.gif differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/cursor_h.png b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/cursor_h.png new file mode 100644 index 0000000..2088fc2 Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/cursor_h.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/cursor_v.gif b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/cursor_v.gif new file mode 100644 index 0000000..bb508db Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/cursor_v.gif differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/cursor_v.png b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/cursor_v.png new file mode 100644 index 0000000..6f39ca3 Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/cursor_v.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/dialog-title-bg.png b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/dialog-title-bg.png new file mode 100644 index 0000000..f744f26 Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/dialog-title-bg.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/filescan.png b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/filescan.png new file mode 100644 index 0000000..1d27158 Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/filescan.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/highlighted.gif b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/highlighted.gif new file mode 100644 index 0000000..9272b49 Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/highlighted.gif differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/icons-all.gif b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/icons-all.gif new file mode 100644 index 0000000..21915e5 Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/icons-all.gif differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/icons.gif b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/icons.gif new file mode 100644 index 0000000..7abd30a Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/icons.gif differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/icons.png b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/icons.png new file mode 100644 index 0000000..c015e3a Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/icons.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/loaderror.png b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/loaderror.png new file mode 100644 index 0000000..35ff333 Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/loaderror.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/loading.gif b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/loading.gif new file mode 100644 index 0000000..b713e27 Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/loading.gif differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/lock.gif b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/lock.gif new file mode 100644 index 0000000..b4e6d78 Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/lock.gif differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/neweditor-tab-bg.png b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/neweditor-tab-bg.png new file mode 100644 index 0000000..8f398b0 Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/neweditor-tab-bg.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/pagebreak.gif b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/pagebreak.gif new file mode 100644 index 0000000..8d1cffd Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/pagebreak.gif differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/scale.png b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/scale.png new file mode 100644 index 0000000..f45adb5 Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/scale.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/sortable.png b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/sortable.png new file mode 100644 index 0000000..1bca649 Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/sortable.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/spacer.gif b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/spacer.gif new file mode 100644 index 0000000..5bfd67a Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/spacer.gif differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/sparator_v.png b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/sparator_v.png new file mode 100644 index 0000000..8cf5662 Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/sparator_v.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/table-cell-align.png b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/table-cell-align.png new file mode 100644 index 0000000..ddf4285 Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/table-cell-align.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/tangram-colorpicker.png b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/tangram-colorpicker.png new file mode 100644 index 0000000..738e500 Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/tangram-colorpicker.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/toolbar_bg.png b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/toolbar_bg.png new file mode 100644 index 0000000..7ab685f Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/toolbar_bg.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/unhighlighted.gif b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/unhighlighted.gif new file mode 100644 index 0000000..7ad0b67 Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/unhighlighted.gif differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/upload.png b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/upload.png new file mode 100644 index 0000000..08d4d92 Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/upload.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/videologo.gif b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/videologo.gif new file mode 100644 index 0000000..555af74 Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/videologo.gif differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/word.gif b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/word.gif new file mode 100644 index 0000000..9ef5d09 Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/word.gif differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/wordpaste.png b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/wordpaste.png new file mode 100644 index 0000000..9367758 Binary files /dev/null and b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/default/images/wordpaste.png differ diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/themes/iframe.css b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/iframe.css new file mode 100644 index 0000000..5686d3a --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/themes/iframe.css @@ -0,0 +1,2 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/SyntaxHighlighter/shCore.js b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/SyntaxHighlighter/shCore.js new file mode 100644 index 0000000..d32723f --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/SyntaxHighlighter/shCore.js @@ -0,0 +1,4 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + ;var XRegExp;if(XRegExp)throw Error("can't load XRegExp twice in the same frame");if(function(e){function t(e,t){if(!XRegExp.isRegExp(e))throw TypeError("type RegExp expected");var i=e._xregexp;return e=XRegExp(e.source,r(e)+(t||"")),i&&(e._xregexp={source:i.source,captureNames:i.captureNames?i.captureNames.slice(0):null}),e}function r(e){return(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.extended?"x":"")+(e.sticky?"y":"")}function i(e,t,r,i){var n,s,a,o=c.length;l=!0;try{for(;o--;)if(a=c[o],r&a.scope&&(!a.trigger||a.trigger.call(i))&&(a.pattern.lastIndex=t,s=a.pattern.exec(e),s&&s.index===t)){n={output:a.handler.call(i,s,r),match:s};break}}catch(g){throw g}finally{l=!1}return n}function n(e,t,r){if(Array.prototype.indexOf)return e.indexOf(t,r);for(var i=r||0;i-1},setFlag:function(e){n+=e}};m1&&n(i,"")>-1&&(a=RegExp(this.source,g.replace.call(r(this),"g","")),g.replace.call((t+"").slice(i.index),a,function(){for(var t=1;ti.index&&this.lastIndex--}return this.global||(this.lastIndex=o),i},RegExp.prototype.test=function(e){var t,r;return this.global||(r=this.lastIndex),t=g.exec.call(this,e),t&&!d&&this.global&&!t[0].length&&this.lastIndex>t.index&&this.lastIndex--,this.global||(this.lastIndex=r),!!t},String.prototype.match=function(e){if(XRegExp.isRegExp(e)||(e=RegExp(e)),e.global){var t=g.match.apply(this,arguments);return e.lastIndex=0,t}return e.exec(this)},String.prototype.replace=function(e,t){var r,i,a,o,l=XRegExp.isRegExp(e);return l?(e._xregexp&&(r=e._xregexp.captureNames),e.global||(o=e.lastIndex)):e+="","[object Function]"===Object.prototype.toString.call(t)?i=g.replace.call(this+"",e,function(){if(r){arguments[0]=new String(arguments[0]);for(var i=0;i-1?e[a+1]:t)}switch(i){case"$":return"$";case"&":return e[0];case"`":return e[e.length-1].slice(0,e[e.length-2]);case"'":return e[e.length-1].slice(e[e.length-2]+e[0].length);default:var o="";if(i=+i,!i)return t;for(;i>e.length-3;)o=String.prototype.slice.call(i,-1)+o,i=Math.floor(i/10);return(i?e[i]||"":"$")+o}})})),l&&(e.global?e.lastIndex=0:e.lastIndex=o),i},String.prototype.split=function(t,r){if(!XRegExp.isRegExp(t))return g.split.apply(this,arguments);var i,n,s=this+"",a=[],o=0;if(r===e||+r<0)r=1/0;else if(r=Math.floor(+r),!r)return[];for(t=XRegExp.copyAsGlobal(t);(i=t.exec(s))&&!(t.lastIndex>o&&(a.push(s.slice(o,i.index)),i.length>1&&i.index=r));)t.lastIndex===i.index&&t.lastIndex++;return o===s.length?g.test.call(t,"")&&!n||a.push(""):a.push(s.slice(o)),a.length>r?a.slice(0,r):a},XRegExp.addToken(/\(\?#[^)]*\)/,function(e){return g.test.call(o,e.input.slice(e.index+e[0].length))?"":"(?:)"}),XRegExp.addToken(/\((?!\?)/,function(){return this.captureNames.push(null),"("}),XRegExp.addToken(/\(\?<([$\w]+)>/,function(e){return this.captureNames.push(e[1]),this.hasNamedCapture=!0,"("}),XRegExp.addToken(/\\k<([\w$]+)>/,function(e){var t=n(this.captureNames,e[1]);return t>-1?"\\"+(t+1)+(isNaN(e.input.charAt(e.index+e[0].length))?"":"(?:)"):e[0]}),XRegExp.addToken(/\[\^?]/,function(e){return"[]"===e[0]?"\\b\\B":"[\\s\\S]"}),XRegExp.addToken(/^\(\?([imsx]+)\)/,function(e){return this.setFlag(e[1]),""}),XRegExp.addToken(/(?:\s+|#.*)+/,function(e){return g.test.call(o,e.input.slice(e.index+e[0].length))?"":"(?:)"},XRegExp.OUTSIDE_CLASS,function(){return this.hasFlag("x")}),XRegExp.addToken(/\./,function(){return"[\\s\\S]"},XRegExp.OUTSIDE_CLASS,function(){return this.hasFlag("s")})}(),"undefined"==typeof SyntaxHighlighter)var SyntaxHighlighter=function(){function e(e,t){return e.className.indexOf(t)!=-1}function t(t,r){e(t,r)||(t.className+=" "+r)}function r(e,t){e.className=e.className.replace(t,"")}function i(e){for(var t=[],r=0;r(.*?))\\]$"),n=new XRegExp("(?[\\w-]+)\\s*:\\s*(?[\\w-%#]+|\\[.*?\\]|\".*?\"|'.*?')\\s*;?","g");null!=(t=n.exec(e));){var s=t.value.replace(/^['"]|['"]$/g,"");if(null!=s&&i.test(s)){var a=i.exec(s);s=a.values.length>0?a.values.split(/\s*,\s*/):[]}r[t.name]=s}return r}function v(e,t){return null==e||0==e.length||"\n"==e?e:(e=e.replace(/'+e+""})),e)}function H(e,t){for(var r=e.toString();r.length|<br\s*\/?>/gi;return 1==D.config.bloggerMode&&(e=e.replace(t,"\n")),1==D.config.stripBrs&&(e=e.replace(t,"")),e}function E(e){return e.replace(/^\s+|\s+$/g,"")}function C(e){for(var t=n(R(e)),r=(new Array,/^\s*/),i=1e3,s=0;s0;s++){var a=t[s];if(0!=E(a).length){var o=r.exec(a);if(null==o)return e;i=Math.min(o[0].length,i)}}if(i>0)for(var s=0;st.index?1:e.lengtht.length?1:0}function I(e,t){function r(e,t){return e[0]}for(var i=null,n=[],s=t.func?t.func:r;null!=(i=t.regex.exec(e));){var a=s(i,t);"string"==typeof a&&(a=[new D.Match(a,i.index,t.css)]),n=n.concat(a)}return n}function T(e){var t=/(.*)((>|<).*)/;return e.replace(D.regexLib.url,function(e){var r="",i=null;return(i=t.exec(e))&&(e=i[1],r=i[2]),''+e+""+r})}function N(){for(var e=document.getElementsByTagName("script"),t=[],r=0;r)/gm,url:/\w+:\/\/[\w-.\/?%&=:@;#]*/g,phpScriptTags:{left:/(<|<)\?(?:=|php)?/g,right:/\?(>|>)/g,eof:!0},aspScriptTags:{left:/(<|<)%=?/g,right:/%(>|>)/g},scriptScriptTags:{left:/(<|<)\s*script.*?(>|>)/gi,right:/(<|<)\/\s*script\s*(>|>)/gi}},toolbar:{getHtml:function(e){function t(e,t){return D.toolbar.getButtonHtml(e,t,D.config.strings[t])}for(var r='
            ',i=D.toolbar.items,n=i.list,s=0;s'+r+""},handler:function(e){function t(e){var t=new RegExp(e+"_(\\w+)"),r=t.exec(i);return r?r[1]:null}var r=e.target,i=r.className||"",n=a(g(r,".syntaxhighlighter").id),s=t("command");n&&s&&D.toolbar.items[s].execute(n),e.preventDefault()},items:{list:["expandSource","help"],expandSource:{getHtml:function(e){if(1!=e.getParam("collapse"))return"";var t=e.getParam("title");return D.toolbar.getButtonHtml(e,"expandSource",t?t:D.config.strings.expandSource)},execute:function(e){var t=o(e.id);r(t,"collapsed")}},help:{execute:function(e){var t=f("","_blank",500,250,"scrollbars=0"),r=t.document;r.write(D.config.strings.aboutDialog),r.close(),t.focus()}}}},findElements:function(e,t){var r=t?[t]:i(document.getElementsByTagName(D.config.tagName)),n=D.config,s=[];if(n.useScriptTags&&(r=r.concat(N())),0===r.length)return s;for(var a=0;ai)break;s.index==r.index&&s.length>r.length?e[t]=null:s.index>=r.index&&s.index'+r+"
            "},getLineNumbersHtml:function(e,t){var r="",i=n(e).length,s=parseInt(this.getParam("first-line")),a=this.getParam("pad-line-numbers");1==a?a=(s+i-1).toString().length:1==isNaN(a)&&(a=0);for(var o=0;o'+c+"":"")+o)}return e},getTitleHtml:function(e){return e?""+e+"":""},getMatchesHtml:function(e,t){function r(e){var t=e?e.brushName||s:s;return t?t+" ":""}for(var i=0,n="",s=this.getParam("brush",""),a=0;a'+(this.getParam("toolbar")?D.toolbar.getHtml(this):"")+''+this.getTitleHtml(this.getParam("title"))+""+(gutter?'":"")+'
            '+this.getLineNumbersHtml(e)+"
            '+n+"
            "},getDiv:function(e){null===e&&(e=""),this.code=e;var t=this.create("div");return t.innerHTML=this.getHtml(e),this.getParam("toolbar")&&m(c(t,".toolbar"),"click",D.toolbar.handler),this.getParam("quick-code")&&m(c(t,".code"),"dblclick",A),t},init:function(e){this.id=d(),l(this),this.params=h(D.defaults,e||{}),1==this.getParam("light")&&(this.params.toolbar=this.params.gutter=!1)},getKeywords:function(e){return e=e.replace(/^\s+|\s+$/g,"").replace(/\s+/g,"|"),"\\b(?:"+e+")\\b"},forHtmlScript:function(e){var t={end:e.right.source};e.eof&&(t.end="(?:(?:"+t.end+")|$)"),this.htmlScript={left:{regex:e.left,css:"script"},right:{regex:e.right,css:"script"},code:new XRegExp("(?"+e.left.source+")(?.*?)(?"+t.end+")","sgi")}}},D}();"undefined"!=typeof exports?exports.SyntaxHighlighter=SyntaxHighlighter:null,function(){function e(){var e="class interface function package",t="-Infinity ...rest Array as AS3 Boolean break case catch const continue Date decodeURI decodeURIComponent default delete do dynamic each else encodeURI encodeURIComponent escape extends false final finally flash_proxy for get if implements import in include Infinity instanceof int internal is isFinite isNaN isXMLName label namespace NaN native new null Null Number Object object_proxy override parseFloat parseInt private protected public return set static String super switch this throw true try typeof uint undefined unescape use void while with";this.regexList=[{regex:SyntaxHighlighter.regexLib.singleLineCComments,css:"comments"},{regex:SyntaxHighlighter.regexLib.multiLineCComments,css:"comments"},{regex:SyntaxHighlighter.regexLib.doubleQuotedString,css:"string"},{regex:SyntaxHighlighter.regexLib.singleQuotedString,css:"string"},{regex:/\b([\d]+(\.[\d]+)?|0x[a-f0-9]+)\b/gi,css:"value"},{regex:new RegExp(this.getKeywords(e),"gm"),css:"color3"},{regex:new RegExp(this.getKeywords(t),"gm"),css:"keyword"},{regex:new RegExp("var","gm"),css:"variable"},{regex:new RegExp("trace","gm"),css:"color1"}],this.forHtmlScript(SyntaxHighlighter.regexLib.scriptScriptTags)}SyntaxHighlighter=SyntaxHighlighter||("undefined"!=typeof require?require("shCore").SyntaxHighlighter:null),e.prototype=new SyntaxHighlighter.Highlighter,e.aliases=["actionscript3","as3"],SyntaxHighlighter.brushes.AS3=e,"undefined"!=typeof exports?exports.Brush=e:null}(),function(){function e(){var e="after before beginning continue copy each end every from return get global in local named of set some that the then times to where whose with without",t="first second third fourth fifth sixth seventh eighth ninth tenth last front back middle",r="activate add alias AppleScript ask attachment boolean class constant delete duplicate empty exists false id integer list make message modal modified new no paragraph pi properties quit real record remove rest result reveal reverse run running save string true word yes";this.regexList=[{regex:/(--|#).*$/gm,css:"comments"},{regex:/\(\*(?:[\s\S]*?\(\*[\s\S]*?\*\))*[\s\S]*?\*\)/gm,css:"comments"},{regex:/"[\s\S]*?"/gm,css:"string"},{regex:/(?:,|:|¬|'s\b|\(|\)|\{|\}|«|\b\w*»)/g,css:"color1"},{regex:/(-)?(\d)+(\.(\d)?)?(E\+(\d)+)?/g,css:"color1"},{regex:/(?:&(amp;|gt;|lt;)?|=|� |>|<|≥|>=|≤|<=|\*|\+|-|\/|÷|\^)/g,css:"color2"},{regex:/\b(?:and|as|div|mod|not|or|return(?!\s&)(ing)?|equals|(is(n't| not)? )?equal( to)?|does(n't| not) equal|(is(n't| not)? )?(greater|less) than( or equal( to)?)?|(comes|does(n't| not) come) (after|before)|is(n't| not)?( in)? (back|front) of|is(n't| not)? behind|is(n't| not)?( (in|contained by))?|does(n't| not) contain|contain(s)?|(start|begin|end)(s)? with|((but|end) )?(consider|ignor)ing|prop(erty)?|(a )?ref(erence)?( to)?|repeat (until|while|with)|((end|exit) )?repeat|((else|end) )?if|else|(end )?(script|tell|try)|(on )?error|(put )?into|(of )?(it|me)|its|my|with (timeout( of)?|transaction)|end (timeout|transaction))\b/g,css:"keyword"},{regex:/\b\d+(st|nd|rd|th)\b/g,css:"keyword"},{regex:/\b(?:about|above|against|around|at|below|beneath|beside|between|by|(apart|aside) from|(instead|out) of|into|on(to)?|over|since|thr(ough|u)|under)\b/g,css:"color3"},{regex:/\b(?:adding folder items to|after receiving|choose( ((remote )?application|color|folder|from list|URL))?|clipboard info|set the clipboard to|(the )?clipboard|entire contents|display(ing| (alert|dialog|mode))?|document( (edited|file|nib name))?|file( (name|type))?|(info )?for|giving up after|(name )?extension|quoted form|return(ed)?|second(?! item)(s)?|list (disks|folder)|text item(s| delimiters)?|(Unicode )?text|(disk )?item(s)?|((current|list) )?view|((container|key) )?window|with (data|icon( (caution|note|stop))?|parameter(s)?|prompt|properties|seed|title)|case|diacriticals|hyphens|numeric strings|punctuation|white space|folder creation|application(s( folder)?| (processes|scripts position|support))?|((desktop )?(pictures )?|(documents|downloads|favorites|home|keychain|library|movies|music|public|scripts|sites|system|users|utilities|workflows) )folder|desktop|Folder Action scripts|font(s| panel)?|help|internet plugins|modem scripts|(system )?preferences|printer descriptions|scripting (additions|components)|shared (documents|libraries)|startup (disk|items)|temporary items|trash|on server|in AppleTalk zone|((as|long|short) )?user name|user (ID|locale)|(with )?password|in (bundle( with identifier)?|directory)|(close|open for) access|read|write( permission)?|(g|s)et eof|using( delimiters)?|starting at|default (answer|button|color|country code|entr(y|ies)|identifiers|items|name|location|script editor)|hidden( answer)?|open(ed| (location|untitled))?|error (handling|reporting)|(do( shell)?|load|run|store) script|administrator privileges|altering line endings|get volume settings|(alert|boot|input|mount|output|set) volume|output muted|(fax|random )?number|round(ing)?|up|down|toward zero|to nearest|as taught in school|system (attribute|info)|((AppleScript( Studio)?|system) )?version|(home )?directory|(IPv4|primary Ethernet) address|CPU (type|speed)|physical memory|time (stamp|to GMT)|replacing|ASCII (character|number)|localized string|from table|offset|summarize|beep|delay|say|(empty|multiple) selections allowed|(of|preferred) type|invisibles|showing( package contents)?|editable URL|(File|FTP|News|Media|Web) [Ss]ervers|Telnet hosts|Directory services|Remote applications|waiting until completion|saving( (in|to))?|path (for|to( (((current|frontmost) )?application|resource))?)|POSIX (file|path)|(background|RGB) color|(OK|cancel) button name|cancel button|button(s)?|cubic ((centi)?met(re|er)s|yards|feet|inches)|square ((kilo)?met(re|er)s|miles|yards|feet)|(centi|kilo)?met(re|er)s|miles|yards|feet|inches|lit(re|er)s|gallons|quarts|(kilo)?grams|ounces|pounds|degrees (Celsius|Fahrenheit|Kelvin)|print( (dialog|settings))?|clos(e(able)?|ing)|(de)?miniaturized|miniaturizable|zoom(ed|able)|attribute run|action (method|property|title)|phone|email|((start|end)ing|home) page|((birth|creation|current|custom|modification) )?date|((((phonetic )?(first|last|middle))|computer|host|maiden|related) |nick)?name|aim|icq|jabber|msn|yahoo|address(es)?|save addressbook|should enable action|city|country( code)?|formatte(r|d address)|(palette )?label|state|street|zip|AIM [Hh]andle(s)?|my card|select(ion| all)?|unsaved|(alpha )?value|entr(y|ies)|group|(ICQ|Jabber|MSN) handle|person|people|company|department|icon image|job title|note|organization|suffix|vcard|url|copies|collating|pages (across|down)|request print time|target( printer)?|((GUI Scripting|Script menu) )?enabled|show Computer scripts|(de)?activated|awake from nib|became (key|main)|call method|of (class|object)|center|clicked toolbar item|closed|for document|exposed|(can )?hide|idle|keyboard (down|up)|event( (number|type))?|launch(ed)?|load (image|movie|nib|sound)|owner|log|mouse (down|dragged|entered|exited|moved|up)|move|column|localization|resource|script|register|drag (info|types)|resigned (active|key|main)|resiz(e(d)?|able)|right mouse (down|dragged|up)|scroll wheel|(at )?index|should (close|open( untitled)?|quit( after last window closed)?|zoom)|((proposed|screen) )?bounds|show(n)?|behind|in front of|size (mode|to fit)|update(d| toolbar item)?|was (hidden|miniaturized)|will (become active|close|finish launching|hide|miniaturize|move|open|quit|(resign )?active|((maximum|minimum|proposed) )?size|show|zoom)|bundle|data source|movie|pasteboard|sound|tool(bar| tip)|(color|open|save) panel|coordinate system|frontmost|main( (bundle|menu|window))?|((services|(excluded from )?windows) )?menu|((executable|frameworks|resource|scripts|shared (frameworks|support)) )?path|(selected item )?identifier|data|content(s| view)?|character(s)?|click count|(command|control|option|shift) key down|context|delta (x|y|z)|key( code)?|location|pressure|unmodified characters|types|(first )?responder|playing|(allowed|selectable) identifiers|allows customization|(auto saves )?configuration|visible|image( name)?|menu form representation|tag|user(-| )defaults|associated file name|(auto|needs) display|current field editor|floating|has (resize indicator|shadow)|hides when deactivated|level|minimized (image|title)|opaque|position|release when closed|sheet|title(d)?)\b/g,css:"color3"},{regex:new RegExp(this.getKeywords(r),"gm"),css:"color3"},{regex:new RegExp(this.getKeywords(e),"gm"),css:"keyword"},{regex:new RegExp(this.getKeywords(t),"gm"),css:"keyword"}]}SyntaxHighlighter=SyntaxHighlighter||("undefined"!=typeof require?require("shCore").SyntaxHighlighter:null),e.prototype=new SyntaxHighlighter.Highlighter,e.aliases=["applescript"],SyntaxHighlighter.brushes.AppleScript=e,"undefined"!=typeof exports?exports.Brush=e:null}(),function(){function e(){var e="if fi then elif else for do done until while break continue case esac function return in eq ne ge le",t="alias apropos awk basename bash bc bg builtin bzip2 cal cat cd cfdisk chgrp chmod chown chrootcksum clear cmp comm command cp cron crontab csplit cut date dc dd ddrescue declare df diff diff3 dig dir dircolors dirname dirs du echo egrep eject enable env ethtool eval exec exit expand export expr false fdformat fdisk fg fgrep file find fmt fold format free fsck ftp gawk getopts grep groups gzip hash head history hostname id ifconfig import install join kill less let ln local locate logname logout look lpc lpr lprint lprintd lprintq lprm ls lsof make man mkdir mkfifo mkisofs mknod more mount mtools mv netstat nice nl nohup nslookup open op passwd paste pathchk ping popd pr printcap printenv printf ps pushd pwd quota quotacheck quotactl ram rcp read readonly renice remsync rm rmdir rsync screen scp sdiff sed select seq set sftp shift shopt shutdown sleep sort source split ssh strace su sudo sum symlink sync tail tar tee test time times touch top traceroute trap tr true tsort tty type ulimit umask umount unalias uname unexpand uniq units unset unshar useradd usermod users uuencode uudecode v vdir vi watch wc whereis which who whoami Wget xargs yes";this.regexList=[{regex:/^#!.*$/gm,css:"preprocessor bold"},{regex:/\/[\w-\/]+/gm,css:"plain"},{regex:SyntaxHighlighter.regexLib.singleLinePerlComments,css:"comments"},{regex:SyntaxHighlighter.regexLib.doubleQuotedString,css:"string"},{regex:SyntaxHighlighter.regexLib.singleQuotedString,css:"string"},{regex:new RegExp(this.getKeywords(e),"gm"),css:"keyword"},{regex:new RegExp(this.getKeywords(t),"gm"),css:"functions"}]}SyntaxHighlighter=SyntaxHighlighter||("undefined"!=typeof require?require("shCore").SyntaxHighlighter:null),e.prototype=new SyntaxHighlighter.Highlighter,e.aliases=["bash","shell","sh"],SyntaxHighlighter.brushes.Bash=e,"undefined"!=typeof exports?exports.Brush=e:null}(),function(){function e(){var e="Abs ACos AddSOAPRequestHeader AddSOAPResponseHeader AjaxLink AjaxOnLoad ArrayAppend ArrayAvg ArrayClear ArrayDeleteAt ArrayInsertAt ArrayIsDefined ArrayIsEmpty ArrayLen ArrayMax ArrayMin ArraySet ArraySort ArraySum ArraySwap ArrayToList Asc ASin Atn BinaryDecode BinaryEncode BitAnd BitMaskClear BitMaskRead BitMaskSet BitNot BitOr BitSHLN BitSHRN BitXor Ceiling CharsetDecode CharsetEncode Chr CJustify Compare CompareNoCase Cos CreateDate CreateDateTime CreateObject CreateODBCDate CreateODBCDateTime CreateODBCTime CreateTime CreateTimeSpan CreateUUID DateAdd DateCompare DateConvert DateDiff DateFormat DatePart Day DayOfWeek DayOfWeekAsString DayOfYear DaysInMonth DaysInYear DE DecimalFormat DecrementValue Decrypt DecryptBinary DeleteClientVariable DeserializeJSON DirectoryExists DollarFormat DotNetToCFType Duplicate Encrypt EncryptBinary Evaluate Exp ExpandPath FileClose FileCopy FileDelete FileExists FileIsEOF FileMove FileOpen FileRead FileReadBinary FileReadLine FileSetAccessMode FileSetAttribute FileSetLastModified FileWrite Find FindNoCase FindOneOf FirstDayOfMonth Fix FormatBaseN GenerateSecretKey GetAuthUser GetBaseTagData GetBaseTagList GetBaseTemplatePath GetClientVariablesList GetComponentMetaData GetContextRoot GetCurrentTemplatePath GetDirectoryFromPath GetEncoding GetException GetFileFromPath GetFileInfo GetFunctionList GetGatewayHelper GetHttpRequestData GetHttpTimeString GetK2ServerDocCount GetK2ServerDocCountLimit GetLocale GetLocaleDisplayName GetLocalHostIP GetMetaData GetMetricData GetPageContext GetPrinterInfo GetProfileSections GetProfileString GetReadableImageFormats GetSOAPRequest GetSOAPRequestHeader GetSOAPResponse GetSOAPResponseHeader GetTempDirectory GetTempFile GetTemplatePath GetTickCount GetTimeZoneInfo GetToken GetUserRoles GetWriteableImageFormats Hash Hour HTMLCodeFormat HTMLEditFormat IIf ImageAddBorder ImageBlur ImageClearRect ImageCopy ImageCrop ImageDrawArc ImageDrawBeveledRect ImageDrawCubicCurve ImageDrawLine ImageDrawLines ImageDrawOval ImageDrawPoint ImageDrawQuadraticCurve ImageDrawRect ImageDrawRoundRect ImageDrawText ImageFlip ImageGetBlob ImageGetBufferedImage ImageGetEXIFTag ImageGetHeight ImageGetIPTCTag ImageGetWidth ImageGrayscale ImageInfo ImageNegative ImageNew ImageOverlay ImagePaste ImageRead ImageReadBase64 ImageResize ImageRotate ImageRotateDrawingAxis ImageScaleToFit ImageSetAntialiasing ImageSetBackgroundColor ImageSetDrawingColor ImageSetDrawingStroke ImageSetDrawingTransparency ImageSharpen ImageShear ImageShearDrawingAxis ImageTranslate ImageTranslateDrawingAxis ImageWrite ImageWriteBase64 ImageXORDrawingMode IncrementValue InputBaseN Insert Int IsArray IsBinary IsBoolean IsCustomFunction IsDate IsDDX IsDebugMode IsDefined IsImage IsImageFile IsInstanceOf IsJSON IsLeapYear IsLocalHost IsNumeric IsNumericDate IsObject IsPDFFile IsPDFObject IsQuery IsSimpleValue IsSOAPRequest IsStruct IsUserInAnyRole IsUserInRole IsUserLoggedIn IsValid IsWDDX IsXML IsXmlAttribute IsXmlDoc IsXmlElem IsXmlNode IsXmlRoot JavaCast JSStringFormat LCase Left Len ListAppend ListChangeDelims ListContains ListContainsNoCase ListDeleteAt ListFind ListFindNoCase ListFirst ListGetAt ListInsertAt ListLast ListLen ListPrepend ListQualify ListRest ListSetAt ListSort ListToArray ListValueCount ListValueCountNoCase LJustify Log Log10 LSCurrencyFormat LSDateFormat LSEuroCurrencyFormat LSIsCurrency LSIsDate LSIsNumeric LSNumberFormat LSParseCurrency LSParseDateTime LSParseEuroCurrency LSParseNumber LSTimeFormat LTrim Max Mid Min Minute Month MonthAsString Now NumberFormat ParagraphFormat ParseDateTime Pi PrecisionEvaluate PreserveSingleQuotes Quarter QueryAddColumn QueryAddRow QueryConvertForGrid QueryNew QuerySetCell QuotedValueList Rand Randomize RandRange REFind REFindNoCase ReleaseComObject REMatch REMatchNoCase RemoveChars RepeatString Replace ReplaceList ReplaceNoCase REReplace REReplaceNoCase Reverse Right RJustify Round RTrim Second SendGatewayMessage SerializeJSON SetEncoding SetLocale SetProfileString SetVariable Sgn Sin Sleep SpanExcluding SpanIncluding Sqr StripCR StructAppend StructClear StructCopy StructCount StructDelete StructFind StructFindKey StructFindValue StructGet StructInsert StructIsEmpty StructKeyArray StructKeyExists StructKeyList StructKeyList StructNew StructSort StructUpdate Tan TimeFormat ToBase64 ToBinary ToScript ToString Trim UCase URLDecode URLEncodedFormat URLSessionFormat Val ValueList VerifyClient Week Wrap Wrap WriteOutput XmlChildPos XmlElemNew XmlFormat XmlGetNodeType XmlNew XmlParse XmlSearch XmlTransform XmlValidate Year YesNoFormat",t="cfabort cfajaximport cfajaxproxy cfapplet cfapplication cfargument cfassociate cfbreak cfcache cfcalendar cfcase cfcatch cfchart cfchartdata cfchartseries cfcol cfcollection cfcomponent cfcontent cfcookie cfdbinfo cfdefaultcase cfdirectory cfdiv cfdocument cfdocumentitem cfdocumentsection cfdump cfelse cfelseif cferror cfexchangecalendar cfexchangeconnection cfexchangecontact cfexchangefilter cfexchangemail cfexchangetask cfexecute cfexit cffeed cffile cfflush cfform cfformgroup cfformitem cfftp cffunction cfgrid cfgridcolumn cfgridrow cfgridupdate cfheader cfhtmlhead cfhttp cfhttpparam cfif cfimage cfimport cfinclude cfindex cfinput cfinsert cfinterface cfinvoke cfinvokeargument cflayout cflayoutarea cfldap cflocation cflock cflog cflogin cfloginuser cflogout cfloop cfmail cfmailparam cfmailpart cfmenu cfmenuitem cfmodule cfNTauthenticate cfobject cfobjectcache cfoutput cfparam cfpdf cfpdfform cfpdfformparam cfpdfparam cfpdfsubform cfpod cfpop cfpresentation cfpresentationslide cfpresenter cfprint cfprocessingdirective cfprocparam cfprocresult cfproperty cfquery cfqueryparam cfregistry cfreport cfreportparam cfrethrow cfreturn cfsavecontent cfschedule cfscript cfsearch cfselect cfset cfsetting cfsilent cfslider cfsprydataset cfstoredproc cfswitch cftable cftextarea cfthread cfthrow cftimer cftooltip cftrace cftransaction cftree cftreeitem cftry cfupdate cfwddx cfwindow cfxml cfzip cfzipparam",r="all and any between cross in join like not null or outer some"; +this.regexList=[{regex:new RegExp("--(.*)$","gm"),css:"comments"},{regex:SyntaxHighlighter.regexLib.xmlComments,css:"comments"},{regex:SyntaxHighlighter.regexLib.doubleQuotedString,css:"string"},{regex:SyntaxHighlighter.regexLib.singleQuotedString,css:"string"},{regex:new RegExp(this.getKeywords(e),"gmi"),css:"functions"},{regex:new RegExp(this.getKeywords(r),"gmi"),css:"color1"},{regex:new RegExp(this.getKeywords(t),"gmi"),css:"keyword"}]}SyntaxHighlighter=SyntaxHighlighter||("undefined"!=typeof require?require("shCore").SyntaxHighlighter:null),e.prototype=new SyntaxHighlighter.Highlighter,e.aliases=["coldfusion","cf"],SyntaxHighlighter.brushes.ColdFusion=e,"undefined"!=typeof exports?exports.Brush=e:null}(),function(){function e(){var e="ATOM BOOL BOOLEAN BYTE CHAR COLORREF DWORD DWORDLONG DWORD_PTR DWORD32 DWORD64 FLOAT HACCEL HALF_PTR HANDLE HBITMAP HBRUSH HCOLORSPACE HCONV HCONVLIST HCURSOR HDC HDDEDATA HDESK HDROP HDWP HENHMETAFILE HFILE HFONT HGDIOBJ HGLOBAL HHOOK HICON HINSTANCE HKEY HKL HLOCAL HMENU HMETAFILE HMODULE HMONITOR HPALETTE HPEN HRESULT HRGN HRSRC HSZ HWINSTA HWND INT INT_PTR INT32 INT64 LANGID LCID LCTYPE LGRPID LONG LONGLONG LONG_PTR LONG32 LONG64 LPARAM LPBOOL LPBYTE LPCOLORREF LPCSTR LPCTSTR LPCVOID LPCWSTR LPDWORD LPHANDLE LPINT LPLONG LPSTR LPTSTR LPVOID LPWORD LPWSTR LRESULT PBOOL PBOOLEAN PBYTE PCHAR PCSTR PCTSTR PCWSTR PDWORDLONG PDWORD_PTR PDWORD32 PDWORD64 PFLOAT PHALF_PTR PHANDLE PHKEY PINT PINT_PTR PINT32 PINT64 PLCID PLONG PLONGLONG PLONG_PTR PLONG32 PLONG64 POINTER_32 POINTER_64 PSHORT PSIZE_T PSSIZE_T PSTR PTBYTE PTCHAR PTSTR PUCHAR PUHALF_PTR PUINT PUINT_PTR PUINT32 PUINT64 PULONG PULONGLONG PULONG_PTR PULONG32 PULONG64 PUSHORT PVOID PWCHAR PWORD PWSTR SC_HANDLE SC_LOCK SERVICE_STATUS_HANDLE SHORT SIZE_T SSIZE_T TBYTE TCHAR UCHAR UHALF_PTR UINT UINT_PTR UINT32 UINT64 ULONG ULONGLONG ULONG_PTR ULONG32 ULONG64 USHORT USN VOID WCHAR WORD WPARAM WPARAM WPARAM char bool short int __int32 __int64 __int8 __int16 long float double __wchar_t clock_t _complex _dev_t _diskfree_t div_t ldiv_t _exception _EXCEPTION_POINTERS FILE _finddata_t _finddatai64_t _wfinddata_t _wfinddatai64_t __finddata64_t __wfinddata64_t _FPIEEE_RECORD fpos_t _HEAPINFO _HFILE lconv intptr_t jmp_buf mbstate_t _off_t _onexit_t _PNH ptrdiff_t _purecall_handler sig_atomic_t size_t _stat __stat64 _stati64 terminate_function time_t __time64_t _timeb __timeb64 tm uintptr_t _utimbuf va_list wchar_t wctrans_t wctype_t wint_t signed",t="auto break case catch class const decltype __finally __exception __try const_cast continue private public protected __declspec default delete deprecated dllexport dllimport do dynamic_cast else enum explicit extern if for friend goto inline mutable naked namespace new noinline noreturn nothrow register reinterpret_cast return selectany sizeof static static_cast struct switch template this thread throw true false try typedef typeid typename union using uuid virtual void volatile whcar_t while",r="assert isalnum isalpha iscntrl isdigit isgraph islower isprintispunct isspace isupper isxdigit tolower toupper errno localeconv setlocale acos asin atan atan2 ceil cos cosh exp fabs floor fmod frexp ldexp log log10 modf pow sin sinh sqrt tan tanh jmp_buf longjmp setjmp raise signal sig_atomic_t va_arg va_end va_start clearerr fclose feof ferror fflush fgetc fgetpos fgets fopen fprintf fputc fputs fread freopen fscanf fseek fsetpos ftell fwrite getc getchar gets perror printf putc putchar puts remove rename rewind scanf setbuf setvbuf sprintf sscanf tmpfile tmpnam ungetc vfprintf vprintf vsprintf abort abs atexit atof atoi atol bsearch calloc div exit free getenv labs ldiv malloc mblen mbstowcs mbtowc qsort rand realloc srand strtod strtol strtoul system wcstombs wctomb memchr memcmp memcpy memmove memset strcat strchr strcmp strcoll strcpy strcspn strerror strlen strncat strncmp strncpy strpbrk strrchr strspn strstr strtok strxfrm asctime clock ctime difftime gmtime localtime mktime strftime time";this.regexList=[{regex:SyntaxHighlighter.regexLib.singleLineCComments,css:"comments"},{regex:SyntaxHighlighter.regexLib.multiLineCComments,css:"comments"},{regex:SyntaxHighlighter.regexLib.doubleQuotedString,css:"string"},{regex:SyntaxHighlighter.regexLib.singleQuotedString,css:"string"},{regex:/^ *#.*/gm,css:"preprocessor"},{regex:new RegExp(this.getKeywords(e),"gm"),css:"color1 bold"},{regex:new RegExp(this.getKeywords(r),"gm"),css:"functions bold"},{regex:new RegExp(this.getKeywords(t),"gm"),css:"keyword bold"}]}SyntaxHighlighter=SyntaxHighlighter||("undefined"!=typeof require?require("shCore").SyntaxHighlighter:null),e.prototype=new SyntaxHighlighter.Highlighter,e.aliases=["cpp","c"],SyntaxHighlighter.brushes.Cpp=e,"undefined"!=typeof exports?exports.Brush=e:null}(),function(){function e(){function e(e,t){var r=0==e[0].indexOf("///")?"color1":"comments";return[new SyntaxHighlighter.Match(e[0],e.index,r)]}var t="abstract as base bool break byte case catch char checked class const continue decimal default delegate do double else enum event explicit volatile extern false finally fixed float for foreach get goto if implicit in int interface internal is lock long namespace new null object operator out override params private protected public readonly ref return sbyte sealed set short sizeof stackalloc static string struct switch this throw true try typeof uint ulong unchecked unsafe ushort using virtual void while var from group by into select let where orderby join on equals ascending descending";this.regexList=[{regex:SyntaxHighlighter.regexLib.singleLineCComments,func:e},{regex:SyntaxHighlighter.regexLib.multiLineCComments,css:"comments"},{regex:/@"(?:[^"]|"")*"/g,css:"string"},{regex:SyntaxHighlighter.regexLib.doubleQuotedString,css:"string"},{regex:SyntaxHighlighter.regexLib.singleQuotedString,css:"string"},{regex:/^\s*#.*/gm,css:"preprocessor"},{regex:new RegExp(this.getKeywords(t),"gm"),css:"keyword"},{regex:/\bpartial(?=\s+(?:class|interface|struct)\b)/g,css:"keyword"},{regex:/\byield(?=\s+(?:return|break)\b)/g,css:"keyword"}],this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags)}SyntaxHighlighter=SyntaxHighlighter||("undefined"!=typeof require?require("shCore").SyntaxHighlighter:null),e.prototype=new SyntaxHighlighter.Highlighter,e.aliases=["c#","c-sharp","csharp"],SyntaxHighlighter.brushes.CSharp=e,"undefined"!=typeof exports?exports.Brush=e:null}(),function(){function e(){function e(e){return"\\b([a-z_]|)"+e.replace(/ /g,"(?=:)\\b|\\b([a-z_\\*]|\\*|)")+"(?=:)\\b"}function t(e){return"\\b"+e.replace(/ /g,"(?!-)(?!:)\\b|\\b()")+":\\b"}var r="ascent azimuth background-attachment background-color background-image background-position background-repeat background baseline bbox border-collapse border-color border-spacing border-style border-top border-right border-bottom border-left border-top-color border-right-color border-bottom-color border-left-color border-top-style border-right-style border-bottom-style border-left-style border-top-width border-right-width border-bottom-width border-left-width border-width border bottom cap-height caption-side centerline clear clip color content counter-increment counter-reset cue-after cue-before cue cursor definition-src descent direction display elevation empty-cells float font-size-adjust font-family font-size font-stretch font-style font-variant font-weight font height left letter-spacing line-height list-style-image list-style-position list-style-type list-style margin-top margin-right margin-bottom margin-left margin marker-offset marks mathline max-height max-width min-height min-width orphans outline-color outline-style outline-width outline overflow padding-top padding-right padding-bottom padding-left padding page page-break-after page-break-before page-break-inside pause pause-after pause-before pitch pitch-range play-during position quotes right richness size slope src speak-header speak-numeral speak-punctuation speak speech-rate stemh stemv stress table-layout text-align top text-decoration text-indent text-shadow text-transform unicode-bidi unicode-range units-per-em vertical-align visibility voice-family volume white-space widows width widths word-spacing x-height z-index",i="above absolute all always aqua armenian attr aural auto avoid baseline behind below bidi-override black blink block blue bold bolder both bottom braille capitalize caption center center-left center-right circle close-quote code collapse compact condensed continuous counter counters crop cross crosshair cursive dashed decimal decimal-leading-zero default digits disc dotted double embed embossed e-resize expanded extra-condensed extra-expanded fantasy far-left far-right fast faster fixed format fuchsia gray green groove handheld hebrew help hidden hide high higher icon inline-table inline inset inside invert italic justify landscape large larger left-side left leftwards level lighter lime line-through list-item local loud lower-alpha lowercase lower-greek lower-latin lower-roman lower low ltr marker maroon medium message-box middle mix move narrower navy ne-resize no-close-quote none no-open-quote no-repeat normal nowrap n-resize nw-resize oblique olive once open-quote outset outside overline pointer portrait pre print projection purple red relative repeat repeat-x repeat-y rgb ridge right right-side rightwards rtl run-in screen scroll semi-condensed semi-expanded separate se-resize show silent silver slower slow small small-caps small-caption smaller soft solid speech spell-out square s-resize static status-bar sub super sw-resize table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group teal text-bottom text-top thick thin top transparent tty tv ultra-condensed ultra-expanded underline upper-alpha uppercase upper-latin upper-roman url visible wait white wider w-resize x-fast x-high x-large x-loud x-low x-slow x-small x-soft xx-large xx-small yellow",n="[mM]onospace [tT]ahoma [vV]erdana [aA]rial [hH]elvetica [sS]ans-serif [sS]erif [cC]ourier mono sans serif";this.regexList=[{regex:SyntaxHighlighter.regexLib.multiLineCComments,css:"comments"},{regex:SyntaxHighlighter.regexLib.doubleQuotedString,css:"string"},{regex:SyntaxHighlighter.regexLib.singleQuotedString,css:"string"},{regex:/\#[a-fA-F0-9]{3,6}/g,css:"value"},{regex:/(-?\d+)(\.\d+)?(px|em|pt|\:|\%|)/g,css:"value"},{regex:/!important/g,css:"color3"},{regex:new RegExp(e(r),"gm"),css:"keyword"},{regex:new RegExp(t(i),"g"),css:"value"},{regex:new RegExp(this.getKeywords(n),"g"),css:"color1"}],this.forHtmlScript({left:/(<|<)\s*style.*?(>|>)/gi,right:/(<|<)\/\s*style\s*(>|>)/gi})}SyntaxHighlighter=SyntaxHighlighter||("undefined"!=typeof require?require("shCore").SyntaxHighlighter:null),e.prototype=new SyntaxHighlighter.Highlighter,e.aliases=["css"],SyntaxHighlighter.brushes.CSS=e,"undefined"!=typeof exports?exports.Brush=e:null}(),function(){function e(){var e="abs addr and ansichar ansistring array as asm begin boolean byte cardinal case char class comp const constructor currency destructor div do double downto else end except exports extended false file finalization finally for function goto if implementation in inherited int64 initialization integer interface is label library longint longword mod nil not object of on or packed pansichar pansistring pchar pcurrency pdatetime pextended pint64 pointer private procedure program property pshortstring pstring pvariant pwidechar pwidestring protected public published raise real real48 record repeat set shl shortint shortstring shr single smallint string then threadvar to true try type unit until uses val var varirnt while widechar widestring with word write writeln xor";this.regexList=[{regex:/\(\*[\s\S]*?\*\)/gm,css:"comments"},{regex:/{(?!\$)[\s\S]*?}/gm,css:"comments"},{regex:SyntaxHighlighter.regexLib.singleLineCComments,css:"comments"},{regex:SyntaxHighlighter.regexLib.singleQuotedString,css:"string"},{regex:/\{\$[a-zA-Z]+ .+\}/g,css:"color1"},{regex:/\b[\d\.]+\b/g,css:"value"},{regex:/\$[a-zA-Z0-9]+\b/g,css:"value"},{regex:new RegExp(this.getKeywords(e),"gmi"),css:"keyword"}]}SyntaxHighlighter=SyntaxHighlighter||("undefined"!=typeof require?require("shCore").SyntaxHighlighter:null),e.prototype=new SyntaxHighlighter.Highlighter,e.aliases=["delphi","pascal","pas"],SyntaxHighlighter.brushes.Delphi=e,"undefined"!=typeof exports?exports.Brush=e:null}(),function(){function e(){this.regexList=[{regex:/^\+\+\+ .*$/gm,css:"color2"},{regex:/^\-\-\- .*$/gm,css:"color2"},{regex:/^\s.*$/gm,css:"color1"},{regex:/^@@.*@@.*$/gm,css:"variable"},{regex:/^\+.*$/gm,css:"string"},{regex:/^\-.*$/gm,css:"color3"}]}SyntaxHighlighter=SyntaxHighlighter||("undefined"!=typeof require?require("shCore").SyntaxHighlighter:null),e.prototype=new SyntaxHighlighter.Highlighter,e.aliases=["diff","patch"],SyntaxHighlighter.brushes.Diff=e,"undefined"!=typeof exports?exports.Brush=e:null}(),function(){function e(){var e="after and andalso band begin bnot bor bsl bsr bxor case catch cond div end fun if let not of or orelse query receive rem try when xor module export import define";this.regexList=[{regex:new RegExp("[A-Z][A-Za-z0-9_]+","g"),css:"constants"},{regex:new RegExp("\\%.+","gm"),css:"comments"},{regex:new RegExp("\\?[A-Za-z0-9_]+","g"),css:"preprocessor"},{regex:new RegExp("[a-z0-9_]+:[a-z0-9_]+","g"),css:"functions"},{regex:SyntaxHighlighter.regexLib.doubleQuotedString,css:"string"},{regex:SyntaxHighlighter.regexLib.singleQuotedString,css:"string"},{regex:new RegExp(this.getKeywords(e),"gm"),css:"keyword"}]}SyntaxHighlighter=SyntaxHighlighter||("undefined"!=typeof require?require("shCore").SyntaxHighlighter:null),e.prototype=new SyntaxHighlighter.Highlighter,e.aliases=["erl","erlang"],SyntaxHighlighter.brushes.Erland=e,"undefined"!=typeof exports?exports.Brush=e:null}(),function(){function e(){var e="as assert break case catch class continue def default do else extends finally if in implements import instanceof interface new package property return switch throw throws try while public protected private static",t="void boolean byte char short int long float double",r="null",i="allProperties count get size collect each eachProperty eachPropertyName eachWithIndex find findAll findIndexOf grep inject max min reverseEach sort asImmutable asSynchronized flatten intersect join pop reverse subMap toList padRight padLeft contains eachMatch toCharacter toLong toUrl tokenize eachFile eachFileRecurse eachB yte eachLine readBytes readLine getText splitEachLine withReader append encodeBase64 decodeBase64 filterLine transformChar transformLine withOutputStream withPrintWriter withStream withStreams withWriter withWriterAppend write writeLine dump inspect invokeMethod print println step times upto use waitForOrKill getText";this.regexList=[{regex:SyntaxHighlighter.regexLib.singleLineCComments,css:"comments"},{regex:SyntaxHighlighter.regexLib.multiLineCComments,css:"comments"},{regex:SyntaxHighlighter.regexLib.doubleQuotedString,css:"string"},{regex:SyntaxHighlighter.regexLib.singleQuotedString,css:"string"},{regex:/""".*"""/g,css:"string"},{regex:new RegExp("\\b([\\d]+(\\.[\\d]+)?|0x[a-f0-9]+)\\b","gi"),css:"value"},{regex:new RegExp(this.getKeywords(e),"gm"),css:"keyword"},{regex:new RegExp(this.getKeywords(t),"gm"),css:"color1"},{regex:new RegExp(this.getKeywords(r),"gm"),css:"constants"},{regex:new RegExp(this.getKeywords(i),"gm"),css:"functions"}],this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags)}SyntaxHighlighter=SyntaxHighlighter||("undefined"!=typeof require?require("shCore").SyntaxHighlighter:null),e.prototype=new SyntaxHighlighter.Highlighter,e.aliases=["groovy"],SyntaxHighlighter.brushes.Groovy=e,"undefined"!=typeof exports?exports.Brush=e:null}(),function(){function e(){var e="abstract assert boolean break byte case catch char class const continue default do double else enum extends false final finally float for goto if implements import instanceof int interface long native new null package private protected public return short static strictfp super switch synchronized this throw throws true transient try void volatile while";this.regexList=[{regex:SyntaxHighlighter.regexLib.singleLineCComments,css:"comments"},{regex:/\/\*([^\*][\s\S]*)?\*\//gm,css:"comments"},{regex:/\/\*(?!\*\/)\*[\s\S]*?\*\//gm,css:"preprocessor"},{regex:SyntaxHighlighter.regexLib.doubleQuotedString,css:"string"},{regex:SyntaxHighlighter.regexLib.singleQuotedString,css:"string"},{regex:/\b([\d]+(\.[\d]+)?|0x[a-f0-9]+)\b/gi,css:"value"},{regex:/(?!\@interface\b)\@[\$\w]+\b/g,css:"color1"},{regex:/\@interface\b/g,css:"color2"},{regex:new RegExp(this.getKeywords(e),"gm"),css:"keyword"}],this.forHtmlScript({left:/(<|<)%[@!=]?/g,right:/%(>|>)/g})}SyntaxHighlighter=SyntaxHighlighter||("undefined"!=typeof require?require("shCore").SyntaxHighlighter:null),e.prototype=new SyntaxHighlighter.Highlighter,e.aliases=["java"],SyntaxHighlighter.brushes.Java=e,"undefined"!=typeof exports?exports.Brush=e:null}(),function(){function e(){var e="Boolean Byte Character Double Duration Float Integer Long Number Short String Void",t="abstract after and as assert at before bind bound break catch class continue def delete else exclusive extends false finally first for from function if import in indexof init insert instanceof into inverse last lazy mixin mod nativearray new not null on or override package postinit protected public public-init public-read replace return reverse sizeof step super then this throw true try tween typeof var where while with attribute let private readonly static trigger";this.regexList=[{regex:SyntaxHighlighter.regexLib.singleLineCComments,css:"comments"},{regex:SyntaxHighlighter.regexLib.multiLineCComments,css:"comments"},{regex:SyntaxHighlighter.regexLib.singleQuotedString,css:"string"},{regex:SyntaxHighlighter.regexLib.doubleQuotedString,css:"string"},{regex:/(-?\.?)(\b(\d*\.?\d+|\d+\.?\d*)(e[+-]?\d+)?|0x[a-f\d]+)\b\.?/gi,css:"color2"},{regex:new RegExp(this.getKeywords(e),"gm"),css:"variable"},{regex:new RegExp(this.getKeywords(t),"gm"),css:"keyword"}],this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags)}SyntaxHighlighter=SyntaxHighlighter||("undefined"!=typeof require?require("shCore").SyntaxHighlighter:null),e.prototype=new SyntaxHighlighter.Highlighter,e.aliases=["jfx","javafx"],SyntaxHighlighter.brushes.JavaFX=e,"undefined"!=typeof exports?exports.Brush=e:null}(),function(){function e(){var e="break case catch continue default delete do else false for function if in instanceof new null return super switch this throw true try typeof var while with",t=SyntaxHighlighter.regexLib;this.regexList=[{regex:t.multiLineDoubleQuotedString,css:"string"},{regex:t.multiLineSingleQuotedString,css:"string"},{regex:t.singleLineCComments,css:"comments"},{regex:t.multiLineCComments,css:"comments"},{regex:/\s*#.*/gm,css:"preprocessor"},{regex:new RegExp(this.getKeywords(e),"gm"),css:"keyword"}],this.forHtmlScript(t.scriptScriptTags)}SyntaxHighlighter=SyntaxHighlighter||("undefined"!=typeof require?require("shCore").SyntaxHighlighter:null),e.prototype=new SyntaxHighlighter.Highlighter,e.aliases=["js","jscript","javascript"],SyntaxHighlighter.brushes.JScript=e,"undefined"!=typeof exports?exports.Brush=e:null}(),function(){function e(){var e="abs accept alarm atan2 bind binmode chdir chmod chomp chop chown chr chroot close closedir connect cos crypt defined delete each endgrent endhostent endnetent endprotoent endpwent endservent eof exec exists exp fcntl fileno flock fork format formline getc getgrent getgrgid getgrnam gethostbyaddr gethostbyname gethostent getlogin getnetbyaddr getnetbyname getnetent getpeername getpgrp getppid getpriority getprotobyname getprotobynumber getprotoent getpwent getpwnam getpwuid getservbyname getservbyport getservent getsockname getsockopt glob gmtime grep hex index int ioctl join keys kill lc lcfirst length link listen localtime lock log lstat map mkdir msgctl msgget msgrcv msgsnd oct open opendir ord pack pipe pop pos print printf prototype push quotemeta rand read readdir readline readlink readpipe recv rename reset reverse rewinddir rindex rmdir scalar seek seekdir select semctl semget semop send setgrent sethostent setnetent setpgrp setpriority setprotoent setpwent setservent setsockopt shift shmctl shmget shmread shmwrite shutdown sin sleep socket socketpair sort splice split sprintf sqrt srand stat study substr symlink syscall sysopen sysread sysseek system syswrite tell telldir time times tr truncate uc ucfirst umask undef unlink unpack unshift utime values vec wait waitpid warn write say",t="bless caller continue dbmclose dbmopen die do dump else elsif eval exit for foreach goto if import last local my next no our package redo ref require return sub tie tied unless untie until use wantarray while given when default try catch finally has extends with before after around override augment";this.regexList=[{regex:/(<<|<<)((\w+)|(['"])(.+?)\4)[\s\S]+?\n\3\5\n/g,css:"string"},{regex:/#.*$/gm,css:"comments"},{regex:/^#!.*\n/g,css:"preprocessor"},{regex:/-?\w+(?=\s*=(>|>))/g,css:"string"},{regex:/\bq[qwxr]?\([\s\S]*?\)/g,css:"string"},{regex:/\bq[qwxr]?\{[\s\S]*?\}/g,css:"string"},{regex:/\bq[qwxr]?\[[\s\S]*?\]/g,css:"string"},{regex:/\bq[qwxr]?(<|<)[\s\S]*?(>|>)/g,css:"string"},{regex:/\bq[qwxr]?([^\w({<[])[\s\S]*?\1/g,css:"string"},{regex:SyntaxHighlighter.regexLib.doubleQuotedString,css:"string"},{regex:SyntaxHighlighter.regexLib.singleQuotedString,css:"string"},{regex:/(?:&|[$@%*]|\$#)[a-zA-Z_](\w+|::)*/g,css:"variable"},{regex:/\b__(?:END|DATA)__\b[\s\S]*$/g,css:"comments"},{regex:/(^|\n)=\w[\s\S]*?(\n=cut\s*\n|$)/g,css:"comments"},{regex:new RegExp(this.getKeywords(e),"gm"),css:"functions"},{regex:new RegExp(this.getKeywords(t),"gm"),css:"keyword"}],this.forHtmlScript(SyntaxHighlighter.regexLib.phpScriptTags)}SyntaxHighlighter=SyntaxHighlighter||("undefined"!=typeof require?require("shCore").SyntaxHighlighter:null),e.prototype=new SyntaxHighlighter.Highlighter,e.aliases=["perl","Perl","pl"],SyntaxHighlighter.brushes.Perl=e,"undefined"!=typeof exports?exports.Brush=e:null}(),function(){function e(){var e="abs acos acosh addcslashes addslashes array_change_key_case array_chunk array_combine array_count_values array_diff array_diff_assoc array_diff_key array_diff_uassoc array_diff_ukey array_fill array_filter array_flip array_intersect array_intersect_assoc array_intersect_key array_intersect_uassoc array_intersect_ukey array_key_exists array_keys array_map array_merge array_merge_recursive array_multisort array_pad array_pop array_product array_push array_rand array_reduce array_reverse array_search array_shift array_slice array_splice array_sum array_udiff array_udiff_assoc array_udiff_uassoc array_uintersect array_uintersect_assoc array_uintersect_uassoc array_unique array_unshift array_values array_walk array_walk_recursive atan atan2 atanh base64_decode base64_encode base_convert basename bcadd bccomp bcdiv bcmod bcmul bindec bindtextdomain bzclose bzcompress bzdecompress bzerrno bzerror bzerrstr bzflush bzopen bzread bzwrite ceil chdir checkdate checkdnsrr chgrp chmod chop chown chr chroot chunk_split class_exists closedir closelog copy cos cosh count count_chars date decbin dechex decoct deg2rad delete ebcdic2ascii echo empty end ereg ereg_replace eregi eregi_replace error_log error_reporting escapeshellarg escapeshellcmd eval exec exit exp explode extension_loaded feof fflush fgetc fgetcsv fgets fgetss file_exists file_get_contents file_put_contents fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype floatval flock floor flush fmod fnmatch fopen fpassthru fprintf fputcsv fputs fread fscanf fseek fsockopen fstat ftell ftok getallheaders getcwd getdate getenv gethostbyaddr gethostbyname gethostbynamel getimagesize getlastmod getmxrr getmygid getmyinode getmypid getmyuid getopt getprotobyname getprotobynumber getrandmax getrusage getservbyname getservbyport gettext gettimeofday gettype glob gmdate gmmktime ini_alter ini_get ini_get_all ini_restore ini_set interface_exists intval ip2long is_a is_array is_bool is_callable is_dir is_double is_executable is_file is_finite is_float is_infinite is_int is_integer is_link is_long is_nan is_null is_numeric is_object is_readable is_real is_resource is_scalar is_soap_fault is_string is_subclass_of is_uploaded_file is_writable is_writeable mkdir mktime nl2br parse_ini_file parse_str parse_url passthru pathinfo print readlink realpath rewind rewinddir rmdir round str_ireplace str_pad str_repeat str_replace str_rot13 str_shuffle str_split str_word_count strcasecmp strchr strcmp strcoll strcspn strftime strip_tags stripcslashes stripos stripslashes stristr strlen strnatcasecmp strnatcmp strncasecmp strncmp strpbrk strpos strptime strrchr strrev strripos strrpos strspn strstr strtok strtolower strtotime strtoupper strtr strval substr substr_compare",t="abstract and array as break case catch cfunction class clone const continue declare default die do else elseif enddeclare endfor endforeach endif endswitch endwhile extends final for foreach function global goto if implements include include_once interface instanceof insteadof namespace new old_function or private protected public return require require_once static switch trait throw try use var while xor ",r="__FILE__ __LINE__ __METHOD__ __FUNCTION__ __CLASS__";this.regexList=[{regex:SyntaxHighlighter.regexLib.singleLineCComments,css:"comments"},{regex:SyntaxHighlighter.regexLib.multiLineCComments,css:"comments"},{regex:SyntaxHighlighter.regexLib.doubleQuotedString,css:"string"},{regex:SyntaxHighlighter.regexLib.singleQuotedString,css:"string"},{regex:/\$\w+/g,css:"variable"},{regex:new RegExp(this.getKeywords(e),"gmi"),css:"functions"},{regex:new RegExp(this.getKeywords(r),"gmi"),css:"constants"},{regex:new RegExp(this.getKeywords(t),"gm"),css:"keyword"}],this.forHtmlScript(SyntaxHighlighter.regexLib.phpScriptTags)}SyntaxHighlighter=SyntaxHighlighter||("undefined"!=typeof require?require("shCore").SyntaxHighlighter:null),e.prototype=new SyntaxHighlighter.Highlighter,e.aliases=["php"],SyntaxHighlighter.brushes.Php=e,"undefined"!=typeof exports?exports.Brush=e:null}(),function(){function e(){}SyntaxHighlighter=SyntaxHighlighter||("undefined"!=typeof require?require("shCore").SyntaxHighlighter:null),e.prototype=new SyntaxHighlighter.Highlighter,e.aliases=["text","plain"],SyntaxHighlighter.brushes.Plain=e,"undefined"!=typeof exports?exports.Brush=e:null}(),function(){function e(){var e="while validateset validaterange validatepattern validatelength validatecount until trap switch return ref process param parameter in if global: function foreach for finally filter end elseif else dynamicparam do default continue cmdletbinding break begin alias \\? % #script #private #local #global mandatory parametersetname position valuefrompipeline valuefrompipelinebypropertyname valuefromremainingarguments helpmessage ",t=" and as band bnot bor bxor casesensitive ccontains ceq cge cgt cle clike clt cmatch cne cnotcontains cnotlike cnotmatch contains creplace eq exact f file ge gt icontains ieq ige igt ile ilike ilt imatch ine inotcontains inotlike inotmatch ireplace is isnot le like lt match ne not notcontains notlike notmatch or regex replace wildcard",r="write where wait use update unregister undo trace test tee take suspend stop start split sort skip show set send select scroll resume restore restart resolve resize reset rename remove register receive read push pop ping out new move measure limit join invoke import group get format foreach export expand exit enter enable disconnect disable debug cxnew copy convertto convertfrom convert connect complete compare clear checkpoint aggregate add",i=" component description example externalhelp forwardhelpcategory forwardhelptargetname forwardhelptargetname functionality inputs link notes outputs parameter remotehelprunspace role synopsis";this.regexList=[{regex:new RegExp("^\\s*#[#\\s]*\\.("+this.getKeywords(i)+").*$","gim"),css:"preprocessor help bold"},{regex:SyntaxHighlighter.regexLib.singleLinePerlComments,css:"comments"},{regex:/(<|<)#[\s\S]*?#(>|>)/gm,css:"comments here"},{regex:new RegExp('@"\\n[\\s\\S]*?\\n"@',"gm"),css:"script string here"},{regex:new RegExp("@'\\n[\\s\\S]*?\\n'@","gm"),css:"script string single here"},{regex:new RegExp('"(?:\\$\\([^\\)]*\\)|[^"]|`"|"")*[^`]"',"g"),css:"string"},{regex:new RegExp("'(?:[^']|'')*'","g"),css:"string single"},{regex:new RegExp("[\\$|@|@@](?:(?:global|script|private|env):)?[A-Z0-9_]+","gi"),css:"variable"},{regex:new RegExp("(?:\\b"+r.replace(/ /g,"\\b|\\b")+")-[a-zA-Z_][a-zA-Z0-9_]*","gmi"),css:"functions"},{regex:new RegExp(this.getKeywords(e),"gmi"),css:"keyword"},{regex:new RegExp("-"+this.getKeywords(t),"gmi"),css:"operator value"},{regex:new RegExp("\\[[A-Z_\\[][A-Z0-9_. `,\\[\\]]*\\]","gi"),css:"constants"},{regex:new RegExp("\\s+-(?!"+this.getKeywords(t)+")[a-zA-Z_][a-zA-Z0-9_]*","gmi"),css:"color1"}]}SyntaxHighlighter=SyntaxHighlighter||("undefined"!=typeof require?require("shCore").SyntaxHighlighter:null),e.prototype=new SyntaxHighlighter.Highlighter,e.aliases=["powershell","ps","posh"],SyntaxHighlighter.brushes.PowerShell=e,"undefined"!=typeof exports?exports.Brush=e:null}(),function(){function e(){var e="and assert break class continue def del elif else except exec finally for from global if import in is lambda not or pass print raise return try yield while",t="__import__ abs all any apply basestring bin bool buffer callable chr classmethod cmp coerce compile complex delattr dict dir divmod enumerate eval execfile file filter float format frozenset getattr globals hasattr hash help hex id input int intern isinstance issubclass iter len list locals long map max min next object oct open ord pow print property range raw_input reduce reload repr reversed round set setattr slice sorted staticmethod str sum super tuple type type unichr unicode vars xrange zip",r="None True False self cls class_";this.regexList=[{regex:SyntaxHighlighter.regexLib.singleLinePerlComments,css:"comments"},{regex:/^\s*@\w+/gm,css:"decorator"},{regex:/(['\"]{3})([^\1])*?\1/gm,css:"comments"},{regex:/"(?!")(?:\.|\\\"|[^\""\n])*"/gm,css:"string"},{regex:/'(?!')(?:\.|(\\\')|[^\''\n])*'/gm,css:"string"},{regex:/\+|\-|\*|\/|\%|=|==/gm,css:"keyword"},{regex:/\b\d+\.?\w*/g,css:"value"},{regex:new RegExp(this.getKeywords(t),"gmi"),css:"functions"},{regex:new RegExp(this.getKeywords(e),"gm"),css:"keyword"},{regex:new RegExp(this.getKeywords(r),"gm"),css:"color1"}],this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags)}SyntaxHighlighter=SyntaxHighlighter||("undefined"!=typeof require?require("shCore").SyntaxHighlighter:null),e.prototype=new SyntaxHighlighter.Highlighter,e.aliases=["py","python"],SyntaxHighlighter.brushes.Python=e,"undefined"!=typeof exports?exports.Brush=e:null}(),function(){function e(){var e="alias and BEGIN begin break case class def define_method defined do each else elsif END end ensure false for if in module new next nil not or raise redo rescue retry return self super then throw true undef unless until when while yield",t="Array Bignum Binding Class Continuation Dir Exception FalseClass File::Stat File Fixnum Fload Hash Integer IO MatchData Method Module NilClass Numeric Object Proc Range Regexp String Struct::TMS Symbol ThreadGroup Thread Time TrueClass";this.regexList=[{regex:SyntaxHighlighter.regexLib.singleLinePerlComments,css:"comments"},{regex:SyntaxHighlighter.regexLib.doubleQuotedString,css:"string"},{regex:SyntaxHighlighter.regexLib.singleQuotedString,css:"string"},{regex:/\b[A-Z0-9_]+\b/g,css:"constants"},{regex:/:[a-z][A-Za-z0-9_]*/g,css:"color2"},{regex:/(\$|@@|@)\w+/g,css:"variable bold"},{regex:new RegExp(this.getKeywords(e),"gm"),css:"keyword"},{regex:new RegExp(this.getKeywords(t),"gm"),css:"color1"}],this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags)}SyntaxHighlighter=SyntaxHighlighter||("undefined"!=typeof require?require("shCore").SyntaxHighlighter:null), +e.prototype=new SyntaxHighlighter.Highlighter,e.aliases=["ruby","rails","ror","rb"],SyntaxHighlighter.brushes.Ruby=e,"undefined"!=typeof exports?exports.Brush=e:null}(),function(){function e(){function e(e){return"\\b([a-z_]|)"+e.replace(/ /g,"(?=:)\\b|\\b([a-z_\\*]|\\*|)")+"(?=:)\\b"}function t(e){return"\\b"+e.replace(/ /g,"(?!-)(?!:)\\b|\\b()")+":\\b"}var r="ascent azimuth background-attachment background-color background-image background-position background-repeat background baseline bbox border-collapse border-color border-spacing border-style border-top border-right border-bottom border-left border-top-color border-right-color border-bottom-color border-left-color border-top-style border-right-style border-bottom-style border-left-style border-top-width border-right-width border-bottom-width border-left-width border-width border bottom cap-height caption-side centerline clear clip color content counter-increment counter-reset cue-after cue-before cue cursor definition-src descent direction display elevation empty-cells float font-size-adjust font-family font-size font-stretch font-style font-variant font-weight font height left letter-spacing line-height list-style-image list-style-position list-style-type list-style margin-top margin-right margin-bottom margin-left margin marker-offset marks mathline max-height max-width min-height min-width orphans outline-color outline-style outline-width outline overflow padding-top padding-right padding-bottom padding-left padding page page-break-after page-break-before page-break-inside pause pause-after pause-before pitch pitch-range play-during position quotes right richness size slope src speak-header speak-numeral speak-punctuation speak speech-rate stemh stemv stress table-layout text-align top text-decoration text-indent text-shadow text-transform unicode-bidi unicode-range units-per-em vertical-align visibility voice-family volume white-space widows width widths word-spacing x-height z-index",i="above absolute all always aqua armenian attr aural auto avoid baseline behind below bidi-override black blink block blue bold bolder both bottom braille capitalize caption center center-left center-right circle close-quote code collapse compact condensed continuous counter counters crop cross crosshair cursive dashed decimal decimal-leading-zero digits disc dotted double embed embossed e-resize expanded extra-condensed extra-expanded fantasy far-left far-right fast faster fixed format fuchsia gray green groove handheld hebrew help hidden hide high higher icon inline-table inline inset inside invert italic justify landscape large larger left-side left leftwards level lighter lime line-through list-item local loud lower-alpha lowercase lower-greek lower-latin lower-roman lower low ltr marker maroon medium message-box middle mix move narrower navy ne-resize no-close-quote none no-open-quote no-repeat normal nowrap n-resize nw-resize oblique olive once open-quote outset outside overline pointer portrait pre print projection purple red relative repeat repeat-x repeat-y rgb ridge right right-side rightwards rtl run-in screen scroll semi-condensed semi-expanded separate se-resize show silent silver slower slow small small-caps small-caption smaller soft solid speech spell-out square s-resize static status-bar sub super sw-resize table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group teal text-bottom text-top thick thin top transparent tty tv ultra-condensed ultra-expanded underline upper-alpha uppercase upper-latin upper-roman url visible wait white wider w-resize x-fast x-high x-large x-loud x-low x-slow x-small x-soft xx-large xx-small yellow",n="[mM]onospace [tT]ahoma [vV]erdana [aA]rial [hH]elvetica [sS]ans-serif [sS]erif [cC]ourier mono sans serif",s="!important !default",a="@import @extend @debug @warn @if @for @while @mixin @include",o=SyntaxHighlighter.regexLib;this.regexList=[{regex:o.multiLineCComments,css:"comments"},{regex:o.singleLineCComments,css:"comments"},{regex:o.doubleQuotedString,css:"string"},{regex:o.singleQuotedString,css:"string"},{regex:/\#[a-fA-F0-9]{3,6}/g,css:"value"},{regex:/\b(-?\d+)(\.\d+)?(px|em|pt|\:|\%|)\b/g,css:"value"},{regex:/\$\w+/g,css:"variable"},{regex:new RegExp(this.getKeywords(s),"g"),css:"color3"},{regex:new RegExp(this.getKeywords(a),"g"),css:"preprocessor"},{regex:new RegExp(e(r),"gm"),css:"keyword"},{regex:new RegExp(t(i),"g"),css:"value"},{regex:new RegExp(this.getKeywords(n),"g"),css:"color1"}]}SyntaxHighlighter=SyntaxHighlighter||("undefined"!=typeof require?require("shCore").SyntaxHighlighter:null),e.prototype=new SyntaxHighlighter.Highlighter,e.aliases=["sass","scss"],SyntaxHighlighter.brushes.Sass=e,"undefined"!=typeof exports?exports.Brush=e:null}(),function(){function e(){var e="val sealed case def true trait implicit forSome import match object null finally super override try lazy for var catch throw type extends class while with new final yield abstract else do if return protected private this package false",t="[_:=><%#@]+";this.regexList=[{regex:SyntaxHighlighter.regexLib.singleLineCComments,css:"comments"},{regex:SyntaxHighlighter.regexLib.multiLineCComments,css:"comments"},{regex:SyntaxHighlighter.regexLib.multiLineSingleQuotedString,css:"string"},{regex:SyntaxHighlighter.regexLib.multiLineDoubleQuotedString,css:"string"},{regex:SyntaxHighlighter.regexLib.singleQuotedString,css:"string"},{regex:/0x[a-f0-9]+|\d+(\.\d+)?/gi,css:"value"},{regex:new RegExp(this.getKeywords(e),"gm"),css:"keyword"},{regex:new RegExp(t,"gm"),css:"keyword"}]}SyntaxHighlighter=SyntaxHighlighter||("undefined"!=typeof require?require("shCore").SyntaxHighlighter:null),e.prototype=new SyntaxHighlighter.Highlighter,e.aliases=["scala"],SyntaxHighlighter.brushes.Scala=e,"undefined"!=typeof exports?exports.Brush=e:null}(),function(){function e(){var e="abs avg case cast coalesce convert count current_timestamp current_user day isnull left lower month nullif replace right session_user space substring sum system_user upper user year",t="absolute action add after alter as asc at authorization begin bigint binary bit by cascade char character check checkpoint close collate column commit committed connect connection constraint contains continue create cube current current_date current_time cursor database date deallocate dec decimal declare default delete desc distinct double drop dynamic else end end-exec escape except exec execute false fetch first float for force foreign forward free from full function global goto grant group grouping having hour ignore index inner insensitive insert instead int integer intersect into is isolation key last level load local max min minute modify move name national nchar next no numeric of off on only open option order out output partial password precision prepare primary prior privileges procedure public read real references relative repeatable restrict return returns revoke rollback rollup rows rule schema scroll second section select sequence serializable set size smallint static statistics table temp temporary then time timestamp to top transaction translation trigger true truncate uncommitted union unique update values varchar varying view when where with work",r="all and any between cross in join like not null or outer some";this.regexList=[{regex:/--(.*)$/gm,css:"comments"},{regex:SyntaxHighlighter.regexLib.multiLineDoubleQuotedString,css:"string"},{regex:SyntaxHighlighter.regexLib.multiLineSingleQuotedString,css:"string"},{regex:new RegExp(this.getKeywords(e),"gmi"),css:"color2"},{regex:new RegExp(this.getKeywords(r),"gmi"),css:"color1"},{regex:new RegExp(this.getKeywords(t),"gmi"),css:"keyword"}]}SyntaxHighlighter=SyntaxHighlighter||("undefined"!=typeof require?require("shCore").SyntaxHighlighter:null),e.prototype=new SyntaxHighlighter.Highlighter,e.aliases=["sql"],SyntaxHighlighter.brushes.Sql=e,"undefined"!=typeof exports?exports.Brush=e:null}(),function(){function e(){var e="AddHandler AddressOf AndAlso Alias And Ansi As Assembly Auto Boolean ByRef Byte ByVal Call Case Catch CBool CByte CChar CDate CDec CDbl Char CInt Class CLng CObj Const CShort CSng CStr CType Date Decimal Declare Default Delegate Dim DirectCast Do Double Each Else ElseIf End Enum Erase Error Event Exit False Finally For Friend Function Get GetType GoSub GoTo Handles If Implements Imports In Inherits Integer Interface Is Let Lib Like Long Loop Me Mod Module MustInherit MustOverride MyBase MyClass Namespace New Next Not Nothing NotInheritable NotOverridable Object On Option Optional Or OrElse Overloads Overridable Overrides ParamArray Preserve Private Property Protected Public RaiseEvent ReadOnly ReDim REM RemoveHandler Resume Return Select Set Shadows Shared Short Single Static Step Stop String Structure Sub SyncLock Then Throw To True Try TypeOf Unicode Until Variant When While With WithEvents WriteOnly Xor";this.regexList=[{regex:/'.*$/gm,css:"comments"},{regex:SyntaxHighlighter.regexLib.doubleQuotedString,css:"string"},{regex:/^\s*#.*$/gm,css:"preprocessor"},{regex:new RegExp(this.getKeywords(e),"gm"),css:"keyword"}],this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags)}SyntaxHighlighter=SyntaxHighlighter||("undefined"!=typeof require?require("shCore").SyntaxHighlighter:null),e.prototype=new SyntaxHighlighter.Highlighter,e.aliases=["vb","vbnet"],SyntaxHighlighter.brushes.Vb=e,"undefined"!=typeof exports?exports.Brush=e:null}(),function(){function e(){function e(e,t){var r=SyntaxHighlighter.Match,i=e[0],n=new XRegExp("(<|<)[\\s\\/\\?]*(?[:\\w-\\.]+)","xg").exec(i),s=[];if(null!=e.attributes)for(var a,o=new XRegExp("(? [\\w:\\-\\.]+)\\s*=\\s*(? \".*?\"|'.*?'|\\w+)","xg");null!=(a=o.exec(i));)s.push(new r(a.name,e.index+a.index,"color1")),s.push(new r(a.value,e.index+a.index+a[0].indexOf(a.value),"string"));return null!=n&&s.push(new r(n.name,e.index+n[0].indexOf(n.name),"keyword")),s}this.regexList=[{regex:new XRegExp("(\\<|<)\\!\\[[\\w\\s]*?\\[(.|\\s)*?\\]\\](\\>|>)","gm"),css:"color2"},{regex:SyntaxHighlighter.regexLib.xmlComments,css:"comments"},{regex:new XRegExp("(<|<)[\\s\\/\\?]*(\\w+)(?.*?)[\\s\\/\\?]*(>|>)","sg"),func:e}]}SyntaxHighlighter=SyntaxHighlighter||("undefined"!=typeof require?require("shCore").SyntaxHighlighter:null),e.prototype=new SyntaxHighlighter.Highlighter,e.aliases=["xml","xhtml","xslt","html"],SyntaxHighlighter.brushes.Xml=e,"undefined"!=typeof exports?exports.Brush=e:null}(); \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/SyntaxHighlighter/shCoreDefault.css b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/SyntaxHighlighter/shCoreDefault.css new file mode 100644 index 0000000..24753a2 --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/SyntaxHighlighter/shCoreDefault.css @@ -0,0 +1,2 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + .syntaxhighlighter,.syntaxhighlighter a,.syntaxhighlighter caption,.syntaxhighlighter code,.syntaxhighlighter div,.syntaxhighlighter tbody,.syntaxhighlighter td,.syntaxhighlighter textarea,.syntaxhighlighter thead,.syntaxhighlighter tr{-moz-border-radius:0!important;-webkit-border-radius:0!important;background:0 0!important;border:0!important;bottom:auto!important;float:none!important;left:auto!important;line-height:1.1em!important;margin:0!important;outline:0!important;overflow:visible!important;padding:0!important;position:static!important;right:auto!important;text-align:left!important;top:auto!important;vertical-align:baseline!important;width:auto!important;box-sizing:content-box!important;font-family:Monaco,Menlo,Consolas,"Courier New",monospace;font-weight:400!important;font-style:normal!important;min-height:inherit!important;min-height:auto!important;font-size:13px!important}.syntaxhighlighter,.syntaxhighlighter td.code .container{position:relative!important}.syntaxhighlighter .bold,.syntaxhighlighter .keyword,.syntaxhighlighter .script,.syntaxhighlighter.printing .keyword,.syntaxhighlighter.printing .script{font-weight:700!important}.syntaxhighlighter{width:100%!important;margin:.3em 0!important;overflow:auto!important;border:1px solid #ccc!important;border-radius:4px!important;border-collapse:separate!important}.syntaxhighlighter.source{overflow:hidden!important}.syntaxhighlighter .italic{font-style:italic!important}.syntaxhighlighter .gutter div{white-space:pre!important;word-wrap:normal}.syntaxhighlighter caption{text-align:left!important;padding:.5em 0 .5em 1em!important}.syntaxhighlighter td.code{width:100%!important}.syntaxhighlighter td.code .container textarea{box-sizing:border-box!important;position:absolute!important;left:0!important;top:0!important;width:100%!important;border:none!important;background:#fff!important;padding-left:1em!important;overflow:hidden!important;white-space:pre!important}.syntaxhighlighter td.gutter .line{text-align:right!important;padding:0 .5em 0 1em!important}.syntaxhighlighter td.code .line{padding:0 1em!important}.syntaxhighlighter.nogutter td.code .container textarea,.syntaxhighlighter.nogutter td.code .line{padding-left:0!important}.syntaxhighlighter.show{display:block!important}.syntaxhighlighter.collapsed table{display:none!important}.syntaxhighlighter.collapsed .toolbar{padding:.1em .8em 0!important;font-size:1em!important;position:static!important;width:auto!important}.syntaxhighlighter.collapsed .toolbar span{display:inline!important;margin-right:1em!important}.syntaxhighlighter.collapsed .toolbar span a{padding:0!important;display:none!important}.syntaxhighlighter .toolbar span.title,.syntaxhighlighter.collapsed .toolbar span a.expandSource{display:inline!important}.syntaxhighlighter .toolbar{position:absolute!important;right:1px!important;top:1px!important;width:11px!important;height:11px!important;font-size:10px!important;z-index:10!important}.syntaxhighlighter .toolbar a{display:block!important;text-align:center!important;text-decoration:none!important;padding-top:1px!important}.syntaxhighlighter .toolbar a.expandSource,.syntaxhighlighter.printing .toolbar{display:none!important}.syntaxhighlighter.ie{font-size:.9em!important;padding:1px 0!important}.syntaxhighlighter.ie .toolbar{line-height:8px!important}.syntaxhighlighter.ie .toolbar a{padding-top:0!important}.syntaxhighlighter.printing .line.alt1 .content,.syntaxhighlighter.printing .line.alt2 .content,.syntaxhighlighter.printing .line.highlighted .number,.syntaxhighlighter.printing .line.highlighted.alt1 .content,.syntaxhighlighter.printing .line.highlighted.alt2 .content{background:0 0!important}.syntaxhighlighter.printing .line .number{color:#bbb!important}.syntaxhighlighter.printing .line .content,.syntaxhighlighter.printing .plain,.syntaxhighlighter.printing .plain a{color:#000!important}.syntaxhighlighter.printing a{text-decoration:none!important}.syntaxhighlighter.printing .comments,.syntaxhighlighter.printing .comments a{color:#008200!important}.syntaxhighlighter.printing .string,.syntaxhighlighter.printing .string a{color:#00f!important}.syntaxhighlighter.printing .keyword{color:#ff7800!important}.syntaxhighlighter.printing .preprocessor{color:gray!important}.syntaxhighlighter.printing .variable{color:#a70!important}.syntaxhighlighter.printing .value{color:#090!important}.syntaxhighlighter.printing .functions{color:#ff1493!important}.syntaxhighlighter.printing .constants{color:#06c!important}.syntaxhighlighter.printing .color1,.syntaxhighlighter.printing .color1 a{color:gray!important}.syntaxhighlighter.printing .color2,.syntaxhighlighter.printing .color2 a{color:#ff1493!important}.syntaxhighlighter.printing .color3,.syntaxhighlighter.printing .color3 a{color:red!important}.syntaxhighlighter .line.highlighted.number,.syntaxhighlighter caption,.syntaxhighlighter.printing .break,.syntaxhighlighter.printing .break a{color:#000!important}.syntaxhighlighter{background-color:#f5f5f5!important}.syntaxhighlighter .gutter{color:#afafaf!important;background-color:#f7f7f9!important;border-right:1px solid #e1e1e8!important;padding:9.5px 0 9.5px 9.5px!important;border-top-left-radius:4px!important;border-bottom-left-radius:4px!important;user-select:none!important;-moz-user-select:none!important;-webkit-user-select:none!important}.syntaxhighlighter .gutter .line.highlighted{background-color:#6ce26c!important;color:#fff!important}.syntaxhighlighter.printing .line .content{border:none!important}.syntaxhighlighter.collapsed{overflow:visible!important}.syntaxhighlighter.collapsed .toolbar{color:#00f!important;background:#fff!important;border:1px solid #6ce26c!important}.syntaxhighlighter.collapsed .toolbar a{color:#00f!important}.syntaxhighlighter.collapsed .toolbar a:hover{color:red!important}.syntaxhighlighter .toolbar{color:#fff!important;background:#6ce26c!important;border:none!important}.syntaxhighlighter .toolbar a{color:#fff!important}.syntaxhighlighter .plain,.syntaxhighlighter .plain a,.syntaxhighlighter .toolbar a:hover{color:#000!important}.syntaxhighlighter .comments,.syntaxhighlighter .comments a{color:#008200!important}.syntaxhighlighter .string,.syntaxhighlighter .string a{color:#00f!important}.syntaxhighlighter .keyword{color:#ff7800!important}.syntaxhighlighter .preprocessor{color:gray!important}.syntaxhighlighter .variable{color:#a70!important}.syntaxhighlighter .value{color:#090!important}.syntaxhighlighter .functions{color:#ff1493!important}.syntaxhighlighter .constants{color:#06c!important}.syntaxhighlighter .script{color:#ff7800!important;background-color:none!important}.syntaxhighlighter .color1,.syntaxhighlighter .color1 a{color:gray!important}.syntaxhighlighter .color2,.syntaxhighlighter .color2 a{color:#ff1493!important}.syntaxhighlighter .color3,.syntaxhighlighter .color3 a{color:red!important} \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/codemirror/codemirror.css b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/codemirror/codemirror.css new file mode 100644 index 0000000..1d48c9d --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/codemirror/codemirror.css @@ -0,0 +1,2 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + .CodeMirror{line-height:1em;font-family:monospace}.CodeMirror-scroll{overflow:auto;height:300px;position:relative}.CodeMirror-gutter{position:absolute;left:0;top:0;z-index:10;background-color:#f7f7f7;border-right:1px solid #eee;min-width:2em;height:100%}.CodeMirror-gutter-text{color:#aaa;text-align:right;padding:.4em .2em .4em .4em;white-space:pre!important}.CodeMirror-lines{padding:.4em}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;-o-border-radius:0;border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;padding:0;margin:0;white-space:pre;word-wrap:normal}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap}.CodeMirror-wrap .CodeMirror-scroll{overflow-x:hidden}.CodeMirror textarea{outline:0!important}.CodeMirror pre.CodeMirror-cursor{z-index:10;position:absolute;visibility:hidden;border-left:1px solid #000}.CodeMirror-focused pre.CodeMirror-cursor{visibility:visible}span.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused span.CodeMirror-selected{background:#d2dcf8}.CodeMirror-searching{background:#ffa}.cm-s-default span.cm-keyword{color:#708}.cm-s-default span.cm-atom{color:#219}.cm-s-default span.cm-number{color:#164}.cm-s-default span.cm-def{color:#00f}.cm-s-default span.cm-variable{color:#000}.cm-s-default span.cm-variable-2{color:#05a}.cm-s-default span.cm-variable-3{color:#085}.cm-s-default span.cm-operator,.cm-s-default span.cm-property{color:#000}.cm-s-default span.cm-comment{color:#a50}.cm-s-default span.cm-string{color:#a11}.cm-s-default span.cm-string-2{color:#f50}.cm-s-default span.cm-meta{color:#555}.cm-s-default span.cm-error{color:red}.cm-s-default span.cm-qualifier{color:#555}.cm-s-default span.cm-builtin{color:#30a}.cm-s-default span.cm-bracket{color:#cc7}.cm-s-default span.cm-tag{color:#170}.cm-s-default span.cm-attribute{color:#00c}.cm-s-default span.cm-header{color:#a0a}.cm-s-default span.cm-quote{color:#090}.cm-s-default span.cm-hr{color:#999}.cm-s-default span.cm-link{color:#00c}span.cm-header,span.cm-strong{font-weight:700}span.cm-em{font-style:italic}span.cm-emstrong{font-style:italic;font-weight:700}span.cm-link{text-decoration:underline}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22} \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/codemirror/codemirror.js b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/codemirror/codemirror.js new file mode 100644 index 0000000..8eb9520 --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/codemirror/codemirror.js @@ -0,0 +1,3 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + ;var CodeMirror=function(){function t(o,u){function v(t){return t>=0&&t<$e.size}function k(t){return h($e,t)}function L(t,e){sn=!0;for(var n=e-t.height,r=t;r;r=r.parent)r.height+=n}function A(t){var e={line:0,ch:0};lt(e,{line:$e.size-1,ch:k($e.size-1).text.length},X(t),e,e),en=!0}function P(t){var e=[];return $e.iter(0,$e.size,function(t){e.push(t.text)}),e.join("\n")}function U(t){function e(t){var n=me(t,!0);if(n&&!E(n,l)){_e||it(),l=n,Wt(r,n),en=!1;var i=bt();(n.line>=i.to||n.linei-400&&E(Qe.pos,r))return y(t),setTimeout(kt,20),Kt(r.line);if(Je&&Je.time>i-400&&E(Je.pos,r))return Qe={time:i,pos:r},y(t),Vt(r);Je={time:i,pos:r};var o,l=r;if(F&&!E(hn.from,hn.to)&&!W(r,hn.from)&&!W(hn.to,r)){Y&&(Ue.draggable=!0);var a=b(Ee,"mouseup",Le(function(e){Y&&(Ue.draggable=!1),tn=!1,a(),Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)<10&&(y(e),Ht(r.line,r.ch,!0),kt())}),!0);return void(tn=!0)}y(t),Ht(r.line,r.ch,!0);var s=b(Ee,"mousemove",Le(function(t){clearTimeout(o),y(t),e(t)}),!0),a=b(Ee,"mouseup",Le(function(t){clearTimeout(o);var e=me(t);e&&Wt(r,e),y(t),kt(),en=!0,s(),a()}),!0)}function _(t){for(var e=w(t);e!=We;e=e.parentNode)if(e.parentNode==Pe)return y(t);var n=me(t);n&&(Qe={time:+new Date,pos:n},y(t),Vt(n))}function J(t){function e(t,e){var r=new FileReader;r.onload=function(){o[e]=r.result,++l==i&&(n=Ot(n),Le(function(){var t=ct(o.join(""),n,n);Wt(n,t)})())},r.readAsText(t)}t.preventDefault();var n=me(t,!0),r=t.dataTransfer.files;if(n&&!Ae.readOnly)if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,o=Array(i),l=0,a=0;a-1&&setTimeout(Le(function(){jt(hn.to.line,"smart")}),75)}vt()}}function rt(t){Ae.onKeyEvent&&Ae.onKeyEvent(wn,x(t))||16==t.keyCode&&(Ze=null)}function it(){Ae.readOnly||(_e||(Ae.onFocus&&Ae.onFocus(wn),_e=!0,We.className.search(/\bCodeMirror-focused\b/)==-1&&(We.className+=" CodeMirror-focused"),an||yt(!0)),gt(),ve())}function ot(){_e&&(Ae.onBlur&&Ae.onBlur(wn),_e=!1,We.className=We.className.replace(" CodeMirror-focused","")),clearInterval(je),setTimeout(function(){_e||(Ze=null)},150)}function lt(t,e,n,r,i){if(kn){var o=[];for($e.iter(t.line,e.line+1,function(t){o.push(t.text)}),kn.addChange(t.line,n.length,o);kn.done.length>Ae.undoDepth;)kn.done.shift()}ft(t,e,n,r,i)}function at(t,e){var n=t.pop();if(n){var r=[],i=n.start+n.added;$e.iter(n.start,i,function(t){r.push(t.text)}),e.push({start:n.start,added:n.old.length,old:r});var o=Ot({line:n.start+n.old.length-1,ch:H(r[r.length-1],n.old[n.old.length-1])});ft({line:n.start,ch:0},{line:i-1,ch:k(i-1).text.length},n.old,o,o),en=!0}}function st(){at(kn.done,kn.undone)}function ut(){at(kn.undone,kn.done)}function ft(t,e,n,r,i){function o(t){return t<=Math.min(e.line,e.line+x)?t:t+x}var l=!1,a=xn.length;Ae.lineWrapping||$e.iter(t.line,e.line,function(t){if(t.text.length==a)return l=!0,!0}),(t.line!=e.line||n.length>1)&&(sn=!0);var u=e.line-t.line,f=k(t.line),c=k(e.line);if(0==t.ch&&0==e.ch&&""==n[n.length-1]){var h=[],d=null;t.line?(d=k(t.line-1),d.fixMarkEnds(c)):c.fixMarkStarts();for(var p=0,m=n.length-1;p1&&$e.remove(t.line+1,u-1,un),$e.insert(t.line+1,h)}if(Ae.lineWrapping){var g=He.clientWidth/he()-3;$e.iter(t.line,t.line+n.length,function(t){if(!t.hidden){var e=Math.ceil(t.text.length/g)||1;e!=t.height&&L(t,e)}})}else $e.iter(t.line,p+n.length,function(t){var e=t.text;e.length>a&&(xn=e,a=e.length,cn=null,l=!1)}),l&&(a=0,xn="",cn=null,$e.iter(0,$e.size,function(t){var e=t.text;e.length>a&&(a=e.length,xn=e)}));for(var v=[],x=n.length-u-1,p=0,y=Ye.length;pe.line&&v.push(C+x)}var w=t.line+Math.min(n.length,500);Ce(t.line,w),v.push(w),Ye=v,Me(100),rn.push({from:t.line,to:e.line+1,diff:x});var M={from:t,to:e,text:n};if(on){for(var b=on;b.next;b=b.next);b.next=M}else on=M;Nt(r,i,o(hn.from.line),o(hn.to.line)),Ie.style.height=$e.height*ce()+2*de()+"px"}function ct(t,e,n){function r(r){if(W(r,e))return r;if(!W(n,r))return i;var o=r.line+t.length-(n.line-e.line)-1,l=r.ch;return r.line==n.line&&(l+=t[t.length-1].length-(n.ch-(n.line==e.line?e.ch:0))),{line:o,ch:l}}e=Ot(e),n=n?Ot(n):e,t=X(t);var i;return dt(t,e,n,function(t){return i=t,{from:r(hn.from),to:r(hn.to)}}),i}function ht(t,e){dt(X(t),hn.from,hn.to,function(t){return"end"==e?{from:t,to:t}:"start"==e?{from:hn.from,to:hn.from}:{from:hn.from,to:t}})}function dt(t,e,n,r){var i=1==t.length?t[0].length+e.ch:t[t.length-1].length,o=r({line:e.line+t.length-1,ch:i});lt(e,n,t,o.from,o.to)}function pt(t,e){var n=t.line,r=e.line;if(n==r)return k(n).text.slice(t.ch,e.ch);var i=[k(n).text.slice(t.ch)];return $e.iter(n+1,r,function(t){i.push(t.text)}),i.push(k(r).text.slice(0,e.ch)),i.join("\n")}function mt(){return pt(hn.from,hn.to)}function gt(){bn||qe.set(Ae.pollInterval,function(){be(),xt(),_e&>(),Se()})}function vt(){function t(){be();var n=xt();n||e?(bn=!1,gt()):(e=!0,qe.set(60,t)),Se()}var e=!1;bn=!0,qe.set(20,t)}function xt(){if(an||!_e||$(De))return!1;var t=De.value;if(t==Sn)return!1;Ze=null;for(var e=0,n=Math.min(Sn.length,t.length);ee)&&Ve.scrollIntoView()}}}function wt(){var t=se(hn.inverted?hn.from:hn.to),e=Ae.lineWrapping?Math.min(t.x,Ue.offsetWidth):t.x;return Mt(e,t.y,e,t.yBot)}function Mt(t,e,n,r){var i=pe(),o=de(),l=ce();e+=o,r+=o,t+=i,n+=i;var a=He.clientHeight,s=He.scrollTop,u=!1,f=!0;es+a&&(He.scrollTop=r+l-a,u=!0);var c=He.clientWidth,h=He.scrollLeft,d=Ae.fixedGutter?Re.clientWidth:0;return tc+h-3&&(He.scrollLeft=n+10-c,u=!0,n>Ie.clientWidth&&(f=!1)),u&&Ae.onScroll&&Ae.onScroll(wn),f}function bt(){var t=ce(),e=He.scrollTop-de(),n=Math.max(0,Math.floor(e/t)),r=Math.ceil((e+He.clientHeight)/t);return{from:p($e,n),to:p($e,r)}}function St(t,e){if(!He.clientWidth)return void(mn=gn=pn=0);var n=bt();if(!(t!==!0&&0==t.length&&n.from>=mn&&n.to<=gn)){var r=Math.max(n.from-100,0),i=Math.min($e.size,n.to+100);mni&&gn-i<20&&(i=Math.min($e.size,gn));for(var o=t===!0?[]:Lt([{from:mn,to:gn,domStart:0}],t),l=0,a=0;ai&&(s.to=i),s.from>=s.to?o.splice(a--,1):l+=s.to-s.from}if(l!=i-r){o.sort(function(t,e){return t.domStart-e.domStart});var u=ce(),f=Re.style.display;Ke.style.display=Re.style.display="none",At(r,i,o),Ke.style.display="";var c=r!=mn||i!=gn||vn!=He.clientHeight+u;if(c&&(vn=He.clientHeight+u),mn=r,gn=i,pn=m($e,r),Oe.style.top=pn*u+"px",Ie.style.height=$e.height*u+2*de()+"px",Ke.childNodes.length!=gn-mn)throw new Error("BAD PATCH! "+JSON.stringify(o)+" size="+(gn-mn)+" nodes="+Ke.childNodes.length);if(Ae.lineWrapping){cn=He.clientWidth;var h=Ke.firstChild;$e.iter(mn,gn,function(t){if(!t.hidden){var e=Math.round(h.offsetHeight/u)||1;t.height!=e&&(L(t,e),sn=!0)}h=h.nextSibling})}else null==cn&&(cn=le(xn)),cn>He.clientWidth?(Ue.style.width=cn+"px",Ie.style.width="",Ie.style.width=He.scrollWidth+"px"):Ue.style.width=Ie.style.width="";return Re.style.display=f,(c||sn)&&zt(),Tt(),!e&&Ae.onUpdate&&Ae.onUpdate(wn),!0}}}function Lt(t,e){for(var n=0,r=e.length||0;n=u.to?o.push(u):(i.from>u.from&&o.push({from:u.from,to:i.from,domStart:u.domStart}),i.toi;)o=r(o),i++;for(var s=0,u=a.to-a.from;s=t,p=Ee.createElement("div");$e.iter(t,e,function(t){var e=null,r=null;d?(e=0,h==s&&(d=!1,r=hn.to.ch)):c==s&&(h==s?(e=hn.from.ch,r=hn.to.ch):(d=!0,e=hn.from.ch)),f&&f.to==s&&(f=n.shift()),!f||f.from>s?(t.hidden?p.innerHTML="
            ":p.innerHTML=t.getHTML(e,r,!0,yn),Ke.insertBefore(p.firstChild,o)):o=o.nextSibling,++s})}function zt(){if(Ae.gutter||Ae.lineNumbers){var t=Oe.offsetHeight,e=He.clientHeight;Re.style.height=(t-e<2?e:t)+"px";var n=[],r=mn;$e.iter(mn,Math.max(gn,mn+1),function(t){if(t.hidden)n.push("
            ");else{var e=t.gutterMarker,i=Ae.lineNumbers?r+Ae.firstLineNumber:null;e&&e.text?i=e.text.replace("%N%",null!=i?i:""):null==i&&(i=" "),n.push(e&&e.style?'
            ':"
            ",i);for(var o=1;o ");n.push("
            ")}++r}),Re.style.display="none",Pe.innerHTML=n.join("");for(var i=String($e.size).length,o=Pe.firstChild,l=T(o),a="";l.length+a.lengthn||l>o.text.length)&&(l=o.text.length),{line:r,ch:l}}r+=e}}var i=k(t.line);return i.hidden?t.line>=e?r(1)||r(-1):r(-1)||r(1):t}function Ht(t,e,n){var r=Ot({line:t,ch:e||0});(n?Wt:Nt)(r,r)}function It(t){return Math.max(0,Math.min(t,$e.size-1))}function Ot(t){if(t.line<0)return{line:0,ch:0};if(t.line>=$e.size)return{line:$e.size-1,ch:k($e.size-1).text.length};var e=t.ch,n=k(t.line).text.length;return null==e||e>n?{line:t.line,ch:n}:e<0?{line:t.line,ch:0}:t}function Rt(t,e){function n(){for(var e=o+t,n=t<0?-1:$e.size;e!=n;e+=t){var r=k(e);if(!r.hidden)return o=e,a=r,!0}}function r(e){if(l==(t<0?0:a.text.length)){if(e||!n())return!1;l=t<0?a.text.length:0}else l+=t;return!0}var i=hn.inverted?hn.from:hn.to,o=i.line,l=i.ch,a=k(o);if("char"==e)r();else if("column"==e)r(!0);else if("word"==e)for(var s=!1;!(t<0)||r();){if(O(a.text.charAt(l)))s=!0;else if(s){t<0&&(t=1,r());break}if(t>0&&!r())break}return{line:o,ch:l}}function Pt(t,e){var n=t<0?hn.from:hn.to;(Ze||E(hn.from,hn.to))&&(n=Rt(t,e)),Ht(n.line,n.ch,!0)}function Ut(t,e){E(hn.from,hn.to)?t<0?ct("",Rt(t,e),hn.to):ct("",hn.from,Rt(t,e)):ct("",hn.from,hn.to),nn=!0}function Bt(t,e){var n=0,r=se(hn.inverted?hn.from:hn.to,!0);null!=Ln&&(r.x=Ln),"page"==e?n=He.clientHeight:"line"==e&&(n=ce());var i=ue(r.x,r.y+n*t+2);Ht(i.line,i.ch,!0),Ln=r.x}function Vt(t){for(var e=k(t.line).text,n=t.ch,r=t.ch;n>0&&O(e.charAt(n-1));)--n;for(;rxn.length&&(xn=t.text)});rn.push({from:0,to:$e.size})}function qt(){for(var t='',e=0;e"}function Xt(){yn=qt(),St(!0)}function $t(){He.className=He.className.replace(/\s*cm-s-\w+/g,"")+Ae.theme.replace(/(^|\s)\s*/g," cm-s-")}function Zt(){this.set=[]}function Jt(t,e,n){function r(t,e,n,r){k(t).addMark(new l(e,n,r,i.set))}t=Ot(t),e=Ot(e);var i=new Zt;if(t.line==e.line)r(t.line,t.ch,e.ch,n);else{r(t.line,t.ch,null,n);for(var o=t.line+1,a=e.line;o"+t.getHTML(null,null,!1,yn,e)+''+D(t.text.charAt(e)||" ")+""+n+"
            ";var i=document.getElementById("CodeMirror-temp-"+Wn),o=i.offsetTop,l=i.offsetLeft;if(G&&e&&0==o&&0==l){var a=document.createElement("span");a.innerHTML="x",i.parentNode.insertBefore(a,i.nextSibling),o=a.offsetTop}return{top:o,left:l}}function se(t,e){var n,r=ce(),i=r*(m($e,t.line)-(e?pn:0));if(0==t.ch)n=0;else{var o=ae(k(t.line),t.ch);n=o.left,Ae.lineWrapping&&(i+=Math.max(0,o.top))}return{x:n,y:i,yBot:i+r}}function ue(t,e){function n(t){var e=ae(a,t);if(u){var n=Math.round(e.top/r);return Math.max(0,e.left+(n-f)*He.clientWidth)}return e.left}e<0&&(e=0);var r=ce(),i=he(),o=pn+Math.floor(e/r),l=p($e,o);if(l>=$e.size)return{line:$e.size-1,ch:k($e.size-1).text.length};var a=k(l),s=a.text,u=Ae.lineWrapping,f=u?o-m($e,l):0;if(t<=0&&0==f)return{line:l,ch:0};for(var c,h=0,d=0,g=s.length,v=Math.min(g,Math.ceil((t+f*He.clientWidth*.9)/i));;){var x=n(v);if(!(x<=t&&vc)return{line:l,ch:g};for(v=Math.floor(.8*g),x=n(v),xt-d?h:g};var y=Math.ceil((h+g)/2),C=n(y);C>t?(g=y,c=C):(h=y,d=C)}}function fe(t){var e=se(t,!0),n=z(Ue);return{x:n.left+e.x,y:n.top+e.y,yBot:n.top+e.yBot}}function ce(){if(null==Tn){Tn="
            ";for(var t=0;t<49;++t)Tn+="x
            ";Tn+="x
            "}var e=Ke.clientHeight;return e==zn?An:(zn=e,Be.innerHTML=Tn,An=Be.firstChild.offsetHeight/50||1,Be.innerHTML="",An)}function he(){return He.clientWidth==Nn?En:(Nn=He.clientWidth,En=le("x"))}function de(){return Ue.offsetTop}function pe(){return Ue.offsetLeft}function me(t,e){var n,r,i=z(He,!0);try{n=t.clientX,r=t.clientY}catch(t){return null}if(!e&&(n-i.left>He.clientWidth||r-i.top>He.clientHeight))return null;var o=z(Ue,!0);return ue(n-o.left,r-o.top)}function ge(t){function e(){var t=X(De.value).join("\n");t!=i&&Le(ht)(t,"end"),Ne.style.position="relative",De.style.cssText=r,an=!1,yt(!0),gt()}var n=me(t);if(n&&!window.opera){(E(hn.from,hn.to)||W(n,hn.from)||!W(n,hn.to))&&Le(Ht)(n.line,n.ch);var r=De.style.cssText;Ne.style.position="absolute",De.style.cssText="position: fixed; width: 30px; height: 30px; top: "+(t.clientY-5)+"px; left: "+(t.clientX-5)+"px; z-index: 1000; background: white; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",an=!0;var i=De.value=mt();if(kt(),De.select(),j){C(t);var o=b(window,"mouseup",function(){o(),setTimeout(e,20)},!0)}else setTimeout(e,50)}}function ve(){clearInterval(je);var t=!0;Ve.style.visibility="",je=setInterval(function(){Ve.style.visibility=(t=!t)?"":"hidden"},650)}function xe(t){function e(t,e,n){if(t.text)for(var r,i=t.styles,o=l?0:t.text.length-1,s=l?0:i.length-2,u=l?i.length:-2;s!=u;s+=2*a){var f=i[s];if(null==i[s+1]||i[s+1]==h){for(var c=l?0:f.length-1,m=l?f.length:-1;c!=m;c+=a,o+=a)if(o>=e&&o"==g.charAt(1)==l)d.push(r);else{if(d.pop()!=g.charAt(0))return{pos:o,match:!1};if(!d.length)return{pos:o,match:!0}}}}else o+=a*f.length}}var n=hn.inverted?hn.from:hn.to,r=k(n.line),i=n.ch-1,o=i>=0&&Dn[r.text.charAt(i)]||Dn[r.text.charAt(++i)];if(o){for(var l=(o.charAt(0),">"==o.charAt(1)),a=l?1:-1,s=r.styles,u=i+1,f=0,c=s.length;fi;--r){if(0==r)return 0;var o=k(r-1);if(o.stateAfter)return r;var l=o.indentation(Ae.tabSize);(null==n||e>l)&&(n=r-1,e=l)}return n}function ke(t){var e=ye(t),n=e&&k(e-1).stateAfter;return n=n?r(Ge,n):i(Ge),$e.iter(e,t,function(t){t.highlight(Ge,n,Ae.tabSize),t.stateAfter=r(Ge,n)}),e=$e.size)){var o=ye(n),l=o&&k(o-1).stateAfter;l=l?r(Ge,l):i(Ge);var a=0,s=Ge.compareStates,u=!1,f=o,c=!1;if($e.iter(f,$e.size,function(e){var i=e.stateAfter;if(+new Date>t)return Ye.push(f),Me(Ae.workDelay),u&&rn.push({from:n,to:f+1}),c=!0;var o=e.highlight(Ge,l,Ae.tabSize);if(o&&(u=!0),e.stateAfter=r(Ge,l),s){if(i&&s(i,l))return!0}else if(o===!1&&i){if(++a>3&&(!Ge.indent||Ge.indent(i,"")==Ge.indent(l,"")))return!0}else a=0;++f}),c)return;u&&rn.push({from:n,to:f+1})}}e&&Ae.onHighlightComplete&&Ae.onHighlightComplete(wn)}function Me(t){Ye.length&&Xe.set(t,Le(we))}function be(){en=nn=on=null,rn=[],ln=!1,un=[]}function Se(){var t,e=!1;ln&&(e=!wt()),rn.length?t=St(rn,!0):(ln&&Tt(),sn&&zt()),e&&wt(),ln&&(Ct(),ve()),_e&&!an&&(en===!0||en!==!1&&ln)&&yt(nn),ln&&Ae.matchBrackets&&setTimeout(Le(function(){fn&&(fn(),fn=null),E(hn.from,hn.to)&&xe(!1)}),20);var n=on,r=un;ln&&Ae.onCursorActivity&&Ae.onCursorActivity(wn),n&&Ae.onChange&&wn&&Ae.onChange(wn,n);for(var i=0;ia&&t.y>e.offsetHeight&&(o=t.y-e.offsetHeight),l+e.offsetWidth>s&&(l=s-e.offsetWidth)}e.style.top=o+de()+"px",e.style.left=e.style.right="","right"==i?(l=Ie.clientWidth-e.offsetWidth,e.style.right="0px"):("left"==i?l=0:"middle"==i&&(l=(Ie.clientWidth-e.offsetWidth)/2),e.style.left=l+pe()+"px"),n&&Mt(l,o,l+e.offsetWidth,o+e.offsetHeight)},lineCount:function(){return $e.size},clipPos:Ot,getCursor:function(t){return null==t&&(t=hn.inverted),N(t?hn.from:hn.to)},somethingSelected:function(){return!E(hn.from,hn.to)},setCursor:Le(function(t,e,n){null==e&&"number"==typeof t.line?Ht(t.line,t.ch,n):Ht(t,e,n)}),setSelection:Le(function(t,e,n){(n?Wt:Nt)(Ot(t),Ot(e||t))}),getLine:function(t){if(v(t))return k(t).text},getLineHandle:function(t){if(v(t))return k(t)},setLine:Le(function(t,e){v(t)&&ct(e,{line:t,ch:0},{line:t,ch:k(t).text.length})}),removeLine:Le(function(t){v(t)&&ct("",{line:t,ch:0},Ot({line:t+1,ch:0}))}),replaceRange:Le(ct),getRange:function(t,e){return pt(Ot(t),Ot(e))},execCommand:function(t){return V[t](wn)},moveH:Le(Pt),deleteH:Le(Ut),moveV:Le(Bt),toggleOverwrite:function(){dn=!dn},posFromIndex:function(t){var e,n=0;return $e.iter(0,$e.size,function(r){var i=r.text.length+1;return i>t?(e=t,!0):(t-=i,void++n)}),Ot({line:n,ch:e})},indexFromPos:function(t){if(t.line<0||t.ch<0)return 0;var e=t.ch;return $e.iter(0,t.line,function(t){e+=t.text.length+1}),e},operation:function(t){return Le(t)()},refresh:function(){St(!0)},getInputField:function(){return De},getWrapperElement:function(){return We},getScrollerElement:function(){return He},getGutterElement:function(){return Re}},Mn=null,bn=!1,Sn="",Ln=null;Zt.prototype.clear=Le(function(){for(var t=1/0,e=-(1/0),n=0,r=this.set.length;n",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"},Hn=0;for(var In in B)B.propertyIsEnumerable(In)&&!wn.propertyIsEnumerable(In)&&(wn[In]=B[In]);return wn}function e(t,e,n){function r(t,e,n){var i=e[t];if(null!=i)return i;if(null==n&&(n=e.fallthrough),null==n)return e.catchall;if("string"==typeof n)return r(t,K[n]);for(var o=0,l=n.length;ot&&r.push(a.slice(t-o,Math.min(a.length,e-o)),n[i+1]),s>=t&&(l=1)):1==l&&(s>e?r.push(a.slice(0,e-o),n[i+1]):r.push(a,n[i+1])),o=s}}function f(t){this.lines=t,this.parent=null;for(var e=0,n=t.length,r=0;e=0&&r>=0&&t.charAt(n)==e.charAt(r);--n,--r);return r+1}function I(t,e){if(t.indexOf)return t.indexOf(e);for(var n=0,r=t.length;n0&&e.ch=this.string.length},sol:function(){return 0==this.pos},peek:function(){return this.string.charAt(this.pos)},next:function(){if(this.pose},eatSpace:function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t},skipToEnd:function(){this.pos=this.string.length},skipTo:function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},backUp:function(t){this.pos-=t},column:function(){return L(this.string,this.start,this.tabSize)},indentation:function(){return L(this.string,null,this.tabSize)},match:function(t,e,n){function r(t){return n?t.toLowerCase():t}if("string"!=typeof t){var i=this.string.slice(this.pos).match(t);return i&&e!==!1&&(this.pos+=i[0].length),i}if(r(this.string).indexOf(r(t),this.pos)==this.pos)return e!==!1&&(this.pos+=t.length),!0},current:function(){return this.string.slice(this.start,this.pos)}},t.StringStream=o,l.prototype={attach:function(t){this.set.push(t)},detach:function(t){var e=I(this.set,t);e>-1&&this.set.splice(e,1)},split:function(t,e){if(this.to<=t&&null!=this.to)return null;var n=this.from=e&&(this.from=Math.max(r,this.from)+i),null!=this.to&&this.to>e&&(this.to=rthis.from&&(rthis.from||null==this.from)&&(this.to=null)},isDead:function(){return null!=this.from&&null!=this.to&&this.from>=this.to},sameSet:function(t){return this.set==t.set}},a.prototype={attach:function(t){this.line=t},detach:function(t){this.line==t&&(this.line=null)},split:function(t,e){if(tthis.to},clipTo:function(t,e,n,r,i){(t||ethis.to)?(this.from=0,this.to=-1):this.from>e&&(this.from=this.to=Math.max(r,this.from)+i)},sameSet:function(t){return!1},find:function(){return this.line&&this.line.parent?{line:d(this.line),ch:this.from}:null},clear:function(){if(this.line){var t=I(this.line.marked,this);t!=-1&&this.line.marked.splice(t,1),this.line=null}}},s.inheritMarks=function(t,e){var n=new s(t),r=e&&e.marked;if(r)for(var i=0;i5e3){l[a++]=this.text.slice(i.pos),l[a++]=null;break}}return l.length!=a&&(l.length=a,s=!0),a&&l[a-2]!=r&&(s=!0),s||l.length<5&&this.text.length<10&&null},getTokenAt:function(t,e,n){for(var r=this.text,i=new o(r);i.pos',D(t).replace(/\t/g,r),""):a.push(D(t).replace(/\t/g,r)))}function l(){c&&(v+=1,x=v':"
            ");var u=this.styles,f=this.text,c=this.marked;t==e&&(t=null);var h=f.length;if(null!=i&&(h=Math.min(i,h)),f||null!=i)if(c||null!=t){var d,p=0,m=0,g="",v=-1,x=null;for(l();pp?y=t:(null==e||e>p)&&(k=" CodeMirror-selected",null!=e&&(y=Math.min(y,e))));x&&null!=x.to&&x.to<=p;)l();for(x&&(x.from>p?y=Math.min(y,x.from):(k+=" "+x.style,null!=x.to&&(y=Math.min(y,x.to))));;){var C=p+g.length,w=d;if(k&&(w=d?d+k:k),o(C>y?g.slice(0,y-p):g,w),C>=y){g=g.slice(y-p),p=y;break}p=C,g=u[m++],d="cm-"+u[m++]}}null!=t&&null==e&&o(" ","CodeMirror-selected")}else for(var m=0,M=0;Mh&&(b=b.slice(0,h-M)),M+=S,o(b,d&&"cm-"+d)}else o(" ",null!=t&&null==e?"CodeMirror-selected":null);return n&&a.push("
            "),a.join("")},cleanUp:function(){if(this.parent=null,this.marked)for(var t=0,e=this.marked.length;t50){for(;o.lines.length>50;){var a=o.lines.splice(o.lines.length-25,25),s=new f(a);o.height-=s.height,this.children.splice(r+1,0,s),s.parent=this}this.maybeSpill()}break}t-=l}},maybeSpill:function(){if(!(this.children.length<=10)){var t=this;do{var e=t.children.splice(t.children.length-5,5),n=new c(e);if(t.parent){t.size-=n.size,t.height-=n.height;var r=I(t.parent.children,t);t.parent.children.splice(r+1,0,n)}else{var i=new c(t.children);i.parent=t,t.children=[i,n],t=i}n.parent=t.parent}while(t.children.length>10);t.parent.maybeSpill()}},iter:function(t,e,n){this.iterN(t,e-t,n)},iterN:function(t,e,n){for(var r=0,i=this.children.length;r400||!i||i.start>t+e||i.start+i.added=0;--l)i.old.unshift(n[l]);i.added+=i.start-t,i.start=t}else i.start-1&&(_="\r\n")}(),null!=document.documentElement.getBoundingClientRect&&(z=function(t,e){try{var n=t.getBoundingClientRect();n={top:n.top,left:n.left}}catch(r){n={top:0,left:0}}if(!e)if(null==window.pageYOffset){var i=document.documentElement||document.body.parentNode;null==i.scrollTop&&(i=document.body),n.top+=i.scrollTop,n.left+=i.scrollLeft}else n.top+=window.pageYOffset,n.left+=window.pageXOffset;return n});var q=document.createElement("pre");"\na"==D("a")?D=function(t){return q.textContent=t,q.innerHTML.slice(1)}:"\t"!=D("\t")&&(D=function(t){return q.innerHTML="",q.appendChild(document.createTextNode(t)),q.innerHTML}),t.htmlEscape=D;var X=3!="\n\nb".split(/\n/).length?function(t){for(var e,n=0,r=[];(e=t.indexOf("\n",n))>-1;)r.push(t.slice(n,"\r"==t.charAt(e-1)?e-1:e)),n=e+1;return r.push(t.slice(n)),r}:function(t){return t.split(/\r?\n/)};t.splitLines=X;var $=window.getSelection?function(t){try{return t.selectionStart!=t.selectionEnd}catch(e){return!1}}:function(t){try{var e=t.ownerDocument.selection.createRange()}catch(n){}return!(!e||e.parentElement()!=t)&&0!=e.compareEndPoints("StartToEnd",e)};t.defineMode("null",function(){return{token:function(t){t.skipToEnd()}}}),t.defineMIME("text/plain","null");var Z={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",91:"Mod",92:"Mod",93:"Mod",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63276:"PageUp",63277:"PageDown",63275:"End",63273:"Home",63234:"Left",63232:"Up",63235:"Right",63233:"Down",63302:"Insert",63272:"Delete"};return t.keyNames=Z,function(){for(var t=0;t<10;t++)Z[t+48]=String(t);for(var t=65;t<=90;t++)Z[t]=String.fromCharCode(t);for(var t=1;t<=12;t++)Z[t+111]=Z[t+63235]="F"+t}(),t}();CodeMirror.defineMode("xml",function(t,e){function n(t,e){function n(n){return e.tokenize=n,n(t,e)}var i=t.next();if("<"==i){if(t.eat("!"))return t.eat("[")?t.match("CDATA[")?n(o("atom","]]>")):null:t.match("--")?n(o("comment","-->")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),n(l(1))):null;if(t.eat("?"))return t.eatWhile(/[\w\._\-]/),e.tokenize=o("meta","?>"),"meta";x=t.eat("/")?"closeTag":"openTag",t.eatSpace(),v="";for(var a;a=t.eat(/[^\s\u00a0=<>\"\'\/?]/);)v+=a;return e.tokenize=r,"tag"}return"&"==i?(t.eatWhile(/[^;]/),t.eat(";"),"atom"):(t.eatWhile(/[^&<]/),null)}function r(t,e){var r=t.next();return">"==r||"/"==r&&t.eat(">")?(e.tokenize=n,x=">"==r?"endTag":"selfcloseTag","tag"):"="==r?(x="equals",null):/[\'\"]/.test(r)?(e.tokenize=i(r),e.tokenize(t,e)):(t.eatWhile(/[^\s\u00a0=<>\"\'\/?]/),"word")}function i(t){return function(e,n){for(;!e.eol();)if(e.next()==t){n.tokenize=r;break}return"string"}}function o(t,e){return function(r,i){for(;!r.eol();){if(r.match(e)){i.tokenize=n;break}r.next()}return t}}function l(t){return function(e,r){for(var i;null!=(i=e.next());){if("<"==i)return r.tokenize=l(t+1),r.tokenize(e,r);if(">"==i){if(1==t){r.tokenize=n;break}return r.tokenize=l(t-1),r.tokenize(e,r)}}return"meta"}}function a(){for(var t=arguments.length-1;t>=0;t--)y.cc.push(arguments[t])}function s(){return a.apply(null,arguments),!0}function u(t,e){var n=w.doNotIndent.hasOwnProperty(t)||y.context&&y.context.noIndent;y.context={prev:y.context,tagName:t,indent:y.indented,startOfLine:e,noIndent:n}}function f(){y.context&&(y.context=y.context.prev)}function c(t){if("openTag"==t)return y.tagName=v,s(p,h(y.startOfLine));if("closeTag"==t){var e=!1;return e=!y.context||y.context.tagName!=v,e&&(k="error"),s(d(e))}return s()}function h(t){return function(e){return"selfcloseTag"==e||"endTag"==e&&w.autoSelfClosers.hasOwnProperty(y.tagName.toLowerCase())?s():"endTag"==e?(u(y.tagName,t),s()):s()}}function d(t){return function(e){return t&&(k="error"),"endTag"==e?(f(),s()):(k="error",s(arguments.callee))}}function p(t){return"word"==t?(k="attribute",s(p)):"equals"==t?s(m,p):"string"==t?(k="error",s(p)):a()}function m(t){return"word"==t&&w.allowUnquoted?(k="string",s()):"string"==t?s(g):a()}function g(t){return"string"==t?s(g):a()}var v,x,y,k,C=t.indentUnit,w=e.htmlMode?{autoSelfClosers:{br:!0,img:!0,hr:!0,link:!0,input:!0,meta:!0,col:!0,frame:!0,base:!0,area:!0},doNotIndent:{pre:!0},allowUnquoted:!0}:{autoSelfClosers:{},doNotIndent:{},allowUnquoted:!1},M=e.alignCDATA;return{startState:function(){return{tokenize:n,cc:[],indented:0,startOfLine:!0,tagName:null,context:null}},token:function(t,e){if(t.sol()&&(e.startOfLine=!0,e.indented=t.indentation()),t.eatSpace())return null;k=x=v=null;var n=e.tokenize(t,e);if(e.type=x,(n||x)&&"comment"!=n)for(y=e;;){var r=e.cc.pop()||c;if(r(x||n))break}return e.startOfLine=!1,k||n},indent:function(t,e,i){var o=t.context;if(t.tokenize!=r&&t.tokenize!=n||o&&o.noIndent)return i?i.match(/^(\s*)/)[0].length:0;if(M&&/=0;t--)F.cc.push(arguments[t])}function h(){return c.apply(null,arguments),!0}function d(t){var e=F.state;if(e.context){F.marked="def";for(var n=e.localVars;n;n=n.next)if(n.name==t)return;e.localVars={name:t,next:e.localVars}}}function p(){F.state.context||(F.state.localVars=j),F.state.context={prev:F.state.context,vars:F.state.localVars}}function m(){F.state.localVars=F.state.context.vars,F.state.context=F.state.context.prev}function g(t,e){var n=function(){var n=F.state;n.lexical=new s(n.indented,F.stream.column(),t,null,n.lexical,e)};return n.lex=!0,n}function v(){var t=F.state;t.lexical.prev&&(")"==t.lexical.type&&(t.indented=t.lexical.indented),t.lexical=t.lexical.prev)}function x(t){return function(e){return e==t?h():";"==t?c():h(arguments.callee)}}function y(t){return"var"==t?h(g("vardef"),z,x(";"),v):"keyword a"==t?h(g("form"),k,y,v):"keyword b"==t?h(g("form"),y,v):"{"==t?h(g("}"),A,v):";"==t?h():"function"==t?h(H):"for"==t?h(g("form"),x("("),g(")"),E,x(")"),v,y,v):"variable"==t?h(g("stat"),M):"switch"==t?h(g("form"),k,g("}","switch"),x("{"),A,v,v):"case"==t?h(k,x(":")):"default"==t?h(x(":")):"catch"==t?h(g("form"),p,x("("),I,x(")"),y,v,m):c(g("stat"),k,x(";"),v)}function k(t){return K.hasOwnProperty(t)?h(w):"function"==t?h(H):"keyword c"==t?h(C):"("==t?h(g(")"),k,x(")"),v,w):"operator"==t?h(k):"["==t?h(g("]"),L(k,"]"),v,w):"{"==t?h(g("}"),L(S,"}"),v,w):h()}function C(t){return t.match(/[;\}\)\],]/)?c():c(k)}function w(t,e){if("operator"==t&&/\+\+|--/.test(e))return h(w);if("operator"==t)return h(k);if(";"!=t)return"("==t?h(g(")"),L(k,")"),v,w):"."==t?h(b,w):"["==t?h(g("]"),k,x("]"),v,w):void 0}function M(t){return":"==t?h(v,y):c(w,x(";"),v)}function b(t){if("variable"==t)return F.marked="property",h()}function S(t){if("variable"==t&&(F.marked="property"),K.hasOwnProperty(t))return h(x(":"),k)}function L(t,e){function n(r){return","==r?h(t,n):r==e?h():h(x(e))}return function(r){return r==e?h():c(t,n)}}function A(t){return"}"==t?h():c(y,A)}function z(t,e){return"variable"==t?(d(e),h(T)):h()}function T(t,e){return"="==e?h(k,T):","==t?h(z):void 0}function E(t){return"var"==t?h(z,N):";"==t?c(N):"variable"==t?h(W):c(N)}function W(t,e){return"in"==e?h(k):h(w,N)}function N(t,e){return";"==t?h(D):"in"==e?h(k):h(k,x(";"),D)}function D(t){")"!=t&&h(k)}function H(t,e){return"variable"==t?(d(e),h(H)):"("==t?h(g(")"),p,L(I,")"),v,y,m):void 0}function I(t,e){if("variable"==t)return d(e),h()}var O,R,P=t.indentUnit,U=e.json,B=function(){function t(t){return{type:t,style:"keyword"}}var e=t("keyword a"),n=t("keyword b"),r=t("keyword c"),i=t("operator"),o={type:"atom",style:"atom"};return{"if":e,"while":e,"with":e,"else":n,"do":n,"try":n,"finally":n,"return":r,"break":r,"continue":r,"new":r,"delete":r,"throw":r,"var":t("var"),"const":t("var"),"let":t("var"),"function":t("function"),"catch":t("catch"),"for":t("for"),"switch":t("switch"),"case":t("case"),"default":t("default"),"in":i,"typeof":i,"instanceof":i,"true":o,"false":o,"null":o,undefined:o,NaN:o,Infinity:o}}(),V=/[+\-*&%=<>!?|]/,K={atom:!0,number:!0,variable:!0,string:!0,regexp:!0},F={state:null,column:null,marked:null,cc:null},j={name:"this",next:{name:"arguments"}};return v.lex=!0,{startState:function(t){return{tokenize:o,reAllowed:!0,kwAllowed:!0,cc:[],lexical:new s((t||0)-P,0,"block",(!1)),localVars:null,context:null,indented:0}},token:function(t,e){if(t.sol()&&(e.lexical.hasOwnProperty("align")||(e.lexical.align=!1),e.indented=t.indentation()),t.eatSpace())return null;var n=e.tokenize(t,e);return"comment"==O?n:(e.reAllowed="operator"==O||"keyword c"==O||O.match(/^[\[{}\(,;:]$/),e.kwAllowed="."!=O,f(e,n,O,R,t))},indent:function(t,e){if(t.tokenize!=o)return 0;var n=e&&e.charAt(0),r=t.lexical,i=r.type,l=n==i;return"vardef"==i?r.indented+4:"form"==i&&"{"==n?r.indented:"stat"==i||"form"==i?r.indented+P:"switch"!=r.info||l?r.align?r.column+(l?0:1):r.indented+(l?0:P):r.indented+(/^(?:case|default)\b/.test(e)?P:2*P)},electricChars:":{}"}}),CodeMirror.defineMIME("text/javascript","javascript"),CodeMirror.defineMIME("application/json",{name:"javascript",json:!0}),CodeMirror.defineMode("css",function(t){function e(t,e){return l=e,t}function n(t,n){var l=t.next();return"@"==l?(t.eatWhile(/[\w\\\-]/),e("meta",t.current())):"/"==l&&t.eat("*")?(n.tokenize=r,r(t,n)):"<"==l&&t.eat("!")?(n.tokenize=i,i(t,n)):"="!=l?"~"!=l&&"|"!=l||!t.eat("=")?'"'==l||"'"==l?(n.tokenize=o(l),n.tokenize(t,n)):"#"==l?(t.eatWhile(/[\w\\\-]/),e("atom","hash")):"!"==l?(t.match(/^\s*\w*/),e("keyword","important")):/\d/.test(l)?(t.eatWhile(/[\w.%]/),e("number","unit")):/[,.+>*\/]/.test(l)?e(null,"select-op"):/[;{}:\[\]]/.test(l)?e(null,l):(t.eatWhile(/[\w\\\-]/),e("variable","variable")):e(null,"compare"):void e(null,"compare")}function r(t,r){for(var i,o=!1;null!=(i=t.next());){if(o&&"/"==i){r.tokenize=n;break}o="*"==i}return e("comment","comment")}function i(t,r){for(var i,o=0;null!=(i=t.next());){if(o>=2&&">"==i){r.tokenize=n;break}o="-"==i?o+1:0}return e("comment","comment")}function o(t){return function(r,i){for(var o,l=!1;null!=(o=r.next())&&(o!=t||l);)l=!l&&"\\"==o;return l||(i.tokenize=n),e("string","string")}}var l,a=t.indentUnit;return{startState:function(t){return{tokenize:n,baseIndent:t||0,stack:[]}},token:function(t,e){if(t.eatSpace())return null;var n=e.tokenize(t,e),r=e.stack[e.stack.length-1];return"hash"==l&&"rule"==r?n="atom":"variable"==n&&("rule"==r?n="number":r&&"@media{"!=r||(n="tag")),"rule"==r&&/^[\{\};]$/.test(l)&&e.stack.pop(),"{"==l?"@media"==r?e.stack[e.stack.length-1]="@media{":e.stack.push("{"):"}"==l?e.stack.pop():"@media"==l?e.stack.push("@media"):"{"==r&&"comment"!=l&&e.stack.push("rule"),n},indent:function(t,e){var n=t.stack.length;return/^\}/.test(e)&&(n-="rule"==t.stack[t.stack.length-1]?2:1),t.baseIndent+n*a},electricChars:"}"}}),CodeMirror.defineMIME("text/css","css"),CodeMirror.defineMode("htmlmixed",function(t,e){function n(t,e){var n=l.token(t,e.htmlState);return"tag"==n&&">"==t.current()&&e.htmlState.context&&(/^script$/i.test(e.htmlState.context.tagName)?(e.token=i,e.localState=a.startState(l.indent(e.htmlState,"")),e.mode="javascript"):/^style$/i.test(e.htmlState.context.tagName)&&(e.token=o,e.localState=s.startState(l.indent(e.htmlState,"")),e.mode="css")),n}function r(t,e,n){var r=t.current(),i=r.search(e);return i>-1&&t.backUp(r.length-i),n}function i(t,e){return t.match(/^<\/\s*script\s*>/i,!1)?(e.token=n,e.curState=null,e.mode="html",n(t,e)):r(t,/<\/\s*script\s*>/,a.token(t,e.localState))}function o(t,e){return t.match(/^<\/\s*style\s*>/i,!1)?(e.token=n,e.localState=null,e.mode="html",n(t,e)):r(t,/<\/\s*style\s*>/,s.token(t,e.localState))}var l=CodeMirror.getMode(t,{name:"xml",htmlMode:!0}),a=CodeMirror.getMode(t,"javascript"),s=CodeMirror.getMode(t,"css");return{startState:function(){var t=l.startState();return{token:n,localState:null,mode:"html",htmlState:t}},copyState:function(t){if(t.localState)var e=CodeMirror.copyState(t.token==o?s:a,t.localState);return{token:t.token,localState:e,mode:t.mode,htmlState:CodeMirror.copyState(l,t.htmlState)}},token:function(t,e){return e.token(t,e)},indent:function(t,e){return t.token==n||/^\s*<\//.test(e)?l.indent(t.htmlState,e):t.token==i?a.indent(t.localState,e):s.indent(t.localState,e)},compareStates:function(t,e){return l.compareStates(t.htmlState,e.htmlState)},electricChars:"/{}:"}}),CodeMirror.defineMIME("text/html","htmlmixed"); \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/adapters/mootools-adapter.js b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/adapters/mootools-adapter.js new file mode 100644 index 0000000..863c3fb --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/adapters/mootools-adapter.js @@ -0,0 +1,2 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + ;!function(){var t=window,e=document,n=t.MooTools.version.substring(0,3),r="1.2"===n||"1.1"===n,a=r||"1.3"===n,i=t.$extend||function(){return Object.append.apply(Object,arguments)};t.HighchartsAdapter={init:function(t){var e=Fx.prototype,n=e.start,r=Fx.Morph.prototype,a=r.compute;e.start=function(e,r){var a=this.element;return e.d&&(this.paths=t.init(a,a.d,this.toD)),n.apply(this,arguments),this},r.compute=function(e,n,r){var i=this.paths;return i?void this.element.attr("d",t.step(i[0],i[1],r,this.toD)):a.apply(this,arguments)}},adapterRun:function(t,e){if("width"===e||"height"===e)return parseInt($(t).getStyle(e),10)},getScript:function(t,n){var r=e.getElementsByTagName("head")[0],a=e.createElement("script");a.type="text/javascript",a.src=t,a.onload=n,r.appendChild(a)},animate:function(e,n,r){var a=e.attr,o=r&&r.complete;a&&!e.setStyle&&(e.getStyle=e.attr,e.setStyle=function(){var t=arguments;this.attr.call(this,t[0],t[1][0])},e.$family=function(){return!0}),t.HighchartsAdapter.stop(e),r=new Fx.Morph(a?e:$(e),i({transition:Fx.Transitions.Quad.easeInOut},r)),a&&(r.element=e),n.d&&(r.toD=n.d),o&&r.addEvent("complete",o),r.start(n),e.fx=r},each:function(t,e){return r?$each(t,e):Array.each(t,e)},map:function(t,e){return t.map(e)},grep:function(t,e){return t.filter(e)},inArray:function(t,e,n){return e?e.indexOf(t,n):-1},offset:function(t){return t=t.getPosition(),{left:t.x,top:t.y}},extendWithEvents:function(t){t.addEvent||(t.nodeName?$(t):i(t,new Events))},addEvent:function(e,n,r){"string"==typeof n&&("unload"===n&&(n="beforeunload"),t.HighchartsAdapter.extendWithEvents(e),e.addEvent(n,r))},removeEvent:function(t,e,n){"string"!=typeof t&&t.addEvent&&(e?("unload"===e&&(e="beforeunload"),n?t.removeEvent(e,n):t.removeEvents&&t.removeEvents(e)):t.removeEvents())},fireEvent:function(t,e,n,r){e={type:e,target:t},e=a?new Event(e):new DOMEvent(e),e=i(e,n),!e.target&&e.event&&(e.target=e.event.target),e.preventDefault=function(){r=null},t.fireEvent&&t.fireEvent(e.type,e),r&&r(e)},washMouseEvent:function(t){return t.page&&(t.pageX=t.page.x,t.pageY=t.page.y),t},stop:function(t){t.fx&&t.fx.cancel()}}}(); \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/adapters/mootools-adapter.src.js b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/adapters/mootools-adapter.src.js new file mode 100644 index 0000000..a70763b --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/adapters/mootools-adapter.src.js @@ -0,0 +1,2 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + ;!function(){var t=window,e=document,n=t.MooTools.version.substring(0,3),r="1.2"===n||"1.1"===n,a=r||"1.3"===n,o=t.$extend||function(){return Object.append.apply(Object,arguments)};t.HighchartsAdapter={init:function(t){var e=Fx.prototype,n=e.start,r=Fx.Morph.prototype,a=r.compute;e.start=function(e,r){var a=this,o=a.element;return e.d&&(a.paths=t.init(o,o.d,a.toD)),n.apply(a,arguments),this},r.compute=function(e,n,r){var o=this,i=o.paths;return i?void o.element.attr("d",t.step(i[0],i[1],r,o.toD)):a.apply(o,arguments)}},adapterRun:function(t,e){if("width"===e||"height"===e)return parseInt($(t).getStyle(e),10)},getScript:function(t,n){var r=e.getElementsByTagName("head")[0],a=e.createElement("script");a.type="text/javascript",a.src=t,a.onload=n,r.appendChild(a)},animate:function(e,n,r){var a,i=e.attr,p=r&&r.complete;i&&!e.setStyle&&(e.getStyle=e.attr,e.setStyle=function(){var t=arguments;this.attr.call(this,t[0],t[1][0])},e.$family=function(){return!0}),t.HighchartsAdapter.stop(e),a=new Fx.Morph(i?e:$(e),o({transition:Fx.Transitions.Quad.easeInOut},r)),i&&(a.element=e),n.d&&(a.toD=n.d),p&&a.addEvent("complete",p),a.start(n),e.fx=a},each:function(t,e){return r?$each(t,e):Array.each(t,e)},map:function(t,e){return t.map(e)},grep:function(t,e){return t.filter(e)},inArray:function(t,e,n){return e?e.indexOf(t,n):-1},offset:function(t){var e=t.getPosition();return{left:e.x,top:e.y}},extendWithEvents:function(t){t.addEvent||(t.nodeName?t=$(t):o(t,new Events))},addEvent:function(e,n,r){"string"==typeof n&&("unload"===n&&(n="beforeunload"),t.HighchartsAdapter.extendWithEvents(e),e.addEvent(n,r))},removeEvent:function(t,e,n){"string"!=typeof t&&t.addEvent&&(e?("unload"===e&&(e="beforeunload"),n?t.removeEvent(e,n):t.removeEvents&&t.removeEvents(e)):t.removeEvents())},fireEvent:function(t,e,n,r){var i={type:e,target:t};e=a?new Event(i):new DOMEvent(i),e=o(e,n),!e.target&&e.event&&(e.target=e.event.target),e.preventDefault=function(){r=null},t.fireEvent&&t.fireEvent(e.type,e),r&&r(e)},washMouseEvent:function(t){return t.page&&(t.pageX=t.page.x,t.pageY=t.page.y),t},stop:function(t){t.fx&&t.fx.cancel()}}}(); \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/adapters/prototype-adapter.js b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/adapters/prototype-adapter.js new file mode 100644 index 0000000..894ff7f --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/adapters/prototype-adapter.js @@ -0,0 +1,2 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + ;var HighchartsAdapter=function(){var t="undefined"!=typeof Effect;return{init:function(e){t&&(Effect.HighchartsTransition=Class.create(Effect.Base,{initialize:function(t,i,n,h){var a;this.element=t,this.key=i,a=t.attr?t.attr(i):$(t).getStyle(i),"d"===i&&(this.paths=e.init(t,t.d,n),this.toD=n,a=0,n=1),this.start(Object.extend(h||{},{from:a,to:n,attribute:i}))},setup:function(){HighchartsAdapter._extend(this.element),this.element._highchart_animation||(this.element._highchart_animation={}),this.element._highchart_animation[this.key]=this},update:function(t){var i=this.paths,n=this.element;i&&(t=e.step(i[0],i[1],t,this.toD)),n.attr?n.element&&n.attr(this.options.attribute,t):(i={},i[this.options.attribute]=t,$(n).setStyle(i))},finish:function(){this.element&&this.element._highchart_animation&&delete this.element._highchart_animation[this.key]}}))},adapterRun:function(t,e){return parseInt($(t).getStyle(e),10)},getScript:function(t,e){var i=$$("head")[0];i&&i.appendChild(new Element("script",{type:"text/javascript",src:t}).observe("load",e))},addNS:function(t){var e=/^(?:click|mouse(?:down|up|over|move|out))$/;return/^(?:load|unload|abort|error|select|change|submit|reset|focus|blur|resize|scroll)$/.test(t)||e.test(t)?t:"h:"+t},addEvent:function(t,e,i){t.addEventListener||t.attachEvent?Event.observe($(t),HighchartsAdapter.addNS(e),i):(HighchartsAdapter._extend(t),t._highcharts_observe(e,i))},animate:function(e,i,n){var h,n=n||{};if(n.delay=0,n.duration=(n.duration||500)/1e3,n.afterFinish=n.complete,t)for(h in i)new Effect.HighchartsTransition($(e),h,i[h],n);else{if(e.attr)for(h in i)e.attr(h,i[h]);n.complete&&n.complete()}e.attr||$(e).setStyle(i)},stop:function(t){var e;if(t._highcharts_extended&&t._highchart_animation)for(e in t._highchart_animation)t._highchart_animation[e].cancel()},each:function(t,e){$A(t).each(e)},inArray:function(t,e,i){return e?e.indexOf(t,i):-1},offset:function(t){return $(t).cumulativeOffset()},fireEvent:function(t,e,i,n){t.fire?t.fire(HighchartsAdapter.addNS(e),i):t._highcharts_extended&&(i=i||{},t._highcharts_fire(e,i)),i&&i.defaultPrevented&&(n=null),n&&n(i)},removeEvent:function(t,e,i){$(t).stopObserving&&(e&&(e=HighchartsAdapter.addNS(e)),$(t).stopObserving(e,i)),window===t?Event.stopObserving(t,e,i):(HighchartsAdapter._extend(t),t._highcharts_stop_observing(e,i))},washMouseEvent:function(t){return t},grep:function(t,e){return t.findAll(e)},map:function(t,e){return t.map(e)},_extend:function(t){t._highcharts_extended||Object.extend(t,{_highchart_events:{},_highchart_animation:null,_highcharts_extended:!0,_highcharts_observe:function(t,e){this._highchart_events[t]=[this._highchart_events[t],e].compact().flatten()},_highcharts_stop_observing:function(t,e){t?e?this._highchart_events[t]=[this._highchart_events[t]].compact().flatten().without(e):delete this._highchart_events[t]:this._highchart_events={}},_highcharts_fire:function(t,e){var i=this;(this._highchart_events[t]||[]).each(function(t){e.stopped||(e.preventDefault=function(){e.defaultPrevented=!0},e.target=i,t.bind(this)(e)===!1&&e.preventDefault())}.bind(this))}})}}}(); \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/adapters/prototype-adapter.src.js b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/adapters/prototype-adapter.src.js new file mode 100644 index 0000000..d996e1d --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/adapters/prototype-adapter.src.js @@ -0,0 +1,2 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + ;var HighchartsAdapter=function(){var t="undefined"!=typeof Effect;return{init:function(e){t&&(Effect.HighchartsTransition=Class.create(Effect.Base,{initialize:function(t,i,n,h){var a,r;this.element=t,this.key=i,a=t.attr?t.attr(i):$(t).getStyle(i),"d"===i&&(this.paths=e.init(t,t.d,n),this.toD=n,a=0,n=1),r=Object.extend(h||{},{from:a,to:n,attribute:i}),this.start(r)},setup:function(){HighchartsAdapter._extend(this.element),this.element._highchart_animation||(this.element._highchart_animation={}),this.element._highchart_animation[this.key]=this},update:function(t){var i,n=this.paths,h=this.element;n&&(t=e.step(n[0],n[1],t,this.toD)),h.attr?h.element&&h.attr(this.options.attribute,t):(i={},i[this.options.attribute]=t,$(h).setStyle(i))},finish:function(){this.element&&this.element._highchart_animation&&delete this.element._highchart_animation[this.key]}}))},adapterRun:function(t,e){return parseInt($(t).getStyle(e),10)},getScript:function(t,e){var i=$$("head")[0];i&&i.appendChild(new Element("script",{type:"text/javascript",src:t}).observe("load",e))},addNS:function(t){var e=/^(?:load|unload|abort|error|select|change|submit|reset|focus|blur|resize|scroll)$/,i=/^(?:click|mouse(?:down|up|over|move|out))$/;return e.test(t)||i.test(t)?t:"h:"+t},addEvent:function(t,e,i){t.addEventListener||t.attachEvent?Event.observe($(t),HighchartsAdapter.addNS(e),i):(HighchartsAdapter._extend(t),t._highcharts_observe(e,i))},animate:function(e,i,n){var h,a;if(n=n||{},n.delay=0,n.duration=(n.duration||500)/1e3,n.afterFinish=n.complete,t)for(h in i)a=new Effect.HighchartsTransition($(e),h,i[h],n);else{if(e.attr)for(h in i)e.attr(h,i[h]);n.complete&&n.complete()}e.attr||$(e).setStyle(i)},stop:function(t){var e;if(t._highcharts_extended&&t._highchart_animation)for(e in t._highchart_animation)t._highchart_animation[e].cancel()},each:function(t,e){$A(t).each(e)},inArray:function(t,e,i){return e?e.indexOf(t,i):-1},offset:function(t){return $(t).cumulativeOffset()},fireEvent:function(t,e,i,n){t.fire?t.fire(HighchartsAdapter.addNS(e),i):t._highcharts_extended&&(i=i||{},t._highcharts_fire(e,i)),i&&i.defaultPrevented&&(n=null),n&&n(i)},removeEvent:function(t,e,i){$(t).stopObserving&&(e&&(e=HighchartsAdapter.addNS(e)),$(t).stopObserving(e,i)),window===t?Event.stopObserving(t,e,i):(HighchartsAdapter._extend(t),t._highcharts_stop_observing(e,i))},washMouseEvent:function(t){return t},grep:function(t,e){return t.findAll(e)},map:function(t,e){return t.map(e)},_extend:function(t){t._highcharts_extended||Object.extend(t,{_highchart_events:{},_highchart_animation:null,_highcharts_extended:!0,_highcharts_observe:function(t,e){this._highchart_events[t]=[this._highchart_events[t],e].compact().flatten()},_highcharts_stop_observing:function(t,e){t?e?this._highchart_events[t]=[this._highchart_events[t]].compact().flatten().without(e):delete this._highchart_events[t]:this._highchart_events={}},_highcharts_fire:function(t,e){var i=this;(this._highchart_events[t]||[]).each(function(t){e.stopped||(e.preventDefault=function(){e.defaultPrevented=!0},e.target=i,t.bind(this)(e)===!1&&e.preventDefault())}.bind(this))}})}}}(); \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/adapters/standalone-framework.js b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/adapters/standalone-framework.js new file mode 100644 index 0000000..56d6b34 --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/adapters/standalone-framework.js @@ -0,0 +1,2 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + ;var HighchartsAdapter=function(){function t(t){function n(t,e,n){t.removeEventListener(e,n,!1)}function i(t,e,n){n=t.HCProxiedMethods[n.toString()],t.detachEvent("on"+e,n)}function r(t,e){var r,s,a,o,h=t.HCEvents;if(t.removeEventListener)r=n;else{if(!t.attachEvent)return;r=i}e?(s={},s[e]=!0):s=h;for(o in s)if(h[o])for(a=h[o].length;a--;)r(t,o,h[o][a])}return t.HCExtended||Highcharts.extend(t,{HCExtended:!0,HCEvents:{},bind:function(t,n){var i,r=this,s=this.HCEvents;r.addEventListener?r.addEventListener(t,n,!1):r.attachEvent&&(i=function(t){n.call(r,t)},r.HCProxiedMethods||(r.HCProxiedMethods={}),r.HCProxiedMethods[n.toString()]=i,r.attachEvent("on"+t,i)),s[t]===e&&(s[t]=[]),s[t].push(n)},unbind:function(t,e){var s,a;t?(s=this.HCEvents[t]||[],e?(a=HighchartsAdapter.inArray(e,s),a>-1&&(s.splice(a,1),this.HCEvents[t]=s),this.removeEventListener?n(this,t,e):this.attachEvent&&i(this,t,e)):(r(this,t),this.HCEvents[t]=[])):(r(this),this.HCEvents={})},trigger:function(t,e){var n,i,r,s=this.HCEvents[t]||[],a=s.length;for(i=function(){e.defaultPrevented=!0},n=0;n=e.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),t=this.options.curAnim[this.prop]=!0;for(i in e.curAnim)e.curAnim[i]!==!0&&(t=!1);t&&e.complete&&e.complete.call(this.elem),e=!1}else i=n-this.startTime,this.state=i/e.duration,this.pos=e.easing(i,0,1,e.duration),this.now=this.start+(this.end-this.start)*this.pos,this.update(),e=!0;return e}},this.animate=function(e,n,r){var s,a,o,h,u="";e.stopAnimation=!1,"object"==typeof r&&null!==r||(s=arguments,r={duration:s[2],easing:s[3],complete:s[4]}),"number"!=typeof r.duration&&(r.duration=400),r.easing=Math[r.easing]||Math.easeInOutSine,r.curAnim=Highcharts.extend({},n);for(h in n)o=new i(e,r,h),a=null,"d"===h?(o.paths=t.init(e,e.d,n.d),o.toD=n.d,s=0,a=1):e.attr?s=e.attr(h):(s=parseFloat(HighchartsAdapter._getStyle(e,h))||0,"opacity"!==h&&(u="px")),a||(a=parseFloat(n[h])),o.custom(s,a,u)}},_getStyle:function(t,e){return window.getComputedStyle(t).getPropertyValue(e)},getScript:function(t,e){var n=r.getElementsByTagName("head")[0],i=r.createElement("script");i.type="text/javascript",i.src=t,i.onload=e,n.appendChild(i)},inArray:function(t,e){return e.indexOf?e.indexOf(t):s.indexOf.call(e,t)},adapterRun:function(t,e){return parseInt(HighchartsAdapter._getStyle(t,e),10)},grep:function(t,e){return s.filter.call(t,e)},map:function(t,e){for(var n=[],i=0,r=t.length;i-1&&(s.splice(a,1),this.HCEvents[t]=s),this.removeEventListener?n(this,t,e):this.attachEvent&&i(this,t,e)):(r(this,t),this.HCEvents[t]=[])):(r(this),this.HCEvents={})},trigger:function(t,e){var n,i,r,s=this.HCEvents[t]||[],a=this,o=s.length;for(i=function(){e.defaultPrevented=!0},n=0;n=s.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),this.options.curAnim[this.prop]=!0,n=!0;for(i in s.curAnim)s.curAnim[i]!==!0&&(n=!1);n&&s.complete&&s.complete.call(this.elem),e=!1}else{var a=r-this.startTime;this.state=a/s.duration,this.pos=s.easing(a,0,1,s.duration),this.now=this.start+(this.end-this.start)*this.pos,this.update(),e=!0}return e}},this.animate=function(e,n,r){var s,a,o,h,u,c="";e.stopAnimation=!1,"object"==typeof r&&null!==r||(h=arguments,r={duration:h[2],easing:h[3],complete:h[4]}),"number"!=typeof r.duration&&(r.duration=400),r.easing=Math[r.easing]||Math.easeInOutSine,r.curAnim=Highcharts.extend({},n);for(u in n)o=new i(e,r,u),a=null,"d"===u?(o.paths=t.init(e,e.d,n.d),o.toD=n.d,s=0,a=1):e.attr?s=e.attr(u):(s=parseFloat(HighchartsAdapter._getStyle(e,u))||0,"opacity"!==u&&(c="px")),a||(a=parseFloat(n[u])),o.custom(s,a,c)}},_getStyle:function(t,e){return window.getComputedStyle(t).getPropertyValue(e)},getScript:function(t,e){var n=r.getElementsByTagName("head")[0],i=r.createElement("script");i.type="text/javascript",i.src=t,i.onload=e,n.appendChild(i)},inArray:function(t,e){return e.indexOf?e.indexOf(t):s.indexOf.call(e,t)},adapterRun:function(t,e){return parseInt(HighchartsAdapter._getStyle(t,e),10)},grep:function(t,e){return s.filter.call(t,e)},map:function(t,e){for(var n=[],i=0,r=t.length;i20&&g<160?"left":g>200&&g<340?"right":"center":"center",e.attr({align:u})),t.x+=n.x,t.y+=p):t=t.call(this,i,a,e,o,n,r,s,l),t}),y(b,"getMarkPath",function(t,i,a,e,o,n,r){var s=this.axis;return s.isRadial?(t=s.getPosition(this.pos,s.center[2]/2+e),i=["M",i,a,"L",t.x,t.y]):i=t.call(this,i,a,e,o,n,r),i}),u.arearange=h(u.area,{lineWidth:1,marker:null,threshold:null,tooltip:{pointFormat:'{series.name}: {point.low} - {point.high}
            '},trackByArea:!0,dataLabels:{verticalAlign:null,xLow:0,xHigh:0,yLow:0,yHigh:0}}),g.arearange=t.extendClass(g.area,{type:"arearange",pointArrayMap:["low","high"],toYData:function(t){return[t.low,t.high]},pointValKey:"low",getSegments:function(){var t=this;s(t.points,function(i){t.options.connectNulls||null!==i.low&&null!==i.high?null===i.low&&null!==i.high&&(i.y=i.high):i.y=null}),A.prototype.getSegments.call(this)},translate:function(){var t=this.yAxis;g.area.prototype.translate.apply(this),s(this.points,function(i){var a=i.low,e=i.high,o=i.plotY;null===e&&null===a?i.y=null:null===a?(i.plotLow=i.plotY=null,i.plotHigh=t.translate(e,0,1,0,1)):null===e?(i.plotLow=o,i.plotHigh=null):(i.plotLow=o,i.plotHigh=t.translate(e,0,1,0,1))})},getSegmentPath:function(t){var i,a,e,o=[],n=t.length,r=A.prototype.getSegmentPath;e=this.options;var s=e.step;for(i=HighchartsAdapter.grep(t,function(t){return null!==t.plotLow});n--;)a=t[n],null!==a.plotHigh&&o.push({plotX:a.plotX,plotY:a.plotHigh});return t=r.call(this,i),s&&(s===!0&&(s="left"),e.step={left:"right",center:"center",right:"left"}[s]),o=r.call(this,o),e.step=s,e=[].concat(t,o),o[0]="L",this.areaPath=this.areaPath.concat(t,o),e},drawDataLabels:function(){var t,i,a=this.data,e=a.length,o=[],n=A.prototype,r=this.options.dataLabels,s=this.chart.inverted;if(r.enabled||this._hasPointLabels){for(t=e;t--;)i=a[t],i.y=i.high,i.plotY=i.plotHigh,o[t]=i.dataLabel,i.dataLabel=i.dataLabelUpper,i.below=!1,s?(r.align="left",r.x=r.xHigh):r.y=r.yHigh;for(n.drawDataLabels.apply(this,arguments),t=e;t--;)i=a[t],i.dataLabelUpper=i.dataLabel,i.dataLabel=o[t],i.y=i.low,i.plotY=i.plotLow,i.below=!0,s?(r.align="right",r.x=r.xLow):r.y=r.yLow;n.drawDataLabels.apply(this,arguments)}},alignDataLabel:g.column.prototype.alignDataLabel,getSymbol:g.column.prototype.getSymbol,drawPoints:k}),u.areasplinerange=h(u.arearange),g.areasplinerange=f(g.arearange,{type:"areasplinerange",getPointSpline:g.spline.prototype.getPointSpline}),u.columnrange=h(u.column,u.arearange,{lineWidth:1,pointRange:null}),g.columnrange=f(g.arearange,{type:"columnrange",translate:function(){var t,i=this,a=i.yAxis;w.translate.apply(i),s(i.points,function(e){var o,n=e.shapeArgs,r=i.options.minPointLength;e.plotHigh=t=a.translate(e.high,0,1,0,1),e.plotLow=e.plotY,o=t,e=e.plotY-t,e{series.name}
            Maximum: {point.high}
            Upper quartile: {point.q3}
            Median: {point.median}
            Lower quartile: {point.q1}
            Minimum: {point.low}
            '},whiskerLength:"50%",whiskerWidth:2}),g.boxplot=f(g.column,{type:"boxplot",pointArrayMap:["low","q1","median","q3","high"],toYData:function(t){return[t.low,t.q1,t.median,t.q3,t.high]},pointValKey:"high",pointAttrToOptions:{fill:"fillColor",stroke:"color","stroke-width":"lineWidth"},drawDataLabels:k,translate:function(){var t=this.yAxis,i=this.pointArrayMap;g.column.prototype.translate.apply(this),s(this.points,function(a){s(i,function(i){null!==a[i]&&(a[i+"Plot"]=t.translate(a[i],0,1,0,1))})})},drawPoints:function(){var t,a,e,o,n,r,l,h,p,d,u,g,f,m,y,x,b,A,w,P,M,k,C=this,S=C.points,R=C.options,X=C.chart.renderer,Y=C.doQuartiles!==!1,T=parseInt(C.options.whiskerLength,10)/100;s(S,function(s){p=s.graphic,M=s.shapeArgs,u={},m={},x={},k=s.color||C.color,s.plotY!==i&&(t=s.pointAttr[s.selected?"selected":""],b=M.width,A=L(M.x),w=A+b,P=v(b/2),a=L(Y?s.q1Plot:s.lowPlot),e=L(Y?s.q3Plot:s.lowPlot),o=L(s.highPlot),n=L(s.lowPlot),u.stroke=s.stemColor||R.stemColor||k,u["stroke-width"]=c(s.stemWidth,R.stemWidth,R.lineWidth),u.dashstyle=s.stemDashStyle||R.stemDashStyle,m.stroke=s.whiskerColor||R.whiskerColor||k,m["stroke-width"]=c(s.whiskerWidth,R.whiskerWidth,R.lineWidth),x.stroke=s.medianColor||R.medianColor||k,x["stroke-width"]=c(s.medianWidth,R.medianWidth,R.lineWidth),l=u["stroke-width"]%2/2,h=A+P+l,d=["M",h,e,"L",h,o,"M",h,a,"L",h,n,"z"],Y&&(l=t["stroke-width"]%2/2,h=L(h)+l,a=L(a)+l,e=L(e)+l,A+=l,w+=l,g=["M",A,e,"L",A,a,"L",w,a,"L",w,e,"L",A,e,"z"]),T&&(l=m["stroke-width"]%2/2,o+=l,n+=l,f=["M",h-P*T,o,"L",h+P*T,o,"M",h-P*T,n,"L",h+P*T,n]),l=x["stroke-width"]%2/2,r=v(s.medianPlot)+l,y=["M",A,r,"L",w,r,"z"],p?(s.stem.animate({d:d}),T&&s.whiskers.animate({d:f}),Y&&s.box.animate({d:g}),s.medianShape.animate({d:y})):(s.graphic=p=X.g().add(C.group),s.stem=X.path(d).attr(u).add(p),T&&(s.whiskers=X.path(f).attr(m).add(p)),Y&&(s.box=X.path(g).attr(t).add(p)),s.medianShape=X.path(y).attr(x).add(p)))})}}),u.errorbar=h(u.boxplot,{color:"#000000",grouping:!1,linkedTo:":previous",tooltip:{pointFormat:u.arearange.tooltip.pointFormat},whiskerWidth:null}),g.errorbar=f(g.boxplot,{type:"errorbar",pointArrayMap:["low","high"],toYData:function(t){return[t.low,t.high]},pointValKey:"high",doQuartiles:!1,getColumnMetrics:function(){return this.linkedParent&&this.linkedParent.columnMetrics||g.column.prototype.getColumnMetrics.call(this)}}),u.waterfall=h(u.column,{lineWidth:1,lineColor:"#333",dashStyle:"dot",borderColor:"#333"}),g.waterfall=f(g.column,{type:"waterfall",upColorProp:"fill",pointArrayMap:["low","y"],pointValKey:"y",init:function(t,i){i.stacking=!0,g.column.prototype.init.call(this,t,i)},translate:function(){var t,i,a,e,o,n,r,s,l,h=this.options,p=this.yAxis;for(t=h.threshold,h=h.borderWidth%2/2,g.column.prototype.translate.apply(this),s=t,a=this.points,i=0,t=a.length;i0&&!t.color&&(t.pointAttr=o,t.color=e)})},getGraphPath:function(){var t,i,a,e=this.data,o=e.length,n=v(this.options.lineWidth+this.options.borderWidth)%2/2,r=[];for(a=1;a0?(s[n]-t)/(i-t):.5,l.push(P.ceil(a+r*(e-a))/2);this.radii=l},animate:function(t){var i=this.options.animation;t||(s(this.points,function(t){var a=t.graphic,t=t.shapeArgs;a&&t&&(a.attr("r",1),a.animate({r:t.r},i))}),this.animate=null)},translate:function(){var t,a,e,o=this.data,n=this.radii;for(g.scatter.prototype.translate.call(this),t=o.length;t--;)a=o[t],e=n?n[t]:0,a.negative=a.z<(this.options.zThreshold||0),e>=this.minPxSize/2?(a.shapeType="circle",a.shapeArgs={x:a.plotX,y:a.plotY,r:e},a.dlBox={x:a.plotX-e,y:a.plotY-e,width:2*e,height:2*e}):a.shapeArgs=a.plotY=a.dlBox=i},drawLegendSymbol:function(t,i){var a=d(t.itemStyle.fontSize)/2;i.legendSymbol=this.chart.renderer.circle(a,t.baseline-a,a).attr({zIndex:3}).add(i.legendGroup),i.legendSymbol.isMarker=!0},drawPoints:g.column.prototype.drawPoints,alignDataLabel:g.column.prototype.alignDataLabel}),x.prototype.beforePadding=function(){var t=this,a=this.len,e=this.chart,o=0,l=a,h=this.isXAxis,p=h?"xData":"yData",u=this.min,g={},f=P.min(e.plotWidth,e.plotHeight),m=Number.MAX_VALUE,y=-Number.MAX_VALUE,x=this.max-u,b=a/x,A=[];this.tickPositions&&(s(this.series,function(i){var a=i.options;"bubble"===i.type&&i.visible&&(t.allowZoomOutside=!0,A.push(i),h)&&(s(["minSize","maxSize"],function(t){var i=a[t],e=/%$/.test(i),i=d(i);g[t]=e?f*i/100:i}),i.minPxSize=g.minSize,i=i.zData,i.length&&(m=P.min(m,P.max(n(i),a.displayNegative===!1?a.zThreshold:-Number.MAX_VALUE)),y=P.max(y,r(i))))}),s(A,function(t){var i,a=t[p],e=a.length;if(h&&t.getRadii(m,y,g.minSize,g.maxSize),x>0)for(;e--;)i=t.radii[e],o=Math.min((a[e]-u)*b-i,o),l=Math.max((a[e]-u)*b+i,l)}),A.length&&x>0&&c(this.options.min,this.userMin)===i&&c(this.options.max,this.userMax)===i&&(l-=a,b*=(a+o-l)/a,this.min+=o/b,this.max+=l/b))};var X=A.prototype,u=t.Pointer.prototype;X.toXY=function(t){var i,a=this.chart;i=t.plotX;var e=t.plotY;t.rectPlotX=i,t.rectPlotY=e,t.clientX=(i/Math.PI*180+this.xAxis.pane.options.startAngle)%360,i=this.xAxis.postTranslate(t.plotX,this.yAxis.len-e),t.plotX=t.polarPlotX=i.x-a.plotLeft,t.plotY=t.polarPlotY=i.y-a.plotTop},X.orderTooltipPoints=function(t){this.chart.polar&&(t.sort(function(t,i){return t.clientX-i.clientX}),t[0])&&(t[0].wrappedClientX=t[0].clientX+360,t.push(t[0]))},y(g.area.prototype,"init",e),y(g.areaspline.prototype,"init",e),y(g.spline.prototype,"getPointSpline",function(t,i,a,e){var o,n,r,s,l,h,p;return this.chart.polar?(o=a.plotX,n=a.plotY,t=i[e-1],r=i[e+1],this.connectEnds&&(t||(t=i[i.length-2]),r||(r=i[1])),t&&r&&(s=t.plotX,l=t.plotY,i=r.plotX,h=r.plotY,s=(1.5*o+s)/2.5,l=(1.5*n+l)/2.5,r=(1.5*o+i)/2.5,p=(1.5*n+h)/2.5,i=Math.sqrt(Math.pow(s-o,2)+Math.pow(l-n,2)),h=Math.sqrt(Math.pow(r-o,2)+Math.pow(p-n,2)),s=Math.atan2(l-n,s-o),l=Math.atan2(p-n,r-o),p=Math.PI/2+(s+l)/2,Math.abs(s-p)>Math.PI/2&&(p-=Math.PI),s=o+Math.cos(p)*i,l=n+Math.sin(p)*i,r=o+Math.cos(Math.PI+p)*h,p=n+Math.sin(Math.PI+p)*h,a.rightContX=r,a.rightContY=p),e?(a=["C",t.rightContX||t.plotX,t.rightContY||t.plotY,s||o,l||n,o,n],t.rightContX=t.rightContY=null):a=["M",o,n]):a=t.call(this,i,a,e),a}),y(X,"translate",function(t){if(t.call(this),this.chart.polar&&!this.preventPostTranslate)for(var t=this.points,i=t.length;i--;)this.toXY(t[i])}),y(X,"getSegmentPath",function(t,i){var a=this.points;return this.chart.polar&&this.options.connectEnds!==!1&&i[i.length-1]===a[a.length-1]&&null!==a[0].y&&(this.connectEnds=!0,i=[].concat(i,[a[0]])),t.call(this,i)}),y(X,"animate",o),y(w,"animate",o),y(X,"setTooltipPoints",function(t,i){return this.chart.polar&&l(this.xAxis,{tooltipLen:360}),t.call(this,i)}),y(w,"translate",function(t){var i,a,e=this.xAxis,o=this.yAxis.len,n=e.center,r=e.startAngleRad,s=this.chart.renderer;if(this.preventPostTranslate=!0,t.call(this),e.isRadial)for(e=this.points,a=e.length;a--;)i=e[a],t=i.barX+r,i.shapeType="path",i.shapeArgs={d:s.symbols.arc(n[0],n[1],o-i.plotY,null,{start:t,end:t+i.pointWidth,innerR:o-c(i.yBottom,o)})},this.toXY(i)}),y(w,"alignDataLabel",function(t,i,a,e,o,n){this.chart.polar?(t=i.rectPlotX/Math.PI*180,null===e.align&&(e.align=t>20&&t<160?"left":t>200&&t<340?"right":"center"),null===e.verticalAlign&&(e.verticalAlign=t<45||t>315?"bottom":t>135&&t<225?"top":"middle"),X.alignDataLabel.call(this,i,a,e,o,n)):t.call(this,i,a,e,o,n)}),y(u,"getIndex",function(t,i){var a,e,o=this.chart;return o.polar?(e=o.xAxis[0].center,a=i.chartX-e[0]-o.plotLeft,o=i.chartY-e[1]-o.plotTop,a=180-Math.round(Math.atan2(a,o)/Math.PI*180)):a=t.call(this,i),a}),y(u,"getCoordinates",function(t,i){var a=this.chart,e={xAxis:[],yAxis:[]};return a.polar?s(a.axes,function(t){var o=t.isXAxis,n=t.center,r=i.chartX-n[0]-a.plotLeft,n=i.chartY-n[1]-a.plotTop;e[o?"xAxis":"yAxis"].push({axis:t,value:t.translate(o?Math.PI-Math.atan2(r,n):Math.sqrt(Math.pow(r,2)+Math.pow(n,2)),!0)})}):e=t.call(this,i),e})}(Highcharts); \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/highcharts-more.src.js b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/highcharts-more.src.js new file mode 100644 index 0000000..76beb5e --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/highcharts-more.src.js @@ -0,0 +1,2 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + ;!function(t,i){function a(t,i,a){this.init.call(this,t,i,a)}function e(t,i,a){t.call(this,i,a),this.chart.polar&&(this.closeSegment=function(t){var i=this.xAxis.center;t.push("L",i[0],i[1])},this.closedStacks=!0)}function o(t,i){var a,e=this.chart,o=this.options.animation,n=this.group,r=this.markerGroup,s=this.xAxis.center,l=e.plotLeft,h=e.plotTop;e.polar?e.renderer.isSVG&&(o===!0&&(o={}),i?(a={translateX:s[0]+l,translateY:s[1]+h,scaleX:.001,scaleY:.001},n.attr(a),r&&(r.attrSetters=n.attrSetters,r.attr(a))):(a={translateX:l,translateY:h,scaleX:1,scaleY:1},n.animate(a,o),r&&r.animate(a,o),this.animate=null)):t.call(this,i)}var n=t.arrayMin,r=t.arrayMax,s=t.each,l=t.extend,h=t.merge,p=t.map,c=t.pick,d=t.pInt,u=t.getOptions().plotOptions,g=t.seriesTypes,f=t.extendClass,m=t.splat,y=t.wrap,x=t.Axis,b=t.Tick,A=t.Series,w=g.column.prototype,P=Math,v=P.round,L=P.floor,M=P.max,k=function(){};l(a.prototype,{init:function(t,i,a){var e,o=this,n=o.defaultOptions;o.chart=i,i.angular&&(n.background={}),o.options=t=h(n,t),e=t.background,e&&s([].concat(m(e)).reverse(),function(t){var i=t.backgroundColor;t=h(o.defaultBackgroundOptions,t),i&&(t.backgroundColor=i),t.color=t.backgroundColor,a.options.plotBands.unshift(t)})},defaultOptions:{center:["50%","50%"],size:"85%",startAngle:0},defaultBackgroundOptions:{shape:"circle",borderWidth:1,borderColor:"silver",backgroundColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,"#FFF"],[1,"#DDD"]]},from:Number.MIN_VALUE,innerRadius:0,to:Number.MAX_VALUE,outerRadius:"105%"}});var C=x.prototype,S=b.prototype,R={getOffset:k,redraw:function(){this.isDirty=!1},render:function(){this.isDirty=!1},setScale:k,setCategories:k,setTitle:k},X={isRadial:!0,defaultRadialGaugeOptions:{labels:{align:"center",x:0,y:null},minorGridLineWidth:0,minorTickInterval:"auto",minorTickLength:10,minorTickPosition:"inside",minorTickWidth:1,plotBands:[],tickLength:10,tickPosition:"inside",tickWidth:2,title:{rotation:0},zIndex:2},defaultRadialXOptions:{gridLineWidth:1,labels:{align:null,distance:15,x:0,y:null},maxPadding:0,minPadding:0,plotBands:[],showLastLabel:!1,tickLength:0},defaultRadialYOptions:{gridLineInterpolation:"circle",labels:{align:"right",x:-3,y:-2},plotBands:[],showLastLabel:!1,title:{x:4,text:null,rotation:90}},setOptions:function(t){this.options=h(this.defaultOptions,this.defaultRadialOptions,t)},getOffset:function(){C.getOffset.call(this),this.chart.axisOffset[this.side]=0},getLinePath:function(t,i){var a=this.center;return i=c(i,a[2]/2-this.offset),this.chart.renderer.symbols.arc(this.left+a[0],this.top+a[1],i,i,{start:this.startAngleRad,end:this.endAngleRad,open:!0,innerR:0})},setAxisTranslation:function(){C.setAxisTranslation.call(this),this.center&&(this.isCircular?this.transA=(this.endAngleRad-this.startAngleRad)/(this.max-this.min||1):this.transA=this.center[2]/2/(this.max-this.min||1),this.isXAxis&&(this.minPixelPadding=this.transA*this.minPointOffset+(this.reversed?(this.endAngleRad-this.startAngleRad)/4:0)))},beforeSetTickPositions:function(){this.autoConnect&&(this.max+=this.categories&&1||this.pointRange||this.closestPointRange||0)},setAxisSize:function(){C.setAxisSize.call(this),this.isRadial&&(this.center=this.pane.center=g.pie.prototype.getCenter.call(this.pane),this.len=this.width=this.height=this.isCircular?this.center[2]*(this.endAngleRad-this.startAngleRad)/2:this.center[2]/2)},getPosition:function(t,i){return this.isCircular||(i=this.translate(t),t=this.min),this.postTranslate(this.translate(t),c(i,this.center[2]/2)-this.offset)},postTranslate:function(t,i){var a=this.chart,e=this.center;return t=this.startAngleRad+t,{x:a.plotLeft+e[0]+Math.cos(t)*i,y:a.plotTop+e[1]+Math.sin(t)*i}},getPlotBandPath:function(t,i,a){var e,o,n,r,s=this.center,l=this.startAngleRad,h=s[2]/2,u=[c(a.outerRadius,"100%"),a.innerRadius,c(a.thickness,10)],g=/%$/,f=this.isCircular;return"polygon"===this.options.gridLineInterpolation?r=this.getPlotLinePath(t).concat(this.getPlotLinePath(i,!0)):(f||(u[0]=this.translate(t),u[1]=this.translate(i)),u=p(u,function(t){return g.test(t)&&(t=d(t,10)*h/100),t}),"circle"!==a.shape&&f?(e=l+this.translate(t),o=l+this.translate(i)):(e=-Math.PI/2,o=1.5*Math.PI,n=!0),r=this.chart.renderer.symbols.arc(this.left+s[0],this.top+s[1],u[0],u[0],{start:e,end:o,innerR:c(u[1],u[0]-u[2]),open:n})),r},getPlotLinePath:function(t,i){var a,e,o,n,r=this,l=r.center,h=r.chart,p=r.getPosition(t);return r.isCircular?n=["M",l[0]+h.plotLeft,l[1]+h.plotTop,"L",p.x,p.y]:"circle"===r.options.gridLineInterpolation?(t=r.translate(t),t&&(n=r.getLinePath(0,t))):(a=h.xAxis[0],n=[],t=r.translate(t),o=a.tickPositions,a.autoConnect&&(o=o.concat([o[0]])),i&&(o=[].concat(o).reverse()),s(o,function(i,o){e=a.getPosition(i,t),n.push(o?"L":"M",e.x,e.y)})),n},getTitlePosition:function(){var t=this.center,i=this.chart,a=this.options.title;return{x:i.plotLeft+t[0]+(a.x||0),y:i.plotTop+t[1]-{high:.5,middle:.25,low:0}[a.align]*t[2]+(a.y||0)}}};y(C,"init",function(t,e,o){var n,r,s,p,d,u,g=this,f=e.angular,y=e.polar,x=o.isX,b=f&&x,A=e.options,w=o.pane||0;f?(l(this,b?R:X),n=!x,n&&(this.defaultRadialOptions=this.defaultRadialGaugeOptions)):y&&(l(this,X),n=x,this.defaultRadialOptions=x?this.defaultRadialXOptions:h(this.defaultYAxisOptions,this.defaultRadialYOptions)),t.call(this,e,o),b||!f&&!y||(p=this.options,e.panes||(e.panes=[]),this.pane=d=e.panes[w]=e.panes[w]||new a(m(A.pane)[w],e,g),u=d.options,e.inverted=!1,A.chart.zoomType=null,this.startAngleRad=r=(u.startAngle-90)*Math.PI/180,this.endAngleRad=s=(c(u.endAngle,u.startAngle+360)-90)*Math.PI/180,this.offset=p.offset||0,this.isCircular=n,n&&o.max===i&&s-r===2*Math.PI&&(this.autoConnect=!0))}),y(S,"getPosition",function(t,i,a,e,o){var n=this.axis;return n.getPosition?n.getPosition(a):t.call(this,i,a,e,o)}),y(S,"getLabelPosition",function(t,i,a,e,o,n,r,s,l){var h,p=this.axis,u=n.y,g=n.align,f=(p.translate(this.pos)+p.startAngleRad+Math.PI/2)/Math.PI*180%360;return p.isRadial?(h=p.getPosition(this.pos,p.center[2]/2+c(n.distance,-25)),"auto"===n.rotation?e.attr({rotation:f}):null===u&&(u=.9*d(e.styles.lineHeight)-e.getBBox().height/2),null===g&&(g=p.isCircular?f>20&&f<160?"left":f>200&&f<340?"right":"center":"center",e.attr({align:g})),h.x+=n.x,h.y+=u):h=t.call(this,i,a,e,o,n,r,s,l),h}),y(S,"getMarkPath",function(t,i,a,e,o,n,r){var s,l,h=this.axis;return h.isRadial?(s=h.getPosition(this.pos,h.center[2]/2+e),l=["M",i,a,"L",s.x,s.y]):l=t.call(this,i,a,e,o,n,r),l}),u.arearange=h(u.area,{lineWidth:1,marker:null,threshold:null,tooltip:{pointFormat:'{series.name}: {point.low} - {point.high}
            '},trackByArea:!0,dataLabels:{verticalAlign:null,xLow:0,xHigh:0,yLow:0,yHigh:0}}),g.arearange=t.extendClass(g.area,{type:"arearange",pointArrayMap:["low","high"],toYData:function(t){return[t.low,t.high]},pointValKey:"low",getSegments:function(){var t=this;s(t.points,function(i){t.options.connectNulls||null!==i.low&&null!==i.high?null===i.low&&null!==i.high&&(i.y=i.high):i.y=null}),A.prototype.getSegments.call(this)},translate:function(){var t=this,i=t.yAxis;g.area.prototype.translate.apply(t),s(t.points,function(t){var a=t.low,e=t.high,o=t.plotY;null===e&&null===a?t.y=null:null===a?(t.plotLow=t.plotY=null,t.plotHigh=i.translate(e,0,1,0,1)):null===e?(t.plotLow=o,t.plotHigh=null):(t.plotLow=o,t.plotHigh=i.translate(e,0,1,0,1))})},getSegmentPath:function(t){var i,a,e,o,n,r=[],s=t.length,l=A.prototype.getSegmentPath,h=this.options,p=h.step;for(i=HighchartsAdapter.grep(t,function(t){return null!==t.plotLow});s--;)a=t[s],null!==a.plotHigh&&r.push({plotX:a.plotX,plotY:a.plotHigh});return o=l.call(this,i),p&&(p===!0&&(p="left"),h.step={left:"right",center:"center",right:"left"}[p]),n=l.call(this,r),h.step=p,e=[].concat(o,n),n[0]="L",this.areaPath=this.areaPath.concat(o,n),e},drawDataLabels:function(){var t,i,a=this.data,e=a.length,o=[],n=A.prototype,r=this.options.dataLabels,s=this.chart.inverted;if(r.enabled||this._hasPointLabels){for(t=e;t--;)i=a[t],i.y=i.high,i.plotY=i.plotHigh,o[t]=i.dataLabel,i.dataLabel=i.dataLabelUpper,i.below=!1,s?(r.align="left",r.x=r.xHigh):r.y=r.yHigh;for(n.drawDataLabels.apply(this,arguments),t=e;t--;)i=a[t],i.dataLabelUpper=i.dataLabel,i.dataLabel=o[t],i.y=i.low,i.plotY=i.plotLow,i.below=!0,s?(r.align="right",r.x=r.xLow):r.y=r.yLow;n.drawDataLabels.apply(this,arguments)}},alignDataLabel:g.column.prototype.alignDataLabel,getSymbol:g.column.prototype.getSymbol,drawPoints:k}),u.areasplinerange=h(u.arearange),g.areasplinerange=f(g.arearange,{type:"areasplinerange",getPointSpline:g.spline.prototype.getPointSpline}),u.columnrange=h(u.column,u.arearange,{lineWidth:1,pointRange:null}),g.columnrange=f(g.arearange,{type:"columnrange",translate:function(){var t,i=this,a=i.yAxis;w.translate.apply(i),s(i.points,function(e){var o,n,r,s=e.shapeArgs,l=i.options.minPointLength;e.plotHigh=t=a.translate(e.high,0,1,0,1),e.plotLow=e.plotY,r=t,n=e.plotY-t,n{series.name}
            Maximum: {point.high}
            Upper quartile: {point.q3}
            Median: {point.median}
            Lower quartile: {point.q1}
            Minimum: {point.low}
            '},whiskerLength:"50%",whiskerWidth:2}),g.boxplot=f(g.column,{type:"boxplot",pointArrayMap:["low","q1","median","q3","high"],toYData:function(t){return[t.low,t.q1,t.median,t.q3,t.high]},pointValKey:"high",pointAttrToOptions:{fill:"fillColor",stroke:"color","stroke-width":"lineWidth"},drawDataLabels:k,translate:function(){var t=this,i=t.yAxis,a=t.pointArrayMap;g.column.prototype.translate.apply(t),s(t.points,function(t){s(a,function(a){null!==t[a]&&(t[a+"Plot"]=i.translate(t[a],0,1,0,1))})})},drawPoints:function(){var t,a,e,o,n,r,l,h,p,d,u,g,f,m,y,x,b,A,w,P,M,k,C=this,S=C.points,R=C.options,X=C.chart,Y=X.renderer,T=C.doQuartiles!==!1,W=parseInt(C.options.whiskerLength,10)/100;s(S,function(s){p=s.graphic,M=s.shapeArgs,u={},m={},x={},k=s.color||C.color,s.plotY!==i&&(t=s.pointAttr[s.selected?"selected":""],b=M.width,A=L(M.x),w=A+b,P=v(b/2),a=L(T?s.q1Plot:s.lowPlot),e=L(T?s.q3Plot:s.lowPlot),o=L(s.highPlot),n=L(s.lowPlot),u.stroke=s.stemColor||R.stemColor||k,u["stroke-width"]=c(s.stemWidth,R.stemWidth,R.lineWidth),u.dashstyle=s.stemDashStyle||R.stemDashStyle,m.stroke=s.whiskerColor||R.whiskerColor||k,m["stroke-width"]=c(s.whiskerWidth,R.whiskerWidth,R.lineWidth),x.stroke=s.medianColor||R.medianColor||k,x["stroke-width"]=c(s.medianWidth,R.medianWidth,R.lineWidth),l=u["stroke-width"]%2/2,h=A+P+l,d=["M",h,e,"L",h,o,"M",h,a,"L",h,n,"z"],T&&(l=t["stroke-width"]%2/2,h=L(h)+l,a=L(a)+l,e=L(e)+l,A+=l,w+=l,g=["M",A,e,"L",A,a,"L",w,a,"L",w,e,"L",A,e,"z"]),W&&(l=m["stroke-width"]%2/2,o+=l,n+=l,f=["M",h-P*W,o,"L",h+P*W,o,"M",h-P*W,n,"L",h+P*W,n]),l=x["stroke-width"]%2/2,r=v(s.medianPlot)+l,y=["M",A,r,"L",w,r,"z"],p?(s.stem.animate({d:d}),W&&s.whiskers.animate({d:f}),T&&s.box.animate({d:g}),s.medianShape.animate({d:y})):(s.graphic=p=Y.g().add(C.group),s.stem=Y.path(d).attr(u).add(p),W&&(s.whiskers=Y.path(f).attr(m).add(p)),T&&(s.box=Y.path(g).attr(t).add(p)),s.medianShape=Y.path(y).attr(x).add(p)))})}}),u.errorbar=h(u.boxplot,{color:"#000000",grouping:!1,linkedTo:":previous",tooltip:{pointFormat:u.arearange.tooltip.pointFormat},whiskerWidth:null}),g.errorbar=f(g.boxplot,{type:"errorbar",pointArrayMap:["low","high"],toYData:function(t){return[t.low,t.high]},pointValKey:"high",doQuartiles:!1,getColumnMetrics:function(){return this.linkedParent&&this.linkedParent.columnMetrics||g.column.prototype.getColumnMetrics.call(this)}}),u.waterfall=h(u.column,{lineWidth:1,lineColor:"#333",dashStyle:"dot",borderColor:"#333"}),g.waterfall=f(g.column,{type:"waterfall",upColorProp:"fill",pointArrayMap:["low","y"],pointValKey:"y",init:function(t,i){i.stacking=!0,g.column.prototype.init.call(this,t,i)},translate:function(){var t,i,a,e,o,n,r,s,l,h=this,p=h.options,c=h.yAxis,d=p.threshold,u=p.borderWidth%2/2;for(g.column.prototype.translate.apply(this),s=d,a=h.points,i=0,t=a.length;i0&&!t.color&&(t.pointAttr=r,t.color=o)})},getGraphPath:function(){var t,i,a,e,o=this.data,n=o.length,r=this.options.lineWidth+this.options.borderWidth,s=v(r)%2/2,l=[],h="M",p="L";for(a=1;a0?(l[n]-t)/(i-t):.5,h.push(P.ceil(a+r*(e-a))/2);this.radii=h},animate:function(t){var i=this.options.animation;t||(s(this.points,function(t){var a=t.graphic,e=t.shapeArgs;a&&e&&(a.attr("r",1),a.animate({r:e.r},i))}),this.animate=null)},translate:function(){var t,a,e,o=this.data,n=this.radii;for(g.scatter.prototype.translate.call(this),t=o.length;t--;)a=o[t],e=n?n[t]:0,a.negative=a.z<(this.options.zThreshold||0),e>=this.minPxSize/2?(a.shapeType="circle",a.shapeArgs={x:a.plotX,y:a.plotY,r:e},a.dlBox={x:a.plotX-e,y:a.plotY-e,width:2*e,height:2*e}):a.shapeArgs=a.plotY=a.dlBox=i},drawLegendSymbol:function(t,i){var a=d(t.itemStyle.fontSize)/2;i.legendSymbol=this.chart.renderer.circle(a,t.baseline-a,a).attr({zIndex:3}).add(i.legendGroup),i.legendSymbol.isMarker=!0},drawPoints:g.column.prototype.drawPoints,alignDataLabel:g.column.prototype.alignDataLabel}),x.prototype.beforePadding=function(){var t=this,a=this.len,e=this.chart,o=0,l=a,h=this.isXAxis,p=h?"xData":"yData",u=this.min,g={},f=P.min(e.plotWidth,e.plotHeight),m=Number.MAX_VALUE,y=-Number.MAX_VALUE,x=this.max-u,b=a/x,A=[];this.tickPositions&&(s(this.series,function(i){var a,e=i.options;"bubble"===i.type&&i.visible&&(t.allowZoomOutside=!0,A.push(i),h&&(s(["minSize","maxSize"],function(t){var i=e[t],a=/%$/.test(i);i=d(i),g[t]=a?f*i/100:i}),i.minPxSize=g.minSize,a=i.zData,a.length&&(m=P.min(m,P.max(n(a),e.displayNegative===!1?e.zThreshold:-Number.MAX_VALUE)),y=P.max(y,r(a)))))}),s(A,function(t){var i,a=t[p],e=a.length;if(h&&t.getRadii(m,y,g.minSize,g.maxSize),x>0)for(;e--;)i=t.radii[e],o=Math.min((a[e]-u)*b-i,o),l=Math.max((a[e]-u)*b+i,l)}),A.length&&x>0&&c(this.options.min,this.userMin)===i&&c(this.options.max,this.userMax)===i&&(l-=a,b*=(a+o-l)/a,this.min+=o/b,this.max+=l/b))};var W=A.prototype,I=t.Pointer.prototype;W.toXY=function(t){var i,a=this.chart,e=t.plotX,o=t.plotY;t.rectPlotX=e,t.rectPlotY=o,t.clientX=(e/Math.PI*180+this.xAxis.pane.options.startAngle)%360,i=this.xAxis.postTranslate(t.plotX,this.yAxis.len-o),t.plotX=t.polarPlotX=i.x-a.plotLeft,t.plotY=t.polarPlotY=i.y-a.plotTop},W.orderTooltipPoints=function(t){this.chart.polar&&(t.sort(function(t,i){return t.clientX-i.clientX}),t[0]&&(t[0].wrappedClientX=t[0].clientX+360,t.push(t[0])))},y(g.area.prototype,"init",e),y(g.areaspline.prototype,"init",e),y(g.spline.prototype,"getPointSpline",function(t,i,a,e){var o,n,r,s,l,h,p,c,d,u,g,f,m,y,x,b,A,w,P=1.5,v=P+1;return this.chart.polar?(n=a.plotX,r=a.plotY,s=i[e-1],l=i[e+1],this.connectEnds&&(s||(s=i[i.length-2]),l||(l=i[1])),s&&l&&(h=s.plotX,p=s.plotY,c=l.plotX,d=l.plotY,u=(P*n+h)/v,g=(P*r+p)/v,f=(P*n+c)/v,m=(P*r+d)/v,y=Math.sqrt(Math.pow(u-n,2)+Math.pow(g-r,2)),x=Math.sqrt(Math.pow(f-n,2)+Math.pow(m-r,2)),b=Math.atan2(g-r,u-n),A=Math.atan2(m-r,f-n),w=Math.PI/2+(b+A)/2,Math.abs(b-w)>Math.PI/2&&(w-=Math.PI),u=n+Math.cos(w)*y,g=r+Math.sin(w)*y,f=n+Math.cos(Math.PI+w)*x,m=r+Math.sin(Math.PI+w)*x,a.rightContX=f,a.rightContY=m),e?(o=["C",s.rightContX||s.plotX,s.rightContY||s.plotY,u||n,g||r,n,r],s.rightContX=s.rightContY=null):o=["M",n,r]):o=t.call(this,i,a,e),o}),y(W,"translate",function(t){if(t.call(this),this.chart.polar&&!this.preventPostTranslate)for(var i=this.points,a=i.length;a--;)this.toXY(i[a])}),y(W,"getSegmentPath",function(t,i){var a=this.points;return this.chart.polar&&this.options.connectEnds!==!1&&i[i.length-1]===a[a.length-1]&&null!==a[0].y&&(this.connectEnds=!0,i=[].concat(i,[a[0]])),t.call(this,i)}),y(W,"animate",o),y(w,"animate",o),y(W,"setTooltipPoints",function(t,i){return this.chart.polar&&l(this.xAxis,{tooltipLen:360}),t.call(this,i)}),y(w,"translate",function(t){var i,a,e,o,n=this.xAxis,r=this.yAxis.len,s=n.center,l=n.startAngleRad,h=this.chart.renderer;if(this.preventPostTranslate=!0,t.call(this),n.isRadial)for(a=this.points,o=a.length;o--;)e=a[o],i=e.barX+l,e.shapeType="path",e.shapeArgs={d:h.symbols.arc(s[0],s[1],r-e.plotY,null,{start:i,end:i+e.pointWidth,innerR:r-c(e.yBottom,r)})},this.toXY(e)}),y(w,"alignDataLabel",function(t,i,a,e,o,n){if(this.chart.polar){var r,s,l=i.rectPlotX/Math.PI*180;null===e.align&&(r=l>20&&l<160?"left":l>200&&l<340?"right":"center",e.align=r),null===e.verticalAlign&&(s=l<45||l>315?"bottom":l>135&&l<225?"top":"middle",e.verticalAlign=s),W.alignDataLabel.call(this,i,a,e,o,n)}else t.call(this,i,a,e,o,n)}),y(I,"getIndex",function(t,i){var a,e,o,n,r=this.chart;return r.polar?(e=r.xAxis[0].center,o=i.chartX-e[0]-r.plotLeft,n=i.chartY-e[1]-r.plotTop,a=180-Math.round(Math.atan2(o,n)/Math.PI*180)):a=t.call(this,i),a}),y(I,"getCoordinates",function(t,i){var a=this.chart,e={xAxis:[],yAxis:[]};return a.polar?s(a.axes,function(t){var o=t.isXAxis,n=t.center,r=i.chartX-n[0]-a.plotLeft,s=i.chartY-n[1]-a.plotTop;e[o?"xAxis":"yAxis"].push({axis:t,value:t.translate(o?Math.PI-Math.atan2(r,s):Math.sqrt(Math.pow(r,2)+Math.pow(s,2)),!0)})}):e=t.call(this,i),e})}(Highcharts); \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/highcharts.js b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/highcharts.js new file mode 100644 index 0000000..7ca3139 --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/highcharts.js @@ -0,0 +1,6 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + ;!function(){function t(t,e){var i;t||(t={});for(i in e)t[i]=e[i];return t}function e(){var t,e=arguments.length,i={},s=function(t,e){var i,n;"object"!=typeof t&&(t={});for(n in e)e.hasOwnProperty(n)&&(i=e[n],t[n]=i&&"object"==typeof i&&"[object Array]"!==Object.prototype.toString.call(i)&&"number"!=typeof i.nodeType?s(t[n]||{},i):e[n]);return t};for(t=0;t3?s.length%3:0;return o+(a?s.substr(0,a)+n:"")+s.substr(a).replace(/(\d{3})(?=\d)/g,"$1"+n)+(r?e+yt(t-s).toFixed(r).slice(2):"")}function y(t,e){return Array((e||2)+1-String(t).length).join(0)+t}function v(t,e,i){var s=t[e];t[e]=function(){var t=Array.prototype.slice.call(arguments);return t.unshift(s),i.apply(this,t)}}function b(t,e){for(var i,s,n,o,r,a="{",h=!1,l=[];(a=t.indexOf(a))!==-1;){if(i=t.slice(0,a),h){for(s=i.split(":"),n=s.shift().split("."),r=n.length,i=e,o=0;o-1?o.thousandsSep:"")):i=Z(s,i))}l.push(i),t=t.slice(a+1),a=(h=!h)?"}":"{"}return l.push(t),l.join("")}function k(t){return pt.pow(10,gt(pt.log(t)/pt.LN10))}function w(t,e,i,s){var n,i=u(i,1);for(n=t/i,e||(e=[1,2,2.5,5,10],s&&s.allowDecimals===!1&&(1===i?e=[1,2,5,10]:i<=.1&&(e=[1/i]))),s=0;s=q[Ft]&&(l.setMilliseconds(0),l.setSeconds(d>=q[Vt]?0:p*gt(l.getSeconds()/p))),d>=q[Vt]&&l[ot](d>=q[jt]?0:p*gt(l[Q]()/p)),d>=q[jt]&&l[rt](d>=q[_t]?0:p*gt(l[tt]()/p)),d>=q[_t]&&l[at](d>=q[Zt]?1:p*gt(l[it]()/p)),d>=q[Zt]&&(l[ht](d>=q[Kt]?0:p*gt(l[st]()/p)),o=l[nt]()),d>=q[Kt]&&(o-=o%p,l[lt](o)),d===q[Ut]&&l[at](l[it]()-l[et]()+u(n,1)),i=1,o=l[nt]();for(var n=l.getTime(),g=l[st](),f=l[it](),m=h?0:(864e5+6e4*l.getTimezoneOffset())%864e5;ni&&(i=t[e]);return i}function M(t,e){for(var i in t)t[i]&&t[i]!==e&&t[i].destroy&&t[i].destroy(),delete t[i]}function D(t){_||(_=f(Yt)),t&&_.appendChild(t),_.innerHTML=""}function I(t,e){var i="Highcharts error #"+t+": www.highcharts.com/errors/"+t;if(e)throw i;dt.console&&console.log(i)}function z(t){return parseFloat(t.toPrecision(14))}function B(t,e){K=u(t,e.animation)}function O(){var t=U.global.useUTC,e=t?"getUTC":"get",i=t?"setUTC":"set";J=t?Date.UTC:function(t,e,i,s,n,o){return new Date(t,e,u(i,1),u(s,0),u(n,0),u(o,0)).getTime()},Q=e+"Minutes",tt=e+"Hours",et=e+"Day",it=e+"Date",st=e+"Month",nt=e+"FullYear",ot=i+"Minutes",rt=i+"Hours",at=i+"Date",ht=i+"Month",lt=i+"FullYear"}function H(){}function R(t,e,i,s){this.axis=t,this.pos=e,this.type=i||"",this.isNew=!0,!i&&!s&&this.addLabel()}function X(t,e){this.axis=t,e&&(this.options=e,this.id=e.id)}function W(t,e,i,s,n,o){var r=t.chart.inverted;this.axis=t,this.isNegative=i,this.options=e,this.x=s,this.total=null,this.points={},this.stack=n,this.percent="percent"===o,this.alignOptions={align:e.align||(r?i?"left":"right":"center"),verticalAlign:e.verticalAlign||(r?"middle":i?"bottom":"top"),y:u(e.y,r?4:i?14:-6),x:u(e.x,r?i?-6:6:0)},this.textAlign=e.textAlign||(r?i?"right":"left":"center")}function Y(){this.init.apply(this,arguments)}function E(){this.init.apply(this,arguments)}function G(t,e){this.init(t,e)}function N(t,e){this.init(t,e)}function F(){this.init.apply(this,arguments)}var V,j,_,U,Z,K,$,q,J,Q,tt,et,it,st,nt,ot,rt,at,ht,lt,ct=document,dt=window,pt=Math,ut=pt.round,gt=pt.floor,ft=pt.ceil,mt=pt.max,xt=pt.min,yt=pt.abs,vt=pt.cos,bt=pt.sin,kt=pt.PI,wt=2*kt/360,Tt=navigator.userAgent,St=dt.opera,Lt=/msie/i.test(Tt)&&!St,Pt=8===ct.documentMode,At=/AppleWebKit/.test(Tt),Ct=/Firefox/.test(Tt),Mt=/(Mobile|Android|Windows Phone)/.test(Tt),Dt="http://www.w3.org/2000/svg",It=!!ct.createElementNS&&!!ct.createElementNS(Dt,"svg").createSVGRect,zt=Ct&&parseInt(Tt.split("Firefox/")[1],10)<4,Bt=!It&&!Lt&&!!ct.createElement("canvas").getContext,Ot=ct.documentElement.ontouchstart!==V,Ht={},Rt=0,Xt=function(){},Wt=[],Yt="div",Et="none",Gt="rgba(192,192,192,"+(It?1e-4:.002)+")",Nt="millisecond",Ft="second",Vt="minute",jt="hour",_t="day",Ut="week",Zt="month",Kt="year",$t="stroke-width",qt={};dt.Highcharts=dt.Highcharts?I(16,!0):{},Z=function(e,i,s){if(!c(i)||isNaN(i))return"Invalid date";var n,e=u(e,"%Y-%m-%d %H:%M:%S"),o=new Date(i),r=o[tt](),a=o[et](),h=o[it](),l=o[st](),d=o[nt](),p=U.lang,g=p.weekdays,o=t({a:g[a].substr(0,3),A:g[a],d:y(h),e:h,b:p.shortMonths[l],B:p.months[l],m:y(l+1),y:d.toString().substr(2,2),Y:d,H:y(r),I:y(r%12||12),l:r%12||12,M:y(o[Q]()),p:r<12?"AM":"PM",P:r<12?"am":"pm",S:y(o.getSeconds()),L:y(ut(i%1e3),3)},Highcharts.dateFormats);for(n in o)for(;e.indexOf("%"+n)!==-1;)e=e.replace("%"+n,"function"==typeof o[n]?o[n](i):o[n]);return s?e.substr(0,1).toUpperCase()+e.substr(1):e},L.prototype={wrapColor:function(t){this.color>=t&&(this.color=0)},wrapSymbol:function(t){this.symbol>=t&&(this.symbol=0)}},q=function(){for(var t=0,e=arguments,i=e.length,s={};t-1,h=a?7:3,e=e.split(" "),i=[].concat(i),l=function(t){for(s=t.length;s--;)"M"===t[s]&&t.splice(s+1,0,t[s+1],t[s+2],t[s+1],t[s+2])};if(a&&(l(e),l(i)),t.isArea&&(n=e.splice(e.length-6,6),o=i.splice(i.length-6,6)),r<=i.length/h&&e.length===i.length)for(;r--;)i=[].concat(i).splice(0,h).concat(i);if(t.shift=0,e.length)for(t=i.length;e.length{point.key}
            ',pointFormat:'{series.name}: {point.y}
            ',shadow:!0,snap:Mt?25:10,style:{color:"#333333",cursor:"default",fontSize:"12px",padding:"8px",whiteSpace:"nowrap"}},credits:{enabled:!0,text:"Highcharts.com",href:"http://www.highcharts.com",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#909090",fontSize:"9px"}}};var ue=U.plotOptions,Jt=ue.line;O();var ge=function(t){var s,n,o=[];return function(t){t&&t.stops?n=re(t.stops,function(t){return ge(t[1])}):(s=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/.exec(t))?o=[i(s[1]),i(s[2]),i(s[3]),parseFloat(s[4],10)]:(s=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(t))?o=[i(s[1],16),i(s[2],16),i(s[3],16),1]:(s=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(t))&&(o=[i(s[1]),i(s[2]),i(s[3]),1])}(t),{get:function(i){var s;return n?(s=e(t),s.stops=[].concat(s.stops),se(n,function(t,e){s.stops[e]=[s.stops[e][0],t.get(i)]})):s=o&&!isNaN(o[0])?"rgb"===i?"rgb("+o[0]+","+o[1]+","+o[2]+")":"a"===i?o[3]:"rgba("+o.join(",")+")":t,s},brighten:function(t){if(n)se(n,function(e){e.brighten(t)});else if(r(t)&&0!==t){var e;for(e=0;e<3;e++)o[e]+=i(255*t),o[e]<0&&(o[e]=0),o[e]>255&&(o[e]=255)}return this},rgba:o,setOpacity:function(t){return o[3]=t,this}}};H.prototype={init:function(t,e){this.element="span"===e?f(e):ct.createElementNS(Dt,e),this.renderer=t,this.attrSetters={}},opacity:1,animate:function(t,i,s){i=u(i,K,!0),pe(this),i?(i=e(i),s&&(i.complete=s),de(this,t,i)):(this.attr(t),s&&s())},attr:function(t,e){var n,o,r,a,h,l,p,g=this.element,f=g.nodeName.toLowerCase(),m=this.renderer,x=this.attrSetters,y=this.shadows,v=this;if(s(t)&&c(e)&&(n=t,t={},t[n]=e),s(t))n=t,"circle"===f?n={x:"cx",y:"cy"}[n]||n:"strokeWidth"===n&&(n="stroke-width"),v=d(g,n)||this[n]||0,"d"!==n&&"visibility"!==n&&"fill"!==n&&(v=parseFloat(v));else{for(n in t)if(h=!1,o=t[n],r=x[n]&&x[n].call(this,o,n),r!==!1){if(r!==V&&(o=r),"d"===n)o&&o.join&&(o=o.join(" ")),/(NaN| {2}|^$)/.test(o)&&(o="M 0 0");else if("x"===n&&"text"===f)for(r=0;r1100)&&e.call(s,t)}):s["on"+t]=e,this},setRadialReference:function(t){return this.element.radialReference=t,this},translate:function(t,e){return this.attr({translateX:t,translateY:e})},invert:function(){return this.inverted=!0,this.updateTransform(),this},htmlCss:function(e){var i=this.element;return(i=e&&"SPAN"===i.tagName&&e.width)&&(delete e.width,this.textWidth=i,this.updateTransform()),this.styles=t(this.styles,e),g(this.element,e),this},htmlGetBBox:function(){var t=this.element,e=this.bBox;return e||("text"===t.nodeName&&(t.style.position="absolute"),e=this.bBox={x:t.offsetLeft,y:t.offsetTop,width:t.offsetWidth,height:t.offsetHeight}),e},htmlUpdateTransform:function(){if(this.added){var t=this.renderer,e=this.element,s=this.translateX||0,n=this.translateY||0,o=this.x||0,r=this.y||0,a=this.textAlign||"left",h={left:0,center:.5,right:1}[a],l=a&&"left"!==a,d=this.shadows;if(g(e,{marginLeft:s,marginTop:n}),d&&se(d,function(t){g(t,{marginLeft:s+1,marginTop:n+1})}),this.inverted&&se(e.childNodes,function(i){t.invertChild(i,e)}),"SPAN"===e.tagName){var p,f,m,d=this.rotation;p=0;var x,y=1,v=0;m=i(this.textWidth);var b=this.xCorr||0,k=this.yCorr||0,w=[d,a,e.innerHTML,this.textWidth].join(",");w!==this.cTT&&(c(d)&&(p=d*wt,y=vt(p),v=bt(p),this.setSpanRotation(d,v,y)),p=u(this.elemWidth,e.offsetWidth),f=u(this.elemHeight,e.offsetHeight),p>m&&/[ \-]/.test(e.textContent||e.innerText)&&(g(e,{width:m+"px",display:"block",whiteSpace:"normal"}),p=m),m=t.fontMetrics(e.style.fontSize).b,b=y<0&&-p,k=v<0&&-f,x=y*v<0,b+=v*m*(x?1-h:h),k-=y*m*(d?x?h:1-h:1),l&&(b-=p*h*(y<0?-1:1),d&&(k-=f*h*(v<0?-1:1)),g(e,{textAlign:a})),this.xCorr=b,this.yCorr=k),g(e,{left:o+b+"px",top:r+k+"px"}),At&&(f=e.offsetHeight),this.cTT=w}}else this.alignOnAdd=!0},setSpanRotation:function(t){var e={};e[Lt?"-ms-transform":At?"-webkit-transform":Ct?"MozTransform":St?"-o-transform":""]=e.transform="rotate("+t+"deg)",g(this.element,e)},updateTransform:function(){var t=this.translateX||0,e=this.translateY||0,i=this.scaleX,s=this.scaleY,n=this.inverted,o=this.rotation;n&&(t+=this.attr("width"),e+=this.attr("height")),t=["translate("+t+","+e+")"],n?t.push("rotate(90) scale(-1,1)"):o&&t.push("rotate("+o+" "+(this.x||0)+" "+(this.y||0)+")"),(c(i)||c(s))&&t.push("scale("+u(i,1)+" "+u(s,1)+")"),t.length&&d(this.element,"transform",t.join(" "))},toFront:function(){var t=this.element;return t.parentNode.appendChild(t),this},align:function(t,e,i){var n,o,r,a,h={};return o=this.renderer,r=o.alignedObjects,t?(this.alignOptions=t,this.alignByTranslate=e,(!i||s(i))&&(this.alignTo=n=i||"renderer",l(r,this),r.push(this),i=null)):(t=this.alignOptions,e=this.alignByTranslate,n=this.alignTo),i=u(i,o[n],o),n=t.align,o=t.verticalAlign,r=(i.x||0)+(t.x||0),a=(i.y||0)+(t.y||0),"right"!==n&&"center"!==n||(r+=(i.width-(t.width||0))/{right:1,center:2}[n]),h[e?"translateX":"x"]=ut(r),"bottom"!==o&&"middle"!==o||(a+=(i.height-(t.height||0))/({bottom:1,middle:2}[o]||1)),h[e?"translateY":"y"]=ut(a),this[this.placed?"animate":"attr"](h),this.placed=!0,this.alignAttr=h,this},getBBox:function(){var e,i=this.bBox,s=this.renderer,n=this.rotation;e=this.element;var o=this.styles,r=n*wt;if(!i){if(e.namespaceURI===Dt||s.forExport){try{i=e.getBBox?t({},e.getBBox()):{width:e.offsetWidth,height:e.offsetHeight}}catch(a){}(!i||i.width<0)&&(i={width:0,height:0})}else i=this.htmlGetBBox();s.isSVG&&(s=i.width,e=i.height,Lt&&o&&"11px"===o.fontSize&&"22.7"===e.toPrecision(3)&&(i.height=e=14),n&&(i.width=yt(e*bt(r))+yt(s*vt(r)),i.height=yt(e*vt(r))+yt(s*bt(r)))),this.bBox=i}return i},show:function(){return this.attr({visibility:"visible"})},hide:function(){return this.attr({visibility:"hidden"})},fadeOut:function(t){var e=this;e.animate({opacity:0},{duration:t||150,complete:function(){e.hide()}})},add:function(t){var e,s=this.renderer,n=t||s,o=n.element||s.box,r=o.childNodes,a=this.element,h=d(a,"zIndex");if(t&&(this.parentGroup=t),this.parentInverted=t&&t.inverted,void 0!==this.textStr&&s.buildText(this),h&&(n.handleZ=!0,h=i(h)),n.handleZ)for(n=0;nh||!c(h)&&c(s))){o.insertBefore(a,t),e=!0;break}return e||o.appendChild(a),this.added=!0,le(this,"add"),this},safeRemoveChild:function(t){var e=t.parentNode;e&&e.removeChild(t)},destroy:function(){var t,e,i=this,s=i.element||{},n=i.shadows,o=i.renderer.isSVG&&"SPAN"===s.nodeName&&s.parentNode;if(s.onclick=s.onmouseout=s.onmouseover=s.onmousemove=s.point=null,pe(i),i.clipPath&&(i.clipPath=i.clipPath.destroy()),i.stops){for(e=0;e/g,'').replace(/<(i|em)>/g,'').replace(//g,"").split(//g),r=e.childNodes,a=/style="([^"]+)"/,h=/href="(http[^"]+)"/,l=d(e,"x"),c=t.styles,p=c&&c.width&&i(c.width),f=c&&c.lineHeight,m=r.length;m--;)e.removeChild(r[m]);p&&!t.added&&this.box.appendChild(e),""===o[o.length-1]&&o.pop(),se(o,function(o,r){var u,m=0,o=o.replace(//g,"|||");u=o.split("|||"),se(u,function(o){if(""!==o||1===u.length){var x,y={},v=ct.createElementNS(Dt,"tspan");if(a.test(o)&&(x=o.match(a)[1].replace(/(;| |^)color([ :])/,"$1fill$2"),d(v,"style",x)),h.test(o)&&!n&&(d(v,"onclick",'location.href="'+o.match(h)[1]+'"'),g(v,{cursor:"pointer"})),o=(o.replace(/<(.|\n)*?>/g,"")||" ").replace(/</g,"<").replace(/>/g,">")," "!==o&&(v.appendChild(ct.createTextNode(o)),m?y.dx=0:y.x=l,d(v,y),!m&&r&&(!It&&n&&g(v,{display:"block"}),d(v,"dy",f||s.fontMetrics(/px$/.test(v.style.fontSize)?v.style.fontSize:c.fontSize).h,At&&v.offsetHeight)),e.appendChild(v),m++,p))for(var b,k,o=o.replace(/([^\^])-/g,"$1- ").split(" "),y=t._clipHeight,w=[],T=i(f||16),S=1;o.length||w.length;)delete t.bBox,b=t.getBBox(),k=b.width,b=k>p,b&&1!==o.length?(v.removeChild(v.firstChild),w.unshift(o.pop())):(o=w,w=[],o.length&&(S++,y&&S*T>y?(o=["..."],t.attr("title",t.textStr)):(v=ct.createElementNS(Dt,"tspan"),d(v,{dy:T,x:l}),x&&d(v,"style",x),e.appendChild(v),k>p&&(p=k)))),o.length&&v.appendChild(ct.createTextNode(o.join(" ").replace(/- /g,"-")))}})})},button:function(i,s,n,o,r,a,h,l){var c,d,p,u,g,f,m=this.label(i,s,n,null,null,null,null,null,"button"),x=0,i={x1:0,y1:0,x2:0,y2:1},r=e({"stroke-width":1,stroke:"#CCCCCC",fill:{linearGradient:i,stops:[[0,"#FEFEFE"],[1,"#F6F6F6"]]},r:2,padding:5,style:{color:"black"}},r);return p=r.style,delete r.style,a=e(r,{stroke:"#68A",fill:{linearGradient:i,stops:[[0,"#FFF"],[1,"#ACF"]]}},a),u=a.style,delete a.style,h=e(r,{stroke:"#68A",fill:{linearGradient:i,stops:[[0,"#9BD"],[1,"#CDF"]]}},h),g=h.style,delete h.style,l=e(r,{style:{color:"#CCC"}},l),f=l.style,delete l.style,ae(m.element,Lt?"mouseover":"mouseenter",function(){3!==x&&m.attr(a).css(u)}),ae(m.element,Lt?"mouseout":"mouseleave",function(){3!==x&&(c=[r,a,h][x],d=[p,u,g][x],m.attr(c).css(d))}),m.setState=function(t){(m.state=x=t)?2===t?m.attr(h).css(g):3===t&&m.attr(l).css(f):m.attr(r).css(p)},m.on("click",function(){3!==x&&o.call(m)}).attr(r).css(t({cursor:"default"},p))},crispLine:function(t,e){return t[1]===t[4]&&(t[1]=t[4]=ut(t[1])-e%2/2),t[2]===t[5]&&(t[2]=t[5]=ut(t[2])+e%2/2),t},path:function(e){var i={fill:Et};return o(e)?i.d=e:n(e)&&t(i,e),this.createElement("path").attr(i)},circle:function(t,e,i){return t=n(t)?t:{x:t,y:e,r:i},this.createElement("circle").attr(t)},arc:function(t,e,i,s,o,r){return n(t)&&(e=t.y,i=t.r,s=t.innerR,o=t.start,r=t.end,t=t.x),t=this.symbol("arc",t||0,e||0,i||0,i||0,{innerR:s||0,start:o||0,end:r||0}),t.r=i,t},rect:function(t,e,i,s,o,r){return o=n(t)?t.r:o,o=this.createElement("rect").attr({rx:o,ry:o,fill:Et}),o.attr(n(t)?t:o.crisp(r,t,e,mt(i,0),mt(s,0)))},setSize:function(t,e,i){var s=this.alignedObjects,n=s.length;for(this.width=t,this.height=e,this.boxWrapper[u(i,!0)?"animate":"attr"]({width:t,height:e});n--;)s[n].align()},g:function(t){var e=this.createElement("g");return c(t)?e.attr({"class":"highcharts-"+t}):e},image:function(e,i,s,n,o){var r={preserveAspectRatio:Et};return arguments.length>1&&t(r,{x:i,y:s,width:n,height:o}),r=this.createElement("image").attr(r),r.element.setAttributeNS?r.element.setAttributeNS("http://www.w3.org/1999/xlink","href",e):r.element.setAttribute("hc-svg-href",e),r},symbol:function(e,i,s,n,o,r){var a,h,l,c=this.symbols[e],c=c&&c(ut(i),ut(s),n,o,r),d=/^url\((.*?)\)$/;return c?(a=this.path(c),t(a,{symbolName:e,x:i,y:s,width:n,height:o}),r&&t(a,r)):d.test(e)&&(l=function(t,e){t.element&&(t.attr({width:e[0],height:e[1]}),t.alignByTranslate||t.translate(ut((n-e[0])/2),ut((o-e[1])/2)))},h=e.match(d)[1],e=Ht[h],a=this.image(h).attr({x:i,y:s}),a.isImg=!0,e?l(a,e):(a.attr({width:0,height:0}),f("img",{onload:function(){l(a,Ht[h]=[this.width,this.height])},src:h}))),a},symbols:{circle:function(t,e,i,s){var n=.166*i;return["M",t+i/2,e,"C",t+i+n,e,t+i+n,e+s,t+i/2,e+s,"C",t-n,e+s,t-n,e,t+i/2,e,"Z"]},square:function(t,e,i,s){return["M",t,e,"L",t+i,e,t+i,e+s,t,e+s,"Z"]},triangle:function(t,e,i,s){return["M",t+i/2,e,"L",t+i,e+s,t,e+s,"Z"]},"triangle-down":function(t,e,i,s){return["M",t,e,"L",t+i,e,t+i/2,e+s,"Z"]},diamond:function(t,e,i,s){return["M",t+i/2,e,"L",t+i,e+s/2,t+i/2,e+s,t,e+s/2,"Z"]},arc:function(t,e,i,s,n){var o=n.start,i=n.r||i||s,r=n.end-.001,s=n.innerR,a=n.open,h=vt(o),l=bt(o),c=vt(r),r=bt(r),n=n.end-o'),e&&(i=n||"span"===e||"img"===e?i.join(""):t.prepVML(i),this.element=f(i)),this.renderer=t,this.attrSetters={}},add:function(t){var e=this.renderer,i=this.element,s=e.box,s=t?t.element||t:s;return t&&t.inverted&&e.invertChild(i,s),s.appendChild(i),this.added=!0,this.alignOnAdd&&!this.deferUpdateTransform&&this.updateTransform(),le(this,"add"),this},updateTransform:H.prototype.htmlUpdateTransform,setSpanRotation:function(t,e,i){g(this.element,{filter:t?["progid:DXImageTransform.Microsoft.Matrix(M11=",i,", M12=",-e,", M21=",e,", M22=",i,", sizingMethod='auto expand')"].join(""):Et})},pathToVML:function(t){for(var e,i=t.length,s=[];i--;)r(t[i])?s[i]=ut(10*t[i])-5:"Z"===t[i]?s[i]="x":(s[i]=t[i],!t.isArc||"wa"!==t[i]&&"at"!==t[i]||(e="wa"===t[i]?1:-1,s[i+5]===s[i+7]&&(s[i+7]-=e),s[i+6]===s[i+8]&&(s[i+8]-=e)));return s.join(" ")||"x"},attr:function(t,e){var i,n,o,a,h,l=this.element||{},p=l.style,u=l.nodeName,g=this.renderer,m=this.symbolName,x=this.shadows,y=this.attrSetters,v=this;if(s(t)&&c(e)&&(i=t,t={},t[i]=e),s(t))i=t,v="strokeWidth"===i||"stroke-width"===i?this.strokeweight:this[i];else for(i in t)if(n=t[i],h=!1,o=y[i]&&y[i].call(this,n,i),o!==!1&&null!==n){if(o!==V&&(n=o),m&&/^(x|y|r|start|end|width|height|innerR|anchorX|anchorY)/.test(i))a||(this.symbolAttr(t),a=!0),h=!0;else if("d"===i){if(n=n||[],this.d=n.join(" "),l.path=n=this.pathToVML(n),x)for(o=x.length;o--;)x[o].path=x[o].cutOff?this.cutOffPath(n,x[o].cutOff):n;h=!0}else if("visibility"===i){if(x)for(o=x.length;o--;)x[o].style[i]=n;"DIV"===u&&(n="hidden"===n?"-999em":0,Pt||(p[i]=n?"visible":"hidden"),i="top"),p[i]=n,h=!0}else"zIndex"===i?(n&&(p[i]=n),h=!0):ie(i,["x","y","width","height"])!==-1?(this[i]=n,"x"===i||"y"===i?i={x:"left",y:"top"}[i]:n=mt(0,n),this.updateClipping?(this[i]=n,this.updateClipping()):p[i]=n,h=!0):"class"===i&&"DIV"===u?l.className=n:"stroke"===i?(n=g.color(n,l,i),i="strokecolor"):"stroke-width"===i||"strokeWidth"===i?(l.stroked=!!n,i="strokeweight",this[i]=n,r(n)&&(n+="px")):"dashstyle"===i?((l.getElementsByTagName("stroke")[0]||f(g.prepVML([""]),null,null,l))[i]=n||"solid",this.dashstyle=n,h=!0):"fill"===i?"SPAN"===u?p.color=n:"IMG"!==u&&(l.filled=n!==Et,n=g.color(n,l,i,this),i="fillcolor"):"opacity"===i?h=!0:"shape"===u&&"rotation"===i?(this[i]=l.style[i]=n,l.style.left=-ut(bt(n*wt)+1)+"px",l.style.top=ut(vt(n*wt))+"px"):"translateX"===i||"translateY"===i||"rotation"===i?(this[i]=n,this.updateTransform(),h=!0):"text"===i&&(this.bBox=null,l.innerHTML=n,h=!0);h||(Pt?l[i]=n:d(l,i,n))}return v},clip:function(t){var e,i=this;return t?(e=t.members,l(e,i),e.push(i),i.destroyClip=function(){l(e,i)},t=t.getCSS(i)):(i.destroyClip&&i.destroyClip(),t={clip:Pt?"inherit":"rect(auto)"}),i.css(t)},css:H.prototype.htmlCss,safeRemoveChild:function(t){t.parentNode&&D(t)},destroy:function(){return this.destroyClip&&this.destroyClip(),H.prototype.destroy.apply(this)},on:function(t,e){return this.element["on"+t]=function(){var t=dt.event;t.target=t.srcElement,e(t)},this},cutOffPath:function(t,e){var s,t=t.split(/[ ,]/);return s=t.length,9!==s&&11!==s||(t[s-4]=t[s-2]=i(t[s-2])-10*e),t.join(" ")},shadow:function(t,e,s){var n,o,r,a,h,l,c,d=[],p=this.element,g=this.renderer,m=p.style,x=p.path;if(x&&"string"!=typeof x.value&&(x="x"),h=x,t){for(l=u(t.width,3),c=(t.opacity||.15)/l,n=1;n<=3;n++)a=2*l+1-2*n,s&&(h=this.cutOffPath(x.value,a+.5)),r=[''],o=f(g.prepVML(r),null,{left:i(m.left)+u(t.offsetX,1),top:i(m.top)+u(t.offsetY,1)}),s&&(o.cutOff=a+1),r=[''],f(g.prepVML(r),null,null,o),e?e.element.appendChild(o):p.parentNode.insertBefore(o,p),d.push(o);this.shadows=d}return this}},me=m(H,me);var xe={Element:me,isIE8:Tt.indexOf("MSIE 8.0")>-1,init:function(t,e,i){var s,n;this.alignedObjects=[],s=this.createElement(Yt),n=s.element,n.style.position="relative",t.appendChild(s.element),this.isVML=!0,this.box=n,this.boxWrapper=s,this.setSize(e,i,!1),ct.namespaces.hcv||(ct.namespaces.add("hcv","urn:schemas-microsoft-com:vml"),(ct.styleSheets.length?ct.styleSheets[0]:ct.createStyleSheet()).cssText+="hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } ")},isHidden:function(){return!this.box.offsetWidth},clipRect:function(e,i,s,o){var r=this.createElement(),a=n(e);return t(r,{members:[],left:(a?e.x:e)+1,top:(a?e.y:i)+1,width:(a?e.width:s)-1,height:(a?e.height:o)-1,getCSS:function(e){var i=e.element,s=i.nodeName,e=e.inverted,n=this.top-("shape"===s?i.offsetTop:0),o=this.left,i=o+this.width,r=n+this.height,n={clip:"rect("+ut(e?o:n)+"px,"+ut(e?r:i)+"px,"+ut(e?i:r)+"px,"+ut(e?n:o)+"px)"};return!e&&Pt&&"DIV"===s&&t(n,{width:i+"px",height:r+"px"}),n},updateClipping:function(){se(r.members,function(t){t.css(r.getCSS(t))})}})},color:function(t,e,i,s){var n,o,r,a=this,h=/^rgba/,l=Et;if(t&&t.linearGradient?r="gradient":t&&t.radialGradient&&(r="pattern"),r){var c,d,p,u,g,m,x,y,v=t.linearGradient||t.radialGradient,b="",t=t.stops,k=[],w=function(){o=[''],f(a.prepVML(o),null,null,e)};if(p=t[0],y=t[t.length-1],p[0]>0&&t.unshift([0,p[1]]),y[0]<1&&t.push([1,y[1]]),se(t,function(t,e){h.test(t[1])?(n=ge(t[1]),c=n.get("rgb"),d=n.get("a")):(c=t[1],d=1),k.push(100*t[0]+"% "+c),e?(g=d,m=c):(u=d,x=c)}),"fill"===i)if("gradient"===r)i=v.x1||v[0]||0,t=v.y1||v[1]||0,p=v.x2||v[2]||0,v=v.y2||v[3]||0,b='angle="'+(90-180*pt.atan((v-t)/(p-i))/kt)+'"',w();else{var T,l=v.r,S=2*l,L=2*l,P=v.cx,A=v.cy,C=e.radialReference,l=function(){C&&(T=s.getBBox(),P+=(C[0]-T.x)/T.width-.5,A+=(C[1]-T.y)/T.height-.5,S*=C[2]/T.width,L*=C[2]/T.height),b='src="'+U.global.VMLRadialGradientURL+'" size="'+S+","+L+'" origin="0.5,0.5" position="'+P+","+A+'" color2="'+x+'" ',w()};s.added?l():ae(s,"add",l),l=m}else l=c}else h.test(t)&&"IMG"!==e.tagName?(n=ge(t),o=["<",i,' opacity="',n.get("a"),'"/>'],f(this.prepVML(o),null,null,e),l=n.get("rgb")):(l=e.getElementsByTagName(i),l.length&&(l[0].opacity=1,l[0].type="solid"),l=t);return l},prepVML:function(t){var e=this.isIE8,t=t.join("");return e?(t=t.replace("/>",' xmlns="urn:schemas-microsoft-com:vml" />'),t=t.indexOf('style="')===-1?t.replace("/>",' style="display:inline-block;behavior:url(#default#VML);" />'):t.replace('style="','style="display:inline-block;behavior:url(#default#VML);')):t=t.replace("<","1&&o.attr({x:e,y:i,width:s,height:n}),o},rect:function(t,e,i,s,o,r){var a=this.symbol("rect");return a.r=n(t)?t.r:o,a.attr(n(t)?t:a.crisp(r,t,e,mt(i,0),mt(s,0)))},invertChild:function(t,e){var s=e.style;g(t,{flip:"x",left:i(s.width)-1,top:i(s.height)-1,rotation:-90})},symbols:{arc:function(t,e,i,s,n){var o=n.start,r=n.end,a=n.r||i||s,i=n.innerR,s=vt(o),h=bt(o),l=vt(r),c=bt(r);return r-o===0?["x"]:(o=["wa",t-a,e-a,t+a,e+a,t+a*s,e+a*h,t+a*l,e+a*c],n.open&&!i&&o.push("e","M",t,e),o.push("at",t-i,e-i,t+i,e+i,t+i*l,e+i*c,t+i*s,e+i*h,"x","e"),o.isArc=!0,o)},circle:function(t,e,i,s,n){return n&&(i=s=2*n.r),n&&n.isCircle&&(t-=i/2,e-=s/2),["wa",t,e,t+i,e+s,t+i,e+s/2,t+i,e+s/2,"e"]},rect:function(t,e,i,s,n){var o,r=t+i,a=e+s;return c(n)&&n.r?(o=xt(n.r,i,s),r=["M",t+o,e,"L",r-o,e,"wa",r-2*o,e,r,e+2*o,r-o,e,r,e+o,"L",r,a-o,"wa",r-2*o,a-2*o,r,a,r,a-o,r-o,a,"L",t+o,a,"wa",t,a-2*o,t+2*o,a,t+o,a,t,a-o,"L",t,e+o,"wa",t,e,t+2*o,e+2*o,t,e+o,t+o,e,"x","e"]):r=fe.prototype.symbols.square.apply(0,arguments),r}}};Highcharts.VMLRenderer=me=function(){this.init.apply(this,arguments)},me.prototype=e(fe.prototype,xe),j=me}var ye;Bt&&(Highcharts.CanVGRenderer=me=function(){Dt="http://www.w3.org/1999/xhtml"},me.prototype.symbols={},ye=function(){function t(){var t,i=e.length;for(t=0;tl&&(i=!1)):a+c>p&&(a=p-c,s&&a+d0&&s.height>0?(h=e({align:n&&f&&"center",x:n?!f&&4:10,verticalAlign:!n&&f&&"middle",y:n?f?16:10:f?6:-4,rotation:n&&!f&&90},h),l||(i.label=l=T.text(h.text,0,0,h.useHTML).attr({align:h.textAlign||h.align,rotation:h.rotation,zIndex:k}).css(h.style).add()),s=[v[1],v[4],u(v[6],v[1])],v=[v[2],v[5],u(v[7],v[2])],n=A(s),f=A(v),l.align(h,!1,{x:n,y:f,width:C(s)-n,height:C(v)-f}),l.show()):l&&l.hide(),i},destroy:function(){l(this.axis.plotLinesAndBands,this),delete this.axis,M(this)}},W.prototype={destroy:function(){M(this,this.axis)},render:function(t){var e=this.options,i=e.format,i=i?b(i,this):e.formatter.call(this);this.label?this.label.attr({text:i,visibility:"hidden"}):this.label=this.axis.chart.renderer.text(i,0,0,e.useHTML).css(e.style).attr({align:this.textAlign,rotation:e.rotation,visibility:"hidden"}).add(t)},setOffset:function(t,e){var i=this.axis,s=i.chart,n=s.inverted,o=this.isNegative,r=i.translate(this.percent?100:this.total,0,0,0,1),i=i.translate(0),i=yt(r-i),a=s.xAxis[0].translate(this.x)+t,h=s.plotHeight,o={x:n?o?r:r-i:a,y:n?h-a-e:o?h-r-i:h-r,width:n?i:e,height:n?e:i};(n=this.label)&&(n.align(this.alignOptions,null,o),o=n.alignAttr,n.attr({visibility:this.options.crop===!1||s.isInsidePlot(o.x,o.y)?It?"inherit":"visible":"hidden"}))}},Y.prototype={defaultOptions:{dateTimeLabelFormats:{millisecond:"%H:%M:%S.%L",second:"%H:%M:%S",minute:"%H:%M",hour:"%H:%M",day:"%e. %b",week:"%e. %b",month:"%b '%y",year:"%Y"},endOnTick:!1,gridLineColor:"#C0C0C0",labels:Qt,lineColor:"#C0D0E0",lineWidth:1,minPadding:.01,maxPadding:.01,minorGridLineColor:"#E0E0E0",minorGridLineWidth:1,minorTickColor:"#A0A0A0",minorTickLength:2,minorTickPosition:"outside",startOfWeek:1,startOnTick:!1,tickColor:"#C0D0E0",tickLength:5,tickmarkPlacement:"between",tickPixelInterval:100,tickPosition:"outside",tickWidth:1,title:{align:"middle",style:{color:"#4d759e",fontWeight:"bold"}},type:"linear"},defaultYAxisOptions:{endOnTick:!0,gridLineWidth:1,tickPixelInterval:72,showLastLabel:!0,labels:{x:-8,y:3},lineWidth:0,maxPadding:.05,minPadding:.05,startOnTick:!0,tickWidth:0,title:{rotation:270,text:"Values"},stackLabels:{enabled:!1,formatter:function(){return x(this.total,-1)},style:Qt.style}},defaultLeftAxisOptions:{labels:{x:-8,y:null},title:{rotation:270}},defaultRightAxisOptions:{labels:{x:8,y:null},title:{rotation:90}},defaultBottomAxisOptions:{labels:{x:0,y:14},title:{rotation:0}},defaultTopAxisOptions:{labels:{x:0,y:-5},title:{rotation:0}},init:function(t,e){var i=e.isX;this.horiz=t.inverted?!i:i,this.xOrY=(this.isXAxis=i)?"x":"y",this.opposite=e.opposite,this.side=this.horiz?this.opposite?0:2:this.opposite?1:3,this.setOptions(e);var s=this.options,n=s.type;this.labelFormatter=s.labels.formatter||this.defaultLabelFormatter,this.userOptions=e,this.minPixelPadding=0,this.chart=t,this.reversed=s.reversed,this.zoomEnabled=s.zoomEnabled!==!1,this.categories=s.categories||"category"===n,this.isLog="logarithmic"===n,this.isDatetimeAxis="datetime"===n,this.isLinked=c(s.linkedTo),this.tickmarkOffset=this.categories&&"between"===s.tickmarkPlacement?.5:0,this.ticks={},this.minorTicks={},this.plotLinesAndBands=[],this.alternateBands={},this.len=0,this.minRange=this.userMinRange=s.minRange||s.maxZoom,this.range=s.range,this.offset=s.offset||0,this.stacks={},this.oldStacks={},this.stackExtremes={},this.min=this.max=null;var o,s=this.options.events;ie(this,t.axes)===-1&&(t.axes.push(this),t[i?"xAxis":"yAxis"].push(this)),this.series=this.series||[],t.inverted&&i&&this.reversed===V&&(this.reversed=!0),this.removePlotLine=this.removePlotBand=this.removePlotBandOrLine;for(o in s)ae(this,o,s[o]);this.isLog&&(this.val2lin=a,this.lin2val=h)},setOptions:function(t){this.options=e(this.defaultOptions,this.isXAxis?{}:this.defaultYAxisOptions,[this.defaultTopAxisOptions,this.defaultRightAxisOptions,this.defaultBottomAxisOptions,this.defaultLeftAxisOptions][this.side],e(U[this.isXAxis?"xAxis":"yAxis"],t))},update:function(i,s){var n=this.chart,i=n.options[this.xOrY+"Axis"][this.options.index]=e(this.userOptions,i);this.destroy(!0),this._addedPlotLB=this.userMin=this.userMax=V,this.init(n,t(i,{events:V})),n.isDirtyBox=!0,u(s,!0)&&n.redraw()},remove:function(t){var e=this.chart,i=this.xOrY+"Axis";se(this.series,function(t){t.remove(!1)}),l(e.axes,this),l(e[i],this),e.options[i].splice(this.options.index,1),se(e[i],function(t,e){t.options.index=e}),this.destroy(),e.isDirtyBox=!0,u(t,!0)&&e.redraw()},defaultLabelFormatter:function(){var t,e=this.axis,i=this.value,s=e.categories,n=this.dateTimeLabelFormat,o=U.lang.numericSymbols,r=o&&o.length,a=e.options.labels.format,e=e.isLog?i:e.tickInterval;if(a)t=b(a,this);else if(s)t=i;else if(n)t=Z(n,i);else if(r&&e>=1e3)for(;r--&&t===V;)s=Math.pow(1e3,r+1),e>=s&&null!==o[r]&&(t=x(i/s,-1)+o[r]);return t===V&&(t=i>=1e3?x(i,0):x(i,-1)),t},getSeriesExtremes:function(){var t=this,e=t.chart;t.hasVisibleSeries=!1,t.dataMin=t.dataMax=null,t.stackExtremes={},t.buildStacks(),se(t.series,function(i){if(i.visible||!e.options.chart.ignoreHiddenSeries){var s;s=i.options.threshold;var n;t.hasVisibleSeries=!0,t.isLog&&s<=0&&(s=null),t.isXAxis?(s=i.xData,s.length&&(t.dataMin=xt(u(t.dataMin,s[0]),A(s)),t.dataMax=mt(u(t.dataMax,s[0]),C(s)))):(i.getExtremes(),n=i.dataMax,i=i.dataMin,c(i)&&c(n)&&(t.dataMin=xt(u(t.dataMin,i),i),t.dataMax=mt(u(t.dataMax,n),n)),c(s)&&(t.dataMin>=s?(t.dataMin=s,t.ignoreMinPadding=!0):t.dataMaxl+this.width)&&(a=!0)):(i=l,o=p-this.right,(nc+this.height)&&(a=!0)),a&&!s?null:h.renderer.crispLine(["M",i,n,"L",o,r],e||0)},getPlotBandPath:function(t,e){var i=this.getPlotLinePath(e),s=this.getPlotLinePath(t);return s&&i?s.push(i[4],i[5],i[1],i[2]):s=null,s},getLinearTickPositions:function(t,e,i){for(var s,e=z(gt(e/t)*t),i=z(ft(i/t)*t),n=[];e<=i&&(n.push(e),e=z(e+t),e!==s);)s=e;return n},getLogTickPositions:function(t,e,i,s){var n=this.options,o=this.len,r=[];if(s||(this._minorAutoInterval=null),t>=.5)t=ut(t),r=this.getLinearTickPositions(t,e,i);else if(t>=.08)for(var l,c,d,p,g,o=gt(e),n=t>.3?[1,2,4]:t>.15?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9];oe&&(!s||p<=i)&&r.push(p),p>i&&(g=!0),p=d;else e=h(e),i=h(i),t=n[s?"minorTickInterval":"tickInterval"],t=u("auto"===t?null:t,this._minorAutoInterval,(i-e)*(n.tickPixelInterval/(s?5:1))/((s?o/this.tickPositions.length:o)||1)),t=w(t,null,k(t)),r=re(this.getLinearTickPositions(t,e,i),a),s||(this._minorAutoInterval=t/5);return s||(this.tickInterval=t),r},getMinorTickPositions:function(){var t,e=this.options,i=this.tickPositions,s=this.minorTickInterval,n=[];if(this.isLog)for(t=i.length,e=1;e=this.minRange;if(this.isXAxis&&this.minRange===V&&!this.isLog&&(c(r.min)||c(r.max)?this.minRange=null:(se(this.series,function(t){for(n=t.xData,i=o=t.xIncrement?1:n.length-1;i>0;i--)s=n[i]-n[i-1],(e===V||si&&(a=0),n=mt(n,a),o=mt(o,s(h)?0:a/2),r=mt(r,"on"===h?0:a),!t.noSharedTooltip&&c(l)&&(e=c(e)?xt(e,l):l)}),a=this.ordinalSlope&&e?this.ordinalSlope/e:1,this.minPointOffset=o*=a,this.pointRangePadding=r*=a,this.pointRange=xt(n,i),this.closestPointRange=e),t&&(this.oldTransA=h),this.translationSlope=this.transA=h=this.len/(i+r||1),this.transB=this.horiz?this.left:this.bottom,this.minPixelPadding=h*o},setTickPositions:function(t){var e,i=this,s=i.chart,n=i.options,o=i.isLog,r=i.isDatetimeAxis,h=i.isXAxis,l=i.isLinked,d=i.options.tickPositioner,p=n.maxPadding,g=n.minPadding,f=n.tickInterval,m=n.minTickInterval,x=n.tickPixelInterval,y=i.categories;l?(i.linkedParent=s[h?"xAxis":"yAxis"][n.linkedTo],s=i.linkedParent.getExtremes(),i.min=u(s.min,s.dataMin),i.max=u(s.max,s.dataMax),n.type!==i.linkedParent.options.type&&I(11,1)):(i.min=u(i.userMin,n.min,i.dataMin),i.max=u(i.userMax,n.max,i.dataMax)),o&&(!t&&xt(i.min,u(i.dataMin,i.min))<=0&&I(10,1),i.min=z(a(i.min)),i.max=z(a(i.max))),i.range&&(i.userMin=i.min=mt(i.min,i.max-i.range),i.userMax=i.max,t)&&(i.range=null),i.beforePadding&&i.beforePadding(),i.adjustForMinRange(),!y&&!i.usePercentage&&!l&&c(i.min)&&c(i.max)&&(s=i.max-i.min)&&(c(n.min)||c(i.userMin)||!g||!(i.dataMin<0)&&i.ignoreMinPadding||(i.min-=s*g),c(n.max)||c(i.userMax)||!p||!(i.dataMax>0)&&i.ignoreMaxPadding||(i.max+=s*p)),i.min===i.max||void 0===i.min||void 0===i.max?i.tickInterval=1:l&&!f&&x===i.linkedParent.options.tickPixelInterval?i.tickInterval=i.linkedParent.tickInterval:(i.tickInterval=u(f,y?1:(i.max-i.min)*x/mt(i.len,x)),!c(f)&&i.lenmt(2*i.len,200)&&I(19,!0),t=r?(i.getNonLinearTimeTicks||S)(T(i.tickInterval,n.units),i.min,i.max,n.startOfWeek,i.ordinalPositions,i.closestPointRange,!0):o?i.getLogTickPositions(i.tickInterval,i.min,i.max):i.getLinearTickPositions(i.tickInterval,i.min,i.max),e&&t.splice(1,t.length-2),i.tickPositions=t),l||(o=t[0],r=t[t.length-1],l=i.minPointOffset||0,n.startOnTick?i.min=o:i.min-l>o&&t.shift(),n.endOnTick?i.max=r:i.max+l(e[s]||0)&&this.options.alignTicks!==!1&&(e[s]=i.length),t.maxTicks=e},adjustTickAmount:function(){var t=this._maxTicksKey,e=this.tickPositions,i=this.chart.maxTicks;if(i&&i[t]&&!this.isDatetimeAxis&&!this.categories&&!this.isLinked&&this.options.alignTicks!==!1){var s=this.tickAmount,n=e.length;if(this.tickAmount=t=i[t],n=this.dataMax&&(e=V)),this.displayBtn=t!==V||e!==V,this.setExtremes(t,e,!1,V,{trigger:"zoom"}),!0},setAxisSize:function(){var t,e,i=this.chart,s=this.options,n=s.offsetLeft||0,o=s.offsetRight||0,r=this.horiz;this.left=e=u(s.left,i.plotLeft+n),this.top=t=u(s.top,i.plotTop),this.width=n=u(s.width,i.plotWidth-n+o),this.height=s=u(s.height,i.plotHeight),this.bottom=i.chartHeight-s-t,this.right=i.chartWidth-n-e,this.len=mt(r?n:s,0),this.pos=r?e:t},getExtremes:function(){var t=this.isLog;return{min:t?z(h(this.min)):this.min,max:t?z(h(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}},getThreshold:function(t){var e=this.isLog,i=e?h(this.min):this.min,e=e?h(this.max):this.max;return i>t||null===t?t=i:e15&&t<165?"right":t>195&&t<345?"left":"center"},getOffset:function(){var t,e,i,s,n,o,r,a=this,h=a.chart,l=h.renderer,d=a.options,p=a.tickPositions,g=a.ticks,f=a.horiz,m=a.side,x=h.inverted?[1,0,3,2][m]:m,y=0,v=0,b=d.title,k=d.labels,w=0,T=h.axisOffset,S=h.clipOffset,L=[-1,1,1,-1][m],P=1,A=u(k.maxStaggerLines,5);if(a.hasData=t=a.hasVisibleSeries||c(a.min)&&c(a.max)&&!!p,a.showAxis=h=t||u(d.showEmpty,!0),a.staggerLines=a.horiz&&k.staggerLines,a.axisGroup||(a.gridGroup=l.g("grid").attr({zIndex:d.gridZIndex||1}).add(),a.axisGroup=l.g("axis").attr({zIndex:d.zIndex||2}).add(),a.labelGroup=l.g("axis-labels").attr({zIndex:k.zIndex||7}).add()),t||a.isLinked){if(a.labelAlign=u(k.align||a.autoLabelAlign(k.rotation)),se(p,function(t){g[t]?g[t].addLabel():g[t]=new R(a,t)}),a.horiz&&!a.staggerLines&&A&&!k.rotation){for(i=a.reversed?[].concat(p).reverse():p;P1&&(a.staggerLines=P)}se(p,function(t){0!==m&&2!==m&&{1:"left",3:"right"}[m]!==a.labelAlign||(w=mt(g[t].getLabelSize(),w))}),a.staggerLines&&(w*=a.staggerLines,a.labelOffset=w)}else for(i in g)g[i].destroy(),delete g[i];b&&b.text&&b.enabled!==!1&&(a.axisTitle||(a.axisTitle=l.text(b.text,0,0,b.useHTML).attr({zIndex:7,rotation:b.rotation||0,align:b.textAlign||{low:"left",middle:"center",high:"right"}[b.align]}).css(b.style).add(a.axisGroup),a.axisTitle.isNew=!0),h&&(y=a.axisTitle.getBBox()[f?"height":"width"],v=u(b.margin,f?5:10),e=b.offset),a.axisTitle[h?"show":"hide"]()),a.offset=L*u(d.offset,T[m]),a.axisTitleMargin=u(e,w+v+(2!==m&&w&&L*d.labels[f?"y":"x"])),T[m]=mt(T[m],a.axisTitleMargin+y+L*a.offset),S[x]=mt(S[x],2*gt(d.lineWidth/2))},getLinePath:function(t){var e=this.chart,i=this.opposite,s=this.offset,n=this.horiz,o=this.left+(i?this.width:0)+s,s=e.chartHeight-this.bottom-(i?this.height:0)+s;return i&&(t*=-1), +e.renderer.crispLine(["M",n?this.left:o,n?s:this.top,"L",n?e.chartWidth-this.right:o,n?s:e.chartHeight-this.bottom],t)},getTitlePosition:function(){var t=this.horiz,e=this.left,s=this.top,n=this.len,o=this.options.title,r=t?e:s,a=this.opposite,h=this.offset,l=i(o.style.fontSize||12),n={low:r+(t?0:n),middle:r+n/2,high:r+(t?n:0)}[o.align],e=(t?s+this.height:e)+(t?1:-1)*(a?-1:1)*this.axisTitleMargin+(2===this.side?l:0);return{x:t?n:e+(a?this.width:0)+h+(o.x||0),y:t?e-(a?this.height:0)+h:n+(o.y||0)}},render:function(){var t,e=this,i=e.chart,s=i.renderer,n=e.options,o=e.isLog,r=e.isLinked,a=e.tickPositions,l=e.axisTitle,d=e.stacks,p=e.ticks,u=e.minorTicks,g=e.alternateBands,f=n.stackLabels,m=n.alternateGridColor,x=e.tickmarkOffset,y=n.lineWidth,v=i.hasRendered&&c(e.oldMin)&&!isNaN(e.oldMin);t=e.hasData;var b,k,w=e.showAxis;if(se([p,u,g],function(t){for(var e in t)t[e].isActive=!1}),(t||r)&&(e.minorTickInterval&&!e.categories&&se(e.getMinorTickPositions(),function(t){u[t]||(u[t]=new R(e,t,"minor")),v&&u[t].isNew&&u[t].render(null,!0),u[t].render(null,!1,1)}),a.length&&(se(a.slice(1).concat([a[0]]),function(t,i){i=i===a.length-1?0:i+1,(!r||t>=e.min&&t<=e.max)&&(p[t]||(p[t]=new R(e,t)),v&&p[t].isNew&&p[t].render(i,!0),p[t].render(i,!1,1))}),x&&0===e.min&&(p[-1]||(p[-1]=new R(e,(-1),null,(!0))),p[-1].render(-1))),m&&se(a,function(t,i){i%2===0&&t1||yt(i-r.y)>1)&&(clearTimeout(this.tooltipTimeout),this.tooltipTimeout=setTimeout(function(){o&&o.move(e,i,s,n)},32))},hide:function(){var t,e=this;clearTimeout(this.hideTimer),this.isHidden||(t=this.chart.hoverPoints,this.hideTimer=setTimeout(function(){e.label.fadeOut(),e.isHidden=!0},u(this.options.hideDelay,500)),t&&se(t,function(t){t.setState()}),this.chart.hoverPoints=null)},hideCrosshairs:function(){se(this.crosshairs,function(t){t&&t.hide()})},getAnchor:function(t,e){var i,s,n=this.chart,o=n.inverted,r=n.plotTop,a=0,h=0,t=p(t);return i=t[0].tooltipPos,this.followPointer&&e&&(e.chartX===V&&(e=n.pointer.normalize(e)),i=[e.chartX-n.plotLeft,e.chartY-r]),i||(se(t,function(t){s=t.series.yAxis,a+=t.plotX,h+=(t.plotLow?(t.plotLow+t.plotHigh)/2:t.plotY)+(!o&&s?s.top-r:0)}),a/=t.length,h/=t.length,i=[o?n.plotWidth-h:a,this.shared&&!o&&t.length>1&&e?e.chartY-r:o?n.plotHeight-a:h]),re(i,ut)},getPosition:function(t,e,i){var s,n=this.chart,o=n.plotLeft,r=n.plotTop,a=n.plotWidth,h=n.plotHeight,l=u(this.options.distance,12),c=i.plotX,i=i.plotY,n=c+o+(n.inverted?l:-t-l),d=i-e+r+15;return n<7&&(n=o+mt(c,0)+l),n+t>o+a&&(n-=n+t-(o+a),d=i-e+r-l,s=!0),d=d&&i<=d+e&&(d=i+r+l)),d+e>r+h&&(d=mt(r,r+h-e-l)),{x:n,y:d}},defaultFormatter:function(t){var e,i=this.points||p(this),s=i[0].series;return e=[s.tooltipHeaderFormatter(i[0])],se(i,function(t){s=t.series,e.push(s.tooltipFormatter&&s.tooltipFormatter(t)||t.point.tooltipFormatter(s.tooltipOptions.pointFormat))}),e.push(t.options.footerFormat||""),e.join("")},refresh:function(t,e){var i,s,n,o=this.chart,r=this.label,h=this.options,l={},c=[];n=h.formatter||this.defaultFormatter;var d,l=o.hoverPoints,g=h.crosshairs,f=this.shared;if(clearTimeout(this.hideTimer),this.followPointer=p(t)[0].series.tooltipOptions.followPointer,s=this.getAnchor(t,e),i=s[0],s=s[1],!f||t.series&&t.series.noSharedTooltip?l=t.getLabelConfig():(o.hoverPoints=t,l&&se(l,function(t){t.setState()}),se(t,function(t){t.setState("hover"),c.push(t.getLabelConfig())}),l={x:t[0].category,y:t[0].y},l.points=c,t=t[0]),n=n.call(l,this),l=t.series,n===!1?this.hide():(this.isHidden&&(pe(r),r.attr("opacity",1).show()),r.attr({text:n}),d=h.borderColor||t.color||l.color||"#606060",r.attr({stroke:d}),this.updatePosition({plotX:i,plotY:s}),this.isHidden=!1),g)for(g=p(g),r=g.length;r--;)f=t.series,h=f[r?"yAxis":"xAxis"],g[r]&&h&&(l=r?u(t.stackY,t.y):t.x,h.isLog&&(l=a(l)),1===r&&f.modifyValue&&(l=f.modifyValue(l)),h=h.getPlotLinePath(l,1),this.crosshairs[r]?this.crosshairs[r].attr({d:h,visibility:"visible"}):(l={"stroke-width":g[r].width||1,stroke:g[r].color||"#C0C0C0",zIndex:g[r].zIndex||2},g[r].dashStyle&&(l.dashstyle=g[r].dashStyle),this.crosshairs[r]=o.renderer.path(h).attr(l).add()));le(o,"tooltipRefresh",{text:n,x:i+o.plotLeft,y:s+o.plotTop,borderColor:d})},updatePosition:function(t){var e=this.chart,i=this.label,i=(this.options.positioner||this.getPosition).call(this,i.width,i.height,t);this.move(ut(i.x),ut(i.y),t.plotX+e.plotLeft,t.plotY+e.plotTop)}},G.prototype={init:function(t,e){var i,s=e.chart,n=s.events,o=Bt?"":s.zoomType,s=t.inverted;this.options=e,this.chart=t,this.zoomX=i=/x/.test(o),this.zoomY=o=/y/.test(o),this.zoomHor=i&&!s||o&&s,this.zoomVert=o&&!s||i&&s,this.runChartClick=n&&!!n.click,this.pinchDown=[],this.lastValidTouch={},e.tooltip.enabled&&(t.tooltip=new E(t,e.tooltip)),this.setDOMEvents()},normalize:function(e,i){var s,n,e=e||dt.event;return e.target||(e.target=e.srcElement),e=ce(e),n=e.touches?e.touches.item(0):e,i||(this.chartPosition=i=oe(this.chart.container)),n.pageX===V?(s=mt(e.x,e.clientX-i.left),n=e.y):(s=n.pageX-i.left,n=n.pageY-i.top),t(e,{chartX:ut(s),chartY:ut(n)})},getCoordinates:function(t){var e={xAxis:[],yAxis:[]};return se(this.chart.axes,function(i){e[i.isXAxis?"xAxis":"yAxis"].push({axis:i,value:i.toValue(t[i.horiz?"chartX":"chartY"])})}),e},getIndex:function(t){var e=this.chart;return e.inverted?e.plotHeight+e.plotTop-t.chartY:t.chartX-e.plotLeft},runPointActions:function(t){var e,i,s,n=this.chart,o=n.series,r=n.tooltip,a=n.hoverPoint,h=n.hoverSeries,l=n.chartWidth,c=this.getIndex(t);if(r&&this.options.tooltip.shared&&(!h||!h.noSharedTooltip)){for(e=[],i=o.length,s=0;sl&&e.splice(i,1);e.length&&e[0].clientX!==this.hoverX&&(r.refresh(e,t),this.hoverX=e[0].clientX)}h&&h.tracker?(n=h.tooltipPoints[c])&&n!==a&&n.onMouseOver(t):r&&r.followPointer&&!r.isHidden&&(t=r.getAnchor([{}],t),r.updatePosition({plotX:t[0],plotY:t[1]}))},reset:function(t){var e=this.chart,i=e.hoverSeries,s=e.hoverPoint,n=e.tooltip,e=n&&n.shared?e.hoverPoints:s;(t=t&&n&&e)&&p(e)[0].plotX===V&&(t=!1),t?n.refresh(e):(s&&s.onMouseOut(),i&&i.onMouseOut(),n&&(n.hide(),n.hideCrosshairs()),this.hoverX=null)},scaleGroups:function(t,e){var i,s=this.chart;se(s.series,function(n){i=t||n.getPlotBox(),n.xAxis&&n.xAxis.zoomEnabled&&(n.group.attr(i),n.markerGroup&&(n.markerGroup.attr(i),n.markerGroup.clip(e?s.clipRect:null)),n.dataLabelsGroup&&n.dataLabelsGroup.attr(i))}),s.clipRect.attr(e||s.clipBox)},pinchTranslateDirection:function(t,e,i,s,n,o,r){var a,h,l,c=this.chart,d=t?"x":"y",p=t?"X":"Y",u="chart"+p,g=t?"width":"height",f=c["plot"+(t?"Left":"Top")],m=1,x=c.inverted,y=c.bounds[t?"h":"v"],v=1===e.length,b=e[0][u],k=i[0][u],w=!v&&e[1][u],T=!v&&i[1][u],i=function(){!v&&yt(b-w)>20&&(m=yt(k-T)/yt(b-w)),h=(f-k)/m+b,a=c["plot"+(t?"Width":"Height")]/m};i(),e=h,ey.max&&(e=y.max-a,l=!0),l?(k-=.8*(k-r[d][0]),v||(T-=.8*(T-r[d][1])),i()):r[d]=[k,T],x||(o[d]=h-f,o[g]=a),o=x?1/m:m,n[g]=a,n[d]=e,s[x?t?"scaleY":"scaleX":"scale"+p]=m,s["translate"+p]=o*f+(k-o*b)},pinch:function(e){var i=this,s=i.chart,n=i.pinchDown,o=s.tooltip&&s.tooltip.options.followTouchMove,r=e.touches,a=r.length,h=i.lastValidTouch,l=i.zoomHor||i.pinchHor,c=i.zoomVert||i.pinchVert,d=l||c,p=i.selectionMarker,u={},g=1===a&&(i.inClass(e.target,"highcharts-tracker")&&s.runTrackerClick||s.runChartClick),f={};(d||o)&&!g&&e.preventDefault(),re(r,function(t){return i.normalize(t)}),"touchstart"===e.type?(se(r,function(t,e){n[e]={chartX:t.chartX,chartY:t.chartY}}),h.x=[n[0].chartX,n[1]&&n[1].chartX],h.y=[n[0].chartY,n[1]&&n[1].chartY],se(s.axes,function(t){if(t.zoomEnabled){var e=s.bounds[t.horiz?"h":"v"],i=t.minPixelPadding,n=t.toPixels(t.dataMin),o=t.toPixels(t.dataMax),r=xt(n,o),n=mt(n,o);e.min=xt(t.pos,r-i),e.max=mt(t.pos+t.len,n+i)}})):n.length&&(p||(i.selectionMarker=p=t({destroy:Xt},s.plotBox)),l&&i.pinchTranslateDirection(!0,n,r,u,p,f,h),c&&i.pinchTranslateDirection(!1,n,r,u,p,f,h),i.hasPinched=d,i.scaleGroups(u,f),!d&&o&&1===a&&this.runPointActions(i.normalize(e)))},dragStart:function(t){var e=this.chart;e.mouseIsDown=t.type,e.cancelClick=!1,e.mouseDownX=this.mouseDownX=t.chartX,e.mouseDownY=this.mouseDownY=t.chartY},drag:function(t){var e,i=this.chart,s=i.options.chart,n=t.chartX,o=t.chartY,r=this.zoomHor,a=this.zoomVert,h=i.plotLeft,l=i.plotTop,c=i.plotWidth,d=i.plotHeight,p=this.mouseDownX,u=this.mouseDownY;nh+c&&(n=h+c),ol+d&&(o=l+d),this.hasDragged=Math.sqrt(Math.pow(p-n,2)+Math.pow(u-o,2)),this.hasDragged>10&&(e=i.isInsidePlot(p-h,u-l),i.hasCartesianSeries&&(this.zoomX||this.zoomY)&&e&&!this.selectionMarker&&(this.selectionMarker=i.renderer.rect(h,l,r?1:c,a?1:d,0).attr({fill:s.selectionMarkerFill||"rgba(69,114,167,0.25)",zIndex:7}).add()),this.selectionMarker&&r&&(n-=p,this.selectionMarker.attr({width:yt(n),x:(n>0?0:n)+p})),this.selectionMarker&&a&&(n=o-u,this.selectionMarker.attr({height:yt(n),y:(n>0?0:n)+u})),e&&!this.selectionMarker&&s.panning&&i.pan(t,s.panning))},drop:function(e){var i=this.chart,s=this.hasPinched;if(this.selectionMarker){var n,o={xAxis:[],yAxis:[],originalEvent:e.originalEvent||e},r=this.selectionMarker,a=r.x,h=r.y;(this.hasDragged||s)&&(se(i.axes,function(t){if(t.zoomEnabled){var e=t.horiz,i=t.toValue(e?a:h),e=t.toValue(e?a+r.width:h+r.height);!isNaN(i)&&!isNaN(e)&&(o[t.xOrY+"Axis"].push({axis:t,min:xt(i,e),max:mt(i,e)}),n=!0)}}),n&&le(i,"selection",o,function(e){i.zoom(t(e,s?{animation:!1}:null))})),this.selectionMarker=this.selectionMarker.destroy(),s&&this.scaleGroups()}i&&(g(i.container,{cursor:i._cursor}),i.cancelClick=this.hasDragged>10,i.mouseIsDown=this.hasDragged=this.hasPinched=!1,this.pinchDown=[])},onContainerMouseDown:function(t){t=this.normalize(t),t.preventDefault&&t.preventDefault(),this.dragStart(t)},onDocumentMouseUp:function(t){this.drop(t)},onDocumentMouseMove:function(t){var e=this.chart,i=this.chartPosition,s=e.hoverSeries,t=this.normalize(t,i);i&&s&&!this.inClass(t.target,"highcharts-tracker")&&!e.isInsidePlot(t.chartX-e.plotLeft,t.chartY-e.plotTop)&&this.reset()},onContainerMouseLeave:function(){this.reset(),this.chartPosition=null},onContainerMouseMove:function(t){var e=this.chart,t=this.normalize(t);t.returnValue=!1,"mousedown"===e.mouseIsDown&&this.drag(t),(this.inClass(t.target,"highcharts-tracker")||e.isInsidePlot(t.chartX-e.plotLeft,t.chartY-e.plotTop))&&!e.openMenu&&this.runPointActions(t)},inClass:function(t,e){for(var i;t;){if(i=d(t,"class")){if(i.indexOf(e)!==-1)return!0;if(i.indexOf("highcharts-container")!==-1)return!1}t=t.parentNode}},onTrackerMouseOut:function(t){var e=this.chart.hoverSeries;!e||e.options.stickyTracking||this.inClass(t.toElement||t.relatedTarget,"highcharts-tooltip")||e.onMouseOut()},onContainerClick:function(e){var i,s,n,o=this.chart,r=o.hoverPoint,a=o.plotLeft,h=o.plotTop,l=o.inverted,e=this.normalize(e);e.cancelBubble=!0,o.cancelClick||(r&&this.inClass(e.target,"highcharts-tracker")?(i=this.chartPosition,s=r.plotX,n=r.plotY,t(r,{pageX:i.left+a+(l?o.plotWidth-n:s),pageY:i.top+h+(l?o.plotHeight-s:n)}),le(r.series,"click",t(e,{point:r})),o.hoverPoint&&r.firePointEvent("click",e)):(t(e,this.getCoordinates(e)),o.isInsidePlot(e.chartX-a,e.chartY-h)&&le(o,"click",e)))},onContainerTouchStart:function(t){var e=this.chart;1===t.touches.length?(t=this.normalize(t),e.isInsidePlot(t.chartX-e.plotLeft,t.chartY-e.plotTop)?(this.runPointActions(t),this.pinch(t)):this.reset()):2===t.touches.length&&this.pinch(t)},onContainerTouchMove:function(t){(1===t.touches.length||2===t.touches.length)&&this.pinch(t)},onDocumentTouchEnd:function(t){this.drop(t)},setDOMEvents:function(){var t,e=this,i=e.chart.container;this._events=t=[[i,"onmousedown","onContainerMouseDown"],[i,"onmousemove","onContainerMouseMove"],[i,"onclick","onContainerClick"],[i,"mouseleave","onContainerMouseLeave"],[ct,"mousemove","onDocumentMouseMove"],[ct,"mouseup","onDocumentMouseUp"]],Ot&&t.push([i,"ontouchstart","onContainerTouchStart"],[i,"ontouchmove","onContainerTouchMove"],[ct,"touchend","onDocumentTouchEnd"]),se(t,function(t){e["_"+t[2]]=function(i){e[t[2]](i)},0===t[1].indexOf("on")?t[0][t[1]]=e["_"+t[2]]:ae(t[0],t[1],e["_"+t[2]])})},destroy:function(){var t=this;se(t._events,function(e){0===e[1].indexOf("on")?e[0][e[1]]=null:he(e[0],e[1],t["_"+e[2]])}),delete t._events,clearInterval(t.tooltipTimeout)}},N.prototype={init:function(t,s){var n=this,o=s.itemStyle,r=u(s.padding,8),a=s.itemMarginTop||0;this.options=s,s.enabled&&(n.baseline=i(o.fontSize)+3+a,n.itemStyle=o,n.itemHiddenStyle=e(o,s.itemHiddenStyle),n.itemMarginTop=a,n.padding=r,n.initialItemX=r,n.initialItemY=r-5,n.maxItemWidth=0,n.chart=t,n.itemHeight=0,n.lastLineHeight=0,n.render(),ae(n.chart,"endResize",function(){n.positionCheckboxes()}))},colorizeItem:function(t,e){var i,s=this.options,n=t.legendItem,o=t.legendLine,r=t.legendSymbol,a=this.itemHiddenStyle.color,s=e?s.itemStyle.color:a,h=e?t.color:a,a=t.options&&t.options.marker,l={stroke:h,fill:h};if(n&&n.css({fill:s,color:s}),o&&o.attr({stroke:h}),r){if(a&&r.isMarker)for(i in a=t.convertAttribs(a))n=a[i],n!==V&&(l[i]=n);r.attr(l)}},positionItem:function(t){var e=this.options,i=e.symbolPadding,e=!e.rtl,s=t._legendItemPos,n=s[0],s=s[1],o=t.checkbox;t.legendGroup&&t.legendGroup.translate(e?n:this.legendWidth-n-2*i-4,s),o&&(o.x=n,o.y=s)},destroyItem:function(t){var e=t.checkbox;se(["legendItem","legendLine","legendSymbol","legendGroup"],function(e){t[e]&&(t[e]=t[e].destroy())}),e&&D(t.checkbox)},destroy:function(){var t=this.group,e=this.box;e&&(this.box=e.destroy()),t&&(this.group=t.destroy())},positionCheckboxes:function(t){var e,i=this.group.alignAttr,s=this.clipHeight||this.legendHeight;i&&(e=i.translateY,se(this.allItems,function(n){var o,r=n.checkbox;r&&(o=e+r.y+(t||0)+3,g(r,{left:i.translateX+n.legendItemWidth+r.x-20+"px",top:o+"px",display:o>e-6&&o(x||n.chartWidth-2*p-k)&&(s.itemX=k,s.itemY+=v+s.lastLineHeight+y,s.lastLineHeight=0),s.maxItemWidth=mt(s.maxItemWidth,r),s.lastItemY=v+s.itemY+y,s.lastLineHeight=mt(h,s.lastLineHeight),t._legendItemPos=[s.itemX,s.itemY],a?s.itemX+=r:(s.itemY+=v+h+y,s.lastLineHeight=h),s.offsetWidth=x||mt((a?s.itemX-k-g:r)+p,s.offsetWidth)},render:function(){var e,i,s,n,o=this,r=o.chart,a=r.renderer,h=o.group,l=o.box,d=o.options,p=o.padding,u=d.borderWidth,g=d.backgroundColor;o.itemX=o.initialItemX,o.itemY=o.initialItemY,o.offsetWidth=0,o.lastItemY=0,h||(o.group=h=a.g("legend").attr({zIndex:7}).add(),o.contentGroup=a.g().attr({zIndex:1}).add(h),o.scrollGroup=a.g().add(o.contentGroup)),o.renderTitle(),e=[],se(r.series,function(t){var i=t.options;i.showInLegend&&!c(i.linkedTo)&&(e=e.concat(t.legendItems||("point"===i.legendType?t.data:t)))}),P(e,function(t,e){return(t.options&&t.options.legendIndex||0)-(e.options&&e.options.legendIndex||0)}),d.reversed&&e.reverse(),o.allItems=e,o.display=i=!!e.length,se(e,function(t){o.renderItem(t)}),s=d.width||o.offsetWidth,n=o.lastItemY+o.lastLineHeight+o.titleHeight,n=o.handleOverflow(n),(u||g)&&(s+=p,n+=p,l?s>0&&n>0&&(l[l.isNew?"attr":"animate"](l.crisp(null,null,null,s,n)),l.isNew=!1):(o.box=l=a.rect(0,0,s,n,d.borderRadius,u||0).attr({stroke:d.borderColor,"stroke-width":u||0,fill:g||Et}).add(h).shadow(d.shadow),l.isNew=!0),l[i?"show":"hide"]()),o.legendWidth=s,o.legendHeight=n,se(e,function(t){o.positionItem(t)}),i&&h.align(t({width:s,height:n},d),!0,"spacingBox"),r.isResizing||this.positionCheckboxes()},handleOverflow:function(t){var e=this,i=this.chart,s=i.renderer,n=this.options,o=n.y,o=i.spacingBox.height+("top"===n.verticalAlign?-o:o)-this.padding,r=n.maxHeight,a=this.clipRect,h=n.navigation,l=u(h.animation,!0),c=h.arrowSize||12,d=this.nav;return"horizontal"===n.layout&&(o/=2),r&&(o=xt(o,r)),t>o&&!n.useHTML?(this.clipHeight=i=o-20-this.titleHeight,this.pageCount=ft(t/i),this.currentPage=u(this.currentPage,1),this.fullHeight=t,a||(a=e.clipRect=s.clipRect(0,0,9999,0),e.contentGroup.clip(a)),a.attr({height:i}),d||(this.nav=d=s.g().attr({zIndex:1}).add(this.group),this.up=s.symbol("triangle",0,0,c,c).on("click",function(){e.scroll(-1,l)}).add(d),this.pager=s.text("",15,10).css(h.style).add(d),this.down=s.symbol("triangle-down",0,0,c,c).on("click",function(){e.scroll(1,l)}).add(d)),e.scroll(0),t=o):d&&(a.attr({height:i.chartHeight}),d.hide(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0),t},scroll:function(t,e){var i=this.pageCount,s=this.currentPage+t,n=this.clipHeight,o=this.options.navigation,r=o.activeColor,a=o.inactiveColor,o=this.pager,h=this.padding;s>i&&(s=i),s>0&&(e!==V&&B(e,this.chart),this.nav.attr({translateX:h,translateY:n+7+this.titleHeight,visibility:"visible"}),this.up.attr({fill:1===s?a:r}).css({cursor:1===s?"default":"pointer"}),o.attr({text:s+"/"+this.pageCount}),this.down.attr({x:18+this.pager.getBBox().width,fill:s===i?a:r}).css({cursor:s===i?"default":"pointer"}),n=-xt(n*(s-1),this.fullHeight-n+h)+1,this.scrollGroup.animate({translateY:n}),o.attr({text:s+"/"+i}),this.currentPage=s,this.positionCheckboxes(n))}},/Trident.*?11\.0/.test(Tt)&&v(N.prototype,"positionItem",function(t,e){var i=this;setTimeout(function(){t.call(i,e)})}),F.prototype={init:function(t,i){var s,n=t.series;t.series=null,s=e(U,t),s.series=t.series=n,n=s.chart,this.margin=this.splashArray("margin",n),this.spacing=this.splashArray("spacing",n);var o=n.events;this.bounds={h:{},v:{}},this.callback=i,this.isResizing=0,this.options=s,this.axes=[],this.series=[],this.hasCartesianSeries=n.showAxes;var r,a=this;if(a.index=Wt.length,Wt.push(a),n.reflow!==!1&&ae(a,"load",function(){a.initReflow()}),o)for(r in o)ae(a,r,o[r]);a.xAxis=[],a.yAxis=[],a.animation=!Bt&&u(n.animation,!0),a.pointCount=0,a.counters=new L,a.firstRender()},initSeries:function(t){var e=this.options.chart;return(e=qt[t.type||e.type||e.defaultSeriesType])||I(17,!0),e=new e,e.init(this,t),e},addSeries:function(t,e,i){var s,n=this;return t&&(e=u(e,!0),le(n,"addSeries",{options:t},function(){s=n.initSeries(t),n.isDirtyLegend=!0,n.linkSeries(),e&&n.redraw(i)})),s},addAxis:function(t,i,s,n){var o=i?"xAxis":"yAxis",r=this.options;new Y(this,e(t,{index:this[o].length,isX:i})),r[o]=p(r[o]||{}),r[o].push(t),u(s,!0)&&this.redraw(n)},isInsidePlot:function(t,e,i){var s=i?e:t,t=i?t:e;return s>=0&&s<=this.plotWidth&&t>=0&&t<=this.plotHeight},adjustTickAmounts:function(){this.options.chart.alignTicks!==!1&&se(this.axes,function(t){t.adjustTickAmount()}),this.maxTicks=null},redraw:function(e){var i,s,n=this.axes,o=this.series,r=this.pointer,a=this.legend,h=this.isDirtyLegend,l=this.isDirtyBox,c=o.length,d=c,p=this.renderer,u=p.isHidden(),g=[];for(B(e,this),u&&this.cloneRenderTo(),this.layOutTitles();d--;)if(e=o[d],e.options.stacking&&(i=!0,e.isDirty)){s=!0;break}if(s)for(d=c;d--;)e=o[d],e.options.stacking&&(e.isDirty=!0);se(o,function(t){t.isDirty&&"point"===t.options.legendType&&(h=!0)}),h&&a.options.enabled&&(a.render(),this.isDirtyLegend=!1),i&&this.getStacks(),this.hasCartesianSeries&&(this.isResizing||(this.maxTicks=null,se(n,function(t){t.setScale()})),this.adjustTickAmounts(),this.getMargins(),se(n,function(t){t.isDirty&&(l=!0)}),se(n,function(e){e.isDirtyExtremes&&(e.isDirtyExtremes=!1,g.push(function(){le(e,"afterSetExtremes",t(e.eventArgs,e.getExtremes())),delete e.eventArgs})),(l||i)&&e.redraw()})),l&&this.drawChartBox(),se(o,function(t){t.isDirty&&t.visible&&(!t.isCartesian||t.xAxis)&&t.redraw()}),r&&r.reset&&r.reset(!0),p.draw(),le(this,"redraw"),u&&this.cloneRenderTo(!0),se(g,function(t){t.call()})},showLoading:function(e){var i=this.options,s=this.loadingDiv,n=i.loading;s||(this.loadingDiv=s=f(Yt,{className:"highcharts-loading"},t(n.style,{zIndex:10,display:Et}),this.container),this.loadingSpan=f("span",null,n.labelStyle,s)),this.loadingSpan.innerHTML=e||i.lang.loading,this.loadingShown||(g(s,{opacity:0,display:"",left:this.plotLeft+"px",top:this.plotTop+"px",width:this.plotWidth+"px",height:this.plotHeight+"px"}),de(s,{opacity:n.style.opacity},{duration:n.showDuration||0}),this.loadingShown=!0)},hideLoading:function(){var t=this.options,e=this.loadingDiv;e&&de(e,{opacity:0},{duration:t.loading.hideDuration||100,complete:function(){g(e,{display:Et})}}),this.loadingShown=!1},get:function(t){var e,i,s=this.axes,n=this.series;for(e=0;ext(h.dataMin,h.min)&&r=18&&e<=25&&(e=15)),s&&(s.css({width:(n.width||r)+"px"}).align(t({y:e+o.margin},n),!1,"spacingBox"),!n.floating&&!n.verticalAlign&&(e=ft(e+s.getBBox().height))),this.titleOffset=e},getChartSize:function(){var t=this.options.chart,e=this.renderToClone||this.renderTo;this.containerWidth=te(e,"width"),this.containerHeight=te(e,"height"),this.chartWidth=mt(0,t.width||this.containerWidth||600),this.chartHeight=mt(0,u(t.height,this.containerHeight>19?this.containerHeight:400))},cloneRenderTo:function(t){var e=this.renderToClone,i=this.container;t?e&&(this.renderTo.appendChild(i),D(e),delete this.renderToClone):(i&&i.parentNode===this.renderTo&&this.renderTo.removeChild(i),this.renderToClone=e=this.renderTo.cloneNode(0),g(e,{position:"absolute",top:"-9999px",display:"block"}),ct.body.appendChild(e),i&&e.appendChild(i))},getContainer:function(){var e,n,o,r,a=this.options.chart;this.renderTo=e=a.renderTo,r="highcharts-"+Rt++,s(e)&&(this.renderTo=e=ct.getElementById(e)),e||I(13,!0),n=i(d(e,"data-highcharts-chart")),!isNaN(n)&&Wt[n]&&Wt[n].destroy(),d(e,"data-highcharts-chart",this.index),e.innerHTML="",e.offsetWidth||this.cloneRenderTo(),this.getChartSize(),n=this.chartWidth,o=this.chartHeight,this.container=e=f(Yt,{className:"highcharts-container"+(a.className?" "+a.className:""),id:r},t({position:"relative",overflow:"hidden",width:n+"px",height:o+"px",textAlign:"left",lineHeight:"normal",zIndex:0,"-webkit-tap-highlight-color":"rgba(0,0,0,0)"},a.style),this.renderToClone||e),this._cursor=e.style.cursor,this.renderer=a.forExport?new fe(e,n,o,(!0)):new j(e,n,o),Bt&&this.renderer.create(this,e,n,o)},getMargins:function(){var t,e=this.spacing,i=this.legend,s=this.margin,n=this.options.legend,o=u(n.margin,10),r=n.x,a=n.y,h=n.align,l=n.verticalAlign,d=this.titleOffset;this.resetMargins(),t=this.axisOffset,d&&!c(s[0])&&(this.plotTop=mt(this.plotTop,d+this.options.title.margin+e[0])),i.display&&!n.floating&&("right"===h?c(s[1])||(this.marginRight=mt(this.marginRight,i.legendWidth-r+o+e[1])):"left"===h?c(s[3])||(this.plotLeft=mt(this.plotLeft,i.legendWidth+r+o+e[3])):"top"===l?c(s[0])||(this.plotTop=mt(this.plotTop,i.legendHeight+a+o+e[0])):"bottom"!==l||c(s[2])||(this.marginBottom=mt(this.marginBottom,i.legendHeight-a+o+e[2]))),this.extraBottomMargin&&(this.marginBottom+=this.extraBottomMargin),this.extraTopMargin&&(this.plotTop+=this.extraTopMargin),this.hasCartesianSeries&&se(this.axes,function(t){t.getOffset()}),c(s[3])||(this.plotLeft+=t[3]),c(s[0])||(this.plotTop+=t[0]),c(s[2])||(this.marginBottom+=t[2]),c(s[1])||(this.marginRight+=t[1]),this.setChartSize()},initReflow:function(){function t(t){var o=s.width||te(n,"width"),r=s.height||te(n,"height"),t=t?t.target:dt;i.hasUserSize||!o||!r||t!==dt&&t!==ct||(o===i.containerWidth&&r===i.containerHeight||(clearTimeout(e),i.reflowTimeout=e=setTimeout(function(){i.container&&(i.setSize(o,r,!1),i.hasUserSize=null)},100)),i.containerWidth=o,i.containerHeight=r)}var e,i=this,s=i.options.chart,n=i.renderTo;i.reflow=t,ae(dt,"resize",t),ae(i,"destroy",function(){he(dt,"resize",t)})},setSize:function(t,e,i){var s,n,o,r=this;r.isResizing+=1,o=function(){r&&le(r,"endResize",null,function(){r.isResizing-=1})},B(i,r),r.oldChartHeight=r.chartHeight,r.oldChartWidth=r.chartWidth,c(t)&&(r.chartWidth=s=mt(0,ut(t)),r.hasUserSize=!!s),c(e)&&(r.chartHeight=n=mt(0,ut(e))),g(r.container,{width:s+"px",height:n+"px"}),r.setChartSize(!0),r.renderer.setSize(s,n,i),r.maxTicks=null,se(r.axes,function(t){t.isDirty=!0,t.setScale()}),se(r.series,function(t){t.isDirty=!0}),r.isDirtyLegend=!0,r.isDirtyBox=!0,r.getMargins(),r.redraw(i),r.oldChartHeight=null,le(r,"resize"),K===!1?o():setTimeout(o,K&&K.duration||500)},setChartSize:function(t){var e,i,s,n,o=this.inverted,r=this.renderer,a=this.chartWidth,h=this.chartHeight,l=this.options.chart,c=this.spacing,d=this.clipOffset;this.plotLeft=e=ut(this.plotLeft),this.plotTop=i=ut(this.plotTop),this.plotWidth=s=mt(0,ut(a-e-this.marginRight)),this.plotHeight=n=mt(0,ut(h-i-this.marginBottom)),this.plotSizeX=o?n:s,this.plotSizeY=o?s:n,this.plotBorderWidth=l.plotBorderWidth||0,this.spacingBox=r.spacingBox={x:c[3],y:c[0],width:a-c[3]-c[1],height:h-c[0]-c[2]},this.plotBox=r.plotBox={x:e,y:i,width:s,height:n},a=2*gt(this.plotBorderWidth/2), +o=ft(mt(a,d[3])/2),r=ft(mt(a,d[0])/2),this.clipBox={x:o,y:r,width:gt(this.plotSizeX-mt(a,d[1])/2-o),height:gt(this.plotSizeY-mt(a,d[2])/2-r)},t||se(this.axes,function(t){t.setAxisSize(),t.setAxisTranslation()})},resetMargins:function(){var t=this.spacing,e=this.margin;this.plotTop=u(e[0],t[0]),this.marginRight=u(e[1],t[1]),this.marginBottom=u(e[2],t[2]),this.plotLeft=u(e[3],t[3]),this.axisOffset=[0,0,0,0],this.clipOffset=[0,0,0,0]},drawChartBox:function(){var t,e=this.options.chart,i=this.renderer,s=this.chartWidth,n=this.chartHeight,o=this.chartBackground,r=this.plotBackground,a=this.plotBorder,h=this.plotBGImage,l=e.borderWidth||0,c=e.backgroundColor,d=e.plotBackgroundColor,p=e.plotBackgroundImage,u=e.plotBorderWidth||0,g=this.plotLeft,f=this.plotTop,m=this.plotWidth,x=this.plotHeight,y=this.plotBox,v=this.clipRect,b=this.clipBox;t=l+(e.shadow?8:0),(l||c)&&(o?o.animate(o.crisp(null,null,null,s-t,n-t)):(o={fill:c||Et},l&&(o.stroke=e.borderColor,o["stroke-width"]=l),this.chartBackground=i.rect(t/2,t/2,s-t,n-t,e.borderRadius,l).attr(o).add().shadow(e.shadow))),d&&(r?r.animate(y):this.plotBackground=i.rect(g,f,m,x,0).attr({fill:d}).add().shadow(e.plotShadow)),p&&(h?h.animate(y):this.plotBGImage=i.image(p,g,f,m,x).add()),v?v.animate({width:b.width,height:b.height}):this.clipRect=i.clipRect(b),u&&(a?a.animate(a.crisp(null,g,f,m,x)):this.plotBorder=i.rect(g,f,m,x,0,-u).attr({stroke:e.plotBorderColor,"stroke-width":u,zIndex:1}).add()),this.isDirtyBox=!1},propFromSeries:function(){var t,e,i,s=this,n=s.options.chart,o=s.options.series;se(["inverted","angular","polar"],function(r){for(t=qt[n.type||n.defaultSeriesType],i=s[r]||n[r]||t&&t.prototype[r],e=o&&o.length;!i&&e--;)(t=qt[o[e].type])&&t.prototype[r]&&(i=!0);s[r]=i})},linkSeries:function(){var t=this,e=t.series;se(e,function(t){t.linkedSeries.length=0}),se(e,function(e){var i=e.options.linkedTo;s(i)&&(i=":previous"===i?t.series[e.index-1]:t.get(i))&&(i.linkedSeries.push(e),e.linkedParent=i)})},render:function(){var e,s=this,n=s.axes,o=s.renderer,r=s.options,a=r.labels,h=r.credits;s.setTitle(),s.legend=new N(s,r.legend),s.getStacks(),se(n,function(t){t.setScale()}),s.getMargins(),s.maxTicks=null,se(n,function(t){t.setTickPositions(!0),t.setMaxTicks()}),s.adjustTickAmounts(),s.getMargins(),s.drawChartBox(),s.hasCartesianSeries&&se(n,function(t){t.render()}),s.seriesGroup||(s.seriesGroup=o.g("series-group").attr({zIndex:3}).add()),se(s.series,function(t){t.translate(),t.setTooltipPoints(),t.render()}),a.items&&se(a.items,function(e){var n=t(a.style,e.style),r=i(n.left)+s.plotLeft,h=i(n.top)+s.plotTop+12;delete n.left,delete n.top,o.text(e.html,r,h).attr({zIndex:2}).css(n).add()}),h.enabled&&!s.credits&&(e=h.href,s.credits=o.text(h.text,0,0).on("click",function(){e&&(location.href=e)}).attr({align:h.position.align,zIndex:8}).css(h.style).add().align(h.position)),s.hasRendered=!0},destroy:function(){var t,e=this,i=e.axes,s=e.series,n=e.container,o=n&&n.parentNode;for(le(e,"destroy"),Wt[e.index]=V,e.renderTo.removeAttribute("data-highcharts-chart"),he(e),t=i.length;t--;)i[t]=i[t].destroy();for(t=s.length;t--;)s[t]=s[t].destroy();se("title,subtitle,chartBackground,plotBackground,plotBGImage,plotBorder,seriesGroup,clipRect,credits,pointer,scroller,rangeSelector,legend,resetZoomButton,tooltip,renderer".split(","),function(t){var i=e[t];i&&i.destroy&&(e[t]=i.destroy())}),n&&(n.innerHTML="",he(n),o&&D(n));for(t in e)delete e[t]},isReadyToRender:function(){var t=this;return!(!It&&dt==dt.top&&"complete"!==ct.readyState||Bt&&!dt.canvg)||(Bt?ye.push(function(){t.firstRender()},t.options.global.canvasToolsURL):ct.attachEvent("onreadystatechange",function(){ct.detachEvent("onreadystatechange",t.firstRender),"complete"===ct.readyState&&t.firstRender()}),!1)},firstRender:function(){var t=this,e=t.options,i=t.callback;t.isReadyToRender()&&(t.getContainer(),le(t,"init"),t.resetMargins(),t.setChartSize(),t.propFromSeries(),t.getAxes(),se(e.series||[],function(e){t.initSeries(e)}),t.linkSeries(),le(t,"beforeRender"),t.pointer=new G(t,e),t.render(),t.renderer.draw(),i&&i.apply(t,[t]),se(t.callbacks,function(e){e.apply(t,[t])}),t.cloneRenderTo(!0),le(t,"load"))},splashArray:function(t,e){var i=e[t],i=n(i)?i:[i,i,i,i];return[u(e[t+"Top"],i[0]),u(e[t+"Right"],i[1]),u(e[t+"Bottom"],i[2]),u(e[t+"Left"],i[3])]}},F.prototype.callbacks=[];var ve=function(){};ve.prototype={init:function(t,e,i){return this.series=t,this.applyOptions(e,i),this.pointAttr={},t.options.colorByPoint&&(e=t.options.colors||t.chart.options.colors,this.color=this.color||e[t.colorCounter++],t.colorCounter===e.length)&&(t.colorCounter=0),t.chart.pointCount++,this},applyOptions:function(e,i){var s=this.series,n=s.pointValKey,e=ve.prototype.optionsToObject.call(this,e);return t(this,e),this.options=this.options?t(this.options,e):e,n&&(this.y=this[n]),this.x===V&&s&&(this.x=i===V?s.autoIncrement():i),this},optionsToObject:function(t){var e,i=this.series,s=i.pointArrayMap||["y"],n=s.length,r=0,a=0;if("number"==typeof t||null===t)e={y:t};else if(o(t))for(e={},t.length>n&&(i=typeof t[0],"string"===i?e.name=t[0]:"number"===i&&(e.x=t[0]),r++);ae+1&&i.push(s.slice(e+1,o)),e=o):o===n-1&&i.push(s.slice(e+1,o+1))});this.segments=i},setOptions:function(t){var i=this.chart.options,s=i.plotOptions,n=s[this.type];return this.userOptions=t,t=e(n,s.series,t),this.tooltipOptions=e(i.tooltip,t.tooltip),null===n.marker&&delete t.marker,t},getColor:function(){var t,e=this.options,i=this.userOptions,s=this.chart.options.colors,n=this.chart.counters;t=e.color||ue[this.type].color,t||e.colorByPoint||(c(i._colorIndex)?e=i._colorIndex:(i._colorIndex=n.color,e=n.color++),t=s[e]),this.color=t,n.wrapColor(s.length)},getSymbol:function(){var t=this.userOptions,e=this.options.marker,i=this.chart,s=i.options.symbols,i=i.counters;this.symbol=e.symbol,this.symbol||(c(t._symbolIndex)?t=t._symbolIndex:(t._symbolIndex=i.symbol,t=i.symbol++),this.symbol=s[t]),/^url/.test(this.symbol)&&(e.radius=0),i.wrapSymbol(s.length)},drawLegendSymbol:function(t){var e,i=this.options,s=i.marker,n=t.options;e=n.symbolWidth;var o=this.chart.renderer,r=this.legendGroup,t=t.baseline-ut(.3*o.fontMetrics(n.itemStyle.fontSize).b);i.lineWidth&&(n={"stroke-width":i.lineWidth},i.dashStyle&&(n.dashstyle=i.dashStyle),this.legendLine=o.path(["M",0,t,"L",e,t]).attr(n).add(r)),s&&s.enabled&&(i=s.radius,this.legendSymbol=e=o.symbol(this.symbol,e/2-i,t-i,2*i,2*i).add(r),e.isMarker=!0)},addPoint:function(t,e,i,s){var n,o=this.options,r=this.data,a=this.graph,h=this.area,l=this.chart,c=this.xData,d=this.yData,p=this.zData,g=this.names,f=a&&a.shift||0,m=o.data;if(B(s,l),i&&se([a,h,this.graphNeg,this.areaNeg],function(t){t&&(t.shift=f+1)}),h&&(h.isArea=!0),e=u(e,!0),s={series:this},this.pointClass.prototype.applyOptions.apply(s,[t]),a=s.x,h=c.length,this.requireSorting&&aa;)h--;c.splice(h,0,a),d.splice(h,0,this.toYData?this.toYData(s):s.y),p.splice(h,0,s.z),g&&(g[a]=s.name),m.splice(h,0,t),n&&(this.data.splice(h,0,null),this.processData()),"point"===o.legendType&&this.generatePoints(),i&&(r[0]&&r[0].remove?r[0].remove(!1):(r.shift(),c.shift(),d.shift(),p.shift(),m.shift())),this.isDirtyData=this.isDirty=!0,e&&(this.getAttribs(),l.redraw())},setData:function(t,e){var i,n=this.points,a=this.options,h=this.chart,l=null,c=this.xAxis,d=c&&c.categories&&!c.categories.length?[]:null;this.xIncrement=null,this.pointRange=c&&c.categories?1:a.pointRange,this.colorCounter=0;var p=[],g=[],f=[],m=t?t.length:[];i=u(a.turboThreshold,1e3);var x=this.pointArrayMap,x=x&&x.length,y=!!this.toYData;if(i&&m>i){for(i=0;null===l&&il||this.forceCrop)&&(t=a.min,a=a.max,i[n-1]a?(i=[],s=[]):(i[0]a)&&(e=this.cropData(this.xData,this.yData,t,a),i=e.xData,s=e.yData,e=e.start,o=!0)),a=i.length-1;a>=0;a--)n=i[a]-i[a-1],n>0&&(r===V||n=i){r=mt(0,n-h);break}for(;ns){a=n+h;break}return{xData:t.slice(r,a),yData:e.slice(r,a),start:r,end:a}},generatePoints:function(){var t,e,i,s,n=this.options.data,o=this.data,r=this.processedXData,a=this.processedYData,h=this.pointClass,l=r.length,c=this.cropStart||0,d=this.hasGroupedData,u=[];for(o||d||(o=[],o.length=n.length,o=this.data=o),s=0;s0),e=this.getExtremesFromAll||this.cropped||(o[s+1]||e)>=d&&(o[s-1]||e)<=c,t&&e)if(t=i.length)for(;t--;)null!==i[t]&&(h[l++]=i[t]);else h[l++]=i;this.dataMin=u(void 0,A(h)),this.dataMax=u(void 0,C(h))},translate:function(){this.processedXData||this.processData(),this.generatePoints();for(var t=this.options,e=t.stacking,i=this.xAxis,s=i.categories,n=this.yAxis,o=this.points,a=o.length,h=!!this.modifyValue,l=t.pointPlacement,d="between"===l||r(l),p=t.threshold,t=0;t=a.min&&e<=a.max)for(s=o[n+1],e=i===V?0:i+1,i=o[n+1]?xt(mt(0,gt((r.clientX+(s?s.wrappedClientX||s.clientX:h))/2)),h):h;e>=0&&e<=i;)l[e++]=r;this.tooltipPoints=l}},tooltipHeaderFormatter:function(t){var e,i=this.tooltipOptions,s=i.xDateFormat,n=i.dateTimeLabelFormats,o=this.xAxis,a=o&&"datetime"===o.options.type,i=i.headerFormat,o=o&&o.closestPointRange;if(a&&!s)if(o){for(e in q)if(q[e]>=o){s=n[e];break}}else s=n.day;return a&&s&&r(t.key)&&(i=i.replace("{point.key}","{point.key:"+s+"}")),b(i,{point:t,series:this})},onMouseOver:function(){var t=this.chart,e=t.hoverSeries;e&&e!==this&&e.onMouseOut(),this.options.events.mouseOver&&le(this,"mouseOver"),this.setState("hover"),t.hoverSeries=this},onMouseOut:function(){var t=this.options,e=this.chart,i=e.tooltip,s=e.hoverPoint;s&&s.onMouseOut(),this&&t.events.mouseOut&&le(this,"mouseOut"),i&&!t.stickyTracking&&(!i.shared||this.noSharedTooltip)&&i.hide(),this.setState(),e.hoverSeries=null},animate:function(e){var i,s=this,o=s.chart,r=o.renderer;i=s.options.animation;var a,h=o.clipBox,l=o.inverted;i&&!n(i)&&(i=ue[s.type].animation),a="_sharedClip"+i.duration+i.easing,e?(e=o[a],i=o[a+"m"],e||(o[a]=e=r.clipRect(t(h,{width:0})),o[a+"m"]=i=r.clipRect(-99,l?-o.plotLeft:-o.plotTop,99,l?o.chartWidth:o.chartHeight)),s.group.clip(e),s.markerGroup.clip(i),s.sharedClipKey=a):((e=o[a])&&(e.animate({width:o.plotSizeX},i),o[a+"m"].animate({width:o.plotSizeX+99},i)),s.animate=null,s.animationTimeout=setTimeout(function(){s.afterAnimate()},i.duration))},afterAnimate:function(){var t=this.chart,e=this.sharedClipKey,i=this.group;i&&this.options.clip!==!1&&(i.clip(t.clipRect),this.markerGroup.clip()),setTimeout(function(){e&&t[e]&&(t[e]=t[e].destroy(),t[e+"m"]=t[e+"m"].destroy())},100)},drawPoints:function(){var e,i,s,n,o,r,a,h,l,c,d=this.points,p=this.chart,g=this.options.marker,f=this.markerGroup;if(g.enabled||this._hasPointMarkers)for(n=d.length;n--;)o=d[n],i=gt(o.plotX),s=o.plotY,l=o.graphic,a=o.marker||{},e=g.enabled&&a.enabled===V||a.enabled,c=p.isInsidePlot(ut(i),s,p.inverted),e&&s!==V&&!isNaN(s)&&null!==o.y?(e=o.pointAttr[o.selected?"select":""],r=e.r,a=u(a.symbol,this.symbol),h=0===a.indexOf("url"),l?l.attr({visibility:c?It?"inherit":"visible":"hidden"}).animate(t({x:i-r,y:s-r},l.symbolName?{width:2*r,height:2*r}:{})):c&&(r>0||h)&&(o.graphic=p.renderer.symbol(a,i-r,s-r,2*r,2*r).attr(e).add(f))):l&&(o.graphic=l.destroy())},convertAttribs:function(t,e,i,s){var n,o,r=this.pointAttrToOptions,a={},t=t||{},e=e||{},i=i||{},s=s||{};for(n in r)o=r[n],a[n]=u(t[o],e[n],i[n],s[n]);return a},getAttribs:function(){var e,i,s,n=this,o=n.options,r=ue[n.type].marker?o.marker:o,a=r.states,h=a.hover,l=n.color,d={stroke:l,fill:l},p=n.points||[],u=[],g=n.pointAttrToOptions,f=o.negativeColor,m=r.lineColor;for(o.marker?(h.radius=h.radius||r.radius+2,h.lineWidth=h.lineWidth||r.lineWidth+1):h.color=h.color||ge(h.color||l).brighten(h.brightness).get(),u[""]=n.convertAttribs(r,d),se(["hover","select"],function(t){u[t]=n.convertAttribs(a[t],u[""])}),n.pointAttr=u,l=p.length;l--;){if(d=p[l],(r=d.options&&d.options.marker||d.options)&&r.enabled===!1&&(r.radius=0),d.negative&&f&&(d.color=d.fillColor=f),e=o.colorByPoint||d.color,d.options)for(s in g)c(r[g[s]])&&(e=!0);e?(r=r||{},i=[],a=r.states||{},e=a.hover=a.hover||{},o.marker||(e.color=ge(e.color||d.color).brighten(e.brightness||h.brightness).get()),i[""]=n.convertAttribs(t({color:d.color,fillColor:d.color,lineColor:null===m?d.color:V},r),u[""]),i.hover=n.convertAttribs(a.hover,u.hover,i[""]),i.select=n.convertAttribs(a.select,u.select,i[""])):i=u,d.pointAttr=i}},update:function(i,s){var n,o=this.chart,r=this.type,a=qt[r].prototype,i=e(this.userOptions,{animation:!1,index:this.index,pointStart:this.xData[0]},{data:this.options.data},i);this.remove(!1);for(n in a)a.hasOwnProperty(n)&&(this[n]=V);t(this,qt[i.type||r].prototype),this.init(o,i),u(s,!0)&&o.redraw(!1)},destroy:function(){var t,e,i,s,n,o=this,r=o.chart,a=/AppleWebKit\/533/.test(Tt),h=o.data||[];for(le(o,"destroy"),he(o),se(["xAxis","yAxis"],function(t){(n=o[t])&&(l(n.series,o),n.isDirty=n.forceRedraw=!0,n.stacks={})}),o.legendItem&&o.chart.legend.destroyItem(o),e=h.length;e--;)(i=h[e])&&i.destroy&&i.destroy();o.points=null,clearTimeout(o.animationTimeout),se("area,graph,dataLabelsGroup,group,markerGroup,tracker,graphNeg,areaNeg,posClip,negClip".split(","),function(e){o[e]&&(t=a&&"group"===e?"hide":"destroy",o[e][t]())}),r.hoverSeries===o&&(r.hoverSeries=null),l(r.series,o);for(s in o)delete o[s]},drawDataLabels:function(){var t,i,s,n,o=this,r=o.options.dataLabels,a=o.points;(r.enabled||o._hasPointLabels)&&(o.dlProcessOptions&&o.dlProcessOptions(r),n=o.plotGroup("dataLabelsGroup","data-labels",o.visible?"visible":"hidden",r.zIndex||6),i=r,se(a,function(a){var h,l,d,p=a.dataLabel,g=a.connector,f=!0;if(t=a.options&&a.options.dataLabels,h=u(t&&t.enabled,i.enabled),p&&!h)a.dataLabel=p.destroy();else if(h){if(r=e(i,t),h=r.rotation,l=a.getLabelConfig(),s=r.format?b(r.format,l):r.formatter.call(l,r),r.style.color=u(r.color,r.style.color,o.color,"black"),p)c(s)?(p.attr({text:s}),f=!1):(a.dataLabel=p=p.destroy(),g&&(a.connector=g.destroy()));else if(c(s)){p={fill:r.backgroundColor,stroke:r.borderColor,"stroke-width":r.borderWidth,r:r.borderRadius||0,rotation:h,padding:r.padding,zIndex:1};for(d in p)p[d]===V&&delete p[d];p=a.dataLabel=o.chart.renderer[h?"text":"label"](s,0,-999,null,null,null,r.useHTML).attr(p).css(r.style).add(n).shadow(r.shadow)}p&&o.alignDataLabel(a,p,r,null,f)}}))},alignDataLabel:function(e,i,s,n,o){var r=this.chart,a=r.inverted,h=u(e.plotX,-999),l=u(e.plotY,-999),c=i.getBBox();(e=this.visible&&r.isInsidePlot(e.plotX,e.plotY,a))&&(n=t({x:a?r.plotWidth-l:h,y:ut(a?r.plotHeight-h:l),width:0,height:0},n),t(s,{width:c.width,height:c.height}),s.rotation?(a={align:s.align,x:n.x+s.x+n.width/2,y:n.y+s.y+n.height/2},i[o?"attr":"animate"](a)):(i.align(s,null,n),a=i.alignAttr,"justify"===u(s.overflow,"justify")?this.justifyDataLabel(i,s,a,c,n,o):u(s.crop,!0)&&(e=r.isInsidePlot(a.x,a.y)&&r.isInsidePlot(a.x+c.width,a.y+c.height)))),e||i.attr({y:-999})},justifyDataLabel:function(t,e,i,s,n,o){var r,a,h=this.chart,l=e.align,c=e.verticalAlign;r=i.x,r<0&&("right"===l?e.align="left":e.x=-r,a=!0),r=i.x+s.width,r>h.plotWidth&&("left"===l?e.align="right":e.x=h.plotWidth-r,a=!0),r=i.y,r<0&&("bottom"===c?e.verticalAlign="top":e.y=-r,a=!0),r=i.y+s.height,r>h.plotHeight&&("top"===c?e.verticalAlign="bottom":e.y=h.plotHeight-r,a=!0),a&&(t.placed=!o,t.align(e,null,n))},getSegmentPath:function(t){var e=this,i=[],s=e.options.step;return se(t,function(n,o){var r,a=n.plotX,h=n.plotY;e.getPointSpline?i.push.apply(i,e.getPointSpline(t,n,o)):(i.push(o?"L":"M"),s&&o&&(r=t[o-1],"right"===s?i.push(r.plotX,h):"center"===s?i.push((r.plotX+a)/2,r.plotY,(r.plotX+a)/2,h):i.push(a,r.plotY)),i.push(n.plotX,n.plotY))}),i},getGraphPath:function(){var t,e=this,i=[],s=[];return se(e.segments,function(n){t=e.getSegmentPath(n),n.length>1?i=i.concat(t):s.push(n[0])}),e.singlePoints=s,e.graphPath=i},drawGraph:function(){var t=this,e=this.options,i=[["graph",e.lineColor||this.color]],s=e.lineWidth,n=e.dashStyle,o=this.getGraphPath(),r=e.negativeColor;r&&i.push(["graphNeg",r]),se(i,function(i,r){var a=i[0],h=t[a];h?(pe(h),h.animate({d:o})):s&&o.length&&(h={stroke:i[1],"stroke-width":s,zIndex:1},n?h.dashstyle=n:h["stroke-linecap"]=h["stroke-linejoin"]="round",t[a]=t.chart.renderer.path(o).attr(h).add(t.group).shadow(!r&&e.shadow))})},clipNeg:function(){var t,e=this.options,i=this.chart,s=i.renderer,n=e.negativeColor||e.negativeFillColor,o=this.graph,r=this.area,a=this.posClip,h=this.negClip;t=i.chartWidth;var l=i.chartHeight,c=mt(t,l),d=this.yAxis;n&&(o||r)&&(n=ut(d.toPixels(e.threshold||0,!0)),e={x:0,y:0,width:c,height:n},c={x:0,y:n,width:c,height:c},i.inverted&&(e.height=c.y=i.plotWidth-n,s.isVML&&(e={x:i.plotWidth-n-i.plotLeft,y:0,width:t,height:l},c={x:n+i.plotLeft-t,y:0,width:i.plotLeft+n,height:t})),d.reversed?(i=c,t=e):(i=e,t=c),a?(a.animate(i),h.animate(t)):(this.posClip=a=s.clipRect(i),this.negClip=h=s.clipRect(t),o&&this.graphNeg&&(o.clip(a),this.graphNeg.clip(h)),r&&(r.clip(a),this.areaNeg.clip(h))))},invertGroups:function(){function t(){var t={width:e.yAxis.len,height:e.xAxis.len};se(["group","markerGroup"],function(i){e[i]&&e[i].attr(t).invert()})}var e=this,i=e.chart;e.xAxis&&(ae(i,"resize",t),ae(e,"destroy",function(){he(i,"resize",t)}),t(),e.invertGroups=t)},plotGroup:function(t,e,i,s,n){var o=this[t],r=!o;return r&&(this[t]=o=this.chart.renderer.g(e).attr({visibility:i,zIndex:s||.1}).add(n)),o[r?"attr":"animate"](this.getPlotBox()),o},getPlotBox:function(){return{translateX:this.xAxis?this.xAxis.left:this.chart.plotLeft,translateY:this.yAxis?this.yAxis.top:this.chart.plotTop,scaleX:1,scaleY:1}},render:function(){var t,e=this.chart,i=this.options,s=i.animation&&!!this.animate&&e.renderer.isSVG,n=this.visible?"visible":"hidden",o=i.zIndex,r=this.hasRendered,a=e.seriesGroup;t=this.plotGroup("group","series",n,o,a),this.markerGroup=this.plotGroup("markerGroup","markers",n,o,a),s&&this.animate(!0),this.getAttribs(),t.inverted=!!this.isCartesian&&e.inverted,this.drawGraph&&(this.drawGraph(),this.clipNeg()),this.drawDataLabels(),this.drawPoints(),this.options.enableMouseTracking!==!1&&this.drawTracker(),e.inverted&&this.invertGroups(),i.clip!==!1&&!this.sharedClipKey&&!r&&t.clip(e.clipRect),s?this.animate():r||this.afterAnimate(),this.isDirty=this.isDirtyData=!1,this.hasRendered=!0},redraw:function(){var t=this.chart,e=this.isDirtyData,i=this.group,s=this.xAxis,n=this.yAxis;i&&(t.inverted&&i.attr({width:t.plotWidth,height:t.plotHeight}),i.animate({translateX:u(s&&s.left,t.plotLeft),translateY:u(n&&n.top,t.plotTop)})),this.translate(),this.setTooltipPoints(!0),this.render(),e&&le(this,"updatedData")},setState:function(t){var e=this.options,i=this.graph,s=this.graphNeg,n=e.states,e=e.lineWidth,t=t||"";this.state!==t&&(this.state=t,n[t]&&n[t].enabled===!1||(t&&(e=n[t].lineWidth||e+1),i&&!i.dashstyle&&(t={"stroke-width":e},i.attr(t),s&&s.attr(t))))},setVisible:function(t,e){var i,s=this,n=s.chart,o=s.legendItem,r=n.options.chart.ignoreHiddenSeries,a=s.visible;i=(s.visible=t=s.userOptions.visible=t===V?!a:t)?"show":"hide",se(["group","dataLabelsGroup","markerGroup","tracker"],function(t){s[t]&&s[t][i]()}),n.hoverSeries===s&&s.onMouseOut(),o&&n.legend.colorizeItem(s,t),s.isDirty=!0,s.options.stacking&&se(n.series,function(t){t.options.stacking&&t.visible&&(t.isDirty=!0)}),se(s.linkedSeries,function(e){e.setVisible(t,!1)}),r&&(n.isDirtyBox=!0),e!==!1&&n.redraw(),le(s,i)},show:function(){this.setVisible(!0)},hide:function(){this.setVisible(!1)},select:function(t){this.selected=t=t===V?!this.selected:t,this.checkbox&&(this.checkbox.checked=t),le(this,t?"select":"unselect")},drawTracker:function(){var t,e=this,i=e.options,s=i.trackByArea,n=[].concat(s?e.areaPath:e.graphPath),o=n.length,r=e.chart,a=r.pointer,h=r.renderer,l=r.options.tooltip.snap,c=e.tracker,d=i.cursor,p=d&&{cursor:d},d=e.singlePoints,u=function(){r.hoverSeries!==e&&e.onMouseOver()};if(o&&!s)for(t=o+1;t--;)"M"===n[t]&&n.splice(t+1,0,n[t+1]-l,n[t+2],"L"),(t&&"M"===n[t]||t===o)&&n.splice(t,0,"L",n[t-2]+l,n[t-1]);for(t=0;t=0;e--)o=u(t[e].yBottom,r),et&&n>h?(n=mt(t,h),r=2*h-n):nc&&r>h?(r=mt(c,h),n=2*h-r):ro?i-o:n-(s.translate(t.y,0,1,0,1)<=n?o:0))),t.barX=p,t.pointWidth=r,i=yt(p)<.5,g=ut(p+g)+l,p=ut(p)+l,g-=p,e=yt(f)<.5,d=ut(f+d)+c,f=ut(f)+c,d-=f,i&&(p+=1,g-=1),e&&(f-=1,d+=1),t.shapeType="rect",t.shapeArgs={x:p,y:f,width:g,height:d}})},getSymbol:Xt,drawLegendSymbol:Qt.prototype.drawLegendSymbol,drawGraph:Xt,drawPoints:function(){var t,i=this,s=i.options,n=i.chart.renderer;se(i.points,function(o){var r=o.plotY,a=o.graphic;r===V||isNaN(r)||null===o.y?a&&(o.graphic=a.destroy()):(t=o.shapeArgs,a?(pe(a),a.animate(e(t))):o.graphic=n[o.shapeType](t).attr(o.pointAttr[o.selected?"select":""]).add(i.group).shadow(s.shadow,null,s.stacking&&!s.borderRadius))})},drawTracker:function(){var t=this,e=t.chart,i=e.pointer,s=t.options.cursor,n=s&&{cursor:s},o=function(i){var s,n=i.target;for(e.hoverSeries!==t&&t.onMouseOver();n&&!s;)s=n.point,n=n.parentNode;s!==V&&s!==e.hoverPoint&&s.onMouseOver(i)};se(t.points,function(t){t.graphic&&(t.graphic.element.point=t),t.dataLabel&&(t.dataLabel.element.point=t)}),t._hasTracking||(se(t.trackerGroups,function(e){t[e]&&(t[e].addClass("highcharts-tracker").on("mouseover",o).on("mouseout",function(t){i.onTrackerMouseOut(t)}).css(n),Ot)&&t[e].on("touchstart",o)}),t._hasTracking=!0)},alignDataLabel:function(t,i,s,n,o){var r=this.chart,a=r.inverted,h=t.dlBox||t.shapeArgs,l=t.below||t.plotY>u(this.translatedThreshold,r.plotSizeY),c=u(s.inside,!!this.options.stacking);h&&(n=e(h),a&&(n={x:r.plotWidth-n.y-n.height,y:r.plotHeight-n.x-n.width,width:n.height,height:n.width}),!c)&&(a?(n.x+=l?0:n.width,n.width=0):(n.y+=l?n.height:0,n.height=0)),s.align=u(s.align,!a||c?"center":l?"right":"left"),s.verticalAlign=u(s.verticalAlign,a||c?"middle":l?"top":"bottom"),be.prototype.alignDataLabel.call(this,t,i,s,n,o)},animate:function(t){var e=this.yAxis,i=this.options,s=this.chart.inverted,n={};It&&(t?(n.scaleY=.001,t=xt(e.pos+e.len,mt(e.pos,e.toPixels(i.threshold))),s?n.translateX=t-e.len:n.translateY=t,this.group.attr(n)):(n.scaleY=1,n[s?"translateX":"translateY"]=e.pos,this.group.animate(n,this.options.animation),this.animate=null))},remove:function(){var t=this,e=t.chart;e.hasRendered&&se(e.series,function(e){e.type===t.type&&(e.isDirty=!0)}),be.prototype.remove.apply(t,arguments)}}),qt.column=me,ue.bar=e(ue.column),xe=m(me,{type:"bar",inverted:!0}),qt.bar=xe,ue.scatter=e(Jt,{lineWidth:0,tooltip:{headerFormat:'{series.name}
            ',pointFormat:"x: {point.x}
            y: {point.y}
            ",followPointer:!0},stickyTracking:!1}),xe=m(be,{type:"scatter",sorted:!1,requireSorting:!1,noSharedTooltip:!0,trackerGroups:["markerGroup"],drawTracker:me.prototype.drawTracker,setTooltipPoints:Xt}),qt.scatter=xe,ue.pie=e(Jt,{borderColor:"#FFFFFF",borderWidth:1,center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{distance:30,enabled:!0,formatter:function(){return this.point.name}},ignoreHiddenPoint:!0,legendType:"point",marker:null,size:null,showInLegend:!1,slicedOffset:10,states:{hover:{brightness:.1,shadow:!1}},stickyTracking:!1,tooltip:{followPointer:!0}}),Jt={type:"pie",isCartesian:!1,pointClass:m(ve,{init:function(){ve.prototype.init.apply(this,arguments);var e,i=this;return i.y<0&&(i.y=null),t(i,{visible:i.visible!==!1,name:u(i.name,"Slice")}),e=function(t){i.slice("select"===t.type)},ae(i,"select",e),ae(i,"unselect",e),i},setVisible:function(t){var e,i=this,s=i.series,n=s.chart;i.visible=i.options.visible=t=t===V?!i.visible:t,s.options.data[ie(i,s.data)]=i.options,e=t?"show":"hide",se(["graphic","dataLabel","connector","shadowGroup"],function(t){i[t]&&i[t][e]()}),i.legendItem&&n.legend.colorizeItem(i,t),!s.isDirty&&s.options.ignoreHiddenPoint&&(s.isDirty=!0,n.redraw())},slice:function(t,e,i){var s=this.series;B(i,s.chart),u(e,!0),this.sliced=this.options.sliced=t=c(t)?t:!this.sliced,s.options.data[ie(this,s.data)]=this.options,t=t?this.slicedTranslation:{translateX:0,translateY:0},this.graphic.animate(t),this.shadowGroup&&this.shadowGroup.animate(t)}}),requireSorting:!1,noSharedTooltip:!0,trackerGroups:["group","dataLabelsGroup"],pointAttrToOptions:{stroke:"borderColor","stroke-width":"borderWidth",fill:"color"},getColor:Xt,animate:function(t){var e=this,i=e.points,s=e.startAngleRad;t||(se(i,function(t){var i=t.graphic,t=t.shapeArgs;i&&(i.attr({r:e.center[3]/2,start:s,end:s}),i.animate({r:t.r,start:t.start,end:t.end},e.options.animation))}),e.animate=null)},setData:function(t,e){be.prototype.setData.call(this,t,!1),this.processData(),this.generatePoints(),u(e,!0)&&this.chart.redraw()},generatePoints:function(){var t,e,i,s,n=0,o=this.options.ignoreHiddenPoint;for(be.prototype.generatePoints.call(this),e=this.points,i=e.length,t=0;t0?s.y/n*100:0,s.total=n},getCenter:function(){var t,e,s=this.options,n=this.chart,o=2*(s.slicedOffset||0),r=n.plotWidth-2*o,a=n.plotHeight-2*o,n=s.center,s=[u(n[0],"50%"),u(n[1],"50%"),s.size||"100%",s.innerSize||0],h=xt(r,a);return re(s,function(s,n){return e=/%$/.test(s),t=n<2||2===n&&e,(e?[r,a,h,h][n]*i(s)/100:s)+(t?o:0)})},translate:function(t){this.generatePoints();var e,i,s,n,o,r=0,a=this.options,h=a.slicedOffset,l=h+a.borderWidth,c=a.startAngle||0,d=this.startAngleRad=kt/180*(c-90),c=(this.endAngleRad=kt/180*((a.endAngle||c+360)-90))-d,p=this.points,u=a.dataLabels.distance,a=a.ignoreHiddenPoint,g=p.length;for(t||(this.center=t=this.getCenter()),this.getX=function(e,i){return s=pt.asin((e-t[1])/(t[2]/2+u)),t[0]+(i?-1:1)*vt(s)*(t[2]/2+u)},n=0;n.75*c&&(s-=2*kt),o.slicedTranslation={translateX:ut(vt(s)*h),translateY:ut(bt(s)*h)},e=vt(s)*t[2]/2,i=bt(s)*t[2]/2,o.tooltipPos=[t[0]+.7*e,t[1]+.7*i],o.half=s<-kt/2||s>kt/2?1:0,o.angle=s,l=xt(l,u/2),o.labelPos=[t[0]+e+vt(s)*u,t[1]+i+bt(s)*u,t[0]+e+vt(s)*l,t[1]+i+bt(s)*l,t[0]+e,t[1]+i,u<0?"center":o.half?"right":"left",s]},setTooltipPoints:Xt,drawGraph:null,drawPoints:function(){var e,i,s,n,o=this,r=o.chart.renderer,a=o.options.shadow;a&&!o.shadowGroup&&(o.shadowGroup=r.g("shadow").add(o.group)),se(o.points,function(h){i=h.graphic,n=h.shapeArgs,s=h.shadowGroup,a&&!s&&(s=h.shadowGroup=r.g("shadow").add(o.shadowGroup)),e=h.sliced?h.slicedTranslation:{translateX:0,translateY:0},s&&s.attr(e),i?i.animate(t(n,e)):h.graphic=i=r.arc(n).setRadialReference(o.center).attr(h.pointAttr[h.selected?"select":""]).attr({"stroke-linejoin":"round"}).attr(e).add(o.group).shadow(a,s),h.visible===!1&&h.setVisible(!1)})},sortByAngle:function(t,e){t.sort(function(t,i){return void 0!==t.angle&&(i.angle-t.angle)*e})},drawDataLabels:function(){var t,e,i,s,n,o,r,a,h,l,c,d,p=this,g=p.data,f=p.chart,m=p.options.dataLabels,x=u(m.connectorPadding,10),y=u(m.connectorWidth,1),v=f.plotWidth,f=f.plotHeight,b=u(m.softConnector,!0),k=m.distance,w=p.center,T=w[2]/2,S=w[1],L=k>0,P=[[],[]],A=[0,0,0,0],M=function(t,e){return e.y-t.y};if(p.visible&&(m.enabled||p._hasPointLabels)){for(be.prototype.drawDataLabels.apply(p),se(g,function(t){t.dataLabel&&P[t.half].push(t)}),c=0;!r&&g[c];)r=g[c]&&g[c].dataLabel&&(g[c].dataLabel.getBBox().height||21),c++;for(c=2;c--;){var D,g=[],I=[],z=P[c],B=z.length;if(p.sortByAngle(z,c-.5),k>0){for(d=S-T-k;d<=S+T+k;d+=r)g.push(d);if(n=g.length,B>n){for(t=[].concat(z),t.sort(M),d=B;d--;)t[d].rank=d;for(d=B;d--;)z[d].rank>=n&&z.splice(d,1);B=z.length}for(d=0;d0?(n=I.pop(),D=n.i,h=n.y,(t>h&&null!==g[D+1]||tv-x&&(A[1]=mt(ut(a+n-v+x),A[1])),h-r/2<0?A[0]=mt(ut(-h+r/2),A[0]):h+r/2>f&&(A[2]=mt(ut(h+r/2-f),A[2])))}(0===C(A)||this.verifyDataLabelOverflow(A))&&(this.placeDataLabels(),L&&y&&se(this.points,function(t){e=t.connector,o=t.labelPos,(s=t.dataLabel)&&s._pos?(l=s._attr.visibility,a=s.connX,h=s.connY,i=b?["M",a+("left"===o[6]?5:-5),h,"C",a,h,2*o[2]-o[4],2*o[3]-o[5],o[2],o[3],"L",o[4],o[5]]:["M",a+("left"===o[6]?5:-5),h,"L",o[2],o[3],"L",o[4],o[5]],e?(e.animate({d:i}),e.attr("visibility",l)):t.connector=e=p.chart.renderer.path(i).attr({"stroke-width":y,stroke:m.connectorColor||t.color||"#606060",visibility:l}).add(p.group)):e&&(t.connector=e.destroy())}))}},verifyDataLabelOverflow:function(t){var e,i=this.center,s=this.options,n=s.center,o=s=s.minSize||80;return null!==n[0]?o=mt(i[2]-mt(t[1],t[3]),s):(o=mt(i[2]-t[1]-t[3],s),i[0]+=(t[3]-t[1])/2),null!==n[1]?o=mt(xt(o,i[2]-mt(t[0],t[2])),s):(o=mt(xt(o,i[2]-t[0]-t[2]),s),i[1]+=(t[0]-t[2])/2),o3?d.length%3:0;return c+(p?d.substr(0,p)+h:"")+d.substr(p).replace(/(\d{3})(?=\d)/g,"$1"+h)+(a?l+wt(s-d).toFixed(a).slice(2):"")}function v(t,e){return new Array((e||2)+1-String(t).length).join(0)+t}function b(t,e,i){var n=t[e];t[e]=function(){var t=Array.prototype.slice.call(arguments);return t.unshift(n),i.apply(this,t)}}function k(t,e){var i,n=/f$/,o=/\.([0-9])/,r=q.lang;return n.test(t)?(i=t.match(o),i=i?i[1]:-1,e=x(e,i,r.decimalPoint,t.indexOf(",")>-1?r.thousandsSep:"")):e=J(t,e),e}function w(t,e){for(var i,n,o,r,s,a,l,h="{",c=!1,d=[];(l=t.indexOf(h))!==-1;){if(i=t.slice(0,l),c){for(n=i.split(":"),o=n.shift().split("."),s=o.length,a=e,r=0;r=et[se]&&(c.setMilliseconds(0),c.setSeconds(p>=et[ae]?0:u*xt(c.getSeconds()/u))),p>=et[ae]&&c[ht](p>=et[le]?0:u*xt(c[nt]()/u)),p>=et[le]&&c[ct](p>=et[he]?0:u*xt(c[ot]()/u)),p>=et[he]&&c[dt](p>=et[de]?1:u*xt(c[st]()/u)),p>=et[de]&&(c[pt](p>=et[pe]?0:u*xt(c[at]()/u)),s=c[lt]()),p>=et[pe]&&(s-=s%u,c[ut](s)),p===et[ce]&&c[dt](c[st]()-c[rt]()+f(o,1)),r=1,s=c[lt]();for(var g=c.getTime(),m=c[at](),y=c[st](),x=h?0:(864e5+60*c.getTimezoneOffset()*1e3)%864e5;gi&&(i=t[e]);return i}function I(t,e){var i;for(i in t)t[i]&&t[i]!==e&&t[i].destroy&&t[i].destroy(),delete t[i]}function z(t){$||($=m(jt)),t&&$.appendChild(t),$.innerHTML=""}function B(t,e){var i="Highcharts error #"+t+": www.highcharts.com/errors/"+t;if(e)throw i;gt.console&&console.log(i)}function O(t){return parseFloat(t.toPrecision(14))}function R(t,e){Q=f(t,e.animation)}function H(){var t=q.global.useUTC,e=t?"getUTC":"get",i=t?"setUTC":"set";it=t?Date.UTC:function(t,e,i,n,o,r){return new Date(t,e,f(i,1),f(n,0),f(o,0),f(r,0)).getTime()},nt=e+"Minutes",ot=e+"Hours",rt=e+"Day",st=e+"Date",at=e+"Month",lt=e+"FullYear",ht=i+"Minutes",ct=i+"Hours",dt=i+"Date",pt=i+"Month",ut=i+"FullYear"}function X(t){return q=e(q,t),H(),q}function W(){return q}function Y(){}function E(t,e,i,n){this.axis=t,this.pos=e,this.type=i||"",this.isNew=!0,i||n||this.addLabel()}function G(t,e){this.axis=t,e&&(this.options=e,this.id=e.id)}function N(t,e,i,n,o,r){var s=t.chart.inverted;this.axis=t,this.isNegative=i,this.options=e,this.x=n,this.total=null,this.points={},this.stack=o,this.percent="percent"===r,this.alignOptions={align:e.align||(s?i?"left":"right":"center"),verticalAlign:e.verticalAlign||(s?"middle":i?"bottom":"top"),y:f(e.y,s?4:i?14:-6),x:f(e.x,s?i?-6:6:0)},this.textAlign=e.textAlign||(s?i?"right":"left":"center")}function F(){this.init.apply(this,arguments)}function V(){this.init.apply(this,arguments)}function j(t,e){this.init(t,e)}function _(t,e){this.init(t,e)}function U(){this.init.apply(this,arguments)}var Z,K,$,q,J,Q,tt,et,it,nt,ot,rt,st,at,lt,ht,ct,dt,pt,ut,ft=document,gt=window,mt=Math,yt=mt.round,xt=mt.floor,vt=mt.ceil,bt=mt.max,kt=mt.min,wt=mt.abs,Tt=mt.cos,St=mt.sin,Pt=mt.PI,At=2*Pt/360,Lt=navigator.userAgent,Ct=gt.opera,Mt=/msie/i.test(Lt)&&!Ct,Dt=8===ft.documentMode,It=/AppleWebKit/.test(Lt),zt=/Firefox/.test(Lt),Bt=/(Mobile|Android|Windows Phone)/.test(Lt),Ot="http://www.w3.org/2000/svg",Rt=!!ft.createElementNS&&!!ft.createElementNS(Ot,"svg").createSVGRect,Ht=zt&&parseInt(Lt.split("Firefox/")[1],10)<4,Xt=!Rt&&!Mt&&!!ft.createElement("canvas").getContext,Wt=ft.documentElement.ontouchstart!==Z,Yt={},Et=0,Gt=function(){},Nt=[],Ft="Highcharts",Vt="3.0.6",jt="div",_t="absolute",Ut="relative",Zt="hidden",Kt="highcharts-",$t="visible",qt="px",Jt="none",Qt="M",te="L",ee="rgba(192,192,192,"+(Rt?1e-4:.002)+")",ie="",ne="hover",oe="select",re="millisecond",se="second",ae="minute",le="hour",he="day",ce="week",de="month",pe="year",ue="stroke-width",fe={};gt.Highcharts=gt.Highcharts?B(16,!0):{},J=function(e,i,n){if(!d(i)||isNaN(i))return"Invalid date";e=f(e,"%Y-%m-%d %H:%M:%S");var o,r=new Date(i),s=r[ot](),a=r[rt](),l=r[st](),h=r[at](),c=r[lt](),p=q.lang,u=p.weekdays,g=t({a:u[a].substr(0,3),A:u[a],d:v(l),e:l,b:p.shortMonths[h],B:p.months[h],m:v(h+1),y:c.toString().substr(2,2),Y:c,H:v(s),I:v(s%12||12),l:s%12||12,M:v(r[nt]()),p:s<12?"AM":"PM",P:s<12?"am":"pm",S:v(r.getSeconds()),L:v(yt(i%1e3),3)},Highcharts.dateFormats);for(o in g)for(;e.indexOf("%"+o)!==-1;)e=e.replace("%"+o,"function"==typeof g[o]?g[o](i):g[o]);return n?e.substr(0,1).toUpperCase()+e.substr(1):e},L.prototype={wrapColor:function(t){this.color>=t&&(this.color=0)},wrapSymbol:function(t){this.symbol>=t&&(this.symbol=0)}},et=i(re,1,se,1e3,ae,6e4,le,36e5,he,864e5,ce,6048e5,de,26784e5,pe,31556952e3),tt={init:function(t,e,i){e=e||"";var n,o,r,s,a,l=t.shift,h=e.indexOf("C")>-1,c=h?7:3,d=e.split(" "),p=[].concat(i),u=function(t){for(r=t.length;r--;)t[r]===Qt&&t.splice(r+1,0,t[r+1],t[r+2],t[r+1],t[r+2])};if(h&&(u(d),u(p)),t.isArea&&(s=d.splice(d.length-6,6),a=p.splice(p.length-6,6)),l<=p.length/c&&d.length===p.length)for(;l--;)p=[].concat(p).splice(0,c).concat(p);if(t.shift=0,d.length)for(n=p.length;d.length{point.key}

            ',pointFormat:'{series.name}: {point.y}
            ',shadow:!0,snap:Bt?25:10,style:{color:"#333333",cursor:"default",fontSize:"12px",padding:"8px",whiteSpace:"nowrap"}},credits:{enabled:!0,text:"Highcharts.com",href:"http://www.highcharts.com",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#909090",fontSize:"9px"}}};var Ie=q.plotOptions,ze=Ie.line;H();var Be=function(t){function i(t){t&&t.stops?h=Te(t.stops,function(t){return Be(t[1])}):(l=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/.exec(t),l?c=[n(l[1]),n(l[2]),n(l[3]),parseFloat(l[4],10)]:(l=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(t),l?c=[n(l[1],16),n(l[2],16),n(l[3],16),1]:(l=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(t),l&&(c=[n(l[1]),n(l[2]),n(l[3]),1]))))}function o(i){var n;return h?(n=e(t),n.stops=[].concat(n.stops),be(h,function(t,e){n.stops[e]=[n.stops[e][0],t.get(i)]})):n=c&&!isNaN(c[0])?"rgb"===i?"rgb("+c[0]+","+c[1]+","+c[2]+")":"a"===i?c[3]:"rgba("+c.join(",")+")":t,n}function r(t){if(h)be(h,function(e){e.brighten(t)});else if(a(t)&&0!==t){var e;for(e=0;e<3;e++)c[e]+=n(255*t),c[e]<0&&(c[e]=0),c[e]>255&&(c[e]=255)}return this}function s(t){return c[3]=t,this}var l,h,c=[];return i(t),{get:o,brighten:r,rgba:c,setOpacity:s}};Y.prototype={init:function(t,e){var i=this;i.element="span"===e?m(e):ft.createElementNS(Ot,e),i.renderer=t,i.attrSetters={}},opacity:1,animate:function(t,i,n){var o=f(i,Q,!0);Me(this),o?(o=e(o),n&&(o.complete=n),Ce(this,t,o)):(this.attr(t),n&&n())},attr:function(t,e){var i,r,s,a,l,h,c,u,g,m=this,y=m.element,x=y.nodeName.toLowerCase(),v=m.renderer,b=m.attrSetters,k=m.shadows,w=m;if(o(t)&&d(e)&&(i=t,t={},t[i]=e),o(t))i=t,"circle"===x?i={x:"cx",y:"cy"}[i]||i:"strokeWidth"===i&&(i="stroke-width"),w=p(y,i)||m[i]||0,"d"!==i&&"visibility"!==i&&"fill"!==i&&(w=parseFloat(w));else{for(i in t)if(h=!1,r=t[i],s=b[i]&&b[i].call(m,r,i),s!==!1){if(s!==Z&&(r=s),"d"===i)r&&r.join&&(r=r.join(" ")),/(NaN| {2}|^$)/.test(r)&&(r="M 0 0");else if("x"===i&&"text"===x)for(a=0;a1100)&&e.call(n,t)}):n["on"+t]=e,this},setRadialReference:function(t){return this.element.radialReference=t,this},translate:function(t,e){return this.attr({translateX:t,translateY:e})},invert:function(){var t=this;return t.inverted=!0,t.updateTransform(),t},htmlCss:function(e){var i=this,n=i.element,o=e&&"SPAN"===n.tagName&&e.width;return o&&(delete e.width,i.textWidth=o,i.updateTransform()),i.styles=t(i.styles,e),g(i.element,e),i},htmlGetBBox:function(){var t=this,e=t.element,i=t.bBox;return i||("text"===e.nodeName&&(e.style.position=_t),i=t.bBox={x:e.offsetLeft,y:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight}),i},htmlUpdateTransform:function(){if(!this.added)return void(this.alignOnAdd=!0);var t=this,e=t.renderer,i=t.element,o=t.translateX||0,r=t.translateY||0,s=t.x||0,a=t.y||0,l=t.textAlign||"left",h={left:0,center:.5,right:1}[l],c=l&&"left"!==l,p=t.shadows;if(g(i,{marginLeft:o,marginTop:r}),p&&be(p,function(t){g(t,{marginLeft:o+1,marginTop:r+1})}),t.inverted&&be(i.childNodes,function(t){e.invertChild(t,i)}),"SPAN"===i.tagName){var u,m,y,x,v=t.rotation,b=0,k=1,w=0,T=n(t.textWidth),S=t.xCorr||0,P=t.yCorr||0,A=[v,l,i.innerHTML,t.textWidth].join(",");A!==t.cTT&&(d(v)&&(b=v*At,k=Tt(b),w=St(b),t.setSpanRotation(v,w,k)),u=f(t.elemWidth,i.offsetWidth),m=f(t.elemHeight,i.offsetHeight),u>T&&/[ \-]/.test(i.textContent||i.innerText)&&(g(i,{width:T+qt,display:"block",whiteSpace:"normal"}),u=T),y=e.fontMetrics(i.style.fontSize).b,S=k<0&&-u,P=w<0&&-m,x=k*w<0,S+=w*y*(x?1-h:h),P-=k*y*(v?x?h:1-h:1),c&&(S-=u*h*(k<0?-1:1),v&&(P-=m*h*(w<0?-1:1)),g(i,{textAlign:l})),t.xCorr=S,t.yCorr=P),g(i,{left:s+S+qt,top:a+P+qt}),It&&(m=i.offsetHeight),t.cTT=A}},setSpanRotation:function(t){var e={},i=Mt?"-ms-transform":It?"-webkit-transform":zt?"MozTransform":Ct?"-o-transform":"";e[i]=e.transform="rotate("+t+"deg)",g(this.element,e)},updateTransform:function(){var t,e=this,i=e.translateX||0,n=e.translateY||0,o=e.scaleX,r=e.scaleY,s=e.inverted,a=e.rotation;s&&(i+=e.attr("width"),n+=e.attr("height")),t=["translate("+i+","+n+")"],s?t.push("rotate(90) scale(-1,1)"):a&&t.push("rotate("+a+" "+(e.x||0)+" "+(e.y||0)+")"),(d(o)||d(r))&&t.push("scale("+f(o,1)+" "+f(r,1)+")"),t.length&&p(e.element,"transform",t.join(" "))},toFront:function(){var t=this.element;return t.parentNode.appendChild(t),this},align:function(t,e,i){var n,r,s,a,l,h={},d=this.renderer,p=d.alignedObjects;return t?(this.alignOptions=t,this.alignByTranslate=e,i&&!o(i)||(this.alignTo=l=i||"renderer",c(p,this),p.push(this),i=null)):(t=this.alignOptions,e=this.alignByTranslate,l=this.alignTo),i=f(i,d[l],d),n=t.align,r=t.verticalAlign,s=(i.x||0)+(t.x||0),a=(i.y||0)+(t.y||0),"right"!==n&&"center"!==n||(s+=(i.width-(t.width||0))/{right:1,center:2}[n]),h[e?"translateX":"x"]=yt(s),"bottom"!==r&&"middle"!==r||(a+=(i.height-(t.height||0))/({bottom:1,middle:2}[r]||1)),h[e?"translateY":"y"]=yt(a),this[this.placed?"animate":"attr"](h),this.placed=!0,this.alignAttr=h,this},getBBox:function(){var e,i,n=this,o=n.bBox,r=n.renderer,s=n.rotation,a=n.element,l=n.styles,h=s*At;if(!o){if(a.namespaceURI===Ot||r.forExport){try{o=a.getBBox?t({},a.getBBox()):{width:a.offsetWidth,height:a.offsetHeight}}catch(c){}(!o||o.width<0)&&(o={width:0,height:0})}else o=n.htmlGetBBox();r.isSVG&&(e=o.width,i=o.height,Mt&&l&&"11px"===l.fontSize&&"22.7"===i.toPrecision(3)&&(o.height=i=14),s&&(o.width=wt(i*St(h))+wt(e*Tt(h)),o.height=wt(i*Tt(h))+wt(e*St(h)))),n.bBox=o}return o},show:function(){return this.attr({visibility:$t})},hide:function(){return this.attr({visibility:Zt})},fadeOut:function(t){var e=this;e.animate({opacity:0},{duration:t||150,complete:function(){e.hide()}})},add:function(t){var e,i,o,r,s=this.renderer,a=t||s,l=a.element||s.box,h=l.childNodes,c=this.element,u=p(c,"zIndex");if(t&&(this.parentGroup=t),this.parentInverted=t&&t.inverted,void 0!==this.textStr&&s.buildText(this),u&&(a.handleZ=!0,u=n(u)),a.handleZ)for(o=0;ou||!d(u)&&d(i))){l.insertBefore(c,e),r=!0;break}return r||l.appendChild(c),this.added=!0,Ae(this,"add"),this},safeRemoveChild:function(t){var e=t.parentNode;e&&e.removeChild(t)},destroy:function(){var t,e,i,n=this,o=n.element||{},r=n.shadows,s=n.renderer.isSVG&&"SPAN"===o.nodeName&&o.parentNode;if(o.onclick=o.onmouseout=o.onmouseover=o.onmousemove=o.point=null,Me(n),n.clipPath&&(n.clipPath=n.clipPath.destroy()),n.stops){for(i=0;i/g,'').replace(/<(i|em)>/g,'').replace(/
            /g,"").split(//g),s=e.childNodes,a=/style="([^"]+)"/,l=/href="(http[^"]+)"/,h=p(e,"x"),c=t.styles,d=c&&c.width&&n(c.width),u=c&&c.lineHeight,m=s.length;m--;)e.removeChild(s[m]);d&&!t.added&&this.box.appendChild(e),""===r[r.length-1]&&r.pop(),be(r,function(r,s){var f,m=0;r=r.replace(//g,"|||"),f=r.split("|||"),be(f,function(r){if(""!==r||1===f.length){var y,x={},v=ft.createElementNS(Ot,"tspan");if(a.test(r)&&(y=r.match(a)[1].replace(/(;| |^)color([ :])/,"$1fill$2"),p(v,"style",y)),l.test(r)&&!o&&(p(v,"onclick",'location.href="'+r.match(l)[1]+'"'),g(v,{cursor:"pointer"})),r=(r.replace(/<(.|\n)*?>/g,"")||" ").replace(/</g,"<").replace(/>/g,">")," "!==r&&(v.appendChild(ft.createTextNode(r)),m?x.dx=0:x.x=h,p(v,x),!m&&s&&(!Rt&&o&&g(v,{display:"block"}),p(v,"dy",u||i.fontMetrics(/px$/.test(v.style.fontSize)?v.style.fontSize:c.fontSize).h,It&&v.offsetHeight)),e.appendChild(v),m++,d))for(var b,k,w,T=r.replace(/([^\^])-/g,"$1- ").split(" "),S=t._clipHeight,P=[],A=n(u||16),L=1;T.length||P.length;)delete t.bBox,w=t.getBBox(),k=w.width,b=k>d,b&&1!==T.length?(v.removeChild(v.firstChild),P.unshift(T.pop())):(T=P,P=[],T.length&&(L++,S&&L*A>S?(T=["..."],t.attr("title",t.textStr)):(v=ft.createElementNS(Ot,"tspan"),p(v,{dy:A,x:h}),y&&p(v,"style",y),e.appendChild(v),k>d&&(d=k)))),T.length&&v.appendChild(ft.createTextNode(T.join(" ").replace(/- /g,"-")))}})})},button:function(i,n,o,r,s,a,l,h){var c,d,p,u,f,g,m=this.label(i,n,o,null,null,null,null,null,"button"),y=0,x="style",v={x1:0,y1:0,x2:0,y2:1};return s=e({"stroke-width":1,stroke:"#CCCCCC",fill:{linearGradient:v,stops:[[0,"#FEFEFE"],[1,"#F6F6F6"]]},r:2,padding:5,style:{color:"black"}},s),p=s[x],delete s[x],a=e(s,{stroke:"#68A",fill:{linearGradient:v,stops:[[0,"#FFF"],[1,"#ACF"]]}},a),u=a[x],delete a[x],l=e(s,{stroke:"#68A",fill:{linearGradient:v,stops:[[0,"#9BD"],[1,"#CDF"]]}},l),f=l[x],delete l[x],h=e(s,{style:{color:"#CCC"}},h),g=h[x],delete h[x],Se(m.element,Mt?"mouseover":"mouseenter",function(){3!==y&&m.attr(a).css(u)}),Se(m.element,Mt?"mouseout":"mouseleave",function(){3!==y&&(c=[s,a,l][y],d=[p,u,f][y],m.attr(c).css(d))}),m.setState=function(t){m.state=y=t,t?2===t?m.attr(l).css(f):3===t&&m.attr(h).css(g):m.attr(s).css(p)},m.on("click",function(){3!==y&&r.call(m)}).attr(s).css(t({cursor:"default"},p))},crispLine:function(t,e){return t[1]===t[4]&&(t[1]=t[4]=yt(t[1])-e%2/2),t[2]===t[5]&&(t[2]=t[5]=yt(t[2])+e%2/2),t},path:function(e){var i={fill:Jt};return s(e)?i.d=e:r(e)&&t(i,e),this.createElement("path").attr(i)},circle:function(t,e,i){var n=r(t)?t:{x:t,y:e,r:i};return this.createElement("circle").attr(n)},arc:function(t,e,i,n,o,s){var a;return r(t)&&(e=t.y,i=t.r,n=t.innerR,o=t.start,s=t.end,t=t.x),a=this.symbol("arc",t||0,e||0,i||0,i||0,{innerR:n||0,start:o||0,end:s||0}),a.r=i,a},rect:function(t,e,i,n,o,s){o=r(t)?t.r:o;var a=this.createElement("rect").attr({rx:o,ry:o,fill:Jt});return a.attr(r(t)?t:a.crisp(s,t,e,bt(i,0),bt(n,0)))},setSize:function(t,e,i){var n=this,o=n.alignedObjects,r=o.length;for(n.width=t,n.height=e,n.boxWrapper[f(i,!0)?"animate":"attr"]({width:t,height:e});r--;)o[r].align()},g:function(t){var e=this.createElement("g");return d(t)?e.attr({"class":Kt+t}):e},image:function(e,i,n,o,r){var s,a={preserveAspectRatio:Jt};return arguments.length>1&&t(a,{x:i,y:n,width:o,height:r}),s=this.createElement("image").attr(a),s.element.setAttributeNS?s.element.setAttributeNS("http://www.w3.org/1999/xlink","href",e):s.element.setAttribute("hc-svg-href",e),s},symbol:function(e,i,n,o,r,s){var a,l,h,c,d,p=this.symbols[e],u=p&&p(yt(i),yt(n),o,r,s),f=/^url\((.*?)\)$/;return u?(a=this.path(u),t(a,{symbolName:e,x:i,y:n,width:o,height:r}),s&&t(a,s)):f.test(e)&&(d=function(t,e){t.element&&(t.attr({width:e[0],height:e[1]}),t.alignByTranslate||t.translate(yt((o-e[0])/2),yt((r-e[1])/2)))},h=e.match(f)[1],c=Yt[h],a=this.image(h).attr({x:i,y:n}),a.isImg=!0,c?d(a,c):(a.attr({width:0,height:0}),l=m("img",{onload:function(){d(a,Yt[h]=[this.width,this.height])},src:h}))),a},symbols:{circle:function(t,e,i,n){var o=.166*i;return[Qt,t+i/2,e,"C",t+i+o,e,t+i+o,e+n,t+i/2,e+n,"C",t-o,e+n,t-o,e,t+i/2,e,"Z"]},square:function(t,e,i,n){return[Qt,t,e,te,t+i,e,t+i,e+n,t,e+n,"Z"]},triangle:function(t,e,i,n){return[Qt,t+i/2,e,te,t+i,e+n,t,e+n,"Z"]},"triangle-down":function(t,e,i,n){return[Qt,t,e,te,t+i,e,t+i/2,e+n,"Z"]},diamond:function(t,e,i,n){return[Qt,t+i/2,e,te,t+i,e+n/2,t+i/2,e+n,t,e+n/2,"Z"]},arc:function(t,e,i,n,o){var r=o.start,s=o.r||i||n,a=o.end-.001,l=o.innerR,h=o.open,c=Tt(r),d=St(r),p=Tt(a),u=St(a),f=o.end-r'),e&&(n=r||"span"===e||"img"===e?n.join(""):t.prepVML(n),i.element=m(n)),i.renderer=t,i.attrSetters={}},add:function(t){var e=this,i=e.renderer,n=e.element,o=i.box,r=t&&t.inverted,s=t?t.element||t:o;return r&&i.invertChild(n,s),s.appendChild(n),e.added=!0,e.alignOnAdd&&!e.deferUpdateTransform&&e.updateTransform(),Ae(e,"add"),e},updateTransform:Y.prototype.htmlUpdateTransform,setSpanRotation:function(t,e,i){g(this.element,{filter:t?["progid:DXImageTransform.Microsoft.Matrix(M11=",i,", M12=",-e,", M21=",e,", M22=",i,", sizingMethod='auto expand')"].join(""):Jt})},pathToVML:function(t){for(var e,i=t.length,n=[];i--;)a(t[i])?n[i]=yt(10*t[i])-5:"Z"===t[i]?n[i]="x":(n[i]=t[i],!t.isArc||"wa"!==t[i]&&"at"!==t[i]||(e="wa"===t[i]?1:-1,n[i+5]===n[i+7]&&(n[i+7]-=e),n[i+6]===n[i+8]&&(n[i+8]-=e)));return n.join(" ")||"x"},attr:function(t,e){var i,n,r,s,l,h,c=this,u=c.element||{},f=u.style,g=u.nodeName,y=c.renderer,x=c.symbolName,v=c.shadows,b=c.attrSetters,k=c;if(o(t)&&d(e)&&(i=t,t={},t[i]=e),o(t))i=t,k="strokeWidth"===i||"stroke-width"===i?c.strokeweight:c[i];else for(i in t)if(n=t[i],h=!1,s=b[i]&&b[i].call(c,n,i),s!==!1&&null!==n){if(s!==Z&&(n=s),x&&/^(x|y|r|start|end|width|height|innerR|anchorX|anchorY)/.test(i))l||(c.symbolAttr(t),l=!0),h=!0;else if("d"===i){if(n=n||[],c.d=n.join(" "),u.path=n=c.pathToVML(n),v)for(r=v.length;r--;)v[r].path=v[r].cutOff?this.cutOffPath(n,v[r].cutOff):n;h=!0}else if("visibility"===i){if(v)for(r=v.length;r--;)v[r].style[i]=n;"DIV"===g&&(n=n===Zt?"-999em":0,Dt||(f[i]=n?$t:Zt),i="top"),f[i]=n,h=!0}else if("zIndex"===i)n&&(f[i]=n),h=!0;else if(ve(i,["x","y","width","height"])!==-1)c[i]=n,"x"===i||"y"===i?i={x:"left",y:"top"}[i]:n=bt(0,n),c.updateClipping?(c[i]=n,c.updateClipping()):f[i]=n,h=!0;else if("class"===i&&"DIV"===g)u.className=n;else if("stroke"===i)n=y.color(n,u,i),i="strokecolor";else if("stroke-width"===i||"strokeWidth"===i)u.stroked=!!n,i="strokeweight",c[i]=n,a(n)&&(n+=qt);else if("dashstyle"===i){var w=u.getElementsByTagName("stroke")[0]||m(y.prepVML([""]),null,null,u);w[i]=n||"solid",c.dashstyle=n,h=!0}else"fill"===i?"SPAN"===g?f.color=n:"IMG"!==g&&(u.filled=n!==Jt,n=y.color(n,u,i,c),i="fillcolor"):"opacity"===i?h=!0:"shape"===g&&"rotation"===i?(c[i]=u.style[i]=n,u.style.left=-yt(St(n*At)+1)+qt,u.style.top=yt(Tt(n*At))+qt):"translateX"===i||"translateY"===i||"rotation"===i?(c[i]=n,c.updateTransform(),h=!0):"text"===i&&(this.bBox=null,u.innerHTML=n,h=!0);h||(Dt?u[i]=n:p(u,i,n))}return k},clip:function(t){var e,i,n=this;return t?(e=t.members,c(e,n),e.push(n),n.destroyClip=function(){c(e,n)},i=t.getCSS(n)):(n.destroyClip&&n.destroyClip(),i={clip:Dt?"inherit":"rect(auto)"}),n.css(i)},css:Y.prototype.htmlCss,safeRemoveChild:function(t){t.parentNode&&z(t)},destroy:function(){return this.destroyClip&&this.destroyClip(),Y.prototype.destroy.apply(this)},on:function(t,e){return this.element["on"+t]=function(){var t=gt.event;t.target=t.srcElement,e(t)},this},cutOffPath:function(t,e){var i;return t=t.split(/[ ,]/),i=t.length,9!==i&&11!==i||(t[i-4]=t[i-2]=n(t[i-2])-10*e),t.join(" ")},shadow:function(t,e,i){var o,r,s,a,l,h,c,d=[],p=this.element,u=this.renderer,g=p.style,y=p.path;if(y&&"string"!=typeof y.value&&(y="x"),l=y,t){for(h=f(t.width,3),c=(t.opacity||.15)/h,o=1;o<=3;o++)a=2*h+1-2*o,i&&(l=this.cutOffPath(y.value,a+.5)),s=[''],r=m(u.prepVML(s),null,{left:n(g.left)+f(t.offsetX,1),top:n(g.top)+f(t.offsetY,1)}),i&&(r.cutOff=a+1),s=[''],m(u.prepVML(s),null,null,r),e?e.element.appendChild(r):p.parentNode.insertBefore(r,p),d.push(r);this.shadows=d}return this}},He=y(Y,He);var Xe={Element:He,isIE8:Lt.indexOf("MSIE 8.0")>-1,init:function(t,e,i){var n,o,r=this;r.alignedObjects=[],n=r.createElement(jt),o=n.element,o.style.position=Ut,t.appendChild(n.element),r.isVML=!0,r.box=o,r.boxWrapper=n,r.setSize(e,i,!1),ft.namespaces.hcv||(ft.namespaces.add("hcv","urn:schemas-microsoft-com:vml"),(ft.styleSheets.length?ft.styleSheets[0]:ft.createStyleSheet()).cssText+="hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } ")},isHidden:function(){return!this.box.offsetWidth},clipRect:function(e,i,n,o){var s=this.createElement(),a=r(e);return t(s,{members:[],left:(a?e.x:e)+1,top:(a?e.y:i)+1,width:(a?e.width:n)-1,height:(a?e.height:o)-1,getCSS:function(e){var i=e.element,n=i.nodeName,o="shape"===n,r=e.inverted,s=this,a=s.top-(o?i.offsetTop:0),l=s.left,h=l+s.width,c=a+s.height,d={clip:"rect("+yt(r?l:a)+"px,"+yt(r?c:h)+"px,"+yt(r?h:c)+"px,"+yt(r?a:l)+"px)"};return!r&&Dt&&"DIV"===n&&t(d,{width:h+qt,height:c+qt}),d},updateClipping:function(){be(s.members,function(t){t.css(s.getCSS(t))})}})},color:function(t,e,i,n){var o,r,s,a=this,l=/^rgba/,h=Jt;if(t&&t.linearGradient?s="gradient":t&&t.radialGradient&&(s="pattern"),s){var c,d,p,u,f,g,y,x,v,b,k,w,T=t.linearGradient||t.radialGradient,S="",P=t.stops,A=[],L=function(){r=[''],m(a.prepVML(r),null,null,e)};if(k=P[0],w=P[P.length-1],k[0]>0&&P.unshift([0,k[1]]),w[0]<1&&P.push([1,w[1]]),be(P,function(t,e){l.test(t[1])?(o=Be(t[1]),c=o.get("rgb"),d=o.get("a")):(c=t[1],d=1),A.push(100*t[0]+"% "+c),e?(x=d,v=c):(y=d,b=c)}),"fill"===i)if("gradient"===s)p=T.x1||T[0]||0,u=T.y1||T[1]||0,f=T.x2||T[2]||0,g=T.y2||T[3]||0,S='angle="'+(90-180*mt.atan((g-u)/(f-p))/Pt)+'"',L();else{var C,M=T.r,D=2*M,I=2*M,z=T.cx,B=T.cy,O=e.radialReference,R=function(){O&&(C=n.getBBox(),z+=(O[0]-C.x)/C.width-.5,B+=(O[1]-C.y)/C.height-.5,D*=O[2]/C.width,I*=O[2]/C.height),S='src="'+q.global.VMLRadialGradientURL+'" size="'+D+","+I+'" origin="0.5,0.5" position="'+z+","+B+'" color2="'+b+'" ',L()};n.added?R():Se(n,"add",R),h=v}else h=c}else if(l.test(t)&&"IMG"!==e.tagName)o=Be(t),r=["<",i,' opacity="',o.get("a"),'"/>'],m(this.prepVML(r),null,null,e),h=o.get("rgb");else{var H=e.getElementsByTagName(i);H.length&&(H[0].opacity=1,H[0].type="solid"),h=t}return h},prepVML:function(t){var e="display:inline-block;behavior:url(#default#VML);",i=this.isIE8;return t=t.join(""),i?(t=t.replace("/>",' xmlns="urn:schemas-microsoft-com:vml" />'),t=t.indexOf('style="')===-1?t.replace("/>",' style="'+e+'" />'):t.replace('style="','style="'+e)):t=t.replace("<","1&&r.attr({x:e,y:i,width:n,height:o}),r},rect:function(t,e,i,n,o,s){var a=this.symbol("rect");return a.r=r(t)?t.r:o,a.attr(r(t)?t:a.crisp(s,t,e,bt(i,0),bt(n,0)))},invertChild:function(t,e){var i=e.style;g(t,{flip:"x",left:n(i.width)-1,top:n(i.height)-1,rotation:-90})},symbols:{arc:function(t,e,i,n,o){var r,s=o.start,a=o.end,l=o.r||i||n,h=o.innerR,c=Tt(s),d=St(s),p=Tt(a),u=St(a);return a-s===0?["x"]:(r=["wa",t-l,e-l,t+l,e+l,t+l*c,e+l*d,t+l*p,e+l*u],o.open&&!h&&r.push("e",Qt,t,e),r.push("at",t-h,e-h,t+h,e+h,t+h*p,e+h*u,t+h*c,e+h*d,"x","e"),r.isArc=!0,r)},circle:function(t,e,i,n,o){return o&&(i=n=2*o.r),o&&o.isCircle&&(t-=i/2,e-=n/2),["wa",t,e,t+i,e+n,t+i,e+n/2,t+i,e+n/2,"e"]},rect:function(t,e,i,n,o){var r,s,a=t+i,l=e+n;return d(o)&&o.r?(s=kt(o.r,i,n),r=[Qt,t+s,e,te,a-s,e,"wa",a-2*s,e,a,e+2*s,a-s,e,a,e+s,te,a,l-s,"wa",a-2*s,l-2*s,a,l,a,l-s,a-s,l,te,t+s,l,"wa",t,l-2*s,t+2*s,l,t+s,l,t,l-s,te,t,e+s,"wa",t,e,t+2*s,e+2*s,t,e+s,t+s,e,"x","e"]):r=Oe.prototype.symbols.square.apply(0,arguments),r}}};Highcharts.VMLRenderer=Re=function(){this.init.apply(this,arguments)},Re.prototype=e(Oe.prototype,Xe),K=Re}var We,Ye;Xt&&(Highcharts.CanVGRenderer=We=function(){Ot="http://www.w3.org/1999/xhtml"},We.prototype.symbols={},Ye=function(){function t(){var t,i=e.length;for(t=0;tm&&(i=!1)):a+p>f&&(a=f-p,g&&a+d0&&c.height>0?(m=e({align:p&&k&&"center",x:p?!k&&4:10,verticalAlign:!p&&k&&"middle",y:p?k?16:10:k?6:-4,rotation:p&&!k&&90},m),y||(h.label=y=I.text(m.text,0,0,m.useHTML).attr({align:m.textAlign||m.align,rotation:m.rotation,zIndex:L}).css(m.style).add()),n=[P[1],P[4],f(P[6],P[1])],o=[P[2],P[5],f(P[7],P[2])],r=M(n),s=M(o),y.align(m,!1,{x:r,y:s,width:D(n)-r,height:D(o)-s}),y.show()):y&&y.hide(),h},destroy:function(){c(this.axis.plotLinesAndBands,this),delete this.axis,I(this)}},N.prototype={destroy:function(){I(this,this.axis)},render:function(t){var e=this.options,i=e.format,n=i?w(i,this):e.formatter.call(this);this.label?this.label.attr({text:n,visibility:Zt}):this.label=this.axis.chart.renderer.text(n,0,0,e.useHTML).css(e.style).attr({align:this.textAlign,rotation:e.rotation,visibility:Zt}).add(t)},setOffset:function(t,e){var i,n=this,o=n.axis,r=o.chart,s=r.inverted,a=this.isNegative,l=o.translate(this.percent?100:this.total,0,0,0,1),h=o.translate(0),c=wt(l-h),d=r.xAxis[0].translate(this.x)+t,p=r.plotHeight,u={x:s?a?l:l-c:d,y:s?p-d-e:a?p-l-c:p-l,width:s?c:e,height:s?e:c},f=this.label;f&&(f.align(this.alignOptions,null,u),i=f.alignAttr,f.attr({visibility:this.options.crop===!1||r.isInsidePlot(i.x,i.y)?Rt?"inherit":$t:Zt}))}},F.prototype={defaultOptions:{dateTimeLabelFormats:{millisecond:"%H:%M:%S.%L",second:"%H:%M:%S",minute:"%H:%M",hour:"%H:%M",day:"%e. %b",week:"%e. %b",month:"%b '%y",year:"%Y"},endOnTick:!1,gridLineColor:"#C0C0C0",labels:De,lineColor:"#C0D0E0",lineWidth:1,minPadding:.01,maxPadding:.01,minorGridLineColor:"#E0E0E0",minorGridLineWidth:1,minorTickColor:"#A0A0A0",minorTickLength:2,minorTickPosition:"outside",startOfWeek:1,startOnTick:!1,tickColor:"#C0D0E0",tickLength:5,tickmarkPlacement:"between",tickPixelInterval:100,tickPosition:"outside",tickWidth:1,title:{align:"middle",style:{color:"#4d759e",fontWeight:"bold"}},type:"linear"},defaultYAxisOptions:{endOnTick:!0,gridLineWidth:1,tickPixelInterval:72,showLastLabel:!0,labels:{x:-8,y:3},lineWidth:0,maxPadding:.05,minPadding:.05,startOnTick:!0,tickWidth:0,title:{rotation:270,text:"Values"},stackLabels:{enabled:!1,formatter:function(){return x(this.total,-1)},style:De.style}},defaultLeftAxisOptions:{labels:{x:-8,y:null},title:{rotation:270}},defaultRightAxisOptions:{labels:{x:8,y:null},title:{rotation:90}},defaultBottomAxisOptions:{labels:{x:0,y:14},title:{rotation:0}},defaultTopAxisOptions:{labels:{x:0,y:-5},title:{rotation:0}},init:function(t,e){var i=e.isX,n=this;n.horiz=t.inverted?!i:i,n.isXAxis=i,n.xOrY=i?"x":"y",n.opposite=e.opposite,n.side=n.horiz?n.opposite?0:2:n.opposite?1:3,n.setOptions(e);var o=this.options,r=o.type,s="datetime"===r;n.labelFormatter=o.labels.formatter||n.defaultLabelFormatter,n.userOptions=e,n.minPixelPadding=0,n.chart=t,n.reversed=o.reversed,n.zoomEnabled=o.zoomEnabled!==!1,n.categories=o.categories||"category"===r,n.isLog="logarithmic"===r,n.isDatetimeAxis=s,n.isLinked=d(o.linkedTo),n.tickmarkOffset=n.categories&&"between"===o.tickmarkPlacement?.5:0,n.ticks={},n.minorTicks={},n.plotLinesAndBands=[],n.alternateBands={},n.len=0,n.minRange=n.userMinRange=o.minRange||o.maxZoom,n.range=o.range,n.offset=o.offset||0,n.stacks={},n.oldStacks={},n.stackExtremes={},n.max=null,n.min=null;var a,c=n.options.events;ve(n,t.axes)===-1&&(t.axes.push(n),t[i?"xAxis":"yAxis"].push(n)),n.series=n.series||[],t.inverted&&i&&n.reversed===Z&&(n.reversed=!0),n.removePlotBand=n.removePlotBandOrLine,n.removePlotLine=n.removePlotBandOrLine;for(a in c)Se(n,a,c[a]);n.isLog&&(n.val2lin=l,n.lin2val=h)},setOptions:function(t){this.options=e(this.defaultOptions,this.isXAxis?{}:this.defaultYAxisOptions,[this.defaultTopAxisOptions,this.defaultRightAxisOptions,this.defaultBottomAxisOptions,this.defaultLeftAxisOptions][this.side],e(q[this.isXAxis?"xAxis":"yAxis"],t))},update:function(i,n){var o=this.chart;i=o.options[this.xOrY+"Axis"][this.options.index]=e(this.userOptions,i),this.destroy(!0),this._addedPlotLB=this.userMin=this.userMax=Z,this.init(o,t(i,{events:Z})),o.isDirtyBox=!0,f(n,!0)&&o.redraw()},remove:function(t){var e=this.chart,i=this.xOrY+"Axis";be(this.series,function(t){t.remove(!1)}),c(e.axes,this),c(e[i],this),e.options[i].splice(this.options.index,1),be(e[i],function(t,e){t.options.index=e}),this.destroy(),e.isDirtyBox=!0,f(t,!0)&&e.redraw()},defaultLabelFormatter:function(){var t,e,i=this.axis,n=this.value,o=i.categories,r=this.dateTimeLabelFormat,s=q.lang.numericSymbols,a=s&&s.length,l=i.options.labels.format,h=i.isLog?n:i.tickInterval;if(l)e=w(l,this);else if(o)e=n;else if(r)e=J(r,n);else if(a&&h>=1e3)for(;a--&&e===Z;)t=Math.pow(1e3,a+1),h>=t&&null!==s[a]&&(e=x(n/t,-1)+s[a]);return e===Z&&(e=n>=1e3?x(n,0):x(n,-1)),e},getSeriesExtremes:function(){var t=this,e=t.chart;t.hasVisibleSeries=!1,t.dataMin=t.dataMax=null,t.stackExtremes={},t.buildStacks(),be(t.series,function(i){if(i.visible||!e.options.chart.ignoreHiddenSeries){var n,o,r,s=i.options,a=s.threshold;t.hasVisibleSeries=!0,t.isLog&&a<=0&&(a=null),t.isXAxis?(n=i.xData,n.length&&(t.dataMin=kt(f(t.dataMin,n[0]),M(n)),t.dataMax=bt(f(t.dataMax,n[0]),D(n)))):(i.getExtremes(),r=i.dataMax,o=i.dataMin,d(o)&&d(r)&&(t.dataMin=kt(f(t.dataMin,o),o),t.dataMax=bt(f(t.dataMax,r),r)),d(a)&&(t.dataMin>=a?(t.dataMin=a,t.ignoreMinPadding=!0):t.dataMaxd+h.width)&&(l=!0)):(o=d,s=g-h.right,(rp+h.height)&&(l=!0)),l&&!n?null:c.renderer.crispLine([Qt,o,r,te,s,a],e||0)},getPlotBandPath:function(t,e){var i=this.getPlotLinePath(e),n=this.getPlotLinePath(t);return n&&i?n.push(i[4],i[5],i[1],i[2]):n=null,n},getLinearTickPositions:function(t,e,i){var n,o,r=O(xt(e/t)*t),s=O(vt(i/t)*t),a=[];for(n=r;n<=s&&(a.push(n),n=O(n+t),n!==o);)o=n;return a},getLogTickPositions:function(t,e,i,n){var o=this,r=o.options,s=o.len,a=[];if(n||(o._minorAutoInterval=null),t>=.5)t=yt(t),a=o.getLinearTickPositions(t,e,i);else if(t>=.08){var c,d,p,u,g,m,y,x=xt(e);for(c=t>.3?[1,2,4]:t>.15?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9],d=x;de&&(!n||m<=i)&&a.push(m),m>i&&(y=!0),m=g}else{var v=h(e),b=h(i),k=r[n?"minorTickInterval":"tickInterval"],w="auto"===k?null:k,P=r.tickPixelInterval/(n?5:1),A=n?s/o.tickPositions.length:s;t=f(w,o._minorAutoInterval,(b-v)*P/(A||1)),t=S(t,null,T(t)),a=Te(o.getLinearTickPositions(t,v,b),l),n||(o._minorAutoInterval=t/5)}return n||(o.tickInterval=t),a},getMinorTickPositions:function(){var t,e,i,n=this,o=n.options,r=n.tickPositions,s=n.minorTickInterval,a=[];if(n.isLog)for(i=r.length,e=1;e=l.minRange;if(l.isXAxis&&l.minRange===Z&&!l.isLog&&(d(h.min)||d(h.max)?l.minRange=null:(be(l.series,function(t){for(o=t.xData,r=t.xIncrement?1:o.length-1,i=r;i>0;i--)n=o[i]-o[i-1],(e===Z||nr&&(i=0),s=bt(s,i),a=bt(a,o(n)?0:i/2),l=bt(l,"on"===n?0:i),!t.noSharedTooltip&&d(h)&&(e=d(e)?kt(e,h):h)}),i=n.ordinalSlope&&e?n.ordinalSlope/e:1,n.minPointOffset=a*=i,n.pointRangePadding=l*=i,n.pointRange=kt(s,r),n.closestPointRange=e),t&&(n.oldTransA=c),n.translationSlope=n.transA=c=n.len/(r+l||1),n.transB=n.horiz?n.left:n.bottom,n.minPixelPadding=c*a},setTickPositions:function(t){var e,i,n,o,r=this,s=r.chart,a=r.options,h=r.isLog,c=r.isDatetimeAxis,p=r.isXAxis,u=r.isLinked,g=r.options.tickPositioner,m=a.maxPadding,y=a.minPadding,x=a.tickInterval,v=a.minTickInterval,b=a.tickPixelInterval,k=r.categories;if(u?(r.linkedParent=s[p?"xAxis":"yAxis"][a.linkedTo],i=r.linkedParent.getExtremes(),r.min=f(i.min,i.dataMin),r.max=f(i.max,i.dataMax),a.type!==r.linkedParent.options.type&&B(11,1)):(r.min=f(r.userMin,a.min,r.dataMin),r.max=f(r.userMax,a.max,r.dataMax)),h&&(!t&&kt(r.min,f(r.dataMin,r.min))<=0&&B(10,1),r.min=O(l(r.min)),r.max=O(l(r.max))),r.range&&(r.userMin=r.min=bt(r.min,r.max-r.range),r.userMax=r.max,t&&(r.range=null)),r.beforePadding&&r.beforePadding(),r.adjustForMinRange(),k||r.usePercentage||u||!d(r.min)||!d(r.max)||(e=r.max-r.min,e&&(d(a.min)||d(r.userMin)||!y||!(r.dataMin<0)&&r.ignoreMinPadding||(r.min-=e*y),d(a.max)||d(r.userMax)||!m||!(r.dataMax>0)&&r.ignoreMaxPadding||(r.max+=e*m))),r.min===r.max||void 0===r.min||void 0===r.max?r.tickInterval=1:u&&!x&&b===r.linkedParent.options.tickPixelInterval?r.tickInterval=r.linkedParent.tickInterval:(r.tickInterval=f(x,k?1:(r.max-r.min)*b/bt(r.len,b)),!d(x)&&r.lenbt(2*r.len,200)&&B(19,!0),n=c?(r.getNonLinearTimeTicks||A)(P(r.tickInterval,a.units),r.min,r.max,a.startOfWeek,r.ordinalPositions,r.closestPointRange,!0):h?r.getLogTickPositions(r.tickInterval,r.min,r.max):r.getLinearTickPositions(r.tickInterval,r.min,r.max),o&&n.splice(1,n.length-2),r.tickPositions=n),!u){var w,L=n[0],C=n[n.length-1],M=r.minPointOffset||0;a.startOnTick?r.min=L:r.min-M>L&&n.shift(),a.endOnTick?r.max=C:r.max+M(e[n]||0)&&this.options.alignTicks!==!1&&(e[n]=i.length),t.maxTicks=e},adjustTickAmount:function(){var t=this,e=t.chart,i=t._maxTicksKey,n=t.tickPositions,o=e.maxTicks;if(o&&o[i]&&!t.isDatetimeAxis&&!t.categories&&!t.isLinked&&t.options.alignTicks!==!1){var r,s=t.tickAmount,a=n.length;if(t.tickAmount=r=o[i],a=this.dataMax&&(e=Z)),this.displayBtn=t!==Z||e!==Z,this.setExtremes(t,e,!1,Z,{trigger:"zoom"}),!0},setAxisSize:function(){var t,e,i,n,o=this.chart,r=this.options,s=r.offsetLeft||0,a=r.offsetRight||0,l=this.horiz;this.left=n=f(r.left,o.plotLeft+s),this.top=i=f(r.top,o.plotTop),this.width=t=f(r.width,o.plotWidth-s+a),this.height=e=f(r.height,o.plotHeight),this.bottom=o.chartHeight-e-i,this.right=o.chartWidth-t-n,this.len=bt(l?t:e,0),this.pos=l?n:i},getExtremes:function(){var t=this,e=t.isLog;return{min:e?O(h(t.min)):t.min,max:e?O(h(t.max)):t.max,dataMin:t.dataMin,dataMax:t.dataMax,userMin:t.userMin,userMax:t.userMax}},getThreshold:function(t){var e=this,i=e.isLog,n=i?h(e.min):e.min,o=i?h(e.max):e.max;return n>t||null===t?t=n:o15&&i<165?"right":i>195&&i<345?"left":"center"},getOffset:function(){var t,e,i,n,o,r,s,a,l,h,c,p,u,g=this,m=g.chart,y=m.renderer,x=g.options,v=g.tickPositions,b=g.ticks,k=g.horiz,w=g.side,T=m.inverted?[1,0,3,2][w]:w,S=0,P=0,A=x.title,L=x.labels,C=0,M=m.axisOffset,D=m.clipOffset,I=[-1,1,1,-1][w],z=1,B=f(L.maxStaggerLines,5);if(g.hasData=t=g.hasVisibleSeries||d(g.min)&&d(g.max)&&!!v,g.showAxis=e=t||f(x.showEmpty,!0),g.staggerLines=g.horiz&&L.staggerLines,g.axisGroup||(g.gridGroup=y.g("grid").attr({zIndex:x.gridZIndex||1}).add(),g.axisGroup=y.g("axis").attr({zIndex:x.zIndex||2}).add(),g.labelGroup=y.g("axis-labels").attr({zIndex:L.zIndex||7}).add()),t||g.isLinked){if(g.labelAlign=f(L.align||g.autoLabelAlign(L.rotation)),be(v,function(t){b[t]?b[t].addLabel():b[t]=new E(g,t)}),g.horiz&&!g.staggerLines&&B&&!L.rotation){for(r=g.reversed?[].concat(v).reverse():v;z1&&(g.staggerLines=z)}be(v,function(t){0!==w&&2!==w&&{1:"left",3:"right"}[w]!==g.labelAlign||(C=bt(b[t].getLabelSize(),C))}),g.staggerLines&&(C*=g.staggerLines,g.labelOffset=C)}else for(n in b)b[n].destroy(),delete b[n];A&&A.text&&A.enabled!==!1&&(g.axisTitle||(g.axisTitle=y.text(A.text,0,0,A.useHTML).attr({zIndex:7,rotation:A.rotation||0,align:A.textAlign||{low:"left",middle:"center",high:"right"}[A.align]}).css(A.style).add(g.axisGroup),g.axisTitle.isNew=!0),e&&(S=g.axisTitle.getBBox()[k?"height":"width"],P=f(A.margin,k?5:10),i=A.offset),g.axisTitle[e?"show":"hide"]()),g.offset=I*f(x.offset,M[w]),g.axisTitleMargin=f(i,C+P+(2!==w&&C&&I*x.labels[k?"y":"x"])),M[w]=bt(M[w],g.axisTitleMargin+S+I*g.offset),D[T]=bt(D[T],2*xt(x.lineWidth/2))},getLinePath:function(t){var e=this.chart,i=this.opposite,n=this.offset,o=this.horiz,r=this.left+(i?this.width:0)+n,s=e.chartHeight-this.bottom-(i?this.height:0)+n;return i&&(t*=-1),e.renderer.crispLine([Qt,o?this.left:r,o?s:this.top,te,o?e.chartWidth-this.right:r,o?s:e.chartHeight-this.bottom],t)},getTitlePosition:function(){var t=this.horiz,e=this.left,i=this.top,o=this.len,r=this.options.title,s=t?e:i,a=this.opposite,l=this.offset,h=n(r.style.fontSize||12),c={low:s+(t?0:o),middle:s+o/2,high:s+(t?o:0)}[r.align],d=(t?i+this.height:e)+(t?1:-1)*(a?-1:1)*this.axisTitleMargin+(2===this.side?h:0);return{x:t?c:d+(a?this.width:0)+l+(r.x||0),y:t?d-(a?this.height:0)+l:c+(r.y||0)}},render:function(){ +var t,e,i,n=this,o=n.chart,r=o.renderer,s=n.options,a=n.isLog,l=n.isLinked,c=n.tickPositions,p=n.axisTitle,u=n.stacks,f=n.ticks,g=n.minorTicks,m=n.alternateBands,y=s.stackLabels,x=s.alternateGridColor,v=n.tickmarkOffset,b=s.lineWidth,k=o.hasRendered,w=k&&d(n.oldMin)&&!isNaN(n.oldMin),T=n.hasData,S=n.showAxis;if(be([f,g,m],function(t){var e;for(e in t)t[e].isActive=!1}),(T||l)&&(n.minorTickInterval&&!n.categories&&be(n.getMinorTickPositions(),function(t){g[t]||(g[t]=new E(n,t,"minor")),w&&g[t].isNew&&g[t].render(null,!0),g[t].render(null,!1,1)}),c.length&&(be(c.slice(1).concat([c[0]]),function(t,e){e=e===c.length-1?0:e+1,(!l||t>=n.min&&t<=n.max)&&(f[t]||(f[t]=new E(n,t)),w&&f[t].isNew&&f[t].render(e,!0),f[t].render(e,!1,1))}),v&&0===n.min&&(f[-1]||(f[-1]=new E(n,(-1),null,(!0))),f[-1].render(-1))),x&&be(c,function(t,o){o%2===0&&t1||wt(i-s.y)>1)&&(clearTimeout(this.tooltipTimeout),this.tooltipTimeout=setTimeout(function(){r&&r.move(e,i,n,o)},32))},hide:function(){var t,e=this;clearTimeout(this.hideTimer),this.isHidden||(t=this.chart.hoverPoints,this.hideTimer=setTimeout(function(){e.label.fadeOut(),e.isHidden=!0},f(this.options.hideDelay,500)),t&&be(t,function(t){t.setState()}),this.chart.hoverPoints=null)},hideCrosshairs:function(){be(this.crosshairs,function(t){t&&t.hide()})},getAnchor:function(t,e){var i,n,o=this.chart,r=o.inverted,s=o.plotTop,a=0,l=0;return t=u(t),i=t[0].tooltipPos,this.followPointer&&e&&(e.chartX===Z&&(e=o.pointer.normalize(e)),i=[e.chartX-o.plotLeft,e.chartY-s]),i||(be(t,function(t){n=t.series.yAxis,a+=t.plotX,l+=(t.plotLow?(t.plotLow+t.plotHigh)/2:t.plotY)+(!r&&n?n.top-s:0)}),a/=t.length,l/=t.length,i=[r?o.plotWidth-l:a,this.shared&&!r&&t.length>1&&e?e.chartY-s:r?o.plotHeight-a:l]),Te(i,yt)},getPosition:function(t,e,i){var n,o=this.chart,r=o.plotLeft,s=o.plotTop,a=o.plotWidth,l=o.plotHeight,h=f(this.options.distance,12),c=i.plotX,d=i.plotY,p=c+r+(o.inverted?h:-t-h),u=d-e+s+15;return p<7&&(p=r+bt(c,0)+h),p+t>r+a&&(p-=p+t-(r+a),u=d-e+s-h,n=!0),u=u&&d<=u+e&&(u=d+s+h)),u+e>s+l&&(u=bt(s,s+l-e-h)),{x:p,y:u}},defaultFormatter:function(t){var e,i=this.points||u(this),n=i[0].series;return e=[n.tooltipHeaderFormatter(i[0])],be(i,function(t){n=t.series,e.push(n.tooltipFormatter&&n.tooltipFormatter(t)||t.point.tooltipFormatter(n.tooltipOptions.pointFormat))}),e.push(t.options.footerFormat||""),e.join("")},refresh:function(t,e){var i,n,o,r,s,a,h=this,c=h.chart,d=h.label,p=h.options,g={},m=[],y=p.formatter||h.defaultFormatter,x=c.hoverPoints,v=p.crosshairs,b=h.shared;if(clearTimeout(this.hideTimer),h.followPointer=u(t)[0].series.tooltipOptions.followPointer,o=h.getAnchor(t,e),i=o[0],n=o[1],!b||t.series&&t.series.noSharedTooltip?g=t.getLabelConfig():(c.hoverPoints=t,x&&be(x,function(t){t.setState()}),be(t,function(t){t.setState(ne),m.push(t.getLabelConfig())}),g={x:t[0].category,y:t[0].y},g.points=m,t=t[0]),r=y.call(g,h),a=t.series,r===!1?this.hide():(h.isHidden&&(Me(d),d.attr("opacity",1).show()),d.attr({text:r}),s=p.borderColor||t.color||a.color||"#606060",d.attr({stroke:s}),h.updatePosition({plotX:i,plotY:n}),this.isHidden=!1),v){v=u(v);for(var k,w,T,S,P,A=v.length;A--;)P=t.series,T=P[A?"yAxis":"xAxis"],v[A]&&T&&(S=A?f(t.stackY,t.y):t.x,T.isLog&&(S=l(S)),1===A&&P.modifyValue&&(S=P.modifyValue(S)),k=T.getPlotLinePath(S,1),h.crosshairs[A]?h.crosshairs[A].attr({d:k,visibility:$t}):(w={"stroke-width":v[A].width||1,stroke:v[A].color||"#C0C0C0",zIndex:v[A].zIndex||2},v[A].dashStyle&&(w.dashstyle=v[A].dashStyle),h.crosshairs[A]=c.renderer.path(k).attr(w).add()))}Ae(c,"tooltipRefresh",{text:r,x:i+c.plotLeft,y:n+c.plotTop,borderColor:s})},updatePosition:function(t){var e=this.chart,i=this.label,n=(this.options.positioner||this.getPosition).call(this,i.width,i.height,t);this.move(yt(n.x),yt(n.y),t.plotX+e.plotLeft,t.plotY+e.plotTop)}},j.prototype={init:function(t,e){var i,n,o=e.chart,r=o.events,s=Xt?"":o.zoomType,a=t.inverted;this.options=e,this.chart=t,this.zoomX=i=/x/.test(s),this.zoomY=n=/y/.test(s),this.zoomHor=i&&!a||n&&a,this.zoomVert=n&&!a||i&&a,this.runChartClick=r&&!!r.click,this.pinchDown=[],this.lastValidTouch={},e.tooltip.enabled&&(t.tooltip=new V(t,e.tooltip)),this.setDOMEvents()},normalize:function(e,i){var n,o,r;return e=e||gt.event,e.target||(e.target=e.srcElement),e=Le(e),r=e.touches?e.touches.item(0):e,i||(this.chartPosition=i=we(this.chart.container)),r.pageX===Z?(n=bt(e.x,e.clientX-i.left),o=e.y):(n=r.pageX-i.left,o=r.pageY-i.top),t(e,{chartX:yt(n),chartY:yt(o)})},getCoordinates:function(t){var e={xAxis:[],yAxis:[]};return be(this.chart.axes,function(i){e[i.isXAxis?"xAxis":"yAxis"].push({axis:i,value:i.toValue(t[i.horiz?"chartX":"chartY"])})}),e},getIndex:function(t){var e=this.chart;return e.inverted?e.plotHeight+e.plotTop-t.chartY:t.chartX-e.plotLeft},runPointActions:function(t){var e,i,n,o,r,s=this,a=s.chart,l=a.series,h=a.tooltip,c=a.hoverPoint,d=a.hoverSeries,p=a.chartWidth,u=s.getIndex(t);if(h&&s.options.tooltip.shared&&(!d||!d.noSharedTooltip)){for(i=[],n=l.length,o=0;op&&i.splice(n,1);i.length&&i[0].clientX!==s.hoverX&&(h.refresh(i,t),s.hoverX=i[0].clientX)}d&&d.tracker?(e=d.tooltipPoints[u],e&&e!==c&&e.onMouseOver(t)):h&&h.followPointer&&!h.isHidden&&(r=h.getAnchor([{}],t),h.updatePosition({plotX:r[0],plotY:r[1]}))},reset:function(t){var e=this,i=e.chart,n=i.hoverSeries,o=i.hoverPoint,r=i.tooltip,s=r&&r.shared?i.hoverPoints:o;t=t&&r&&s,t&&u(s)[0].plotX===Z&&(t=!1),t?r.refresh(s):(o&&o.onMouseOut(),n&&n.onMouseOut(),r&&(r.hide(),r.hideCrosshairs()),e.hoverX=null)},scaleGroups:function(t,e){var i,n=this.chart;be(n.series,function(o){i=t||o.getPlotBox(),o.xAxis&&o.xAxis.zoomEnabled&&(o.group.attr(i),o.markerGroup&&(o.markerGroup.attr(i),o.markerGroup.clip(e?n.clipRect:null)),o.dataLabelsGroup&&o.dataLabelsGroup.attr(i))}),n.clipRect.attr(e||n.clipBox)},pinchTranslateDirection:function(t,e,i,n,o,r,s){var a,l,h,c,d,p,u=this.chart,f=t?"x":"y",g=t?"X":"Y",m="chart"+g,y=t?"width":"height",x=u["plot"+(t?"Left":"Top")],v=1,b=u.inverted,k=u.bounds[t?"h":"v"],w=1===e.length,T=e[0][m],S=i[0][m],P=!w&&e[1][m],A=!w&&i[1][m],L=function(){!w&&wt(T-P)>20&&(v=wt(S-A)/wt(T-P)),h=(x-S)/v+T,a=u["plot"+(t?"Width":"Height")]/v};L(),l=h,lk.max&&(l=k.max-a,c=!0),c?(S-=.8*(S-s[f][0]),w||(A-=.8*(A-s[f][1])),L()):s[f]=[S,A],b||(r[f]=h-x,r[y]=a),p=b?t?"scaleY":"scaleX":"scale"+g,d=b?1/v:v,o[y]=a,o[f]=l,n[p]=v,n["translate"+g]=d*x+(S-d*T)},pinch:function(e){var i=this,n=i.chart,o=i.pinchDown,r=n.tooltip&&n.tooltip.options.followTouchMove,s=e.touches,a=s.length,l=i.lastValidTouch,h=i.zoomHor||i.pinchHor,c=i.zoomVert||i.pinchVert,d=h||c,p=i.selectionMarker,u={},f=1===a&&(i.inClass(e.target,Kt+"tracker")&&n.runTrackerClick||n.runChartClick),g={};!d&&!r||f||e.preventDefault(),Te(s,function(t){return i.normalize(t)}),"touchstart"===e.type?(be(s,function(t,e){o[e]={chartX:t.chartX,chartY:t.chartY}}),l.x=[o[0].chartX,o[1]&&o[1].chartX],l.y=[o[0].chartY,o[1]&&o[1].chartY],be(n.axes,function(t){if(t.zoomEnabled){var e=n.bounds[t.horiz?"h":"v"],i=t.minPixelPadding,o=t.toPixels(t.dataMin),r=t.toPixels(t.dataMax),s=kt(o,r),a=bt(o,r);e.min=kt(t.pos,s-i),e.max=bt(t.pos+t.len,a+i)}})):o.length&&(p||(i.selectionMarker=p=t({destroy:Gt},n.plotBox)),h&&i.pinchTranslateDirection(!0,o,s,u,p,g,l),c&&i.pinchTranslateDirection(!1,o,s,u,p,g,l),i.hasPinched=d,i.scaleGroups(u,g),!d&&r&&1===a&&this.runPointActions(i.normalize(e)))},dragStart:function(t){var e=this.chart;e.mouseIsDown=t.type,e.cancelClick=!1,e.mouseDownX=this.mouseDownX=t.chartX,e.mouseDownY=this.mouseDownY=t.chartY},drag:function(t){var e,i,n=this.chart,o=n.options.chart,r=t.chartX,s=t.chartY,a=this.zoomHor,l=this.zoomVert,h=n.plotLeft,c=n.plotTop,d=n.plotWidth,p=n.plotHeight,u=this.mouseDownX,f=this.mouseDownY;rh+d&&(r=h+d),sc+p&&(s=c+p),this.hasDragged=Math.sqrt(Math.pow(u-r,2)+Math.pow(f-s,2)),this.hasDragged>10&&(e=n.isInsidePlot(u-h,f-c),n.hasCartesianSeries&&(this.zoomX||this.zoomY)&&e&&(this.selectionMarker||(this.selectionMarker=n.renderer.rect(h,c,a?1:d,l?1:p,0).attr({fill:o.selectionMarkerFill||"rgba(69,114,167,0.25)",zIndex:7}).add())),this.selectionMarker&&a&&(i=r-u,this.selectionMarker.attr({width:wt(i),x:(i>0?0:i)+u})),this.selectionMarker&&l&&(i=s-f,this.selectionMarker.attr({height:wt(i),y:(i>0?0:i)+f})),e&&!this.selectionMarker&&o.panning&&n.pan(t,o.panning))},drop:function(e){var i=this.chart,n=this.hasPinched;if(this.selectionMarker){var o,r={xAxis:[],yAxis:[],originalEvent:e.originalEvent||e},s=this.selectionMarker,a=s.x,l=s.y;(this.hasDragged||n)&&(be(i.axes,function(t){if(t.zoomEnabled){var e=t.horiz,i=t.toValue(e?a:l),n=t.toValue(e?a+s.width:l+s.height);isNaN(i)||isNaN(n)||(r[t.xOrY+"Axis"].push({axis:t,min:kt(i,n),max:bt(i,n)}),o=!0)}}),o&&Ae(i,"selection",r,function(e){i.zoom(t(e,n?{animation:!1}:null))})),this.selectionMarker=this.selectionMarker.destroy(),n&&this.scaleGroups()}i&&(g(i.container,{cursor:i._cursor}),i.cancelClick=this.hasDragged>10,i.mouseIsDown=this.hasDragged=this.hasPinched=!1,this.pinchDown=[])},onContainerMouseDown:function(t){t=this.normalize(t),t.preventDefault&&t.preventDefault(),this.dragStart(t)},onDocumentMouseUp:function(t){this.drop(t)},onDocumentMouseMove:function(t){var e=this.chart,i=this.chartPosition,n=e.hoverSeries;t=this.normalize(t,i),i&&n&&!this.inClass(t.target,"highcharts-tracker")&&!e.isInsidePlot(t.chartX-e.plotLeft,t.chartY-e.plotTop)&&this.reset()},onContainerMouseLeave:function(){this.reset(),this.chartPosition=null},onContainerMouseMove:function(t){var e=this.chart;t=this.normalize(t),t.returnValue=!1,"mousedown"===e.mouseIsDown&&this.drag(t),!this.inClass(t.target,"highcharts-tracker")&&!e.isInsidePlot(t.chartX-e.plotLeft,t.chartY-e.plotTop)||e.openMenu||this.runPointActions(t)},inClass:function(t,e){for(var i;t;){if(i=p(t,"class")){if(i.indexOf(e)!==-1)return!0;if(i.indexOf(Kt+"container")!==-1)return!1}t=t.parentNode}},onTrackerMouseOut:function(t){var e=this.chart.hoverSeries;!e||e.options.stickyTracking||this.inClass(t.toElement||t.relatedTarget,Kt+"tooltip")||e.onMouseOut()},onContainerClick:function(e){var i,n,o,r=this.chart,s=r.hoverPoint,a=r.plotLeft,l=r.plotTop,h=r.inverted;e=this.normalize(e),e.cancelBubble=!0,r.cancelClick||(s&&this.inClass(e.target,Kt+"tracker")?(i=this.chartPosition,n=s.plotX,o=s.plotY,t(s,{pageX:i.left+a+(h?r.plotWidth-o:n),pageY:i.top+l+(h?r.plotHeight-n:o)}),Ae(s.series,"click",t(e,{point:s})),r.hoverPoint&&s.firePointEvent("click",e)):(t(e,this.getCoordinates(e)),r.isInsidePlot(e.chartX-a,e.chartY-l)&&Ae(r,"click",e)))},onContainerTouchStart:function(t){var e=this.chart;1===t.touches.length?(t=this.normalize(t),e.isInsidePlot(t.chartX-e.plotLeft,t.chartY-e.plotTop)?(this.runPointActions(t),this.pinch(t)):this.reset()):2===t.touches.length&&this.pinch(t)},onContainerTouchMove:function(t){1!==t.touches.length&&2!==t.touches.length||this.pinch(t)},onDocumentTouchEnd:function(t){this.drop(t)},setDOMEvents:function(){var t,e=this,i=e.chart.container;this._events=t=[[i,"onmousedown","onContainerMouseDown"],[i,"onmousemove","onContainerMouseMove"],[i,"onclick","onContainerClick"],[i,"mouseleave","onContainerMouseLeave"],[ft,"mousemove","onDocumentMouseMove"],[ft,"mouseup","onDocumentMouseUp"]],Wt&&t.push([i,"ontouchstart","onContainerTouchStart"],[i,"ontouchmove","onContainerTouchMove"],[ft,"touchend","onDocumentTouchEnd"]),be(t,function(t){e["_"+t[2]]=function(i){e[t[2]](i)},0===t[1].indexOf("on")?t[0][t[1]]=e["_"+t[2]]:Se(t[0],t[1],e["_"+t[2]])})},destroy:function(){var t=this;be(t._events,function(e){0===e[1].indexOf("on")?e[0][e[1]]=null:Pe(e[0],e[1],t["_"+e[2]])}),delete t._events,clearInterval(t.tooltipTimeout)}},_.prototype={init:function(t,i){var o=this,r=i.itemStyle,s=f(i.padding,8),a=i.itemMarginTop||0;this.options=i,i.enabled&&(o.baseline=n(r.fontSize)+3+a,o.itemStyle=r,o.itemHiddenStyle=e(r,i.itemHiddenStyle),o.itemMarginTop=a,o.padding=s,o.initialItemX=s,o.initialItemY=s-5,o.maxItemWidth=0,o.chart=t,o.itemHeight=0,o.lastLineHeight=0,o.render(),Se(o.chart,"endResize",function(){o.positionCheckboxes()}))},colorizeItem:function(t,e){var i,n,o=this,r=o.options,s=t.legendItem,a=t.legendLine,l=t.legendSymbol,h=o.itemHiddenStyle.color,c=e?r.itemStyle.color:h,d=e?t.color:h,p=t.options&&t.options.marker,u={stroke:d,fill:d};if(s&&s.css({fill:c,color:c}),a&&a.attr({stroke:d}),l){if(p&&l.isMarker){p=t.convertAttribs(p);for(i in p)n=p[i],n!==Z&&(u[i]=n)}l.attr(u)}},positionItem:function(t){var e=this,i=e.options,n=i.symbolPadding,o=!i.rtl,r=t._legendItemPos,s=r[0],a=r[1],l=t.checkbox;t.legendGroup&&t.legendGroup.translate(o?s:e.legendWidth-s-2*n-4,a),l&&(l.x=s,l.y=a)},destroyItem:function(t){var e=t.checkbox;be(["legendItem","legendLine","legendSymbol","legendGroup"],function(e){t[e]&&(t[e]=t[e].destroy())}),e&&z(t.checkbox)},destroy:function(){var t=this,e=t.group,i=t.box;i&&(t.box=i.destroy()),e&&(t.group=e.destroy())},positionCheckboxes:function(t){var e,i=this.group.alignAttr,n=this.clipHeight||this.legendHeight;i&&(e=i.translateY,be(this.allItems,function(o){var r,s=o.checkbox;s&&(r=e+s.y+(t||0)+3,g(s,{left:i.translateX+o.legendItemWidth+s.x-20+qt,top:r+qt,display:r>e-6&&r(v||s.chartWidth-2*g-T)&&(r.itemX=T,r.itemY+=k+r.lastLineHeight+b,r.lastLineHeight=0),r.maxItemWidth=bt(r.maxItemWidth,o),r.lastItemY=k+r.itemY+b,r.lastLineHeight=bt(i,r.lastLineHeight),t._legendItemPos=[r.itemX,r.itemY],h?r.itemX+=o:(r.itemY+=k+i+b,r.lastLineHeight=i),r.offsetWidth=v||bt((h?r.itemX-T-y:o)+g,r.offsetWidth)},render:function(){var e,i,n,o,r=this,s=r.chart,a=s.renderer,l=r.group,h=r.box,c=r.options,p=r.padding,u=c.borderWidth,f=c.backgroundColor;r.itemX=r.initialItemX,r.itemY=r.initialItemY,r.offsetWidth=0,r.lastItemY=0,l||(r.group=l=a.g("legend").attr({zIndex:7}).add(),r.contentGroup=a.g().attr({zIndex:1}).add(l),r.scrollGroup=a.g().add(r.contentGroup)),r.renderTitle(),e=[],be(s.series,function(t){var i=t.options;i.showInLegend&&!d(i.linkedTo)&&(e=e.concat(t.legendItems||("point"===i.legendType?t.data:t)))}),C(e,function(t,e){return(t.options&&t.options.legendIndex||0)-(e.options&&e.options.legendIndex||0)}),c.reversed&&e.reverse(),r.allItems=e,r.display=i=!!e.length,be(e,function(t){r.renderItem(t)}),n=c.width||r.offsetWidth,o=r.lastItemY+r.lastLineHeight+r.titleHeight,o=r.handleOverflow(o),(u||f)&&(n+=p,o+=p,h?n>0&&o>0&&(h[h.isNew?"attr":"animate"](h.crisp(null,null,null,n,o)),h.isNew=!1):(r.box=h=a.rect(0,0,n,o,c.borderRadius,u||0).attr({stroke:c.borderColor,"stroke-width":u||0,fill:f||Jt}).add(l).shadow(c.shadow),h.isNew=!0),h[i?"show":"hide"]()),r.legendWidth=n,r.legendHeight=o,be(e,function(t){r.positionItem(t)}),i&&l.align(t({width:n,height:o},c),!0,"spacingBox"),s.isResizing||this.positionCheckboxes()},handleOverflow:function(t){var e,i,n=this,o=this.chart,r=o.renderer,s=this.options,a=s.y,l="top"===s.verticalAlign,h=o.spacingBox.height+(l?-a:a)-this.padding,c=s.maxHeight,d=this.clipRect,p=s.navigation,u=f(p.animation,!0),g=p.arrowSize||12,m=this.nav;return"horizontal"===s.layout&&(h/=2),c&&(h=kt(h,c)),t>h&&!s.useHTML?(this.clipHeight=i=h-20-this.titleHeight,this.pageCount=e=vt(t/i),this.currentPage=f(this.currentPage,1),this.fullHeight=t,d||(d=n.clipRect=r.clipRect(0,0,9999,0),n.contentGroup.clip(d)),d.attr({height:i}),m||(this.nav=m=r.g().attr({zIndex:1}).add(this.group),this.up=r.symbol("triangle",0,0,g,g).on("click",function(){n.scroll(-1,u)}).add(m),this.pager=r.text("",15,10).css(p.style).add(m),this.down=r.symbol("triangle-down",0,0,g,g).on("click",function(){n.scroll(1,u)}).add(m)),n.scroll(0),t=h):m&&(d.attr({height:o.chartHeight}),m.hide(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0),t},scroll:function(t,e){var i,n=this.pageCount,o=this.currentPage+t,r=this.clipHeight,s=this.options.navigation,a=s.activeColor,l=s.inactiveColor,h=this.pager,c=this.padding;o>n&&(o=n),o>0&&(e!==Z&&R(e,this.chart),this.nav.attr({translateX:c,translateY:r+7+this.titleHeight,visibility:$t}),this.up.attr({fill:1===o?l:a}).css({cursor:1===o?"default":"pointer"}),h.attr({text:o+"/"+this.pageCount}),this.down.attr({x:18+this.pager.getBBox().width,fill:o===n?l:a}).css({cursor:o===n?"default":"pointer"}),i=-kt(r*(o-1),this.fullHeight-r+c)+1,this.scrollGroup.animate({translateY:i}),h.attr({text:o+"/"+n}),this.currentPage=o,this.positionCheckboxes(i))}},/Trident.*?11\.0/.test(Lt)&&b(_.prototype,"positionItem",function(t,e){var i=this;setTimeout(function(){t.call(i,e)})}),U.prototype={init:function(t,i){var n,o=t.series;t.series=null,n=e(q,t),n.series=t.series=o;var r=n.chart;this.margin=this.splashArray("margin",r),this.spacing=this.splashArray("spacing",r);var s=r.events;this.bounds={h:{},v:{}},this.callback=i,this.isResizing=0,this.options=n,this.axes=[],this.series=[],this.hasCartesianSeries=r.showAxes;var a,l=this;if(l.index=Nt.length,Nt.push(l),r.reflow!==!1&&Se(l,"load",function(){l.initReflow()}),s)for(a in s)Se(l,a,s[a]);l.xAxis=[],l.yAxis=[],l.animation=!Xt&&f(r.animation,!0),l.pointCount=0,l.counters=new L,l.firstRender()},initSeries:function(t){var e,i=this,n=i.options.chart,o=t.type||n.type||n.defaultSeriesType,r=fe[o];return r||B(17,!0),e=new r,e.init(this,t),e},addSeries:function(t,e,i){var n,o=this;return t&&(e=f(e,!0),Ae(o,"addSeries",{options:t},function(){n=o.initSeries(t),o.isDirtyLegend=!0,o.linkSeries(),e&&o.redraw(i)})),n},addAxis:function(t,i,n,o){var r,s=i?"xAxis":"yAxis",a=this.options;r=new F(this,e(t,{index:this[s].length,isX:i})),a[s]=u(a[s]||{}),a[s].push(t),f(n,!0)&&this.redraw(o)},isInsidePlot:function(t,e,i){var n=i?e:t,o=i?t:e;return n>=0&&n<=this.plotWidth&&o>=0&&o<=this.plotHeight},adjustTickAmounts:function(){this.options.chart.alignTicks!==!1&&be(this.axes,function(t){t.adjustTickAmount()}),this.maxTicks=null},redraw:function(e){var i,n,o,r=this,s=r.axes,a=r.series,l=r.pointer,h=r.legend,c=r.isDirtyLegend,d=r.isDirtyBox,p=a.length,u=p,f=r.renderer,g=f.isHidden(),m=[];for(R(e,r),g&&r.cloneRenderTo(),r.layOutTitles();u--;)if(o=a[u],o.options.stacking&&(i=!0,o.isDirty)){n=!0;break}if(n)for(u=p;u--;)o=a[u],o.options.stacking&&(o.isDirty=!0);be(a,function(t){t.isDirty&&"point"===t.options.legendType&&(c=!0)}),c&&h.options.enabled&&(h.render(),r.isDirtyLegend=!1),i&&r.getStacks(),r.hasCartesianSeries&&(r.isResizing||(r.maxTicks=null,be(s,function(t){t.setScale()})),r.adjustTickAmounts(),r.getMargins(),be(s,function(t){t.isDirty&&(d=!0)}),be(s,function(e){e.isDirtyExtremes&&(e.isDirtyExtremes=!1,m.push(function(){Ae(e,"afterSetExtremes",t(e.eventArgs,e.getExtremes())),delete e.eventArgs})),(d||i)&&e.redraw()})),d&&r.drawChartBox(),be(a,function(t){t.isDirty&&t.visible&&(!t.isCartesian||t.xAxis)&&t.redraw()}),l&&l.reset&&l.reset(!0),f.draw(),Ae(r,"redraw"),g&&r.cloneRenderTo(!0),be(m,function(t){t.call()})},showLoading:function(e){var i=this,n=i.options,o=i.loadingDiv,r=n.loading;o||(i.loadingDiv=o=m(jt,{className:Kt+"loading"},t(r.style,{zIndex:10,display:Jt}),i.container),i.loadingSpan=m("span",null,r.labelStyle,o)),i.loadingSpan.innerHTML=e||n.lang.loading,i.loadingShown||(g(o,{opacity:0,display:"",left:i.plotLeft+qt,top:i.plotTop+qt,width:i.plotWidth+qt,height:i.plotHeight+qt}),Ce(o,{opacity:r.style.opacity},{duration:r.showDuration||0}),i.loadingShown=!0)},hideLoading:function(){var t=this.options,e=this.loadingDiv;e&&Ce(e,{opacity:0},{duration:t.loading.hideDuration||100,complete:function(){g(e,{display:Jt})}}),this.loadingShown=!1},get:function(t){var e,i,n,o=this,r=o.axes,s=o.series;for(e=0;ekt(l.dataMin,l.min)&&c=18&&e<=25&&(e=15))),n&&(n.css({width:(s.width||a)+qt}).align(t({y:e+r.margin},s),!1,"spacingBox"),s.floating||s.verticalAlign||(e=vt(e+n.getBBox().height))),this.titleOffset=e},getChartSize:function(){var t=this,e=t.options.chart,i=t.renderToClone||t.renderTo;t.containerWidth=ye(i,"width"),t.containerHeight=ye(i,"height"),t.chartWidth=bt(0,e.width||t.containerWidth||600),t.chartHeight=bt(0,f(e.height,t.containerHeight>19?t.containerHeight:400))},cloneRenderTo:function(t){var e=this.renderToClone,i=this.container;t?e&&(this.renderTo.appendChild(i),z(e),delete this.renderToClone):(i&&i.parentNode===this.renderTo&&this.renderTo.removeChild(i),this.renderToClone=e=this.renderTo.cloneNode(0),g(e,{position:_t,top:"-9999px",display:"block"}),ft.body.appendChild(e),i&&e.appendChild(i))},getContainer:function(){var e,i,r,s,a,l,h=this,c=h.options.chart,d="data-highcharts-chart";h.renderTo=s=c.renderTo,l=Kt+Et++,o(s)&&(h.renderTo=s=ft.getElementById(s)),s||B(13,!0),a=n(p(s,d)),!isNaN(a)&&Nt[a]&&Nt[a].destroy(),p(s,d,h.index),s.innerHTML="",s.offsetWidth||h.cloneRenderTo(),h.getChartSize(),i=h.chartWidth,r=h.chartHeight,h.container=e=m(jt,{className:Kt+"container"+(c.className?" "+c.className:""),id:l},t({position:Ut,overflow:Zt,width:i+qt,height:r+qt,textAlign:"left",lineHeight:"normal",zIndex:0,"-webkit-tap-highlight-color":"rgba(0,0,0,0)"},c.style),h.renderToClone||s),h._cursor=e.style.cursor,h.renderer=c.forExport?new Oe(e,i,r,(!0)):new K(e,i,r),Xt&&h.renderer.create(h,e,i,r)},getMargins:function(){var t,e=this,i=e.spacing,n=e.legend,o=e.margin,r=e.options.legend,s=f(r.margin,10),a=r.x,l=r.y,h=r.align,c=r.verticalAlign,p=e.titleOffset;e.resetMargins(),t=e.axisOffset,p&&!d(o[0])&&(e.plotTop=bt(e.plotTop,p+e.options.title.margin+i[0])),n.display&&!r.floating&&("right"===h?d(o[1])||(e.marginRight=bt(e.marginRight,n.legendWidth-a+s+i[1])):"left"===h?d(o[3])||(e.plotLeft=bt(e.plotLeft,n.legendWidth+a+s+i[3])):"top"===c?d(o[0])||(e.plotTop=bt(e.plotTop,n.legendHeight+l+s+i[0])):"bottom"===c&&(d(o[2])||(e.marginBottom=bt(e.marginBottom,n.legendHeight-l+s+i[2])))),e.extraBottomMargin&&(e.marginBottom+=e.extraBottomMargin),e.extraTopMargin&&(e.plotTop+=e.extraTopMargin),e.hasCartesianSeries&&be(e.axes,function(t){t.getOffset()}),d(o[3])||(e.plotLeft+=t[3]),d(o[0])||(e.plotTop+=t[0]),d(o[2])||(e.marginBottom+=t[2]),d(o[1])||(e.marginRight+=t[1]),e.setChartSize()},initReflow:function(){function t(t){var r=n.width||ye(o,"width"),s=n.height||ye(o,"height"),a=t?t.target:gt;i.hasUserSize||!r||!s||a!==gt&&a!==ft||(r===i.containerWidth&&s===i.containerHeight||(clearTimeout(e),i.reflowTimeout=e=setTimeout(function(){i.container&&(i.setSize(r,s,!1),i.hasUserSize=null)},100)),i.containerWidth=r,i.containerHeight=s)}var e,i=this,n=i.options.chart,o=i.renderTo;i.reflow=t,Se(gt,"resize",t),Se(i,"destroy",function(){Pe(gt,"resize",t)})},setSize:function(t,e,i){var n,o,r,s=this;s.isResizing+=1,r=function(){s&&Ae(s,"endResize",null,function(){s.isResizing-=1})},R(i,s),s.oldChartHeight=s.chartHeight,s.oldChartWidth=s.chartWidth,d(t)&&(s.chartWidth=n=bt(0,yt(t)),s.hasUserSize=!!n),d(e)&&(s.chartHeight=o=bt(0,yt(e))),g(s.container,{width:n+qt,height:o+qt}),s.setChartSize(!0),s.renderer.setSize(n,o,i),s.maxTicks=null,be(s.axes,function(t){t.isDirty=!0,t.setScale()}),be(s.series,function(t){t.isDirty=!0}),s.isDirtyLegend=!0,s.isDirtyBox=!0,s.getMargins(),s.redraw(i),s.oldChartHeight=null,Ae(s,"resize"),Q===!1?r():setTimeout(r,Q&&Q.duration||500)},setChartSize:function(t){var e,i,n,o,r,s,a,l=this,h=l.inverted,c=l.renderer,d=l.chartWidth,p=l.chartHeight,u=l.options.chart,f=l.spacing,g=l.clipOffset;l.plotLeft=n=yt(l.plotLeft),l.plotTop=o=yt(l.plotTop),l.plotWidth=r=bt(0,yt(d-n-l.marginRight)),l.plotHeight=s=bt(0,yt(p-o-l.marginBottom)),l.plotSizeX=h?s:r,l.plotSizeY=h?r:s,l.plotBorderWidth=u.plotBorderWidth||0,l.spacingBox=c.spacingBox={x:f[3],y:f[0],width:d-f[3]-f[1],height:p-f[0]-f[2]},l.plotBox=c.plotBox={x:n,y:o,width:r,height:s},a=2*xt(l.plotBorderWidth/2),e=vt(bt(a,g[3])/2),i=vt(bt(a,g[0])/2),l.clipBox={x:e,y:i,width:xt(l.plotSizeX-bt(a,g[1])/2-e),height:xt(l.plotSizeY-bt(a,g[2])/2-i)},t||be(l.axes,function(t){t.setAxisSize(),t.setAxisTranslation()})},resetMargins:function(){var t=this,e=t.spacing,i=t.margin;t.plotTop=f(i[0],e[0]),t.marginRight=f(i[1],e[1]),t.marginBottom=f(i[2],e[2]),t.plotLeft=f(i[3],e[3]),t.axisOffset=[0,0,0,0],t.clipOffset=[0,0,0,0]},drawChartBox:function(){var t,e,i=this,n=i.options.chart,o=i.renderer,r=i.chartWidth,s=i.chartHeight,a=i.chartBackground,l=i.plotBackground,h=i.plotBorder,c=i.plotBGImage,d=n.borderWidth||0,p=n.backgroundColor,u=n.plotBackgroundColor,f=n.plotBackgroundImage,g=n.plotBorderWidth||0,m=i.plotLeft,y=i.plotTop,x=i.plotWidth,v=i.plotHeight,b=i.plotBox,k=i.clipRect,w=i.clipBox;t=d+(n.shadow?8:0),(d||p)&&(a?a.animate(a.crisp(null,null,null,r-t,s-t)):(e={fill:p||Jt},d&&(e.stroke=n.borderColor,e["stroke-width"]=d),i.chartBackground=o.rect(t/2,t/2,r-t,s-t,n.borderRadius,d).attr(e).add().shadow(n.shadow))), +u&&(l?l.animate(b):i.plotBackground=o.rect(m,y,x,v,0).attr({fill:u}).add().shadow(n.plotShadow)),f&&(c?c.animate(b):i.plotBGImage=o.image(f,m,y,x,v).add()),k?k.animate({width:w.width,height:w.height}):i.clipRect=o.clipRect(w),g&&(h?h.animate(h.crisp(null,m,y,x,v)):i.plotBorder=o.rect(m,y,x,v,0,-g).attr({stroke:n.plotBorderColor,"stroke-width":g,zIndex:1}).add()),i.isDirtyBox=!1},propFromSeries:function(){var t,e,i,n=this,o=n.options.chart,r=n.options.series;be(["inverted","angular","polar"],function(s){for(t=fe[o.type||o.defaultSeriesType],i=n[s]||o[s]||t&&t.prototype[s],e=r&&r.length;!i&&e--;)t=fe[r[e].type],t&&t.prototype[s]&&(i=!0);n[s]=i})},linkSeries:function(){var t=this,e=t.series;be(e,function(t){t.linkedSeries.length=0}),be(e,function(e){var i=e.options.linkedTo;o(i)&&(i=":previous"===i?t.series[e.index-1]:t.get(i),i&&(i.linkedSeries.push(e),e.linkedParent=i))})},render:function(){var e,i=this,o=i.axes,r=i.renderer,s=i.options,a=s.labels,l=s.credits;i.setTitle(),i.legend=new _(i,s.legend),i.getStacks(),be(o,function(t){t.setScale()}),i.getMargins(),i.maxTicks=null,be(o,function(t){t.setTickPositions(!0),t.setMaxTicks()}),i.adjustTickAmounts(),i.getMargins(),i.drawChartBox(),i.hasCartesianSeries&&be(o,function(t){t.render()}),i.seriesGroup||(i.seriesGroup=r.g("series-group").attr({zIndex:3}).add()),be(i.series,function(t){t.translate(),t.setTooltipPoints(),t.render()}),a.items&&be(a.items,function(e){var o=t(a.style,e.style),s=n(o.left)+i.plotLeft,l=n(o.top)+i.plotTop+12;delete o.left,delete o.top,r.text(e.html,s,l).attr({zIndex:2}).css(o).add()}),l.enabled&&!i.credits&&(e=l.href,i.credits=r.text(l.text,0,0).on("click",function(){e&&(location.href=e)}).attr({align:l.position.align,zIndex:8}).css(l.style).add().align(l.position)),i.hasRendered=!0},destroy:function(){var t,e=this,i=e.axes,n=e.series,o=e.container,r=o&&o.parentNode;for(Ae(e,"destroy"),Nt[e.index]=Z,e.renderTo.removeAttribute("data-highcharts-chart"),Pe(e),t=i.length;t--;)i[t]=i[t].destroy();for(t=n.length;t--;)n[t]=n[t].destroy();be(["title","subtitle","chartBackground","plotBackground","plotBGImage","plotBorder","seriesGroup","clipRect","credits","pointer","scroller","rangeSelector","legend","resetZoomButton","tooltip","renderer"],function(t){var i=e[t];i&&i.destroy&&(e[t]=i.destroy())}),o&&(o.innerHTML="",Pe(o),r&&z(o));for(t in e)delete e[t]},isReadyToRender:function(){var t=this;return!(!Rt&>==gt.top&&"complete"!==ft.readyState||Xt&&!gt.canvg)||(Xt?Ye.push(function(){t.firstRender()},t.options.global.canvasToolsURL):ft.attachEvent("onreadystatechange",function(){ft.detachEvent("onreadystatechange",t.firstRender),"complete"===ft.readyState&&t.firstRender()}),!1)},firstRender:function(){var t=this,e=t.options,i=t.callback;t.isReadyToRender()&&(t.getContainer(),Ae(t,"init"),t.resetMargins(),t.setChartSize(),t.propFromSeries(),t.getAxes(),be(e.series||[],function(e){t.initSeries(e)}),t.linkSeries(),Ae(t,"beforeRender"),t.pointer=new j(t,e),t.render(),t.renderer.draw(),i&&i.apply(t,[t]),be(t.callbacks,function(e){e.apply(t,[t])}),t.cloneRenderTo(!0),Ae(t,"load"))},splashArray:function(t,e){var i=e[t],n=r(i)?i:[i,i,i,i];return[f(e[t+"Top"],n[0]),f(e[t+"Right"],n[1]),f(e[t+"Bottom"],n[2]),f(e[t+"Left"],n[3])]}},U.prototype.callbacks=[];var Ee=function(){};Ee.prototype={init:function(t,e,i){var n,o=this;return o.series=t,o.applyOptions(e,i),o.pointAttr={},t.options.colorByPoint&&(n=t.options.colors||t.chart.options.colors,o.color=o.color||n[t.colorCounter++],t.colorCounter===n.length&&(t.colorCounter=0)),t.chart.pointCount++,o},applyOptions:function(e,i){var n=this,o=n.series,r=o.pointValKey;return e=Ee.prototype.optionsToObject.call(this,e),t(n,e),n.options=n.options?t(n.options,e):e,r&&(n.y=n[r]),n.x===Z&&o&&(n.x=i===Z?o.autoIncrement():i),n},optionsToObject:function(t){var e,i,n=this.series,o=n.pointArrayMap||["y"],r=o.length,a=0,l=0;if("number"==typeof t||null===t)e={y:t};else if(s(t))for(e={},t.length>r&&(i=typeof t[0],"string"===i?e.name=t[0]:"number"===i&&(e.x=t[0]),a++);li+1&&n.push(o.slice(i+1,e)),i=e):e===r-1&&n.push(o.slice(i+1,e+1))});e.segments=n},setOptions:function(t){var i,n=this.chart,o=n.options,r=o.plotOptions,s=r[this.type];return this.userOptions=t,i=e(s,r.series,t),this.tooltipOptions=e(o.tooltip,i.tooltip),null===s.marker&&delete i.marker,i},getColor:function(){var t,e,i=this.options,n=this.userOptions,o=this.chart.options.colors,r=this.chart.counters;t=i.color||Ie[this.type].color,t||i.colorByPoint||(d(n._colorIndex)?e=n._colorIndex:(n._colorIndex=r.color,e=r.color++),t=o[e]),this.color=t,r.wrapColor(o.length)},getSymbol:function(){var t,e=this,i=e.userOptions,n=e.options.marker,o=e.chart,r=o.options.symbols,s=o.counters;e.symbol=n.symbol,e.symbol||(d(i._symbolIndex)?t=i._symbolIndex:(i._symbolIndex=s.symbol,t=s.symbol++),e.symbol=r[t]),/^url/.test(e.symbol)&&(n.radius=0),s.wrapSymbol(r.length)},drawLegendSymbol:function(t){var e,i,n,o=this.options,r=o.marker,s=t.options,a=s.symbolWidth,l=this.chart.renderer,h=this.legendGroup,c=t.baseline-yt(.3*l.fontMetrics(s.itemStyle.fontSize).b);o.lineWidth&&(n={"stroke-width":o.lineWidth},o.dashStyle&&(n.dashstyle=o.dashStyle),this.legendLine=l.path([Qt,0,c,te,a,c]).attr(n).add(h)),r&&r.enabled&&(e=r.radius,this.legendSymbol=i=l.symbol(this.symbol,a/2-e,c-e,2*e,2*e).add(h),i.isMarker=!0)},addPoint:function(t,e,i,n){var o,r,s,a,l=this,h=l.options,c=l.data,d=l.graph,p=l.area,u=l.chart,g=l.xData,m=l.yData,y=l.zData,x=l.names,v=d&&d.shift||0,b=h.data;if(R(n,u),i&&be([d,p,l.graphNeg,l.areaNeg],function(t){t&&(t.shift=v+1)}),p&&(p.isArea=!0),e=f(e,!0),o={series:l},l.pointClass.prototype.applyOptions.apply(o,[t]),s=o.x,a=g.length,l.requireSorting&&ss;)a--;g.splice(a,0,s),m.splice(a,0,l.toYData?l.toYData(o):o.y),y.splice(a,0,o.z),x&&(x[s]=o.name),b.splice(a,0,t),r&&(l.data.splice(a,0,null),l.processData()),"point"===h.legendType&&l.generatePoints(),i&&(c[0]&&c[0].remove?c[0].remove(!1):(c.shift(),g.shift(),m.shift(),y.shift(),b.shift())),l.isDirty=!0,l.isDirtyData=!0,e&&(l.getAttribs(),u.redraw())},setData:function(t,e){var i,n=this,r=n.points,l=n.options,h=n.chart,c=null,d=n.xAxis,p=d&&d.categories&&!d.categories.length?[]:null;n.xIncrement=null,n.pointRange=d&&d.categories?1:l.pointRange,n.colorCounter=0;var u,g=[],m=[],y=[],x=t?t.length:[],v=f(l.turboThreshold,1e3),b=n.pointArrayMap,k=b&&b.length,w=!!n.toYData;if(v&&x>v){for(i=0;null===c&&iu||s.forceCrop)){var g=d.min,m=d.max;a[h-1]m?(a=[],l=[]):(a[0]m)&&(e=this.cropData(s.xData,s.yData,g,m),a=e.xData,l=e.yData,c=e.start,i=!0)}for(r=a.length-1;r>=0;r--)n=a[r]-a[r-1],n>0&&(o===Z||n=i){s=bt(0,o-l);break}for(;on){a=o+l;break}return{xData:t.slice(s,a),yData:e.slice(s,a),start:s,end:a}},generatePoints:function(){var t,e,i,n,o=this,r=o.options,s=r.data,a=o.data,l=o.processedXData,h=o.processedYData,c=o.pointClass,d=l.length,p=o.cropStart||0,f=o.hasGroupedData,g=[];if(!a&&!f){var m=[];m.length=s.length,a=o.data=m}for(n=0;n0),e=this.getExtremesFromAll||this.cropped||(c[s+1]||o)>=y&&(c[s-1]||o)<=x,t&&e)if(a=r.length)for(;a--;)null!==r[a]&&(u[g++]=r[a]);else u[g++]=r;this.dataMin=f(i,M(u)),this.dataMax=f(n,D(u))},translate:function(){this.processedXData||this.processData(),this.generatePoints();var t,e=this,i=e.options,n=i.stacking,o=e.xAxis,r=o.categories,s=e.yAxis,l=e.points,h=l.length,c=!!e.modifyValue,p=i.pointPlacement,u="between"===p||a(p),g=i.threshold;for(t=0;t=d.min&&r<=d.max)for(s=h[a+1],i=n===Z?0:n+1,n=h[a+1]?kt(bt(0,xt((o.clientX+(s?s.wrappedClientX||s.clientX:p))/2)),p):p;i>=0&&i<=n;)u[i++]=o;l.tooltipPoints=u}},tooltipHeaderFormatter:function(t){var e,i=this,n=i.tooltipOptions,o=n.xDateFormat,r=n.dateTimeLabelFormats,s=i.xAxis,l=s&&"datetime"===s.options.type,h=n.headerFormat,c=s&&s.closestPointRange;if(l&&!o)if(c){for(e in et)if(et[e]>=c){o=r[e];break}}else o=r.day;return l&&o&&a(t.key)&&(h=h.replace("{point.key}","{point.key:"+o+"}")),w(h,{point:t,series:i})},onMouseOver:function(){var t=this,e=t.chart,i=e.hoverSeries;i&&i!==t&&i.onMouseOut(),t.options.events.mouseOver&&Ae(t,"mouseOver"),t.setState(ne),e.hoverSeries=t},onMouseOut:function(){var t=this,e=t.options,i=t.chart,n=i.tooltip,o=i.hoverPoint;o&&o.onMouseOut(),t&&e.events.mouseOut&&Ae(t,"mouseOut"),!n||e.stickyTracking||n.shared&&!t.noSharedTooltip||n.hide(),t.setState(),i.hoverSeries=null},animate:function(e){var i,n,o,s=this,a=s.chart,l=a.renderer,h=s.options.animation,c=a.clipBox,d=a.inverted;h&&!r(h)&&(h=Ie[s.type].animation),o="_sharedClip"+h.duration+h.easing,e?(i=a[o],n=a[o+"m"],i||(a[o]=i=l.clipRect(t(c,{width:0})),a[o+"m"]=n=l.clipRect(-99,d?-a.plotLeft:-a.plotTop,99,d?a.chartWidth:a.chartHeight)),s.group.clip(i),s.markerGroup.clip(n),s.sharedClipKey=o):(i=a[o],i&&(i.animate({width:a.plotSizeX},h),a[o+"m"].animate({width:a.plotSizeX+99},h)),s.animate=null,s.animationTimeout=setTimeout(function(){s.afterAnimate()},h.duration))},afterAnimate:function(){var t=this.chart,e=this.sharedClipKey,i=this.group;i&&this.options.clip!==!1&&(i.clip(t.clipRect),this.markerGroup.clip()),setTimeout(function(){e&&t[e]&&(t[e]=t[e].destroy(),t[e+"m"]=t[e+"m"].destroy())},100)},drawPoints:function(){var e,i,n,o,r,s,a,l,h,c,d,p,u=this,g=u.points,m=u.chart,y=u.options,x=y.marker,v=u.markerGroup;if(x.enabled||u._hasPointMarkers)for(o=g.length;o--;)r=g[o],i=xt(r.plotX),n=r.plotY,h=r.graphic,c=r.marker||{},d=x.enabled&&c.enabled===Z||c.enabled,p=m.isInsidePlot(yt(i),n,m.inverted),d&&n!==Z&&!isNaN(n)&&null!==r.y?(e=r.pointAttr[r.selected?oe:ie],s=e.r,a=f(c.symbol,u.symbol),l=0===a.indexOf("url"),h?h.attr({visibility:p?Rt?"inherit":$t:Zt}).animate(t({x:i-s,y:n-s},h.symbolName?{width:2*s,height:2*s}:{})):p&&(s>0||l)&&(r.graphic=h=m.renderer.symbol(a,i-s,n-s,2*s,2*s).attr(e).add(v))):h&&(r.graphic=h.destroy())},convertAttribs:function(t,e,i,n){var o,r,s=this.pointAttrToOptions,a={};t=t||{},e=e||{},i=i||{},n=n||{};for(o in s)r=s[o],a[o]=f(t[r],e[o],i[o],n[o]);return a},getAttribs:function(){var e,i,n,o,r,s,a=this,l=a.options,h=Ie[a.type].marker?l.marker:l,c=h.states,p=c[ne],u=a.color,f={stroke:u,fill:u},g=a.points||[],m=[],y=a.pointAttrToOptions,x=l.negativeColor,v=h.lineColor;for(l.marker?(p.radius=p.radius||h.radius+2,p.lineWidth=p.lineWidth||h.lineWidth+1):p.color=p.color||Be(p.color||u).brighten(p.brightness).get(),m[ie]=a.convertAttribs(h,f),be([ne,oe],function(t){m[t]=a.convertAttribs(c[t],m[ie])}),a.pointAttr=m,i=g.length;i--;){if(n=g[i],h=n.options&&n.options.marker||n.options,h&&h.enabled===!1&&(h.radius=0),n.negative&&x&&(n.color=n.fillColor=x),r=l.colorByPoint||n.color,n.options)for(s in y)d(h[y[s]])&&(r=!0);r?(h=h||{},o=[],c=h.states||{},e=c[ne]=c[ne]||{},l.marker||(e.color=Be(e.color||n.color).brighten(e.brightness||p.brightness).get()),o[ie]=a.convertAttribs(t({color:n.color,fillColor:n.color,lineColor:null===v?n.color:Z},h),m[ie]),o[ne]=a.convertAttribs(c[ne],m[ne],o[ie]),o[oe]=a.convertAttribs(c[oe],m[oe],o[ie])):o=m,n.pointAttr=o}},update:function(i,n){var o,r=this.chart,s=this.userOptions,a=this.type,l=fe[a].prototype;i=e(s,{animation:!1,index:this.index,pointStart:this.xData[0]},{data:this.options.data},i),this.remove(!1);for(o in l)l.hasOwnProperty(o)&&(this[o]=Z);t(this,fe[i.type||a].prototype),this.init(r,i),f(n,!0)&&r.redraw(!1)},destroy:function(){var t,e,i,n,o,r=this,s=r.chart,a=/AppleWebKit\/533/.test(Lt),l=r.data||[];for(Ae(r,"destroy"),Pe(r),be(["xAxis","yAxis"],function(t){o=r[t],o&&(c(o.series,r),o.isDirty=o.forceRedraw=!0,o.stacks={})}),r.legendItem&&r.chart.legend.destroyItem(r),e=l.length;e--;)i=l[e],i&&i.destroy&&i.destroy();r.points=null,clearTimeout(r.animationTimeout),be(["area","graph","dataLabelsGroup","group","markerGroup","tracker","graphNeg","areaNeg","posClip","negClip"],function(e){r[e]&&(t=a&&"group"===e?"hide":"destroy",r[e][t]())}),s.hoverSeries===r&&(s.hoverSeries=null),c(s.series,r);for(n in r)delete r[n]},drawDataLabels:function(){var t,i,n,o,r=this,s=r.options,a=s.dataLabels,l=r.points;(a.enabled||r._hasPointLabels)&&(r.dlProcessOptions&&r.dlProcessOptions(a),o=r.plotGroup("dataLabelsGroup","data-labels",r.visible?$t:Zt,a.zIndex||6),i=a,be(l,function(s){var l,h,c,p,u,g=s.dataLabel,m=s.connector,y=!0;if(t=s.options&&s.options.dataLabels,l=f(t&&t.enabled,i.enabled),g&&!l)s.dataLabel=g.destroy();else if(l){if(a=e(i,t),u=a.rotation,h=s.getLabelConfig(),n=a.format?w(a.format,h):a.formatter.call(h,a),a.style.color=f(a.color,a.style.color,r.color,"black"),g)d(n)?(g.attr({text:n}),y=!1):(s.dataLabel=g=g.destroy(),m&&(s.connector=m.destroy()));else if(d(n)){c={fill:a.backgroundColor,stroke:a.borderColor,"stroke-width":a.borderWidth,r:a.borderRadius||0,rotation:u,padding:a.padding,zIndex:1};for(p in c)c[p]===Z&&delete c[p];g=s.dataLabel=r.chart.renderer[u?"text":"label"](n,0,-999,null,null,null,a.useHTML).attr(c).css(a.style).add(o).shadow(a.shadow)}g&&r.alignDataLabel(s,g,a,null,y)}}))},alignDataLabel:function(e,i,n,o,r){var s,a=this.chart,l=a.inverted,h=f(e.plotX,-999),c=f(e.plotY,-999),d=i.getBBox(),p=this.visible&&a.isInsidePlot(e.plotX,e.plotY,l);p&&(o=t({x:l?a.plotWidth-c:h,y:yt(l?a.plotHeight-h:c),width:0,height:0},o),t(n,{width:d.width,height:d.height}),n.rotation?(s={align:n.align,x:o.x+n.x+o.width/2,y:o.y+n.y+o.height/2},i[r?"attr":"animate"](s)):(i.align(n,null,o),s=i.alignAttr,"justify"===f(n.overflow,"justify")?this.justifyDataLabel(i,n,s,d,o,r):f(n.crop,!0)&&(p=a.isInsidePlot(s.x,s.y)&&a.isInsidePlot(s.x+d.width,s.y+d.height)))),p||i.attr({y:-999})},justifyDataLabel:function(t,e,i,n,o,r){var s,a,l=this.chart,h=e.align,c=e.verticalAlign;s=i.x,s<0&&("right"===h?e.align="left":e.x=-s,a=!0),s=i.x+n.width,s>l.plotWidth&&("left"===h?e.align="right":e.x=l.plotWidth-s,a=!0),s=i.y,s<0&&("bottom"===c?e.verticalAlign="top":e.y=-s,a=!0),s=i.y+n.height,s>l.plotHeight&&("top"===c?e.verticalAlign="bottom":e.y=l.plotHeight-s,a=!0),a&&(t.placed=!r,t.align(e,null,o))},getSegmentPath:function(t){var e=this,i=[],n=e.options.step;return be(t,function(o,r){var s,a=o.plotX,l=o.plotY;e.getPointSpline?i.push.apply(i,e.getPointSpline(t,o,r)):(i.push(r?te:Qt),n&&r&&(s=t[r-1],"right"===n?i.push(s.plotX,l):"center"===n?i.push((s.plotX+a)/2,s.plotY,(s.plotX+a)/2,l):i.push(a,s.plotY)),i.push(o.plotX,o.plotY))}),i},getGraphPath:function(){var t,e=this,i=[],n=[];return be(e.segments,function(o){t=e.getSegmentPath(o),o.length>1?i=i.concat(t):n.push(o[0])}),e.singlePoints=n,e.graphPath=i,i},drawGraph:function(){var t=this,e=this.options,i=[["graph",e.lineColor||this.color]],n=e.lineWidth,o=e.dashStyle,r=this.getGraphPath(),s=e.negativeColor;s&&i.push(["graphNeg",s]),be(i,function(i,s){var a,l=i[0],h=t[l];h?(Me(h),h.animate({d:r})):n&&r.length&&(a={stroke:i[1],"stroke-width":n,zIndex:1},o?a.dashstyle=o:a["stroke-linecap"]=a["stroke-linejoin"]="round",t[l]=t.chart.renderer.path(r).attr(a).add(t.group).shadow(!s&&e.shadow))})},clipNeg:function(){var t,e,i,n,o,r=this.options,s=this.chart,a=s.renderer,l=r.negativeColor||r.negativeFillColor,h=this.graph,c=this.area,d=this.posClip,p=this.negClip,u=s.chartWidth,f=s.chartHeight,g=bt(u,f),m=this.yAxis;l&&(h||c)&&(t=yt(m.toPixels(r.threshold||0,!0)),n={x:0,y:0,width:g,height:t},o={x:0,y:t,width:g,height:g},s.inverted&&(n.height=o.y=s.plotWidth-t,a.isVML&&(n={x:s.plotWidth-t-s.plotLeft,y:0,width:u,height:f},o={x:t+s.plotLeft-u,y:0,width:s.plotLeft+t,height:u})),m.reversed?(e=o,i=n):(e=n,i=o),d?(d.animate(e),p.animate(i)):(this.posClip=d=a.clipRect(e),this.negClip=p=a.clipRect(i),h&&this.graphNeg&&(h.clip(d),this.graphNeg.clip(p)),c&&(c.clip(d),this.areaNeg.clip(p))))},invertGroups:function(){function t(){var t={width:e.yAxis.len,height:e.xAxis.len};be(["group","markerGroup"],function(i){e[i]&&e[i].attr(t).invert()})}var e=this,i=e.chart;e.xAxis&&(Se(i,"resize",t),Se(e,"destroy",function(){Pe(i,"resize",t)}),t(),e.invertGroups=t)},plotGroup:function(t,e,i,n,o){var r=this[t],s=!r;return s&&(this[t]=r=this.chart.renderer.g(e).attr({visibility:i,zIndex:n||.1}).add(o)),r[s?"attr":"animate"](this.getPlotBox()),r},getPlotBox:function(){return{translateX:this.xAxis?this.xAxis.left:this.chart.plotLeft,translateY:this.yAxis?this.yAxis.top:this.chart.plotTop,scaleX:1,scaleY:1}},render:function(){var t,e=this,i=e.chart,n=e.options,o=n.animation,r=o&&!!e.animate&&i.renderer.isSVG,s=e.visible?$t:Zt,a=n.zIndex,l=e.hasRendered,h=i.seriesGroup;t=e.plotGroup("group","series",s,a,h),e.markerGroup=e.plotGroup("markerGroup","markers",s,a,h),r&&e.animate(!0),e.getAttribs(),t.inverted=!!e.isCartesian&&i.inverted,e.drawGraph&&(e.drawGraph(),e.clipNeg()),e.drawDataLabels(),e.drawPoints(),e.options.enableMouseTracking!==!1&&e.drawTracker(),i.inverted&&e.invertGroups(),n.clip===!1||e.sharedClipKey||l||t.clip(i.clipRect),r?e.animate():l||e.afterAnimate(),e.isDirty=e.isDirtyData=!1,e.hasRendered=!0},redraw:function(){var t=this,e=t.chart,i=t.isDirtyData,n=t.group,o=t.xAxis,r=t.yAxis;n&&(e.inverted&&n.attr({width:e.plotWidth,height:e.plotHeight}),n.animate({translateX:f(o&&o.left,e.plotLeft),translateY:f(r&&r.top,e.plotTop)})),t.translate(),t.setTooltipPoints(!0),t.render(),i&&Ae(t,"updatedData")},setState:function(t){var e,i=this,n=i.options,o=i.graph,r=i.graphNeg,s=n.states,a=n.lineWidth;if(t=t||ie,i.state!==t){if(i.state=t,s[t]&&s[t].enabled===!1)return;t&&(a=s[t].lineWidth||a+1),o&&!o.dashstyle&&(e={"stroke-width":a},o.attr(e),r&&r.attr(e))}},setVisible:function(t,e){var i,n=this,o=n.chart,r=n.legendItem,s=o.options.chart.ignoreHiddenSeries,a=n.visible;n.visible=t=n.userOptions.visible=t===Z?!a:t,i=t?"show":"hide",be(["group","dataLabelsGroup","markerGroup","tracker"],function(t){n[t]&&n[t][i]()}),o.hoverSeries===n&&n.onMouseOut(),r&&o.legend.colorizeItem(n,t),n.isDirty=!0,n.options.stacking&&be(o.series,function(t){t.options.stacking&&t.visible&&(t.isDirty=!0)}),be(n.linkedSeries,function(e){e.setVisible(t,!1)}),s&&(o.isDirtyBox=!0),e!==!1&&o.redraw(),Ae(n,i)},show:function(){this.setVisible(!0)},hide:function(){this.setVisible(!1)},select:function(t){var e=this;e.selected=t=t===Z?!e.selected:t,e.checkbox&&(e.checkbox.checked=t),Ae(e,t?"select":"unselect")},drawTracker:function(){var t,e,i=this,n=i.options,o=n.trackByArea,r=[].concat(o?i.areaPath:i.graphPath),s=r.length,a=i.chart,l=a.pointer,h=a.renderer,c=a.options.tooltip.snap,d=i.tracker,p=n.cursor,u=p&&{cursor:p},f=i.singlePoints,g=function(){a.hoverSeries!==i&&i.onMouseOver()};if(s&&!o)for(e=s+1;e--;)r[e]===Qt&&r.splice(e+1,0,r[e+1]-c,r[e+2],te),(e&&r[e]===Qt||e===s)&&r.splice(e,0,te,r[e-2]+c,r[e-1]);for(e=0;e=0;e--)i=f(t[e].yBottom,a),em&&o>d?(o=bt(m,d),s=2*d-o):ox&&s>d?(s=bt(x,d),o=2*d-s):sa?l-a:s-(o.translate(t.y,0,1,0,1)<=s?a:0))),t.barX=m,t.pointWidth=h,r=wt(m)<.5,e=yt(m+y)+p,m=yt(m)+p,y=e-m,n=wt(x)<.5,i=yt(x+v)+u,x=yt(x)+u,v=i-x,r&&(m+=1,y-=1),n&&(x-=1,v+=1),t.shapeType="rect",t.shapeArgs={x:m,y:x,width:y,height:v}})},getSymbol:Gt,drawLegendSymbol:Fe.prototype.drawLegendSymbol,drawGraph:Gt,drawPoints:function(){var t,i=this,n=i.options,o=i.chart.renderer;be(i.points,function(r){var s=r.plotY,a=r.graphic;s===Z||isNaN(s)||null===r.y?a&&(r.graphic=a.destroy()):(t=r.shapeArgs,a?(Me(a),a.animate(e(t))):r.graphic=a=o[r.shapeType](t).attr(r.pointAttr[r.selected?oe:ie]).add(i.group).shadow(n.shadow,null,n.stacking&&!n.borderRadius))})},drawTracker:function(){var t=this,e=t.chart,i=e.pointer,n=t.options.cursor,o=n&&{cursor:n},r=function(i){var n,o=i.target;for(e.hoverSeries!==t&&t.onMouseOver();o&&!n;)n=o.point,o=o.parentNode;n!==Z&&n!==e.hoverPoint&&n.onMouseOver(i)};be(t.points,function(t){t.graphic&&(t.graphic.element.point=t),t.dataLabel&&(t.dataLabel.element.point=t)}),t._hasTracking||(be(t.trackerGroups,function(e){t[e]&&(t[e].addClass(Kt+"tracker").on("mouseover",r).on("mouseout",function(t){i.onTrackerMouseOut(t)}).css(o),Wt&&t[e].on("touchstart",r))}),t._hasTracking=!0)},alignDataLabel:function(t,i,n,o,r){var s=this.chart,a=s.inverted,l=t.dlBox||t.shapeArgs,h=t.below||t.plotY>f(this.translatedThreshold,s.plotSizeY),c=f(n.inside,!!this.options.stacking);l&&(o=e(l),a&&(o={x:s.plotWidth-o.y-o.height,y:s.plotHeight-o.x-o.width,width:o.height,height:o.width}),c||(a?(o.x+=h?0:o.width,o.width=0):(o.y+=h?o.height:0,o.height=0))),n.align=f(n.align,!a||c?"center":h?"right":"left"),n.verticalAlign=f(n.verticalAlign,a||c?"middle":h?"top":"bottom"),Ge.prototype.alignDataLabel.call(this,t,i,n,o,r)},animate:function(t){var e,i=this,n=this.yAxis,o=i.options,r=this.chart.inverted,s={};Rt&&(t?(s.scaleY=.001,e=kt(n.pos+n.len,bt(n.pos,n.toPixels(o.threshold))),r?s.translateX=e-n.len:s.translateY=e,i.group.attr(s)):(s.scaleY=1,s[r?"translateX":"translateY"]=n.pos,i.group.animate(s,i.options.animation),i.animate=null))},remove:function(){var t=this,e=t.chart;e.hasRendered&&be(e.series,function(e){e.type===t.type&&(e.isDirty=!0)}),Ge.prototype.remove.apply(t,arguments)}});fe.column=Ue,Ie.bar=e(Ie.column);var Ze=y(Ue,{type:"bar",inverted:!0});fe.bar=Ze,Ie.scatter=e(ze,{lineWidth:0,tooltip:{headerFormat:'{series.name}
            ',pointFormat:"x: {point.x}
            y: {point.y}
            ",followPointer:!0},stickyTracking:!1});var Ke=y(Ge,{type:"scatter",sorted:!1,requireSorting:!1,noSharedTooltip:!0,trackerGroups:["markerGroup"],drawTracker:Ue.prototype.drawTracker,setTooltipPoints:Gt});fe.scatter=Ke,Ie.pie=e(ze,{borderColor:"#FFFFFF",borderWidth:1,center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{distance:30,enabled:!0,formatter:function(){return this.point.name}},ignoreHiddenPoint:!0,legendType:"point",marker:null,size:null,showInLegend:!1,slicedOffset:10,states:{hover:{brightness:.1,shadow:!1}},stickyTracking:!1,tooltip:{followPointer:!0}});var $e=y(Ee,{init:function(){Ee.prototype.init.apply(this,arguments);var e,i=this;return i.y<0&&(i.y=null),t(i,{visible:i.visible!==!1,name:f(i.name,"Slice")}),e=function(t){i.slice("select"===t.type)},Se(i,"select",e),Se(i,"unselect",e),i},setVisible:function(t){var e,i=this,n=i.series,o=n.chart;i.visible=i.options.visible=t=t===Z?!i.visible:t,n.options.data[ve(i,n.data)]=i.options,e=t?"show":"hide",be(["graphic","dataLabel","connector","shadowGroup"],function(t){i[t]&&i[t][e]()}),i.legendItem&&o.legend.colorizeItem(i,t),!n.isDirty&&n.options.ignoreHiddenPoint&&(n.isDirty=!0,o.redraw())},slice:function(t,e,i){var n,o=this,r=o.series,s=r.chart;R(i,s),e=f(e,!0),o.sliced=o.options.sliced=t=d(t)?t:!o.sliced,r.options.data[ve(o,r.data)]=o.options,n=t?o.slicedTranslation:{translateX:0,translateY:0},o.graphic.animate(n),o.shadowGroup&&o.shadowGroup.animate(n)}}),qe={type:"pie",isCartesian:!1,pointClass:$e,requireSorting:!1,noSharedTooltip:!0,trackerGroups:["group","dataLabelsGroup"],pointAttrToOptions:{stroke:"borderColor","stroke-width":"borderWidth",fill:"color"},getColor:Gt,animate:function(t){var e=this,i=e.points,n=e.startAngleRad;t||(be(i,function(t){var i=t.graphic,o=t.shapeArgs;i&&(i.attr({r:e.center[3]/2,start:n,end:n}),i.animate({r:o.r,start:o.start,end:o.end},e.options.animation))}),e.animate=null)},setData:function(t,e){Ge.prototype.setData.call(this,t,!1),this.processData(),this.generatePoints(),f(e,!0)&&this.chart.redraw()},generatePoints:function(){var t,e,i,n,o=0,r=this.options.ignoreHiddenPoint;for(Ge.prototype.generatePoints.call(this),e=this.points,i=e.length,t=0;t0?n.y/o*100:0,n.total=o},getCenter:function(){var t,e,i=this.options,o=this.chart,r=2*(i.slicedOffset||0),s=o.plotWidth-2*r,a=o.plotHeight-2*r,l=i.center,h=[f(l[0],"50%"),f(l[1],"50%"),i.size||"100%",i.innerSize||0],c=kt(s,a);return Te(h,function(i,o){return e=/%$/.test(i),t=o<2||2===o&&e,(e?[s,a,c,c][o]*n(i)/100:i)+(t?r:0)})},translate:function(t){this.generatePoints();var e,i,n,o,r,s,a,l=this,h=0,c=1e3,d=l.options,p=d.slicedOffset,u=p+d.borderWidth,f=d.startAngle||0,g=l.startAngleRad=Pt/180*(f-90),m=l.endAngleRad=Pt/180*((d.endAngle||f+360)-90),y=m-g,x=l.points,v=d.dataLabels.distance,b=d.ignoreHiddenPoint,k=x.length;for(t||(l.center=t=l.getCenter()),l.getX=function(e,i){return n=mt.asin((e-t[1])/(t[2]/2+v)),t[0]+(i?-1:1)*(Tt(n)*(t[2]/2+v))},s=0;s.75*y&&(n-=2*Pt),a.slicedTranslation={translateX:yt(Tt(n)*p),translateY:yt(St(n)*p)},o=Tt(n)*t[2]/2,r=St(n)*t[2]/2,a.tooltipPos=[t[0]+.7*o,t[1]+.7*r],a.half=n<-Pt/2||n>Pt/2?1:0,a.angle=n,u=kt(u,v/2),a.labelPos=[t[0]+o+Tt(n)*v,t[1]+r+St(n)*v,t[0]+o+Tt(n)*u,t[1]+r+St(n)*u,t[0]+o,t[1]+r,v<0?"center":a.half?"right":"left",n]},setTooltipPoints:Gt,drawGraph:null,drawPoints:function(){var e,i,n,o,r=this,s=r.chart,a=s.renderer,l=r.options.shadow;l&&!r.shadowGroup&&(r.shadowGroup=a.g("shadow").add(r.group)),be(r.points,function(s){i=s.graphic,o=s.shapeArgs,n=s.shadowGroup,l&&!n&&(n=s.shadowGroup=a.g("shadow").add(r.shadowGroup)),e=s.sliced?s.slicedTranslation:{translateX:0,translateY:0},n&&n.attr(e),i?i.animate(t(o,e)):s.graphic=i=a.arc(o).setRadialReference(r.center).attr(s.pointAttr[s.selected?oe:ie]).attr({"stroke-linejoin":"round"}).attr(e).add(r.group).shadow(l,n),s.visible===!1&&s.setVisible(!1)})},sortByAngle:function(t,e){t.sort(function(t,i){return void 0!==t.angle&&(i.angle-t.angle)*e})},drawDataLabels:function(){var t,e,i,n,o,r,s,a,l,h,c,d,p,u=this,g=u.data,m=u.chart,y=u.options.dataLabels,x=f(y.connectorPadding,10),v=f(y.connectorWidth,1),b=m.plotWidth,k=m.plotHeight,w=f(y.softConnector,!0),T=y.distance,S=u.center,P=S[2]/2,A=S[1],L=T>0,C=[[],[]],M=[0,0,0,0],I=function(t,e){return e.y-t.y};if(u.visible&&(y.enabled||u._hasPointLabels)){for(Ge.prototype.drawDataLabels.apply(u),be(g,function(t){t.dataLabel&&C[t.half].push(t)}),d=0;!s&&g[d];)s=g[d]&&g[d].dataLabel&&(g[d].dataLabel.getBBox().height||21),d++;for(d=2;d--;){var z,B,O,R=[],H=[],X=C[d],W=X.length;if(u.sortByAngle(X,d-.5),T>0){for(B=A-P-T;B<=A+P+T;B+=s)R.push(B);if(z=R.length,W>z){for(c=[].concat(X),c.sort(I),p=W;p--;)c[p].rank=p;for(p=W;p--;)X[p].rank>=z&&X.splice(p,1);W=X.length}for(p=0;p0?(N=H.pop(),O=N.i,l=N.y,(F>l&&null!==R[O+1]||Fb-x&&(M[1]=bt(yt(a+o-b+x),M[1])),l-s/2<0?M[0]=bt(yt(-l+s/2),M[0]):l+s/2>k&&(M[2]=bt(yt(l+s/2-k),M[2])))}}(0===D(M)||this.verifyDataLabelOverflow(M))&&(this.placeDataLabels(),L&&v&&be(this.points,function(t){e=t.connector,r=t.labelPos,n=t.dataLabel,n&&n._pos?(h=n._attr.visibility,a=n.connX,l=n.connY,i=w?[Qt,a+("left"===r[6]?5:-5),l,"C",a,l,2*r[2]-r[4],2*r[3]-r[5],r[2],r[3],te,r[4],r[5]]:[Qt,a+("left"===r[6]?5:-5),l,te,r[2],r[3],te,r[4],r[5]],e?(e.animate({d:i}),e.attr("visibility",h)):t.connector=e=u.chart.renderer.path(i).attr({"stroke-width":v,stroke:y.connectorColor||t.color||"#606060",visibility:h}).add(u.group)):e&&(t.connector=e.destroy())}))}},verifyDataLabelOverflow:function(t){var e,i=this.center,n=this.options,o=n.center,r=n.minSize||80,s=r;return null!==o[0]?s=bt(i[2]-bt(t[1],t[3]),r):(s=bt(i[2]-t[1]-t[3],r),i[0]+=(t[3]-t[1])/2),null!==o[1]?s=bt(kt(s,i[2]-bt(t[0],t[2])),r):(s=bt(kt(s,i[2]-t[0]-t[2]),r),i[1]+=(t[0]-t[2])/2),s-1?u[r]=x.translate(u[r]):p(r,["height","y"])>-1&&(u[r]=g.translate(u[r]));if(u.width&&(u.width-=x.toPixels(0)-x.left),u.x&&(u.x+=x.minPixelPadding),"path"===l.shape.type){r=u.d,a=f;for(var j=i,k=r.length,O=0;O-1&&i.splice(e,1),l(["title","shape","group"],function(i){t[i]&&(t[i].destroy(),t[i]=null)}),t.group=t.title=t.shape=t.chart=t.options=null},update:function(t,i){h(this.options,t),this.linkObjects(),this.render(i)},linkObjects:function(){var t=this.chart,i=this.linkedObject,e=i&&(i.id||i.options.id),a=this.options.linkedTo;n(a)?n(i)&&a===e||(this.linkedObject=t.get(a)):this.linkedObject=null}},h(o.prototype,{annotations:{add:function(t,i){var e,n,a=this.allItems,s=this.chart;for("[object Array]"===Object.prototype.toString.call(t)||(t=[t]),n=t.length;n--;)e=new d(s,t[n]),a.push(e),e.render(i)},redraw:function(){l(this.allItems,function(t){t.redraw()})}}}),o.prototype.callbacks.push(function(i){var e,n=i.options.annotations;e=i.renderer.g("annotations"),e.attr({zIndex:7}),e.add(),i.annotations.allItems=[],i.annotations.chart=i,i.annotations.group=e,"[object Array]"===Object.prototype.toString.call(n)&&n.length>0&&i.annotations.add(i.options.annotations),t.addEvent(i,"redraw",function(){i.annotations.redraw()})})}(Highcharts,HighchartsAdapter); \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/modules/annotations.src.js b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/modules/annotations.src.js new file mode 100644 index 0000000..6f23a15 --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/modules/annotations.src.js @@ -0,0 +1,2 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + ;!function(t,i){function e(t){var i,e;return e={xAxis:0,yAxis:0,title:{style:{},text:"",x:0,y:0},shape:{params:{stroke:"#000000",fill:"transparent",strokeWidth:2}}},i={circle:{params:{x:0,y:0}}},i[t]&&(e.shape=f(e.shape,i[t])),e}function n(t){return"[object Array]"===Object.prototype.toString.call(t)}function a(t){return"number"==typeof t}function r(t){return t!==o&&null!==t}function s(t,i,e,n,a){for(var r=t.length,s=0;s-1?i[o]=v.translate(i[o]):d(o,["height","y"])>-1&&(i[o]=w.translate(i[o]));i.width&&(i.width-=v.toPixels(0)-v.left),i.x&&(i.x+=v.minPixelPadding),"path"===f.shape.type&&s(i.d,v,w,p,u)}"circle"===f.shape.type&&(i.x+=i.r,i.y+=i.r),A=!0,b.attr(i)}x.bBox=null,a(k)||(h=x.getBBox(),k=h.width),a(P)||(h||(h=x.getBBox()),P=h.height),a(j)||(j=l.center),a(O)||(O=l.center),p-=k*j,u-=P*O,y.animation&&r(x.translateX)&&r(x.translateY)?x.animate({translateX:p,translateY:u}):x.translate(p,u)}},destroy:function(){var t=this,i=this.chart,e=i.annotations.allItems,n=e.indexOf(t);n>-1&&e.splice(n,1),u(["title","shape","group"],function(i){t[i]&&(t[i].destroy(),t[i]=null)}),t.group=t.title=t.shape=t.chart=t.options=null},update:function(t,i){c(this.options,t),this.linkObjects(),this.render(i)},linkObjects:function(){var t=this,i=t.chart,e=t.linkedObject,n=e&&(e.id||e.options.id),a=t.options,s=a.linkedTo;r(s)?r(e)&&s===n||(t.linkedObject=i.get(s)):t.linkedObject=null}},c(p.prototype,{annotations:{add:function(t,i){var e,a,r=this.allItems,s=this.chart;for(n(t)||(t=[t]),a=t.length;a--;)e=new y(s,t[a]),r.push(e),e.render(i)},redraw:function(){u(this.allItems,function(t){t.redraw()})}}}),p.prototype.callbacks.push(function(i){var e,a=i.options.annotations;e=i.renderer.g("annotations"),e.attr({zIndex:7}),e.add(),i.annotations.allItems=[],i.annotations.chart=i,i.annotations.group=e,n(a)&&a.length>0&&i.annotations.add(i.options.annotations),t.addEvent(i,"redraw",function(){i.annotations.redraw()})})}(Highcharts,HighchartsAdapter); \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/modules/canvas-tools.js b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/modules/canvas-tools.js new file mode 100644 index 0000000..ee575ab --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/modules/canvas-tools.js @@ -0,0 +1,3 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + ;function RGBColor(t){this.ok=!1,"#"==t.charAt(0)&&(t=t.substr(1,6));var e,t=t.replace(/ /g,""),t=t.toLowerCase(),i={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};for(e in i)t==e&&(t=i[e]);var n=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}}];for(e=0;e255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var t=this.r.toString(16),e=this.g.toString(16),i=this.b.toString(16);return 1==t.length&&(t="0"+t),1==e.length&&(e="0"+e),1==i.length&&(i="0"+i),"#"+t+e+i},this.getHelpXML=function(){for(var t=[],e=0;e "+h.toRGB()+" -> "+h.toHex());o.appendChild(l),o.appendChild(u),s.appendChild(o)}catch(f){}return s}}window.console||(window.console={},window.console.log=function(){},window.console.dir=function(){}),Array.prototype.indexOf||(Array.prototype.indexOf=function(t){for(var e=0;e]*>/,""),e=new ActiveXObject("Microsoft.XMLDOM");return e.async="false",e.loadXML(t),e},t.Property=function(e,i){this.name=e,this.value=i,this.hasValue=function(){return null!=this.value&&""!==this.value},this.numValue=function(){if(!this.hasValue())return 0;var t=parseFloat(this.value);return(this.value+"").match(/%$/)&&(t/=100),t},this.valueOrDefault=function(t){return this.hasValue()?this.value:t},this.numValueOrDefault=function(t){return this.hasValue()?this.numValue():t};var n=this;this.Color={addOpacity:function(e){var i=n.value;if(null!=e&&""!=e){var s=new RGBColor(n.value);s.ok&&(i="rgba("+s.r+", "+s.g+", "+s.b+", "+e+")")}return new t.Property(n.name,i)}},this.Definition={getDefinition:function(){var e=n.value.replace(/^(url\()?#([^\)]+)\)?$/,"$2");return t.Definitions[e]},isUrl:function(){return 0==n.value.indexOf("url(")},getFillStyle:function(e){var i=this.getDefinition();return null!=i&&i.createGradient?i.createGradient(t.ctx,e):null!=i&&i.createPattern?i.createPattern(t.ctx,e):null}},this.Length={DPI:function(){return 96},EM:function(e){var i=12,n=new t.Property("fontSize",t.Font.Parse(t.ctx.font).fontSize);return n.hasValue()&&(i=n.Length.toPixels(e)),i},toPixels:function(e){if(!n.hasValue())return 0;var i=n.value+"";return i.match(/em$/)?n.numValue()*this.EM(e):i.match(/ex$/)?n.numValue()*this.EM(e)/2:i.match(/px$/)?n.numValue():i.match(/pt$/)?1.25*n.numValue():i.match(/pc$/)?15*n.numValue():i.match(/cm$/)?n.numValue()*this.DPI(e)/2.54:i.match(/mm$/)?n.numValue()*this.DPI(e)/25.4:i.match(/in$/)?n.numValue()*this.DPI(e):i.match(/%$/)?n.numValue()*t.ViewPort.ComputeSize(e):n.numValue()}},this.Time={toMilliseconds:function(){if(!n.hasValue())return 0;var t=n.value+"";return t.match(/s$/)?1e3*n.numValue():(t.match(/ms$/),n.numValue())}},this.Angle={toRadians:function(){if(!n.hasValue())return 0;var t=n.value+"";return t.match(/deg$/)?n.numValue()*(Math.PI/180):t.match(/grad$/)?n.numValue()*(Math.PI/200):t.match(/rad$/)?n.numValue():n.numValue()*(Math.PI/180)}}},t.Font=new function(){this.Styles=["normal","italic","oblique","inherit"],this.Variants=["normal","small-caps","inherit"],this.Weights="normal,bold,bolder,lighter,100,200,300,400,500,600,700,800,900,inherit".split(","),this.CreateFont=function(e,i,n,s,a,r){return r=null!=r?this.Parse(r):this.CreateFont("","","","","",t.ctx.font),{fontFamily:a||r.fontFamily,fontSize:s||r.fontSize,fontStyle:e||r.fontStyle,fontWeight:n||r.fontWeight,fontVariant:i||r.fontVariant,toString:function(){return[this.fontStyle,this.fontVariant,this.fontWeight,this.fontSize,this.fontFamily].join(" ")}}};var e=this;this.Parse=function(i){for(var n={},i=t.trim(t.compressSpaces(i||"")).split(" "),s=!1,a=!1,r=!1,o=!1,h="",l=0;lthis.x2&&(this.x2=t)),null!=e&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y2=this.y1=e),ethis.y2&&(this.y2=e))},this.addX=function(t){this.addPoint(t,null)},this.addY=function(t){this.addPoint(null,t)},this.addBoundingBox=function(t){this.addPoint(t.x1,t.y1),this.addPoint(t.x2,t.y2)},this.addQuadraticCurve=function(t,e,i,n,s,a){i=t+2/3*(i-t),n=e+2/3*(n-e),this.addBezierCurve(t,e,i,i+1/3*(s-t),n,n+1/3*(a-e),s,a)},this.addBezierCurve=function(t,e,n,s,a,r,o,h){var l=[t,e],u=[n,s],f=[a,r],d=[o,h];for(this.addPoint(l[0],l[1]),this.addPoint(d[0],d[1]),i=0;i<=1;i++)t=function(t){return Math.pow(1-t,3)*l[i]+3*Math.pow(1-t,2)*t*u[i]+3*(1-t)*Math.pow(t,2)*f[i]+Math.pow(t,3)*d[i]},e=6*l[i]-12*u[i]+6*f[i],n=-3*l[i]+9*u[i]-9*f[i]+3*d[i],s=3*u[i]-3*l[i],0==n?0!=e&&(e=-s/e,0=this.tokens.length-1},this.isCommandOrEnd=function(){return!!this.isEnd()||null!=this.tokens[this.i+1].match(/^[A-Za-z]$/)},this.isRelativeCommand=function(){return this.command==this.command.toLowerCase()},this.getToken=function(){return this.i+=1,this.tokens[this.i]},this.getScalar=function(){return parseFloat(this.getToken())},this.nextCommand=function(){this.previousCommand=this.command,this.command=this.getToken()},this.getPoint=function(){return this.makeAbsolute(new t.Point(this.getScalar(),this.getScalar()))},this.getAsControlPoint=function(){var t=this.getPoint();return this.control=t},this.getAsCurrentPoint=function(){var t=this.getPoint();return this.current=t},this.getReflectedControlPoint=function(){return"c"!=this.previousCommand.toLowerCase()&&"s"!=this.previousCommand.toLowerCase()?this.current:new t.Point(2*this.current.x-this.control.x,2*this.current.y-this.control.y)},this.makeAbsolute=function(t){return this.isRelativeCommand()&&(t.x=this.current.x+t.x,t.y=this.current.y+t.y),t},this.addMarker=function(t,e,i){null!=i&&this.angles.length>0&&null==this.angles[this.angles.length-1]&&(this.angles[this.angles.length-1]=this.points[this.points.length-1].angleTo(i)),this.addMarkerAngle(t,null==e?null:e.angleTo(t))},this.addMarkerAngle=function(t,e){this.points.push(t),this.angles.push(e)},this.getMarkerPoints=function(){return this.points},this.getMarkerAngles=function(){for(var t=0;t1&&(h*=Math.sqrt(d),l*=Math.sqrt(d)),u=(u==o?-1:1)*Math.sqrt((Math.pow(h,2)*Math.pow(l,2)-Math.pow(h,2)*Math.pow(f.y,2)-Math.pow(l,2)*Math.pow(f.x,2))/(Math.pow(h,2)*Math.pow(f.y,2)+Math.pow(l,2)*Math.pow(f.x,2))),isNaN(u)&&(u=0);var c=new t.Point(u*h*f.y/l,u*-l*f.x/h),r=new t.Point((r.x+s.x)/2+Math.cos(a)*c.x-Math.sin(a)*c.y,(r.y+s.y)/2+Math.sin(a)*c.x+Math.cos(a)*c.y),m=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2))*Math.sqrt(Math.pow(e[0],2)+Math.pow(e[1],2)))},p=function(t,e){return(t[0]*e[1]=1&&(f=0),0==o&&f>0&&(f-=2*Math.PI),1==o&&f<0&&(f+=2*Math.PI),d=new t.Point(r.x-h*Math.cos((u+f)/2),r.y-l*Math.sin((u+f)/2)),i.addMarkerAngle(d,(u+f)/2+(0==o?1:-1)*Math.PI/2),i.addMarkerAngle(s,f+(0==o?1:-1)*Math.PI/2),n.addPoint(s.x,s.y),null!=e&&(m=h>l?h:l,s=h>l?1:h/l,h=h>l?l/h:1,e.translate(r.x,r.y),e.rotate(a),e.scale(s,h),e.arc(0,0,m,u,u+f,1-o),e.scale(1/s,1/h),e.rotate(-a),e.translate(-r.x,-r.y))}break;case"Z":null!=e&&e.closePath(),i.current=i.start}return n},this.getMarkers=function(){for(var t=this.PathParser.getMarkerPoints(),e=this.PathParser.getMarkerAngles(),i=[],n=0;nthis.maxDuration){if("indefinite"!=this.attribute("repeatCount").value)return"remove"==this.attribute("fill").valueOrDefault("remove")&&!this.removed&&(this.removed=!0,this.getProperty().value=this.initialValue,!0);this.duration=0}return this.duration+=t,t=!1,this.begin0&&" "!=e[i-1]&&i0&&" "!=e[i-1]&&(i==e.length-1||" "==e[i+1])&&(a="initial"),"undefined"!=typeof t.glyphs[n]&&(s=t.glyphs[n][a],null==s&&"glyph"==t.glyphs[n].type&&(s=t.glyphs[n]))}else s=t.glyphs[n];return null==s&&(s=t.missingGlyph),s},this.renderChildren=function(e){var i=this.parent.style("font-family").Definition.getDefinition();if(null!=i){var n=this.parent.style("font-size").numValueOrDefault(t.Font.Parse(t.ctx.font).fontSize),s=this.parent.style("font-style").valueOrDefault(t.Font.Parse(t.ctx.font).fontStyle),a=this.getText();i.isRTL&&(a=a.split("").reverse().join(""));for(var r=t.ToNumberArray(this.parent.attribute("dx").value),o=0;o0?e.childNodes[0].nodeValue:e.text,this.getText=function(){return this.text}},t.Element.tspan.prototype=new t.Element.TextElementBase,t.Element.tref=function(e){this.base=t.Element.TextElementBase,this.base(e),this.getText=function(){var t=this.attribute("xlink:href").Definition.getDefinition();if(null!=t)return t.children[0].getText()}},t.Element.tref.prototype=new t.Element.TextElementBase,t.Element.a=function(e){this.base=t.Element.TextElementBase,this.base(e),this.hasText=!0;for(var i=0;i1?e.childNodes[1].nodeValue:""),e=e.replace(/(\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm,""),e=t.compressSpaces(e),e=e.split("}"),i=0;i0)for(u=o[h].indexOf("url"),l=o[h].indexOf(")",u),u=o[h].substr(u+5,l-u-6),u=t.parseXml(t.ajax(u)).getElementsByTagName("font"),l=0;l255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var t=this.r.toString(16),e=this.g.toString(16),i=this.b.toString(16);return 1==t.length&&(t="0"+t),1==e.length&&(e="0"+e),1==i.length&&(i="0"+i),"#"+t+e+i},this.getHelpXML=function(){for(var t=new Array,i=0;i "+h.toRGB()+" -> "+h.toHex());l.appendChild(u),l.appendChild(f),o.appendChild(l)}catch(c){}return o}}window.console||(window.console={},window.console.log=function(t){},window.console.dir=function(t){}),Array.prototype.indexOf||(Array.prototype.indexOf=function(t){for(var e=0;e]*>/,"");var i=new ActiveXObject("Microsoft.XMLDOM");return i.async="false",i.loadXML(t),i},t.Property=function(e,i){this.name=e,this.value=i,this.hasValue=function(){return null!=this.value&&""!==this.value},this.numValue=function(){if(!this.hasValue())return 0;var t=parseFloat(this.value);return(this.value+"").match(/%$/)&&(t/=100),t},this.valueOrDefault=function(t){return this.hasValue()?this.value:t},this.numValueOrDefault=function(t){return this.hasValue()?this.numValue():t};var n=this;this.Color={addOpacity:function(e){var i=n.value;if(null!=e&&""!=e){var s=new RGBColor(n.value);s.ok&&(i="rgba("+s.r+", "+s.g+", "+s.b+", "+e+")")}return new t.Property(n.name,i)}},this.Definition={getDefinition:function(){var e=n.value.replace(/^(url\()?#([^\)]+)\)?$/,"$2");return t.Definitions[e]},isUrl:function(){return 0==n.value.indexOf("url(")},getFillStyle:function(e){var i=this.getDefinition();return null!=i&&i.createGradient?i.createGradient(t.ctx,e):null!=i&&i.createPattern?i.createPattern(t.ctx,e):null}},this.Length={DPI:function(t){return 96},EM:function(e){var i=12,n=new t.Property("fontSize",t.Font.Parse(t.ctx.font).fontSize);return n.hasValue()&&(i=n.Length.toPixels(e)),i},toPixels:function(e){if(!n.hasValue())return 0;var i=n.value+"";return i.match(/em$/)?n.numValue()*this.EM(e):i.match(/ex$/)?n.numValue()*this.EM(e)/2:i.match(/px$/)?n.numValue():i.match(/pt$/)?1.25*n.numValue():i.match(/pc$/)?15*n.numValue():i.match(/cm$/)?n.numValue()*this.DPI(e)/2.54:i.match(/mm$/)?n.numValue()*this.DPI(e)/25.4:i.match(/in$/)?n.numValue()*this.DPI(e):i.match(/%$/)?n.numValue()*t.ViewPort.ComputeSize(e):n.numValue()}},this.Time={toMilliseconds:function(){if(!n.hasValue())return 0;var t=n.value+"";return t.match(/s$/)?1e3*n.numValue():t.match(/ms$/)?n.numValue():n.numValue()}},this.Angle={toRadians:function(){if(!n.hasValue())return 0;var t=n.value+"";return t.match(/deg$/)?n.numValue()*(Math.PI/180):t.match(/grad$/)?n.numValue()*(Math.PI/200):t.match(/rad$/)?n.numValue():n.numValue()*(Math.PI/180)}}},t.Font=new function(){this.Styles=["normal","italic","oblique","inherit"],this.Variants=["normal","small-caps","inherit"],this.Weights=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900","inherit"],this.CreateFont=function(e,i,n,s,a,r){var o=null!=r?this.Parse(r):this.CreateFont("","","","","",t.ctx.font);return{fontFamily:a||o.fontFamily,fontSize:s||o.fontSize,fontStyle:e||o.fontStyle,fontWeight:n||o.fontWeight,fontVariant:i||o.fontVariant,toString:function(){return[this.fontStyle,this.fontVariant,this.fontWeight,this.fontSize,this.fontFamily].join(" ")}}};var e=this;this.Parse=function(i){for(var n={},s=t.trim(t.compressSpaces(i||"")).split(" "),a={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1},r="",o=0;othis.x2&&(this.x2=t)),null!=e&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=e,this.y2=e),ethis.y2&&(this.y2=e))},this.addX=function(t){this.addPoint(t,null)},this.addY=function(t){this.addPoint(null,t)},this.addBoundingBox=function(t){this.addPoint(t.x1,t.y1),this.addPoint(t.x2,t.y2)},this.addQuadraticCurve=function(t,e,i,n,s,a){var r=t+2/3*(i-t),o=e+2/3*(n-e),l=r+1/3*(s-t),h=o+1/3*(a-e);this.addBezierCurve(t,e,r,l,o,h,s,a)},this.addBezierCurve=function(t,e,n,s,a,r,o,l){var h=[t,e],u=[n,s],f=[a,r],c=[o,l];for(this.addPoint(h[0],h[1]),this.addPoint(c[0],c[1]),i=0;i<=1;i++){var d=function(t){return Math.pow(1-t,3)*h[i]+3*Math.pow(1-t,2)*t*u[i]+3*(1-t)*Math.pow(t,2)*f[i]+Math.pow(t,3)*c[i]},m=6*h[i]-12*u[i]+6*f[i],p=-3*h[i]+9*u[i]-9*f[i]+3*c[i],g=3*u[i]-3*h[i];if(0!=p){var y=Math.pow(m,2)-4*g*p;if(!(y<0)){var v=(-m+Math.sqrt(y))/(2*p);0=this.tokens.length-1},this.isCommandOrEnd=function(){return!!this.isEnd()||null!=this.tokens[this.i+1].match(/^[A-Za-z]$/)},this.isRelativeCommand=function(){return this.command==this.command.toLowerCase()},this.getToken=function(){return this.i=this.i+1,this.tokens[this.i]},this.getScalar=function(){return parseFloat(this.getToken())},this.nextCommand=function(){this.previousCommand=this.command,this.command=this.getToken()},this.getPoint=function(){var e=new t.Point(this.getScalar(),this.getScalar());return this.makeAbsolute(e)},this.getAsControlPoint=function(){var t=this.getPoint();return this.control=t,t},this.getAsCurrentPoint=function(){var t=this.getPoint();return this.current=t,t},this.getReflectedControlPoint=function(){if("c"!=this.previousCommand.toLowerCase()&&"s"!=this.previousCommand.toLowerCase())return this.current;var e=new t.Point(2*this.current.x-this.control.x,2*this.current.y-this.control.y);return e},this.makeAbsolute=function(t){return this.isRelativeCommand()&&(t.x=this.current.x+t.x,t.y=this.current.y+t.y),t},this.addMarker=function(t,e,i){null!=i&&this.angles.length>0&&null==this.angles[this.angles.length-1]&&(this.angles[this.angles.length-1]=this.points[this.points.length-1].angleTo(i)),this.addMarkerAngle(t,null==e?null:e.angleTo(t))},this.addMarkerAngle=function(t,e){this.points.push(t),this.angles.push(e)},this.getMarkerPoints=function(){return this.points},this.getMarkerAngles=function(){for(var t=0;t1&&(f*=Math.sqrt(y),c*=Math.sqrt(y));var v=(m==p?-1:1)*Math.sqrt((Math.pow(f,2)*Math.pow(c,2)-Math.pow(f,2)*Math.pow(g.y,2)-Math.pow(c,2)*Math.pow(g.x,2))/(Math.pow(f,2)*Math.pow(g.y,2)+Math.pow(c,2)*Math.pow(g.x,2)));isNaN(v)&&(v=0);var b=new t.Point(v*f*g.y/c,v*-c*g.x/f),x=new t.Point((o.x+u.x)/2+Math.cos(d)*b.x-Math.sin(d)*b.y,(o.y+u.y)/2+Math.sin(d)*b.x+Math.cos(d)*b.y),w=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2))},E=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(w(t)*w(e))},P=function(t,e){return(t[0]*e[1]=1&&(k=0),0==p&&k>0&&(k-=2*Math.PI),1==p&&k<0&&(k+=2*Math.PI);var V=new t.Point(x.x-f*Math.cos((C+k)/2),x.y-c*Math.sin((C+k)/2));if(i.addMarkerAngle(V,(C+k)/2+(0==p?1:-1)*Math.PI/2),i.addMarkerAngle(u,k+(0==p?1:-1)*Math.PI/2),n.addPoint(u.x,u.y),null!=e){var E=f>c?f:c,M=f>c?1:f/c,S=f>c?c/f:1;e.translate(x.x,x.y),e.rotate(d),e.scale(M,S),e.arc(0,0,E,C,C+k,1-p),e.scale(1/M,1/S),e.rotate(-d),e.translate(-x.x,-x.y)}}break;case"Z":null!=e&&e.closePath(),i.current=i.start}return n},this.getMarkers=function(){for(var t=this.PathParser.getMarkerPoints(),e=this.PathParser.getMarkerAngles(),i=[],n=0;nthis.maxDuration){if("indefinite"!=this.attribute("repeatCount").value)return"remove"==this.attribute("fill").valueOrDefault("remove")&&!this.removed&&(this.removed=!0,this.getProperty().value=this.initialValue,!0);this.duration=0}this.duration=this.duration+t;var e=!1;if(this.begin0&&" "!=e[i-1]&&i0&&" "!=e[i-1]&&(i==e.length-1||" "==e[i+1])&&(a="initial"),"undefined"!=typeof t.glyphs[n]&&(s=t.glyphs[n][a],null==s&&"glyph"==t.glyphs[n].type&&(s=t.glyphs[n]))}else s=t.glyphs[n];return null==s&&(s=t.missingGlyph),s},this.renderChildren=function(e){var i=this.parent.style("font-family").Definition.getDefinition();if(null==i)""!=e.strokeStyle&&e.strokeText(t.compressSpaces(this.getText()),this.x,this.y),""!=e.fillStyle&&e.fillText(t.compressSpaces(this.getText()),this.x,this.y);else{var n=this.parent.style("font-size").numValueOrDefault(t.Font.Parse(t.ctx.font).fontSize),s=this.parent.style("font-style").valueOrDefault(t.Font.Parse(t.ctx.font).fontStyle),a=this.getText();i.isRTL&&(a=a.split("").reverse().join(""));for(var r=t.ToNumberArray(this.parent.attribute("dx").value),o=0;o0?e.childNodes[0].nodeValue:e.text,this.getText=function(){return this.text}},t.Element.tspan.prototype=new t.Element.TextElementBase,t.Element.tref=function(e){this.base=t.Element.TextElementBase,this.base(e),this.getText=function(){var t=this.attribute("xlink:href").Definition.getDefinition();if(null!=t)return t.children[0].getText()}},t.Element.tref.prototype=new t.Element.TextElementBase,t.Element.a=function(e){this.base=t.Element.TextElementBase,this.base(e),this.hasText=!0;for(var i=0;i1?e.childNodes[1].nodeValue:"");i=i.replace(/(\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm,""),i=t.compressSpaces(i);for(var n=i.split("}"),s=0;s0)for(var v=g[y].indexOf("url"),b=g[y].indexOf(")",v),x=g[y].substr(v+5,b-v-6),w=t.parseXml(t.ajax(x)),E=w.getElementsByTagName("font"),P=0;P=o&&h<=r&&!c&&""!==p&&(p=i.split(s.itemDelimiter||","),e(p,function(t,e){e>=a&&e<=l&&(n[e-a]||(n[e-a]=[]),n[e-a][u]=t)}),u+=1)}),this.dataFound())},parseTable:function(){var t,s=this.options,i=s.table,n=this.columns,o=s.startRow||0,r=s.endRow||Number.MAX_VALUE,a=s.startColumn||0,l=s.endColumn||Number.MAX_VALUE;i&&("string"==typeof i&&(i=document.getElementById(i)),e(i.getElementsByTagName("tr"),function(s,i){t=0,i>=o&&i<=r&&e(s.childNodes,function(e){("TD"===e.tagName||"TH"===e.tagName)&&t>=a&&t<=l&&(n[t]||(n[t]=[]),n[t][i-o]=e.innerHTML,t+=1)})}),this.dataFound())},parseGoogleSpreadsheet:function(){var t,e,s=this,i=this.options,n=i.googleSpreadsheetKey,o=this.columns,r=i.startRow||0,a=i.endRow||Number.MAX_VALUE,l=i.startColumn||0,u=i.endColumn||Number.MAX_VALUE;n&&jQuery.getJSON("https://spreadsheets.google.com/feeds/cells/"+n+"/"+(i.googleSpreadsheetWorksheet||"od6")+"/public/values?alt=json-in-script&callback=?",function(i){var n,h,i=i.feed.entry,p=i.length,c=0,m=0;for(h=0;h=l&&h<=u&&(o[h-l]=[],o[h-l].length=Math.min(m,a-r));for(h=0;h=l&&e<=u&&t>=r&&t<=a&&(o[e-l][t-r]=n.content.$t);s.dataFound()})},findHeaderRow:function(){e(this.columns,function(){}),this.headerRow=0},trim:function(t){return"string"==typeof t?t.replace(/^\s+|\s+$/g,""):t},parseTypes:function(){for(var t,e,s,i,n=this.columns,o=n.length;o--;)for(t=n[o].length;t--;)e=n[o][t],s=parseFloat(e),i=this.trim(e),i==s?(n[o][t]=s,s>31536e6?n[o].isDatetime=!0:n[o].isNumeric=!0):(e=this.parseDate(e),0!==o||"number"!=typeof e||isNaN(e)?n[o][t]=""===i?null:i:(n[o][t]=e,n[o].isDatetime=!0))},dateFormats:{"YYYY-mm-dd":{regex:"^([0-9]{4})-([0-9]{2})-([0-9]{2})$",parser:function(t){return Date.UTC(+t[1],t[2]-1,+t[3])}}},parseDate:function(t){var e,s,i,n=this.options.parseDate;if(n&&(e=n(t)),"string"==typeof t)for(s in this.dateFormats)n=this.dateFormats[s],(i=t.match(n.regex))&&(e=n.parser(i));return e},rowsToColumns:function(t){var e,s,i,n,o;if(t)for(o=[],s=t.length,e=0;e1&&(e=u.shift(),0===this.headerRow&&e.shift(),e.isDatetime?s="datetime":e.isNumeric||(s="category")),r=0;r1&&o[a].push(void 0!==u[r+1][a]?u[r+1][a]:null),i>2&&o[a].push(void 0!==u[r+2][a]?u[r+2][a]:null),i>3&&o[a].push(void 0!==u[r+3][a]?u[r+3][a]:null),i>4&&o[a].push(void 0!==u[r+4][a]?u[r+4][a]:null);n[l]={name:u[r].name,data:o},r+=i}h.complete({xAxis:{type:s},series:n})}}}),t.Data=s,t.data=function(t,e){return new s(t,e)},t.wrap(t.Chart.prototype,"init",function(s,i,n){var o=this;i&&i.data?t.data(t.extend(i.data,{complete:function(r){i.series&&e(i.series,function(e,s){i.series[s]=t.merge(e,r.series[s])}),i=t.merge(r,i),s.call(o,i,n)}}),i):s.call(o,i,n)})}(Highcharts); \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/modules/data.src.js b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/modules/data.src.js new file mode 100644 index 0000000..ba46019 --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/modules/data.src.js @@ -0,0 +1,2 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + ;!function(t){var e=t.each,n=function(t,e){this.init(t,e)};t.extend(n.prototype,{init:function(t,e){this.options=t,this.chartOptions=e,this.columns=t.columns||this.rowsToColumns(t.rows)||[],this.columns.length?this.dataFound():(this.parseCSV(),this.parseTable(),this.parseGoogleSpreadsheet())},getColumnDistribution:function(){var n=this.chartOptions,i=function(e){return(t.seriesTypes[e||"line"].prototype.pointArrayMap||[0]).length},s=n&&n.chart&&n.chart.type,o=[];e(n&&n.series||[],function(t){o.push(i(t.type||s))}),this.valueCount={global:i(s),individual:o}},dataFound:function(){this.parseTypes(),this.findHeaderRow(),this.parsed(),this.complete()},parseCSV:function(){var t,n=this,i=this.options,s=i.csv,o=this.columns,r=i.startRow||0,a=i.endRow||Number.MAX_VALUE,l=i.startColumn||0,u=i.endColumn||Number.MAX_VALUE,h=0;s&&(t=s.replace(/\r\n/g,"\n").replace(/\r/g,"\n").split(i.lineDelimiter||"\n"),e(t,function(t,s){var c,p=n.trim(t),m=0===p.indexOf("#"),d=""===p;s>=r&&s<=a&&!m&&!d&&(c=t.split(i.itemDelimiter||","),e(c,function(t,e){e>=l&&e<=u&&(o[e-l]||(o[e-l]=[]),o[e-l][h]=t)}),h+=1)}),this.dataFound())},parseTable:function(){var t,n=this.options,i=n.table,s=this.columns,o=n.startRow||0,r=n.endRow||Number.MAX_VALUE,a=n.startColumn||0,l=n.endColumn||Number.MAX_VALUE;i&&("string"==typeof i&&(i=document.getElementById(i)),e(i.getElementsByTagName("tr"),function(n,i){t=0,i>=o&&i<=r&&e(n.childNodes,function(e){("TD"===e.tagName||"TH"===e.tagName)&&t>=a&&t<=l&&(s[t]||(s[t]=[]),s[t][i-o]=e.innerHTML,t+=1)})}),this.dataFound())},parseGoogleSpreadsheet:function(){var t,e,n=this,i=this.options,s=i.googleSpreadsheetKey,o=this.columns,r=i.startRow||0,a=i.endRow||Number.MAX_VALUE,l=i.startColumn||0,u=i.endColumn||Number.MAX_VALUE;s&&jQuery.getJSON("https://spreadsheets.google.com/feeds/cells/"+s+"/"+(i.googleSpreadsheetWorksheet||"od6")+"/public/values?alt=json-in-script&callback=?",function(i){var s,h,c=i.feed.entry,p=c.length,m=0,d=0;for(h=0;h=l&&h<=u&&(o[h-l]=[],o[h-l].length=Math.min(d,a-r));for(h=0;h=l&&e<=u&&t>=r&&t<=a&&(o[e-l][t-r]=s.content.$t);n.dataFound()})},findHeaderRow:function(){var t=0;e(this.columns,function(e){"string"!=typeof e[0]&&(t=null)}),this.headerRow=0},trim:function(t){return"string"==typeof t?t.replace(/^\s+|\s+$/g,""):t},parseTypes:function(){for(var t,e,n,i,s,o=this.columns,r=o.length;r--;)for(t=o[r].length;t--;)e=o[r][t],n=parseFloat(e),i=this.trim(e),i==n?(o[r][t]=n,n>31536e6?o[r].isDatetime=!0:o[r].isNumeric=!0):(s=this.parseDate(e),0!==r||"number"!=typeof s||isNaN(s)?o[r][t]=""===i?null:i:(o[r][t]=s,o[r].isDatetime=!0))},dateFormats:{"YYYY-mm-dd":{regex:"^([0-9]{4})-([0-9]{2})-([0-9]{2})$",parser:function(t){return Date.UTC(+t[1],t[2]-1,+t[3])}}},parseDate:function(t){var e,n,i,s,o=this.options.parseDate;if(o&&(e=o(t)),"string"==typeof t)for(n in this.dateFormats)i=this.dateFormats[n],s=t.match(i.regex),s&&(e=i.parser(s));return e},rowsToColumns:function(t){var e,n,i,s,o;if(t)for(o=[],n=t.length,e=0;e1&&(e=u.shift(),0===this.headerRow&&e.shift(),e.isDatetime?n="datetime":e.isNumeric||(n="category")),r=0;r1&&o[a].push(void 0!==u[r+1][a]?u[r+1][a]:null),i>2&&o[a].push(void 0!==u[r+2][a]?u[r+2][a]:null),i>3&&o[a].push(void 0!==u[r+3][a]?u[r+3][a]:null),i>4&&o[a].push(void 0!==u[r+4][a]?u[r+4][a]:null);s[l]={name:u[r].name,data:o},r+=i}h.complete({xAxis:{type:n},series:s})}}}),t.Data=n,t.data=function(t,e){return new n(t,e)},t.wrap(t.Chart.prototype,"init",function(n,i,s){var o=this;i&&i.data?t.data(t.extend(i.data,{complete:function(r){i.series&&e(i.series,function(e,n){i.series[n]=t.merge(e,r.series[n])}),i=t.merge(r,i),n.call(o,i,s)}}),i):n.call(o,i,s)})}(Highcharts); \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/modules/drilldown.js b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/modules/drilldown.js new file mode 100644 index 0000000..2cf1257 --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/modules/drilldown.js @@ -0,0 +1,2 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + ;!function(t){function i(t,i,o){return"rgba("+[Math.round(t[0]+(i[0]-t[0])*o),Math.round(t[1]+(i[1]-t[1])*o),Math.round(t[2]+(i[2]-t[2])*o),t[3]+(i[3]-t[3])*o].join(",")+")"}var o=function(){},r=t.getOptions(),e=t.each,n=t.extend,l=t.wrap,s=t.Chart,a=t.seriesTypes,p=a.pie,d=a.column,h=HighchartsAdapter.fireEvent;n(r.lang,{drillUpText:"◁ Back to {series.name}"}),r.drilldown={activeAxisLabelStyle:{cursor:"pointer",color:"#039",fontWeight:"bold",textDecoration:"underline"},activeDataLabelStyle:{cursor:"pointer",color:"#039",fontWeight:"bold",textDecoration:"underline"},animation:{duration:500},drillUpButton:{position:{align:"right",x:-10,y:10}}},t.SVGRenderer.prototype.Element.prototype.fadeIn=function(){this.attr({opacity:.1,visibility:"visible"}).animate({opacity:1},{duration:250})},s.prototype.drilldownLevels=[],s.prototype.addSeriesAsDrilldown=function(t,i){var r,e=t.series,l=e.xAxis,s=e.yAxis;r=t.color||e.color;var a,i=n({color:r},i);a=HighchartsAdapter.inArray(this,e.points),this.drilldownLevels.push({seriesOptions:e.userOptions,shapeArgs:t.shapeArgs,bBox:t.graphic.getBBox(),color:r,newSeries:i,pointOptions:e.options.data[a],pointIndex:a,oldExtremes:{xMin:l&&l.userMin,xMax:l&&l.userMax,yMin:s&&s.userMin,yMax:s&&s.userMax}}),r=this.addSeries(i,!1),l&&(l.oldPos=l.pos,l.userMin=l.userMax=null,s.userMin=s.userMax=null),e.type===r.type&&(r.animate=r.animateDrilldown||o,r.options.animation=!0),e.remove(!1),this.redraw(),this.showDrillUpButton()},s.prototype.getDrilldownBackText=function(){return this.options.lang.drillUpText.replace("{series.name}",this.drilldownLevels[this.drilldownLevels.length-1].seriesOptions.name)},s.prototype.showDrillUpButton=function(){var t=this,i=this.getDrilldownBackText(),o=t.options.drilldown.drillUpButton;this.drillUpButton?this.drillUpButton.attr({text:i}).align():this.drillUpButton=this.renderer.button(i,null,null,function(){t.drillUp()}).attr(n({align:o.position.align,zIndex:9},o.theme)).add().align(o.position,!1,o.relativeTo||"plotBox")},s.prototype.drillUp=function(){var t=this.drilldownLevels.pop(),i=this.series[0],r=t.oldExtremes,e=this.addSeries(t.seriesOptions,!1);h(this,"drillup",{seriesOptions:t.seriesOptions}),e.type===i.type&&(e.drilldownLevel=t,e.animate=e.animateDrillupTo||o,e.options.animation=!0,i.animateDrillupFrom&&i.animateDrillupFrom(t)),i.remove(!1),e.xAxis&&(e.xAxis.setExtremes(r.xMin,r.xMax,!1),e.yAxis.setExtremes(r.yMin,r.yMax,!1)),this.redraw(),0===this.drilldownLevels.length?this.drillUpButton=this.drillUpButton.destroy():this.drillUpButton.attr({text:this.getDrilldownBackText()}).align()},p.prototype.animateDrilldown=function(o){var r=this.chart.drilldownLevels[this.chart.drilldownLevels.length-1],n=this.chart.options.drilldown.animation,l=r.shapeArgs,s=l.start,a=(l.end-s)/this.points.length,p=t.Color(r.color).rgba;o||e(this.points,function(o,r){var e=t.Color(o.color).rgba;o.graphic.attr(t.merge(l,{start:s+r*a,end:s+(r+1)*a})).animate(o.shapeArgs,t.merge(n,{step:function(t,o){"start"===o.prop&&this.attr({fill:i(p,e,o.pos)})}}))})},p.prototype.animateDrillupTo=d.prototype.animateDrillupTo=function(t){if(!t){var i=this,r=i.drilldownLevel;e(this.points,function(t){t.graphic.hide(),t.dataLabel&&t.dataLabel.hide(),t.connector&&t.connector.hide()}),setTimeout(function(){e(i.points,function(t,i){var o=i===r.pointIndex?"show":"fadeIn";t.graphic[o](),t.dataLabel&&t.dataLabel[o](),t.connector&&t.connector[o]()})},Math.max(this.chart.options.drilldown.animation.duration-50,0)),this.animate=o}},d.prototype.animateDrilldown=function(t){var i=this.chart.drilldownLevels[this.chart.drilldownLevels.length-1].shapeArgs,o=this.chart.options.drilldown.animation;t||(i.x+=this.xAxis.oldPos-this.xAxis.pos,e(this.points,function(t){t.graphic.attr(i).animate(t.shapeArgs,o)}))},d.prototype.animateDrillupFrom=p.prototype.animateDrillupFrom=function(o){var r=this.chart.options.drilldown.animation,n=this.group;delete this.group,e(this.points,function(e){var l=e.graphic,s=t.Color(e.color).rgba;delete e.graphic,l.animate(o.shapeArgs,t.merge(r,{step:function(r,e){"start"===e.prop&&this.attr({fill:i(s,t.Color(o.color).rgba,e.pos)})},complete:function(){l.destroy(),n&&(n=n.destroy())}}))})},t.Point.prototype.doDrilldown=function(){for(var t,i=this.series.chart,o=i.options.drilldown,r=o.series.length;r--&&!t;)o.series[r].id===this.drilldown&&(t=o.series[r]);h(i,"drilldown",{point:this,seriesOptions:t}),t&&i.addSeriesAsDrilldown(this,t)},l(t.Point.prototype,"init",function(i,o,r,e){var n=i.call(this,o,r,e),i=o.chart,o=(o=o.xAxis&&o.xAxis.ticks[e])&&o.label;return n.drilldown?(t.addEvent(n,"click",function(){n.doDrilldown()}),o&&(o._basicStyle||(o._basicStyle=o.element.getAttribute("style")),o.addClass("highcharts-drilldown-axis-label").css(i.options.drilldown.activeAxisLabelStyle).on("click",function(){n.doDrilldown&&n.doDrilldown()}))):o&&o._basicStyle&&o.element.setAttribute("style",o._basicStyle),n}),l(t.Series.prototype,"drawDataLabels",function(t){var i=this.chart.options.drilldown.activeDataLabelStyle;t.call(this),e(this.points,function(t){t.drilldown&&t.dataLabel&&t.dataLabel.attr({"class":"highcharts-drilldown-data-label"}).css(i).on("click",function(){t.doDrilldown()})})}),d.prototype.supportsDrilldown=!0,p.prototype.supportsDrilldown=!0;var c,r=function(t){t.call(this),e(this.points,function(t){t.drilldown&&t.graphic&&t.graphic.attr({"class":"highcharts-drilldown-point"}).css({cursor:"pointer"})})};for(c in a)a[c].prototype.supportsDrilldown&&l(a[c].prototype,"drawTracker",r)}(Highcharts); \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/modules/drilldown.src.js b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/modules/drilldown.src.js new file mode 100644 index 0000000..7ff50f5 --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/modules/drilldown.src.js @@ -0,0 +1,2 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + ;!function(t){"use strict";function i(t,i,o){var r=[Math.round(t[0]+(i[0]-t[0])*o),Math.round(t[1]+(i[1]-t[1])*o),Math.round(t[2]+(i[2]-t[2])*o),t[3]+(i[3]-t[3])*o];return"rgba("+r.join(",")+")"}var o=function(){},r=t.getOptions(),e=t.each,n=t.extend,l=t.wrap,s=t.Chart,a=t.seriesTypes,p=a.pie,d=a.column,h=HighchartsAdapter.fireEvent;n(r.lang,{drillUpText:"◁ Back to {series.name}"}),r.drilldown={activeAxisLabelStyle:{cursor:"pointer",color:"#039",fontWeight:"bold",textDecoration:"underline"},activeDataLabelStyle:{cursor:"pointer",color:"#039",fontWeight:"bold",textDecoration:"underline"},animation:{duration:500},drillUpButton:{position:{align:"right",x:-10,y:10}}},t.SVGRenderer.prototype.Element.prototype.fadeIn=function(){this.attr({opacity:.1,visibility:"visible"}).animate({opacity:1},{duration:250})},s.prototype.drilldownLevels=[],s.prototype.addSeriesAsDrilldown=function(t,i){var r,e,l,s=t.series,a=s.xAxis,p=s.yAxis,d=t.color||s.color;i=n({color:d},i),e=HighchartsAdapter.inArray(this,s.points),l={seriesOptions:s.userOptions,shapeArgs:t.shapeArgs,bBox:t.graphic.getBBox(),color:d,newSeries:i,pointOptions:s.options.data[e],pointIndex:e,oldExtremes:{xMin:a&&a.userMin,xMax:a&&a.userMax,yMin:p&&p.userMin,yMax:p&&p.userMax}},this.drilldownLevels.push(l),r=this.addSeries(i,!1),a&&(a.oldPos=a.pos,a.userMin=a.userMax=null,p.userMin=p.userMax=null),s.type===r.type&&(r.animate=r.animateDrilldown||o,r.options.animation=!0),s.remove(!1),this.redraw(),this.showDrillUpButton()},s.prototype.getDrilldownBackText=function(){var t=this.drilldownLevels[this.drilldownLevels.length-1];return this.options.lang.drillUpText.replace("{series.name}",t.seriesOptions.name)},s.prototype.showDrillUpButton=function(){var t=this,i=this.getDrilldownBackText(),o=t.options.drilldown.drillUpButton;this.drillUpButton?this.drillUpButton.attr({text:i}).align():this.drillUpButton=this.renderer.button(i,null,null,function(){t.drillUp()}).attr(n({align:o.position.align,zIndex:9},o.theme)).add().align(o.position,!1,o.relativeTo||"plotBox")},s.prototype.drillUp=function(){var t=this,i=t.drilldownLevels.pop(),r=t.series[0],e=i.oldExtremes,n=t.addSeries(i.seriesOptions,!1);h(t,"drillup",{seriesOptions:i.seriesOptions}),n.type===r.type&&(n.drilldownLevel=i,n.animate=n.animateDrillupTo||o,n.options.animation=!0,r.animateDrillupFrom&&r.animateDrillupFrom(i)),r.remove(!1),n.xAxis&&(n.xAxis.setExtremes(e.xMin,e.xMax,!1),n.yAxis.setExtremes(e.yMin,e.yMax,!1)),this.redraw(),0===this.drilldownLevels.length?this.drillUpButton=this.drillUpButton.destroy():this.drillUpButton.attr({text:this.getDrilldownBackText()}).align()},p.prototype.animateDrilldown=function(o){var r=this.chart.drilldownLevels[this.chart.drilldownLevels.length-1],n=this.chart.options.drilldown.animation,l=r.shapeArgs,s=l.start,a=l.end-s,p=a/this.points.length,d=t.Color(r.color).rgba;o||e(this.points,function(o,r){var e=t.Color(o.color).rgba;o.graphic.attr(t.merge(l,{start:s+r*p,end:s+(r+1)*p})).animate(o.shapeArgs,t.merge(n,{step:function(t,o){"start"===o.prop&&this.attr({fill:i(d,e,o.pos)})}}))})},p.prototype.animateDrillupTo=d.prototype.animateDrillupTo=function(t){if(!t){var i=this,r=i.drilldownLevel;e(this.points,function(t){t.graphic.hide(),t.dataLabel&&t.dataLabel.hide(),t.connector&&t.connector.hide()}),setTimeout(function(){e(i.points,function(t,i){var o=i===r.pointIndex?"show":"fadeIn";t.graphic[o](),t.dataLabel&&t.dataLabel[o](),t.connector&&t.connector[o]()})},Math.max(this.chart.options.drilldown.animation.duration-50,0)),this.animate=o}},d.prototype.animateDrilldown=function(t){var i=this.chart.drilldownLevels[this.chart.drilldownLevels.length-1].shapeArgs,o=this.chart.options.drilldown.animation;t||(i.x+=this.xAxis.oldPos-this.xAxis.pos,e(this.points,function(t){t.graphic.attr(i).animate(t.shapeArgs,o)}))},d.prototype.animateDrillupFrom=p.prototype.animateDrillupFrom=function(o){var r=this.chart.options.drilldown.animation,n=this.group;delete this.group,e(this.points,function(e){var l=e.graphic,s=t.Color(e.color).rgba;delete e.graphic,l.animate(o.shapeArgs,t.merge(r,{step:function(r,e){"start"===e.prop&&this.attr({fill:i(s,t.Color(o.color).rgba,e.pos)})},complete:function(){l.destroy(),n&&(n=n.destroy())}}))})},t.Point.prototype.doDrilldown=function(){for(var t,i=this.series,o=i.chart,r=o.options.drilldown,e=r.series.length;e--&&!t;)r.series[e].id===this.drilldown&&(t=r.series[e]);h(o,"drilldown",{point:this,seriesOptions:t}),t&&o.addSeriesAsDrilldown(this,t)},l(t.Point.prototype,"init",function(i,o,r,e){var n=i.call(this,o,r,e),l=o.chart,s=o.xAxis&&o.xAxis.ticks[e],a=s&&s.label;return n.drilldown?(t.addEvent(n,"click",function(){n.doDrilldown()}),a&&(a._basicStyle||(a._basicStyle=a.element.getAttribute("style")),a.addClass("highcharts-drilldown-axis-label").css(l.options.drilldown.activeAxisLabelStyle).on("click",function(){n.doDrilldown&&n.doDrilldown()}))):a&&a._basicStyle&&a.element.setAttribute("style",a._basicStyle),n}),l(t.Series.prototype,"drawDataLabels",function(t){var i=this.chart.options.drilldown.activeDataLabelStyle;t.call(this),e(this.points,function(t){t.drilldown&&t.dataLabel&&t.dataLabel.attr({"class":"highcharts-drilldown-data-label"}).css(i).on("click",function(){t.doDrilldown()})})}),d.prototype.supportsDrilldown=!0,p.prototype.supportsDrilldown=!0;var c,u=function(t){t.call(this),e(this.points,function(t){t.drilldown&&t.graphic&&t.graphic.attr({"class":"highcharts-drilldown-point"}).css({cursor:"pointer"})})};for(c in a)a[c].prototype.supportsDrilldown&&l(a[c].prototype,"drawTracker",u)}(Highcharts); \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/modules/exporting.js b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/modules/exporting.js new file mode 100644 index 0000000..f1ad2dd --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/modules/exporting.js @@ -0,0 +1,2 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + ;!function(t){var e,n=t.Chart,o=t.addEvent,i=t.removeEvent,r=t.createElement,a=t.discardElement,s=t.css,l=t.merge,p=t.each,c=t.extend,h=Math.max,u=document,d=window,m=t.isTouchDevice,g=t.Renderer.prototype.symbols,x=t.getOptions();c(x.lang,{printChart:"Print chart",downloadPNG:"Download PNG image",downloadJPEG:"Download JPEG image",downloadPDF:"Download PDF document",downloadSVG:"Download SVG vector image",contextButtonTitle:"Chart context menu"}),x.navigation={menuStyle:{border:"1px solid #A0A0A0",background:"#FFFFFF",padding:"5px 0"},menuItemStyle:{padding:"0 10px",background:"none",color:"#303030",fontSize:m?"14px":"11px"},menuItemHoverStyle:{background:"#4572A5",color:"#FFFFFF"},buttonOptions:{symbolFill:"#E0E0E0",symbolSize:14,symbolStroke:"#666",symbolStrokeWidth:3,symbolX:12.5,symbolY:10.5,align:"right",buttonSpacing:3,height:22,theme:{fill:"white",stroke:"none"},verticalAlign:"top",width:24}},x.exporting={type:"image/png",url:"http://export.highcharts.com/",buttons:{contextButton:{menuClassName:"highcharts-contextmenu",symbol:"menu",_titleKey:"contextButtonTitle",menuItems:[{textKey:"printChart",onclick:function(){this.print()}},{separator:!0},{textKey:"downloadPNG",onclick:function(){this.exportChart()}},{textKey:"downloadJPEG",onclick:function(){this.exportChart({type:"image/jpeg"})}},{textKey:"downloadPDF",onclick:function(){this.exportChart({type:"application/pdf"})}},{textKey:"downloadSVG",onclick:function(){this.exportChart({type:"image/svg+xml"})}}]}}},t.post=function(t,e){var n,o;o=r("form",{method:"post",action:t,enctype:"multipart/form-data"},{display:"none"},u.body);for(n in e)r("input",{type:"hidden",name:n,value:e[n]},null,o);o.submit(),a(o)},c(n.prototype,{getSVG:function(e){var n,o,i,s,h=this,d=l(h.options,e);return u.createElementNS||(u.createElementNS=function(t,e){return u.createElement(e)}),e=r("div",null,{position:"absolute",top:"-9999em",width:h.chartWidth+"px",height:h.chartHeight+"px"},u.body),o=h.renderTo.style.width,s=h.renderTo.style.height,o=d.exporting.sourceWidth||d.chart.width||/px$/.test(o)&&parseInt(o,10)||600,s=d.exporting.sourceHeight||d.chart.height||/px$/.test(s)&&parseInt(s,10)||400,c(d.chart,{animation:!1,renderTo:e,forExport:!0,width:o,height:s}),d.exporting.enabled=!1,d.series=[],p(h.series,function(t){i=l(t.options,{animation:!1,showCheckbox:!1,visible:t.visible}),i.isInternal||d.series.push(i)}),n=new t.Chart(d,h.callback),p(["xAxis","yAxis"],function(t){p(h[t],function(e,o){var i=n[t][o],r=e.getExtremes(),a=r.userMin,r=r.userMax;i&&(void 0!==a||void 0!==r)&&i.setExtremes(a,r,!0,!1)})}),o=n.container.innerHTML,d=null,n.destroy(),a(e),o=o.replace(/zIndex="[^"]+"/g,"").replace(/isShadow="[^"]+"/g,"").replace(/symbolName="[^"]+"/g,"").replace(/jQuery[0-9]+="[^"]+"/g,"").replace(/url\([^#]+#/g,"url(#").replace(/.*?$/,"").replace(/ /g," ").replace(/­/g,"­").replace(//g,'xlink:href="$1"/>').replace(/id=([^" >]+)/g,'id="$1"').replace(/class=([^" >]+)/g,'class="$1"').replace(/ transform /g," ").replace(/:(path|rect)/g,"$1").replace(/style="([^"]+)"/g,function(t){return t.toLowerCase()}),o=o.replace(/(url\(#highcharts-[0-9]+)"/g,"$1").replace(/"/g,"'")},exportChart:function(e,n){var e=e||{},o=this.options.exporting,o=this.getSVG(l({chart:{borderRadius:0}},o.chartOptions,n,{exporting:{sourceWidth:e.sourceWidth||o.sourceWidth,sourceHeight:e.sourceHeight||o.sourceHeight}})),e=l(this.options.exporting,e);t.post(e.url,{filename:e.filename||"chart",type:e.type,width:e.width||0,scale:e.scale||2,svg:o})},print:function(){var t=this,e=t.container,n=[],o=e.parentNode,i=u.body,r=i.childNodes;t.isPrinting||(t.isPrinting=!0,p(r,function(t,e){1===t.nodeType&&(n[e]=t.style.display,t.style.display="none")}),i.appendChild(e),d.focus(),d.print(),setTimeout(function(){o.appendChild(e),p(r,function(t,e){1===t.nodeType&&(t.style.display=n[e])}),t.isPrinting=!1},1e3))},contextMenu:function(t,e,n,i,a,l,u){var d,m,g,x=this,y=x.options.navigation,f=y.menuItemStyle,b=x.chartWidth,v=x.chartHeight,w="cache-"+t,S=x[w],k=h(a,l);S||(x[w]=S=r("div",{className:t},{position:"absolute",zIndex:1e3,padding:k+"px"},x.container),d=r("div",null,c({MozBoxShadow:"3px 3px 10px #888",WebkitBoxShadow:"3px 3px 10px #888",boxShadow:"3px 3px 10px #888"},y.menuStyle),S),m=function(){s(S,{display:"none"}),u&&u.setState(0),x.openMenu=!1},o(S,"mouseleave",function(){g=setTimeout(m,500)}),o(S,"mouseenter",function(){clearTimeout(g)}),o(document,"mousedown",function(e){x.pointer.inClass(e.target,t)||m()}),p(e,function(t){if(t){var e=t.separator?r("hr",null,null,d):r("div",{onmouseover:function(){s(this,y.menuItemHoverStyle)},onmouseout:function(){s(this,f)},onclick:function(){m(),t.onclick.apply(x,arguments)},innerHTML:t.text||x.options.lang[t.textKey]},c({cursor:"pointer"},f),d);x.exportDivElements.push(e)}}),x.exportDivElements.push(d,S),x.exportMenuWidth=S.offsetWidth,x.exportMenuHeight=S.offsetHeight),e={display:"block"},n+x.exportMenuWidth>b?e.right=b-n-a-k+"px":e.left=n-k+"px",i+l+x.exportMenuHeight>v&&"top"!==u.alignOptions.verticalAlign?e.bottom=v-i-k+"px":e.top=i+l-k+"px",s(S,e),x.openMenu=!0},addButton:function(n){var o,i,r=this,a=r.renderer,s=l(r.options.navigation.buttonOptions,n),p=s.onclick,h=s.menuItems,u={stroke:s.symbolStroke,fill:s.symbolFill},d=s.symbolSize||12;if(r.btnCount||(r.btnCount=0),r.exportDivElements||(r.exportDivElements=[],r.exportSVGElements=[]),s.enabled!==!1){var m,g=s.theme,x=g.states,y=x&&x.hover,x=x&&x.select;delete g.states,p?m=function(){p.apply(r,arguments)}:h&&(m=function(){r.contextMenu(i.menuClassName,h,i.translateX,i.translateY,i.width,i.height,i),i.setState(2)}),s.text&&s.symbol?g.paddingLeft=t.pick(g.paddingLeft,25):s.text||c(g,{width:s.width,height:s.height,padding:0}),i=a.button(s.text,0,0,m,g,y,x).attr({title:r.options.lang[s._titleKey],"stroke-linecap":"round"}),i.menuClassName=n.menuClassName||"highcharts-menu-"+r.btnCount++,s.symbol&&(o=a.symbol(s.symbol,s.symbolX-d/2,s.symbolY-d/2,d,d).attr(c(u,{"stroke-width":s.symbolStrokeWidth||1,zIndex:1})).add(i)),i.add().align(c(s,{width:i.width,x:t.pick(s.x,e)}),!0,"spacingBox"),e+=(i.width+s.buttonSpacing)*("right"===s.align?-1:1),r.exportSVGElements.push(i,o)}},destroyExport:function(t){var e,n,t=t.target;for(e=0;e.*?$/,"").replace(/ /g," ").replace(/­/g,"­").replace(//g,'xlink:href="$1"/>').replace(/id=([^" >]+)/g,'id="$1"').replace(/class=([^" >]+)/g,'class="$1"').replace(/ transform /g," ").replace(/:(path|rect)/g,"$1").replace(/style="([^"]+)"/g,function(t){return t.toLowerCase()}),r=r.replace(/(url\(#highcharts-[0-9]+)"/g,"$1").replace(/"/g,"'")},exportChart:function(e,n){e=e||{};var o=this,i=o.options.exporting,r=o.getSVG(p({chart:{borderRadius:0}},i.chartOptions,n,{exporting:{sourceWidth:e.sourceWidth||i.sourceWidth,sourceHeight:e.sourceHeight||i.sourceHeight}}));e=p(o.options.exporting,e),t.post(e.url,{filename:e.filename||"chart",type:e.type,width:e.width||0,scale:e.scale||2,svg:r})},print:function(){var t=this,e=t.container,n=[],o=e.parentNode,i=m.body,r=i.childNodes;t.isPrinting||(t.isPrinting=!0,c(r,function(t,e){1===t.nodeType&&(n[e]=t.style.display,t.style.display=w)}),i.appendChild(e),g.focus(),g.print(),setTimeout(function(){o.appendChild(e),c(r,function(t,e){1===t.nodeType&&(t.style.display=n[e])}),t.isPrinting=!1},1e3))},contextMenu:function(t,e,n,o,r,s,p){var u,m,g,x,y=this,f=y.options.navigation,v=f.menuItemStyle,S=y.chartWidth,C=y.chartHeight,F="cache-"+t,G=y[F],M=d(r,s),D="3px 3px 10px #888";G||(y[F]=G=a(b,{className:t},{position:k,zIndex:1e3,padding:M+E},y.container),u=a(b,null,h({MozBoxShadow:D,WebkitBoxShadow:D,boxShadow:D},f.menuStyle),G),m=function(){l(G,{display:w}),p&&p.setState(0),y.openMenu=!1},i(G,"mouseleave",function(){g=setTimeout(m,500)}),i(G,"mouseenter",function(){clearTimeout(g)}),i(document,"mousedown",function(e){y.pointer.inClass(e.target,t)||m()}),c(e,function(t){if(t){var e=t.separator?a("hr",null,null,u):a(b,{onmouseover:function(){l(this,f.menuItemHoverStyle)},onmouseout:function(){l(this,v)},onclick:function(){m(),t.onclick.apply(y,arguments)},innerHTML:t.text||y.options.lang[t.textKey]},h({cursor:"pointer"},v),u);y.exportDivElements.push(e)}}),y.exportDivElements.push(u,G),y.exportMenuWidth=G.offsetWidth,y.exportMenuHeight=G.offsetHeight),x={display:"block"},n+y.exportMenuWidth>S?x.right=S-n-r-M+E:x.left=n-M+E,o+s+y.exportMenuHeight>C&&"top"!==p.alignOptions.verticalAlign?x.bottom=C-o-M+E:x.top=o+s-M+E,l(G,x),y.openMenu=!0},addButton:function(e){var o,i,r=this,a=r.renderer,s=p(r.options.navigation.buttonOptions,e),l=s.onclick,c=s.menuItems,u={stroke:s.symbolStroke,fill:s.symbolFill},d=s.symbolSize||12;if(r.btnCount||(r.btnCount=0),r.exportDivElements||(r.exportDivElements=[],r.exportSVGElements=[]),s.enabled!==!1){var m,g=s.theme,x=g.states,y=x&&x.hover,f=x&&x.select;delete g.states,l?m=function(){l.apply(r,arguments)}:c&&(m=function(){r.contextMenu(i.menuClassName,c,i.translateX,i.translateY,i.width,i.height,i),i.setState(2)}),s.text&&s.symbol?g.paddingLeft=t.pick(g.paddingLeft,25):s.text||h(g,{width:s.width,height:s.height,padding:0}),i=a.button(s.text,0,0,m,g,y,f).attr({title:r.options.lang[s._titleKey],"stroke-linecap":"round"}),i.menuClassName=e.menuClassName||S+"menu-"+r.btnCount++,s.symbol&&(o=a.symbol(s.symbol,s.symbolX-d/2,s.symbolY-d/2,d,d).attr(h(u,{"stroke-width":s.symbolStrokeWidth||1,zIndex:1})).add(i)),i.add().align(h(s,{width:i.width,x:t.pick(s.x,n)}),!0,"spacingBox"),n+=(i.width+s.buttonSpacing)*("right"===s.align?-1:1),r.exportSVGElements.push(i,o)}},destroyExport:function(t){var e,n,o=t.target;for(e=0;ev-H||v===H?A:A+(W-A)*((v-H-t)/(v-H))},this.getX=function(t,i){return L+(i?-1:1)*(e(t)/2+y.dataLabels.distance)},this.center=[L,k,v],this.centerX=L,o(u,function(t){f+=t.y}),o(u,function(o){d=null,n=f?o.y/f:0,r=k-v/2+w*v,c=r+n*v,t=e(r),s=L-t/2,h=s+t,t=e(c),l=L-t/2,p=l+t,r>P?(s=l=L-A/2,h=p=L+A/2):c>P&&(d=c,t=e(P),l=L-t/2,p=l+t,c=P),i=["M",s,r,"L",h,r,p,c],d&&i.push(p,d,l,d),i.push(l,c,"Z"),o.shapeType="path",o.shapeArgs={d:i},o.percentage=100*n,o.plotX=L,o.plotY=(r+(d||c))/2,o.tooltipPos=[L,o.plotY],o.slice=a,o.half=X,w+=n}),this.setTooltipPoints()},drawPoints:function(){var t=this,e=t.options,i=t.chart.renderer;o(t.data,function(n){var a=n.graphic,o=n.shapeArgs;a?a.animate(o):n.graphic=i.path(o).attr({fill:n.color,stroke:e.borderColor,"stroke-width":e.borderWidth}).add(t.group)})},sortByAngle:a,drawDataLabels:function(){var t,e,n,a,o,s=this.data,r=this.options.dataLabels.distance,h=s.length;for(this.center[2]-=2*r;h--;)n=s[h],e=(t=n.half)?1:-1,o=n.plotY,a=this.getX(o,t),n.labelPos=[0,o,a+(r-5)*e,o,a+r*e,o,t?"right":"left",0];i.pie.prototype.drawDataLabels.call(this)}})}(Highcharts); \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/modules/funnel.src.js b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/modules/funnel.src.js new file mode 100644 index 0000000..4e565da --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/modules/funnel.src.js @@ -0,0 +1,2 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + ;!function(t){"use strict";var e=t.getOptions(),n=e.plotOptions,a=t.seriesTypes,o=t.merge,i=function(){},r=t.each;n.funnel=o(n.pie,{center:["50%","50%"],width:"90%",neckWidth:"30%",height:"100%",neckHeight:"25%",dataLabels:{connectorWidth:1,connectorColor:"#606060"},size:!0,states:{select:{color:"#C0C0C0",borderColor:"#000000",shadow:!1}}}),a.funnel=t.extendClass(a.pie,{type:"funnel",animate:i,translate:function(){var t,e,n,a,o,s,h,l,c,p,d,u=function(t,e){return/%$/.test(t)?e*parseInt(t,10)/100:parseInt(t,10)},f=0,g=this,b=g.chart,w=b.plotWidth,y=b.plotHeight,C=0,L=g.options,k=L.center,W=u(k[0],w),v=u(k[0],y),A=u(L.width,w),H=u(L.height,y),P=u(L.neckWidth,w),X=u(L.neckHeight,y),m=H-X,T=g.data,Y="left"===L.dataLabels.position?1:0;g.getWidthAt=e=function(t){return t>H-X||H===X?P:P+(A-P)*((H-X-t)/(H-X))},g.getX=function(t,n){return W+(n?-1:1)*(e(t)/2+L.dataLabels.distance)},g.center=[W,v,H],g.centerX=W,r(T,function(t){f+=t.y}),r(T,function(r){d=null,a=f?r.y/f:0,s=v-H/2+C*H,c=s+a*H,t=e(s),o=W-t/2,h=o+t,t=e(c),l=W-t/2,p=l+t,s>m?(o=l=W-P/2,h=p=W+P/2):c>m&&(d=c,t=e(m),l=W-t/2,p=l+t,c=m),n=["M",o,s,"L",h,s,p,c],d&&n.push(p,d,l,d),n.push(l,c,"Z"),r.shapeType="path",r.shapeArgs={d:n},r.percentage=100*a,r.plotX=W,r.plotY=(s+(d||c))/2,r.tooltipPos=[W,r.plotY],r.slice=i,r.half=Y,C+=a}),g.setTooltipPoints()},drawPoints:function(){var t=this,e=t.options,n=t.chart,a=n.renderer;r(t.data,function(n){var o=n.graphic,i=n.shapeArgs;o?o.animate(i):n.graphic=a.path(i).attr({fill:n.color,stroke:e.borderColor,"stroke-width":e.borderWidth}).add(t.group)})},sortByAngle:i,drawDataLabels:function(){var t,e,n,o,i,r=this.data,s=this.options.dataLabels.distance,h=r.length;for(this.center[2]-=2*s;h--;)n=r[h],t=n.half,e=t?1:-1,i=n.plotY,o=this.getX(i,t),n.labelPos=[0,i,o+(s-5)*e,i,o+s*e,i,t?"right":"left",0];a.pie.prototype.drawDataLabels.call(this)}})}(Highcharts); \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/modules/heatmap.js b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/modules/heatmap.js new file mode 100644 index 0000000..c30b1d3 --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/modules/heatmap.js @@ -0,0 +1,2 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + ;!function(a){var e=a.seriesTypes,t=a.each;e.heatmap=a.extendClass(e.map,{colorKey:"z",useMapGeometry:!1,pointArrayMap:["y","z"],translate:function(){var a=this,e=a.options,r=Number.MAX_VALUE,s=Number.MIN_VALUE;a.generatePoints(),t(a.data,function(t){var n=t.x,o=t.y,p=t.z,i=(e.colsize||1)/2,h=(e.rowsize||1)/2;t.path=["M",n-i,o-h,"L",n+i,o-h,"L",n+i,o+h,"L",n-i,o+h,"Z"],t.shapeType="path",t.shapeArgs={d:a.translatePath(t.path)},"number"==typeof p&&(p>s?s=p:ps?s=p:pe?this:a,e=(a.max-a.min)*a.transA,a.minPixelPadding=(a.len-e)/2)}),u(i.prototype,"render",function(o){var e=this,i=e.options.mapNavigation;o.call(e),e.renderMapNavigation(),i.zoomOnDoubleClick&&t.addEvent(e.container,"dblclick",function(t){e.pointer.onContainerDblClick(t)}),i.zoomOnMouseWheel&&t.addEvent(e.container,void 0===document.onmousewheel?"DOMMouseScroll":"mousewheel",function(t){e.pointer.onContainerMouseWheel(t)})}),s(n.prototype,{onContainerDblClick:function(t){var o=this.chart,t=this.normalize(t);o.isInsidePlot(t.chartX-o.plotLeft,t.chartY-o.plotTop)&&o.mapZoom(.5,o.xAxis[0].toValue(t.chartX),o.yAxis[0].toValue(t.chartY))},onContainerMouseWheel:function(t){var o,e=this.chart,t=this.normalize(t);o=t.detail||-(t.wheelDelta/120),e.isInsidePlot(t.chartX-e.plotLeft,t.chartY-e.plotTop)&&e.mapZoom(o>0?2:.5,e.xAxis[0].toValue(t.chartX),e.yAxis[0].toValue(t.chartY))}}),u(n.prototype,"init",function(t,o,e){t.call(this,o,e),e.mapNavigation.enableTouchZoom&&(this.pinchX=this.pinchHor=this.pinchY=this.pinchVert=!0)}),s(i.prototype,{renderMapNavigation:function(){var t,o,e,i=this,a=this.options.mapNavigation,n=a.buttons,r=function(){this.handler.call(i)};if(a.enableButtons)for(t in n)n.hasOwnProperty(t)&&(e=l(a.buttonOptions,n[t]),o=i.renderer.button(e.text,0,0,r).attr({width:e.width,height:e.height}).css(e.style).add(),o.handler=e.onclick,o.align(s(e,{width:o.width,height:o.height}),null,"spacingBox"))},fitToBox:function(t,o){return r([["x","width"],["y","height"]],function(e){var i=e[0],e=e[1];t[i]+t[e]>o[i]+o[e]&&(t[e]>o[e]?(t[e]=o[e],t[i]=o[i]):t[i]=o[i]+o[e]-t[e]),t[e]>o[e]&&(t[e]=o[e]),t[i]"},states:{normal:{animation:!0}}}),e=t.extendClass(a,{applyOptions:function(o,e){var i=a.prototype.applyOptions.call(this,o,e);return i.path&&"string"==typeof i.path&&(i.path=i.options.path=t.splitPath(i.path)),i},onMouseOver:function(){clearTimeout(this.colorInterval),a.prototype.onMouseOver.call(this)},onMouseOut:function(){var t=this,e=+new Date,i=x(t.options.color),n=x(t.pointAttr.hover.fill),r=t.series.options.states.normal.animation,s=r&&(r.duration||500);s&&4===i.rgba.length&&4===n.rgba.length&&(delete t.pointAttr[""].fill,clearTimeout(t.colorInterval),t.colorInterval=setInterval(function(){var a=(new Date-e)/s,r=t.graphic;a>1&&(a=1),r&&r.attr("fill",o(n,i,a)),a>=1&&clearTimeout(t.colorInterval)},13)),a.prototype.onMouseOut.call(t)}}),m.map=t.extendClass(m.scatter,{type:"map",pointAttrToOptions:{stroke:"borderColor","stroke-width":"borderWidth",fill:"color"},colorKey:"y",pointClass:e,trackerGroups:["group","markerGroup","dataLabelsGroup"],getSymbol:g,supportsDrilldown:!0,getExtremesFromAll:!0,useMapGeometry:!0,init:function(o){var e,i,a,n,s,l,h,d=this,c=o.options.legend.valueDecimals,u=[];l="horizontal"===o.options.legend.layout,t.Series.prototype.init.apply(this,arguments),s=d.options.colorRange,(n=d.options.valueRanges)?(r(n,function(o){i=o.from,a=o.to,e="",void 0===i?e="< ":void 0===a&&(e="> "),void 0!==i&&(e+=p(i,c)),void 0!==i&&void 0!==a&&(e+=" - "),void 0!==a&&(e+=p(a,c)),u.push(t.extend({chart:d.chart,name:e,options:{},drawLegendSymbol:m.area.prototype.drawLegendSymbol,visible:!0,setState:function(){},setVisible:function(){}},o))}),d.legendItems=u):s&&(i=s.from,a=s.to,n=s.fromLabel,s=s.toLabel,h=l?[0,0,1,0]:[0,1,0,0],l||(l=n,n=s,s=l),l={linearGradient:{x1:h[0],y1:h[1],x2:h[2],y2:h[3]},stops:[[0,i],[1,a]]},u=[{chart:d.chart,options:{},fromLabel:n,toLabel:s,color:l,drawLegendSymbol:this.drawLegendSymbolGradient,visible:!0,setState:function(){},setVisible:function(){}}],d.legendItems=u)},drawLegendSymbol:m.area.prototype.drawLegendSymbol,drawLegendSymbolGradient:function(t,o){var e,i,a,n=t.options.symbolPadding,r=h(t.options.padding,8),s=this.chart.renderer.fontMetrics(t.options.itemStyle.fontSize).h,l="horizontal"===t.options.layout;a=h(t.options.rectangleLength,200),l?(e=-(n/2),i=0):(e=-a+t.baseline-n/2,i=r+s),o.fromText=this.chart.renderer.text(o.fromLabel,i,e).attr({zIndex:2}).add(o.legendGroup),i=o.fromText.getBBox(),o.legendSymbol=this.chart.renderer.rect(l?i.x+i.width+n:i.x-s-n,i.y,l?a:s,l?s:a,2).attr({zIndex:1}).add(o.legendGroup),a=o.legendSymbol.getBBox(),o.toText=this.chart.renderer.text(o.toLabel,a.x+a.width+n,l?e:a.y+a.height-n).attr({zIndex:2}).add(o.legendGroup),e=o.toText.getBBox(),l?(t.offsetWidth=i.width+a.width+e.width+2*n+r,t.itemY=s+r):(t.offsetWidth=Math.max(i.width,e.width)+n+a.width+r,t.itemY=a.height+r,t.itemX=n)},getBox:function(t){var o=Number.MIN_VALUE,e=Number.MAX_VALUE,i=Number.MIN_VALUE,a=Number.MAX_VALUE;r(t||this.options.data,function(t){for(var n=t.path,r=n.length,s=!1,l=Number.MIN_VALUE,h=Number.MAX_VALUE,p=Number.MIN_VALUE,d=Number.MAX_VALUE;r--;)"number"==typeof n[r]&&!isNaN(n[r])&&(s?(l=Math.max(l,n[r]),h=Math.min(h,n[r])):(p=Math.max(p,n[r]),d=Math.min(d,n[r])),s=!s);t._maxX=l,t._minX=h,t._maxY=p,t._minY=d,o=Math.max(o,l),e=Math.min(e,h),i=Math.max(i,p),a=Math.min(a,d)}),this.minY=a,this.maxY=i,this.minX=e,this.maxX=o},translatePath:function(t){var o,e=!1,i=this.xAxis,a=this.yAxis,t=[].concat(t);for(o=t.length;o--;)"number"==typeof t[o]&&(t[o]=e?Math.round(i.translate(t[o])):Math.round(a.len-a.translate(t[o])),e=!e);return t},setData:function(){t.Series.prototype.setData.apply(this,arguments),this.getBox()},translate:function(){var t=this,o=Number.MAX_VALUE,e=Number.MIN_VALUE;t.generatePoints(),r(t.data,function(i){i.shapeType="path",i.shapeArgs={d:t.translatePath(i.path)},"number"==typeof i.y&&(i.y>e?e=i.y:i.y=i)&&(void 0===a||c<=a)){d=p.color;break}}else l&&void 0!==c&&(p=1-(e-c)/(e-t),d=null===c?n.nullColor:o(i,a,p));d&&(r.color=null,r.options.color=d)})},drawGraph:g,drawDataLabels:g,drawPoints:function(){var o=this.xAxis,e=this.yAxis,i=this.colorKey;r(this.data,function(t){t.plotY=1,null===t[i]&&(t[i]=0,t.isNull=!0)}),m.column.prototype.drawPoints.apply(this),r(this.data,function(t){var a=t.dataLabels,n=o.toPixels(t._minX,!0),r=o.toPixels(t._maxX,!0),s=e.toPixels(t._minY,!0),l=e.toPixels(t._maxY,!0);t.plotX=Math.round(n+(r-n)*h(a&&a.anchorX,.5)),t.plotY=Math.round(s+(l-s)*h(a&&a.anchorY,.5)),t.isNull&&(t[i]=null)}),t.Series.prototype.drawDataLabels.call(this)},animateDrilldown:function(t){var o=this.chart.plotBox,e=this.chart.drilldownLevels[this.chart.drilldownLevels.length-1],i=e.bBox,a=this.chart.options.drilldown.animation;t||(t=Math.min(i.width/o.width,i.height/o.height),e.shapeArgs={scaleX:t,scaleY:t,translateX:i.x,translateY:i.y},r(this.points,function(t){t.graphic.attr(e.shapeArgs).animate({scaleX:1,scaleY:1,translateX:0,translateY:0},a)}),delete this.animate)},animateDrillupFrom:function(t){m.column.prototype.animateDrillupFrom.call(this,t)},animateDrillupTo:function(t){m.column.prototype.animateDrillupTo.call(this,t)}}),c.mapline=l(c.map,{lineWidth:1,backgroundColor:"none"}),m.mapline=t.extendClass(m.map,{type:"mapline",pointAttrToOptions:{stroke:"color","stroke-width":"lineWidth",fill:"backgroundColor"},drawLegendSymbol:m.line.prototype.drawLegendSymbol}),c.mappoint=l(c.scatter,{dataLabels:{enabled:!0,format:"{point.name}",color:"black",style:{textShadow:"0 0 5px white"}}}),m.mappoint=t.extendClass(m.scatter,{type:"mappoint"}),t.Map=function(o,e){var i,a={endOnTick:!1,gridLineWidth:0,labels:{enabled:!1},lineWidth:0,minPadding:0,maxPadding:0,startOnTick:!1,tickWidth:0,title:null};return i=o.series,o.series=null,o=l({chart:{type:"map",panning:"xy"},xAxis:a,yAxis:l(a,{reversed:!0})},o,{chart:{inverted:!1}}),o.series=i,new t.Chart(o,e)}}(Highcharts); \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/modules/map.src.js b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/modules/map.src.js new file mode 100644 index 0000000..cdf657f --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/modules/map.src.js @@ -0,0 +1,2 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + ;!function(t){function e(t,e,o){for(var a=4,i=[];a--;)i[a]=Math.round(e.rgba[a]+(t.rgba[a]-e.rgba[a])*(1-o));return"rgba("+i.join(",")+")"}var o,a=t.Axis,i=t.Chart,n=t.Point,r=t.Pointer,l=t.each,s=t.extend,h=t.merge,p=t.pick,m=t.numberFormat,d=t.getOptions(),c=t.seriesTypes,u=d.plotOptions,x=t.wrap,g=t.Color,f=function(){};d.mapNavigation={buttonOptions:{align:"right",verticalAlign:"bottom",x:0,width:18,height:18,style:{fontSize:"15px",fontWeight:"bold",textAlign:"center"}},buttons:{zoomIn:{onclick:function(){this.mapZoom(.5)},text:"+",y:-32},zoomOut:{onclick:function(){this.mapZoom(2)},text:"-",y:0}}},t.splitPath=function(t){var e;for(t=t.replace(/([A-Za-z])/g," $1 "),t=t.replace(/^\s*/,"").replace(/\s*$/,""),t=t.split(/[ ,]+/),e=0;er?this:s,a=(i.max-i.min)*i.transA,i.minPixelPadding=(i.len-a)/2)}),x(i.prototype,"render",function(e){var o=this,a=o.options.mapNavigation;e.call(o),o.renderMapNavigation(),a.zoomOnDoubleClick&&t.addEvent(o.container,"dblclick",function(t){o.pointer.onContainerDblClick(t)}),a.zoomOnMouseWheel&&t.addEvent(o.container,void 0===document.onmousewheel?"DOMMouseScroll":"mousewheel",function(t){o.pointer.onContainerMouseWheel(t)})}),s(r.prototype,{onContainerDblClick:function(t){var e=this.chart;t=this.normalize(t),e.isInsidePlot(t.chartX-e.plotLeft,t.chartY-e.plotTop)&&e.mapZoom(.5,e.xAxis[0].toValue(t.chartX),e.yAxis[0].toValue(t.chartY))},onContainerMouseWheel:function(t){var e,o=this.chart;t=this.normalize(t),e=t.detail||-(t.wheelDelta/120),o.isInsidePlot(t.chartX-o.plotLeft,t.chartY-o.plotTop)&&o.mapZoom(e>0?2:.5,o.xAxis[0].toValue(t.chartX),o.yAxis[0].toValue(t.chartY))}}),x(r.prototype,"init",function(t,e,o){t.call(this,e,o),o.mapNavigation.enableTouchZoom&&(this.pinchX=this.pinchHor=this.pinchY=this.pinchVert=!0)}),s(i.prototype,{renderMapNavigation:function(){var t,e,o,a=this,i=this.options.mapNavigation,n=i.buttons,r=function(){this.handler.call(a)};if(i.enableButtons)for(t in n)n.hasOwnProperty(t)&&(o=h(i.buttonOptions,n[t]),e=a.renderer.button(o.text,0,0,r).attr({width:o.width,height:o.height}).css(o.style).add(),e.handler=o.onclick,e.align(s(o,{width:e.width,height:e.height}),null,"spacingBox"))},fitToBox:function(t,e){return l([["x","width"],["y","height"]],function(o){var a=o[0],i=o[1];t[a]+t[i]>e[a]+e[i]&&(t[i]>e[i]?(t[i]=e[i],t[a]=e[a]):t[a]=e[a]+e[i]-t[i]),t[i]>e[i]&&(t[i]=e[i]),t[a]"},states:{normal:{animation:!0}}});var y=t.extendClass(n,{applyOptions:function(e,o){var a=n.prototype.applyOptions.call(this,e,o);return a.path&&"string"==typeof a.path&&(a.path=a.options.path=t.splitPath(a.path)),a},onMouseOver:function(){clearTimeout(this.colorInterval),n.prototype.onMouseOver.call(this)},onMouseOut:function(){var t=this,o=+new Date,a=g(t.options.color),i=g(t.pointAttr.hover.fill),r=t.series.options.states.normal.animation,l=r&&(r.duration||500);l&&4===a.rgba.length&&4===i.rgba.length&&(delete t.pointAttr[""].fill,clearTimeout(t.colorInterval),t.colorInterval=setInterval(function(){var n=(new Date-o)/l,r=t.graphic;n>1&&(n=1),r&&r.attr("fill",e(i,a,n)),n>=1&&clearTimeout(t.colorInterval)},13)),n.prototype.onMouseOut.call(t)}});c.map=t.extendClass(c.scatter,{type:"map",pointAttrToOptions:{stroke:"borderColor","stroke-width":"borderWidth",fill:"color"},colorKey:"y",pointClass:y,trackerGroups:["group","markerGroup","dataLabelsGroup"],getSymbol:f,supportsDrilldown:!0,getExtremesFromAll:!0,useMapGeometry:!0,init:function(e){var a,i,n,r,s,h,p,d,u,x,g=this,f=e.options.legend.valueDecimals,y=[],b="horizontal"===e.options.legend.layout;t.Series.prototype.init.apply(this,arguments),h=g.options.colorRange,p=g.options.valueRanges,p?(l(p,function(e){i=e.from,n=e.to,a="",i===o?a="< ":n===o&&(a="> "),i!==o&&(a+=m(i,f)),i!==o&&n!==o&&(a+=" - "),n!==o&&(a+=m(n,f)),y.push(t.extend({chart:g.chart,name:a,options:{},drawLegendSymbol:c.area.prototype.drawLegendSymbol,visible:!0,setState:function(){},setVisible:function(){}},e))}),g.legendItems=y):h&&(i=h.from,n=h.to,r=h.fromLabel,s=h.toLabel,u=b?[0,0,1,0]:[0,1,0,0],b||(x=r,r=s,s=x),d={linearGradient:{x1:u[0],y1:u[1],x2:u[2],y2:u[3]},stops:[[0,i],[1,n]]},y=[{chart:g.chart,options:{},fromLabel:r,toLabel:s,color:d,drawLegendSymbol:this.drawLegendSymbolGradient,visible:!0,setState:function(){},setVisible:function(){}}],g.legendItems=y)},drawLegendSymbol:c.area.prototype.drawLegendSymbol,drawLegendSymbolGradient:function(t,e){var o,a,i,n,r,l=t.options.symbolPadding,s=p(t.options.padding,8),h=this.chart.renderer.fontMetrics(t.options.itemStyle.fontSize).h,m="horizontal"===t.options.layout,d=p(t.options.rectangleLength,200);m?(o=-(l/2),a=0):(o=-d+t.baseline-l/2,a=s+h),e.fromText=this.chart.renderer.text(e.fromLabel,a,o).attr({zIndex:2}).add(e.legendGroup),i=e.fromText.getBBox(),e.legendSymbol=this.chart.renderer.rect(m?i.x+i.width+l:i.x-h-l,i.y,m?d:h,m?h:d,2).attr({zIndex:1}).add(e.legendGroup),n=e.legendSymbol.getBBox(),e.toText=this.chart.renderer.text(e.toLabel,n.x+n.width+l,m?o:n.y+n.height-l).attr({zIndex:2}).add(e.legendGroup),r=e.toText.getBBox(),m?(t.offsetWidth=i.width+n.width+r.width+2*l+s,t.itemY=h+s):(t.offsetWidth=Math.max(i.width,r.width)+l+n.width+s,t.itemY=n.height+s,t.itemX=l)},getBox:function(t){var e=Number.MIN_VALUE,o=Number.MAX_VALUE,a=Number.MIN_VALUE,i=Number.MAX_VALUE;l(t||this.options.data,function(t){for(var n=t.path,r=n.length,l=!1,s=Number.MIN_VALUE,h=Number.MAX_VALUE,p=Number.MIN_VALUE,m=Number.MAX_VALUE;r--;)"number"!=typeof n[r]||isNaN(n[r])||(l?(s=Math.max(s,n[r]),h=Math.min(h,n[r])):(p=Math.max(p,n[r]),m=Math.min(m,n[r])),l=!l);t._maxX=s,t._minX=h,t._maxY=p,t._minY=m,e=Math.max(e,s),o=Math.min(o,h),a=Math.max(a,p),i=Math.min(i,m)}),this.minY=i,this.maxY=a,this.minX=o,this.maxX=e},translatePath:function(t){var e,o=this,a=!1,i=o.xAxis,n=o.yAxis;for(t=[].concat(t),e=t.length;e--;)"number"==typeof t[e]&&(a?t[e]=Math.round(i.translate(t[e])):t[e]=Math.round(n.len-n.translate(t[e])),a=!a);return t},setData:function(){t.Series.prototype.setData.apply(this,arguments),this.getBox()},translate:function(){var t=this,e=Number.MAX_VALUE,o=Number.MIN_VALUE;t.generatePoints(),l(t.data,function(a){a.shapeType="path",a.shapeArgs={d:t.translatePath(a.path)},"number"==typeof a.y&&(a.y>o?o=a.y:a.y=i)&&(n===o||x<=n)){d=m.color;break}}else h&&void 0!==x&&(u=1-(a-x)/(a-t),d=null===x?r.nullColor:e(i,n,u));d&&(l.color=null,l.options.color=d)})},drawGraph:f,drawDataLabels:f,drawPoints:function(){var e=this,o=e.xAxis,a=e.yAxis,i=e.colorKey;l(e.data,function(t){t.plotY=1,null===t[i]&&(t[i]=0,t.isNull=!0)}),c.column.prototype.drawPoints.apply(e),l(e.data,function(t){var e=t.dataLabels,n=o.toPixels(t._minX,!0),r=o.toPixels(t._maxX,!0),l=a.toPixels(t._minY,!0),s=a.toPixels(t._maxY,!0);t.plotX=Math.round(n+(r-n)*p(e&&e.anchorX,.5)),t.plotY=Math.round(l+(s-l)*p(e&&e.anchorY,.5)),t.isNull&&(t[i]=null)}),t.Series.prototype.drawDataLabels.call(e)},animateDrilldown:function(t){var e,o=this.chart.plotBox,a=this.chart.drilldownLevels[this.chart.drilldownLevels.length-1],i=a.bBox,n=this.chart.options.drilldown.animation;t||(e=Math.min(i.width/o.width,i.height/o.height),a.shapeArgs={scaleX:e,scaleY:e,translateX:i.x,translateY:i.y},l(this.points,function(t){t.graphic.attr(a.shapeArgs).animate({scaleX:1,scaleY:1,translateX:0,translateY:0},n)}),delete this.animate)},animateDrillupFrom:function(t){c.column.prototype.animateDrillupFrom.call(this,t)},animateDrillupTo:function(t){c.column.prototype.animateDrillupTo.call(this,t)}}),u.mapline=h(u.map,{lineWidth:1,backgroundColor:"none"}),c.mapline=t.extendClass(c.map,{type:"mapline",pointAttrToOptions:{stroke:"color","stroke-width":"lineWidth",fill:"backgroundColor"},drawLegendSymbol:c.line.prototype.drawLegendSymbol}),u.mappoint=h(u.scatter,{dataLabels:{enabled:!0,format:"{point.name}",color:"black",style:{textShadow:"0 0 5px white"}}}),c.mappoint=t.extendClass(c.scatter,{type:"mappoint"}),t.Map=function(e,o){var a,i={endOnTick:!1,gridLineWidth:0,labels:{enabled:!1},lineWidth:0,minPadding:0,maxPadding:0,startOnTick:!1,tickWidth:0,title:null};return a=e.series,e.series=null,e=h({chart:{type:"map",panning:"xy"},xAxis:i,yAxis:h(i,{reversed:!0})},e,{chart:{inverted:!1}}),e.series=a,new t.Chart(e,o)}}(Highcharts); \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/modules/no-data-to-display.js b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/modules/no-data-to-display.js new file mode 100644 index 0000000..6b40148 --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/modules/no-data-to-display.js @@ -0,0 +1,2 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + ;!function(t){function a(){return!!this.points.length}function o(){this.hasData()?this.hideNoData():this.showNoData()}var n=t.seriesTypes,e=t.Chart.prototype,i=t.getOptions(),s=t.extend;s(i.lang,{noData:"No data to display"}),i.noData={position:{x:0,y:0,align:"center",verticalAlign:"middle"},attr:{},style:{fontWeight:"bold",fontSize:"12px",color:"#60606a"}},n.pie.prototype.hasData=a,n.gauge&&(n.gauge.prototype.hasData=a),n.waterfall&&(n.waterfall.prototype.hasData=a),t.Series.prototype.hasData=function(){return void 0!==this.dataMax&&void 0!==this.dataMin},e.showNoData=function(t){var a=this.options,t=t||a.lang.noData,a=a.noData;this.noDataLabel||(this.noDataLabel=this.renderer.label(t,0,0,null,null,null,null,null,"no-data").attr(a.attr).css(a.style).add(),this.noDataLabel.align(s(this.noDataLabel.getBBox(),a.position),!1,"plotBox"))},e.hideNoData=function(){this.noDataLabel&&(this.noDataLabel=this.noDataLabel.destroy())},e.hasData=function(){for(var t=this.series,a=t.length;a--;)if(t[a].hasData()&&!t[a].options.isInternal)return!0;return!1},e.callbacks.push(function(a){t.addEvent(a,"load",o),t.addEvent(a,"redraw",o)})}(Highcharts); \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/modules/no-data-to-display.src.js b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/modules/no-data-to-display.src.js new file mode 100644 index 0000000..bbbcc8b --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/modules/no-data-to-display.src.js @@ -0,0 +1,2 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + ;!function(a){function t(){return!!this.points.length}function o(){var a=this;a.hasData()?a.hideNoData():a.showNoData()}var n=a.seriesTypes,e=a.Chart.prototype,i=a.getOptions(),l=a.extend;l(i.lang,{noData:"No data to display"}),i.noData={position:{x:0,y:0,align:"center",verticalAlign:"middle"},attr:{},style:{fontWeight:"bold",fontSize:"12px",color:"#60606a"}},n.pie.prototype.hasData=t,n.gauge&&(n.gauge.prototype.hasData=t),n.waterfall&&(n.waterfall.prototype.hasData=t),a.Series.prototype.hasData=function(){return void 0!==this.dataMax&&void 0!==this.dataMin},e.showNoData=function(a){var t=this,o=t.options,n=a||o.lang.noData,e=o.noData;t.noDataLabel||(t.noDataLabel=t.renderer.label(n,0,0,null,null,null,null,null,"no-data").attr(e.attr).css(e.style).add(),t.noDataLabel.align(l(t.noDataLabel.getBBox(),e.position),!1,"plotBox"))},e.hideNoData=function(){var a=this;a.noDataLabel&&(a.noDataLabel=a.noDataLabel.destroy())},e.hasData=function(){for(var a=this,t=a.series,o=t.length;o--;)if(t[o].hasData()&&!t[o].options.isInternal)return!0;return!1},e.callbacks.push(function(t){a.addEvent(t,"load",o),a.addEvent(t,"redraw",o)})}(Highcharts); \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/themes/dark-blue.js b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/themes/dark-blue.js new file mode 100644 index 0000000..b114d50 --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/themes/dark-blue.js @@ -0,0 +1,2 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + ;Highcharts.theme={colors:["#DDDF0D","#55BF3B","#DF5353","#7798BF","#aaeeee","#ff0066","#eeaaee","#55BF3B","#DF5353","#7798BF","#aaeeee"],chart:{backgroundColor:{linearGradient:{x1:0,y1:0,x2:1,y2:1},stops:[[0,"rgb(48, 48, 96)"],[1,"rgb(0, 0, 0)"]]},borderColor:"#000000",borderWidth:2,className:"dark-container",plotBackgroundColor:"rgba(255, 255, 255, .1)",plotBorderColor:"#CCCCCC",plotBorderWidth:1},title:{style:{color:"#C0C0C0",font:'bold 16px "Trebuchet MS", Verdana, sans-serif'}},subtitle:{style:{color:"#666666",font:'bold 12px "Trebuchet MS", Verdana, sans-serif'}},xAxis:{gridLineColor:"#333333",gridLineWidth:1,labels:{style:{color:"#A0A0A0"}},lineColor:"#A0A0A0",tickColor:"#A0A0A0",title:{style:{color:"#CCC",fontWeight:"bold",fontSize:"12px",fontFamily:"Trebuchet MS, Verdana, sans-serif"}}},yAxis:{gridLineColor:"#333333",labels:{style:{color:"#A0A0A0"}},lineColor:"#A0A0A0",minorTickInterval:null,tickColor:"#A0A0A0",tickWidth:1,title:{style:{color:"#CCC",fontWeight:"bold",fontSize:"12px",fontFamily:"Trebuchet MS, Verdana, sans-serif"}}},tooltip:{backgroundColor:"rgba(0, 0, 0, 0.75)",style:{color:"#F0F0F0"}},toolbar:{itemStyle:{color:"silver"}},plotOptions:{line:{dataLabels:{color:"#CCC"},marker:{lineColor:"#333"}},spline:{marker:{lineColor:"#333"}},scatter:{marker:{lineColor:"#333"}},candlestick:{lineColor:"white"}},legend:{itemStyle:{font:"9pt Trebuchet MS, Verdana, sans-serif",color:"#A0A0A0"},itemHoverStyle:{color:"#FFF"},itemHiddenStyle:{color:"#444"}},credits:{style:{color:"#666"}},labels:{style:{color:"#CCC"}},navigation:{buttonOptions:{symbolStroke:"#DDDDDD",hoverSymbolStroke:"#FFFFFF",theme:{fill:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[.4,"#606060"],[.6,"#333333"]]},stroke:"#000000"}}},rangeSelector:{buttonTheme:{fill:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[.4,"#888"],[.6,"#555"]]},stroke:"#000000",style:{color:"#CCC",fontWeight:"bold"},states:{hover:{fill:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[.4,"#BBB"],[.6,"#888"]]},stroke:"#000000",style:{color:"white"}},select:{fill:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[.1,"#000"],[.3,"#333"]]},stroke:"#000000",style:{color:"yellow"}}}},inputStyle:{backgroundColor:"#333",color:"silver"},labelStyle:{color:"silver"}},navigator:{handles:{backgroundColor:"#666",borderColor:"#AAA"},outlineColor:"#CCC",maskFill:"rgba(16, 16, 16, 0.5)",series:{color:"#7798BF",lineColor:"#A6C7ED"}},scrollbar:{barBackgroundColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[.4,"#888"],[.6,"#555"]]},barBorderColor:"#CCC",buttonArrowColor:"#CCC",buttonBackgroundColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[.4,"#888"],[.6,"#555"]]},buttonBorderColor:"#CCC",rifleColor:"#FFF",trackBackgroundColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,"#000"],[1,"#333"]]},trackBorderColor:"#666"},legendBackgroundColor:"rgba(0, 0, 0, 0.5)",legendBackgroundColorSolid:"rgb(35, 35, 70)",dataLabelsColor:"#444",textColor:"#C0C0C0",maskColor:"rgba(255,255,255,0.3)"};var highchartsOptions=Highcharts.setOptions(Highcharts.theme); \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/themes/dark-green.js b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/themes/dark-green.js new file mode 100644 index 0000000..ff3e5fe --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/themes/dark-green.js @@ -0,0 +1,2 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + ;Highcharts.theme={colors:["#DDDF0D","#55BF3B","#DF5353","#7798BF","#aaeeee","#ff0066","#eeaaee","#55BF3B","#DF5353","#7798BF","#aaeeee"],chart:{backgroundColor:{linearGradient:[0,0,250,500],stops:[[0,"rgb(48, 96, 48)"],[1,"rgb(0, 0, 0)"]]},borderColor:"#000000",borderWidth:2,className:"dark-container",plotBackgroundColor:"rgba(255, 255, 255, .1)",plotBorderColor:"#CCCCCC",plotBorderWidth:1},title:{style:{color:"#C0C0C0",font:'bold 16px "Trebuchet MS", Verdana, sans-serif'}},subtitle:{style:{color:"#666666",font:'bold 12px "Trebuchet MS", Verdana, sans-serif'}},xAxis:{gridLineColor:"#333333",gridLineWidth:1,labels:{style:{color:"#A0A0A0"}},lineColor:"#A0A0A0",tickColor:"#A0A0A0",title:{style:{color:"#CCC",fontWeight:"bold",fontSize:"12px",fontFamily:"Trebuchet MS, Verdana, sans-serif"}}},yAxis:{gridLineColor:"#333333",labels:{style:{color:"#A0A0A0"}},lineColor:"#A0A0A0",minorTickInterval:null,tickColor:"#A0A0A0",tickWidth:1,title:{style:{color:"#CCC",fontWeight:"bold",fontSize:"12px",fontFamily:"Trebuchet MS, Verdana, sans-serif"}}},tooltip:{backgroundColor:"rgba(0, 0, 0, 0.75)",style:{color:"#F0F0F0"}},toolbar:{itemStyle:{color:"silver"}},plotOptions:{line:{dataLabels:{color:"#CCC"},marker:{lineColor:"#333"}},spline:{marker:{lineColor:"#333"}},scatter:{marker:{lineColor:"#333"}},candlestick:{lineColor:"white"}},legend:{itemStyle:{font:"9pt Trebuchet MS, Verdana, sans-serif",color:"#A0A0A0"},itemHoverStyle:{color:"#FFF"},itemHiddenStyle:{color:"#444"}},credits:{style:{color:"#666"}},labels:{style:{color:"#CCC"}},navigation:{buttonOptions:{symbolStroke:"#DDDDDD",hoverSymbolStroke:"#FFFFFF",theme:{fill:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[.4,"#606060"],[.6,"#333333"]]},stroke:"#000000"}}},rangeSelector:{buttonTheme:{fill:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[.4,"#888"],[.6,"#555"]]},stroke:"#000000",style:{color:"#CCC",fontWeight:"bold"},states:{hover:{fill:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[.4,"#BBB"],[.6,"#888"]]},stroke:"#000000",style:{color:"white"}},select:{fill:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[.1,"#000"],[.3,"#333"]]},stroke:"#000000",style:{color:"yellow"}}}},inputStyle:{backgroundColor:"#333",color:"silver"},labelStyle:{color:"silver"}},navigator:{handles:{backgroundColor:"#666",borderColor:"#AAA"},outlineColor:"#CCC",maskFill:"rgba(16, 16, 16, 0.5)",series:{color:"#7798BF",lineColor:"#A6C7ED"}},scrollbar:{barBackgroundColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[.4,"#888"],[.6,"#555"]]},barBorderColor:"#CCC",buttonArrowColor:"#CCC",buttonBackgroundColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[.4,"#888"],[.6,"#555"]]},buttonBorderColor:"#CCC",rifleColor:"#FFF",trackBackgroundColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,"#000"],[1,"#333"]]},trackBorderColor:"#666"},legendBackgroundColor:"rgba(0, 0, 0, 0.5)",legendBackgroundColorSolid:"rgb(35, 35, 70)",dataLabelsColor:"#444",textColor:"#C0C0C0",maskColor:"rgba(255,255,255,0.3)"};var highchartsOptions=Highcharts.setOptions(Highcharts.theme); \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/themes/gray.js b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/themes/gray.js new file mode 100644 index 0000000..d65bc30 --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/themes/gray.js @@ -0,0 +1,2 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + ;Highcharts.theme={colors:["#DDDF0D","#7798BF","#55BF3B","#DF5353","#aaeeee","#ff0066","#eeaaee","#55BF3B","#DF5353","#7798BF","#aaeeee"],chart:{backgroundColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,"rgb(96, 96, 96)"],[1,"rgb(16, 16, 16)"]]},borderWidth:0,borderRadius:15,plotBackgroundColor:null,plotShadow:!1,plotBorderWidth:0},title:{style:{color:"#FFF",font:"16px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif"}},subtitle:{style:{color:"#DDD",font:"12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif"}},xAxis:{gridLineWidth:0,lineColor:"#999",tickColor:"#999",labels:{style:{color:"#999",fontWeight:"bold"}},title:{style:{color:"#AAA",font:"bold 12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif"}}},yAxis:{alternateGridColor:null,minorTickInterval:null,gridLineColor:"rgba(255, 255, 255, .1)",minorGridLineColor:"rgba(255,255,255,0.07)",lineWidth:0,tickWidth:0,labels:{style:{color:"#999",fontWeight:"bold"}},title:{style:{color:"#AAA",font:"bold 12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif"}}},legend:{itemStyle:{color:"#CCC"},itemHoverStyle:{color:"#FFF"},itemHiddenStyle:{color:"#333"}},labels:{style:{color:"#CCC"}},tooltip:{backgroundColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,"rgba(96, 96, 96, .8)"],[1,"rgba(16, 16, 16, .8)"]]},borderWidth:0,style:{color:"#FFF"}},plotOptions:{series:{shadow:!0},line:{dataLabels:{color:"#CCC"},marker:{lineColor:"#333"}},spline:{marker:{lineColor:"#333"}},scatter:{marker:{lineColor:"#333"}},candlestick:{lineColor:"white"}},toolbar:{itemStyle:{color:"#CCC"}},navigation:{buttonOptions:{symbolStroke:"#DDDDDD",hoverSymbolStroke:"#FFFFFF",theme:{fill:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[.4,"#606060"],[.6,"#333333"]]},stroke:"#000000"}}},rangeSelector:{buttonTheme:{fill:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[.4,"#888"],[.6,"#555"]]},stroke:"#000000",style:{color:"#CCC",fontWeight:"bold"},states:{hover:{fill:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[.4,"#BBB"],[.6,"#888"]]},stroke:"#000000",style:{color:"white"}},select:{fill:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[.1,"#000"],[.3,"#333"]]},stroke:"#000000",style:{color:"yellow"}}}},inputStyle:{backgroundColor:"#333",color:"silver"},labelStyle:{color:"silver"}},navigator:{handles:{backgroundColor:"#666",borderColor:"#AAA"},outlineColor:"#CCC",maskFill:"rgba(16, 16, 16, 0.5)",series:{color:"#7798BF",lineColor:"#A6C7ED"}},scrollbar:{barBackgroundColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[.4,"#888"],[.6,"#555"]]},barBorderColor:"#CCC",buttonArrowColor:"#CCC",buttonBackgroundColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[.4,"#888"],[.6,"#555"]]},buttonBorderColor:"#CCC",rifleColor:"#FFF",trackBackgroundColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,"#000"],[1,"#333"]]},trackBorderColor:"#666"},legendBackgroundColor:"rgba(48, 48, 48, 0.8)",legendBackgroundColorSolid:"rgb(70, 70, 70)",dataLabelsColor:"#444",textColor:"#E0E0E0",maskColor:"rgba(255,255,255,0.3)"};var highchartsOptions=Highcharts.setOptions(Highcharts.theme); \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/themes/grid.js b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/themes/grid.js new file mode 100644 index 0000000..2483e86 --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/themes/grid.js @@ -0,0 +1,2 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + ;Highcharts.theme={colors:["#058DC7","#50B432","#ED561B","#DDDF00","#24CBE5","#64E572","#FF9655","#FFF263","#6AF9C4"],chart:{backgroundColor:{linearGradient:{x1:0,y1:0,x2:1,y2:1},stops:[[0,"rgb(255, 255, 255)"],[1,"rgb(240, 240, 255)"]]},borderWidth:2,plotBackgroundColor:"rgba(255, 255, 255, .9)",plotShadow:!0,plotBorderWidth:1},title:{style:{color:"#000",font:'bold 16px "Trebuchet MS", Verdana, sans-serif'}},subtitle:{style:{color:"#666666",font:'bold 12px "Trebuchet MS", Verdana, sans-serif'}},xAxis:{gridLineWidth:1,lineColor:"#000",tickColor:"#000",labels:{style:{color:"#000",font:"11px Trebuchet MS, Verdana, sans-serif"}},title:{style:{color:"#333",fontWeight:"bold",fontSize:"12px",fontFamily:"Trebuchet MS, Verdana, sans-serif"}}},yAxis:{minorTickInterval:"auto",lineColor:"#000",lineWidth:1,tickWidth:1,tickColor:"#000",labels:{style:{color:"#000",font:"11px Trebuchet MS, Verdana, sans-serif"}},title:{style:{color:"#333",fontWeight:"bold",fontSize:"12px",fontFamily:"Trebuchet MS, Verdana, sans-serif"}}},legend:{itemStyle:{font:"9pt Trebuchet MS, Verdana, sans-serif",color:"black"},itemHoverStyle:{color:"#039"},itemHiddenStyle:{color:"gray"}},labels:{style:{color:"#99b"}},navigation:{buttonOptions:{theme:{stroke:"#CCCCCC"}}}};var highchartsOptions=Highcharts.setOptions(Highcharts.theme); \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/themes/skies.js b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/themes/skies.js new file mode 100644 index 0000000..7b83ceb --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/highcharts/themes/skies.js @@ -0,0 +1,2 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + ;Highcharts.theme={colors:["#514F78","#42A07B","#9B5E4A","#72727F","#1F949A","#82914E","#86777F","#42A07B"],chart:{className:"skies",borderWidth:0,plotShadow:!0,plotBackgroundImage:"http://www.highcharts.com/demo/gfx/skies.jpg",plotBackgroundColor:{linearGradient:[0,0,250,500],stops:[[0,"rgba(255, 255, 255, 1)"],[1,"rgba(255, 255, 255, 0)"]]},plotBorderWidth:1},title:{style:{color:"#3E576F",font:"16px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif"}},subtitle:{style:{color:"#6D869F",font:"12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif"}},xAxis:{gridLineWidth:0,lineColor:"#C0D0E0",tickColor:"#C0D0E0",labels:{style:{color:"#666",fontWeight:"bold"}},title:{style:{color:"#666",font:"12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif"}}},yAxis:{alternateGridColor:"rgba(255, 255, 255, .5)",lineColor:"#C0D0E0",tickColor:"#C0D0E0",tickWidth:1,labels:{style:{color:"#666",fontWeight:"bold"}},title:{style:{color:"#666",font:"12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif"}}},legend:{itemStyle:{font:"9pt Trebuchet MS, Verdana, sans-serif",color:"#3E576F"},itemHoverStyle:{color:"black"},itemHiddenStyle:{color:"silver"}},labels:{style:{color:"#3E576F"}}};var highchartsOptions=Highcharts.setOptions(Highcharts.theme); \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/jquery-1.10.2.js b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/jquery-1.10.2.js new file mode 100644 index 0000000..a84a8e4 --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/jquery-1.10.2.js @@ -0,0 +1,4 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + ;!function(e,t){function n(e){var t=e.length,n=ce.type(e);return!ce.isWindow(e)&&(!(1!==e.nodeType||!t)||("array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)))}function r(e){var t=ke[e]={};return ce.each(e.match(pe)||[],function(e,n){t[n]=!0}),t}function i(e,n,r,i){if(ce.acceptData(e)){var o,a,s=ce.expando,u=e.nodeType,l=u?ce.cache:e,c=u?e[s]:e[s]&&s;if(c&&l[c]&&(i||l[c].data)||r!==t||"string"!=typeof n)return c||(c=u?e[s]=te.pop()||ce.guid++:s),l[c]||(l[c]=u?{}:{toJSON:ce.noop}),"object"!=typeof n&&"function"!=typeof n||(i?l[c]=ce.extend(l[c],n):l[c].data=ce.extend(l[c].data,n)),a=l[c],i||(a.data||(a.data={}),a=a.data),r!==t&&(a[ce.camelCase(n)]=r),"string"==typeof n?(o=a[n],null==o&&(o=a[ce.camelCase(n)])):o=a,o}}function o(e,t,n){if(ce.acceptData(e)){var r,i,o=e.nodeType,a=o?ce.cache:e,u=o?e[ce.expando]:ce.expando;if(a[u]){if(t&&(r=n?a[u]:a[u].data)){ce.isArray(t)?t=t.concat(ce.map(t,ce.camelCase)):t in r?t=[t]:(t=ce.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;for(;i--;)delete r[t[i]];if(n?!s(r):!ce.isEmptyObject(r))return}(n||(delete a[u].data,s(a[u])))&&(o?ce.cleanData([e],!0):ce.support.deleteExpando||a!=a.window?delete a[u]:a[u]=null)}}}function a(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(Se,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r||"false"!==r&&("null"===r?null:+r+""===r?+r:Ee.test(r)?ce.parseJSON(r):r)}catch(o){}ce.data(e,n,r)}else r=t}return r}function s(e){var t;for(t in e)if(("data"!==t||!ce.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function u(){return!0}function l(){return!1}function c(){try{return G.activeElement}catch(e){}}function f(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function p(e,t,n){if(ce.isFunction(t))return ce.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return ce.grep(e,function(e){return e===t!==n});if("string"==typeof t){if($e.test(t))return ce.filter(t,e,n);t=ce.filter(t,e)}return ce.grep(e,function(e){return ce.inArray(e,t)>=0!==n})}function d(e){var t=Ue.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function h(e,t){return ce.nodeName(e,"table")&&ce.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function g(e){return e.type=(null!==ce.find.attr(e,"type"))+"/"+e.type,e}function m(e){var t=it.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function y(e,t){for(var n,r=0;null!=(n=e[r]);r++)ce._data(n,"globalEval",!t||ce._data(t[r],"globalEval"))}function v(e,t){if(1===t.nodeType&&ce.hasData(e)){var n,r,i,o=ce._data(e),a=ce._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;r").css("cssText","display:block !important")).appendTo(t.documentElement),t=(lt[0].contentWindow||lt[0].contentDocument).document,t.write(""),t.close(),n=j(e,t),lt.detach()),xt[e]=n),n}function j(e,t){var n=ce(t.createElement(e)).appendTo(t.body),r=ce.css(n[0],"display");return n.remove(),r}function D(e,t,n,r){var i;if(ce.isArray(t))ce.each(t,function(t,i){n||Et.test(e)?r(e,i):D(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==ce.type(t))r(e,t);else for(i in t)D(e+"["+i+"]",t[i],n,r)}function L(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(pe)||[];if(ce.isFunction(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function H(e,t,n,r){function i(s){var u;return o[s]=!0,ce.each(e[s]||[],function(e,s){var l=s(t,n,r);return"string"!=typeof l||a||o[l]?a?!(u=l):void 0:(t.dataTypes.unshift(l),i(l),!1)}),u}var o={},a=e===It;return i(t.dataTypes[0])||!o["*"]&&i("*")}function q(e,n){var r,i,o=ce.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((o[i]?e:r||(r={}))[i]=n[i]);return r&&ce.extend(!0,e,r),e}function _(e,n,r){for(var i,o,a,s,u=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),o===t&&(o=e.mimeType||n.getResponseHeader("Content-Type"));if(o)for(s in u)if(u[s]&&u[s].test(o)){l.unshift(s);break}if(l[0]in r)a=l[0];else{for(s in r){if(!l[0]||e.converters[s+" "+l[0]]){a=s;break}i||(i=s)}a=a||i}if(a)return a!==l[0]&&l.unshift(a),r[a]}function M(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(a=l[u+" "+o]||l["* "+o],!a)for(i in l)if(s=i.split(" "),s[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){a===!0?a=l[i]:l[i]!==!0&&(o=s[0],c.unshift(s[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(f){return{state:"parsererror",error:a?f:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}function O(){try{return new e.XMLHttpRequest}catch(t){}}function F(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function B(){return setTimeout(function(){Kt=t}),Kt=ce.now()}function P(e,t,n){for(var r,i=(on[t]||[]).concat(on["*"]),o=0,a=i.length;o)[^>]*|#([\w-]*))$/,ge=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,me=/^[\],:{}\s]*$/,ye=/(?:^|:|,)(?:\s*\[)+/g,ve=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,be=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,xe=/^-ms-/,we=/-([\da-z])/gi,Te=function(e,t){return t.toUpperCase()},Ce=function(e){(G.addEventListener||"load"===e.type||"complete"===G.readyState)&&(Ne(),ce.ready())},Ne=function(){G.addEventListener?(G.removeEventListener("DOMContentLoaded",Ce,!1),e.removeEventListener("load",Ce,!1)):(G.detachEvent("onreadystatechange",Ce),e.detachEvent("onload",Ce))};ce.fn=ce.prototype={jquery:ne,constructor:ce,init:function(e,n,r){var i,o;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:he.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof ce?n[0]:n,ce.merge(this,ce.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:G,!0)),ge.test(i[1])&&ce.isPlainObject(n))for(i in n)ce.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(o=G.getElementById(i[2]),o&&o.parentNode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=G,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):ce.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),ce.makeArray(e,this))},selector:"",length:0,toArray:function(){return oe.call(this)},get:function(e){return null==e?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e){var t=ce.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return ce.each(this,e,t)},ready:function(e){return ce.ready.promise().done(e),this},slice:function(){return this.pushStack(oe.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n0||(U.resolveWith(G,[ce]),ce.fn.trigger&&ce(G).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===ce.type(e)},isArray:Array.isArray||function(e){return"array"===ce.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?String(e):"object"==typeof e||"function"==typeof e?ee[se.call(e)]||"object":typeof e},isPlainObject:function(e){var n;if(!e||"object"!==ce.type(e)||e.nodeType||ce.isWindow(e))return!1;try{if(e.constructor&&!ue.call(e,"constructor")&&!ue.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(r){return!1}if(ce.support.ownLast)for(n in e)return ue.call(e,n);for(n in e);return n===t||ue.call(e,n)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw new Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||G;var r=ge.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=ce.buildFragment([e],t,i),i&&ce(i).remove(),ce.merge([],r.childNodes))},parseJSON:function(t){return e.JSON&&e.JSON.parse?e.JSON.parse(t):null===t?t:"string"==typeof t&&(t=ce.trim(t),t&&me.test(t.replace(ve,"@").replace(be,"]").replace(ye,"")))?new Function("return "+t)():void ce.error("Invalid JSON: "+t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||ce.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&ce.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(xe,"ms-").replace(we,Te)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,r){var i,o=0,a=e.length,s=n(e);if(r){if(s)for(;ok.cacheLength&&delete e[t.shift()],e[n]=r}var t=[];return e}function i(e){return e[P]=!0,e}function o(e){var t=H.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function a(e,t){for(var n=e.split("|"),r=e.length;r--;)k.attrHandle[n[r]]=t}function s(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||J)-(~e.sourceIndex||J);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function u(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function l(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function c(e){return i(function(t){return t=+t,i(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function f(){}function p(e,t){var r,i,o,a,s,u,l,c=z[e+" "];if(c)return t?0:c.slice(0);for(s=e,u=[],l=k.preFilter;s;){r&&!(i=fe.exec(s))||(i&&(s=s.slice(i[0].length)||s),u.push(o=[])),r=!1,(i=pe.exec(s))&&(r=i.shift(),o.push({value:r,type:i[0].replace(le," ")}),s=s.slice(r.length));for(a in k.filter)!(i=ye[a].exec(s))||l[a]&&!(i=l[a](i))||(r=i.shift(),o.push({value:r,type:a,matches:i}),s=s.slice(r.length));if(!r)break}return t?s.length:s?n.error(e):z(e,u).slice(0)}function d(e){for(var t=0,n=e.length,r="";t1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function m(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s-1&&(i[l]=!(a[l]=f))}}else v=m(v===a?v.splice(h,v.length):v),o?o(null,a,v,u):ee.apply(a,v)})}function v(e){for(var t,n,r,i=e.length,o=k.relative[e[0].type],a=o||k.relative[" "],s=o?1:0,u=h(function(e){return e===t},a,!0),l=h(function(e){return ne.call(t,e)>-1},a,!0),c=[function(e,n,r){return!o&&(r||n!==j)||((t=n).nodeType?u(e,n,r):l(e,n,r))}];s1&&g(c),s>1&&d(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(le,"$1"),n,s0,a=e.length>0,s=function(i,s,u,l,c){var f,p,d,h=[],g=0,y="0",v=i&&[],b=null!=c,x=j,w=i||a&&k.find.TAG("*",c&&s.parentNode||s),T=W+=null==x?1:Math.random()||.1;for(b&&(j=s!==H&&s,N=r);null!=(f=w[y]);y++){if(a&&f){for(p=0;d=e[p++];)if(d(f,s,u)){l.push(f);break}b&&(W=T,N=++r)}o&&((f=!d&&f)&&g--,i&&v.push(f))}if(g+=y,o&&y!==g){for(p=0;d=t[p++];)d(v,h,s,u);if(i){if(g>0)for(;y--;)v[y]||h[y]||(h[y]=K.call(l));h=m(h)}ee.apply(l,h),b&&!i&&h.length>0&&g+t.length>1&&n.uniqueSort(l)}return b&&(W=T,j=x),v};return o?i(s):s}function x(e,t,r){for(var i=0,o=t.length;i2&&"ID"===(a=o[0]).type&&C.getById&&9===t.nodeType&&_&&k.relative[o[1].type]){if(t=(k.find.ID(a.matches[0].replace(Ce,Ne),t)||[])[0],!t)return n;e=e.slice(o.shift().value.length)}for(i=ye.needsContext.test(e)?0:o.length;i--&&(a=o[i],!k.relative[s=a.type]);)if((u=k.find[s])&&(r=u(a.matches[0].replace(Ce,Ne),de.test(o[0].type)&&t.parentNode||t))){if(o.splice(i,1),e=r.length&&d(o),!e)return ee.apply(n,r),n;break}}return A(e,l)(r,t,!_,n,de.test(e)),n}var T,C,N,k,E,S,A,j,D,L,H,q,_,M,O,F,B,P="sizzle"+-new Date,R=e.document,W=0,$=0,I=r(),z=r(),X=r(),U=!1,V=function(e,t){return e===t?(U=!0,0):0},Y=typeof t,J=1<<31,G={}.hasOwnProperty,Q=[],K=Q.pop,Z=Q.push,ee=Q.push,te=Q.slice,ne=Q.indexOf||function(e){for(var t=0,n=this.length;t+~]|"+ie+")"+ie+"*"),de=new RegExp(ie+"*[+~]"),he=new RegExp("="+ie+"*([^\\]'\"]*)"+ie+"*\\]","g"),ge=new RegExp(ue),me=new RegExp("^"+ae+"$"),ye={ID:new RegExp("^#("+oe+")"),CLASS:new RegExp("^\\.("+oe+")"),TAG:new RegExp("^("+oe.replace("w","w*")+")"),ATTR:new RegExp("^"+se),PSEUDO:new RegExp("^"+ue),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ie+"*(even|odd|(([+-]|)(\\d*)n|)"+ie+"*(?:([+-]|)"+ie+"*(\\d+)|))"+ie+"*\\)|)","i"),bool:new RegExp("^(?:"+re+")$","i"),needsContext:new RegExp("^"+ie+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ie+"*((?:-\\d)?\\d*)"+ie+"*\\)|)(?=[^-]|$)","i")},ve=/^[^{]+\{\s*\[native \w/,be=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,xe=/^(?:input|select|textarea|button)$/i,we=/^h\d$/i,Te=/'|\\/g,Ce=new RegExp("\\\\([\\da-f]{1,6}"+ie+"?|("+ie+")|.)","ig"),Ne=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)};try{ee.apply(Q=te.call(R.childNodes),R.childNodes),Q[R.childNodes.length].nodeType}catch(ke){ee={apply:Q.length?function(e,t){Z.apply(e,te.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}S=n.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},C=n.support={},L=n.setDocument=function(e){var t=e?e.ownerDocument||e:R,n=t.defaultView;return t!==H&&9===t.nodeType&&t.documentElement?(H=t,q=t.documentElement,_=!S(t),n&&n.attachEvent&&n!==n.top&&n.attachEvent("onbeforeunload",function(){L()}),C.attributes=o(function(e){return e.className="i",!e.getAttribute("className")}),C.getElementsByTagName=o(function(e){return e.appendChild(t.createComment("")),!e.getElementsByTagName("*").length}),C.getElementsByClassName=o(function(e){return e.innerHTML="
            ",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),C.getById=o(function(e){return q.appendChild(e).id=P,!t.getElementsByName||!t.getElementsByName(P).length}),C.getById?(k.find.ID=function(e,t){if(typeof t.getElementById!==Y&&_){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},k.filter.ID=function(e){var t=e.replace(Ce,Ne);return function(e){return e.getAttribute("id")===t}}):(delete k.find.ID,k.filter.ID=function(e){var t=e.replace(Ce,Ne);return function(e){var n=typeof e.getAttributeNode!==Y&&e.getAttributeNode("id");return n&&n.value===t}}),k.find.TAG=C.getElementsByTagName?function(e,t){if(typeof t.getElementsByTagName!==Y)return t.getElementsByTagName(e)}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},k.find.CLASS=C.getElementsByClassName&&function(e,t){if(typeof t.getElementsByClassName!==Y&&_)return t.getElementsByClassName(e)},O=[],M=[],(C.qsa=ve.test(t.querySelectorAll))&&(o(function(e){e.innerHTML="",e.querySelectorAll("[selected]").length||M.push("\\["+ie+"*(?:value|"+re+")"),e.querySelectorAll(":checked").length||M.push(":checked")}),o(function(e){var n=t.createElement("input");n.setAttribute("type","hidden"),e.appendChild(n).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&M.push("[*^$]="+ie+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||M.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),M.push(",.*:")})),(C.matchesSelector=ve.test(F=q.webkitMatchesSelector||q.mozMatchesSelector||q.oMatchesSelector||q.msMatchesSelector))&&o(function(e){C.disconnectedMatch=F.call(e,"div"),F.call(e,"[s!='']:x"),O.push("!=",ue)}),M=M.length&&new RegExp(M.join("|")),O=O.length&&new RegExp(O.join("|")),B=ve.test(q.contains)||q.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},V=q.compareDocumentPosition?function(e,n){if(e===n)return U=!0,0;var r=n.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(n);return r?1&r||!C.sortDetached&&n.compareDocumentPosition(e)===r?e===t||B(R,e)?-1:n===t||B(R,n)?1:D?ne.call(D,e)-ne.call(D,n):0:4&r?-1:1:e.compareDocumentPosition?-1:1}:function(e,n){var r,i=0,o=e.parentNode,a=n.parentNode,u=[e],l=[n];if(e===n)return U=!0,0;if(!o||!a)return e===t?-1:n===t?1:o?-1:a?1:D?ne.call(D,e)-ne.call(D,n):0;if(o===a)return s(e,n);for(r=e;r=r.parentNode;)u.unshift(r);for(r=n;r=r.parentNode;)l.unshift(r);for(;u[i]===l[i];)i++;return i?s(u[i],l[i]):u[i]===R?-1:l[i]===R?1:0},t):H},n.matches=function(e,t){return n(e,null,null,t)},n.matchesSelector=function(e,t){if((e.ownerDocument||e)!==H&&L(e),t=t.replace(he,"='$1']"),C.matchesSelector&&_&&(!O||!O.test(t))&&(!M||!M.test(t)))try{var r=F.call(e,t);if(r||C.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(i){}return n(t,H,null,[e]).length>0},n.contains=function(e,t){return(e.ownerDocument||e)!==H&&L(e),B(e,t)},n.attr=function(e,n){(e.ownerDocument||e)!==H&&L(e);var r=k.attrHandle[n.toLowerCase()],i=r&&G.call(k.attrHandle,n.toLowerCase())?r(e,n,!_):t;return i===t?C.attributes||!_?e.getAttribute(n):(i=e.getAttributeNode(n))&&i.specified?i.value:null:i},n.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},n.uniqueSort=function(e){var t,n=[],r=0,i=0;if(U=!C.detectDuplicates,D=!C.sortStable&&e.slice(0),e.sort(V),U){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return e},E=n.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=E(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=E(t);return n},k=n.selectors={cacheLength:50,createPseudo:i,match:ye,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Ce,Ne),e[3]=(e[4]||e[5]||"").replace(Ce,Ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||n.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&n.error(e[0]),e},PSEUDO:function(e){var n,r=!e[5]&&e[2];return ye.CHILD.test(e[0])?null:(e[3]&&e[4]!==t?e[2]=e[4]:r&&ge.test(r)&&(n=p(r,!0))&&(n=r.indexOf(")",r.length-n)-r.length)&&(e[0]=e[0].slice(0,n),e[2]=r.slice(0,n)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Ce,Ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=I[e+" "];return t||(t=new RegExp("(^|"+ie+")"+e+"("+ie+"|$)"))&&I(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==Y&&e.getAttribute("class")||"")})},ATTR:function(e,t,r){return function(i){var o=n.attr(i,e);return null==o?"!="===t:!t||(o+="","="===t?o===r:"!="===t?o!==r:"^="===t?r&&0===o.indexOf(r):"*="===t?r&&o.indexOf(r)>-1:"$="===t?r&&o.slice(-r.length)===r:"~="===t?(" "+o+" ").indexOf(r)>-1:"|="===t&&(o===r||o.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){ +return!!e.parentNode}:function(t,n,u){var l,c,f,p,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!u&&!s;if(m){if(o){for(;g;){for(f=t;f=f[g];)if(s?f.nodeName.toLowerCase()===y:1===f.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){for(c=m[P]||(m[P]={}),l=c[e]||[],d=l[0]===W&&l[1],p=l[0]===W&&l[2],f=d&&m.childNodes[d];f=++d&&f&&f[g]||(p=d=0)||h.pop();)if(1===f.nodeType&&++p&&f===t){c[e]=[W,d,p];break}}else if(v&&(l=(t[P]||(t[P]={}))[e])&&l[0]===W)p=l[1];else for(;(f=++d&&f&&f[g]||(p=d=0)||h.pop())&&((s?f.nodeName.toLowerCase()!==y:1!==f.nodeType)||!++p||(v&&((f[P]||(f[P]={}))[e]=[W,p]),f!==t)););return p-=i,p===r||p%r===0&&p/r>=0}}},PSEUDO:function(e,t){var r,o=k.pseudos[e]||k.setFilters[e.toLowerCase()]||n.error("unsupported pseudo: "+e);return o[P]?o(t):o.length>1?(r=[e,e,"",t],k.setFilters.hasOwnProperty(e.toLowerCase())?i(function(e,n){for(var r,i=o(e,t),a=i.length;a--;)r=ne.call(e,i[a]),e[r]=!(n[r]=i[a])}):function(e){return o(e,0,r)}):o}},pseudos:{not:i(function(e){var t=[],n=[],r=A(e.replace(le,"$1"));return r[P]?i(function(e,t,n,i){for(var o,a=r(e,null,i,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:i(function(e){return function(t){return n(e,t).length>0}}),contains:i(function(e){return function(t){return(t.textContent||t.innerText||E(t)).indexOf(e)>-1}}),lang:i(function(e){return me.test(e||"")||n.error("unsupported lang: "+e),e=e.replace(Ce,Ne).toLowerCase(),function(t){var n;do if(n=_?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===q},focus:function(e){return e===H.activeElement&&(!H.hasFocus||H.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!k.pseudos.empty(e)},header:function(e){return we.test(e.nodeName)},input:function(e){return xe.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:c(function(){return[0]}),last:c(function(e,t){return[t-1]}),eq:c(function(e,t,n){return[n<0?n+t:n]}),even:c(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:c(function(e,t,n){for(var r=n<0?n+t:n;++r-1;)l.splice(r,1),n&&(r<=a&&a--,r<=s&&s--)}),this},has:function(e){return e?ce.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],a=0,this},disable:function(){return l=c=i=t,this},disabled:function(){return!l},lock:function(){return c=t,i||p.disable(),this},locked:function(){return!c},fireWith:function(e,t){return!l||o&&!c||(t=t||[],t=[e,t.slice?t.slice():t],n?c.push(t):f(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!o}};return p},ce.extend({Deferred:function(e){var t=[["resolve","done",ce.Callbacks("once memory"),"resolved"],["reject","fail",ce.Callbacks("once memory"),"rejected"],["notify","progress",ce.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return ce.Deferred(function(n){ce.each(t,function(t,o){var a=o[0],s=ce.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&ce.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?ce.extend(e,r):r}},i={};return r.pipe=r.then,ce.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t,n,r,i=0,o=oe.call(arguments),a=o.length,s=1!==a||e&&ce.isFunction(e.promise)?a:0,u=1===s?e:ce.Deferred(),l=function(e,n,r){return function(i){n[e]=this,r[e]=arguments.length>1?oe.call(arguments):i,r===t?u.notifyWith(n,r):--s||u.resolveWith(n,r)}};if(a>1)for(t=new Array(a),n=new Array(a),r=new Array(a);i
            a",n=f.getElementsByTagName("*")||[],r=f.getElementsByTagName("a")[0],!r||!r.style||!n.length)return t;o=G.createElement("select"),s=o.appendChild(G.createElement("option")),i=f.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t.getSetAttribute="t"!==f.className,t.leadingWhitespace=3===f.firstChild.nodeType,t.tbody=!f.getElementsByTagName("tbody").length,t.htmlSerialize=!!f.getElementsByTagName("link").length,t.style=/top/.test(r.getAttribute("style")),t.hrefNormalized="/a"===r.getAttribute("href"),t.opacity=/^0.5/.test(r.style.opacity),t.cssFloat=!!r.style.cssFloat,t.checkOn=!!i.value,t.optSelected=s.selected,t.enctype=!!G.createElement("form").enctype,t.html5Clone="<:nav>"!==G.createElement("nav").cloneNode(!0).outerHTML,t.inlineBlockNeedsLayout=!1,t.shrinkWrapBlocks=!1,t.pixelPosition=!1,t.deleteExpando=!0,t.noCloneEvent=!0,t.reliableMarginRight=!0,t.boxSizingReliable=!0,i.checked=!0,t.noCloneChecked=i.cloneNode(!0).checked,o.disabled=!0,t.optDisabled=!s.disabled;try{delete f.test}catch(p){t.deleteExpando=!1}i=G.createElement("input"),i.setAttribute("value",""),t.input=""===i.getAttribute("value"),i.value="t",i.setAttribute("type","radio"),t.radioValue="t"===i.value,i.setAttribute("checked","t"),i.setAttribute("name","t"),a=G.createDocumentFragment(),a.appendChild(i),t.appendChecked=i.checked,t.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,f.attachEvent&&(f.attachEvent("onclick",function(){t.noCloneEvent=!1}),f.cloneNode(!0).click());for(c in{submit:!0,change:!0,focusin:!0})f.setAttribute(u="on"+c,"t"),t[c+"Bubbles"]=u in e||f.attributes[u].expando===!1;f.style.backgroundClip="content-box",f.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===f.style.backgroundClip;for(c in ce(t))break;return t.ownLast="0"!==c,ce(function(){var n,r,i,o="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",a=G.getElementsByTagName("body")[0];a&&(n=G.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",a.appendChild(n).appendChild(f),f.innerHTML="
            t
            ",i=f.getElementsByTagName("td"),i[0].style.cssText="padding:0;margin:0;border:0;display:none",l=0===i[0].offsetHeight,i[0].style.display="",i[1].style.display="none",t.reliableHiddenOffsets=l&&0===i[0].offsetHeight,f.innerHTML="",f.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",ce.swap(a,null!=a.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===f.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(f,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(f,null)||{width:"4px"}).width,r=f.appendChild(G.createElement("div")),r.style.cssText=f.style.cssText=o,r.style.marginRight=r.style.width="0",f.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof f.style.zoom!==Y&&(f.innerHTML="",f.style.cssText=o+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===f.offsetWidth,f.style.display="block",f.innerHTML="
            ",f.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==f.offsetWidth,t.inlineBlockNeedsLayout&&(a.style.zoom=1)),a.removeChild(n),n=f=i=r=null)}),n=o=a=s=r=i=null,t}({});var Ee=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,Se=/([A-Z])/g;ce.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?ce.cache[e[ce.expando]]:e[ce.expando],!!e&&!s(e)},data:function(e,t,n){return i(e,t,n)},removeData:function(e,t){return o(e,t)},_data:function(e,t,n){return i(e,t,n,!0)},_removeData:function(e,t){return o(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&ce.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),ce.fn.extend({data:function(e,n){var r,i,o=null,s=0,u=this[0];if(e===t){if(this.length&&(o=ce.data(u),1===u.nodeType&&!ce._data(u,"parsedAttrs"))){for(r=u.attributes;s1?this.each(function(){ce.data(this,e,n)}):u?a(u,e,ce.data(u,e)):null},removeData:function(e){return this.each(function(){ce.removeData(this,e)})}}),ce.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=ce._data(e,t),n&&(!r||ce.isArray(n)?r=ce._data(e,t,ce.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=ce.queue(e,t),r=n.length,i=n.shift(),o=ce._queueHooks(e,t),a=function(){ce.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return ce._data(e,n)||ce._data(e,n,{empty:ce.Callbacks("once memory").add(function(){ce._removeData(e,t+"queue"),ce._removeData(e,n)})})}}),ce.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),arguments.length1)},removeAttr:function(e){return this.each(function(){ce.removeAttr(this,e)})},prop:function(e,t){return ce.access(this,ce.prop,e,t,arguments.length>1)},removeProp:function(e){return e=ce.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,u="string"==typeof e&&e;if(ce.isFunction(e))return this.each(function(t){ce(this).addClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(pe)||[];a=0;)r=r.replace(" "+i+" "," ");n.className=e?ce.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):ce.isFunction(e)?this.each(function(n){ce(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n)for(var t,r=0,i=ce(this),o=e.match(pe)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else n!==Y&&"boolean"!==n||(this.className&&ce._data(this,"__className__",this.className),this.className=this.className||e===!1?"":ce._data(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",n=0,r=this.length;n=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=ce.isFunction(e),this.each(function(n){var o;1===this.nodeType&&(o=i?e.call(this,n,ce(this).val()):e,null==o?o="":"number"==typeof o?o+="":ce.isArray(o)&&(o=ce.map(o,function(e){return null==e?"":e+""})),r=ce.valHooks[this.type]||ce.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=ce.valHooks[o.type]||ce.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(Le,""):null==n?"":n)}}}),ce.extend({valHooks:{option:{get:function(e){var t=ce.find.attr(e,"value");return null!=t?t:e.text}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||i<0,a=o?null:[],s=o?i+1:r.length,u=i<0?s:o?i:0;u=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}},attr:function(e,n,r){var i,o,a=e.nodeType;if(e&&3!==a&&8!==a&&2!==a)return typeof e.getAttribute===Y?ce.prop(e,n,r):(1===a&&ce.isXMLDoc(e)||(n=n.toLowerCase(),i=ce.attrHooks[n]||(ce.expr.match.bool.test(n)?je:Ae)),r===t?i&&"get"in i&&null!==(o=i.get(e,n))?o:(o=ce.find.attr(e,n),null==o?t:o):null!==r?i&&"set"in i&&(o=i.set(e,r,n))!==t?o:(e.setAttribute(n,r+""),r):void ce.removeAttr(e,n))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(pe);if(o&&1===e.nodeType)for(;n=o[i++];)r=ce.propFix[n]||n,ce.expr.match.bool.test(n)?Oe&&Me||!_e.test(n)?e[r]=!1:e[ce.camelCase("default-"+n)]=e[r]=!1:ce.attr(e,n,""),e.removeAttribute(Me?n:r)},attrHooks:{type:{set:function(e,t){if(!ce.support.radioValue&&"radio"===t&&ce.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!ce.isXMLDoc(e),a&&(n=ce.propFix[n]||n,o=ce.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var t=ce.find.attr(e,"tabindex");return t?parseInt(t,10):He.test(e.nodeName)||qe.test(e.nodeName)&&e.href?0:-1}}}}),je={set:function(e,t,n){return t===!1?ce.removeAttr(e,n):Oe&&Me||!_e.test(n)?e.setAttribute(!Me&&ce.propFix[n]||n,n):e[ce.camelCase("default-"+n)]=e[n]=!0,n}},ce.each(ce.expr.match.bool.source.match(/\w+/g),function(e,n){var r=ce.expr.attrHandle[n]||ce.find.attr;ce.expr.attrHandle[n]=Oe&&Me||!_e.test(n)?function(e,n,i){var o=ce.expr.attrHandle[n],a=i?t:(ce.expr.attrHandle[n]=t)!=r(e,n,i)?n.toLowerCase():null;return ce.expr.attrHandle[n]=o,a}:function(e,n,r){return r?t:e[ce.camelCase("default-"+n)]?n.toLowerCase():null}}),Oe&&Me||(ce.attrHooks.value={set:function(e,t,n){return ce.nodeName(e,"input")?void(e.defaultValue=t):Ae&&Ae.set(e,t,n)}}),Me||(Ae={set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},ce.expr.attrHandle.id=ce.expr.attrHandle.name=ce.expr.attrHandle.coords=function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&""!==i.value?i.value:null},ce.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&r.specified?r.value:t},set:Ae.set},ce.attrHooks.contenteditable={set:function(e,t,n){Ae.set(e,""!==t&&t,n)}},ce.each(["width","height"],function(e,t){ce.attrHooks[t]={set:function(e,n){if(""===n)return e.setAttribute(t,"auto"),n}}})),ce.support.hrefNormalized||ce.each(["href","src"],function(e,t){ce.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),ce.support.style||(ce.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),ce.support.optSelected||(ce.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),ce.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){ce.propFix[this.toLowerCase()]=this}),ce.support.enctype||(ce.propFix.enctype="encoding"),ce.each(["radio","checkbox"],function(){ce.valHooks[this]={set:function(e,t){if(ce.isArray(t))return e.checked=ce.inArray(ce(e).val(),t)>=0}},ce.support.checkOn||(ce.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Fe=/^(?:input|select|textarea)$/i,Be=/^key/,Pe=/^(?:mouse|contextmenu)|click/,Re=/^(?:focusinfocus|focusoutblur)$/,We=/^([^.]*)(?:\.(.+)|)$/;ce.event={global:{},add:function(e,n,r,i,o){var a,s,u,l,c,f,p,d,h,g,m,y=ce._data(e);if(y){for(r.handler&&(l=r,r=l.handler,o=l.selector),r.guid||(r.guid=ce.guid++),(s=y.events)||(s=y.events={}),(f=y.handle)||(f=y.handle=function(e){return typeof ce===Y||e&&ce.event.triggered===e.type?t:ce.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(pe)||[""],u=n.length;u--;)a=We.exec(n[u])||[],h=m=a[1],g=(a[2]||"").split(".").sort(),h&&(c=ce.event.special[h]||{},h=(o?c.delegateType:c.bindType)||h,c=ce.event.special[h]||{},p=ce.extend({type:h,origType:m,data:i,handler:r,guid:r.guid,selector:o,needsContext:o&&ce.expr.match.needsContext.test(o),namespace:g.join(".")},l),(d=s[h])||(d=s[h]=[],d.delegateCount=0,c.setup&&c.setup.call(e,i,g,f)!==!1||(e.addEventListener?e.addEventListener(h,f,!1):e.attachEvent&&e.attachEvent("on"+h,f))),c.add&&(c.add.call(e,p),p.handler.guid||(p.handler.guid=r.guid)),o?d.splice(d.delegateCount++,0,p):d.push(p),ce.event.global[h]=!0);e=null}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,m=ce.hasData(e)&&ce._data(e);if(m&&(c=m.events)){for(t=(t||"").match(pe)||[""],l=t.length;l--;)if(s=We.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){for(f=ce.event.special[d]||{},d=(r?f.delegateType:f.bindType)||d,p=c[d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),u=o=p.length;o--;)a=p[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(p.splice(o,1),a.selector&&p.delegateCount--,f.remove&&f.remove.call(e,a));u&&!p.length&&(f.teardown&&f.teardown.call(e,h,m.handle)!==!1||ce.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)ce.event.remove(e,d+t[l],n,r,!0);ce.isEmptyObject(c)&&(delete m.handle,ce._removeData(e,"events"))}},trigger:function(n,r,i,o){var a,s,u,l,c,f,p,d=[i||G],h=ue.call(n,"type")?n.type:n,g=ue.call(n,"namespace")?n.namespace.split("."):[];if(u=f=i=i||G,3!==i.nodeType&&8!==i.nodeType&&!Re.test(h+ce.event.triggered)&&(h.indexOf(".")>=0&&(g=h.split("."),h=g.shift(),g.sort()),s=h.indexOf(":")<0&&"on"+h,n=n[ce.expando]?n:new ce.Event(h,"object"==typeof n&&n),n.isTrigger=o?2:3,n.namespace=g.join("."),n.namespace_re=n.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:ce.makeArray(r,[n]),c=ce.event.special[h]||{},o||!c.trigger||c.trigger.apply(i,r)!==!1)){if(!o&&!c.noBubble&&!ce.isWindow(i)){for(l=c.delegateType||h,Re.test(l+h)||(u=u.parentNode);u;u=u.parentNode)d.push(u),f=u;f===(i.ownerDocument||G)&&d.push(f.defaultView||f.parentWindow||e)}for(p=0;(u=d[p++])&&!n.isPropagationStopped();)n.type=p>1?l:c.bindType||h,a=(ce._data(u,"events")||{})[n.type]&&ce._data(u,"handle"),a&&a.apply(u,r),a=s&&u[s],a&&ce.acceptData(u)&&a.apply&&a.apply(u,r)===!1&&n.preventDefault();if(n.type=h,!o&&!n.isDefaultPrevented()&&(!c._default||c._default.apply(d.pop(),r)===!1)&&ce.acceptData(i)&&s&&i[h]&&!ce.isWindow(i)){f=i[s],f&&(i[s]=null),ce.event.triggered=h;try{i[h]()}catch(m){}ce.event.triggered=t,f&&(i[s]=f)}return n.result}},dispatch:function(e){e=ce.event.fix(e);var n,r,i,o,a,s=[],u=oe.call(arguments),l=(ce._data(this,"events")||{})[e.type]||[],c=ce.event.special[e.type]||{};if(u[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){for(s=ce.event.handlers.call(this,e,l),n=0;(o=s[n++])&&!e.isPropagationStopped();)for(e.currentTarget=o.elem,a=0;(i=o.handlers[a++])&&!e.isImmediatePropagationStopped();)e.namespace_re&&!e.namespace_re.test(i.namespace)||(e.handleObj=i,e.data=i.data,r=((ce.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,u),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],u=n.delegateCount,l=e.target;if(u&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==e.type)){for(o=[],a=0;a=0:ce.find(r,this,null,[l]).length),o[r]&&o.push(i);o.length&&s.push({elem:l,handlers:o})}return u1?ce.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},has:function(e){var t,n=ce(e,this),r=n.length;return this.filter(function(){for(t=0;t-1:1===n.nodeType&&ce.find.matchesSelector(n,e))){n=o.push(n);break}return this.pushStack(o.length>1?ce.unique(o):o)},index:function(e){return e?"string"==typeof e?ce.inArray(this[0],ce(e)):ce.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?ce(e,t):ce.makeArray(e&&e.nodeType?[e]:e),r=ce.merge(this.get(),n);return this.pushStack(ce.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),ce.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return ce.dir(e,"parentNode")},parentsUntil:function(e,t,n){ +return ce.dir(e,"parentNode",n)},next:function(e){return f(e,"nextSibling")},prev:function(e){return f(e,"previousSibling")},nextAll:function(e){return ce.dir(e,"nextSibling")},prevAll:function(e){return ce.dir(e,"previousSibling")},nextUntil:function(e,t,n){return ce.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return ce.dir(e,"previousSibling",n)},siblings:function(e){return ce.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return ce.sibling(e.firstChild)},contents:function(e){return ce.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:ce.merge([],e.childNodes)}},function(e,t){ce.fn[e]=function(n,r){var i=ce.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=ce.filter(r,i)),this.length>1&&(Xe[e]||(i=ce.unique(i)),Ie.test(e)&&(i=i.reverse())),this.pushStack(i)}}),ce.extend({filter:function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?ce.find.matchesSelector(r,e)?[r]:[]:ce.find.matches(e,ce.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,n,r){for(var i=[],o=e[n];o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!ce(o).is(r));)1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});var Ue="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",Ve=/ jQuery\d+="(?:null|\d+)"/g,Ye=new RegExp("<(?:"+Ue+")[\\s/>]","i"),Je=/^\s+/,Ge=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Qe=/<([\w:]+)/,Ke=/\s*$/g,at={option:[1,""],legend:[1,"
            ","
            "],area:[1,"",""],param:[1,"",""],thead:[1,"","
            "],tr:[2,"","
            "],col:[2,"","
            "],td:[3,"","
            "],_default:ce.support.htmlSerialize?[0,"",""]:[1,"X
            ","
            "]},st=d(G),ut=st.appendChild(G.createElement("div"));at.optgroup=at.option,at.tbody=at.tfoot=at.colgroup=at.caption=at.thead,at.th=at.td,ce.fn.extend({text:function(e){return ce.access(this,function(e){return e===t?ce.text(this):this.empty().append((this[0]&&this[0].ownerDocument||G).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=h(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=h(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){for(var n,r=e?ce.filter(e,this):this,i=0;null!=(n=r[i]);i++)t||1!==n.nodeType||ce.cleanData(x(n)),n.parentNode&&(t&&ce.contains(n.ownerDocument,n)&&y(x(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&ce.cleanData(x(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&ce.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return ce.clone(this,e,t)})},html:function(e){return ce.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(Ve,""):t;if("string"==typeof e&&!et.test(e)&&(ce.support.htmlSerialize||!Ye.test(e))&&(ce.support.leadingWhitespace||!Je.test(e))&&!at[(Qe.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(Ge,"<$1>");try{for(;r")?o=e.cloneNode(!0):(ut.innerHTML=e.outerHTML,ut.removeChild(o=ut.firstChild)),!(ce.support.noCloneEvent&&ce.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||ce.isXMLDoc(e)))for(r=x(o),s=x(e),a=0;null!=(i=s[a]);++a)r[a]&&b(i,r[a]);if(t)if(n)for(s=s||x(e),r=r||x(o),a=0;null!=(i=s[a]);a++)v(i,r[a]);else v(e,o);return r=x(o,"script"),r.length>0&&y(r,!u&&x(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){for(var i,o,a,s,u,l,c,f=e.length,p=d(t),h=[],g=0;g")+c[2],i=c[0];i--;)s=s.lastChild;if(!ce.support.leadingWhitespace&&Je.test(o)&&h.push(t.createTextNode(Je.exec(o)[0])),!ce.support.tbody)for(o="table"!==u||Ke.test(o)?""!==c[1]||Ke.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;i--;)ce.nodeName(l=o.childNodes[i],"tbody")&&!l.childNodes.length&&o.removeChild(l);for(ce.merge(h,s.childNodes),s.textContent="";s.firstChild;)s.removeChild(s.firstChild);s=p.lastChild}else h.push(t.createTextNode(o));for(s&&p.removeChild(s),ce.support.appendChecked||ce.grep(x(h,"input"),w),g=0;o=h[g++];)if((!r||ce.inArray(o,r)===-1)&&(a=ce.contains(o.ownerDocument,o),s=x(p.appendChild(o),"script"),a&&y(s),n))for(i=0;o=s[i++];)rt.test(o.type||"")&&n.push(o);return s=null,p},cleanData:function(e,t){for(var n,r,i,o,a=0,s=ce.expando,u=ce.cache,l=ce.support.deleteExpando,c=ce.event.special;null!=(n=e[a]);a++)if((t||ce.acceptData(n))&&(i=n[s],o=i&&u[i])){if(o.events)for(r in o.events)c[r]?ce.event.remove(n,r):ce.removeEvent(n,r,o.handle);u[i]&&(delete u[i],l?delete n[s]:typeof n.removeAttribute!==Y?n.removeAttribute(s):n[s]=null,te.push(i))}},_evalUrl:function(e){return ce.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),ce.fn.extend({wrapAll:function(e){if(ce.isFunction(e))return this.each(function(t){ce(this).wrapAll(e.call(this,t))});if(this[0]){var t=ce(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return ce.isFunction(e)?this.each(function(t){ce(this).wrapInner(e.call(this,t))}):this.each(function(){var t=ce(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=ce.isFunction(e);return this.each(function(n){ce(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){ce.nodeName(this,"body")||ce(this).replaceWith(this.childNodes)}).end()}});var lt,ct,ft,pt=/alpha\([^)]*\)/i,dt=/opacity\s*=\s*([^)]*)/,ht=/^(top|right|bottom|left)$/,gt=/^(none|table(?!-c[ea]).+)/,mt=/^margin/,yt=new RegExp("^("+fe+")(.*)$","i"),vt=new RegExp("^("+fe+")(?!px)[a-z%]+$","i"),bt=new RegExp("^([+-])=("+fe+")","i"),xt={BODY:"block"},wt={position:"absolute",visibility:"hidden",display:"block"},Tt={letterSpacing:0,fontWeight:400},Ct=["Top","Right","Bottom","Left"],Nt=["Webkit","O","Moz","ms"];ce.fn.extend({css:function(e,n){return ce.access(this,function(e,n,r){var i,o,a={},s=0;if(ce.isArray(n)){for(o=ct(e),i=n.length;s1)},show:function(){return N(this,!0)},hide:function(){return N(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){C(this)?ce(this).show():ce(this).hide()})}}),ce.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=ft(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":ce.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,u=ce.camelCase(n),l=e.style;if(n=ce.cssProps[u]||(ce.cssProps[u]=T(l,u)),s=ce.cssHooks[n]||ce.cssHooks[u],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:l[n];if(a=typeof r,"string"===a&&(o=bt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(ce.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||ce.cssNumber[u]||(r+="px"),ce.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(l[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{l[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,u=ce.camelCase(n);return n=ce.cssProps[u]||(ce.cssProps[u]=T(e.style,u)),s=ce.cssHooks[n]||ce.cssHooks[u],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=ft(e,n,i)),"normal"===a&&n in Tt&&(a=Tt[n]),""===r||r?(o=parseFloat(a),r===!0||ce.isNumeric(o)?o||0:a):a}}),e.getComputedStyle?(ct=function(t){return e.getComputedStyle(t,null)},ft=function(e,n,r){var i,o,a,s=r||ct(e),u=s?s.getPropertyValue(n)||s[n]:t,l=e.style;return s&&(""!==u||ce.contains(e.ownerDocument,e)||(u=ce.style(e,n)),vt.test(u)&&mt.test(n)&&(i=l.width,o=l.minWidth,a=l.maxWidth,l.minWidth=l.maxWidth=l.width=u,u=s.width,l.width=i,l.minWidth=o,l.maxWidth=a)),u}):G.documentElement.currentStyle&&(ct=function(e){return e.currentStyle},ft=function(e,n,r){var i,o,a,s=r||ct(e),u=s?s[n]:t,l=e.style;return null==u&&l&&l[n]&&(u=l[n]),vt.test(u)&&!ht.test(n)&&(i=l.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),l.left="fontSize"===n?"1em":u,u=l.pixelLeft+"px",l.left=i,a&&(o.left=a)),""===u?"auto":u}),ce.each(["height","width"],function(e,t){ce.cssHooks[t]={get:function(e,n,r){if(n)return 0===e.offsetWidth&>.test(ce.css(e,"display"))?ce.swap(e,wt,function(){return S(e,t,r)}):S(e,t,r)},set:function(e,n,r){var i=r&&ct(e);return k(e,n,r?E(e,t,r,ce.support.boxSizing&&"border-box"===ce.css(e,"boxSizing",!1,i),i):0)}}}),ce.support.opacity||(ce.cssHooks.opacity={get:function(e,t){return dt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=ce.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===ce.trim(o.replace(pt,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=pt.test(o)?o.replace(pt,i):o+" "+i)}}),ce(function(){ce.support.reliableMarginRight||(ce.cssHooks.marginRight={get:function(e,t){if(t)return ce.swap(e,{display:"inline-block"},ft,[e,"marginRight"])}}),!ce.support.pixelPosition&&ce.fn.position&&ce.each(["top","left"],function(e,t){ce.cssHooks[t]={get:function(e,n){if(n)return n=ft(e,t),vt.test(n)?ce(e).position()[t]+"px":n}}})}),ce.expr&&ce.expr.filters&&(ce.expr.filters.hidden=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0||!ce.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||ce.css(e,"display"))},ce.expr.filters.visible=function(e){return!ce.expr.filters.hidden(e)}),ce.each({margin:"",padding:"",border:"Width"},function(e,t){ce.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+Ct[r]+t]=o[r]||o[r-2]||o[0];return i}},mt.test(e)||(ce.cssHooks[e+t].set=k)});var kt=/%20/g,Et=/\[\]$/,St=/\r?\n/g,At=/^(?:submit|button|image|reset|file)$/i,jt=/^(?:input|select|textarea|keygen)/i;ce.fn.extend({serialize:function(){return ce.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=ce.prop(this,"elements");return e?ce.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!ce(this).is(":disabled")&&jt.test(this.nodeName)&&!At.test(e)&&(this.checked||!tt.test(e))}).map(function(e,t){var n=ce(this).val();return null==n?null:ce.isArray(n)?ce.map(n,function(e){return{name:t.name,value:e.replace(St,"\r\n")}}):{name:t.name,value:n.replace(St,"\r\n")}}).get()}}),ce.param=function(e,n){var r,i=[],o=function(e,t){t=ce.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=ce.ajaxSettings&&ce.ajaxSettings.traditional),ce.isArray(e)||e.jquery&&!ce.isPlainObject(e))ce.each(e,function(){o(this.name,this.value)});else for(r in e)D(r,e[r],n,o);return i.join("&").replace(kt,"+")},ce.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){ce.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),ce.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var Dt,Lt,Ht=ce.now(),qt=/\?/,_t=/#.*$/,Mt=/([?&])_=[^&]*/,Ot=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Ft=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Bt=/^(?:GET|HEAD)$/,Pt=/^\/\//,Rt=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Wt=ce.fn.load,$t={},It={},zt="*/".concat("*");try{Lt=J.href}catch(Xt){Lt=G.createElement("a"),Lt.href="",Lt=Lt.href}Dt=Rt.exec(Lt.toLowerCase())||[],ce.fn.load=function(e,n,r){if("string"!=typeof e&&Wt)return Wt.apply(this,arguments);var i,o,a,s=this,u=e.indexOf(" ");return u>=0&&(i=e.slice(u,e.length),e=e.slice(0,u)),ce.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(a="POST"),s.length>0&&ce.ajax({url:e,type:a,dataType:"html",data:n}).done(function(e){o=arguments,s.html(i?ce("
            ").append(ce.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},ce.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){ce.fn[t]=function(e){return this.on(t,e)}}),ce.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Lt,type:"GET",isLocal:Ft.test(Dt[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":zt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":ce.parseJSON,"text xml":ce.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?q(q(e,ce.ajaxSettings),t):q(ce.ajaxSettings,e)},ajaxPrefilter:L($t),ajaxTransport:L(It),ajax:function(e,n){function r(e,n,r,i){var o,f,v,b,w,C=n;2!==x&&(x=2,u&&clearTimeout(u),c=t,s=i||"",T.readyState=e>0?4:0,o=e>=200&&e<300||304===e,r&&(b=_(p,T,r)),b=M(p,b,T,o),o?(p.ifModified&&(w=T.getResponseHeader("Last-Modified"),w&&(ce.lastModified[a]=w),w=T.getResponseHeader("etag"),w&&(ce.etag[a]=w)),204===e||"HEAD"===p.type?C="nocontent":304===e?C="notmodified":(C=b.state,f=b.data,v=b.error,o=!v)):(v=C,!e&&C||(C="error",e<0&&(e=0))),T.status=e,T.statusText=(n||C)+"",o?g.resolveWith(d,[f,C,T]):g.rejectWith(d,[T,C,v]),T.statusCode(y),y=t,l&&h.trigger(o?"ajaxSuccess":"ajaxError",[T,p,o?f:v]),m.fireWith(d,[T,C]),l&&(h.trigger("ajaxComplete",[T,p]),--ce.active||ce.event.trigger("ajaxStop")))}"object"==typeof e&&(n=e,e=t),n=n||{};var i,o,a,s,u,l,c,f,p=ce.ajaxSetup({},n),d=p.context||p,h=p.context&&(d.nodeType||d.jquery)?ce(d):ce.event,g=ce.Deferred(),m=ce.Callbacks("once memory"),y=p.statusCode||{},v={},b={},x=0,w="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(2===x){if(!f)for(f={};t=Ot.exec(s);)f[t[1].toLowerCase()]=t[2];t=f[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===x?s:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return x||(e=b[n]=b[n]||e,v[e]=t),this},overrideMimeType:function(e){return x||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(x<2)for(t in e)y[t]=[y[t],e[t]];else T.always(e[T.status]);return this},abort:function(e){var t=e||w;return c&&c.abort(t),r(0,t),this}};if(g.promise(T).complete=m.add,T.success=T.done,T.error=T.fail,p.url=((e||p.url||Lt)+"").replace(_t,"").replace(Pt,Dt[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=ce.trim(p.dataType||"*").toLowerCase().match(pe)||[""],null==p.crossDomain&&(i=Rt.exec(p.url.toLowerCase()),p.crossDomain=!(!i||i[1]===Dt[1]&&i[2]===Dt[2]&&(i[3]||("http:"===i[1]?"80":"443"))===(Dt[3]||("http:"===Dt[1]?"80":"443")))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=ce.param(p.data,p.traditional)),H($t,p,n,T),2===x)return T;l=p.global,l&&0===ce.active++&&ce.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Bt.test(p.type),a=p.url,p.hasContent||(p.data&&(a=p.url+=(qt.test(a)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=Mt.test(a)?a.replace(Mt,"$1_="+Ht++):a+(qt.test(a)?"&":"?")+"_="+Ht++)),p.ifModified&&(ce.lastModified[a]&&T.setRequestHeader("If-Modified-Since",ce.lastModified[a]),ce.etag[a]&&T.setRequestHeader("If-None-Match",ce.etag[a])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&T.setRequestHeader("Content-Type",p.contentType),T.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+zt+"; q=0.01":""):p.accepts["*"]);for(o in p.headers)T.setRequestHeader(o,p.headers[o]);if(p.beforeSend&&(p.beforeSend.call(d,T,p)===!1||2===x))return T.abort();w="abort";for(o in{success:1,error:1,complete:1})T[o](p[o]);if(c=H(It,p,n,T)){T.readyState=1,l&&h.trigger("ajaxSend",[T,p]),p.async&&p.timeout>0&&(u=setTimeout(function(){T.abort("timeout")},p.timeout));try{x=1,c.send(v,r)}catch(C){if(!(x<2))throw C;r(-1,C)}}else r(-1,"No Transport");return T},getJSON:function(e,t,n){return ce.get(e,t,n,"json")},getScript:function(e,n){return ce.get(e,t,n,"script")}}),ce.each(["get","post"],function(e,n){ce[n]=function(e,r,i,o){return ce.isFunction(r)&&(o=o||i,i=r,r=t),ce.ajax({url:e,type:n,dataType:o,data:r,success:i})}}),ce.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return ce.globalEval(e),e}}}),ce.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),ce.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=G.head||ce("head")[0]||G.documentElement;return{send:function(t,i){n=G.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var Ut=[],Vt=/(=)\?(?=&|$)|\?\?/;ce.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Ut.pop()||ce.expando+"_"+Ht++;return this[e]=!0,e}}),ce.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,u=n.jsonp!==!1&&(Vt.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(n.data)&&"data");if(u||"jsonp"===n.dataTypes[0])return o=n.jsonpCallback=ce.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,u?n[u]=n[u].replace(Vt,"$1"+o):n.jsonp!==!1&&(n.url+=(qt.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||ce.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,Ut.push(o)),s&&ce.isFunction(a)&&a(s[0]),s=a=t}),"script"});var Yt,Jt,Gt=0,Qt=e.ActiveXObject&&function(){var e;for(e in Yt)Yt[e](t,!0)};ce.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&O()||F()}:O,Jt=ce.ajaxSettings.xhr(),ce.support.cors=!!Jt&&"withCredentials"in Jt,Jt=ce.support.ajax=!!Jt,Jt&&ce.ajaxTransport(function(n){if(!n.crossDomain||ce.support.cors){var r;return{send:function(i,o){var a,s,u=n.xhr();if(n.username?u.open(n.type,n.url,n.async,n.username,n.password):u.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)u[s]=n.xhrFields[s];n.mimeType&&u.overrideMimeType&&u.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)u.setRequestHeader(s,i[s])}catch(l){}u.send(n.hasContent&&n.data||null),r=function(e,i){var s,l,c,f;try{if(r&&(i||4===u.readyState))if(r=t,a&&(u.onreadystatechange=ce.noop,Qt&&delete Yt[a]),i)4!==u.readyState&&u.abort();else{f={},s=u.status,l=u.getAllResponseHeaders(),"string"==typeof u.responseText&&(f.text=u.responseText);try{c=u.statusText}catch(p){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=f.text?200:404}}catch(d){i||o(-1,d)}f&&o(s,c,f,l)},n.async?4===u.readyState?setTimeout(r):(a=++Gt,Qt&&(Yt||(Yt={},ce(e).unload(Qt)),Yt[a]=r),u.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Kt,Zt,en=/^(?:toggle|show|hide)$/,tn=new RegExp("^(?:([+-])=|)("+fe+")([a-z%]*)$","i"),nn=/queueHooks$/,rn=[$],on={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=tn.exec(t),o=i&&i[3]||(ce.cssNumber[e]?"":"px"),a=(ce.cssNumber[e]||"px"!==o&&+r)&&tn.exec(ce.css(n.elem,e)),s=1,u=20;if(a&&a[3]!==o){o=o||a[3],i=i||[],a=+r||1;do s=s||".5",a/=s,ce.style(n.elem,e,a+o);while(s!==(s=n.cur()/r)&&1!==s&&--u)}return i&&(a=n.start=+a||+r||0,n.unit=o,n.end=i[1]?a+(i[1]+1)*i[2]:+i[2]),n}]};ce.Animation=ce.extend(R,{tweener:function(e,t){ce.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var n,r=0,i=e.length;r-1,f={},p={};c?(p=a.position(),i=p.top,o=p.left):(i=parseFloat(u)||0,o=parseFloat(l)||0),ce.isFunction(t)&&(t=t.call(e,n,s)),null!=t.top&&(f.top=t.top-s.top+i),null!=t.left&&(f.left=t.left-s.left+o),"using"in t?t.using.call(e,f):a.css(f)}},ce.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===ce.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),ce.nodeName(e[0],"html")||(n=e.offset()),n.top+=ce.css(e[0],"borderTopWidth",!0),n.left+=ce.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-ce.css(r,"marginTop",!0),left:t.left-n.left-ce.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||Q;e&&!ce.nodeName(e,"html")&&"static"===ce.css(e,"position");)e=e.offsetParent;return e||Q})}}),ce.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);ce.fn[e]=function(i){return ce.access(this,function(e,i,o){var a=X(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:void(a?a.scrollTo(r?ce(a).scrollLeft():o,r?o:ce(a).scrollTop()):e[i]=o)},e,i,arguments.length,null)}}),ce.each({Height:"height",Width:"width"},function(e,n){ce.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){ce.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return ce.access(this,function(n,r,i){var o;return ce.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?ce.css(n,r,s):ce.style(n,r,i,s)},n,a?i:t,a,null)}})}),ce.fn.size=function(){return this.length},ce.fn.andSelf=ce.fn.addBack,"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=ce:(e.jQuery=e.$=ce,"function"==typeof define&&define.amd&&define("jquery",[],function(){return ce}))}(window); \ No newline at end of file diff --git a/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/jquery-1.10.2.min.js b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/jquery-1.10.2.min.js new file mode 100644 index 0000000..16034cf --- /dev/null +++ b/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/jquery-1.10.2.min.js @@ -0,0 +1,4 @@ +/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */ + ;!function(e,t){function n(e){var t=e.length,n=ce.type(e);return!ce.isWindow(e)&&(!(1!==e.nodeType||!t)||("array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)))}function r(e){var t=ke[e]={};return ce.each(e.match(pe)||[],function(e,n){t[n]=!0}),t}function i(e,n,r,i){if(ce.acceptData(e)){var o,a,s=ce.expando,l=e.nodeType,u=l?ce.cache:e,c=l?e[s]:e[s]&&s;if(c&&u[c]&&(i||u[c].data)||r!==t||"string"!=typeof n)return c||(c=l?e[s]=te.pop()||ce.guid++:s),u[c]||(u[c]=l?{}:{toJSON:ce.noop}),("object"==typeof n||"function"==typeof n)&&(i?u[c]=ce.extend(u[c],n):u[c].data=ce.extend(u[c].data,n)),a=u[c],i||(a.data||(a.data={}),a=a.data),r!==t&&(a[ce.camelCase(n)]=r),"string"==typeof n?(o=a[n],null==o&&(o=a[ce.camelCase(n)])):o=a,o}}function o(e,t,n){if(ce.acceptData(e)){var r,i,o=e.nodeType,a=o?ce.cache:e,l=o?e[ce.expando]:ce.expando;if(a[l]){if(t&&(r=n?a[l]:a[l].data)){ce.isArray(t)?t=t.concat(ce.map(t,ce.camelCase)):t in r?t=[t]:(t=ce.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;for(;i--;)delete r[t[i]];if(n?!s(r):!ce.isEmptyObject(r))return}(n||(delete a[l].data,s(a[l])))&&(o?ce.cleanData([e],!0):ce.support.deleteExpando||a!=a.window?delete a[l]:a[l]=null)}}}function a(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(Se,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r||"false"!==r&&("null"===r?null:+r+""===r?+r:Ee.test(r)?ce.parseJSON(r):r)}catch(o){}ce.data(e,n,r)}else r=t}return r}function s(e){var t;for(t in e)if(("data"!==t||!ce.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function l(){return!0}function u(){return!1}function c(){try{return G.activeElement}catch(e){}}function f(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function p(e,t,n){if(ce.isFunction(t))return ce.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return ce.grep(e,function(e){return e===t!==n});if("string"==typeof t){if($e.test(t))return ce.filter(t,e,n);t=ce.filter(t,e)}return ce.grep(e,function(e){return ce.inArray(e,t)>=0!==n})}function d(e){var t=Ue.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function h(e,t){return ce.nodeName(e,"table")&&ce.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function g(e){return e.type=(null!==ce.find.attr(e,"type"))+"/"+e.type,e}function m(e){var t=it.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function y(e,t){for(var n,r=0;null!=(n=e[r]);r++)ce._data(n,"globalEval",!t||ce._data(t[r],"globalEval"))}function v(e,t){if(1===t.nodeType&&ce.hasData(e)){var n,r,i,o=ce._data(e),a=ce._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)ce.event.add(t,n,s[n][r])}a.data&&(a.data=ce.extend({},a.data))}}function b(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!ce.support.noCloneEvent&&t[ce.expando]){i=ce._data(t);for(r in i.events)ce.removeEvent(t,r,i.handle);t.removeAttribute(ce.expando)}"script"===n&&t.text!==e.text?(g(t).text=e.text,m(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),ce.support.html5Clone&&e.innerHTML&&!ce.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&tt.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}function x(e,n){var r,i,o=0,a=typeof e.getElementsByTagName!==Y?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==Y?e.querySelectorAll(n||"*"):t;if(!a)for(a=[],r=e.childNodes||e;null!=(i=r[o]);o++)!n||ce.nodeName(i,n)?a.push(i):ce.merge(a,x(i,n));return n===t||n&&ce.nodeName(e,n)?ce.merge([e],a):a}function T(e){tt.test(e.type)&&(e.defaultChecked=e.checked)}function w(e,t){if(t in e)return t;for(var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=Nt.length;i--;)if(t=Nt[i]+n,t in e)return t;return r}function C(e,t){return e=t||e,"none"===ce.css(e,"display")||!ce.contains(e.ownerDocument,e)}function N(e,t){for(var n,r,i,o=[],a=0,s=e.length;s>a;a++)r=e[a],r.style&&(o[a]=ce._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&C(r)&&(o[a]=ce._data(r,"olddisplay",A(r.nodeName)))):o[a]||(i=C(r),(n&&"none"!==n||!i)&&ce._data(r,"olddisplay",i?n:ce.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}function k(e,t,n){var r=yt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function E(e,t,n,r,i){for(var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;4>o;o+=2)"margin"===n&&(a+=ce.css(e,n+Ct[o],!0,i)),r?("content"===n&&(a-=ce.css(e,"padding"+Ct[o],!0,i)),"margin"!==n&&(a-=ce.css(e,"border"+Ct[o]+"Width",!0,i))):(a+=ce.css(e,"padding"+Ct[o],!0,i),"padding"!==n&&(a+=ce.css(e,"border"+Ct[o]+"Width",!0,i)));return a}function S(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=ct(e),a=ce.support.boxSizing&&"border-box"===ce.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=ft(e,t,o),(0>i||null==i)&&(i=e.style[t]),vt.test(i))return i;r=a&&(ce.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+E(e,t,n||(a?"border":"content"),r,o)+"px"}function A(e){var t=G,n=xt[e];return n||(n=j(e,t),"none"!==n&&n||(ut=(ut||ce("