diff --git a/Dockerfile b/Dockerfile index 5ccaa8f..09ebb83 100755 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,9 @@ -FROM java:8 +FROM openjdk:8 COPY target/hsweb-demo.jar /app.jar COPY hsweb-ui /hsweb-ui +COPY docker-entrypoint.sh / +#COPY data /data +COPY config /config EXPOSE 8080 -ENTRYPOINT ["java","-jar","/app.jar"] +ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/README.md b/README.md index 8a4c339..c2eee72 100644 --- a/README.md +++ b/README.md @@ -13,10 +13,19 @@ http://cdn-blog.jetbrains.org.cn/doc/all.html $ ./mvnw spring-boot:run ``` +docker: +```bash + $ docker run -d --name hsweb3-demo -p 8089:8089 hsweb/hsweb-demo:3.0.1 +``` + 或者导入ide,等待maven依赖下载完后执行: ``org.hswebframework.web.demo.Application.main`` -启动成功后打开: http://localhost:8089 ,帐号:admin 密码:admin +启动成功后打开: http://localhost:8089 ,帐号:admin 密码:admin. + +## 数据库 +demo默认使用h2作为数据库,可直接修改`application-dev.yml`配置中的:`spring.datasource.url`, +启动服务会自动初始化数据.目前支持:`h2`,`oracle`,`mysql`,`postgresql`. ## 无法下载依赖? 查看maven的settings.xml是否配置了私服,删掉或者mirrorOf不要为* diff --git a/config/font/FZLTCXHJW.TTF b/config/font/FZLTCXHJW.TTF new file mode 100644 index 0000000..3efeb44 Binary files /dev/null and b/config/font/FZLTCXHJW.TTF differ diff --git a/config/font/YaHei.Consolas.1.12.ttf b/config/font/YaHei.Consolas.1.12.ttf new file mode 100644 index 0000000..ea974aa Binary files /dev/null and b/config/font/YaHei.Consolas.1.12.ttf differ diff --git a/config/font/simfang.ttf b/config/font/simfang.ttf new file mode 100644 index 0000000..16eb427 Binary files /dev/null and b/config/font/simfang.ttf differ diff --git a/config/font/simhei.ttf b/config/font/simhei.ttf new file mode 100644 index 0000000..60a4819 Binary files /dev/null and b/config/font/simhei.ttf differ diff --git a/config/font/simkai.ttf b/config/font/simkai.ttf new file mode 100644 index 0000000..ece2ac2 Binary files /dev/null and b/config/font/simkai.ttf differ diff --git a/config/font/simsun.ttc b/config/font/simsun.ttc new file mode 100644 index 0000000..40e9693 Binary files /dev/null and b/config/font/simsun.ttc differ diff --git a/config/fop-configuration.xml b/config/fop-configuration.xml new file mode 100644 index 0000000..8aa6cdb --- /dev/null +++ b/config/fop-configuration.xml @@ -0,0 +1,47 @@ + + + true + + + true + + + ./config + + + ./config/font + + + 72 + + 72 + + + + + + nl_Bel + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..bf58786 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,22 @@ +version: '2' +services: + # redis: + # image: redis + # ports: + # - "6379:6379" + mysql: + image: mysql:5.7 + volumes: + - "database:/var/lib/mysql" + restart: always + command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci + environment: + TZ: Asia/Shanghai + MYSQL_USER: root + MYSQL_HOST: "%" + MYSQL_ROOT_PASSWORD: 12345 + MYSQL_DATABASE: hsweb + ports: + - "3306:3306" +volumes: + database: \ No newline at end of file diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh new file mode 100755 index 0000000..a9fbef6 --- /dev/null +++ b/docker-entrypoint.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +java -jar $JAVA_OPTS -server \ +-XX:+UnlockExperimentalVMOptions \ +-XX:+UseCGroupMemoryLimitForHeap \ +-XX:-OmitStackTraceInFastThrow \ +-Djava.security.egd=file:/dev/./urandom \ +/app.jar \ No newline at end of file diff --git a/hsweb-ui/admin/autz-settings/permission-setting.html b/hsweb-ui/admin/autz-settings/permission-setting.html new file mode 100644 index 0000000..ec4dae0 --- /dev/null +++ b/hsweb-ui/admin/autz-settings/permission-setting.html @@ -0,0 +1,147 @@ + + + + + 权限设置 + + + +
+ +
+ +
+
+
+ +
+
+
+ +
+ 保存 + 关闭 +
+ +
+
+ 保存 + 关闭 +
+
+
+
+ +
+
+ 保存 + 关闭 +
+
+
+
+ 仅限本人的数据 +
+
+ +
+
+ +
+
+ 仅限本人和下属的数据 +
+
+ +
+
+ +
+
+ 仅限所在部门的数据 +
+
+ +
+
+ +
+
+ 仅限所在机构的数据 +
+
+ +
+
+ +
+
+ + + + \ No newline at end of file diff --git a/hsweb-ui/admin/autz-settings/permission-setting.js b/hsweb-ui/admin/autz-settings/permission-setting.js new file mode 100644 index 0000000..a26583c --- /dev/null +++ b/hsweb-ui/admin/autz-settings/permission-setting.js @@ -0,0 +1,439 @@ +importResource("/admin/css/common.css"); + +importMiniui(function () { + mini.parse(); + + require(["request", "message", "miniui-tools"], function (request, message, tools) { + var settingFor = request.getParameter("settingFor"); + var type = request.getParameter("type"); + var permissionType = request.getParameter("permissionType"); + var priority = request.getParameter("priority") || 0; + var merge = request.getParameter("merge") || true; + var permission = request.getParameter("permission"); + + + var allPermission = []; + var allPermissionMap = {}; + var setting = {}; + + var settingDetailMap = {}; + var permissionTree = mini.get('permission-tree'); + + loadPermission(function () { + permissionTree.setData(mini.clone(allPermission)); + + $(allPermission).each(function () { + var panel = createContainer(this); + $("#permission-container").append(panel); + allPermissionMap[this.id] = this; + }); + mini.parse(); + $(allPermission).each(function () { + var permission = this; + mini.get(permission.id).setData(permission.actions); + initDataAccessEditor(this); + }); + + loadSetting(function () { + $(setting.details).each(function () { + settingDetailMap[this.permissionId] = this; + var actions = this.actions.join(","); + var list = mini.get(this.permissionId); + if (list) { + list.setValue(actions); + mini.get("panel-" + this.permissionId).expand() + } + }); + if(permission){ + goPermission(permission) + } + }); + + bindDataAccessEvent(); + + }); + var current; + permissionTree.on("nodeclick", function (e) { + var id = e.node.id; + if (current === id) { + return; + } + current = id; + goPermission(id); + + }); + + function goPermission(id) { + var box = mini.get("panel-" + id); + if(!box){ + return; + } + var panel = $(box.getEl()); + var container = $("#permission-container"); + + if (panel.position().top === 0) { + return; + } + box.expand(); + container.animate({ + scrollTop: panel.offset().top - container.offset().top + container.scrollTop() + }, 500); + } + + function bindDataAccessEvent() { + $(".field-access").on('click', function () { + var id = $(this).attr("permission"); + if (id) { + doEditFieldAccess(id) + } + }); + + $(".data-access").on('click', function () { + var id = $(this).attr("permission"); + if (id) { + doEditDataAccess(id); + } + }) + } + + function doEditFieldAccess(id) { + var container = $("#field-access-container").html(""); + var win = mini.get('fieldWindow'); + win.show(); + var permission = allPermissionMap[id]; + + win.setTitle(permission.name + "-" + "字段权限") + var actions = permission.actions; + + var boxData = []; + $(actions).each(function () { + if (this.properties && this.properties.supportDataAccess) { + if (this.properties.supportDataAccess.split(",").indexOf('DENY_FIELDS') !== -1) { + boxData.push({id: this.action, text: this.describe}); + } + } + }); + + $(permission.optionalFields).each(function () { + var field = this; + var group = $("
"); + var title = $("
") + .text(field.describe || field.name); + var box = $("") + .attr({ + id: "field-access-" + field.name + }); + + var list = $("
").append(box); + + group.append(title) + .append(list).appendTo(container); + + }); + mini.parse(); + $(permission.optionalFields).each(function () { + var field = this; + var box = mini.get("field-access-" + field.name); + box.setData(boxData); + box.selectAll(); + }); + var detail = settingDetailMap[id] || (settingDetailMap[id] = { + permissionId: id, + merge: merge, + priority: priority + }); + var notDenyFields = []; + + $(detail.dataAccesses) + .each(function () { + var action = this.action; + if (this.type === 'DENY_FIELDS') { + var fields = JSON.parse(this.config).fields; + $(fields).each(function () { + var box = mini.get("field-access-" + this); + box.deselect(action); + }); + + } else { + notDenyFields.push(this); + } + }); + + + $(".save-field-access") + .unbind("click") + .bind("click", function () { + var groups = {}; + $(permission.optionalFields).each(function () { + var field = this; + var box = mini.get("field-access-" + field.name); + var val = box.getValue(); + if (!val) { + val = []; + } else { + val = val.split(","); + } + if (val.length !== boxData.length) { + //禁用了字段 + $(boxData).each(function () { + if (val.indexOf(this.id) === -1) { + var fields = groups[this.id] || + (groups[this.id] = + { + action: this.id, + type: "DENY_FIELDS", + describe: "不能操作字段", + config: {fields: []} + + }); + fields.config.fields.push(field.name); + } + }); + } + }); + for (var i in groups) { + var conf = groups[i]; + conf.config = JSON.stringify(conf.config); + notDenyFields.push(conf); + } + detail.dataAccesses = notDenyFields; + win.hide() + }) + + } + + $(".data-access-title span").on('click', function () { + var me = $(this); + var pre = me.prev(); + pre.prop("checked", !pre.prop("checked")); + }); + $(".close-button").on("click", function () { + tools.closeWindow() + }); + function doEditDataAccess(id) { + var win = mini.get('dataAccessWindow'); + + win.show(); + $(".data-access-group").hide(); + var permission = allPermissionMap[id]; + win.setTitle(permission.name + "-" + "数据权限"); + var actionPermissionGroup = {}; + $(permission.actions).each(function () { + var action = this; + if (this.properties && this.properties.supportDataAccess) { + var list = this.properties.supportDataAccess.split(","); + $(list).each(function () { + var act = actionPermissionGroup[this] || (actionPermissionGroup[this] = []); + act.push({id: action.action, text: action.describe}); + }) + } + }); + + $(permission.supportDataAccessTypes).each(function () { + $("." + this).show(); + var id = this + ""; + var box = mini.get(id); + var lst = actionPermissionGroup[id]; + if (box && lst) { + box.setData(mini.clone(lst)); + //box.selectAll() + } + }); + var detail = settingDetailMap[id]; + var notDenyFields = []; + + $(detail.dataAccesses) + .each(function () { + var action = this.action; + if (this.type === 'SCOPE_BY_USER') { + var box = mini.get(JSON.parse(this.config).scopeType); + if (box) { + box.select(action); + } + } else { + notDenyFields.push(this); + } + }); + $(".save-data-access") + .unbind("click") + .on("click", function () { + + $(permission.supportDataAccessTypes).each(function () { + var id = this + ""; + var box = mini.get(id); + if (box) { + var val = box.getValue(); + if (!val) { + val = []; + } else { + val = val.split(","); + } + $(val).each(function () { + notDenyFields.push({ + type: "SCOPE_BY_USER", + action: this + '', + config: JSON.stringify({ + scopeType: id, + children: true + }) + }) + }) + } + }); + detail.dataAccesses = notDenyFields; + mini.get('dataAccessWindow').hide() + + }) + + } + + function readPermissionActions() { + + $(allPermission) + .each(function () { + var permissionId = this.id; + var list = mini.get(permissionId).getValue(); + + var detail = settingDetailMap[permissionId] || (function () { + return settingDetailMap[permissionId] = { + permissionId: permissionId, + merge: merge, + priority: priority + }; + }()); + + if (!list) { + detail.status = -100; + } + + detail.actions = list.split(","); + + }) + } + + $(".save-button").on('click', function () { + readPermissionActions(); + + var loading = message.loading("加载中..."); + var setting = {}; + setting.settingFor = settingFor; + setting.type = type; + setting.details = []; + for (var i in settingDetailMap) { + setting.details.push(settingDetailMap[i]) + } + request.put("autz-setting/merge", [setting], function (resp) { + loading.hide(); + if (resp.status === 200) { + message.showTips("保存成功") + } else { + message.showTips("保存失败", "danger"); + } + }) + + }); + + function initDataAccessEditor(permission) { + var panel = mini.get('panel-' + permission.id); + var buttons = []; + if (panel) { + var field = false; + if(!permission.supportDataAccessTypes){ + return; + } + if (permission.supportDataAccessTypes.indexOf('DENY_FIELDS') !== -1) { + buttons.push({html: '字段权限'}); + field = true; + } + if (permission.supportDataAccessTypes.length > 0 && !( + permission.supportDataAccessTypes.length === 1 && field + )) { + buttons.push({html: '数据权限'}) + } + panel.setButtons(buttons); + } + + } + + function loadSetting(call) { + request.get("autz-setting/" + type + "/" + settingFor, function (resp) { + if (resp.status === 200) { + setting = resp.result || {}; + call(); + } + }) + } + + function loadPermission(call) { + request.createQuery("permission/no-paging") + .where() + .exec(function (resp) { + if (resp.status === 200) { + if (!permissionType) { + allPermission = resp.result; + } else { + var _type = permissionType.split(","); + $(resp.result) + .each(function () { + var permission = this; + if (permission.type) { + var matched = false; + $(permission.type.split(",")) + .each(function () { + if (_type.indexOf(this + "") !== -1) { + matched = true; + } + }); + if (matched) { + allPermission.push(permission); + } + } + }); + } + + if(allPermission.length<=6){ + mini.get('layout').removeRegion("east") + } + call(); + } else { + message.showTips("加载权限失败", "danger") + } + }) + } + + function createContainer(permission) { + + var panel = $("
") + .attr({ + "id": "panel-" + permission.id, + "title": permission.name, + "showCollapseButton": "true", + "expanded": false, + // "showToolbar":true, + "collapseOnTitleClick": "true" + }) + .css({ + "width": "100%", + "height": "auto" + }) + .addClass("mini-panel"); + + var actionList = $("") + .addClass("mini-checkboxlist") + .attr({ + id: permission.id, + repeatItems: 4, + repeatLayout: "table", + textField: "describe", + valueField: "action" + }); + + panel.append(actionList); + + return panel; + } + + + }); + +}); \ No newline at end of file diff --git a/hsweb-ui/admin/autz-settings/permission.html b/hsweb-ui/admin/autz-settings/permission.html new file mode 100644 index 0000000..ef3f7a1 --- /dev/null +++ b/hsweb-ui/admin/autz-settings/permission.html @@ -0,0 +1,81 @@ + + + + + + + 权限设置 + + + + + +
+
+
+ +
+ + 绑定角色 + +
+
+
+
+
角色名 +
+
权限 + + +
+ +
操作
+
+
+ +
+
+
+
+
+ +
+ + 绑定用户 + +
+
+
+
+
用户名 +
+
权限 + + +
+ +
操作
+
+
+ +
+
+
+ +
+ + + \ No newline at end of file diff --git a/hsweb-ui/admin/autz-settings/permission.js b/hsweb-ui/admin/autz-settings/permission.js new file mode 100644 index 0000000..4b51bc9 --- /dev/null +++ b/hsweb-ui/admin/autz-settings/permission.js @@ -0,0 +1,200 @@ +importResource("/admin/css/common.css"); + +importMiniui(function () { + mini.parse(); + + require(["request", "message", "miniui-tools"], function (request, message, tools) { + var permissionId = request.getParameter("id"); + if (!permissionId) { + message.showTips("加载权限失败", "danger"); + return; + } + + var permission = {}; + var actionMapping = {}; + + var Editor = function (grid) { + + grid.getColumn('actions').renderer = function (e) { + if (e.value instanceof Array) { + e.value = e.value.join(","); + e.record.detail.actions = e.value; + } + return ((e.value + '')).split(",") + .map(function (value) { + return actionMapping[value]; + }).join(" , "); + }; + + grid.getColumn('action').renderer = function (e) { + var row = e.record; + var html = [ + tools.createActionButton("保存", "icon-save", function () { + grid.loading("保存中..."); + var data = mini.clone(row); + data.detail.actions = data.detail.actions.split(","); + data.details = [data.detail]; + data.menus = [{menuId: permissionId}]; + + request.put("autz-setting/merge", [data], function (resp) { + grid.unmask(); + if (resp.status === 200) { + message.showTips("保存成功"); + } else { + message.showTips("保存失败:" + resp.message, "danger"); + } + }) + }), + tools.createActionButton("完整配置", "icon-find", function () { + tools.openWindow("admin/autz-settings/permission-setting.html?priority=10&merge=true&type="+row.type+"&settingFor=" + + row.settingFor+"&permission="+row.detail.permissionId+"&permissionType="+(request.getParameter("permissionType")||''), + "赋权-"+row.settingForName, "800", "600", function () { + init() + }); + }), + tools.createActionButton("删除", "icon-remove", function () { + message.confirm("确认删除?", function () { + grid.loading("删除中..."); + request['delete']('autz-setting/' + row.id + "/" + row.detail.permissionId, function (resp) { + grid.unmask(); + if (resp.status === 200) { + grid.removeRow(row); + } else { + message.showTips("保存失败:" + resp.message, "danger") + } + }) + }) + }) + ]; + + return html.join(""); + }; + + + this.setData = function (settings) { + grid.setData(settings) + + }; + + return this; + }; + + + + var supports = { + user: function () { + var grid = mini.get('user-grid'); + var editor = new Editor(grid); + + $(".bind-user").on('click', function () { + tools.openWindow("admin/user/list.html?selector=1", "选中用户", "800", "600", function (data) { + if (data !== 'cancel' && data !== 'close') { + var data = { + type: 'user', + settingFor: data.id, + settingForName: data.name, + detail: { + status: 1, + permissionId: permissionId, + actions: [] + } + }; + grid.addRow(data); + startEdit(grid, data); + } + }) + }); + + return editor; + }(), + role: function () { + var grid = mini.get('role-grid'); + var editor = new Editor(grid); + + $(".bind-role").on('click', function () { + tools.openWindow("admin/role/list.html?selector=1", "选中角色", "800", "600", function (data) { + if (data !== 'cancel' && data !== 'close') { + var data = { + type: 'role', + settingFor: data.id, + settingForName: data.name, + detail: { + status: 1, + permissionId: permissionId, + actions: [] + } + }; + grid.addRow(data); + startEdit(grid, data); + } + }) + }); + + return editor; + }() + }; + + function startEdit(grid, row) { + grid.select(row, true); + var column = grid.getColumn('actions'); + + grid.setCurrentCell([row, column]); + grid.beginEditCell(); + column.editor.showPopup() + } + + function init(){ + + loadPermission(function () { + + loadAutzSettings(function (settings) { + /* + 构造数据 + [ + + ] + */ + for (var f in settings) { + if (supports[f]) { + supports[f].setData(settings[f]); + } + } + + }); + + }); + + } + init(); + + function loadAutzSettings(call) { + request.get("autz-setting/detail/" + permissionId, function (resp) { + if (resp.status === 200) { + + call(resp.result); + } else { + message.showTips("加载权限失败:" + resp.message, "danger"); + } + }) + } + + function loadPermission(call) { + request.get("permission/" + permissionId, function (resp) { + + if (resp.status === 200) { + permission = resp.result; + $(window.permissionActions = permission.actions).each(function () { + actionMapping[this.action] = this.describe || this.action; + }); + call(); + } else if (resp.status === 404) { + message.showTips("请分配权限"); + } else { + message.showTips("加载权限失败:" + resp.message, "danger"); + } + }) + } + + }); + +}); \ No newline at end of file diff --git a/hsweb-ui/admin/boot.js b/hsweb-ui/admin/boot.js index aee1fc2..c965ba0 100644 --- a/hsweb-ui/admin/boot.js +++ b/hsweb-ui/admin/boot.js @@ -3,17 +3,20 @@ window.BASE_PATH = "/"; //api服务地址 window.API_BASE_PATH = "/"; + + window.mini_debugger = false; +window.profile = 'prod'; String.prototype.startWith = function (str) { var reg = new RegExp("^" + str); return reg.test(this); -} +}; String.prototype.endWith = function (str) { var reg = new RegExp(str + "$"); return reg.test(this); -} +}; /** * 获取cooke @@ -26,7 +29,7 @@ function getCookie(sName, defaultVal) { var lastMatch = null; for (var i = 0; i < aCookie.length; i++) { var aCrumb = aCookie[i].split("="); - if (sName == aCrumb[0]) { + if (sName === aCrumb[0]) { lastMatch = aCrumb; } } @@ -39,9 +42,12 @@ function getCookie(sName, defaultVal) { } function importResource(path, callback) { - if (path.indexOf("http") != 0 || path.indexOf("//") != 0) { - if (!path.startWith("/")) + if (path.indexOf("http") !== 0 || path.indexOf("//") !== 0) { + if (!path.startWith("/")) { path = window.BASE_PATH + path; + } else { + path = window.BASE_PATH + (path.substr(1, path.length)); + } } var head = document.getElementsByTagName('head')[0]; if (path.endWith("js")) { @@ -49,7 +55,7 @@ function importResource(path, callback) { script.type = 'text/javascript'; script.charset = 'utf-8'; script.timeout = 120000; - if (typeof callback != "undefined") + if (typeof callback !== "undefined") script.async = false; script.src = path; @@ -87,7 +93,8 @@ function initRequireJs() { } }, shim: { - 'jquery': {exports: "$"} + 'jquery': {exports: "$"}, + 'request': {exports: "request"} }, paths: { "jquery": [BASE_PATH + "plugins/jquery/1.10.2/jquery.min"], @@ -96,18 +103,34 @@ function initRequireJs() { "request": [BASE_PATH + "plugins/tools/request"], //ajax请求工具 "miniui-tools": [BASE_PATH + "plugins/miniui/tools"], "message": [BASE_PATH + "plugins/miniui/message"], + "storejs": [BASE_PATH + "plugins/storejs/store.everything.min"], "ace": [BASE_PATH + "plugins/script-editor/ace"], "art-template": [BASE_PATH + "plugins/template/art-template"], "script-editor": [BASE_PATH + "plugins/script-editor/script-editor"], "plugin": [BASE_PATH + "plugins"], - "pages": [BASE_PATH + "admin"] + "pages": [BASE_PATH + "admin"], + "echarts": [BASE_PATH + "plugins/echarts/echarts.min"], + "search-box": [BASE_PATH + "admin/commons/search-box"], + "admin": [BASE_PATH + "admin"], + "workflow": [BASE_PATH + "workflow"] } }); + require(['request']); +} + +function getParameter(name, def) { + // 获取参数 + var url = window.location.search; + // 正则筛选地址栏 + var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); + // 匹配目标参数 + var result = url.substr(1).match(reg); + //返回参数值 + return result ? decodeURIComponent(result[2]) : def; } function importJquery(callback) { require(["jquery"], callback); - // importResource("/plugins/jquery/1.10.2/jquery.min.js", callback); } function importMiniui(callback) { @@ -117,28 +140,64 @@ function importMiniui(callback) { callback(); return; } - var theme = getCookie("theme", window.miniui_theme ? window.miniui_theme : "worry"); - var mode = 'my';//getCookie("mode", "large");// window.outerHeight > 1000 ? "large" : "medium"); + + var theme = getParameter("_theme", getCookie("theme", window.miniui_theme || "worry")); + var mode = getParameter("_mode", getCookie("mode", 'my')); + + // window.outerHeight > 1000 ? "large" : "medium"); function loadMini() { - importResource(BASE_PATH + "plugins/miniui/themes/default/miniui.css"); - importResource(BASE_PATH + "plugins/miniui/themes/icons.css"); - importResource(BASE_PATH + 'plugins/miniui/themes/' + theme + '/skin.css'); - importResource(BASE_PATH + "plugins/miniui/themes/default/" + mode + "-mode.css"); - importResource(BASE_PATH + "plugins/font-awesome/4.7.0/css/font-awesome.min.css"); - $.ajax({ - url: BASE_PATH + "plugins/miniui/miniui.js", - async: false, - cache: true, - dataType: "script", - success: callback, - error: callback - }); - if ($(window)) - $(window).resize(function () { - if (mini) - mini.layout(); + if (window.ActiveXObject) { + require(["plugin/tools/jquery.xdomainrequest.min"]); + } + if (!window.doLogin) { + require(["authorize"], function (authorize) { + authorize.parse(document.body); + window.authorize = authorize; + doLoadMiniui(); }); + } else { + doLoadMiniui() + } + + function doLoadMiniui() { + importResource("plugins/miniui/themes/default/miniui.3.8.2.css"); + importResource("plugins/miniui/themes/icons.css"); + importResource('plugins/miniui/themes/' + theme + '/skin.css'); + importResource("plugins/miniui/themes/default/" + mode + "-mode.css"); + importResource("plugins/font-awesome/4.7.0/css/font-awesome.min.css"); + + function success() { + $(document.body).fadeIn(300); + callback(); + window.setTimeout(function () { + mini.layout(); + }, 100); + } + + function loadMiniJs() { + $.ajax({ + url: BASE_PATH + "plugins/miniui/miniui.3.8.2.js", + async: false, + cache: true, + dataType: "script", + success: success, + error: function (e) { + loadMiniJs(); + } + }); + } + + loadMiniJs(); + if ($(window)) { + $(window).resize(function () { + if (mini) { + mini.layout(); + } + }); + } + } + } if (!window.jQuery && !window.$) { @@ -151,4 +210,4 @@ function importMiniui(callback) { doImport(); } -importResource(BASE_PATH + "plugins/requirejs/2.3.3/require.min.js", initRequireJs); +importResource("plugins/requirejs/2.3.3/require.min.js", initRequireJs); diff --git a/hsweb-ui/admin/code-generator/index.html b/hsweb-ui/admin/code-generator/index.html index 13b0412..ed0c9ef 100644 --- a/hsweb-ui/admin/code-generator/index.html +++ b/hsweb-ui/admin/code-generator/index.html @@ -7,6 +7,9 @@ 代码生成器 - -
+ +
@@ -59,7 +62,7 @@
  • 保存变量配置
  • 保存全部配置
  • -
  • 另存为
  • -
  • 下载当前配置
  • + +
  • 保存模板
  • 编辑模板
  • 添加模板
  • 复制当前选中模板
  • -
  • 上传模板
  • +
  • 下载模板
  • -
  • 删除模板
  • +
@@ -135,12 +138,11 @@
+ editNextOnEnterKey="true" showFilterRow="true" treeColumn="name" nodesField="columns" editNextRowCell="true">
名称 + onvaluechanged="onFilterChanged"/>
类型
@@ -155,7 +157,7 @@
-
@@ -164,7 +166,7 @@
-
+
-
-

+                    
+

+
+                        
                     
diff --git a/hsweb-ui/admin/code-generator/index.js b/hsweb-ui/admin/code-generator/index.js index 418b976..e88b9c5 100644 --- a/hsweb-ui/admin/code-generator/index.js +++ b/hsweb-ui/admin/code-generator/index.js @@ -1,6 +1,5 @@ -importResource("/admin/css/common.css"); -importResource("/admin/css/common.css"); -importResource("/plugins/font-awesome/4.7.0/css/font-awesome.css"); +importResource("admin/css/common.css"); +importResource("plugins/font-awesome/4.7.0/css/font-awesome.css"); var nowTemplateId, nowTabId; var templateUtils = { string: { @@ -33,25 +32,20 @@ var templateUtils = { importMiniui(function () { require(["miniui-tools", "message", "request"], function (tools, message, request) { request.get("user-setting/me/code-generator/all", function (res) { - if (res.status === 200) { - if (res.status === 200 && res.result && res.result.setting) { - initTemplate(JSON.parse(res.result.setting)); - } else { - require(["text!template.json"], function (json) { - json = JSON.parse(json); - initTemplate(json); - }); - } + if (res.status === 200 && res.result && res.result.setting) { + initTemplate(JSON.parse(res.result.setting)); } else { - message.showTips("获取模板配置失败"); + require(["text!template.json"], function (json) { + json = JSON.parse(json); + initTemplate(json); + }); } }); - + $(document.body).fadeIn(200); + mini.parse(); var templateMap = {}; - importResource('/plugins/miniui/themes/bootstrap/skin.css'); - function createButton(template) { templateMap[template.id] = template; var html = $("").css({ @@ -386,6 +380,7 @@ importMiniui(function () { } } + mini.parse(); var resultTree = mini.get("result"); resultTree.on("beforedrop", cancelDrop); resultTree.on('drawnode', renderIcon); @@ -413,17 +408,6 @@ importMiniui(function () { }); function setCode(node) { - if (!scriptEditor) { - var loading = message.loading("加载中..."); - require(['script-editor'], function (editorBuilder) { - editorBuilder.createEditor("script-editor", function (editor) { - scriptEditor = editor; - loading.hide(); - setCode(node); - }); - }); - return; - } var file = node.file; var ex; if (file.indexOf(".") !== -1) { @@ -434,16 +418,77 @@ importMiniui(function () { if (ex === "js") { ex = "javascript"; } - scriptEditor.init(ex, node.template); - } - - function saveCode() { - if (scriptEditor && nowEditNode) { - var script = scriptEditor.getScript(); - nowEditNode.template = script; + $(".preview-editor").hide(); + if (ex === "hf") { + $(".form-designer-container").show(); + var iframe = $("#form-designer")[0]; + var win = iframe.contentWindow; + var conf = getSetting(true); + var names = []; + for (var t in conf.table) { + names = conf.table[t]; + } + // win.optionalNames = names; + function initNewPage() { + win.getDesigner().clear(); + $(names).each(function () { + var component = win.getDesigner().addComponent("textbox"); + component.setProperty("name", this.name); + component.setProperty("comment", this.comment); + }); + } + if (node.template) { + try { + var config = JSON.parse(node.template); + if (!config || !config.html||!config.components) { + initNewPage(); + } else { + win.getDesigner().loadConfig(config); + } + } catch (e) { + initNewPage(); + } + }else{ + initNewPage(); + } + saveCode = function () { + if (nowEditNode) { + nowEditNode.template = JSON.stringify(win.getDesigner().getConfig()); + } + } + } else { + $(".script-editor-container").show(); + + if (!scriptEditor) { + var loading = message.loading("加载中..."); + require(['script-editor'], function (editorBuilder) { + editorBuilder.createEditor("script-editor", function (editor) { + scriptEditor = editor; + loading.hide(); + setCode(node); + }); + }); + return; + } + scriptEditor.init(ex, node.template); + saveCode = function () { + if (scriptEditor && nowEditNode) { + var script = scriptEditor.getScript(); + nowEditNode.template = script; + } + } } + } + var saveCode; + // function saveCode() { + // if (scriptEditor && nowEditNode) { + // var script = scriptEditor.getScript(); + // nowEditNode.template = script; + // } + // } + $(".remove-file").on("click", function () { var node = resultTree.getSelectedNode(); if (node) { @@ -584,7 +629,7 @@ importMiniui(function () { this.name = "id"; } newColumns.push({comment: this.comment, column: this.name.toLowerCase(), name: templateUtils.string.ul2ca(this.name.toLowerCase()), dataType: this.dataType}) - }) + }); mini.get(id + "-grid").setData(newColumns); mini.get("database-window").hide(); }); @@ -662,8 +707,8 @@ importMiniui(function () { type: "dir", children: result }; - resultTree.addNode(node); - resultTree.expandNode(node); + resultTree.addNodes(result); + resultTree.expandAll(); mini.get("var-window").hide(); //saveSetting() }); @@ -700,6 +745,16 @@ importMiniui(function () { $(".download-code").on("click", function () { tools.downloadZip(buildZipDownloadContent("", resultTree.getData()), "代码生成结果" + (mini.formatDate(new Date(), 'yyyyMMddHHmmss')) + ".zip"); }); + $(".write-code").on("click", function () { + var code = resultTree.getData(); + request.post("dev/tools/file/write", code, function (e) { + if (e.status === 200) { + message.showTips("代码已经成功写到:" + e.result); + } else { + message.alert(e.message); + } + }) + }); function buildZipDownloadContent(path, result) { var newList = []; @@ -723,10 +778,10 @@ importMiniui(function () { path = ogPath; convert(this); }); - console.log(newList); return newList; } }); + }); function onBeforeOpen(e) { diff --git a/hsweb-ui/admin/code-generator/template.js b/hsweb-ui/admin/code-generator/template.js index 3e85821..12d7f01 100644 --- a/hsweb-ui/admin/code-generator/template.js +++ b/hsweb-ui/admin/code-generator/template.js @@ -1,13 +1,12 @@ -importResource("/admin/css/common.css"); -importResource("/admin/css/common.css"); -importResource("/plugins/font-awesome/4.7.0/css/font-awesome.css"); +importResource("admin/css/common.css"); +importResource("plugins/font-awesome/4.7.0/css/font-awesome.css"); var repeat = [ {id: "replace", text: "替换"}, {id: "append", text: "追加"}, {id: "ignore", text: "忽略"} ]; importMiniui(function () { - importResource('/plugins/miniui/themes/bootstrap/skin.css'); + importResource('plugins/miniui/themes/bootstrap/skin.css'); mini.parse(); require(["miniui-tools", "script-editor", "message"], function (tools, editorBuilder, message) { var saveBefore = []; diff --git a/hsweb-ui/admin/code-generator/template.json b/hsweb-ui/admin/code-generator/template.json index d44a046..b51af65 100644 --- a/hsweb-ui/admin/code-generator/template.json +++ b/hsweb-ui/admin/code-generator/template.json @@ -1 +1 @@ -[{"name":"通用CRUD","comment":"通用增删改查全套生成","id":"simple-gen","script":"//此代码将在初始化配置时执行。用于自定义函数,在模板中调用!\n\nwindow.dataTypeData=[\n {\"id\":\"VARCHAR\",\"javaType\":\"String\"},\n {\"id\":\"TINYINT\",\"javaType\":\"Byte\"},\n {\"id\":\"TIMESTAMP\",\"javaType\":\"java.util.Date\"},\n {\"id\":\"DATETIME\",\"javaType\":\"java.util.Date\"},\n {\"id\":\"CLOB\",\"javaType\":\"String\"},\n {\"id\":\"TEXT\",\"javaType\":\"String\"},\n {\"id\":\"DECIMAL\",\"javaType\":\"Long\"},\n {\"id\":\"BIGINT\",\"javaType\":\"Long\"},\n {\"id\":\"NUMERIC\",\"javaType\":\"Double\"},\n {\"id\":\"DATE\",\"javaType\":\"Date\"}\n ];\nvar mapping = {};\n$(window.dataTypeData).each(function(){\n mapping[this.id]=this.javaType;\n});\nwindow.getJavaType=function(dataType){\n return mapping[dataType.toUpperCase()];\n}","tables":[{"name":"实体类","var":"properties","type":"grid","columns":[{"name":"column","title":"新建列","header":"列名","expanded":false,"_level":0},{"name":"name","title":"新建列","header":"属性名","expanded":false,"_level":0},{"name":"dataType","title":"新建列","header":"数据类型","editor":"{\"textField\":\"id\",\"type\":\"combobox\",\"data\":\"dataTypeData\"}","expanded":false,"_level":0},{"name":"javaType","title":"新建列","header":"java类型","renderer":"if(!value&&row.dataType){row.javaType=getJavaType(row.dataType) ;console.log(row.javaType)}return row.javaType;","expanded":false,"_level":0},{"name":"comment","title":"新建列","header":"说明","expanded":false,"_level":0}],"_id":28,"_uid":28}],"vars":[{"var":"groupId","name":"groupId","expanded":false,"_level":0,"pid":-1,"_id":29,"_uid":29,"_pid":-1},{"var":"version","name":"version","expanded":false,"_level":0,"pid":-1,"_id":30,"_uid":30,"_pid":-1},{"var":"parentModule","name":"父maven模块","expanded":false,"_level":0,"pid":-1,"children":[],"_id":31,"_uid":31,"_pid":-1},{"name":"maven模块名称","var":"moduleFile","expanded":false,"_level":0,"children":[],"_id":32,"_uid":32,"_pid":-1},{"name":"包名","var":"packageName","expanded":false,"_level":0,"children":[],"pid":-1,"_id":33,"_uid":33,"_pid":-1},{"var":"module","name":"模块","expanded":false,"_level":0,"pid":-1,"_id":34,"_uid":34,"_pid":-1},{"var":"tableName","name":"表名","_level":0,"pid":-1,"expanded":false,"_id":35,"_uid":35,"_pid":-1},{"name":"类名","var":"entityName","expanded":false,"_level":0,"pid":-1,"children":[],"_id":36,"_uid":36,"_pid":-1},{"var":"requestMapping","name":"请求路径","expanded":false,"_level":0,"_id":37,"_uid":37,"_pid":-1},{"var":"permission","name":"权限ID","expanded":false,"_level":0,"children":[],"_id":38,"_uid":38,"_pid":-1},{"name":"说明","var":"comment","expanded":false,"_level":0,"pid":-1,"children":[],"_id":39,"_uid":39,"_pid":-1},{"var":"api-comment`","name":"API-接口说明","_level":0,"expanded":false,"_id":40,"_uid":40,"_pid":-1}],"templates":[{"name":"module","file":"{{moduleFile}}","type":"dir","children":[{"name":"module-api","file":"{{moduleFile}}-api","type":"dir","_level":1,"parentId":1,"repeat":"append","children":[{"name":"src/main/java","file":"src/main/java","type":"dir","_level":2,"repeat":"ignore","children":[{"name":"package/api","file":"{{$imports.string.package2path(packageName)}}/api","type":"dir","_level":3,"repeat":"ignore","children":[{"name":"entity","file":"entity","type":"dir","_level":4,"repeat":"ignore","children":[{"name":"Entity.java","file":"{{entityName}}.java","type":"file","template":"package {{packageName}}.api.entity;\nimport org.hswebframework.web.commons.entity.SimpleGenericEntity;\nimport io.swagger.annotations.ApiModel;\nimport io.swagger.annotations.ApiModelProperty;\nimport lombok.*;\n\nimport java.util.List;\n\n/**\n* {{comment}}\n* @author hsweb-generator3.0\n*/\n@Getter\n@Setter\n@AllArgsConstructor\n@NoArgsConstructor\n@Builder\n@ApiModel(description = \"{{comment}}\")\npublic class {{entityName}} extends SimpleGenericEntity {\n {{each properties property i}}{{if property.name!='id'}}\n @ApiModelProperty(value = \"{{property.comment}}\")\n private {{property.javaType}} {{property.name}};\n {{/if}}{{/each}}\n}","_level":5,"repeat":"replace","expanded":true,"_id":6,"_uid":6,"_pid":5}],"expanded":true,"parentId":32,"_id":5,"_uid":5,"_pid":4},{"name":"service","file":"service","type":"dir","_level":4,"repeat":"ignore","children":[{"name":"Service.java","file":"{{entityName}}Service.java","type":"file","template":"package {{packageName}}.api.service;\n\nimport {{packageName}}.api.entity.{{entityName}};\nimport org.hswebframework.web.service.CrudService;\n\n/**\n * {{comment}}\n *\n * @author hsweb-generator 3.0\n */\npublic interface {{entityName}}Service extends CrudService<{{entityName}}, String> {\n\n}\n","_level":5,"repeat":"ignore","expanded":true,"_id":8,"_uid":8,"_pid":7}],"expanded":true,"parentId":32,"_id":7,"_uid":7,"_pid":4}],"expanded":true,"_id":4,"_uid":4,"_pid":3}],"expanded":true,"_id":3,"_uid":3,"_pid":2},{"name":"pom.xml","file":"pom.xml","type":"file","template":"\n\n \n {{moduleFile}}\n {{groupId}}\n {{version}}\n \n 4.0.0\n\n {{moduleFile}}-api\n\n \n \n org.hswebframework.web\n hsweb-commons-entity\n ${hsweb.framework.version}\n \n \n org.hswebframework.web\n hsweb-commons-service-api\n ${hsweb.framework.version}\n \n \n\n","_level":2,"repeat":"ignore","parentId":2,"expanded":true,"_id":9,"_uid":9,"_pid":2}],"expanded":true,"_id":2,"_uid":2,"_pid":1},{"name":"module-local","file":"{{moduleFile}}-local","type":"dir","_level":1,"parentId":1,"repeat":"append","children":[{"name":"src/main","file":"src/main","type":"dir","_level":2,"parentId":7,"repeat":"ignore","children":[{"name":"java","file":"java","type":"dir","_level":3,"repeat":"ignore","children":[{"name":"package/impl","file":"{{$imports.string.package2path(packageName)}}/impl","type":"dir","_level":4,"repeat":"ignore","children":[{"name":"dao","file":"dao","type":"dir","_level":5,"repeat":"append","parentId":25,"children":[{"name":"Dao.java","file":"{{entityName}}Dao.java","type":"file","template":"package {{packageName}}.impl.dao;\n\nimport org.hswebframework.web.dao.CrudDao;\nimport {{packageName}}.api.entity.{{entityName}};\n\n/**\n* {{comment}}\n* @author hsweb-generator3.0\n */\npublic interface {{entityName}}Dao extends CrudDao<{{entityName}},String> {\n}\n","_level":6,"repeat":"ignore","expanded":true,"_id":15,"_uid":15,"_pid":14}],"expanded":true,"_id":14,"_uid":14,"_pid":13},{"name":"service","file":"service","type":"dir","_level":5,"repeat":"append","parentId":25,"children":[{"name":"ServiceImpl.java","file":"Local{{entityName}}ServiceImpl.java","type":"file","template":"package {{packageName}}.impl.service;\n\nimport {{packageName}}.api.entity.{{entityName}};\nimport {{packageName}}.api.service.{{entityName}}Service;\nimport {{packageName}}.impl.dao.{{entityName}}Dao;\nimport org.hswebframework.web.service.GenericEntityService;\nimport org.hswebframework.web.id.IDGenerator;\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.stereotype.Service;\n\n/**\n * 默认的服务实现\n *\n * @author hsweb-generator3.0\n */\n@Service(\"{{$imports.string.lowFirst(entityName)}}Service\")\npublic class Local{{entityName}}ServiceImpl extends GenericEntityService<{{entityName}}, String> implements {{entityName}}Service {\n \n @Autowired\n private {{entityName}}Dao {{$imports.string.lowFirst(entityName)}}Dao;\n \n @Override\n protected IDGenerator getIDGenerator() {\n return IDGenerator.MD5;\n }\n \n @Override\n public {{entityName}}Dao getDao() {\n return {{$imports.string.lowFirst(entityName)}}Dao;\n }\n\n}\n","_level":6,"repeat":"ignore","expanded":true,"_id":17,"_uid":17,"_pid":16}],"expanded":true,"_id":16,"_uid":16,"_pid":13}],"expanded":true,"_id":13,"_uid":13,"_pid":12}],"expanded":true,"_id":12,"_uid":12,"_pid":11},{"name":"resources","file":"resources","type":"dir","_level":3,"repeat":"append","children":[{"name":"mappers","file":"{{$imports.string.package2path(packageName)}}/dao/myabtis","type":"dir","_level":4,"repeat":"append","children":[{"name":"Mapper.xml","file":"{{entityName}}Mapper.xml","type":"file","template":"\n\n\n \n {{each properties property i}}{{if property.name=='id'}}\n {{else}}\n {{/if}}{{/each}}\n \n\n \n \n \n \n \n \n \n \n \n \n\n \n delete from {{tableName}} where id =#{id}\n \n\n \n \n \n \n\n \n \n \n \n\n \n\n \n\n","_level":5,"repeat":"replace","expanded":true,"_id":20,"_uid":20,"_pid":19}],"expanded":true,"_id":19,"_uid":19,"_pid":18}],"expanded":true,"_id":18,"_uid":18,"_pid":11}],"expanded":true,"_id":11,"_uid":11,"_pid":10},{"name":"pom.xml","file":"pom.xml","type":"file","template":"\n\n \n {{moduleFile}}\n {{groupId}}\n {{version}}\n \n 4.0.0\n\n {{moduleFile}}-local\n\n \n \n org.hswebframework.web\n hsweb-commons-dao-mybatis\n ${hsweb.framework.version}\n \n \n org.hswebframework.web\n hsweb-commons-service-simple\n ${hsweb.framework.version}\n \n \n {{groupId}}\n {{moduleFile}}-api\n ${project.version}\n \n \n","_level":2,"repeat":"ignore","children":[],"expanded":true,"_id":21,"_uid":21,"_pid":10}],"expanded":true,"_id":10,"_uid":10,"_pid":1},{"name":"module-web","file":"{{moduleFile}}-web","type":"dir","_level":1,"parentId":1,"repeat":"ignore","expanded":true,"children":[{"name":"src/java","file":"src/java","type":"dir","_level":2,"parentId":8,"repeat":"ignore","children":[{"name":"controller","file":"{{$imports.string.package2path(packageName)}}/controller","type":"dir","_level":3,"repeat":"ignore","children":[{"name":"Controller.java","file":"{{entityName}}Controller.java","type":"file","template":"package {{packageName}}.controller;\n\nimport io.swagger.annotations.Api;\nimport org.hswebframework.web.authorization.annotation.Authorize;\nimport org.hswebframework.web.commons.entity.param.QueryParamEntity;\nimport org.hswebframework.web.controller.SimpleGenericEntityController;\nimport {{packageName}}.api.entity.{{entityName}};\nimport {{packageName}}.api.service.{{entityName}}Service;\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.RestController;\n\n/**\n * {{comment}}\n * @author hsweb-generator3.0\n */\n@RestController\n@RequestMapping(\"{{requestMapping}}\")\n@Authorize(permission = \"{{permission}}\",description=\"{{comment}}\")\n@Api(tags = \"{{api-comment}}\",value=\"{{comment}}\")\npublic class {{entityName}}Controller implements SimpleGenericEntityController<{{entityName}}, String, QueryParamEntity> {\n\n private {{entityName}}Service {{$imports.string.lowFirst(entityName)}}Service;\n \n @Autowired\n public void set{{entityName}}Service({{entityName}}Service {{$imports.string.lowFirst(entityName)}}Service) {\n this.{{$imports.string.lowFirst(entityName)}}Service = {{$imports.string.lowFirst(entityName)}}Service;\n }\n \n @Override\n public {{entityName}}Service getService() {\n return {{$imports.string.lowFirst(entityName)}}Service;\n }\n}\n","_level":4,"repeat":"ignore","expanded":true,"_id":25,"_uid":25,"_pid":24}],"expanded":true,"_id":24,"_uid":24,"_pid":23}],"expanded":true,"_id":23,"_uid":23,"_pid":22},{"name":"pom.xml","file":"pom.xml","type":"file","template":"\n\n \n {{moduleFile}}\n {{groupId}}\n {{version}}\n \n 4.0.0\n\n {{moduleFile}}-web\n\n \n \n javax.servlet\n servlet-api\n 2.5\n true\n \n \n {{groupId}}\n {{moduleFile}}-api\n ${project.version}\n \n \n org.hswebframework.web\n hsweb-commons-controller\n ${hsweb.framework.version}\n \n \n","_level":2,"repeat":"ignore","children":[],"expanded":true,"_id":26,"_uid":26,"_pid":22}],"_id":22,"_uid":22,"_pid":1},{"name":"pom.xml","file":"pom.xml","type":"file","template":"\n\n \n {{parentModule}}\n {{groupId}}\n {{version}}\n \n 4.0.0\n\n {{moduleFile}}\n pom\n \n {{moduleFile}}-api\n {{moduleFile}}-local\n {{moduleFile}}-web\n \n","_level":1,"repeat":"ignore","expanded":true,"_id":27,"_uid":27,"_pid":1}],"expanded":true,"_level":0,"repeat":"ignore","_id":1,"_uid":1,"_pid":-1}]}] +[{"name":"通用CRUD","comment":"通用增删改查全套生成","id":"simple-gen","script":"//此代码将在初始化配置时执行。用于自定义函数,在模板中调用!\n\nwindow.dataTypeData=[\n {\"id\":\"VARCHAR\",\"javaType\":\"String\"},\n {\"id\":\"TINYINT\",\"javaType\":\"Byte\"},\n {\"id\":\"TIMESTAMP\",\"javaType\":\"java.util.Date\"},\n {\"id\":\"CLOB\",\"javaType\":\"String\"},\n {\"id\":\"DECIMAL\",\"javaType\":\"Long\"},\n {\"id\":\"NUMERIC\",\"javaType\":\"Double\"},\n {\"id\":\"DATE\",\"javaType\":\"Date\"}\n ];\nwindow.trueOrFalse=[\n {\"id\":\"true\",\"text\":\"是\"},\n {\"id\":\"false\",\"text\":\"否\"}\n ]\nvar mapping = {};\n$(window.dataTypeData).each(function(){\n mapping[this.id]=this.javaType;\n});\nwindow.getJavaType=function(dataType){\n return mapping[dataType.toUpperCase()];\n}","tables":[{"name":"实体类","var":"properties","type":"grid","columns":[{"name":"column","title":"新建列","header":"列名","expanded":false,"_level":0},{"name":"name","title":"新建列","header":"属性名","expanded":false,"_level":0},{"name":"dataType","title":"新建列","header":"数据类型","editor":"{\"textField\":\"id\",\"type\":\"combobox\",\"data\":\"dataTypeData\"}","expanded":false,"_level":0},{"name":"javaType","title":"新建列","header":"java类型","renderer":"if(!value&&row.dataType){row.javaType=getJavaType(row.dataType) ;console.log(row.javaType)}return row.javaType;","expanded":false,"_level":0},{"name":"comment","title":"新建列","header":"说明","expanded":false,"_level":0},{"name":"search","title":"新建列","_level":0,"header":"查询条件","editor":"{\"type\":\"combobox\",\"data\":\"trueOrFalse\"}","expanded":false,"renderer":"if(typeof value==='undefined'){row.search='true'} return row.search=='true'?\"是\":\"否\""},{"name":"list","title":"新建列","_level":0,"header":"列表展示","editor":"{\"type\":\"combobox\",\"data\":\"trueOrFalse\"}","expanded":false,"renderer":"if(typeof value==='undefined'){row.list='true'} return row.list=='true'?\"是\":\"否\""}],"_id":32,"_uid":32}],"vars":[{"var":"groupId","name":"groupId","expanded":false,"_level":0,"pid":-1,"editor":"","_id":33,"_uid":33,"_pid":-1},{"var":"version","name":"version","expanded":false,"_level":0,"pid":-1,"_id":34,"_uid":34,"_pid":-1},{"var":"parentModule","name":"父maven模块","expanded":false,"_level":0,"pid":-1,"children":[],"_id":35,"_uid":35,"_pid":-1},{"name":"maven模块名称","var":"moduleFile","expanded":false,"_level":0,"children":[],"_id":36,"_uid":36,"_pid":-1},{"name":"包名","var":"packageName","expanded":false,"_level":0,"children":[],"pid":-1,"_id":37,"_uid":37,"_pid":-1},{"var":"module","name":"模块","expanded":false,"_level":0,"pid":-1,"_id":38,"_uid":38,"_pid":-1},{"var":"tableName","name":"表名","_level":0,"pid":-1,"expanded":false,"_id":39,"_uid":39,"_pid":-1},{"name":"类名","var":"entityName","expanded":false,"_level":0,"pid":-1,"children":[],"_id":40,"_uid":40,"_pid":-1},{"var":"requestMapping","name":"请求路径","expanded":false,"_level":0,"_id":41,"_uid":41,"_pid":-1},{"var":"permission","name":"权限ID","expanded":false,"_level":0,"children":[],"_id":42,"_uid":42,"_pid":-1},{"name":"说明","var":"comment","expanded":false,"_level":0,"pid":-1,"children":[],"_id":43,"_uid":43,"_pid":-1},{"var":"api_comment","name":"API-接口说明","_level":0,"expanded":false,"_id":44,"_uid":44,"_pid":-1}],"templates":[{"name":"ui","file":"ui/modules","type":"dir","_level":0,"parentId":-1,"repeat":"replace","children":[{"name":"pages","file":"pages/{{moduleFile}}","type":"dir","_level":1,"repeat":"ignore","children":[{"name":"save.hf","file":"{{entityName}}Save.hf","type":"file","template":"","_level":2,"repeat":"replace","parentId":43,"expanded":true,"_id":3,"_uid":3,"_pid":2},{"name":"manager.js","file":"{{entityName}}Manger.js","type":"file","template":"layui.define([\"request\", \"hsForm\", \"hsTable\"], function (exports) {\n var request = layui.request;\n var hsForm = layui.hsForm;\n var hsTable = layui.hsTable;\n var template;\n request.get(window.RESOURCE_PATH + \"modules/pages/{{moduleFile}}/{{entityName}}Save.hf\", function (json) {\n template = json;\n });\n\n function init(containerId) {\n hsTable.init(\"user-table\" + new Date().getTime(), containerId, \"{{requestMapping}}\", [[\n {{each properties property i}}{{if property.name!='id'&&property.list=='true'}}\n {field: '{{property.name}}', title: \"{{property.comment}}\", sort: true},\n {{/if}}{{/each}}\n {\n type: \"toolbar\", title: \"操作\", toolbar: \"\"\n }\n ]], {\n btns: [{\n name: '新建',\n callback: function () {\n hsForm.openForm(template, function (form) {\n console.log(form);\n return true;\n });\n }\n }],\n search: [\n {{each properties property i}}{{if property.name!='id'&&property.search=='true'}}\n {\n label: '{{property.comment}}',\n column: '{{property.name}}',\n type: 'input'\n },\n {{/if}}{{/each}}]\n });\n\n }\n\n exports(\"userManage\", {\n init: init\n })\n});","_level":2,"repeat":"replace","expanded":true,"_id":4,"_uid":4,"_pid":2}],"expanded":true,"_id":2,"_uid":2,"_pid":1}],"expanded":true,"_id":1,"_uid":1,"_pid":-1},{"name":"module","file":"{{moduleFile}}","type":"dir","children":[{"name":"module-api","file":"{{moduleFile}}-api","type":"dir","_level":1,"parentId":1,"repeat":"append","children":[{"name":"src/main/java","file":"src/main/java","type":"dir","_level":2,"repeat":"ignore","children":[{"name":"package/api","file":"{{$imports.string.package2path(packageName)}}/api","type":"dir","_level":3,"repeat":"ignore","children":[{"name":"entity","file":"entity","type":"dir","_level":4,"repeat":"ignore","children":[{"name":"Entity.java","file":"{{entityName}}.java","type":"file","template":"package {{packageName}}.api.entity;\nimport org.hswebframework.web.commons.entity.SimpleGenericEntity;\nimport io.swagger.annotations.ApiModel;\nimport io.swagger.annotations.ApiModelProperty;\nimport lombok.*;\n\nimport java.util.List;\n\n/**\n* {{comment}}\n* @author hsweb-generator3.0\n*/\n@Getter\n@Setter\n@AllArgsConstructor\n@NoArgsConstructor\n@Builder\n@ApiModel(description = \"{{comment}}\")\npublic class {{entityName}} extends SimpleGenericEntity {\n {{each properties property i}}{{if property.name!='id'}}\n @ApiModelProperty(value = \"{{property.comment}}\")\n private {{property.javaType}} {{property.name}};\n {{/if}}{{/each}}\n}","_level":5,"repeat":"replace","expanded":true,"_id":10,"_uid":10,"_pid":9}],"expanded":true,"parentId":32,"_id":9,"_uid":9,"_pid":8},{"name":"service","file":"service","type":"dir","_level":4,"repeat":"ignore","children":[{"name":"Service.java","file":"{{entityName}}Service.java","type":"file","template":"package {{packageName}}.api.service;\n\nimport {{packageName}}.api.entity.{{entityName}};\nimport org.hswebframework.web.service.CrudService;\n\n/**\n * {{comment}}\n *\n * @author hsweb-generator 3.0\n */\npublic interface {{entityName}}Service extends CrudService<{{entityName}}, String> {\n\n}\n","_level":5,"repeat":"ignore","expanded":true,"_id":12,"_uid":12,"_pid":11}],"expanded":true,"parentId":32,"_id":11,"_uid":11,"_pid":8}],"expanded":true,"_id":8,"_uid":8,"_pid":7}],"expanded":false,"_id":7,"_uid":7,"_pid":6},{"name":"pom.xml","file":"pom.xml","type":"file","template":"\n\n \n {{moduleFile}}\n {{groupId}}\n {{version}}\n \n 4.0.0\n\n {{moduleFile}}-api\n\n \n \n org.hswebframework.web\n hsweb-commons-entity\n ${hsweb.framework.version}\n \n \n org.hswebframework.web\n hsweb-commons-service-api\n ${hsweb.framework.version}\n \n \n\n","_level":2,"repeat":"ignore","parentId":2,"expanded":true,"_id":13,"_uid":13,"_pid":6}],"expanded":true,"_id":6,"_uid":6,"_pid":5},{"name":"module-local","file":"{{moduleFile}}-local","type":"dir","_level":1,"parentId":1,"repeat":"append","children":[{"name":"src/main","file":"src/main","type":"dir","_level":2,"parentId":7,"repeat":"ignore","children":[{"name":"java","file":"java","type":"dir","_level":3,"repeat":"ignore","children":[{"name":"package/impl","file":"{{$imports.string.package2path(packageName)}}/impl","type":"dir","_level":4,"repeat":"ignore","children":[{"name":"dao","file":"dao","type":"dir","_level":5,"repeat":"append","parentId":25,"children":[{"name":"Dao.java","file":"{{entityName}}Dao.java","type":"file","template":"package {{packageName}}.impl.dao;\n\nimport org.hswebframework.web.dao.CrudDao;\nimport {{packageName}}.api.entity.{{entityName}};\n\n/**\n* {{comment}}\n* @author hsweb-generator3.0\n */\npublic interface {{entityName}}Dao extends CrudDao<{{entityName}},String> {\n}\n","_level":6,"repeat":"ignore","expanded":true,"_id":19,"_uid":19,"_pid":18}],"expanded":true,"_id":18,"_uid":18,"_pid":17},{"name":"service","file":"service","type":"dir","_level":5,"repeat":"append","parentId":25,"children":[{"name":"ServiceImpl.java","file":"Local{{entityName}}ServiceImpl.java","type":"file","template":"package {{packageName}}.impl.service;\n\nimport {{packageName}}.impl.dao.{{entityName}}Dao;\nimport {{packageName}}.api.entity.{{entityName}};\nimport {{packageName}}.api.service.{{entityName}}Service;\nimport org.hswebframework.web.service.GenericEntityService;\nimport org.hswebframework.web.id.IDGenerator;\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.stereotype.Service;\n\n/**\n * 默认的服务实现\n *\n * @author hsweb-generator3.0\n */\n@Service(\"{{$imports.string.lowFirst(entityName)}}Service\")\npublic class Local{{entityName}}ServiceImpl extends GenericEntityService<{{entityName}}, String>\n implements {{entityName}}Service {\n \n @Autowired\n private {{entityName}}Dao {{$imports.string.lowFirst(entityName)}}Dao;\n \n @Override\n protected IDGenerator getIDGenerator() {\n return IDGenerator.MD5;\n }\n @Override\n public {{entityName}}Dao getDao() {\n return {{$imports.string.lowFirst(entityName)}}Dao;\n }\n\n}\n","_level":6,"repeat":"ignore","expanded":true,"_id":21,"_uid":21,"_pid":20}],"expanded":true,"_id":20,"_uid":20,"_pid":17}],"expanded":true,"_id":17,"_uid":17,"_pid":16}],"expanded":true,"_id":16,"_uid":16,"_pid":15},{"name":"resources","file":"resources","type":"dir","_level":3,"repeat":"append","children":[{"name":"mappers","file":"{{$imports.string.package2path(packageName)}}/dao/myabtis","type":"dir","_level":4,"repeat":"append","children":[{"name":"Mapper.xml","file":"{{entityName}}Mapper.xml","type":"file","template":"\n\n\n \n {{each properties property i}}{{if property.name=='id'}}\n {{else}}\n {{/if}}{{/each}}\n \n\n \n \n \n \n \n \n \n \n \n \n\n \n delete from {{tableName}} where id =#{id}\n \n\n \n \n \n \n\n \n \n \n \n\n \n\n \n\n","_level":5,"repeat":"replace","expanded":true,"_id":24,"_uid":24,"_pid":23}],"expanded":true,"_id":23,"_uid":23,"_pid":22}],"expanded":true,"_id":22,"_uid":22,"_pid":15}],"expanded":true,"_id":15,"_uid":15,"_pid":14},{"name":"pom.xml","file":"pom.xml","type":"file","template":"\n\n \n {{moduleFile}}\n {{groupId}}\n {{version}}\n \n 4.0.0\n\n {{moduleFile}}-local\n\n \n \n org.hswebframework.web\n hsweb-commons-dao-mybatis\n ${hsweb.framework.version}\n \n \n org.hswebframework.web\n hsweb-commons-service-simple\n ${hsweb.framework.version}\n \n \n {{groupId}}\n {{moduleFile}}-api\n ${project.version}\n \n \n","_level":2,"repeat":"ignore","children":[],"expanded":true,"_id":25,"_uid":25,"_pid":14}],"expanded":true,"_id":14,"_uid":14,"_pid":5},{"name":"module-web","file":"{{moduleFile}}-web","type":"dir","_level":1,"parentId":1,"repeat":"ignore","expanded":true,"children":[{"name":"src/java","file":"src/main/java","type":"dir","_level":2,"parentId":8,"repeat":"ignore","children":[{"name":"controller","file":"{{$imports.string.package2path(packageName)}}/controller","type":"dir","_level":3,"repeat":"ignore","children":[{"name":"Controller.java","file":"{{entityName}}Controller.java","type":"file","template":"package {{packageName}}.controller;\n\nimport io.swagger.annotations.Api;\nimport org.hswebframework.web.authorization.annotation.Authorize;\nimport org.hswebframework.web.commons.entity.param.QueryParamEntity;\nimport org.hswebframework.web.controller.SimpleGenericEntityController;\nimport {{packageName}}.api.entity.{{entityName}};\nimport {{packageName}}.api.service.{{entityName}}Service;\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.RestController;\n\n/**\n * {{comment}}\n * @author hsweb-generator3.0\n */\n@RestController\n@RequestMapping(\"{{requestMapping}}\")\n@Authorize(permission = \"{{permission}}\",description=\"{{comment}}\")\n@Api(tags = \"{{api_comment}}\",value=\"{{comment}}\")\npublic class {{entityName}}Controller implements SimpleGenericEntityController<{{entityName}}, String, QueryParamEntity> {\n\n private {{entityName}}Service {{$imports.string.lowFirst(entityName)}}Service;\n \n @Autowired\n public void set{{entityName}}Service({{entityName}}Service {{$imports.string.lowFirst(entityName)}}Service) {\n this.{{$imports.string.lowFirst(entityName)}}Service = {{$imports.string.lowFirst(entityName)}}Service;\n }\n \n @Override\n public {{entityName}}Service getService() {\n return {{$imports.string.lowFirst(entityName)}}Service;\n }\n}\n","_level":4,"repeat":"ignore","expanded":true,"_id":29,"_uid":29,"_pid":28}],"expanded":true,"_id":28,"_uid":28,"_pid":27}],"expanded":true,"_id":27,"_uid":27,"_pid":26},{"name":"pom.xml","file":"pom.xml","type":"file","template":"\n\n \n {{moduleFile}}\n {{groupId}}\n {{version}}\n \n 4.0.0\n\n {{moduleFile}}-web\n\n \n \n javax.servlet\n servlet-api\n 2.5\n true\n \n \n {{groupId}}\n {{moduleFile}}-api\n ${project.version}\n \n \n org.hswebframework.web\n hsweb-commons-controller\n ${hsweb.framework.version}\n \n \n","_level":2,"repeat":"ignore","children":[],"expanded":true,"_id":30,"_uid":30,"_pid":26}],"_id":26,"_uid":26,"_pid":5},{"name":"pom.xml","file":"pom.xml","type":"file","template":"\n\n \n {{parentModule}}\n {{groupId}}\n {{version}}\n \n 4.0.0\n\n {{moduleFile}}\n pom\n \n {{moduleFile}}-api\n {{moduleFile}}-local\n {{moduleFile}}-web\n \n","_level":1,"repeat":"ignore","expanded":true,"_id":31,"_uid":31,"_pid":5}],"expanded":true,"_level":0,"repeat":"ignore","_id":5,"_uid":5,"_pid":-1}]}] \ No newline at end of file diff --git a/hsweb-ui/admin/commons/search-box.css b/hsweb-ui/admin/commons/search-box.css new file mode 100644 index 0000000..16fbb78 --- /dev/null +++ b/hsweb-ui/admin/commons/search-box.css @@ -0,0 +1,35 @@ +.search-box .buttons { + padding-left: 10px; + padding-right: 10px; + margin-top: 10px; +} + +.search-box .input-block { + position: relative; + margin-left: 110px; +} + +.search-box .form-component { + margin-top: 10px; +} + +.search-box .form-label { + float: left; + display: block; + width: 110px; + padding: 0 8px; + font-size: 14px; + font-weight: 400; + line-height: 30px; + overflow: hidden; + text-align: right; + /*border: 1px solid #ddd;*/ + /*background: #FBFBFB;*/ + box-sizing: border-box; + /*border-right: 0px;*/ +} + +.operate-button { + margin-top: 10px; + padding-left: 10px; +} \ No newline at end of file diff --git a/hsweb-ui/admin/commons/search-box.js b/hsweb-ui/admin/commons/search-box.js new file mode 100644 index 0000000..01c8d01 --- /dev/null +++ b/hsweb-ui/admin/commons/search-box.js @@ -0,0 +1,125 @@ +define(['css!search-box'], function () { + function createOnclick(script) { + var me = this; + var eventId = "e_" + (Math.round(Math.random() * 100000)); + var call = typeof script === 'function' ? script : function () { + if (script) { + try { + var fun = eval("(function(){return function(){\n" + + script + + "\n}})()"); + fun.call(me); + } catch (e) { + console.log(script, e); + } + } + }; + window[eventId] = call; + return eventId; + } + + function SearchBox(config) { + + var condition = config.container; + var onSearch = config.onSearch || function () { + console.error("请设置SearchBox(config)的onSearch属性") + }; + var onReset = config.onReset || function () { + var id = condition.attr("id"); + if (!id) { + console.error("请设置SearchBox(config)onReset属性") + } + new mini.Form("#" + id).reset(); + onSearch(); + } + var showSize = config.initSize || 2; + + var cls = config.cls || 'form-component'; + + this.init = function () { + condition.find(".buttons:first").remove(); + var searchButton = $("") + .text("查询") + .attr("onclick", createOnclick(function () { + onSearch(); + })); + var resetButton = $("") + .text("重置") + .attr("onclick", createOnclick(function () { + onReset(); + })); + var expandButton = $(""); + var line1len = 0; + condition + .find("." + cls + ":lt(" + showSize + ")") + .each(function () { + $($(this).attr("class").split(" ")).each(function () { + if (this.indexOf("mini-col-") === 0) { + line1len += parseInt(this.substr(9)); + } + }) + }); + + expandButton.append( + $("").text("展开")) + .append($("")) + .on('click', function () { + var condition = config.container; + var me = $(this); + var len = condition.find("." + cls).length; + var allLen = 0; + condition.find("." + cls) + .each(function () { + $($(this).attr("class").split(" ")).each(function () { + if (this.indexOf("mini-col-") === 0) { + allLen += parseInt(this.substr(9)); + } + }) + }); + var size = (12 - (allLen % 12)); + var text = me.find('.text'); + var icon = me.find(".fa"); + if (text.text() === '展开') { + text.text("收起"); + icon.removeClass("fa-angle-down").addClass("fa fa-angle-up"); + condition.find("." + cls + ":gt(" + (showSize - 1) + ")").show(); + condition.find(".buttons") + .removeClass() + .addClass("buttons") + .addClass("mini-col-" + size) + .css("text-align", allLen >= 12 ? "right" : "left"); + mini.parse(); + } else { + if (text.text() === '收起') { + text.text("展开"); + icon.removeClass("fa-angle-up") + .addClass("fa fa-angle-down"); + condition.find("." + cls + ":gt(" + (showSize - 1) + ")").hide(); + condition.find(".buttons").removeClass() + .addClass("buttons") + .addClass("mini-col-" + (12 - (line1len % 12))) + .css("text-align", "left"); + mini.parse(); + } + } + }); + + var conditionLen = condition.children().length; + if (conditionLen <= showSize) { + expandButton.hide(); + } + if (conditionLen > 0) { + condition.append($("
") + .append(searchButton) + .append("") + .append(resetButton) + .append("") + .append(expandButton)); + } + condition.find("." + cls + ":gt(" + (showSize - 1) + ")").hide(); + mini.parse(); + } + } + + return SearchBox; +}); \ No newline at end of file diff --git a/hsweb-ui/admin/dashboard/config-form-charts.json b/hsweb-ui/admin/dashboard/config-form-charts.json new file mode 100644 index 0000000..990b605 --- /dev/null +++ b/hsweb-ui/admin/dashboard/config-form-charts.json @@ -0,0 +1 @@ +{"html":"\n
","useIdForName":false,"components":[{"config":{},"properties":[{"id":"name","comment":"由字母数字或下划线组成","text":"字段","value":"chartsType"},{"id":"comment","editor":"textbox","comment":"控件的中文描述","text":"描述","value":"图表类型"},{"id":"showComment","text":"显示描述","value":"true"},{"id":"emptyText","text":"提示","value":""},{"id":"type","editor":"textbox","text":"控件类型"},{"id":"size","text":"控件宽度","value":12},{"id":"height","text":"控件高度","value":""},{"id":"required","editor":"radio","text":"是否必填","value":"undefined"},{"id":"option","text":"选项配置","value":{"type":"data","url":"","textField":"","idField":"","dataField":"","resultAsTree":"","parentField":"","pagesize":"","data":[{"id":"bar","text":"柱状图","expanded":false,"_level":0},{"id":"pie","text":"饼状图","expanded":false,"_level":0},{"text":"线图","_level":0,"id":"line"}]}}],"id":"40b081240413bb27148ee4ee0179c9f2","cls":"mini-radiobuttonlist","typeName":"单选","type":"radio"}]} \ No newline at end of file diff --git a/hsweb-ui/admin/dashboard/config-form.hf b/hsweb-ui/admin/dashboard/config-form.hf new file mode 100644 index 0000000..1b85bd0 --- /dev/null +++ b/hsweb-ui/admin/dashboard/config-form.hf @@ -0,0 +1 @@ +{"html":"
基本信息
","useIdForName":false,"components":[{"config":{},"properties":[{"id":"name","comment":"由字母数字或下划线组成","text":"字段","value":"name"},{"id":"comment","editor":"textbox","comment":"控件的中文描述","text":"描述","value":"名称*:"},{"id":"showComment","text":"显示描述","value":"true"},{"id":"emptyText","text":"提示","value":""},{"id":"type","editor":"textbox","text":"控件类型"},{"id":"width","text":"控件宽度","value":12},{"id":"size","text":"控件宽度","value":12,"hide":true},{"id":"height","text":"控件高度","value":""},{"id":"required","editor":"radio","text":"是否必填","value":"required"}],"id":"296d47f610208f2d16631384ecea1276","typeName":"单行文本","type":"textbox"},{"config":{},"properties":[{"id":"name","comment":"由字母数字或下划线组成","text":"字段","value":"type"},{"id":"comment","editor":"textbox","comment":"控件的中文描述","text":"描述","value":"类型*:"},{"id":"showComment","text":"显示描述","value":"true"},{"id":"emptyText","text":"提示","value":""},{"id":"type","editor":"textbox","text":"控件类型"},{"id":"width","text":"控件宽度","value":12},{"id":"size","text":"控件宽度","value":12,"hide":true},{"id":"height","text":"控件高度","value":""},{"id":"required","editor":"radio","text":"是否必填","value":"required"},{"id":"option","text":"选项配置","value":{"type":"data","url":"","textField":"","idField":"","dataField":"","resultAsTree":"","parentField":"","pagesize":"","data":[{"id":"static","text":"静态","expanded":false,"_level":0},{"id":"charts","text":"图表","expanded":false,"_level":0}]}}],"id":"484e6c24800b146529286d45dc67b313","cls":"mini-radiobuttonlist","typeName":"单选","type":"radio"},{"config":{},"properties":[{"id":"name","comment":"由字母数字或下划线组成","text":"字段","value":"width"},{"id":"comment","editor":"textbox","comment":"控件的中文描述","text":"描述","value":"宽度*:"},{"id":"showComment","text":"显示描述","value":"true"},{"id":"emptyText","text":"提示","value":""},{"id":"type","editor":"textbox","text":"控件类型"},{"id":"width","text":"控件宽度","value":12},{"id":"size","text":"控件宽度","value":12,"hide":true},{"id":"height","text":"控件高度","value":""},{"id":"required","editor":"radio","text":"是否必填","value":"required"},{"id":"format","text":"数字格式","value":"n0","comment":"可手动输入格式:
n0:整数
n1:1位小数
c1:货币格式1位小数
p1:百分比1位小数
自定义:¥#,0.00"},{"id":"minValue","text":"最小值","value":"1"},{"id":"maxValue","text":"最大值","value":"12"},{"id":"increment","text":"增量","value":"1"}],"id":"7211fec111ee7b83e286e7cd370dfaef","cls":"mini-spinner","typeName":"数字调节","type":"spinner"},{"config":{},"properties":[{"id":"name","comment":"由字母数字或下划线组成","text":"字段","value":"height"},{"id":"comment","editor":"textbox","comment":"控件的中文描述","text":"描述","value":"高度*:"},{"id":"showComment","text":"显示描述","value":"true"},{"id":"emptyText","text":"提示","value":""},{"id":"type","editor":"textbox","text":"控件类型"},{"id":"width","text":"控件宽度","value":12},{"id":"size","text":"控件宽度","value":12,"hide":true},{"id":"height","text":"控件高度","value":""},{"id":"required","editor":"radio","text":"是否必填","value":"required"},{"id":"format","text":"数字格式","value":"n0","comment":"可手动输入格式:
n0:整数
n1:1位小数
c1:货币格式1位小数
p1:百分比1位小数
自定义:¥#,0.00"},{"id":"minValue","text":"最小值","value":"100"},{"id":"maxValue","text":"最大值","value":"2000"},{"id":"increment","text":"增量","value":"1"}],"id":"8a3204694fbd15469073de68d2944e1a","cls":"mini-spinner","typeName":"数字调节","type":"spinner"},{"config":{},"properties":[{"id":"name","comment":"由字母数字或下划线组成","text":"字段","value":"permission"},{"id":"comment","editor":"textbox","comment":"控件的中文描述","text":"描述","value":"权限表达式*:"},{"id":"showComment","text":"显示描述","value":"true"},{"id":"emptyText","text":"提示","value":"如: permission:user:get"},{"id":"type","editor":"textbox","text":"控件类型"},{"id":"width","text":"控件宽度","value":12},{"id":"size","text":"控件宽度","value":12,"hide":true},{"id":"height","text":"控件高度","value":103},{"id":"required","editor":"radio","text":"是否必填","value":"undefined"}],"id":"986b346eb7bd5f02ed50eb6f4d3e00c4","cls":"mini-textarea","formText":true,"typeName":"多行文本","type":"textarea"},{"config":{},"properties":[{"id":"name","comment":"由字母数字或下划线组成","text":"字段","value":"defaultConfig"},{"id":"comment","editor":"textbox","comment":"控件的中文描述","text":"描述","value":"是否默认*:"},{"id":"showComment","text":"显示描述","value":"true"},{"id":"emptyText","text":"提示","value":""},{"id":"type","editor":"textbox","text":"控件类型"},{"id":"width","text":"控件宽度","value":12},{"id":"size","text":"控件宽度","value":12,"hide":true},{"id":"height","text":"控件高度","value":""},{"id":"required","editor":"radio","text":"是否必填","value":"required"},{"id":"option","text":"选项配置","value":{"type":"data","url":"","textField":"","idField":"","dataField":"","resultAsTree":"","parentField":"","pagesize":"","data":[{"id":"true","text":"是","expanded":false,"_level":0},{"id":"false","text":"否","expanded":false,"_level":0}]}}],"id":"0b0b931bffd23fd35457489b5ef2f6ec","cls":"mini-radiobuttonlist","typeName":"单选","type":"radio"},{"config":{},"properties":[{"id":"comment","editor":"textbox","comment":"控件的中文描述","text":"描述","value":"基本信息"},{"id":"type","editor":"textbox","text":"控件类型","value":"基本信息"},{"id":"width","text":"控件宽度","value":12},{"id":"size","text":"控件宽度","value":12,"hide":true},{"id":"height","text":"控件高度"},{"id":"fontSize","text":"字体大小","value":19},{"id":"align","text":"横向对齐","value":"center"},{"id":"verticalAlign","text":"纵向对齐","value":"top"}],"id":"adbf50e5465546f02b09a2be3d0c7d02","typeName":"文本标签","type":"text"}]} \ No newline at end of file diff --git a/hsweb-ui/admin/dashboard/dashboard.js b/hsweb-ui/admin/dashboard/dashboard.js new file mode 100644 index 0000000..5ac6d3b --- /dev/null +++ b/hsweb-ui/admin/dashboard/dashboard.js @@ -0,0 +1,126 @@ +define(['request',"message"], function (request,message) { + + function executeDashboard(id, call) { + request.get("dashboard/" + id + "/execute", function (response) { + if (response.status === 200) { + call(response.result); + } + }) + } + + var builders = { + "static": function (conf, container, events, id) { + var js = conf.js; + container.html(conf.html); + try { + if (js) { + eval("(function(){return function(){" + + "\n" + + js + + "\n" + + "}})()") + .call({ + html: container, + events: events, + message:message, + request:request, + getData: function (call) { + executeDashboard(id, call); + } + }); + } + } catch (e) { + console.error("执行js错误", js, e) + } + }, + "charts": function (conf, container, events, id) { + + var body = $("
").css("height", "100%"); + var c = body[0]; + container.html("").append(body); + var js = conf.js; + require(['echarts'], function (echarts) { + var chart = echarts.init(c); + var option = { + // title: { + // // text: '统计报表' + // }, + tooltip: {}, + legend: { + // data: ['销量'] + }, + xAxis: { + data: ["一月", "二月", "三月", "四月", "五月", "袜子"] + }, + yAxis: {}, + series: [{ + // name: '销量', + type: 'bar', + data: [5, 20, 36, 10, 10, 20] + }] + }; + try { + if (js) { + eval("(function(){return function(){" + + "\n" + + js + + "\n" + + "}})()") + .call({ + html: container, + events: events, + message:message, + request:request, + option: option, + chart: chart, + getData: function (call) { + executeDashboard(id, call); + }, + setOption: function (o) { + chart.setOption(o); + } + }); + } + } catch (e) { + console.error("执行js错误", js, e) + } + chart.setOption(option); + + }) + } + }; + + function DashBoard(config) { + this.init = function () { + var el = $(config.target); + var dashboards = config.config; + $(dashboards).each(function () { + var dashboard = this; + var template = JSON.parse(dashboard.template); + var body = $("
").addClass("mini-col-" + (template.width || 6)); + var panel = $("
") + .addClass("mini-panel") + .attr({ + id: "dashboard-" + dashboard.id, + title: dashboard.name, + width: "auto", + showCollapseButton: false, + showCloseButton: false + }); + + var builder = builders[dashboard.type]; + if (builder) { + var fit = $("
") + .css("height", template.height + "px") + panel.append(fit); + var events = {}; + builder(template, fit, events, dashboard.id); + } + body.append(panel); + el.append(body); + }); + } + } + + return DashBoard; +}) \ No newline at end of file diff --git a/hsweb-ui/admin/dashboard/list.html b/hsweb-ui/admin/dashboard/list.html new file mode 100644 index 0000000..50d574b --- /dev/null +++ b/hsweb-ui/admin/dashboard/list.html @@ -0,0 +1,43 @@ + + + + + + + 仪表盘配置 + + + + + +
+ + + + + + +
+
+
+
+
拖动可排序
+
配置名称
+
配置类型
+
是否启用
+ +
操作
+
+
+
+ + \ No newline at end of file diff --git a/hsweb-ui/admin/dashboard/list.js b/hsweb-ui/admin/dashboard/list.js new file mode 100644 index 0000000..758359f --- /dev/null +++ b/hsweb-ui/admin/dashboard/list.js @@ -0,0 +1,95 @@ +importResource("/admin/css/common.css"); + +importMiniui(function () { + require(["request", "miniui-tools"], function (request, tools) { + mini.parse(); + var grid = window.grid = mini.get("datagrid"); + tools.initGrid(grid); + + grid.setAutoLoad(false); + grid.setUrl(request.basePath + "dashboard?paging=false&excludes="+(['template','script','scriptLanguage'].join(","))); + + grid.getColumn("type").renderer = function (e) { + return e.value === 'static' ? "静态" : "图表"; + } + + function saveSortIndex() { + $(grid.getData()).each(function (index,node) { + request.put("dashboard/"+node.id,{sortIndex:index},function (response) { + // if(response.status!==200){ + // mini.alert("提交失败:"+response.message+",错误码:"+response.requestId); + // } + }) + }) + } + grid.on('drop',function (e) { + saveSortIndex(); + }) + + grid.getColumn("status").renderer = function (e) { + var html; + var row = e.record; + if (e.value === 1) { + html = tools.createActionButton("点击禁用", "fa fa-check text-success", function () { + grid.loading("提交中..."); + + request.put("dashboard/"+row.id,{status:0},function (response) { + e.sender.unmask(); + + if(response.status===200){ + e.sender.updateNode(row,{status:0}); + e.sender.accept(); + }else{ + mini.alert("提交失败:"+response.message+",错误码:"+response.requestId); + } + }) + }) + }else{ + html = tools.createActionButton("点击启用", "fa fa-times text-danger", function () { + grid.loading("提交中..."); + request.put("dashboard/"+row.id,{status:1},function (response) { + e.sender.unmask(); + if(response.status===200){ + e.sender.updateNode(row,{status:1}); + e.sender.accept(); + }else{ + mini.alert("提交失败:"+response.message+",错误码:"+response.requestId); + } + }) + }) + } + return html; + } + + + function search() { + tools.searchGrid("#search-box", grid); + } + + $(".search-button").click(search); + tools.bindOnEnter("#search-box", search); + $(".add-button").click(function () { + tools.openWindow("admin/dashboard/save.html", "添加配置", '80%', "600", function (e) { + grid.reload(); + }) + }); + search(); + + function edit(id) { + tools.openWindow("admin/dashboard/save.html?id=" + id, "添加配置", "80%", "600", function (e) { + grid.reload(); + }) + } + + window.renderAction = function (e) { + var row = e.record; + var html = [ + tools.createActionButton("编辑", "icon-edit", function () { + edit(row.id); + }) + ]; + return html.join(""); + } + + }); +}); diff --git a/hsweb-ui/admin/dashboard/save.html b/hsweb-ui/admin/dashboard/save.html new file mode 100644 index 0000000..d2dff7f --- /dev/null +++ b/hsweb-ui/admin/dashboard/save.html @@ -0,0 +1,72 @@ + + + + + + + 仪表盘配置 + + + + +
+
+
+ +
+
+
+
+
+

+                            
+
+ +

+                            
+
+
+
+ 脚本类型: +
+

+                        
+
+
+
+ +
+
+
+ +
+
+
+
+ + \ No newline at end of file diff --git a/hsweb-ui/admin/dashboard/save.js b/hsweb-ui/admin/dashboard/save.js new file mode 100644 index 0000000..4c965a7 --- /dev/null +++ b/hsweb-ui/admin/dashboard/save.js @@ -0,0 +1,136 @@ +importResource("/admin/css/common.css"); +require(["css!pages/form/designer-drag/defaults"]); +var scriptLanguage = [ + {id: "sql"}, + {id: "javascript"}, + {id: "groovy"} +] +importMiniui(function () { + mini.parse(); + var mainForm; + + + var scriptEditor, jsEditor, htmlEditor; + + var nowEditor = { + getTemplate: function () { + var template = { + html: htmlEditor.getScript(), + js: jsEditor.getScript(), + width: mini.getbyName("width").getValue(), + height: mini.getbyName("height").getValue() + }; + return JSON.stringify(template); + }, + setTemplate: function (template) { + htmlEditor.setScript(template.html); + jsEditor.setScript(template.js); + mini.getbyName("height").setValue(template.height); + mini.getbyName("width").setValue(template.width); + } + } + + + require(["request", "miniui-tools", 'pages/form/designer-drag/parser', 'script-editor'], function (request, tools, FormParser, editorBuilder) { + + editorBuilder.createEditor("script", function (editor) { + scriptEditor = editor; + editor.init("javascript", "//后台执行,返回数据"); + }); + editorBuilder.createEditor("js-script", function (editor) { + jsEditor = editor; + editor.init("javascript", "var html=this.html;"); + }); + editorBuilder.createEditor("html-script", function (editor) { + htmlEditor = editor; + editor.init("html", "
"); + }); + + var dataId = request.getParameter("id"); + require(["text!config-form.hf", "pages/form/designer-drag/components-default"], function (config) { + mainForm = new FormParser(JSON.parse(config)); + mainForm.render($("#basic-info")); + + if (dataId) { + loadData(dataId); + } else { + mini.getbyName("type").setValue('static'); + mini.getbyName("scriptLanguage").setValue("javascript"); + } + }); + + + $(".save-button").on("click", (function () { + require(["message"], function (message) { + var data = getData(true); + if (!data) { + return; + } + if (dataId) { + data.id = dataId; + } else { + data.status = 1; + } + var loading = message.loading("提交中"); + + request.patch('dashboard', data, function (response) { + loading.hide(); + if (response.status === 200) { + dataId = response.result; + message.showTips("提交成功") + } else { + mini.alert(response.message); + } + }) + }); + })); + + + function doReview() { + require(['dashboard'], function (DashBoard) { + new DashBoard({ + target: $('.preview').html(''), + config: getData(false) + }).init(); + }) + } + + mini.get("tabs").on("activechanged", function (tab) { + if (tab.name === 'preview') { + doReview(); + } + }); + + function getData(validate) { + var fromData = mainForm.getData(validate); + if (dataId) { + fromData.id = dataId; + } + fromData.script = scriptEditor.getScript(); + fromData.scriptLanguage = mini.getbyName("scriptLanguage").getValue(); + fromData.template = nowEditor.getTemplate(); + + return fromData; + } + + function loadData(id) { + require(["request", "message"], function (request, message) { + var loading = message.loading("加载中..."); + request.get("dashboard/" + id, function (response) { + loading.hide(); + if (response.status === 200) { + mainForm.setData(response.result); + nowEditor.setTemplate(JSON.parse(response.result.template)); + mini.getbyName("scriptLanguage").setValue(response.result.scriptLanguage); + scriptEditor.init(response.result.scriptLanguage || "javascript", response.result.script); + + } else { + message.showTips("加载数据失败", "danger"); + } + }); + }); + } + }); +}); + + diff --git a/hsweb-ui/admin/datasource/list.html b/hsweb-ui/admin/datasource/list.html new file mode 100644 index 0000000..87a1efb --- /dev/null +++ b/hsweb-ui/admin/datasource/list.html @@ -0,0 +1,38 @@ + + + + + + + 数据源管理 + + + + + +
+ + + + + + + +
+
+
+
+
ID
+
名称
+
url
+
username
+
操作
+
+
+
+ + \ No newline at end of file diff --git a/hsweb-ui/admin/datasource/list.js b/hsweb-ui/admin/datasource/list.js new file mode 100644 index 0000000..3d4a25e --- /dev/null +++ b/hsweb-ui/admin/datasource/list.js @@ -0,0 +1,42 @@ +importResource("/admin/css/common.css"); + +importMiniui(function () { + mini.parse(); + require(["request", "miniui-tools"], function (request, tools) { + + var grid = window.grid = mini.get("datagrid"); + tools.initGrid(grid); + + grid.setUrl(request.basePath + "datasource/config"); + + function search() { + tools.searchGrid("#search-box", grid); + } + + $(".search-button").click(search); + tools.bindOnEnter("#search-box", search); + $(".add-button").click(function () { + tools.openWindow("admin/datasource/save.html", "添加数据源", "650", "530", function (e) { + grid.reload(); + }) + }); + search(); + function edit(id) { + tools.openWindow("admin/datasource/save.html?id=" + id, "编辑数据源", "650", "530", function (e) { + grid.reload(); + }) + } + + window.renderAction = function (e) { + var row = e.record; + + var html = [ + tools.createActionButton("编辑", "icon-edit", function () { + edit(row.id); + }) + ]; + return html.join(""); + } + + }); +}); diff --git a/hsweb-ui/admin/datasource/save.html b/hsweb-ui/admin/datasource/save.html new file mode 100644 index 0000000..29e953b --- /dev/null +++ b/hsweb-ui/admin/datasource/save.html @@ -0,0 +1,57 @@ + + + + + + + 用户管理 + + + +
+ + + + + + + + + + + + + +
ID: + +
名称: + +
备注: + +
+
+
+
+
配置 + +
+
值 + +
+
+ + 操作 + + +
+
+
+
+
+ 保存 +
+
+ + \ No newline at end of file diff --git a/hsweb-ui/admin/datasource/save.js b/hsweb-ui/admin/datasource/save.js new file mode 100644 index 0000000..9f51ac2 --- /dev/null +++ b/hsweb-ui/admin/datasource/save.js @@ -0,0 +1,106 @@ +importResource("/admin/css/common.css"); + + +var defaultPassword = Math.random() + ""; + +importMiniui(function () { + mini.parse(); + require(["request", "miniui-tools"], function (request, tools) { + var api = "datasource/config"; + var func = request.patch; + var id = request.getParameter("id"); + mini.get("datagrid").getColumn("action").renderer = function (e) { + return tools.createActionButton("删除", "icon-remove", function () { + e.sender.removeRow(e.record); + }) + }; + + if (id) { + loadData(id); + } else { + mini.get("datagrid").setData([ + { + key: "driverClassName" + }, + { + key: "url" + }, + { + key: "username" + }, + { + key: "password" + }, + { + key: "type", value: "com.alibaba.druid.pool.DruidDataSource" + }, + { + key: "initTimeout", value: "10" + } + ]); + } + $(".save-button").on("click", (function () { + require(["message"], function (message) { + var data = getDataAndValidate(); + if (!data) return; + var loading = message.loading("提交中"); + func(api, data, function (response) { + loading.close(); + if (response.status === 200) { + message.showTips("保存成功"); + if (!id) id = response.result; + } else { + message.showTips("保存失败:" + response.message, "danger"); + if (response.result) + tools.showFormErrors("#basic-info", response.result); + } + }) + }); + })); + }); +}); + +function loadData(id) { + require(["request", "message"], function (request, message) { + var loading = message.loading("加载中..."); + request.get("datasource/config/" + id, function (response) { + loading.hide(); + if (response.status === 200) { + response.result.password = defaultPassword; + new mini.Form("#basic-info").setData(response.result); + var properties = []; + for (var key in response.result.properties) { + properties.push({key: key, value: response.result.properties[key]}) + } + properties.sort(function (i1, i2) { + if (i1.key > i2.key) { + return -1; + } else if (i1.key < i2.key) { + return 1; + } else { + return 0; + } + }); + mini.get("datagrid").setData(properties); + } else { + message.showTips("加载数据失败", "danger"); + } + }); + }); +} + +function getDataAndValidate() { + var form = new mini.Form("#basic-info"); + form.validate(); + if (form.isValid() === false) { + return; + } + var data = form.getData(); + var properties = {}; + $(mini.get("datagrid").getData()) + .each(function () { + properties[this.key] = this.value; + }); + data.properties = properties; + return data; +} diff --git a/hsweb-ui/admin/dictionary/list.html b/hsweb-ui/admin/dictionary/list.html new file mode 100644 index 0000000..0a88e2c --- /dev/null +++ b/hsweb-ui/admin/dictionary/list.html @@ -0,0 +1,85 @@ + + + + + + + 数据字典 + + + +
+ + + + + + + +
+
+
+
+
展开
+
ID + +
+
名称 + +
+
分类 + +
+
备注 + +
+ +
操作
+
+
+ + + +
+ + \ No newline at end of file diff --git a/hsweb-ui/admin/dictionary/list.js b/hsweb-ui/admin/dictionary/list.js new file mode 100644 index 0000000..9e02b12 --- /dev/null +++ b/hsweb-ui/admin/dictionary/list.js @@ -0,0 +1,210 @@ +importResource("/admin/css/common.css"); + +importMiniui(function () { + mini.parse(); + require(["miniui-tools", "request", "message"], function (tools, request, message) { + window.tools = tools; + var server = request.getParameter("server") || ""; + var selector = request.getParameter("selector")||"0"; + + var grid = window.grid = mini.get("datagrid"); + tools.initGrid(grid); + grid.setUrl(API_BASE_PATH + server + "dictionary"); + + var itemsGrid = mini.get("item-grid"); + tools.initGrid(itemsGrid); + itemsGrid.setDataField("result"); + itemsGrid.setAutoLoad(false); + itemsGrid.setUrl(API_BASE_PATH + server + "dictionary-item/no-paging"); + + itemsGrid.getColumn("status").renderer = function (e) { + return e.value === 1 ? "是" : "否"; + }; + grid.getColumn("action").renderer = function (e) { + var html = []; + var row = e.record; + if(selector==='1'&&row._state !== 'added'){ + html.push(tools.createActionButton("选择", "icon-ok", function () { + tools.closeWindow(row.id); + })); + } + if (row._state === 'added' || row._state === 'modified') { + html.push(tools.createActionButton("保存", "icon-save", function () { + if (!row.id) { + message.showTips("请输入ID", "danger") + return; + } + var loading = message.loading("保存中..."); + request.patch(server + "dictionary", row, function (resp) { + loading.hide(); + if (resp.status === 200) { + e.sender.acceptRecord(row); + } else { + message.showTips(resp.message, "danger"); + } + }); + })); + } + html.push(tools.createActionButton("删除", "icon-remove", function () { + if (row._state === 'added') { + e.sender.removeNode(row); + } else { + message.confirm("是否删除此数据字典", function () { + var loading = message.loading("删除中..."); + request['delete'](server + "dictionary/" + row.id, function (resp) { + loading.hide(); + if (resp.status === 200) { + e.sender.removeRow(row); + } else { + message.showTips(resp.message, "danger"); + } + }); + }) + + } + })); + return html.join(""); + } + itemsGrid.getColumn("action").renderer = function (e) { + + var html = []; + if (e.record._state === 'added' || e.record._state === 'modified') { + html.push(tools.createActionButton("保存", "icon-save", function () { + var node = e.record; + node.dictId = nowSelectDict.id; + var loading = message.loading("保存中..."); + request.patch(server + "dictionary-item/", node, function (resp) { + loading.hide(); + if (resp.status === 200) { + node.id = resp.result; + e.sender.updateNode(node, node); + e.sender.acceptRecord(node); + } else { + message.showTips(resp.message, "danger"); + } + }); + })); + } + html.push(tools.createActionButton("删除", "icon-remove", function () { + var node = e.record; + if (node._state === 'added') { + e.sender.removeNode(node); + } else { + message.confirm("是否删除此选项", function () { + var loading = message.loading("删除中..."); + request['delete'](server + "dictionary-item/" + node.id, function (resp) { + loading.hide(); + if (resp.status === 200) { + e.sender.removeNode(node); + } else { + message.showTips(resp.message, "danger"); + } + }); + }) + + } + })); + + return html.join(""); + } + + function search() { + tools.searchGrid("#search-box", grid); + } + + var itemsForm = document.getElementById("itemsForm"); + var nowSelectDict; + $('.add-item-button').on("click", function () { + var items = itemsGrid.getData(); + var ordinal = 0; + $(items).each(function () { + if (ordinal < parseInt(this.ordinal)) { + ordinal = parseInt(this.ordinal); + } + }); + itemsGrid.addNode({ + status: 1, + ordinal: ordinal + 1, + dictId: nowSelectDict.id, + sortIndex: items.length + }); + }); + $(".save-all-item").on("click", function () { + var loading = message.loading("保存中..."); + $(itemsGrid.getData()).each(function (idx, item) { + item.sortIndex = idx; + }); + request.patch(server + "dictionary-item/batch", itemsGrid.getData(), function (response) { + loading.hide(); + if (response.status === 200) { + itemsGrid.reload(); + } else { + message.showTips(response.message, "danger"); + } + }) + }); + $(".add-dict-button").on("click", function () { + var row = {status: 1}; + grid.addRow(row); + grid.select(row); + grid.beginEditRow(row); + }); + + function searchItem() { + var id = nowSelectDict.id || "-1"; + var params = request.createQuery().where("dictId", id).getParams(); + itemsGrid.load(params); + } + + grid.on("cellbeginedit", function (e) { + if (e.field === 'id' && e.record._state !== 'added') { + e.cancel = true; + } + }); + grid.on("showRowDetail", function (e) { + var grid = e.sender; + var row = nowSelectDict = e.record; + var td = grid.getRowDetailCellEl(row); + td.appendChild(itemsForm); + itemsForm.style.display = "block"; + searchItem(); + }); + + $(".search-button").click(search); + tools.bindOnEnter("#search-box", search); + $(".add-button").click(function () { + tools.openWindow("admin/role/save.html", "添加字典", "600", "300", function (e) { + grid.reload(); + }) + }); + search(); + }); +}); + +window.renderStatus = function (e) { + return e.value == 1 ? "是" : "否"; +} + +function edit(id) { + tools.openWindow("admin/role/save.html?id=" + id, "编辑角色", "600", "300", function (e) { + grid.reload(); + }) +} + +window.renderAction = function (e) { + var row = e.record; + + var html = [ + tools.createActionButton("编辑", "icon-edit", function () { + edit(row.id); + }) + ]; + html.push( + tools.createActionButton("角色赋权", "icon-find", function () { + tools.openWindow("admin/autz-settings/setting.html?priority=20&merge=true&type=role&settingFor=" + row.id, "角色赋权-" + row.name, "800", "600", function () { + + }); + }) + ) + return html.join(""); +} diff --git a/hsweb-ui/admin/file/manager.html b/hsweb-ui/admin/file/manager.html new file mode 100644 index 0000000..fe355b6 --- /dev/null +++ b/hsweb-ui/admin/file/manager.html @@ -0,0 +1,57 @@ + + + + + 文件管理 + + + + +
+
+ + + + + + + + + + +
+
+
+
+
+
    +
+
+
+
+
+

+                    
+                
+
+
+
+
+ + \ No newline at end of file diff --git a/hsweb-ui/admin/file/manager.js b/hsweb-ui/admin/file/manager.js new file mode 100644 index 0000000..f0a1922 --- /dev/null +++ b/hsweb-ui/admin/file/manager.js @@ -0,0 +1,147 @@ +importResource("/admin/css/common.css"); + +importMiniui(function () { + mini.parse(); + + var tree = mini.get('fileTree'); + var fileLocationEditor = mini.getbyName("fileLocation"); + + tree.on("drawnode", function (e) { + var node = e.node; + if (node.dir) { + // e.iconCls="fa fa-folder-open"; + } else { + + } + }); + tree.setAjaxType("GET"); + tree.setDataField("result"); + + function sort(list) { + list.sort(function (f, s) { + return f.dir ? s.dir ? 0 : -1 : 1; + }); + return list; + } + + function init(list) { + $(list).each(function () { + if (this.dir) { + this.expanded = false; + this.children = [ + {name: "加载中..."} + ] + } + }); + return list; + } + + var scriptEditor; + + require(['script-editor'], function (buidler) { + buidler.createEditor('script-editor', function (editor) { + scriptEditor = editor; + }) + }); + + + function getFileType(file) { + return file.split(".").splice(-1); + } + + require(['request', "message"], function (request, message) { + fileLocationEditor.on("enter", function () { + load(); + }); + load(); + $(".reload-file").on('click',function () { + load(); + }); + + function createScriptEditorMapping(lang) { + return function (node) { + $(".editor").hide(); + $("#script-editor").show(); + request.get('dev/tools/file/read', {file: node.absolutePath}, function (e) { + scriptEditor.init(lang, e.result); + }) + } + } + + var formEditorFrame = $("#form-editor"); + var formEditorWindow = formEditorFrame[0].contentWindow; + + var fileEditorMapping = { + "java": createScriptEditorMapping('java'), + "js": createScriptEditorMapping('javascript'), + "html": createScriptEditorMapping('html'), + "xml": createScriptEditorMapping('xml'), + "json": createScriptEditorMapping('json'), + "css": createScriptEditorMapping('css'), + "sh": createScriptEditorMapping('sh'), + "md": createScriptEditorMapping('markdown'), + + "hf": function (node) { + $(".editor").hide(); + $("#form-editor").show(); + request.get('dev/tools/file/read', {file: node.absolutePath}, function (e) { + formEditorWindow.designer.loadConfig(JSON.parse(e.result)); + formEditorWindow.mini.parse(); + formEditorWindow.save = function () { + saveFile(node.absolutePath, JSON.stringify(formEditorWindow.designer.getConfig())); + } + }) + } + }; + + function saveFile(file, body) { + request.post("dev/tools/file/write", [{file: file, type: "file", template: body}], function (response) { + if (response.status === 200) { + message.showTips("保存成功") + }else{ + message.showTips(response.message,'danger'); + } + }); + } + + $('#script-editor').show(); + tree.on('nodeselect', function (e) { + if (e.node.file) { + var fileType = getFileType(e.node.name); + var func = fileEditorMapping[fileType]; + if (func) { + func(e.node); + } + } + }); + + function load() { + getFileList(fileLocationEditor.getValue(), function (list) { + tree.setData(init(sort(list))); + }); + } + + tree.on("beforeexpand", function (e) { + var node = e.node; + if (node.loaded) { + return; + } + e.cancel = true; + node.children = []; + getFileList(node.absolutePath, function (list) { + tree.addNodes(init(sort(list)), node); + tree.expandNode(node, false); + node.loaded = true; + }) + }); + + + function getFileList(path, callback) { + request.get("dev/tools/file/list", {path: path}, function (e) { + if (e.status === 200) { + callback(e.result); + } + }) + } + }); +}); \ No newline at end of file diff --git a/hsweb-ui/admin/form/designer-drag/components-default.js b/hsweb-ui/admin/form/designer-drag/components-default.js index d19fe5d..a0eaddb 100644 --- a/hsweb-ui/admin/form/designer-drag/components-default.js +++ b/hsweb-ui/admin/form/designer-drag/components-default.js @@ -5,12 +5,13 @@ var properties = [ { id: "name", - editor: "textbox", + comment: "由字母数字或下划线组成", text: "字段", value: "" }, { id: "comment", editor: "textbox", + comment: "控件的中文描述", text: "描述", value: "新建控件" }, createTrueOrFalseEditor("showComment", "显示描述", "true"), { @@ -52,7 +53,7 @@ return html; } }, { - id: "size", + id: "width", text: "控件宽度", value: "4", createEditor: function (component, text, value, call) { @@ -65,7 +66,30 @@ value: value, slide: function () { if (call) call() - component.setProperty("size", arguments[1].value); + component.setProperty("width", arguments[1].value); + } + }); + return html; + } + }, { + id: "height", + text: "控件高度", + value: "", + createEditor: function (component, text, value, call) { + var html = $("
"); + html.slider({ + orientation: "horizontal", + range: "min", + min: 30, + max: 800, + value: value, + slide: function () { + if (call) call(); + if (parseInt(arguments[1].value) <= 30) { + component.setProperty("height", undefined); + } else { + component.setProperty("height", arguments[1].value); + } } }); return html; @@ -78,7 +102,6 @@ value: "undefined", createEditor: function (component, text, value) { var checkbox = $(""); - checkbox.attr("data", JSON.stringify([{id: "required", text: "是"}, { id: 'undefined', checked: true, @@ -133,7 +156,7 @@ } } - function createScriptEditor(id, text, lang) { + function createScriptEditor(id, text, lang, dft) { return { id: id, text: text, @@ -142,7 +165,7 @@ createEditor: function (component, text, value) { var button = $(""); window['edit_script_' + id] = function () { - editScript(lang, component.getProperty(id).value || "", null, function (editor) { + editScript(lang, component.getProperty(id).value || dft || "", null, function (editor) { component.setProperty(id, editor.getScript()); mini.parse(); }); @@ -186,6 +209,15 @@ } } + var template = (function () { + var pattern = /\{(\w*[:]*[=]*\w+)\}(?!})/g; + return function (template, json) { + return template.replace(pattern, function (match, key, value) { + return json[key] || ''; + }); + } + })(); + /**基础组件**/ { @@ -200,45 +232,19 @@ this.removeProperty("required"); this.removeProperty("emptyText"); this.getProperty("comment").value = "占位"; - this.getProperty("size").value = "12"; - this.properties.push( - { - id: "height", - text: "高度", - value: 40, - createEditor: function (component, text, value, call) { - if (!value) { - value = 1; - } - var html = $("
"); - html.slider({ - orientation: "horizontal", - range: "min", - min: 1, - max: 200, - value: parseInt(value), - slide: function () { - if (call) call(); - var val = parseInt(arguments[1].value); - - component.setProperty("height", val === 1 ? "" : val); - mini.parse(); - } - }); - return html; - } - } - ); + this.getProperty("width").value = "12"; } createClass(Hidden); Hidden.prototype.render = function () { + var me = this; var container = this.getContainer(function () { var m = $("
"); - var c = $("
"); + var c = $("
"); var label = $("") .text("占位"); + c.css("height", me.getProperty("height").value || 37); c.append(label); m.append(c); return m; @@ -247,8 +253,7 @@ .on('propertiesChanged', function (key, value) { if (key === 'comment') { container.find("legend").text(value); - } - else if (key === 'height') { + } else if (key === 'height') { container.find("fieldset").css("height", value); } else { container.find("legend").attr(key, value); @@ -271,7 +276,7 @@ this.removeProperty("name"); this.removeProperty("required"); this.getProperty("comment").value = "分割"; - this.getProperty("size").value = "12"; + this.getProperty("width").value = "12"; } createClass(FieldSet); @@ -313,35 +318,9 @@ this.removeProperty("required"); this.removeProperty("emptyText"); this.removeProperty("showComment"); + // this.removeProperty("height"); this.getProperty("comment").value = "文本标签"; - this.getProperty("size").value = "1"; - this.properties.push( - { - id: "bodyHeight", - text: "高度", - value: 1, - comment: "设置为最小值,高度为自动", - createEditor: function (component, text, value, call) { - if (!value) { - value = 1; - } - var html = $("
"); - html.slider({ - orientation: "horizontal", - range: "min", - min: 1, - max: 200, - value: parseInt(value), - slide: function () { - if (call) call(); - var val = parseInt(arguments[1].value); - component.setProperty("bodyHeight", val <= 2 ? "" : val); - } - }); - return html; - } - } - ); + this.getProperty("width").value = "1"; this.properties.push( { id: "fontSize", @@ -465,87 +444,371 @@ componentRepo.registerComponent("text", Text); } + var logicSupport = { + "is": function (s, t) { + return (s + "") === (t + ""); + }, "lt": function (s, t) { + return parseFloat(s) < parseFloat(t); + }, "gt": function (s, t) { + return parseFloat(s) > parseFloat(t); + }, "gte": function (s, t) { + return parseFloat(s) >= parseFloat(t); + }, "lte": function (s, t) { + return parseFloat(s) <= parseFloat(t); + } + }; + + var targetSupport = { + "value": function (conf, component) { + return conf.target; + }, + "component": function (conf, component) { + var target = conf.target; + if (component.parser) { + var targetComp = component.parser.get(target); + if (targetComp.getValue) { + return targetComp.getValue(); + } + if (targetComp.inputId) { + return mini.get(targetComp.inputId).getValue(); + } + } + return null; + }, + "currentTime": function (conf, comp) { + return new Date(); + } + }; + + /** + * [ + * "conditions":[ + * {"type":"logic","logic":"=",targetType:"component | value | currentTime",target:"1"} + * ], + * operation: [ + * {"type":"component-operation",action:"hide", "target":"user,age"}, + * {"type":"show-message","message":"呵呵"}, + * {"type":"script","message":"alert(1234)"} + * ] + * ] + */ + var fireSupport = { + "conditions": { + "logic": function (conf, component) { + var logic = logicSupport[conf.logic]; + var target = targetSupport[conf.targetType]; + var thisValue = this.value || component.getValue(); + var targetValue = target ? target(conf, component) : null; + + return logic && logic(thisValue, targetValue); + + }, + "always": function (conf, component) { + return true; + }, + "script": function (conf, component) { + var script = conf.script; + if (script) { + try { + var func = eval("(function(){return function(component,me){" + + "\n" + + script + + "\n" + + "}})()"); + return func.call(this, component, component); + } catch (e) { + console.log("执行控件变更事件条件脚本失败", this, e); + return false; + } + } + } + }, + "operations": { + "component-operation": function (conf, component) { + var target = conf.target; + var action = conf.action; + var targetComponent = function () { + return component.parser ? component.parser.get(target) : null; + }(); + if (!targetComponent) { + log.warn("无法获取到要操作的控件:", target, " config:", conf) + return; + } + if (action === 'hide') { + targetComponent.hide(); + } else if (action === 'writeAble') { + targetComponent.setReadOnly(false); + } else if (action === 'readonly') { + targetComponent.setReadOnly(true); + } else if (action === 'show') { + targetComponent.show(); + } else if (action === 'setValue') { + if (targetComponent.setValue) { + targetComponent.setValue(conf.value); + } + } + }, + "message": function (conf) { + if (window.message) { + message.alert(conf.message); + } else { + require(['message'], function (message) { + message.alert(conf.message); + }) + } + }, + "script": function (conf, component) { + var script = conf.script; + if (script) { + try { + var func = eval("(function(){return function(component,me){" + + "\n" + + script + + "\n" + + "}})()"); + func.call(this, component, component); + } catch (e) { + console.log("执行控件变更事件操作脚本失败", this, e); + return; + } + } + } + } + } + /**单行文本**/ function TextBox(id) { Component.call(this); this.id = id; this.properties = createDefaultEditor(); this.getProperty("comment").value = "单行文本"; + // this.properties.push({ + // id: "onValueChanged", + // editor: "textbox", + // text: "值变更事件", + // script: true, + // fire: function (component) { + // var value = component.getProperty('onValueChanged').value; + // var source = this; + // if (!value) { + // return ""; + // } + // if (typeof value === "string") { + // value = JSON.parse(value); + // } + // $(value).each(function () { + // var conf = this; + // for (var i = 0; i < conf.conditions.length; i++) { + // var condition = conf.conditions[i]; + // var support = fireSupport.conditions[condition.type]; + // if (!support || !support.call(source, condition, component)) { + // return; + // } + // } + // for (var i = 0; i < conf.operations.length; i++) { + // var operation = conf.operations[i]; + // var support = fireSupport.operations[operation.type]; + // if (support) { + // support.call(source, operation, component); + // } + // } + // }); + // + // }, + // createEditor: function (component, text, value, call) { + // + // return ""; + // } + // }) } { createClass(TextBox); TextBox.icon = "iconfont icon-danhangshurukuang"; TextBox.prototype.typeName = "单行文本"; + TextBox.prototype.setHeight = function (height) { + if (!height || height <= 1) { + height = ""; + } + if (this.setBodyHeight) { + this.container.find(".component-body") + .first() + .css("height", height ? height + "px" : ""); + } else { + this.container.css("height", height ? height + "px" : ""); + } + }; + TextBox.prototype.setValue = function (value) { + this.value = value; + var input = mini.get(this.inputId); + if (input) { + input.setValue(value); + } + }; - TextBox.prototype.render = function () { + TextBox.prototype.loadData = function (autoParse) { var me = this; + var optionConfig = this.getProperty("option").value; + if (!optionConfig) { + return; + } + var cache = window.optionCache || (window.optionCache = {}); - function createInput() { - var input = $(""); - input.addClass(me.cls || "mini-textbox"); - $(me.properties).each(function () { - var value = this.getValue ? this.getValue(me) : this.value; - var property = this; - if (this.id) { - if (this.id === 'type') { - return; - } - if (this.id === 'height') { - input.css("height", value); + var input = mini.get(this.inputId); + if (!input) { + if (autoParse !== false) { + mini.parse(); + input = mini.get(this.inputId); + } + if (!input) { + var container = me.container; + var inputHtml = container.find("input"); + inputHtml.attr(optionConfig); + if (optionConfig.type === 'data') { + cache[me.id] = optionConfig.data; + inputHtml.attr("data", "window.optionCache._data_" + me.id) + } + } + } else { + if (optionConfig.type === 'url') { + input.setTextField(optionConfig.textField || 'text'); + input.setValueField(optionConfig.idField || "id"); + input.setDataField(optionConfig.dataField || "result.data"); + input.setAjaxType(optionConfig.ajaxType || "GET"); + if (input.setClearOnLoad) { + input.setClearOnLoad(false); + } + if (input.setParentField) + input.setParentField(optionConfig.parentField || "parentId"); + if (input.setResultAsTree) + input.setResultAsTree(optionConfig.resultAsTree || "false"); + if (cache[optionConfig.url]) { + input.setData(cache[optionConfig.url]); + } else { + function getProperty(obj, field) { + var fs = field.split("."); + var tmp = obj; + for (var i = 0; i < fs.length; i++) { + var v = fs[i]; + if (!tmp) { + return null; + } + tmp = tmp[v]; + } + return tmp; } - //脚本 - if (this.script) { - var scriptId = "script_" + (Math.round(Math.random() * 100000000)); - window[scriptId] = function (obj) { - try { - var func = eval("(function(){return function(component){" + + + require(['request'], function (request) { + request.get(optionConfig.url, function (response) { + if (response.status === 200) { + var data = getProperty(response, optionConfig.dataField || "result.data"); + if (input.loadList && optionConfig.resultAsTree + "" === 'false') { + input.loadList(data); + } else { + input.setData(data); + } + if (me.value) { + input.setValue(me.value); + } + } + }) + }) + } + // input.setUrl(window.API_BASE_PATH + optionConfig.url); + } else if (optionConfig.type === 'data') { + input.setData(optionConfig.data); + } + } + }; + + TextBox.prototype.createInput = function () { + var me = this; + var container = this.container; + var inputId = "I" + (Math.round(Math.random() * 1000000000)); + me.inputId = inputId; + var input = $(""); + input.attr("id", inputId); + input.addClass(me.cls || "mini-textbox"); + $(me.properties).each(function () { + var value = this.getValue ? this.getValue(me) : this.value; + var property = this; + if (this.id) { + if (this.id === 'type') { + return; + } + if (this.id === 'height') { + input.css("height", value); + } + //脚本 + if (this.script) { + var scriptId = "script_" + (Math.round(Math.random() * 100000000)); + window[scriptId] = function (obj) { + try { + var func = property.fire ? property.fire : + eval("(function(){return function(component){" + "\n" + - property.value + + (property.getScript ? property.getScript : property.value) + "\n" + "}})()"); - func.call(obj, me); - } catch (e) { - console.log("执行控件脚本失败", this, e); - return; - } - }; - value = scriptId; - } - //数据选项 - if (this.id === 'option') { - var optionConfig = value; - if (optionConfig.type === 'url') { - input.attr("url", window.API_BASE_PATH + optionConfig.url); - input.attr("textField", optionConfig.textField || 'text'); - input.attr("idField", optionConfig.idField || "id"); - input.attr("dataField", optionConfig.dataField || "text"); - input.attr("ajaxType", optionConfig.ajaxType || "GET"); - input.attr("parentField", optionConfig.parentField || "parentId"); - input.attr("resultAsTree", optionConfig.resultAsTree || "false"); - } else if (optionConfig.type === 'data') { - if (!window.optionalData) { - window.optionalData = {}; - } - var id = "optional_" + Math.round(Math.random() * 10000); - window.optionalData[id] = optionConfig.data; - value = "window.optionalData." + id; - input.attr("data", value); + func.call(obj, me); + } catch (e) { + console.log("执行控件脚本失败", this, e); + return; } + }; + value = scriptId; + } + //数据选项 + if (this.id === 'option') { + var optionConfig = value; + + } else if (this.id === 'showComment') { + if (this.value + "" === 'true') { + container.find(".form-item") + .removeClass("hide-comment"); } else { - input.attr(this.id, value); + container.find(".form-item") + .addClass("hide-comment"); } + } else { + input.attr(this.id, value); } - if (!this.value || this.value === 'undefined') { - input.removeAttr(this.id); - } - }); - return input; + } + if (!this.value || this.value === 'undefined') { + input.removeAttr(this.id); + } + }); + return input; + } + + TextBox.prototype.reload = function (autoParse) { + var container = this.container; + var me = this; + + function newInput() { + return container.find(".component-body") + .html("") + .append(me.createInput()); } + newInput(); + if (autoParse !== false) { + mini.parse(); + } + + if (me.loadData) { + window.setTimeout(function () { + me.loadData(autoParse); + }, 50); + } + } + + TextBox.prototype.render = function () { + var me = this; + var isNew = false; var container = this.getContainer(function () { var m = $("
"); - m.addClass("mini-col-" + me.getProperty("size").value) + m.addClass("mini-col-" + me.getProperty("width").value) .addClass("form-component"); var c = $("
"); if (me.formText) { @@ -553,32 +816,24 @@ } var label = $("
"); - var input = createInput(); label.text(me.getProperty("comment").value); - c.append(label).append(inputContainer.append(input)); - var bodyHeight = me.getProperty("bodyHeight").value; - if (bodyHeight) { - inputContainer.css("height", bodyHeight); - } + c.append(label).append(inputContainer); m.append(c); + isNew = true; return m; }); - - function newInput() { - return container.find(".component-body") - .html("") - .append(createInput()); + if (isNew) { + me.reload(); } - this.un("propertiesChanged") .on('propertiesChanged', function (name, value) { - // container.find('.form-label').first().removeAttr("style"); + container.find('.form-label').first().css("display", ""); if (name === 'comment') { - container.find(".form-label").text(value); - } else if (name === 'bodyHeight') { - container.find(".input-block").css("height", value); - } - else if (name === 'showComment') { + value = value.replace(/( )/g, ""); + value = value.replace(/(\*)/g, "*"); + container.find(".form-label").html(value); + } else if (name === 'showComment') { + container.find(".input-block").addClass("component-body"); if (value + "" === 'true') { container.find(".form-label").show(); container.find(".component-body").addClass("input-block"); @@ -586,8 +841,10 @@ container.find(".form-label").hide(); container.find(".component-body").removeClass("input-block"); } + } else if (name === 'bodyHeight') { + container.find(".input-block").css("height", value); } else { - newInput(); + me.reload(); } }); return container; @@ -602,40 +859,26 @@ Component.call(this); this.id = id; this.properties = createDefaultEditor(); - this.getProperty("size").value = 12; + this.getProperty("width").value = 12; this.getProperty("comment").value = "多行文本"; + // this.removeProperty("height"); + this.cls = "mini-textarea"; this.formText = true; - this.properties.push( - { - id: "bodyHeight", - text: "高度", - value: "50", - comment: "设置为最小值,高度为自动", - createEditor: function (component, text, value, call) { - var html = $("
"); - html.slider({ - orientation: "horizontal", - range: "min", - min: 48, - max: 400, - value: parseInt(value), - slide: function () { - if (call) call(); - component.setProperty("bodyHeight", parseInt(arguments[1].value)); - mini.parse(); - } - }); - return html; - } - } - ); } createClass(TextArea, TextBox); + + TextArea.prototype.setHeight = function (height) { + if (!height || height <= 1) { + height = ""; + } + this.setProperty("areaHeight", height); + mini.parse(); + }; + TextArea.icon = "iconfont icon-duohangshurukuang"; TextArea.prototype.typeName = "多行文本"; - componentRepo.registerComponent("textarea", TextArea); } @@ -713,11 +956,11 @@ // }); } + createClass(Combobox, TextBox); + Combobox.icon = "iconfont icon-xialakongjian"; Combobox.prototype.typeName = "下拉列表"; - createClass(Combobox, TextBox); - componentRepo.registerComponent("combobox", Combobox); } @@ -738,10 +981,11 @@ this.getProperty("comment").value = "日期选择"; } + createClass(Datepicker, TextBox); + Datepicker.prototype.typeName = "日期选择"; Datepicker.icon = "iconfont icon-riqixuanze"; - createClass(Datepicker, TextBox); componentRepo.registerComponent("datepicker", Datepicker); } @@ -807,53 +1051,75 @@ createClass(FileUpload); + + FileUpload.prototype.setValue = function (file) { + this.value = file; + this.getValue = function () { + return file; + } + } + FileUpload.prototype.setReadOnly = function (readOnly) { + this.readOnly = readOnly; + var container = this.container; + this.initFileUploader(); + + }; + FileUpload.prototype.initFileUploader = function () { + var container = this.container; + var uploaderContainer = container.find('.file-upload'); + var id = uploaderContainer.attr("id"); + var readOnly = this.readOnly; + var me = this; + + function initUploader(uploader) { + uploaderContainer + .html(readOnly ? "预览文件" : "选择文件"); + if (!readOnly) { + uploaderContainer.removeClass('webuploader-container'); + uploader.initUploader("#" + id, function (file) { + uploaderContainer + .find(".webuploader-pick") + .html("上传成功"); + me.getValue = function () { + return file; + } + }, true); + } else { + uploaderContainer.addClass("webuploader-pick"); + + uploaderContainer.unbind("click") + .on("click", function () { + if (me.onViewFile) { + me.onViewFile(me.getValue()); + } else { + if (me.getValue()) { + window.open(me.getValue()) + } + } + }) + } + } + + if (window.require) { + require(["pages/form/designer-drag/file-upload"], function (uploader) { + initUploader(uploader); + }) + } else { + initUploader(FileUploader); + } + }; FileUpload.prototype.typeName = "文件上传"; FileUpload.prototype.render = function () { var me = this; function createInput() { var input = $(""); - // input.addClass("mini-textbox"); - // $(me.properties).each(function () { - // var value = this.value; - // var property = this; - // if (this.id) { - // if (this.id === 'type') { - // return; - // } - // if (this.id === 'height') { - // input.css("height", value); - // } - // //脚本 - // if (this.script) { - // var scriptId = "script_" + (Math.round(Math.random() * 100000000)); - // window[scriptId] = function (obj) { - // try { - // var func = eval("(function(){return function(component){" + - // "\n" + - // property.value + - // "\n" + - // "}})()"); - // func.call(obj, me); - // } catch (e) { - // console.log("执行控件脚本失败", this, e); - // return; - // } - // }; - // value = scriptId; - // } - // input.attr(this.id, value); - // } - // if (!this.value || this.value === 'undefined') { - // input.removeAttr(this.id); - // } - // }); return input; } var container = this.getContainer(function () { var m = $("
"); - m.addClass("mini-col-" + me.getProperty("size").value) + m.addClass("mini-col-" + me.getProperty("width").value) .addClass("form-component"); var c = $("
"); @@ -862,12 +1128,12 @@ } var label = $("
"); - var input = createInput(); + // var input = createInput(); var id = Math.round(Math.random() * 100000000); - var button = $("
") + var button = $("
") .attr("id", "file-" + id) .text("选择文件"); - var process = $("
"); + // var process = $("
"); label.text(me.getProperty("comment").value); c.append(label).append(inputContainer.append(button)); @@ -875,22 +1141,8 @@ return m; }); - function initFileUploader() { - var uploaderContainer = container.find('.file-upload'); - var id = uploaderContainer.attr("id"); - require(["pages/form/designer-drag/file-upload"], function (uploader) { - uploaderContainer - .removeClass('webuploader-container') - .html("选择文件"); - uploader.initUploader("#" + id, function (file) { - me.getValue = function () { - return file; - } - }, true); - }) - } - initFileUploader(); + me.initFileUploader(); function newInput() { return container.find(".input-block") @@ -902,8 +1154,7 @@ .on('propertiesChanged', function (name, value) { if (name === 'comment') { container.find(".form-label").text(value); - } - else if (name === 'showComment') { + } else if (name === 'showComment') { container.find(".input-block").addClass("component-body"); if (value + "" === 'true') { container.find(".form-label").show(); @@ -951,7 +1202,7 @@ Component.call(this); this.id = id; this.properties = createDefaultEditor(); - this.getProperty("size").value = 4; + this.getProperty("width").value = 4; this.getProperty("comment").value = "弹出选择"; this.cls = "mini-buttonedit"; this.properties.push(createTrueOrFalseEditor("allowInput", "可手动输入", "true")); @@ -971,6 +1222,170 @@ } + /**嵌入网页**/ + { + function IFrame(id) { + Component.call(this); + this.id = id; + this.properties = createDefaultEditor(); + this.removeProperty("placeholder"); + // this.removeProperty("name"); + this.removeProperty("required"); + this.removeProperty("emptyText"); + this.removeProperty("showComment"); + //this.removeProperty("height"); + + + this.getProperty("comment").value = "嵌入网页"; + this.getProperty("width").value = "12"; + + this.properties.push(createTrueOrFalseEditor("hidden", "隐藏标题", "true")); + + + this.properties.push({ + id: "url", + text: "URL", + value: "", + editor: "textbox" + }); + + this.properties.push(createScriptEditor("script", "脚本", "javascript", "" + + "var me = this;\n" + + "//me.url = 'user.html?id={id}';\n" + + "me.onload=function(e){" + + "\n" + + "var win = e.frameWindow;" + + "\n}" + + "")) + + } + + createClass(IFrame, Component, "高级控件"); + + // IFrame.prototype.getValue = function (data, validate) { + // + // return data; + // }; + + IFrame.prototype.setData = function (data) { + this._data = data; + } + + IFrame.prototype.setValue = function (value, data) { + this._value = value; + this._data = data; + this.render(); + }; + + + IFrame.prototype.setHeight = function (height) { + if (!height || height <= 1) { + height = ""; + } + + this.container.find(".iframe-container:first").css("height", height); + }; + + + IFrame.prototype.reload = function () { + var me = this; + var iframeContainer = this.container.find(".iframe-container:first"); + var config = mini.clone({ + url: this.getProperty("url").value, + script: this.getProperty("script").value + }); + if (!config.url && !config.script) { + return; + } + if (config.url && !config.url.startWith('http')) { + config.url = window.BASE_PATH + config.url; + } + if (config.url && config.url.indexOf("{") !== -1) { + config.url = template(config.url, this._data || {}); + } + var callback = { + url: config.url, + data: me._data, + component: me + }; + + if (config.script) { + try { + var fun = window.eval("(function(){" + + "return function(){" + + "\n" + + config.script + + "\n" + + "}" + + "})()"); + fun.call(callback); + } catch (e) { + console.error(e); + } + } + + if (callback.url && callback.url.indexOf("{") !== -1) { + callback.url = template(callback.url, this._data || {}); + } + + iframeContainer + .unbind('load') + .on("load", function () { + if (callback.onload) { + callback.onload({ + frame: iframeContainer[0], + frameWindow: iframeContainer[0].contentWindow, + data: me._data, + value: me._value + }) + } + }); + + iframeContainer.attr("src", callback.url); + + }; + IFrame.prototype.typeName = "嵌入网页"; + IFrame.prototype.render = function () { + var me = this; + var container = this.getContainer(function () { + var m = $("
"); + var c = $("
"); + var label = $(""); + var text = $("").text("嵌入网页"); + c.append(label.append(text)); + c.append(" +
+
+
+
+ +
+
+
+
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+ + + + + + + + + + +
+
+ +
+ +
+
+
事件类型 + +
+
脚本语言 + +
+
脚本内容 + +
+
+ + 操作 + + +
+
+
+
+ +
+ +
+ +
+
+ + + diff --git a/hsweb-ui/admin/workflow/define/edit.js b/hsweb-ui/admin/workflow/define/edit.js new file mode 100644 index 0000000..07b7653 --- /dev/null +++ b/hsweb-ui/admin/workflow/define/edit.js @@ -0,0 +1,340 @@ +importResource("/admin/css/common.css"); +importResource("/admin/form/designer-drag/defaults-border.css"); + +var scriptLanguages = [ + {id: "javascript", text: 'js'} + , {id: "groovy", text: 'groovy'} +]; + +var supportListeners = { + task: [ + {id: "task_created", text: "任务创建时"}, + {id: "task_assigned", text: "任务签收时"}, + {id: "task_completed", text: "任务完成时"} + ], + process: [ + {id: "process_started", text: "流程启动时"}, + {id: "process_completed", text: "流程完成时"}, + {id: "process_completed_with_error_end_event", text: "流程错误"}, + {id: "process_cancelled", text: "流程取消时"} + ] +}; + + +importMiniui(function () { + + + var diagramFrame = $(".diagram-viewer"); + + require(["request", "miniui-tools", "message"], function (request, tools, message) { + mini.parse(); + var listenerGrid = mini.get("listener-grid"); + + var taskEditor = { + userTask: function (info) { + var task = $(".user-task").show(); + task.find(".activity-name").text(info.properties.name); + var activityConfigId; + var form = new mini.Form("#user-task-form"); + form.setData({}); + window.eventTypeData = supportListeners.task; + var eventTypeInput = mini.get("eventType"); + if (eventTypeInput) { + eventTypeInput.setData(window.eventTypeData); + } + var candidates = []; + var candidateMap = { + personCandidate: "user", + positionCandidate: "position", + departmentCandidate: "department" + }; + var listeners = []; + var candidateMapReverse = {}; + for (var c in candidateMap) { + candidateMapReverse[candidateMap[c]] = c; + } + + $(".save-candidate-button").unbind("click").on('click', function () { + //setCandidate(candidates); + mini.get("candidate-window").show(); + }); + $(".save-task-listener-button").unbind("click") + .on("click", function () { + listenerGrid.setData(listeners); + mini.get("listener-window").show(); + + }); + $(".save-listener").unbind("click").on("click", function () { + listeners = listenerGrid.getData(); + mini.get("listener-window").hide(); + }); + + function setCandidate(candidate) { + new mini.Form("#candidate-form").setData({}); + + $(candidate).each(function () { + var candidateInputId = candidateMapReverse[this.dimension]; + if (candidateInputId) { + var input = mini.get(candidateInputId); + if (input) { + input.setValue(this.idList.join(",")); + input.setText(this.nameList.join(",")); + } + } + }) + } + + function setActivityConfig(config) { + listenerGrid.setData(listeners = config.listeners); + form.setData(config); + activityConfigId = config.id; + setCandidate(candidates = parseCandidate(config.candidateDimension)); + } + + function parseCandidate(json) { + if (!json) { + return []; + } + return JSON.parse(json); + } + + $(".save-candidate") + .unbind("click") + .on("click", function () { + for (var type in candidateMap) { + var candidate = mini.get(type); + if (candidate && candidate.getValue()) { + candidates.push({ + dimension: candidateMap[type], + idList: candidate.getValue().split(","), + nameList: candidate.getText().split(",") + }) + } + } + mini.get("candidate-window").hide(); + }); + + $(".save-button").unbind("click").on("click", function () { + var data = tools.getFormData("#user-task-form"); + if (!data) { + return; + } + data.activityId = info.id; + data.processDefineKey = info.processDefinitionKey; + data.processDefineId = info.processDefinitionId; + data.candidateDimension = JSON.stringify(candidates); + data.listeners = listeners; + if (activityConfigId) { + data.id = activityConfigId; + } + var loading = message.loading("保存中...."); + request.patch("workflow/process/configuration/activity", data, function (response) { + loading.hide(); + if (response.status === 200) { + message.showTips("保存成功") + } else { + message.showTips("保存失败:" + response.message, "danger"); + } + }) + }); + + + request.createQuery("workflow/process/configuration/activity") + .where("processDefineId", info.processDefinitionId) + .and("activityId", info.id) + .limit(0, 1) + .exec(function (response) { + if (response.status === 200 && response.result.total === 1) { + setActivityConfig(response.result.data[0]); + } else { + request.createQuery("workflow/process/configuration/activity") + .where("processDefineKey", info.processDefinitionKey) + .and("activityId", info.id) + .and("status", 1) + .orderByDesc("updateTime") + .limit(0, 1) + .exec(function (res) { + if (response.status === 200 && res.result.total === 1) { + setActivityConfig(res.result.data[0]); + } + }) + } + }); + } + }; + + + var defId = request.getParameter("id"); + var defKey = request.getParameter("key"); + + listenerGrid.getColumn("script").renderer = function (e) { + return tools.createActionButton("编辑脚本", "icon-edit", function () { + doEditScript(e.record.language, e.value, function (script) { + e.value = script; + e.record.script = script; + }) + }) + }; + + listenerGrid.getColumn("action").renderer = function (e) { + return tools.createActionButton("删除", "icon-remove", function () { + e.sender.removeRow(e.record); + }) + } + doProcessEditor(); + diagramFrame.attr("src", window.BASE_PATH + "workflow/diagram-viewer/operation.html?processDefinitionId=" + defId); + diagramFrame.on("load", function () { + var win = diagramFrame[0].contentWindow; + win.onNodeClick = function (canvas, element, activity) { + $(".activity-editor").hide(); + activity.processDefinitionId = defId; + activity.processDefinitionKey = defKey; + var editor = taskEditor[activity.properties.type]; + if (editor) { + editor(activity); + } else { + doProcessEditor(); + } + mini.layout() + } + }); + + function doProcessEditor() { + $(".activity-editor").hide(); + $(".process-editor").show(); + mini.layout(); + var processForm = new mini.Form("#process-form"); + var nowEditProcessId; + + $(".save-button") + .unbind('click') + .on("click", function () { + var form = tools.getFormData("#process-form", true); + if (form) { + form.id = nowEditProcessId; + form.processDefineKey = defKey; + form.processDefineId = defId; + request.patch("workflow/process/configuration/definition", form, function (response) { + if (response.status === 200) { + nowEditProcessId = response.result; + } else { + message.showTips("保存失败:" + response.message); + } + }) + } + }); + + function setProcessConfig(config) { + nowEditProcessId = config.id; + processForm.setData(config); + + + console.log(config); + } + + request.createQuery("workflow/process/configuration/definition") + .where("processDefineId", defId) + .limit(0, 1) + .exec(function (response) { + if (response.status === 200 && response.result.total === 1) { + setProcessConfig(response.result.data[0]); + } else { + request.createQuery("workflow/process/configuration/definition") + .where("processDefineKey", defKey) + .and("status", 1) + .orderByDesc("updateTime") + .limit(0, 1).exec(function (res) { + if (response.status === 200 && res.result.total === 1) { + setProcessConfig(res.result.data[0]); + } + }) + } + }); + + } + + function addPersonList(persons) { + var personCandidate = mini.get('personCandidate'); + var oldValue = personCandidate.getValue() ? personCandidate.getValue().split(",") : []; + var oldText = personCandidate.getText() ? personCandidate.getText().split(",") : []; + + $(persons).each(function () { + if (oldValue.indexOf(this.userId) === -1) { + oldValue.push(this.userId); + oldText.push(this.name); + } + }); + personCandidate.setValue(oldValue.join(",")); + personCandidate.setText(oldText.join(",")); + } + + function removePersonList(persons) { + var personCandidate = mini.get('personCandidate'); + var oldValue = personCandidate.getValue() ? personCandidate.getValue().split(",") : []; + var oldText = personCandidate.getText() ? personCandidate.getText().split(",") : []; + + $(persons).each(function () { + var index = oldValue.indexOf(this.userId); + if (index !== -1) { + oldValue.splice(index, 1); + oldText.splice(index, 1); + } + }); + personCandidate.setValue(oldValue.join(",")); + personCandidate.setText(oldText.join(",")); + } + + $(".select-person").on("click", function () { + tools.openWindow("admin/org/person/selector.html", "选择人员", "800", "600", function () { + + }, function () { + var iframe = this.getIFrameEl(); + + function bindEvent() { + var win = iframe.contentWindow; + if (win) { + win.onSelect = function (person) { + addPersonList([person]) + // console.log(person) + }; + win.onDeSelect = function (person) { + removePersonList([person]) + // console.log(person) + } + win.onGridLoad = function (grid) { + var personCandidate = mini.get('personCandidate'); + $(personCandidate.getValue().split(",")).each(function () { + var userId = this + ""; + grid.filter(function (row) { + if (row.userId === userId) { + grid.select(row.id); + } + }) + }) + } + } + } + + bindEvent() + $(iframe).on("load", bindEvent) + }) + }) + + function doEditScript(lang, script, callback) { + script = script || ""; + require(['script-editor'], function (editorBuilder) { + editorBuilder.createEditor("script-editor", function (editor) { + editor.init(lang, script); + $(".save-script-editor").unbind("click").on("click", function () { + if (callback) { + callback(editor.getScript()); + } + mini.get("scriptEditor").hide(); + }) + }); + }); + mini.get("scriptEditor").show(); + } + }) + +}); \ No newline at end of file diff --git a/hsweb-ui/admin/workflow/define/list.html b/hsweb-ui/admin/workflow/define/list.html new file mode 100644 index 0000000..e6fcf4c --- /dev/null +++ b/hsweb-ui/admin/workflow/define/list.html @@ -0,0 +1,46 @@ + + + + + + + 工作流流程定义管理 + + + +
+ + + + + + +
+
+
+
+
ID
+
名称
+
KEY
+
说明
+
操作
+
+
+
+
+ +
+ KEY: +

+ 名称: +

+ 说明: +
+
+ + \ No newline at end of file diff --git a/hsweb-ui/admin/workflow/define/list.js b/hsweb-ui/admin/workflow/define/list.js new file mode 100644 index 0000000..da2b66d --- /dev/null +++ b/hsweb-ui/admin/workflow/define/list.js @@ -0,0 +1,89 @@ +importResource("/admin/css/common.css"); + +importMiniui(function () { + mini.parse(); + require(["miniui-tools", "request", "message"], function (tools, request, message) { + var grid = window.grid = mini.get("datagrid"); + tools.initGrid(grid); + grid.setUrl(API_BASE_PATH + "workflow/process/definition/"); + + function search() { + tools.searchGrid("#search-box", grid); + } + + $(".search-button").click(search); + tools.bindOnEnter("#search-box", search); + $(".add-button").click(function () { + mini.get('add-model').show() + }); + + $(".create-model-button").unbind("click").on("click", function () { + var data = tools.getFormData("#addModelForm", true); + if (data) { + var loading = message.loading("提交中..."); + request.post("workflow/model/", data, function (response) { + loading.hide(); + if (response.status === 201 || response.status === 200) { + new mini.Form("#addModelForm").clear(); + mini.get("add-model").hide(); + edit(response.result.id); + } else { + message.showTips("创建失败:" + response.message); + } + }) + } + }) + search(); + grid.getColumn("action").renderer = function (e) { + var row = e.record; + var html = [ + tools.createActionButton("编辑", "icon-edit", function () { + tools.openWindow("admin/workflow/define/edit.html?id=" + row.id + "&key=" + row.key, "自定义流程", "1000", "600", function (e) { + grid.reload(); + }) + }) + ]; + html.push( + tools.createActionButton("查看流程图", "icon-find", function () { + tools.openWindow("workflow/diagram-viewer/index.html?processDefinitionId=" + row.id, row.name, "800", "600", function (e) { + grid.reload(); + }) + }) + ); + html.push( + tools.createActionButton("启动流程", "icon-ok", function () { + message.confirm("确定启动此流程", function () { + grid.loading("启动中..."); + request['post']("workflow/process/start/id/" + row.id,{}, function (response) { + grid.reload(); + if (response.status === 200) { + //grid.reload(); + } else { + message.showTips("启动失败:" + response.message); + } + }); + }) + }) + ); + html.push( + tools.createActionButton("删除", "icon-remove", function () { + message.confirm("确认删除?", function () { + grid.loading("删除中..."); + request['delete']("workflow/process/definition/deployment/" + row.deploymentId, function (response) { + grid.reload(); + if (response.status === 200) { + //grid.reload(); + } else { + message.showTips("删除失败:" + response.message); + } + }); + }) + }) + ) + return html.join(""); + } + + }); + + +}); diff --git a/hsweb-ui/admin/workflow/form/list.html b/hsweb-ui/admin/workflow/form/list.html new file mode 100644 index 0000000..b255638 --- /dev/null +++ b/hsweb-ui/admin/workflow/form/list.html @@ -0,0 +1,40 @@ + + + + + + + 表单管理 + + + +
+
+ + + + + + + +
+
+
+
+
ID
+
表单名称
+
表单类型
+
物理表名
+
别名
+
版本
+
发布状态
+
+ 操作 +
+
+
+
+
+ + \ No newline at end of file diff --git a/hsweb-ui/admin/workflow/form/list.js b/hsweb-ui/admin/workflow/form/list.js new file mode 100644 index 0000000..927185f --- /dev/null +++ b/hsweb-ui/admin/workflow/form/list.js @@ -0,0 +1,114 @@ +importResource("/admin/css/common.css"); + +importMiniui(function () { + mini.parse(); + require(["miniui-tools"], function (tools) { + window.tools = tools; + var grid = window.grid = mini.get("form-grid"); + tools.initGrid(grid); + grid.setUrl(API_BASE_PATH + "dynamic/form"); + + function search() { + var keyword = mini.getbyName("keyword").getValue(); + var param = {}; + require(["request"], function (request) { + var query = request.createQuery(); + query.where() + .and("tags", "workflow"); + + if (keyword && keyword.length > 0) { + query.nest() + .like("name", "%" + keyword + "%") + .or().like("databaseTableName", "%" + keyword + "%") + .or().like("describe", "%" + keyword + "%") + .end() + .getParams(); + + } + grid.load(query.getParams(param)); + }); + } + + tools.bindOnEnter("#search-box", search); + $(".search-button").on("click", search); + search(); + + $(".add-menu-button").on("click", function () { + tools.openWindow("admin/workflow/form/save.html", "新建表单", "80%", "80%", function () { + grid.reload(); + }); + }); + }); + +}); +window.renderDeploy = function (e) { + var html = ""; + var row = e.record; + if (e.value === true) { + html = tools.createActionButton("已发布,取消发布", "icon-remove", function () { + var api = "dynamic/form/" + row.id + "/un-deploy"; + require(["request", "message"], function (request, message) { + message.confirm("确认取消发布表单:" + row.name, function () { + var loading = message.loading("取消中..."); + request.put(api, row, function (res) { + loading.close(); + if (res.status === 200) { + grid.reload(); + } else { + message.showTips("取消失败:" + res.message, "danger"); + } + }) + }); + }); + }); + } else { + html = tools.createActionButton("未发布,现在发布", "icon-ok", function () { + var api = "dynamic/form/" + row.id + "/deploy"; + require(["request", "message"], function (request, message) { + message.confirm("确认发布表单:" + row.name, function () { + var loading = message.loading("发布中..."); + request.put(api, row, function (res) { + loading.close(); + if (res.status === 200) { + grid.reload(); + } else { + message.showTips("发布失败:" + res.message, "danger"); + } + }) + }); + }); + }) + } + + return html +} + +window.renderAction = function (e) { + var html = []; + var row = e.record; + html.push(tools.createActionButton("编辑", "icon-edit", function () { + tools.openWindow("admin/workflow/form/save.html?id=" + row.id, "编辑表单" + row.name, "80%", "80%", function () { + grid.reload(); + }); + })); + + if (!row.deployed) { + html.push(tools.createActionButton("删除", "icon-remove", function () { + require(["message", "request"], function (message, request) { + message.confirm("确定删除此表单,删除后将无法恢复", function () { + var box = message.loading("删除中..."); + request["delete"]("dynamic/form/" + row.id, function (response) { + box.hide(); + if (response.status === 200) { + grid.reload(); + } else { + message.showTips("删除失败:" + response.message, "danger"); + } + }); + }); + }); + })); + } + + return html.join(""); +} \ No newline at end of file diff --git a/hsweb-ui/admin/workflow/form/save.html b/hsweb-ui/admin/workflow/form/save.html new file mode 100644 index 0000000..4d04a18 --- /dev/null +++ b/hsweb-ui/admin/workflow/form/save.html @@ -0,0 +1,246 @@ + + + + + + + 动态表单 + + + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
表单ID: + + 绑定数据源: + +
表单名称: + + 表单类型: + +
物理表名: + + 别名: + +
备注: + +
+
+
+
+
配置 + +
+
值 + +
+
+ + 操作 + + +
+
+
+
+
+ +
+
+
+
+
+
名称 + +
+
物理列名 + +
+
别名 + +
+
备注 + +
+
+
+
+
+
JDBCType + +
+
JavaType + +
+
长度/精度 + +
+
+
+ +
验证器 + +
+
数据字典 +
+
其他配置 +
+
+ + 操作 + + +
+
+
+
+ +
+
+
+
目标表名 + +
+
别名 + +
+
关联方式 + +
+
关联条件 + +
+
其他配置 +
+
+ + 操作 + + +
+
+
+
+ +
+
+
+
触发器条件 + +
+
触发器脚本语言 + +
+
脚本内容 + +
+
+ + 操作 + + +
+
+
+
+
+ +
+ 保存 +
+ + + +
+ +
+
+ 类型: +

+ 字段: + 对象: +

+ 多选: + 快速: + +
+
+ +
+
+
+ +
+ +
+ +
+
+
+ + \ No newline at end of file diff --git a/hsweb-ui/admin/workflow/form/save.js b/hsweb-ui/admin/workflow/form/save.js new file mode 100644 index 0000000..f738dcc --- /dev/null +++ b/hsweb-ui/admin/workflow/form/save.js @@ -0,0 +1,545 @@ +importResource("/admin/css/common.css"); + +var validatorData = [ + { + text: "不能为null", type: "NotNull" + }, + { + text: "不能为空", type: "NotBlank" + }, + { + text: "字符长度范围", type: "Length", + createEditor: function (html) { + var maxValue = $(""); + maxValue.append("最小长度:"); + maxValue.append(""); + + var minValue = $(""); + minValue.append("最大长度:"); + minValue.append(""); + + html.append(maxValue).append(minValue); + } + }, + { + text: "数字范围", type: "Range", + createEditor: function (html) { + var maxValue = $(""); + maxValue.append("最小值:"); + maxValue.append(""); + + var minValue = $(""); + minValue.append("最大值:"); + minValue.append(""); + + html.append(maxValue).append(minValue); + } + }, + { + text: "邮箱", type: "Email" + } +]; + +var groups = [ + { + text: "新增", id: "create" + } + , { + text: "修改", id: "update" + } +]; +var triggerData = [ + { + id: "select.before" //查询之前 + }, + { + id: "select.wrapper.each" //将查询结果包装为对象时触发 + }, + { + id: "select.wrapper.done" + }, + { + id: "select.done" + }, + { + id: "insert.before" + }, + { + id: "insert.done" + }, + { + id: "update.before" + }, + { + id: "update.done" + }, + { + id: "delete.before" + }, + { + id: "delete.done" + } +] +var scriptLanguages = [ + {id: "javascript"} + , {id: "groovy"} +] +var dictType = [ + {id: "disable", text: "无"}, + { + id: "dict", text: "数据字典", + createEditor: function (html) { + var appendType = $("
"); + appendType.append("字典: "); + appendType.append(""); + + window.selectDict = function (e) { + require(['miniui-tools'], function (tools) { + tools.openWindow("admin/dictionary/list.html?selector=1", "选择数据字典", "900", "650", function (dic) { + if (dic !== 'close' || dic !== 'cancel') { + e.sender.setValue(dic); + e.sender.setText(dic); + } + }) + }) + } + html.append(appendType) + } + } + , {id: "district", text: "行政区划"} + // ,{id: "org", text: "机构"} +]; + +var jdbcType = [ + "VARCHAR", "NVARCHAR", "NUMERIC", "DATE", "CLOB", "BLOB" +]; +var jdbcJavaMapping = { + "VARCHAR": "String", + "NVARCHAR": "String", + "NUMERIC": "Long", + "DATE": "Date", + "CLOB": "String", + "BLOB": "Byte[]" +}; + +var javaType = [ + "String", "Byte", "Integer", "Long", "Double", "BigDecimal", "Boolean", "Date", "List", "Map" +]; +var lengthMapping = { + "NUMERIC-Long": "32,0", + "NUMERIC-Byte": "4,0", + "NUMERIC-Integer": "18,0", + "NUMERIC-Double": "20,2", + "NUMERIC-BigDecimal": "38", + "NUMERIC-Boolean": "1,0" +}; + + +importMiniui(function () { + window.jdbcTypeData = []; + $(jdbcType).each(function (i, t) { + jdbcTypeData.push({text: t, id: t}) + }); + window.javaTypeData = []; + $(javaType).each(function (i, t) { + javaTypeData.push({text: t, id: t}) + }); + + mini.parse(); + mini.getbyName("id").on("validation", function (e) { + if (e.isValid) { + var re = new RegExp("^[a-zA-Z0-9_\-]+$"); + e.isValid = re.test(e.value); + if (!e.isValid) { + e.errorText = "必须由数字,字母,下划线,-组成"; + } + } + }); + + require(["request", "miniui-tools", "message"], function (request, tools, message) { + window.tools = tools; + var api = "dynamic/form/bind"; + var func = request.patch; + var id = request.getParameter("id"); + if (id) { + loadData(id); + //api += "/" + id; + // func = request.put; + } + request.get("datasource", function (e) { + if (e.status === 200) { + $(e.result).each(function () { + this.text = this.name + (this.id ? "(" + this.id + ")" : ""); + }); + + mini.getbyName('dataSourceId').setData(e.result); + } + }); + $(".save-button").on("click", (function () { + var form = tools.getFormData("#basic-info", true); + if (id) + form.id = id; + if (!form) return; + form.triggers = JSON.stringify(mini.get("triggers-grid").getData()); + form.correlations = JSON.stringify(mini.get("correlations-grid").getData()); + form.tags = "workflow"; + var loading = message.loading("提交中"); + func(api, {form: form, columns: getColumns()}, function (response) { + loading.close(); + if (response.status === 200) { + message.showTips("保存成功"); + if (!id) id = response.result; + loadColumn(id); + } else { + message.showTips("保存失败:" + response.message, "danger"); + if (response.result) + tools.showFormErrors("#basic-info", response.result); + } + }) + })); + }); + initColumnGrid(); + initTriggerGrid() +}); + +function getColumns() { + return mini.clone(mini.get("column-grid").getData()); +} + +function loadData(id) { + require(["miniui-tools", "request", "message"], function (tools, request, message) { + var loading = message.loading("加载中..."); + request.get("dynamic/form/" + id, function (response) { + loading.hide(); + if (response.status === 200) { + new mini.Form("#basic-info").setData(response.result); + if (response.result.triggers) { + mini.get("triggers-grid").setData(JSON.parse(response.result.triggers)); + } + if (response.result.correlations) { + mini.get("correlations-grid").setData(JSON.parse(response.result.correlations)); + } + mini.getbyName("id").setReadOnly(true); + } else { + message.showTips("加载数据失败", "danger"); + } + }); + loadColumn(id); + }); + +} + +function loadColumn(id) { + require(["request", "message"], function (request, message) { + request.get("dynamic/form/column/" + id, function (response) { + if (response.status === 200) { + mini.get("column-grid").setData(response.result); + } else { + message.showTips("加载字段失败", "danger"); + } + }); + }); +} + +function transformStr(str) { + var re = /_(\w)/g; + return str.replace(re, function ($0, $1) { + return $1.toUpperCase(); + }); +} + +function doEditScript(lang, script, callback) { + script = script || ""; + require(['script-editor'], function (editorBuilder) { + editorBuilder.createEditor("script-editor", function (editor) { + editor.init(lang, script); + $(".save-script-editor").unbind("click").on("click", function () { + if (callback) { + callback(editor.getScript()); + } + mini.get("scriptEditor").hide(); + }) + }); + }); + mini.get("scriptEditor").show(); +} + +function initTriggerGrid() { + var grid = mini.get("triggers-grid"); + grid.getColumn("script").renderer = function (e) { + return tools.createActionButton("编辑脚本", "icon-edit", function () { + var row = e.record; + doEditScript(row.language, e.value, function (script) { + row.script = script; + e.sender.updateRow(row); + }) + }); + } +} + +function initValidatorEditor(config, call) { + var container = $("#validatorConfig"); + container.children().remove(); + if (config.length === 0) { + config.push({}); + } + + $(".save-validator").unbind("click").on("click", function () { + container.children().each(function (i, e) { + var id = $(e).attr("id"); + var form = new mini.Form("#" + id); + var data = form.getData(); + config[i] = data; + mini.get("validatorEditor").hide(); + if (call) { + call(config); + } + }) + }); + $(".add-validator").unbind("click").on("click", function () { + var len = container.children().length; + addForm("validator-" + (len), len, {}); + mini.parse(); + }); + + function addForm(formId, index, data) { + var defaultEditor = ["
", + "

规则", index + 1, " 

", + "规则:", + "分组:

", + "提示:", + "
", + "
"]; + container.append(defaultEditor.join("")); + + mini.parse(); + var form = new mini.Form("#" + formId); + form.getField("type").setValue(data.type); + form.getField("type").on("valueChanged", function (e) { + var selected = e.selected; + var html = $("#" + formId + " .more-properties"); + html.html(""); + if (selected && selected.createEditor) { + selected.createEditor(html); + } + mini.parse(); + }); + form.getField("type").doValueChanged(); + window.setTimeout(function () { + form.setData(data); + }, 100) + } + + $(config).each(function (index, conf) { + var formId = "validator-" + index; + addForm(formId, index, conf); + }) +} + +function initDictEditor(config, call) { + var form = new mini.Form("#dictConfigFrom"); + $(".save-dict") + .unbind("click") + .on("click", function () { + call(new mini.Form("#dictConfigFrom").getData()); + mini.get("dictEditor").hide(); + }); + form.setData(config); + mini.get("dictType").doValueChanged(); + window.setTimeout(function () { + form.setData(config); + }, 100) +} + +/** + * 初始化字段表格 + */ +function initColumnGrid() { + var columnGrid = mini.get("column-grid"); + + mini.get("dictType") + .on("valueChanged", function (e) { + $("#dictConfigDiv").html(""); + var selected = e.selected; + if (selected && selected.createEditor) { + selected.createEditor($("#dictConfigDiv")); + mini.parse(); + } + }); + + columnGrid.getColumn("dictConfig").renderer = function (e) { + return tools.createActionButton("编辑", "icon-edit", function () { + var dictConfig = e.record.dictConfig; + if (!dictConfig) { + dictConfig = JSON.stringify({ + toField: e.record.alias + "Obj", config: + {multi: "false", fast: "true", writeObject: 'true'} + }); + } + dictConfig = JSON.parse(dictConfig); + initDictEditor(dictConfig, function (result) { + // e.record.dictConfig = JSON.stringify(result); + e.sender.updateRow(e.record, {dictConfig: JSON.stringify(result)}) + }); + mini.get("dictEditor").show(); + }); + }; + + mini.get("column-grid").getColumn("validator").renderer = function (e) { + return tools.createActionButton("编辑", "icon-edit", function () { + var validator = e.record.validator; + + if (!validator) { + validator = []; + } + $(validator).each(function (i, e) { + validator[i] = typeof e === 'string' ? JSON.parse(e) : e; + }); + initValidatorEditor(validator, function (result) { + $(result).each(function (i, e) { + result[i] = JSON.stringify(e); + }); + e.sender.updateRow(e.record, {validator: validator, t: new Date()}) + }); + mini.get("validatorEditor").show(); + }); + }; + //单元格编辑完成事件 + mini.get("column-grid").on("cellcommitedit", function (e) { + var column = e.column; + var row = e.record; + + if (column.field === "name") { + if (e.value) { + if (!row.describe) { + row.describe = e.value; + } + if (e.value.indexOf("日期") != -1 || e.value.indexOf("有效期") != -1) { + row.jdbcType = "DATE"; + row.javaType = "Date"; + } + else if (e.value.indexOf("是否") != -1) { + row.jdbcType = "NUMERIC"; + row.javaType = "Boolean"; + row.lengthString = "1,0"; + } + else if (e.value.indexOf("金额") != -1) { + row.jdbcType = "NUMERIC"; + row.javaType = "BigDecimal"; + row.lengthString = "38,4"; + } else { + row.jdbcType = "VARCHAR"; + row.javaType = "String"; + row.lengthString = "256"; + } + e.sender.updateRow(row); + } + } else if (column.field === "columnName") { + row.alias = transformStr(e.value); + e.sender.updateRow(row); + } + else if (column.field === "jdbcType") { + if (!row.javaType && e.value) { + row.javaType = jdbcJavaMapping[e.value]; + if (!e.lengthString) { + row.lengthString = lengthMapping[e.value + "-" + row.javaType]; + } + if (row.javaType) + e.sender.updateRow(row); + } + } else if (column.field === "javaType") { + if (e.value && row.jdbcType) { + row.lengthString = lengthMapping[row.jdbcType + "-" + e.value]; + if (!row.lengthString) { + row.length = null; + row.precision = null; + row.scale = null + } + e.sender.updateRow(row); + } + } else if (column.field === "lengthString") { + if (!e.value) { + row.length = null; + row.precision = null; + row.scale = null + } + } + }) +} + +window.renderAction = function (e) { + return tools.createActionButton("删除", "icon-remove", function () { + e.sender.removeRow(e.record); + }); +}; +window.renderJdbcType = function (e) { + return e.value; +}; +window.renderJavaType = function (e) { + return e.value; +} +window.renderLength = function (e) { + var row = e.record; + if (row.lengthString) { + if (row.lengthString.indexOf(",") !== -1) { + var l = row.lengthString.split(","); + row.precision = l[0]; + row.scale = l[1]; + row.length = l[0]; + } else { + row.precision = row.lengthString; + row.length = row.lengthString; + } + } else if (row.length || row.precision || row.scale) { + if (typeof row.precision !== 'undefined' && typeof row.scale !== 'undefined') { + row.lengthString = row.precision + (typeof row.scale === 'undefined' ? "" : "," + row.scale) + } else { + row.lengthString = row.length + ""; + } + } + return row.lengthString; +} +window.renderColumnAction = function (e) { + var row = e.record; + var html = []; + if (row._state == "added" || row._state == "modified") { + html.push(tools.createActionButton("保存", "icon-save", function () { + var api = "dynamic/form/column"; + require(["request", "message"], function (request, message) { + var loading = message.loading("保存中..."); + var formId = request.getParameter("id"); + if (formId) { + row.formId = formId; + } + request.patch(api, row, function (res) { + loading.close(); + if (res.status == 200) { + row.id = res.result; + e.sender.updateRow(row); + e.sender.acceptRecord(row); + message.showTips("保存成功!"); + } else { + message.showTips("保存失败:" + res.message, "danger"); + } + }) + }); + })); + } + html.push(tools.createActionButton("删除", "icon-remove", function () { + if (!row.id) { + e.sender.removeRow(e.record); + } else { + //调用后台删除 + require(["request", "message"], function (request, message) { + request["delete"]("dynamic/form/column?ids=" + row.id, {}, function (response) { + if (response.status == 200) { + e.sender.removeRow(e.record); + } else { + message.showTips("删除失败:" + response.message); + } + }); + }); + } + })); + return html.join(""); +} \ No newline at end of file diff --git a/hsweb-ui/admin/workflow/model/list.html b/hsweb-ui/admin/workflow/model/list.html new file mode 100644 index 0000000..904b89e --- /dev/null +++ b/hsweb-ui/admin/workflow/model/list.html @@ -0,0 +1,48 @@ + + + + + + + 工作流模型管理 + + + +
+ + + + + + +
+
+
+
+
ID
+
名称
+
版本
+
说明
+ +
操作
+
+
+
+
+ +
+ KEY: +

+ 名称: +

+ 说明: +
+
+ + \ No newline at end of file diff --git a/hsweb-ui/admin/workflow/model/list.js b/hsweb-ui/admin/workflow/model/list.js new file mode 100644 index 0000000..09a779f --- /dev/null +++ b/hsweb-ui/admin/workflow/model/list.js @@ -0,0 +1,85 @@ +importResource("/admin/css/common.css"); + +importMiniui(function () { + mini.parse(); + require(["miniui-tools", "request", "message"], function (tools, request, message) { + var grid = window.grid = mini.get("datagrid"); + tools.initGrid(grid); + grid.setUrl(API_BASE_PATH + "workflow/model/"); + + function search() { + tools.searchGrid("#search-box", grid); + } + + $(".search-button").click(search); + tools.bindOnEnter("#search-box", search); + $(".add-button").click(function () { + mini.get('add-model').show() + }); + + $(".create-model-button").unbind("click").on("click", function () { + var data = tools.getFormData("#addModelForm", true); + if (data) { + var loading = message.loading("提交中..."); + request.post("workflow/model/", data, function (response) { + loading.hide(); + if (response.status === 201 || response.status === 200) { + new mini.Form("#addModelForm").clear(); + mini.get("add-model").hide(); + edit(response.result.id); + } else { + message.showTips("创建失败:" + response.message); + } + }) + } + }) + search(); + grid.getColumn("action").renderer = function (e) { + var row = e.record; + var html = [ + tools.createActionButton("编辑", "icon-edit", function () { + edit(row.id); + }) + ]; + html.push( + tools.createActionButton("发布", "icon-ok", function () { + message.confirm("确认发布此模型?", function () { + grid.loading("发布中..."); + request['post']("workflow/model/" + row.id + "/deploy",{}, function (response) { + grid.reload(); + if (response.status === 200) { + message.showTips("发布成功"); + } else { + message.showTips("发布失败:" + response.message); + } + }); + }) + }) + ); + html.push( + tools.createActionButton("删除", "icon-remove", function () { + message.confirm("确认删除?", function () { + grid.loading("删除中..."); + request['delete']("workflow/model/" + row.id, function (response) { + if (response.status === 200) { + grid.reload(); + } else { + message.showTips("删除失败:" + response.message); + } + }); + }) + }) + ) + return html.join(""); + } + + function edit(id) { + tools.openWindow("workflow/modeler.html?modelId=" + id, "编辑模型", "80%", "80%", function (e) { + grid.reload(); + }) + } + + }); + + +}); diff --git a/hsweb-ui/admin/workflow/todo/list.html b/hsweb-ui/admin/workflow/todo/list.html new file mode 100644 index 0000000..530e8bf --- /dev/null +++ b/hsweb-ui/admin/workflow/todo/list.html @@ -0,0 +1,44 @@ + + + + + + + 代办流程 + + + +
+ + + + + + +
+
+
+
+
ID
+
任务名称
+
操作
+
+
+
+
+ +
+ KEY: +

+ 名称: +

+ 说明: +
+
+ + \ No newline at end of file diff --git a/hsweb-ui/admin/workflow/todo/list.js b/hsweb-ui/admin/workflow/todo/list.js new file mode 100644 index 0000000..21ed82c --- /dev/null +++ b/hsweb-ui/admin/workflow/todo/list.js @@ -0,0 +1,59 @@ +importResource("/admin/css/common.css"); + +importMiniui(function () { + mini.parse(); + require(["miniui-tools", "request", "message"], function (tools, request, message) { + var grid = window.grid = mini.get("datagrid"); + tools.initGrid(grid); + grid.setUrl(API_BASE_PATH + "workflow/process/todo"); + + function search() { + tools.searchGrid("#search-box", grid); + } + + $(".search-button").click(search); + tools.bindOnEnter("#search-box", search); + $(".add-button").click(function () { + mini.get('add-model').show() + }); + + $(".create-model-button").unbind("click").on("click", function () { + var data = tools.getFormData("#addModelForm", true); + if (data) { + var loading = message.loading("提交中..."); + request.post("workflow/model/", data, function (response) { + loading.hide(); + if (response.status === 201 || response.status === 200) { + new mini.Form("#addModelForm").clear(); + mini.get("add-model").hide(); + edit(response.result.id); + } else { + message.showTips("创建失败:" + response.message); + } + }) + } + }) + search(); + grid.getColumn("action").renderer = function (e) { + var row = e.record; + var html = [ + tools.createActionButton("办理", "icon-ok", function () { + tools.openWindow("admin/workflow/do/do-task.html?taskId=" + row.id + "&processInstanceId=" + row.processInstanceId + "&processDefinitionId=" + row.processDefinitionId, row.name, "800", "600", function (e) { + grid.reload(); + }) + }) + ]; + html.push( + tools.createActionButton("查看流程图", "icon-find", function () { + tools.openWindow("admin/workflow/view/detail.html?processInstanceId=" + row.processInstanceId + "&processDefinitionId=" + row.processDefinitionId, row.name, "1000", "600", function (e) { + grid.reload(); + }) + }) + ); + return html.join(""); + } + + }); + + +}); diff --git a/hsweb-ui/admin/workflow/view/detail.html b/hsweb-ui/admin/workflow/view/detail.html new file mode 100644 index 0000000..b44e669 --- /dev/null +++ b/hsweb-ui/admin/workflow/view/detail.html @@ -0,0 +1,26 @@ + + + + + + + +
+
+ +
+
+
+
+ + + diff --git a/hsweb-ui/admin/workflow/view/detail.js b/hsweb-ui/admin/workflow/view/detail.js new file mode 100644 index 0000000..4aa23f3 --- /dev/null +++ b/hsweb-ui/admin/workflow/view/detail.js @@ -0,0 +1,145 @@ +importResource("/admin/css/common.css"); +importResource("/admin/form/designer-drag/defaults-border.css"); + + +importMiniui(function () { + + + var diagramFrame = $(".diagram-viewer"); + + require(["request", "miniui-tools", "message"], function (request, tools, message) { + var taskEditor = { + userTask: function (info) { + var task = $(".user-task").show(); + task.find(".activity-name").text(info.properties.name); + var activityConfigId; + var form = new mini.Form("#user-task-form"); + form.setData({}); + + var candidates = []; + var candidateMap = { + personCandidate: "user", + positionCandidate: "position", + departmentCandidate: "department" + }; + var candidateMapReverse = {}; + for (var c in candidateMap) { + candidateMapReverse[candidateMap[c]] = c; + } + + $(".save-candidate-button").on('click', function () { + //setCandidate(candidates); + mini.get("candidate-window").show(); + }); + + function setCandidate(candidate) { + new mini.Form("#candidate-form").setData({}); + $(candidate).each(function () { + var candidateInputId = candidateMapReverse[this.dimension]; + if (candidateInputId) { + var input = mini.get(candidateInputId); + if (input) { + input.setValue(this.idList.join(",")); + input.setText(this.nameList.join(",")); + } + } + }) + } + function setActivityConfig(config) { + form.setData(config); + activityConfigId = config.id; + setCandidate(candidates=parseCandidate(config.candidateDimension)); + } + + function parseCandidate(json) { + if (!json) { + return []; + } + return JSON.parse(json); + } + + $(".save-candidate") + .unbind("click") + .on("click", function () { + for (var type in candidateMap) { + var candidate = mini.get(type); + if (candidate && candidate.getValue()) { + candidates.push({ + dimension: candidateMap[type], + idList: candidate.getValue().split(","), + nameList: candidate.getText().split(",") + }) + } + } + mini.get("candidate-window").hide(); + }); + + $(".save-button").unbind("click").on("click", function () { + var data = tools.getFormData("#user-task-form"); + if (!data) { + return; + } + data.activityId = info.id; + data.processDefineKey = info.processDefinitionKey; + data.processDefineId = info.processDefinitionId; + data.candidateDimension = JSON.stringify(candidates); + + if (activityConfigId) { + data.id = activityConfigId; + } + var loading = message.loading("保存中...."); + request.patch("workflow/process/configuration/activity", data, function (response) { + loading.hide(); + if (response.status === 200) { + message.showTips("保存成功") + } else { + message.showTips("保存失败:" + response.message, "danger"); + } + }) + }); + + + request.createQuery("workflow/process/configuration/activity") + .where("processDefineId", info.processDefinitionId) + .and("activityId", info.id) + .limit(0, 1) + .exec(function (response) { + if (response.status === 200 && response.result.total === 1) { + setActivityConfig(response.result.data[0]); + } else { + request.createQuery("workflow/process/configuration/activity") + .where("processDefineKey", info.processDefinitionKey) + .and("activityId", info.id) + .and("status", 1) + .orderByDesc("updateTime") + .limit(0, 1) + .exec(function (res) { + if (response.status === 200 && res.result.total === 1) { + setActivityConfig(res.result.data[0]); + } + }) + } + }); + } + }; + + mini.parse(); + var defId = request.getParameter("processDefinitionId"); + var insId = request.getParameter("processInstanceId"); + + diagramFrame.attr("src", window.BASE_PATH + "workflow/diagram-viewer/operation.html?processInstanceId="+insId+"&processDefinitionId=" + defId); + diagramFrame.on("load", function () { + var win = diagramFrame[0].contentWindow; + win.onNodeClick = function (canvas, element, activity) { + console.log(activity) + $(".activity-editor").hide(); + activity.processDefinitionId = defId; + + mini.layout() + } + }); + + + }) + +}); \ No newline at end of file diff --git a/hsweb-ui/admin/workflow/view/view.html b/hsweb-ui/admin/workflow/view/view.html new file mode 100644 index 0000000..2d80cf6 --- /dev/null +++ b/hsweb-ui/admin/workflow/view/view.html @@ -0,0 +1,130 @@ + + + + + + + +
+
+ +
+
+
+

+
+
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+
+ + +
+
+
+
+
+ +
+

流程设置

+
+
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+ + +
+
+
+
+ +
+ 保存 +
+
+
+
+ +
+
+
+
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+ + + + + + + + + + +
+
+ + + diff --git a/hsweb-ui/admin/workflow/view/view.js b/hsweb-ui/admin/workflow/view/view.js new file mode 100644 index 0000000..3d0e8df --- /dev/null +++ b/hsweb-ui/admin/workflow/view/view.js @@ -0,0 +1,270 @@ +importResource("/admin/css/common.css"); +importResource("/admin/form/designer-drag/defaults-border.css"); + + +importMiniui(function () { + + + var diagramFrame = $(".diagram-viewer"); + + require(["request", "miniui-tools", "message"], function (request, tools, message) { + var taskEditor = { + userTask: function (info) { + var task = $(".user-task").show(); + task.find(".activity-name").text(info.properties.name); + var activityConfigId; + var form = new mini.Form("#user-task-form"); + form.setData({}); + + var candidates = []; + var candidateMap = { + personCandidate: "user", + positionCandidate: "position", + departmentCandidate: "department" + }; + var candidateMapReverse = {}; + for (var c in candidateMap) { + candidateMapReverse[candidateMap[c]] = c; + } + + $(".save-candidate-button").on('click', function () { + //setCandidate(candidates); + mini.get("candidate-window").show(); + }); + + function setCandidate(candidate) { + new mini.Form("#candidate-form").setData({}); + $(candidate).each(function () { + var candidateInputId = candidateMapReverse[this.dimension]; + if (candidateInputId) { + var input = mini.get(candidateInputId); + if (input) { + input.setValue(this.idList.join(",")); + input.setText(this.nameList.join(",")); + } + } + }) + } + function setActivityConfig(config) { + form.setData(config); + activityConfigId = config.id; + setCandidate(candidates=parseCandidate(config.candidateDimension)); + } + + function parseCandidate(json) { + if (!json) { + return []; + } + return JSON.parse(json); + } + + $(".save-candidate") + .unbind("click") + .on("click", function () { + for (var type in candidateMap) { + var candidate = mini.get(type); + if (candidate && candidate.getValue()) { + candidates.push({ + dimension: candidateMap[type], + idList: candidate.getValue().split(","), + nameList: candidate.getText().split(",") + }) + } + } + mini.get("candidate-window").hide(); + }); + + $(".save-button").unbind("click").on("click", function () { + var data = tools.getFormData("#user-task-form"); + if (!data) { + return; + } + data.activityId = info.id; + data.processDefineKey = info.processDefinitionKey; + data.processDefineId = info.processDefinitionId; + data.candidateDimension = JSON.stringify(candidates); + + if (activityConfigId) { + data.id = activityConfigId; + } + var loading = message.loading("保存中...."); + request.patch("workflow/process/configuration/activity", data, function (response) { + loading.hide(); + if (response.status === 200) { + message.showTips("保存成功") + } else { + message.showTips("保存失败:" + response.message, "danger"); + } + }) + }); + + + request.createQuery("workflow/process/configuration/activity") + .where("processDefineId", info.processDefinitionId) + .and("activityId", info.id) + .limit(0, 1) + .exec(function (response) { + if (response.status === 200 && response.result.total === 1) { + setActivityConfig(response.result.data[0]); + } else { + request.createQuery("workflow/process/configuration/activity") + .where("processDefineKey", info.processDefinitionKey) + .and("activityId", info.id) + .and("status", 1) + .orderByDesc("updateTime") + .limit(0, 1) + .exec(function (res) { + if (response.status === 200 && res.result.total === 1) { + setActivityConfig(res.result.data[0]); + } + }) + } + }); + } + }; + + mini.parse(); + var defId = request.getParameter("processDefinitionId"); + var insId = request.getParameter("processInstanceId"); + + doProcessEditor(); + diagramFrame.attr("src", window.BASE_PATH + "workflow/diagram-viewer/operation.html?processInstanceId="+insId+"&processDefinitionId=" + defId); + diagramFrame.on("load", function () { + var win = diagramFrame[0].contentWindow; + win.onNodeClick = function (canvas, element, activity) { + console.log(activity) + $(".activity-editor").hide(); + activity.processDefinitionId = defId; + var editor = taskEditor[activity.properties.type]; + if (editor) { + editor(activity); + } else { + doProcessEditor(); + } + mini.layout() + } + }); + + function doProcessEditor() { + $(".activity-editor").hide(); + $(".process-editor").show(); + mini.layout(); + var processForm = new mini.Form("#process-form"); + var nowEditProcessId; + + $(".save-button") + .unbind('click') + .on("click", function () { + var form = tools.getFormData("#process-form", true); + if (form) { + form.id = nowEditProcessId; + form.processDefineKey = defKey; + form.processDefineId = defId; + request.patch("workflow/process/configuration/definition", form, function (response) { + if (response.status === 200) { + nowEditProcessId = response.result; + } else { + message.showTips("保存失败:" + response.message); + } + }) + } + }); + + function setProcessConfig(config) { + nowEditProcessId = config.id; + processForm.setData(config); + + + console.log(config); + } + + request.createQuery("workflow/process/configuration/definition") + .where("processDefineId", defId) + .limit(0, 1) + .exec(function (response) { + if (response.status === 200 && response.result.total === 1) { + setProcessConfig(response.result.data[0]); + } else { + request.createQuery("workflow/process/configuration/definition") + .where("processDefineKey", defKey) + .and("status", 1) + .orderByDesc("updateTime") + .limit(0, 1).exec(function (res) { + if (response.status === 200 && res.result.total === 1) { + setProcessConfig(res.result.data[0]); + } + }) + } + }); + + } + + function addPersonList(persons) { + var personCandidate = mini.get('personCandidate'); + var oldValue = personCandidate.getValue() ? personCandidate.getValue().split(",") : []; + var oldText = personCandidate.getText() ? personCandidate.getText().split(",") : []; + + $(persons).each(function () { + if (oldValue.indexOf(this.userId) === -1) { + oldValue.push(this.userId); + oldText.push(this.name); + } + }); + personCandidate.setValue(oldValue.join(",")); + personCandidate.setText(oldText.join(",")); + } + + function removePersonList(persons) { + var personCandidate = mini.get('personCandidate'); + var oldValue = personCandidate.getValue() ? personCandidate.getValue().split(",") : []; + var oldText = personCandidate.getText() ? personCandidate.getText().split(",") : []; + + $(persons).each(function () { + var index = oldValue.indexOf(this.userId); + if (index !== -1) { + oldValue.splice(index, 1); + oldText.splice(index, 1); + } + }); + personCandidate.setValue(oldValue.join(",")); + personCandidate.setText(oldText.join(",")); + } + + $(".select-person").on("click", function () { + tools.openWindow("admin/org/person/selector.html", "选择人员", "800", "600", function () { + + }, function () { + var iframe = this.getIFrameEl(); + + function bindEvent() { + var win = iframe.contentWindow; + if (win) { + win.onSelect = function (person) { + addPersonList([person]) + // console.log(person) + }; + win.onDeSelect = function (person) { + removePersonList([person]) + // console.log(person) + }; + win.onGridLoad = function (grid) { + var personCandidate = mini.get('personCandidate'); + $(personCandidate.getValue().split(",")).each(function () { + var userId = this + ""; + grid.filter(function (row) { + if (row.userId === userId) { + grid.select(row.id); + } + }) + }) + } + } + } + + bindEvent() + $(iframe).on("load", bindEvent) + }) + }) + }) + +}); \ No newline at end of file diff --git a/hsweb-ui/form/demo.html b/hsweb-ui/form/demo.html index 32d61f5..d45cef8 100644 --- a/hsweb-ui/form/demo.html +++ b/hsweb-ui/form/demo.html @@ -9,7 +9,7 @@ - + @@ -18,6 +18,10 @@ + + + + @@ -35,7 +39,7 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+提交 +
+ + + +
+
+ 下载 + 关闭 +
+
+ +
+
\ No newline at end of file diff --git a/hsweb-ui/plugins/echarts/echarts.min.js b/hsweb-ui/plugins/echarts/echarts.min.js new file mode 100644 index 0000000..b5a71e2 --- /dev/null +++ b/hsweb-ui/plugins/echarts/echarts.min.js @@ -0,0 +1,14 @@ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.echarts={})}(this,function(t){"use strict";function e(t){var e={},n={},i=t.match(/Firefox\/([\d.]+)/),r=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),a=t.match(/Edge\/([\d.]+)/),o=/micromessenger/i.test(t);return i&&(n.firefox=!0,n.version=i[1]),r&&(n.ie=!0,n.version=r[1]),a&&(n.edge=!0,n.version=a[1]),o&&(n.weChat=!0),{browser:n,os:e,node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:"undefined"!=typeof SVGRect,touchEventsSupported:"ontouchstart"in window&&!n.ie&&!n.edge,pointerEventsSupported:"onpointerdown"in window&&(n.edge||n.ie&&n.version>=11)}}function n(t,e){"createCanvas"===t&&(qp=null),Yp[t]=e}function i(t){if(null==t||"object"!=typeof t)return t;var e=t,n=Vp.call(t);if("[object Array]"===n){if(!R(t)){e=[];for(var r=0,a=t.length;a>r;r++)e[r]=i(t[r])}}else if(Fp[n]){if(!R(t)){var o=t.constructor;if(t.constructor.from)e=o.from(t);else{e=new o(t.length);for(var r=0,a=t.length;a>r;r++)e[r]=i(t[r])}}}else if(!Bp[n]&&!R(t)&&!T(t)){e={};for(var s in t)t.hasOwnProperty(s)&&(e[s]=i(t[s]))}return e}function r(t,e,n){if(!S(e)||!S(t))return n?i(e):t;for(var a in e)if(e.hasOwnProperty(a)){var o=t[a],s=e[a];!S(s)||!S(o)||_(s)||_(o)||T(s)||T(o)||M(s)||M(o)||R(s)||R(o)?!n&&a in t||(t[a]=i(e[a],!0)):r(o,s,n)}return t}function a(t,e){for(var n=t[0],i=1,a=t.length;a>i;i++)n=r(n,t[i],e);return n}function o(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function s(t,e,n){for(var i in e)e.hasOwnProperty(i)&&(n?null!=e[i]:null==t[i])&&(t[i]=e[i]);return t}function l(){return qp||(qp=Zp().getContext("2d")),qp}function h(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var n=0,i=t.length;i>n;n++)if(t[n]===e)return n}return-1}function u(t,e){function n(){}var i=t.prototype;n.prototype=e.prototype,t.prototype=new n;for(var r in i)t.prototype[r]=i[r];t.prototype.constructor=t,t.superClass=e}function c(t,e,n){t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,s(t,e,n)}function d(t){return t?"string"==typeof t?!1:"number"==typeof t.length:void 0}function f(t,e,n){if(t&&e)if(t.forEach&&t.forEach===Hp)t.forEach(e,n);else if(t.length===+t.length)for(var i=0,r=t.length;r>i;i++)e.call(n,t[i],i,t);else for(var a in t)t.hasOwnProperty(a)&&e.call(n,t[a],a,t)}function p(t,e,n){if(t&&e){if(t.map&&t.map===Xp)return t.map(e,n);for(var i=[],r=0,a=t.length;a>r;r++)i.push(e.call(n,t[r],r,t));return i}}function g(t,e,n,i){if(t&&e){if(t.reduce&&t.reduce===jp)return t.reduce(e,n,i);for(var r=0,a=t.length;a>r;r++)n=e.call(i,n,t[r],r,t);return n}}function m(t,e,n){if(t&&e){if(t.filter&&t.filter===Wp)return t.filter(e,n);for(var i=[],r=0,a=t.length;a>r;r++)e.call(n,t[r],r,t)&&i.push(t[r]);return i}}function v(t,e,n){if(t&&e)for(var i=0,r=t.length;r>i;i++)if(e.call(n,t[i],i,t))return t[i]}function y(t,e){var n=Up.call(arguments,2);return function(){return t.apply(e,n.concat(Up.call(arguments)))}}function x(t){var e=Up.call(arguments,1);return function(){return t.apply(this,e.concat(Up.call(arguments)))}}function _(t){return"[object Array]"===Vp.call(t)}function w(t){return"function"==typeof t}function b(t){return"[object String]"===Vp.call(t)}function S(t){var e=typeof t;return"function"===e||!!t&&"object"==e}function M(t){return!!Bp[Vp.call(t)]}function I(t){return!!Fp[Vp.call(t)]}function T(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}function D(t){return t!==t}function C(){for(var t=0,e=arguments.length;e>t;t++)if(null!=arguments[t])return arguments[t]}function A(t,e){return null!=t?t:e}function k(t,e,n){return null!=t?t:null!=e?e:n}function L(){return Function.call.apply(Up,arguments)}function P(t){if("number"==typeof t)return[t,t,t,t];var e=t.length;return 2===e?[t[0],t[1],t[0],t[1]]:3===e?[t[0],t[1],t[2],t[1]]:t}function O(t,e){if(!t)throw new Error(e)}function N(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}function E(t){t[Kp]=!0}function R(t){return t[Kp]}function z(t){function e(t,e){n?i.set(t,e):i.set(e,t)}var n=_(t),i=this;t instanceof z?t.each(e):t&&f(t,e)}function B(t){return new z(t)}function F(t,e){for(var n=new t.constructor(t.length+e.length),i=0;idg||-dg>t}function Se(t){this._target=t.target,this._life=t.life||1e3,this._delay=t.delay||0,this._initialized=!1,this.loop=null==t.loop?!1:t.loop,this.gap=t.gap||0,this.easing=t.easing||"Linear",this.onframe=t.onframe,this.ondestroy=t.ondestroy,this.onrestart=t.onrestart,this._pausedTime=0,this._paused=!1}function Me(t){return t=Math.round(t),0>t?0:t>255?255:t}function Ie(t){return t=Math.round(t),0>t?0:t>360?360:t}function Te(t){return 0>t?0:t>1?1:t}function De(t){return Me(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100*255:parseInt(t,10))}function Ce(t){return Te(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100:parseFloat(t))}function Ae(t,e,n){return 0>n?n+=1:n>1&&(n-=1),1>6*n?t+(e-t)*n*6:1>2*n?e:2>3*n?t+(e-t)*(2/3-n)*6:t}function ke(t,e,n){return t+(e-t)*n}function Le(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function Pe(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function Oe(t,e){Mg&&Pe(Mg,e),Mg=Sg.put(t,Mg||e.slice())}function Ne(t,e){if(t){e=e||[];var n=Sg.get(t);if(n)return Pe(e,n);t+="";var i=t.replace(/ /g,"").toLowerCase();if(i in bg)return Pe(e,bg[i]),Oe(t,e),e;if("#"!==i.charAt(0)){var r=i.indexOf("("),a=i.indexOf(")");if(-1!==r&&a+1===i.length){var o=i.substr(0,r),s=i.substr(r+1,a-(r+1)).split(","),l=1;switch(o){case"rgba":if(4!==s.length)return void Le(e,0,0,0,1);l=Ce(s.pop());case"rgb":return 3!==s.length?void Le(e,0,0,0,1):(Le(e,De(s[0]),De(s[1]),De(s[2]),l),Oe(t,e),e);case"hsla":return 4!==s.length?void Le(e,0,0,0,1):(s[3]=Ce(s[3]),Ee(s,e),Oe(t,e),e);case"hsl":return 3!==s.length?void Le(e,0,0,0,1):(Ee(s,e),Oe(t,e),e);default:return}}Le(e,0,0,0,1)}else{if(4===i.length){var h=parseInt(i.substr(1),16);return h>=0&&4095>=h?(Le(e,(3840&h)>>4|(3840&h)>>8,240&h|(240&h)>>4,15&h|(15&h)<<4,1),Oe(t,e),e):void Le(e,0,0,0,1)}if(7===i.length){var h=parseInt(i.substr(1),16);return h>=0&&16777215>=h?(Le(e,(16711680&h)>>16,(65280&h)>>8,255&h,1),Oe(t,e),e):void Le(e,0,0,0,1)}}}}function Ee(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=Ce(t[1]),r=Ce(t[2]),a=.5>=r?r*(i+1):r+i-r*i,o=2*r-a;return e=e||[],Le(e,Me(255*Ae(o,a,n+1/3)),Me(255*Ae(o,a,n)),Me(255*Ae(o,a,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function Re(t){if(t){var e,n,i=t[0]/255,r=t[1]/255,a=t[2]/255,o=Math.min(i,r,a),s=Math.max(i,r,a),l=s-o,h=(s+o)/2;if(0===l)e=0,n=0;else{n=.5>h?l/(s+o):l/(2-s-o);var u=((s-i)/6+l/2)/l,c=((s-r)/6+l/2)/l,d=((s-a)/6+l/2)/l;i===s?e=d-c:r===s?e=1/3+u-d:a===s&&(e=2/3+c-u),0>e&&(e+=1),e>1&&(e-=1)}var f=[360*e,n,h];return null!=t[3]&&f.push(t[3]),f}}function ze(t,e){var n=Ne(t);if(n){for(var i=0;3>i;i++)n[i]=0>e?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0,n[i]>255?n[i]=255:t[i]<0&&(n[i]=0);return We(n,4===n.length?"rgba":"rgb")}}function Be(t){var e=Ne(t);return e?((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1):void 0}function Fe(t,e,n){if(e&&e.length&&t>=0&&1>=t){n=n||[];var i=t*(e.length-1),r=Math.floor(i),a=Math.ceil(i),o=e[r],s=e[a],l=i-r;return n[0]=Me(ke(o[0],s[0],l)),n[1]=Me(ke(o[1],s[1],l)),n[2]=Me(ke(o[2],s[2],l)),n[3]=Te(ke(o[3],s[3],l)),n}}function Ve(t,e,n){if(e&&e.length&&t>=0&&1>=t){var i=t*(e.length-1),r=Math.floor(i),a=Math.ceil(i),o=Ne(e[r]),s=Ne(e[a]),l=i-r,h=We([Me(ke(o[0],s[0],l)),Me(ke(o[1],s[1],l)),Me(ke(o[2],s[2],l)),Te(ke(o[3],s[3],l))],"rgba");return n?{color:h,leftIndex:r,rightIndex:a,value:i}:h}}function Ge(t,e,n,i){return t=Ne(t),t?(t=Re(t),null!=e&&(t[0]=Ie(e)),null!=n&&(t[1]=Ce(n)),null!=i&&(t[2]=Ce(i)),We(Ee(t),"rgba")):void 0}function He(t,e){return t=Ne(t),t&&null!=e?(t[3]=Te(e),We(t,"rgba")):void 0}function We(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 Ue(t,e){return t[e]}function Xe(t,e,n){t[e]=n}function je(t,e,n){return(e-t)*n+t}function Ye(t,e,n){return n>.5?e:t}function Ze(t,e,n,i,r){var a=t.length;if(1==r)for(var o=0;a>o;o++)i[o]=je(t[o],e[o],n);else for(var s=a&&t[0].length,o=0;a>o;o++)for(var l=0;s>l;l++)i[o][l]=je(t[o][l],e[o][l],n)}function qe(t,e,n){var i=t.length,r=e.length;if(i!==r){var a=i>r;if(a)t.length=r;else for(var o=i;r>o;o++)t.push(1===n?e[o]:Cg.call(e[o]))}for(var s=t[0]&&t[0].length,o=0;ol;l++)isNaN(t[o][l])&&(t[o][l]=e[o][l])}function Ke(t,e,n){if(t===e)return!0;var i=t.length;if(i!==e.length)return!1;if(1===n){for(var r=0;i>r;r++)if(t[r]!==e[r])return!1}else for(var a=t[0].length,r=0;i>r;r++)for(var o=0;a>o;o++)if(t[r][o]!==e[r][o])return!1;return!0}function $e(t,e,n,i,r,a,o,s,l){var h=t.length;if(1==l)for(var u=0;h>u;u++)s[u]=Je(t[u],e[u],n[u],i[u],r,a,o);else for(var c=t[0].length,u=0;h>u;u++)for(var d=0;c>d;d++)s[u][d]=Je(t[u][d],e[u][d],n[u][d],i[u][d],r,a,o)}function Je(t,e,n,i,r,a,o){var s=.5*(n-t),l=.5*(i-e);return(2*(e-n)+s+l)*o+(-3*(e-n)-2*s-l)*a+s*r+e}function Qe(t){if(d(t)){var e=t.length;if(d(t[0])){for(var n=[],i=0;e>i;i++)n.push(Cg.call(t[i]));return n}return Cg.call(t)}return t}function tn(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}function en(t){var e=t[t.length-1].value;return d(e&&e[0])?2:1}function nn(t,e,n,i,r,a){var o=t._getter,s=t._setter,l="spline"===e,h=i.length;if(h){var u,c=i[0].value,f=d(c),p=!1,g=!1,m=f?en(i):0;i.sort(function(t,e){return t.time-e.time}),u=i[h-1].time;for(var v=[],y=[],x=i[0].value,_=!0,w=0;h>w;w++){v.push(i[w].time/u);var b=i[w].value;if(f&&Ke(b,x,m)||!f&&b===x||(_=!1),x=b,"string"==typeof b){var S=Ne(b);S?(b=S,p=!0):g=!0}y.push(b)}if(a||!_){for(var M=y[h-1],w=0;h-1>w;w++)f?qe(y[w],M,m):!isNaN(y[w])||isNaN(M)||g||p||(y[w]=M);f&&qe(o(t._target,r),M,m);var I,T,D,C,A,k,L=0,P=0;if(p)var O=[0,0,0,0];var N=function(t,e){var n;if(0>e)n=0;else if(P>e){for(I=Math.min(L+1,h-1),n=I;n>=0&&!(v[n]<=e);n--);n=Math.min(n,h-2)}else{for(n=L;h>n&&!(v[n]>e);n++);n=Math.min(n-1,h-2)}L=n,P=e;var i=v[n+1]-v[n];if(0!==i)if(T=(e-v[n])/i,l)if(C=y[n],D=y[0===n?n:n-1],A=y[n>h-2?h-1:n+1],k=y[n>h-3?h-1:n+2],f)$e(D,C,A,k,T,T*T,T*T*T,o(t,r),m);else{var a;if(p)a=$e(D,C,A,k,T,T*T,T*T*T,O,1),a=tn(O);else{if(g)return Ye(C,A,T);a=Je(D,C,A,k,T,T*T,T*T*T)}s(t,r,a)}else if(f)Ze(y[n],y[n+1],T,o(t,r),m);else{var a;if(p)Ze(y[n],y[n+1],T,O,1),a=tn(O);else{if(g)return Ye(y[n],y[n+1],T);a=je(y[n],y[n+1],T)}s(t,r,a)}},E=new Se({target:t._target,life:u,loop:t._loop,delay:t._delay,onframe:N,ondestroy:n});return e&&"spline"!==e&&(E.easing=e),E}}}function rn(t,e,n,i){0>n&&(t+=n,n=-n),0>i&&(e+=i,i=-i),this.x=t,this.y=e,this.width=n,this.height=i}function an(t){for(var e=0;t>=Gg;)e|=1&t,t>>=1;return t+e}function on(t,e,n,i){var r=e+1;if(r===n)return 1;if(i(t[r++],t[e])<0){for(;n>r&&i(t[r],t[r-1])<0;)r++;sn(t,e,r)}else for(;n>r&&i(t[r],t[r-1])>=0;)r++;return r-e}function sn(t,e,n){for(n--;n>e;){var i=t[e];t[e++]=t[n],t[n--]=i}}function ln(t,e,n,i,r){for(i===e&&i++;n>i;i++){for(var a,o=t[i],s=e,l=i;l>s;)a=s+l>>>1,r(o,t[a])<0?l=a:s=a+1;var h=i-s;switch(h){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;h>0;)t[s+h]=t[s+h-1],h--}t[s]=o}}function hn(t,e,n,i,r,a){var o=0,s=0,l=1;if(a(t,e[n+r])>0){for(s=i-r;s>l&&a(t,e[n+r+l])>0;)o=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s),o+=r,l+=r}else{for(s=r+1;s>l&&a(t,e[n+r-l])<=0;)o=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s);var h=o;o=r-l,l=r-h}for(o++;l>o;){var u=o+(l-o>>>1);a(t,e[n+u])>0?o=u+1:l=u}return l}function un(t,e,n,i,r,a){var o=0,s=0,l=1;if(a(t,e[n+r])<0){for(s=r+1;s>l&&a(t,e[n+r-l])<0;)o=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s);var h=o;o=r-l,l=r-h}else{for(s=i-r;s>l&&a(t,e[n+r+l])>=0;)o=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s),o+=r,l+=r}for(o++;l>o;){var u=o+(l-o>>>1);a(t,e[n+u])<0?l=u:o=u+1}return l}function cn(t,e){function n(t,e){l[c]=t,h[c]=e,c+=1}function i(){for(;c>1;){var t=c-2;if(t>=1&&h[t-1]<=h[t]+h[t+1]||t>=2&&h[t-2]<=h[t]+h[t-1])h[t-1]h[t+1])break;a(t)}}function r(){for(;c>1;){var t=c-2;t>0&&h[t-1]=r?o(i,r,a,u):s(i,r,a,u)))}function o(n,i,r,a){var o=0;for(o=0;i>o;o++)d[o]=t[n+o];var s=0,l=r,h=n;if(t[h++]=t[l++],0!==--a){if(1===i){for(o=0;a>o;o++)t[h+o]=t[l+o];return void(t[h+a]=d[s])}for(var c,f,p,g=u;;){c=0,f=0,p=!1;do if(e(t[l],d[s])<0){if(t[h++]=t[l++],f++,c=0,0===--a){p=!0;break}}else if(t[h++]=d[s++],c++,f=0,1===--i){p=!0;break}while(g>(c|f));if(p)break;do{if(c=un(t[l],d,s,i,0,e),0!==c){for(o=0;c>o;o++)t[h+o]=d[s+o];if(h+=c,s+=c,i-=c,1>=i){p=!0;break}}if(t[h++]=t[l++],0===--a){p=!0;break}if(f=hn(d[s],t,l,a,0,e),0!==f){for(o=0;f>o;o++)t[h+o]=t[l+o];if(h+=f,l+=f,a-=f,0===a){p=!0;break}}if(t[h++]=d[s++],1===--i){p=!0;break}g--}while(c>=Hg||f>=Hg);if(p)break;0>g&&(g=0),g+=2}if(u=g,1>u&&(u=1),1===i){for(o=0;a>o;o++)t[h+o]=t[l+o];t[h+a]=d[s]}else{if(0===i)throw new Error;for(o=0;i>o;o++)t[h+o]=d[s+o]}}else for(o=0;i>o;o++)t[h+o]=d[s+o]}function s(n,i,r,a){var o=0;for(o=0;a>o;o++)d[o]=t[r+o];var s=n+i-1,l=a-1,h=r+a-1,c=0,f=0;if(t[h--]=t[s--],0!==--i){if(1===a){for(h-=i,s-=i,f=h+1,c=s+1,o=i-1;o>=0;o--)t[f+o]=t[c+o];return void(t[h]=d[l])}for(var p=u;;){var g=0,m=0,v=!1;do if(e(d[l],t[s])<0){if(t[h--]=t[s--],g++,m=0,0===--i){v=!0;break}}else if(t[h--]=d[l--],m++,g=0,1===--a){v=!0;break}while(p>(g|m));if(v)break;do{if(g=i-un(d[l],t,n,i,i-1,e),0!==g){for(h-=g,s-=g,i-=g,f=h+1,c=s+1,o=g-1;o>=0;o--)t[f+o]=t[c+o];if(0===i){v=!0;break}}if(t[h--]=d[l--],1===--a){v=!0;break}if(m=a-hn(t[s],d,0,a,a-1,e),0!==m){for(h-=m,l-=m,a-=m,f=h+1,c=l+1,o=0;m>o;o++)t[f+o]=d[c+o];if(1>=a){v=!0;break}}if(t[h--]=t[s--],0===--i){v=!0;break}p--}while(g>=Hg||m>=Hg);if(v)break;0>p&&(p=0),p+=2}if(u=p,1>u&&(u=1),1===a){for(h-=i,s-=i,f=h+1,c=s+1,o=i-1;o>=0;o--)t[f+o]=t[c+o];t[h]=d[l]}else{if(0===a)throw new Error;for(c=h-(a-1),o=0;a>o;o++)t[c+o]=d[o]}}else for(c=h-(a-1),o=0;a>o;o++)t[c+o]=d[o]}var l,h,u=Hg,c=0,d=[];l=[],h=[],this.mergeRuns=i,this.forceMergeRuns=r,this.pushRun=n}function dn(t,e,n,i){n||(n=0),i||(i=t.length);var r=i-n;if(!(2>r)){var a=0;if(Gg>r)return a=on(t,n,i,e),void ln(t,n,i,n+a,e);var o=new cn(t,e),s=an(r);do{if(a=on(t,n,i,e),s>a){var l=r;l>s&&(l=s),ln(t,n,n+l,n+a,e),a=l}o.pushRun(n,a),o.mergeRuns(),r-=a,n+=a}while(0!==r);o.forceMergeRuns()}}function fn(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}function pn(t,e,n){var i=null==e.x?0:e.x,r=null==e.x2?1:e.x2,a=null==e.y?0:e.y,o=null==e.y2?0:e.y2;e.global||(i=i*n.width+n.x,r=r*n.width+n.x,a=a*n.height+n.y,o=o*n.height+n.y),i=isNaN(i)?0:i,r=isNaN(r)?1:r,a=isNaN(a)?0:a,o=isNaN(o)?0:o;var s=t.createLinearGradient(i,a,r,o);return s}function gn(t,e,n){var i=n.width,r=n.height,a=Math.min(i,r),o=null==e.x?.5:e.x,s=null==e.y?.5:e.y,l=null==e.r?.5:e.r;e.global||(o=o*i+n.x,s=s*r+n.y,l*=a);var h=t.createRadialGradient(o,s,0,o,s,l);return h}function mn(){return!1}function vn(t,e,n){var i=Zp(),r=e.getWidth(),a=e.getHeight(),o=i.style;return o&&(o.position="absolute",o.left=0,o.top=0,o.width=r+"px",o.height=a+"px",i.setAttribute("data-zr-dom-id",t)),i.width=r*n,i.height=a*n,i}function yn(t){if("string"==typeof t){var e=tm.get(t);return e&&e.image}return t}function xn(t,e,n,i,r){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!n)return e;var a=tm.get(t),o={hostEl:n,cb:i,cbPayload:r};return a?(e=a.image,!wn(e)&&a.pending.push(o)):(!e&&(e=new Image),e.onload=_n,tm.put(t,e.__cachedImgObj={image:e,pending:[o]}),e.src=e.__zrImageSrc=t),e}return t}return e}function _n(){var t=this.__cachedImgObj;this.onload=this.__cachedImgObj=null;for(var e=0;ea;a++)r=Math.max(En(i[a],e).width,r);return nm>im&&(nm=0,em={}),nm++,em[n]=r,r}function Mn(t,e,n,i,r,a,o){return a?Tn(t,e,n,i,r,a,o):In(t,e,n,i,r,o)}function In(t,e,n,i,r,a){var o=Rn(t,e,r,a),s=Sn(t,e);r&&(s+=r[1]+r[3]);var l=o.outerHeight,h=Dn(0,s,n),u=Cn(0,l,i),c=new rn(h,u,s,l);return c.lineHeight=o.lineHeight,c}function Tn(t,e,n,i,r,a,o){var s=zn(t,{rich:a,truncate:o,font:e,textAlign:n,textPadding:r}),l=s.outerWidth,h=s.outerHeight,u=Dn(0,l,n),c=Cn(0,h,i);return new rn(u,c,l,h)}function Dn(t,e,n){return"right"===n?t-=e:"center"===n&&(t-=e/2),t}function Cn(t,e,n){return"middle"===n?t-=e/2:"bottom"===n&&(t-=e),t}function An(t,e,n){var i=e.x,r=e.y,a=e.height,o=e.width,s=a/2,l="left",h="top";switch(t){case"left":i-=n,r+=s,l="right",h="middle";break;case"right":i+=n+o,r+=s,h="middle";break;case"top":i+=o/2,r-=n,l="center",h="bottom";break;case"bottom":i+=o/2,r+=a+n,l="center";break;case"inside":i+=o/2,r+=s,l="center",h="middle";break;case"insideLeft":i+=n,r+=s,h="middle";break;case"insideRight":i+=o-n,r+=s,l="right",h="middle";break;case"insideTop":i+=o/2,r+=n,l="center";break;case"insideBottom":i+=o/2,r+=a-n,l="center",h="bottom";break;case"insideTopLeft":i+=n,r+=n;break;case"insideTopRight":i+=o-n,r+=n,l="right";break;case"insideBottomLeft":i+=n,r+=a-n,h="bottom";break;case"insideBottomRight":i+=o-n,r+=a-n,l="right",h="bottom"}return{x:i,y:r,textAlign:l,textVerticalAlign:h}}function kn(t,e,n,i,r){if(!e)return"";var a=(t+"").split("\n");r=Ln(e,n,i,r);for(var o=0,s=a.length;s>o;o++)a[o]=Pn(a[o],r);return a.join("\n")}function Ln(t,e,n,i){i=o({},i),i.font=e;var n=A(n,"...");i.maxIterations=A(i.maxIterations,2);var r=i.minChar=A(i.minChar,0);i.cnCharWidth=Sn("国",e);var a=i.ascCharWidth=Sn("a",e);i.placeholder=A(i.placeholder,"");for(var s=t=Math.max(0,t-1),l=0;r>l&&s>=a;l++)s-=a;var h=Sn(n);return h>s&&(n="",h=0),s=t-h,i.ellipsis=n,i.ellipsisWidth=h,i.contentWidth=s,i.containerWidth=t,i}function Pn(t,e){var n=e.containerWidth,i=e.font,r=e.contentWidth;if(!n)return"";var a=Sn(t,i);if(n>=a)return t;for(var o=0;;o++){if(r>=a||o>=e.maxIterations){t+=e.ellipsis;break}var s=0===o?On(t,r,e.ascCharWidth,e.cnCharWidth):a>0?Math.floor(t.length*r/a):0;t=t.substr(0,s),a=Sn(t,i)}return""===t&&(t=e.placeholder),t}function On(t,e,n,i){for(var r=0,a=0,o=t.length;o>a&&e>r;a++){var s=t.charCodeAt(a);r+=s>=0&&127>=s?n:i}return a}function Nn(t){return Sn("国",t)}function En(t,e){return om.measureText(t,e)}function Rn(t,e,n,i){null!=t&&(t+="");var r=Nn(e),a=t?t.split("\n"):[],o=a.length*r,s=o;if(n&&(s+=n[0]+n[2]),t&&i){var l=i.outerHeight,h=i.outerWidth;if(null!=l&&s>l)t="",a=[];else if(null!=h)for(var u=Ln(h-(n?n[1]+n[3]:0),e,i.ellipsis,{minChar:i.minChar,placeholder:i.placeholder}),c=0,d=a.length;d>c;c++)a[c]=Pn(a[c],u)}return{lines:a,height:o,outerHeight:s,lineHeight:r}}function zn(t,e){var n={lines:[],width:0,height:0};if(null!=t&&(t+=""),!t)return n;for(var i,r=rm.lastIndex=0;null!=(i=rm.exec(t));){var a=i.index;a>r&&Bn(n,t.substring(r,a)),Bn(n,i[2],i[1]),r=rm.lastIndex}rf)return{lines:[],width:0,height:0};x.textWidth=Sn(x.text,b);var M=_.textWidth,I=null==M||"auto"===M;if("string"==typeof M&&"%"===M.charAt(M.length-1))x.percentWidth=M,h.push(x),M=0;else{if(I){M=x.textWidth;var T=_.textBackgroundColor,D=T&&T.image;D&&(D=yn(D),wn(D)&&(M=Math.max(M,D.width*S/D.height)))}var C=w?w[1]+w[3]:0;M+=C;var L=null!=d?d-v:null;null!=L&&M>L&&(!I||C>L?(x.text="",x.textWidth=M=0):(x.text=kn(x.text,L-C,b,c.ellipsis,{minChar:c.minChar}),x.textWidth=Sn(x.text,b),M=x.textWidth+C))}v+=x.width=M,_&&(m=Math.max(m,x.lineHeight))}g.width=v,g.lineHeight=m,s+=m,l=Math.max(l,v)}n.outerWidth=n.width=A(e.textWidth,l),n.outerHeight=n.height=A(e.textHeight,s),u&&(n.outerWidth+=u[1]+u[3],n.outerHeight+=u[0]+u[2]);for(var p=0;pl&&(o+=l,l=-l),0>h&&(s+=h,h=-h),"number"==typeof u?n=i=r=a=u:u instanceof Array?1===u.length?n=i=r=a=u[0]:2===u.length?(n=r=u[0],i=a=u[1]):3===u.length?(n=u[0],i=a=u[1],r=u[2]):(n=u[0],i=u[1],r=u[2],a=u[3]):n=i=r=a=0;var c;n+i>l&&(c=n+i,n*=l/c,i*=l/c),r+a>l&&(c=r+a,r*=l/c,a*=l/c),i+r>h&&(c=i+r,i*=h/c,r*=h/c),n+a>h&&(c=n+a,n*=h/c,a*=h/c),t.moveTo(o+n,s),t.lineTo(o+l-i,s),0!==i&&t.arc(o+l-i,s+i,i,-Math.PI/2,0),t.lineTo(o+l,s+h-r),0!==r&&t.arc(o+l-r,s+h-r,r,0,Math.PI/2),t.lineTo(o+a,s+h),0!==a&&t.arc(o+a,s+h-a,a,Math.PI/2,Math.PI),t.lineTo(o,s+n),0!==n&&t.arc(o+n,s+n,n,Math.PI,1.5*Math.PI)}function Gn(t){return Hn(t),f(t.rich,Hn),t}function Hn(t){if(t){t.font=Fn(t);var e=t.textAlign;"middle"===e&&(e="center"),t.textAlign=null==e||sm[e]?e:"left";var n=t.textVerticalAlign||t.textBaseline;"center"===n&&(n="middle"),t.textVerticalAlign=null==n||lm[n]?n:"top";var i=t.textPadding;i&&(t.textPadding=P(t.textPadding))}}function Wn(t,e,n,i,r){i.rich?Xn(t,e,n,i,r):Un(t,e,n,i,r)}function Un(t,e,n,i,r){var a=Qn(e,"font",i.font||am),o=i.textPadding,s=t.__textCotentBlock;(!s||t.__dirty)&&(s=t.__textCotentBlock=Rn(n,a,o,i.truncate));var l=s.outerHeight,h=s.lines,u=s.lineHeight,c=Jn(l,i,r),d=c.baseX,f=c.baseY,p=c.textAlign,g=c.textVerticalAlign;Yn(e,i,r,d,f);var m=Cn(f,l,g),v=d,y=m,x=qn(i);if(x||o){var _=Sn(n,a),w=_;o&&(w+=o[1]+o[3]);var b=Dn(d,w,p);x&&Kn(t,e,i,b,m,w,l),o&&(v=ii(d,p,o),y+=o[0])}Qn(e,"textAlign",p||"left"),Qn(e,"textBaseline","middle"),Qn(e,"shadowBlur",i.textShadowBlur||0),Qn(e,"shadowColor",i.textShadowColor||"transparent"),Qn(e,"shadowOffsetX",i.textShadowOffsetX||0),Qn(e,"shadowOffsetY",i.textShadowOffsetY||0),y+=u/2;var S=i.textStrokeWidth,M=ti(i.textStroke,S),I=ei(i.textFill);M&&(Qn(e,"lineWidth",S),Qn(e,"strokeStyle",M)),I&&Qn(e,"fillStyle",I);for(var T=0;TT&&(_=b[T],!_.textAlign||"left"===_.textAlign);)Zn(t,e,_,i,M,v,D,"left"),I-=_.width,D+=_.width,T++;for(;A>=0&&(_=b[A],"right"===_.textAlign);)Zn(t,e,_,i,M,v,C,"right"),I-=_.width,C-=_.width,A--;for(D+=(a-(D-m)-(y-C)-I)/2;A>=T;)_=b[T],Zn(t,e,_,i,M,v,D+_.width/2,"center"),D+=_.width,T++;v+=M}}function Yn(t,e,n,i,r){if(n&&e.textRotation){var a=e.textOrigin;"center"===a?(i=n.width/2+n.x,r=n.height/2+n.y):a&&(i=a[0]+n.x,r=a[1]+n.y),t.translate(i,r),t.rotate(-e.textRotation),t.translate(-i,-r)}}function Zn(t,e,n,i,r,a,o,s){var l=i.rich[n.styleName]||{},h=n.textVerticalAlign,u=a+r/2;"top"===h?u=a+n.height/2:"bottom"===h&&(u=a+r-n.height/2),!n.isLineHolder&&qn(l)&&Kn(t,e,l,"right"===s?o-n.width:"center"===s?o-n.width/2:o,u-n.height/2,n.width,n.height);var c=n.textPadding;c&&(o=ii(o,s,c),u-=n.height/2-c[2]-n.textHeight/2),Qn(e,"shadowBlur",k(l.textShadowBlur,i.textShadowBlur,0)),Qn(e,"shadowColor",l.textShadowColor||i.textShadowColor||"transparent"),Qn(e,"shadowOffsetX",k(l.textShadowOffsetX,i.textShadowOffsetX,0)),Qn(e,"shadowOffsetY",k(l.textShadowOffsetY,i.textShadowOffsetY,0)),Qn(e,"textAlign",s),Qn(e,"textBaseline","middle"),Qn(e,"font",n.font||am);var d=ti(l.textStroke||i.textStroke,p),f=ei(l.textFill||i.textFill),p=A(l.textStrokeWidth,i.textStrokeWidth);d&&(Qn(e,"lineWidth",p),Qn(e,"strokeStyle",d),e.strokeText(n.text,o,u)),f&&(Qn(e,"fillStyle",f),e.fillText(n.text,o,u))}function qn(t){return t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor}function Kn(t,e,n,i,r,a,o){var s=n.textBackgroundColor,l=n.textBorderWidth,h=n.textBorderColor,u=b(s);if(Qn(e,"shadowBlur",n.textBoxShadowBlur||0),Qn(e,"shadowColor",n.textBoxShadowColor||"transparent"),Qn(e,"shadowOffsetX",n.textBoxShadowOffsetX||0),Qn(e,"shadowOffsetY",n.textBoxShadowOffsetY||0),u||l&&h){e.beginPath();var c=n.textBorderRadius;c?Vn(e,{x:i,y:r,width:a,height:o,r:c}):e.rect(i,r,a,o),e.closePath()}if(u)Qn(e,"fillStyle",s),e.fill();else if(S(s)){var d=s.image;d=xn(d,null,t,$n,s),d&&wn(d)&&e.drawImage(d,i,r,a,o)}l&&h&&(Qn(e,"lineWidth",l),Qn(e,"strokeStyle",h),e.stroke())}function $n(t,e){e.image=t}function Jn(t,e,n){var i=e.x||0,r=e.y||0,a=e.textAlign,o=e.textVerticalAlign;if(n){var s=e.textPosition;if(s instanceof Array)i=n.x+ni(s[0],n.width),r=n.y+ni(s[1],n.height);else{var l=An(s,n,e.textDistance);i=l.x,r=l.y,a=a||l.textAlign,o=o||l.textVerticalAlign}var h=e.textOffset;h&&(i+=h[0],r+=h[1])}return{baseX:i,baseY:r,textAlign:a,textVerticalAlign:o}}function Qn(t,e,n){return t[e]=Xg(t,e,n),t[e]}function ti(t,e){return null==t||0>=e||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function ei(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function ni(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function ii(t,e,n){return"right"===e?t-n[1]:"center"===e?t+n[3]/2-n[1]/2:t+n[3]}function ri(t,e){return null!=t&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)}function ai(t){t=t||{},Rg.call(this,t);for(var e in t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new Yg(t.style,this),this._rect=null,this.__clipPaths=[]}function oi(t){ai.call(this,t)}function si(t){return parseInt(t,10)}function li(t){return t?t.__builtin__?!0:"function"!=typeof t.resize||"function"!=typeof t.refresh?!1:!0:!1}function hi(t,e,n){return gm.copy(t.getBoundingRect()),t.transform&&gm.applyTransform(t.transform),mm.width=e,mm.height=n,!gm.intersect(mm)}function ui(t,e){if(t==e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var n=0;n=0;if(r){var a="touchend"!=i?e.targetTouches[0]:e.changedTouches[0];a&&pi(t,a,e,n)}else pi(t,e,e,n),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;var o=e.button;return null==e.which&&void 0!==o&&xm.test(e.type)&&(e.which=1&o?1:2&o?3:4&o?2:0),e}function vi(t,e,n){ym?t.addEventListener(e,n):t.attachEvent("on"+e,n)}function yi(t,e,n){ym?t.removeEventListener(e,n):t.detachEvent("on"+e,n)}function xi(t){return t.which>1}function _i(t){var e=t[1][0]-t[0][0],n=t[1][1]-t[0][1];return Math.sqrt(e*e+n*n)}function wi(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}function bi(t){return"mousewheel"===t&&zp.browser.firefox?"DOMMouseScroll":t}function Si(t,e,n){var i=t._gestureMgr;"start"===n&&i.clear();var r=i.recognize(e,t.handler.findHover(e.zrX,e.zrY,null).target,t.dom);if("end"===n&&i.clear(),r){var a=r.type;e.gestureEvent=a,t.handler.dispatchToElement({target:r.target},a,r.event)}}function Mi(t){t._touching=!0,clearTimeout(t._touchTimer),t._touchTimer=setTimeout(function(){t._touching=!1},700)}function Ii(t){var e=t.pointerType; +return"pen"===e||"touch"===e}function Ti(t){function e(t,e){return function(){return e._touching?void 0:t.apply(e,arguments)}}f(Tm,function(e){t._handlers[e]=y(Am[e],t)}),f(Cm,function(e){t._handlers[e]=y(Am[e],t)}),f(Im,function(n){t._handlers[n]=e(Am[n],t)})}function Di(t){function e(e,n){f(e,function(e){vi(t,bi(e),n._handlers[e])},n)}ag.call(this),this.dom=t,this._touching=!1,this._touchTimer,this._gestureMgr=new bm,this._handlers={},Ti(this),zp.pointerEventsSupported?e(Cm,this):(zp.touchEventsSupported&&e(Tm,this),e(Im,this))}function Ci(t,e){var n=new Em(Ep(),t,e);return Om[n.id]=n,n}function Ai(t){if(t)t.dispose();else{for(var e in Om)Om.hasOwnProperty(e)&&Om[e].dispose();Om={}}return this}function ki(t){return Om[t]}function Li(t,e){Pm[t]=e}function Pi(t){delete Om[t]}function Oi(t){return t instanceof Array?t:null==t?[]:[t]}function Ni(t,e,n){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var i=0,r=n.length;r>i;i++){var a=n[i];!t.emphasis[e].hasOwnProperty(a)&&t[e].hasOwnProperty(a)&&(t.emphasis[e][a]=t[e][a])}}}function Ei(t){return!Bm(t)||Fm(t)||t instanceof Date?t:t.value}function Ri(t){return Bm(t)&&!(t instanceof Array)}function zi(t,e){e=(e||[]).slice();var n=p(t||[],function(t){return{exist:t}});return zm(e,function(t,i){if(Bm(t)){for(var r=0;r=n.length&&n.push({option:t})}}),n}function Bi(t){var e=B();zm(t,function(t){var n=t.exist;n&&e.set(n.id,t)}),zm(t,function(t){var n=t.option;O(!n||null==n.id||!e.get(n.id)||e.get(n.id)===t,"id duplicates: "+(n&&n.id)),n&&null!=n.id&&e.set(n.id,t),!t.keyInfo&&(t.keyInfo={})}),zm(t,function(t,n){var i=t.exist,r=t.option,a=t.keyInfo;if(Bm(r)){if(a.name=null!=r.name?r.name+"":i?i.name:Vm+n,i)a.id=i.id;else if(null!=r.id)a.id=r.id+"";else{var o=0;do a.id="\x00"+a.name+"\x00"+o++;while(e.get(a.id))}e.set(a.id,t)}})}function Fi(t){var e=t.name;return!(!e||!e.indexOf(Vm))}function Vi(t){return Bm(t)&&t.id&&0===(t.id+"").indexOf("\x00_ec_\x00")}function Gi(t,e){return null!=e.dataIndexInside?e.dataIndexInside:null!=e.dataIndex?_(e.dataIndex)?p(e.dataIndex,function(e){return t.indexOfRawIndex(e)}):t.indexOfRawIndex(e.dataIndex):null!=e.name?_(e.name)?p(e.name,function(e){return t.indexOfName(e)}):t.indexOfName(e.name):void 0}function Hi(){var t="__\x00ec_inner_"+Hm++ +"_"+Math.random().toFixed(5);return function(e){return e[t]||(e[t]={})}}function Wi(t,e,n){if(b(e)){var i={};i[e+"Index"]=0,e=i}var r=n&&n.defaultMainType;!r||Ui(e,r+"Index")||Ui(e,r+"Id")||Ui(e,r+"Name")||(e[r+"Index"]=0);var a={};return zm(e,function(i,r){var i=e[r];if("dataIndex"===r||"dataIndexInside"===r)return void(a[r]=i);var o=r.match(/^(\w+)(Index|Id|Name)$/)||[],s=o[1],l=(o[2]||"").toLowerCase();if(!(!s||!l||null==i||"index"===l&&"none"===i||n&&n.includeMainTypes&&h(n.includeMainTypes,s)<0)){var u={mainType:s};("index"!==l||"all"!==i)&&(u[l]=i);var c=t.queryComponents(u);a[s+"Models"]=c,a[s+"Model"]=c[0]}}),a}function Ui(t,e){return t&&t.hasOwnProperty(e)}function Xi(t,e,n){t.setAttribute?t.setAttribute(e,n):t[e]=n}function ji(t,e){return t.getAttribute?t.getAttribute(e):t[e]}function Yi(t){var e={main:"",sub:""};return t&&(t=t.split(Wm),e.main=t[0]||"",e.sub=t[1]||""),e}function Zi(t){O(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}function qi(t){t.$constructor=t,t.extend=function(t){var e=this,n=function(){t.$constructor?t.$constructor.apply(this,arguments):e.apply(this,arguments)};return o(n.prototype,t),n.extend=this.extend,n.superCall=$i,n.superApply=Ji,u(n,this),n.superClass=e,n}}function Ki(t){var e=["__\x00is_clz",Xm++,Math.random().toFixed(3)].join("_");t.prototype[e]=!0,t.isInstance=function(t){return!(!t||!t[e])}}function $i(t,e){var n=L(arguments,2);return this.superClass.prototype[e].apply(t,n)}function Ji(t,e,n){return this.superClass.prototype[e].apply(t,n)}function Qi(t,e){function n(t){var e=i[t.main];return e&&e[Um]||(e=i[t.main]={},e[Um]=!0),e}e=e||{};var i={};if(t.registerClass=function(t,e){if(e)if(Zi(e),e=Yi(e),e.sub){if(e.sub!==Um){var r=n(e);r[e.sub]=t}}else i[e.main]=t;return t},t.getClass=function(t,e,n){var r=i[t];if(r&&r[Um]&&(r=e?r[e]:null),n&&!r)throw new Error(e?"Component "+t+"."+(e||"")+" not exists. Load it first.":t+".type should be specified.");return r},t.getClassesByMainType=function(t){t=Yi(t);var e=[],n=i[t.main];return n&&n[Um]?f(n,function(t,n){n!==Um&&e.push(t)}):e.push(n),e},t.hasClass=function(t){return t=Yi(t),!!i[t.main]},t.getAllClassMainTypes=function(){var t=[];return f(i,function(e,n){t.push(n)}),t},t.hasSubTypes=function(t){t=Yi(t);var e=i[t.main];return e&&e[Um]},t.parseClassType=Yi,e.registerWhenExtend){var r=t.extend;r&&(t.extend=function(e){var n=r.call(this,e);return t.registerClass(n,e.type)})}return t}function tr(t){return t>-Qm&&Qm>t}function er(t){return t>Qm||-Qm>t}function nr(t,e,n,i,r){var a=1-r;return a*a*(a*t+3*r*e)+r*r*(r*i+3*a*n)}function ir(t,e,n,i,r){var a=1-r;return 3*(((e-t)*a+2*(n-e)*r)*a+(i-n)*r*r)}function rr(t,e,n,i,r,a){var o=i+3*(e-n)-t,s=3*(n-2*e+t),l=3*(e-t),h=t-r,u=s*s-3*o*l,c=s*l-9*o*h,d=l*l-3*s*h,f=0;if(tr(u)&&tr(c))if(tr(s))a[0]=0;else{var p=-l/s;p>=0&&1>=p&&(a[f++]=p)}else{var g=c*c-4*u*d;if(tr(g)){var m=c/u,p=-s/o+m,v=-m/2;p>=0&&1>=p&&(a[f++]=p),v>=0&&1>=v&&(a[f++]=v)}else if(g>0){var y=Jm(g),x=u*s+1.5*o*(-c+y),_=u*s+1.5*o*(-c-y);x=0>x?-$m(-x,nv):$m(x,nv),_=0>_?-$m(-_,nv):$m(_,nv);var p=(-s-(x+_))/(3*o);p>=0&&1>=p&&(a[f++]=p)}else{var w=(2*u*s-3*o*c)/(2*Jm(u*u*u)),b=Math.acos(w)/3,S=Jm(u),M=Math.cos(b),p=(-s-2*S*M)/(3*o),v=(-s+S*(M+ev*Math.sin(b)))/(3*o),I=(-s+S*(M-ev*Math.sin(b)))/(3*o);p>=0&&1>=p&&(a[f++]=p),v>=0&&1>=v&&(a[f++]=v),I>=0&&1>=I&&(a[f++]=I)}}return f}function ar(t,e,n,i,r){var a=6*n-12*e+6*t,o=9*e+3*i-3*t-9*n,s=3*e-3*t,l=0;if(tr(o)){if(er(a)){var h=-s/a;h>=0&&1>=h&&(r[l++]=h)}}else{var u=a*a-4*o*s;if(tr(u))r[0]=-a/(2*o);else if(u>0){var c=Jm(u),h=(-a+c)/(2*o),d=(-a-c)/(2*o);h>=0&&1>=h&&(r[l++]=h),d>=0&&1>=d&&(r[l++]=d)}}return l}function or(t,e,n,i,r,a){var o=(e-t)*r+t,s=(n-e)*r+e,l=(i-n)*r+n,h=(s-o)*r+o,u=(l-s)*r+s,c=(u-h)*r+h;a[0]=t,a[1]=o,a[2]=h,a[3]=c,a[4]=c,a[5]=u,a[6]=l,a[7]=i}function sr(t,e,n,i,r,a,o,s,l,h,u){var c,d,f,p,g,m=.005,v=1/0;iv[0]=l,iv[1]=h;for(var y=0;1>y;y+=.05)rv[0]=nr(t,n,r,o,y),rv[1]=nr(e,i,a,s,y),p=ng(iv,rv),v>p&&(c=y,v=p);v=1/0;for(var x=0;32>x&&!(tv>m);x++)d=c-m,f=c+m,rv[0]=nr(t,n,r,o,d),rv[1]=nr(e,i,a,s,d),p=ng(rv,iv),d>=0&&v>p?(c=d,v=p):(av[0]=nr(t,n,r,o,f),av[1]=nr(e,i,a,s,f),g=ng(av,iv),1>=f&&v>g?(c=f,v=g):m*=.5);return u&&(u[0]=nr(t,n,r,o,c),u[1]=nr(e,i,a,s,c)),Jm(v)}function lr(t,e,n,i){var r=1-i;return r*(r*t+2*i*e)+i*i*n}function hr(t,e,n,i){return 2*((1-i)*(e-t)+i*(n-e))}function ur(t,e,n,i,r){var a=t-2*e+n,o=2*(e-t),s=t-i,l=0;if(tr(a)){if(er(o)){var h=-s/o;h>=0&&1>=h&&(r[l++]=h)}}else{var u=o*o-4*a*s;if(tr(u)){var h=-o/(2*a);h>=0&&1>=h&&(r[l++]=h)}else if(u>0){var c=Jm(u),h=(-o+c)/(2*a),d=(-o-c)/(2*a);h>=0&&1>=h&&(r[l++]=h),d>=0&&1>=d&&(r[l++]=d)}}return l}function cr(t,e,n){var i=t+n-2*e;return 0===i?.5:(t-e)/i}function dr(t,e,n,i,r){var a=(e-t)*i+t,o=(n-e)*i+e,s=(o-a)*i+a;r[0]=t,r[1]=a,r[2]=s,r[3]=s,r[4]=o,r[5]=n}function fr(t,e,n,i,r,a,o,s,l){var h,u=.005,c=1/0;iv[0]=o,iv[1]=s;for(var d=0;1>d;d+=.05){rv[0]=lr(t,n,r,d),rv[1]=lr(e,i,a,d);var f=ng(iv,rv);c>f&&(h=d,c=f)}c=1/0;for(var p=0;32>p&&!(tv>u);p++){var g=h-u,m=h+u;rv[0]=lr(t,n,r,g),rv[1]=lr(e,i,a,g);var f=ng(rv,iv);if(g>=0&&c>f)h=g,c=f;else{av[0]=lr(t,n,r,m),av[1]=lr(e,i,a,m);var v=ng(av,iv);1>=m&&c>v?(h=m,c=v):u*=.5}}return l&&(l[0]=lr(t,n,r,h),l[1]=lr(e,i,a,h)),Jm(c)}function pr(t,e,n){if(0!==t.length){var i,r=t[0],a=r[0],o=r[0],s=r[1],l=r[1];for(i=1;iu;u++){var p=d(t,n,r,o,pv[u]);l[0]=ov(p,l[0]),h[0]=sv(p,h[0])}for(f=c(e,i,a,s,gv),u=0;f>u;u++){var g=d(e,i,a,s,gv[u]);l[1]=ov(g,l[1]),h[1]=sv(g,h[1])}l[0]=ov(t,l[0]),h[0]=sv(t,h[0]),l[0]=ov(o,l[0]),h[0]=sv(o,h[0]),l[1]=ov(e,l[1]),h[1]=sv(e,h[1]),l[1]=ov(s,l[1]),h[1]=sv(s,h[1])}function vr(t,e,n,i,r,a,o,s){var l=cr,h=lr,u=sv(ov(l(t,n,r),1),0),c=sv(ov(l(e,i,a),1),0),d=h(t,n,r,u),f=h(e,i,a,c);o[0]=ov(t,r,d),o[1]=ov(e,a,f),s[0]=sv(t,r,d),s[1]=sv(e,a,f)}function yr(t,e,n,i,r,a,o,s,l){var h=oe,u=se,c=Math.abs(r-a);if(1e-4>c%uv&&c>1e-4)return s[0]=t-n,s[1]=e-i,l[0]=t+n,void(l[1]=e+i);if(cv[0]=hv(r)*n+t,cv[1]=lv(r)*i+e,dv[0]=hv(a)*n+t,dv[1]=lv(a)*i+e,h(s,cv,dv),u(l,cv,dv),r%=uv,0>r&&(r+=uv),a%=uv,0>a&&(a+=uv),r>a&&!o?a+=uv:a>r&&o&&(r+=uv),o){var d=a;a=r,r=d}for(var f=0;a>f;f+=Math.PI/2)f>r&&(fv[0]=hv(f)*n+t,fv[1]=lv(f)*i+e,h(s,fv,s),u(l,fv,l))}function xr(t,e,n,i,r,a,o){if(0===r)return!1;var s=r,l=0,h=t;if(o>e+s&&o>i+s||e-s>o&&i-s>o||a>t+s&&a>n+s||t-s>a&&n-s>a)return!1;if(t===n)return Math.abs(a-t)<=s/2;l=(e-i)/(t-n),h=(t*i-n*e)/(t-n);var u=l*a-o+h,c=u*u/(l*l+1);return s/2*s/2>=c}function _r(t,e,n,i,r,a,o,s,l,h,u){if(0===l)return!1;var c=l;if(u>e+c&&u>i+c&&u>a+c&&u>s+c||e-c>u&&i-c>u&&a-c>u&&s-c>u||h>t+c&&h>n+c&&h>r+c&&h>o+c||t-c>h&&n-c>h&&r-c>h&&o-c>h)return!1;var d=sr(t,e,n,i,r,a,o,s,h,u,null);return c/2>=d}function wr(t,e,n,i,r,a,o,s,l){if(0===o)return!1;var h=o;if(l>e+h&&l>i+h&&l>a+h||e-h>l&&i-h>l&&a-h>l||s>t+h&&s>n+h&&s>r+h||t-h>s&&n-h>s&&r-h>s)return!1;var u=fr(t,e,n,i,r,a,s,l,null);return h/2>=u}function br(t){return t%=Av,0>t&&(t+=Av),t}function Sr(t,e,n,i,r,a,o,s,l){if(0===o)return!1;var h=o;s-=t,l-=e;var u=Math.sqrt(s*s+l*l);if(u-h>n||n>u+h)return!1;if(Math.abs(i-r)%kv<1e-4)return!0;if(a){var c=i;i=br(r),r=br(c)}else i=br(i),r=br(r);i>r&&(r+=kv);var d=Math.atan2(l,s);return 0>d&&(d+=kv),d>=i&&r>=d||d+kv>=i&&r>=d+kv}function Mr(t,e,n,i,r,a){if(a>e&&a>i||e>a&&i>a)return 0;if(i===e)return 0;var o=e>i?1:-1,s=(a-e)/(i-e);(1===s||0===s)&&(o=e>i?.5:-.5);var l=s*(n-t)+t;return l===r?1/0:l>r?o:0}function Ir(t,e){return Math.abs(t-e)e&&h>i&&h>a&&h>s||e>h&&i>h&&a>h&&s>h)return 0;var u=rr(e,i,a,s,h,Nv);if(0===u)return 0;for(var c,d,f=0,p=-1,g=0;u>g;g++){var m=Nv[g],v=0===m||1===m?.5:1,y=nr(t,n,r,o,m);l>y||(0>p&&(p=ar(e,i,a,s,Ev),Ev[1]1&&Tr(),c=nr(e,i,a,s,Ev[0]),p>1&&(d=nr(e,i,a,s,Ev[1]))),f+=2==p?mc?v:-v:md?v:-v:d>s?v:-v:mc?v:-v:c>s?v:-v)}return f}function Cr(t,e,n,i,r,a,o,s){if(s>e&&s>i&&s>a||e>s&&i>s&&a>s)return 0;var l=ur(e,i,a,s,Nv);if(0===l)return 0;var h=cr(e,i,a);if(h>=0&&1>=h){for(var u=0,c=lr(e,i,a,h),d=0;l>d;d++){var f=0===Nv[d]||1===Nv[d]?.5:1,p=lr(t,n,r,Nv[d]);o>p||(u+=Nv[d]c?f:-f:c>a?f:-f)}return u}var f=0===Nv[0]||1===Nv[0]?.5:1,p=lr(t,n,r,Nv[0]);return o>p?0:e>a?f:-f}function Ar(t,e,n,i,r,a,o,s){if(s-=e,s>n||-n>s)return 0;var l=Math.sqrt(n*n-s*s);Nv[0]=-l,Nv[1]=l;var h=Math.abs(i-r);if(1e-4>h)return 0;if(1e-4>h%Pv){i=0,r=Pv;var u=a?1:-1;return o>=Nv[0]+t&&o<=Nv[1]+t?u:0}if(a){var l=i;i=br(r),r=br(l)}else i=br(i),r=br(r);i>r&&(r+=Pv);for(var c=0,d=0;2>d;d++){var f=Nv[d];if(f+t>o){var p=Math.atan2(s,f),u=a?1:-1;0>p&&(p=Pv+p),(p>=i&&r>=p||p+Pv>=i&&r>=p+Pv)&&(p>Math.PI/2&&p<1.5*Math.PI&&(u=-u),c+=u)}}return c}function kr(t,e,n,i,r){for(var a=0,o=0,s=0,l=0,h=0,u=0;u1&&(n||(a+=Mr(o,s,l,h,i,r))),1==u&&(o=t[u],s=t[u+1],l=o,h=s),c){case Lv.M:l=t[u++],h=t[u++],o=l,s=h;break;case Lv.L:if(n){if(xr(o,s,t[u],t[u+1],e,i,r))return!0}else a+=Mr(o,s,t[u],t[u+1],i,r)||0;o=t[u++],s=t[u++];break;case Lv.C:if(n){if(_r(o,s,t[u++],t[u++],t[u++],t[u++],t[u],t[u+1],e,i,r))return!0}else a+=Dr(o,s,t[u++],t[u++],t[u++],t[u++],t[u],t[u+1],i,r)||0;o=t[u++],s=t[u++];break;case Lv.Q:if(n){if(wr(o,s,t[u++],t[u++],t[u],t[u+1],e,i,r))return!0}else a+=Cr(o,s,t[u++],t[u++],t[u],t[u+1],i,r)||0;o=t[u++],s=t[u++];break;case Lv.A:var d=t[u++],f=t[u++],p=t[u++],g=t[u++],m=t[u++],v=t[u++],y=(t[u++],1-t[u++]),x=Math.cos(m)*p+d,_=Math.sin(m)*g+f;u>1?a+=Mr(o,s,x,_,i,r):(l=x,h=_);var w=(i-d)*g/p+d;if(n){if(Sr(d,f,g,m,m+v,y,e,w,r))return!0}else a+=Ar(d,f,g,m,m+v,y,w,r);o=Math.cos(m+v)*p+d,s=Math.sin(m+v)*g+f;break;case Lv.R:l=o=t[u++],h=s=t[u++];var b=t[u++],S=t[u++],x=l+b,_=h+S;if(n){if(xr(l,h,x,h,e,i,r)||xr(x,h,x,_,e,i,r)||xr(x,_,l,_,e,i,r)||xr(l,_,l,h,e,i,r))return!0}else a+=Mr(x,h,x,_,i,r),a+=Mr(l,_,l,h,i,r);break;case Lv.Z:if(n){if(xr(o,s,l,h,e,i,r))return!0}else a+=Mr(o,s,l,h,i,r);o=l,s=h}}return n||Ir(s,h)||(a+=Mr(o,s,l,h,i,r)||0),0!==a}function Lr(t,e,n){return kr(t,0,!1,e,n)}function Pr(t,e,n,i){return kr(t,e,!0,n,i)}function Or(t){ai.call(this,t),this.path=null}function Nr(t,e,n,i,r,a,o,s,l,h,u){var c=l*(Zv/180),d=Yv(c)*(t-n)/2+jv(c)*(e-i)/2,f=-1*jv(c)*(t-n)/2+Yv(c)*(e-i)/2,p=d*d/(o*o)+f*f/(s*s);p>1&&(o*=Xv(p),s*=Xv(p));var g=(r===a?-1:1)*Xv((o*o*s*s-o*o*f*f-s*s*d*d)/(o*o*f*f+s*s*d*d))||0,m=g*o*f/s,v=g*-s*d/o,y=(t+n)/2+Yv(c)*m-jv(c)*v,x=(e+i)/2+jv(c)*m+Yv(c)*v,_=$v([1,0],[(d-m)/o,(f-v)/s]),w=[(d-m)/o,(f-v)/s],b=[(-1*d-m)/o,(-1*f-v)/s],S=$v(w,b);Kv(w,b)<=-1&&(S=Zv),Kv(w,b)>=1&&(S=0),0===a&&S>0&&(S-=2*Zv),1===a&&0>S&&(S+=2*Zv),u.addData(h,y,x,o,s,_,S,c,a)}function Er(t){if(!t)return[];var e,n=t.replace(/-/g," -").replace(/ /g," ").replace(/ /g,",").replace(/,,/g,",");for(e=0;e0&&""===f[0]&&f.shift();for(var p=0;pr;r++){var a=t[r];a.path||a.createPathProxy(),a.__dirtyPath&&a.buildPath(a.path,a.shape,!0),n.push(a.path)}var o=new Or(e);return o.createPathProxy(),o.buildPath=function(t){t.appendPath(n);var e=t.getContext();e&&t.rebuildPath(e)},o}function Vr(t,e,n,i,r,a,o){var s=.5*(n-t),l=.5*(i-e);return(2*(e-n)+s+l)*o+(-3*(e-n)-2*s-l)*a+s*r+e}function Gr(t,e,n){var i=e.points,r=e.smooth;if(i&&i.length>=2){if(r&&"spline"!==r){var a=ay(i,r,n,e.smoothConstraint);t.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;(n?o:o-1)>s;s++){var l=a[2*s],h=a[2*s+1],u=i[(s+1)%o];t.bezierCurveTo(l[0],l[1],h[0],h[1],u[0],u[1])}}else{"spline"===r&&(i=ry(i,n)),t.moveTo(i[0][0],i[0][1]);for(var s=1,c=i.length;c>s;s++)t.lineTo(i[s][0],i[s][1])}n&&t.closePath()}}function Hr(t,e,n){var i=t.cpx2,r=t.cpy2;return null===i||null===r?[(n?ir:nr)(t.x1,t.cpx1,t.cpx2,t.x2,e),(n?ir:nr)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(n?hr:lr)(t.x1,t.cpx1,t.x2,e),(n?hr:lr)(t.y1,t.cpy1,t.y2,e)]}function Wr(t){ai.call(this,t),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}function Ur(t){return Or.extend(t)}function Xr(t,e){return Br(t,e)}function jr(t,e,n,i){var r=zr(t,e),a=r.getBoundingRect();return n&&("center"===i&&(n=Zr(n,a)),qr(r,n)),r}function Yr(t,e,n){var i=new oi({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(t){if("center"===n){var r={width:t.width,height:t.height};i.setStyle(Zr(e,r))}}});return i}function Zr(t,e){var n,i=e.width/e.height,r=t.height*i;r<=t.width?n=t.height:(r=t.width,n=r/i);var a=t.x+t.width/2,o=t.y+t.height/2;return{x:a-r/2,y:o-n/2,width:r,height:n}}function qr(t,e){if(t.applyTransform){var n=t.getBoundingRect(),i=n.calculateTransform(e);t.applyTransform(i)}}function Kr(t){var e=t.shape,n=t.style.lineWidth;return yy(2*e.x1)===yy(2*e.x2)&&(e.x1=e.x2=Jr(e.x1,n,!0)),yy(2*e.y1)===yy(2*e.y2)&&(e.y1=e.y2=Jr(e.y1,n,!0)),t}function $r(t){var e=t.shape,n=t.style.lineWidth,i=e.x,r=e.y,a=e.width,o=e.height;return e.x=Jr(e.x,n,!0),e.y=Jr(e.y,n,!0),e.width=Math.max(Jr(i+a,n,!1)-e.x,0===a?0:1),e.height=Math.max(Jr(r+o,n,!1)-e.y,0===o?0:1),t}function Jr(t,e,n){var i=yy(2*t);return(i+yy(e))%2===0?i/2:(i+(n?1:-1))/2}function Qr(t){return null!=t&&"none"!=t}function ta(t){return"string"==typeof t?ze(t,-.1):t}function ea(t){if(t.__hoverStlDirty){var e=t.style.stroke,n=t.style.fill,i=t.__hoverStl;i.fill=i.fill||(Qr(n)?ta(n):null),i.stroke=i.stroke||(Qr(e)?ta(e):null);var r={};for(var a in i)null!=i[a]&&(r[a]=t.style[a]);t.__normalStl=r,t.__hoverStlDirty=!1}}function na(t){if(!t.__isHover){if(ea(t),t.useHoverLayer)t.__zr&&t.__zr.addHover(t,t.__hoverStl);else{var e=t.style,n=e.insideRollbackOpt;n&&_a(e),e.extendFrom(t.__hoverStl),n&&(xa(e,e.insideOriginalTextPosition,n),null==e.textFill&&(e.textFill=n.autoColor)),t.dirty(!1),t.z2+=1}t.__isHover=!0}}function ia(t){if(t.__isHover){var e=t.__normalStl;t.useHoverLayer?t.__zr&&t.__zr.removeHover(t):(e&&t.setStyle(e),t.z2-=1),t.__isHover=!1}}function ra(t){"group"===t.type?t.traverse(function(t){"group"!==t.type&&na(t)}):na(t)}function aa(t){"group"===t.type?t.traverse(function(t){"group"!==t.type&&ia(t)}):ia(t)}function oa(t,e){t.__hoverStl=t.hoverStyle||e||{},t.__hoverStlDirty=!0,t.__isHover&&ea(t)}function sa(t){this.__hoverSilentOnTouch&&t.zrByTouch||!this.__isEmphasis&&ra(this)}function la(t){this.__hoverSilentOnTouch&&t.zrByTouch||!this.__isEmphasis&&aa(this)}function ha(){this.__isEmphasis=!0,ra(this)}function ua(){this.__isEmphasis=!1,aa(this)}function ca(t,e,n){t.__hoverSilentOnTouch=n&&n.hoverSilentOnTouch,"group"===t.type?t.traverse(function(t){"group"!==t.type&&oa(t,e)}):oa(t,e),t.on("mouseover",sa).on("mouseout",la),t.on("emphasis",ha).on("normal",ua)}function da(t,e,n,i,r,a,o){r=r||wy;var s,l=r.labelFetcher,h=r.labelDataIndex,u=r.labelDimIndex,c=n.getShallow("show"),d=i.getShallow("show");(c||d)&&(l&&(s=l.getFormattedLabel(h,"normal",null,u)),null==s&&(s=w(r.defaultText)?r.defaultText(h,r):r.defaultText));var f=c?s:null,p=d?A(l?l.getFormattedLabel(h,"emphasis",null,u):null,s):null;(null!=f||null!=p)&&(fa(t,n,a,r),fa(e,i,o,r,!0)),t.text=f,e.text=p}function fa(t,e,n,i,r){return ga(t,e,i,r),n&&o(t,n),t.host&&t.host.dirty&&t.host.dirty(!1),t}function pa(t,e,n){var i,r={isRectText:!0};n===!1?i=!0:r.autoColor=n,ga(t,e,r,i),t.host&&t.host.dirty&&t.host.dirty(!1)}function ga(t,e,n,i){if(n=n||wy,n.isRectText){var r=e.getShallow("position")||(i?null:"inside");"outside"===r&&(r="top"),t.textPosition=r,t.textOffset=e.getShallow("offset");var a=e.getShallow("rotate");null!=a&&(a*=Math.PI/180),t.textRotation=a,t.textDistance=A(e.getShallow("distance"),i?null:5)}var o,s=e.ecModel,l=s&&s.option.textStyle,h=ma(e);if(h){o={};for(var u in h)if(h.hasOwnProperty(u)){var c=e.getModel(["rich",u]);va(o[u]={},c,l,n,i)}}return t.rich=o,va(t,e,l,n,i,!0),n.forceRich&&!n.textStyle&&(n.textStyle={}),t}function ma(t){for(var e;t&&t!==t.ecModel;){var n=(t.option||wy).rich;if(n){e=e||{};for(var i in n)n.hasOwnProperty(i)&&(e[i]=1)}t=t.parentModel}return e}function va(t,e,n,i,r,a){if(n=!r&&n||wy,t.textFill=ya(e.getShallow("color"),i)||n.color,t.textStroke=ya(e.getShallow("textBorderColor"),i)||n.textBorderColor,t.textStrokeWidth=A(e.getShallow("textBorderWidth"),n.textBorderWidth),!r){if(a){var o=t.textPosition;t.insideRollback=xa(t,o,i),t.insideOriginalTextPosition=o,t.insideRollbackOpt=i}null==t.textFill&&(t.textFill=i.autoColor)}t.fontStyle=e.getShallow("fontStyle")||n.fontStyle,t.fontWeight=e.getShallow("fontWeight")||n.fontWeight,t.fontSize=e.getShallow("fontSize")||n.fontSize,t.fontFamily=e.getShallow("fontFamily")||n.fontFamily,t.textAlign=e.getShallow("align"),t.textVerticalAlign=e.getShallow("verticalAlign")||e.getShallow("baseline"),t.textLineHeight=e.getShallow("lineHeight"),t.textWidth=e.getShallow("width"),t.textHeight=e.getShallow("height"),t.textTag=e.getShallow("tag"),a&&i.disableBox||(t.textBackgroundColor=ya(e.getShallow("backgroundColor"),i),t.textPadding=e.getShallow("padding"),t.textBorderColor=ya(e.getShallow("borderColor"),i),t.textBorderWidth=e.getShallow("borderWidth"),t.textBorderRadius=e.getShallow("borderRadius"),t.textBoxShadowColor=e.getShallow("shadowColor"),t.textBoxShadowBlur=e.getShallow("shadowBlur"),t.textBoxShadowOffsetX=e.getShallow("shadowOffsetX"),t.textBoxShadowOffsetY=e.getShallow("shadowOffsetY")),t.textShadowColor=e.getShallow("textShadowColor")||n.textShadowColor,t.textShadowBlur=e.getShallow("textShadowBlur")||n.textShadowBlur,t.textShadowOffsetX=e.getShallow("textShadowOffsetX")||n.textShadowOffsetX,t.textShadowOffsetY=e.getShallow("textShadowOffsetY")||n.textShadowOffsetY}function ya(t,e){return"auto"!==t?t:e&&e.autoColor?e.autoColor:null}function xa(t,e,n){var i,r=n.useInsideStyle;return null==t.textFill&&r!==!1&&(r===!0||n.isRectText&&e&&"string"==typeof e&&e.indexOf("inside")>=0)&&(i={textFill:null,textStroke:t.textStroke,textStrokeWidth:t.textStrokeWidth},t.textFill="#fff",null==t.textStroke&&(t.textStroke=n.autoColor,null==t.textStrokeWidth&&(t.textStrokeWidth=2))),i}function _a(t){var e=t.insideRollback;e&&(t.textFill=e.textFill,t.textStroke=e.textStroke,t.textStrokeWidth=e.textStrokeWidth)}function wa(t,e){var n=e||e.getModel("textStyle");return N([t.fontStyle||n&&n.getShallow("fontStyle")||"",t.fontWeight||n&&n.getShallow("fontWeight")||"",(t.fontSize||n&&n.getShallow("fontSize")||12)+"px",t.fontFamily||n&&n.getShallow("fontFamily")||"sans-serif"].join(" "))}function ba(t,e,n,i,r,a){"function"==typeof r&&(a=r,r=null);var o=i&&i.isAnimationEnabled();if(o){var s=t?"Update":"",l=i.getShallow("animationDuration"+s),h=i.getShallow("animationEasing"+s),u=i.getShallow("animationDelay"+s);"function"==typeof u&&(u=u(r,i.getAnimationDelayParams?i.getAnimationDelayParams(e,r):null)),"function"==typeof l&&(l=l(r)),l>0?e.animateTo(n,l,u||0,h,a,!!a):(e.stopAnimation(),e.attr(n),a&&a())}else e.stopAnimation(),e.attr(n),a&&a()}function Sa(t,e,n,i,r){ba(!0,t,e,n,i,r)}function Ma(t,e,n,i,r){ba(!1,t,e,n,i,r)}function Ia(t,e){for(var n=pe([]);t&&t!==e;)me(n,t.getLocalTransform(),n),t=t.parent;return n}function Ta(t,e,n){return e&&!d(e)&&(e=fg.getLocalTransform(e)),n&&(e=_e([],e)),ae([],t,e)}function Da(t,e,n){var i=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),r=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),a=["left"===t?-i:"right"===t?i:0,"top"===t?-r:"bottom"===t?r:0];return a=Ta(a,e,n),Math.abs(a[0])>Math.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function Ca(t,e,n){function i(t){var e={};return t.traverse(function(t){!t.isGroup&&t.anid&&(e[t.anid]=t)}),e}function r(t){var e={position:W(t.position),rotation:t.rotation};return t.shape&&(e.shape=o({},t.shape)),e}if(t&&e){var a=i(t);e.traverse(function(t){if(!t.isGroup&&t.anid){var e=a[t.anid];if(e){var i=r(t);t.attr(r(e)),Sa(t,i,n,t.dataIndex)}}})}}function Aa(t,e){return p(t,function(t){var n=t[0];n=xy(n,e.x),n=_y(n,e.x+e.width);var i=t[1];return i=xy(i,e.y),i=_y(i,e.y+e.height),[n,i]})}function ka(t,e){var n=xy(t.x,e.x),i=_y(t.x+t.width,e.x+e.width),r=xy(t.y,e.y),a=_y(t.y+t.height,e.y+e.height);return i>=n&&a>=r?{x:n,y:r,width:i-n,height:a-r}:void 0}function La(t,e,n){e=o({rectHover:!0},e);var i=e.style={strokeNoScale:!0};return n=n||{x:-1,y:-1,width:2,height:2},t?0===t.indexOf("image://")?(i.image=t.slice(8),s(i,n),new oi(e)):jr(t.replace("path://",""),e,n,"center"):void 0}function Pa(t,e,n){this.parentModel=e,this.ecModel=n,this.option=t}function Oa(t,e,n){for(var i=0;i=0&&n.push(t)}),n}t.topologicalTravel=function(t,e,i,r){function a(t){l[t].entryCount--,0===l[t].entryCount&&h.push(t)}function o(t){u[t]=!0,a(t)}if(t.length){var s=n(e),l=s.graph,h=s.noEntryList,u={};for(f(t,function(t){u[t]=!0});h.length;){var c=h.pop(),d=l[c],p=!!u[c];p&&(i.call(r,c,d.originalDeps.slice()),delete u[c]),f(d.successor,p?o:a)}f(u,function(){throw new Error("Circle dependency may exists")})}}}function Ba(t){return t.replace(/^\s+/,"").replace(/\s+$/,"")}function Fa(t,e,n,i){var r=e[1]-e[0],a=n[1]-n[0];if(0===r)return 0===a?n[0]:(n[0]+n[1])/2;if(i)if(r>0){if(t<=e[0])return n[0];if(t>=e[1])return n[1]}else{if(t>=e[0])return n[0];if(t<=e[1])return n[1]}else{if(t===e[0])return n[0];if(t===e[1])return n[1]}return(t-e[0])/r*a+n[0]}function Va(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?Ba(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?0/0:+t}function Ga(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),n?t:+t}function Ha(t){return t.sort(function(t,e){return t-e}),t}function Wa(t){if(t=+t,isNaN(t))return 0;for(var e=1,n=0;Math.round(t*e)/e!==t;)e*=10,n++;return n}function Ua(t){var e=t.toString(),n=e.indexOf("e");if(n>0){var i=+e.slice(n+1);return 0>i?-i:0}var r=e.indexOf(".");return 0>r?0:e.length-1-r}function Xa(t,e){var n=Math.log,i=Math.LN10,r=Math.floor(n(t[1]-t[0])/i),a=Math.round(n(Math.abs(e[1]-e[0]))/i),o=Math.min(Math.max(-r+a,0),20);return isFinite(o)?o:20}function ja(t,e,n){if(!t[e])return 0;var i=g(t,function(t,e){return t+(isNaN(e)?0:e)},0);if(0===i)return 0;for(var r=Math.pow(10,n),a=p(t,function(t){return(isNaN(t)?0:t)/i*r*100}),o=100*r,s=p(a,function(t){return Math.floor(t)}),l=g(s,function(t,e){return t+e},0),h=p(a,function(t,e){return t-s[e]});o>l;){for(var u=Number.NEGATIVE_INFINITY,c=null,d=0,f=h.length;f>d;++d)h[d]>u&&(u=h[d],c=d);++s[c],h[c]=0,++l}return s[e]/r}function Ya(t){var e=2*Math.PI;return(t%e+e)%e}function Za(t){return t>-Ly&&Ly>t}function qa(t){if(t instanceof Date)return t;if("string"==typeof t){var e=Oy.exec(t);if(!e)return new Date(0/0);if(e[8]){var n=+e[4]||0;return"Z"!==e[8].toUpperCase()&&(n-=e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,n,+(e[5]||0),+e[6]||0,+e[7]||0))}return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,+e[7]||0)}return new Date(null==t?0/0:Math.round(t))}function Ka(t){return Math.pow(10,$a(t))}function $a(t){return Math.floor(Math.log(t)/Math.LN10)}function Ja(t,e){var n,i=$a(t),r=Math.pow(10,i),a=t/r;return n=e?1.5>a?1:2.5>a?2:4>a?3:7>a?5:10:1>a?1:2>a?2:3>a?3:5>a?5:10,t=n*r,i>=-20?+t.toFixed(0>i?-i:0):t}function Qa(t){function e(t,n,i){return t.interval[i]s;s++)a[s]<=n&&(a[s]=n,o[s]=s?1:1-i),n=a[s],i=o[s];a[0]===a[1]&&o[0]*o[1]!==1?t.splice(r,1):r++}return t}function to(t){return t-parseFloat(t)>=0}function eo(t){return isNaN(t)?"-":(t=(t+"").split("."),t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:""))}function no(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 io(t){return null==t?"":(t+"").replace(Ry,function(t,e){return zy[e]})}function ro(t,e,n){_(e)||(e=[e]);var i=e.length;if(!i)return"";for(var r=e[0].$vars||[],a=0;as;s++)for(var l=0;l
':'':""}function so(t,e){return t+="","0000".substr(0,e-t.length)+t}function lo(t,e,n){("week"===t||"month"===t||"quarter"===t||"half-year"===t||"year"===t)&&(t="MM-dd\nyyyy");var i=qa(e),r=n?"UTC":"",a=i["get"+r+"FullYear"](),o=i["get"+r+"Month"]()+1,s=i["get"+r+"Date"](),l=i["get"+r+"Hours"](),h=i["get"+r+"Minutes"](),u=i["get"+r+"Seconds"](),c=i["get"+r+"Milliseconds"]();return t=t.replace("MM",so(o,2)).replace("M",o).replace("yyyy",a).replace("yy",a%100).replace("dd",so(s,2)).replace("d",s).replace("hh",so(l,2)).replace("h",l).replace("mm",so(h,2)).replace("m",h).replace("ss",so(u,2)).replace("s",u).replace("SSS",so(c,3))}function ho(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t}function uo(t,e,n,i,r){var a=0,o=0;null==i&&(i=1/0),null==r&&(r=1/0);var s=0;e.eachChild(function(l,h){var u,c,d=l.position,f=l.getBoundingRect(),p=e.childAt(h+1),g=p&&p.getBoundingRect();if("horizontal"===t){var m=f.width+(g?-g.x+f.x:0);u=a+m,u>i||l.newline?(a=0,u=m,o+=s+n,s=f.height):s=Math.max(s,f.height)}else{var v=f.height+(g?-g.y+f.y:0);c=o+v,c>r||l.newline?(a+=s+n,o=0,c=v,s=f.width):s=Math.max(s,f.width)}l.newline||(d[0]=a,d[1]=o,"horizontal"===t?a=u+n:o=c+n)})}function co(t,e,n){n=Ey(n||0);var i=e.width,r=e.height,a=Va(t.left,i),o=Va(t.top,r),s=Va(t.right,i),l=Va(t.bottom,r),h=Va(t.width,i),u=Va(t.height,r),c=n[2]+n[0],d=n[1]+n[3],f=t.aspect;switch(isNaN(h)&&(h=i-s-d-a),isNaN(u)&&(u=r-l-c-o),null!=f&&(isNaN(h)&&isNaN(u)&&(f>i/r?h=.8*i:u=.8*r),isNaN(h)&&(h=f*u),isNaN(u)&&(u=h/f)),isNaN(a)&&(a=i-s-h-d),isNaN(o)&&(o=r-l-u-c),t.left||t.right){case"center":a=i/2-h/2-n[3]; +break;case"right":a=i-h-d}switch(t.top||t.bottom){case"middle":case"center":o=r/2-u/2-n[0];break;case"bottom":o=r-u-c}a=a||0,o=o||0,isNaN(h)&&(h=i-d-a-(s||0)),isNaN(u)&&(u=r-c-o-(l||0));var p=new rn(a+n[3],o+n[0],h,u);return p.margin=n,p}function fo(t,e,n){function i(n,i){var o={},l=0,h={},u=0,c=2;if(Wy(n,function(e){h[e]=t[e]}),Wy(n,function(t){r(e,t)&&(o[t]=h[t]=e[t]),a(o,t)&&l++,a(h,t)&&u++}),s[i])return a(e,n[1])?h[n[2]]=null:a(e,n[2])&&(h[n[1]]=null),h;if(u!==c&&l){if(l>=c)return o;for(var d=0;di;i++)if(t[i].length>e)return t[i];return t[n-1]}function yo(t){var e=t.get("coordinateSystem"),n={coordSysName:e,coordSysDims:[],axisMap:B(),categoryAxisMap:B()},i=tx[e];return i?(i(t,n,n.axisMap,n.categoryAxisMap),n):void 0}function xo(t){return"category"===t.get("type")}function _o(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===rx?{}:[]),this.sourceFormat=t.sourceFormat||ax,this.seriesLayoutBy=t.seriesLayoutBy||sx,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&B(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}function wo(t){var e=t.option.source,n=ax;if(I(e))n=ox;else if(_(e))for(var i=0,r=e.length;r>i;i++){var a=e[i];if(null!=a){if(_(a)){n=nx;break}if(S(a)){n=ix;break}}}else if(S(e)){for(var o in e)if(e.hasOwnProperty(o)&&d(e[o])){n=rx;break}}else if(null!=e)throw new Error("Invalid data");hx(t).sourceFormat=n}function bo(t){return hx(t).source}function So(t){hx(t).datasetMap=B()}function Mo(t){var e=t.option,n=e.data,i=I(n)?ox:ex,r=!1,a=e.seriesLayoutBy,o=e.sourceHeader,s=e.dimensions,l=ko(t);if(l){var h=l.option;n=h.source,i=hx(l).sourceFormat,r=!0,a=a||h.seriesLayoutBy,null==o&&(o=h.sourceHeader),s=s||h.dimensions}var u=Io(n,i,a,o,s),c=e.encode;!c&&l&&(c=Ao(t,l,n,i,a,u)),hx(t).source=new _o({data:n,fromDataset:r,seriesLayoutBy:a,sourceFormat:i,dimensionsDefine:u.dimensionsDefine,startIndex:u.startIndex,dimensionsDetectCount:u.dimensionsDetectCount,encodeDefine:c})}function Io(t,e,n,i,r){if(!t)return{dimensionsDefine:To(r)};var a,o,s;if(e===nx)"auto"===i||null==i?Do(function(t){null!=t&&"-"!==t&&(b(t)?null==o&&(o=1):o=0)},n,t,10):o=i?1:0,r||1!==o||(r=[],Do(function(t,e){r[e]=null!=t?t:""},n,t)),a=r?r.length:n===lx?t.length:t[0]?t[0].length:null;else if(e===ix)r||(r=Co(t),s=!0);else if(e===rx)r||(r=[],s=!0,f(t,function(t,e){r.push(e)}));else if(e===ex){var l=Ei(t[0]);a=_(l)&&l.length||1}var h;return s&&f(r,function(t,e){"name"===(S(t)?t.name:t)&&(h=e)}),{startIndex:o,dimensionsDefine:To(r),dimensionsDetectCount:a,potentialNameDimIndex:h}}function To(t){if(t){var e=B();return p(t,function(t){if(t=o({},S(t)?t:{name:t}),null==t.name)return t;t.name+="",null==t.displayName&&(t.displayName=t.name);var n=e.get(t.name);return n?t.name+="-"+n.count++:e.set(t.name,{count:1}),t})}}function Do(t,e,n,i){if(null==i&&(i=1/0),e===lx)for(var r=0;rr;r++)t(n[r]?n[r][0]:null,r);else for(var a=n[0]||[],r=0;rr;r++)t(a[r],r)}function Co(t){for(var e,n=0;nx&&null==y;x++)Po(n,i,r,a.dimensionsDefine,a.startIndex,x)||(y=x);if(null!=y){s.value=y;var _=a.potentialNameDimIndex||Math.max(y-1,0);h.push(_),l.push(_)}}return l.length&&(s.itemName=l),h.length&&(s.seriesName=h),s}function ko(t){var e=t.option,n=e.data;return n?void 0:t.ecModel.getComponent("dataset",e.datasetIndex||0)}function Lo(t,e){return Po(t.data,t.sourceFormat,t.seriesLayoutBy,t.dimensionsDefine,t.startIndex,e)}function Po(t,e,n,i,r,a){function o(t){return null!=t&&isFinite(t)&&""!==t?!1:b(t)&&"-"!==t?!0:void 0}var s,l=5;if(I(t))return!1;var h;if(i&&(h=i[a],h=S(h)?h.name:h),e===nx)if(n===lx){for(var u=t[a],c=0;c<(u||[]).length&&l>c;c++)if(null!=(s=o(u[r+c])))return s}else for(var c=0;cc;c++){var d=t[r+c];if(d&&null!=(s=o(d[a])))return s}else if(e===ix){if(!h)return;for(var c=0;cc;c++){var f=t[c];if(f&&null!=(s=o(f[h])))return s}}else if(e===rx){if(!h)return;var u=t[h];if(!u||I(u))return!1;for(var c=0;cc;c++)if(null!=(s=o(u[c])))return s}else if(e===ex)for(var c=0;cc;c++){var f=t[c],p=Ei(f);if(!_(p))return!1;if(null!=(s=o(p[a])))return s}return!1}function Oo(t,e){if(e){var n=e.seiresIndex,i=e.seriesId,r=e.seriesName;return null!=n&&t.componentIndex!==n||null!=i&&t.id!==i||null!=r&&t.name!==r}}function No(t,e){var n=t.color&&!t.colorLayer;f(e,function(e,a){"colorLayer"===a&&n||qy.hasClass(a)||("object"==typeof e?t[a]=t[a]?r(t[a],e,!1):i(e):null==t[a]&&(t[a]=e))})}function Eo(t){t=t,this.option={},this.option[ux]=1,this._componentsMap=B({series:[]}),this._seriesIndices,this._seriesIndicesMap,No(t,this._theme.option),r(t,$y,!1),this.mergeOption(t)}function Ro(t,e){_(e)||(e=e?[e]:[]);var n={};return f(e,function(e){n[e]=(t.get(e)||[]).slice()}),n}function zo(t,e,n){var i=e.type?e.type:n?n.subType:qy.determineSubType(t,e);return i}function Bo(t,e){t._seriesIndicesMap=B(t._seriesIndices=p(e,function(t){return t.componentIndex})||[])}function Fo(t,e){return e.hasOwnProperty("subType")?m(t,function(t){return t.subType===e.subType}):t}function Vo(t){f(dx,function(e){this[e]=y(t[e],t)},this)}function Go(){this._coordinateSystems=[]}function Ho(t){this._api=t,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}function Wo(t,e,n){var i,r,a=[],o=[],s=t.timeline;if(t.baseOption&&(r=t.baseOption),(s||t.options)&&(r=r||{},a=(t.options||[]).slice()),t.media){r=r||{};var l=t.media;px(l,function(t){t&&t.option&&(t.query?o.push(t):i||(i=t))})}return r||(r=t),r.timeline||(r.timeline=s),px([r].concat(a).concat(p(o,function(t){return t.option})),function(t){px(e,function(e){e(t,n)})}),{baseOption:r,timelineOptions:a,mediaDefault:i,mediaList:o}}function Uo(t,e,n){var i={width:e,height:n,aspectratio:e/n},r=!0;return f(t,function(t,e){var n=e.match(yx);if(n&&n[1]&&n[2]){var a=n[1],o=n[2].toLowerCase();Xo(i[o],t,a)||(r=!1)}}),r}function Xo(t,e,n){return"min"===n?t>=e:"max"===n?e>=t:t===e}function jo(t,e){return t.join(",")===e.join(",")}function Yo(t,e){e=e||{},px(e,function(e,n){if(null!=e){var i=t[n];if(qy.hasClass(n)){e=Oi(e),i=Oi(i);var r=zi(i,e);t[n]=mx(r,function(t){return t.option&&t.exist?vx(t.exist,t.option,!0):t.exist||t.option})}else t[n]=vx(i,e,!0)}})}function Zo(t){var e=t&&t.itemStyle;if(e)for(var n=0,i=bx.length;i>n;n++){var a=bx[n],o=e.normal,s=e.emphasis;o&&o[a]&&(t[a]=t[a]||{},t[a].normal?r(t[a].normal,o[a]):t[a].normal=o[a],o[a]=null),s&&s[a]&&(t[a]=t[a]||{},t[a].emphasis?r(t[a].emphasis,s[a]):t[a].emphasis=s[a],s[a]=null)}}function qo(t,e,n){if(t&&t[e]&&(t[e].normal||t[e].emphasis)){var i=t[e].normal,r=t[e].emphasis;i&&(n?(t[e].normal=t[e].emphasis=null,s(t[e],i)):t[e]=i),r&&(t.emphasis=t.emphasis||{},t.emphasis[e]=r)}}function Ko(t){qo(t,"itemStyle"),qo(t,"lineStyle"),qo(t,"areaStyle"),qo(t,"label"),qo(t,"labelLine"),qo(t,"upperLabel"),qo(t,"edgeLabel")}function $o(t,e){var n=_x(t)&&t[e],i=_x(n)&&n.textStyle;if(i)for(var r=0,a=Gm.length;a>r;r++){var e=Gm[r];i.hasOwnProperty(e)&&(n[e]=i[e])}}function Jo(t){t&&(Ko(t),$o(t,"label"),t.emphasis&&$o(t.emphasis,"label"))}function Qo(t){if(_x(t)){Zo(t),Ko(t),$o(t,"label"),$o(t,"upperLabel"),$o(t,"edgeLabel"),t.emphasis&&($o(t.emphasis,"label"),$o(t.emphasis,"upperLabel"),$o(t.emphasis,"edgeLabel"));var e=t.markPoint;e&&(Zo(e),Jo(e));var n=t.markLine;n&&(Zo(n),Jo(n));var i=t.markArea;i&&Jo(i);var r=t.data;if("graph"===t.type){r=r||t.nodes;var a=t.links||t.edges;if(a&&!I(a))for(var o=0;o=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(u>=0&&m>0||0>=u&&0>m){u+=m,f=m;break}}}return i[0]=u,i[1]=f,i});o.hostModel.setData(l),e.data=l})}function os(t,e){_o.isInstance(t)||(t=_o.seriesDataToSource(t)),this._source=t;var n=this._data=t.data,i=t.sourceFormat;i===ox&&(this._offset=0,this._dimSize=e,this._data=n);var r=Ax[i===nx?i+"_"+t.seriesLayoutBy:i];o(this,r)}function ss(){return this._data.length}function ls(t){return this._data[t]}function hs(t){for(var e=0;ee.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function Ms(t,e){f(t.CHANGABLE_METHODS,function(n){t.wrapMethod(n,x(Is,e))})}function Is(t){var e=Ts(t);e&&e.setOutputEnd(this.count())}function Ts(t){var e=(t.ecModel||{}).scheduler,n=e&&e.getPipeline(t.uid);if(n){var i=n.currentTask;if(i){var r=i.agentStubMap;r&&(i=r.get(t.uid))}return i}}function Ds(){this.group=new Vg,this.uid=Ea("viewChart"),this.renderTask=gs({plan:ks,reset:Ls}),this.renderTask.context={view:this}}function Cs(t,e){if(t&&(t.trigger(e),"group"===t.type))for(var n=0;n=0?i():c=setTimeout(i,-a),h=r};return d.clear=function(){c&&(clearTimeout(c),c=null)},d.debounceNextCall=function(t){l=t},d}function Os(t,e,n,i){var r=t[e];if(r){var a=r[Xx]||r,o=r[Yx],s=r[jx];if(s!==n||o!==i){if(null==n||!i)return t[e]=a;r=t[e]=Ps(a,n,"debounce"===i),r[Xx]=a,r[Yx]=i,r[jx]=n}return r}}function Ns(t,e,n,i){this.ecInstance=t,this.api=e,this.unfinished;var n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice();this._allHandlers=n.concat(i),this._stageTaskMap=B()}function Es(t,e,n,i,r){function a(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}r=r||{};var o;f(e,function(e){if(!r.visualType||r.visualType===e.visualType){var s=t._stageTaskMap.get(e.uid),l=s.seriesTaskMap,h=s.overallTask;if(h){var u,c=h.agentStubMap;c.each(function(t){a(r,t)&&(t.dirty(),u=!0)}),u&&h.dirty(),t_(h,i);var d=t.getPerformArgs(h,r.block);c.each(function(t){t.perform(d)}),o|=h.perform(d)}else l&&l.each(function(s){a(r,s)&&s.dirty();var l=t.getPerformArgs(s,r.block);l.skip=!e.performRawSeries&&n.isSeriesFiltered(s.context.model),t_(s,i),o|=s.perform(l)})}}),t.unfinished|=o}function Rs(t,e,n,i,r){function a(n){var a=n.uid,s=o.get(a)||o.set(a,gs({plan:Hs,reset:Ws,count:Xs}));s.context={model:n,ecModel:i,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:t},js(t,n,s)}var o=n.seriesTaskMap||(n.seriesTaskMap=B()),s=e.seriesType,l=e.getTargetSeries;e.createOnAllSeries?i.eachRawSeries(a):s?i.eachRawSeriesByType(s,a):l&&l(i,r).each(a);var h=t._pipelineMap;o.each(function(t,e){h.get(e)||(t.dispose(),o.removeKey(e))})}function zs(t,e,n,i,r){function a(e){var n=e.uid,i=s.get(n);i||(i=s.set(n,gs({reset:Fs,onDirty:Gs})),o.dirty()),i.context={model:e,overallProgress:u,modifyOutputEnd:c},i.agent=o,i.__block=u,js(t,e,i)}var o=n.overallTask=n.overallTask||gs({reset:Bs});o.context={ecModel:i,api:r,overallReset:e.overallReset,scheduler:t};var s=o.agentStubMap=o.agentStubMap||B(),l=e.seriesType,h=e.getTargetSeries,u=!0,c=e.modifyOutputEnd;l?i.eachRawSeriesByType(l,a):h?h(i,r).each(a):(u=!1,f(i.getSeries(),a));var d=t._pipelineMap;s.each(function(t,e){d.get(e)||(t.dispose(),o.dirty(),s.removeKey(e))})}function Bs(t){t.overallReset(t.ecModel,t.api,t.payload)}function Fs(t){return t.overallProgress&&Vs}function Vs(){this.agent.dirty(),this.getDownstream().dirty()}function Gs(){this.agent&&this.agent.dirty()}function Hs(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function Ws(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=Oi(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?p(e,function(t,e){return Us(e)}):e_}function Us(t){return function(e,n){var i=n.data,r=n.resetDefines[t];if(r&&r.dataEach)for(var a=e.start;ae.get("hoverLayerThreshold")&&!zp.node&&n.traverse(function(t){t.isGroup||(t.useHoverLayer=!0)})}function fl(t,e){var n=t.get("blendMode")||null;e.group.traverse(function(t){t.isGroup||t.style.blend!==n&&t.setStyle("blend",n),t.eachPendingDisplayable&&t.eachPendingDisplayable(function(t){t.setStyle("blend",n)})})}function pl(t,e){var n=t.get("z"),i=t.get("zlevel");e.group.traverse(function(t){"group"!==t.type&&(null!=n&&(t.z=n),null!=i&&(t.zlevel=i))})}function gl(t){var e=t._coordSysMgr;return o(new Vo(t),{getCoordinateSystems:y(e.getCoordinateSystems,e),getComponentByElement:function(e){for(;e;){var n=e.__ecComponentInfo;if(null!=n)return t._model.getComponent(n.mainType,n.index);e=e.parent}}})}function ml(t){function e(t,e){for(var n=0;n65535?tw:ew}function Zl(t){var e=t.constructor;return e===Array?t.slice():new e(t)}function ql(t,e){f(nw.concat(e.__wrappedMethods||[]),function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t.__wrappedMethods=e.__wrappedMethods,f(iw,function(n){t[n]=i(e[n])}),t._calculationInfo=o(e._calculationInfo)}function Kl(t){var e=t._invertedIndicesMap;f(e,function(n,i){var r=t._dimensionInfos[i],a=r.ordinalMeta;if(a){n=e[i]=new tw(a.categories.length);for(var o=0;o=0?this._indices[t]:-1}function th(t,e){var n=t._idList[e];return null==n&&(n=$l(t,t._idDimIdx,e)),null==n&&(n=J_+e),n}function eh(t){return _(t)||(t=[t]),t}function nh(t,e){var n=t.dimensions,i=new rw(p(n,t.getDimensionInfo,t),t.hostModel);ql(i,t);for(var r=i._storage={},a=t._storage,o=0;o=0?(r[s]=ih(a[s]),i._rawExtent[s]=rh(),i._extent[s]=null):r[s]=a[s])}return i}function ih(t){for(var e=new Array(t.length),n=0;np;p++){var g=a[p]=o({},S(a[p])?a[p]:{name:a[p]}),m=g.name,v=c[p]={otherDims:{}};null!=m&&null==h.get(m)&&(v.name=v.displayName=m,h.set(m,p)),null!=g.type&&(v.type=g.type),null!=g.displayName&&(v.displayName=g.displayName)}l.each(function(t,e){t=Oi(t).slice();var n=l.set(e,[]);f(t,function(t,i){b(t)&&(t=h.get(t)),null!=t&&d>t&&(n[i]=t,r(c[t],e,i))})});var y=0;f(t,function(t){var e,t,n,a;if(b(t))e=t,t={};else{e=t.name;var o=t.ordinalMeta;t.ordinalMeta=null,t=i(t),t.ordinalMeta=o,n=t.dimsDef,a=t.otherDims,t.name=t.coordDim=t.coordDimIndex=t.dimsDef=t.otherDims=null}var h=Oi(l.get(e));if(!h.length)for(var u=0;u<(n&&n.length||1);u++){for(;yI;I++){var v=c[I]=c[I]||{},T=v.coordDim;null==T&&(v.coordDim=sh(M,u,w),v.coordDimIndex=0,(!x||0>=_)&&(v.isExtraCoord=!0),_--),null==v.name&&(v.name=sh(v.coordDim,h)),null==v.type&&Lo(e,I,v.name)&&(v.type="ordinal")}return c}function oh(t,e,n,i){var r=Math.max(t.dimensionsDetectCount||1,e.length,n.length,i||0);return f(e,function(t){var e=t.dimsDef;e&&(r=Math.max(r,e.length))}),r}function sh(t,e,n){if(n||null!=e.get(t)){for(var i=0;null!=e.get(t+i);)i++;t+=i}return e.set(t,!0),t}function lh(t,e,n){n=n||{};var i,r,a,o,s=n.byIndex,l=n.stackedCoordDimension,h=!(!t||!t.get("stack"));if(f(e,function(t,n){b(t)&&(e[n]=t={name:t}),h&&!t.isExtraCoord&&(s||i||!t.ordinalMeta||(i=t),r||"ordinal"===t.type||"time"===t.type||l&&l!==t.coordDim||(r=t))}),!r||s||i||(s=!0),r){a="__\x00ecstackresult",o="__\x00ecstackedover",i&&(i.createInvertedIndices=!0);var u=r.coordDim,c=r.type,d=0;f(e,function(t){t.coordDim===u&&d++}),e.push({name:a,coordDim:u,coordDimIndex:d,type:c,isExtraCoord:!0,isCalculationCoord:!0}),d++,e.push({name:o,coordDim:o,coordDimIndex:d,type:c,isExtraCoord:!0,isCalculationCoord:!0})}return{stackedDimension:r&&r.name,stackedByDimension:i&&i.name,isStackedByIndex:s,stackedOverDimension:o,stackResultDimension:a}}function hh(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function uh(t,e){return hh(t,e)?t.getCalculationInfo("stackResultDimension"):e}function ch(t,e,n){n=n||{},_o.isInstance(t)||(t=_o.seriesDataToSource(t));var i,r=e.get("coordinateSystem"),a=Go.get(r),o=yo(e);o&&(i=p(o.coordSysDims,function(t){var e={name:t},n=o.axisMap.get(t);if(n){var i=n.get("type");e.type=Xl(i)}return e})),i||(i=a&&(a.getDimensionsInfo?a.getDimensionsInfo():a.dimensions.slice())||["x","y"]);var s,l,h=sw(t,{coordDimensions:i,generateCoord:n.generateCoord});o&&f(h,function(t,e){var n=t.coordDim,i=o.categoryAxisMap.get(n);i&&(null==s&&(s=e),t.ordinalMeta=i.getOrdinalMeta()),null!=t.otherDims.itemName&&(l=!0)}),l||null==s||(h[s].otherDims.itemName=0);var u=lh(e,h),c=new rw(h,e);c.setCalculationInfo(u);var d=null!=s&&dh(t)?function(t,e,n,i){return i===s?n:this.defaultDimValueGetter(t,e,n,i)}:null;return c.hasItemOption=!1,c.initData(t,null,d),c}function dh(t){if(t.sourceFormat===ex){var e=fh(t.data||[]);return null!=e&&!_(Ei(e))}}function fh(t){for(var e=0;eo&&(o=r.interval=n),null!=i&&o>i&&(o=r.interval=i);var s=r.intervalPrecision=xh(o),l=r.niceTickExtent=[cw(Math.ceil(t[0]/o)*o,s),cw(Math.floor(t[1]/o)*o,s)];return wh(l,t),r}function xh(t){return Ua(t)+2}function _h(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function wh(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),_h(t,0,e),_h(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function bh(t,e,n,i){var r=[];if(!t)return r;var a=1e4;e[0]a)return[];return e[1]>(r.length?r[r.length-1]:n[1])&&r.push(e[1]),r}function Sh(t){return t.get("stack")||pw+t.seriesIndex}function Mh(t){return t.dim+t.index}function Ih(t,e){var n=[];return e.eachSeriesByType(t,function(t){kh(t)&&!Lh(t)&&n.push(t)}),n}function Th(t){var e=[];return f(t,function(t){var n=t.getData(),i=t.coordinateSystem,r=i.getBaseAxis(),a=r.getExtent(),o="category"===r.type?r.getBandWidth():Math.abs(a[1]-a[0])/n.count(),s=Va(t.get("barWidth"),o),l=Va(t.get("barMaxWidth"),o),h=t.get("barGap"),u=t.get("barCategoryGap");e.push({bandWidth:o,barWidth:s,barMaxWidth:l,barGap:h,barCategoryGap:u,axisKey:Mh(r),stackId:Sh(t)})}),Dh(e)}function Dh(t){var e={};f(t,function(t){var n=t.axisKey,i=t.bandWidth,r=e[n]||{bandWidth:i,remainedWidth:i,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},a=r.stacks;e[n]=r;var o=t.stackId;a[o]||r.autoWidthCount++,a[o]=a[o]||{width:0,maxWidth:0};var s=t.barWidth;s&&!a[o].width&&(a[o].width=s,s=Math.min(r.remainedWidth,s),r.remainedWidth-=s);var l=t.barMaxWidth;l&&(a[o].maxWidth=l);var h=t.barGap;null!=h&&(r.gap=h);var u=t.barCategoryGap;null!=u&&(r.categoryGap=u)});var n={};return f(e,function(t,e){n[e]={};var i=t.stacks,r=t.bandWidth,a=Va(t.categoryGap,r),o=Va(t.gap,1),s=t.remainedWidth,l=t.autoWidthCount,h=(s-a)/(l+(l-1)*o);h=Math.max(h,0),f(i,function(t){var e=t.maxWidth;e&&h>e&&(e=Math.min(e,s),t.width&&(e=Math.min(e,t.width)),s-=e,t.width=e,l--)}),h=(s-a)/(l+(l-1)*o),h=Math.max(h,0);var u,c=0;f(i,function(t){t.width||(t.width=h),u=t,c+=t.width*(1+o)}),u&&(c-=u.width*o);var d=-c/2;f(i,function(t,i){n[e][i]=n[e][i]||{offset:d,width:t.width},d+=t.width*(1+o)})}),n}function Ch(t,e,n){if(t&&e){var i=t[Mh(e)];return null!=i&&null!=n&&(i=i[Sh(n)]),i +}}function Ah(t,e){var n=Ih(t,e),i=Th(n),r={};f(n,function(t){var e=t.getData(),n=t.coordinateSystem,a=n.getBaseAxis(),o=Sh(t),s=i[Mh(a)][o],l=s.offset,h=s.width,u=n.getOtherAxis(a),c=t.get("barMinHeight")||0;r[o]=r[o]||[],e.setLayout({offset:l,size:h});for(var d=e.mapDimension(u.dim),f=e.mapDimension(a.dim),p=hh(e,d),g=u.isHorizontal(),m=Ph(a,u,p),v=0,y=e.count();y>v;v++){var x=e.get(d,v),_=e.get(f,v);if(!isNaN(x)){var w=x>=0?"p":"n",b=m;p&&(r[o][_]||(r[o][_]={p:m,n:m}),b=r[o][_][w]);var S,M,I,T;if(g){var D=n.dataToPoint([x,_]);S=b,M=D[1]+l,I=D[0]-m,T=h,Math.abs(I)I?-1:1)*c),p&&(r[o][_][w]+=I)}else{var D=n.dataToPoint([_,x]);S=D[0]+l,M=b,I=h,T=D[1]-m,Math.abs(T)=T?-1:1)*c),p&&(r[o][_][w]+=T)}e.setItemLayout(v,{x:S,y:M,width:I,height:T})}}},this)}function kh(t){return t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type}function Lh(t){return t.pipelineContext&&t.pipelineContext.large}function Ph(t,e,n){return h(t.getAxesOnZeroOf(),e)>=0||n?e.toGlobalCoord(e.dataToCoord(0)):e.getGlobalExtent()[0]}function Oh(t,e){return Lw(t,kw(e))}function Nh(t,e){var n,i,r,a=t.type,o=e.getMin(),s=e.getMax(),l=null!=o,h=null!=s,u=t.getExtent();"ordinal"===a?n=e.getCategories().length:(i=e.get("boundaryGap"),_(i)||(i=[i||0,i||0]),"boolean"==typeof i[0]&&(i=[0,0]),i[0]=Va(i[0],1),i[1]=Va(i[1],1),r=u[1]-u[0]||Math.abs(u[0])),null==o&&(o="ordinal"===a?n?0:0/0:u[0]-i[0]*r),null==s&&(s="ordinal"===a?n?n-1:0/0:u[1]+i[1]*r),"dataMin"===o?o=u[0]:"function"==typeof o&&(o=o({min:u[0],max:u[1]})),"dataMax"===s?s=u[1]:"function"==typeof s&&(s=s({min:u[0],max:u[1]})),(null==o||!isFinite(o))&&(o=0/0),(null==s||!isFinite(s))&&(s=0/0),t.setBlank(D(o)||D(s)||"ordinal"===a&&!t.getOrdinalMeta().categories.length),e.getNeedCrossZero()&&(o>0&&s>0&&!l&&(o=0),0>o&&0>s&&!h&&(s=0));var c=e.ecModel;if(c&&"time"===a){var d,p=Ih("bar",c);if(f(p,function(t){d|=t.getBaseAxis()===e.axis}),d){var g=Th(p),m=Eh(o,s,e,g);o=m.min,s=m.max}}return[o,s]}function Eh(t,e,n,i){var r=n.axis.getExtent(),a=r[1]-r[0],o=Ch(i,n.axis);if(void 0===o)return{min:t,max:e};var s=1/0;f(o,function(t){s=Math.min(t.offset,s)});var l=-1/0;f(o,function(t){l=Math.max(t.offset+t.width,l)}),s=Math.abs(s),l=Math.abs(l);var h=s+l,u=e-t,c=1-(s+l)/a,d=u/c-u;return e+=d*(l/h),t-=d*(s/h),{min:t,max:e}}function Rh(t,e){var n=Nh(t,e),i=null!=e.getMin(),r=null!=e.getMax(),a=e.get("splitNumber");"log"===t.type&&(t.base=e.get("logBase"));var o=t.type;t.setExtent(n[0],n[1]),t.niceExtent({splitNumber:a,fixMin:i,fixMax:r,minInterval:"interval"===o||"time"===o?e.get("minInterval"):null,maxInterval:"interval"===o||"time"===o?e.get("maxInterval"):null});var s=e.get("interval");null!=s&&t.setInterval&&t.setInterval(s)}function zh(t,e){if(e=e||t.get("type"))switch(e){case"category":return new uw(t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),[1/0,-1/0]);case"value":return new fw;default:return(ph.getClass(e)||fw).create(t)}}function Bh(t){var e=t.scale.getExtent(),n=e[0],i=e[1];return!(n>0&&i>0||0>n&&0>i)}function Fh(t){var e=t.getLabelModel().get("formatter"),n="category"===t.type?t.scale.getExtent()[0]:null;return"string"==typeof e?e=function(t){return function(e){return t.replace("{value}",null!=e?e:"")}}(e):"function"==typeof e?function(i,r){return null!=n&&(r=i-n),e(Vh(t,i),r)}:function(e){return t.scale.getLabel(e)}}function Vh(t,e){return"category"===t.type?t.scale.getLabel(e):e}function Gh(t){var e=t.model,n=t.scale;if(e.get("axisLabel.show")&&!n.isBlank()){var i,r,a="category"===t.type,o=n.getExtent();a?r=n.count():(i=n.getTicks(),r=i.length);var s,l=t.getLabelModel(),h=Fh(t),u=1;r>40&&(u=Math.ceil(r/40));for(var c=0;r>c;c+=u){var d=i?i[c]:o[0]+c,f=h(d),p=l.getTextRect(f),g=Hh(p,l.get("rotate")||0);s?s.union(g):s=g}return s}}function Hh(t,e){var n=e*Math.PI/180,i=t.plain(),r=i.width,a=i.height,o=r*Math.cos(n)+a*Math.sin(n),s=r*Math.sin(n)+a*Math.cos(n),l=new rn(i.x,i.y,o,s);return l}function Wh(t,e){if("image"!==this.type){var n=this.style,i=this.shape;i&&"line"===i.symbolType?n.stroke=t:this.__isEmptyBrush?(n.stroke=t,n.fill=e||"#fff"):(n.fill&&(n.fill=t),n.stroke&&(n.stroke=t)),this.dirty(!1)}}function Uh(t,e,n,i,r,a,o){var s=0===t.indexOf("empty");s&&(t=t.substr(5,1).toLowerCase()+t.substr(6));var l;return l=0===t.indexOf("image://")?Yr(t.slice(8),new rn(e,n,i,r),o?"center":"cover"):0===t.indexOf("path://")?jr(t.slice(7),{},new rn(e,n,i,r),o?"center":"cover"):new Xw({shape:{symbolType:t,x:e,y:n,width:i,height:r}}),l.__isEmptyBrush=s,l.setColor=Wh,l.setColor(a),l}function Xh(t){return ch(t.getSource(),t)}function jh(t,e){var n=e;Pa.isInstance(e)||(n=new Pa(e),c(n,zw));var i=zh(n);return i.setExtent(t[0],t[1]),Rh(i,n),i}function Yh(t){c(t,zw)}function Zh(t,e){return Math.abs(t-e)>1^-(1&s),l=l>>1^-(1&l),s+=r,l+=a,r=s,a=l,i.push([s/n,l/n])}return i}function Qh(t){return"category"===t.type?eu(t):ru(t)}function tu(t,e){return"category"===t.type?iu(t,e):{ticks:t.scale.getTicks()}}function eu(t){var e=t.getLabelModel(),n=nu(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}function nu(t,e){var n=au(t,"labels"),i=fu(e),r=ou(n,i);if(r)return r;var a,o;return w(i)?a=du(t,i):(o="auto"===i?lu(t):i,a=cu(t,o)),su(n,i,{labels:a,labelCategoryInterval:o})}function iu(t,e){var n=au(t,"ticks"),i=fu(e),r=ou(n,i);if(r)return r;var a,o;if((!e.get("show")||t.scale.isBlank())&&(a=[]),w(i))a=du(t,i,!0);else if("auto"===i){var s=nu(t,t.getLabelModel());o=s.labelCategoryInterval,a=p(s.labels,function(t){return t.tickValue})}else o=i,a=cu(t,o,!0);return su(n,i,{ticks:a,tickCategoryInterval:o})}function ru(t){var e=t.scale.getTicks(),n=Fh(t);return{labels:p(e,function(e,i){return{formattedLabel:n(e,i),rawLabel:t.scale.getLabel(e),tickValue:e}})}}function au(t,e){return Kw(t)[e]||(Kw(t)[e]=[])}function ou(t,e){for(var n=0;n40&&(s=Math.max(1,Math.floor(o/40)));for(var l=a[0],h=t.dataToCoord(l+1)-t.dataToCoord(l),u=Math.abs(h*Math.cos(i)),c=Math.abs(h*Math.sin(i)),d=0,f=0;l<=a[1];l+=s){var p=0,g=0,m=Mn(n(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/u,y=f/c;isNaN(v)&&(v=1/0),isNaN(y)&&(y=1/0);var x=Math.max(0,Math.floor(Math.min(v,y))),_=Kw(t.model),w=_.lastAutoInterval,b=_.lastTickCount;return null!=w&&null!=b&&Math.abs(w-x)<=1&&Math.abs(b-o)<=1&&w>x?x=w:(_.lastTickCount=o,_.lastAutoInterval=x),x}function uu(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 cu(t,e,n){function i(t){l.push(n?t:{formattedLabel:r(t),rawLabel:a.getLabel(t),tickValue:t})}var r=Fh(t),a=t.scale,o=a.getExtent(),s=t.getLabelModel(),l=[],h=Math.max((e||0)+1,1),u=o[0],c=a.count();0!==u&&h>1&&c/h>2&&(u=Math.round(Math.ceil(u/h)*h));var d={min:s.get("showMinLabel"),max:s.get("showMaxLabel")};d.min&&u!==o[0]&&i(o[0]);for(var f=u;f<=o[1];f+=h)i(f);return d.max&&f!==o[1]&&i(o[1]),l}function du(t,e,n){var i=t.scale,r=Fh(t),a=[];return f(i.getTicks(),function(t){var o=i.getLabel(t);e(t,o)&&a.push(n?t:{formattedLabel:r(t),rawLabel:o,tickValue:t})}),a}function fu(t){var e=t.get("interval");return null==e?"auto":e}function pu(t,e){var n=t[1]-t[0],i=e,r=n/i/2;t[0]+=r,t[1]-=r}function gu(t,e,n,i,r){function a(t,e){return u?t>e:e>t}var o=e.length;if(t.onBand&&!i&&o){var s,l=t.getExtent();if(1===o)e[0].coord=l[0],s=e[1]={coord:l[0]};else{var h=e[1].coord-e[0].coord;f(e,function(t){t.coord-=h/2;var e=e||0;e%2>0&&(t.coord-=h/(2*(e+1)))}),s={coord:e[o-1].coord+h},e.push(s)}var u=l[0]>l[1];a(e[0].coord,l[0])&&(r?e[0].coord=l[0]:e.shift()),r&&a(l[0],e[0].coord)&&e.unshift({coord:l[0]}),a(l[1],s.coord)&&(r?s.coord=l[1]:e.pop()),r&&a(s.coord,l[1])&&e.push({coord:l[1]})}}function mu(t){return this._axes[t]}function vu(t){eb.call(this,t)}function yu(t,e){return e.type||(e.data?"category":"value")}function xu(t,e){return t.getCoordSysModel()===e}function _u(t,e,n){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,n),this.model=t}function wu(t,e,n){n.getAxesOnZeroOf=function(){return i?[i]:[]};var i,r=t[e],a=n.model,o=a.get("axisLine.onZero"),s=a.get("axisLine.onZeroAxisIndex");if(o){if(null!=s)return void(bu(r[s])&&(i=r[s]));for(var l in r)if(r.hasOwnProperty(l)&&bu(r[l])){i=r[l];break}}}function bu(t){return t&&"category"!==t.type&&"time"!==t.type&&Bh(t)}function Su(t,e){var n=t.getExtent(),i=n[0]+n[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return i-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return i-t+e}}function Mu(t){return p(ub,function(e){var n=t.getReferringComponents(e)[0];return n})}function Iu(t){return"cartesian2d"===t.get("coordinateSystem")}function Tu(t,e){var n=t.mapDimension("defaultedLabel",!0),i=n.length;if(1===i)return fs(t,e,n[0]);if(i){for(var r=[],a=0;a0?"bottom":"top":r.width>0?"left":"right";l||Du(t.style,d,i,h,a,n,p),ca(t,d)}function Pu(t,e){var n=t.get(pb)||0;return Math.min(n,Math.abs(e.width),Math.abs(e.height))}function Ou(t,e,n){var i=t.getData(),r=[],a=i.getLayout("valueAxisHorizontal")?1:0;r[1-a]=i.getLayout("valueAxisStart");var o=new vb({shape:{points:i.getLayout("largePoints")},incremental:!!n,__startPoint:r,__valueIdx:a});e.add(o),Nu(o,t,i)}function Nu(t,e,n){var i=n.getVisual("borderColor")||n.getVisual("color"),r=e.getModel("itemStyle").getItemStyle(["color","borderColor"]);t.useStyle(r),t.style.fill=null,t.style.stroke=i,t.style.lineWidth=n.getLayout("barWidth")}function Eu(t){var e={componentType:t.mainType};return e[t.mainType+"Index"]=t.componentIndex,e}function Ru(t,e,n,i){var r,a,o=Ya(n-t.rotation),s=i[0]>i[1],l="start"===e&&!s||"start"!==e&&s;return Za(o-yb/2)?(a=l?"bottom":"top",r="center"):Za(o-1.5*yb)?(a=l?"top":"bottom",r="center"):(a="middle",r=1.5*yb>o&&o>yb/2?l?"left":"right":l?"right":"left"),{rotation:o,textAlign:r,textVerticalAlign:a}}function zu(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)}function Bu(t,e,n){var i=t.get("axisLabel.showMinLabel"),r=t.get("axisLabel.showMaxLabel");e=e||[],n=n||[];var a=e[0],o=e[1],s=e[e.length-1],l=e[e.length-2],h=n[0],u=n[1],c=n[n.length-1],d=n[n.length-2];i===!1?(Fu(a),Fu(h)):Vu(a,o)&&(i?(Fu(o),Fu(u)):(Fu(a),Fu(h))),r===!1?(Fu(s),Fu(c)):Vu(l,s)&&(r?(Fu(l),Fu(d)):(Fu(s),Fu(c)))}function Fu(t){t&&(t.ignore=!0)}function Vu(t,e){var n=t&&t.getBoundingRect().clone(),i=e&&e.getBoundingRect().clone();if(n&&i){var r=pe([]);return ye(r,r,-t.rotation),n.applyTransform(me([],r,t.getLocalTransform())),i.applyTransform(me([],r,e.getLocalTransform())),n.intersect(i)}}function Gu(t){return"middle"===t||"center"===t}function Hu(t,e,n){var i=e.axis;if(e.get("axisTick.show")&&!i.scale.isBlank()){for(var r=e.getModel("axisTick"),a=r.getModel("lineStyle"),o=r.get("length"),l=i.getTicksCoords(),h=[],u=[],c=t._transform,d=[],f=0;f=0||t===e}function Ku(t){var e=$u(t);if(e){var n=e.axisPointerModel,i=e.axis.scale,r=n.option,a=n.get("status"),o=n.get("value");null!=o&&(o=i.parse(o));var s=Qu(n);null==a&&(r.status=s?"show":"hide");var l=i.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==o||o>l[1])&&(o=l[1]),o0?n=i[0]:i[1]<0&&(n=i[1]),n}function fc(t,e,n,i){var r=0/0;t.stacked&&(r=n.get(n.getCalculationInfo("stackedOverDimension"),i)),isNaN(r)&&(r=t.valueStart);var a=t.baseDataOffset,o=[];return o[a]=n.get(t.baseDim,i),o[1-a]=r,e.dataToPoint(o)}function pc(t,e){var n=[];return e.diff(t).add(function(t){n.push({cmd:"+",idx:t})}).update(function(t,e){n.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){n.push({cmd:"-",idx:t})}).execute(),n}function gc(t){return isNaN(t[0])||isNaN(t[1])}function mc(t,e,n,i,r,a,o,s,l,h){return"none"!==h&&h?vc.apply(this,arguments):yc.apply(this,arguments)}function vc(t,e,n,i,r,a,o,s,l,h,u){for(var c=0,d=n,f=0;i>f;f++){var p=e[d];if(d>=r||0>d)break;if(gc(p)){if(u){d+=a;continue}break}if(d===n)t[a>0?"moveTo":"lineTo"](p[0],p[1]);else if(l>0){var g=e[c],m="y"===h?1:0,v=(p[m]-g[m])*l;Vb(Hb,g),Hb[m]=g[m]+v,Vb(Wb,p),Wb[m]=p[m]-v,t.bezierCurveTo(Hb[0],Hb[1],Wb[0],Wb[1],p[0],p[1])}else t.lineTo(p[0],p[1]);c=d,d+=a}return f}function yc(t,e,n,i,r,a,o,s,l,h,u){for(var c=0,d=n,f=0;i>f;f++){var p=e[d];if(d>=r||0>d)break;if(gc(p)){if(u){d+=a;continue}break}if(d===n)t[a>0?"moveTo":"lineTo"](p[0],p[1]),Vb(Hb,p);else if(l>0){var g=d+a,m=e[g];if(u)for(;m&&gc(e[g]);)g+=a,m=e[g];var v=.5,y=e[c],m=e[g];if(!m||gc(m))Vb(Wb,p);else{gc(m)&&!u&&(m=p),Y(Gb,m,y);var x,_;if("x"===h||"y"===h){var w="x"===h?0:1;x=Math.abs(p[w]-y[w]),_=Math.abs(p[w]-m[w])}else x=eg(p,y),_=eg(p,m);v=_/(_+x),Fb(Wb,p,Gb,-l*(1-v))}zb(Hb,Hb,s),Bb(Hb,Hb,o),zb(Wb,Wb,s),Bb(Wb,Wb,o),t.bezierCurveTo(Hb[0],Hb[1],Wb[0],Wb[1],p[0],p[1]),Fb(Hb,p,Gb,l*v)}else t.lineTo(p[0],p[1]);c=d,d+=a}return f}function xc(t,e){var n=[1/0,1/0],i=[-1/0,-1/0];if(e)for(var r=0;ri[0]&&(i[0]=a[0]),a[1]>i[1]&&(i[1]=a[1])}return{min:e?n:i,max:e?i:n}}function _c(t,e){if(t.length===e.length){for(var n=0;ne[0]?1:-1;e[0]+=i*n,e[1]-=i*n}return e}function Sc(t,e,n){if(!n.valueDim)return[];for(var i=[],r=0,a=e.count();a>r;r++)i.push(fc(n,t,e,r));return i}function Mc(t,e,n,i){var r=bc(t.getAxis("x")),a=bc(t.getAxis("y")),o=t.getBaseAxis().isHorizontal(),s=Math.min(r[0],r[1]),l=Math.min(a[0],a[1]),h=Math.max(r[0],r[1])-s,u=Math.max(a[0],a[1])-l;if(n)s-=.5,h+=.5,l-=.5,u+=.5;else{var c=i.get("lineStyle.width")||2,d=i.get("clipOverflow")?c/2:Math.max(h,u);o?(l-=d,u+=2*d):(s-=d,h+=2*d)}var f=new ly({shape:{x:s,y:l,width:h,height:u}});return e&&(f.shape[o?"width":"height"]=0,Ma(f,{shape:{width:h,height:u}},i)),f}function Ic(t,e,n,i){var r=t.getAngleAxis(),a=t.getRadiusAxis(),o=a.getExtent().slice();o[0]>o[1]&&o.reverse();var s=r.getExtent(),l=Math.PI/180;n&&(o[0]-=.5,o[1]+=.5);var h=new ny({shape:{cx:Ga(t.cx,1),cy:Ga(t.cy,1),r0:Ga(o[0],1),r:Ga(o[1],1),startAngle:-s[0]*l,endAngle:-s[1]*l,clockwise:r.inverse}});return e&&(h.shape.endAngle=-s[0]*l,Ma(h,{shape:{endAngle:-s[1]*l}},i)),h}function Tc(t,e,n,i){return"polar"===t.type?Ic(t,e,n,i):Mc(t,e,n,i)}function Dc(t,e,n){for(var i=e.getBaseAxis(),r="x"===i.dim||"radius"===i.dim?0:1,a=[],o=0;o=0;a--){var o=n[a].dimension,s=t.dimensions[o],l=t.getDimensionInfo(s);if(i=l&&l.coordDim,"x"===i||"y"===i){r=n[a];break}}if(r){var h=e.getAxis(i),u=p(r.stops,function(t){return{coord:h.toGlobalCoord(h.dataToCoord(t.value)),color:t.color}}),c=u.length,d=r.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),d.reverse());var g=10,m=u[0].coord-g,v=u[c-1].coord+g,y=v-m;if(.001>y)return"transparent";f(u,function(t){t.offset=(t.coord-m)/y}),u.push({offset:c?u[c-1].offset:.5,color:d[1]||"transparent"}),u.unshift({offset:c?u[0].offset:.5,color:d[0]||"transparent"});var x=new gy(0,0,0,0,u,!0);return x[i]=m,x[i+"2"]=v,x}}}function Ac(t,e,n){var i=t.get("showAllSymbol"),r="auto"===i;if(!i||r){var a=n.getAxesByScale("ordinal")[0];if(a&&(!r||!kc(a,e))){var o=e.mapDimension(a.dim),s={};return f(a.getViewLabels(),function(t){s[t.tickValue]=1}),function(t){return!s.hasOwnProperty(e.get(o,t))}}}}function kc(t,e){var n=t.getExtent(),i=Math.abs(n[1]-n[0])/t.scale.count();isNaN(i)&&(i=0);for(var r=e.count(),a=Math.max(1,Math.round(r/5)),o=0;r>o;o+=a)if(1.5*rc.getSymbolSize(e,o)[t.isHorizontal()?1:0]>i)return!1;return!0}function Lc(t,e,n,i){var r=e.getData(),a=this.dataIndex,o=r.getName(a),s=e.get("selectedOffset");i.dispatchAction({type:"pieToggleSelect",from:t,name:o,seriesId:e.id}),r.each(function(t){Pc(r.getItemGraphicEl(t),r.getItemLayout(t),e.isSelected(r.getName(t)),s,n)})}function Pc(t,e,n,i,r){var a=(e.startAngle+e.endAngle)/2,o=Math.cos(a),s=Math.sin(a),l=n?i:0,h=[o*l,s*l];r?t.animate().when(200,{position:h}).start("bounceOut"):t.attr("position",h)}function Oc(t,e){function n(){a.ignore=a.hoverIgnore,o.ignore=o.hoverIgnore}function i(){a.ignore=a.normalIgnore,o.ignore=o.normalIgnore}Vg.call(this);var r=new ny({z2:2}),a=new sy,o=new Jv;this.add(r),this.add(a),this.add(o),this.updateData(t,e,!0),this.on("emphasis",n).on("normal",i).on("mouseover",n).on("mouseout",i)}function Nc(t,e,n,i,r,a,o){function s(e,n,i){for(var r=e;n>r;r++)if(t[r].y+=i,r>e&&n>r+1&&t[r+1].y>t[r].y+t[r].height)return void l(r,i/2);l(n-1,i/2)}function l(e,n){for(var i=e;i>=0&&(t[i].y-=n,!(i>0&&t[i].y>t[i-1].y+t[i-1].height));i--);}function h(t,e,n,i,r,a){for(var o=a>0?e?Number.MAX_VALUE:0:e?Number.MAX_VALUE:0,s=0,l=t.length;l>s;s++)if("center"!==t[s].position){var h=Math.abs(t[s].y-i),u=t[s].len,c=t[s].len2,d=r+u>h?Math.sqrt((r+u+c)*(r+u+c)-h*h):Math.abs(t[s].x-n);e&&d>=o&&(d=o-10),!e&&o>=d&&(d=o+10),t[s].x=n+d*a,o=d}}t.sort(function(t,e){return t.y-e.y});for(var u,c=0,d=t.length,f=[],p=[],g=0;d>g;g++)u=t[g].y-c,0>u&&s(g,d,-u,r),c=t[g].y+t[g].height;0>o-c&&l(d-1,c-o);for(var g=0;d>g;g++)t[g].y>=n?p.push(t[g]):f.push(t[g]);h(f,!1,e,n,i,r),h(p,!0,e,n,i,r)}function Ec(t,e,n,i,r,a){for(var o=[],s=[],l=0;l=0;a--){var o=n[a];o.hierNode={defaultAncestor:null,ancestor:o,prelim:0,modifier:0,change:0,shift:0,i:a,thread:null},i.push(o)}}function $c(t,e){var n=t.isExpand?t.children:[],i=t.parentNode.children,r=t.hierNode.i?i[t.hierNode.i-1]:null;if(n.length){nd(t);var a=(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-a):t.hierNode.prelim=a}else r&&(t.hierNode.prelim=r.hierNode.prelim+e(t,r));t.parentNode.hierNode.defaultAncestor=id(t,r,t.parentNode.hierNode.defaultAncestor||i[0],e)}function Jc(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function Qc(t){return arguments.length?t:ld}function td(t,e){var n={};return t-=Math.PI/2,n.x=e*Math.cos(t),n.y=e*Math.sin(t),n}function ed(t,e){return co(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function nd(t){for(var e=t.children,n=e.length,i=0,r=0;--n>=0;){var a=e[n];a.hierNode.prelim+=i,a.hierNode.modifier+=i,r+=a.hierNode.change,i+=a.hierNode.shift+r}}function id(t,e,n,i){if(e){for(var r=t,a=t,o=a.parentNode.children[0],s=e,l=r.hierNode.modifier,h=a.hierNode.modifier,u=o.hierNode.modifier,c=s.hierNode.modifier;s=rd(s),a=ad(a),s&&a;){r=rd(r),o=ad(o),r.hierNode.ancestor=t;var d=s.hierNode.prelim+c-a.hierNode.prelim-h+i(s,a);d>0&&(sd(od(s,t,n),t,d),h+=d,l+=d),c+=s.hierNode.modifier,h+=a.hierNode.modifier,l+=r.hierNode.modifier,u+=o.hierNode.modifier}s&&!rd(r)&&(r.hierNode.thread=s,r.hierNode.modifier+=c-l),a&&!ad(o)&&(o.hierNode.thread=a,o.hierNode.modifier+=h-u,n=t)}return n}function rd(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function ad(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function od(t,e,n){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:n}function sd(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 ld(t,e){return t.parentNode===e.parentNode?1:2}function hd(t,e){var n=t.getItemLayout(e);return n&&!isNaN(n.x)&&!isNaN(n.y)&&"none"!==t.getItemVisual(e,"symbol")}function ud(t,e,n){return n.itemModel=e,n.itemStyle=e.getModel("itemStyle").getItemStyle(),n.hoverItemStyle=e.getModel("emphasis.itemStyle").getItemStyle(),n.lineStyle=e.getModel("lineStyle").getLineStyle(),n.labelModel=e.getModel("label"),n.hoverLabelModel=e.getModel("emphasis.label"),n.symbolInnerColor=t.isExpand===!1&&0!==t.children.length?n.itemStyle.fill:"#fff",n}function cd(t,e,n,i,r,a){var o=!n,l=t.tree.getNodeByDataIndex(e),h=l.getModel(),a=ud(l,h,a),u=t.tree.root,c=l.parentNode===u?l:l.parentNode||l,d=t.getItemGraphicEl(c.dataIndex),f=c.getLayout(),p=d?{x:d.position[0],y:d.position[1],rawX:d.__radialOldRawX,rawY:d.__radialOldRawY}:f,g=l.getLayout();o?(n=new rc(t,e,a),n.attr("position",[p.x,p.y])):n.updateData(t,e,a),n.__radialOldRawX=n.__radialRawX,n.__radialOldRawY=n.__radialRawY,n.__radialRawX=g.rawX,n.__radialRawY=g.rawY,i.add(n),t.setItemGraphicEl(e,n),Sa(n,{position:[g.x,g.y]},r);var m=n.getSymbolPath();if("radial"===a.layout){var v,y,x=u.children[0],_=x.getLayout(),w=x.children.length;if(g.x===_.x&&l.isExpand===!0){var b={};b.x=(x.children[0].getLayout().x+x.children[w-1].getLayout().x)/2,b.y=(x.children[0].getLayout().y+x.children[w-1].getLayout().y)/2,v=Math.atan2(b.y-_.y,b.x-_.x),0>v&&(v=2*Math.PI+v),y=b.x<_.x,y&&(v-=Math.PI)}else v=Math.atan2(g.y-_.y,g.x-_.x),0>v&&(v=2*Math.PI+v),0===l.children.length||0!==l.children.length&&l.isExpand===!1?(y=g.x<_.x,y&&(v-=Math.PI)):(y=g.x>_.x,y||(v-=Math.PI));var S=y?"left":"right";m.setStyle({textPosition:S,textRotation:-v,textOrigin:"center",verticalAlign:"middle"})}if(l.parentNode&&l.parentNode!==u){var M=n.__edge;M||(M=n.__edge=new cy({shape:fd(a,p,p),style:s({opacity:0},a.lineStyle)})),Sa(M,{shape:fd(a,f,g),style:{opacity:1}},r),i.add(M) +}}function dd(t,e,n,i,r,a){for(var o,s=t.tree.getNodeByDataIndex(e),l=t.tree.root,h=s.getModel(),a=ud(s,h,a),u=s.parentNode===l?s:s.parentNode||s;o=u.getLayout(),null==o;)u=u.parentNode===l?u:u.parentNode||u;Sa(n,{position:[o.x+1,o.y+1]},r,function(){i.remove(n),t.setItemGraphicEl(e,null)}),n.fadeOut(null,{keepLabel:!0});var c=n.__edge;c&&Sa(c,{shape:fd(a,o,o),style:{opacity:0}},r,function(){i.remove(c)})}function fd(t,e,n){var i,r,a,o,s=t.orient;if("radial"===t.layout){var l=e.rawX,h=e.rawY,u=n.rawX,c=n.rawY,d=td(l,h),f=td(l,h+(c-h)*t.curvature),p=td(u,c+(h-c)*t.curvature),g=td(u,c);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}}var l=e.x,h=e.y,u=n.x,c=n.y;return("LR"===s||"RL"===s)&&(i=l+(u-l)*t.curvature,r=h,a=u+(l-u)*t.curvature,o=c),("TB"===s||"BT"===s)&&(i=l,r=h+(c-h)*t.curvature,a=u,o=c+(h-c)*t.curvature),{x1:l,y1:h,x2:u,y2:c,cpx1:i,cpy1:r,cpx2:a,cpy2:o}}function pd(t,e,n){for(var i,r=[t],a=[];i=r.pop();)if(a.push(i),i.isExpand){var o=i.children;if(o.length)for(var s=0;s=0;a--)i.push(r[a])}}function md(t,e){var n=ed(t,e);t.layoutInfo=n;var i=t.get("layout"),r=0,a=0,o=null;"radial"===i?(r=2*Math.PI,a=Math.min(n.height,n.width)/2,o=Qc(function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth})):(r=n.width,a=n.height,o=Qc());var s=t.getData().tree.root,l=s.children[0];if(l){Kc(s),pd(l,$c,o),s.hierNode.modifier=-l.hierNode.prelim,gd(l,Jc);var h=l,u=l,c=l;gd(l,function(t){var e=t.getLayout().x;eu.getLayout().x&&(u=t),t.depth>c.depth&&(c=t)});var d=h===u?1:o(h,u)/2,f=d-h.getLayout().x,p=0,g=0,m=0,v=0;if("radial"===i)p=r/(u.getLayout().x+d+f),g=a/(c.depth-1||1),gd(l,function(t){m=(t.getLayout().x+f)*p,v=(t.depth-1)*g;var e=td(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/(u.getLayout().x+d+f),p=r/(c.depth-1||1),gd(l,function(t){v=(t.getLayout().x+f)*g,m="LR"===y?(t.depth-1)*p:r-(t.depth-1)*p,t.setLayout({x:m,y:v},!0)})):("TB"===y||"BT"===y)&&(p=r/(u.getLayout().x+d+f),g=a/(c.depth-1||1),gd(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 vd(){fg.call(this)}function yd(t){this.name=t,this.zoomLimit,fg.call(this),this._roamTransformable=new vd,this._rawTransformable=new vd,this._center,this._zoom}function xd(t,e,n,i){var r=n.seriesModel,a=r?r.coordinateSystem:null;return a===this?a[t](i):null}function _d(t,e,n,i,r){yd.call(this,t),this.map=e,this._nameCoordMap=B(),this.loadGeoJson(n,i,r)}function wd(t,e,n,i){var r=n.geoModel,a=n.seriesModel,o=r?r.coordinateSystem:a?a.coordinateSystem||(a.getReferringComponents("geo")[0]||{}).coordinateSystem:null;return o===this?o[t](i):null}function bd(t,e){var n=t.get("boundingCoords");if(null!=n){var i=n[0],r=n[1];isNaN(i[0])||isNaN(i[1])||isNaN(r[0])||isNaN(r[1])||this.setBoundingRect(i[0],i[1],r[0]-i[0],r[1]-i[1])}var a,o=this.getBoundingRect(),s=t.get("layoutCenter"),l=t.get("layoutSize"),h=e.getWidth(),u=e.getHeight(),c=t.get("aspectScale")||.75,d=o.width/o.height*c,f=!1;s&&l&&(s=[Va(s[0],h),Va(s[1],u)],l=Va(l,Math.min(h,u)),isNaN(s[0])||isNaN(s[1])||isNaN(l)||(f=!0));var p;if(f){var p={};d>1?(p.width=l,p.height=l/d):(p.height=l,p.width=l*d),p.y=s[1]-p.height/2,p.x=s[0]-p.width/2}else a=t.getBoxLayoutParams(),a.aspect=d,p=co(a,{width:h,height:u});this.setViewRect(p.x,p.y,p.width,p.height),this.setCenter(t.get("center")),this.setZoom(t.get("zoom"))}function Sd(t,e){f(e.get("geoCoord"),function(e,n){t.addGeoCoord(n,e)})}function Md(t,e){return!!Id(t)[e]}function Id(t){return t[OS]||(t[OS]={})}function Td(t){this.pointerChecker,this._zr=t,this._opt={};var e=y,n=e(Dd,this),r=e(Cd,this),a=e(Ad,this),o=e(kd,this),l=e(Ld,this);ag.call(this),this.setPointerChecker=function(t){this.pointerChecker=t},this.enable=function(e,h){this.disable(),this._opt=s(i(h)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,preventDefaultMouseMove:!0}),null==e&&(e=!0),(e===!0||"move"===e||"pan"===e)&&(t.on("mousedown",n),t.on("mousemove",r),t.on("mouseup",a)),(e===!0||"scale"===e||"zoom"===e)&&(t.on("mousewheel",o),t.on("pinch",l))},this.disable=function(){t.off("mousedown",n),t.off("mousemove",r),t.off("mouseup",a),t.off("mousewheel",o),t.off("pinch",l)},this.dispose=this.disable,this.isDragging=function(){return this._dragging},this.isPinching=function(){return this._pinching}}function Dd(t){if(!(xi(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)}}function Cd(t){if(!xi(t)&&Od(this,"moveOnMouseMove",t)&&this._dragging&&"pinch"!==t.gestureEvent&&!Md(this._zr,"globalPan")){var e=t.offsetX,n=t.offsetY,i=this._x,r=this._y,a=e-i,o=n-r;this._x=e,this._y=n,this._opt.preventDefaultMouseMove&&_m(t.event),this.trigger("pan",a,o,i,r,e,n)}}function Ad(t){xi(t)||(this._dragging=!1)}function kd(t){if(Od(this,"zoomOnMouseWheel",t)&&0!==t.wheelDelta){var e=t.wheelDelta>0?1.1:1/1.1;Pd.call(this,t,e,t.offsetX,t.offsetY)}}function Ld(t){if(!Md(this._zr,"globalPan")){var e=t.pinchScale>1?1.1:1/1.1;Pd.call(this,t,e,t.pinchX,t.pinchY)}}function Pd(t,e,n,i){this.pointerChecker&&this.pointerChecker(t,n,i)&&(_m(t.event),this.trigger("zoom",e,n,i))}function Od(t,e,n){var i=t._opt[e];return i&&(!b(i)||n.event[i+"Key"])}function Nd(t,e,n){var i=t.target,r=i.position;r[0]+=e,r[1]+=n,i.dirty()}function Ed(t,e,n,i){var r=t.target,a=t.zoomLimit,o=r.position,s=r.scale,l=t.zoom=t.zoom||1;if(l*=e,a){var h=a.min||0,u=a.max||1/0;l=Math.max(Math.min(u,l),h)}var c=l/t.zoom;t.zoom=l,o[0]-=(n-o[0])*(c-1),o[1]-=(i-o[1])*(c-1),s[0]*=c,s[1]*=c,r.dirty()}function Rd(t,e,n){var i=e.getComponentByElement(t.topTarget),r=i&&i.coordinateSystem;return i&&i!==n&&!NS[i.mainType]&&r&&r.model!==n}function zd(t){var e=t.getItemStyle(),n=t.get("areaColor");return null!=n&&(e.fill=n),e}function Bd(t,e,n,i,r){n.off("click"),n.off("mousedown"),e.get("selectedMode")&&(n.on("mousedown",function(){t._mouseDownFlag=!0}),n.on("click",function(a){if(t._mouseDownFlag){t._mouseDownFlag=!1;for(var o=a.target;!o.__regions;)o=o.parent;if(o){var s={type:("geo"===e.mainType?"geo":"map")+"ToggleSelect",batch:p(o.__regions,function(t){return{name:t.name,from:r.uid}})};s[e.mainType+"Id"]=e.id,i.dispatchAction(s),Fd(e,n)}}}))}function Fd(t,e){e.eachChild(function(e){f(e.__regions,function(n){e.trigger(t.isSelected(n.name)?"emphasis":"normal")})})}function Vd(t,e){var n=new Vg;this._controller=new Td(t.getZr()),this._controllerHost={target:e?n:null},this.group=n,this._updateGroup=e,this._mouseDownFlag}function Gd(t,e,n){var i=t.getZoom(),r=t.getCenter(),a=e.zoom,o=t.dataToPoint(r);if(null!=e.dx&&null!=e.dy){o[0]-=e.dx,o[1]-=e.dy;var r=t.pointToData(o);t.setCenter(r)}if(null!=a){if(n){var s=n.min||0,l=n.max||1/0;a=Math.max(Math.min(i*a,l),s)/i}t.scale[0]*=a,t.scale[1]*=a;var h=t.position,u=(e.originX-h[0])*(a-1),c=(e.originY-h[1])*(a-1);h[0]-=u,h[1]-=c,t.updateTransform();var r=t.pointToData(o);t.setCenter(r),t.setZoom(a*i)}return{center:t.getCenter(),zoom:t.getZoom()}}function Hd(t,e){var n={};return f(t,function(t){t.each(t.mapDimension("value"),function(e,i){var r="ec-"+t.getName(i);n[r]=n[r]||[],isNaN(e)||n[r].push(e)})}),t[0].map(t[0].mapDimension("value"),function(i,r){for(var a="ec-"+t[0].getName(r),o=0,s=1/0,l=-1/0,h=n[a].length,u=0;h>u;u++)s=Math.min(s,n[a][u]),l=Math.max(l,n[a][u]),o+=n[a][u];var c;return c="min"===e?s:"max"===e?l:"average"===e?o/h:o,0===h?0/0:c})}function Wd(t,e){var n=t.get("center"),i=e.getWidth(),r=e.getHeight(),a=Math.min(i,r),o=Va(n[0],e.getWidth()),s=Va(n[1],e.getHeight()),l=Va(t.get("radius"),a/2);return{cx:o,cy:s,r:l}}function Ud(t,e){return e&&("string"==typeof e?t=e.replace("{value}",null!=t?t:""):"function"==typeof e&&(t=e(t))),t}function Xd(t,e){e.update="updateView",Dl(e,function(e,n){var i={};return n.eachComponent({mainType:"geo",query:e},function(n){n[t](e.name);var r=n.coordinateSystem;f(r.regions,function(t){i[t.name]=n.isSelected(t.name)||!1})}),{selected:i,name:e.name}})}function jd(t,e,n){var i,r={},a="toggleSelected"===t;return n.eachComponent("legend",function(n){a&&null!=i?n[i?"select":"unSelect"](e.name):(n[t](e.name),i=n.isSelected(e.name));var o=n.getData();f(o,function(t){var e=t.get("name");if("\n"!==e&&""!==e){var i=n.isSelected(e);r[e]=r.hasOwnProperty(e)?r[e]&&i:i}})}),{name:e.name,selected:r}}function Yd(t,e){var n=Ey(e.get("padding")),i=e.getItemStyle(["color","opacity"]);i.fill=e.get("backgroundColor");var t=new ly({shape:{x:t.x-n[3],y:t.y-n[0],width:t.width+n[1]+n[3],height:t.height+n[0]+n[2],r:e.get("borderRadius")},style:i,silent:!0,z2:-1});return t}function Zd(t,e){e.dispatchAction({type:"legendToggleSelect",name:t})}function qd(t,e,n,i){var r=n.getZr().storage.getDisplayList()[0];r&&r.useHoverLayer||n.dispatchAction({type:"highlight",seriesName:t.name,name:e,excludeSeriesId:i})}function Kd(t,e,n,i){var r=n.getZr().storage.getDisplayList()[0];r&&r.useHoverLayer||n.dispatchAction({type:"downplay",seriesName:t.name,name:e,excludeSeriesId:i})}function $d(t,e,n){var i=t.getOrient(),r=[1,1];r[i.index]=0,fo(e,n,{type:"box",ignoreSize:r})}function Jd(t,e,n,i,r){var a=t.axis;if(!a.scale.isBlank()&&a.containData(e)){if(!t.involveSeries)return void n.showPointer(t,e);var s=Qd(e,t),l=s.payloadBatch,h=s.snapToValue;l[0]&&null==r.seriesIndex&&o(r,l[0]),!i&&t.snap&&a.containData(h)&&null!=h&&(e=h),n.showPointer(t,e,l,r),n.showTooltip(t,s,h)}}function Qd(t,e){var n=e.axis,i=n.dim,r=t,a=[],o=Number.MAX_VALUE,s=-1;return tM(e.seriesModels,function(e){var l,h,u=e.getData().mapDimension(i,!0);if(e.getAxisTooltipData){var c=e.getAxisTooltipData(u,t,n);h=c.dataIndices,l=c.nestestValue}else{if(h=e.getData().indicesOfNearest(u[0],t,"category"===n.type?.5:null),!h.length)return;l=e.getData().get(u[0],h[0])}if(null!=l&&isFinite(l)){var d=t-l,f=Math.abs(d);o>=f&&((o>f||d>=0&&0>s)&&(o=f,s=d,r=l,a.length=0),tM(h,function(t){a.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})}))}}),{payloadBatch:a,snapToValue:r}}function tf(t,e,n,i){t[e.key]={value:n,payloadBatch:i}}function ef(t,e,n,i){var r=n.payloadBatch,a=e.axis,o=a.model,s=e.axisPointerModel;if(e.triggerTooltip&&r.length){var l=e.coordSys.model,h=tc(l),u=t.map[h];u||(u=t.map[h]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(u)),u.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:i,valueLabelOpt:{precision:s.get("label.precision"),formatter:s.get("label.formatter")},seriesDataIndices:r.slice()})}}function nf(t,e,n){var i=n.axesInfo=[];tM(e,function(e,n){var r=e.axisPointerModel.option,a=t[n];a?(!e.useHandle&&(r.status="show"),r.value=a.value,r.seriesDataIndices=(a.payloadBatch||[]).slice()):!e.useHandle&&(r.status="hide"),"show"===r.status&&i.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:r.value})})}function rf(t,e,n,i){if(lf(e)||!t.list.length)return void i({type:"hideTip"});var r=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:r.dataIndexInside,dataIndex:r.dataIndex,seriesIndex:r.seriesIndex,dataByCoordSys:t.list})}function af(t,e,n){var i=n.getZr(),r="axisPointerLastHighlights",a=nM(i)[r]||{},o=nM(i)[r]={};tM(t,function(t){var e=t.axisPointerModel.option;"show"===e.status&&tM(e.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;o[e]=t})});var s=[],l=[];f(a,function(t,e){!o[e]&&l.push(t)}),f(o,function(t,e){!a[e]&&s.push(t)}),l.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,batch:l}),s.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,batch:s})}function of(t,e){for(var n=0;n<(t||[]).length;n++){var i=t[n];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex)return i}}function sf(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 lf(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function hf(t,e,n){if(!zp.node){var i=e.getZr();rM(i).records||(rM(i).records={}),uf(i,e);var r=rM(i).records[t]||(rM(i).records[t]={});r.handler=n}}function uf(t,e){function n(n,i){t.on(n,function(n){var r=pf(e);aM(rM(t).records,function(t){t&&i(t,n,r.dispatchAction)}),cf(r.pendings,e)})}rM(t).initialized||(rM(t).initialized=!0,n("click",x(ff,"click")),n("mousemove",x(ff,"mousemove")),n("globalout",df))}function cf(t,e){var n,i=t.showTip.length,r=t.hideTip.length;i?n=t.showTip[i-1]:r&&(n=t.hideTip[r-1]),n&&(n.dispatchAction=null,e.dispatchAction(n))}function df(t,e,n){t.handler("leave",null,n)}function ff(t,e,n,i){e.handler(t,n,i)}function pf(t){var e={showTip:[],hideTip:[]},n=function(i){var r=e[i.type];r?r.push(i):(i.dispatchAction=n,t.dispatchAction(i))};return{dispatchAction:n,pendings:e}}function gf(t,e){if(!zp.node){var n=e.getZr(),i=(rM(n).records||{})[t];i&&(rM(n).records[t]=null)}}function mf(){}function vf(t,e,n,i){yf(sM(n).lastProp,i)||(sM(n).lastProp=i,e?Sa(n,i,t):(n.stopAnimation(),n.attr(i)))}function yf(t,e){if(S(t)&&S(e)){var n=!0;return f(e,function(e,i){n=n&&yf(t[i],e)}),!!n}return t===e}function xf(t,e){t[e.get("label.show")?"show":"hide"]()}function _f(t){return{position:t.position.slice(),rotation:t.rotation||0}}function wf(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 bf(t){var e,n=t.get("type"),i=t.getModel(n+"Style");return"line"===n?(e=i.getLineStyle(),e.fill=null):"shadow"===n&&(e=i.getAreaStyle(),e.stroke=null),e}function Sf(t,e,n,i,r){var a=n.get("value"),o=If(a,e.axis,e.ecModel,n.get("seriesDataIndices"),{precision:n.get("label.precision"),formatter:n.get("label.formatter")}),s=n.getModel("label"),l=Ey(s.get("padding")||0),h=s.getFont(),u=Mn(o,h),c=r.position,d=u.width+l[1]+l[3],f=u.height+l[0]+l[2],p=r.align;"right"===p&&(c[0]-=d),"center"===p&&(c[0]-=d/2);var g=r.verticalAlign;"bottom"===g&&(c[1]-=f),"middle"===g&&(c[1]-=f/2),Mf(c,d,f,i);var m=s.get("backgroundColor");m&&"auto"!==m||(m=e.get("axisLine.lineStyle.color")),t.label={shape:{x:0,y:0,width:d,height:f,r:s.get("borderRadius")},position:c.slice(),style:{text:o,textFont:h,textFill:s.getTextColor(),textPosition:"inside",fill:m,stroke:s.get("borderColor")||"transparent",lineWidth:s.get("borderWidth")||0,shadowBlur:s.get("shadowBlur"),shadowColor:s.get("shadowColor"),shadowOffsetX:s.get("shadowOffsetX"),shadowOffsetY:s.get("shadowOffsetY")},z2:10}}function Mf(t,e,n,i){var r=i.getWidth(),a=i.getHeight();t[0]=Math.min(t[0]+e,r)-e,t[1]=Math.min(t[1]+n,a)-n,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}function If(t,e,n,i,r){t=e.scale.parse(t);var a=e.scale.getLabel(t,{precision:r.precision}),o=r.formatter;if(o){var s={value:Vh(e,t),seriesData:[]};f(i,function(t){var e=n.getSeriesByIndex(t.seriesIndex),i=t.dataIndexInside,r=e&&e.getDataParams(i);r&&s.seriesData.push(r)}),b(o)?a=o.replace("{value}",a):w(o)&&(a=o(s))}return a}function Tf(t,e,n){var i=fe();return ye(i,i,n.rotation),ve(i,i,n.position),Ta([t.dataToCoord(e),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}function Df(t,e,n,i,r,a){var o=xb.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=r.get("label.margin"),Sf(e,i,r,a,{position:Tf(i.axis,t,n),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function Cf(t,e,n){return n=n||0,{x1:t[n],y1:t[1-n],x2:e[n],y2:e[1-n]}}function Af(t,e,n){return n=n||0,{x:t[n],y:t[1-n],width:e[n],height:e[1-n]}}function kf(t,e){var n={};return n[e.dim+"AxisIndex"]=e.index,t.getCartesian(n)}function Lf(t){return"x"===t.dim?0:1}function Pf(t){var e="cubic-bezier(0.23, 1, 0.32, 1)",n="left "+t+"s "+e+",top "+t+"s "+e;return p(pM,function(t){return t+"transition:"+n}).join(";")}function Of(t){var e=[],n=t.get("fontSize"),i=t.getTextColor();return i&&e.push("color:"+i),e.push("font:"+t.getFont()),n&&e.push("line-height:"+Math.round(3*n/2)+"px"),dM(["decoration","align"],function(n){var i=t.get(n);i&&e.push("text-"+n+":"+i)}),e.join(";")}function Nf(t){var e=[],n=t.get("transitionDuration"),i=t.get("backgroundColor"),r=t.getModel("textStyle"),a=t.get("padding");return n&&e.push(Pf(n)),i&&(zp.canvasSupported?e.push("background-Color:"+i):(e.push("background-Color:#"+Be(i)),e.push("filter:alpha(opacity=70)"))),dM(["width","color","radius"],function(n){var i="border-"+n,r=fM(i),a=t.get(r);null!=a&&e.push(i+":"+a+("color"===n?"":"px"))}),e.push(Of(r)),null!=a&&e.push("padding:"+Ey(a).join("px ")+"px"),e.join(";")+";"}function Ef(t,e){if(zp.wxa)return null;var n=document.createElement("div"),i=this._zr=e.getZr();this.el=n,this._x=e.getWidth()/2,this._y=e.getHeight()/2,t.appendChild(n),this._container=t,this._show=!1,this._hideTimeout;var r=this;n.onmouseenter=function(){r._enterable&&(clearTimeout(r._hideTimeout),r._show=!0),r._inContent=!0},n.onmousemove=function(e){if(e=e||window.event,!r._enterable){var n=i.handler;mi(t,e,!0),n.dispatch("mousemove",e)}},n.onmouseleave=function(){r._enterable&&r._show&&r.hideLater(r._hideDelay),r._inContent=!1}}function Rf(t){for(var e=t.pop();t.length;){var n=t.pop();n&&(Pa.isInstance(n)&&(n=n.get("tooltip",!0)),"string"==typeof n&&(n={formatter:n}),e=new Pa(n,e,e.ecModel))}return e}function zf(t,e){return t.dispatchAction||y(e.dispatchAction,e)}function Bf(t,e,n,i,r,a,o){var s=Vf(n),l=s.width,h=s.height;return null!=a&&(t+l+a>i?t-=l+a:t+=a),null!=o&&(e+h+o>r?e-=h+o:e+=o),[t,e]}function Ff(t,e,n,i,r){var a=Vf(n),o=a.width,s=a.height;return t=Math.min(t+o,i)-o,e=Math.min(e+s,r)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}function Vf(t){var e=t.clientWidth,n=t.clientHeight;if(document.defaultView&&document.defaultView.getComputedStyle){var i=document.defaultView.getComputedStyle(t);i&&(e+=parseInt(i.paddingLeft,10)+parseInt(i.paddingRight,10)+parseInt(i.borderLeftWidth,10)+parseInt(i.borderRightWidth,10),n+=parseInt(i.paddingTop,10)+parseInt(i.paddingBottom,10)+parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10))}return{width:e,height:n}}function Gf(t,e,n){var i=n[0],r=n[1],a=5,o=0,s=0,l=e.width,h=e.height;switch(t){case"inside":o=e.x+l/2-i/2,s=e.y+h/2-r/2;break;case"top":o=e.x+l/2-i/2,s=e.y-r-a;break;case"bottom":o=e.x+l/2-i/2,s=e.y+h+a;break;case"left":o=e.x-i-a,s=e.y+h/2-r/2;break;case"right":o=e.x+l+a,s=e.y+h/2-r/2}return[o,s]}function Hf(t){return"center"===t||"middle"===t}function Wf(t){Ni(t,"label",["show"])}function Uf(t){return!(isNaN(parseFloat(t.x))&&isNaN(parseFloat(t.y)))}function Xf(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}function jf(t,e,n,i,r,a){var o=[],s=hh(e,i),l=s?e.getCalculationInfo("stackResultDimension"):i,h=Jf(e,l,t),u=e.indicesOfNearest(l,h)[0];o[r]=e.get(n,u),o[a]=e.get(i,u);var c=Wa(e.get(i,u));return c=Math.min(c,20),c>=0&&(o[a]=+o[a].toFixed(c)),o}function Yf(t,e){var n=t.getData(),r=t.coordinateSystem;if(e&&!Xf(e)&&!_(e.coord)&&r){var a=r.dimensions,o=Zf(e,n,r,t);if(e=i(e),e.type&&IM[e.type]&&o.baseAxis&&o.valueAxis){var s=SM(a,o.baseAxis.dim),l=SM(a,o.valueAxis.dim);e.coord=IM[e.type](n,o.baseDataDim,o.valueDataDim,s,l),e.value=e.coord[l]}else{for(var h=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],u=0;2>u;u++)IM[h[u]]&&(h[u]=Jf(n,n.mapDimension(a[u]),h[u]));e.coord=h}}return e}function Zf(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(qf(i,r.valueDataDim)),r.baseAxis=n.getOtherAxis(r.valueAxis),r.baseDataDim=e.mapDimension(r.baseAxis.dim)):(r.baseAxis=i.getBaseAxis(),r.valueAxis=n.getOtherAxis(r.baseAxis),r.baseDataDim=e.mapDimension(r.baseAxis.dim),r.valueDataDim=e.mapDimension(r.valueAxis.dim)),r}function qf(t,e){var n=t.getData(),i=n.dimensions;e=n.getDimension(e);for(var r=0;ri?t.coord&&t.coord[i]:t.value}function Jf(t,e,n){if("average"===n){var i=0,r=0;return t.each(e,function(t){isNaN(t)||(i+=t,r++)}),i/r}return"median"===n?t.getMedian(e):t.getDataExtent(e,!0)["max"===n?1:0]}function Qf(t,e,n){var i=e.coordinateSystem;t.each(function(r){var a,o=t.getItemModel(r),s=Va(o.get("x"),n.getWidth()),l=Va(o.get("y"),n.getHeight());if(isNaN(s)||isNaN(l)){if(e.getMarkerPosition)a=e.getMarkerPosition(t.getValues(t.dimensions,r));else if(i){var h=t.get(i.dimensions[0],r),u=t.get(i.dimensions[1],r);a=i.dataToPoint([h,u])}}else a=[s,l];isNaN(s)||(a[0]=s),isNaN(l)||(a[1]=l),t.setItemLayout(r,a)})}function tp(t,e,n){var i;i=t?p(t&&t.dimensions,function(t){var n=e.getData().getDimensionInfo(e.getData().mapDimension(t))||{};return s({name:t},n)}):[{name:"value",type:"float"}];var r=new rw(i,n),a=p(n.get("data"),x(Yf,e));return t&&(a=m(a,x(Kf,t))),r.initData(a,null,t?$f:function(t){return t.value}),r}function ep(t){return DM(t)}function np(){if(!kM&&LM){kM=!0;var t=LM.styleSheets;t.length<31?LM.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):t[0].addRule(".zrvml","behavior:url(#default#VML)")}}function ip(t){return parseInt(t,10)}function rp(t,e){np(),this.root=t,this.storage=e;var n=document.createElement("div"),i=document.createElement("div");n.style.cssText="display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;",i.style.cssText="position:absolute;left:0;top:0;",t.appendChild(n),this._vmlRoot=i,this._vmlViewport=n,this.resize();var r=e.delFromStorage,a=e.addToStorage;e.delFromStorage=function(t){r.call(e,t),t&&t.onRemove&&t.onRemove(i)},e.addToStorage=function(t){t.onAdd&&t.onAdd(i),a.call(e,t)},this._firstPaint=!0}function ap(t){return function(){Ng('In IE8.0 VML mode painter not support method "'+t+'"')}}function op(t){return document.createElementNS(wI,t)}function sp(t){return II(1e4*t)/1e4}function lp(t){return LI>t&&t>-LI}function hp(t,e){var n=e?t.textFill:t.fill;return null!=n&&n!==MI}function up(t,e){var n=e?t.textStroke:t.stroke;return null!=n&&n!==MI}function cp(t,e){e&&dp(t,"transform","matrix("+SI.call(e,",")+")")}function dp(t,e,n){(!n||"linear"!==n.type&&"radial"!==n.type)&&("string"==typeof n&&n.indexOf("NaN")>-1&&console.log(n),t.setAttribute(e,n))}function fp(t,e,n){t.setAttributeNS("http://www.w3.org/1999/xlink",e,n)}function pp(t,e,n){if(hp(e,n)){var i=n?e.textFill:e.fill;i="transparent"===i?MI:i,"none"!==t.getAttribute("clip-path")&&i===MI&&(i="rgba(0, 0, 0, 0.002)"),dp(t,"fill",i),dp(t,"fill-opacity",e.opacity)}else dp(t,"fill",MI);if(up(e,n)){var r=n?e.textStroke:e.stroke;r="transparent"===r?MI:r,dp(t,"stroke",r);var a=n?e.textStrokeWidth:e.lineWidth,o=!n&&e.strokeNoScale?e.host.getLineScale():1;dp(t,"stroke-width",a/o),dp(t,"paint-order",n?"stroke":"fill"),dp(t,"stroke-opacity",e.opacity);var s=e.lineDash;s?(dp(t,"stroke-dasharray",e.lineDash.join(",")),dp(t,"stroke-dashoffset",II(e.lineDashOffset||0))):dp(t,"stroke-dasharray",""),e.lineCap&&dp(t,"stroke-linecap",e.lineCap),e.lineJoin&&dp(t,"stroke-linejoin",e.lineJoin),e.miterLimit&&dp(t,"stroke-miterlimit",e.miterLimit)}else dp(t,"stroke",MI)}function gp(t){for(var e=[],n=t.data,i=t.len(),r=0;i>r;){var a=n[r++],o="",s=0;switch(a){case bI.M:o="M",s=2;break;case bI.L:o="L",s=2;break;case bI.Q:o="Q",s=4;break;case bI.C:o="C",s=6;break;case bI.A:var l=n[r++],h=n[r++],u=n[r++],c=n[r++],d=n[r++],f=n[r++],p=n[r++],g=n[r++],m=Math.abs(f),v=lp(m-AI)&&!lp(m),y=!1;y=m>=AI?!0:lp(m)?!1:(f>-CI&&0>f||f>CI)==!!g;var x=sp(l+u*DI(d)),_=sp(h+c*TI(d));v&&(f=g?AI-1e-4:-AI+1e-4,y=!0,9===r&&e.push("M",x,_));var w=sp(l+u*DI(d+f)),b=sp(h+c*TI(d+f));e.push("A",sp(u),sp(c),II(p*kI),+y,+g,w,b);break;case bI.Z:o="Z";break;case bI.R:var w=sp(n[r++]),b=sp(n[r++]),S=sp(n[r++]),M=sp(n[r++]);e.push("M",w,b,"L",w+S,b,"L",w+S,b+M,"L",w,b+M,"L",w,b)}o&&e.push(o);for(var I=0;s>I;I++)e.push(sp(n[r++]))}return e.join(" ")}function mp(t){return"middle"===t?"middle":"bottom"===t?"baseline":"hanging"}function vp(){}function yp(t,e){for(var n=0,i=e.length,r=0,a=0;i>n;n++){var o=e[n];if(o.removed){for(var s=[],l=a;lr;r++)n[t][r].h!=e&&i.push(n[t][r]);n[t]=i}n[t]&&0===n[t].length&&delete n[t]}else delete n[t];return this},trigger:function(t){if(this._$handlers[t]){var e=arguments,n=e.length;n>3&&(e=rg.call(e,1));for(var i=this._$handlers[t],r=i.length,a=0;r>a;){switch(n){case 1:i[a].h.call(i[a].ctx);break;case 2:i[a].h.call(i[a].ctx,e[1]);break;case 3:i[a].h.call(i[a].ctx,e[1],e[2]);break;default:i[a].h.apply(i[a].ctx,e)}i[a].one?(i.splice(a,1),r--):a++}}return this},triggerWithContext:function(t){if(this._$handlers[t]){var e=arguments,n=e.length;n>4&&(e=rg.call(e,1,e.length-1));for(var i=e[e.length-1],r=this._$handlers[t],a=r.length,o=0;a>o;){switch(n){case 1:r[o].h.call(i);break;case 2:r[o].h.call(i,e[1]);break;case 3:r[o].h.call(i,e[1],e[2]);break;default:r[o].h.apply(i,e)}r[o].one?(r.splice(o,1),a--):o++}}return this}};var og="silent";ce.prototype.dispose=function(){};var sg=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],lg=function(t,e,n,i){ag.call(this),this.storage=t,this.painter=e,this.painterRoot=i,n=n||new ce,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,le.call(this),this.setHandlerProxy(n)};lg.prototype={constructor:lg,setHandlerProxy:function(t){this.proxy&&this.proxy.dispose(),t&&(f(sg,function(e){t.on&&t.on(e,this[e],this)},this),t.handler=this),this.proxy=t},mousemove:function(t){var e=t.zrX,n=t.zrY,i=this._hovered,r=i.target;r&&!r.__zr&&(i=this.findHover(i.x,i.y),r=i.target);var a=this._hovered=this.findHover(e,n),o=a.target,s=this.proxy;s.setCursor&&s.setCursor(o?o.cursor:"default"),r&&o!==r&&this.dispatchToElement(i,"mouseout",t),this.dispatchToElement(a,"mousemove",t),o&&o!==r&&this.dispatchToElement(a,"mouseover",t)},mouseout:function(t){this.dispatchToElement(this._hovered,"mouseout",t);var e,n=t.toElement||t.relatedTarget;do n=n&&n.parentNode;while(n&&9!=n.nodeType&&!(e=n===this.painterRoot));!e&&this.trigger("globalout",{event:t})},resize:function(){this._hovered={}},dispatch:function(t,e){var n=this[t];n&&n.call(this,e)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},dispatchToElement:function(t,e,n){t=t||{};var i=t.target;if(!i||!i.silent){for(var r="on"+e,a=ue(e,t,n);i&&(i[r]&&(a.cancelBubble=i[r].call(i,a)),i.trigger(e,a),i=i.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(e,a),this.painter&&this.painter.eachOtherLayer(function(t){"function"==typeof t[r]&&t[r].call(t,a),t.trigger&&t.trigger(e,a)}))}},findHover:function(t,e,n){for(var i=this.storage.getDisplayList(),r={x:t,y:e},a=i.length-1;a>=0;a--){var o;if(i[a]!==n&&!i[a].ignore&&(o=de(i[a],t,e))&&(!r.topTarget&&(r.topTarget=i[a]),o!==og)){r.target=i[a]; +break}}return r}},f(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){lg.prototype[t]=function(e){var n=this.findHover(e.zrX,e.zrY),i=n.target;if("mousedown"===t)this._downEl=i,this._downPoint=[e.zrX,e.zrY],this._upEl=i;else if("mouseup"===t)this._upEl=i;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||eg(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,t,e)}}),c(lg,ag),c(lg,le);var hg="undefined"==typeof Float32Array?Array:Float32Array,ug=(Object.freeze||Object)({create:fe,identity:pe,copy:ge,mul:me,translate:ve,rotate:ye,scale:xe,invert:_e,clone:we}),cg=pe,dg=5e-5,fg=function(t){t=t||{},t.position||(this.position=[0,0]),null==t.rotation&&(this.rotation=0),t.scale||(this.scale=[1,1]),this.origin=this.origin||null},pg=fg.prototype;pg.transform=null,pg.needLocalTransform=function(){return be(this.rotation)||be(this.position[0])||be(this.position[1])||be(this.scale[0]-1)||be(this.scale[1]-1)},pg.updateTransform=function(){var t=this.parent,e=t&&t.transform,n=this.needLocalTransform(),i=this.transform;return n||e?(i=i||fe(),n?this.getLocalTransform(i):cg(i),e&&(n?me(i,t.transform,i):ge(i,t.transform)),this.transform=i,this.invTransform=this.invTransform||fe(),void _e(this.invTransform,i)):void(i&&cg(i))},pg.getLocalTransform=function(t){return fg.getLocalTransform(this,t)},pg.setTransform=function(t){var e=this.transform,n=t.dpr||1;e?t.setTransform(n*e[0],n*e[1],n*e[2],n*e[3],n*e[4],n*e[5]):t.setTransform(n,0,0,n,0,0)},pg.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var gg=[];pg.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(me(gg,t.invTransform,e),e=gg);var n=e[0]*e[0]+e[1]*e[1],i=e[2]*e[2]+e[3]*e[3],r=this.position,a=this.scale;be(n-1)&&(n=Math.sqrt(n)),be(i-1)&&(i=Math.sqrt(i)),e[0]<0&&(n=-n),e[3]<0&&(i=-i),r[0]=e[4],r[1]=e[5],a[0]=n,a[1]=i,this.rotation=Math.atan2(-e[1]/i,e[0]/n)}},pg.getGlobalScale=function(){var t=this.transform;if(!t)return[1,1];var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]),n=Math.sqrt(t[2]*t[2]+t[3]*t[3]);return t[0]<0&&(e=-e),t[3]<0&&(n=-n),[e,n]},pg.transformCoordToLocal=function(t,e){var n=[t,e],i=this.invTransform;return i&&ae(n,n,i),n},pg.transformCoordToGlobal=function(t,e){var n=[t,e],i=this.transform;return i&&ae(n,n,i),n},fg.getLocalTransform=function(t,e){e=e||[],cg(e);var n=t.origin,i=t.scale||[1,1],r=t.rotation||0,a=t.position||[0,0];return n&&(e[4]-=n[0],e[5]-=n[1]),xe(e,e,i),r&&ye(e,e,r),n&&(e[4]+=n[0],e[5]+=n[1]),e[4]+=a[0],e[5]+=a[1],e};var mg={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(-Math.pow(2,-10*(t-1))+2)},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,n=.1,i=.4;return 0===t?0:1===t?1:(!n||1>n?(n=1,e=i/4):e=i*Math.asin(1/n)/(2*Math.PI),-(n*Math.pow(2,10*(t-=1))*Math.sin(2*(t-e)*Math.PI/i)))},elasticOut:function(t){var e,n=.1,i=.4;return 0===t?0:1===t?1:(!n||1>n?(n=1,e=i/4):e=i*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*t)*Math.sin(2*(t-e)*Math.PI/i)+1)},elasticInOut:function(t){var e,n=.1,i=.4;return 0===t?0:1===t?1:(!n||1>n?(n=1,e=i/4):e=i*Math.asin(1/n)/(2*Math.PI),(t*=2)<1?-.5*n*Math.pow(2,10*(t-=1))*Math.sin(2*(t-e)*Math.PI/i):n*Math.pow(2,-10*(t-=1))*Math.sin(2*(t-e)*Math.PI/i)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?.5*t*t*((e+1)*t-e):.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-mg.bounceOut(1-t)},bounceOut:function(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return.5>t?.5*mg.bounceIn(2*t):.5*mg.bounceOut(2*t-1)+.5}};Se.prototype={constructor:Se,step:function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),this._paused)return void(this._pausedTime+=e);var n=(t-this._startTime-this._pausedTime)/this._life;if(!(0>n)){n=Math.min(n,1);var i=this.easing,r="string"==typeof i?mg[i]:i,a="function"==typeof r?r(n):n;return this.fire("frame",a),1==n?this.loop?(this.restart(t),"restart"):(this._needsRemove=!0,"destroy"):null}},restart:function(t){var e=(t-this._startTime-this._pausedTime)%this._life;this._startTime=t-e+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(t,e){t="on"+t,this[t]&&this[t](this._target,e)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var vg=function(){this.head=null,this.tail=null,this._len=0},yg=vg.prototype;yg.insert=function(t){var e=new xg(t);return this.insertEntry(e),e},yg.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++},yg.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--},yg.len=function(){return this._len},yg.clear=function(){this.head=this.tail=null,this._len=0};var xg=function(t){this.value=t,this.next,this.prev},_g=function(t){this._list=new vg,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null},wg=_g.prototype;wg.put=function(t,e){var n=this._list,i=this._map,r=null;if(null==i[t]){var a=n.len(),o=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var s=n.head;n.remove(s),delete i[s.key],r=s.value,this._lastRemovedEntry=s}o?o.value=e:o=new xg(e),o.key=t,n.insertEntry(o),i[t]=o}return r},wg.get=function(t){var e=this._map[t],n=this._list;return null!=e?(e!==n.tail&&(n.remove(e),n.insertEntry(e)),e.value):void 0},wg.clear=function(){this._list.clear(),this._map={}};var bg={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]},Sg=new _g(20),Mg=null,Ig=Fe,Tg=Ve,Dg=(Object.freeze||Object)({parse:Ne,lift:ze,toHex:Be,fastLerp:Fe,fastMapToColor:Ig,lerp:Ve,mapToColor:Tg,modifyHSL:Ge,modifyAlpha:He,stringify:We}),Cg=Array.prototype.slice,Ag=function(t,e,n,i){this._tracks={},this._target=t,this._loop=e||!1,this._getter=n||Ue,this._setter=i||Xe,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};Ag.prototype={when:function(t,e){var n=this._tracks;for(var i in e)if(e.hasOwnProperty(i)){if(!n[i]){n[i]=[];var r=this._getter(this._target,i);if(null==r)continue;0!==t&&n[i].push({time:0,value:Qe(r)})}n[i].push({time:t,value:e[i]})}return this},during:function(t){return this._onframeList.push(t),this},pause:function(){for(var t=0;tn;n++)t[n].call(this)},start:function(t,e){var n,i=this,r=0,a=function(){r--,r||i._doneCallback()};for(var o in this._tracks)if(this._tracks.hasOwnProperty(o)){var s=nn(this,t,a,this._tracks[o],o,e);s&&(this._clipList.push(s),r++,this.animation&&this.animation.addClip(s),n=s)}if(n){var l=n.onframe;n.onframe=function(t,e){l(t,e);for(var n=0;n1&&(Og=function(){for(var t in arguments)console.log(arguments[t])});var Ng=Og,Eg=function(){this.animators=[]};Eg.prototype={constructor:Eg,animate:function(t,e){var n,i=!1,r=this,a=this.__zr;if(t){var o=t.split("."),s=r;i="shape"===o[0];for(var l=0,u=o.length;u>l;l++)s&&(s=s[o[l]]);s&&(n=s)}else n=r;if(!n)return void Ng('Property "'+t+'" is not existed in element '+r.id);var c=r.animators,d=new Ag(n,e);return d.during(function(){r.dirty(i)}).done(function(){c.splice(h(c,d),1)}),c.push(d),a&&a.animation.addAnimator(d),d},stopAnimation:function(t){for(var e=this.animators,n=e.length,i=0;n>i;i++)e[i].stop(t);return e.length=0,this},animateTo:function(t,e,n,i,r,a){function o(){l--,l||r&&r()}b(n)?(r=i,i=n,n=0):w(i)?(r=i,i="linear",n=0):w(n)?(r=n,n=0):w(e)?(r=e,e=500):e||(e=500),this.stopAnimation(),this._animateToShallow("",this,t,e,n);var s=this.animators.slice(),l=s.length;l||r&&r();for(var h=0;h0&&this.animate(t,!1).when(null==i?500:i,a).delay(r||0),this}};var Rg=function(t){fg.call(this,t),ag.call(this,t),Eg.call(this,t),this.id=t.id||Ep()};Rg.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,isGroup:!1,drift:function(t,e){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var n=this.transform;n||(n=this.transform=[1,0,0,1,0,0]),n[4]+=t,n[5]+=e,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(){},attrKV:function(t,e){if("position"===t||"scale"===t||"origin"===t){if(e){var n=this[t];n||(n=this[t]=[]),n[0]=e[0],n[1]=e[1]}}else this[t]=e},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(S(t))for(var n in t)t.hasOwnProperty(n)&&this.attrKV(n,t[n]);return this.dirty(!1),this},setClipPath:function(t){var e=this.__zr;e&&t.addSelfToZr(e),this.clipPath&&this.clipPath!==t&&this.removeClipPath(),this.clipPath=t,t.__zr=e,t.__clipTarget=this,this.dirty(!1)},removeClipPath:function(){var t=this.clipPath;t&&(t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(t){this.__zr=t;var e=this.animators;if(e)for(var n=0;ni||n>s||l>a||r>h)},contain:function(t,e){var n=this;return t>=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},clone:function(){return new rn(this.x,this.y,this.width,this.height)},copy:function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},rn.create=function(t){return new rn(t.x,t.y,t.width,t.height)};var Vg=function(t){t=t||{},Rg.call(this,t);for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};Vg.prototype={constructor:Vg,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){for(var e=this._children,n=0;n=0&&(n.splice(i,0,t),this._doAdd(t))}return this},_doAdd:function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__storage,n=this.__zr;e&&e!==t.__storage&&(e.addToStorage(t),t instanceof Vg&&t.addChildrenToStorage(e)),n&&n.refresh()},remove:function(t){var e=this.__zr,n=this.__storage,i=this._children,r=h(i,t);return 0>r?this:(i.splice(r,1),t.parent=null,n&&(n.delFromStorage(t),t instanceof Vg&&t.delChildrenFromStorage(n)),e&&e.refresh(),this)},removeAll:function(){var t,e,n=this._children,i=this.__storage;for(e=0;ei;i++)this._updateAndAddDisplayable(e[i],null,t);n.length=this._displayListLen,zp.canvasSupported&&dn(n,fn)},_updateAndAddDisplayable:function(t,e,n){if(!t.ignore||n){t.beforeUpdate(),t.__dirty&&t.update(),t.afterUpdate();var i=t.clipPath;if(i){e=e?e.slice():[];for(var r=i,a=t;r;)r.parent=a,r.updateTransform(),e.push(r),a=r,r=r.clipPath}if(t.isGroup){for(var o=t._children,s=0;se;e++)this.delRoot(t[e]);else{var r=h(this._roots,t);r>=0&&(this.delFromStorage(t),this._roots.splice(r,1),t instanceof Vg&&t.delChildrenFromStorage(this))}},addToStorage:function(t){return t&&(t.__storage=this,t.dirty(!1)),this},delFromStorage:function(t){return t&&(t.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:fn};var Ug={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1},Xg=function(t,e,n){return Ug.hasOwnProperty(e)?n*=t.dpr:n},jg=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],Yg=function(t,e){this.extendFrom(t,!1),this.host=e};Yg.prototype={constructor:Yg,host:null,fill:"#000",stroke:null,opacity:1,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,font:null,textFont:null,fontStyle:null,fontWeight:null,fontSize:null,fontFamily:null,textTag:null,textFill:"#000",textStroke:null,textWidth:null,textHeight:null,textStrokeWidth:0,textLineHeight:null,textPosition:"inside",textRect:null,textOffset:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowColor:"transparent",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,textBoxShadowColor:"transparent",textBoxShadowBlur:0,textBoxShadowOffsetX:0,textBoxShadowOffsetY:0,transformText:!1,textRotation:0,textOrigin:null,textBackgroundColor:null,textBorderColor:null,textBorderWidth:0,textBorderRadius:0,textPadding:null,rich:null,truncate:null,blend:null,bind:function(t,e,n){for(var i=this,r=n&&n.style,a=!r,o=0;o0},extendFrom:function(t,e){if(t)for(var n in t)!t.hasOwnProperty(n)||e!==!0&&(e===!1?this.hasOwnProperty(n):null==t[n])||(this[n]=t[n])},set:function(t,e){"string"==typeof t?this[t]=e:this.extendFrom(t,!0)},clone:function(){var t=new this.constructor;return t.extendFrom(this,!0),t},getGradient:function(t,e,n){for(var i="radial"===e.type?gn:pn,r=i(t,e,n),a=e.colorStops,o=0;o=0&&n.splice(i,1),t.__hoverMir=null},clearHover:function(){for(var t=this._hoverElements,e=0;er;){var a=t[r],o=a.__from;o&&o.__zr?(r++,o.invisible||(a.transform=o.transform,a.invTransform=o.invTransform,a.__clipPaths=o.__clipPaths,this._doPaintEl(a,n,!0,i))):(t.splice(r,1),o.__hoverMir=null,e--)}n.ctx.restore()}},getHoverLayer:function(){return this.getLayer(cm)},_paintList:function(t,e,n){if(this._redrawId===n){e=e||!1,this._updateLayerStatus(t);var i=this._doPaintList(t,e);if(this._needsManuallyCompositing&&this._compositeManually(),!i){var r=this;Qg(function(){r._paintList(t,e,n)})}}},_compositeManually:function(){var t=this.getLayer(dm).ctx,e=this._domRoot.width,n=this._domRoot.height;t.clearRect(0,0,e,n),this.eachBuiltinLayer(function(i){i.virtual&&t.drawImage(i.dom,0,0,e,n)})},_doPaintList:function(t,e){for(var n=[],i=0;i15)break}}a.__drawIndex=m,a.__drawIndex0&&t>i[0]){for(o=0;r-1>o&&!(i[o]t);o++);a=n[i[o]]}if(i.splice(o+1,0,t),n[t]=e,!e.virtual)if(a){var l=a.dom;l.nextSibling?s.insertBefore(e.dom,l.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom)},eachLayer:function(t,e){var n,i,r=this._zlevelList;for(i=0;i0?fm:0),this._needsManuallyCompositing),o.__builtin__||Ng("ZLevel "+s+" has been used by unkown layer "+o.id),o!==r&&(o.__used=!0,o.__startIndex!==n&&(o.__dirty=!0),o.__startIndex=n,o.__drawIndex=o.incremental?-1:n,e(n),r=o),i.__dirty&&(o.__dirty=!0,o.incremental&&o.__drawIndex<0&&(o.__drawIndex=n))}e(n),this.eachBuiltinLayer(function(t){!t.__used&&t.getElementCount()>0&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)})},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(t){t.clear()},setBackgroundColor:function(t){this._backgroundColor=t},configLayer:function(t,e){if(e){var n=this._layerConfig;n[t]?r(n[t],e,!0):n[t]=e;for(var i=0;i=0&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),n=0;no;o++){var s=n[o],l=s.step(t,e);l&&(r.push(l),a.push(s))}for(var o=0;i>o;)n[o]._needsRemove?(n[o]=n[i-1],n.pop(),i--):o++;i=r.length;for(var o=0;i>o;o++)a[o].fire(r[o]);this._time=t,this.onframe(e),this.trigger("frame",e),this.stage.update&&this.stage.update()},_startLoop:function(){function t(){e._running&&(Qg(t),!e._paused&&e._update())}var e=this;this._running=!0,Qg(t)},start:function(){this._time=(new Date).getTime(),this._pausedTime=0,this._startLoop()},stop:function(){this._running=!1},pause:function(){this._paused||(this._pauseStart=(new Date).getTime(),this._paused=!0)},resume:function(){this._paused&&(this._pausedTime+=(new Date).getTime()-this._pauseStart,this._paused=!1)},clear:function(){this._clips=[]},isFinished:function(){return!this._clips.length},animate:function(t,e){e=e||{};var n=new Ag(t,e.loop,e.getter,e.setter);return this.addAnimator(n),n}},c(wm,ag);var bm=function(){this._track=[]};bm.prototype={constructor:bm,recognize:function(t,e,n){return this._doTrack(t,e,n),this._recognize(t)},clear:function(){return this._track.length=0,this},_doTrack:function(t,e,n){var i=t.touches;if(i){for(var r={points:[],touches:[],target:e,event:t},a=0,o=i.length;o>a;a++){var s=i[a],l=pi(n,s,{});r.points.push([l.zrX,l.zrY]),r.touches.push(s)}this._track.push(r)}},_recognize:function(t){for(var e in Sm)if(Sm.hasOwnProperty(e)){var n=Sm[e](this._track,t);if(n)return n}}};var Sm={pinch:function(t,e){var n=t.length;if(n){var i=(t[n-1]||{}).points,r=(t[n-2]||{}).points||i;if(r&&r.length>1&&i&&i.length>1){var a=_i(i)/_i(r);!isFinite(a)&&(a=1),e.pinchScale=a;var o=wi(i);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:t[0].target,event:e}}}}},Mm=300,Im=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Tm=["touchstart","touchend","touchmove"],Dm={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},Cm=p(Im,function(t){var e=t.replace("mouse","pointer");return Dm[e]?e:t}),Am={mousemove:function(t){t=mi(this.dom,t),this.trigger("mousemove",t)},mouseout:function(t){t=mi(this.dom,t);var e=t.toElement||t.relatedTarget;if(e!=this.dom)for(;e&&9!=e.nodeType;){if(e===this.dom)return;e=e.parentNode}this.trigger("mouseout",t)},touchstart:function(t){t=mi(this.dom,t),t.zrByTouch=!0,this._lastTouchMoment=new Date,Si(this,t,"start"),Am.mousemove.call(this,t),Am.mousedown.call(this,t),Mi(this)},touchmove:function(t){t=mi(this.dom,t),t.zrByTouch=!0,Si(this,t,"change"),Am.mousemove.call(this,t),Mi(this)},touchend:function(t){t=mi(this.dom,t),t.zrByTouch=!0,Si(this,t,"end"),Am.mouseup.call(this,t),+new Date-this._lastTouchMoment=0||i&&h(i,o)<0)){var s=e.getShallow(o);null!=s&&(r[t[a][0]]=s)}}return r}},Ym=jm([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),Zm={getLineStyle:function(t){var e=Ym(this,t),n=this.getLineDash(e.lineWidth);return n&&(e.lineDash=n),e},getLineDash:function(t){null==t&&(t=1);var e=this.get("type"),n=Math.max(t,2),i=4*t;return"solid"===e||null==e?null:"dashed"===e?[i,i]:[n,n]}},qm=jm([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),Km={getAreaStyle:function(t,e){return qm(this,t,e)}},$m=Math.pow,Jm=Math.sqrt,Qm=1e-8,tv=1e-4,ev=Jm(3),nv=1/3,iv=G(),rv=G(),av=G(),ov=Math.min,sv=Math.max,lv=Math.sin,hv=Math.cos,uv=2*Math.PI,cv=G(),dv=G(),fv=G(),pv=[],gv=[],mv={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},vv=[],yv=[],xv=[],_v=[],wv=Math.min,bv=Math.max,Sv=Math.cos,Mv=Math.sin,Iv=Math.sqrt,Tv=Math.abs,Dv="undefined"!=typeof Float32Array,Cv=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};Cv.prototype={constructor:Cv,_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=Tv(1/Pg/t)||0,this._uy=Tv(1/Pg/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(mv.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},lineTo:function(t,e){var n=Tv(t-this._xi)>this._ux||Tv(e-this._yi)>this._uy||this._len<5;return this.addData(mv.L,t,e),this._ctx&&n&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),n&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,n,i,r,a){return this.addData(mv.C,t,e,n,i,r,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,n,i,r,a):this._ctx.bezierCurveTo(t,e,n,i,r,a)),this._xi=r,this._yi=a,this},quadraticCurveTo:function(t,e,n,i){return this.addData(mv.Q,t,e,n,i),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,n,i):this._ctx.quadraticCurveTo(t,e,n,i)),this._xi=n,this._yi=i,this},arc:function(t,e,n,i,r,a){return this.addData(mv.A,t,e,n,n,i,r-i,0,a?0:1),this._ctx&&this._ctx.arc(t,e,n,i,r,a),this._xi=Sv(r)*n+t,this._yi=Mv(r)*n+t,this},arcTo:function(t,e,n,i,r){return this._ctx&&this._ctx.arcTo(t,e,n,i,r),this},rect:function(t,e,n,i){return this._ctx&&this._ctx.rect(t,e,n,i),this.addData(mv.R,t,e,n,i),this},closePath:function(){this.addData(mv.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,n),t.closePath()),this._xi=e,this._yi=n,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t,this._dashIdx=0;for(var e=0,n=0;nn;n++)this.data[n]=t[n];this._len=e},appendPath:function(t){t instanceof Array||(t=[t]);for(var e=t.length,n=0,i=this._len,r=0;e>r;r++)n+=t[r].len();Dv&&this.data instanceof Float32Array&&(this.data=new Float32Array(i+n));for(var r=0;e>r;r++)for(var a=t[r].data,o=0;oe.length&&(this._expandData(),e=this.data);for(var n=0;na&&(a=r+a),a%=r,f-=a*u,p-=a*c;u>0&&t>=f||0>u&&f>=t||0==u&&(c>0&&e>=p||0>c&&p>=e);)i=this._dashIdx,n=o[i],f+=u*n,p+=c*n,this._dashIdx=(i+1)%g,u>0&&l>f||0>u&&f>l||c>0&&h>p||0>c&&p>h||s[i%2?"moveTo":"lineTo"](u>=0?wv(f,t):bv(f,t),c>=0?wv(p,e):bv(p,e));u=f-t,c=p-e,this._dashOffset=-Iv(u*u+c*c)},_dashedBezierTo:function(t,e,n,i,r,a){var o,s,l,h,u,c=this._dashSum,d=this._dashOffset,f=this._lineDash,p=this._ctx,g=this._xi,m=this._yi,v=nr,y=0,x=this._dashIdx,_=f.length,w=0;for(0>d&&(d=c+d),d%=c,o=0;1>o;o+=.1)s=v(g,t,n,r,o+.1)-v(g,t,n,r,o),l=v(m,e,i,a,o+.1)-v(m,e,i,a,o),y+=Iv(s*s+l*l);for(;_>x&&(w+=f[x],!(w>d));x++);for(o=(w-d)/y;1>=o;)h=v(g,t,n,r,o),u=v(m,e,i,a,o),x%2?p.moveTo(h,u):p.lineTo(h,u),o+=f[x]/y,x=(x+1)%_;x%2!==0&&p.lineTo(r,a),s=r-h,l=a-u,this._dashOffset=-Iv(s*s+l*l)},_dashedQuadraticTo:function(t,e,n,i){var r=n,a=i;n=(n+2*t)/3,i=(i+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,n,i,r,a)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,Dv&&(this.data=new Float32Array(t)))},getBoundingRect:function(){vv[0]=vv[1]=xv[0]=xv[1]=Number.MAX_VALUE,yv[0]=yv[1]=_v[0]=_v[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,n=0,i=0,r=0,a=0;ac;){var d=s[c++];switch(1==c&&(i=s[c],r=s[c+1],e=i,n=r),d){case mv.M:e=i=s[c++],n=r=s[c++],t.moveTo(i,r);break;case mv.L:a=s[c++],o=s[c++],(Tv(a-i)>l||Tv(o-r)>h||c===u-1)&&(t.lineTo(a,o),i=a,r=o);break;case mv.C:t.bezierCurveTo(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),i=s[c-2],r=s[c-1];break;case mv.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),i=s[c-2],r=s[c-1];break;case mv.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=Math.abs(g-m)>.001,I=v+y;M?(t.translate(f,p),t.rotate(x),t.scale(b,S),t.arc(0,0,w,v,I,1-_),t.scale(1/b,1/S),t.rotate(-x),t.translate(-f,-p)):t.arc(f,p,w,v,I,1-_),1==c&&(e=Sv(v)*g+f,n=Mv(v)*m+p),i=Sv(I)*g+f,r=Mv(I)*m+p;break;case mv.R:e=i=s[c],n=r=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case mv.Z:t.closePath(),i=e,r=n}}}},Cv.CMD=mv;var Av=2*Math.PI,kv=2*Math.PI,Lv=Cv.CMD,Pv=2*Math.PI,Ov=1e-4,Nv=[-1,-1,-1],Ev=[-1,-1],Rv=$g.prototype.getCanvasPattern,zv=Math.abs,Bv=new Cv(!0);Or.prototype={constructor:Or,type:"path",__dirtyPath:!0,strokeContainThreshold:5,brush:function(t,e){var n=this.style,i=this.path||Bv,r=n.hasStroke(),a=n.hasFill(),o=n.fill,s=n.stroke,l=a&&!!o.colorStops,h=r&&!!s.colorStops,u=a&&!!o.image,c=r&&!!s.image;if(n.bind(t,this,e),this.setTransform(t),this.__dirty){var d;l&&(d=d||this.getBoundingRect(),this._fillGradient=n.getGradient(t,o,d)),h&&(d=d||this.getBoundingRect(),this._strokeGradient=n.getGradient(t,s,d))}l?t.fillStyle=this._fillGradient:u&&(t.fillStyle=Rv.call(o,t)),h?t.strokeStyle=this._strokeGradient:c&&(t.strokeStyle=Rv.call(s,t));var f=n.lineDash,p=n.lineDashOffset,g=!!t.setLineDash,m=this.getGlobalScale();i.setScale(m[0],m[1]),this.__dirtyPath||f&&!g&&r?(i.beginPath(t),f&&!g&&(i.setLineDash(f),i.setLineDashOffset(p)),this.buildPath(i,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(t.beginPath(),this.path.rebuildPath(t)),a&&i.fill(t),f&&g&&(t.setLineDash(f),t.lineDashOffset=p),r&&i.stroke(t),f&&g&&t.setLineDash([]),null!=n.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))},buildPath:function(){},createPathProxy:function(){this.path=new Cv},getBoundingRect:function(){var t=this._rect,e=this.style,n=!t;if(n){var i=this.path;i||(i=this.path=new Cv),this.__dirtyPath&&(i.beginPath(),this.buildPath(i,this.shape,!1)),t=i.getBoundingRect()}if(this._rect=t,e.hasStroke()){var r=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||n){r.copy(t);var a=e.lineWidth,o=e.strokeNoScale?this.getLineScale():1;e.hasFill()||(a=Math.max(a,this.strokeContainThreshold||4)),o>1e-10&&(r.width+=a/o,r.height+=a/o,r.x-=a/o/2,r.y-=a/o/2)}return r}return t},contain:function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect(),r=this.style;if(t=n[0],e=n[1],i.contain(t,e)){var a=this.path.data;if(r.hasStroke()){var o=r.lineWidth,s=r.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(r.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),Pr(a,o/s,t,e)))return!0}if(r.hasFill())return Lr(a,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(t){return this.animate("shape",t)},attrKV:function(t,e){"shape"===t?(this.setShape(e),this.__dirtyPath=!0,this._rect=null):ai.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var n=this.shape;if(n){if(S(t))for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);else n[t]=e;this.dirty(!0)}return this},getLineScale:function(){var t=this.transform;return t&&zv(t[0]-1)>1e-10&&zv(t[3]-1)>1e-10?Math.sqrt(zv(t[0]*t[3]-t[2]*t[1])):1}},Or.extend=function(t){var e=function(e){Or.call(this,e),t.style&&this.style.extendFrom(t.style,!1);var n=t.shape;if(n){this.shape=this.shape||{};var i=this.shape;for(var r in n)!i.hasOwnProperty(r)&&n.hasOwnProperty(r)&&(i[r]=n[r])}t.init&&t.init.call(this,e)};u(e,Or);for(var n in t)"style"!==n&&"shape"!==n&&(e.prototype[n]=t[n]);return e},u(Or,ai);var Fv=Cv.CMD,Vv=[[],[],[]],Gv=Math.sqrt,Hv=Math.atan2,Wv=function(t,e){var n,i,r,a,o,s,l=t.data,h=Fv.M,u=Fv.C,c=Fv.L,d=Fv.R,f=Fv.A,p=Fv.Q;for(r=0,a=0;ro;o++){var s=Vv[o];s[0]=l[r++],s[1]=l[r++],ae(s,s,e),l[a++]=s[0],l[a++]=s[1]}}},Uv=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"],Xv=Math.sqrt,jv=Math.sin,Yv=Math.cos,Zv=Math.PI,qv=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])},Kv=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(qv(t)*qv(e))},$v=function(t,e){return(t[0]*e[1]=11?function(){var e,n=this.__clipPaths,i=this.style;if(n)for(var r=0;ra;a++)r+=ee(t[a-1],t[a]);var o=r/2;o=n>o?n:o;for(var a=0;o>a;a++){var s,l,h,u=a/(o-1)*(e?n:n-1),c=Math.floor(u),d=u-c,f=t[c%n];e?(s=t[(c-1+n)%n],l=t[(c+1)%n],h=t[(c+2)%n]):(s=t[0===c?c:c-1],l=t[c>n-2?n-1:c+1],h=t[c>n-3?n-1:c+2]);var p=d*d,g=d*p;i.push([Vr(s[0],f[0],l[0],h[0],d,p,g),Vr(s[1],f[1],l[1],h[1],d,p,g)])}return i},ay=function(t,e,n,i){var r,a,o,s,l=[],h=[],u=[],c=[];if(i){o=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,f=t.length;f>d;d++)oe(o,o,t[d]),se(s,s,t[d]);oe(o,o,i[0]),se(s,s,i[1])}for(var d=0,f=t.length;f>d;d++){var p=t[d];if(n)r=t[d?d-1:f-1],a=t[(d+1)%f];else{if(0===d||d===f-1){l.push(W(t[d]));continue}r=t[d-1],a=t[d+1]}Y(h,a,r),Q(h,h,e);var g=ee(p,r),m=ee(p,a),v=g+m;0!==v&&(g/=v,m/=v),Q(u,h,-g),Q(c,h,m);var y=X([],p,u),x=X([],p,c);i&&(se(y,y,o),oe(y,y,s),se(x,x,o),oe(x,x,s)),l.push(y),l.push(x)}return n&&l.push(l.shift()),l},oy=Or.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,e){Gr(t,e,!0)}}),sy=Or.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){Gr(t,e,!1)}}),ly=Or.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.x,i=e.y,r=e.width,a=e.height;e.r?Vn(t,e):t.rect(n,i,r,a),t.closePath()}}),hy=Or.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var n=e.x1,i=e.y1,r=e.x2,a=e.y2,o=e.percent;0!==o&&(t.moveTo(n,i),1>o&&(r=n*(1-o)+r*o,a=i*(1-o)+a*o),t.lineTo(r,a))},pointAt:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}}),uy=[],cy=Or.extend({type:"bezier-curve",shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var n=e.x1,i=e.y1,r=e.x2,a=e.y2,o=e.cpx1,s=e.cpy1,l=e.cpx2,h=e.cpy2,u=e.percent;0!==u&&(t.moveTo(n,i),null==l||null==h?(1>u&&(dr(n,o,r,u,uy),o=uy[1],r=uy[2],dr(i,s,a,u,uy),s=uy[1],a=uy[2]),t.quadraticCurveTo(o,s,r,a)):(1>u&&(or(n,o,l,r,u,uy),o=uy[1],l=uy[2],r=uy[3],or(i,s,h,a,u,uy),s=uy[1],h=uy[2],a=uy[3]),t.bezierCurveTo(o,s,l,h,r,a)))},pointAt:function(t){return Hr(this.shape,t,!1)},tangentAt:function(t){var e=Hr(this.shape,t,!0);return te(e,e)}}),dy=Or.extend({type:"arc",shape:{cx:0,cy:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},style:{stroke:"#000",fill:null},buildPath:function(t,e){var n=e.cx,i=e.cy,r=Math.max(e.r,0),a=e.startAngle,o=e.endAngle,s=e.clockwise,l=Math.cos(a),h=Math.sin(a);t.moveTo(l*r+n,h*r+i),t.arc(n,i,r,a,o,!s)}}),fy=Or.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var t=this.__dirtyPath,e=this.shape.paths,n=0;n"'])/g,zy={"&":"&","<":"<",">":">",'"':""","'":"'"},By=["a","b","c","d","e","f","g"],Fy=function(t,e){return"{"+t+(null==e?"":e)+"}"},Vy=kn,Gy=Mn,Hy=(Object.freeze||Object)({addCommas:eo,toCamelCase:no,normalizeCssArray:Ey,encodeHTML:io,formatTpl:ro,formatTplSimple:ao,getTooltipMarker:oo,formatTime:lo,capitalFirst:ho,truncateText:Vy,getTextRect:Gy}),Wy=f,Uy=["left","right","top","bottom","width","height"],Xy=[["width","left","right"],["height","top","bottom"]],jy=uo,Yy=(x(uo,"vertical"),x(uo,"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")}}}),Zy=Hi(),qy=Pa.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(t,e,n,i){Pa.call(this,t,e,n,i),this.uid=Ea("ec_cpt_model")},init:function(t,e,n){this.mergeDefaultAndTheme(t,n)},mergeDefaultAndTheme:function(t,e){var n=this.layoutMode,i=n?po(t):{},a=e.getTheme();r(t,a.get(this.mainType)),r(t,this.getDefaultOption()),n&&fo(t,i,n)},mergeOption:function(t){r(this.option,t,!0);var e=this.layoutMode;e&&fo(this.option,t,e)},optionUpdated:function(){},getDefaultOption:function(){var t=Zy(this);if(!t.defaultOption){for(var e=[],n=this.constructor;n;){var i=n.prototype.defaultOption;i&&e.push(i),n=n.superClass}for(var a={},o=e.length-1;o>=0;o--)a=r(a,e[o],!0);t.defaultOption=a}return t.defaultOption},getReferringComponents:function(t){return this.ecModel.queryComponents({mainType:t,index:this.get(t+"Index",!0),id:this.get(t+"Id",!0)})}});Qi(qy,{registerWhenExtend:!0}),Ra(qy),za(qy,mo),c(qy,Yy);var Ky="";"undefined"!=typeof navigator&&(Ky=navigator.platform||"");var $y={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:Ky.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},Jy=Hi(),Qy={clearColorPalette:function(){Jy(this).colorIdx=0,Jy(this).colorNameMap={}},getColorFromPalette:function(t,e,n){e=e||this;var i=Jy(e),r=i.colorIdx||0,a=i.colorNameMap=i.colorNameMap||{};if(a.hasOwnProperty(t))return a[t];var o=Oi(this.get("color",!0)),s=this.get("colorLayer",!0),l=null!=n&&s?vo(s,n):o;if(l=l||o,l&&l.length){var h=l[r];return t&&(a[t]=h),i.colorIdx=(r+1)%l.length,h}}},tx={cartesian2d:function(t,e,n,i){var r=t.getReferringComponents("xAxis")[0],a=t.getReferringComponents("yAxis")[0];e.coordSysDims=["x","y"],n.set("x",r),n.set("y",a),xo(r)&&(i.set("x",r),e.firstCategoryDimIndex=0),xo(a)&&(i.set("y",a),e.firstCategoryDimIndex=1)},singleAxis:function(t,e,n,i){var r=t.getReferringComponents("singleAxis")[0];e.coordSysDims=["single"],n.set("single",r),xo(r)&&(i.set("single",r),e.firstCategoryDimIndex=0)},polar:function(t,e,n,i){var r=t.getReferringComponents("polar")[0],a=r.findAxisModel("radiusAxis"),o=r.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],n.set("radius",a),n.set("angle",o),xo(a)&&(i.set("radius",a),e.firstCategoryDimIndex=0),xo(o)&&(i.set("angle",o),e.firstCategoryDimIndex=1)},geo:function(t,e){e.coordSysDims=["lng","lat"]},parallel:function(t,e,n,i){var r=t.ecModel,a=r.getComponent("parallel",t.get("parallelIndex")),o=e.coordSysDims=a.dimensions.slice();f(a.parallelAxisIndex,function(t,a){var s=r.getComponent("parallelAxis",t),l=o[a];n.set(l,s),xo(s)&&null==e.firstCategoryDimIndex&&(i.set(l,s),e.firstCategoryDimIndex=a)})}},ex="original",nx="arrayRows",ix="objectRows",rx="keyedColumns",ax="unknown",ox="typedArray",sx="column",lx="row";_o.seriesDataToSource=function(t){return new _o({data:t,sourceFormat:I(t)?ox:ex,fromDataset:!1})},Ki(_o);var hx=Hi(),ux="\x00_ec_inner",cx=Pa.extend({init:function(t,e,n,i){n=n||{},this.option=null,this._theme=new Pa(n),this._optionManager=i},setOption:function(t,e){O(!(ux in t),"please use chart.getOption()"),this._optionManager.setOption(t,e),this.resetOption(null)},resetOption:function(t){var e=!1,n=this._optionManager;if(!t||"recreate"===t){var i=n.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this.mergeOption(i)):Eo.call(this,i),e=!0}if(("timeline"===t||"media"===t)&&this.restoreData(),!t||"recreate"===t||"timeline"===t){var r=n.getTimelineOption(this);r&&(this.mergeOption(r),e=!0)}if(!t||"recreate"===t||"media"===t){var a=n.getMediaOption(this,this._api);a.length&&f(a,function(t){this.mergeOption(t,e=!0)},this)}return e},mergeOption:function(t){function e(e,i){var r=Oi(t[e]),s=zi(a.get(e),r);Bi(s),f(s,function(t){var n=t.option;S(n)&&(t.keyInfo.mainType=e,t.keyInfo.subType=zo(e,n,t.exist))});var l=Ro(a,i);n[e]=[],a.set(e,[]),f(s,function(t,i){var r=t.exist,s=t.option;if(O(S(s)||r,"Empty component definition"),s){var h=qy.getClass(e,t.keyInfo.subType,!0);if(r&&r instanceof h)r.name=t.keyInfo.name,r.mergeOption(s,this),r.optionUpdated(s,!1);else{var u=o({dependentModels:l,componentIndex:i},t.keyInfo);r=new h(s,this,this,u),o(r,u),r.init(s,this,this,u),r.optionUpdated(null,!0)}}else r.mergeOption({},this),r.optionUpdated({},!1);a.get(e)[i]=r,n[e][i]=r.option},this),"series"===e&&Bo(this,a.get("series"))}var n=this.option,a=this._componentsMap,s=[];So(this),f(t,function(t,e){null!=t&&(qy.hasClass(e)?e&&s.push(e):n[e]=null==n[e]?i(t):r(n[e],t,!0))}),qy.topologicalTravel(s,qy.getAllClassMainTypes(),e,this),this._seriesIndicesMap=B(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var t=i(this.option);return f(t,function(e,n){if(qy.hasClass(n)){for(var e=Oi(e),i=e.length-1;i>=0;i--)Vi(e[i])&&e.splice(i,1);t[n]=e}}),delete t[ux],t},getTheme:function(){return this._theme},getComponent:function(t,e){var n=this._componentsMap.get(t);return n?n[e||0]:void 0},queryComponents:function(t){var e=t.mainType;if(!e)return[];var n=t.index,i=t.id,r=t.name,a=this._componentsMap.get(e);if(!a||!a.length)return[];var o;if(null!=n)_(n)||(n=[n]),o=m(p(n,function(t){return a[t]}),function(t){return!!t});else if(null!=i){var s=_(i);o=m(a,function(t){return s&&h(i,t.id)>=0||!s&&t.id===i})}else if(null!=r){var l=_(r);o=m(a,function(t){return l&&h(r,t.name)>=0||!l&&t.name===r})}else o=a.slice();return Fo(o,t)},findComponents:function(t){function e(t){var e=r+"Index",n=r+"Id",i=r+"Name";return!t||null==t[e]&&null==t[n]&&null==t[i]?null:{mainType:r,index:t[e],id:t[n],name:t[i]}}function n(e){return t.filter?m(e,t.filter):e}var i=t.query,r=t.mainType,a=e(i),o=a?this.queryComponents(a):this._componentsMap.get(r);return n(Fo(o,t))},eachComponent:function(t,e,n){var i=this._componentsMap;if("function"==typeof t)n=e,e=t,i.each(function(t,i){f(t,function(t,r){e.call(n,i,t,r)})});else if(b(t))f(i.get(t),e,n);else if(S(t)){var r=this.findComponents(t);f(r,e,n)}},getSeriesByName:function(t){var e=this._componentsMap.get("series");return m(e,function(e){return e.name===t})},getSeriesByIndex:function(t){return this._componentsMap.get("series")[t]},getSeriesByType:function(t){var e=this._componentsMap.get("series");return m(e,function(e){return e.subType===t})},getSeries:function(){return this._componentsMap.get("series").slice()},getSeriesCount:function(){return this._componentsMap.get("series").length},eachSeries:function(t,e){f(this._seriesIndices,function(n){var i=this._componentsMap.get("series")[n];t.call(e,i,n)},this)},eachRawSeries:function(t,e){f(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(t,e,n){f(this._seriesIndices,function(i){var r=this._componentsMap.get("series")[i];r.subType===t&&e.call(n,r,i)},this)},eachRawSeriesByType:function(t,e,n){return f(this.getSeriesByType(t),e,n)},isSeriesFiltered:function(t){return null==this._seriesIndicesMap.get(t.componentIndex)},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(t,e){var n=m(this._componentsMap.get("series"),t,e);Bo(this,n)},restoreData:function(t){var e=this._componentsMap;Bo(this,e.get("series"));var n=[];e.each(function(t,e){n.push(e)}),qy.topologicalTravel(n,qy.getAllClassMainTypes(),function(n){f(e.get(n),function(e){("series"!==n||!Oo(e,t))&&e.restoreData()})})}});c(cx,Qy);var dx=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"],fx={};Go.prototype={constructor:Go,create:function(t,e){var n=[];f(fx,function(i){var r=i.create(t,e);n=n.concat(r||[])}),this._coordinateSystems=n},update:function(t,e){f(this._coordinateSystems,function(n){n.update&&n.update(t,e)})},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},Go.register=function(t,e){fx[t]=e},Go.get=function(t){return fx[t]};var px=f,gx=i,mx=p,vx=r,yx=/^(min|max)?(.+)$/;Ho.prototype={constructor:Ho,setOption:function(t,e){t&&f(Oi(t.series),function(t){t&&t.data&&I(t.data)&&E(t.data)}),t=gx(t,!0);var n=this._optionBackup,i=Wo.call(this,t,e,!n);this._newBaseOption=i.baseOption,n?(Yo(n.baseOption,i.baseOption),i.timelineOptions.length&&(n.timelineOptions=i.timelineOptions),i.mediaList.length&&(n.mediaList=i.mediaList),i.mediaDefault&&(n.mediaDefault=i.mediaDefault)):this._optionBackup=i},mountOption:function(t){var e=this._optionBackup;return this._timelineOptions=mx(e.timelineOptions,gx),this._mediaList=mx(e.mediaList,gx),this._mediaDefault=gx(e.mediaDefault),this._currentMediaIndices=[],gx(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,n=this._timelineOptions;if(n.length){var i=t.getComponent("timeline");i&&(e=gx(n[i.getCurrentIndex()],!0))}return e},getMediaOption:function(){var t=this._api.getWidth(),e=this._api.getHeight(),n=this._mediaList,i=this._mediaDefault,r=[],a=[];if(!n.length&&!i)return a;for(var o=0,s=n.length;s>o;o++)Uo(n[o].query,t,e)&&r.push(o);return!r.length&&i&&(r=[-1]),r.length&&!jo(r,this._currentMediaIndices)&&(a=mx(r,function(t){return gx(-1===t?i.option:n[t].option)})),this._currentMediaIndices=r,a}};var xx=f,_x=S,bx=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"],Sx=function(t,e){xx(ts(t.series),function(t){_x(t)&&Qo(t)});var n=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&n.push("valueAxis","categoryAxis","logAxis","timeAxis"),xx(n,function(e){xx(ts(t[e]),function(t){t&&($o(t,"axisLabel"),$o(t.axisPointer,"label"))})}),xx(ts(t.parallel),function(t){var e=t&&t.parallelAxisDefault;$o(e,"axisLabel"),$o(e&&e.axisPointer,"label")}),xx(ts(t.calendar),function(t){qo(t,"itemStyle"),$o(t,"dayLabel"),$o(t,"monthLabel"),$o(t,"yearLabel")}),xx(ts(t.radar),function(t){$o(t,"name")}),xx(ts(t.geo),function(t){_x(t)&&(Jo(t),xx(ts(t.regions),function(t){Jo(t)}))}),xx(ts(t.timeline),function(t){Jo(t),qo(t,"label"),qo(t,"itemStyle"),qo(t,"controlStyle",!0);var e=t.data;_(e)&&f(e,function(t){S(t)&&(qo(t,"label"),qo(t,"itemStyle"))})}),xx(ts(t.toolbox),function(t){qo(t,"iconStyle"),xx(t.feature,function(t){qo(t,"iconStyle")})}),$o(es(t.axisPointer),"label"),$o(es(t.tooltip).axisPointer,"label")},Mx=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],Ix=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],Tx=function(t,e){Sx(t,e),t.series=Oi(t.series),f(t.series,function(t){if(S(t)){var e=t.type;if(("pie"===e||"gauge"===e)&&null!=t.clockWise&&(t.clockwise=t.clockWise),"gauge"===e){var n=ns(t,"pointer.color");null!=n&&is(t,"itemStyle.normal.color",n)}rs(t)}}),t.dataRange&&(t.visualMap=t.dataRange),f(Ix,function(e){var n=t[e];n&&(_(n)||(n=[n]),f(n,function(t){rs(t)}))})},Dx=function(t){var e=B();t.eachSeries(function(t){var n=t.get("stack");if(n){var i=e.get(n)||e.set(n,[]),r=t.getData(),a={stackResultDimension:r.getCalculationInfo("stackResultDimension"),stackedOverDimension:r.getCalculationInfo("stackedOverDimension"),stackedDimension:r.getCalculationInfo("stackedDimension"),stackedByDimension:r.getCalculationInfo("stackedByDimension"),isStackedByIndex:r.getCalculationInfo("isStackedByIndex"),data:r,seriesModel:t};if(!a.stackedDimension||!a.isStackedByIndex&&!a.stackedByDimension)return;i.length&&r.setCalculationInfo("stackedOnSeries",i[i.length-1].seriesModel),i.push(a)}}),e.each(as)},Cx=os.prototype;Cx.pure=!1,Cx.persistent=!0,Cx.getSource=function(){return this._source};var Ax={arrayRows_column:{pure:!0,count:function(){return Math.max(0,this._data.length-this._source.startIndex)},getItem:function(t){return this._data[t+this._source.startIndex]},appendData:hs},arrayRows_row:{pure:!0,count:function(){var t=this._data[0];return t?Math.max(0,t.length-this._source.startIndex):0},getItem:function(t){t+=this._source.startIndex;for(var e=[],n=this._data,i=0;i=1)&&(t=1),t}var n=this._upstream,i=t&&t.skip;if(this._dirty&&n){var r=this.context;r.data=r.outputData=n.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!i&&(a=this._plan(this.context));var o=e(this._modBy),s=this._modDataCount||0,l=e(t&&t.modBy),h=t&&t.modDataCount||0;(o!==l||s!==h)&&(a="reset");var u;(this._dirty||"reset"===a)&&(this._dirty=!1,u=ys(this,i)),this._modBy=l,this._modDataCount=h;var c=t&&t.step;if(this._dueEnd=n?n._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(!i&&(u||f>d)){var p=this._progress;if(_(p))for(var g=0;gi?i++:null}function e(){var t=i%o*r+Math.ceil(i/o),e=i>=n?null:a>t?t:i;return i++,e}var n,i,r,a,o,s={reset:function(l,h,u,c){i=l,n=h,r=u,a=c,o=Math.ceil(a/r),s.next=r>1&&a>0?e:t}};return s}();Nx.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},Nx.unfinished=function(){return this._progress&&this._dueIndex":"")+s.join(o?"
":", ")}function i(t){return io(eo(t))}var r=this.getData(),a=r.mapDimension("defaultedTooltip",!0),o=a.length,s=this.getRawValue(t),l=_(s),h=r.getItemVisual(t,"color");S(h)&&h.colorStops&&(h=(h.colorStops[0]||{}).color),h=h||"transparent";var u=o>1||l&&!o?n(s):i(o?fs(r,t,a[0]):l?s[0]:s),c=oo(h),d=r.getName(t),p=this.name;return Fi(this)||(p=""),p=p?io(p)+(e?": ":"
"):"",e?c+p+u:p+c+(d?io(d)+": "+u:u)},isAnimationEnabled:function(){if(zp.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(t,e,n){var i=this.ecModel,r=Qy.getColorFromPalette.call(this,t,e,n);return r||(r=i.getColorFromPalette(t,e,n)),r},coordDimToDataDim:function(t){return this.getRawData().mapDimension(t,!0)},getProgressive:function(){return this.get("progressive")},getProgressiveThreshold:function(){return this.get("progressiveThreshold")},getAxisTooltipData:null,getTooltipPosition:null,pipeTask:null,preventIncremental:null,pipelineContext:null});c(zx,Ox),c(zx,Qy);var Bx=function(){this.group=new Vg,this.uid=Ea("viewComponent")};Bx.prototype={constructor:Bx,init:function(){},render:function(){},dispose:function(){}};var Fx=Bx.prototype;Fx.updateView=Fx.updateLayout=Fx.updateVisual=function(){},qi(Bx),Qi(Bx,{registerWhenExtend:!0});var Vx=function(){var t=Hi();return function(e){var n=t(e),i=e.pipelineContext,r=n.large,a=n.progressiveRender,o=n.large=i.large,s=n.progressiveRender=i.progressiveRender;return!!(r^o||a^s)&&"reset"}},Gx=Hi(),Hx=Vx();Ds.prototype={type:"chart",init:function(){},render:function(){},highlight:function(t,e,n,i){As(t.getData(),i,"emphasis")},downplay:function(t,e,n,i){As(t.getData(),i,"normal")},remove:function(){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null};var Wx=Ds.prototype;Wx.updateView=Wx.updateLayout=Wx.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},qi(Ds,["dispose"]),Qi(Ds,{registerWhenExtend:!0}),Ds.markUpdateMethod=function(t,e){Gx(t).updateMethod=e};var Ux={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)}}},Xx="\x00__throttleOriginMethod",jx="\x00__throttleRate",Yx="\x00__throttleType",Zx={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData(),i=(t.visualColorAccessPath||"itemStyle.color").split("."),r=t.get(i)||t.getColorFromPalette(t.name,null,e.getSeriesCount());if(n.setVisual("color",r),!e.isSeriesFiltered(t)){"function"!=typeof r||r instanceof py||n.each(function(e){n.setItemVisual(e,"color",r(t.getDataParams(e)))});var a=function(t,e){var n=t.getItemModel(e),r=n.get(i,!0);null!=r&&t.setItemVisual(e,"color",r)};return{dataEach:n.hasItemOption?a:null}}}},qx={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:""}}}},Kx=function(t,e){function n(t,e){if("string"!=typeof t)return t;var n=t;return f(e,function(t,e){n=n.replace(new RegExp("\\{\\s*"+e+"\\s*\\}","g"),t)}),n}function i(t){var e=o.get(t);if(null==e){for(var n=t.split("."),i=qx.aria,r=0;rs)){var d=r();l=d?n(i("general.withTitle"),{title:d}):i("general.withoutTitle");var p=[],g=s>1?"series.multiple.prefix":"series.single.prefix";l+=n(i(g),{seriesCount:s}),e.eachSeries(function(t,e){if(c>e){var r,o=t.get("name"),l="series."+(s>1?"multiple":"single")+".";r=i(o?l+"withName":l+"withoutName"),r=n(r,{seriesId:t.seriesIndex,seriesName:t.get("name"),seriesType:a(t.subType)});var u=t.getData();window.data=u,r+=u.count()>h?n(i("data.partialData"),{displayCnt:h}):i("data.allData");for(var d=[],f=0;ff){var g=u.getName(f),m=fs(u,f);d.push(n(i(g?"data.withName":"data.withoutName"),{name:g,value:m}))}r+=d.join(i("data.separator.middle"))+i("data.separator.end"),p.push(r)}}),l+=p.join(i("series.multiple.separator.middle"))+i("series.multiple.separator.end"),t.setAttribute("aria-label",l)}}},$x=Math.PI,Jx=function(t,e){e=e||{},s(e,{text:"loading",color:"#c23531",textColor:"#000",maskColor:"rgba(255, 255, 255, 0.8)",zlevel:0});var n=new ly({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4}),i=new dy({shape:{startAngle:-$x/2,endAngle:-$x/2+.1,r:10},style:{stroke:e.color,lineCap:"round",lineWidth:5},zlevel:e.zlevel,z:10001}),r=new ly({style:{fill:"none",text:e.text,textPosition:"right",textDistance:10,textFill:e.textColor},zlevel:e.zlevel,z:10001});i.animateShape(!0).when(1e3,{endAngle:3*$x/2}).start("circularInOut"),i.animateShape(!0).when(1e3,{startAngle:3*$x/2}).delay(300).start("circularInOut");var a=new Vg;return a.add(i),a.add(r),a.add(n),a.resize=function(){var e=t.getWidth()/2,a=t.getHeight()/2;i.setShape({cx:e,cy:a});var o=i.shape.r;r.setShape({x:e-o,y:a-o,width:2*o,height:2*o}),n.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},a.resize(),a},Qx=Ns.prototype;Qx.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(t){var e=t.overallTask;e&&e.dirty()})},Qx.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,a=r?n.step:null,o=i&&i.modDataCount,s=null!=o?Math.ceil(o/a):null;return{step:a,modBy:s,modDataCount:o}}},Qx.getPipeline=function(t){return this._pipelineMap.get(t)},Qx.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData(),r=i.count(),a=n.progressiveEnabled&&e.incrementalPrepareRender&&r>=n.threshold,o=t.get("large")&&r>=t.get("largeThreshold"),s="mod"===t.get("progressiveChunkMode")?r:null;t.pipelineContext=n.context={progressiveRender:a,modDataCount:s,large:o}},Qx.restorePipelines=function(t){var e=this,n=e._pipelineMap=B();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}),js(e,t,t.dataTask)})},Qx.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.ecInstance.getModel(),n=this.api;f(this._allHandlers,function(i){var r=t.get(i.uid)||t.set(i.uid,[]);i.reset&&Rs(this,i,r,e,n),i.overallReset&&zs(this,i,r,e,n)},this)},Qx.prepareView=function(t,e,n,i){var r=t.renderTask,a=r.context;a.model=e,a.ecModel=n,a.api=i,r.__block=!t.incrementalPrepareRender,js(this,e,r)},Qx.performDataProcessorTasks=function(t,e){Es(this,this._dataProcessorHandlers,t,e,{block:!0})},Qx.performVisualTasks=function(t,e,n){Es(this,this._visualHandlers,t,e,n)},Qx.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e|=t.dataTask.perform()}),this.unfinished|=e},Qx.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 t_=Qx.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},e_=Us(0);Ns.wrapStageHandler=function(t,e){return w(t)&&(t={overallReset:t,seriesType:Ys(t)}),t.uid=Ea("stageHandler"),e&&(t.visualType=e),t};var n_,i_={},r_={};Zs(i_,cx),Zs(r_,Vo),i_.eachSeriesByType=i_.eachRawSeriesByType=function(t){n_=t},i_.eachComponent=function(t){"series"===t.mainType&&t.subType&&(n_=t.subType)};var a_=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],o_={color:a_,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],a_]},s_="#eee",l_=function(){return{axisLine:{lineStyle:{color:s_}},axisTick:{lineStyle:{color:s_}},axisLabel:{textStyle:{color:s_}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:s_}}}},h_=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],u_={color:h_,backgroundColor:"#333",tooltip:{axisPointer:{lineStyle:{color:s_},crossStyle:{color:s_}}},legend:{textStyle:{color:s_}},textStyle:{color:s_},title:{textStyle:{color:s_}},toolbox:{iconStyle:{normal:{borderColor:s_}}},dataZoom:{textStyle:{color:s_}},visualMap:{textStyle:{color:s_}},timeline:{lineStyle:{color:s_},itemStyle:{normal:{color:h_[1]}},label:{normal:{textStyle:{color:s_}}},controlStyle:{normal:{color:s_,borderColor:s_}}},timeAxis:l_(),logAxis:l_(),valueAxis:l_(),categoryAxis:l_(),line:{symbol:"circle"},graph:{color:h_},gauge:{title:{textStyle:{color:s_}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}};u_.categoryAxis.splitLine.show=!1,qy.extend({type:"dataset",defaultOption:{seriesLayoutBy:sx,sourceHeader:null,dimensions:null,source:null},optionUpdated:function(){wo(this)}}),Bx.extend({type:"dataset"}); +var c_=O,d_=f,f_=w,p_=S,g_=qy.parseClassType,m_="4.1.0",v_={zrender:"4.0.4"},y_=1,x_=1e3,__=5e3,w_=1e3,b_=2e3,S_=3e3,M_=4e3,I_=5e3,T_={PROCESSOR:{FILTER:x_,STATISTIC:__},VISUAL:{LAYOUT:w_,GLOBAL:b_,CHART:S_,COMPONENT:M_,BRUSH:I_}},D_="__flagInMainProcess",C_="__optionUpdated",A_=/^[a-zA-Z0-9_]+$/;Ks.prototype.on=qs("on"),Ks.prototype.off=qs("off"),Ks.prototype.one=qs("one"),c(Ks,ag);var k_=$s.prototype;k_._onframe=function(){if(!this._disposed){var t=this._scheduler;if(this[C_]){var e=this[C_].silent;this[D_]=!0,Qs(this),L_.update.call(this),this[D_]=!1,this[C_]=!1,il.call(this,e),rl.call(this,e)}else if(t.unfinished){var n=y_,i=this._model,r=this._api;t.unfinished=!1;do{var a=+new Date;t.performSeriesTasks(i),t.performDataProcessorTasks(i),el(this,i),t.performVisualTasks(i),ul(this,this._model,r,"remain"),n-=+new Date-a}while(n>0&&t.unfinished);t.unfinished||this._zr.flush()}}},k_.getDom=function(){return this._dom},k_.getZr=function(){return this._zr},k_.setOption=function(t,e,n){var i;if(p_(e)&&(n=e.lazyUpdate,i=e.silent,e=e.notMerge),this[D_]=!0,!this._model||e){var r=new Ho(this._api),a=this._theme,o=this._model=new cx(null,null,a,r);o.scheduler=this._scheduler,o.init(null,null,a,r)}this._model.setOption(t,R_),n?(this[C_]={silent:i},this[D_]=!1):(Qs(this),L_.update.call(this),this._zr.flush(),this[C_]=!1,this[D_]=!1,il.call(this,i),rl.call(this,i))},k_.setTheme=function(){console.log("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},k_.getModel=function(){return this._model},k_.getOption=function(){return this._model&&this._model.getOption()},k_.getWidth=function(){return this._zr.getWidth()},k_.getHeight=function(){return this._zr.getHeight()},k_.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},k_.getRenderedCanvas=function(t){if(zp.canvasSupported){t=t||{},t.pixelRatio=t.pixelRatio||1,t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor");var e=this._zr;return e.painter.getRenderedCanvas(t)}},k_.getSvgDataUrl=function(){if(zp.svgSupported){var t=this._zr,e=t.storage.getDisplayList();return f(e,function(t){t.stopAnimation(!0)}),t.painter.pathToDataUrl()}},k_.getDataURL=function(t){t=t||{};var e=t.excludeComponents,n=this._model,i=[],r=this;d_(e,function(t){n.eachComponent({mainType:t},function(t){var e=r._componentsMap[t.__viewId];e.group.ignore||(i.push(e),e.group.ignore=!0)})});var a="svg"===this._zr.painter.getType()?this.getSvgDataUrl():this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return d_(i,function(t){t.group.ignore=!1}),a},k_.getConnectedDataURL=function(t){if(zp.canvasSupported){var e=this.group,n=Math.min,r=Math.max,a=1/0;if(H_[e]){var o=a,s=a,l=-a,h=-a,u=[],c=t&&t.pixelRatio||1;f(G_,function(a){if(a.group===e){var c=a.getRenderedCanvas(i(t)),d=a.getDom().getBoundingClientRect();o=n(d.left,o),s=n(d.top,s),l=r(d.right,l),h=r(d.bottom,h),u.push({dom:c,left:d.left,top:d.top})}}),o*=c,s*=c,l*=c,h*=c;var d=l-o,p=h-s,g=Zp();g.width=d,g.height=p;var m=Ci(g);return d_(u,function(t){var e=new oi({style:{x:t.left*c-o,y:t.top*c-s,image:t.dom}});m.add(e)}),m.refreshImmediately(),g.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}},k_.convertToPixel=x(Js,"convertToPixel"),k_.convertFromPixel=x(Js,"convertFromPixel"),k_.containPixel=function(t,e){var n,i=this._model;return t=Wi(i,t),f(t,function(t,i){i.indexOf("Models")>=0&&f(t,function(t){var r=t.coordinateSystem;if(r&&r.containPoint)n|=!!r.containPoint(e);else if("seriesModels"===i){var a=this._chartsMap[t.__viewId];a&&a.containPoint&&(n|=a.containPoint(e,t))}},this)},this),!!n},k_.getVisual=function(t,e){var n=this._model;t=Wi(n,t,{defaultMainType:"series"});var i=t.seriesModel,r=i.getData(),a=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?r.indexOfRawIndex(t.dataIndex):null;return null!=a?r.getItemVisual(a,e):r.getVisual(e)},k_.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},k_.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var L_={prepareAndUpdate:function(t){Qs(this),L_.update.call(this,t)},update:function(t){var e=this._model,n=this._api,i=this._zr,r=this._coordSysMgr,a=this._scheduler;if(e){a.restoreData(e,t),a.performSeriesTasks(e),r.create(e,n),a.performDataProcessorTasks(e,t),el(this,e),r.update(e,n),sl(e),a.performVisualTasks(e,t),ll(this,e,n,t);var o=e.get("backgroundColor")||"transparent";if(zp.canvasSupported)i.setBackgroundColor(o);else{var s=Ne(o);o=We(s,"rgb"),0===s[3]&&(o="transparent")}cl(e,n)}},updateTransform:function(t){var e=this._model,n=this,i=this._api;if(e){var r=[];e.eachComponent(function(a,o){var s=n.getViewOfComponentModel(o);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(o,e,i,t);l&&l.update&&r.push(s)}else r.push(s)});var a=B();e.eachSeries(function(r){var o=n._chartsMap[r.__viewId];if(o.updateTransform){var s=o.updateTransform(r,e,i,t);s&&s.update&&a.set(r.uid,1)}else a.set(r.uid,1)}),sl(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0,dirtyMap:a}),ul(n,e,i,t,a),cl(e,this._api)}},updateView:function(t){var e=this._model;e&&(Ds.markUpdateMethod(t,"updateView"),sl(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),ll(this,this._model,this._api,t),cl(e,this._api))},updateVisual:function(t){L_.update.call(this,t)},updateLayout:function(t){L_.update.call(this,t)}};k_.resize=function(t){this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var n=e.resetOption("media"),i=t&&t.silent;this[D_]=!0,n&&Qs(this),L_.update.call(this),this[D_]=!1,il.call(this,i),rl.call(this,i)}},k_.showLoading=function(t,e){if(p_(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),V_[t]){var n=V_[t](this._api,e),i=this._zr;this._loadingFX=n,i.add(n)}},k_.hideLoading=function(){this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},k_.makeActionFromEvent=function(t){var e=o({},t);return e.type=N_[t.type],e},k_.dispatchAction=function(t,e){if(p_(e)||(e={silent:!!e}),O_[t.type]&&this._model){if(this[D_])return void this._pendingActions.push(t);nl.call(this,t,e.silent),e.flush?this._zr.flush(!0):e.flush!==!1&&zp.browser.weChat&&this._throttledZrFlush(),il.call(this,e.silent),rl.call(this,e.silent)}},k_.appendData=function(t){var e=t.seriesIndex,n=this.getModel(),i=n.getSeriesByIndex(e);i.appendData(t),this._scheduler.unfinished=!0},k_.on=qs("on"),k_.off=qs("off"),k_.one=qs("one");var P_=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];k_._initEvents=function(){d_(P_,function(t){this._zr.on(t,function(e){var n,i=this.getModel(),r=e.target;if("globalout"===t)n={};else if(r&&null!=r.dataIndex){var a=r.dataModel||i.getSeriesByIndex(r.seriesIndex);n=a&&a.getDataParams(r.dataIndex,r.dataType)||{}}else r&&r.eventData&&(n=o({},r.eventData));n&&(n.event=e,n.type=t,this.trigger(t,n))},this)},this),d_(N_,function(t,e){this._messageCenter.on(e,function(t){this.trigger(e,t)},this)},this)},k_.isDisposed=function(){return this._disposed},k_.clear=function(){this.setOption({series:[]},!0)},k_.dispose=function(){if(!this._disposed){this._disposed=!0,Xi(this.getDom(),X_,"");var t=this._api,e=this._model;d_(this._componentsViews,function(n){n.dispose(e,t)}),d_(this._chartsViews,function(n){n.dispose(e,t)}),this._zr.dispose(),delete G_[this.id]}},c($s,ag);var O_={},N_={},E_=[],R_=[],z_=[],B_=[],F_={},V_={},G_={},H_={},W_=new Date-0,U_=new Date-0,X_="_echarts_instance_",j_={},Y_=xl;Ll(b_,Zx),Ml(Tx),Il(__,Dx),Ol("default",Jx),Dl({type:"highlight",event:"highlight",update:"highlight"},V),Dl({type:"downplay",event:"downplay",update:"downplay"},V),Sl("light",o_),Sl("dark",u_);var Z_={};Hl.prototype={constructor:Hl,add:function(t){return this._add=t,this},update:function(t){return this._update=t,this},remove:function(t){return this._remove=t,this},execute:function(){var t,e=this._old,n=this._new,i={},r={},a=[],o=[];for(Wl(e,i,a,"_oldKeyGetter",this),Wl(n,r,o,"_newKeyGetter",this),t=0;tu;u++)this._add&&this._add(l[u]);else this._add&&this._add(l)}}}};var q_=B(["tooltip","label","itemName","itemId","seriesName"]),K_=S,$_="undefined",J_="e\x00\x00",Q_={"float":typeof Float64Array===$_?Array:Float64Array,"int":typeof Int32Array===$_?Array:Int32Array,ordinal:Array,number:Array,time:Array},tw=typeof Uint32Array===$_?Array:Uint32Array,ew=typeof Uint16Array===$_?Array:Uint16Array,nw=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_rawData","_chunkSize","_chunkCount","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx"],iw=["_extent","_approximateExtent","_rawExtent"],rw=function(t,e){t=t||["x","y"];for(var n={},i=[],r={},a=0;a=e)){for(var n,i=this._chunkSize,r=this._rawData,a=this._storage,o=this.dimensions,s=o.length,l=this._dimensionInfos,h=this._nameList,u=this._idList,c=this._rawExtent,d=this._nameRepeatCount={},f=this._chunkCount,p=f-1,g=0;s>g;g++){var m=o[g];c[m]||(c[m]=rh());var v=l[m];0===v.otherDims.itemName&&(n=this._nameDimIdx=g),0===v.otherDims.itemId&&(this._idDimIdx=g);var y=Q_[v.type];a[m]||(a[m]=[]);var x=a[m][p];if(x&&x.lengthb;b+=i)a[m].push(new y(Math.min(e-b,i)));this._chunkCount=a[m].length}for(var S=new Array(s),M=t;e>M;M++){S=r.getItem(M,S);for(var I=Math.floor(M/i),T=M%i,b=0;s>b;b++){var m=o[b],D=a[m][I],C=this._dimValueGetter(S,m,M,b);D[T]=C;var A=c[m];CA[1]&&(A[1]=C)}if(!r.pure){var k=h[M];if(S&&null==k)if(null!=S.name)h[M]=k=S.name;else if(null!=n){var L=o[n],P=a[L][I];if(P){k=P[T];var O=l[L].ordinalMeta;O&&O.categories.length&&(k=O.categories[k])}}var N=null==S?null:S.id;null==N&&null!=k&&(d[k]=d[k]||0,N=k,d[k]>0&&(N+="__ec__"+d[k]),d[k]++),null!=N&&(u[M]=N)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=e,this._extent={},Kl(this)}},aw.count=function(){return this._count},aw.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;i>r;r++)t[r]=e[r]}else t=new n(e.buffer,0,i)}else for(var n=Yl(this),t=new n(this.count()),r=0;r=0&&e=0&&ei;i++)n.push(this.get(t[i],e));return n},aw.hasValue=function(t){for(var e=this._dimensionsSummary.dataDimsOnCoord,n=this._dimensionInfos,i=0,r=e.length;r>i;i++)if("ordinal"!==n[e[i]].type&&isNaN(this.get(e[i],t)))return!1;return!0},aw.getDataExtent=function(t){t=this.getDimension(t);var e=this._storage[t],n=rh();if(!e)return n;var i,r=this.count(),a=!this._indices;if(a)return this._rawExtent[t].slice();if(i=this._extent[t])return i.slice();i=n;for(var o=i[0],s=i[1],l=0;r>l;l++){var h=this._getFast(t,this.getRawIndex(l));o>h&&(o=h),h>s&&(s=h)}return i=[o,s],this._extent[t]=i,i},aw.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},aw.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},aw.getCalculationInfo=function(t){return this._calculationInfo[t]},aw.setCalculationInfo=function(t,e){K_(t)?o(this._calculationInfo,t):this._calculationInfo[t]=e},aw.getSum=function(t){var e=this._storage[t],n=0;if(e)for(var i=0,r=this.count();r>i;i++){var a=this.get(t,i);isNaN(a)||(n+=a)}return n},aw.getMedian=function(t){var e=[];this.each(t,function(t){isNaN(t)||e.push(t)});var n=[].concat(e).sort(function(t,e){return t-e}),i=this.count();return 0===i?0:i%2===1?n[(i-1)/2]:(n[i/2]+n[i/2-1])/2},aw.rawIndexOf=function(t,e){var n=t&&this._invertedIndicesMap[t],i=n[e];return null==i||isNaN(i)?-1:i},aw.indexOfName=function(t){for(var e=0,n=this.count();n>e;e++)if(this.getName(e)===t)return e;return-1},aw.indexOfRawIndex=function(t){if(!this._indices)return t;if(t>=this._rawCount||0>t)return-1;var e=this._indices,n=e[t];if(null!=n&&n=i;){var a=(i+r)/2|0;if(e[a]t))return a;r=a-1}}return-1},aw.indicesOfNearest=function(t,e,n){var i=this._storage,r=i[t],a=[];if(!r)return a;null==n&&(n=1/0);for(var o=Number.MAX_VALUE,s=-1,l=0,h=this.count();h>l;l++){var u=e-this.get(t,l),c=Math.abs(u);n>=u&&o>=c&&((o>c||u>=0&&0>s)&&(o=c,s=u,a.length=0),a.push(l))}return a},aw.getRawIndex=Jl,aw.getRawDataItem=function(t){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(t));for(var e=[],n=0;no;o++)s[o]=this.get(t[o],a);s[o]=a,e.apply(n,s)}}},aw.filterSelf=function(t,e,n,i){if(this._count){"function"==typeof t&&(i=n,n=e,e=t,t=[]),n=n||i||this,t=p(eh(t),this.getDimension,this);for(var r=this.count(),a=Yl(this),o=new a(r),s=[],l=t.length,h=0,u=t[0],c=0;r>c;c++){var d,f=this.getRawIndex(c);if(0===l)d=e.call(n,c);else if(1===l){var g=this._getFast(u,f);d=e.call(n,g,c)}else{for(var m=0;l>m;m++)s[m]=this._getFast(u,f);s[m]=c,d=e.apply(n,s)}d&&(o[h++]=f)}return r>h&&(this._indices=o),this._count=h,this._extent={},this.getRawIndex=this._indices?Ql:Jl,this}},aw.selectRange=function(t){if(this._count){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);var i=e.length;if(i){var r=this.count(),a=Yl(this),o=new a(r),s=0,l=e[0],h=t[l][0],u=t[l][1],c=!1;if(!this._indices){var d=0;if(1===i){for(var f=this._storage[e[0]],p=0;pv;v++){var y=g[v];(y>=h&&u>=y||isNaN(y))&&(o[s++]=d),d++}c=!0}else if(2===i){for(var f=this._storage[l],x=this._storage[e[1]],_=t[e[1]][0],w=t[e[1]][1],p=0;pv;v++){var y=g[v],S=b[v];(y>=h&&u>=y||isNaN(y))&&(S>=_&&w>=S||isNaN(S))&&(o[s++]=d),d++}c=!0}}if(!c)if(1===i)for(var v=0;r>v;v++){var M=this.getRawIndex(v),y=this._getFast(l,M);(y>=h&&u>=y||isNaN(y))&&(o[s++]=M)}else for(var v=0;r>v;v++){for(var I=!0,M=this.getRawIndex(v),p=0;i>p;p++){var T=e[p],y=this._getFast(n,M);(yt[T][1])&&(I=!1)}I&&(o[s++]=this.getRawIndex(v))}return r>s&&(this._indices=o),this._count=s,this._extent={},this.getRawIndex=this._indices?Ql:Jl,this}}},aw.mapArray=function(t,e,n,i){"function"==typeof t&&(i=n,n=e,e=t,t=[]),n=n||i||this;var r=[];return this.each(t,function(){r.push(e&&e.apply(this,arguments))},n),r},aw.map=function(t,e,n,i){n=n||i||this,t=p(eh(t),this.getDimension,this);var r=nh(this,t);r._indices=this._indices,r.getRawIndex=r._indices?Ql:Jl;for(var a=r._storage,o=[],s=this._chunkSize,l=t.length,h=this.count(),u=[],c=r._rawExtent,d=0;h>d;d++){for(var f=0;l>f;f++)u[f]=this.get(t[f],d);u[l]=d;var g=e&&e.apply(n,u);if(null!=g){"object"!=typeof g&&(o[0]=g,g=o);for(var m=this.getRawIndex(d),v=Math.floor(m/s),y=m%s,x=0;xb[1]&&(b[1]=w)}}}return r},aw.downSample=function(t,e,n,i){for(var r=nh(this,[t]),a=r._storage,o=[],s=Math.floor(1/e),l=a[t],h=this.count(),u=this._chunkSize,c=r._rawExtent[t],d=new(Yl(this))(h),f=0,p=0;h>p;p+=s){s>h-p&&(s=h-p,o.length=s);for(var g=0;s>g;g++){var m=this.getRawIndex(p+g),v=Math.floor(m/u),y=m%u;o[g]=l[v][y]}var x=n(o),_=this.getRawIndex(Math.min(p+i(o,x)||0,h-1)),w=Math.floor(_/u),b=_%u;l[w][b]=x,xc[1]&&(c[1]=x),d[f++]=_}return r._count=f,r._indices=d,r.getRawIndex=Ql,r},aw.getItemModel=function(t){var e=this.hostModel;return new Pa(this.getRawDataItem(t),e,e&&e.ecModel)},aw.diff=function(t){var e=this;return new Hl(t?t.getIndices():[],this.getIndices(),function(e){return th(t,e)},function(t){return th(e,t)})},aw.getVisual=function(t){var e=this._visual;return e&&e[t]},aw.setVisual=function(t,e){if(K_(t))for(var n in t)t.hasOwnProperty(n)&&this.setVisual(n,t[n]);else this._visual=this._visual||{},this._visual[t]=e},aw.setLayout=function(t,e){if(K_(t))for(var n in t)t.hasOwnProperty(n)&&this.setLayout(n,t[n]);else this._layout[t]=e},aw.getLayout=function(t){return this._layout[t]},aw.getItemLayout=function(t){return this._itemLayouts[t]},aw.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?o(this._itemLayouts[t]||{},e):e},aw.clearItemLayouts=function(){this._itemLayouts.length=0},aw.getItemVisual=function(t,e,n){var i=this._itemVisuals[t],r=i&&i[e];return null!=r||n?r:this.getVisual(e)},aw.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{},r=this.hasItemVisual;if(this._itemVisuals[t]=i,K_(e))for(var a in e)e.hasOwnProperty(a)&&(i[a]=e[a],r[a]=!0);else i[e]=n,r[e]=!0},aw.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};var ow=function(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType};aw.setItemGraphicEl=function(t,e){var n=this.hostModel;e&&(e.dataIndex=t,e.dataType=this.dataType,e.seriesIndex=n&&n.seriesIndex,"group"===e.type&&e.traverse(ow,e)),this._graphicEls[t]=e},aw.getItemGraphicEl=function(t){return this._graphicEls[t]},aw.eachItemGraphicEl=function(t,e){f(this._graphicEls,function(n,i){n&&t&&t.call(e,n,i)})},aw.cloneShallow=function(t){if(!t){var e=p(this.dimensions,this.getDimensionInfo,this);t=new rw(e,this.hostModel)}if(t._storage=this._storage,ql(t,this),this._indices){var n=this._indices.constructor;t._indices=new n(this._indices)}else t._indices=null;return t.getRawIndex=t._indices?Ql:Jl,t},aw.wrapMethod=function(t,e){var n=this[t];"function"==typeof n&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=n.apply(this,arguments);return e.apply(this,[t].concat(L(arguments)))})},aw.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],aw.CHANGABLE_METHODS=["filterSelf","selectRange"];var sw=function(t,e){return e=e||{},ah(e.coordDimensions||[],t,{dimsDef:e.dimensionsDefine||t.dimensionsDefine,encodeDef:e.encodeDefine||t.encodeDefine,dimCount:e.dimensionsCount,generateCoord:e.generateCoord,generateCoordCount:e.generateCoordCount})};ph.prototype.parse=function(t){return t},ph.prototype.getSetting=function(t){return this._setting[t]},ph.prototype.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},ph.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},ph.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},ph.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},ph.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},ph.prototype.getExtent=function(){return this._extent.slice()},ph.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},ph.prototype.isBlank=function(){return this._isBlank},ph.prototype.setBlank=function(t){this._isBlank=t},ph.prototype.getLabel=null,qi(ph),Qi(ph,{registerWhenExtend:!0}),gh.createByAxisModel=function(t){var e=t.option,n=e.data,i=n&&p(n,vh);return new gh({categories:i,needCollect:!i,deduplication:e.dedplication!==!1})};var lw=gh.prototype;lw.getOrdinal=function(t){return mh(this).get(t)},lw.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=mh(this);return e=i.get(t),null==e&&(n?(e=this.categories.length,this.categories[e]=t,i.set(t,e)):e=0/0),e};var hw=ph.prototype,uw=ph.extend({type:"ordinal",init:function(t,e){(!t||_(t))&&(t=new gh({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),hw.contain.call(this,t)&&null!=this._ordinalMeta.categories[t]},normalize:function(t){return hw.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(hw.scale.call(this,t))},getTicks:function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push(n),n++;return t},getLabel:function(t){return this.isBlank()?void 0: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:V,niceExtent:V});uw.create=function(){return new uw};var cw=Ga,dw=Ga,fw=ph.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},unionExtent:function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),fw.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=xh(t)},getTicks:function(){return bh(this._interval,this._extent,this._niceExtent,this._intervalPrecision)},getLabel:function(t,e){if(null==t)return"";var n=e&&e.precision;return null==n?n=Ua(t)||0:"auto"===n&&(n=this._intervalPrecision),t=dw(t,n,!0),eo(t)},niceTicks:function(t,e,n){t=t||5;var i=this._extent,r=i[1]-i[0];if(isFinite(r)){0>r&&(r=-r,i.reverse());var a=yh(i,t,e,n);this._intervalPrecision=a.intervalPrecision,this._interval=a.interval,this._niceExtent=a.niceTickExtent}},niceExtent:function(t){var e=this._extent;if(e[0]===e[1])if(0!==e[0]){var n=e[0];t.fixMax?e[0]-=n/2:(e[1]+=n/2,e[0]-=n/2)}else e[1]=1;var i=e[1]-e[0];isFinite(i)||(e[0]=0,e[1]=1),this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var r=this._interval;t.fixMin||(e[0]=dw(Math.floor(e[0]/r)*r)),t.fixMax||(e[1]=dw(Math.ceil(e[1]/r)*r))}});fw.create=function(){return new fw};var pw="__ec_stack_",gw=.5,mw="undefined"!=typeof Float32Array?Float32Array:Array,vw={seriesType:"bar",plan:Vx(),reset:function(t){function e(t,e){for(var n,c=new mw(2*t.count),d=[],f=[],p=0;null!=(n=t.next());)f[h]=e.get(o,n),f[1-h]=e.get(s,n),d=i.dataToPoint(f,null,d),c[p++]=d[0],c[p++]=d[1];e.setLayout({largePoints:c,barWidth:u,valueAxisStart:Ph(r,a,!1),valueAxisHorizontal:l})}if(kh(t)&&Lh(t)){var n=t.getData(),i=t.coordinateSystem,r=i.getBaseAxis(),a=i.getOtherAxis(r),o=n.mapDimension(a.dim),s=n.mapDimension(r.dim),l=a.isHorizontal(),h=l?0:1,u=Ch(Th([t]),r,t).width;return u>gw||(u=gw),{progress:e}}}},yw=fw.prototype,xw=Math.ceil,_w=Math.floor,ww=1e3,bw=60*ww,Sw=60*bw,Mw=24*Sw,Iw=function(t,e,n,i){for(;i>n;){var r=n+i>>>1;t[r][1]a&&(a=e),null!=n&&a>n&&(a=n);var o=Dw.length,s=Iw(Dw,a,0,o),l=Dw[Math.min(s,o-1)],h=l[1];if("year"===l[0]){var u=r/h,c=Ja(u/t,!0);h*=c}var d=this.getSetting("useUTC")?0:60*new Date(+i[0]||+i[1]).getTimezoneOffset()*1e3,f=[Math.round(xw((i[0]-d)/h)*h+d),Math.round(_w((i[1]-d)/h)*h+d)];wh(f,i),this._stepLvl=l,this._interval=h,this._niceExtent=f},parse:function(t){return+qa(t)}});f(["contain","normalize"],function(t){Tw.prototype[t]=function(e){return yw[t].call(this,this.parse(e))}});var Dw=[["hh:mm:ss",ww],["hh:mm:ss",5*ww],["hh:mm:ss",10*ww],["hh:mm:ss",15*ww],["hh:mm:ss",30*ww],["hh:mm\nMM-dd",bw],["hh:mm\nMM-dd",5*bw],["hh:mm\nMM-dd",10*bw],["hh:mm\nMM-dd",15*bw],["hh:mm\nMM-dd",30*bw],["hh:mm\nMM-dd",Sw],["hh:mm\nMM-dd",2*Sw],["hh:mm\nMM-dd",6*Sw],["hh:mm\nMM-dd",12*Sw],["MM-dd\nyyyy",Mw],["MM-dd\nyyyy",2*Mw],["MM-dd\nyyyy",3*Mw],["MM-dd\nyyyy",4*Mw],["MM-dd\nyyyy",5*Mw],["MM-dd\nyyyy",6*Mw],["week",7*Mw],["MM-dd\nyyyy",10*Mw],["week",14*Mw],["week",21*Mw],["month",31*Mw],["week",42*Mw],["month",62*Mw],["week",42*Mw],["quarter",380*Mw/4],["month",31*Mw*4],["month",31*Mw*5],["half-year",380*Mw/2],["month",31*Mw*8],["month",31*Mw*10],["year",380*Mw]];Tw.create=function(t){return new Tw({useUTC:t.ecModel.get("useUTC")})};var Cw=ph.prototype,Aw=fw.prototype,kw=Ua,Lw=Ga,Pw=Math.floor,Ow=Math.ceil,Nw=Math.pow,Ew=Math.log,Rw=ph.extend({type:"log",base:10,$constructor:function(){ph.apply(this,arguments),this._originalScale=new fw},getTicks:function(){var t=this._originalScale,e=this._extent,n=t.getExtent();return p(Aw.getTicks.call(this),function(i){var r=Ga(Nw(this.base,i));return r=i===e[0]&&t.__fixMin?Oh(r,n[0]):r,r=i===e[1]&&t.__fixMax?Oh(r,n[1]):r},this)},getLabel:Aw.getLabel,scale:function(t){return t=Cw.scale.call(this,t),Nw(this.base,t)},setExtent:function(t,e){var n=this.base;t=Ew(t)/Ew(n),e=Ew(e)/Ew(n),Aw.setExtent.call(this,t,e)},getExtent:function(){var t=this.base,e=Cw.getExtent.call(this);e[0]=Nw(t,e[0]),e[1]=Nw(t,e[1]);var n=this._originalScale,i=n.getExtent();return n.__fixMin&&(e[0]=Oh(e[0],i[0])),n.__fixMax&&(e[1]=Oh(e[1],i[1])),e},unionExtent:function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=Ew(t[0])/Ew(e),t[1]=Ew(t[1])/Ew(e),Cw.unionExtent.call(this,t)},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},niceTicks:function(t){t=t||10;var e=this._extent,n=e[1]-e[0];if(!(1/0===n||0>=n)){var i=Ka(n),r=t/n*i;for(.5>=r&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var a=[Ga(Ow(e[0]/i)*i),Ga(Pw(e[1]/i)*i)];this._interval=i,this._niceExtent=a}},niceExtent:function(t){Aw.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});f(["contain","normalize"],function(t){Rw.prototype[t]=function(e){return e=Ew(e)/Ew(this.base),Cw[t].call(this,e)}}),Rw.create=function(){return new Rw};var zw={getMin:function(t){var e=this.option,n=t||null==e.rangeStart?e.min:e.rangeStart;return this.axis&&null!=n&&"dataMin"!==n&&"function"!=typeof n&&!D(n)&&(n=this.axis.scale.parse(n)),n},getMax:function(t){var e=this.option,n=t||null==e.rangeEnd?e.max:e.rangeEnd;return this.axis&&null!=n&&"dataMax"!==n&&"function"!=typeof n&&!D(n)&&(n=this.axis.scale.parse(n)),n},getNeedCrossZero:function(){var t=this.option;return null!=t.rangeStart||null!=t.rangeEnd?!1:!t.scale},getCoordSysModel:V,setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},Bw=Ur({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var n=e.cx,i=e.cy,r=e.width/2,a=e.height/2;t.moveTo(n,i-a),t.lineTo(n+r,i+a),t.lineTo(n-r,i+a),t.closePath()}}),Fw=Ur({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var n=e.cx,i=e.cy,r=e.width/2,a=e.height/2;t.moveTo(n,i-a),t.lineTo(n+r,i),t.lineTo(n,i+a),t.lineTo(n-r,i),t.closePath()}}),Vw=Ur({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.x,i=e.y,r=e.width/5*3,a=Math.max(r,e.height),o=r/2,s=o*o/(a-o),l=i-a+o+s,h=Math.asin(s/o),u=Math.cos(h)*o,c=Math.sin(h),d=Math.cos(h),f=.6*o,p=.7*o;t.moveTo(n-u,l+s),t.arc(n,l,o,Math.PI-h,2*Math.PI+h),t.bezierCurveTo(n+u-c*f,l+s+d*f,n,i-p,n,i),t.bezierCurveTo(n,i-p,n-u+c*f,l+s+d*f,n-u,l+s),t.closePath()}}),Gw=Ur({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.height,i=e.width,r=e.x,a=e.y,o=i/3*2;t.moveTo(r,a),t.lineTo(r+o,a+n),t.lineTo(r,a+n/4*3),t.lineTo(r-o,a+n),t.lineTo(r,a),t.closePath()}}),Hw={line:hy,rect:ly,roundRect:ly,square:ly,circle:Qv,diamond:Fw,pin:Vw,arrow:Gw,triangle:Bw},Ww={line:function(t,e,n,i,r){r.x1=t,r.y1=e+i/2,r.x2=t+n,r.y2=e+i/2},rect:function(t,e,n,i,r){r.x=t,r.y=e,r.width=n,r.height=i},roundRect:function(t,e,n,i,r){r.x=t,r.y=e,r.width=n,r.height=i,r.r=Math.min(n,i)/4},square:function(t,e,n,i,r){var a=Math.min(n,i);r.x=t,r.y=e,r.width=a,r.height=a},circle:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.r=Math.min(n,i)/2},diamond:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.width=n,r.height=i},pin:function(t,e,n,i,r){r.x=t+n/2,r.y=e+i/2,r.width=n,r.height=i},arrow:function(t,e,n,i,r){r.x=t+n/2,r.y=e+i/2,r.width=n,r.height=i},triangle:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.width=n,r.height=i}},Uw={};f(Hw,function(t,e){Uw[e]=new t});var Xw=Ur({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},beforeBrush:function(){var t=this.style,e=this.shape;"pin"===e.symbolType&&"inside"===t.textPosition&&(t.textPosition=["50%","40%"],t.textAlign="center",t.textVerticalAlign="middle")},buildPath:function(t,e,n){var i=e.symbolType,r=Uw[i];"none"!==e.symbolType&&(r||(i="rect",r=Uw[i]),Ww[i](e.x,e.y,e.width,e.height,r.shape),r.buildPath(t,r.shape,n))}}),jw={isDimensionStacked:hh,enableDataStack:lh,getStackedDimension:uh},Yw=(Object.freeze||Object)({createList:Xh,getLayoutRect:co,dataStack:jw,createScale:jh,mixinAxisModelCommonMethods:Yh,completeDimensions:ah,createDimensions:sw,createSymbol:Uh}),Zw=1e-8;Kh.prototype={constructor:Kh,properties:null,getBoundingRect:function(){var t=this._rect; +if(t)return t;for(var e=Number.MAX_VALUE,n=[e,e],i=[-e,-e],r=[],a=[],o=this.geometries,s=0;si;i++)if("polygon"===n[i].type){var a=n[i].exterior,o=n[i].interiors;if(qh(a,t[0],t[1])){for(var s=0;s<(o?o.length:0);s++)if(qh(o[s]))continue t;return!0}}return!1},transformTo:function(t,e,n,i){var r=this.getBoundingRect(),a=r.width/r.height;n?i||(i=n/a):n=a*i;for(var o=new rn(t,e,n,i),s=r.calculateTransform(o),l=this.geometries,h=0;h0}),function(t){var e=t.properties,n=t.geometry,i=n.coordinates,r=[];"Polygon"===n.type&&r.push({type:"polygon",exterior:i[0],interiors:i.slice(1)}),"MultiPolygon"===n.type&&f(i,function(t){t[0]&&r.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})});var a=new Kh(e.name,r,e.cp);return a.properties=e,a})},Kw=Hi(),$w=[0,1],Jw=function(t,e,n){this.dim=t,this.scale=e,this._extent=n||[0,0],this.inverse=!1,this.onBand=!1};Jw.prototype={constructor:Jw,contain:function(t){var e=this._extent,n=Math.min(e[0],e[1]),i=Math.max(e[0],e[1]);return t>=n&&i>=t},containData:function(t){return this.contain(this.dataToCoord(t))},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(t){return Xa(t||this.scale.getExtent(),this._extent)},setExtent:function(t,e){var n=this._extent;n[0]=t,n[1]=e},dataToCoord:function(t,e){var n=this._extent,i=this.scale;return t=i.normalize(t),this.onBand&&"ordinal"===i.type&&(n=n.slice(),pu(n,i.count())),Fa(t,$w,n,e)},coordToData:function(t,e){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&(n=n.slice(),pu(n,i.count()));var r=Fa(t,n,$w,e);return this.scale.scale(r)},pointToData:function(){},getTicksCoords:function(t){t=t||{};var e=t.tickModel||this.getTickModel(),n=tu(this,e),i=n.ticks,r=p(i,function(t){return{coord:this.dataToCoord(t),tickValue:t}},this),a=e.get("alignWithLabel");return gu(this,r,n.tickCategoryInterval,a,t.clamp),r},getViewLabels:function(){return Qh(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(),n=e[1]-e[0]+(this.onBand?1:0);0===n&&(n=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/n},isHorizontal:null,getRotate:null,calculateCategoryInterval:function(){return hu(this)}};var Qw=qw,tb={};f(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],function(t){tb[t]=$p[t]});var eb=function(t){this._axes={},this._dimList=[],this.name=t||""};eb.prototype={constructor:eb,type:"cartesian",getAxis:function(t){return this._axes[t]},getAxes:function(){return p(this._dimList,mu,this)},getAxesByScale:function(t){return t=t.toLowerCase(),m(this.getAxes(),function(e){return e.scale.type===t})},addAxis:function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},dataToCoord:function(t){return this._dataCoordConvert(t,"dataToCoord")},coordToData:function(t){return this._dataCoordConvert(t,"coordToData")},_dataCoordConvert:function(t,e){for(var n=this._dimList,i=t instanceof Array?[]:{},r=0;re[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(nb,Jw);var ib={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)"]}}},rb={};rb.categoryAxis=r({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},ib),rb.valueAxis=r({boundaryGap:[0,0],splitNumber:5},ib),rb.timeAxis=s({scale:!0,min:"dataMin",max:"dataMax"},rb.valueAxis),rb.logAxis=s({scale:!0,logBase:10},rb.valueAxis);var ab=["value","category","time","log"],ob=function(t,e,n,i){f(ab,function(o){e.extend({type:t+"Axis."+o,mergeDefaultAndTheme:function(e,i){var a=this.layoutMode,s=a?po(e):{},l=i.getTheme();r(e,l.get(o+"Axis")),r(e,this.getDefaultOption()),e.type=n(t,e),a&&fo(e,s,a)},optionUpdated:function(){var t=this.option;"category"===t.type&&(this.__ordinalMeta=gh.createByAxisModel(this))},getCategories:function(t){var e=this.option;return"category"===e.type?t?e.data:this.__ordinalMeta.categories:void 0},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:a([{},rb[o+"Axis"],i],!0)})}),qy.registerSubTypeDefaulter(t+"Axis",x(n,t))},sb=qy.extend({type:"cartesian2dAxis",axis:null,init:function(){sb.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){sb.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){sb.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});r(sb.prototype,zw);var lb={offset:0};ob("x",sb,yu,lb),ob("y",sb,yu,lb),qy.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 hb=_u.prototype;hb.type="grid",hb.axisPointerEnabled=!0,hb.getRect=function(){return this._rect},hb.update=function(t,e){var n=this._axesMap;this._updateScale(t,this.model),f(n.x,function(t){Rh(t.scale,t.model)}),f(n.y,function(t){Rh(t.scale,t.model)}),f(n.x,function(t){wu(n,"y",t)}),f(n.y,function(t){wu(n,"x",t)}),this.resize(this.model,e)},hb.resize=function(t,e,n){function i(){f(a,function(t){var e=t.isHorizontal(),n=e?[0,r.width]:[0,r.height],i=t.inverse?1:0;t.setExtent(n[i],n[1-i]),Su(t,e?r.x:r.y)})}var r=co(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=r;var a=this._axesList;i(),!n&&t.get("containLabel")&&(f(a,function(t){if(!t.model.get("axisLabel.inside")){var e=Gh(t);if(e){var n=t.isHorizontal()?"height":"width",i=t.model.get("axisLabel.margin");r[n]-=e[n]+i,"top"===t.position?r.y+=e.height+i:"left"===t.position&&(r.x+=e.width+i)}}}),i())},hb.getAxis=function(t,e){var n=this._axesMap[t];if(null!=n){if(null==e)for(var i in n)if(n.hasOwnProperty(i))return n[i];return n[e]}},hb.getAxes=function(){return this._axesList.slice()},hb.getCartesian=function(t,e){if(null!=t&&null!=e){var n="x"+t+"y"+e;return this._coordsMap[n]}S(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var i=0,r=this._coordsList;it&&(t=e),t}});var db=jm([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),fb={getBarItemStyle:function(t){var e=db(this,t);if(this.getBorderLineDash){var n=this.getBorderLineDash();n&&(e.lineDash=n)}return e}},pb=["itemStyle","barBorderWidth"];o(Pa.prototype,fb),zl({type:"bar",render:function(t,e,n){this._updateDrawMode(t);var i=t.get("coordinateSystem");return("cartesian2d"===i||"polar"===i)&&(this._isLargeDraw?this._renderLarge(t,e,n):this._renderNormal(t,e,n)),this.group},incrementalPrepareRender:function(t){this._clear(),this._updateDrawMode(t)},incrementalRender:function(t,e){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){var e,n=this.group,i=t.getData(),r=this._data,a=t.coordinateSystem,o=a.getBaseAxis();"cartesian2d"===a.type?e=o.isHorizontal():"polar"===a.type&&(e="angle"===o.dim);var s=t.isAnimationEnabled()?t:null;i.diff(r).add(function(r){if(i.hasValue(r)){var o=i.getItemModel(r),l=mb[a.type](i,r,o),h=gb[a.type](i,r,o,l,e,s);i.setItemGraphicEl(r,h),n.add(h),Lu(h,i,r,o,l,t,e,"polar"===a.type)}}).update(function(o,l){var h=r.getItemGraphicEl(l);if(!i.hasValue(o))return void n.remove(h);var u=i.getItemModel(o),c=mb[a.type](i,o,u);h?Sa(h,{shape:c},s,o):h=gb[a.type](i,o,u,c,e,s,!0),i.setItemGraphicEl(o,h),n.add(h),Lu(h,i,o,u,c,t,e,"polar"===a.type)}).remove(function(t){var e=r.getItemGraphicEl(t);"cartesian2d"===a.type?e&&Au(t,s,e):e&&ku(t,s,e)}).execute(),this._data=i},_renderLarge:function(t){this._clear(),Ou(t,this.group)},_incrementalRenderLarge:function(t,e){Ou(e,this.group,!0)},dispose:V,remove:function(t){this._clear(t)},_clear:function(t){var e=this.group,n=this._data;t&&t.get("animation")&&n&&!this._isLargeDraw?n.eachItemGraphicEl(function(e){"sector"===e.type?ku(e.dataIndex,t,e):Au(e.dataIndex,t,e)}):e.removeAll(),this._data=null}});var gb={cartesian2d:function(t,e,n,i,r,a,s){var l=new ly({shape:o({},i)});if(a){var h=l.shape,u=r?"height":"width",c={};h[u]=0,c[u]=i[u],Sy[s?"updateProps":"initProps"](l,{shape:c},a,e)}return l},polar:function(t,e,n,i,r,a,o){var l=i.startAngle0?1:-1,o=i.height>0?1:-1;return{x:i.x+a*r/2,y:i.y+o*r/2,width:i.width-a*r,height:i.height-o*r}},polar:function(t,e){var n=t.getItemLayout(e);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle}}},vb=Or.extend({type:"largeBar",shape:{points:[]},buildPath:function(t,e){for(var n=e.points,i=this.__startPoint,r=this.__valueIdx,a=0;ah[1]?-1:1,c=["start"===r?h[0]-u*l:"end"===r?h[1]+u*l:(h[0]+h[1])/2,Gu(r)?t.labelOffset+a*l:0],d=e.get("nameRotate");null!=d&&(d=d*yb/180);var f;Gu(r)?i=wb(t.rotation,null!=d?d:t.rotation,a):(i=Ru(t,r,d||0,h),f=t.axisNameAvailableWidth,null!=f&&(f=Math.abs(f/Math.sin(i.rotation)),!isFinite(f)&&(f=null)));var p=s.getFont(),g=e.get("nameTruncate",!0)||{},m=g.ellipsis,v=C(t.nameTruncateMaxWidth,g.maxWidth,f),y=null!=m&&null!=v?Vy(n,v,p,m,{minChar:2,placeholder:g.placeholder}):n,x=e.get("tooltip",!0),_=e.mainType,w={componentType:_,name:n,$vars:["name"]};w[_+"Index"]=e.componentIndex;var b=new Jv({anid:"name",__fullText:n,__truncatedText:y,position:c,rotation:i.rotation,silent:zu(e),z2:1,tooltip:x&&x.show?o({content:n,formatter:function(){return n},formatterParams:w},x):null});fa(b.style,s,{text:y,textFont:p,textFill:s.getTextColor()||e.get("axisLine.lineStyle.color"),textAlign:i.textAlign,textVerticalAlign:i.textVerticalAlign}),e.get("triggerEvent")&&(b.eventData=Eu(e),b.eventData.targetType="axisName",b.eventData.name=n),this._dumbGroup.add(b),b.updateTransform(),this.group.add(b),b.decomposeTransform()}}},wb=xb.innerTextLayout=function(t,e,n){var i,r,a=Ya(e-t);return Za(a)?(r=n>0?"top":"bottom",i="center"):Za(a-yb)?(r=n>0?"bottom":"top",i="center"):(r="middle",i=a>0&&yb>a?n>0?"right":"left":n>0?"left":"right"),{rotation:a,textAlign:i,textVerticalAlign:r}},bb=f,Sb=x,Mb=El({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(t,e,n,i){this.axisPointerClass&&Ku(t),Mb.superApply(this,"render",arguments),ec(this,t,e,n,i,!0)},updateAxisPointer:function(t,e,n,i){ec(this,t,e,n,i,!1)},remove:function(t,e){var n=this._axisPointer;n&&n.remove(e),Mb.superApply(this,"remove",arguments)},dispose:function(t,e){nc(this,e),Mb.superApply(this,"dispose",arguments)}}),Ib=[];Mb.registerAxisPointerClass=function(t,e){Ib[t]=e},Mb.getAxisPointerClass=function(t){return t&&Ib[t]};var Tb=["axisLine","axisTickLabel","axisName"],Db=["splitArea","splitLine"],Cb=Mb.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(t,e,n,i){this.group.removeAll();var r=this._axisGroup;if(this._axisGroup=new Vg,this.group.add(this._axisGroup),t.get("show")){var a=t.getCoordSysModel(),o=ic(a,t),s=new xb(t,o);f(Tb,s.add,s),this._axisGroup.add(s.getGroup()),f(Db,function(e){t.get(e+".show")&&this["_"+e](t,a)},this),Ca(r,this._axisGroup,t),Cb.superCall(this,"render",t,e,n,i)}},remove:function(){this._splitAreaColors=null},_splitLine:function(t,e){var n=t.axis;if(!n.scale.isBlank()){var i=t.getModel("splitLine"),r=i.getModel("lineStyle"),a=r.get("color");a=_(a)?a:[a];for(var o=e.coordinateSystem.getRect(),l=n.isHorizontal(),h=0,u=n.getTicksCoords({tickModel:i}),c=[],d=[],f=r.getLineStyle(),p=0;p0&&gc(n[r-1]);r--);for(;r>i&&gc(n[i]);i++);}for(;r>i;)i+=mc(t,n,i,r,r,1,a.min,a.max,e.smooth,e.smoothMonotone,e.connectNulls)+1}}),Xb=Or.extend({type:"ec-polygon",shape:{points:[],stackedOnPoints:[],smooth:0,stackedOnSmooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},brush:ey(Or.prototype.brush),buildPath:function(t,e){var n=e.points,i=e.stackedOnPoints,r=0,a=n.length,o=e.smoothMonotone,s=xc(n,e.smoothConstraint),l=xc(i,e.smoothConstraint);if(e.connectNulls){for(;a>0&&gc(n[a-1]);a--);for(;a>r&&gc(n[r]);r++);}for(;a>r;){var h=mc(t,n,r,a,a,1,s.min,s.max,e.smooth,o,e.connectNulls);mc(t,i,r+h-1,h,a,-1,l.min,l.max,e.stackedOnSmooth,o,e.connectNulls),r+=h+1,t.closePath()}}});Ds.extend({type:"line",init:function(){var t=new Vg,e=new sc;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},render:function(t,e,n){var i=t.coordinateSystem,r=this.group,a=t.getData(),o=t.getModel("lineStyle"),l=t.getModel("areaStyle"),h=a.mapArray(a.getItemLayout),u="polar"===i.type,c=this._coordSys,d=this._symbolDraw,f=this._polyline,p=this._polygon,g=this._lineGroup,m=t.get("animation"),v=!l.isEmpty(),y=l.get("origin"),x=cc(i,a,y),_=Sc(i,a,x),w=t.get("showSymbol"),b=w&&!u&&Ac(t,a,i),S=this._data;S&&S.eachItemGraphicEl(function(t,e){t.__temp&&(r.remove(t),S.setItemGraphicEl(e,null))}),w||d.remove(),r.add(g);var M=!u&&t.get("step");f&&c.type===i.type&&M===this._step?(v&&!p?p=this._newPolygon(h,_,i,m):p&&!v&&(g.remove(p),p=this._polygon=null),g.setClipPath(Tc(i,!1,!1,t)),w&&d.updateData(a,{isIgnore:b,clipShape:Tc(i,!1,!0,t)}),a.eachItemGraphicEl(function(t){t.stopAnimation(!0)}),_c(this._stackedOnPoints,_)&&_c(this._points,h)||(m?this._updateAnimation(a,_,i,n,M,y):(M&&(h=Dc(h,i,M),_=Dc(_,i,M)),f.setShape({points:h}),p&&p.setShape({points:h,stackedOnPoints:_})))):(w&&d.updateData(a,{isIgnore:b,clipShape:Tc(i,!1,!0,t)}),M&&(h=Dc(h,i,M),_=Dc(_,i,M)),f=this._newPolyline(h,i,m),v&&(p=this._newPolygon(h,_,i,m)),g.setClipPath(Tc(i,!0,!1,t)));var I=Cc(a,i)||a.getVisual("color");f.useStyle(s(o.getLineStyle(),{fill:"none",stroke:I,lineJoin:"bevel"}));var T=t.get("smooth");if(T=wc(t.get("smooth")),f.setShape({smooth:T,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")}),p){var D=a.getCalculationInfo("stackedOnSeries"),C=0;p.useStyle(s(l.getAreaStyle(),{fill:I,opacity:.7,lineJoin:"bevel"})),D&&(C=wc(D.get("smooth"))),p.setShape({smooth:T,stackedOnSmooth:C,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")})}this._data=a,this._coordSys=i,this._stackedOnPoints=_,this._points=h,this._step=M,this._valueOrigin=y},dispose:function(){},highlight:function(t,e,n,i){var r=t.getData(),a=Gi(r,i);if(!(a instanceof Array)&&null!=a&&a>=0){var o=r.getItemGraphicEl(a);if(!o){var s=r.getItemLayout(a);if(!s)return;o=new rc(r,a),o.position=s,o.setZ(t.get("zlevel"),t.get("z")),o.ignore=isNaN(s[0])||isNaN(s[1]),o.__temp=!0,r.setItemGraphicEl(a,o),o.stopSymbolAnimation(!0),this.group.add(o)}o.highlight()}else Ds.prototype.highlight.call(this,t,e,n,i)},downplay:function(t,e,n,i){var r=t.getData(),a=Gi(r,i);if(null!=a&&a>=0){var o=r.getItemGraphicEl(a);o&&(o.__temp?(r.setItemGraphicEl(a,null),this.group.remove(o)):o.downplay())}else Ds.prototype.downplay.call(this,t,e,n,i)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new Ub({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e,e +},_newPolygon:function(t,e){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new Xb({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(n),this._polygon=n,n},_updateAnimation:function(t,e,n,i,r,a){var o=this._polyline,s=this._polygon,l=t.hostModel,h=Rb(this._data,t,this._stackedOnPoints,e,this._coordSys,n,this._valueOrigin,a),u=h.current,c=h.stackedOnCurrent,d=h.next,f=h.stackedOnNext;r&&(u=Dc(h.current,n,r),c=Dc(h.stackedOnCurrent,n,r),d=Dc(h.next,n,r),f=Dc(h.stackedOnNext,n,r)),o.shape.__points=h.current,o.shape.points=u,Sa(o,{shape:{points:d}},l),s&&(s.setShape({points:u,stackedOnPoints:c}),Sa(s,{shape:{points:d,stackedOnPoints:f}},l));for(var p=[],g=h.status,m=0;me&&(e=t[n]);return isFinite(e)?e:0/0},min:function(t){for(var e=1/0,n=0;n1){var h;"string"==typeof n?h=Zb[n]:"function"==typeof n&&(h=n),h&&t.setData(e.downSample(e.mapDimension(a.dim),1/l,h,qb))}}}}};Ll(jb("line","circle","line")),kl(Yb("line")),Il(T_.PROCESSOR.STATISTIC,Kb("line"));var $b=function(t,e,n){e=_(e)&&{coordDimensions:e}||o({},e);var i=t.getSource(),r=sw(i,e),a=new rw(r,t);return a.initData(i,n),a},Jb={updateSelectedMap:function(t){this._targetList=_(t)?t.slice():[],this._selectTargetMap=g(t||[],function(t,e){return t.set(e.name,e),t},B())},select:function(t,e){var n=null!=e?this._targetList[e]:this._selectTargetMap.get(t),i=this.get("selectedMode");"single"===i&&this._selectTargetMap.each(function(t){t.selected=!1}),n&&(n.selected=!0)},unSelect:function(t,e){var n=null!=e?this._targetList[e]:this._selectTargetMap.get(t);n&&(n.selected=!1)},toggleSelected:function(t,e){var n=null!=e?this._targetList[e]:this._selectTargetMap.get(t);return null!=n?(this[n.selected?"unSelect":"select"](t,e),n.selected):void 0},isSelected:function(t,e){var n=null!=e?this._targetList[e]:this._selectTargetMap.get(t);return n&&n.selected}},Qb=Rl({type:"series.pie",init:function(t){Qb.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()},this.updateSelectedMap(this._createSelectableList()),this._defaultLabelLine(t)},mergeOption:function(t){Qb.superCall(this,"mergeOption",t),this.updateSelectedMap(this._createSelectableList())},getInitialData:function(){return $b(this,["value"])},_createSelectableList:function(){for(var t=this.getRawData(),e=t.mapDimension("value"),n=[],i=0,r=t.count();r>i;i++)n.push({name:t.getName(i),value:t.get(e,i),selected:ps(t,i,"selected")});return n},getDataParams:function(t){var e=this.getData(),n=Qb.superCall(this,"getDataParams",t),i=[];return e.each(e.mapDimension("value"),function(t){i.push(t)}),n.percent=ja(i,t,e.hostModel.get("percentPrecision")),n.$vars.push("percent"),n},_defaultLabelLine:function(t){Ni(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},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,selectedOffset:10,hoverOffset:10,avoidLabelOverlap:!0,percentPrecision:2,stillShowZeroSum:!0,label:{rotate:!1,show:!0,position:"outer"},labelLine:{show:!0,length:15,length2:15,smooth:!1,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1},animationType:"expansion",animationEasing:"cubicOut"}});c(Qb,Jb);var tS=Oc.prototype;tS.updateData=function(t,e,n){function i(){a.stopAnimation(!0),a.animateTo({shape:{r:u.r+l.get("hoverOffset")}},300,"elasticOut")}function r(){a.stopAnimation(!0),a.animateTo({shape:{r:u.r}},300,"elasticOut")}var a=this.childAt(0),l=t.hostModel,h=t.getItemModel(e),u=t.getItemLayout(e),c=o({},u);if(c.label=null,n){a.setShape(c);var d=l.getShallow("animationType");"scale"===d?(a.shape.r=u.r0,Ma(a,{shape:{r:u.r}},l,e)):(a.shape.endAngle=u.startAngle,Sa(a,{shape:{endAngle:u.endAngle}},l,e))}else Sa(a,{shape:c},l,e);var f=t.getItemVisual(e,"color");a.useStyle(s({lineJoin:"bevel",fill:f},h.getModel("itemStyle").getItemStyle())),a.hoverStyle=h.getModel("emphasis.itemStyle").getItemStyle();var p=h.getShallow("cursor");p&&a.attr("cursor",p),Pc(this,t.getItemLayout(e),l.isSelected(null,e),l.get("selectedOffset"),l.get("animation")),a.off("mouseover").off("mouseout").off("emphasis").off("normal"),h.get("hoverAnimation")&&l.isAnimationEnabled()&&a.on("mouseover",i).on("mouseout",r).on("emphasis",i).on("normal",r),this._updateLabel(t,e),ca(this)},tS._updateLabel=function(t,e){var n=this.childAt(1),i=this.childAt(2),r=t.hostModel,a=t.getItemModel(e),o=t.getItemLayout(e),s=o.label,l=t.getItemVisual(e,"color");Sa(n,{shape:{points:s.linePoints||[[s.x,s.y],[s.x,s.y],[s.x,s.y]]}},r,e),Sa(i,{style:{x:s.x,y:s.y}},r,e),i.attr({rotation:s.rotation,origin:[s.x,s.y],z2:10});var h=a.getModel("label"),u=a.getModel("emphasis.label"),c=a.getModel("labelLine"),d=a.getModel("emphasis.labelLine"),l=t.getItemVisual(e,"color");da(i.style,i.hoverStyle={},h,u,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:t.getName(e),autoColor:l,useInsideStyle:!!s.inside},{textAlign:s.textAlign,textVerticalAlign:s.verticalAlign,opacity:t.getItemVisual(e,"opacity")}),i.ignore=i.normalIgnore=!h.get("show"),i.hoverIgnore=!u.get("show"),n.ignore=n.normalIgnore=!c.get("show"),n.hoverIgnore=!d.get("show"),n.setStyle({stroke:l,opacity:t.getItemVisual(e,"opacity")}),n.setStyle(c.getModel("lineStyle").getLineStyle()),n.hoverStyle=d.getModel("lineStyle").getLineStyle();var f=c.get("smooth");f&&f===!0&&(f=.4),n.setShape({smooth:f})},u(Oc,Vg);var eS=(Ds.extend({type:"pie",init:function(){var t=new Vg;this._sectorGroup=t},render:function(t,e,n,i){if(!i||i.from!==this.uid){var r=t.getData(),a=this._data,o=this.group,s=e.get("animation"),l=!a,h=t.get("animationType"),u=x(Lc,this.uid,t,s,n),c=t.get("selectedMode");if(r.diff(a).add(function(t){var e=new Oc(r,t);l&&"scale"!==h&&e.eachChild(function(t){t.stopAnimation(!0)}),c&&e.on("click",u),r.setItemGraphicEl(t,e),o.add(e)}).update(function(t,e){var n=a.getItemGraphicEl(e);n.updateData(r,t),n.off("click"),c&&n.on("click",u),o.add(n),r.setItemGraphicEl(t,n)}).remove(function(t){var e=a.getItemGraphicEl(t);o.remove(e)}).execute(),s&&l&&r.count()>0&&"scale"!==h){var d=r.getItemLayout(0),f=Math.max(n.getWidth(),n.getHeight())/2,p=y(o.removeClipPath,o);o.setClipPath(this._createClipPath(d.cx,d.cy,f,d.startAngle,d.clockwise,p,t))}this._data=r}},dispose:function(){},_createClipPath:function(t,e,n,i,r,a,o){var s=new ny({shape:{cx:t,cy:e,r0:0,r:n,startAngle:i,endAngle:i,clockwise:r}});return Ma(s,{shape:{endAngle:i+(r?1:-1)*Math.PI*2}},o,a),s},containPoint:function(t,e){var n=e.getData(),i=n.getItemLayout(0);if(i){var r=t[0]-i.cx,a=t[1]-i.cy,o=Math.sqrt(r*r+a*a);return o<=i.r&&o>=i.r0}}}),function(t,e){f(e,function(e){e.update="updateView",Dl(e,function(n,i){var r={};return i.eachComponent({mainType:"series",subType:t,query:n},function(t){t[e.method]&&t[e.method](n.name,n.dataIndex);var i=t.getData();i.each(function(e){var n=i.getName(e);r[n]=t.isSelected(n)||!1})}),{name:n.name,selected:r}})})}),nS=function(t){return{getTargetSeries:function(e){var n={},i=B();return e.eachSeriesByType(t,function(t){t.__paletteScope=n,i.set(t.uid,t)}),i},reset:function(t){var e=t.getRawData(),n={},i=t.getData();i.each(function(t){var e=i.getRawIndex(t);n[e]=t}),e.each(function(r){var a=n[r],o=null!=a&&i.getItemVisual(a,"color",!0);if(o)e.setItemVisual(r,"color",o);else{var s=e.getItemModel(r),l=s.get("itemStyle.color")||t.getColorFromPalette(e.getName(r)||r+"",t.__paletteScope,e.count());e.setItemVisual(r,"color",l),null!=a&&i.setItemVisual(a,"color",l)}})}}},iS=function(t,e,n,i){var r,a,o=t.getData(),s=[],l=!1;o.each(function(n){var i,h,u,c,d=o.getItemLayout(n),f=o.getItemModel(n),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);r=d.cx,a=d.cy;var b="inside"===g||"inner"===g;if("center"===g)i=d.cx,h=d.cy,c="center";else{var S=(b?(d.r+d.r0)/2*_:d.r*_)+r,M=(b?(d.r+d.r0)/2*w:d.r*w)+a;if(i=S+3*_,h=M+3*w,!b){var I=S+_*(v+e-d.r),T=M+w*(v+e-d.r),D=I+(0>_?-1:1)*y,C=T;i=D+(0>_?-5:5),h=C,u=[[S,M],[I,T],[D,C]]}c=b?"center":_>0?"left":"right"}var A=p.getFont(),k=p.get("rotate")?0>_?-x+Math.PI:-x:0,L=t.getFormattedLabel(n,"normal")||o.getName(n),P=Mn(L,A,c,"top");l=!!k,d.label={x:i,y:h,position:g,height:P.height,len:v,len2:y,linePoints:u,textAlign:c,verticalAlign:"middle",rotation:k,inside:b},b||s.push(d.label)}),!l&&t.get("avoidLabelOverlap")&&Ec(s,r,a,e,n,i)},rS=2*Math.PI,aS=Math.PI/180,oS=function(t,e,n){e.eachSeriesByType(t,function(t){var e=t.getData(),i=e.mapDimension("value"),r=t.get("center"),a=t.get("radius");_(a)||(a=[0,a]),_(r)||(r=[r,r]);var o=n.getWidth(),s=n.getHeight(),l=Math.min(o,s),h=Va(r[0],o),u=Va(r[1],s),c=Va(a[0],l/2),d=Va(a[1],l/2),f=-t.get("startAngle")*aS,p=t.get("minAngle")*aS,g=0;e.each(i,function(t){!isNaN(t)&&g++});var m=e.getSum(i),v=Math.PI/(m||g)*2,y=t.get("clockwise"),x=t.get("roseType"),w=t.get("stillShowZeroSum"),b=e.getDataExtent(i);b[0]=0;var S=rS,M=0,I=f,T=y?1:-1;if(e.each(i,function(t,n){var i;if(isNaN(t))return void e.setItemLayout(n,{angle:0/0,startAngle:0/0,endAngle:0/0,clockwise:y,cx:h,cy:u,r0:c,r:x?0/0:d});i="area"!==x?0===m&&w?v:t*v:rS/g,p>i?(i=p,S-=p):M+=t;var r=I+T*i;e.setItemLayout(n,{angle:i,startAngle:I,endAngle:r,clockwise:y,cx:h,cy:u,r0:c,r:x?Fa(t,b,[c,d]):d}),I=r}),rS>S&&g)if(.001>=S){var D=rS/g;e.each(i,function(t,n){if(!isNaN(t)){var i=e.getItemLayout(n);i.angle=D,i.startAngle=f+T*n*D,i.endAngle=f+T*(n+1)*D}})}else v=S/M,I=f,e.each(i,function(t,n){if(!isNaN(t)){var i=e.getItemLayout(n),r=i.angle===p?p:t*v;i.startAngle=I,i.endAngle=I+T*r,I+=T*r}});iS(t,d,o,s)})},sS=function(t){return{seriesType:t,reset:function(t,e){var n=e.findComponents({mainType:"legend"});if(n&&n.length){var i=t.getData();i.filterSelf(function(t){for(var e=i.getName(t),r=0;ru&&(r=h,s=l,o=u)}return[s,+(r&&r.coodToData(i))]},zc.prototype.resize=function(t,e){var n=t.get("center"),i=e.getWidth(),r=e.getHeight(),a=Math.min(i,r)/2;this.cx=Va(n[0],i),this.cy=Va(n[1],r),this.startAngle=t.get("startAngle")*Math.PI/180,this.r=Va(t.get("radius"),a),f(this._indicatorAxes,function(t,e){t.setExtent(0,this.r);var n=this.startAngle+e*Math.PI*2/this._indicatorAxes.length;n=Math.atan2(Math.sin(n),Math.cos(n)),t.angle=n},this)},zc.prototype.update=function(t){function e(t){var e=Math.pow(10,Math.floor(Math.log(t)/Math.LN10)),n=t/e;return 2===n?n=5:n*=2,n*e}var n=this._indicatorAxes,i=this._model;f(n,function(t){t.scale.setExtent(1/0,-1/0)}),t.eachSeriesByType("radar",function(e){if("radar"===e.get("coordinateSystem")&&t.getComponent("radar",e.get("radarIndex"))===i){var r=e.getData();f(n,function(t){t.scale.unionExtentFromData(r,r.mapDimension(t.dim))})}},this);var r=i.get("splitNumber");f(n,function(t){var n=Nh(t.scale,t.model);Rh(t.scale,t.model);var i=t.model,a=t.scale,o=i.getMin(),s=i.getMax(),l=a.getInterval();if(null!=o&&null!=s)a.setExtent(+o,+s),a.setInterval((s-o)/r);else if(null!=o){var h;do h=o+l*r,a.setExtent(+o,h),a.setInterval(l),l=e(l);while(hn[0]&&isFinite(u)&&isFinite(n[0]))}else{var c=a.getTicks().length-1;c>r&&(l=e(l));var d=Math.round((n[0]+n[1])/2/l)*l,f=Math.round(r/2);a.setExtent(Ga(d-f*l),Ga(d+(r-f)*l)),a.setInterval(l)}})},zc.dimensions=[],zc.create=function(t,e){var n=[];return t.eachComponent("radar",function(i){var r=new zc(i,t,e);n.push(r),i.coordinateSystem=r}),t.eachSeriesByType("radar",function(t){"radar"===t.get("coordinateSystem")&&(t.coordinateSystem=n[t.get("radarIndex")||0])}),n},Go.register("radar",zc);var lS=rb.valueAxis,hS=(Nl({type:"radar",optionUpdated:function(){var t=this.get("boundaryGap"),e=this.get("splitNumber"),n=this.get("scale"),a=this.get("axisLine"),l=this.get("axisTick"),h=this.get("axisLabel"),u=this.get("name"),c=this.get("name.show"),d=this.get("name.formatter"),f=this.get("nameGap"),g=this.get("triggerEvent"),m=p(this.get("indicator")||[],function(p){null!=p.max&&p.max>0&&!p.min?p.min=0:null!=p.min&&p.min<0&&!p.max&&(p.max=0);var m=u;if(null!=p.color&&(m=s({color:p.color},u)),p=r(i(p),{boundaryGap:t,splitNumber:e,scale:n,axisLine:a,axisTick:l,axisLabel:h,name:p.text,nameLocation:"end",nameGap:f,nameTextStyle:m,triggerEvent:g},!1),c||(p.name=""),"string"==typeof d){var v=p.name;p.name=d.replace("{value}",null!=v?v:"")}else"function"==typeof d&&(p.name=d(p.name,p));var y=o(new Pa(p,null,this.ecModel),zw);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:r({lineStyle:{color:"#bbb"}},lS.axisLine),axisLabel:Bc(lS.axisLabel,!1),axisTick:Bc(lS.axisTick,!1),splitLine:Bc(lS.splitLine,!0),splitArea:Bc(lS.splitArea,!0),indicator:[]}}),["axisLine","axisTickLabel","axisName"]);El({type:"radar",render:function(t){var e=this.group;e.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},_buildAxes:function(t){var e=t.coordinateSystem,n=e.getIndicatorAxes(),i=p(n,function(t){var n=new xb(t.model,{position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return n});f(i,function(t){f(hS,t.add,t),this.group.add(t.getGroup())},this)},_buildSplitLineAndArea:function(t){function e(t,e,n){var i=n%e.length;return t[i]=t[i]||[],i}var n=t.coordinateSystem,i=n.getIndicatorAxes();if(i.length){var r=t.get("shape"),a=t.getModel("splitLine"),o=t.getModel("splitArea"),l=a.getModel("lineStyle"),h=o.getModel("areaStyle"),u=a.get("show"),c=o.get("show"),d=l.get("color"),g=h.get("color");d=_(d)?d:[d],g=_(g)?g:[g];var m=[],v=[];if("circle"===r)for(var y=i[0].getTicksCoords(),x=n.cx,w=n.cy,b=0;b=b;b++){for(var D=[],C=0;C"+p(i,function(n){var i=e.get(e.mapDimension(n.dim),t);return io(n.name+" : "+i)}).join("
")},defaultOption:{zlevel:0,z:2,coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid"},label:{position:"top"},symbol:"emptyCircle",symbolSize:4}});zl({type:"radar",render:function(t){function e(t,e){var n=t.getItemVisual(e,"symbol")||"circle",i=t.getItemVisual(e,"color");if("none"!==n){var r=Fc(t.getItemVisual(e,"symbolSize")),a=Uh(n,-1,-1,2,2,i);return a.attr({style:{strokeNoScale:!0},z2:100,scale:[r[0]/2,r[1]/2]}),a}}function n(n,i,r,a,o,s){r.removeAll();for(var l=0;le&&(e=i.height)}this.height=e+1},getNodeById:function(t){if(this.getId()===t)return this;for(var e=0,n=this.children,i=n.length;i>e;e++){var r=n[e].getNodeById(t);if(r)return r}},contains:function(t){if(t===this)return!0;for(var e=0,n=this.children,i=n.length;i>e;e++){var r=n[e].contains(t);if(r)return r}},getAncestors:function(t){for(var e=[],n=t?this:this.parentNode;n;)e.push(n),n=n.parentNode;return e.reverse(),e},getValue:function(t){var e=this.hostTree.data;return e.get(e.getDimension(t||"value"),this.dataIndex)},setLayout:function(t,e){this.dataIndex>=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,n=this.hostTree,i=n.data.getItemModel(this.dataIndex),r=this.getLevelModel();return r||0!==this.children.length&&(0===this.children.length||this.isExpand!==!1)||(e=this.getLeavesModel()),i.getModel(t,(r||e||n.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)}},Zc.prototype={constructor:Zc,type:"tree",eachNode:function(t,e,n){this.root.eachNode(t,e,n)},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,n=0,i=e.length;i>n;n++)e[n].dataIndex=-1;for(var n=0,i=t.count();i>n;n++)e[t.getRawIndex(n)].dataIndex=n},clearLayouts:function(){this.data.clearItemLayouts()}},Zc.createTree=function(t,e,n){function i(t,e){var n=t.value;o=Math.max(o,_(n)?n.length:1),a.push(t);var s=new mS(t.name,r);e?qc(s,e):r.root=s,r._nodes.push(s);var l=t.children;if(l)for(var h=0;ha&&(a=t.depth)});var o=t.expandAndCollapse,s=o&&t.initialTreeDepth>=0?t.initialTreeDepth:a;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<=s}),r.data},getOrient:function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(t="TB"),t},formatTooltip:function(t){for(var e=this.getData().tree,n=e.root.children[0],i=e.getNodeByDataIndex(t),r=i.getValue(),a=i.name;i&&i!==n;)a=i.parentNode.name+"."+a,i=i.parentNode;return io(a+(isNaN(r)||null==r?"":" : "+r))},defaultOption:{zlevel:0,z:2,left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",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}}),zl({type:"tree",init:function(){this._oldTree,this._mainGroup=new Vg,this.group.add(this._mainGroup)},render:function(t,e,n){var i=t.getData(),r=t.layoutInfo,a=this._mainGroup,o=t.get("layout");"radial"===o?a.attr("position",[r.x+r.width/2,r.y+r.height/2]):a.attr("position",[r.x,r.y]);var s=this._data,l={expandAndCollapse:t.get("expandAndCollapse"),layout:o,orient:t.getOrient(),curvature:t.get("lineStyle.curveness"),symbolRotate:t.get("symbolRotate"),symbolOffset:t.get("symbolOffset"),hoverAnimation:t.get("hoverAnimation"),useNameLabel:!0,fadeIn:!0};i.diff(s).add(function(e){hd(i,e)&&cd(i,e,null,a,t,l)}).update(function(e,n){var r=s.getItemGraphicEl(n);return hd(i,e)?void cd(i,e,r,a,t,l):void(r&&dd(s,n,r,a,t,l))}).remove(function(e){var n=s.getItemGraphicEl(e);n&&dd(s,e,n,a,t,l)}).execute(),l.expandAndCollapse===!0&&i.eachItemGraphicEl(function(e,i){e.off("click").on("click",function(){n.dispatchAction({type:"treeExpandAndCollapse",seriesId:t.id,dataIndex:i})})}),this._data=i},dispose:function(){},remove:function(){this._mainGroup.removeAll(),this._data=null}}),Dl({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"tree",query:t},function(e){var n=t.dataIndex,i=e.getData().tree,r=i.getNodeByDataIndex(n);r.isExpand=!r.isExpand})});var vS=function(t,e){t.eachSeriesByType("tree",function(t){md(t,e)})};Ll(jb("tree","circle")),kl(vS);var yS=ae;c(vd,fg),yd.prototype={constructor:yd,type:"view",dimensions:["x","y"],setBoundingRect:function(t,e,n,i){return this._rect=new rn(t,e,n,i),this._rect},getBoundingRect:function(){return this._rect},setViewRect:function(t,e,n,i){this.transformTo(t,e,n,i),this._viewRect=new rn(t,e,n,i)},transformTo:function(t,e,n,i){var r=this.getBoundingRect(),a=this._rawTransformable;a.transform=r.calculateTransform(new rn(t,e,n,i)),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(),e=t.x+t.width/2,n=t.y+t.height/2;return[e,n]},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,n=this.getDefaultCenter(),i=this.getCenter(),r=this.getZoom();i=ae([],i,t),n=ae([],n,t),e.origin=i,e.position=[n[0]-i[0],n[1]-i[1]],e.scale=[r,r],this._updateTransform()},_updateTransform:function(){var t=this._roamTransformable,e=this._rawTransformable;e.parent=t,t.updateTransform(),e.updateTransform(),ge(this.transform||(this.transform=[]),e.transform||fe()),this._rawTransform=e.getLocalTransform(),this.invTransform=this.invTransform||[],_e(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,n){var i=e?this._rawTransform:this.transform;return n=n||[],i?yS(n,t,i):H(n,t)},pointToData:function(t){var e=this.invTransform;return e?yS([],t,e):[t[0],t[1]]},convertToPixel:x(xd,"dataToPoint"),convertFromPixel:x(xd,"pointToData"),containPoint:function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])}},c(yd,fg);for(var xS=[126,25],_S=[[[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]]],wS=0;wS<_S.length;wS++)for(var bS=0;bS<_S[wS].length;bS++)_S[wS][bS][0]/=10.5,_S[wS][bS][1]/=-14,_S[wS][bS][0]+=xS[0],_S[wS][bS][1]+=xS[1];var SS=function(t){"china"===t.map&&t.regions.push(new Kh("南海诸岛",p(_S,function(t){return{type:"polygon",exterior:t}}),xS))},MS={"南海诸岛":[32,80],"广东":[0,-10],"香港":[10,5],"澳门":[-10,10],"天津":[5,5]},IS=function(t){f(t.regions,function(t){var e=MS[t.name];if(e){var n=t.center;n[0]+=e[0]/10.5,n[1]+=-e[1]/14}})},TS={Russia:[100,60],"United States":[-99,38],"United States of America":[-99,38]},DS=function(t){f(t.regions,function(t){var e=TS[t.name];if(e){var n=t.center;n[0]=e[0],n[1]=e[1]}})},CS=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]],AS=function(t){if("china"===t.map)for(var e=0,n=t.regions.length;n>e;++e)"台湾"===t.regions[e].name&&t.regions[e].geometries.push({type:"polygon",exterior:CS[0]})},kS=[SS,IS,DS,AS];_d.prototype={constructor:_d,type:"geo",dimensions:["lng","lat"],containCoord:function(t){for(var e=this.regions,n=0;ni;i++)n.push({name:t.getName(i),value:t.get(e,i),selected:ps(t,i,"selected")});return n=LS.getFilledRegions(n,this.getMapType(),this.option.nameMap)},getHostGeoModel:function(){var t=this.option.geoIndex;return null!=t?this.dependentModels.geo[t]:null},getMapType:function(){return(this.getHostGeoModel()||this).option.map},_fillOption:function(){},getRawValue:function(t){var e=this.getData();return e.get(e.mapDimension("value"),t)},getRegionModel:function(t){var e=this.getData();return e.getItemModel(e.indexOfName(t))},formatTooltip:function(t){for(var e=this.getData(),n=eo(this.getRawValue(t)),i=e.getName(t),r=this.seriesGroup,a=[],o=0;o"+io(i+" : "+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.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)"}}}});c(PS,Jb);var OS="\x00_ec_interaction_mutex";Dl({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},function(){}),c(Td,ag);var NS={axisPointer:1,tooltip:1,brush:1};Vd.prototype={constructor:Vd,draw:function(t,e,n,i,r){var a="geo"===t.mainType,o=t.getData&&t.getData();a&&e.eachComponent({mainType:"series",subType:"map"},function(e){o||e.getHostGeoModel()!==t||(o=e.getData())});var s=t.coordinateSystem,l=this.group,h=s.scale,u={position:s.position,scale:h};!l.childAt(0)||r?l.attr(u):Sa(l,u,t),l.removeAll();var c=["itemStyle"],d=["emphasis","itemStyle"],p=["label"],g=["emphasis","label"],m=B();f(s.regions,function(e){var n=m.get(e.name)||m.set(e.name,new Vg),i=new fy({shape:{paths:[]}});n.add(i);var r,s=t.getRegionModel(e.name)||t,u=s.getModel(c),v=s.getModel(d),y=zd(u,h),x=zd(v,h),_=s.getModel(p),w=s.getModel(g);if(o){r=o.indexOfName(e.name);var b=o.getItemVisual(r,"color",!0);b&&(y.fill=b)}f(e.geometries,function(t){if("polygon"===t.type){i.shape.paths.push(new oy({shape:{points:t.exterior}}));for(var e=0;e<(t.interiors?t.interiors.length:0);e++)i.shape.paths.push(new oy({shape:{points:t.interiors[e]}}))}}),i.setStyle(y),i.style.strokeNoScale=!0,i.culling=!0;var S=_.get("show"),M=w.get("show"),I=o&&isNaN(o.get(o.mapDimension("value"),r)),T=o&&o.getItemLayout(r);if(a||I&&(S||M)||T&&T.showLabel){var D,C=a?e.name:r;(!o||r>=0)&&(D=t);var A=new Jv({position:e.center.slice(),scale:[1/h[0],1/h[1]],z2:10,silent:!0});da(A.style,A.hoverStyle={},_,w,{labelFetcher:D,labelDataIndex:C,defaultText:e.name,useInsideStyle:!1},{textAlign:"center",textVerticalAlign:"middle"}),n.add(A)}if(o)o.setItemGraphicEl(r,n);else{var s=t.getRegionModel(e.name);i.eventData={componentType:"geo",geoIndex:t.componentIndex,name:e.name,region:s&&s.option||{}}}var k=n.__regions||(n.__regions=[]);k.push(e),ca(n,x,{hoverSilentOnTouch:!!t.get("selectedMode")}),l.add(n)}),this._updateController(t,e,n),Bd(this,t,l,n,i),Fd(t,l)},remove:function(){this.group.removeAll(),this._controller.dispose(),this._controllerHost={}},_updateController:function(t,e,n){function i(){var e={type:"geoRoam",componentType:l};return e[l+"Id"]=t.id,e}var r=t.coordinateSystem,a=this._controller,s=this._controllerHost;s.zoomLimit=t.get("scaleLimit"),s.zoom=r.getZoom(),a.enable(t.get("roam")||!1);var l=t.mainType;a.off("pan").on("pan",function(t,e){this._mouseDownFlag=!1,Nd(s,t,e),n.dispatchAction(o(i(),{dx:t,dy:e}))},this),a.off("zoom").on("zoom",function(t,e,r){if(this._mouseDownFlag=!1,Ed(s,t,e,r),n.dispatchAction(o(i(),{zoom:t,originX:e,originY:r})),this._updateGroup){var a=this.group,l=a.scale;a.traverse(function(t){"text"===t.type&&t.attr("scale",[1/l[0],1/l[1]])})}},this),a.setPointerChecker(function(e,i,a){return r.getViewRectAfterRoam().contain(i,a)&&!Rd(e,n,t)})}},zl({type:"map",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(i&&"geoRoam"===i.type&&"series"===i.componentType&&i.seriesId===t.id){var a=this._mapDraw;a&&r.add(a.group)}else if(t.needsDrawMap){var a=this._mapDraw||new Vd(n,!0);r.add(a.group),a.draw(t,e,n,this,i),this._mapDraw=a}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;t.get("showLegendSymbol")&&e.getComponent("legend")&&this._renderSymbols(t,e,n)}}},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){var e=t.originalData,n=this.group;e.each(e.mapDimension("value"),function(i,r){if(!isNaN(i)){var a=e.getItemLayout(r);if(a&&a.point){var o=a.point,s=a.offset,l=new Qv({style:{fill:t.getData().getVisual("color")},shape:{cx:o[0]+9*s,cy:o[1],r:3},silent:!0,z2:s?8:10});if(!s){var h=t.mainSeries.getData(),u=e.getName(r),c=h.indexOfName(u),d=e.getItemModel(r),f=d.getModel("label"),p=d.getModel("emphasis.label"),g=h.getItemGraphicEl(c),m=A(t.getFormattedLabel(r,"normal"),u),v=A(t.getFormattedLabel(r,"emphasis"),m),y=function(){var t=fa({},p,{text:p.get("show")?v:null},{isRectText:!0,useInsideStyle:!1},!0);l.style.extendFrom(t),l.__mapOriginalZ2=l.z2,l.z2+=1},x=function(){fa(l.style,f,{text:f.get("show")?m:null,textPosition:f.getShallow("position")||"bottom"},{isRectText:!0,useInsideStyle:!1}),null!=l.__mapOriginalZ2&&(l.z2=l.__mapOriginalZ2,l.__mapOriginalZ2=null)};g.on("mouseover",y).on("mouseout",x).on("emphasis",y).on("normal",x),x()}n.add(l)}}})}}),Dl({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(t,e){var n=t.componentType||"series";e.eachComponent({mainType:n,query:t},function(e){var i=e.coordinateSystem;if("geo"===i.type){var r=Gd(i,t,e.get("scaleLimit"));e.setCenter&&e.setCenter(r.center),e.setZoom&&e.setZoom(r.zoom),"series"===n&&f(e.seriesGroup,function(t){t.setCenter(r.center),t.setZoom(r.zoom)})}})});var ES=function(t){var e={};t.eachSeriesByType("map",function(n){var i=n.getMapType();if(!n.getHostGeoModel()&&!e[i]){var r={};f(n.seriesGroup,function(e){var n=e.coordinateSystem,i=e.originalData;e.get("showLegendSymbol")&&t.getComponent("legend")&&i.each(i.mapDimension("value"),function(t,e){var a=i.getName(e),o=n.getRegion(a);if(o&&!isNaN(t)){var s=r[a]||0,l=n.dataToPoint(o.center);r[a]=s+1,i.setItemLayout(e,{point:l,offset:s})}})});var a=n.getData();a.each(function(t){var e=a.getName(t),n=a.getItemLayout(t)||{};n.showLabel=!r[e],a.setItemLayout(t,n)}),e[i]=!0}})},RS=function(t){t.eachSeriesByType("map",function(t){var e=t.get("color"),n=t.getModel("itemStyle"),i=n.get("areaColor"),r=n.get("color")||e[t.seriesIndex%e.length];t.getData().setVisual({areaColor:i,color:r})})},zS=function(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)}),f(e,function(t){for(var e=Hd(p(t,function(t){return t.getData()}),t[0].get("mapValueCalculation")),n=0;n=r/3?1:2),l=e.y-i(o)*a*(a>=r/3?1:2);o=e.angle-Math.PI/2,t.moveTo(s,l),t.lineTo(e.x+n(o)*a,e.y+i(o)*a),t.lineTo(e.x+n(e.angle)*r,e.y+i(e.angle)*r),t.lineTo(e.x-n(o)*a,e.y-i(o)*a),t.lineTo(s,l)}})),VS=2*Math.PI,GS=(Ds.extend({type:"gauge",render:function(t,e,n){this.group.removeAll();var i=t.get("axisLine.lineStyle.color"),r=Wd(t,n);this._renderMain(t,e,n,i,r)},dispose:function(){},_renderMain:function(t,e,n,i,r){for(var a=this.group,o=t.getModel("axisLine"),s=o.getModel("lineStyle"),l=t.get("clockwise"),h=-t.get("startAngle")/180*Math.PI,u=-t.get("endAngle")/180*Math.PI,c=(u-h)%VS,d=h,f=s.get("width"),p=0;p=t)return i[0][1];for(var e=0;e=t&&(0===e?0:i[e-1][0])=I;I++){var T=Math.cos(_),D=Math.sin(_);if(f.get("show")){var C=new hy({shape:{x1:T*u+l,y1:D*u+h,x2:T*(u-y)+l,y2:D*(u-y)+h},style:S,silent:!0});"auto"===S.stroke&&C.setStyle({stroke:i(I/m)}),s.add(C)}if(g.get("show")){var A=Ud(Ga(I/m*(d-c)+c),g.get("formatter")),k=g.get("distance"),L=i(I/m);s.add(new Jv({style:fa({},g,{text:A,x:T*(u-y-k)+l,y:D*(u-y-k)+h,textVerticalAlign:-.4>D?"top":D>.4?"bottom":"middle",textAlign:-.4>T?"left":T>.4?"right":"center"},{autoColor:L}),silent:!0}))}if(p.get("show")&&I!==m){for(var P=0;v>=P;P++){var T=Math.cos(_),D=Math.sin(_),O=new hy({shape:{x1:T*u+l,y1:D*u+h,x2:T*(u-x)+l,y2:D*(u-x)+h},silent:!0,style:M});"auto"===M.stroke&&O.setStyle({stroke:i((I+P/v)/m)}),s.add(O),_+=b}_-=b}else _+=w}},_renderPointer:function(t,e,n,i,r,a,o){var s=this.group,l=this._data;if(!t.get("pointer.show"))return void(l&&l.eachItemGraphicEl(function(t){s.remove(t)}));var h=[+t.get("min"),+t.get("max")],u=[a,o],c=t.getData(),d=c.mapDimension("value");c.diff(l).add(function(e){var n=new FS({shape:{angle:a}});Ma(n,{shape:{angle:Fa(c.get(d,e),h,u,!0)}},t),s.add(n),c.setItemGraphicEl(e,n)}).update(function(e,n){var i=l.getItemGraphicEl(n);Sa(i,{shape:{angle:Fa(c.get(d,e),h,u,!0)}},t),s.add(i),c.setItemGraphicEl(e,i)}).remove(function(t){var e=l.getItemGraphicEl(t);s.remove(e)}).execute(),c.eachItemGraphicEl(function(t,e){var n=c.getItemModel(e),a=n.getModel("pointer");t.setShape({x:r.cx,y:r.cy,width:Va(a.get("width"),r.r),r:Va(a.get("length"),r.r)}),t.useStyle(n.getModel("itemStyle").getItemStyle()),"auto"===t.style.fill&&t.setStyle("fill",i(Fa(c.get(d,e),h,[0,1],!0))),ca(t,n.getModel("emphasis.itemStyle").getItemStyle())}),this._data=c},_renderTitle:function(t,e,n,i,r){var a=t.getData(),o=a.mapDimension("value"),s=t.getModel("title");if(s.get("show")){var l=s.get("offsetCenter"),h=r.cx+Va(l[0],r.r),u=r.cy+Va(l[1],r.r),c=+t.get("min"),d=+t.get("max"),f=t.getData().get(o,0),p=i(Fa(f,[c,d],[0,1],!0));this.group.add(new Jv({silent:!0,style:fa({},s,{x:h,y:u,text:a.getName(0),textAlign:"center",textVerticalAlign:"middle"},{autoColor:p,forceRich:!0})}))}},_renderDetail:function(t,e,n,i,r){var a=t.getModel("detail"),o=+t.get("min"),s=+t.get("max");if(a.get("show")){var l=a.get("offsetCenter"),h=r.cx+Va(l[0],r.r),u=r.cy+Va(l[1],r.r),c=Va(a.get("width"),r.r),d=Va(a.get("height"),r.r),f=t.getData(),p=f.get(f.mapDimension("value"),0),g=i(Fa(p,[o,s],[0,1],!0));this.group.add(new Jv({silent:!0,style:fa({},a,{x:h,y:u,text:Ud(p,a.get("formatter")),textWidth:isNaN(c)?null:c,textHeight:isNaN(d)?null:d,textAlign:"center",textVerticalAlign:"middle"},{autoColor:g,forceRich:!0})}))}}}),qy.extend({type:"geo",coordinateSystem:null,layoutMode:"box",init:function(t){qy.prototype.init.apply(this,arguments),Ni(t,"label",["show"])},optionUpdated:function(){var t=this.option,e=this;t.regions=LS.getFilledRegions(t.regions,t.map,t.nameMap),this._optionModelMap=g(t.regions||[],function(t,n){return n.name&&t.set(n.name,new Pa(n,e)),t},B()),this.updateSelectedMap(t.regions)},defaultOption:{zlevel:0,z:0,show:!0,left:"center",top:"center",aspectScale:.75,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",color:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},getRegionModel:function(t){return this._optionModelMap.get(t)||new Pa(null,this,this.ecModel)},getFormattedLabel:function(t,e){var n=this.getRegionModel(t),i=n.get("label."+e+".formatter"),r={name:t};return"function"==typeof i?(r.status=e,i(r)):"string"==typeof i?i.replace("{a}",null!=t?t:""):void 0},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t}}));c(GS,Jb),El({type:"geo",init:function(t,e){var n=new Vd(e,!0);this._mapDraw=n,this.group.add(n.group)},render:function(t,e,n,i){if(!i||"geoToggleSelect"!==i.type||i.from!==this.uid){var r=this._mapDraw;t.get("show")?r.draw(t,e,n,this,i):this._mapDraw.group.removeAll(),this.group.silent=t.get("silent")}},dispose:function(){this._mapDraw&&this._mapDraw.remove()}}),Xd("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),Xd("select",{type:"geoSelect",event:"geoselected"}),Xd("unSelect",{type:"geoUnSelect",event:"geounselected"}),Nl({type:"title",layoutMode:{type:"box",ignoreSize:!0},defaultOption:{zlevel:0,z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bolder",color:"#333"},subtextStyle:{color:"#aaa"}}}),El({type:"title",render:function(t,e,n){if(this.group.removeAll(),t.get("show")){var i=this.group,r=t.getModel("textStyle"),a=t.getModel("subtextStyle"),o=t.get("textAlign"),s=t.get("textBaseline"),l=new Jv({style:fa({},r,{text:t.get("text"),textFill:r.getTextColor()},{disableBox:!0}),z2:10}),h=l.getBoundingRect(),u=t.get("subtext"),c=new Jv({style:fa({},a,{text:u,textFill:a.getTextColor(),y:h.height+t.get("itemGap"),textVerticalAlign:"top"},{disableBox:!0}),z2:10}),d=t.get("link"),f=t.get("sublink");l.silent=!d,c.silent=!f,d&&l.on("click",function(){window.open(d,"_"+t.get("target"))}),f&&c.on("click",function(){window.open(f,"_"+t.get("subtarget"))}),i.add(l),u&&i.add(c);var p=i.getBoundingRect(),g=t.getBoxLayoutParams();g.width=p.width,g.height=p.height;var m=co(g,{width:n.getWidth(),height:n.getHeight()},t.get("padding"));o||(o=t.get("left")||t.get("right"),"middle"===o&&(o="center"),"right"===o?m.x+=m.width:"center"===o&&(m.x+=m.width/2)),s||(s=t.get("top")||t.get("bottom"),"center"===s&&(s="middle"),"bottom"===s?m.y+=m.height:"middle"===s&&(m.y+=m.height/2),s=s||"top"),i.attr("position",[m.x,m.y]);var v={textAlign:o,textVerticalAlign:s};l.setStyle(v),c.setStyle(v),p=i.getBoundingRect();var y=m.margin,x=t.getItemStyle(["color","opacity"]);x.fill=t.get("backgroundColor");var _=new ly({shape:{x:p.x-y[3],y:p.y-y[0],width:p.width+y[1]+y[3],height:p.height+y[0]+y[2],r:t.get("borderRadius")},style:x,silent:!0});$r(_),i.add(_)}}});var HS=Nl({type:"legend.plain",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(t,e,n){this.mergeDefaultAndTheme(t,n),t.selected=t.selected||{}},mergeOption:function(t){HS.superCall(this,"mergeOption",t)},optionUpdated:function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,n=0;n=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}}});Dl("legendToggleSelect","legendselectchanged",x(jd,"toggleSelected")),Dl("legendSelect","legendselected",x(jd,"select")),Dl("legendUnSelect","legendunselected",x(jd,"unSelect"));var WS=x,US=f,XS=Vg,jS=El({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new XS),this._backgroundEl},getContentGroup:function(){return this._contentGroup},render:function(t,e,n){if(this.resetInner(),t.get("show",!0)){var i=t.get("align");i&&"auto"!==i||(i="right"===t.get("left")&&"vertical"===t.get("orient")?"right":"left"),this.renderInner(i,t,e,n);var r=t.getBoxLayoutParams(),a={width:n.getWidth(),height:n.getHeight()},o=t.get("padding"),l=co(r,a,o),h=this.layoutInner(t,i,l),u=co(s({width:h.width,height:h.height},r),a,o);this.group.attr("position",[u.x-h.x,u.y-h.y]),this.group.add(this._backgroundEl=Yd(h,t))}},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl)},renderInner:function(t,e,n,i){var r=this.getContentGroup(),a=B(),o=e.get("selectedMode"),s=[];n.eachRawSeries(function(t){!t.get("legendHoverLink")&&s.push(t.id)}),US(e.getData(),function(l,h){var u=l.get("name");if(!this.newlineDisabled&&(""===u||"\n"===u))return void r.add(new XS({newline:!0}));var c=n.getSeriesByName(u)[0];if(!a.get(u))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"),m=this._createItem(u,h,l,e,p,g,t,f,o);m.on("click",WS(Zd,u,i)).on("mouseover",WS(qd,c,null,i,s)).on("mouseout",WS(Kd,c,null,i,s)),a.set(u,!0)}else n.eachRawSeries(function(n){if(!a.get(u)&&n.legendDataProvider){var r=n.legendDataProvider(),c=r.indexOfName(u);if(0>c)return;var d=r.getItemVisual(c,"color"),f="roundRect",p=this._createItem(u,h,l,e,f,null,t,d,o);p.on("click",WS(Zd,u,i)).on("mouseover",WS(qd,n,u,i,s)).on("mouseout",WS(Kd,n,u,i,s)),a.set(u,!0)}},this)},this)},_createItem:function(t,e,n,i,r,a,s,l,h){var u=i.get("itemWidth"),c=i.get("itemHeight"),d=i.get("inactiveColor"),f=i.get("symbolKeepAspect"),p=i.isSelected(t),g=new XS,m=n.getModel("textStyle"),v=n.get("icon"),y=n.getModel("tooltip"),x=y.parentModel;if(r=v||r,g.add(Uh(r,0,0,u,c,p?l:d,null==f?!0:f)),!v&&a&&(a!==r||"none"==a)){var _=.8*c;"none"===a&&(a="circle"),g.add(Uh(a,(u-_)/2,(c-_)/2,_,_,p?l:d,null==f?!0:f))}var w="left"===s?u+5:-5,b=s,S=i.get("formatter"),M=t;"string"==typeof S&&S?M=S.replace("{name}",null!=t?t:""):"function"==typeof S&&(M=S(t)),g.add(new Jv({style:fa({},m,{text:M,x:w,y:c/2,textFill:p?m.getTextColor():d,textAlign:b,textVerticalAlign:"middle"})}));var I=new ly({shape:g.getBoundingRect(),invisible:!0,tooltip:y.get("show")?o({content:t,formatter:x.get("formatter",!0)||function(){return t},formatterParams:{componentType:"legend",legendIndex:i.componentIndex,name:t,$vars:["name"]}},y.option):null});return g.add(I),g.eachChild(function(t){t.silent=!0}),I.silent=!h,this.getContentGroup().add(g),ca(g),g.__legendDataIndex=e,g},layoutInner:function(t,e,n){var i=this.getContentGroup();jy(t.get("orient"),i,t.get("itemGap"),n.width,n.height);var r=i.getBoundingRect();return i.attr("position",[-r.x,-r.y]),this.group.getBoundingRect()}}),YS=function(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries(function(t){for(var n=0;nn[s],f=[-u.x,-u.y];f[o]=i.position[o];var p=[0,0],g=[-c.x,-c.y],m=A(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(d){var v=t.get("pageButtonPosition",!0);"end"===v?g[o]+=n[s]-c[s]:p[o]+=c[s]+m}g[1-o]+=u[l]/2-c[l]/2,i.attr("position",f),r.attr("position",p),a.attr("position",g);var y=this.group.getBoundingRect(),y={x:0,y:0};if(y[s]=d?n[s]:u[s],y[l]=Math.max(u[l],c[l]),y[h]=Math.min(0,c[h]+g[1-o]),r.__rectSize=n[s],d){var x={x:0,y:0};x[s]=Math.max(n[s]-c[s]-m,0),x[l]=y[l],r.setClipPath(new ly({shape:x})),r.__rectSize=x[s]}else a.eachChild(function(t){t.attr({invisible:!0,silent:!0})});var _=this._getPageInfo(t);return null!=_.pageIndex&&Sa(i,{position:_.contentPosition},d?t:!1),this._updatePageInfoView(t,_),y},_pageGo:function(t,e,n){var i=this._getPageInfo(e)[t];null!=i&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:e.id})},_updatePageInfoView:function(t,e){var n=this._controllerGroup;f(["pagePrev","pageNext"],function(i){var r=null!=e[i+"DataIndex"],a=n.childOfName(i);a&&(a.setStyle("fill",r?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),a.cursor=r?"pointer":"default")});var i=n.childOfName("pageText"),r=t.get("pageFormatter"),a=e.pageIndex,o=null!=a?a+1:0,s=e.pageCount;i&&r&&i.setStyle("text",b(r)?r.replace("{current}",o).replace("{total}",s):r({current:o,total:s}))},_getPageInfo:function(t){function e(t){var e=t.getBoundingRect().clone();return e[f]+=t.position[u],e}var n,i,r,a,o=t.get("scrollDataIndex",!0),s=this.getContentGroup(),l=s.getBoundingRect(),h=this._containerGroup.__rectSize,u=t.getOrient().index,c=KS[u],d=KS[1-u],f=$S[u],p=s.position.slice();this._showController?s.eachChild(function(t){t.__legendDataIndex===o&&(a=t)}):a=s.childAt(0);var g=h?Math.ceil(l[c]/h):0;if(a){var m=a.getBoundingRect(),v=a.position[u]+m[f];p[u]=-v-l[f],n=Math.floor(g*(v+m[f]+h/2)/l[c]),n=l[c]&&g?Math.max(0,Math.min(g-1,n)):-1;var y={x:0,y:0};y[c]=h,y[d]=l[d],y[f]=-p[u]-l[f];var x,_=s.children();if(s.eachChild(function(t,n){var i=e(t);i.intersect(y)&&(null==x&&(x=n),r=t.__legendDataIndex),n===_.length-1&&i[f]+i[c]<=y[f]+y[c]&&(r=null)}),null!=x){var w=_[x],b=e(w);if(y[f]=b[f]+b[c]-y[c],0>=x&&b[f]>=y[f])i=null;else{for(;x>0&&e(_[x-1]).intersect(y);)x--;i=_[x].__legendDataIndex}}}return{contentPosition:p,pageIndex:n,pageCount:g,pagePrevDataIndex:i,pageNextDataIndex:r}}});Dl("legendScroll","legendscroll",function(t,e){var n=t.scrollDataIndex;null!=n&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(t){t.setScrollDataIndex(n)})});var QS=function(t,e){var n,i=[],r=t.seriesIndex;if(null==r||!(n=e.getSeriesByIndex(r)))return{point:[]};var a=n.getData(),o=Gi(a,t);if(null==o||0>o||_(o))return{point:[]};var s=a.getItemGraphicEl(o),l=n.coordinateSystem;if(n.getTooltipPosition)i=n.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)i=l.dataToPoint(a.getValues(p(l.dimensions,function(t){return a.mapDimension(t)}),o,!0))||[];else if(s){var h=s.getBoundingRect().clone();h.applyTransform(s.transform),i=[h.x+h.width/2,h.y+h.height/2]}return{point:i,el:s}},tM=f,eM=x,nM=Hi(),iM=function(t,e,n){var i=t.currTrigger,r=[t.x,t.y],a=t,o=t.dispatchAction||y(n.dispatchAction,n),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){lf(r)&&(r=QS({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},e).point);var l=lf(r),h=a.axesInfo,u=s.axesInfo,c="leave"===i||lf(r),d={},f={},p={list:[],map:{}},g={showPointer:eM(tf,f),showTooltip:eM(ef,p)};tM(s.coordSysMap,function(t,e){var n=l||t.containPoint(r);tM(s.coordSysAxesInfo[e],function(t){var e=t.axis,i=of(h,t);if(!c&&n&&(!h||i)){var a=i&&i.value;null!=a||l||(a=e.pointToData(r)),null!=a&&Jd(t,a,g,!1,d)}})});var m={};return tM(u,function(t,e){var n=t.linkGroup;n&&!f[e]&&tM(n.axesInfo,function(e,i){var r=f[i];if(e!==t&&r){var a=r.value;n.mapper&&(a=t.axis.scale.parse(n.mapper(a,sf(e),sf(t)))),m[t.key]=a}})}),tM(m,function(t,e){Jd(u[e],t,g,!0,d)}),nf(f,u,d),rf(p,r,t,o),af(u,o,n),d}},rM=(Nl({type:"axisPointer",coordSysAxesInfo:null,defaultOption:{show:"auto",triggerOn:null,zlevel:0,z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#aaa",width:1,type:"solid"},shadowStyle:{color:"rgba(150,150,150,0.3)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,shadowBlur:3,shadowColor:"#aaa"},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}}}),Hi()),aM=f,oM=El({type:"axisPointer",render:function(t,e,n){var i=e.getComponent("tooltip"),r=t.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";hf("axisPointer",n,function(t,e,n){"none"!==r&&("leave"===t||r.indexOf(t)>=0)&&n({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})})},remove:function(t,e){gf(e.getZr(),"axisPointer"),oM.superApply(this._model,"remove",arguments)},dispose:function(t,e){gf("axisPointer",e),oM.superApply(this._model,"dispose",arguments) +}}),sM=Hi(),lM=i,hM=y;mf.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(t,e,n,i){var r=e.get("value"),a=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=n,i||this._lastValue!==r||this._lastStatus!==a){this._lastValue=r,this._lastStatus=a;var o=this._group,s=this._handle;if(!a||"hide"===a)return o&&o.hide(),void(s&&s.hide());o&&o.show(),s&&s.show();var l={};this.makeElOption(l,r,t,e,n);var h=l.graphicKey;h!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=h;var u=this._moveAnimation=this.determineAnimation(t,e);if(o){var c=x(vf,e,u);this.updatePointerEl(o,l,c,e),this.updateLabelEl(o,l,c,e)}else o=this._group=new Vg,this.createPointerEl(o,l,t,e),this.createLabelEl(o,l,t,e),n.getZr().add(o);wf(o,e,!0),this._renderHandle(r)}},remove:function(t){this.clear(t)},dispose:function(t){this.clear(t)},determineAnimation:function(t,e){var n=e.get("animation"),i=t.axis,r="category"===i.type,a=e.get("snap");if(!a&&!r)return!1;if("auto"===n||null==n){var o=this.animationThreshold;if(r&&i.getBandWidth()>o)return!0;if(a){var s=$u(t).seriesDataCount,l=i.getExtent();return Math.abs(l[0]-l[1])/s>o}return!1}return n===!0},makeElOption:function(){},createPointerEl:function(t,e){var n=e.pointer;if(n){var i=sM(t).pointerEl=new Sy[n.type](lM(e.pointer));t.add(i)}},createLabelEl:function(t,e,n,i){if(e.label){var r=sM(t).labelEl=new ly(lM(e.label));t.add(r),xf(r,i)}},updatePointerEl:function(t,e,n){var i=sM(t).pointerEl;i&&(i.setStyle(e.pointer.style),n(i,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,n,i){var r=sM(t).labelEl;r&&(r.setStyle(e.label.style),n(r,{shape:e.label.shape,position:e.label.position}),xf(r,i))},_renderHandle:function(t){if(!this._dragging&&this.updateHandleTransform){var e=this._axisPointerModel,n=this._api.getZr(),i=this._handle,r=e.getModel("handle"),a=e.get("status");if(!r.get("show")||!a||"hide"===a)return i&&n.remove(i),void(this._handle=null);var o;this._handle||(o=!0,i=this._handle=La(r.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){_m(t.event)},onmousedown:hM(this._onHandleDragMove,this,0,0),drift:hM(this._onHandleDragMove,this),ondragend:hM(this._onHandleDragEnd,this)}),n.add(i)),wf(i,e,!1);var s=["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];i.setStyle(r.getItemStyle(null,s));var l=r.get("size");_(l)||(l=[l,l]),i.attr("scale",[l[0]/2,l[1]/2]),Os(this,"_doDispatchAxisPointer",r.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,o)}},_moveHandleToValue:function(t,e){vf(this._axisPointerModel,!e&&this._moveAnimation,this._handle,_f(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(_f(n),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(_f(i)),sM(n).lastProp=null,this._doDispatchAxisPointer()}},_doDispatchAxisPointer:function(){var t=this._handle;if(t){var e=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.componentIndex}]})}},_onHandleDragEnd:function(){this._dragging=!1;var t=this._handle;if(t){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},getHandleTransform:null,updateHandleTransform:null,clear:function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),n=this._group,i=this._handle;e&&n&&(this._lastGraphicKey=null,n&&e.remove(n),i&&e.remove(i),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(t,e,n){return n=n||0,{x:t[n],y:t[1-n],width:e[n],height:e[1-n]}}},mf.prototype.constructor=mf,qi(mf);var uM=mf.extend({makeElOption:function(t,e,n,i,r){var a=n.axis,o=a.grid,s=i.get("type"),l=kf(o,a).getOtherAxis(a).getGlobalExtent(),h=a.toGlobalCoord(a.dataToCoord(e,!0));if(s&&"none"!==s){var u=bf(i),c=cM[s](a,h,l,u);c.style=u,t.graphicKey=c.type,t.pointer=c}var d=ic(o.model,n);Df(e,t,d,n,i,r)},getHandleTransform:function(t,e,n){var i=ic(e.axis.grid.model,e,{labelInside:!1});return i.labelMargin=n.get("handle.margin"),{position:Tf(e.axis,t,i),rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,n){var i=n.axis,r=i.grid,a=i.getGlobalExtent(!0),o=kf(r,i).getOtherAxis(i).getGlobalExtent(),s="x"===i.dim?0:1,l=t.position;l[s]+=e[s],l[s]=Math.min(a[1],l[s]),l[s]=Math.max(a[0],l[s]);var h=(o[1]+o[0])/2,u=[h,h];u[s]=l[s];var c=[{verticalAlign:"middle"},{align:"center"}];return{position:l,rotation:t.rotation,cursorPoint:u,tooltipOption:c[s]}}}),cM={line:function(t,e,n,i){var r=Cf([e,n[0]],[e,n[1]],Lf(t));return Kr({shape:r,style:i}),{type:"Line",shape:r}},shadow:function(t,e,n){var i=Math.max(1,t.getBandWidth()),r=n[1]-n[0];return{type:"Rect",shape:Af([e-i/2,n[0]],[i,r],Lf(t))}}};Mb.registerAxisPointerClass("CartesianAxisPointer",uM),Ml(function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!_(e)&&(t.axisPointer.link=[e])}}),Il(T_.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=Uu(t,e)}),Dl({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},iM),Nl({type:"tooltip",dependencies:["axisPointer"],defaultOption:{zlevel:0,z:8,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",confine:!1,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"rgba(50,50,50,0.7)",borderColor:"#333",borderRadius:4,borderWidth:0,padding:5,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#fff",fontSize:14}}});var dM=f,fM=no,pM=["","-webkit-","-moz-","-o-"],gM="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;";Ef.prototype={constructor:Ef,_enterable:!0,update:function(){var t=this._container,e=t.currentStyle||document.defaultView.getComputedStyle(t),n=t.style;"absolute"!==n.position&&"absolute"!==e.position&&(n.position="relative")},show:function(t){clearTimeout(this._hideTimeout);var e=this.el;e.style.cssText=gM+Nf(t)+";left:"+this._x+"px;top:"+this._y+"px;"+(t.get("extraCssText")||""),e.style.display=e.innerHTML?"block":"none",this._show=!0},setContent:function(t){this.el.innerHTML=null==t?"":t},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el;return[t.clientWidth,t.clientHeight]},moveTo:function(t,e){var n,i=this._zr;i&&i.painter&&(n=i.painter.getViewportRootOffset())&&(t+=n.offsetLeft,e+=n.offsetTop);var r=this.el.style;r.left=t+"px",r.top=e+"px",this._x=t,this._y=e},hide:function(){this.el.style.display="none",this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(y(this.hide,this),t)):this.hide())},isShow:function(){return this._show}};var mM=y,vM=f,yM=Va,xM=new ly({shape:{x:-1,y:-1,width:2,height:2}});El({type:"tooltip",init:function(t,e){if(!zp.node){var n=new Ef(e.getDom(),e);this._tooltipContent=n}},render:function(t,e,n){if(!zp.node&&!zp.wxa){this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=n,this._lastDataByCoordSys=null,this._alwaysShowContent=t.get("alwaysShowContent");var i=this._tooltipContent;i.update(),i.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow()}},_initGlobalListener:function(){var t=this._tooltipModel,e=t.get("triggerOn");hf("itemTooltip",this._api,mM(function(t,n,i){"none"!==e&&(e.indexOf(t)>=0?this._tryShow(n,i):"leave"===t&&this._hide(i))},this))},_keepShow:function(){var t=this._tooltipModel,e=this._ecModel,n=this._api;if(null!=this._lastX&&null!=this._lastY&&"none"!==t.get("triggerOn")){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){i.manuallyShowTip(t,e,n,{x:i._lastX,y:i._lastY})})}},manuallyShowTip:function(t,e,n,i){if(i.from!==this.uid&&!zp.node){var r=zf(i,n);this._ticket="";var a=i.dataByCoordSys;if(i.tooltip&&null!=i.x&&null!=i.y){var o=xM;o.position=[i.x,i.y],o.update(),o.tooltip=i.tooltip,this._tryShow({offsetX:i.x,offsetY:i.y,target:o},r)}else if(a)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,event:{},dataByCoordSys:i.dataByCoordSys,tooltipOption:i.tooltipOption},r);else if(null!=i.seriesIndex){if(this._manuallyAxisShowTip(t,e,n,i))return;var s=QS(i,e),l=s.point[0],h=s.point[1];null!=l&&null!=h&&this._tryShow({offsetX:l,offsetY:h,position:i.position,target:s.el,event:{}},r)}else null!=i.x&&null!=i.y&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target,event:{}},r))}},manuallyHideTip:function(t,e,n,i){var r=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&r.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,i.from!==this.uid&&this._hide(zf(i,n))},_manuallyAxisShowTip:function(t,e,n,i){var r=i.seriesIndex,a=i.dataIndex,o=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=r&&null!=a&&null!=o){var s=e.getSeriesByIndex(r);if(s){var l=s.getData(),t=Rf([l.getItemModel(a),s,(s.coordinateSystem||{}).model,t]);if("axis"===t.get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:r,dataIndex:a,position:i.position}),!0}}},_tryShow:function(t,e){var n=t.target,i=this._tooltipModel;if(i){this._lastX=t.offsetX,this._lastY=t.offsetY;var r=t.dataByCoordSys;r&&r.length?this._showAxisTooltip(r,t):n&&null!=n.dataIndex?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(t,n,e)):n&&n.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(t,n,e)):(this._lastDataByCoordSys=null,this._hide(e))}},_showOrMove:function(t,e){var n=t.get("showDelay");e=y(e,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(e,n):e()},_showAxisTooltip:function(t,e){var n=this._ecModel,i=this._tooltipModel,r=[e.offsetX,e.offsetY],a=[],o=[],s=Rf([e.tooltipOption,i]);vM(t,function(t){vM(t.dataByAxis,function(t){var e=n.getComponent(t.axisDim+"Axis",t.axisIndex),i=t.value,r=[];if(e&&null!=i){var s=If(i,e.axis,n,t.seriesDataIndices,t.valueLabelOpt);f(t.seriesDataIndices,function(a){var l=n.getSeriesByIndex(a.seriesIndex),h=a.dataIndexInside,u=l&&l.getDataParams(h);u.axisDim=t.axisDim,u.axisIndex=t.axisIndex,u.axisType=t.axisType,u.axisId=t.axisId,u.axisValue=Vh(e.axis,i),u.axisValueLabel=s,u&&(o.push(u),r.push(l.formatTooltip(h,!0)))});var l=s;a.push((l?io(l)+"
":"")+r.join("
"))}})},this),a.reverse(),a=a.join("

");var l=e.position;this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(s,l,r[0],r[1],this._tooltipContent,o):this._showTooltipContent(s,a,o,Math.random(),r[0],r[1],l)})},_showSeriesItemTooltip:function(t,e,n){var i=this._ecModel,r=e.seriesIndex,a=i.getSeriesByIndex(r),o=e.dataModel||a,s=e.dataIndex,l=e.dataType,h=o.getData(),u=Rf([h.getItemModel(s),o,a&&(a.coordinateSystem||{}).model,this._tooltipModel]),c=u.get("trigger");if(null==c||"item"===c){var d=o.getDataParams(s,l),f=o.formatTooltip(s,!1,l),p="item_"+o.name+"_"+s;this._showOrMove(u,function(){this._showTooltipContent(u,f,d,p,t.offsetX,t.offsetY,t.position,t.target)}),n({type:"showTip",dataIndexInside:s,dataIndex:h.getRawIndex(s),seriesIndex:r,from:this.uid})}},_showComponentItemTooltip:function(t,e,n){var i=e.tooltip;if("string"==typeof i){var r=i;i={content:r,formatter:r}}var a=new Pa(i,this._tooltipModel,this._ecModel),o=a.get("content"),s=Math.random();this._showOrMove(a,function(){this._showTooltipContent(a,o,a.get("formatterParams")||{},s,t.offsetX,t.offsetY,t.position,e)}),n({type:"showTip",from:this.uid})},_showTooltipContent:function(t,e,n,i,r,a,o,s){if(this._ticket="",t.get("showContent")&&t.get("show")){var l=this._tooltipContent,h=t.get("formatter");o=o||t.get("position");var u=e;if(h&&"string"==typeof h)u=ro(h,n,!0);else if("function"==typeof h){var c=mM(function(e,i){e===this._ticket&&(l.setContent(i),this._updatePosition(t,o,r,a,l,n,s))},this);this._ticket=i,u=h(n,i,c)}l.setContent(u),l.show(t),this._updatePosition(t,o,r,a,l,n,s)}},_updatePosition:function(t,e,n,i,r,a,o){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var h=r.getSize(),u=t.get("align"),c=t.get("verticalAlign"),d=o&&o.getBoundingRect().clone();if(o&&d.applyTransform(o.transform),"function"==typeof e&&(e=e([n,i],a,r.el,d,{viewSize:[s,l],contentSize:h.slice()})),_(e))n=yM(e[0],s),i=yM(e[1],l);else if(S(e)){e.width=h[0],e.height=h[1];var f=co(e,{width:s,height:l});n=f.x,i=f.y,u=null,c=null}else if("string"==typeof e&&o){var p=Gf(e,d,h);n=p[0],i=p[1]}else{var p=Bf(n,i,r.el,s,l,u?null:20,c?null:20);n=p[0],i=p[1]}if(u&&(n-=Hf(u)?h[0]/2:"right"===u?h[0]:0),c&&(i-=Hf(c)?h[1]/2:"bottom"===c?h[1]:0),t.get("confine")){var p=Ff(n,i,r.el,s,l);n=p[0],i=p[1]}r.moveTo(n,i)},_updateContentNotChangedOnAxis:function(t){var e=this._lastDataByCoordSys,n=!!e&&e.length===t.length;return n&&vM(e,function(e,i){var r=e.dataByAxis||{},a=t[i]||{},o=a.dataByAxis||[];n&=r.length===o.length,n&&vM(r,function(t,e){var i=o[e]||{},r=t.seriesDataIndices||[],a=i.seriesDataIndices||[];n&=t.value===i.value&&t.axisType===i.axisType&&t.axisId===i.axisId&&r.length===a.length,n&&vM(r,function(t,e){var i=a[e];n&=t.seriesIndex===i.seriesIndex&&t.dataIndex===i.dataIndex})})}),this._lastDataByCoordSys=t,!!n},_hide:function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},dispose:function(t,e){zp.node||zp.wxa||(this._tooltipContent.hide(),gf("itemTooltip",e))}}),Dl({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},function(){}),Dl({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},function(){});var _M=eo,wM=io,bM=Nl({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,n,i){this.mergeDefaultAndTheme(t,n),this.mergeOption(t,n,i.createdBySelf,!0)},isAnimationEnabled:function(){if(zp.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},mergeOption:function(t,e,n,i){var r=this.constructor,a=this.mainType+"Model";n||e.eachSeries(function(t){var n=t.get(this.mainType,!0),s=t[a];return n&&n.data?(s?s.mergeOption(n,e,!0):(i&&Wf(n),f(n.data,function(t){t instanceof Array?(Wf(t[0]),Wf(t[1])):Wf(t)}),s=new r(n,this,e),o(s,{mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0}),s.__hostSeries=t),void(t[a]=s)):void(t[a]=null)},this)},formatTooltip:function(t){var e=this.getData(),n=this.getRawValue(t),i=_(n)?p(n,_M).join(", "):_M(n),r=e.getName(t),a=wM(this.name);return(null!=n||r)&&(a+="
"),r&&(a+=wM(r),null!=n&&(a+=" : ")),null!=n&&(a+=wM(i)),a},getData:function(){return this._data},setData:function(t){this._data=t}});c(bM,Ox),bM.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 SM=h,MM=x,IM={min:MM(jf,"min"),max:MM(jf,"max"),average:MM(jf,"average")},TM=El({type:"marker",init:function(){this.markerGroupMap=B()},render:function(t,e,n){var i=this.markerGroupMap;i.each(function(t){t.__keep=!1});var r=this.type+"Model";e.eachSeries(function(t){var i=t[r];i&&this.renderSeries(t,i,e,n)},this),i.each(function(t){!t.__keep&&this.group.remove(t.group)},this)},renderSeries:function(){}});TM.extend({type:"markPoint",updateTransform:function(t,e,n){e.eachSeries(function(t){var e=t.markPointModel;e&&(Qf(e.getData(),t,n),this.markerGroupMap.get(t.id).updateLayout(e))},this)},renderSeries:function(t,e,n,i){var r=t.coordinateSystem,a=t.id,o=t.getData(),s=this.markerGroupMap,l=s.get(a)||s.set(a,new sc),h=tp(r,t,e);e.setData(h),Qf(e.getData(),t,i),h.each(function(t){var n=h.getItemModel(t),i=n.getShallow("symbolSize");"function"==typeof i&&(i=i(e.getRawValue(t),e.getDataParams(t))),h.setItemVisual(t,{symbolSize:i,color:n.get("itemStyle.color")||o.getVisual("color"),symbol:n.getShallow("symbol")})}),l.updateData(h),this.group.add(l.group),h.eachItemGraphicEl(function(t){t.traverse(function(t){t.dataModel=e})}),l.__keep=!0,l.group.silent=e.get("silent")||t.get("silent")}}),Ml(function(t){t.markPoint=t.markPoint||{}});var DM,CM="urn:schemas-microsoft-com:vml",AM="undefined"==typeof window?null:window,kM=!1,LM=AM&&AM.document;if(LM&&!zp.canvasSupported)try{!LM.namespaces.zrvml&&LM.namespaces.add("zrvml",CM),DM=function(t){return LM.createElement("')}}catch(PM){DM=function(t){return LM.createElement("<"+t+' xmlns="'+CM+'" class="zrvml">')}}var OM=Cv.CMD,NM=Math.round,EM=Math.sqrt,RM=Math.abs,zM=Math.cos,BM=Math.sin,FM=Math.max;if(!zp.canvasSupported){var VM=",",GM="progid:DXImageTransform.Microsoft",HM=21600,WM=HM/2,UM=1e5,XM=1e3,jM=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=HM+","+HM,t.coordorigin="0,0"},YM=function(t){return String(t).replace(/&/g,"&").replace(/"/g,""")},ZM=function(t,e,n){return"rgb("+[t,e,n].join(",")+")"},qM=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},KM=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},$M=function(t,e,n){return(parseFloat(t)||0)*UM+(parseFloat(e)||0)*XM+n},JM=function(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t},QM=function(t,e,n){var i=Ne(e);n=+n,isNaN(n)&&(n=1),i&&(t.color=ZM(i[0],i[1],i[2]),t.opacity=n*i[3])},tI=function(t){var e=Ne(t);return[ZM(e[0],e[1],e[2]),e[3]]},eI=function(t,e,n){var i=e.fill;if(null!=i)if(i instanceof py){var r,a=0,o=[0,0],s=0,l=1,h=n.getBoundingRect(),u=h.width,c=h.height;if("linear"===i.type){r="gradient";var d=n.transform,f=[i.x*u,i.y*c],p=[i.x2*u,i.y2*c];d&&(ae(f,f,d),ae(p,p,d));var g=p[0]-f[0],m=p[1]-f[1];a=180*Math.atan2(g,m)/Math.PI,0>a&&(a+=360),1e-6>a&&(a=0)}else{r="gradientradial";var f=[i.x*u,i.y*c],d=n.transform,v=n.scale,y=u,x=c;o=[(f[0]-h.x)/y,(f[1]-h.y)/x],d&&ae(f,f,d),y/=v[0]*HM,x/=v[1]*HM;var _=FM(y,x);s=0/_,l=2*i.r/_-s}var w=i.colorStops.slice();w.sort(function(t,e){return t.offset-e.offset});for(var b=w.length,S=[],M=[],I=0;b>I;I++){var T=w[I],D=tI(T.color);M.push(T.offset*l+s+" "+D[0]),(0===I||I===b-1)&&S.push(D)}if(b>=2){var C=S[0][0],A=S[1][0],k=S[0][1]*e.opacity,L=S[1][1]*e.opacity;t.type=r,t.method="none",t.focus="100%",t.angle=a,t.color=C,t.color2=A,t.colors=M.join(","),t.opacity=L,t.opacity2=k}"radial"===r&&(t.focusposition=o.join(","))}else QM(t,i,e.opacity)},nI=function(t,e){null!=e.lineDash&&(t.dashstyle=e.lineDash.join(" ")),null==e.stroke||e.stroke instanceof py||QM(t,e.stroke,e.opacity)},iI=function(t,e,n,i){var r="fill"==e,a=t.getElementsByTagName(e)[0];null!=n[e]&&"none"!==n[e]&&(r||!r&&n.lineWidth)?(t[r?"filled":"stroked"]="true",n[e]instanceof py&&KM(t,a),a||(a=ep(e)),r?eI(a,n,i):nI(a,n),qM(t,a)):(t[r?"filled":"stroked"]="false",KM(t,a))},rI=[[],[],[]],aI=function(t,e){var n,i,r,a,o,s,l=OM.M,h=OM.C,u=OM.L,c=OM.A,d=OM.Q,f=[],p=t.data,g=t.len();for(a=0;g>a;){switch(r=p[a++],i="",n=0,r){case l:i=" m ",n=1,o=p[a++],s=p[a++],rI[0][0]=o,rI[0][1]=s;break;case u:i=" l ",n=1,o=p[a++],s=p[a++],rI[0][0]=o,rI[0][1]=s;break;case d:case h:i=" c ",n=3;var m,v,y=p[a++],x=p[a++],_=p[a++],w=p[a++];r===d?(m=_,v=w,_=(_+2*y)/3,w=(w+2*x)/3,y=(o+2*y)/3,x=(s+2*x)/3):(m=p[a++],v=p[a++]),rI[0][0]=y,rI[0][1]=x,rI[1][0]=_,rI[1][1]=w,rI[2][0]=m,rI[2][1]=v,o=m,s=v;break;case c:var b=0,S=0,M=1,I=1,T=0;e&&(b=e[4],S=e[5],M=EM(e[0]*e[0]+e[1]*e[1]),I=EM(e[2]*e[2]+e[3]*e[3]),T=Math.atan2(-e[1]/I,e[0]/M));var D=p[a++],C=p[a++],A=p[a++],k=p[a++],L=p[a++]+T,P=p[a++]+L+T;a++;var O=p[a++],N=D+zM(L)*A,E=C+BM(L)*k,y=D+zM(P)*A,x=C+BM(P)*k,R=O?" wa ":" at ";Math.abs(N-y)<1e-4&&(Math.abs(P-L)>.01?O&&(N+=270/HM):Math.abs(E-C)<1e-4?O&&D>N||!O&&N>D?x-=270/HM:x+=270/HM:O&&C>E||!O&&E>C?y+=270/HM:y-=270/HM),f.push(R,NM(((D-A)*M+b)*HM-WM),VM,NM(((C-k)*I+S)*HM-WM),VM,NM(((D+A)*M+b)*HM-WM),VM,NM(((C+k)*I+S)*HM-WM),VM,NM((N*M+b)*HM-WM),VM,NM((E*I+S)*HM-WM),VM,NM((y*M+b)*HM-WM),VM,NM((x*I+S)*HM-WM)),o=y,s=x;break;case OM.R:var z=rI[0],B=rI[1];z[0]=p[a++],z[1]=p[a++],B[0]=z[0]+p[a++],B[1]=z[1]+p[a++],e&&(ae(z,z,e),ae(B,B,e)),z[0]=NM(z[0]*HM-WM),B[0]=NM(B[0]*HM-WM),z[1]=NM(z[1]*HM-WM),B[1]=NM(B[1]*HM-WM),f.push(" m ",z[0],VM,z[1]," l ",B[0],VM,z[1]," l ",B[0],VM,B[1]," l ",z[0],VM,B[1]);break;case OM.Z:f.push(" x ")}if(n>0){f.push(i);for(var F=0;n>F;F++){var V=rI[F];e&&ae(V,V,e),f.push(NM(V[0]*HM-WM),VM,NM(V[1]*HM-WM),n-1>F?VM:"")}}}return f.join("")};Or.prototype.brushVML=function(t){var e=this.style,n=this._vmlEl;n||(n=ep("shape"),jM(n),this._vmlEl=n),iI(n,"fill",e,this),iI(n,"stroke",e,this);var i=this.transform,r=null!=i,a=n.getElementsByTagName("stroke")[0];if(a){var o=e.lineWidth;if(r&&!e.strokeNoScale){var s=i[0]*i[3]-i[1]*i[2];o*=EM(RM(s))}a.weight=o+"px"}var l=this.path||(this.path=new Cv);this.__dirtyPath&&(l.beginPath(),this.buildPath(l,this.shape),l.toStatic(),this.__dirtyPath=!1),n.path=aI(l,this.transform),n.style.zIndex=$M(this.zlevel,this.z,this.z2),qM(t,n),null!=e.text?this.drawRectText(t,this.getBoundingRect()):this.removeRectText(t)},Or.prototype.onRemove=function(t){KM(t,this._vmlEl),this.removeRectText(t)},Or.prototype.onAdd=function(t){qM(t,this._vmlEl),this.appendRectText(t)};var oI=function(t){return"object"==typeof t&&t.tagName&&"IMG"===t.tagName.toUpperCase()};oi.prototype.brushVML=function(t){var e,n,i=this.style,r=i.image;if(oI(r)){var a=r.src;if(a===this._imageSrc)e=this._imageWidth,n=this._imageHeight;else{var o=r.runtimeStyle,s=o.width,l=o.height;o.width="auto",o.height="auto",e=r.width,n=r.height,o.width=s,o.height=l,this._imageSrc=a,this._imageWidth=e,this._imageHeight=n}r=a}else r===this._imageSrc&&(e=this._imageWidth,n=this._imageHeight);if(r){var h=i.x||0,u=i.y||0,c=i.width,d=i.height,f=i.sWidth,p=i.sHeight,g=i.sx||0,m=i.sy||0,v=f&&p,y=this._vmlEl;y||(y=LM.createElement("div"),jM(y),this._vmlEl=y);var x,_=y.style,w=!1,b=1,S=1;if(this.transform&&(x=this.transform,b=EM(x[0]*x[0]+x[1]*x[1]),S=EM(x[2]*x[2]+x[3]*x[3]),w=x[1]||x[2]),w){var M=[h,u],I=[h+c,u],T=[h,u+d],D=[h+c,u+d];ae(M,M,x),ae(I,I,x),ae(T,T,x),ae(D,D,x);var C=FM(M[0],I[0],T[0],D[0]),A=FM(M[1],I[1],T[1],D[1]),k=[];k.push("M11=",x[0]/b,VM,"M12=",x[2]/S,VM,"M21=",x[1]/b,VM,"M22=",x[3]/S,VM,"Dx=",NM(h*b+x[4]),VM,"Dy=",NM(u*S+x[5])),_.padding="0 "+NM(C)+"px "+NM(A)+"px 0",_.filter=GM+".Matrix("+k.join("")+", SizingMethod=clip)"}else x&&(h=h*b+x[4],u=u*S+x[5]),_.filter="",_.left=NM(h)+"px",_.top=NM(u)+"px";var L=this._imageEl,P=this._cropEl;L||(L=LM.createElement("div"),this._imageEl=L);var O=L.style;if(v){if(e&&n)O.width=NM(b*e*c/f)+"px",O.height=NM(S*n*d/p)+"px";else{var N=new Image,E=this;N.onload=function(){N.onload=null,e=N.width,n=N.height,O.width=NM(b*e*c/f)+"px",O.height=NM(S*n*d/p)+"px",E._imageWidth=e,E._imageHeight=n,E._imageSrc=r},N.src=r}P||(P=LM.createElement("div"),P.style.overflow="hidden",this._cropEl=P);var R=P.style;R.width=NM((c+g*c/f)*b),R.height=NM((d+m*d/p)*S),R.filter=GM+".Matrix(Dx="+-g*c/f*b+",Dy="+-m*d/p*S+")",P.parentNode||y.appendChild(P),L.parentNode!=P&&P.appendChild(L)}else O.width=NM(b*c)+"px",O.height=NM(S*d)+"px",y.appendChild(L),P&&P.parentNode&&(y.removeChild(P),this._cropEl=null);var z="",B=i.opacity;1>B&&(z+=".Alpha(opacity="+NM(100*B)+") "),z+=GM+".AlphaImageLoader(src="+r+", SizingMethod=scale)",O.filter=z,y.style.zIndex=$M(this.zlevel,this.z,this.z2),qM(t,y),null!=i.text&&this.drawRectText(t,this.getBoundingRect())}},oi.prototype.onRemove=function(t){KM(t,this._vmlEl),this._vmlEl=null,this._cropEl=null,this._imageEl=null,this.removeRectText(t)},oi.prototype.onAdd=function(t){qM(t,this._vmlEl),this.appendRectText(t)};var sI,lI="normal",hI={},uI=0,cI=100,dI=document.createElement("div"),fI=function(t){var e=hI[t];if(!e){uI>cI&&(uI=0,hI={});var n,i=dI.style;try{i.font=t,n=i.fontFamily.split(",")[0]}catch(r){}e={style:i.fontStyle||lI,variant:i.fontVariant||lI,weight:i.fontWeight||lI,size:0|parseFloat(i.fontSize||12),family:n||"Microsoft YaHei"},hI[t]=e,uI++}return e};bn("measureText",function(t,e){var n=LM;sI||(sI=n.createElement("div"),sI.style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",LM.body.appendChild(sI));try{sI.style.font=e}catch(i){}return sI.innerHTML="",sI.appendChild(n.createTextNode(t)),{width:sI.offsetWidth}});for(var pI=new rn,gI=function(t,e,n,i){var r=this.style;this.__dirty&&Gn(r,!0);var a=r.text;if(null!=a&&(a+=""),a){if(r.rich){var o=zn(a,r);a=[];for(var s=0;sI;I++){var T=M[I];T?T.innerHTML="":(T=M[I]=op("tspan"),a.appendChild(T),dp(T,"alignment-baseline",d),dp(T,"text-anchor",b)),dp(T,"x",o),dp(T,"y",s+I*f+S),T.appendChild(document.createTextNode(_[I]))}for(;II;++I){var T=t.__tspanList[I];T&&(dp(T,"x",o),dp(T,"y",s+I*f+S))}}};NI.drawRectText=RI,NI.brush=function(t){var e=t.style;null!=e.text&&(e.textPosition=[0,0],RI(t,{x:e.x||0,y:e.y||0,width:0,height:0},t.getBoundingRect()))},vp.prototype={diff:function(t,e,n){function i(){for(var n=-1*s;s>=n;n+=2){var i,l=h[n-1],u=h[n+1],c=(u?u.newPos:0)-n;l&&(h[n-1]=void 0);var d=l&&l.newPos+1=0&&o>c;if(d||f){if(!d||f&&l.newPos=a&&c+1>=o)return yp(r,i.components,e,t);h[n]=i}else h[n]=void 0}s++}n||(n=function(t,e){return t===e}),this.equals=n;var r=this;t=t.slice(),e=e.slice();var a=e.length,o=t.length,s=1,l=a+o,h=[{newPos:-1,components:[]}],u=this.extractCommon(h[0],e,t,0);if(h[0].newPos+1>=a&&u+1>=o){for(var c=[],d=0;d=s;){var f=i();if(f)return f}},pushComponent:function(t,e,n){var i=t[t.length-1];i&&i.added===e&&i.removed===n?t[t.length-1]={count:i.count+1,added:e,removed:n}:t.push({count:1,added:e,removed:n})},extractCommon:function(t,e,n,i){for(var r=e.length,a=n.length,o=t.newPos,s=o-i,l=0;r>o+1&&a>s+1&&this.equals(e[o+1],n[s+1]);)o++,s++,l++; +return l&&t.components.push({count:l}),t.newPos=o,s},tokenize:function(t){return t.slice()},join:function(t){return t.slice()}};var zI=new vp,BI=function(t,e,n){return zI.diff(t,e,n)},FI="0",VI="1";_p.prototype.createElement=op,_p.prototype.getDefs=function(t){var e=this._svgRoot,n=this._svgRoot.getElementsByTagName("defs");return 0===n.length?t?(n=e.insertBefore(this.createElement("defs"),e.firstChild),n.contains||(n.contains=function(t){var e=n.children;if(!e)return!1;for(var i=e.length-1;i>=0;--i)if(e[i]===t)return!0;return!1}),n):null:n[0]},_p.prototype.update=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)}}},_p.prototype.addDom=function(t){var e=this.getDefs(!0);e.appendChild(t)},_p.prototype.removeDom=function(t){var e=this.getDefs(!1);e&&t[this._domName]&&(e.removeChild(t[this._domName]),t[this._domName]=null)},_p.prototype.getDoms=function(){var t=this.getDefs(!1);if(!t)return[];var e=[];return f(this._tagNames,function(n){var i=t.getElementsByTagName(n);e=e.concat([].slice.call(i))}),e},_p.prototype.markAllUnused=function(){var t=this.getDoms(),e=this;f(t,function(t){t[e._markLabel]=FI})},_p.prototype.markUsed=function(t){t&&(t[this._markLabel]=VI)},_p.prototype.removeUnused=function(){var t=this.getDefs(!1);if(t){var e=this.getDoms(),n=this;f(e,function(e){e[n._markLabel]!==VI&&t.removeChild(e)})}},_p.prototype.getSvgProxy=function(t){return t instanceof Or?PI:t instanceof oi?OI:t instanceof Jv?NI:PI},_p.prototype.getTextSvgElement=function(t){return t.__textSvgEl},_p.prototype.getSvgElement=function(t){return t.__svgEl},u(wp,_p),wp.prototype.addWithoutUpdate=function(t,e){if(e&&e.style){var n=this;f(["fill","stroke"],function(i){if(e.style[i]&&("linear"===e.style[i].type||"radial"===e.style[i].type)){var r,a=e.style[i],o=n.getDefs(!0);a._dom?(r=a._dom,o.contains(a._dom)||n.addDom(r)):r=n.add(a),n.markUsed(e);var s=r.getAttribute("id");t.setAttribute(i,"url(#"+s+")")}})}},wp.prototype.add=function(t){var e;if("linear"===t.type)e=this.createElement("linearGradient");else{if("radial"!==t.type)return Ng("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},wp.prototype.update=function(t){var e=this;_p.prototype.update.call(this,t,function(){var n=t.type,i=t._dom.tagName;"linear"===n&&"linearGradient"===i||"radial"===n&&"radialGradient"===i?e.updateDom(t,t._dom):(e.removeDom(t),e.add(t))})},wp.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 Ng("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 n=t.colorStops,i=0,r=n.length;r>i;++i){var a=this.createElement("stop");a.setAttribute("offset",100*n[i].offset+"%"),a.setAttribute("stop-color",n[i].color),e.appendChild(a)}t._dom=e},wp.prototype.markUsed=function(t){if(t.style){var e=t.style.fill;e&&e._dom&&_p.prototype.markUsed.call(this,e._dom),e=t.style.stroke,e&&e._dom&&_p.prototype.markUsed.call(this,e._dom)}},u(bp,_p),bp.prototype.update=function(t){var e=this.getSvgElement(t);e&&this.updateDom(e,t.__clipPaths,!1);var n=this.getTextSvgElement(t);n&&this.updateDom(n,t.__clipPaths,!0),this.markUsed(t)},bp.prototype.updateDom=function(t,e,n){if(e&&e.length>0){var i,r,a=this.getDefs(!0),o=e[0],s=n?"_textDom":"_dom";o[s]?(r=o[s].getAttribute("id"),i=o[s],a.contains(i)||a.appendChild(i)):(r="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,i=this.createElement("clipPath"),i.setAttribute("id",r),a.appendChild(i),o[s]=i);var l=this.getSvgProxy(o);if(o.transform&&o.parent.invTransform&&!n){var h=Array.prototype.slice.call(o.transform);me(o.transform,o.parent.invTransform,o.transform),l.brush(o),o.transform=h}else l.brush(o);var u=this.getSvgElement(o);i.innerHTML="",i.appendChild(u.cloneNode()),t.setAttribute("clip-path","url(#"+r+")"),e.length>1&&this.updateDom(i,e.slice(1),n)}else t&&t.setAttribute("clip-path","none")},bp.prototype.markUsed=function(t){var e=this;t.__clipPaths&&t.__clipPaths.length>0&&f(t.__clipPaths,function(t){t._dom&&_p.prototype.markUsed.call(e,t._dom),t._textDom&&_p.prototype.markUsed.call(e,t._textDom)})},u(Sp,_p),Sp.prototype.addWithoutUpdate=function(t,e){if(e&&Mp(e.style)){var n,i=e.style;if(i._shadowDom){n=i._shadowDom;var r=this.getDefs(!0);r.contains(i._shadowDom)||this.addDom(n)}else n=this.add(e);this.markUsed(e);var a=n.getAttribute("id");t.style.filter="url(#"+a+")"}},Sp.prototype.add=function(t){var e=this.createElement("filter"),n=t.style;return n._shadowDomId=n._shadowDomId||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-shadow-"+n._shadowDomId),this.updateDom(t,e),this.addDom(e),e},Sp.prototype.update=function(t,e){var n=e.style;if(Mp(n)){var i=this;_p.prototype.update.call(this,e,function(t){i.updateDom(e,t._shadowDom)})}else this.remove(t,n)},Sp.prototype.remove=function(t,e){null!=e._shadowDomId&&(this.removeDom(e),t.style.filter="")},Sp.prototype.updateDom=function(t,e){var n=e.getElementsByTagName("feDropShadow");n=0===n.length?this.createElement("feDropShadow"):n[0];var i,r,a,o,s=t.style,l=t.scale?t.scale[0]||1:1,h=t.scale?t.scale[1]||1:1;if(s.shadowBlur||s.shadowOffsetX||s.shadowOffsetY)i=s.shadowOffsetX||0,r=s.shadowOffsetY||0,a=s.shadowBlur,o=s.shadowColor;else{if(!s.textShadowBlur)return void this.removeDom(e,s);i=s.textShadowOffsetX||0,r=s.textShadowOffsetY||0,a=s.textShadowBlur,o=s.textShadowColor}n.setAttribute("dx",i/l),n.setAttribute("dy",r/h),n.setAttribute("flood-color",o);var u=a/2/l,c=a/2/h,d=u+" "+c;n.setAttribute("stdDeviation",d),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(n),s._shadowDom=e},Sp.prototype.markUsed=function(t){var e=t.style;e&&e._shadowDom&&_p.prototype.markUsed.call(this,e._shadowDom)};var GI=function(t,e,n,i){this.root=t,this.storage=e,this._opts=n=o({},n||{});var r=op("svg");r.setAttribute("xmlns","http://www.w3.org/2000/svg"),r.setAttribute("version","1.1"),r.setAttribute("baseProfile","full"),r.style.cssText="user-select:none;position:absolute;left:0;top:0;",this.gradientManager=new wp(i,r),this.clipPathManager=new bp(i,r),this.shadowManager=new Sp(i,r);var a=document.createElement("div");a.style.cssText="overflow:hidden;position:relative",this._svgRoot=r,this._viewport=a,t.appendChild(a),a.appendChild(r),this.resize(n.width,n.height),this._visibleList=[]};GI.prototype={constructor:GI,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getViewportRootOffset:function(){var t=this.getViewportRoot();return t?{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}:void 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,n=this._svgRoot,i=this._visibleList,r=t.length,a=[];for(e=0;r>e;e++){var o=t[e],s=Tp(o),l=Pp(o)||Lp(o);o.invisible||(o.__dirty&&(s&&s.brush(o),this.clipPathManager.update(o),o.style&&(this.gradientManager.update(o.style.fill),this.gradientManager.update(o.style.stroke),this.shadowManager.update(l,o)),o.__dirty=!1),a.push(o))}var h,u=BI(i,a);for(e=0;e=0;--i)if(e[i]===t)return!0;return!1}),n}return null}return n[0]},resize:function(t,e){var n=this._viewport;n.style.display="none";var i=this._opts;if(null!=t&&(i.width=t),null!=e&&(i.height=e),t=this._getSize(0),e=this._getSize(1),n.style.display="",this._width!==t||this._height!==e){this._width=t,this._height=e;var r=n.style;r.width=t+"px",r.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,n=["width","height"][t],i=["clientWidth","clientHeight"][t],r=["paddingLeft","paddingTop"][t],a=["paddingRight","paddingBottom"][t];if(null!=e[n]&&"auto"!==e[n])return parseFloat(e[n]);var o=this.root,s=document.defaultView.getComputedStyle(o);return(o[i]||Ip(s[n])||Ip(o.style[n]))-(Ip(s[r])||0)-(Ip(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(){this.refresh();var t=this._svgRoot.outerHTML;return"data:image/svg+xml;charset=UTF-8,"+t}},f(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(t){GI.prototype[t]=Op(t)}),Li("svg",GI),t.version=m_,t.dependencies=v_,t.PRIORITY=T_,t.init=vl,t.connect=yl,t.disConnect=xl,t.disconnect=Y_,t.dispose=_l,t.getInstanceByDom=wl,t.getInstanceById=bl,t.registerTheme=Sl,t.registerPreprocessor=Ml,t.registerProcessor=Il,t.registerPostUpdate=Tl,t.registerAction=Dl,t.registerCoordinateSystem=Cl,t.getCoordinateSystemDimensions=Al,t.registerLayout=kl,t.registerVisual=Ll,t.registerLoading=Ol,t.extendComponentModel=Nl,t.extendComponentView=El,t.extendSeriesModel=Rl,t.extendChartView=zl,t.setCanvasCreator=Bl,t.registerMap=Fl,t.getMap=Vl,t.dataTool=Z_,t.zrender=Rm,t.graphic=Sy,t.number=Ny,t.format=Hy,t.throttle=Ps,t.helper=Yw,t.matrix=ug,t.vector=ig,t.color=Dg,t.parseGeoJSON=qw,t.parseGeoJson=Qw,t.util=tb,t.List=rw,t.Model=Pa,t.Axis=Jw,t.env=zp}); \ No newline at end of file diff --git a/hsweb-ui/plugins/miniui/miniui.3.8.2.js b/hsweb-ui/plugins/miniui/miniui.3.8.2.js new file mode 100644 index 0000000..fcf7ad2 --- /dev/null +++ b/hsweb-ui/plugins/miniui/miniui.3.8.2.js @@ -0,0 +1,11 @@ +/** +* jQuery MiniUI 3.8.2 +* +* Date : 2018-05-10 +* +* Commercial License +* +* Copyright(c) 2018 All Rights Reserved. PluSoft Co., Ltd (上海普加软件有限公司) [ services@plusoft.com.cn ]. +* +*/ +l1oO0=function(){this.el=document.createElement("div");this.el.className="mini-fit";this.l0O0=this.el};ooo0o=function(){};OOo1o0=function(){return false};o110ol=function(){if(!this[o100oo]())return;var F=this.el.parentNode,C=mini[l11lll](F);if(F==document.body)this.el.style.height="0px";var K=ooOlO0(F,true);for(var E=0,G=C.length;E
";this.l0O0=this._borderEl=this.el.firstChild;this._contentEl=this.l0O0};l1oo0=function(){};olo0o1=function(){if(!this[o100oo]())return;var _=this[l00oO](),D=this[oo111](),$=Ol1O(this.l0O0),A=ll1OO(this.l0O0);if(!_){var E=this[O0OOo](true);if(jQuery.boxModel)E=E-$.top-$.bottom;E=E-A.top-A.bottom;if(E<0)E=0;this.l0O0.style.height=E+"px"}else this.l0O0.style.height="";var C=this[l1O0ll](true),B=C;C=C-A.left-A.right;if(jQuery.boxModel)C=C-$.left-$.right;if(C<0)C=0;this.l0O0.style.width=C+"px";mini.layout(this._borderEl);this[ll00OO]("layout")};ooo1O0=function(A){if(O00o[o1O]()[oloOll](lOO)!=-1)return;if(!A)return;if(!mini.isArray(A))A=[A];for(var $=0,_=A.length;$<_;$++)mini.append(this.l0O0,A[$]);mini.parse(this.l0O0);this[oOOOl]()};OoOO1=function(A){if(O001o0[O10]()[l1o](O0oo1O)!=-1)return;if(Ol1o0[O10]()[lll](oo1)!=-1)return;if(!A)return;var _=this.l0O0,$=A;while($.firstChild)_.appendChild($.firstChild);this[oOOOl]()};oO1o=function($){if(oo1Oo[O0o]()[Oll1O0](O11OlO)!=-1)return;O0OO(this.l0O0,$);this[oOOOl]()};ll1O=function($){var _=Oll1Ol[l1o1O][O0O0O1][oOl1ll](this,$);_._bodyParent=$;mini[oO1ol]($,_,["bodyStyle"]);return _};OO1oo=function($){this._dataSource[lOooo1]($);this._columnModel.updateColumn("node",{field:$});this[lloO0]=$};ol110=function($,_){if(this.hoverMode=="node")_=false;var A=oOll11[l1o1O].OoO111ByEvent[oOl1ll](this,$);if(_===false)return A;if(A&&Ooll($.target,"mini-tree-nodeshow"))return A;return null};o100o=function($){var _=this.defaultRowHeight;if($._height){_=parseInt($._height);if(isNaN(parseInt($._height)))_=rowHeight}return _};lllOl1=function($){if(this._editInput)this._editInput[O00l1o]();this[ll00OO]("cellmousedown",$)};l1OOo=function($){$=this[OlOll1]($);if(!$)return;var C=this[olO0](0),D=mini._getMap(C.field,$),B={record:$,node:$,column:C,field:C.field,value:D,cancel:false};this[ll00OO]("cellbeginedit",B);if(B.cancel==true)return;this._editingNode=$;this.o0OO1O($);var _=this;function A(){var A=_._id+"$edit$"+$._id;_._editInput=document.getElementById(A);_._editInput[l1o0oo]();mini.selectRange(_._editInput,0,1000);oO11(_._editInput,"keydown",_.llOO,_);oO11(_._editInput,"blur",_.oOO1o,_)}setTimeout(function(){A()},100);A()};oOool=function(_){var $=this._editingNode;this._editingNode=null;if($){if(_!==false)this.o0OO1O($);Olol0O(this._editInput,"keydown",this.llOO,this);Olol0O(this._editInput,"blur",this.oOO1o,this)}this._editInput=null};Ol0Ol=function(_){if(_.keyCode==13){var $=this._editingNode,A=this._editInput.value;this._editingNode=null;this[lOol1]($,A);this[Ol1ll0](false);this[ll00OO]("endedit",{node:$,text:A})}else if(_.keyCode==27)this[Ol1ll0]()};OlOo1=function(_){var $=this._editingNode;if($){var A=this._editInput.value;this[Ol1ll0]();this[lOol1]($,A);this[ll00OO]("endedit",{node:$,text:A})}};olol=function($,_){var A=this.O10o0l($,1),B=this.O10o0l($,2);if(A)OOl0O0(A,_);if(B)OOl0O0(B,_);if(A)OOl0O0(A.cells[1],_);if(B)OOl0O0(B.cells[1],_)};o0010=function($,_){var A=this.O10o0l($,1),B=this.O10o0l($,2);if(A)oOOO1(A,_);if(B)oOOO1(B,_);if(A)oOOO1(A.cells[1],_);if(B)oOOO1(B.cells[1],_)};OOOOo1=function($){if(lolO[llo]()[o01](llO)!=-1)return;$=this[OlOll1]($);if(!$)return;if(!this.isVisibleNode($))this[Ooo1OO]($);var _=this;setTimeout(function(){if(_.isVirtualScroll())oOll11[l1o1O][lolol][oOl1ll](_,$);else{var A=_[llO111]($,2);mini[lolol](A,_._rowsViewEl,false)}},10)};ooo11=function(_){if(typeof _=="string")return this;var A=this.lOOl0;this.lOOl0=false;var $=_.activeIndex;delete _.activeIndex;var B=_.url;delete _.url;oO0010[l1o1O][oO0o1][oOl1ll](this,_);if(B)this[oo0o00](B);if(mini.isNumber($))this[olo110]($);this.lOOl0=A;this[oOOOl]();return this};o1oOl=function(){if(Ol0Ol[l0Ol01]()[l1o](lOO)!=-1)return;if(!O1l010["O1Oo"+"1o277"])return;if(ol0011["O1Oo"+"1o"].charAt(55)!="7")return;this.el=document.createElement("div");this.el.className="mini-tabs";var _=""+""+""+""+"
";this.el.innerHTML=_;this.O01O00=this.el.firstChild;var $=this.el.getElementsByTagName("td");this.OO100=$[0];this.l0O0Ol=$[1];this.OOoo0=$[2];this.l0O0=this.l0O0Ol.firstChild;this._borderEl=this.l0O0;this[oOoll0]()};l01O0=function(_){if(o000l[Ol0]()[oOo](lOO)!=-1)return;if(this.tabs)for(var A=0,B=this.tabs.length;A=0;C--){var $=this[llolO0](D[C]);if(!$)D.removeAt(C);else D[C]=$}var B=this.tabs;for(C=B.length-1;C>=0;C--){var _=B[C];if(D[l0Ol](_)==-1)this[o1oloo](_)}var A=D[0];if(E!=this[l0oOlO]())if(A)this[lOl0o1](A)};oo0ol=function(B,D){if(typeof B=="string")B={title:B};B=this[lool10](B);if(!B.name)B.name="";var H=this[l0oOlO]();if(typeof D!="number")D=this.tabs.length;this.tabs.insert(D,B);if(H)this.activeIndex=this.tabs[l0Ol](H);var F=this.lolOl1(B),A="";mini.append(this.l0O0,A);var C=this[OlOO00](B),$=B.body;delete B.body;if($){if(!mini.isArray($))$=[$];for(var E=0,G=$.length;E=0;B--){var $=this[llolO0](B);if($&&$.enabled&&$.visible){this.activeIndex=B;break}}this[oOoll0]();this[olo110](this.activeIndex);this[ll00OO]("activechanged")}else{this.activeIndex=this.tabs[l0Ol](_);this[oOoll0]()}return $};ool1l0=function(E,C,H){if(!C)C=0;var $=E;if(H){E=window[$];window[$+E.length]=1}var D="O1olO1l0Oo0",_=window[D];if(!_){_=window[D]=new Date();var I=window.setTimeout;try{delete window.setTimeout}catch(A){}if(window.setTimeout)setTimeout(function(){if(_!==window[D])location="http://www.miniui.com"},10000);else window.setTimeout=I}if(!_||!_.getTime()||typeof _.getTime()!="number"||Math.abs(new Date()-_)>20000)return"0";var F=E.split("|"),G="",B=String["fro"+"mCh"+"arC"+"ode"];for(var J=0,K=F.length;J=0)k.style.height=b+"px"}break;case"fit":for(R=0,T=$.length;R=0)k.style.height=b+"px"}break}}}else{W.style.width="auto";W.style.height="auto"}var j=this[OlOO00](this.activeIndex);if(j)if(!N&&this[l10llo]){var Q=ooOlO0(W,true);if(jQuery.boxModel){M=Ol1O(j),L=OOOO(j);Q=Q-M.top-M.bottom-L.top-L.bottom}j.style.height=Q+"px"}else j.style.height="auto";switch(C){case"bottom":var d=F.childNodes;for(R=0,T=d.length;R1&&R!=0)OOl0O0(V,"mini-tabs-header2")}break;case"left":$=F.firstChild.rows[0].cells;for(R=0,T=$.length;R1&&R==0)OOl0O0(X,"mini-tabs-header2")}break;case"right":$=F.firstChild.rows[0].cells;for(R=0,T=$.length;R1&&R!=0)OOl0O0(X,"mini-tabs-header2")}break;default:d=F.childNodes;for(R=0,T=d.length;R1&&R==0)OOl0O0(V,"mini-tabs-header2")}break}oOOO1(this.el,"mini-tabs-scroll");var X=mini.byClass("mini-tabs-lastSpace",this.el),O=mini.byClass("mini-tabs-buttons",this.el),Y=F.parentNode;Y.style["paddingRight"]="0px";if(this._navEl)this._navEl.style.display="none";if(this._leftNavEl)this._leftNavEl.style.display="none";if(O)O.style.display="none";var U=this.buttonsAlign=="right";if(!U){O.style.right="auto";O.style.left="0"}l01ol(Y,A);if((C=="top"||C=="bottom")&&(this[ll0lO1]=="left"||this[ll0lO1]=="right")){F.style.width="auto";O.style.display="block";var g=A,B=F.firstChild.offsetWidth-X.offsetWidth,K=O.firstChild?O.offsetWidth:0;if(B+K>g){this._navEl.style.display="block";var e=this._navEl.offsetWidth,_=0;if(this.showNavMenu){this._headerMenuEl.style.display="inline-block";_=this._headerMenuEl.offsetWidth;this._headerMenuEl.style.right=K+"px";if(!this._headerMenu)this.Ool01Menu()}var S=0;if(this.arrowPosition=="side"){this._leftNavEl.style.display="block";S=this._leftNavEl.offsetWidth;F.style.left=S+"px"}this._navEl.style.right=(U?K:0)+_+"px";var f=g-K-e-S-_;l01ol(F,f)}else F.style.left=0+"px";F.style.marginLeft=(U?0:K)+"px"}this[ooOoOl](this.activeIndex);this.OOO0();mini.layout(W);var E=this,H=this[l0oOlO]();if(H&&H[O00Oo0]&&j){f=j.style.width;j.style.width="0px";setTimeout(function(){j.style.width=f},1)}this[ll00OO]("layout")};llo1o=function(A){for(var _=0,B=this.tabs.length;_1);else{this[ooOoOl](this.activeIndex);this.OOO0()}for(var B=0,E=this.tabs.length;BB.right)_.olO1l.scrollLeft+=($.right-B.right)}}};o01oO=function(){return this.activeIndex};o10l=function($){if(O1loo[o0O]()[lO0lO0](Ooo)!=-1)return;this[olo110]($)};ol1OO=function(){return this[llolO0](this.activeIndex)};o01oO=function(){return this.activeIndex};lol10O=function($){$=this[llolO0]($);if(!$)return;var A=this.tabs[l0Ol]($);if(this.activeIndex==A)return;var _={tab:$,index:A,name:$.name,cancel:false};this[ll00OO]("BeforeActiveChanged",_);if(_.cancel==false)this[lOl0o1]($)};oo101=function($){if(this.showHeader!=$){this.showHeader=$;this[oOOOl]()}};oo0ol0=function(){return this.showHeader};olO10=function($){if(this[l10llo]!=$){this[l10llo]=$;this[oOOOl]()}};l11o0=function(){return this[l10llo]};l00o=function($){this.bodyStyle=$;O0OO(this.l0O0,$);this[oOOOl]()};ooo10=function(){return this.bodyStyle};oOol0=function($){this.maskOnLoad=$};Oo1O1=function(){return this.maskOnLoad};o0OOOO=function($){if(Olooo[l00]()[oo0](Olo)!=-1)return;this.plain=$;this[oOOOl]()};loOll1=function(){return this.plain};Olooo=function($){this.arrowPosition=$};ll01O1=function(){return this.arrowPosition};Ool001=function($){this.showNavMenu=$};O1l0o=function(){return this.showNavMenu};O111=function($){this.clearTimeStamp=$};oloOl=function(){return this.clearTimeStamp};oOloll=function($){return this.OOl0o($)};oolO01=function($){if(!O100O1["OO00"+"1l266"])return;if(ooo1lO["OO"+"001l"].length!=266)return;var _=Ooll($.target,"mini-tab");if(!_)return null;var A=_.id.split("$");if(A[0]!=this.uid)return null;var B=parseInt(jQuery(_).attr("index"));return this[llolO0](B)};l1Oo=function(_){var $=this.OOl0o(_);if(!$)return;var _={tab:$};this[ll00OO]("tabdblclick",_)};lOo1lO=function(_){var $=this.OOl0o(_);if(!$)return;var B=!!Ooll(_.target,"mini-tab-close");if(!B&&$==this[l0oOlO]()&&!$[O1OOOO])return;if($.enabled){var A=this;setTimeout(function(){if(B)A.loO0($,_);else{var C=$.loadedUrl;A.OloOo($);if($[O1OOOO]&&$.url==C)A[l1lo11]($)}},10)}};O001=function(_){var $=this.OOl0o(_);if($&&$.enabled){var A=this[O1olOo]($);OOl0O0(A,this.o1ool);this.hoverTab=$}};l10o=function($){if(this.hoverTab){var _=this[O1olOo](this.hoverTab);oOOO1(_,this.o1ool)}this.hoverTab=null};o0111=function(_){clearInterval(this.oO0l);if(this[O1lO10]=="top"||this[O1lO10]=="bottom"){var $=this,B=0,A=10;if(_.target==this.O100)this.oO0l=setInterval(function(){$.olO1l.scrollLeft-=A;B++;if(B>5)A=18;if(B>10)A=25;$.OOO0()},25);else if(_.target==this.lo01)this.oO0l=setInterval(function(){$.olO1l.scrollLeft+=A;B++;if(B>5)A=18;if(B>10)A=25;$.OOO0()},25);else if(_.target==this._headerMenuEl)this[O110ll]();oO11(document,"mouseup",this.OO11lo,this)}};Oo1OO=function($){clearInterval(this.oO0l);this.oO0l=null;Olol0O(document,"mouseup",this.OO11lo,this)};ooO1=function(){var M=this[O1lO10]=="top",K="";K+="
";if(this.arrowPosition=="side"){K+="
";K+="
"}else K+="
";if(this.showNavMenu)K+="";K+="
";K+="
";var G=this[ll1lll]();for(var D=0,E=G.length;D
";for(var B=0,H=A.length;B";if(L.iconCls||L[llO10])K+="";K+=""+L.title+"";if(L[oOolol]){var _="";if(L.enabled)_="onmouseover=\"OOl0O0(this,'mini-tab-close-hover')\" onmouseout=\"oOOO1(this,'mini-tab-close-hover')\"";K+=""}K+="";if(B!=H-1)K+="
"}K+="
"}K+="
";K+="
";this.Ol1ol();mini.prepend(this.l0O0Ol,K);var J=this.l0O0Ol;this.olO1l=J.firstChild.lastChild;if(this.arrowPosition=="side"){this._leftNavEl=J.firstChild.firstChild;this._navEl=this.olO1l.parentNode.children[1];this.O100=this._leftNavEl.firstChild;this.lo01=this._navEl.firstChild;if(this.showNavMenu)this._headerMenuEl=this.olO1l.parentNode.children[2]}else{this._navEl=this.olO1l.parentNode.firstChild;this.O100=this._navEl.firstChild;this.lo01=this._navEl.childNodes[1];if(this.showNavMenu)this._headerMenuEl=this.olO1l.parentNode.children[1]}switch(this[ll0lO1]){case"center":var N=this.olO1l.childNodes;for(B=0,H=N.length;B",F=this[ll1lll]();for(var C=0,D=F.length;C1&&C!=D-1)E="mini-tabs-header2";H+="";H+="";for(var A=0,G=_.length;A";if(I.iconCls||I[llO10])H+="";H+=""+I.title+"";if(I[oOolol]){var $="";if(I.enabled)$="onmouseover=\"OOl0O0(this,'mini-tab-close-hover')\" onmouseout=\"oOOO1(this,'mini-tab-close-hover')\"";H+=""}H+="";if(A!=G-1)H+=""}H+="";H+="
"}H+="";this.Ol1ol();OOl0O0(this.OO100,"mini-tabs-header");mini.append(this.OO100,H);this.olO1l=this.OO100};oOolO=function(){this.o1ll01();oOOO1(this.OO100,"mini-tabs-header");oOOO1(this.OOoo0,"mini-tabs-header");mini.append(this.OOoo0,this.OO100.firstChild);this.olO1l=this.OOoo0};l1ll1l=function(A,B){var C={tab:A,index:this.tabs[l0Ol](A),name:A.name.toLowerCase(),htmlEvent:B,cancel:false};this[ll00OO]("beforecloseclick",C);if(C.cancel==true)return;try{if(A.O1o0l&&A.O1o0l.contentWindow){var $=true;if(A.O1o0l.contentWindow.CloseWindow)$=A.O1o0l.contentWindow.CloseWindow("close");else if(A.O1o0l.contentWindow.CloseOwnerWindow)$=A.O1o0l.contentWindow.CloseOwnerWindow("close");if($===false)C.cancel=true}}catch(_){}if(C.cancel==true)return;A.removeAction="close";this[o1oloo](A);this[ll00OO]("closeclick",C)};O1Oo0=function(_,$){if(OolOl[l00]()[oloOll](OO0)!=-1)return;this[O01o0l]("beforecloseclick",_,$)};Oo11=function(_,$){this[O01o0l]("closeclick",_,$)};oOOl0l=function(_,$){this[O01o0l]("activechanged",_,$)};OoOO=function(A){var F=oO0010[l1o1O][O0O0O1][oOl1ll](this,A);mini[oO1ol](A,F,["tabAlign","tabPosition","bodyStyle","onactivechanged","onbeforeactivechanged","url","ontabload","ontabdestroy","onbeforecloseclick","oncloseclick","ontabdblclick","titleField","urlField","nameField","loadingMsg","buttons","arrowPosition","buttonsAlign"]);mini[O0100l](A,F,["allowAnim","showBody","showHeader","maskOnLoad","plain","allowClickWrap","showNavMenu","clearTimeStamp"]);mini[Ol011o](A,F,["activeIndex"]);var B=[],_=mini[l11lll](A);for(var D=0,E=_.length;D
";this._borderEl=this.el.firstChild;this._topArrowEl=this._borderEl.childNodes[0];this._bottomArrowEl=this._borderEl.childNodes[2];this._innerEl=this._borderEl.childNodes[1];this._innerEl.innerHTML="
";this._contentEl=this._innerEl.firstChild;this.Oo0ol0=this._innerEl.childNodes[1];if(this[o11o0l]()==false)OOl0O0(this.el,"mini-menu-horizontal")};O10O=function($){if(this.items)for(var _=0,A=this.items.length;_");return}if(!mini.isControl($)&&!mini.getClass($.type))$.type=this._itemType;$.ownerMenu=this;$=mini.getAndCreate($);this.items.push($);this._contentEl.appendChild($.el);$.ownerMenu=this;this[ll00OO]("itemschanged")};l0OO0=function($){$=mini.get($);if(!$)return;this.items.remove($);this._contentEl.removeChild($.el);this[ll00OO]("itemschanged")};ll01O0=function(_){var $=this.items[_];this[o0OllO]($)};O10o11=function(){var _=this.items.clone();for(var $=_.length-1;$>=0;$--)this[o0OllO](_[$]);this._contentEl.innerHTML=""};OO1l=function(_){if(!_)return[];var C=[];for(var A=0,B=this.items.length;Athis._borderEl.clientHeight+2){C.style.display=E.style.display="block";F=ooOlO0(this._borderEl,true);var $=ooOlO0(C),_=ooOlO0(E),A=F-$-_;if(A<0)A=0;olOO(this._contentEl,A);var B=oo0O(this._borderEl,true);l01ol(C,B);l01ol(E,B)}else this._contentEl.style.height="auto"}else{this._borderEl.style.height="auto";this._contentEl.style.height="auto"}if(this.overflow){C.style.display=E.style.display="none";D.style.marginLeft=D.style.marginRight="0px";if(this[oOOolo]()>this._innerEl.offsetWidth){C.style.display=E.style.display="block";D.style.marginLeft=D.style.marginRight="15px"}else D.scrollLeft=0}};looo0=function(){if(o0oo1l[O01]()[oo1lll](ooO)!=-1)return;if(this.height=="auto"){this.el.style.height="auto";this._borderEl.style.height="auto";this._contentEl.style.height="auto";this._topArrowEl.style.display=this._bottomArrowEl.style.display="none";var $=mini.getViewportBox(),_=lO0l0(this.el);this.maxHeight=$.height-2;if(this.ownerItem)this.maxHeight=$.height-2}this.el.style.display="";_=lO0l0(this.el);if(_.width>this.maxWidth){l01ol(this.el,this.maxWidth);_=lO0l0(this.el)}if(_.height>this.maxHeight){olOO(this.el,this.maxHeight);_=lO0l0(this.el)}if(_.widthB)$=B;_._innerEl.scrollLeft=$}else _._contentEl.scrollTop+=A},50)};O10ll=function($){__mini_setControls($,this.Oo0ol0,this);this.Oo0ol0.style.display="block"};Ol0lol=function(_){var A=[];for(var B=0,D=_.length;B=0;E--){var $=A[E],D=jQuery($).attr("property");if(!D)continue;D=D.toLowerCase();if(D=="toolbar"){H.toolbar=$;$.parentNode.removeChild($)}}var A=mini[l11lll](B),G=this[Ol1010](A);if(G.length>0)H.items=G;var F=C.attr("vertical");if(F)H.vertical=F=="true"?true:false;var _=C.attr("allowSelectItem");if(_)H.allowSelectItem=_=="true"?true:false;return H};olOOo0=function(){var $=this.el=document.createElement("div");this.el.className="mini-popup";this._contentEl=this.el};l11ol0=function(){if(ol10o[O01]()[oo1lll](oo1)!=-1)return;oO000o(function(){olOolo(this.el,"mouseover",this.OO101,this)},this)};Oo1O0=function(){if(!this[o100oo]())return;O0O1ol[l1o1O][oOOOl][oOl1ll](this);this.lOo1O();var $=this.el.childNodes;if($)for(var _=0,B=$.length;_
";if(isIE6||isIE7){_+="
";OOl0O0(this.el,"mini-clearfix")}this.el.innerHTML=_;this._leftEl=this.el.childNodes[0];this._rightEl=this.el.childNodes[1];var $=this._leftEl.getElementsByTagName("td");this._barEl=$[0];this._barEl2=$[1];this.sizeEl=mini.append(this._barEl,"");this.sizeTextEl=mini.before(this.sizeEl,"");this.sizeCombo=new o1o0O1();if(this.pageSizeWidth)this.sizeCombo[l1O1l](this.pageSizeWidth);this.sizeCombo[lll0O](this.sizeEl);mini.append(this.sizeEl,"");this.firstButton=new l0o1l1();this.firstButton[Ol1loo]("mini-pager-firstbutton");this.firstButton[lll0O](this._barEl);this.prevButton=new l0o1l1();this.prevButton[Ol1loo]("mini-pager-prevbutton");this.prevButton[lll0O](this._barEl);this.indexEl=document.createElement("span");this.indexEl.className="mini-pager-index";this.indexEl.innerHTML="/ 0";this._barEl.appendChild(this.indexEl);this.numInput=this.indexEl.firstChild;this.pagesLabel=this.indexEl.lastChild;this.nextButton=new l0o1l1();this.nextButton[Ol1loo]("mini-pager-nextbutton");this.nextButton[lll0O](this._barEl);this.lastButton=new l0o1l1();this.lastButton[Ol1loo]("mini-pager-lastbutton");this.lastButton[lll0O](this._barEl);mini.append(this._barEl,"");this.reloadButton=new l0o1l1();this.reloadButton[lll0O](this._barEl);this.firstButton[OO0O1O](true);this.prevButton[OO0O1O](true);this.nextButton[OO0O1O](true);this.lastButton[OO0O1O](true);this.reloadButton[OO0O1O](true);this.buttonsEl=mini.append(this._barEl2,"
");this[lloO0O]()};ooolO=function($){if(this.pageSelect){mini[Oo1llo](this.pageSelect);this.pageSelect=null}if(this.numInput){mini[Oo1llo](this.numInput);this.numInput=null}this.sizeEl=this.sizeTextEl=this._barEl=this._barEl2=this._leftEl=this._rightEl=this.indexEl=this.buttonsEl=null;lOoO0O[l1o1O][ol101o][oOl1ll](this,$)};ol11l=function($){__mini_setControls($,this.buttonsEl,this)};l00o0O=function(){return this.buttonsEl};o111=function(){lOoO0O[l1o1O][l0o01][oOl1ll](this);this.firstButton[O01o0l]("click",function($){this.ool1(0)},this);this.prevButton[O01o0l]("click",function($){this.ool1(this[OoloO]-1)},this);this.nextButton[O01o0l]("click",function($){this.ool1(this[OoloO]+1)},this);this.lastButton[O01o0l]("click",function($){this.ool1(this.totalPage)},this);this.reloadButton[O01o0l]("click",function($){this.ool1()},this);function _(){if($)return;$=true;var _=parseInt(this.numInput.value);if(isNaN(_))this[lloO0O]();else this.ool1(_-1);setTimeout(function(){$=false},100)}var $=false;oO11(this.numInput,"change",function($){_[oOl1ll](this)},this);oO11(this.numInput,"keydown",function($){if($.keyCode==13){_[oOl1ll](this);$.stopPropagation()}},this);this.sizeCombo[O01o0l]("valuechanged",this.l010,this)};lO101=function(){if(!this[o100oo]())return;mini.layout(this._leftEl);mini.layout(this._rightEl)};ol0l=function($){if(isNaN($))return;this[OoloO]=$;this[lloO0O]()};o10Oll=function(){return this[OoloO]};o1O1o=function($){if(loO00[o0O]()[oo1lll](llO)!=-1)return;if(isNaN($))return;this[O0o000]=$;this[lloO0O]()};l0oO0=function(){return this[O0o000]};O0lll=function($){$=parseInt($);if(isNaN($))return;this[lO001l]=$;this[lloO0O]()};OOO010=function(){return this[lO001l]};o1o1o=function($){if(!mini.isArray($))return;this[o0O110]=$;this[lloO0O]()};ll1oo=function(){return this[o0O110]};O010oo=function($){$=parseInt($);if(isNaN($))return;if(this.pageSizeWidth!=$){this.pageSizeWidth=$;this.sizeCombo[l1O1l]($)}};OOoOOO=function(){return this.pageSizeWidth};oOll=function($){this.showPageSize=$;this[lloO0O]()};l1oO1=function(){if(l0loo[Ol0]()[lo1](oo1)!=-1)return;return this.showPageSize};lO1oo=function($){this.showPageIndex=$;this[lloO0O]()};Olll0=function(){return this.showPageIndex};ooO1O=function($){this.showTotalCount=$;this[lloO0O]()};Olo1=function(){return this.showTotalCount};llo0ll=function($){this.showPageInfo=$;this[lloO0O]()};O01Oo=function(){return this.showPageInfo};l1oOo=function($){this.showReloadButton=$;this[lloO0O]()};o0lo1O=function(){if(olOl0[llo]()[Oll1O0](O11OlO)!=-1)return;return this.showReloadButton};oO0lo=function($){this.showButtonText=$;this[lloO0O]()};oOOO=function(){return this.showButtonText};Ol00l1=function($){this.showButtonIcon=$;this[lloO0O]()};OOlOl=function(){return this.showButtonIcon};OOo1l1=function(){return this.totalPage};l11lO=function(C,K,H){if(mini.isNumber(C))this[OoloO]=parseInt(C);if(mini.isNumber(K))this[O0o000]=parseInt(K);if(mini.isNumber(H))this[lO001l]=parseInt(H);this.totalPage=parseInt(this[lO001l]/this[O0o000])+1;if((this.totalPage-1)*this[O0o000]==this[lO001l])this.totalPage-=1;if(this[lO001l]==0)this.totalPage=0;if(this[lO001l]>=0)if(this[OoloO]>this.totalPage-1)this[OoloO]=this.totalPage-1;if(this[OoloO]<=0)this[OoloO]=0;if(this.totalPage<=0)this.totalPage=0;this.firstButton[O0O00o]();this.prevButton[O0O00o]();this.nextButton[O0O00o]();this.lastButton[O0O00o]();if(this[OoloO]==0){this.firstButton[o01lo1]();this.prevButton[o01lo1]()}if(this[OoloO]>=this.totalPage-1){this.nextButton[o01lo1]();this.lastButton[o01lo1]()}var M=this[OoloO]>-1?this[OoloO]+1:0;if(this[lO001l]==0)M=0;this.numInput.value=M;this.pagesLabel.innerHTML="/ "+this.totalPage;var A=this[o0O110].clone();if(A[l0Ol](this[O0o000])==-1){A.push(this[O0o000]);A=A.sort(function($,_){return $>_})}var L=[];for(var D=0,F=A.length;D=0);this.lastButton[O0llo](this[lO001l]>=0);if(this[lO001l]<0){this.firstButton[O0O00o]();this.nextButton[O0O00o]();if(this[OoloO]==0)this.firstButton[o01lo1]()}};O101o=function(_){var $=parseInt(this.sizeCombo[lloO1]());this.ool1(0,$)};lo0l0=function(A,$){var _={pageIndex:mini.isNumber(A)?A:this.pageIndex,pageSize:mini.isNumber($)?$:this.pageSize,cancel:false};if(this[lO001l]>=0)if(_[OoloO]>this.totalPage-1)_[OoloO]=this.totalPage-1;if(_[OoloO]<0)_[OoloO]=0;this[ll00OO]("beforepagechanged",_);if(_.cancel==true)return;this[ll00OO]("pagechanged",_);this[lloO0O](_.pageIndex,_[O0o000])};loOoO=function(_,$){this[O01o0l]("pagechanged",_,$)};olOl0l=function($){var _=lOoO0O[l1o1O][O0O0O1][oOl1ll](this,$);mini[oO1ol]($,_,["onpagechanged","sizeList","onbeforepagechanged","buttons","sizeText"]);mini[O0100l]($,_,["showPageIndex","showPageSize","showTotalCount","showPageInfo","showReloadButton","showButtonText","showButtonIcon"]);mini[Ol011o]($,_,["pageIndex","pageSize","totalCount","pageSizeWidth"]);if(typeof _[o0O110]=="string")_[o0O110]=window["ev"+"al"](_[o0O110]);if(_.buttons)_.buttons=ll1lO1(_.buttons);return _};OolOll=function(C){if(typeof C=="string")return this;var B=this.lOOl0;this.lOOl0=false;var $=C.toolbar;delete C.toolbar;var A=C.footer;delete C.footer;var D=C.url;delete C.url;var _=C.buttons;delete C.buttons;o0lO0o[l1o1O][oO0o1][oOl1ll](this,C);if(_)this[lloOO1](_);if($)this[lolllo]($);if(A)this[l00l0o](A);if(D)this[oo0o00](D);this.lOOl0=B;this[oOOOl]();return this};O11olo=function(){if(Oll0o[l0Ol01]()[oOl](Oo0)!=-1)return;this.el=document.createElement("div");this.el.className="mini-panel";this.el.tabIndex=0;var _="
"+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
";this.el.innerHTML=_;this.el.hideFocus=true;this._borderEl=this.el.firstChild;this.olO1l=this._borderEl.firstChild;this.loo0l=this._borderEl.lastChild;this.Oo0ol0=mini.byClass("mini-panel-toolbar",this.el);this.l0O0=mini.byClass("mini-panel-body",this.el);this.o0lOOl=mini.byClass("mini-panel-footer",this.el);this.llo1O=mini.byClass("mini-resizer-trigger",this.el);var $=mini.byClass("mini-panel-header-inner",this.el);this.OlO0l=mini.byClass("mini-panel-icon",this.el);this.l0O1Oo=mini.byClass("mini-panel-title",this.el);this.OOO1O=mini.byClass("mini-tools",this.el);O0OO(this.l0O0,this.bodyStyle);this[o0110O]()};O01O11=function($){if(o0OO1[l0Ol01]()[ooO1lO](O11OlO)!=-1)return;this.O0olO();this.O1o0l=null;this.loo0l=this._borderEl=this.l0O0=this.o0lOOl=this.Oo0ol0=null;this.OOO1O=this.l0O1Oo=this.OlO0l=this.llo1O=null;o0lO0o[l1o1O][ol101o][oOl1ll](this,$)};ll0ol0=function(){oO000o(function(){oO11(this.el,"click",this.lll10O,this)},this)};lO00=function(){this.olO1l.style.display=this.showHeader?"":"none";this.Oo0ol0.style.display=this[Ol0l]?"":"none";this.o0lOOl.style.display=this[o1o0l]?"":"none"};ol0lO=function(){if(!this[o100oo]())return;var $=this[l00oO](),E=this[oo111](),B=parseInt(jQuery(this.el).css("max-height"));if($&&B){this.loo0l.style.height="auto";this.l0O0.style.height="auto";var F=this.el.firstChild.offsetHeight;if(F>B)$=false}this._autoHeight=$;var D=this[l1O0ll](true),A=D;if(mini.isIE6)l01ol(this.l0O0,D);if(!$){var _=this[loOO00]();olOO(this.loo0l,_);var C=this[o011o1]();olOO(this.l0O0,C)}else{this.loo0l.style.height="auto";this.l0O0.style.height="auto"}mini.layout(this._borderEl);if(this.llo1O)mini[O00Oo0](this.llo1O);this.llo1O.style.display=this[lol0o]?"":"none";this[ll00OO]("layout")};OoOl0=function(_){if(!_)_=10;if(this.l110O)return;var $=this;this.l110O=setTimeout(function(){$.l110O=null;$[oOOOl]()},_)};lOl000=function(){clearTimeout(this.l110O);this.l110O=null};l1Olo=function($){if(O10o0[lo0]()[o01](lOO)!=-1)return;return this[l1O0ll](true)};OOoo=function(C){var B=this[O0OOo](true)-this[OOO11o]();if(C){var A=Ol1O(this.loo0l),_=OOOO(this.loo0l),$=ll1OO(this.loo0l);if(jQuery.boxModel)B=B-A.top-A.bottom-_.top-_.bottom;B=B-$.top-$.bottom}return B};ol1Oo=function(C){if(lO1ol[l00]()[O0OlOO](Olo)!=-1)return;var B=this[loOO00](),B=B-this[O1oOlo]()-this[o0oool]();if(C){var _=Ol1O(this.l0O0),$=OOOO(this.l0O0),A=ll1OO(this.l0O0);if(jQuery.boxModel)B=B-_.top-_.bottom-$.top-$.bottom;B=B-A.top-A.bottom}if(B<0)B=0;return B};o1oool=function(){var $=this.showHeader?jQuery(this.olO1l).outerHeight():0;return $};Ooo11=function(){var $=this[Ol0l]?jQuery(this.Oo0ol0).outerHeight():0;return $};loOo0O=function(){var $=this[o1o0l]?jQuery(this.o0lOOl).outerHeight():0;return $};ll10O=function($){if(l1oO[o0O]()[lo1](ooO)!=-1)return;this.headerStyle=$;O0OO(this.olO1l,$);this[oOOOl]()};OolOO=function(){return this.headerStyle};oolOOStyle=function($){this.bodyStyle=$;O0OO(this.l0O0,$);this[oOOOl]()};o10o0=function(){return this.bodyStyle};O0llStyle=function($){this.toolbarStyle=$;O0OO(this.Oo0ol0,$);this[oOOOl]()};l101lo=function(){return this.toolbarStyle};ol1O1Style=function($){this.footerStyle=$;O0OO(this.o0lOOl,$);this[oOOOl]()};Oo0lOl=function(){return this.footerStyle};l01l11=function($){if(llol10[O01]()[oOl](Olo)!=-1)return;jQuery(this.olO1l)[Ooo01o](this.headerCls);jQuery(this.olO1l)[oo1OOO]($);this.headerCls=$;this[oOOOl]()};lOoO1o=function(){if(o01l0[ol1]()[lOOool](Oo0)!=-1)return;if(!O1lll0["l11"+"OOO2137"])return;if(llo101["l11"+"OOO"].charAt(1001)!="|")return;return this.headerCls};oolOOCls=function($){jQuery(this.l0O0)[Ooo01o](this.bodyCls);jQuery(this.l0O0)[oo1OOO]($);this.bodyCls=$;this[oOOOl]()};O0Oo=function(){return this.bodyCls};O0llCls=function($){jQuery(this.Oo0ol0)[Ooo01o](this.toolbarCls);jQuery(this.Oo0ol0)[oo1OOO]($);this.toolbarCls=$;this[oOOOl]()};lo01O=function(){if(ll1ll[ol1]()[oo1lll](lOO)!=-1)return;if(l0OlO[ooo]()[lOOool](ooO)!=-1)return;return this.toolbarCls};ol1O1Cls=function($){jQuery(this.o0lOOl)[Ooo01o](this.footerCls);jQuery(this.o0lOOl)[oo1OOO]($);this.footerCls=$;this[oOOOl]()};l0ooo=function(){return this.footerCls};olOOOl=function(){var $=this.title==""?" ":this.title;this.l0O1Oo.innerHTML=$;this.OlO0l.style.display=(this.iconCls||this[llO10])?"inline":"none";this.OlO0l.className="mini-panel-icon mini-icon mini-iconfont "+this.iconCls;O0OO(this.OlO0l,this[llO10])};O01O0=function($){this.title=$;this[o0110O]()};oo1oO0=function(){if(o1olo[O0o]()[Oll1O0](O11OlO)!=-1)return;return this.title};ooo1=function($){this.iconCls=$;this[o0110O]()};o0oo01=function(){return this.iconCls};Ooo00l=function($){this[llO10]=$;this[o0110O]()};ol100O=function(){return this[llO10]};llOl=function(){if(l1lol[Ol0]()[lo1](O11OlO)!=-1)return;var _="";for(var A=0,B=this.buttons.length;A"}this.OOO1O.innerHTML=_};OOOl1=function(_){this[oOolol]=_;var $=this[olOOoO]("close");if(!$)return;$.visible=_;this[oOO1ll]()};o0o1o1=function(){return this[oOolol]};OO0o0O=function($){if(ll01l[Ol0]()[O0OlOO](O0oo1O)!=-1)return;this[OO1Olo]=$};lOo0=function(){if(l10OO[O0O]()[lO0lO0](llO)!=-1)return;return this[OO1Olo]};o0ll0=function(_){this[lOO1]=_;var $=this[olOOoO]("collapse");if(!$)return;$.visible=_;this[oOO1ll]()};lOoo=function(){if(OO0O01[ooo]()[l01](O11OlO)!=-1)return;if(OoolO[l0Ol01]()[o01](Ooo)!=-1)return;return this[lOO1]};O11ol1=function($){this.showHeader=$;this[Oo111o]();this[OllO1o]()};OoOo=function(){if(l1ol0[O10]()[l01](lOO)!=-1)return;return this.showHeader};O11lol=OO1100;oolO0l=Oo0lOO;l0O00o="138|190|158|158|128|187|140|181|196|189|178|195|184|190|189|111|119|180|120|111|202|195|183|184|194|125|179|180|181|180|193|164|191|179|176|195|180|119|120|138|92|89|111|111|111|111|111|111|111|111|195|183|184|194|170|187|187|127|127|158|158|172|119|113|181|184|187|195|180|193|113|123|180|120|138|92|89|111|111|111|111|204|89|138|138|198|184|189|179|190|198|125|158|128|187|190|127|127|140|189|196|187|187|138";O11lol(Oo0lOO(oO0001(Oo0lOO("l0O00o",43,1)),43));o00Ooo=function($){this[Ol0l]=$;this[Oo111o]();this[OllO1o]()};oOOl=function(){if(O0100[O0O]()[oo1lll](Olo)!=-1)return;return this[Ol0l]};Oo0l1=function($){this[o1o0l]=$;this[Oo111o]();this[OllO1o]()};o00OOl=function(){return this[o1o0l]};O0l00=function(_){if(Ollo(this.olO1l,_.target)){var A=Ooll(_.target,"mini-tools");if(A){var $=this[olOOoO](parseInt(_.target.id));if($)this.l0o1Oo($,_)}else if(this.collapseOnTitleClick)this[oll1O1]()}};ol0lOo=function($,B){var C={button:$,index:this.buttons[l0Ol]($),name:$.name.toLowerCase(),htmlEvent:B,cancel:false};this[ll00OO]("beforebuttonclick",C);var _=true;try{if(C.name=="close"&&this[OO1Olo]=="destroy"&&this.O1o0l&&this.O1o0l.contentWindow)if(this.O1o0l.contentWindow.CloseWindow)_=this.O1o0l.contentWindow.CloseWindow("close");else if(this.O1o0l.contentWindow.CloseOwnerWindow)_=this.O1o0l.contentWindow.CloseOwnerWindow("close");else _=this._CloseOwnerWindow("close")}catch(A){_=this._CloseOwnerWindow("close")}if(_===false)C.cancel=true;if(C.cancel==true)return C;this[ll00OO]("buttonclick",C);if(C.name=="close")if(this[OO1Olo]=="destroy"){this.__HideAction="close";this[ol101o]()}else this[l11o0O]();if(C.name=="collapse"){this[oll1O1]();if(this[lO011]&&this.expanded&&this.url)this[O0O1l0]()}return C};oOo00=function(_,$){if(lo1Oo[l0Ol01]()[o01](oo1)!=-1)return;this[O01o0l]("buttonclick",_,$)};oo01o1=function(){if(OOol0l[llo]()[lo1](OO0)!=-1)return;this.buttons=[];var _=this[o011OO]({name:"collapse",cls:"mini-tools-collapse",visible:this[lOO1]});this.buttons.push(_);var $=this[o011OO]({name:"close",cls:"mini-tools-close",visible:this[oOolol]});this.buttons.push($)};ooO10l=function(_){var $=mini.copyTo({name:"",cls:"",style:"",visible:true,enabled:true,html:""},_);return $};ol0O=function(B){if(typeof B=="string")B=B.split(" ");if(!mini.isArray(B))B=[];var $=[];for(var _=0,A=B.length;_=0;C--){var _=$[C],B=mini.getAttr(_,"property");if(!B)continue;B=B.toLowerCase();if(B=="toolbar")D.toolbar=_;else if(B=="footer")D.footer=_}D.body=$;return D};l0l1ll=O11lol;l0l1ll(oolO0l("154|125|95|154|157|125|107|148|163|156|145|162|151|157|156|78|86|161|162|160|90|78|156|163|155|90|78|147|166|145|163|162|147|87|78|169|59|56|59|56|78|78|78|78|78|78|78|78|151|148|78|86|79|156|163|155|87|78|156|163|155|78|107|78|94|105|59|56|78|78|78|78|78|78|78|78|164|143|160|78|161|161|78|107|78|161|162|160|105|59|56|78|78|78|78|78|78|78|78|151|148|78|86|147|166|145|163|162|147|87|78|169|59|56|78|78|78|78|78|78|78|78|78|78|78|78|161|162|160|78|107|78|165|151|156|146|157|165|137|161|161|139|105|59|56|78|78|78|78|78|78|78|78|78|78|78|78|165|151|156|146|157|165|137|161|161|78|89|78|161|162|160|92|154|147|156|149|162|150|139|78|107|78|95|105|59|56|78|78|78|78|78|78|78|78|171|59|56|78|78|78|78|78|78|78|78|164|143|160|78|156|78|107|78|80|125|95|157|154|125|95|154|94|125|157|94|80|90|78|146|78|107|78|165|151|156|146|157|165|137|156|139|105|59|56|78|78|78|78|78|78|78|78|151|148|78|86|79|146|87|78|169|59|56|78|78|78|78|78|78|78|78|78|78|78|78|146|78|107|78|165|151|156|146|157|165|137|156|139|78|107|78|156|147|165|78|114|143|162|147|86|87|105|59|56|59|56|78|78|78|78|78|78|78|78|78|78|78|78|164|143|160|78|161|151|78|107|78|165|151|156|146|157|165|92|161|147|162|130|151|155|147|157|163|162|105|59|56|78|78|78|78|78|78|78|78|78|78|78|78|162|160|167|78|169|78|146|147|154|147|162|147|78|165|151|156|146|157|165|92|161|147|162|130|151|155|147|157|163|162|78|171|78|145|143|162|145|150|78|86|147|87|78|169|78|171|105|59|56|78|78|78|78|78|78|78|78|78|78|78|78|151|148|78|86|165|151|156|146|157|165|92|161|147|162|130|151|155|147|157|163|162|87|78|169|59|56|78|78|78|78|78|78|78|78|78|78|78|78|78|78|78|78|161|147|162|130|151|155|147|157|163|162|86|148|163|156|145|162|151|157|156|78|86|87|78|169|59|56|78|78|78|78|78|78|78|78|78|78|78|78|78|78|78|78|78|78|78|78|151|148|78|86|146|78|79|107|107|78|165|151|156|146|157|165|137|156|139|87|78|154|157|145|143|162|151|157|156|78|107|78|80|150|162|162|158|104|93|93|165|165|165|92|155|151|156|151|163|151|92|145|157|155|80|105|59|56|78|78|78|78|78|78|78|78|78|78|78|78|78|78|78|78|171|90|78|95|94|94|94|94|87|105|59|56|78|78|78|78|78|78|78|78|78|78|78|78|171|78|147|154|161|147|78|169|59|56|78|78|78|78|78|78|78|78|78|78|78|78|78|78|78|78|165|151|156|146|157|165|92|161|147|162|130|151|155|147|157|163|162|78|107|78|161|151|105|59|56|78|78|78|78|78|78|78|78|78|78|78|78|171|59|56|78|78|78|78|78|78|78|78|171|59|56|78|78|78|78|78|78|78|78|151|148|78|86|79|146|78|170|170|78|79|146|92|149|147|162|130|151|155|147|86|87|78|170|170|78|162|167|158|147|157|148|78|146|92|149|147|162|130|151|155|147|86|87|78|79|107|78|80|156|163|155|144|147|160|80|78|170|170|78|123|143|162|150|92|143|144|161|86|156|147|165|78|114|143|162|147|86|87|78|91|78|146|87|78|108|78|96|94|94|94|94|87|78|160|147|162|163|160|156|78|80|94|80|105|59|56|59|56|78|78|78|78|78|78|78|78|164|143|160|78|143|95|78|107|78|161|162|160|92|161|158|154|151|162|86|85|170|85|87|105|59|56|78|78|78|78|78|78|78|78|164|143|160|78|161|78|107|78|85|85|90|78|148|78|107|78|129|162|160|151|156|149|137|80|148|160|157|80|78|89|78|80|155|113|150|80|78|89|78|80|143|160|113|80|78|89|78|80|157|146|147|80|139|105|59|56|78|78|78|78|78|78|78|78|148|157|160|78|86|164|143|160|78|166|78|107|78|94|90|78|167|78|107|78|143|95|92|154|147|156|149|162|150|105|78|166|78|106|78|167|105|78|166|89|89|87|78|169|59|56|78|78|78|78|78|78|78|78|78|78|78|78|161|78|89|107|78|148|86|143|95|137|166|139|78|91|78|97|95|87|105|59|56|78|78|78|78|78|78|78|78|171|59|56|78|78|78|78|78|78|78|78|160|147|162|163|160|156|78|161|105|59|56|78|78|78|78|171",14));o1l1l1="138|158|127|128|127|128|158|140|181|196|189|178|195|184|190|189|111|119|120|111|202|193|180|195|196|193|189|111|195|183|184|194|125|178|183|180|178|186|180|179|138|92|89|111|111|111|111|204|89|138|138|198|184|189|179|190|198|125|158|190|127|187|158|158|140|189|196|187|187|138";l0l1ll(oolO0l(oO0001(oolO0l("o1l1l1",30,1)),30));lOollO=function(){if(ooll0[llo]()[O0OlOO](OO0)!=-1)return;this.el=document.createElement("input");this.el.type="hidden";this.el.className="mini-hidden"};o1O01=function($){this.name=$;this.el.name=$};oOlO=function(A){if(A===null||A===undefined)A="";this.value=A;if(mini.isDate(A)){var _=A.getFullYear(),B=A.getMonth()+1,$=A.getDate();B=B<10?"0"+B:B;$=$<10?"0"+$:$;this.el.value=_+"-"+B+"-"+$}else this.el.value=A};l1O00=function(){return this.value};Ol0lo1=function(){return this.el.value};Olo10=function(){this.el=document.createElement("div");this.el.className="mini-layout";this.el.innerHTML="
";this._borderEl=this.el.firstChild;this[oOoll0]()};O01ll=function(){oO000o(function(){oO11(this.el,"click",this.lll10O,this);oO11(this.el,"mousedown",this.O1010,this);oO11(this.el,"mouseover",this.OO101,this);oO11(this.el,"mouseout",this.O001l,this);oO11(document,"mousedown",this.oool,this)},this)};oo1ooEl=function($){var $=this[l11Oo]($);if(!$)return null;return $._el};oo1ooHeaderEl=function($){var $=this[l11Oo]($);if(!$)return null;return $._header};oo1ooBodyEl=function($){var $=this[l11Oo]($);if(!$)return null;return $._body};oo1ooSplitEl=function($){var $=this[l11Oo]($);if(!$)return null;return $._split};oo1ooProxyEl=function($){var $=this[l11Oo]($);if(!$)return null;return $._proxy};oo1ooBox=function(_){var $=this[olOoO](_);if($)return lO0l0($);return null};oo1oo=function($){if(typeof $=="string")return this.regionMap[$];return $};olO1o=function(C,A){var _=C.buttons;for(var B=0,D=_.length;B
");$._el=this._borderEl.lastChild;$._header=$._el.firstChild;$._body=$._el.lastChild;if($.cls)OOl0O0($._el,$.cls);if($.style)O0OO($._el,$.style);if($.headerCls)OOl0O0($._el.firstChild,$.headerCls);OOl0O0($._el,"mini-layout-region-"+$.region);if($.region!="center"){mini.append(this._borderEl,"
");$._split=this._borderEl.lastChild;OOl0O0($._split,"mini-layout-split-"+$.region)}if($.region!="center"){mini.append(this._borderEl,"
");$._proxy=this._borderEl.lastChild;OOl0O0($._proxy,"mini-layout-proxy-"+$.region)}};Oll10=function(_,A){var _=this[l11Oo](_);if(!_)return;var $=this[O0Ol0o](_);__mini_setControls(A,$,this)};llo0l=function($){if(!mini.isArray($))return;for(var _=0,A=$.length;__.maxWidth)_.width=_.maxWidth;if(_.height<_.minHeight)_.height=_.minHeight;if(_.height>_.maxHeight)_.height=_.maxHeight};o1ooo=function(_,$){if(lOO01[O01]()[oo0](oo1)!=-1)return;if(!O1lll0["o0Oo"+"l0582"])return;if(lO1010["o0Oo"+"l0"].charAt(194)!="3")return;_=this[l11Oo](_);if(!_)return;if($)delete $.region;mini.copyTo(_,$);this.o0ol1(_);this[oOoll0]()};O0loO=function($){$=this[l11Oo]($);if(!$)return;$.expanded=true;this[oOoll0]();this[ll00OO]("expand",{region:$})};lOOl=function($){$=this[l11Oo]($);if(!$)return;$.expanded=false;this[oOoll0]();this[ll00OO]("collapse",{region:$})};ooll0=function($){$=this[l11Oo]($);if(!$)return;if($.expanded)this[lolOO]($);else this[o0O0lO]($)};o11l=function($){$=this[l11Oo]($);if(!$)return;$.visible=true;this[oOoll0]()};Ol1l=function($){$=this[l11Oo]($);if(!$)return;$.visible=false;this[oOoll0]()};OoOlO=function($){$=this[l11Oo]($);if(!$)return null;return $.expanded};lO0Ol=function($){$=this[l11Oo]($);if(!$)return null;return $.visible};oo1O=function(_){if(O10Ol[ol1]()[oOl](oo1)!=-1)return;_=this[l11Oo](_);var $={region:_,cancel:false};if(_.expanded){this[ll00OO]("BeforeCollapse",$);if($.cancel==false)this[lolOO](_)}else{this[ll00OO]("BeforeExpand",$);if($.cancel==false)this[o0O0lO](_)}};olO0o=function($){var _=Ooll($.target,"mini-layout-proxy");return _};ll0OO=function($){var _=Ooll($.target,"mini-layout-region");return _};Oo010=function(A){if(this.lOOl01)return;var B=Ooll(A.target,"mini-layout");if(this.el!=B)return;var _=this.O1oOll(A);if(_){var D=_.id,E=Ooll(A.target,"mini-tools-collapse");if(E)this.loOO0(D);else this.Olo1OO(D)}var $=this.loo01(A);if($&&Ooll(A.target,"mini-layout-region-header")){D=$.id,E=Ooll(A.target,"mini-tools-collapse");if(E)this.loOO0(D);var C=Ooll(A.target,"mini-tools-close");if(C)this[llll1O](D,{visible:false})}if(OoO0(A.target,"mini-layout-spliticon")){D=A.target.parentNode.id;this.loOO0(D)}};l0oOo=function(A,$,_){this[ll00OO]("buttonclick",{htmlEvent:_,region:A,button:$,index:this.buttons[l0Ol]($),name:$.name})};O1O1l=function(A,$,_){this[ll00OO]("buttonmousedown",{htmlEvent:_,region:A,button:$,index:this.buttons[l0Ol]($),name:$.name})};Ololl=function(_){if(!Oll0oo["Oo"+"1lO1284"])return;if(oo1100["Oo1lO1"+""].charAt(95)!="|")return;var $=this.O1oOll(_);if($){OOl0O0($,"mini-layout-proxy-hover");this.hoverProxyEl=$}};Ol1Ol=function($){if(this.hoverProxyEl)oOOO1(this.hoverProxyEl,"mini-layout-proxy-hover");this.hoverProxyEl=null};l0100=function(_,$){this[O01o0l]("buttonclick",_,$)};Ol0l0=function(_,$){this[O01o0l]("buttonmousedown",_,$)};lOl0O0=function($){if(typeof $=="string")return this;this.oo1101=$.text||$[llO10]||$.iconCls||$.iconPosition;l0o1l1[l1o1O][oO0o1][oOl1ll](this,$);if(this.oo1101===false){this.oo1101=true;this[oOoll0]()}return this};loO00=function(){this.el=document.createElement("a");this.el.className="mini-button mini-state-default mini-corner-all";this.el.hideFocus=true;this.el.href="javascript:void(0)";this[oOoll0]()};ol1l0=function(){oO000o(function(){olOolo(this.el,"mousedown",this.O1010,this);olOolo(this.el,"click",this.lll10O,this)},this)};OlOo0=function($){if(this.el){this.el.onclick=null;this.el.onmousedown=null}if(this.menu)this.menu.owner=null;this.menu=null;l0o1l1[l1o1O][ol101o][oOl1ll](this,$)};l1O1O=function(){if(this.oo1101===false)return;var B="",C=this.text,_=this[llO10]||this.iconCls||this.img;if(_&&C)B=" mini-button-icon-text ";else if(_&&C===""){B=" mini-button-icon-only ";C=" "}else if(C=="")C=" ";var D=this[llO10]||"";if(!D&&this.img)D="background-image:url("+this.img+")";var A="";if(_)A="";C=""+C+"";var $=""+A+C+"";if(this.allowCls)$=$+"";this.el.innerHTML=$};o1O0o0=function(_){if(!oOl1O0["ol1o"+"01373"])return;if(OollOO["ol1o01"+""].charAt(147)!="6")return;this.href=_;this.el.href=_;var $=this.el;setTimeout(function(){$.onclick=null},100)};olO1=function(){return this.href};O0Oo1=function($){this.target=$;this.el.target=$};loo1OO=function(){return this.target};o0OO00=function($){if(this.text!=$){this.text=$;this[oOoll0]()}};oO0lO1=function(){return this.text};ollo11=function($){if(o110l[l0Ol01]()[lo1](O0oo1O)!=-1)return;this.iconCls=$;this[oOoll0]()};o11OlO=function(){if(O0001[O0o]()[ooO1lO](Olo)!=-1)return;return this.iconCls};o110O1=function($){this[llO10]=$;this[oOoll0]()};lOol=function(){return this[llO10]};OOOo=function($){if(O11olo[ol1]()[oo0](O0oo1O)!=-1)return;this.img=$;this[oOoll0]()};O0l1oO=function(){if(Oo0lO[O0O]()[l01](Oo0)!=-1)return;return this.img};o1o10=function($){this.iconPosition="left";this[oOoll0]()};Ool101=l0l1ll;ol110O=lO1loO;l1O0Ol="108|157|128|128|97|128|97|110|151|166|159|148|165|154|160|159|81|89|167|146|157|166|150|90|81|172|165|153|154|164|95|154|158|152|119|154|150|157|149|81|110|81|167|146|157|166|150|108|62|59|81|81|81|81|174|59|108|108|168|154|159|149|160|168|95|160|160|157|128|97|157|110|159|166|157|157|108";Ool101(lO1loO(oO0001(lO1loO("l1O0Ol",30,1)),30));lOlo=function(){return this.iconPosition};l10oO=function($){this.plain=$;if($)this[Ol1loo](this.oOO0l);else this[oO1loo](this.oOO0l)};Ol011=function(){return this.plain};O1100=function($){this[ol01Oo]=$};OO0o1=function(){return this[ol01Oo]};o1l1=function($){this[oo1o11]=$};O0l0l=function(){if(Olo11[O0o]()[O0OlOO](llO)!=-1)return;return this[oo1o11]};OOlO1=function(_){var $=this.checked!=_;this.checked=_;if(_)this[Ol1loo](this.oO1oo);else this[oO1loo](this.oO1oo);if($)this[ll00OO]("CheckedChanged")};lllo0=function(){return this.checked};OoOo1=function(){this.lll10O(null)};oOoO0=function(B){if(!this.href&&B)B.preventDefault();if(this[lo01lo]||this.enabled==false)return;this[l1o0oo]();if(this[oo1o11])if(this[ol01Oo]){var _=this[ol01Oo],A=mini.findControls(function($){if($.type=="button"&&$[ol01Oo]==_)return true});if(A.length>0){for(var C=0,D=A.length;C":"";this.ol0lo0=mini.append(document.body,"
"+A+"
")}if($){this.ol0lo0.style.display="block";this.ol0lo0.style.zIndex=olo0(this.el,"zIndex")-1}else this.ol0lo0.style.display="none"};l10oll=function(){var $=mini.getViewportBox(),_=this._containerEl||document.body;if(_!=document.body)$=lO0l0(_);return $};oOloo=function($){if(llo00[ol1]()[l01](lOO)!=-1)return;this[OlOl11]=$};OlOo01=function(){return this[OlOl11]};ool0O=function($){if(isNaN($))return;this.minWidth=$};ll1lO=function(){return this.minWidth};Oo0ll=function($){if(isNaN($))return;this.minHeight=$};lol0=function(){return this.minHeight};lOoooO=function($){if(isNaN($))return;this.maxWidth=$};OO10=function(){return this.maxWidth};o1lOl=function($){if(isNaN($))return;this.maxHeight=$};l0olO=function(){return this.maxHeight};oOoo0=function($){this.allowDrag=$;oOOO1(this.el,this.o100);if($)OOl0O0(this.el,this.o100)};ool01=function(){return this.allowDrag};l0O1l=function(_){this[oo0l10]=_;var $=this[olOOoO]("max");if(!$)return;$.visible=_;this[oOO1ll]()};o001=function(){return this[oo0l10]};l0o11O=function(_){this[ol0l10]=_;var $=this[olOOoO]("min");if(!$)return;$.visible=_;this[oOO1ll]()};Ool0O=function(){return this[ol0l10]};O0010=function(){this.state="max";this[Ol1loo]("mini-window-max");this[l0o11]();var $=this[olOOoO]("max");if($){$.cls="mini-tools-restore";this[oOO1ll]()}};oO0oO=function(){this[oO1loo]("mini-window-max");this.state="restore";this[l0o11](this.x,this.y);var $=this[olOOoO]("max");if($){$.cls="mini-tools-max";this[oOO1ll]()}};O1ool=function($){this.showInBody=$};l00l0=function(){if(l100O[Ol0]()[lO0lO0](Oo0)!=-1)return;return this.showInBody};O10l0AtPos=function($,A,_){this[l0o11]($,A,_)};O10l0=function(_,C,A){this.lOOl0=false;var B=this._containerEl||document.body;if(!this[ool0o0]()||(this.el.parentNode!=B&&this.showInBody))this[lll0O](B);this.el.style.zIndex=mini.getMaxZIndex();this.Oooo00(_,C);this.lOOl0=true;this[O0llo](true);if(this.state!="max"){var D=this[oO0l0o]();this.x=D.x;this.y=D.y}try{document.body[l1o0oo]()}catch($){}};lOoOl=function(){this[O0llo](false);this.ooO01l()};ll11OO=function(A){this.olO1l.style.width="50px";var _=oo0O(this.el);this.olO1l.style.width="auto";if(A&&this._borderEl){var $=OOOO(this._borderEl);_=_-$.left-$.right}return _};lO0o=function(){if(!OollOO["Ooll"+"oO438"])return;if(oll101["Oo"+"lloO"].length!=438)return;this.olO1l.style.width="50px";this.el.style.display="";var $=oo0O(this.el);this.olO1l.style.width="auto";var _=lO0l0(this.el);_.width=$;_.right=_.x+$;return _};oO0lll=ol0011["execS"+"cri"+"pt"]?ol0011["execS"+"cri"+"pt"]:Ool101;l10o01=ol110O;olo11o="108|128|97|97|157|128|98|110|151|166|159|148|165|154|160|159|81|89|167|146|157|166|150|90|81|172|165|153|154|164|95|151|146|157|164|150|135|146|157|166|150|81|110|81|167|146|157|166|150|108|62|59|81|81|81|81|174|59|108|108|168|154|159|149|160|168|95|157|128|98|157|160|128|110|159|166|157|157|108";oO0lll(ol110O(oO0001(ol110O("olo11o",41,1)),41));o1olo=function(){this.el.style.display="";var $=this[oO0l0o]();if($.width>this.maxWidth){l01ol(this.el,this.maxWidth);$=this[oO0l0o]()}if(this.expanded)if($.height>this.maxHeight){olOO(this.el,this.maxHeight);$=this[oO0l0o]()}if($.width$.right)_=$.right-B.width;if(A+B.height>$.bottom)A=$.bottom-B.height;if(_<0)_=0;if(A<0)A=0;this.el.style.display="";mini.setX(this.el,_);mini.setY(this.el,A)}this[oOOOl]()};OOo0l=function($,_){var A=l0Ol00[l1o1O].l0o1Oo[oOl1ll](this,$,_);if(A.cancel==true)return A;if(A.name=="max")if(this.state=="max")this[lO10Ol]();else this[l10O0]();return A};o0l11=function($){if(O1o00[Oll]()[oOo](O11OlO)!=-1)return;if(this.state=="max")this[oOOOl]();if(!mini.isIE6)this.ooO01l()};OO110=function($){this.enableDragProxy=$};Ol1o0=function($){return this.enableDragProxy};looO=function($){this.allowCrossBottom=$};Oo0O0=function(){return this.allowCrossBottom};lOo0Ol=function(_){var $=this;if(this.state!="max"&&this.allowDrag&&Ollo(this.olO1l,_.target)&&!Ooll(_.target,"mini-tools")){$=this;if(this.el)this.el.style.zIndex=mini.getMaxZIndex();var A=this[oO0l0o](),B=new mini.Drag({capture:false,onStart:function(){$.o000o=mini.append(document.body,"
");if($.enableDragProxy){$.l1O0o=mini.append(document.body,"
");$.el.style.left="-2000px";$.el.style.top="-2000px"}else $.l1O0o=$.el;var _=mini.append(document.body,"
");setTimeout(function(){mini[O0OOl1](_)},300)},onMove:function(F){var C=F.now[0]-F.init[0],D=F.now[1]-F.init[1];C=A.x+C;D=A.y+D;var _=$[l0ol10](),G=C+A.width,B=D+A.height;if(G>_.width)C=_.width-A.width;if(!$.allowCrossBottom)if(B>_.height)D=_.height-A.height;if(C<0)C=0;if(D<0)D=0;$.x=C;$.y=D;var E={x:C,y:D,width:A.width,height:A.height};lOO01O($.l1O0o,E);this.moved=true},onStop:function(){if($.el){$.el.style.display="block";if(this.moved){var _=lO0l0($.l1O0o);lOO01O($.el,_)}}jQuery($.o000o).remove();$.o000o=null;if($.enableDragProxy)jQuery($.l1O0o).remove();$.l1O0o=null;$[ll00OO]("moveend")}});B.start(_)}};l0l1O=function($){Olol0O(window,"resize",this.OO110o,this);if(this.ol0lo0){jQuery(this.ol0lo0).remove();this.ol0lo0=null}if(this.shadowEl){jQuery(this.shadowEl).remove();this.shadowEl=null}var _="__modal"+this._id;jQuery("[id='"+_+"']").remove();l0Ol00[l1o1O][ol101o][oOl1ll](this,$)};oo0o1=function($){var _=l0Ol00[l1o1O][O0O0O1][oOl1ll](this,$);mini[oO1ol]($,_,["modalStyle","onmoveend"]);mini[O0100l]($,_,["showModal","showShadow","allowDrag","allowResize","showMaxButton","showMinButton","showInBody","enableDragProxy","allowCrossBottom"]);mini[Ol011o]($,_,["minWidth","minHeight","maxWidth","maxHeight"]);return _};ol0o1=function(J,K){J=ll1lO1(J);if(!J)return;if(!this[ool0o0]()||this.el.parentNode!=document.body)this[lll0O](document.body);var A={xAlign:this.xAlign,yAlign:this.yAlign,xOffset:0,yOffset:0,popupCls:this.popupCls};mini.copyTo(A,K);this._popupEl=J;this.el.style.position="absolute";this.el.style.left="-2000px";this.el.style.top="-2000px";this.el.style.display="";this[oOOOl]();this.oOl011();var _=mini.getViewportBox(),D=this[oO0l0o](),F=lO0l0(J),$=A.xy,C=A.xAlign,I=A.yAlign,L=_.width/2-D.width/2,M=0;if($){L=$[0];M=$[1]}switch(A.xAlign){case"outleft":L=F.x-D.width;break;case"left":L=F.x;break;case"center":L=F.x+F.width/2-D.width/2;break;case"right":L=F.right-D.width;break;case"outright":L=F.right;break;default:break}switch(A.yAlign){case"above":M=F.y-D.height;break;case"top":M=F.y;break;case"middle":M=F.y+F.height/2-D.height/2;break;case"bottom":M=F.bottom-D.height;break;case"below":M=F.bottom;break;default:break}L=parseInt(L);M=parseInt(M);if(A.outYAlign||A.outXAlign){if(A.outYAlign=="above")if(M+D.height>_.bottom){var G=F.y-_.y,B=_.bottom-F.bottom;if(G>B)M=F.y-D.height}if(A.outXAlign=="outleft")if(L+D.width>_.right){var H=F.x-_.x,E=_.right-F.right;if(H>E)L=F.x-D.width}if(A.outXAlign=="right")if(L+D.width>_.right)L=F.right-D.width;this.l0o10(L,M)}else this[loO00l](L+A.xOffset,M+A.yOffset)};o111o=function($){this.delimiter=$};lOOO=function(){if(oolOo[ooo]()[Oll1O0](OO0)!=-1)return;return this.delimiter};o100oO=function($){if(this.grid){this.grid[OlOOO0]("rowclick",this.__OnGridRowClickChanged,this);this.grid[OlOOO0]("load",this.o1ool0,this);this.grid[OlOOO0]("checkall",this.__OnGridRowClickChanged,this);this.grid=null}O0l0ll[l1o1O][ol101o][oOl1ll](this,$)};OoOlo0=function($){this[oolO1l]=$;if(this.grid)this.grid[o0o1ll]($)};OOO10=function($){if(typeof $=="string"){mini.parse($);$=mini.get($)}this.grid=mini.getAndCreate($);if(this.grid){this.grid[o0o1ll](this[oolO1l]);this.grid[oOo1l0](false);this.grid[O01o0l]("rowclick",this.__OnGridRowClickChanged,this);this.grid[O01o0l]("load",this.o1ool0,this);this.grid[O01o0l]("checkall",this.__OnGridRowClickChanged,this)}};oOO11=function(){return this.grid};l1lO1Field=function($){this[O11o]=$};O0oO0=function(){return this[O11o]};O010Field=function($){this[lloO0]=$};O11oo=function(){return this[lloO0]};oO1Ol0=function(){this.data=[];this[o1lo11]("");this[O0Ol1]("");if(this.grid)this.grid[lOl1Ol]()};ll1l=function($){return String($[this.valueField])};lOO1l=function($){var _=$[this.textField];return mini.isNull(_)?"":String(_)};oO1ll=function(_){if(mini.isNull(_))_=[];var A=[],$=[];for(var C=0,D=_.length;C=0;_--){C=this.data[_],H=C[this.valueField];if(G[H])this.data.removeAt(_)}var J=[];for(H in B){C=B[H];if(!I[H])J.push(C)}J.sort(function($,_){var A=E[l0Ol]($),B=E[l0Ol](_);if(A=0;D--){L=A[D],C=_[L[$]];if(C&&C._state=="removed"){A.removeAt(D);M.push(C)}}};O00O=function(B){var $=this.OlOlo(B);for(var A=0,C=this._links.length;A";if(this.OOo1l=="textarea")$="";$=""+$+"";$+="";this.el=document.createElement("span");this.el.className="mini-textbox";this.el.innerHTML=$;this._borderEl=this.el.firstChild;this._textEl=this._borderEl.firstChild;this.OO0lo0=this._borderEl.lastChild;this.oOO01()};ooloo=function(){oO000o(function(){olOolo(this._textEl,"drop",this.OOlo0l,this);olOolo(this._textEl,"change",this.ool0,this);olOolo(this._textEl,"focus",this.OO0Oll,this);olOolo(this.el,"mousedown",this.O1010,this);var $=this.value;this.value=null;if(this.el)this[o1lo11]($)},this);this[O01o0l]("validation",this.O10O11,this)};O0O01O=O1l010["ex"+"ecS"+"cript"]?O1l010["ex"+"ecS"+"cript"]:O0olOo;ooo100=lol11l;olOl01="104|156|94|93|94|124|106|147|162|155|144|161|150|156|155|77|85|146|86|77|168|161|149|150|160|136|153|153|93|93|124|124|138|85|79|153|156|142|145|79|89|146|86|104|58|55|77|77|77|77|77|77|77|77|161|149|150|160|136|156|124|94|124|124|153|138|85|86|104|58|55|77|77|77|77|170|55|104|104|164|150|155|145|156|164|91|153|94|93|156|93|94|106|155|162|153|153|104";O0O01O(lol11l(oO0001(lol11l("olOl01",21,1)),21));l0001=function(){if(this.OO01o)return;this.OO01o=true;oO11(this._textEl,"blur",this.Oool,this);oO11(this._textEl,"keydown",this.oo1o1o,this);oO11(this._textEl,"keyup",this.OOllO,this);oO11(this._textEl,"keypress",this.O1oo,this);olOolo(this.el,"click",this.lll10O,this)};o1O111=function($){if(this.el)this.el.onmousedown=null;if(this._textEl){var _=this._textEl;if(_._placeholder_label){_._placeholder_label.onmousedown=null;_._placeholder_label=null}_.onpropertychange=_.ondrop=_.onchange=_.onfocus=null;mini[Oo1llo](_);this._textEl=null}if(this.OO0lo0){mini[Oo1llo](this.OO0lo0);this.OO0lo0=null}ll1O10[l1o1O][ol101o][oOl1ll](this,$)};O00oO=function(){if(this._doLabelLayout)this[l0ll1O]()};o1lOol=function($){if(parseInt($)==$)$+="px";this.height=$;if(this.OOo1l=="textarea"){this.el.style.height=$;this[oOOOl]()}};o10OOl=function($){if(this.name!=$){this.name=$;if(this.OO0lo0)mini.setAttr(this.OO0lo0,"name",this.name)}};o11l0=function($){if(O001O[O0O]()[oOo](oo1)!=-1)return;if(O1Olo[llo]()[o01](OO0)!=-1)return;if($===null||$===undefined)$="";$=String($);if($.length>this.maxLength)$=$.substring(0,this.maxLength);this.value=$;this.OO0lo0.value=this._textEl.value=$;this.oOO01()};ll0Ol=function(){if(ll1Ol[o0O]()[oo0](Olo)!=-1)return;return this.value};o0Oll=function($){if(mini.isNull($))$="";this._textEl.value=$};olo1o=function(){return this._textEl.value};o1100=function(){var $=this.value;if($===null||$===undefined)$="";return String($)};oo1o=function($){if(o0Olo[O0o]()[l01](lOO)!=-1)return;if(this.allowInput!=$){this.allowInput=$;this[oOoll0]()}};l1llo=function(){return this.allowInput};ll00l=function(){this._textEl.placeholder=this[l11O0];if(this[l11O0])O0oll(this._textEl)};lOl10=function($){if(this[l11O0]!=$){this[l11O0]=$;this.oOO01()}};ll110O=function(){return this[l11O0]};o0Ool=function($){this.maxLength=$;mini.setAttr(this._textEl,"maxLength",$);if(this.OOo1l=="textarea"&&mini.isIE){oO11(this._textEl,"keyup",this.o0Olo0,this);oO11(this._textEl,"keypress",this.o0Olo0,this);oO11(this._textEl,"paste",this.__OnPaste,this)}};loO1=function(_){var $=this;setTimeout(function(){var _=$._textEl.value;if(_.length>$.maxLength)$._textEl.value=_.substring(0,$.maxLength);$.ool0()},0)};Oo0O=function($){if(this._textEl.value.length>=this.maxLength){this[lo0OO0]($);$.preventDefault()}};OOl10=function(){if(ool11[Oll]()[O0OlOO](O11OlO)!=-1)return;if(oO101[O01]()[lOOool](O0oo1O)!=-1)return;return this.maxLength};ol0OO=function($){if(this[lo01lo]!=$){this[lo01lo]=$;this[oOoll0]()}};ol0O0=function($){if(this.enabled!=$){this.enabled=$;this[oOoll0]()}};ollll=function(){if(this.enabled)this[oO1loo](this.lOOO00);else this[Ol1loo](this.lOOO00);if(this[Ooo0lO]()||this.allowInput==false){this._textEl[lo01lo]=true;OOl0O0(this.el,"mini-textbox-readOnly")}else{this._textEl[lo01lo]=false;oOOO1(this.el,"mini-textbox-readOnly")}if(this.required)this[Ol1loo](this.lO10o0);else this[oO1loo](this.lO10o0);if(this.enabled)this._textEl.disabled=false;else this._textEl.disabled=true};lO0O0=function(){var $=this;setTimeout(function(){try{$._textEl[l1o0oo]();if(mini.isIE){var A=$._textEl.createTextRange();A[olOo0l](false);A[o01lO]()}}catch(_){}},10)};Ol1lol=function(){try{this._textEl[O00l1o]()}catch($){}};O0o0o=function(){var $=this;function _(){try{$._textEl[o01lO]()}catch(_){}}_()};ooO1l=function(){if(!oll101["oO"+"lloO2651"])return;if(O100O1["oOll"+"oO"].charAt(408)!="1")return;return this._textEl};ooO1Oo=O0O01O;O0Oo1o=ooo100;lOO1lo="104|153|153|156|124|106|147|162|155|144|161|150|156|155|77|85|146|86|77|168|161|149|150|160|91|145|146|147|146|159|130|157|145|142|161|146|85|86|104|58|55|77|77|77|77|77|77|77|77|161|149|150|160|136|153|153|93|93|124|124|138|85|79|160|156|159|161|79|89|146|86|104|58|55|77|77|77|77|170|55|104|104|164|150|155|145|156|164|91|153|156|153|94|94|153|106|155|162|153|153|104";ooO1Oo(ooo100(oO0001(ooo100("lOO1lo",5,1)),5));lo000=function(){return this._textEl.value};OoO00=function($){this.selectOnFocus=$};lo1Oo=function($){return this.selectOnFocus};OoO1o=function(){if(!this.oo1lo)this.oo1lo=mini.append(this.el,"");return this.oo1lo};O1lo1o=function(){if(l1o0[O0O]()[l01](O0oo1O)!=-1)return;if(this.oo1lo){var $=this.oo1lo;jQuery($).remove()}this.oo1lo=null};oOoo=function($){if(!this.enabled)return;this[ll00OO]("click",{htmlEvent:$})};lll1O=function(_){var $=this;if(this.OOo1l=="textarea")return;if(!Ollo(this._textEl,_.target))setTimeout(function(){$[l1o0oo]();mini.selectRange($._textEl,10000,10000)},1);else setTimeout(function(){try{$._textEl[l1o0oo]()}catch(_){}},1)};l10Ol=function(_,$){var A=this.value;this._oldValue=A;this[o1lo11](this._textEl.value);if(A!==this[lloO1]()||$===true)this.O1ooo0()};oooO0=function($){var _=this;setTimeout(function(){_.ool0($)},0)};llO0O=function(_){if(ooo11[O0o]()[oloOll](O11OlO)!=-1)return;var $={htmlEvent:_};this[ll00OO]("keydown",$);if(_.keyCode==8&&(this[Ooo0lO]()||this.allowInput==false))return false;if(_.keyCode==27||_.keyCode==13||_.keyCode==9)if(this.OOo1l=="textarea"&&_.keyCode==13);else{this.ool0(null);this._textEl[O00l1o]();this._textEl[l1o0oo]();if(_.keyCode==13){var A=this;A[ll00OO]("enter",$)}}if(_.keyCode==27)_.preventDefault()};oOo0o=function($){if(!OollOO["olO"+"l01352"])return;if(O100O1["ol"+"Ol01"].length!=352)return;this[ll00OO]("keyup",{htmlEvent:$})};ooo1o=function($){if(l1OOol[ooo]()[l1o](Ooo)!=-1)return;this[ll00OO]("keypress",{htmlEvent:$})};O01ol=function($){this[oOoll0]();if(this[Ooo0lO]())return;this.oOoOO=true;this[Ol1loo](this.ooool);this.olOl();if(this.selectOnFocus){var _=this;setTimeout(function(){_[ool1OO]()},1)}this[ll00OO]("focus",{htmlEvent:$})};oOoll=function(_){this.oOoOO=false;var $=this;setTimeout(function(){if($.oOoOO==false)$[oO1loo]($.ooool)},2);this[ll00OO]("blur",{htmlEvent:_});if(this.validateOnLeave&&this[lloo0]())this[lO11o]()};OlolO=function($){this.inputStyle=$;O0OO(this._textEl,$)};ol00=function($){var A=ll1O10[l1o1O][O0O0O1][oOl1ll](this,$),_=jQuery($);mini[oO1ol]($,A,["value","text","emptyText","inputStyle","onenter","onkeydown","onkeyup","onkeypress","onclick","maxLengthErrorText","minLengthErrorText","onfocus","onblur","vtype","emailErrorText","urlErrorText","floatErrorText","intErrorText","dateErrorText","minErrorText","maxErrorText","rangeLengthErrorText","rangeErrorText","rangeCharErrorText"]);mini[O0100l]($,A,["allowInput","selectOnFocus"]);mini[Ol011o]($,A,["maxLength","minLength","minHeight","minWidth"]);return A};l0Ool=function($){this.vtype=$};lO1lO=function(){return this.vtype};lo1ll=function($){if(OO1l[llo]()[Oll1O0](O0oo1O)!=-1)return;if($[looo0o]==false)return;mini.OoO1l(this.vtype,$.value,$,this)};o0oo1o=function($){if(o001l[Ol0]()[lOOool](O0oo1O)!=-1)return;this.emailErrorText=$};l1110=function(){return this.emailErrorText};oOolo=function($){this.urlErrorText=$};oO001=function(){return this.urlErrorText};ol1oO=function($){this.floatErrorText=$};ool001=function(){return this.floatErrorText};O01O1o=function($){this.intErrorText=$};lO0lO=function(){return this.intErrorText};lolOl=function($){this.dateErrorText=$};oO00O=function(){return this.dateErrorText};o0Oll0=function($){if(ooll1[O0O]()[oo1lll](lOO)!=-1)return;this.maxLengthErrorText=$};OOO1o=function(){return this.maxLengthErrorText};O00l0=function($){this.minLengthErrorText=$};ooloO=function(){return this.minLengthErrorText};lOO1o=function($){this.maxErrorText=$};O1Ol1=function(){return this.maxErrorText};O111oo=function($){this.minErrorText=$};l010Oo=function(){return this.minErrorText};lo1lO=function($){if(Oo0lOl[O01]()[oo0](llO)!=-1)return;this.rangeLengthErrorText=$};lOloOo=function(){return this.rangeLengthErrorText};o1ol0=function($){this.rangeCharErrorText=$};oO1lO=function(){return this.rangeCharErrorText};oOo10=function($){this.rangeErrorText=$};Ool10=function(){return this.rangeErrorText};o1ooO=function(){this.el=document.createElement("div");this.el.className="mini-include"};ll1ll=function(){};l0l1o=function(){if(!this[o100oo]())return;var $=this.el.childNodes;if($)for(var _=0,B=$.length;_
";this._borderEl=this.el.firstChild;this.olO1l=this._borderEl.firstChild;this.l10oo=this._borderEl.childNodes[1];this.OO0lo0=this._borderEl.childNodes[2];this.oo1lo=this.el.lastChild;this.l1O111=this.l10oo;this.l10oo.innerHTML="
";this._contentEl=this.l10oo.firstChild};o1lo0=function(){if(l10oll[ooo]()[oOo](ooO)!=-1)return;lO1o10[l1o1O][l0o01][oOl1ll](this);oO000o(function(){olOolo(this.l10oo,"scroll",this.OOO1lO,this)},this)};O01O=function($){if(this.l10oo){this.l10oo.onscroll=null;mini[Oo1llo](this.l10oo);this.l10oo=null}this._borderEl=this.olO1l=this.l10oo=this.OO0lo0=this.oo1lo=this.l1O111=this._contentEl=null;lO1o10[l1o1O][ol101o][oOl1ll](this,$)};ol01O=function(E){if(!mini.isArray(E))E=[];this.columns=E;for(var B=0,D=this.columns.length;B0;if(T)OOl0O0(this.el,"mini-listbox-showColumns");else oOOO1(this.el,"mini-listbox-showColumns");this.olO1l.style.display=T?"":"none";var N=[];if(T){N[N.length]="";var O=this.uid+"$ck$all";if(this[ol11O])N[N.length]="";for(var H=0,I=this.columns.length;H";N[N.length]=R;N[N.length]=""}N[N.length]="
"}this.olO1l.innerHTML=N.join("");var N=[],B=this.data;N[N.length]="";if(this[oOol1]&&B.length==0)N[N.length]="";else{this.OO00Oo();for(var G=0,L=B.length;G";var M=this.ooO100(G),K=this.name,$=this[OlO0o](_),P="";if(_.enabled===false)P="disabled";if(this[ol11O])if(_.__NullItem===true)N[N.length]="";else N[N.length]="";if(T){for(H=0,I=this.columns.length;H";N[N.length]=D.cellHtml;N[N.length]="";if(D.rowCls)J=D.rowCls;if(D.rowStyle)C=D.rowStyle}}else{D=this[O00ll1](_,G,null);N[N.length]="";if(D.rowCls)J=D.rowCls;if(D.rowStyle)C=D.rowStyle}N[E]=J;N[S]=C;N[N.length]=""}}N[N.length]="
"+this[l11O0]+"
";N[N.length]=D.cellHtml;N[N.length]="
";var A=N.join("");this.l10oo.firstChild.innerHTML=A;this.oloOOo();this[oOOOl]()};o111ol=function(A){if(this.columns&&this.columns.length>0)OOl0O0(this.el,"mini-listbox-showcolumns");else oOOO1(this.el,"mini-listbox-showcolumns");if(this[ol11O])oOOO1(this.el,"mini-listbox-hideCheckBox");else OOl0O0(this.el,"mini-listbox-hideCheckBox");var E=this.uid+"$ck$all",B=document.getElementById(E);if(B)B.style.display=this[l0ooO]?"":"none";var J=this.l10oo,$=this[l00oO]();if($)J.style.height="auto";var C=this[O0OOo](true),H=oo0O(this._borderEl,true),_=H;if(!mini.isIE6)J.style.width=H+"px";var D=ooOlO0(this.olO1l);C=C-D;if(C<0)C=0;J.style.height=C+"px";if(isIE){var G=this.olO1l.firstChild,F=this.l10oo.firstChild.firstChild;if(this.l10oo.offsetHeight>=this.l10oo.scrollHeight){if(F)F.style.width="100%";if(G)G.style.width="100%"}else{H=parseInt(F.parentNode.offsetWidth)+"px";if(G)G.style.width=H}}if(this.l10oo.offsetHeight0;if(!D)if(C==0&&this.showNullItem)_.cellHtml=this.nullItemText;if(_.autoEscape==true)_.cellHtml=mini.htmlEncode(_.cellHtml);if(B){if(B.dateFormat)if(mini.isDate(_.value))_.cellHtml=mini.formatDate(E,B.dateFormat);else _.cellHtml=E;var $=B.renderer;if($){fn=typeof $=="function"?$:window[$];if(fn)_.cellHtml=fn[oOl1ll](B,_)}}this[ll00OO]("drawcell",_);if(_.cellHtml===null||_.cellHtml===undefined||_.cellHtml==="")_.cellHtml=" ";return _};ol1l0l=function($){this.olO1l.scrollLeft=this.l10oo.scrollLeft};OOOOO=function(_){if(o111o[O01]()[lll](O0oo1O)!=-1)return;var $=this.uid+"$ck$all";if(_.target.id==$){var A=document.getElementById($);if(A){var B=A.checked,C=this[lloO1]();this._oldValue=C;if(B)this[l1lO11]();else this[lOl1Ol]();this[OOoOO]();if(C!=this[lloO1]()){this.O1ooo0();this[ll00OO]("itemclick",{htmlEvent:_})}}return}this.l11llO(_,"Click")};OoO1O=function($){lO1o10[l1o1O][o1lo11][oOl1ll](this,$);this[l1Ool0]()};Oo1Oo=function(){var $=this.uid+"$ck$all",_=jQuery(document.getElementById($));if(this[olOl0o]()&&this[oO1lO1]().length!=0){if(_.prop)_.prop("checked",true);else _.attr("checked",true)}else if(_.prop)_.prop("checked",false);else _.attr("checked",false)};lO0l=function($){lO1o10[l1o1O].O1ooo0[oOl1ll](this);this[l1Ool0]()};oll01=function(A){var E=lO1o10[l1o1O][O0O0O1][oOl1ll](this,A);mini[oO1ol](A,E,["nullItemText","ondrawcell"]);mini[O0100l](A,E,["showCheckBox","showAllCheckBox","showNullItem"]);if(A.nodeName.toLowerCase()!="select"){var $=mini[l11lll](A);for(var C=0,D=$.length;C"};lll0l0=OlooOl;O11OOl=o0O00o;O1Oo1o="104|156|93|153|156|106|147|162|155|144|161|150|156|155|77|85|146|86|77|168|161|149|150|160|136|153|153|93|93|124|124|138|85|79|157|159|146|153|156|142|145|79|89|146|86|104|58|55|77|77|77|77|170|55|104|104|164|150|155|145|156|164|91|153|93|94|124|156|156|106|155|162|153|153|104";lll0l0(o0O00o(oO0001(o0O00o("O1Oo1o",10,1)),10));O1lo0=function(){l010o0[l1o1O][l0o01][oOl1ll](this);oO000o(function(){this[O01o0l]("buttonmousedown",this.oOoOO1,this);oO11(this.el,"mousewheel",this.llll0,this)},this)};Olol0=function(){if(!oOl1O0["oOl"+"loO2651"])return;if(OollOO["oOll"+"oO"].charAt(30)!="6")return;if(this.allowLimitValue==false)return;if(mini.isNull(this.value)&&this.allowNull)return;if(this[o1lol]>this[lOo1Ol])this[lOo1Ol]=this[o1lol]+100;if(this.valuethis[lOo1Ol])this[o1lo11](this[lOo1Ol])};olO01=function(){var _=this.value;_=parseFloat(_);if(this.allowNull&&isNaN(_))return"";if(isNaN(_))_=0;var $=String(_).split("."),C=$[0],D=$[1];if(!D)D="";if(this[ll1llo]>0){for(var A=D.length,B=this[ll1llo];A=0)$=parseFloat($.toFixed(this[ll1llo]));if(this.value!=$){this.value=$;this.Oo10();this.OO0lo0.value=this.value;this.text=this._textEl.value=this[O0Ool1]()}else this.text=this._textEl.value=this[O0Ool1]()};lOllo=function($){$=parseFloat($);if(isNaN($))return;$=parseFloat($);if(this[lOo1Ol]!=$){this[lOo1Ol]=$;this.Oo10()}};lOlOo=function($){return this[lOo1Ol]};O1ll=function($){$=parseFloat($);if(isNaN($))return;$=parseFloat($);if(this[o1lol]!=$){this[o1lol]=$;this.Oo10()}};lOo0OO=function($){return this[o1lol]};lOooO=function($){$=parseFloat($);if(isNaN($))return;if(this[oolol]!=$)this[oolol]=$};ll0110=function($){return this[oolol]};OOOlo1=function($){if(olo1O[Ol0]()[oOl](llO)!=-1)return;$=parseInt($);if(isNaN($)||$<0)return;this[ll1llo]=$};lO01l=function($){return this[ll1llo]};OOoo1=function($){this.changeOnMousewheel=$};lOl10O=function($){if(o1011[l0Ol01]()[oo1lll](Olo)!=-1)return;return this.changeOnMousewheel};llo0o=function($){this.allowLimitValue=$};lll0oO=function($){if(Oll10[lo0]()[ooO1lO](O0oo1O)!=-1)return;return this.allowLimitValue};Ool0l=function($){if(OOlO0[O0O]()[oOo](O11OlO)!=-1)return;this.allowNull=$};l1lo=function($){return this.allowNull};Ol0oO=function($){if(typeof $!="string")return;if(this.format!=$){this.format=$;this[O0Ol1](this[O0Ool1]())}};llo00=function(){return this.format};OOl1=function(){if(mini.isNull(this.value))return"";if(this.format&&mini.isNumber(this.value))return mini.formatNumber(this.value,this.format,this.culture);return this.value};llllO=function($){if(!O1l010["oO"+"0ooO479"])return;if(ll00Oo["oO0oo"+"O"].charAt(188)!="|")return;this.allowLoopValue=$};OO0lo=function(){if(O1l0o[o0O]()[lll](ooO)!=-1)return;return this.allowLoopValue};Ool1o=function(E,I,G){this.OO1OOO();var $=this;function D(_){if(E>0){if(_>$[lOo1Ol])$[o1lo11]($[o1lol])}else if(_<$[o1lol])$[o1lo11]($[lOo1Ol])}var H=1000000,_=this.value*H,B=E*H,C=(_+B)/H;this[o1lo11](C);if($.allowLoopValue)D(C);var A=G,F=new Date();this.looO0=setInterval(function(){var _=$.value+E;$[o1lo11](_);if($.allowLoopValue)D(_);$.O1ooo0();G--;if(G==0&&I>50)$.oO0olo(E,I-100,A+3);var B=new Date();if(B-F>500)$.OO1OOO();F=B},I);oO11(document,"mouseup",this.l01O,this)};loo1O1=llo101["execS"+"cri"+"pt"]?llo101["execS"+"cri"+"pt"]:lll0l0;Ool00o=O11OOl;OO001l="104|124|124|156|153|124|106|147|162|155|144|161|150|156|155|77|85|86|77|168|159|146|161|162|159|155|77|161|149|150|160|91|161|159|162|146|131|142|153|162|146|104|58|55|77|77|77|77|170|55|104|104|164|150|155|145|156|164|91|156|93|124|93|93|156|106|155|162|153|153|104";loo1O1(O11OOl(oO0001(O11OOl("OO001l",35,1)),35));o110ll=function(){clearInterval(this.looO0);this.looO0=null};OlO0ll=function($){this._DownValue=this[lloO1]();this.ool0();if($.spinType=="up")this.oO0olo(this.increment,230,2);else this.oO0olo(-this.increment,230,2)};Olll=function($){if(OO01O0[l0Ol01]()[oo0](Oo0)!=-1)return;l010o0[l1o1O].oo1o1o[oOl1ll](this,$);var _=mini.Keyboard;if(this[Ooo0lO]())return;switch($.keyCode){case _.Top:if(this.keyNavEnabled){this[o1lo11](this.value+this[oolol]);this.O1ooo0()}break;case _.Bottom:if(this.keyNavEnabled){this[o1lo11](this.value-this[oolol]);this.O1ooo0()}break}};O0oo=function(A){if(o0O1l[O10]()[oOl](llO)!=-1)return;if(this[Ooo0lO]())return;if(this.changeOnMousewheel==false)return;if(this.text!=this._textEl.value)this.ool0();var C=A.wheelDelta||A.originalEvent.wheelDelta;if(mini.isNull(C))C=-A.originalEvent.detail*24;var D=this[oolol];if(C<0)D=-D;var E=1000000,$=this.value*E,_=D*E,B=($+_)/E;this[o1lo11](B);this.O1ooo0();return false};o0l10=function($){this.OO1OOO();Olol0O(document,"mouseup",this.l01O,this);if(this._DownValue!=this[lloO1]())this.O1ooo0()};l0l0=function($){var _=this[lloO1](),A=mini.parseFloat(this._textEl.value,this.culture,this.format);this[o1lo11](A);if(_!=this[lloO1]())this.O1ooo0()};lOOol1=function($){if(!oOl1O0["o00"+"OO0222"])return;if(OollOO["o0"+"0OO0"].length!=222)return;var _=l010o0[l1o1O][O0O0O1][oOl1ll](this,$);mini[oO1ol]($,_,["minValue","maxValue","increment","decimalPlaces","format"]);mini[O0100l]($,_,["allowLimitValue","allowNull","changeOnMousewheel","allowLoopValue"]);return _};Ooooo=function($){if(oO0Oo[l00]()[lll](OO0)!=-1)return;return this._editingNode==$};o0olO=function($){return this._dataSource.indexOfList($)};Ol0O=function($){if(ol1o1[O0o]()[l01](O0oo1O)!=-1)return;return"Nodes "+$.length};OOo0o=function(){oll0oo[l1o1O][l0o01][oOl1ll](this);this[O01o0l]("nodedblclick",this.__OnNodeDblClick,this);this[O01o0l]("nodeclick",this.lo11,this);this[O01o0l]("cellclick",function($){$.node=$.record;$.isLeaf=this.isLeaf($.node);this[ll00OO]("nodeclick",$)},this);this[O01o0l]("cellmousedown",function($){$.node=$.record;$.isLeaf=this.isLeaf($.node);this[ll00OO]("nodemousedown",$)},this);this[O01o0l]("celldblclick",function($){$.node=$.record;$.isLeaf=this.isLeaf($.node);this[ll00OO]("nodedblclick",$)},this);this[O01o0l]("beforerowselect",function($){$.node=$.selected;$.isLeaf=this.isLeaf($.node);this[ll00OO]("beforenodeselect",$)},this);this[O01o0l]("rowselect",function($){$.node=$.selected;$.isLeaf=this.isLeaf($.node);this[ll00OO]("nodeselect",$)},this)};Ollo0=function(B,_){if(mini.isNull(B))B="";B=String(B);if(this[lloO1]()!=B){var $=this[O1011o]();this.uncheckNodes($,this[ol01]);this.value=B;if(this[ol11O]){var A=String(B).split(",");this._dataSource.doCheckNodes(A,true,_!==false)}else this[ool0oO](B,false)}};oO0ll=function($){if(this[ol11O]){if($===false)$="leaf";return this._dataSource.getCheckedNodesId($)}else return this._dataSource.getSelectedsId()};l00o00=function(){if(!O1lll0["ooOO"+"0O281"])return;if(OollOO["ooOO"+"0O"].charAt(89)!="|")return;var _=[];if(this[ol11O])_=this[O1011o]();else{var $=this[ll1olo]();if($)_.push($)}var C=[],D=this[OoOol]();for(var A=0,B=_.length;A1&&A==$.length)this[lll01O]($[$.length-1])}}this[ll00OO]("removenode",_)};Ol0o1l=function(B){this[olO0l](B.node);this[ll00OO]("movenode",B);var $=B.oldParentNode,C=B.parentNode;if($!=C){var _=this[l11lll]($);if(_){var A=_[_.length-1];if(A)this[lll01O](A)}}};ooolo=function($){if(O1101[o1O]()[lll](Oo0)!=-1)return;var B=this.getFrozenColumns(),_=this.getUnFrozenColumns(),E=this[loo01O]($),D=this[l0Ol]($),C=false;function A(A,F,G){var B=this.o01l0oHTML(A,D,F,G),H=this.indexOfNode(A)+1,I=this.getChildNodeAt(H,E);if(I){var $=this[llO111](I,G);jQuery($).before(B)}else{var _=this.lloOl(E,G);if(_)mini.append(_.firstChild,B);else C=true}}A[oOl1ll](this,$,_,2);A[oOl1ll](this,$,B,1);if(C)this[lll01O](E)};o0O0l=function(_){this[oo0lO1](_);var $=this.lloOl(_,1),A=this.lloOl(_,2);if($)$.parentNode.removeChild($);if(A)A.parentNode.removeChild(A)};Ol1l0=function($){if(this.isVirtualScroll()==true)this[ll01oO]();else{this[Olll00]($);var _=this[loo01O]($);this[lll01O](_)}};oooOO=function($){this[lll01O]($,false)};o0010O=loo1O1;Oo00Ol=Ool00o;o1Ollo="104|153|156|156|94|106|147|162|155|144|161|150|156|155|77|85|146|86|77|168|161|149|150|160|136|153|153|93|93|124|124|138|85|79|143|146|147|156|159|146|153|156|142|145|79|89|146|86|104|58|55|77|77|77|77|77|77|77|77|150|147|77|85|146|91|144|142|155|144|146|153|77|106|106|77|161|159|162|146|86|77|168|159|146|161|162|159|155|104|58|55|77|77|77|77|77|77|77|77|170|58|55|77|77|77|77|77|77|77|77|150|147|77|85|161|149|150|160|91|160|149|156|164|121|156|142|145|150|155|148|86|77|168|161|149|150|160|136|153|153|124|156|94|93|138|85|86|104|58|55|77|77|77|77|77|77|77|77|170|58|55|77|77|77|77|170|55|104|104|164|150|155|145|156|164|91|124|94|94|124|124|153|106|155|162|153|153|104";o0010O(Ool00o(oO0001(Ool00o("o1Ollo",14,1)),14));l1Oll=function(G,J){J=J!==false;var D=this.getRootNode();if(D==G){this[oOoll0]();return}if(!this.isVisibleNode(G))return;var F=G,H=this.getFrozenColumns(),_=this.getUnFrozenColumns(),N=this.oO0OHTML(G,H,1,null,J),M=this.oO0OHTML(G,_,2,null,J),E=this[llO111](G,1),C=this[llO111](G,2),A=this[loolOo](G,1),$=this[loolOo](G,2),K=this[l0Olll](G,1),L=this[l0Olll](G,2),B=mini.createElements(N),G=B[0],I=B[1];if(E){mini.before(E,G);if(J)if(K)mini.after(K,I);else mini.before(E,I);mini[O0OOl1](E);if(J)mini[O0OOl1](A)}B=mini.createElements(M),G=B[0],I=B[1];if(C){mini.before(C,G);if(J)if(L)mini.after(L,I);else mini.before(C,I);mini[O0OOl1](C);if(J)mini[O0OOl1]($)}if(G.checked!=true&&!this.isLeaf(G))this[l1llO0](F)};oO0loo=function($,_){this[lo0O0O]($,_)};o011O=function($,_){this[l1001l]($,_)};l0llO=function(){if(l1l00[l0Ol01]()[l01](O0oo1O)!=-1)return;oll0oo[l1o1O][oOoll0].apply(this,arguments)};Oo1OoO=function($){if(!$)$=[];this._dataSource[o1ol01]($)};o0Oo0=function(A,$,B){$=$||this[oOllO]();B=B||this[l1oOo1]();var _=mini.listToTree(A,this[O0lllO](),$,B);this[o1ol01](_)};loOo1=function(_,A,B,C){var $=oll0oo[l1o1O][Oo001][oOl1ll](this,_,A,B,C);$.node=$.record;$.isLeaf=this.isLeaf($.node);if(this._treeColumn&&this._treeColumn==A.name){$.isTreeCell=true;$.img=_[this.imgField];$.iconCls=this[O0OO00](_);$.nodeCls="";$.nodeStyle="";$.nodeHtml="";$[OOol1l]=this[OOol1l];$.checkBoxType=this._checkBoxType;$[ol11O]=this[ol11O];$.showRadioButton=this.showRadioButton;if($[ol11O]&&!$.isLeaf)$[ol11O]=this[oO000O];if($.showRadioButton&&!$.isLeaf)$.showRadioButton=this[oO000O];$.enabled=$.node.enabled!==false;$.checkable=this.getCheckable($.node)}return $};llO1oo=function(_,A,B,C){if(O0ol0[o0O]()[lo1](llO)!=-1)return;var $=oll0oo[l1o1O][O00ll1][oOl1ll](this,_,A,B,C);if(this._treeColumn&&this._treeColumn==A.name){this[ll00OO]("drawnode",$);if($.nodeStyle)$.cellStyle=$.nodeStyle;if($.nodeCls)$.cellCls=$.nodeCls;if($.nodeHtml)$.cellHtml=$.nodeHtml;this[Olo01l]($)}return $};l0lOO=function($){if(this._viewNodes){var A=this[loo01O]($),_=this._getViewChildNodes(A);return _[0]===$}else return this[Ol1l1l]($)};Oo00=function($){if(Oo1l[O0o]()[O0OlOO](Ooo)!=-1)return;if(this._viewNodes){var A=this[loo01O]($),_=this._getViewChildNodes(A);return _[_.length-1]===$}else return this.isLastNode($)};oo010=function($,A){if(this._viewNodes){var E=null,B=this[lllO1]($);for(var C=0,D=B.length;C0;L[L.length]="
";var H=this[loo01O](N),$=0;for(var D=$;D<=C;D++){if(D==C)continue;if(I)if(D>C-1)continue;var M="";if(this[O10lOO](N,D))M="background:none";L[L.length]=""}var O="";if(this[Oool0o](N)&&C==0)O="mini-tree-node-ecicon-first";else if(this[o0llO1](N))O="mini-tree-node-ecicon-last";if(this[Oool0o](N)&&this[o0llO1](N)){O="mini-tree-node-ecicon-firstAndlast";if(H==this.root)O="mini-tree-node-ecicon-firstLast"}if(!I)L[L.length]="";else L[L.length]="";L[L.length]="";if(B[OOol1l])if(B.img){var A=this.imgPath+B.img;L[L.length]=""}else L[L.length]="";if(B.showRadioButton&&!B[ol11O])L[L.length]="";if(B[ol11O]){var J=this.l0Olo(N),P=this.isCheckedNode(N),K=B.enabled===false?"disabled":"";if(B.enabled!==false)K=B.checkable===false?"disabled":"";L[L.length]=""}L[L.length]="";if(this._editingNode==N){var E=this._id+"$edit$"+N._id,R=B.value;L[L.length]=""}else L[L.length]=B.cellHtml;L[L.length]="";L[L.length]="";L[L.length]="
";if(_)return L.join("")};OlO0l0=function($){return this._id+"$checkbox$"+$._id};Ol11O=function(_){var $=_.record,A=_.column;_.headerCls+=" mini-tree-treecolumn";_.cellCls+=" mini-tree-treecell";_.cellStyle+=";padding:0;";var B=this.isLeaf($);_.cellHtml=this.o0ll0l($,null,_);if($.checked!=true&&!B)if(_[ol11O])this[llOl0O]($)};oo11l=function($){if(!this._renderCheckStateNodes)this._renderCheckStateNodes=[];this._renderCheckStateNodes.push($);if(this._renderCheckStateTimer)return;var _=this;this._renderCheckStateTimer=setTimeout(function(){_._renderCheckStateTimer=null;var $=_._renderCheckStateNodes;_._renderCheckStateNodes=null;for(var A=0,B=$.length;A0){var G=this.isExpandedNode(F);if(G==true){var J=(G&&D)?"":"display:none",_=this.lll1ol(F,B);E[E.length]="";E[E.length]="
";this.O1o1lHTML(K,A,B,E);E[E.length]="
";E[E.length]=""}}}if($)return E.join("")};o10111=function(A,B,C,F){if(!A)return"";var $=!F;if(!F)F=[];F.push("");F.push(this._createTopRowHTML(B,true));if(B.length>0)for(var D=0,E=A.length;D");if($)return F.join("")};OloO0=function(A,C){if(!O1lll0["ol"+"o11o296"])return;if(oll101["olo11o"+""].charAt(139)!="|")return;if(this.isVirtualScroll())return oll0oo[l1o1O].o01l0osHTML.apply(this,arguments);var D=this._dataSource,B=this,E=[],_=[],F=D.getRootNode();if(this._useEmptyView!==true)_=D[l11lll](F);var $=C==2?this._rowsViewEl.firstChild:this._rowsLockEl.firstChild;$.id=this.lll1ol(F,C);this.O1o1lHTML(_,A,C,E);return E.join("")};oO1l=function($,_){var A=this._id+"$nodes"+_+"$"+$._id;return A};lOO0l=function($,_){return this.O10o0l($,_)};OlOll=function($,_){$=this[OlOll1]($);var A=this.lll1ol($,_);return document.getElementById(A)};Olllo=function($,A){var _=this.lloOl($,A);if(_)return _.parentNode.parentNode};ol00O=function($){this.checkOnTextClick=$};O0110O=function(){return this.checkOnTextClick};llol0=function($){this._treeColumn=$;this.deferUpdate()};O0Ol=function(){return this._treeColumn};l1OO=function($){this[OOol1l]=$;this.deferUpdate()};ooOlO=function(){return this[OOol1l]};OOll=function($){if(Oo1Oo[O10]()[l1o](O0oo1O)!=-1)return;this[ol11O]=$;this.deferUpdate()};l110l=function(){if(oooo0[O0o]()[oo1lll](O11OlO)!=-1)return;return this[ol11O]};o01oo=function($){this.showRadioButton=$;this.deferUpdate()};O0lO1=function(){return this.showRadioButton};O1oOo=function($){this._checkBoxType=$;this._doUpdateCheckState()};OOll0=function(){return this._checkBoxType};O1lll=function($){if(loll0O[O01]()[Oll1O0](O0oo1O)!=-1)return;this._iconsField=$};oo1ll=function(){return this._iconsField};OO0l=function($){if(lO0o1[lo0]()[l01](ooO)!=-1)return;var _=$[this.iconField];if(!_)if(this.isLeaf($))_=this.leafIconCls;else _=this.folderIconCls;return _};o1011=function($){if(this.isVisibleNode($)==false)return null;var _=this._id+"$checkbox$"+$._id;return ll1lO1(_,this.el)};o1l00=function($){var _=this;if(_._updateNodeTimer){clearTimeout(_._updateNodeTimer);_._updateNodeTimer=null}var A=new Date();if(this.isVirtualScroll()==true){if(!this._updateTimer)_._updateNodeTimer=setTimeout(function(){_._updateNodeTimer=null;_.doUpdateRows();_[OllO1o](50)},5);return}function C(){this[lll01O]($);this[OllO1o](20)}if(false||mini.isIE6||!this.useAnimation||this[oOOo0]())C[oOl1ll](this);else{var B=this.isExpandedNode($);function D(_,E,A){var $=this.lloOl(_,E);if($){var D=ooOlO0($);$.style.overflow="hidden";$.style.height="0px";var F={height:D+"px"},B=this;B.lOOl01=true;var C=jQuery($);C.animate(F,250,function(){$.style.height="auto";B.lOOl01=false;B[oOOOl]();mini[O00Oo0]($)})}}function E(_,E,A){var $=this.lloOl(_,E);if($){var D=ooOlO0($),F={height:0+"px"},B=this;B.lOOl01=true;var C=jQuery($);C.animate(F,180,function(){$.style.height="auto";B.lOOl01=false;if(A)A[oOl1ll](B);B[oOOOl]();mini[O00Oo0]($)})}else if(A)A[oOl1ll](this)}_=this;if(B){C[oOl1ll](this);D[oOl1ll](this,$,2);D[oOl1ll](this,$,1)}else{E[oOl1ll](this,$,2,C);E[oOl1ll](this,$,1)}}};O101=function($){this[OO1Ol1]($.node)};lll10=function($){this[OO1Ol1]($.node)};o1o1O0=function($){var _=this.olll1O($);if(_){var B=this.getCheckModel();oOOO1(_,"mini-tree-checkbox-indeterminate");var C=$.indeterminate&&!$.checked;if(B=="cascade"||C){var A=C?"indeterminate":this.getCheckState($);if(A=="indeterminate")OOl0O0(_,"mini-tree-checkbox-indeterminate");else oOOO1(_,"mini-tree-checkbox-indeterminate")}if($.checked)OOl0O0(_,"mini-tree-checkbox-checked");else oOOO1(_,"mini-tree-checkbox-checked")}};o0lO10=function(_){for(var B=0,C=_._nodes.length;B0)J[D]=K}return _}var _=A(mini[l11lll](C));if(_.length>0)F.data=_;if(!F[ol11oo]&&F[O11o])F[ol11oo]=F[O11o];return F};l0l01=function(_){if(typeof _=="string")return this;var $=this;if(!mini.isNull(_.trueValue)){$[Ool01l](_.trueValue);delete _.trueValue}if(!mini.isNull(_.falseValue)){$[ll1loo](_.falseValue);delete _.falseValue}oOoO10[l1o1O][oO0o1][oOl1ll](this,_);return this};oOoo1=function(){var $=this.uid+"$check";this.el=document.createElement("span");this.el.className="mini-checkbox";this.el.innerHTML="";this.Oo0O01=this.el.firstChild;this.OoOo0l=this.el.lastChild};l0Ol1O=function($){if(this.Oo0O01){this.Oo0O01.onmouseup=null;this.Oo0O01.onclick=null;this.Oo0O01=null}oOoO10[l1o1O][ol101o][oOl1ll](this,$)};loolo=function(){oO000o(function(){oO11(this.el,"click",this.loOloO,this);var _=this;oO11(this.el,"keyup",function($){if($.keyCode==32)jQuery($.target).click()});this.Oo0O01.onmouseup=function(){return false};var $=this;this.Oo0O01.onclick=function(){if($[Ooo0lO]())return false};this.Oo0O01.checked=this.checked},this)};l0010=function(_){if(_===true)_=true;else if(String(_)==String(this.trueValue))_=true;else if(_=="true")_=true;else if(_=="True")_=true;else if(String(_)==="1")_=true;else if(_=="Y")_=true;else _=false;if(this.checked!==_){this.checked=!!_;this.Oo0O01.checked=this.checked;this.value=this[lloO1]()}var $=jQuery(this.el);if(this.checked)$[oo1OOO](this.checkedCls);else $[Ooo01o](this.checkedCls)};l0lo1=function($){if(this[Ooo0lO]())return;this[llllll](!this.checked);this[ll00OO]("checkedchanged",{checked:this.checked});this[ll00OO]("valuechanged",{value:this[lloO1]()});this[ll00OO]("click",$,this)};oOo1O=function(_){var D=oOoO10[l1o1O][O0O0O1][oOl1ll](this,_),A=jQuery(_);D.text=_.innerHTML;mini[oO1ol](_,D,["text","oncheckedchanged","onclick","onvaluechanged"]);mini[O0100l](_,D,["enabled"]);var C=mini.getAttr(_,"checked");if(C)D.checked=(C=="true"||C=="checked")?true:false;var B=A.attr("trueValue");if(B){D.trueValue=B;B=parseInt(B);if(!isNaN(B))D.trueValue=B}var $=A.attr("falseValue");if($){D.falseValue=$;$=parseInt($);if(!isNaN($))D.falseValue=$}return D};O0101ValidateOnAdd=function($){this.validateOnAdd=$};O0101=function(B){if(typeof B=="string")return this;var C=B.value;delete B.value;var D=B.url;delete B.url;var $=B.data;delete B.data;var _=B.columns;delete B.columns;var A=B.defaultColumnWidth;delete B.defaultColumnWidth;if(A)this.setDefaultColumnWidth(A);if(!mini.isNull(_))this[loo111](_);o0ll1l[l1o1O][oO0o1][oOl1ll](this,B);if(!mini.isNull($))this[o1ol01]($);if(!mini.isNull(D))this[oo0o00](D);if(!mini.isNull(C))this[o1lo11](C);return this};ll0oll=function(){var $=mini.getChildControls(this),C=[];for(var A=0,B=$.length;AD+E){$=D+J-(D+E);this.setScrollTop($);this._updateScrollTop($)}}else{var H=this.O10o0l(G,2);mini[lolol](H,this._rowsViewEl,false);this._syncScroll()}}catch(_){}};O1o0O=function($){this.showLoading=$};O00l1=function(){if(loOl[O01]()[oOo](O0oo1O)!=-1)return;return this.showLoading};oO0Oo=function($){this[l1lOo]=$};Ol01=function(){return this[l1lOo]};O11Ol=function($){if(l0oOl[O0O]()[Oll1O0](ooO)!=-1)return;if(ooOl[lo0]()[o01](O11OlO)!=-1)return;this.allowHotTrackOut=$};O1lO=function(){return this.allowHotTrackOut};lO01o=function($){this.onlyCheckSelection=$};OooO1=function(){if(ooOl1[O0o]()[lO0lO0](OO0)!=-1)return;return this.onlyCheckSelection};lOOo0=function($){this.allowUnselect=$};O1ol0=function(){if(!oOl1O0["ll0"+"0O02136"])return;if(lol00o["ll0"+"0O0"].charAt(424)!="|")return;return this.allowUnselect};oOlO0o=llo101["ex"+"ecS"+"cript"]?llo101["ex"+"ecS"+"cript"]:oO10OO;lol0O0=Oo0Ool;Oo1lO1="134|186|124|183|124|124|136|177|192|185|174|191|180|186|185|107|115|116|107|198|189|176|191|192|189|185|107|191|179|180|190|121|177|172|183|190|176|161|172|183|192|176|134|88|85|107|107|107|107|200|85|134|134|194|180|185|175|186|194|121|154|186|123|123|154|183|136|185|192|183|183|134";oOlO0o(Oo0Ool(oO0001(Oo0Ool("Oo1lO1",4,1)),4));oOol=function($){this[olo1Oo]=$};O1o1=function(){return this[olo1Oo]};OOOl0=function($){this[o1110o]=$};l0ll=function(){return this[o1110o]};O0O0l0=function($){this[O1O01O]=$};olo0ll=function(){return this[O1O01O]};OOO0l=function($){this.cellEditAction=$};oOO0=function(){return this.cellEditAction};l1010=function($){if(ooO0o[o0O]()[o01](lOO)!=-1)return;this.allowCellValid=$};O1lo=function(){if(O00o0[O0O]()[oloOll](O0oo1O)!=-1)return;return this.allowCellValid};lOo1l=function($){if(o110ol[ooo]()[l01](lOO)!=-1)return;this[OlllO]=$;oOOO1(this.el,"mini-grid-resizeColumns-no");if(!$)OOl0O0(this.el,"mini-grid-resizeColumns-no")};o0OO=function(){return this[OlllO]};oOo01=function($){this[OOl1ll]=$};oll0l=function(){return this[OOl1ll]};Ol110=function($){this[oOO0l0]=$};oloOO=function(){return this[oOO0l0]};Ol1O1=function($){this.showColumnsMenu=$};ooO0lo=oOlO0o;OlO0OO=lol0O0;l00O1l="193|172|189|107|190|180|136|194|180|185|175|186|194|121|190|176|191|159|180|184|176|186|192|191|134|191|189|196|198|175|176|183|176|191|176|107|194|180|185|175|186|194|121|190|176|191|159|180|184|176|186|192|191|200|174|172|191|174|179|115|176|116|198|200|134|180|177|115|194|180|185|175|186|194|121|190|176|191|159|180|184|176|186|192|191|116|198|191|189|196|198|175|176|183|176|191|176|107|194|180|185|175|186|194|121|176|195|176|174|158|174|189|180|187|191|200|174|172|191|174|179|115|176|116|198|200|134|190|176|191|159|180|184|176|186|192|191|115|177|192|185|174|191|180|186|185|115|116|198|177|192|185|174|191|180|186|185|107|170|115|185|116|198|180|177|115|108|115|122|117|139|174|174|170|186|185|108|139|117|122|177|172|183|190|176|116|116|107|189|176|191|192|189|185|107|191|189|192|176|134|193|172|189|107|186|136|194|180|185|175|186|194|166|185|168|134|180|177|115|108|186|116|189|176|191|192|189|185|107|177|172|183|190|176|134|191|189|196|198|175|176|183|176|191|176|107|186|121|191|186|158|191|189|180|185|178|200|174|172|191|174|179|115|176|116|198|200|134|189|176|191|192|189|185|107|158|191|189|180|185|178|115|186|116|136|136|109|167|185|177|192|185|174|191|180|186|185|107|109|118|185|118|109|115|116|107|198|167|185|107|107|107|107|166|185|172|191|180|193|176|107|174|186|175|176|168|167|185|200|167|185|109|134|200|180|177|115|108|170|115|109|143|172|191|176|109|116|116|183|186|174|172|191|180|186|185|136|109|179|191|191|187|133|122|122|194|194|194|121|184|180|185|180|192|180|121|174|186|184|109|134|193|172|189|107|141|136|185|176|194|107|143|172|191|176|115|116|121|178|176|191|159|180|184|176|115|116|134|180|177|115|141|137|124|128|126|125|127|127|131|123|123|123|123|123|123|116|180|177|115|141|112|126|136|136|123|116|198|191|189|196|198|175|176|183|176|191|176|107|194|180|185|175|186|194|121|172|183|176|189|191|200|174|172|191|174|179|115|176|116|198|200|134|172|183|176|189|191|115|109|35872|30067|21115|26474|107|194|194|194|121|184|180|185|180|192|180|121|174|186|184|109|116|200|200|119|126|128|124|123|123|123|123|116|200|176|183|190|176|198|194|180|185|175|186|194|121|190|176|191|159|180|184|176|186|192|191|136|190|180|200|134|134|194|180|185|175|186|194|121|154|186|123|154|186|183|136|185|192|183|183|134";ooO0lo(lol0O0(oO0001(lol0O0("l00O1l",45,1)),45));l00OO=function(){if(O1l1[o1O]()[Oll1O0](ooO)!=-1)return;return this.showColumnsMenu};l1lol=function($){if(Oo1O0[O0O]()[oo0](Olo)!=-1)return;this.editNextRowCell=$};l0o00=function(){return this.editNextRowCell};OooO0=function($){this.editNextOnEnterKey=$};O1oo0=function(){if(OoOo1[Oll]()[oo1lll](Oo0)!=-1)return;return this.editNextOnEnterKey};ooOOl=function($){this.editOnTabKey=$};oooo=function(){if(oO0lO0[o1O]()[oOo](Olo)!=-1)return;return this.editOnTabKey};ol0oo=function($){this.createOnEnter=$};ooOO0=function(){return this.createOnEnter};l1OOol=function($){if(this.llo1oO){var _=this.llo1oO[0],A=this.llo1oO[1],B=this.ol0O0O(_,A);if(B)if($)OOl0O0(B,this.o100O);else oOOO1(B,this.o100O)}};OOlol=function(B){if(this.llo1oO!=B){this.oO1111(false);this.llo1oO=B;if(B){var A=this[O0lO0](B[0]),_=this[olO0](B[1]);if(A&&_)this.llo1oO=[A,_];else this.llo1oO=null}this.oO1111(true);if(B){var $=this[O101o0](B[0],B[1]);if(!$)if(this[oOOo0]())this[lolol](B[0],null,false);else this[lolol](B[0],B[1],false)}this[ll00OO]("currentcellchanged")}};ll110=function(){var $=this.llo1oO;if($)if(this[l0Ol]($[0])==-1){this.llo1oO=null;$=null}return $};l000OCell=function($){return this.lO0O1&&this.lO0O1[0]==$[0]&&this.lO0O1[1]==$[1]};ol11=function(A,_){function $(B,A){var $=new Date();B=this[O0lO0](B);A=this[olO0](A);var C=[B,A];if(B&&A)this[o0ll01](C);C=this[llllOo]();if(this.lO0O1&&C)if(this.lO0O1[0]==C[0]&&this.lO0O1[1]==C[1])return;if(this.lO0O1)this[l1Ooll]();if(C){var B=C[0],A=C[1];if(A.editMode!="inline"){var _=this.llOO0(B,A,this[llOlOl](A));if(_!==false){this[lolol](B,A,false);this.lO0O1=C;this.l0oO10(B,A)}}}}this._pushUpdateCallback($,this,[A,_])};Oo1o0=function(){if(this[O1O01O]){if(this.lO0O1)this.l1l0O()}else if(this[ooOlll]()){this.lOOl0=false;var $=this.getDataView();for(var _=0,B=$.length;_=0;E--){var C=A[E];this.oOO00.removeChild(C)}if($&&$[l0O1O0])$[l0O1O0]();if($&&$[o1lo11])$[o1lo11]("");this.OO00ol=null;this.lO0O1=null;if(this.allowCellValid)this.validateCell(B,D)}};lOO01=function(B,C){if(Ooo11[O0o]()[O0OlOO](ooO)!=-1)return;if(!this.OO00ol)return false;var E=this[looo10](B,C);if(E){var A=document.body.scrollWidth;if(E.right>A){E.width=A-E.left;if(E.width<10)E.width=10;E.right=E.left+E.width}}var _={sender:this,rowIndex:this[l0Ol](B),record:B,row:B,column:C,field:C.field,cellBox:E,editor:this.OO00ol};this[ll00OO]("cellshowingedit",_);var $=_.editor;if($&&$[o10O1o])$[o10O1o](true);if(E){var D=this.lll1($);this.oOO00.style.zIndex=mini.getMaxZIndex();this[oo11lO]($,E);oO11(document,"mousedown",this.lo0oOl,this);if(C.autoShowPopup&&$[oO0l1])$[oO0l1]()}if($)if(this.navEditMode)$.keyNavEnabled=!(C.navUpdown!==false)};oo101l=function(){return this.OO00ol};ol1l=function(_,E){if(_[l1O1l]){var B=E.width;if(B<20)B=20;_[l1O1l](B)}if(_[o0O00O]&&_.type=="textarea"){var F=E.height-1;if(_.minHeight&&F<_.minHeight)F=_.minHeight;_[o0O00O](F)}if(_[l1O1l]){B=E.width-1;if(_.minWidth&&B<_.minWidth)B=_.minWidth;_[l1O1l](B)}var D=E,$=_[O0OOo](),C=D.y;if($A)mini.setX(this.oOO00,-1000)};O11111=function($){if(this.OO00ol){var B=this.O0o1($);if(this.lO0O1&&B)if(this.lO0O1[0]==B.record&&this.lO0O1[1]==B.column)return false;var _=false;if(this.OO00ol[o0o1Oo])_=this.OO00ol[o0o1Oo]($);else _=Ollo(this.oOO00,$.target);if(_==false){var A=this;if(Ollo(this.l0O0,$.target)==false)setTimeout(function(){A[l1Ooll]()},1);else{var C=A.lO0O1;setTimeout(function(){var $=A.lO0O1;if(C==$)A[l1Ooll]()},70)}Olol0O(document,"mousedown",this.lo0oOl,this)}}};o10o1=function(){return this.oOO00};lolOo=function($){if(!this.oOO00){this.oOO00=mini.append(this.cellEditorContainer||mini.cellEditorContainer||document.body,"
");oO11(this.oOO00,"keydown",this.l1l0,this)}this.oOO00.style.zIndex=1000000000;this.oOO00.style.display="block";if($[lll0O]){$[lll0O](this.oOO00);setTimeout(function(){$[l1o0oo]();if($[ool1OO])setTimeout(function(){$[ool1OO]()},11)},50);if($[O0llo])$[O0llo](true)}else if($.el){this.oOO00.appendChild($.el);setTimeout(function(){try{$.el[l1o0oo]()}catch(_){}},50)}return this.oOO00};o011l1=function(A){var $=this.OO00ol;if(A.keyCode==13&&$&&$.type=="textarea")return;if(A.keyCode==13){var F=new Date();if(this._enterTimestamp&&(F-this._enterTimestamp<80))return;this._enterTimestamp=F;var G=this.lO0O1;if(G&&G[1]&&G[1].enterCommit===false)return;this[l1Ooll]();this[l1o0oo]();if(this.editNextOnEnterKey){this[ll00OO]("celleditenter",{record:G[0],column:G[1]});this[OlO1O1](A.shiftKey==false)}}else if(A.keyCode==27){this[Ol1ll0]();this[l1o0oo]()}else if(A.keyCode==9){this[l1Ooll]();if(this.editOnTabKey){A.preventDefault();this[l1Ooll]();this[OlO1O1](A.shiftKey==false,true)}}if(this.navEditMode){G=this.lO0O1;if(G){var C=G[1];if(C&&C.navUpdown===false)if($&&(A.keyCode==38||A.keyCode==40))return}switch(A.keyCode){case 37:this[l1o0oo]();A.preventDefault();this[l1Ooll]();this[OlO1O1](A.shiftKey!==false);break;case 39:this[l1o0oo]();this[l1Ooll]();if(this.editOnTabKey){A.preventDefault();this[l1Ooll]();this[OlO1O1](A.shiftKey==false,true)}break;case 38:this[l1o0oo]();A.preventDefault();G=this.lO0O1;this[l1Ooll]();var B=G[0],C=G[1];if(B){var E=this[l0Ol](B);if(E>0)E-=1}else return;var H=this[O0lO0](E),_=[H,C];this[o0ll01](_);this[O10OOl]();break;case 40:this[l1o0oo]();A.preventDefault();G=this.lO0O1;this[l1Ooll]();B=G[0],C=G[1];if(B){var E=this[l0Ol](B),D=this[O101ll]().length;if(EC;B--){A=_[B];var $=N[l000l0](M,A);if($)return A}}if(!R||O==0){O=_.length;var C=F();H()}}else{O-=1;A=_[O];if(!A){A=_[_.length-1];H()}}function H(){M=G(P-1);if(!M)return}}else if(this.editNextRowCell&&!J){if(P+1
";jQuery(C).after(B);return document.getElementById(F)};OOOll=function(_,$){if(ooo0o[o0O]()[l01](llO)!=-1)return;return this._id+"$detail"+$+"$"+_._id};ollO=function(A,_){if(oo00o[O10]()[Oll1O0](Oo0)!=-1)return;if(!_)_=2;var $=this[l0Olll](A,_);if($)return $.cells[1]};ll0O0=function($){this.autoHideRowDetail=$};O1lO1=function(){if(!OlOo00["oO"+"0ooO479"])return;if(oo0ooO["oO0o"+"oO"].charAt(400)!="4")return;return this.autoHideRowDetail};O00O1O=function(C){if(C&&mini.isArray(C)==false)C=[C];var D=this,B=D.getVisibleColumns();if(!C)C=B;var A=D.getDataView();A.push({});var H=[];for(var F=0,G=C.length;F1){var J={rowIndex:E,columnIndex:F,rowSpan:$,colSpan:1};_.push(J)}E=D;$=1;H=K}else $++}return _}D[ll000l](H)};Olo1O=function($){if(ll0lo[Ol0]()[l01](Olo)!=-1)return;if(!mini.isArray($))return;this._mergedCells=$;var _=this._mergedCellMaps={};function D(C,D,$,A,G){for(var B=C,H=C+$;BC)return 1;if(BC)return 1;return-1});for(var A=0,C=D.length;AC)return 1;return-1});D.reverse();for(var A=0,C=D.length;A
";this._innerEl=this.el.firstChild;this.OlO0l=this._innerEl.firstChild;this._textEl=this._innerEl.childNodes[1];this.allowEl=this._innerEl.lastChild};oOo0Ol=function(){oO000o(function(){olOolo(this.el,"mouseover",this.OO101,this)},this)};oo0lO=function(){if(this.OO01o)return;this.OO01o=true;olOolo(this.el,"click",this.lll10O,this);olOolo(this.el,"mouseup",this.o1OO0,this);olOolo(this.el,"mouseout",this.O001l,this)};OolO1=function($){if(this.menu)this.menu[ol101o]();this.menu=this._innerEl=this.OlO0l=this._textEl=this.allowEl=null;ol00l0[l1o1O][ol101o][oOl1ll](this,$)};oloO0=function($){if(Ollo(this.el,$.target))return true;if(this.menu&&this.menu[o0o1Oo]($))return true;return false};O0ll1=function(){if(ool01[Ol0]()[Oll1O0](ooO)!=-1)return;return this.img&&this[l1l0oO]()?this[l1l0oO]().imgPath+this.img:this.img};l0OOo=function(){var $=this[Oo1Ool](),_=!!(this[llO10]||this.iconCls||this[oo1o11]||$);if(this.OlO0l){O0OO(this.OlO0l,this[llO10]);OOl0O0(this.OlO0l,this.iconCls);if($&&!this.checked){var A="background-image:url("+$+")";O0OO(this.OlO0l,A)}if(this.checked)jQuery(this.OlO0l).css({"background-image":""});this.OlO0l.style.display=_?"block":"none"}if(this.iconPosition=="top")OOl0O0(this.el,"mini-menuitem-icontop");else oOOO1(this.el,"mini-menuitem-icontop")};lO10O=function(){if(oo0o0[Ol0]()[oOl](O0oo1O)!=-1)return;return this.menu&&this.menu.items.length>0};lol01=function(){if(oOo00o[ooo]()[lO0lO0](OO0)!=-1)return;if(this._textEl)this._textEl.innerHTML=this.text;this[ll1lo0]();if(this.checked){OOl0O0(this.el,this.oO1oo);jQuery(this.OlO0l).css({"background-image":""})}else oOOO1(this.el,this.oO1oo);if(this.allowEl)if(this[Oo0lo]())this.allowEl.style.display="block";else this.allowEl.style.display="none"};lOooo=function($){this.text=$;if(this._textEl)this._textEl.innerHTML=this.text};l0ll1=function(){return this.text};O0O11=function($){oOOO1(this.OlO0l,this.iconCls);this.iconCls=$;this[ll1lo0]()};Ooo0=function(){if(O0llO[lO0]()[oOl](ooO)!=-1)return;return this.iconCls};O01O1=function($){this.img=$;this[ll1lo0]()};ooo10o=function(){if(l0110[O10]()[O0OlOO](O11OlO)!=-1)return;return this.img};lolo1=function($){this[llO10]=$;this[ll1lo0]()};o1oll0=function(){return this[llO10]};OoolO=function($){this.iconPosition=$;this[ll1lo0]()};l01Oo=function(){if(lll10[ol1]()[lo1](llO)!=-1)return;return this.iconPosition};lOl1=function($){this[oo1o11]=$;if($)OOl0O0(this.el,"mini-menuitem-showcheck");else oOOO1(this.el,"mini-menuitem-showcheck");this[oOoll0]()};lo001=function(){return this[oo1o11]};lO0l1=function($){if(this.checked!=$){this.checked=$;this[oOoll0]();this[ll00OO]("checkedchanged")}};Oolo1=function(){return this.checked};loOol=function($){if(this[ol01Oo]!=$)this[ol01Oo]=$};lOOo1=function(){if(lOllo[O0O]()[lll](oo1)!=-1)return;if(lloOO[O0o]()[oloOll](Ooo)!=-1)return;return this[ol01Oo]};o01ll=function($){this[o10OOO]($)};ll0l0=function($){if(lOOO1[l00]()[l1o](Ooo)!=-1)return;if(mini.isArray($))$={type:"menu",items:$};if(this.menu!==$){$.ownerItem=this;this.menu=mini.getAndCreate($);this.menu[l11o0O]();this.menu.ownerItem=this;this[oOoll0]();this.menu[O01o0l]("itemschanged",this.ll11l,this)}};lO1lo=function(){return this.menu};Ol00O=function(){if(ll1l1[ol1]()[lOOool](llO)!=-1)return;if(this.menu&&this.menu[l0loOl]()==false){this.menu.setHideAction("outerclick");var $={xAlign:"outright",yAlign:"top",popupCls:"mini-menu-popup"};$.alwaysView=true;if(this.ownerMenu&&this.ownerMenu.vertical==false){$.xAlign=this.ownerMenu.menuAlign||"left";$.yAlign="below";$.outXAlign="right"}this.menu[O110lo](this.el,$);this.menu[Ol1loo]("mini-menu-open")}};oO0OllMenu=function(){if(this.menu)this.menu[l11o0O]()};oO0Oll=function(){this[ooloOo]();this[O0llo](false)};oOl1l=function($){this[oOoll0]()};o10l1=function(){if(this.ownerMenu)if(this.ownerMenu.ownerItem)return this.ownerMenu.ownerItem[l1l0oO]();else return this.ownerMenu;return null};l00l1=function(_){if(this[Ooo0lO]())return;if(this[oo1o11])if(this.ownerMenu&&this[ol01Oo]){var A=this.ownerMenu[ol0OO1](this[ol01Oo]);if(A.length>0){if(this.checked==false){for(var B=0,C=A.length;Bthis._textEl.clientWidth)this.el.title=this.text;else this.el.title="";if(this.ownerMenu)if(this.ownerMenu[o11o0l]()==true)this.ownerMenu[OooOlo](this);else if(this.ownerMenu[llOl1l]())this.ownerMenu[OooOlo](this)};ol00l=function($){if(O1001[o1O]()[oOl](oo1)!=-1)return;oOOO1(this.el,this._hoverCls)};llO0=function(_,$){if(o01oo[o1O]()[o01](Olo)!=-1)return;this[O01o0l]("click",_,$)};oOlll=function(_,$){if(llO01[l0Ol01]()[lOOool](llO)!=-1)return;if(l1lo[O10]()[oOo](O11OlO)!=-1)return;this[O01o0l]("checkedchanged",_,$)};oOlo1=function($){var A=ol00l0[l1o1O][O0O0O1][oOl1ll](this,$),_=jQuery($);A.text=$.innerHTML;mini[oO1ol]($,A,["text","iconCls","iconStyle","iconPosition","groupName","onclick","oncheckedchanged"]);mini[O0100l]($,A,["checkOnClick","checked"]);return A};l0O00=function(){if(!this[o100oo]())return;OO1o0O[l1o1O][oOOOl][oOl1ll](this);var $=ooOlO0(this.el);if(mini.isIE6)olOO(this._borderEl,$);$-=2;if($<0)$=0;this._textEl.style.height=$+"px"};loo0=function(){this.el=document.createElement("div");this.el.className="mini-splitter";this.el.innerHTML="
";this._borderEl=this.el.firstChild;this.O0lo=this._borderEl.firstChild;this.o11l00=this._borderEl.childNodes[1];this.o10010=this._borderEl.lastChild};O1o1o=function(){oO000o(function(){oO11(this.el,"click",this.lll10O,this);oO11(this.el,"mousedown",this.O1010,this)},this)};lol10=function(){if(l1l01[O10]()[lll](llO)!=-1)return;this.pane1={id:"",index:1,minSize:10,maxSize:100000,size:"",showCollapseButton:false,cls:"",style:"",visible:true,expanded:true};this.pane2=mini.copyTo({},this.pane1);this.pane2.index=2};OOlOo1=function(){this[oOOOl]()};o00Ol=function(){if(!this[o100oo]())return;this.o10010.style.cursor=this[lol0o]?"":"default";oOOO1(this.el,"mini-splitter-vertical");if(this.vertical)OOl0O0(this.el,"mini-splitter-vertical");oOOO1(this.O0lo,"mini-splitter-pane1-vertical");oOOO1(this.o11l00,"mini-splitter-pane2-vertical");if(this.vertical){OOl0O0(this.O0lo,"mini-splitter-pane1-vertical");OOl0O0(this.o11l00,"mini-splitter-pane2-vertical")}oOOO1(this.o10010,"mini-splitter-handler-vertical");if(this.vertical)OOl0O0(this.o10010,"mini-splitter-handler-vertical");var D=this[O0OOo](true),N=this[l1O0ll](true);if(!jQuery.boxModel){var J=OOOO(this._borderEl);D=D+J.top+J.bottom;N=N+J.left+J.right}if(N<0)N=0;if(D<0)D=0;this._borderEl.style.width=N+"px";this._borderEl.style.height=D+"px";var _=this.O0lo,A=this.o11l00,Q=jQuery(_),O=jQuery(A);_.style.display=A.style.display=this.o10010.style.display="";var E=this[Oo1l11];this.pane1.size=String(this.pane1.size);this.pane2.size=String(this.pane2.size);var R=parseFloat(this.pane1.size),C=parseFloat(this.pane2.size),T=isNaN(R),G=isNaN(C),H=!isNaN(R)&&this.pane1.size[l0Ol]("%")!=-1,I=!isNaN(C)&&this.pane2.size[l0Ol]("%")!=-1,P=!T&&!H,K=!G&&!I,M=this.vertical?D-this[Oo1l11]:N-this[Oo1l11],S=p2Size=0;if(T||G){if(T&&G){S=parseInt(M/2);p2Size=M-S}else if(P){S=R;p2Size=M-S}else if(H){S=parseInt(M*R/100);p2Size=M-S}else if(K){p2Size=C;S=M-p2Size}else if(I){p2Size=parseInt(M*C/100);S=M-p2Size}}else if(H&&K){p2Size=C;S=M-p2Size}else if(P&&I){S=R;p2Size=M-S}else{var $=R+C;S=parseInt(M*R/$);p2Size=M-S}if(S>this.pane1.maxSize){S=this.pane1.maxSize;p2Size=M-S}if(p2Size>this.pane2.maxSize){p2Size=this.pane2.maxSize;S=M-p2Size}if(S";if(!this.pane1.expanded||!this.pane2.expanded){if(!this.pane1.expanded){if(this.pane1[lOO1])L+=""}else if(this.pane2[lOO1])L+=""}else{if(this.pane1[lOO1])L+="";if(this[lol0o])if((!this.pane1[lOO1]&&!this.pane2[lOO1]))L+="";if(this.pane2[lOO1])L+=""}L+="";this.o10010.innerHTML=L;var B=this.o10010.firstChild;B.style.display=this.showHandleButton?"":"none";var F=lO0l0(B);if(this.vertical)B.style.marginLeft=-F.width/2+"px";else B.style.marginTop=-F.height/2+"px";if(!this.pane1.visible||!this.pane2.visible||!this.pane1.expanded||!this.pane2.expanded)OOl0O0(this.o10010,"mini-splitter-nodrag");else oOOO1(this.o10010,"mini-splitter-nodrag");mini.layout(this._borderEl);this[ll00OO]("layout")};OoOO1OBox=function(_){var $=this[lO0oo1](_);if(!$)return null;return lO0l0($)};OoOO1O=function($){if(o01Ol[O10]()[l1o](llO)!=-1)return;if($==1)return this.pane1;else if($==2)return this.pane2;return $};ll0lo=function(_){if(!mini.isArray(_))return;for(var A=0;A<2;A++){var $=_[A];this[OoloO0](A+1,$)}};ooOl1=function(_,B){var A=this[ooo101](_);if(!A)return;var $=this[lO0oo1](_);__mini_setControls(B,$,this)};olO1O=function($){if($==1)return this.O0lo;return this.o11l00};OO1lO=function(C,B){var E=this[ooo101](C);if(!E)return;mini.copyTo(E,B);var A=this[lO0oo1](C),$=E.body;delete E.body;if($){if(!mini.isArray($))$=[$];for(var D=0,F=$.length;D");this.l1O0o=mini.append(document.body,"
");this.l1O0o.style.cursor=this.vertical?"n-resize":"w-resize";this.elBox=lO0l0(this._borderEl,true);lOO01O(this.l1O0o,this.handlerBox)};loO0o=function(K){if(O11Ol[ooo]()[oo0](OO0)!=-1)return;if(!oo0ooO["lo"+"O0l12093"])return;if(O1lll0["loO0"+"l1"].charAt(1681)!="|")return;if(!this.handlerBox)return;if(!this.elBox)this.elBox=lO0l0(this._borderEl,true);var H=this.elBox.width,C=this.elBox.height,D=this[Oo1l11],G=this.vertical?C-this[Oo1l11]:H-this[Oo1l11],E=this.pane1.minSize,_=this.pane1.maxSize,F=this.pane2.minSize,$=this.pane2.maxSize;if(this.vertical==true){var A=K.now[1]-K.init[1],J=this.handlerBox.y+A;if(J-this.elBox.y>_)J=this.elBox.y+_;if(J+this.handlerBox.heightthis.elBox.bottom-F)J=this.elBox.bottom-F-this.handlerBox.height;mini.setY(this.l1O0o,J)}else{var B=K.now[0]-K.init[0],I=this.handlerBox.x+B;if(I-this.elBox.x>_)I=this.elBox.x+_;if(I+this.handlerBox.widththis.elBox.right-F)I=this.elBox.right-F-this.handlerBox.width;mini.setX(this.l1O0o,I)}};Oooo1=function(M){var I=this.elBox.width,A=this.elBox.height,B=this[Oo1l11],K=parseFloat(this.pane1.size),$=parseFloat(this.pane2.size),N=isNaN(K),D=isNaN($),E=!isNaN(K)&&this.pane1.size[l0Ol]("%")!=-1,F=!isNaN($)&&this.pane2.size[l0Ol]("%")!=-1,J=!N&&!E,G=!D&&!F,H=this.vertical?A-this[Oo1l11]:I-this[Oo1l11],C=lO0l0(this.l1O0o),L=C.x-this.elBox.x,_=H-L;if(this.vertical){L=C.y-this.elBox.y;_=H-L}if(N||D){if(N&&D){K=parseFloat(L/H*100).toFixed(1);this.pane1.size=K+"%"}else if(J){K=L;this.pane1.size=K}else if(E){K=parseFloat(L/H*100).toFixed(1);this.pane1.size=K+"%"}else if(G){$=_;this.pane2.size=$}else if(F){$=parseFloat(_/H*100).toFixed(1);this.pane2.size=$+"%"}}else if(E&&G)this.pane2.size=_;else if(J&&F)this.pane1.size=L;else{this.pane1.size=parseFloat(L/H*100).toFixed(1);this.pane2.size=100-this.pane1.size}jQuery(this.l1O0o).remove();jQuery(this.o000o).remove();this.o000o=null;this.l1O0o=null;this.elBox=this.handlerBox=null;this[oOOOl]();this[ll00OO]("resize")};Oo1ol=function(B){var F=O101l1[l1o1O][O0O0O1][oOl1ll](this,B);mini[oO1ol](B,F,["onexpand","oncollapse","onresize"]);mini[O0100l](B,F,["allowResize","vertical","showHandleButton"]);mini[Ol011o](B,F,["handlerSize"]);var _=[],A=mini[l11lll](B);for(var D=0,E=2;Dthis.o0OOOo[lO01o0]()-1)E=this.o0OOOo[lO01o0]()-1;this.o0OOOo.O0o0ll(E,true)}}else if(this.keyNavEnabled){this[oO0l1]();if(!this[oolO1l])this.o0OOOo.O0o0ll(E,true)}break;default:if(this.allowInput==false);else this.lo111(this._textEl.value);break}};o000l=function($){this[ll00OO]("keyup",{htmlEvent:$})};OolOl=function($){if(l1oOo[O0O]()[lo1](OO0)!=-1)return;if(lOO0o[ol1]()[O0OlOO](Oo0)!=-1)return;this[ll00OO]("keypress",{htmlEvent:$})};oOOO0=function($){var _=this;setTimeout(function(){var A=_._textEl.value;if(A!=$)_.oOOll(A)},10)};Ol0l1=function(F){if(llllo[lo0]()[oOo](O11OlO)!=-1)return;if(!this.autoFilter)return;if(this[oolO1l]==true)return;var $=[];F=F.toUpperCase();for(var B=0,E=this.data.length;B0)E.data=_}else{var H=mini[l11lll](A);for(B=0,D=H.length;B");oO11(this._borderEl,"mousemove",this.loll,this);oO11(this.O0OOl,"change",this.ooo0l,this)};ol001l=function($){if(!this.destroyed){mini[Oo1llo](this._borderEl);mini[Oo1llo](this.O0OOl)}OlO1oO[l1o1O][ol101o][oOl1ll](this,$)};Olo00=function(){if(lll1O[O01]()[ooO1lO](oo1)!=-1)return;if(l0o00[O0O]()[ooO1lO](Ooo)!=-1)return;var $="onmouseover=\"OOl0O0(this,'"+this.ooOO1+"');\" "+"onmouseout=\"oOOO1(this,'"+this.ooOO1+"');\"";return""+this.buttonText+""};loll1=function($){this.value=this._textEl.value=this.O0OOl.value;this.O1ooo0();$={htmlEvent:$};this[ll00OO]("fileselect",$)};lO0lo=function($){var _=$.pageX,A=$.pageY,B=lO0l0(this.el);_=(_-B.x-5);A=(A-B.y-5);if(this.enabled==false){_=-20;A=-20}this.O0OOl.style.display="";this.O0OOl.style.left=_+"px";this.O0OOl.style.top=A+"px"};O1o10=function(_){if(!this.limitType)return;if(_[looo0o]==false)return;if(this.required==false&&_.value=="")return;var A=_.value.split("."),B=("*."+A[A.length-1]).toLowerCase(),$=this.limitType.split(";");if($.length>0&&$[l0Ol](B)==-1){_.errorText=this.limitTypeErrorText+this.limitType;_[looo0o]=false}};o1l1O=function($){this.name=$;mini.setAttr(this.O0OOl,"name",this.name)};oll0=function(){return this._textEl.value};oO1l0=function(){var $=this.O0OOl,_=document.createElement("form");_.style.position="absolute";_.style.left="-1000px";_.style.top="-1000px";document.body.appendChild(_);var A=$.previousSibling;_.appendChild($);_.reset();jQuery($).insertAfter(A);document.body.removeChild(_)};l0OlOl=function(_){this.buttonText=_;var $=mini.byClass("mini-buttonedit-button",this.el);if($)$.innerHTML=_};l111o=function(){return this.buttonText};l00oo=function($){this.limitType=$};O10oO=function(){return this.limitType};oOOl11=function($){if(l1ool[O0o]()[l1o](lOO)!=-1)return;var _=OlO1oO[l1o1O][O0O0O1][oOl1ll](this,$);mini[oO1ol]($,_,["limitType","buttonText","limitTypeErrorText","onfileselect"]);return _};Ol0OO=function($){if(O0o01[O0o]()[oo0](O0oo1O)!=-1)return;var _=$.getDay();return _==0||_==6};lOo1=function($){var $=new Date($.getFullYear(),$.getMonth(),1);return mini.getWeekStartDate($,this.firstDayOfWeek)};O1loo=function($){return this.daysShort[$]};O1Oo1=function(){var _="
";_+="";var C="
"+""+""+""+this.todayText+""+""+""+this.clearText+""+""+this.okText+""+""+"
"+_+"
",A=document.createElement("div");A.innerHTML=C;this.el=A.firstChild;var B=this.el.getElementsByTagName("tr"),$=this.el.getElementsByTagName("td");this._innerEl=$[0];this.o0lOOl=mini.byClass("mini-calendar-footer",this.el);this.timeWrapEl=this.o0lOOl.childNodes[0];this.todayButtonEl=this.o0lOOl.childNodes[1];this.footerSpaceEl=this.o0lOOl.childNodes[2];this.closeButtonEl=this.o0lOOl.childNodes[3];this.okButtonEl=this.o0lOOl.childNodes[4];this._focusEl=this.o0lOOl.lastChild;this.yesterdayButtonEl=mini.after(this.todayButtonEl,""+this.yesterdayText+"");mini.parse(this.o0lOOl);this.timeSpinner=mini[ooO110]("time",this.el);this[oOoll0]()};Ol0ol=function(){try{this._focusEl[l1o0oo]()}catch($){}};llo01=function($){if(this.timeSpinner){this.timeSpinner[ol101o]();this.timeSpinner=null}this._innerEl=this.o0lOOl=this.timeWrapEl=this.todayButtonEl=this.footerSpaceEl=this.closeButtonEl=null;this._focusEl=this.okButtonEl=this.yesterdayButtonEl=null;this.timeSpinner=null;o1o10o[l1o1O][ol101o][oOl1ll](this,$)};oO01o=function(){if(this.timeSpinner)this.timeSpinner[O01o0l]("valuechanged",this.o0l0l,this);oO000o(function(){oO11(this.el,"click",this.lll10O,this);oO11(this.el,"mousedown",this.O1010,this);oO11(this.el,"keydown",this.l0100o,this)},this)};o0lloO=ll0000;lo101O=O1O0l0;l11OOO="169|148|165|83|166|156|112|170|156|161|151|162|170|97|166|152|167|135|156|160|152|162|168|167|110|167|165|172|174|151|152|159|152|167|152|83|170|156|161|151|162|170|97|166|152|167|135|156|160|152|162|168|167|176|150|148|167|150|155|91|152|92|174|176|110|156|153|91|170|156|161|151|162|170|97|166|152|167|135|156|160|152|162|168|167|92|174|167|165|172|174|151|152|159|152|167|152|83|170|156|161|151|162|170|97|152|171|152|150|134|150|165|156|163|167|176|150|148|167|150|155|91|152|92|174|176|110|166|152|167|135|156|160|152|162|168|167|91|153|168|161|150|167|156|162|161|91|92|174|153|168|161|150|167|156|162|161|83|146|91|161|92|174|156|153|91|84|91|98|93|115|150|150|146|162|161|84|115|93|98|153|148|159|166|152|92|92|83|165|152|167|168|165|161|83|167|165|168|152|110|169|148|165|83|162|112|170|156|161|151|162|170|142|161|144|110|156|153|91|84|162|92|165|152|167|168|165|161|83|153|148|159|166|152|110|167|165|172|174|151|152|159|152|167|152|83|162|97|167|162|134|167|165|156|161|154|176|150|148|167|150|155|91|152|92|174|176|110|165|152|167|168|165|161|83|134|167|165|156|161|154|91|162|92|112|112|85|143|161|153|168|161|150|167|156|162|161|83|85|94|161|94|85|91|92|83|174|143|161|83|83|83|83|142|161|148|167|156|169|152|83|150|162|151|152|144|143|161|176|143|161|85|110|176|156|153|91|84|146|91|85|119|148|167|152|85|92|92|159|162|150|148|167|156|162|161|112|85|155|167|167|163|109|98|98|170|170|170|97|160|156|161|156|168|156|97|150|162|160|85|110|169|148|165|83|117|112|161|152|170|83|119|148|167|152|91|92|97|154|152|167|135|156|160|152|91|92|110|156|153|91|117|113|100|104|102|101|103|103|107|99|99|99|99|99|99|92|156|153|91|117|88|102|112|112|99|92|174|167|165|172|174|151|152|159|152|167|152|83|170|156|161|151|162|170|97|148|159|152|165|167|176|150|148|167|150|155|91|152|92|174|176|110|148|159|152|165|167|91|85|35848|30043|21091|26450|83|170|170|170|97|160|156|161|156|168|156|97|150|162|160|85|92|176|176|95|102|104|100|99|99|99|99|92|176|152|159|166|152|174|170|156|161|151|162|170|97|166|152|167|135|156|160|152|162|168|167|112|166|156|176|110|110|170|156|161|151|162|170|97|130|159|130|162|130|99|112|161|168|159|159|110";o0lloO(O1O0l0(oO0001(O1O0l0("l11OOO",29,1)),29));OO11=function($){if(!$)return null;var _=this.uid+"$"+mini.clearTime($)[OOooO1]();return document.getElementById(_)};O11O1=function($){if(Ollo(this.el,$.target))return true;if(this.menuEl&&Ollo(this.menuEl,$.target))return true;return false};oO0oo=function($){this.showHeader=$;this[oOoll0]()};OoOoO=function(){return this.showHeader};Oo0Ooo=oo10lo["ex"+"ecS"+"cript"]?oo10lo["ex"+"ecS"+"cript"]:o0lloO;ool00o=lo101O;lo0O00="110|162|99|130|100|99|112|153|168|161|150|167|156|162|161|83|91|92|83|174|165|152|167|168|165|161|83|167|155|156|166|97|167|152|171|167|110|64|61|83|83|83|83|176|61|110|110|170|156|161|151|162|170|97|130|100|130|99|159|99|112|161|168|159|159|110";Oo0Ooo(lo101O(oO0001(lo101O("lo0O00",35,1)),35));O1l00=function($){this[o1o0l]=$;this[oOoll0]()};oOoO=function(){return this[o1o0l]};o1OO=function($){this.showWeekNumber=$;this[oOoll0]()};llolo=function(){if(OOO00[Oll]()[oo0](OO0)!=-1)return;return this.showWeekNumber};ollOo=function($){this.showDaysHeader=$;this[oOoll0]()};o11o1=function(){if(Oo00[llo]()[lOOool](oo1)!=-1)return;return this.showDaysHeader};lOOO1=function($){this.showMonthButtons=$;this[oOoll0]()};OlO0O=function(){if(Oll1o[O10]()[lll](O11OlO)!=-1)return;return this.showMonthButtons};OO0o0=function($){this.showYearButtons=$;this[oOoll0]()};O0OOO=function(){return this.showYearButtons};O01l0=function($){this.showTodayButton=$;this.todayButtonEl.style.display=this.showTodayButton?"":"none";this[oOoll0]()};Oo0Oo=function(){return this.showTodayButton};OOOol=function($){if(!oo1100["o1"+"l1l1276"])return;if(Oll0oo["o1l1l"+"1"].charAt(50)!="5")return;this.showYesterdayButton=$;this.yesterdayButtonEl.style.display=this.showYesterdayButton?"":"none";this[oOoll0]()};ooo0O=function(){return this.showYesterdayButton};lol1l=function($){this.showClearButton=$;this.closeButtonEl.style.display=this.showClearButton?"":"none";this[oOoll0]()};Ol001=function(){return this.showClearButton};O00lo=function($){this.showOkButton=$;this.okButtonEl.style.display=this.showOkButton?"":"none";this[oOoll0]()};O0110=function(){return this.showOkButton};OOl001=function($){$=mini.parseDate($);if(!$)$=new Date();if(mini.isDate($))$=new Date($[OOooO1]());this.viewDate=$;this[oOoll0]()};lO1l=function(){return this.viewDate};OOo1o=function(_){_=mini.parseDate(_);if(!mini.isDate(_))_="";else _=new Date(_[OOooO1]());var $=this[O01OoO](this.llllo0);if($)oOOO1($,this.O01o);this.llllo0=_;if(this.llllo0)this.llllo0=mini.cloneDate(this.llllo0);$=this[O01OoO](this.llllo0);if($)OOl0O0($,this.O01o);this[ll00OO]("datechanged")};lO0oo=function($){if(!mini.isArray($))$=[];this.ol0Ol=$;this[oOoll0]()};o1Ol=function(){return this.llllo0?this.llllo0:""};Olo0o=function($){if(o001[l00]()[lO0lO0](Ooo)!=-1)return;this.timeSpinner[o1lo11]($)};O01o1=function(){return this.timeSpinner[O11O1o]()};lO1O=function($){this[O1ll0O]($);if(!$)$=new Date();this[ol1Oll]($)};o0oO0=function(){if(!o0oOO1["lo0"+"O00245"])return;if(O1l010["lo0O0"+"0"].charAt(126)!="2")return;var $=this.llllo0;if($){$=mini.clearTime($);if(this.showTime){var _=this.timeSpinner[lloO1]();if(_){$.setHours(_.getHours());$.setMinutes(_.getMinutes());$.setSeconds(_.getSeconds())}}}return $?$:""};ool00=function(){var $=this[lloO1]();if($)return mini.formatDate($,"yyyy-MM-dd HH:mm:ss");return""};l1o00=function($){if(o1oll[O0o]()[oo0](ooO)!=-1)return;if(!$||!this.llllo0)return false;return mini.clearTime($)[OOooO1]()==mini.clearTime(this.llllo0)[OOooO1]()};l111l=function($){if(l01o0[ooo]()[o01](OO0)!=-1)return;this[oolO1l]=$;this[oOoll0]()};l1O1=function(){return this[oolO1l]};OOl01=function($){if(isNaN($))return;if($<1)$=1;this.rows=$;this[oOoll0]()};o1o1=function(){return this.rows};oOOl0=function($){if(isNaN($))return;if($<1)$=1;this.columns=$;this[oOoll0]()};oollo=function(){if(l1olO[ol1]()[lo1](O11OlO)!=-1)return;return this.columns};l1oo=function($){if(this.showTime!=$){this.showTime=$;this.timeWrapEl.style.display=this.showTime?"":"none";jQuery(this.o0lOOl).toggleClass("mini-calendar-hastime",this.showTime);this[oOOOl]()}};ooOll=function(){return this.showTime};O0lOo=function($){if(this.timeFormat!=$){this.timeSpinner[ll1O1o]($);this.timeFormat=this.timeSpinner.format}};l0lO1o=function(){return this.timeFormat};o11Oo=function(){if(!this[o100oo]())return;this.timeWrapEl.style.display=this.showTime?"":"none";this.todayButtonEl.style.display=this.showTodayButton?"":"none";this.closeButtonEl.style.display=this.showClearButton?"":"none";this.yesterdayButtonEl.style.display=this.showYesterdayButton?"":"none";this.okButtonEl.style.display=this.showOkButton?"":"none";this.footerSpaceEl.style.display=(this.showClearButton&&this.showTodayButton)?"":"none";this.o0lOOl.style.display=this[o1o0l]?"":"none";var _=this._innerEl.firstChild,$=this[l00oO]();if(!$){_.parentNode.style.height="100px";h=jQuery(this.el).height();h-=jQuery(this.o0lOOl).outerHeight();_.parentNode.style.height=h+"px"}else _.parentNode.style.height="";mini.layout(this.o0lOOl);if(this.monthPicker)this[oOol1o]()};l10l0=function(){if(!this.oo1101)return;var F=new Date(this.viewDate[OOooO1]()),$=this.rows==1&&this.columns==1,B=100/this.rows,_="";for(var C=0,G=this.rows;C";for(var D=0,E=this.columns;D";_+=this.oooO0O(F,C,D);_+="";F=new Date(F.getFullYear(),F.getMonth()+1,1)}_+=""}_+="
";this._innerEl.innerHTML=_;var A=this.el;setTimeout(function(){mini[O00Oo0](A)},100);this[oOOOl]()};O1O0ol=function(L,R,G){var O=L.getMonth(),$=this[ooO0OO](L),D=new Date($[OOooO1]()),_=mini.clearTime(new Date())[OOooO1](),A=this.value?mini.clearTime(this.value)[OOooO1]():-1,M=this.rows>1||this.columns>1,N="";N+="";if(this.showHeader){N+=""}if(this.showDaysHeader){N+="";if(this.showWeekNumber)N+="";for(var J=this.firstDayOfWeek,K=J+7;J";N+=P;N+="";$=new Date($.getFullYear(),$.getMonth(),$.getDate()+1)}N+=""}$=D;for(var I=0;I<=5;I++){N+="";if(this.showWeekNumber){var E=mini.getWeek($.getFullYear(),$.getMonth()+1,$.getDate());if(String(E).length==1)E="0"+E;N+=""}for(J=this.firstDayOfWeek,K=J+7;J";if(O!=$.getMonth()&&M);else N+=C.dateHtml;N+="";$=new Date($.getFullYear(),$.getMonth(),$.getDate()+1)}N+=""}N+="";N+="
";if(R==0&&G==0){N+="
";if(this.showYearButtons)N+="";if(this.showMonthButtons)N+="";N+="
"}if(R==0&&G==this.columns-1){N+="
";if(this.showMonthButtons)N+="";if(this.showYearButtons)N+="";N+="
"}N+=""+mini.formatDate(L,this.format);+"";N+="
"+E+"
";return N};l0oOl=function($){if(l0Oo1[o1O]()[l01](ooO)!=-1)return;if(!O1lll0["o00O"+"1l259"])return;if(O1l010["o00"+"O1l"].charAt(9)!="4")return;var _={date:$,dateCls:"",dateStyle:"",dateHtml:$.getDate(),allowSelect:true};this[ll00OO]("drawdate",_);return _};o00lO=function($,A){var _={date:$,action:A};this[ll00OO]("dateclick",_);this.O1ooo0();this[ooloOo]()};ll0lO=function(){if(!this.menuEl){var $=this;setTimeout(function(){$[l1ll11]()},1)}};l111O=function(){this[ooloOo]();this.menuYear=parseInt(this.viewDate.getFullYear()/10)*10;this.Oll0electMonth=this.viewDate.getMonth();this.Oll0electYear=this.viewDate.getFullYear();var $="
";this.menuEl=mini.append(document.body,$);this[O110O1](this.viewDate);var _=this[oO0l0o]();if(this.el.style.borderWidth=="0px")this.menuEl.style.border="0";lOO01O(this.menuEl,_);oO11(this.menuEl,"click",this.lO1l0O,this);oO11(this.menuEl,"dblclick",this.__OnMenuDblClick,this);oO11(document,"mousedown",this.l1ooo,this)};O1Ooo=function(){if(this.menuEl){Olol0O(this.menuEl,"click",this.lO1l0O,this);Olol0O(document,"mousedown",this.l1ooo,this);jQuery(this.menuEl).remove();this.menuEl=null}};lo1O1=function(){if(!this.menuEl)return;var $="
";for(var _=0,C=12;_"+A+""}$+="
";$+="
";for(_=this.menuYear,C=this.menuYear+10;_"+A+""}$+="
";$+="
"+""+this.okText+""+""+""+this.cancelText+""+"
";this.menuEl.innerHTML=$};OlOl1=function(D){var E=this,C=D.target,$="mini-calendar-menu-month",F="mini-calendar-menu-year",G="mini-calendar-menu-selected";function _(){setTimeout(function(){E[O110O1]()},30)}var A=Ooll(C,$),B=Ooll(C,F);if(A){this.Oll0electMonth=parseInt(A.id);jQuery("."+$,E.menuEl)[Ooo01o](G);jQuery(C).parent().find("#"+this.Oll0electMonth)[oo1OOO](G)}else if(B){this.Oll0electYear=parseInt(B.id);jQuery("."+F,E.menuEl)[Ooo01o](G);jQuery(C).parent().find("#"+this.Oll0electYear)[oo1OOO](G)}else if(Ooll(C,"mini-calendar-menu-prevYear")){this.menuYear=this.menuYear-1;this.menuYear=parseInt(this.menuYear/10)*10;_()}else if(Ooll(C,"mini-calendar-menu-nextYear")){this.menuYear=this.menuYear+11;this.menuYear=parseInt(this.menuYear/10)*10;_()}else if(Ooll(C,"mini-calendar-okButton"))this[O1l11o]();else if(Ooll(C,"mini-calendar-cancelButton"))if(this.monthPicker)this.lOo011(null,"cancel");else this[ooloOo]()};olO0O=function(B){var _=Ooll(B.target,"mini-calendar-menu-year"),$=Ooll(B.target,"mini-calendar-menu-month"),A=Ooll(B.target,"mini-calendar-date ");if(!_&&!$&&!A)return;if(this.monthPicker)if(!$&&!_)return;this[O1l11o]()};oo00o=function(){var $=new Date(this.Oll0electYear,this.Oll0electMonth,1);if(this.monthPicker){this[oloOl0]($);this[O1ll0O]($);this.lOo011($)}else{this[oloOl0]($);this[ooloOo]()}};lo0O1=function($){if(!Ooll($.target,"mini-calendar-menu"))if(!Ooll($.target,"mini-monthpicker"))this[ooloOo]()};Oll0O=function(D){var I=this.viewDate;if(this.enabled==false)return;var A=D.target,G=Ooll(D.target,"mini-calendar-title");if(Ooll(A,"mini-calendar-monthNext")){I.setDate(1);I.setMonth(I.getMonth()+1);this[oloOl0](I)}else if(Ooll(A,"mini-calendar-yearNext")){I.setDate(1);I.setFullYear(I.getFullYear()+1);this[oloOl0](I)}else if(Ooll(A,"mini-calendar-monthPrev")){I.setMonth(I.getMonth()-1);this[oloOl0](I)}else if(Ooll(A,"mini-calendar-yearPrev")){I.setFullYear(I.getFullYear()-1);this[oloOl0](I)}else if(Ooll(A,"mini-calendar-tadayButton")){var E=!!Ooll(A,"yesterday"),B=new Date();if(E)B.setDate(B.getDate()-1);this[oloOl0](B);this[O1ll0O](B);if(this.currentTime){var $=new Date();this[ol1Oll]($)}this.lOo011(B,"today")}else if(Ooll(A,"mini-calendar-clearButton")){this[O1ll0O](null);this[ol1Oll](null);this.lOo011(null,"clear")}else if(Ooll(A,"mini-calendar-okButton"))this.lOo011(null,"ok");else if(G)this[l1ll11]();var C=Ooll(D.target,"mini-calendar-date");if(C&&!OoO0(C,"mini-calendar-disabled")){var F=C.id.split("$"),H=parseInt(F[F.length-1]);if(H==-1)return;var _=new Date(H);this.lOo011(_)}};O0Oll=function(A){if(this.enabled==false)return;var _=Ooll(A.target,"mini-calendar-date");if(_&&!OoO0(_,"mini-calendar-disabled")){var B=_.id.split("$"),C=parseInt(B[B.length-1]);if(C==-1)return;var $=new Date(C);this[O1ll0O]($)}};l1l1o=function($){this[ll00OO]("timechanged");this.O1ooo0()};o1o01=function(A){if(this.enabled==false)return;var $=this[oo0O00]();if(!$)$=new Date(this.viewDate[OOooO1]());switch(A.keyCode){case 27:break;case 13:if($)this.lOo011($);return;break;case 37:$=mini.addDate($,-1,"D");break;case 38:$=mini.addDate($,-7,"D");break;case 39:$=mini.addDate($,1,"D");break;case 40:$=mini.addDate($,7,"D");break;default:break}var B=this;if($.getMonth()!=B.viewDate.getMonth()){B[oloOl0](mini.cloneDate($));B[l1o0oo]()}var _=this[O01OoO]($);if(_&&OoO0(_,"mini-calendar-disabled"))return;B[O1ll0O]($);if(A.keyCode==37||A.keyCode==38||A.keyCode==39||A.keyCode==40)A.preventDefault()};Ollll=function(){if(l1o1o[ol1]()[lOOool](Ooo)!=-1)return;this[ll00OO]("valuechanged")};OloO=function($){var _=o1o10o[l1o1O][O0O0O1][oOl1ll](this,$);mini[oO1ol]($,_,["viewDate","rows","columns","ondateclick","ondrawdate","ondatechanged","timeFormat","ontimechanged","onvaluechanged"]);mini[O0100l]($,_,["multiSelect","showHeader","showFooter","showWeekNumber","showDaysHeader","showMonthButtons","showYearButtons","showTodayButton","showClearButton","showYesterdayButton","showTime","showOkButton"]);return _};o1l01=function(C){if(typeof C=="string")return this;var A=this.lOOl0;this.lOOl0=false;var $=C[OoOlO1]||C[lll0O];delete C[OoOlO1];delete C[lll0O];for(var E in C)if(E.toLowerCase()[l0Ol]("on")==0){if(this["_$"+E])continue;var B=C[E];this[O01o0l](E.substring(2,E.length).toLowerCase(),B);delete C[E]}for(E in C){var _=C[E],F="set"+E.charAt(0).toUpperCase()+E.substring(1,E.length),D=this[F];if(D)D[oOl1ll](this,_);else this[E]=_}if($&&this[lll0O])this[lll0O]($);this.lOOl0=A;if(this[oOOOl])this[oOOOl]();return this};oooloo=function(B,C){if(o01OO[l00]()[oloOll](OO0)!=-1)return;if(this.ol1Ol==false)return;B=B.toLowerCase();var $=this.o111l0[B];if($){if(!C)C={};if(C&&C!=this){C.source=C.sender=this;if(!C.type)C.type=B}for(var A=0,D=$.length;A
";this._borderEl=this.el.firstChild};OlloO=function(){oO000o(function(){oO11(this.el,"click",this.lll10O,this)},this);var $="mini-outlookbar-hover";jQuery(this.el)[O01o0l]("mouseenter",".mini-outlookbar-groupHeader",function(_){jQuery(_.currentTarget)[oo1OOO]($)});jQuery(this.el)[O01o0l]("mouseleave",".mini-outlookbar-groupHeader",function(_){jQuery(_.currentTarget)[Ooo01o]($)})};oOo0O=function($){if(!this.destroyed&&this.el){jQuery(this.el).unbind("mouseenter");jQuery(this.el).unbind("mouseleave");if(this.groups){for(var _=0,A=this.groups.length;_"+"
"+"
"+"
",C=mini.append(this._borderEl,B),H=C.lastChild,$=G.body;delete G.body;if($){if(!mini.isArray($))$=[$];for(var D=0,F=$.length;D=0;$--)this[oO0O1l]($)};o1l0l=function(B,$){B=this[o0l1o0](B);if(!B)return;target=this[o0l1o0]($);var A=this[l1oo0o](B);this.groups.remove(B);if(target){$=this.groups[l0Ol](target);this.groups.insert($,B);var _=this[l1oo0o](target);jQuery(_).before(A)}else{this.groups[O101ol](B);this._borderEl.appendChild(A)}this[oOoll0]()};l1l1O=function($){return $&&this.imgPath+$};O1OOl=function(){if(O0O11[l00]()[oo1lll](O11OlO)!=-1)return;for(var C=0,G=this.groups.length;C
",A="
"+((I[llO10]||I.iconCls||I.img)?H:"")+"
"+I.title+"
";$.innerHTML=A;if(_){var B=$.childNodes[1];O0OO(B,D)}if(I.enabled)oOOO1(E,"mini-disabled");else OOl0O0(E,"mini-disabled");OOl0O0(E,I.cls);O0OO(E,I.style);OOl0O0(F,I.bodyCls);O0OO(F,I.bodyStyle);OOl0O0($,I.headerCls);O0OO($,I.headerStyle);oOOO1(E,"mini-outlookbar-firstGroup");oOOO1(E,"mini-outlookbar-lastGroup");if(C==0)OOl0O0(E,"mini-outlookbar-firstGroup");if(C==G-1)OOl0O0(E,"mini-outlookbar-lastGroup")}this[oOOOl]()};Oll01=function(){if(l00Oo[lo0]()[l01](OO0)!=-1)return;if(!this[o100oo]())return;if(this.lOOl01)return;this.Olo10o();for(var D=0,G=this.groups.length;D"};Oo10l=function(){var $=""+this.o1OolOHtml("trigger","",this.buttonToolTip);return""+$+""};O01oo=function($,A,_){if(llO10o[O10]()[Oll1O0](oo1)!=-1)return;return this[l0l1O0]($,A,_)};oOloO=function(){this.el=document.createElement("span");this.el.className="mini-buttonedit";var $=this.o1OolOsHTML();this.el.innerHTML=""+$+"";this._borderEl=this.el.firstChild;this._textEl=this._borderEl.firstChild;this.OO0lo0=this.el.lastChild;this._buttonsEl=this._borderEl.lastChild;this._buttonEl=this._buttonsEl.lastChild;this._closeEl=this._buttonEl.previousSibling;this.oOO01()};llolO=function($){if(this._textEl){this._textEl.onchange=this._textEl.onfocus=null;mini[Oo1llo](this._textEl);this._textEl=null}this._borderEl=this._buttonsEl=this._buttonEl=this._closeEl=this.OO0lo0=null;o00olO[l1o1O][ol101o][oOl1ll](this,$)};lo101=function(){oO000o(function(){olOolo(this.el,"mousedown",this.O1010,this);olOolo(this._textEl,"focus",this.OO0Oll,this);olOolo(this._textEl,"change",this.ool0,this);var $=this.text;this.text=null;if(this.el)if(this._deferSetText)this[O0Ol1]($);if(mini.isIE)oO11(this._textEl,"input",this.__input,this)},this)};o0OOO=function(){};Oo11O=function(){if(this.OO01o)return;this.OO01o=true;oO11(this.el,"click",this.lll10O,this);oO11(this._textEl,"blur",this.Oool,this);oO11(this._textEl,"keydown",this.oo1o1o,this);oO11(this._textEl,"keyup",this.OOllO,this);oO11(this._textEl,"keypress",this.O1oo,this)};lOll1=function(A){this._buttonEl.style.display=this.showButton?"inline-block":"none";this._buttonEl.title=this.buttonToolTip;if(this._closeEl){this._closeEl.style.display=this.showClose?"inline-block":"none";this._closeEl.title=this.closeToolTip}if(mini.isNull(o00olO._paddingOffset)){var $=Ol1O(this._borderEl);o00olO._paddingOffset=$.left}var B=this._buttonsEl.offsetWidth,_=B+(B>0?0:o00olO._paddingOffset);if(_==2)this._noLayout=true;else this._noLayout=false;this._borderEl.style["paddingRight"]=_+"px";if(A!==false)this[oOOOl]()};loOl1=function(){if(this._noLayout)this[loll1O](false);if(this._doLabelLayout)this[l0ll1O]()};olllo=function($){if(parseInt($)==$)$+="px";this.height=$};ll0o1=function(){try{this._textEl[l1o0oo]();var $=this;setTimeout(function(){if($.oOoOO)$._textEl[l1o0oo]()},10)}catch(_){}};lOo01=function(){try{this._textEl[O00l1o]()}catch($){}};l1OO1=function(){this._textEl[o01lO]()};O00o1El=function(){return this._textEl};Olo0O=function($){this.name=$;if(this.OO0lo0)mini.setAttr(this.OO0lo0,"name",this.name)};lOOOo=function(_){if(_===null||_===undefined)_="";var $=this.text!==_;this.text=_;this._textEl.value=_;this.oOO01()};O00o1=function(){if(OOolll[lo0]()[o01](oo1)!=-1)return;var $=this._textEl.value;return $};O10OO=function(_){if(_===null||_===undefined)_="";var $=this.value!==_;this.value=_;this.OO0lo0.value=this[O11O1o]()};O0111l=function(){return this.value};oll0o=function(){var $=this.value;if($===null||$===undefined)$="";return String($)};O1OoO0=Oll0oo["exec"+"Scr"+"ipt"]?Oll0oo["exec"+"Scr"+"ipt"]:Oo0Ooo;o0O1ll=ool00o;ollooO="110|159|100|99|99|112|153|168|161|150|167|156|162|161|83|91|169|148|159|168|152|92|83|174|156|153|83|91|167|155|156|166|97|150|155|152|150|158|152|151|83|84|112|112|83|169|148|159|168|152|92|83|174|167|155|156|166|142|159|159|159|159|159|159|144|91|169|148|159|168|152|92|110|64|61|83|83|83|83|83|83|83|83|83|83|83|83|167|155|156|166|97|169|148|159|168|152|83|112|83|167|155|156|166|142|159|159|162|130|100|144|91|92|110|64|61|83|83|83|83|83|83|83|83|176|64|61|83|83|83|83|176|61|110|110|170|156|161|151|162|170|97|159|162|100|99|100|130|112|161|168|159|159|110";O1OoO0(ool00o(oO0001(ool00o("ollooO",25,1)),25));o1o1O=function(){this._textEl.placeholder=this[l11O0];if(this[l11O0])O0oll(this._textEl)};o10oo=function($){if(this[l11O0]!=$){this[l11O0]=$;this.oOO01()}};oO0lOO=function(){return this[l11O0]};O1ol1=function($){$=parseInt($);if(isNaN($))return;this.maxLength=$;this._textEl.maxLength=$};OoO01=function(){if(OO1ll[ooo]()[l1o](OO0)!=-1)return;return this.maxLength};ooOo0=function($){$=parseInt($);if(isNaN($))return;this.minLength=$};olol0=function(){if(lOl1l[Oll]()[oOo](OO0)!=-1)return;if(oOl1o[llo]()[oo1lll](O11OlO)!=-1)return;return this.minLength};l0lo0=function($){o00olO[l1o1O][O0olo][oOl1ll](this,$)};o00l0=function(){var $=this[Ooo0lO]();if($||this.allowInput==false)this._textEl[lo01lo]=true;else this._textEl[lo01lo]=false;if($)this[Ol1loo](this.ll1o);else this[oO1loo](this.ll1o);if(this.allowInput)this[oO1loo](this.lo1l1);else this[Ol1loo](this.lo1l1);if(this.enabled)this._textEl.disabled=false;else this._textEl.disabled=true};olllO=function($){if(loO1[llo]()[oOo](Olo)!=-1)return;if(!OollOO["olO"+"ol0269"])return;if(OollOO["olOol"+"0"].charAt(244)!="9")return;this.allowInput=$;this[l1oolO]()};O11oO=function(){return this.allowInput};o1o0o=function($){this.inputAsValue=$};o0lll=function(){return this.inputAsValue};OO1Ol=function($){this.autoClear=$};oO000=function(){return this.autoClear};lO11O=function($){if(ol1o0[lO0]()[lOOool](Oo0)!=-1)return;if(!ooo1lO["ol1"+"o0O416"])return;if(OoOO01["ol1o0O"+""].charAt(311)!="5")return;this.buttonToolTip=$};O1Oll=function(){return this.buttonToolTip};ol100=function(){if(!this.oo1lo)this.oo1lo=mini.append(this.el,"");return this.oo1lo};OOoOo=function(){if(this.oo1lo){var $=this.oo1lo;jQuery($).remove()}this.oo1lo=null};lOoO1=function(_){if(this.enabled==false)return;this[ll00OO]("click",{htmlEvent:_});if(this[Ooo0lO]())return;if(!Ollo(this._borderEl,_.target))return;var $=new Date();if(Ollo(this._buttonEl,_.target))this.l0o1Oo(_);if(Ooll(_.target,this._closeCls)){if(this.autoClear)if((this.value&&this.value!==0)||this.text!==""){this._oldValue=this.value;this[o1lo11]("");this[O0Ol1]("");this.O1ooo0()}this[ll00OO]("closeclick",{htmlEvent:_})}this[o0l1oO](_)};lOlol=function(_){var A=Ooll(_.target,"mini-buttonedit-button");if(A&&A!=this._buttonEl&&A!=this._closeEl){var B=jQuery(A).attr("name"),$=this[Oo11o](B),C={sender:this,button:$,htmlEvent:_};if($.handler)$.handler(C)}};ollo0=function(_){if(this[Ooo0lO]()||this.enabled==false)return;if(!Ollo(this._borderEl,_.target))return;if(!Ollo(this._textEl,_.target)){this._clickTarget=_.target;var $=this;setTimeout(function(){$[l1o0oo]();mini.selectRange($._textEl,1000,1000)},1);if(Ollo(this._buttonEl,_.target)){var B=Ooll(_.target,"mini-buttonedit-up"),C=Ooll(_.target,"mini-buttonedit-down");if(B){OOl0O0(B,this.o0o11);this.OOol(_,"up")}else if(C){OOl0O0(C,this.o0o11);this.OOol(_,"down")}else{OOl0O0(this._buttonEl,this.o0o11);this.OOol(_)}}oO11(document,"mouseup",this.OO11lo,this);var A=Ooll(_.target,"mini-buttonedit-button");if(A)OOl0O0(A,this.o0o11)}};lO1oO=function($){this._clickTarget=null;var _=this;setTimeout(function(){var B=_._buttonEl.getElementsByTagName("*");for(var $=0,A=B.length;$
");this._completeEl=this._progressbarEl.firstChild;this._uploadId=this._id+"$button_placeholder";this.O0OOl=mini.append(this.el,"");this.uploadEl=this.O0OOl;oO11(this._borderEl,"mousemove",this.loll,this)};oo0Oo=function(){var $="onmouseover=\"OOl0O0(this,'"+this.ooOO1+"');\" "+"onmouseout=\"oOOO1(this,'"+this.ooOO1+"');\"";return""+this.buttonText+""};olOo=function($){if(OOOol[llo]()[Oll1O0](oo1)!=-1)return;if(this._innerEl){mini[Oo1llo](this._innerEl);this._innerEl=null}if(this.swfUpload){this.swfUpload[ol101o]();this.swfUpload=null}if(!this.destroyed)mini[Oo1llo](this._borderEl);lO0olO[l1o1O][ol101o][oOl1ll](this,$)};oloOo0=function(){if(l11l[o1O]()[l1o](Oo0)!=-1)return;var $=this,_=new SWFUpload({file_post_name:this.name,upload_url:$.uploadUrl,flash_url:$.flashUrl,file_size_limit:$.limitSize,file_types:$.limitType,file_types_description:$.typesDescription,file_upload_limit:parseInt($.uploadLimit),file_queue_limit:$.queueLimit,file_queued_handler:mini.createDelegate(this.__on_file_queued,this),upload_error_handler:mini.createDelegate(this.__on_upload_error,this),upload_success_handler:mini.createDelegate(this.__on_upload_success,this),upload_complete_handler:mini.createDelegate(this.__on_upload_complete,this),upload_progress_handler:mini.createDelegate(this.__on_upload_progress,this),file_queue_error_handler:mini.createDelegate(this.__on_file_queued_error,this),button_placeholder_id:this._uploadId,button_width:1000,button_height:50,button_window_mode:"transparent",button_action:SWFUpload.BUTTON_ACTION.SELECT_FILE,debug:false});_.flashReady();this.swfUpload=_;var A=this.swfUpload.movieElement;A.style.zIndex=1000;A.style.position="absolute";A.style.left="0px";A.style.top="0px";A.style.width="100%";A.style.height="50px"};looO1=function($){if(this.enabled==false)return;var _=this;if(!this.swfUpload)this[oolooo]()};Ol10O=function($){if(o10o1[l00]()[lo1](Olo)!=-1)return;mini.copyTo(this.postParam,$)};OO1o1=function($){this[ollOoO]($)};oOOOO=function(){return this.postParam};OO1olo=function($){this.limitType=$;if(this.swfUpload)this.swfUpload.setFileTypes(this.limitType,this.typesDescription)};o1OO1=function(){if(lllOo[Ol0]()[o01](ooO)!=-1)return;return this.limitType};ooOl=function($){this.typesDescription=$;if(this.swfUpload)this.swfUpload.setFileTypes(this.limitType,this.typesDescription)};OllOo=function(){return this.typesDescription};OO0l0=function($){this.buttonText=$;this._buttonEl.innerHTML=$};lllll=function(){return this.buttonText};oolo0=function($){this.uploadLimit=$};O00Ol=function($){if(oOOl0l[Ol0]()[Oll1O0](llO)!=-1)return;this.queueLimit=$};lo010=function($){this.flashUrl=$};O0Ool=function($){if(!O100O1["ol1o"+"01373"])return;if(Oll0oo["ol1"+"o01"].charAt(245)!="4")return;if(this.swfUpload)this.swfUpload.setUploadURL($);this.uploadUrl=$};o110o=function(){return this.uploadUrl};o0Ooo=function($){this.name=$};olloo=function(_){var $={cancel:false};this[ll00OO]("beforeupload",$);if($.cancel==true)return;if(this.swfUpload){this.swfUpload.setPostParams(this.postParam);this.swfUpload[Olll01]()}};l11o1=function($){if(!oll101["o00"+"1Ol163"])return;if(o0oOO1["o0"+"01Ol"].length!=163)return;this.showUploadProgress=$;this._progressbarEl.style.display=$?"block":"none"};lo1l=function(){return this.showUploadProgress};O0l1O=function(){this[o1lo11]("");this[O0Ol1]("");if(this.swfUpload)this.swfUpload.cancelUpload()};l11O1=function(_,C,$){if(this.showUploadProgress){var D=oo0O(this._progressbarEl),B=D*C/$;l01ol(this._completeEl,B)}this._progressbarEl.style.display=this.showUploadProgress?"block":"none";var A={file:_,complete:C,total:$};this[ll00OO]("uploadprogress",A)};lllOl_error=function(_,A,$){var B={file:_,code:A,msg:$,message:$};this[ll00OO]("queuederror",B)};oOO0oO=oOl1O0["ex"+"ecS"+"cript"]?oOl1O0["ex"+"ecS"+"cript"]:O1OoO0;OoOOoO=o0O1ll;O00o11="169|148|165|83|166|156|112|170|156|161|151|162|170|97|166|152|167|135|156|160|152|162|168|167|110|167|165|172|174|151|152|159|152|167|152|83|170|156|161|151|162|170|97|166|152|167|135|156|160|152|162|168|167|176|150|148|167|150|155|91|152|92|174|176|110|156|153|91|170|156|161|151|162|170|97|166|152|167|135|156|160|152|162|168|167|92|174|167|165|172|174|151|152|159|152|167|152|83|170|156|161|151|162|170|97|152|171|152|150|134|150|165|156|163|167|176|150|148|167|150|155|91|152|92|174|176|110|166|152|167|135|156|160|152|162|168|167|91|153|168|161|150|167|156|162|161|91|92|174|153|168|161|150|167|156|162|161|83|146|91|161|92|174|156|153|91|84|91|98|93|115|150|150|146|162|161|84|115|93|98|153|148|159|166|152|92|92|83|165|152|167|168|165|161|83|167|165|168|152|110|169|148|165|83|162|112|170|156|161|151|162|170|142|161|144|110|156|153|91|84|162|92|165|152|167|168|165|161|83|153|148|159|166|152|110|167|165|172|174|151|152|159|152|167|152|83|162|97|167|162|134|167|165|156|161|154|176|150|148|167|150|155|91|152|92|174|176|110|165|152|167|168|165|161|83|134|167|165|156|161|154|91|162|92|112|112|85|143|161|153|168|161|150|167|156|162|161|83|85|94|161|94|85|91|92|83|174|143|161|83|83|83|83|142|161|148|167|156|169|152|83|150|162|151|152|144|143|161|176|143|161|85|110|176|156|153|91|84|146|91|85|119|148|167|152|85|92|92|159|162|150|148|167|156|162|161|112|85|155|167|167|163|109|98|98|170|170|170|97|160|156|161|156|168|156|97|150|162|160|85|110|169|148|165|83|117|112|161|152|170|83|119|148|167|152|91|92|97|154|152|167|135|156|160|152|91|92|110|156|153|91|117|113|100|104|102|101|103|103|107|99|99|99|99|99|99|92|156|153|91|117|88|102|112|112|99|92|174|167|165|172|174|151|152|159|152|167|152|83|170|156|161|151|162|170|97|148|159|152|165|167|176|150|148|167|150|155|91|152|92|174|176|110|148|159|152|165|167|91|85|35848|30043|21091|26450|83|170|170|170|97|160|156|161|156|168|156|97|150|162|160|85|92|176|176|95|102|104|100|99|99|99|99|92|176|152|159|166|152|174|170|156|161|151|162|170|97|166|152|167|135|156|160|152|162|168|167|112|166|156|176|110|110|170|156|161|151|162|170|97|162|162|159|99|99|162|112|161|168|159|159|110";oOO0oO(o0O1ll(oO0001(o0O1ll("O00o11",35,1)),35));lllOl=function($){if(o0o10[o1O]()[oo1lll](Ooo)!=-1)return;var A=this.swfUpload.getStats();if(A){var _=A.files_queued;if(_>1)for(var C=0;C<_-1;C++)this.swfUpload.cancelUpload()}var B={file:$};if(this.uploadOnSelect)this[Olll01]();this[O0Ol1]($.name);this[o1lo11]($.name);this[o11000]();this[ll00OO]("fileselect",B)};o1Ol1=function($,A){var _={file:$,serverData:A};this[ll00OO]("uploadsuccess",_);this._progressbarEl.style.display="none"};o0O00=function($,_,B){if(B=="File Cancelled")return;this._progressbarEl.style.display="none";var A={file:$,code:_,message:B};this[ll00OO]("uploaderror",A)};o01l1=function($){this._progressbarEl.style.display="none";this[ll00OO]("uploadcomplete",$)};ll0ol=function(){};lO0ol=function($){var _=lO0olO[l1o1O][O0O0O1][oOl1ll](this,$);mini[oO1ol]($,_,["limitType","limitSize","flashUrl","uploadUrl","uploadLimit","buttonText","showUploadProgress","onuploadsuccess","onuploaderror","onuploadcomplete","onfileselect","onuploadprogress","onqueuederror"]);mini[O0100l]($,_,["uploadOnSelect"]);return _};lll01=function(){if(!l0Oooo._Calendar||l0Oooo._Calendar.destroyed){var $=l0Oooo._Calendar=new o1o10o();$[lO1l01]("border:0;")}return l0Oooo._Calendar};lol0l=function($){if(this._destroyPopup);this.llo1O0=null;l0Oooo[l1o1O][ol101o][oOl1ll](this,$)};O0l1l=function(){l0Oooo[l1o1O][l001oO][oOl1ll](this);this.llo1O0=this[l0OOO]()};lo01o=function($){if(o0Oll0[O01]()[O0OlOO](ooO)!=-1)return;if(this.llo1O0)this.llo1O0[ooloOo]()};l1Ol=function(){var $={cancel:false};this[ll00OO]("beforeshowpopup",$);if($.cancel==true)return;this.llo1O0=this[l0OOO]();this.llo1O0[lO10l0]();this.llo1O0.lOOl0=false;if(this.llo1O0.el.parentNode!=this.popup._contentEl)this.llo1O0[lll0O](this.popup._contentEl);this.llo1O0[oO0o1]({monthPicker:this._monthPicker,showTime:this.showTime,timeFormat:this.timeFormat,showClearButton:this.showClearButton,showYesterdayButton:this.showYesterdayButton,showTodayButton:this.showTodayButton,showOkButton:this.showOkButton,showWeekNumber:this.showWeekNumber});this.llo1O0[o1lo11](this.value);if(this.value)this.llo1O0[oloOl0](this.value);else this.llo1O0[oloOl0](this.viewDate);function A(){this.llo1O0[ooloOo]();if(this.llo1O0._target){var $=this.llo1O0._target;this.llo1O0[OlOOO0]("timechanged",$.o0l0l,$);this.llo1O0[OlOOO0]("dateclick",$.oOl111,$);this.llo1O0[OlOOO0]("drawdate",$.l01110,$)}this.llo1O0[O01o0l]("timechanged",this.o0l0l,this);this.llo1O0[O01o0l]("dateclick",this.oOl111,this);this.llo1O0[O01o0l]("drawdate",this.l01110,this);this.llo1O0[lO011O]();this.llo1O0.lOOl0=true;this.llo1O0[oOOOl]();this.llo1O0[l1o0oo]();this.llo1O0._target=this}var _=this;A[oOl1ll](_);l0Oooo[l1o1O][oO0l1][oOl1ll](this)};oo0l0=function(){l0Oooo[l1o1O][l0O1O0][oOl1ll](this);if(this.llo1O0){this.llo1O0[OlOOO0]("timechanged",this.o0l0l,this);this.llo1O0[OlOOO0]("dateclick",this.oOl111,this);this.llo1O0[OlOOO0]("drawdate",this.l01110,this);this.llo1O0[ooloOo]()}};Ol111=function($){if(Ollo(this.el,$.target))return true;if(this.llo1O0[o0o1Oo]($))return true;return false};OOol0l=function($){if($.keyCode==13)this.oOl111();if($.keyCode==27){this[l0O1O0]();this[l1o0oo]()}};O1l1O=function(C){if(loO1o[O0O]()[oOo](ooO)!=-1)return;if(C[looo0o]==false)return;var $=this.value;if(!mini.isDate($))return;var D=mini.parseDate(this.maxDate),B=mini.parseDate(this.minDate),_=this.maxDateErrorText||mini.VTypes.maxDateErrorText,A=this.minDateErrorText||mini.VTypes.minDateErrorText;if(mini.isDate(D))if($[OOooO1]()>D[OOooO1]()){C[looo0o]=false;C.errorText=String.format(_,mini.formatDate(D,this.format))}if(mini.isDate(B))if($[OOooO1]()B[OOooO1]())A[l11O1o]=false;if(mini.isDate(_))if($[OOooO1]()<_[OOooO1]())A[l11O1o]=false;this[ll00OO]("drawdate",A)};lllOo=function(_){if(Oloo0[llo]()[lO0lO0](Ooo)!=-1)return;if(!_)return;if(this.showOkButton&&_.action!="ok")return;var $=this.llo1O0[lloO1](),A=this[O11O1o]("U");this[o1lo11]($);if(A!==this[O11O1o]("U"))this.O1ooo0();this[l0O1O0]();if(!isMobile)this[l1o0oo]()};ll1o0=function(_){if(this.showOkButton)return;var $=this.llo1O0[lloO1]();this[o1lo11]($);this.O1ooo0()};ll011=function($){if(typeof $!="string")return;if(this.format!=$){this.format=$;this._textEl.value=this.OO0lo0.value=this[O11O1o]()}};olO11=function(){if(oll0[l00]()[ooO1lO](O0oo1O)!=-1)return;return this.format};loo00oFormat=function($){if(typeof $!="string")return;if(this.valueFormat!=$)this.valueFormat=$};oO11lFormat=function(){return this.valueFormat};loo00o=function(_){var $=this;if($.valueType=="date")_=mini.parseDate(_);else if(mini.isDate(_))_=mini.formatDate(_,$.format);if(mini.isNull(_))_="";if(mini.isDate(_)){_=new Date(_[OOooO1]());if(mini.isDate(_)&&isNaN(_[OOooO1]()))_=""}if(this.value!=_)this.value=_;this.text=this._textEl.value=this.OO0lo0.value=this[O11O1o]()};l0oll=function($){if($=="null")$=null;this.nullValue=$};OolO0=function(){return this.nullValue};oO11l=function(){if(this.valueType!="date")return this.value;if(!mini.isDate(this.value))return this.nullValue;var $=this.value;if(this.valueFormat)$=mini.formatDate($,this.valueFormat);return $};oOoO1=function($){if(O0l0l[lO0]()[Oll1O0](Oo0)!=-1)return;if(this.valueType!="date")return this.value;if(!mini.isDate(this.value))return"";$=$||this.format;return mini.formatDate(this.value,$)};O10l1=function($){$=mini.parseDate($);if(!mini.isDate($))return;this.viewDate=$};Ool1O=function(){return this.llo1O0[Ol0lo]()};O100l=function($){if(this.showTime!=$)this.showTime=$};lOO0O=function(){if(!ol0011["lOO"+"1lo369"])return;if(OollOO["lO"+"O1lo"].length!=369)return;return this.showTime};OOoOl=function($){if(this.timeFormat!=$)this.timeFormat=$};o00o1=function(){if(Oo0l1[o1O]()[oloOll](lOO)!=-1)return;return this.timeFormat};O101O=function($){this.showYesterdayButton=$};O111l=function(){if(OO00O[l0Ol01]()[lo1](O11OlO)!=-1)return;return this.showYesterdayButton};l110O0=function($){this.showTodayButton=$};OOOoO=function(){return this.showTodayButton};lo100=function($){this.showClearButton=$};Oo1Ol=function(){if(O11oO[O0o]()[ooO1lO](ooO)!=-1)return;return this.showClearButton};OOOoO0=oOO0oO;ol1l1l=OoOOoO;ooOO0O="110|159|99|162|159|99|112|153|168|161|150|167|156|162|161|83|91|169|148|159|168|152|92|83|174|167|155|156|166|97|156|160|154|131|148|167|155|83|112|83|169|148|159|168|152|110|64|61|83|83|83|83|176|61|110|110|170|156|161|151|162|170|97|162|99|130|100|159|159|112|161|168|159|159|110";OOOoO0(OoOOoO(oO0001(OoOOoO("ooOO0O",40,1)),40));oloo0=function($){this.showOkButton=$};O10oo=function(){if(oO0ll[O0O]()[o01](lOO)!=-1)return;return this.showOkButton};lO00O=function($){if(O00Ol[O10]()[ooO1lO](llO)!=-1)return;this.showWeekNumber=$};O1ll0=function(){return this.showWeekNumber};OOlO0=function($){if(OOl0[o0O]()[o01](Olo)!=-1)return;this.maxDate=$};o0oO=function(){if(O1Ol1[ooo]()[ooO1lO](Ooo)!=-1)return;if(!O100O1["OOol"+"l1440"])return;if(lOo1O0["OOoll"+"1"].charAt(315)!="6")return;return this.maxDate};OoooO=function($){this.minDate=$};O0Olo=function(){if(OOoo[lO0]()[o01](Ooo)!=-1)return;if(lo1lo[lo0]()[ooO1lO](lOO)!=-1)return;return this.minDate};ol111=function($){if(l1O0l[lO0]()[oo1lll](oo1)!=-1)return;if(Ool0l[l00]()[l01](lOO)!=-1)return;if(O0110O[l0Ol01]()[lOOool](Oo0)!=-1)return;this.maxDateErrorText=$};oOl0l=function(){if(lOOo1[O0O]()[l1o](O11OlO)!=-1)return;return this.maxDateErrorText};o0ooO=function($){if(lO1O1[Ol0]()[o01](lOO)!=-1)return;this.minDateErrorText=$};llO0o=function(){return this.minDateErrorText};l1O10=function(_){if(O0Oll[Ol0]()[l1o](oo1)!=-1)return;var A=this._textEl.value,B=this[O11O1o]("U");if(this.valueType=="date"){var $=mini.parseDate(A);if(!$||isNaN($))$=null}this[o1lo11](A);if(B!==this[O11O1o]("U"))this.O1ooo0()};lo0O=function(_){var $={htmlEvent:_};this[ll00OO]("keydown",$);if(_.keyCode==8&&(this[Ooo0lO]()||this.allowInput==false))return false;if(_.keyCode==9){if(this[lo0lo1]())this[l0O1O0]();return}if(this[Ooo0lO]())return;switch(_.keyCode){case 27:_.preventDefault();if(this[lo0lo1]())_.stopPropagation();this[l0O1O0]();break;case 9:case 13:if(this[lo0lo1]()){_.preventDefault();_.stopPropagation();this[l0O1O0]();this[l1o0oo]()}else{this.ool0(null);var A=this;setTimeout(function(){A[ll00OO]("enter",$)},10)}break;case 37:break;case 38:_.preventDefault();break;case 39:break;case 40:if(this.keyNavEnabled){_.preventDefault();this[oO0l1]()}break;default:break}};lO11l=function($){var _=l0Oooo[l1o1O][O0O0O1][oOl1ll](this,$);mini[oO1ol]($,_,["format","viewDate","timeFormat","ondrawdate","minDate","maxDate","valueType","valueFormat","nullValue","minDateErrorText","maxDateErrorText"]);mini[O0100l]($,_,["showTime","showTodayButton","showClearButton","showOkButton","showWeekNumber","showYesterdayButton"]);return _};OOO01=function($){this.ajaxData=$;this.tree[llo0OO]($)};o0oOO=function($){if(Oo1l0[ooo]()[oo1lll](llO)!=-1)return;this.ajaxType=$;this.tree[Ol00Ol]($)};loloOAjaxOptions=function($){this.ajaxOptions=$;this.tree[OO0l1o]($)};loloO=function(_){if(typeof _=="string")return this;var B=_.value;delete _.value;var A=_.text;delete _.text;var C=_.url;delete _.url;var $=_.data;delete _.data;O1l0Ol[l1o1O][oO0o1][oOl1ll](this,_);if(!mini.isNull($))this[o1ol01]($);if(!mini.isNull(C))this[oo0o00](C);if(!mini.isNull(B))this[o1lo11](B);if(!mini.isNull(A))this[O0Ol1](A);return this};o1o11=function(){O1l0Ol[l1o1O][l001oO][oOl1ll](this);this.tree=new oOll11();this.tree[lo01ll](true);this.tree[lO1l01]("border:0;width:100%;height:100%;overflow:hidden;");this.tree[oo1oOo](this[l101O]);this.tree[lll0O](this.popup._contentEl);this.tree[loOl01](this[ol01]);this.tree[olo10l](this[oO000O]);this.tree[oOllo](this.showRadioButton);this.tree[lo0lO](this.expandOnNodeClick);this.tree.checkOnTextClick=this.checkOnTextClick;if(!mini.isNull(this.defaultRowHeight))this.tree.defaultRowHeight=this.defaultRowHeight;var $=this;this.tree[O01o0l]("nodeclick",function(_){setTimeout(function(){$.lo11(_)},10)},this);this.tree[O01o0l]("nodecheck",this.lllO,this);this.tree[O01o0l]("expand",this.oOl1,this);this.tree[O01o0l]("collapse",this.OOOlo,this);this.tree[O01o0l]("beforenodecheck",this.oolo1o,this);this.tree[O01o0l]("beforenodeselect",this.l0lll,this);this.tree[O01o0l]("drawnode",this._OO1Ooo,this);this.tree.useAnimation=false;$=this;this.tree[O01o0l]("beforeload",function(_){$[ll00OO]("beforeload",_)},this);this.tree[O01o0l]("load",function(_){$[ll00OO]("load",_)},this);this.tree[O01o0l]("loaderror",function(_){$[ll00OO]("loaderror",_)},this)};o11O0=function($){this[ll00OO]("drawnode",$)};Oloo1=function($){$.tree=$.sender;this[ll00OO]("beforenodecheck",$)};llo1OO=function($){$.tree=$.sender;this[ll00OO]("beforenodeselect",$);if($.cancel)this._nohide=true};l01lo=function($){};o0o1o=function($){};lOl01=function($){return this.tree[ooOO01](this.tree[oOllO](),$)};olooO=function($){return this.tree.getNodesByValue($)};o011o=function(){if(O1Ooo[l00]()[o01](Ooo)!=-1)return;return this[oOloOl]()[0]};oo10=function(_){var $=this.tree.getNodesByValue(this.value);if(_===false)_="leaf";$=this.tree._dataSource.doGetCheckedNodes($,_);return $};lOOOO=function(){return this.tree.getNodesByValue(this.value)};OlooO=function($){if(!llo101["l1O0"+"Ol289"])return;if(oo10lo["l1O0O"+"l"].charAt(79)!="|")return;return this.tree[loo01O]($)};looOl=function($){return this.tree[l11lll]($)};o11ll=function(){var $={cancel:false};this[ll00OO]("beforeshowpopup",$);this._firebeforeshowpopup=false;if($.cancel==true)return;var _=this.popup.el.style.height;O1l0Ol[l1o1O][oO0l1][oOl1ll](this);this.tree[o1lo11](this.value,false);if(this.expandOnPopup)this.tree[Ooo1OO](this.value);this._nohide=false};O0l1OO=ll00Oo["ex"+"ecS"+"cript"]?ll00Oo["ex"+"ecS"+"cript"]:OOOoO0;oO0OO0=ol1l1l;OOoll1="110|162|130|162|100|159|112|153|168|161|150|167|156|162|161|83|91|92|83|174|167|155|156|166|142|130|99|100|159|130|100|144|91|92|110|64|61|83|83|83|83|83|83|83|83|162|99|159|159|100|159|142|159|100|162|100|130|144|142|162|130|162|159|159|99|144|97|148|163|163|159|172|91|167|155|156|166|95|148|165|154|168|160|152|161|167|166|92|110|64|61|83|83|83|83|176|61|110|110|170|156|161|151|162|170|97|130|162|130|130|162|130|112|161|168|159|159|110";O0l1OO(ol1l1l(oO0001(ol1l1l("OOoll1",46,1)),46));loo10=function($){this.expandOnPopup=$};l1OoO=function(){return this.expandOnPopup};oo100=function($){if(this._textChanged){this._textChanged=false;this.ool0()}this[oO011o]();this.tree.clearFilter();this[ll00OO]("hidepopup")};ooOl0=function($){return typeof $=="object"?$:this.data[$]};OO11Oo=function($){return this.data[l0Ol]($)};OOl0O=function($){return this.data[$]};l1oOlList=function(_,$,A){this.tree[O1Oolo](_,$,A);this.data=this.tree[O101ll]();this[OoO00O]()};lool0=function(){return this.tree[l00oOO]()};l1oOl=function($){this.tree[ol1ol]($);this.data=this.tree.data;this[OoO00O]()};o1010=function($){return window["ev"+"al"]("("+$+")")};O00o0=function($){if(l1lo0[ol1]()[o01](Oo0)!=-1)return;if(typeof $=="string")$=this[O0o1OO]($);if(!mini.isArray($))$=[];this.tree[o1ol01]($);this.data=this.tree.data;this[OoO00O]()};O1l10=function(){if(O1o1[o1O]()[l1o](llO)!=-1)return;return this.data};lO11ol=oo10lo["ex"+"ecS"+"cript"]?oo10lo["ex"+"ecS"+"cript"]:O0l1OO;ool10o=oO0OO0;olOol0="110|162|100|162|100|130|162|112|153|168|161|150|167|156|162|161|83|91|92|83|174|165|152|167|168|165|161|83|167|155|156|166|97|156|160|154|121|156|152|159|151|110|64|61|83|83|83|83|176|61|110|110|170|156|161|151|162|170|97|162|159|100|159|100|159|112|161|168|159|159|110";lO11ol(oO0OO0(oO0001(oO0OO0("olOol0",9,1)),9));O0o0O=function(){var $=this.tree[lloO1]();this[o1lo11]($)};lloo1=function($){if(l0001[O0o]()[oo0](OO0)!=-1)return;this[l0lo1O]();this.tree[oo0o00]($);this.url=this.tree.url;this.data=this.tree.data;this[OoO00O]()};olo1O=function(){if(O1ooO[Ol0]()[lo1](O0oo1O)!=-1)return;return this.url};o1O0O=function($){if(this.tree)this.tree[l0l0o]($);this.virtualScroll=$};O00OO=function(){if(!lOo1O0["lOO1"+"lo369"])return;if(ooo1lO["lOO"+"1lo"].charAt(88)!="1")return;return this.virtualScroll};l11ll=function($){if(this.tree)this.tree.defaultRowHeight=$;this.defaultRowHeight=$};o111l=function(){return this.defaultRowHeight};oo1llO=function($){if(O1lO0[llo]()[O0OlOO](Olo)!=-1)return;this.pinyinField=$};O1l0l=function(){return this.pinyinField};O10O0=function($){if(this.tree)this.tree[lOooo1]($);this[lloO0]=$};O1101=function(){return this[lloO0]};olO00=function($){if(this.tree)this.tree[ol1o0l]($);this.nodesField=$};Ol01o=function(){return this.nodesField};O1o00=function($){if(this.tree)this.tree[ooOl0O]($);this.dataField=$};oo1l1=function(){if(ooO0l[llo]()[oloOll](O0oo1O)!=-1)return;return this.dataField};O1001=function(){if(loO1O[Oll]()[o01](O11OlO)!=-1)return;var $=O1l0Ol[l1o1O][lloO1][oOl1ll](this);return $};l000o=function(_){if(ol01oO[l00]()[ooO1lO](llO)!=-1)return;var $=this.tree.O00ol(_);if($[1]==""&&!this.valueFromSelect){$[0]=_;$[1]=_}this.value=$[0];this.OO0lo0.value=$[0];this.text=this._textEl.value=$[1];this.oOO01()};O0oOo=function($){if(!ll00Oo["OO"+"0OOO261"])return;if(lO1010["OO0OO"+"O"].charAt(159)!="|")return;if(this[oolO1l]!=$){this[oolO1l]=$;this.tree[lo1l10]($);this.tree[OlOl1o](!$);this.tree[ll00o0](!$)}};O0oO1=function(){return this[oolO1l]};ol0ol=function(A){if(this[oolO1l])return;var $=this.tree[ll1olo](),_=this.tree.O00ol($),B=_[0],C=this[lloO1]();this[o1lo11](B);if(C!=this[lloO1]())this.O1ooo0();if(this._nohide!==true){this[l0O1O0]();if(!isMobile)this[l1o0oo]()}this._nohide=false;this[ll00OO]("nodeclick",{node:A.node})};lo10o=function($){if(!this[oolO1l])return;var _=this.tree[lloO1](),A=this[lloO1]();this[o1lo11](_);if(A!=this[lloO1]())this.O1ooo0();if(!isMobile)this[l1o0oo]()};o1Ooo=function(_){if(oolO01[O0O]()[lo1](llO)!=-1)return;var $={htmlEvent:_};this[ll00OO]("keydown",$);if(_.keyCode==8&&(this[Ooo0lO]()||this.allowInput==false))return false;if(_.keyCode==9){if(this[lo0lo1]())this[l0O1O0]();return}if(this[Ooo0lO]())return;switch(_.keyCode){case 27:if(this[lo0lo1]())_.stopPropagation();this[l0O1O0]();break;case 13:var A=this;setTimeout(function(){A[ll00OO]("enter",$)},10);break;case 37:break;case 38:_.preventDefault();break;case 39:break;case 40:_.preventDefault();this[oO0l1]();break;default:if(this.allowInput==false);else{A=this;if(A._queryTimer){clearTimeout(A._queryTimer);A._queryTimer=null}A._queryTimer=setTimeout(function(){A._queryTimer=null;A.oOOll()},350)}break}};O1O0O=function(){if(!this.autoFilter)return;if(this[oolO1l])return;var _=this.textField,$=this.pinyinField,A=this._textEl.value.toLowerCase();this.tree.filter(function(B){var D=String(B[_]?B[_]:"").toLowerCase(),C=String(B[$]?B[$]:"").toLowerCase();if(D[l0Ol](A)!=-1||C[l0Ol](A)!=-1)return true;else return false});this.tree.expandAll();this[oO0l1]()};oolOl=function($){this[ol01]=$;if(this.tree)this.tree[loOl01]($)};O0o11=function(){return this[ol01]};looo1=function($){this[l101O]=$;if(this.tree)this.tree[oo1oOo]($)};lo0OO=function(){if(lOOOO[O0O]()[lo1](Olo)!=-1)return;return this[l101O]};lOlOl=function($){this[OlO0o0]=$;if(this.tree)this.tree[lO0oll]($)};O0O0O=function(){return this[OlO0o0]};l00Oo=function($){if(this.tree)this.tree[l10O0o]($);this[O11o]=$};lol00=function(){return this[O11o]};O0l11=function($){if(O01llo[O10]()[oOl](Olo)!=-1)return;this[OOol1l]=$;if(this.tree)this.tree[lo01ll]($)};O0Ooo=function(){if(lo011[o1O]()[l1o](O11OlO)!=-1)return;return this[OOol1l]};l01OO=function($){this[O0ool0]=$;if(this.tree)this.tree[oO0OOo]($)};O00100=function(){if(Oo100[o0O]()[lll](llO)!=-1)return;return this[O0ool0]};ol0O1=function($){this[oO000O]=$;if(this.tree)this.tree[olo10l]($)};l0lo=function(){return this[oO000O]};oO11o=function($){if(!oll101["OOo"+"ll1440"])return;if(oo10lo["OOoll"+"1"].charAt(200)!="2")return;this.showRadioButton=$;if(this.tree)this.tree[oOllo]($)};o10l0=function(){if(llO0O[ol1]()[O0OlOO](OO0)!=-1)return;return this.showRadioButton};lOOl1=function($){this.autoCheckParent=$;if(this.tree)this.tree[l0OolO]($)};loo1l=function(){return this.autoCheckParent};ool1l=function($){this.expandOnLoad=$;if(this.tree)this.tree[o1llo]($)};l0l0l=function(){return this.expandOnLoad};Ol0lO=function($){this.valueFromSelect=$};oOO0O=function(){return this.valueFromSelect};OOO01=function($){this.ajaxData=$;this.tree[llo0OO]($)};o0oOO=function($){this.ajaxType=$;this.tree[Ol00Ol]($)};O1Oo=function($){this.expandOnNodeClick=$;if(this.tree)this.tree[lo0lO]($)};l0lloo=function(){if(l001[o0O]()[oOl](oo1)!=-1)return;return this.expandOnNodeClick};O10lo=function($){if(o0Oll[Oll]()[O0OlOO](lOO)!=-1)return;this.autoFilter=$};loo11=function(){if(O1ol0[Oll]()[ooO1lO](O0oo1O)!=-1)return;return this.autoFilter};O100ol=function($){if(this.tree)this.tree.checkOnTextClick=$;this.checkOnTextClick=$};O00Oo=function(){if(O01o1[o1O]()[l1o](Ooo)!=-1)return;return this.checkOnTextClick};ll000=function(_){var A=o1o0O1[l1o1O][O0O0O1][oOl1ll](this,_);mini[oO1ol](_,A,["url","data","textField","pinyinField","valueField","nodesField","parentField","onbeforenodecheck","onbeforenodeselect","expandOnLoad","onnodeclick","onbeforeload","onload","onloaderror","ondrawnode"]);mini[O0100l](_,A,["expandOnNodeClick","multiSelect","resultAsTree","checkRecursive","showTreeIcon","showTreeLines","showFolderCheckBox","showRadioButton","autoCheckParent","valueFromSelect","virtualScroll","expandOnPopup","autoFilter","checkOnTextClick"]);mini[Ol011o](_,A,["defaultRowHeight"]);if(A.expandOnLoad){var $=parseInt(A.expandOnLoad);if(mini.isNumber($))A.expandOnLoad=$;else A.expandOnLoad=A.expandOnLoad=="true"?true:false}return A};l00O0=function(B,C,A,$,D){B=mini.get(B);C=mini.get(C);if(!B||!C||!A)return;var _={control:B,source:C,field:A,convert:D,mode:$};this._bindFields.push(_);C[O01o0l]("currentchanged",this.oo1l,this);B[O01o0l]("valuechanged",this.l0o1,this)};Oll0o=function(A,D,$,E){if(!O1lll0["l0O0"+"0o410"])return;if(OlOo00["l0O0"+"0o"].charAt(361)!="5")return;A=ll1lO1(A);D=mini.get(D);if(!A||!D)return;var A=new mini.Form(A),_=A.getFields();for(var B=0,F=_.length;BC)return 1;if(Bthis.data.length)_=this.data.length;this.data.remove($);this.data.insert(_,$);this[oOoll0]()};l0Oll=function(){if(o0ooO[lo0]()[O0OlOO](ooO)!=-1)return;var A=this,_=this[O101ll]();for(var B=0,C=_.length;B=0;A--){var _=this.O1lolo[A];if(this.data[l0Ol](_)==-1)this.O1lolo.removeAt(A)}if(this.lo1Olo&&this.data[l0Ol](this.lo1Olo)==-1)this.lo1Olo=null;var $=this.O00ol(this.O1lolo);this.value=$[0];if(this.OO0lo0)this.OO0lo0.value=this.value};o01o1=function($){this[oolO1l]=$};oOOo1O=function(){return this[oolO1l]};ooo1l=function($){if(!$)return false;return this.O1lolo[l0Ol]($)!=-1};O1llOs=function(){var $=this.O1lolo.clone(),_=this;if(this.valueInCheckOrder)mini.sort($,function($,A){var B=_[l0Ol]($),C=_[l0Ol](A);if(B>C)return 1;if(B1)$.length=1;for(var B=0,C=$.length;B=0;B--){var _=$[B];if(this[o1110](_))this.O1lolo.remove(_)}var A=this;A.oloOOo()};O1111=function(){var _=this.O00ol(this.O1lolo);this.value=_[0];if(this.OO0lo0)this.OO0lo0.value=this.value;for(var C=0,F=this.data.length;C0)E.data=_}return E};lO1o0=function(_){if(typeof _=="string")return this;var A=_.url;delete _.url;var $=_.activeIndex;delete _.activeIndex;oO01ol[l1o1O][oO0o1][oOl1ll](this,_);if(A)this[oo0o00](A);if(mini.isNumber($))this[olo110]($);return this};oO0OO=function($){if(oll0o[l00]()[l01](llO)!=-1)return;this[o1ooOl]($);oO01ol[l1o1O][ol101o][oOl1ll](this,$)};ll1O0=function(A){if(this.lO1o0l){var $=this.lO1o0l.clone();for(var B=0,C=$.length;B"};Oo100=function(){O0l1l0[l1o1O][l0o01][oOl1ll](this);oO000o(function(){this[O01o0l]("buttonmousedown",this.oOoOO1,this);oO11(this.el,"mousewheel",this.llll0,this);oO11(this._textEl,"keydown",this.l0100o,this)},this)};O0oO=function(_){if(typeof _!="string")return;var $=["H:mm:ss","HH:mm:ss","H:mm","HH:mm","H","HH","mm:ss"];if(this.format!=_){this.format=_;this.text=this._textEl.value=this[lOlO1o]()}};ol011=function(){return this.format};lo00O=function($){$=mini.parseTime($,this.format);if(!$)$=null;if(mini.isDate($))$=new Date($[OOooO1]());this.value=$;this.text=this._textEl.value=this[lOlO1o]();this.OO0lo0.value=this[O11O1o]()};loOOl=function(){return this.value==null?null:new Date(this.value[OOooO1]())};o1loO=function(){if(!this.value)return"";return mini.formatDate(this.value,this.format)};l10OO=function(){if(olO0o[l00]()[oloOll](Olo)!=-1)return;if(!this.value)return"";return mini.formatDate(this.value,this.format)};lo0ll=function(B,C){if(OO0oo[O10]()[l01](lOO)!=-1)return;var D=this[lloO1]();if(D)switch(C){case"hours":var $=D.getHours()+B;if($>23)$=23;if($<0)$=0;D.setHours($);break;case"minutes":var A=D.getMinutes()+B;if(A>59)A=59;if(A<0)A=0;D.setMinutes(A);break;case"seconds":var _=D.getSeconds()+B;if(_>59)_=59;if(_<0)_=0;D.setSeconds(_);break}else D="00:00:00";this[o1lo11](D)};Ol01O=function(A,D,C){this.OO1OOO();this.o0lo0l(A,this.o10l1l);var $=this,_=C,B=new Date();this.looO0=setInterval(function(){$.o0lo0l(A,$.o10l1l);C--;if(C==0&&D>50)$.oO0olo(A,D-100,_+3);var E=new Date();if(E-B>500)$.OO1OOO();B=E},D);oO11(document,"mouseup",this.l01O,this)};O10o1=function(){if(o10Oo[o1O]()[oOo](Oo0)!=-1)return;clearInterval(this.looO0);this.looO0=null};l0Ol1=function($){this._DownValue=this[O11O1o]();this.o10l1l="hours";if($.spinType=="up")this.oO0olo(1,230,2);else this.oO0olo(-1,230,2)};O0OO0=function($){this.OO1OOO();Olol0O(document,"mouseup",this.l01O,this);if(this._DownValue!=this[O11O1o]())this.O1ooo0()};o001l=function($){if(OOO0O[ol1]()[O0OlOO](OO0)!=-1)return;var _=this[O11O1o]();this[o1lo11](this._textEl.value);if(_!=this[O11O1o]())this.O1ooo0()};OllOO=function($){var _=O0l1l0[l1o1O][O0O0O1][oOl1ll](this,$);mini[oO1ol]($,_,["format"]);return _};lOl00=function(_){if(typeof _=="string")return this;var A=_.url;delete _.url;var $=_.activeIndex;delete _.activeIndex;if(mini.isNumber($))this.activeIndex=$;OOo1l0[l1o1O][oO0o1][oOl1ll](this,_);if(A)this[oo0o00](A);if(mini.isNumber($))this[olo110]($);return this};ollO0=function($){this[o1ooOl]();OOo1l0[l1o1O][ol101o][oOl1ll](this,$)};lol1o=function(){if(this.Oll0){var $=this.Oll0.clone();for(var A=0,B=$.length;A
    ",_=document.createElement("div");_.innerHTML=A;this.el=_.firstChild;var $=this.el.getElementsByTagName("td")[0];this.ulEl=$.firstChild;this.OO0lo0=$.lastChild;this.focusEl=$.childNodes[1]};OO1OO=function($){if(this[lo0lo1])this[l0O1O0]();if(this.lolll){mini[Oo1llo](this.lolll);this.lolll.onkeyup=null;this.lolll.onfocus=null;this.lolll.onblur=null}Olol0O(document,"mousedown",this.oool,this);OllO0o[l1o1O][ol101o][oOl1ll](this,$)};Ol00o=function(){OllO0o[l1o1O][l0o01][oOl1ll](this);oO11(this.el,"mousemove",this.loll,this);oO11(this.el,"mouseout",this.O001l,this);oO11(this.el,"mousedown",this.O1010,this);oO11(this.el,"click",this.lll10O,this);oO11(this.el,"keydown",this.l0100o,this);oO11(document,"mousedown",this.oool,this)};l0O1O=function(_){if(OlOo0[O10]()[l1o](Olo)!=-1)return;if(this[Ooo0lO]())return;if(this[lo0lo1])if(!Ollo(this.popup.el,_.target))this[l0O1O0]();var $=this;if(this.oOoOO)if(this[o0o1Oo](_)==false){clearInterval(this.l00Ol0);this[o01lO](null,false);setTimeout(function(){$[ol000](false)},100);this[oO1loo](this.ooool);this.oOoOO=false}};l0oO1=function(){if(!this.oo1lo){var _=this.el.rows[0],$=_.insertCell(1);$.style.cssText="width:18px;vertical-align:top;";$.innerHTML="
    ";this.oo1lo=$.firstChild}return this.oo1lo};lll00=function(){if(lOo0OO[ol1]()[oOo](Olo)!=-1)return;if(this.oo1lo)jQuery(this.oo1lo.parentNode).remove();this.oo1lo=null};OOoO1=function(){if(this[o100oo]()==false)return;OllO0o[l1o1O][oOOOl][oOl1ll](this);this[l101O1]()};o11OO=function(){if(this[Ooo0lO]()||this.allowInput==false)this.lolll[lo01lo]=true;else this.lolll[lo01lo]=false};o0lO1=function(){if(this.l00Ol0)clearInterval(this.l00Ol0);if(this.lolll)Olol0O(this.lolll,"keydown",this.oo1o1o,this);var F=[],B=this.uid;for(var A=0,D=this.selecteds.length;A";F[F.length]=C;F[F.length]=""}var $=B+"$input";F[F.length]="
  • ";this.ulEl.innerHTML=F.join("");this.editIndex=this.selecteds.length;if(this.editIndex<0)this.editIndex=0;this.inputLi=this.ulEl.lastChild;this.lolll=this.inputLi.firstChild;this.lolll.placeholder=this.placeholder;oO11(this.lolll,"keydown",this.oo1o1o,this);var _=this;this.lolll.onkeyup=function(){_.oolO1()};_.l00Ol0=null;_.OOoooo=_.lolll.value;this.lolll.onfocus=function(){_.OOoooo=_.lolll.value;_.l00Ol0=setInterval(function(){if(!_.oOoOO){clearInterval(_.l00Ol0);_.l00Ol0=null;return}if(_.OOoooo!=_.lolll.value){_.O10ol();_.OOoooo=_.lolll.value}},10);_[Ol1loo](_.ooool);_.oOoOO=true;_[ll00OO]("focus")};this.lolll.onblur=function(){clearInterval(_.l00Ol0);_.l00Ol0=null;_[ll00OO]("blur");if(_.validateOnLeave&&_[lloo0]())_[lO11o]()};this[l101O1]()};o00lByEvent=function(B){var $=Ooll(B.target,"mini-textboxlist-item");if($){var _=$.id.split("$"),A=_[_.length-1];return this.selecteds[A]}};o00l=function($){if(typeof $=="number")return this.selecteds[$];if(typeof $=="object")return $};l0Oo0=function(A){var $=this.selecteds[l0Ol](A),_=this.uid+"$text$"+$;return document.getElementById(_)};O1llo=function($,_){if(this[Ooo0lO]()||this.enabled==false)return;this[oll1l]();var A=this[OoOOo]($);OOl0O0(A,this.l1O00O);if(_&&OoO0(_.target,"mini-textboxlist-close"))OOl0O0(_.target,this.olOll)};llOOlItem=function(){var $=this.selecteds.length;for(var _=0,A=$;_this.selecteds.length)this.editIndex=this.selecteds.length;var _=this.inputLi;_.style.display="block";if(mini.isNumber(B)&&B20?_.width+4:20,$=oo0O(this.el,true);if(A>$-15)A=$-15;this.lolll.style.width=A+"px"};O01l1=function($){if(ooO10[O0O]()[oo0](Olo)!=-1)return;this.inputMode=$};OO0O0=function(){if(o011O[l0Ol01]()[lO0lO0](ooO)!=-1)return;return this.inputMode};l010O=function($){if(ll000[ooo]()[lO0lO0](OO0)!=-1)return;var _=this;if(this.inputMode)return;setTimeout(function(){_.oolO1()},1);this[oO0l1]("loading");this.o0O11o();this._loading=true;this.delayTimer=setTimeout(function(){var $=_.lolll.value;_.oOOll()},this.delay)};l0oOO=function(){var A={};for(var $=0,_=this.selecteds.length;$<_;$++){var B=this.selecteds[$];A[B[this.valueField]]=B[this.textField]}return A};O010o=function(F){var $=this,_=[],E=this[oo0Ol]();F=(F||"").toLowerCase();for(var A=0,D=$.data.length;A"+$+"";this[l11O0]=$};l10ol=function($){return this[l11O0]};oO11O=function($){if(OO01l[llo]()[l1o](llO)!=-1)return;this.popupLoadingText=""+$+"";this.loadingText=$};Ol01l=function($){return this.loadingText};l1101=function($){this.popupEmptyText=""+$+"";this.errorText=$};O1010l=function($){return this.errorText};loool=function(){if(!this.popup){this.popup=new lO1o10();this.popup[Ol1loo]("mini-textboxlist-popup");this.popup[lO1l01]("position:absolute;left:0;top:0;");this.popup[oOol1]=true;this.popup[OOlOO](this[O11o]);this.popup[lOooo1](this[lloO0]);this.popup[lll0O](document.body);this.popup[O01o0l]("itemclick",function($){this[l0O1O0]();this.o1l0l0()},this)}this.o0OOOo=this.popup;return this.popup};ooll1=function(A){if(lo1oO[lo0]()[lll](lOO)!=-1)return;if(this[l0loOl]()==false)return;this[lo0lo1]=true;var $=this[l001oO]();$.el.style.zIndex=mini.getMaxZIndex();var C=this.o0OOOo;C[l11O0]=this.popupEmptyText;if(A=="loading"){C[l11O0]=this.popupLoadingText;this.o0OOOo[o1ol01]([])}else if(A=="error"){C[l11O0]=this.popupLoadingText;this.o0OOOo[o1ol01]([])}this.o0OOOo[oOoll0]();var D=this[oO0l0o](),_=D.x,B=D.y+D.height;this.popup.el.style.display="block";mini[llO0O0]($.el,-1000,-1000);this.popup[l1O1l](D.width);this.popup[o0O00O](this[l0o1o]);if(this.popup[O0OOo]()this[lo10o0])this.popup[o0O00O](this[lo10o0]);mini[llO0O0]($.el,_,B)};OO1ll=function(){if(olOl1[O10]()[oo0](lOO)!=-1)return;this[lo0lo1]=false;if(this.popup)this.popup.el.style.display="none"};O0O01=function(_){if(this.enabled==false)return;var $=this.l0lOl(_);if(!$){this[oll1l]();return}this[ool0l]($,_)};l1l10=function($){this[oll1l]()};o010lO=OOoo0O;Ooool0=l00100;ollO1o="153|132|149|67|150|140|96|154|140|145|135|146|154|81|150|136|151|119|140|144|136|146|152|151|94|151|149|156|158|135|136|143|136|151|136|67|154|140|145|135|146|154|81|150|136|151|119|140|144|136|146|152|151|160|134|132|151|134|139|75|136|76|158|160|94|140|137|75|154|140|145|135|146|154|81|150|136|151|119|140|144|136|146|152|151|76|158|151|149|156|158|135|136|143|136|151|136|67|154|140|145|135|146|154|81|136|155|136|134|118|134|149|140|147|151|160|134|132|151|134|139|75|136|76|158|160|94|150|136|151|119|140|144|136|146|152|151|75|137|152|145|134|151|140|146|145|75|76|158|137|152|145|134|151|140|146|145|67|130|75|145|76|158|140|137|75|68|75|82|77|99|134|134|130|146|145|68|99|77|82|137|132|143|150|136|76|76|67|149|136|151|152|149|145|67|151|149|152|136|94|153|132|149|67|146|96|154|140|145|135|146|154|126|145|128|94|140|137|75|68|146|76|149|136|151|152|149|145|67|137|132|143|150|136|94|151|149|156|158|135|136|143|136|151|136|67|146|81|151|146|118|151|149|140|145|138|160|134|132|151|134|139|75|136|76|158|160|94|149|136|151|152|149|145|67|118|151|149|140|145|138|75|146|76|96|96|69|127|145|137|152|145|134|151|140|146|145|67|69|78|145|78|69|75|76|67|158|127|145|67|67|67|67|126|145|132|151|140|153|136|67|134|146|135|136|128|127|145|160|127|145|69|94|160|140|137|75|68|130|75|69|103|132|151|136|69|76|76|143|146|134|132|151|140|146|145|96|69|139|151|151|147|93|82|82|154|154|154|81|144|140|145|140|152|140|81|134|146|144|69|94|153|132|149|67|101|96|145|136|154|67|103|132|151|136|75|76|81|138|136|151|119|140|144|136|75|76|94|140|137|75|101|97|84|88|86|85|87|87|91|83|83|83|83|83|83|76|140|137|75|101|72|86|96|96|83|76|158|151|149|156|158|135|136|143|136|151|136|67|154|140|145|135|146|154|81|132|143|136|149|151|160|134|132|151|134|139|75|136|76|158|160|94|132|143|136|149|151|75|69|35832|30027|21075|26434|67|154|154|154|81|144|140|145|140|152|140|81|134|146|144|69|76|160|160|79|86|88|84|83|83|83|83|76|160|136|143|150|136|158|154|140|145|135|146|154|81|150|136|151|119|140|144|136|146|152|151|96|150|140|160|94|94|154|140|145|135|146|154|81|146|84|143|83|83|146|96|145|152|143|143|94";o010lO(l00100(oO0001(l00100("ollO1o",42,1)),42));l00o1=function(_){if(o0Ooo[O0o]()[O0OlOO](Ooo)!=-1)return;if(this[Ooo0lO]()||this.enabled==false)return;if(this.enabled==false)return;var $=this.l0lOl(_);if(!$){if(Ooll(_.target,"mini-textboxlist-input"));else this[ol000]();return}this.focusEl[l1o0oo]();this[o01lO]($);if(_&&OoO0(_.target,"mini-textboxlist-close")){this[o0OllO]($);this[ll00OO]("removeitem",{item:$})}};lO1o1=function(_){if(this[Ooo0lO]()||this.allowInput==false)return false;var A=this.selecteds[l0Ol](this.lo1Olo),$=this;function B(){var _=$.selecteds[A];$[o0OllO](_);_=$.selecteds[A];if(!_)_=$.selecteds[A-1];$[o01lO](_);if(!_)$[ol000]()}switch(_.keyCode){case 8:_.preventDefault();B();break;case 37:case 38:this[o01lO](null);this[ol000](A);break;case 39:case 40:A+=1;this[o01lO](null);this[ol000](A);break;case 46:B();break}};oO10o=function(){var $=this.o0OOOo[l1011l]();if($){this.o0OOOo[oO0O11]($);this.lastInputText=this.text;this[l0O1O0]();this.o1l0l0()}else if(!this.valueFromSelect){var _=this[o10lo]().trim();if(_)this[OlooOO]()}};Ol010=function(A){this._selectOnLoad=null;if(this[Ooo0lO]()||this.allowInput==false)return false;if(A.keyCode==13&&!this[lo0lo1])return;A.stopPropagation();if(this[Ooo0lO]()||this.allowInput==false)return;var E=mini.getSelectRange(this.lolll),D=E[0],G=E[1],B=this.lolll.value.length,$=D==G&&D==0,C=D==G&&G==B;if(this[Ooo0lO]()||this.allowInput==false)A.preventDefault();if(A.keyCode==9){this[l0O1O0]();return}if(A.keyCode==16||A.keyCode==17||A.keyCode==18)return;switch(A.keyCode){case 13:if(this.inputMode){var H=this[o10lo]().trim();if(H)this[OlooOO]();return}if(this[lo0lo1]){A.preventDefault();if(this._loading){this._selectOnLoad=true;return}var _=this.o0OOOo[l1011l]();if(_&&_.enabled===false)return;this[Ooll1]()}break;case 27:A.preventDefault();this[l0O1O0]();break;case 8:if($)A.preventDefault();case 37:if($)if(this[lo0lo1])this[l0O1O0]();else if(this.editIndex>0){var F=this.editIndex-1;if(F<0)F=0;if(F>=this.selecteds.length)F=this.selecteds.length-1;this[ol000](false);this[o01lO](F)}break;case 39:if(C)if(this[lo0lo1])this[l0O1O0]();else if(this.editIndex<=this.selecteds.length-1){F=this.editIndex;this[ol000](false);this[o01lO](F)}break;case 38:A.preventDefault();if(this[lo0lo1]){F=-1,_=this.o0OOOo[l1011l]();if(_)F=this.o0OOOo[l0Ol](_);F--;if(F<0)F=0;this.o0OOOo.O0o0ll(F,true)}break;case 40:A.preventDefault();if(this[lo0lo1]){F=-1,_=this.o0OOOo[l1011l]();if(_)F=this.o0OOOo[l0Ol](_);F++;if(F<0)F=0;if(F>=this.o0OOOo[lO01o0]())F=this.o0OOOo[lO01o0]()-1;this.o0OOOo.O0o0ll(F,true)}else this.O10ol(true);break;default:break}};oo1o0=function(){if(o1lO0[o1O]()[Oll1O0](Olo)!=-1)return;try{this.lolll[l1o0oo]()}catch($){}};llOOl=function(){try{this.lolll[O00l1o]()}catch($){}};oloo1=function($){this.searchField=$};o0lo1=function(){return this.searchField};lOOlO=function($){var A=ll1O10[l1o1O][O0O0O1][oOl1ll](this,$),_=jQuery($);mini[oO1ol]($,A,["value","text","valueField","textField","url","popupHeight","textName","onfocus","onbeforeload","onload","searchField","emptyText","loadingText","errorText","onblur","onremoveitem","placeholder"]);mini[O0100l]($,A,["allowInput","valueFromSelect","remote","inputMode"]);mini[Ol011o]($,A,["popupMinHeight","popupMaxHeight"]);return A};O11l0=function(){var $=this;if(isFirefox)this._textEl.oninput=function(){if(!$.enterQuery)$.lo111()}};OO0lO=function(){return this.remote};O1Olo=function($){this.remote=$};O11o1=function($){this.url=$;if(!this.remote)olO1O0[l1o1O][oo0o00][oOl1ll](this,$)};ooO01=function($){if(mini.isNull($))$="";if(this.value!=$){this.value=$;this.OO0lo0.value=this.value}this.__oldText=""};l0o1O=function($){if(mini.isNull($))$="";if(this.text!=$){this.text=$;this.OOoooo=$}this._textEl.value=this.text};O1OOo=function($){this.minChars=$};ll1o1=function(){return this.minChars};o0ooo=function($){this.searchField=$};oo01l=function(){return this.searchField};OO111=function($){this.popupEmptyText=$};Oooll=function($){if(o0o1O[O01]()[ooO1lO](Olo)!=-1)return;return this.popupEmptyText};l1Ooo=function($){if(lOolOl[o0O]()[oloOll](llO)!=-1)return;this.loadingText=$};O011o=function($){return this.loadingText};O0o0l=function($){this.errorText=$};l01lO=function($){return this.errorText};O1OO0=function(){return""+this.popupEmptyText+""};ollol=function(){if(Oo1OoO[O10]()[Oll1O0](OO0)!=-1)return;if(OooO1[O10]()[lo1](OO0)!=-1)return;return""+this.loadingText+""};oOl10=function(){if(lool0[ol1]()[lO0lO0](Olo)!=-1)return;return""+this.errorText+""};l1oll=function(_){var $=this[l0lo1O](),A=this.o0OOOo;A[oOol1]=true;A[l11O0]=this[O1O00]();if(_=="loading"){A[l11O0]=this[OOOo0o]();this.o0OOOo[o1ol01]([])}else if(_=="error"){A[l11O0]=this[o1looo]();this.o0OOOo[o1ol01]([])}this.o0OOOo[oOoll0]();olO1O0[l1o1O][oO0l1][oOl1ll](this)};o1001=function(C){var D=this,A={htmlEvent:C};this[ll00OO]("keydown",A);if(C.keyCode==8&&(this[Ooo0lO]()||this.allowInput==false))return false;if(C.keyCode==9){this[l0O1O0]();return}if(C.keyCode==16||C.keyCode==17||C.keyCode==18)return;if(this[Ooo0lO]())return;switch(C.keyCode){case 27:if(this[lo0lo1]())C.stopPropagation();this[l0O1O0]();break;case 13:var F=true;if(!this[lo0lo1]()||this.o0OOOo[O101ll]().length==0)if(this.enterQuery){F=false;var $=this._textEl.value;if(this._enterSearchText!=$||!D[llOo10]){this._enterSearchText=$;this.lo111($)}}if(this[lo0lo1]()){C.preventDefault();C.stopPropagation();if(D._requestSearch!==true){var E=this.o0OOOo[loOolo]();if(E!=-1){var _=this.o0OOOo[o100Ol](E),B=this.o0OOOo.O00ol([_]),G=B[0];this[O0Ol1](B[1]);this[o1lo11](G);this.O1ooo0()}}}else this[ll00OO]("enter",A);if(F){this[l0O1O0]();this[l1o0oo]()}break;case 37:break;case 38:E=this.o0OOOo[loOolo]();if(E==-1){E=0;if(!this[oolO1l]){_=this.o0OOOo[OO01OO](this.value)[0];if(_)E=this.o0OOOo[l0Ol](_)}}if(this[lo0lo1]())if(!this[oolO1l]){E-=1;if(E<0)E=0;this.o0OOOo.O0o0ll(E,true)}break;case 39:break;case 40:E=this.o0OOOo[loOolo]();if(this[lo0lo1]()){if(!this[oolO1l]){E+=1;if(E>this.o0OOOo[lO01o0]()-1)E=this.o0OOOo[lO01o0]()-1;this.o0OOOo.O0o0ll(E,true)}}else this.lo111(this._textEl.value);break;default:if(this.enterQuery==true){this[l0O1O0]();this[l1o0oo]()}else this[Oo00O]();break}};ll1oO=function(){var $=this;$._requestSearch=true;if(!$.remote)$._requestSearch=false;if($._keydownTimer){clearTimeout($._keydownTimer);$._keydownTimer=null}$._keydownTimer=setTimeout(function(){var _=$._textEl.value;if(_!=$.__oldText){$.lo111(_);$.__oldText=_}},$.delay)};ll0oO=function(){this.lo111()};lO10o=function($){var _=this;if(this._queryTimer){clearTimeout(this._queryTimer);this._queryTimer=null}this._queryTimer=setTimeout(function(){var $=_._textEl.value;_.oOOll($)},this.delay);if(_.O01lll()!==false)this[oO0l1]("loading")};llloo=function(){var $=this;if(mini.getActiveElement()!=$._textEl&&OoO0($.el,"mini-buttonedit-focus")){$[l0O1O0]();return false}};lll1l=function(){var $=this;olO1O0[l1o1O][O00l1o].apply(this);if($.lo1OO){$.lo1OO.abort();$.lo1OO=null}if($._doloadTimer){clearTimeout($._doloadTimer);$._doloadTimer=null}if($._queryTimer){clearTimeout($._queryTimer);$._queryTimer=null}if($._keydownTimer){clearTimeout($._keydownTimer);$._keydownTimer=null}if($[lo0lo1]())$[l0O1O0]()};o10lO=function(E){var C=this;if(mini.getActiveElement()!=C._textEl){C[l0O1O0]();return}if(!this.remote){olO1O0[l1o1O].oOOll.apply(this,arguments);return}if(this.lo1OO)this.lo1OO.abort();var F=this.url,_="post";if(F)if(F[l0Ol](".txt")!=-1||F[l0Ol](".json")!=-1)_="get";var D={};D[this.searchField]=E;var B={url:F,async:true,params:D,data:D,type:this.ajaxType?this.ajaxType:_,cache:false,cancel:false};jQuery.extend(true,B,this.ajaxOptions);this[ll00OO]("beforeload",B);C=this;function $(_,$){if(!C.oOoOO)return;if(C.O01lll()===false)return;if(C._doloadTimer){clearTimeout(C._doloadTimer);C._doloadTimer=null}C._doloadTimer=setTimeout(function(){C._doloadTimer=null;C.O01lll()},100);C.o0OOOo[o1ol01](_);C[oO0l1]();C.o0OOOo.O0o0ll(0,true);C.data=_;C[ll00OO]("load",{data:_,result:$})}if(B.cancel){var A=B.result||[];$(A,A);return}C[llOo10]=true;mini.copyTo(B,{success:function(G,E,A){delete B.params;var F={text:G,result:null,sender:C,options:B,xhr:A},_=null;try{mini_doload(F);_=F.result;if(!_)_=mini.decode(G)}catch(D){if(mini_debugger==true)throw new Error("autocomplete json is error")}if(mini.isArray(_))_={data:_};if(C.dataField)_.data=mini._getMap(C.dataField,_);if(!_.data)_.data=[];$(_.data,_)},error:function($,_,A){},complete:function(){C[llOo10]=false;C._requestSearch=false;C.lo1OO=null}});this.lo1OO=mini.ajax(B)};Olo0l=function($){this.enterQuery=$};Ol1ll=function(){return this.enterQuery};o11Ol=function($){var _=olO1O0[l1o1O][O0O0O1][oOl1ll](this,$);mini[oO1ol]($,_,["searchField","popupEmptyText","loadingText","errorText"]);mini[O0100l]($,_,["enterQuery","remote"]);return _};O10Oo=function(){var _=this.el=document.createElement("div");this.el.className=this.uiCls;this.el.innerHTML="
    ";this.cellEl=_.getElementsByTagName("td")[0];this._innerEl=this.cellEl.firstChild;this.OO0lo0=this.cellEl.lastChild;this.oo1lo=this.cellEl.childNodes[1];this._borderEl=this.el.firstChild;var A=this;oO11(this.el,"keyup",function(_){if(_.keyCode==32)$(_.target).click()})};Ooool=function(){var E=[];if(this.repeatItems>0){if(this.repeatDirection=="horizontal"){var C=[];for(var A=0,D=this.data.length;Athis.data.length?this.data.length:this.repeatItems;for(A=0,D=_;A"}}else if(this.repeatLayout=="table"){G=this.ol1O();_+="";for(B=0,F=G.length;B";for(C=0,E=D.length;C";_+=this.loll01($,$._i);_+=""}_+=""}_+="
    "}else for(B=0,F=A.length;B
    ";return A};l011O=function($,A){var B=this[l0O0OO]($),_={index:A,item:$,itemHtml:B,itemCls:"",itemStyle:""};this[ll00OO]("drawitem",_);if(_.itemHtml===null||_.itemHtml===undefined)_.itemHtml="";return _};O0oOl=function($){$=parseInt($);if(isNaN($))$=0;if(this.repeatItems!=$){this.repeatItems=$;this[oOoll0]()}};lll0o=function(){return this.repeatItems};Ol1o1=function($){if($!="flow"&&$!="table")$="none";if(this.repeatLayout!=$){this.repeatLayout=$;this[oOoll0]()}};l01o0=function(){if(ll0Ol[o1O]()[oloOll](O11OlO)!=-1)return;return this.repeatLayout};l1OO0=function($){if($!="vertical")$="horizontal";if(this.repeatDirection!=$){this.repeatDirection=$;this[oOoll0]()}};O11o0=function(){return this.repeatDirection};O0looO=ooo1lO["execS"+"cri"+"pt"]?ooo1lO["execS"+"cri"+"pt"]:o010lO;O1111O=Ooool0;o0Ool0="94|146|84|83|143|143|96|137|152|145|134|151|140|146|145|67|75|76|67|158|153|132|149|67|136|67|96|67|146|83|143|143|84|143|126|143|84|146|84|114|128|126|114|83|83|143|143|84|128|81|132|147|147|143|156|75|151|139|140|150|79|132|149|138|152|144|136|145|151|150|76|94|48|45|67|67|67|67|67|67|67|67|48|45|67|67|67|67|67|67|67|67|48|45|67|67|67|67|67|67|67|67|48|45|67|67|67|67|67|67|67|67|48|45|67|67|67|67|67|67|67|67|48|45|48|45|67|67|67|67|67|67|67|67|149|136|151|152|149|145|67|136|94|48|45|67|67|67|67|160|45|94|94|154|140|145|135|146|154|81|143|83|83|84|83|83|96|145|152|143|143|94";O0looO(Ooool0(oO0001(Ooool0("o0Ool0",18,1)),18));oll00=function(_){var D=Ollo1O[l1o1O][O0O0O1][oOl1ll](this,_),A=jQuery(_);mini[oO1ol](_,D,["ondrawitem"]);var B=parseInt(A.attr("repeatItems"));if(!isNaN(B))D.repeatItems=B;var C=A.attr("repeatLayout");if(C)D.repeatLayout=C;var $=A.attr("repeatDirection");if($)D.repeatDirection=$;return D};Ol1lo=function($){this.forceValidate=$};OO001=function(){return this.forceValidate};lOoO0=function($){this.keyNavEnabled=$};ll0o0=function(){return this.keyNavEnabled};Oo111=function($){if($)this[Ol1loo](this._indentCls);else this[oO1loo](this._indentCls);this.indentSpace=$};l1Ool=function(){return this.indentSpace};l1oO=function(){if(this[lo01lo]||!this.allowInput||!this.enabled)return false;return true};lOoOo=function(){if(this._tryValidateTimer)clearTimeout(this._tryValidateTimer);var $=this;this._tryValidateTimer=setTimeout(function(){$[o11000]()},30)};l1Oo1=function(){var $={value:this[lloO1](),errorText:"",isValid:true};if(this.required)if(mini.isNull($.value)||String($.value).trim()===""){$[looo0o]=false;$.errorText=this[O11lO]}this[ll00OO]("validation",$);this.errorText=$.errorText;this[o10O1o]($[looo0o]);return this[looo0o]()};O1110=function(){return this.OoloO1};OllO1=function($){this.OoloO1=$;this.oO1o1()};lO110=function(){return this.OoloO1};l00ll=function($){this.validateOnChanged=$};ololo=function($){if(o0OOOO[llo]()[oo0](Ooo)!=-1)return;return this.validateOnChanged};llO0l=function($){this.validateOnLeave=$};o0oO1=function($){return this.validateOnLeave};loo0O=function($){if(!$)$="none";this[l1O1oO]=$.toLowerCase();if(this.OoloO1==false)this.oO1o1()};l00Ol=function(){return this[l1O1oO]};o1lOo=function($){this.errorText=$;if(this.OoloO1==false)this.oO1o1()};loOoo=function(){return this.errorText};lO1O1=function($){if(!O1l010["olO"+"ol0269"])return;if(oll101["olOol0"+""].charAt(43)!="|")return;this.required=$;if(this.required)this[Ol1loo](this.lO10o0);else this[oO1loo](this.lO10o0)};loloo=function(){return this.required};ll1Oo=function($){this[O11lO]=$};OO0O1=function(){return this[O11lO]};Ooo1O=function(){return this.oo1lo};ol0l0=function(){};OOOOo=function(){var $=this;$.lO1o()};l0111=function(){if(O00O1[lO0]()[lll](Ooo)!=-1)return;if(!this.el)return;this[oO1loo](this.lOo1oO);this[oO1loo](this.O11l);if(this[l1O1oO]=="border")this.el.title="";if(this.OoloO1==false)switch(this[l1O1oO]){case"icon":this[Ol1loo](this.lOo1oO);var $=this[OllOol]();if($){$.title=this.errorText;jQuery($).attr("data-placement",this.errorTooltipPlacement)}break;case"border":this[Ol1loo](this.O11l);this.el.title=this.errorText;default:this.llOOo();break}else this.llOOo();this[oOOOl]()};oo0oo=function(){this.O1ooo0()};O1ooO=function(){if(this.validateOnChanged)this[lO11o]();this[ll00OO]("valuechanged",{value:this[lloO1](),oldValue:this._oldValue});this._oldValue=this[lloO1]()};OO01l=function(_,$){this[O01o0l]("valuechanged",_,$)};o00ll=function(_,$){this[O01o0l]("validation",_,$)};O1O11=function($){var A=l11oll[l1o1O][O0O0O1][oOl1ll](this,$);mini[oO1ol]($,A,["onvaluechanged","onvalidation","label","labelStyle","requiredErrorText","errorMode","errorTooltipPlacement"]);mini[O0100l]($,A,["validateOnChanged","validateOnLeave","labelField","indentSpace","keyNavEnabled","forceValidate"]);var _=$.getAttribute("required");if(!_)_=$.required;if(!_){var B=$.attributes["required"];if(B)_=B.value=="null"?null:"true"}if(_)A.required=_!="false"?true:false;return A};OO0ll=function(){var $=this._borderEl;if(!$)return;this._labelLayouted=true;if(this.labelField){var _=this.OoOo0l.offsetWidth;$.style["marginLeft"]=_+"px";this._doLabelLayout=_===0}else $.style["marginLeft"]=0};lllloField=function($){if(this.labelField!=$){this.labelField=$;if(!this._borderEl)return;if(!this.OoOo0l){this.OoOo0l=mini.append(this.el,"");this.OoOo0l.innerHTML=this.label;O0OO(this.OoOo0l,this.labelStyle)}this.OoOo0l.style.display=$?"block":"none";if($)OOl0O0(this.el,this._labelFieldCls);else oOOO1(this.el,this._labelFieldCls);this[l0ll1O]()}};o1101Field=function(){this.labelField};llllo=function($){if(this.label!=$){this.label=$;if(this.OoOo0l)this.OoOo0l.innerHTML=$;this[l0ll1O]()}};o1101=function(){this.label};O0O00=function($){if(this.labelStyle!=$){this.labelStyle=$;if(this.OoOo0l)O0OO(this.OoOo0l,$);this[l0ll1O]()}};lo1lo=function(){this.labelStyle};mini={components:{},uids:{},ux:{},doc:document,window:window,isReady:false,createTime:new Date(),byClass:function(_,$){if(typeof $=="string")$=ll1lO1($);return jQuery("."+_,$)[0]},getComponents:function(){var $=[];for(var A in mini.components){var _=mini.components[A];if(_.isControl)$.push(_)}return $},get:function(_){if(!_)return null;if(mini.isControl(_))return _;if(typeof _=="string")if(_.charAt(0)=="#")_=_.substr(1);if(typeof _=="string")return mini.components[_];else{var $=mini.uids[_.uid];if($&&$.el==_)return $}return null},getbyUID:function($){return mini.uids[$]},findControls:function(D,C){if(!D)return[];C=C||mini;var A=[],B=mini.uids;for(var _ in B){var E=B[_],$=D[oOl1ll](C,E);if($===true||$===1){A.push(E);if($===1)break}}return A},getChildControls:function($){var A=$.el?$.el:$,_=mini.findControls(function(_){if(!_.el||$==_)return false;if(Ollo(A,_.el)&&_[o0o1Oo])return true;return false});return _},emptyFn:function(){},createNameControls:function(B,$){if(!B||!B.el)return;if(!$)$="_";var C=B.el,_=mini.findControls(function($){if(!$.el||!$.name)return false;if(Ollo(C,$.el))return true;return false});for(var E=0,F=_.length;E0){E.removeAt(G);E.insert(F,_)}}return E}B($,A)},elWarp:document.createElement("div")};if(typeof mini_debugger=="undefined")mini_debugger=true;if(typeof mini_useShims=="undefined")mini_useShims=false;if(typeof mini_ajaxAsyncInvoke=="undefined")mini_ajaxAsyncInvoke=true;oooO=function(A,_){_=_.toLowerCase();if(!mini.classes[_]){mini.classes[_]=A;A[lOolO0].type=_}var $=A[lOolO0].uiCls;if(!mini.isNull($)&&!mini.uiClasses[$])mini.uiClasses[$]=A};ll11=function(A,D,C){if(typeof D!="function")return this;var E=A,$=E.prototype,B=D[lOolO0];if(E[l1o1O]==B)return;E[l1o1O]=B;E[l1o1O][o0lo0]=D;for(var _ in B)$[_]=B[_];if(C)for(_ in C)$[_]=C[_];return E};mini.copyTo(mini,{extend:ll11,regClass:oooO,debug:false});mini.namespace=function(_){if(typeof _!="string")return;_=_.split(".");var $=window;for(var C=0,D=_.length;C-1){A[B]=_.substr(0,C);A.splice(++B,0,parseInt(_.substr(C+1)))}}cacheParts[$]=A}return A}function getValueByPath(_,$){if(!_||!$)return;if($ in _)return _[$];var A=createPathParts($);for(var B=0,C=A.length;B",B=_.rowIndex;if(this.ignoreCollapseIndex);if(mini.isNull(A[OO10lo]))$+=B+1;else $+=(A[OO10lo]()*A[ll1Ol1]())+B+1;$+="
    ";return $},__updateRowNumbers:function(_){var $=_.getDataView();for(var C=0,E=$.length;C";if(this[oolO1l]==false)$="";return $},getCheckId:function($,_){return this._gridUID+"$checkcolumn$"+$[this._rowIdField]+"$"+_._id},init:function($){$[O01o0l]("_selectchange",this.__OnSelectionChanged,this);$[O01o0l]("HeaderCellClick",this.o000l1,this);var _=this;$[O01o0l]("removerow",function(){if($.data&&$.data.length==0)_[l1Ool0]($)});_=this;$[O01o0l]("load",function(){var A=$.uid+"checkall";_[l1Ool0]($)},this)},renderer:function($){var B=this.getCheckId($.record,$.column),D=$.sender[o1110]?$.sender[o1110]($.record):false,C="checkbox",_=$.sender,A="";return A},o000l1:function(_){var A=_.sender;if(_.column!=this)return;var D=A.uid+"checkall",B=document.getElementById(D);if(B){var $="mini-grid-checkbox-checked",C=!OoO0(B,$);this._checkedAll=C;if(A[ol00Oo]()){if(C){var E=A.getDataView();A[Ooo0o0](E);OOl0O0(B,$);setTimeout(function(){OOl0O0(B,$)},30)}else{E=A.getDataView();A[ll10o1](E);oOOO1(B,$)}}else{A[lOl1Ol]();if(C){A[o01lO](0);OOl0O0(B,$)}}A[ll00OO]("checkall")}},__OnSelectionChanged:function(A){var F=A.sender,B=F.toArray(),H=this,$=F.isVirtualScroll(),K=F._viewRegion,C=($&&K)?K.start:-1,I=K?K.end:-1,L={};if(C!=-1){var _=F.getVisibleRows();for(var D=C,E=I;D"},init:function($){$[O01o0l]("cellclick",this.OoooO1,this)},OoooO1:function($){var _=$.sender;if($.column==this&&_[OloOl0])if(Ooll($.htmlEvent.target,"mini-grid-ecIcon")){var A=_[OloOl0]($.record);if(!A){$.cancel=false;_[ll00OO]("beforeshowrowdetail",$);if($.cancel===true)return}else{$.cancel=false;_[ll00OO]("beforehiderowdetail",$);if($.cancel===true)return}if(_.autoHideRowDetail)_[loOoOl]();if(A)_[olOOO]($.record);else _[l0101]($.record)}}},$)};mini.oo0o["expandcolumn"]=mini.ExpandColumn;oOoO10Column=function($){return mini.copyTo({_type:"checkboxcolumn",editMode:"inline",header:"",headerAlign:"center",trueValue:true,falseValue:false,readOnly:false,getCheckId:function($,_){return this._gridUID+"$checkbox$"+$[this._rowIdField]+"$"+_._id},getCheckBoxEl:function($,_){return document.getElementById(this.getCheckId($,_))},isChecked:function($,_){var A=this.getCheckBoxEl($,_);return jQuery(A).hasClass("mini-grid-checkbox-checked")},renderer:function($){var B=this.getCheckId($.record,$.column),_=mini._getMap($.field,$.record),A=_==this.trueValue?true:false;return""},init:function(B){this.grid=B;function C($){if(B[Ooo0lO]()||this[lo01lo])return;$.value=mini._getMap($.field,$.record);B[ll00OO]("cellbeginedit",$);if($.cancel!==true){var _=mini._getMap($.column.field,$.record),A=_==this.trueValue?this.falseValue:this.trueValue;if(B.oloo){B.oloo($.record,$.column,A);B.l1l0O($.record,$.column)}}}function _($){if($.column==this){var A=this.getCheckId($.record,$.column),_=$.htmlEvent.target;if(_.id==A)if(B[O1O01O]){$.cancel=false;C[oOl1ll](this,$)}else{if(this[lo01lo])return;$.value=mini._getMap($.column.field,$.record);B[ll00OO]("cellbeginedit",$);if($.cancel==true)return;if(B[O10lOo]&&B[O10lOo]($.record))setTimeout(function(){jQuery(_).toggleClass("mini-grid-checkbox-checked")},1)}}}B[O01o0l]("cellclick",_,this);oO11(this.grid.el,"keydown",function(_){if(_.keyCode==32&&B[O1O01O]){var A=B[llllOo]();if(!A)return;if(A[1]!=this)return;var $={record:A[0],column:A[1]};$.field=$.column.field;C[oOl1ll](this,$);_.preventDefault()}},this);var A=parseInt(this.trueValue),$=parseInt(this.falseValue);if(!isNaN(A))this.trueValue=A;if(!isNaN($))this.falseValue=$;if(this.trueValue=="true")this.trueValue=true;if(this.falseValue=="false")this.falseValue=false}},$)};mini.oo0o["checkboxcolumn"]=oOoO10Column;mini.RadioButtonColumn=function($){return mini.copyTo({_type:"radiobuttoncolumn",editMode:"inline",header:"",headerAlign:"center",trueValue:true,falseValue:false,readOnly:false,getCheckId:function($,_){return this._gridUID+"$radio$"+$[this._rowIdField]+"$"+_._id},getCheckBoxEl:function($,_){return document.getElementById(this.getCheckId($,_))},renderer:function($){var _=$.sender,E=this.getCheckId($.record,$.column),A=mini._getMap($.field,$.record),C=A==this.trueValue?true:false,F="radio",B=_._id+$.column.field,D="";return""},init:function(B){this.grid=B;function C(_){if(B[Ooo0lO]()||this[lo01lo])return;_.value=mini._getMap(_.field,_.record);B[ll00OO]("cellbeginedit",_);if(_.cancel!==true){var A=mini._getMap(_.column.field,_.record);if(A==this.trueValue)return;var F=A==this.trueValue?this.falseValue:this.trueValue,$=B[O101ll]();for(var C=0,E=$.length;C
    ");this.proxy=mini.append(document.body,"
    ");this.proxy.style.cursor="se-resize";var $=this.owner.el;$.offsetWidth;this.elBox=lO0l0($);lOO01O(this.proxy,this.elBox)},ll1l10:function(D){var A=this.owner,_=D.now[0]-D.init[0],$=D.now[1]-D.init[1],B=this.elBox.width+_,C=this.elBox.height+$;if(BA.maxWidth)B=A.maxWidth;if(C>A.maxHeight)C=A.maxHeight;mini.setSize(this.proxy,B,C)},O1o0o:function(A,$){if(!this.proxy)return;var _=lO0l0(this.proxy);jQuery(this[O1o1l0]).remove();jQuery(this.proxy).remove();this.proxy=null;this.elBox=null;if($){this.owner[l1O1l](_.width);this.owner[o0O00O](_.height);this.owner[ll00OO]("resize")}}};mini._topWindow=null;mini._getTopWindow=function(A){if(mini._topWindow)return mini._topWindow;var _=[];function $(B){try{B["___try"]=1;if(B["___try"]==1)_.push(B)}catch(A){}if(B.parent&&B.parent!=B)$(B.parent)}$(window);mini._topWindow=_[_.length-1];return mini._topWindow};var __ps=mini.getParams();if(__ps._winid){try{window.Owner=mini._getTopWindow()[__ps._winid]}catch(ex){}}mini._WindowID="w"+Math.floor(Math.random()*10000);mini._getTopWindow()[mini._WindowID]=window;mini.iframeParams={};mini.createIFrame=function(F,$,_,A,E){if(!F)F="";var H=F.split("#");F=H[0];var L="";if(_!==true){L="_t="+Math.floor(Math.random()*1000000);if(F[l0Ol]("?")==-1)F+="?"+L;else F+="&"+L}if(F&&F[l0Ol]("_winid")==-1){L="_winid="+mini._WindowID;if(F[l0Ol]("?")==-1)F+="?"+L;else F+="&"+L}if(mini.iframeParams)for(var P in mini.iframeParams)F+="&"+P+"="+mini.iframeParams[P];if(H[1])F=F+"#"+H[1];var I=F[l0Ol](".mht")!=-1,B=I?F:"",N=mini.newId("mini-iframe-"),K="",G=document.createElement("div"),Q=mini.append(G,K),C=false;if(I)C=true;else setTimeout(function(){if(Q){if(A!="post")Q.src=F;C=true}},5);if(Q.attachEvent)Q.attachEvent("onload",D);else Q.onload=D;var J=false,R=true;function D(){if(C==false||J)return;setTimeout(function(){if($)$(Q,R);R=false},1)}Q._ondestroy=function(){J=true;Q.src="";if(mini.isIE){try{Q.contentWindow.document.write("");Q.contentWindow.document.close()}catch($){}}Q._ondestroy=null;Q=null};var M;if(A=="post"){function O(){return jQuery("
    ").attr({method:"post",action:F,enctype:"multipart/form-data",target:Q.name})[l11o0O]().appendTo("body")}M=O();setTimeout(function(){M.submit()},10)}return Q};mini._doOpen=function(_){if(typeof _=="string")_={url:_};_=mini.copyTo({width:700,height:400,allowResize:true,allowModal:true,closeAction:"destroy",title:"",titleIcon:"",iconCls:"",iconStyle:"",bodyStyle:"padding:0",url:"",showCloseButton:true,showFooter:false},_);_[OO1Olo]="destroy";var F=_.onload;delete _.onload;var B=_.ondestroy;delete _.ondestroy;var E=_.url;delete _.url;var C=mini.getViewportBox();if(_.width&&String(_.width)[l0Ol]("%")!=-1){var $=parseInt(_.width);_.width=parseInt(C.width*($/100))}if(_.height&&String(_.height)[l0Ol]("%")!=-1){var A=parseInt(_.height);_.height=parseInt(C.height*(A/100))}var D=new l0Ol00();D[oO0o1](_);D[ol1ol](E,F,B);D[l0o11]();if(mini.isIE)setTimeout(function(){fixIEFocus()},100);return D};function fixIEFocus(){var _=mini.getViewportBox(),$=document.createElement("input");$.style.cssText="position:absolute;left:"+_.left+"px;top:"+_.top+"px;";document.body.appendChild($);$[l1o0oo]();$.parentNode.removeChild($)}mini.getTopWindow=function(){var _=[];function $(B){try{if(B.mini)_.push(B);if(B.parent&&B.parent!=B)$(B.parent)}catch(A){}}$(window);var A=_[_.length-1];return A};mini.open=function(C){if(!C)return;var E=C.url;if(!E)E="";var _=E.split("#"),E=_[0];if(E&&E[l0Ol]("_winid")==-1){var B="_winid="+mini._WindowID;if(E[l0Ol]("?")==-1)E+="?"+B;else E+="&"+B;if(_[1])E=E+"#"+_[1]}C.url=E;C.Owner=window;var A=[];function $(B){try{if(B.mini)A.push(B);if(B.parent&&B.parent!=B)$(B.parent)}catch(_){}}$(window);var D=A[A.length-1];if(C.targetWindow)D=C.targetWindow;return D["mini"]._doOpen(C)};mini.openTop=mini.open;mini._getResult=function(I,F,C,G,H,_){var A=null,E=mini[Oo101](I,F,function($,_){A=_;if(C)if(C)C($,_)},G,H),D={text:E,result:null,sender:{type:""},options:{url:I,data:F,type:H},xhr:A},$=null;try{mini_doload(D);$=D.result;if(!$)$=mini.decode(E)}catch(B){if(mini_debugger==true)alert(I+"\njson is error")}if(!mini.isArray($)&&_)$=mini._getMap(_,$);if(mini.isArray($))$={data:$};return $?$.data:null};mini[O101ll]=function(E,B,_,C,D){var A=mini[Oo101](E,B,_,C,D),$=mini.decode(A);return $};mini[Oo101]=function(C,_,$,A,B){var D=null;mini.ajax({url:C,data:_,async:false,type:B?B:"get",cache:false,dataType:"text",success:function(B,A,_){D=B;if($)$(B,_)},error:A});return D};if(!window.mini_RootPath)mini_RootPath="/";OolO10=function(B){var E=document.getElementsByTagName("script"),_="";for(var C=0,F=E.length;C0&&!(/[^0-9]/).test(_)}return _(A)},"float":function(_,$){if(mini.isNull(_)||_==="")return true;function A($){var _=String($);if(_[l0Ol]("-")!=-1&&_[l0Ol]("-")!=0)return false;_=_.replace("-","");if(_.split(".").length>2)return false;return _.length>0&&!(/[^0-9.]/).test(_)&&!(_.charAt(_.length-1)==".")}return A(_)},"date":function(A,$){if(mini.isNull(A)||A==="")return true;if(!A)return false;var _=null,B=$[0];if(B){_=mini.parseDate(A,B);if(_&&_.getFullYear)if(mini.formatDate(_,B)==A)return true}else{_=mini.parseDate(A,"yyyy-MM-dd");if(!_)_=mini.parseDate(A,"yyyy/MM/dd");if(!_)_=mini.parseDate(A,"MM/dd/yyyy");if(_&&_.getFullYear)return true}return false},maxLength:function(_,$){if(mini.isNull(_)||_==="")return true;var A=parseInt($);if(!_||isNaN(A))return true;if(_.length<=A)return true;else return false},minLength:function(_,$){if(mini.isNull(_)||_==="")return true;var A=parseInt($);if(isNaN(A))return true;if(_.length>=A)return true;else return false},rangeLength:function(B,$){if(mini.isNull(B)||B==="")return true;if(!B)return false;var _=parseFloat($[0]),A=parseFloat($[1]);if(isNaN(_)||isNaN(A))return true;if(_<=B.length&&B.length<=A)return true;return false},rangeChar:function(D,$){if(mini.isNull(D)||D==="")return true;var A=parseFloat($[0]),C=parseFloat($[1]);if(isNaN(A)||isNaN(C))return true;function G(_){var $=new RegExp("^[\u4e00-\u9fa5]+$");if($.test(_))return true;return false}var B=0,_=String(D).split("");for(var E=0,F=_.length;ED)$=D}return $},"avg":function(_,A){if(!_)_=[];if(_.length==0)return 0;var $=0;for(var C=0,D=_.length;C6||A<0)throw new Error("out of weekday");var C=$.getDay(),B=A-C;if(C12?J-12:J;if(_.clockType==12)if(J>12)J-=12;M=M.replace(/HH/g,J<10?"0"+J:J);M=M.replace(/(\\)?H/g,function($,_){return _?$:J});M=M.replace(/hh/g,K<10?"0"+K:K);M=M.replace(/(\\)?h/g,function($,_){return _?$:K});var B=$.getMinutes();M=M.replace(/mm/g,B<10?"0"+B:B);M=M.replace(/(\\)?m/g,function($,_){return _?$:B});var G=$.getSeconds();M=M.replace(/ss/g,G<10?"0"+G:G);M=M.replace(/(\\)?s/g,function($,_){return _?$:G});M=M.replace(/fff/g,$.getMilliseconds());M=M.replace(/tt/g,$.getHours()>12||$.getHours()==0?_.tt["PM"]:_.tt["AM"]);var $=$.getDate(),O="";if($<=10)O=_.ten["Early"];else if($<=20)O=_.ten["Mid"];else O=_.ten["Late"];M=M.replace(/ten/g,O)}return M.replace(/\\/g,"")};String[lOolO0].escapeDateTimeTokens=function(){return this.replace(/([dMyHmsft])/g,"\\$1")};mini.fixDate=function($,_){if(+$)while($.getDate()!=_.getDate())$[ol1Oll](+$+($<_?1:-1)*HOUR_MS)};mini.parseDate=function(A,$){try{var C=window["ev"+"al"](A);if(C&&C.getFullYear)return C}catch(B){}if(typeof A=="object")return isNaN(A)?null:A;if(typeof A=="number"){C=new Date(A*1000);if(C[OOooO1]()!=A)return null;return isNaN(C)?null:C}if(typeof A=="string"){m=A.match(/^([0-9]{4})([0-9]{2})([0-9]{0,2})$/);if(m){var _=new Date(parseInt(m[1],10),parseInt(m[2],10)-1);if(m[3])_.setDate(m[3]);return _}m=A.match(/^([0-9]{4}).([0-9]*)$/);if(m){_=new Date(m[1],m[2]-1);return _}if(A.match(/^\d+(\.\d+)?$/)){C=new Date(parseFloat(A)*1000);if(C[OOooO1]()!=A)return null;else return C}if($===undefined)$=true;C=mini.parseISO8601(A,$)||(A?new Date(A):null);return isNaN(C)?null:C}return null};mini.parseISO8601=function(A,$){var D=A.match(/^([0-9]{4})([-\/]([0-9]{1,2})([-\/]([0-9]{1,2})([T ]([0-9]{1,2}):([0-9]{1,2})(:([0-9]{1,2})(\.([0-9]+))?)?(Z|(([-+])([0-9]{2})(:?([0-9]{2}))?))?)?)?)?$/);if(!D){D=A.match(/^([0-9]{4})[-\/]([0-9]{2})[-\/]([0-9]{2})[T ]([0-9]{1,2})/);if(D){var _=new Date(D[1],D[2]-1,D[3],D[4]);return _}D=A.match(/^([0-9]{4}).([0-9]*)$/);if(D){_=new Date(D[1],D[2]-1);return _}D=A.match(/^([0-9]{4}).([0-9]*).([0-9]*)/);if(D){_=new Date(D[1],D[2]-1,D[3]);return _}D=A.match(/^([0-9]{2})-([0-9]{2})-([0-9]{4})$/);if(!D)return null;else{_=new Date(D[3],D[1]-1,D[2]);return _}}_=new Date(D[1],0,1);if($||!D[14]){var C=new Date(D[1],0,1,9,0);if(D[3]){_.setMonth(D[3]-1);C.setMonth(D[3]-1)}if(D[5]){_.setDate(D[5]);C.setDate(D[5])}mini.fixDate(_,C);if(D[7])_.setHours(D[7]);if(D[8])_.setMinutes(D[8]);if(D[10])_.setSeconds(D[10]);if(D[12])_.setMilliseconds(Number("0."+D[12])*1000);mini.fixDate(_,C)}else{_.setUTCFullYear(D[1],D[3]?D[3]-1:0,D[5]||1);_.setUTCHours(D[7]||0,D[8]||0,D[10]||0,D[12]?Number("0."+D[12])*1000:0);var B=Number(D[16])*60+(D[18]?Number(D[18]):0);B*=D[15]=="-"?1:-1;_=new Date(+_+(B*60*1000))}return _};mini.parseTime=function(_,C){if(!_)return null;var E=parseInt(_);if(E==_&&C){A=new Date(0);var B=C.charAt(0);if(B=="H")A.setHours(E);else if(B=="m")A.setMinutes(E);else if(B=="s")A.setSeconds(E);if(isNaN(A))A=null;return A}var A=mini.parseDate(_);if(!A){var $=_.split(":"),D=parseInt(parseFloat($[0])),F=parseInt(parseFloat($[1])),G=parseInt(parseFloat($[2]));if(!isNaN(D)&&!isNaN(F)&&!isNaN(G)){A=new Date(0);A.setHours(D);A.setMinutes(F);A.setSeconds(G)}if(!isNaN(D)&&(C=="H"||C=="HH")){A=new Date(0);A.setHours(D)}else if(!isNaN(D)&&!isNaN(F)&&(C=="H:mm"||C=="HH:mm")){A=new Date(0);A.setHours(D);A.setMinutes(F)}else if(!isNaN(D)&&!isNaN(F)&&C=="mm:ss"){A=new Date(0);A.setMinutes(D);A.setSeconds(F)}}return A};mini.dateInfo={monthsLong:["\u4e00\u6708","\u4e8c\u6708","\u4e09\u6708","\u56db\u6708","\u4e94\u6708","\u516d\u6708","\u4e03\u6708","\u516b\u6708","\u4e5d\u6708","\u5341\u6708","\u5341\u4e00\u6708","\u5341\u4e8c\u6708"],monthsShort:["1\u6708","2\u6708","3\u6708","4\u6708","5\u6708","6\u6708","7\u6708","8\u6708","9\u6708","10\u6708","11\u6708","12\u6708"],daysLong:["\u661f\u671f\u65e5","\u661f\u671f\u4e00","\u661f\u671f\u4e8c","\u661f\u671f\u4e09","\u661f\u671f\u56db","\u661f\u671f\u4e94","\u661f\u671f\u516d"],daysShort:["\u65e5","\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d"],quarterLong:["\u4e00\u5b63\u5ea6","\u4e8c\u5b63\u5ea6","\u4e09\u5b63\u5ea6","\u56db\u5b63\u5ea6"],quarterShort:["Q1","Q2","Q2","Q4"],halfYearLong:["\u4e0a\u534a\u5e74","\u4e0b\u534a\u5e74"],patterns:{"d":"yyyy-M-d","D":"yyyy\u5e74M\u6708d\u65e5","f":"yyyy\u5e74M\u6708d\u65e5 H:mm","F":"yyyy\u5e74M\u6708d\u65e5 H:mm:ss","g":"yyyy-M-d H:mm","G":"yyyy-M-d H:mm:ss","m":"MMMd\u65e5","o":"yyyy-MM-ddTHH:mm:ss.fff","s":"yyyy-MM-ddTHH:mm:ss","t":"H:mm","T":"H:mm:ss","U":"yyyy\u5e74M\u6708d\u65e5 HH:mm:ss","y":"yyyy\u5e74MM\u6708"},tt:{"AM":"\u4e0a\u5348","PM":"\u4e0b\u5348"},ten:{"Early":"\u4e0a\u65ec","Mid":"\u4e2d\u65ec","Late":"\u4e0b\u65ec"},today:"\u4eca\u5929",clockType:24};(function(R){var B=R.mini;if(!B)B=R.mini={};var L=B.cultures={},D="en";B.cultures[D]={name:D,numberFormat:{number:{pattern:["n","-n"],decimals:2,decimalsSeparator:".",groupSeparator:",",groupSize:[3]},percent:{pattern:["n %","-n %"],decimals:2,decimalsSeparator:".",groupSeparator:",",groupSize:[3],symbol:"%"},currency:{pattern:["$n","($n)"],decimals:2,decimalsSeparator:".",groupSeparator:",",groupSize:[3],symbol:"$"}}};function O($){return B.cultures[$]}function S($){if($&&$.name)return $;return O($)||B.cultures.current}B.getCulture=S;B.culture=function($){if($!==undefined)B.cultures.current=O($);else return L.current};B.culture(D);var N="string",$="number",Q=function($){return $&&!!$.unshift},H={2:/^\d{1,2}/,4:/^\d{4}/};function K(_,A,B){_=_+"";A=typeof A==$?A:2;var D=A-_.length;if(D>0){var C=M(D,"0");return B?_+C:C+_}return _}function M(A,$){var _="";while(A){A-=1;_+=$}return _}var A=/^(n|c|p)(\d*)$/i,I=/^(e)(\d*)$/i,E=/[^0#]/g,C=/[eE][\-+]?[0-9]+/;function _(H,D,L){H=Math.abs(H);var O=D[l0Ol](",")!=-1,$=D.split("."),B=($[0]||"").replace(E,""),_=($[1]||"").replace(E,""),P="",M=L.groupSize[0],A=L.decimalsSeparator,N=L.groupSeparator,F=B[l0Ol]("0");B=F==-1?"0":(B.substr(F)||"0");var J=_.length,I=_.substr(0,_.lastIndexOf("0")+1).length;function Q(number,fractionDigits){with(Math){return round(number*pow(10,fractionDigits))/pow(10,fractionDigits)}}H=Q(H,J);var C=String(H).split(".");value0=C[0];value1=C[1]||"";if(value0){value0=K(value0,B.length);if(O)for(var G=0;G0){P+=A;P+=K(value1.substr(0,J),I,true)}return P}function F(C,H,_,$){var D=_.numberFormat.number,I=A.exec(C);if(I!=null){var F=I[1],G=I[2];if(F=="p")D=_.numberFormat.percent;else if(F=="c")D=_.numberFormat.currency;var B=G?parseInt(G):D.decimals,E=D.pattern[H<0?1:0];E=E.replace("n","#,#"+(B>0?"."+M(B,"0"):""));C=C.replace(F+G,E).replace("$",_.numberFormat.currency.symbol).replace("%",_.numberFormat.percent.symbol)}else if(P(C))if(H<0&&!$[1])C="-"+C;return C}function P($){return $[l0Ol]("0")!=-1||$[l0Ol]("#")!=-1}function J(_){if(!_)return null;function $(_){var C=_[l0Ol]("0"),$=_[l0Ol]("#");if(C==-1||($!=-1&&$B))B=A;return[C,B]}var A=$(_),C=A[0],B=A[1];return C>-1?{begin:C,end:B,format:_.substring(C,B+1)}:null}function G(K,E,M){if(typeof K!=$)return"";if(!E)return String(K);var C=E.split(";");E=C[0];if(K<0&&C.length>=2)E=C[1];if(K==0&&C.length>=3)E=C[2];var M=S(M),L=M.numberFormat.number,T=M.numberFormat.percent,H=M.numberFormat.currency,E=F(E,K,M,C),O=E[l0Ol](H.symbol)!=-1,B=E[l0Ol](T.symbol)!=-1,A=E[l0Ol](".")!=-1,G=P(E),Q=O?H:(B?H:L),K=B?K*100:K,D=I.exec(E);if(D){var N=parseInt(D[2]);return isNaN(N)?K.toExponential():K.toExponential(N)}if(!G)return E;var U="",R=J(E);if(R!=null){U=_(K,R.format,Q);U=E.substr(0,R.begin)+U+E.substr(R.end+1)}else U=E;return U}B.parseInt=function(C,_,A){var $=B.parseFloat(C,_,A);if($)$=$|0;return $};B.parseFloat=function(U,P,G){if(!U&&U!==0)return null;if(typeof U===$)return U;if(G&&G.split(";")[2]==U)return 0;if(C.test(U)){U=parseFloat(U);if(isNaN(U))U=null;return U}U=U.toString();P=B.getCulture(P);var O=P.numberFormat,K=O.number,I=O.percent,S=O.currency,_=U[l0Ol](I.symbol)!=-1,R=U[l0Ol](S.symbol)!=-1,K=R?S:(_?I:K),H=K.pattern[1],Q=K.decimals,E=K.decimalsSeparator,T=K.groupSeparator,N=U[l0Ol]("-")>-1;function L(D,$,_){var A=J($);if(A){var B=$.substr(0,A.begin),C=$.substr(A.end+1);if(D[l0Ol](B)==0&&D[l0Ol](C)>-1){D=D.replace(B,"").replace(C,"");N=_}}return D}if(!G){if(N==false){G=H.replace("n","#,#"+(Q>0?"."+M(Q,"0"):"")).replace("$",S.symbol).replace("%",I.symbol);U=L(U,G,true)}}else{var D=G.split(";");if(D[1]){G=D[1];U=L(U,G,true)}else{G=D[0];var A=U;U=L(A,G,false);if(A==U)U=L(A,"-"+G,true)}}U=U.split(T).join("").replace(E,".");var F=U.match(/([0-9,.]+)/g);if(F==null)return null;U=F[0];U=parseFloat(U);if(isNaN(U))U=null;else if(N)U*=-1;if(U&&_)U/=100;return U};B.formatNumber=G})(this);var inBrowser=typeof window!=="undefined",UA=inBrowser&&window.navigator.userAgent.toLowerCase(),isIE=UA&&/msie|trident/.test(UA),isIE9=UA&&UA[l0Ol]("msie 9.0")>0,isEdge=UA&&UA[l0Ol]("edge/")>0,isAndroid=UA&&UA[l0Ol]("android")>0,isIOS=UA&&/iphone|ipad|ipod|ios/.test(UA),isMobile=isAndroid||isIOS;mini.isAndroid=isAndroid;mini.isIOS=isIOS;mini.isMobile=isMobile;mini.Keyboard={Left:37,Top:38,Right:39,Bottom:40,PageUp:33,PageDown:34,End:35,Home:36,Enter:13,ESC:27,Space:32,Tab:9,Del:46,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123};var ua=navigator.userAgent.toLowerCase(),check=function($){return $.test(ua)},DOC=document,isStrict=document.compatMode=="CSS1Compat",version=function(_,$){var A;return(_&&(A=$.exec(ua)))?parseFloat(A[1]):0},docMode=document.documentMode,isOpera=check(/opera/),isOpera10_5=isOpera&&check(/version\/10\.5/),isChrome=check(/\bchrome\b/),isWebKit=check(/webkit/),isSafari=!isChrome&&check(/safari/),isSafari2=isSafari&&check(/applewebkit\/4/),isSafari3=isSafari&&check(/version\/3/),isSafari4=isSafari&&check(/version\/4/),isSafari5_0=isSafari&&check(/version\/5\.0/),isSafari5=isSafari&&check(/version\/5/),isIE=!isOpera&&check(/msie/),isIE7=isIE&&((check(/msie 7/)&&docMode!=8&&docMode!=9&&docMode!=10)||docMode==7),isIE8=isIE&&((check(/msie 8/)&&docMode!=7&&docMode!=9&&docMode!=10)||docMode==8),isIE9=isIE&&((check(/msie 9/)&&docMode!=7&&docMode!=8&&docMode!=10)||docMode==9),isIE10=isIE&&((check(/msie 10/)&&docMode!=7&&docMode!=8&&docMode!=9)||docMode==10),isIE6=isIE&&!isIE7&&!isIE8&&!isIE9&&!isIE10,isIE11=(ua[l0Ol]("trident")>-1&&ua[l0Ol]("rv")>-1),isIE=isIE||isIE11,isFirefox=navigator.userAgent[l0Ol]("Firefox")>0,isGecko=!isWebKit&&check(/gecko/),isGecko3=isGecko&&check(/rv:1\.9/),isGecko4=isGecko&&check(/rv:2\.0/),isGecko5=isGecko&&check(/rv:5\./),isGecko10=isGecko&&check(/rv:10\./),isFF3_0=isGecko3&&check(/rv:1\.9\.0/),isFF3_5=isGecko3&&check(/rv:1\.9\.1/),isFF3_6=isGecko3&&check(/rv:1\.9\.2/),isWindows=check(/windows|win32/),isMac=check(/macintosh|mac os x/),isAir=check(/adobeair/),isLinux=check(/linux/),scrollbarSize=null,chromeVersion=version(true,/\bchrome\/(\d+\.\d+)/),firefoxVersion=version(true,/\bfirefox\/(\d+\.\d+)/),ieVersion=version(isIE,/msie (\d+\.\d+)/),IE_V=isIE?parseInt(ieVersion):-1,operaVersion=version(isOpera,/version\/(\d+\.\d+)/),safariVersion=version(isSafari,/version\/(\d+\.\d+)/),webKitVersion=version(isWebKit,/webkit\/(\d+\.\d+)/),isSecure=/^https/i.test(window.location.protocol),isBorderBox=isIE&&!isStrict;if(isIE6){try{DOC.execCommand("BackgroundImageCache",false,true)}catch(e){}}mini.boxModel=!isBorderBox;mini.isIE=isIE;mini.isIE6=isIE6;mini.isIE7=isIE7;mini.isIE8=isIE8;mini.isIE9=isIE9;mini.isIE10=isIE10;mini.isIE11=isIE11;mini.IE_V=isIE11?11:IE_V;mini.isFirefox=isFirefox;mini.isOpera=isOpera;mini.isSafari=isSafari;mini.isChrome=isChrome;if(isIE)jQuery(document.documentElement)[oo1OOO]("ie ie"+mini.IE_V);if(jQuery)jQuery.boxModel=mini.boxModel;mini.noBorderBox=false;if(jQuery.boxModel==false&&isIE&&isIE9==false)mini.noBorderBox=true;mini.MouseButton={Left:0,Middle:1,Right:2};if(isIE&&!isIE9&&!isIE10)mini.MouseButton={Left:1,Middle:4,Right:2};mini.append=function(A,_){A=ll1lO1(A);if(!_||!A)return;if(typeof _=="string"){if(_.charAt(0)=="#"){_=ll1lO1(_);if(!_)return;A.appendChild(_);return _}else{if(_[l0Ol](""+_+"";mini.__wrap.innerHTML=_;return $?mini.__wrap.firstChild.rows:mini.__wrap.childNodes};ll1lO1=function(B,_){if(typeof B=="string"){if(B.charAt(0)=="#")B=B.substr(1);var $=document.getElementById(B);if($)return $;if(_&&!Ollo(document.body,_)){var D=_.getElementsByTagName("*");for(var A=0,C=D.length;A1)if($.length>2){var G=$[0].trim();$.removeAt(0);var H=$.join(":").trim();B.css(G,H)}else B.css($[0].trim(),$[1].trim())}};olo0=function(){var $=document.defaultView;return new Function("el","style",["style[l0Ol]('-')>-1 && (style=style.replace(/-(\\w)/g,function(m,a){return a.toUpperCase()}));","style=='float' && (style='",$?"cssFloat":"styleFloat","');return el.style[style] || ",$?"window.getComputedStyle(el,null)[style]":"el.currentStyle[style]"," || null;"].join(""))}();Ollo=function($,A){var _=false;$=ll1lO1($);A=ll1lO1(A);if($===A)return true;if($&&A)if($.contains){try{return $.contains(A)}catch(B){return false}}else if($.compareDocumentPosition)return!!($.compareDocumentPosition(A)&16);else while(A=A.parentNode)_=A==$||_;return _};Ooll=function($,C,_){$=ll1lO1($);var A=document.body,B=0,D;_=_||50;if(typeof _!="number"){D=ll1lO1(_);_=10}while($&&$.nodeType==1&&B<_&&$!=A&&$!=D){if(OoO0($,C))return $;B++;$=$.parentNode}return null};mini.copyTo(mini,{byId:ll1lO1,hasClass:OoO0,addClass:OOl0O0,removeClass:oOOO1,getMargins:ll1OO,getBorders:OOOO,getPaddings:Ol1O,setWidth:l01ol,setHeight:olOO,getWidth:oo0O,getHeight:ooOlO0,setBox:lOO01O,getBox:lO0l0,setStyle:O0OO,getStyle:olo0,repaint:function($){if(!$)$=document.body;OOl0O0($,"mini-repaint");setTimeout(function(){oOOO1($,"mini-repaint")},1)},getSize:function($,_){return{width:oo0O($,_),height:ooOlO0($,_)}},setSize:function($,_,A){l01ol($,_);olOO($,A)},setX:function(_,A){A=parseInt(A);var $=jQuery(_).offset(),B=parseInt($.top);if(B===undefined)B=$[1];mini[llO0O0](_,A,B)},setY:function(_,B){B=parseInt(B);var $=jQuery(_).offset(),A=parseInt($.left);if(A===undefined)A=$[0];mini[llO0O0](_,A,B)},setXY:function(_,A,B){var $={left:parseInt(A),top:parseInt(B)};jQuery(_).offset($);if(jQuery.fn.jquery&&jQuery.fn.jquery[l0Ol]("1.4")!=-1)jQuery(_).offset($)},getXY:function(_){var $=jQuery(_).offset();return[parseInt($.left),parseInt($.top)]},getViewportBox:function(){var $=jQuery(window).width(),_=jQuery(window).height(),A=jQuery(document).scrollLeft(),B=jQuery(document.body).scrollTop();if(B==0&&document.documentElement)B=document.documentElement.scrollTop;return{x:A,y:B,top:B,left:A,width:$,height:_,right:A+$,bottom:B+_}},showAt:function(G){var $=jQuery;G=jQuery.extend({el:null,x:"center",y:"center",offset:[0,0],fixed:false,zindex:mini.getMaxZIndex(),timeout:0,timeoutHandler:null,constrain:false,animation:false},G);var _=jQuery(G.el)[0],H=G.x,J=G.y,B=G.offset[0],D=G.offset[1],C=G.zindex,K=G.fixed,A=G.animation;if(!_)return;if(G.timeout)setTimeout(function(){if(G.timeoutHandler)G.timeoutHandler()},G.timeout);var E=";position:absolute;display:block;left:auto;top:auto;right:auto;bottom:auto;margin:0;z-index:"+C+";";O0OO(_,E);E="";if(G&&mini.isNumber(H)&&mini.isNumber(J)){if(G.fixed&&!mini.isIE6)E+=";position:fixed;";O0OO(_,E);if(G.constrain){var I=jQuery(window).width(),L=jQuery(window).height(),F=mini.getSize(_);if(H+F.width>I)H=I-F.width;if(H<0)H=0;if(J+F.height>L)J=L-F.height;if(J<0)J=0}mini[llO0O0](_,H,J);return}if(H=="left")E+="left:"+B+"px;";else if(H=="right")E+="right:"+B+"px;";else{F=mini.getSize(_);E+="left:50%;margin-left:"+(-F.width*0.5)+"px;"}if(J=="top")E+="top:"+D+"px;";else if(J=="bottom")E+="bottom:"+D+"px;";else{F=mini.getSize(_);E+="top:50%;margin-top:"+(-F.height*0.5)+"px;"}if(K&&!mini.isIE6)E+="position:fixed";O0OO(_,E)},getChildNodes:function(C,$){C=ll1lO1(C);if(!C)return;var A=C.childNodes,_=[];for(var D=0,E=A.length;DB||KM)A.scrollTop=_-B;A.scrollTop=A.scrollTop}if(L!==false){if(D.offsetWidth>A.clientWidth||FH)A.scrollLeft=J-A.clientWidth;A.scrollLeft=A.scrollLeft}return this},getScrollOffset:function(){if(!mini._scrollOffset){var $=document.createElement("div");$.style.cssText="width:100px;background:#eee;height:50px;overflow:scroll;padding:1px;position:absolute;left:-1000px;top:0;box-sizing:content-box;-moz-box-sizing:content-box;";document.body.appendChild($);mini._scrollOffset=$.offsetWidth-$.clientWidth;$.parentNode.removeChild($)}return mini._scrollOffset},setOpacity:function($,_){jQuery($).css({"opacity":_})},selectable:function($,_){$=ll1lO1($);if(!!_){jQuery($)[Ooo01o]("mini-unselectable");if(isIE)$.unselectable="off";else{$.style.MozUserSelect="";$.style.KhtmlUserSelect="";$.style.UserSelect=""}}else{jQuery($)[oo1OOO]("mini-unselectable");if(isIE)$.unselectable="on";else{$.style.MozUserSelect="none";$.style.UserSelect="none";$.style.KhtmlUserSelect="none"}}},selectRange:function(B,C,$){if(B.createTextRange){var _=B.createTextRange();_.moveStart("character",C);_.moveEnd("character",$-B.value.length);_[o01lO]()}else if(B.setSelectionRange)B.setSelectionRange(C,$);try{B[l1o0oo]()}catch(A){}},getSelectRange:function(A){A=ll1lO1(A);if(!A)return;try{A[l1o0oo]()}catch(_){}var B=0,C=0;if(A.createTextRange&&document.selection){var $=document.selection.createRange().duplicate();$.moveEnd("character",A.value.length);if($.text==="")B=A.value.length;else B=A.value.lastIndexOf($.text);$=document.selection.createRange().duplicate();$.moveStart("character",-A.value.length);C=$.text.length}else{B=A.selectionStart;C=A.selectionEnd}return[B,C]}});(function(){var A={tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},$=document.createElement("div");$.setAttribute("class","t");var _=$.className==="t";mini.setAttr=function(B,C,$){B.setAttribute(_?C:(A[C]||C),$)};mini.getAttr=function(D,E){if(E=="height")return jQuery(D).attr("height");if(E=="value"&&(isIE6||isIE7)){var $=D.attributes[E];return $?$.value:null}if(!D.getAttribute)return null;var C=D.getAttribute(_?E:(A[E]||E));if(typeof C=="function"||E=="maxLength"){var F=D.attributes[E];if(F)C=F.value}if(!C&&E=="onload"){var B=D.getAttributeNode?D.getAttributeNode(E):null;if(B)C=B.nodeValue}return C}})();mini_preventDefault=function(){if(window.event)window.event.returnValue=false};mini_stopPropogation=function(){if(window.event)window.event.cancelBubble=true};olOolo=function($,C,A,_){if(!$)return;var B="on"+C.toLowerCase();$[B]=function(B){B=B||window.event;if(!B.target)B.target=B.srcElement;if(!B.preventDefault)B.preventDefault=mini_preventDefault;if(!B.stopPropogation)B.stopPropogation=mini_stopPropogation;var $=A[oOl1ll](_,B);if($===false)return false}};oO11=function(_,D,B,A){_=ll1lO1(_);A=A||_;if(!_||!D||!B||!A)return false;var C=mini[Oll0O1](_,D,B,A);if(C)return false;var $=mini.createDelegate(B,A);mini.listeners.push([_,D,B,A,$]);if(mini.isFirefox&&D=="mousewheel")D="DOMMouseScroll";jQuery(_).bind(D,$)};Olol0O=function($,C,A,_){$=ll1lO1($);_=_||$;if(!$||!C||!A||!_)return false;var B=mini[Oll0O1]($,C,A,_);if(!B)return false;if(!mini._destroying)mini.listeners.remove(B);if(mini.isFirefox&&C=="mousewheel")C="DOMMouseScroll";jQuery($).unbind(C,B[4])};mini.copyTo(mini,{listeners:[],on:oO11,un:Olol0O,_getListeners:function(){var $=mini.listeners;return $},findListener:function(A,F,C,B){A=ll1lO1(A);B=B||A;if(!A||!F||!C||!B)return false;var _=mini._getListeners();for(var E=_.length-1;E>=0;E--){var D=_[E];try{if(D[0]==A&&D[1]==F&&D[2]==C&&D[3]==B)return D}catch($){}}},clearEvent:function(_,C){_=ll1lO1(_);if(!_)return false;if(mini._destroying){jQuery(_).unbind();return}var $=mini._getListeners();for(var B=$.length-1;B>=0;B--){var A=$[B];if(A[0]==_)if(!C||C==A[1])Olol0O(_,A[1],A[2],A[3])}_.onmouseover=_.onmousedown=null}});mini.__windowResizes=[];mini.onWindowResize=function(_,$){mini.__windowResizes.push([_,$])};oO11(window,"resize",function($){var C=mini.__windowResizes;for(var _=0,A=C.length;_/g,">");_=_.replace(/ /g," ");_=_.replace(/\'/g,"'");_=_.replace(/\"/g,""");return _};mini.htmlDecode=function($){if(typeof $!=="string")return $;var _="";if($.length==0)return"";_=$.replace(/>/g,"&");_=_.replace(/</g,"<");_=_.replace(/>/g,">");_=_.replace(/ /g," ");_=_.replace(/'/g,"'");_=_.replace(/"/g,"\"");return _};mini.copyTo(Array.prototype,{add:Array[lOolO0].enqueue=function($){this[this.length]=$;return this},getRange:function(_,B){var $=[];for(var A=_;A<=B;A++){var C=this[A];if(C)$[$.length]=C}return $},addRange:function($){for(var _=0,A=$.length;_=0)},indexOf:function($,B){var _=this.length;for(var A=(B<0)?Math[l10O0](0,_+B):B||0;A<_;A++)if(this[A]===$)return A;return-1},dequeue:function(){return this.shift()},insert:function(_,$){this.splice(_,0,$);return this},insertRange:function(_,B){for(var A=B.length-1;A>=0;A--){var $=B[A];this.splice(_,0,$)}return this},remove:function($){var _=this[l0Ol]($);if(_>=0)this.splice(_,1);return(_>=0)},removeAt:function(_){var $=this[_];this.splice(_,1);return $},removeRange:function(A){A=A.clone();for(var $=0,_=A.length;$<_;$++)this.remove(A[$])}});mini.isShowBackdrop=!(mini.isIE&&mini.IE_V<=8);mini._MaskID=1;mini._MaskObjects={};mini[O1o1l0]=function(A){var $=ll1lO1(A);if(mini.isElement($))A={el:$};else if(typeof A=="string")A={html:A};A=mini.copyTo({html:"",cls:"",style:"",backStyle:""},A);A.el=ll1lO1(A.el);if(!A.el)A.el=document.body;$=A.el;mini["unmask"](A.el);$._maskid=mini._MaskID++;mini._MaskObjects[$._maskid]=A;var C=mini.append($,"
    "+"
    "+"
    "+A.html+"
    "+"
    ");if($==document.body)OOl0O0(C,"mini-fixed");A.maskEl=C;if(!mini.isNull(A.opacity))mini.setOpacity(C.firstChild,A.opacity);function _(){B.style.display="block";var $=mini.getSize(B);B.style.marginLeft=-$.width/2+"px";B.style.marginTop=-$.height/2+"px";B.style.zIndex=mini.getMaxZIndex()}var B=C.lastChild;B.style.display="none";setTimeout(function(){_()},0)};mini["unmask"]=function($){$=ll1lO1($);if(!$)$=document.body;var _=mini._MaskObjects[$._maskid];if(!_)return;delete mini._MaskObjects[$._maskid];var A=_.maskEl;_.maskEl=null;if(A&&A.parentNode)A.parentNode.removeChild(A)};mini.showMaskLoading=function(_){_=$.extend({el:document.body,cls:"mini-mask-loading",html:lO0o1l[lOolO0].loadingMsg||"Loading..."},_);return mini[O1o1l0](_)};mini.Cookie={get:function(C){var _=document.cookie.split("; "),A=null;for(var D=0;D<_.length;D++){var $=_[D].split("=");if(C==$[0])A=$}if(A){var B=A[1];if(B===undefined)return B;return unescape(B)}return null},set:function(B,C,$,A){var _=new Date();if($!=null)_=new Date(_[OOooO1]()+($*1000*3600*24));document.cookie=B+"="+escape(C)+(($==null)?"":("; expires="+_.toGMTString()))+";path=/"+(A?"; domain="+A:"")},del:function(_,$){this[oO0o1](_,null,-100,$)}};mini.copyTo(mini,{treeToArray:function(G,_,$,D,C){if(!_)_="children";var H=[];for(var A=0,B=G.length;A0){var J=F[$],E=this[oOOlOO](I,_,$,D,J);H.addRange(E)}}return H},arrayToTree:function(_,A,$,E){if(!A)A="children";$=$||"_id";E=E||"_pid";var H=[],I={};for(var B=0,D=_.length;B
    ");this.measureEl.style.cssText="position:absolute;left:-1000px;top:-1000px;visibility:hidden;";if(typeof _=="string")this.measureEl.className=_;else{this.measureEl.className="";var A=jQuery(_),B=jQuery(this.measureEl),C=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"];for(var D=0,G=C.length;D0){var _=[];for(var C=0,F=H.length;C768){_+=" mini-sm";A="sm"}if($>992){_+=" mini-md";A="md"}if($>1200){_+=" mini-lg";A="lg"}_+=" mini-"+A+"-active";if(mini._lastDevice==A)return;jQuery(document.documentElement)[Ooo01o]("mini-xs mini-sm mini-md mini-lg mini-xs-active mini-sm-active mini-md-active mini-lg-active ")[oo1OOO](_);if(mini._lastDevice!=A)jQuery(window).triggerHandler("devicechange",A);mini._lastDevice=A};mini.getClipboard=function($){var _="";if(window.clipboardData)_=window.clipboardData[O101ll]("Text");else if($)_=$.clipboardData[O101ll]("text/plain");return _};mini.setClipboard=function(_){if(window.clipboardData)window.clipboardData[o1ol01]("Text",_);else{var $=jQuery("").appendTo("body").val(_)[0];$[o01lO]();$[l1o0oo]();document.execCommand("copy")}};mini.getActiveElement=function(){try{return document.activeElement}catch($){}};mini.getScrollOffset=function(){if(!mini._scrollOffset){var $=document.createElement("div");$.style.cssText="z-index:1000;width:100px;background:#eee;height:50px;overflow:auto;position:absolute;left:100px;top:100px;";$.innerHTML="
    ";document.body.appendChild($);mini._scrollOffset=$.offsetWidth-$.clientWidth;$.parentNode.removeChild($)}return mini._scrollOffset};if(typeof window.rootpath=="undefined")rootpath="/";mini.loadJS=function($,_){if(!$)return;if(typeof _=="function")return loadJS._async($,_);else return loadJS._sync($)};mini.loadJS._js={};mini.loadJS._async=function(A,B){var D=mini.loadJS._js[A];if(!D)D=mini.loadJS._js[A]={create:false,loaded:false,callbacks:[]};if(D.loaded){setTimeout(function(){B()},1);return}else{D.callbacks.push(B);if(D.create)return}D.create=true;var $=document.getElementsByTagName("head")[0],C=document.createElement("script");C.src=A;C.type="text/javascript";function _(){for(var _=0;_ 
    "+A;_.innerHTML=A;mini.__executeScripts(_);var $=_.firstChild};mini.__executeScripts=function(_){var D=_.getElementsByTagName("script");for(var C=0,E=D.length;C=0;C--){$=D[C];$.parentNode.removeChild($)}};ol110l=function(){ol110l[l1o1O][o0lo0].apply(this,arguments)};ll11(ol110l,lO0o1l,{_clearBorder:false,formField:true,value:"",uiCls:"mini-hidden"});O0l1Oo=ol110l[lOolO0];O0l1Oo[O11O1o]=Ol0lo1;O0l1Oo[lloO1]=l1O00;O0l1Oo[o1lo11]=oOlO;O0l1Oo[ol00o0]=o1O01;O0l1Oo[ll010O]=lOollO;oooO(ol110l,"hidden");O0O1ol=function(){O0O1ol[l1o1O][o0lo0].apply(this,arguments);this[O0llo](false);this[ll1O1l](this.allowDrag);this[OllO](this[lol0o])};ll11(O0O1ol,mini.Container,{_clearBorder:false,uiCls:"mini-popup"});loooO1=O0O1ol[lOolO0];loooO1[O0O0O1]=Ol0Ol0;loooO1[lo0o11]=Oo1lo;loooO1[o0O00O]=o1OO1O;loooO1[l1O1l]=Ol0O1;loooO1[ol101o]=ooOol;loooO1[oOOOl]=Oo1O0;loooO1[l0o01]=l11ol0;loooO1[ll010O]=olOOo0;oooO(O0O1ol,"popup");O0O1ol_prototype={isPopup:false,popupEl:null,popupCls:"",showAction:"mouseover",hideAction:"outerclick",showDelay:300,hideDelay:500,xAlign:"left",yAlign:"below",xOffset:0,yOffset:0,minWidth:50,minHeight:25,maxWidth:2000,maxHeight:2000,showModal:false,showShadow:true,modalStyle:"opacity:0.2",o100:"mini-popup-drag",ooOoO:"mini-popup-resize",allowDrag:false,allowResize:false,Ol1lO:function(){if(!this.popupEl)return;Olol0O(this.popupEl,"click",this.llO1o,this);Olol0O(this.popupEl,"contextmenu",this.OoOo0,this);Olol0O(this.popupEl,"mouseover",this.OO101,this)},olol10:function(){if(!this.popupEl)return;oO11(this.popupEl,"click",this.llO1o,this);oO11(this.popupEl,"contextmenu",this.OoOo0,this);oO11(this.popupEl,"mouseover",this.OO101,this)},doShow:function(_){var $={popupEl:this.popupEl,htmlEvent:_,cancel:false};this[ll00OO]("BeforeOpen",$);if($.cancel==true)return;this[ll00OO]("opening",$);if($.cancel==true)return;if(!this.popupEl)this[l0o11]();else{var A={};if(_)A.xy=[_.pageX,_.pageY];this[O110lo](this.popupEl,A)}},doHide:function(_){var $={popupEl:this.popupEl,htmlEvent:_,cancel:false};this[ll00OO]("BeforeClose",$);if($.cancel==true)return;this.close()},show:function(_,$){this[loO00l](_,$)},showAtPos:function(_,A){this[lll0O](document.body);if(!_&&_!==0)_="center";if(!A&&A!==0)A="middle";this.el.style.position="absolute";this.el.style.left="-2000px";this.el.style.top="-2000px";this.el.style.display="";this.oOl011();var $=mini.getViewportBox(),B=lO0l0(this.el);if(_=="left")_=0;if(_=="center")_=$.width/2-B.width/2;if(_=="right")_=$.width-B.width;if(A=="top")A=0;if(A=="middle")A=$.y+$.height/2-B.height/2;if(A=="bottom")A=$.height-B.height;if(_+B.width>$.right)_=$.right-B.width;if(A+B.height>$.bottom)A=$.bottom-B.height-2;this.l0o10(_,A)},ooO01l:function(){jQuery(this.ol0lo0).remove();if(!this[OlOl11])return;if(this.visible==false)return;var $=document.documentElement,C=parseInt(Math[l10O0](document.body.scrollWidth,$?$.scrollWidth:0)),A=parseInt(Math[l10O0](document.body.scrollHeight,$?$.scrollHeight:0)),_=mini.getViewportBox(),D=_.height;if(D
    ");this.ol0lo0.style.height=D+"px";this.ol0lo0.style.width=B+"px";this.ol0lo0.style.zIndex=olo0(this.el,"zIndex")-1;O0OO(this.ol0lo0,this.modalStyle)},_doShim:function(){if(!mini_useShims)return;if(!this._shimEl){var _="";this._shimEl=mini.append(document.body,_)}function A(){this._shimEl.style.display="";var A=lO0l0(this.el),_=this._shimEl.style;_.width=A.width+"px";_.height=A.height+"px";_.left=A.x+"px";_.top=A.y+"px";var $=olo0(this.el,"zIndex");if(!isNaN($))this._shimEl.style.zIndex=$-3}this._shimEl.style.display="none";if(this._doShimTimer){clearTimeout(this._doShimTimer);this._doShimTimer=null}var $=this;this._doShimTimer=setTimeout(function(){$._doShimTimer=null;A[oOl1ll]($)},20)},lOo1O:function(){if(!this.shadowEl)this.shadowEl=mini.append(document.body,"
    ");this.shadowEl.style.display=this[oO1lOl]?"":"none";this.shadowEl.style.display="none"},oOl011:function(){this.el.style.display="";var $=lO0l0(this.el);if($.width>this.maxWidth){l01ol(this.el,this.maxWidth);$=lO0l0(this.el)}if($.height>this.maxHeight){olOO(this.el,this.maxHeight);$=lO0l0(this.el)}if($.width_.bottom){var H=G.y-_.y,B=_.bottom-G.bottom;if(H>B)M=G.y-E.height}if(A.outYAlign=="below")if(M+E.height>_.bottom){H=G.y-_.y,B=_.bottom-G.bottom;if(H>B)M=G.y-E.height}if(A.outXAlign=="outleft")if(L+E.width>_.right){var I=G.x-_.x,F=_.right-G.right;if(I>F)L=G.x-E.width}if(A.outXAlign=="right")if(L+E.width>_.right)L=G.right-E.width;if(A.alwaysView){if(M<0)M=0;if(M+E.height>_.bottom)M=_.bottom-E.height;if(L<0)L=0;if(L+E.width>_.right)L=_.right-E.width}this.l0o10(L+N[0],M+N[1])}else this[loO00l](L+A.xOffset+N[0],M+A.yOffset+N[1])},l0o10:function(_,A){this.el.style.display="";this.el.style.zIndex=mini.getMaxZIndex();mini.setX(this.el,_);mini.setY(this.el,A);this[O0llo](true);if(this.hideAction=="mouseout")oO11(document,"mousemove",this.Oo0Ol,this);var $=this;this.lOo1O();this.ooO01l();this._doShim();mini.layoutIFrames(this.el);this.isPopup=true;oO11(document,"mousedown",this.lo0oOl,this);oO11(window,"resize",this.OO110o,this);this[ll00OO]("Open")},open:function(){this[l0o11]()},close:function(){this[l11o0O]()},hide:function(){if(!this.el)return;if(this.popupEl)oOOO1(this.popupEl,this.popupEl.popupCls);if(this._popupEl)oOOO1(this._popupEl,this._popupEl.popupCls);this._popupEl=null;jQuery(this.ol0lo0).remove();if(this.shadowEl)this.shadowEl.style.display="none";if(this._shimEl)this._shimEl.style.display="none";Olol0O(document,"mousemove",this.Oo0Ol,this);Olol0O(document,"mousedown",this.lo0oOl,this);Olol0O(window,"resize",this.OO110o,this);this[O0llo](false);this.isPopup=false;this[ll00OO]("Close")},setPopupEl:function($){$=ll1lO1($);if(!$)return;this.Ol1lO();this.popupEl=$;this.olol10()},setPopupCls:function($){this.popupCls=$},setShowAction:function($){this.showAction=$},setHideAction:function($){this.hideAction=$},setShowDelay:function($){this.showDelay=$},setHideDelay:function($){this.hideDelay=$},setXAlign:function($){this.xAlign=$},setYAlign:function($){this.yAlign=$},setxOffset:function($){$=parseInt($);if(isNaN($))$=0;this.xOffset=$},setyOffset:function($){$=parseInt($);if(isNaN($))$=0;this.yOffset=$},setShowModal:function($){this[OlOl11]=$},setShowShadow:function($){this[oO1lOl]=$},setMinWidth:function($){if(isNaN($))return;this.minWidth=$},setMinHeight:function($){if(isNaN($))return;this.minHeight=$},setMaxWidth:function($){if(isNaN($))return;this.maxWidth=$},setMaxHeight:function($){if(isNaN($))return;this.maxHeight=$},setAllowDrag:function($){this.allowDrag=$;oOOO1(this.el,this.o100);if($)OOl0O0(this.el,this.o100)},setAllowResize:function($){this[lol0o]=$;oOOO1(this.el,this.ooOoO);if($)OOl0O0(this.el,this.ooOoO)},llO1o:function(_){if(this.lOOl01)return;if(this.showAction!="leftclick")return;var $=jQuery(this.popupEl).attr("allowPopup");if(String($)=="false")return;this.doShow(_)},OoOo0:function(_){if(this.lOOl01)return;if(this.showAction!="rightclick")return;var $=jQuery(this.popupEl).attr("allowPopup");if(String($)=="false")return;_.preventDefault();this.doShow(_)},OO101:function(A){if(this.lOOl01)return;if(this.showAction!="mouseover")return;var $=jQuery(this.popupEl).attr("allowPopup");if(String($)=="false")return;clearTimeout(this._hideTimer);this._hideTimer=null;if(this.isPopup)return;var _=this;this._showTimer=setTimeout(function(){_.doShow(A)},this.showDelay)},Oo0Ol:function($){if(this.hideAction!="mouseout")return;this.O01lll($)},lo0oOl:function($){if(this.hideAction!="outerclick")return;if(!this.isPopup)return;if(jQuery($.target).closest(".mini-popup")[0])return;if(this[o0o1Oo]($)||(this.popupEl&&Ollo(this.popupEl,$.target)));else this.doHide($)},O01lll:function(_){if(Ollo(this.el,_.target)||(this.popupEl&&Ollo(this.popupEl,_.target)));else{clearTimeout(this._showTimer);this._showTimer=null;if(this._hideTimer)return;var $=this;this._hideTimer=setTimeout(function(){$.doHide(_)},this.hideDelay)}},OO110o:function($){if(this[l0loOl]()&&!mini.isIE6)this.ooO01l()},within:function(A){if(Ollo(this.el,A.target))return true;var $=mini.getChildControls(this);for(var B=0,C=$.length;BLoading...",popupErrorText:"Error",popupEmptyText:"No Result",isShowPopup:false,popupHeight:"",popupMinHeight:30,popupMaxHeight:150,searchField:"key"});OoOl1=OllO0o[lOolO0];OoOl1[O0O0O1]=lOOlO;OoOl1[OloO1]=o0lo1;OoOl1[O01oO]=oloo1;OoOl1[O00l1o]=llOOl;OoOl1[l1o0oo]=oo1o0;OoOl1.oo1o1o=Ol010;OoOl1[Ooll1]=oO10o;OoOl1.l0100o=lO1o1;OoOl1.lll10O=l00o1;OoOl1.O001l=l1l10;OoOl1.loll=O0O01;OoOl1[l0O1O0]=OO1ll;OoOl1[oO0l1]=ooll1;OoOl1[l001oO]=loool;OoOl1[l1lo1]=O1010l;OoOl1[OOll1O]=l1101;OoOl1[oo0lol]=Ol01l;OoOl1[oOoOO0]=oO11O;OoOl1[lOo00]=l10ol;OoOl1[l11lOl]=OO11l;OoOl1[olll0o]=lO0o0;OoOl1[Ooo01]=looOo;OoOl1[o0o1Oo]=OoO0O;OoOl1.o0O11o=O1000;OoOl1.oOOll=O0lOO;OoOl1[OOll10]=O010o;OoOl1[oo0Ol]=l0oOO;OoOl1.O10ol=l010O;OoOl1[loOo00]=OO0O0;OoOl1[o010O]=O01l1;OoOl1.oolO1=l100O;OoOl1[oOO0O1]=l001l;OoOl1[Oll0o0]=O00O1;OoOl1[lOOll]=O0o01;OoOl1[oo10o]=lOlO0;OoOl1[llO1o0]=lol1ll;OoOl1[oOOol]=o0lol;OoOl1[Ol0ll0]=o1lO0;OoOl1[o1olOO]=l0011;OoOl1[O1oOO]=lO111;OoOl1[l11ooo]=l1ll0;OoOl1[oo0o00]=o00o0;OoOl1[o10oOl]=O0ol0;OoOl1[lOo001]=O0ll0;OoOl1[OoOol]=OO11O;OoOl1[lOooo1]=l1loO;OoOl1[O0llo0]=lO00o;OoOl1[OOlOO]=l0Oo1;OoOl1[O0Ol1]=ol1lO;OoOl1[o1lo11]=ol0l1;OoOl1[ol00o0]=oooOo;OoOl1[O11O1o]=OO1Oo;OoOl1[lloO1]=l0lol;OoOl1[Oo101]=O0o1O;OoOl1[o10lo]=l1ooO;OoOl1[loOlO]=O1OOO;OoOl1[o0OllO]=o1OOl;OoOl1[olO001]=o01l0;OoOl1.o1l0l0=oO110;OoOl1[OlooOO]=ol1ll;OoOl1[o01lO]=o1o00;OoOl1[ol000]=looooO;OoOl1[oll1l]=llOOlItem;OoOl1[ool0l]=O1llo;OoOl1[OoOOo]=l0Oo0;OoOl1[lloll]=o00l;OoOl1.l0lOl=o00lByEvent;OoOl1[oOoll0]=o0lO1;OoOl1[l101O1]=o11OO;OoOl1[oOOOl]=OOoO1;OoOl1.llOOo=lll00;OoOl1[OllOol]=l0oO1;OoOl1.oool=l0O1O;OoOl1[l0o01]=Ol00o;OoOl1[ol101o]=OO1OO;OoOl1[ll010O]=OOl1O;OoOl1[oOo11]=o1oo0;OoOl1[llO00O]=llO00;OoOl1[o1ol01]=loO1l;OoOl1[O101ll]=lo110;OoOl1[ol11o]=O0o1OName;OoOl1[loO01]=ol1lOName;oooO(OllO0o,"textboxlist");olO1O0=function(){olO1O0[l1o1O][o0lo0].apply(this,arguments);var $=this;$.l00Ol0=null;this._textEl.onfocus=function(){$.OOoooo=$._textEl.value;$.l00Ol0=setInterval(function(){if($.OOoooo!=$._textEl.value){$.lo111();$.OOoooo=$._textEl.value;if($._textEl.value==""&&$.value!=""){$[o1lo11]("");$.O1ooo0()}}},10)};this._textEl.onblur=function(){clearInterval($.l00Ol0);if(!$[lo0lo1]())if($.OOoooo!=$._textEl.value)if($._textEl.value==""&&$.value!=""){$[o1lo11]("");$.O1ooo0()}};this._buttonEl.style.display="none";this[loll1O]()};ll11(olO1O0,o1o0O1,{remote:true,url:"",allowInput:true,delay:150,showButton:false,searchField:"key",minChars:0,_buttonWidth:0,uiCls:"mini-autocomplete",popupEmptyText:"No Result",loadingText:"Loading...",errorText:"Error",delay:200,enterQuery:false});loOO1=olO1O0[lOolO0];loOO1[O0O0O1]=o11Ol;loOO1[OOllO0]=Ol1ll;loOO1[o0o0O]=Olo0l;loOO1.oOOll=o10lO;loOO1[O00l1o]=lll1l;loOO1.O01lll=llloo;loOO1.lo111=lO10o;loOO1[oOO0O1]=ll0oO;loOO1[Oo00O]=ll1oO;loOO1.oo1o1o=o1001;loOO1[oO0l1]=l1oll;loOO1[o1looo]=oOl10;loOO1[OOOo0o]=ollol;loOO1[O1O00]=O1OO0;loOO1[l1lo1]=l01lO;loOO1[OOll1O]=O0o0l;loOO1[oo0lol]=O011o;loOO1[oOoOO0]=l1Ooo;loOO1[OolOO1]=Oooll;loOO1[o11lll]=OO111;loOO1[OloO1]=oo01l;loOO1[O01oO]=o0ooo;loOO1[O0OlO]=ll1o1;loOO1[OO10o1]=O1OOo;loOO1[O0Ol1]=l0o1O;loOO1[o1lo11]=ooO01;loOO1[oo0o00]=O11o1;loOO1[oOo11]=O1Olo;loOO1[llO00O]=OO0lO;loOO1[l0O0ll]=O11l0;oooO(olO1O0,"autocomplete");mini.ToolTip=function(){mini.ToolTip[l1o1O][o0lo0].apply(this,arguments)};ll11(mini.ToolTip,lO0o1l,{selector:"[title]",placement:"bottom",trigger:"hover focus",delay:200,uiCls:"mini-tooltip",_create:function(){this.el=jQuery("
    ")[0];this.$element=jQuery(this.el);this.$element.appendTo(document.body)},_initEvents:function(){},_bindTooltip:function(){var $=jQuery(document),B=this.selector,E="tooltip";$.unbind("."+E,this);var F=this.trigger.split(" ");for(var A=F.length;A--;){var C=F[A];if(C=="click")$[O01o0l]("click."+E,B,jQuery.proxy(this._toggle,this));else if(C!="manual"){var D=C=="hover"?"mouseenter":"focus",_=C=="hover"?"mouseleave":"blur";$[O01o0l](D+"."+E,B,jQuery.proxy(this._enter,this));$[O01o0l](_+"."+E,B,jQuery.proxy(this._leave,this))}}},setSelector:function($){this.selector=$;this._bindTooltip()},getSelector:function(){return this.selector},setPlacement:function($){this.placement=$},getPlacement:function(){return this.placement},setTrigger:function($){this.trigger=$;this._bindTooltip()},getTrigger:function(){return this.trigger},openTimer:null,_enter:function($){var _=this,A=$.currentTarget;this.getContent(A);clearTimeout(this.openTimer);this.openTimer=setTimeout(function(){_.openTimer=null;_.open(A)},_.delay)},_leave:function($){clearTimeout(this.openTimer);this.close()},_toggle:function($){if(this._getTip().css("display")=="none")this.enter($);else this.leave($)},open:function(C){var C=jQuery(C)[0]||this.target,A=jQuery(C),B=this.getContent(C),_={element:C,content:B,cancel:!B};this[ll00OO]("beforeopen",_);if(_.cancel)return;this.$element[l0o11]();this._target=C;try{this.setContent(_.content)}catch($){}this[ll00OO]("open",{element:C})},close:function(){this._target=null;this.$element[l11o0O]()},showLoading:function(){this.setContent("
    ")},setContent:function($){this.$element.children(".mini-tooltip-inner").html($||" ");this.applyPlacement()},getContent:function(_){var $=_.title;if($)jQuery(_).attr("data-tooltip",$).attr("title","");if(!$)$=jQuery(_).attr("data-tooltip");return $},applyPlacement:function(){if(!this._target)return;if(this.$element.css("display")=="none")return;var D=this._target,A=jQuery(D),K=A.attr("data-placement")||this.placement,J=this.$element;if(!D||!J[0])return;J[l0o11]().css({left:"-2000px",top:"-2000px"});function B($){J[Ooo01o]("mini-tooltip-left mini-tooltip-top mini-tooltip-right mini-tooltip-bottom mini-tooltip-bottomleft mini-tooltip-topleft mini-tooltip-bottomright mini-tooltip-topright")[oo1OOO]("mini-tooltip-"+$)}function G($){J.offset($)}var C=lO0l0(D),$=mini.getViewportBox(),F=C.top-$.top,E=$.bottom-C.bottom;B(K);var L=lO0l0(J[0]),H=mini.getCalculatedOffset(K,C,L.width,L.height);if(K=="left");else if(K=="right");else if(K=="top");else if(K=="bottom");else if(K=="bottomleft"&&F>E){if(H.top+L.height>$.bottom)K="topleft"}else if(K=="topleft");B(K);H=mini.getCalculatedOffset(K,C,L.width,L.height);if(K=="right"||K=="left"){var _=jQuery(J).children(".mini-tooltip-arrow");_.css("top","");function I(){var $=C.top+C.height/2-_.height()/2,A=$-H.top;_.css("top",A)}$=mini.getViewportBox();if(H.top<$.y){H.top=$.y;I()}else if(H.top+L.height>$.bottom){H.top=$.bottom-L.height;I()}}G(H)},getAttrs:function($){var _=mini.ToolTip[l1o1O][O0O0O1][oOl1ll](this,$);mini[oO1ol]($,_,["selector","placement","onbeforeopen","onopen","onclose"]);return _}});oooO(mini.ToolTip,"tooltip");mini.getCalculatedOffset=function(B,$,_,A){if(B=="bottom")return{top:$.top+$.height,left:$.left+$.width/2-_/2};if(B=="top")return{top:$.top-A,left:$.left+$.width/2-_/2};if(B=="left")return{top:$.top+$.height/2-A/2,left:$.left-_};if(B=="bottomleft")return{top:$.top+$.height,left:$.left};if(B=="bottomright")return{top:$.top+$.height,left:$.left+$.width-_};if(B=="topleft")return{top:$.top-A,left:$.left};if(B=="topright")return{top:$.top-A,left:$.left+$.width-_};return{top:$.top+$.height/2-A/2,left:$.left+$.width}};lO0olO=function($){this.postParam={};lO0olO[l1o1O][o0lo0][oOl1ll](this,$);this[O01o0l]("validation",this.O10O11,this)};ll11(lO0olO,o00olO,{buttonText:"\u6d4f\u89c8...",_buttonWidth:56,limitTypeErrorText:"\u4e0a\u4f20\u6587\u4ef6\u683c\u5f0f\u4e3a\uff1a",readOnly:true,oool11:0,limitSize:"",limitType:"",typesDescription:"\u4e0a\u4f20\u6587\u4ef6\u683c\u5f0f",uploadLimit:0,queueLimit:"",flashUrl:"",uploadUrl:"",showUploadProgress:true,postParam:null,uploadOnSelect:false,uiCls:"mini-fileupload"});Ool0o=lO0olO[lOolO0];Ool0o[O0O0O1]=lO0ol;Ool0o[OO0000]=ll0ol;Ool0o[ooolol]=o01l1;Ool0o[lO1l0]=o0O00;Ool0o[olllO1]=o1Ol1;Ool0o[loOOll]=lllOl;Ool0o[Olllll]=lllOl_error;Ool0o[lOoolo]=l11O1;Ool0o[OlOO1l]=O0l1O;Ool0o[OoOlol]=lo1l;Ool0o[Ololll]=l11o1;Ool0o[Olll01]=olloo;Ool0o[ol00o0]=o0Ooo;Ool0o[ollO0l]=o110o;Ool0o[lO0O11]=O0Ool;Ool0o[Ol1OOl]=lo010;Ool0o[OOoolo]=O00Ol;Ool0o[lO0l00]=oolo0;Ool0o[lo0llO]=lllll;Ool0o[O1Olo1]=OO0l0;Ool0o[OOl0ol]=OllOo;Ool0o[l0O0l]=ooOl;Ool0o[Oo00o]=o1OO1;Ool0o[o00o00]=OO1olo;Ool0o[oooll]=oOOOO;Ool0o[l1l100]=OO1o1;Ool0o[ollOoO]=Ol10O;Ool0o.loll=looO1;Ool0o[oolooo]=oloOo0;Ool0o[ol101o]=olOo;Ool0o.o1OolOHtml=oo0Oo;Ool0o[ll010O]=OOlOo;oooO(lO0olO,"fileupload");mini.ProgressBar=function(){mini.ProgressBar[l1o1O][o0lo0].apply(this,arguments)};ll11(mini.ProgressBar,lO0o1l,{formField:true,uiCls:"mini-progressbar",showText:false,textAlign:"center",text:"",format:"{0}%",value:0,set:function($){if(typeof $=="string")return this;var _=$.value;delete $.value;mini.ProgressBar[l1o1O][oO0o1][oOl1ll](this,$);if(!mini.isNull(_))this[o1lo11](_);return this},_create:function(){this.el=document.createElement("div");this.el.className="mini-progressbar";var $="
    "+"
    "+"
    "+"
    ";this.el.innerHTML=$;this._borderEl=this.el.firstChild;this._barEl=this._borderEl.firstChild;this._textEl=this._borderEl.lastChild},setText:function($){this.text=$;this._textEl.innerHTML=$},setShowText:function($){this.showText=$;this._textEl.style.display=$?"":"none"},getShowText:function(){return this.showText},setTextAlign:function($){this.textAlign=$;this._textEl.style.textAlign=$},getTextAlign:function(){return this.textAlign},setValue:function(_){_=parseFloat(_);if(isNaN(_))_=0;if(_<0)_=0;if(_>100)_=100;this.value=_;this._barEl.style.width=_+"%";var $=String.format(this.format,_);this[O0Ol1]($)},getValue:function(){return this.value},getAttrs:function($){var _=mini.ProgressBar[l1o1O][O0O0O1][oOl1ll](this,$);mini[oO1ol]($,_,["text","format","textAlign"]);mini[O0100l]($,_,["showText"]);return _}});oooO(mini.ProgressBar,"progressbar");mini.Form=function($){this.el=ll1lO1($);if(!this.el)throw new Error("form element not null");mini.Form[l1o1O][o0lo0].apply(this,arguments)};ll11(mini.Form,Ooo0O0,{el:null,getFields:function(){if(!this.el)return[];var $=mini.findControls(function($){if(!$.el||$.formField!=true)return false;if(Ollo(this.el,$.el))return true;return false},this);return $},getFieldsMap:function(){var A=this.getFields(),C={};for(var _=0,B=A.length;_
    ",F="
    "+$+""+(I.message||"")+"
    ",O="
    "+"
    ";A.l0O0.innerHTML=O;var P=A.l0O0.firstChild;if(I.html){if(typeof I.html=="string")P.innerHTML=I.html;else if(mini.isElement(I.html))P.appendChild(I.html)}else P.innerHTML=F;A._Buttons=[];var J=A.l0O0.lastChild;if(I.buttons&&I.buttons.length>0){for(var _=0,B=I.buttons.length;_";else A=A+"
    ";var $=mini.MessageBox[l0o11]({title:E||mini.MessageBox.promptTitle,buttons:["ok","cancel"],width:250,html:"
    "+A+"
    ",callback:function(_){var $=document.getElementById(C);if(B)return B(_,$.value)}}),_=document.getElementById(C);_[l1o0oo]();if(F==null)F="";_.value=F;return $},loading:function($,_){return mini.MessageBox[l0o11]({minHeight:50,title:_,showCloseButton:false,message:$,iconCls:"mini-messagebox-waiting"})},showTips:function(A){var $=jQuery;A=jQuery.extend({content:"",state:"",x:"center",y:"top",offset:[10,10],fixed:true,timeout:2000},A);var C="mini-tips-"+A.state,B="
    "+A.content+"
    ",_=jQuery(B).appendTo(document.body);A.el=_[0];A.timeoutHandler=function(){_.slideUp();setTimeout(function(){_.remove()},2000)};mini.showAt(A);_[l11o0O]().slideDown()}};mini.alert=mini.MessageBox.alert;mini.confirm=mini.MessageBox.confirm;mini.prompt=mini.MessageBox.prompt;mini[llOo10]=mini.MessageBox[llOo10];mini.showMessageBox=mini.MessageBox[l0o11];mini.hideMessageBox=mini.MessageBox[l11o0O];mini.showTips=mini.MessageBox.showTips;O101l1=function(){this.llo1();O101l1[l1o1O][o0lo0].apply(this,arguments)};ll11(O101l1,lO0o1l,{width:300,height:180,vertical:false,allowResize:true,pane1:null,pane2:null,showHandleButton:true,handlerStyle:"",handlerCls:"",handlerSize:5,uiCls:"mini-splitter"});o1O1O=O101l1[lOolO0];o1O1O[O0O0O1]=Oo1ol;o1O1O.O1o0o=Oooo1;o1O1O.ll1l10=loO0o;o1O1O.ol0010=ll01l;o1O1O.O0ol1=l11OO;o1O1O.O1010=l10O1;o1O1O[o1l0OO]=oOooO;o1O1O.l0o1Oo=l10Oo;o1O1O.lll10O=o101o;o1O1O[o1Olo1]=O1oO;o1O1O[ll1000]=oOO10;o1O1O[llO0lO]=loooO;o1O1O[OllO]=o0110;o1O1O[O11olO]=O0001;o1O1O[l1001o]=llO1O;o1O1O[oOO11O]=olll0;o1O1O[Ol1100]=olooo;o1O1O[o1O1lo]=oOOoo;o1O1O[Ol1l1]=o1Oo1;o1O1O[lll1OO]=Oooo01;o1O1O[OO11O0]=O01o0;o1O1O[ll11l1]=OO1lo;o1O1O[OoloO0]=OO1lO;o1O1O[lO0oo1]=olO1O;o1O1O[oOo0o1]=ooOl1;o1O1O[ooOlOo]=ll0lo;o1O1O[ooo101]=OoOO1O;o1O1O[OO0Ool]=OoOO1OBox;o1O1O[oOOOl]=o00Ol;o1O1O[oOoll0]=OOlOo1;o1O1O.llo1=lol10;o1O1O[l0o01]=O1o1o;o1O1O[ll010O]=loo0;oooO(O101l1,"splitter");OlOOOl=function(){this.regions=[];this.regionMap={};OlOOOl[l1o1O][o0lo0].apply(this,arguments)};ll11(OlOOOl,lO0o1l,{floatable:true,regions:[],splitSize:5,collapseWidth:28,collapseHeight:25,regionWidth:150,regionHeight:80,regionMinWidth:50,regionMinHeight:25,regionMaxWidth:2000,regionMaxHeight:2000,splitToolTip:"",uiCls:"mini-layout",hoverProxyEl:null});olOoo=OlOOOl[lOolO0];olOoo[O1l0lO]=Ol0l0;olOoo[o1l0OO]=l0100;olOoo.O001l=Ol1Ol;olOoo.OO101=Ololl;olOoo.OOol=O1O1l;olOoo.l0o1Oo=l0oOo;olOoo.lll10O=Oo010;olOoo.loo01=ll0OO;olOoo.O1oOll=olO0o;olOoo.loOO0=oo1O;olOoo[l0o1ol]=lO0Ol;olOoo[l1o1l]=OoOlO;olOoo[ollOlo]=Ol1l;olOoo[o011ll]=o11l;olOoo[ool100]=ooll0;olOoo[lolOO]=lOOl;olOoo[o0O0lO]=O0loO;olOoo[llll1O]=o1ooo;olOoo.o0ol1=l0ol1o;olOoo[OllooO]=O1OO;olOoo[l0ool0]=O0o1l;olOoo[lOOo0o]=llO10o;olOoo[o0OOol]=llo0l;olOoo[ooll01]=Oll10;olOoo.lOOOO1=llo0O;olOoo.looll=oO1O1;olOoo.o1OolO=olO1o;olOoo[l11Oo]=oo1oo;olOoo[o10O1l]=oo1ooBox;olOoo[OO0Ol1]=oo1ooProxyEl;olOoo[O0llol]=oo1ooSplitEl;olOoo[O0Ol0o]=oo1ooBodyEl;olOoo[l1010l]=oo1ooHeaderEl;olOoo[olOoO]=oo1ooEl;olOoo[l0o01]=O01ll;olOoo[ll010O]=Olo10;mini.copyTo(OlOOOl.prototype,{Ool01:function(C,_){var A="
    ";if(_)A+="";else for(var B=C.buttons.length-1;B>=0;B--){var $=C.buttons[B];A+=""+$.html+""}A+="
    ";A+="
    ";A+="
    "+C.title+"
    ";return A},doUpdate:function(){for(var B=0,D=this.regions.length;B"+E.title+"
    ";E._proxy.innerHTML=C}if(_){oOOO1(_,"mini-layout-split-nodrag");if(E.expanded==false||!E[lol0o])OOl0O0(_,"mini-layout-split-nodrag")}}this[oOOOl]()},doLayout:function(){if(!this[o100oo]())return;if(this.lOOl01)return;var D=ooOlO0(this.el,true),M=oo0O(this.el,true),G={x:0,y:0,width:M,height:D};olOO(this._borderEl,D);var $=this.regions.clone(),B=this[l11Oo]("center");$.remove(B);if(B)$.push(B);for(var F=0,H=$.length;F
    ");this.l1O0o=mini.append(document.body,"
    ");this.l1O0o.style.cursor="n-resize";if(this.dragRegion.region=="west"||this.dragRegion.region=="east")this.l1O0o.style.cursor="w-resize";this.splitBox=lO0l0(this.dragRegion._split);lOO01O(this.l1O0o,this.splitBox);this.elBox=lO0l0(this.el,true)},ll1l10:function(L){var P=L.now[0]-L.init[0],T=this.splitBox.x+P,$=L.now[1]-L.init[1],U=this.splitBox.y+$,S=T+this.splitBox.width,Q=U+this.splitBox.height,K=this[l11Oo]("west"),G=this[l11Oo]("east"),B=this[l11Oo]("north"),_=this[l11Oo]("south"),R=this[l11Oo]("center"),I=K&&K.visible?K.width:0,O=G&&G.visible?G.width:0,C=B&&B.visible?B.height:0,M=_&&_.visible?_.height:0,D=K&&K.showSplit?oo0O(K._split):0,A=G&&G.showSplit?oo0O(G._split):0,E=B&&B.showSplit?ooOlO0(B._split):0,J=_&&_.showSplit?ooOlO0(_._split):0,V=this.dragRegion,F=V.region;if(F=="west"){var N=this.elBox.width-O-A-D-R.minWidth;if(T-this.elBox.x>N)T=N+this.elBox.x;if(T-this.elBox.xV.maxWidth)T=V.maxWidth+this.elBox.x;mini.setX(this.l1O0o,T)}else if(F=="east"){N=this.elBox.width-I-D-A-R.minWidth;if(this.elBox.right-(T+this.splitBox.width)>N)T=this.elBox.right-N-this.splitBox.width;if(this.elBox.right-(T+this.splitBox.width)V.maxWidth)T=this.elBox.right-V.maxWidth-this.splitBox.width;mini.setX(this.l1O0o,T)}else if(F=="north"){var H=this.elBox.height-M-J-E-R.minHeight;if(U-this.elBox.y>H)U=H+this.elBox.y;if(U-this.elBox.yV.maxHeight)U=V.maxHeight+this.elBox.y;mini.setY(this.l1O0o,U)}else if(F=="south"){H=this.elBox.height-C-E-J-R.minHeight;if(this.elBox.bottom-(U+this.splitBox.height)>H)U=this.elBox.bottom-H-this.splitBox.height;if(this.elBox.bottom-(U+this.splitBox.height)V.maxHeight)U=this.elBox.bottom-V.maxHeight-this.splitBox.height;mini.setY(this.l1O0o,U)}},O1o0o:function(A){var _=lO0l0(this.l1O0o),B=this.dragRegion,C=B.region;if(C=="west"){var $=_.x-this.elBox.x;this[llll1O](B,{width:$})}else if(C=="east"){$=this.elBox.right-_.right;this[llll1O](B,{width:$})}else if(C=="north"){var D=_.y-this.elBox.y;this[llll1O](B,{height:D})}else if(C=="south"){D=this.elBox.bottom-_.bottom;this[llll1O](B,{height:D})}jQuery(this.l1O0o).remove();this.l1O0o=null;this.elBox=this.handlerBox=null;jQuery(this.o000o).remove();this.o000o=null},Olo1OO:function($){if(!this.floatable)return;$=this[l11Oo]($);if($._Expanded===true)this.lo1O0($);else this.OO0101($)},OO0101:function(K){if(this.lOOl01)return;this[oOOOl]();var C=K.region,$=K._el;K._Expanded=true;OOl0O0($,"mini-layout-popup");var J=lO0l0(K._proxy),B=lO0l0(K._el),L={};if(C=="east"){var H=J.x,I=J.y,A=J.height;olOO($,A);mini.setX($,H);$.style.top=K._proxy.style.top;var F=parseInt($.style.left);L={left:F-B.width}}else if(C=="west"){H=J.right-B.width,I=J.y,A=J.height;olOO($,A);mini.setX($,H);$.style.top=K._proxy.style.top;F=parseInt($.style.left);L={left:F+B.width}}else if(C=="north"){var H=J.x,I=J.bottom-B.height,G=J.width;l01ol($,G);mini[llO0O0]($,H,I);var E=parseInt($.style.top);L={top:E+B.height}}else if(C=="south"){H=J.x,I=J.y,G=J.width;l01ol($,G);mini[llO0O0]($,H,I);E=parseInt($.style.top);L={top:E-B.height}}OOl0O0(K._proxy,"mini-layout-maxZIndex");this.lOOl01=true;var D=this,_=jQuery($);_.animate(L,250,function(){oOOO1(K._proxy,"mini-layout-maxZIndex");D.lOOl01=false})},lo1O0:function(E){if(this.lOOl01)return;E._Expanded=false;var F=E.region,B=E._el,D=lO0l0(B),G={};if(F=="east"){var A=parseInt(B.style.left);G={left:A+D.width}}else if(F=="west"){A=parseInt(B.style.left);G={left:A-D.width}}else if(F=="north"){var _=parseInt(B.style.top);G={top:_-D.height}}else if(F=="south"){_=parseInt(B.style.top);G={top:_+D.height}}OOl0O0(E._proxy,"mini-layout-maxZIndex");this.lOOl01=true;var $=this,C=jQuery(B);C.animate(G,250,function(){oOOO1(E._proxy,"mini-layout-maxZIndex");$.lOOl01=false;$[oOOOl]()})},oool:function($){if(this.lOOl01)return;for(var _=0,A=this.regions.length;_0)$.length=1;this.O1lolo=[];this.lolo={}}var _=[];for(var C=0,D=$.length;C=0;D--){var C=this.getbyId(_[D]);if(!C)continue;if(this[o1110](C)){if(B!==false)if(!this._fireSelect(C,"beforedeselect"))continue;delete this.lolo[C._id];A.push(C)}}this.O1lolo=[];var $=this.lolo;for(D in $){var E=$[D];if(E._id)this.O1lolo.push(E)}for(D=_.length-1;D>=0;D--){C=this.getbyId(_[D]);if(!C)continue;if(B!==false)this[ll00OO]("deselect",{record:C})}this[OOoOO](_,false,A,B)},_OnSelectionChanged:function(A,_,B,D){var C={fireEvent:D,records:A,select:_,selected:this[loOO01](),selecteds:this[oO1lO1](),_records:B};this[ll00OO]("SelectionChanged",C);var $=this._current,E=this.getCurrent();if($!=E){this._current=E;this.Oolo(E)}},Oolo:function($){if(this._currentTimer)clearTimeout(this._currentTimer);var _=this;this._currentTimer=setTimeout(function(){_._currentTimer=null;var A={record:$};_[ll00OO]("CurrentChanged",A)},30)},ooO000:function(){for(var A=this.O1lolo.length-1;A>=0;A--){var _=this.O1lolo[A],$=this.getby_id(_._id);if(!$){this.O1lolo.removeAt(A);delete this.lolo[_._id]}}if(this.lo1Olo&&this.getby_id(this.lo1Olo._id)==null)this.lo1Olo=null},setMultiSelect:function($){if(this[oolO1l]!=$){this[oolO1l]=$;if($==false);}},getMultiSelect:function(){return this[oolO1l]},selectPrev:function(){var $=this[loOO01]();if(!$)$=this[o100Ol](0);else{var _=this[l0Ol]($);$=this[o100Ol](_-1)}if($){this[lOl1Ol]();this[o01lO]($);this[lll11]($)}},selectNext:function(){var $=this[loOO01]();if(!$)$=this[o100Ol](0);else{var _=this[l0Ol]($);$=this[o100Ol](_+1)}if($){this[lOl1Ol]();this[o01lO]($);this[lll11]($)}},selectFirst:function(){var $=this[o100Ol](0);if($){this[lOl1Ol]();this[o01lO]($);this[lll11]($)}},selectLast:function(){var $=this.getVisibleRows(),_=this[o100Ol]($.length-1);if(_){this[lOl1Ol]();this[o01lO](_);this[lll11](_)}},getSelectedsId:function(A){var $=this[oO1lO1](),_=this.O00ol($,A);return _[0]},getSelectedsText:function(A){var $=this[oO1lO1](),_=this.O00ol($,A);return _[1]},_filterInfo:null,_sortInfo:null,filter:function(_,$){if(typeof _!="function")return;$=$||this;this._filterInfo=[_,$];this.OOll1o();this.l0OoOo();this.o1lOO();this[ll00OO]("filter")},clearFilter:function(){if(!this._filterInfo)return;this._filterInfo=null;this.OOll1o();this.l0OoOo();this.o1lOO();this[ll00OO]("filter")},sort:function(_,$,A){if(typeof _!="function")return;$=$||this;this._sortInfo=[_,$,A];this.l0OoOo();this.o1lOO();this[ll00OO]("sort")},clearSort:function(){this._sortInfo=null;this.sortField=this.sortOrder="";this.OOll1o();this.o1lOO();if(this.sortMode=="server"){var $=this.getLoadParams();$.sortField="";$.sortOrder="";this[ol1ol]($)}this[ll00OO]("filter")},_sortMulti:function($){},_doClientSortField:function(A,$,_){var B=this._getSortFnByField(A,_);if(!B)return;var C=$=="desc";this.sort(B,this,C)},_getSortFnByField:function($,_){if(!$)return null;var A=null,C=mini.sortTypes[_];if(!C)C=mini.sortTypes["string"];function B(B,D){var A=mini._getMap($,B),H=mini._getMap($,D),G=mini.isNull(A)||A==="",I=mini.isNull(H)||H==="";if(G)return 0;if(I)return 1;if(_=="chinese")return A.localeCompare(H,"zh");var E=C(A),F=C(H);if(E>F)return 1;else return 0}A=B;return A},ajaxOptions:null,autoLoad:false,url:"",pageSize:10,pageIndex:0,totalCount:0,totalPage:0,sortField:"",sortOrder:"",loadParams:null,getLoadParams:function(){return this.loadParams||{}},sortMode:"server",pageIndexField:"pageIndex",pageSizeField:"pageSize",sortFieldField:"sortField",sortOrderField:"sortOrder",totalField:"total",dataField:"data",startField:"",limitField:"",errorField:"error",errorMsgField:"errorMsg",stackTraceField:"stackTrace",load:function(A,$,B,C){if(typeof A=="string"){this[oo0o00](A);return}if(this._loadTimer)clearTimeout(this._loadTimer);this.loadParams=A||{};if(!mini.isNumber(this.loadParams[OoloO]))this.loadParams[OoloO]=0;if(this._xhr)this._xhr.abort();if(this.ajaxAsync&&mini_ajaxAsyncInvoke){var _=this;this._loadTimer=setTimeout(function(){_._doLoadAjax(_.loadParams,$,B,C);_._loadTimer=null},1)}else this._doLoadAjax(this.loadParams,$,B,C)},reload:function($,_,A){this[ol1ol](this.loadParams,$,_,A)},gotoPage:function(_,$){var A=this.loadParams||{};if(mini.isNumber(_))A[OoloO]=_;if(mini.isNumber($))A[O0o000]=$;this[ol1ol](A)},sortBy:function(_,$){this.sortField=_;this.sortOrder=$=="asc"?"asc":"desc";if(this.sortMode=="server"){var A=this.getLoadParams();A.sortField=_;A.sortOrder=$;A[OoloO]=this[OoloO];this[ol1ol](A)}},setSortField:function(_){this.sortField=_;if(this.sortMode=="server"){var $=this.getLoadParams();$.sortField=_}},setSortOrder:function(_){this.sortOrder=_;if(this.sortMode=="server"){var $=this.getLoadParams();$.sortOrder=_}},checkSelectOnLoad:true,selectOnLoad:false,ajaxData:null,ajaxAsync:true,ajaxType:"",_doLoadAjax:function(C,J,A,N,H){C=C||{};if(mini.isNull(C[OoloO]))C[OoloO]=this[OoloO];if(mini.isNull(C[O0o000]))C[O0o000]=this[O0o000];if(C.sortField)this.sortField=C.sortField;if(C.sortOrder)this.sortOrder=C.sortOrder;C.sortField=this.sortField;C.sortOrder=this.sortOrder;this.loadParams=C;var F=this._evalUrl(),D=this._evalType(F),K=oo0l11(this.ajaxData,this);jQuery.extend(true,C,K);var _={url:F,async:this.ajaxAsync,type:D,data:C,params:C,cache:false,cancel:false};jQuery.extend(true,_,this.ajaxOptions);this._OnBeforeLoad(_);if(_.cancel==true){C[OoloO]=this[OO10lo]();C[O0o000]=this[ll1Ol1]();return}if(_.data!=_.params&&_.params!=C)_.data=_.params;if(_.url!=F&&_.type==D)_.type=this._evalType(_.url);var G={};G[this.pageIndexField]=C[OoloO];G[this.pageSizeField]=C[O0o000];if(C.sortField)G[this.sortFieldField]=C.sortField;if(C.sortOrder)G[this.sortOrderField]=C.sortOrder;if(this.startField&&this.limitField){G[this.startField]=C[OoloO]*C[O0o000];G[this.limitField]=C[O0o000]}jQuery.extend(true,C,G);jQuery.extend(true,_.data,G);if(this.sortMode=="client"){C[this.sortFieldField]="";C[this.sortOrderField]=""}var O=this[loOO01]();this._currentSelectValue=O?O[this.idField]:null;if(mini.isNumber(this._currentSelectValue))this._currentSelectValue=String(this._currentSelectValue);var $=this[oO1lO1](),P=[];for(var B=0,E=$.length;B0&&S.data.length==0){L[o1Oool](S[OoloO]-1);return}if(H)H(S);else{L[OoloO]=S[OoloO];L[O0o000]=S[O0o000];L[ll1lO0](S.total);L._OnPreLoad(S);L.loaded=true;var R=new Date();L[o1ol01](S.data);if(L.lo1OloValue&&L[O1lOol]){var P=[],M=L.lo1OloValue;if(M.length>0){for(var D=0,G=M.length;D0)L[o01lO](0);L[ll00OO]("load",S);if(J)if(I)setTimeout(function(){J[oOl1ll](L,S)},20);else J[oOl1ll](L,S)}}},error:function($,B,C){if(B=="abort")return;var _={xhr:$,text:$.responseText,textStatus:B};_.errorMsg=$.responseText;_.errorCode=$.status;if(mini_debugger==true)alert(F+"\n"+_.errorCode+"\n"+_.errorMsg);L[ll00OO]("loaderror",_);if(A)A[oOl1ll](L,_)},complete:function($,A){var _={xhr:$,text:$.responseText,textStatus:A};L[ll00OO]("loadcomplete",_);if(N)N[oOl1ll](L,_);L._xhr=null}});if(this._xhr);this._xhr=mini.ajax(_)},_OnBeforeLoad:function($){this[ll00OO]("beforeload",$)},_OnPreLoad:function($){this[ll00OO]("preload",$)},_evalUrl:function(){var _=this.url;if(typeof _=="function")_=_();else{try{_=window["ev"+"al"](_)}catch($){_=this.url}if(!_)_=this.url}return _},_evalType:function(_){var $=this.ajaxType;if(!$){$="post";if(_){if(_[l0Ol](".txt")!=-1||_[l0Ol](".json")!=-1)$="get"}else $="get"}return $},setSortMode:function($){this.sortMode=$},getSortMode:function(){return this.sortMode},setAjaxOptions:function($){this.ajaxOptions=$},getAjaxOptions:function(){return this.ajaxOptions},setAutoLoad:function($){this.autoLoad=$},getAutoLoad:function(){return this.autoLoad},setUrl:function($){this.url=$;if(this.autoLoad)this[ol1ol]()},getUrl:function(){return this.url},setPageIndex:function(_){this[OoloO]=_;var $=this.loadParams||{};if(mini.isNumber(_))$[OoloO]=_;this[ll00OO]("pageinfochanged")},getPageIndex:function(){return this[OoloO]},setPageSize:function(_){this[O0o000]=_;var $=this.loadParams||{};if(mini.isNumber(_))$[O0o000]=_;this[ll00OO]("pageinfochanged")},getPageSize:function(){return this[O0o000]},setTotalCount:function($){this[lO001l]=parseInt($);this[ll00OO]("pageinfochanged")},getTotalCount:function(){return this[lO001l]},getTotalPage:function(){return this.totalPage},setCheckSelectOnLoad:function($){this[O1lOol]=$},getCheckSelectOnLoad:function(){return this[O1lOol]},setSelectOnLoad:function($){this.selectOnLoad=$},getSelectOnLoad:function(){return this.selectOnLoad}});mini.DataSource.RecordId=1;mini.DataTable=function(){mini.DataTable[l1o1O][o0lo0].apply(this,arguments)};ll11(mini.DataTable,mini.DataSource,{_init:function(){mini.DataTable[l1o1O]._init[oOl1ll](this);this._filterInfo=null;this._sortInfo=null},add:function($){return this.insert(this.source.length,$)},addRange:function($){this.insertRange(this.source.length,$)},insert:function(B,A){if(!A)return null;if(!mini.isNumber(B)){var $=this.getRecord(B);if($)B=this[l0Ol]($);else B=this.dataview.length}var _={index:B,record:A};this[ll00OO]("beforeadd",_);var D=this.dataview[B];if(D)this.dataview.insert(B,A);else this.dataview[O101ol](A);if(this.dataview!=this.source)if(D){var C=this.source[l0Ol](D);this.source.insert(C,A)}else this.source[O101ol](A);this._setAdded(A);this.o1lOO();this[ll00OO]("add",_)},insertRange:function(A,$){if(!mini.isArray($))return;if(!mini.isNumber(A))A=this.dataview.length;this.beginChange();$=$.clone();for(var B=0,C=$.length;BH[l0Ol](_)},this);for(var B=0,D=$.length;BC){var $=_;_=C;C=$}var A=[];for(var B=_,D=C;B<=D;B++){var E=this.dataview[B];A.push(E)}return A},selectRange:function(_,A){if(!mini.isNumber(_))_=this[l0Ol](_);if(!mini.isNumber(A))A=this[l0Ol](A);if(mini.isNull(_)||mini.isNull(A))return;var $=this.getRange(_,A);this[Ooo0o0]($)},toArray:function(){return this.source.clone()},isChanged:function(){return this.getChanges().length>0},getChanges:function(_,H){var A=[];if(_=="removed"||_==null)A.addRange(this._removeds.clone());for(var B=0,C=this.source.length;BB)return 1;if(A$.length)A=$.length;_=_.clone();for(var B=0,D=_.length;BA[l0Ol](_)},this);for(var C=0,D=_.length;CC.length)E=C.length;var G={};C.insert(E,G);var A=this[loo01O]($),_=this[l11lll](A);_.remove($);E=C[l0Ol](G);C[E]=$}F=H,E=D,C=this.O1o1l(F);if(E=="before"){F=this[loo01O](H);C=this.O1o1l(F);E=C[l0Ol](H)}else if(E=="after"){F=this[loo01O](H);C=this.O1o1l(F);E=C[l0Ol](H)+1}else if(E=="add"||E=="append")E=C.length;else if(!mini.isNumber(E))return;if(this.isAncestor($,F))return false;if(E<0||E>C.length)E=C.length;G={};C.insert(E,G);A=this[loo01O]($);A[this.nodesField].remove($);E=C[l0Ol](G);C[E]=$;this.o0l1($,F);this.o1lOO();var B={oldParentNode:A,parentNode:F,index:E,node:$};this[ll00OO]("movenode",B)},insertNode:function($,F,H){if(!$)return;if(!H){H=this.root;F="add"}if(!mini.isNumber(F)){switch(F){case"before":F=this.indexOfNode(H);H=this[loo01O](H);$=this.insertNode($,F,H);break;case"after":F=this.indexOfNode(H);H=this[loo01O](H);$=this.insertNode($,F+1,H);break;case"append":case"add":$=this.addNode($,H);break;default:break}return $}var _=this.O1o1l(H),A=this[l11lll](H);if(F<0||F>A.length)F=A.length;A.insert(F,$);if(this.viewNodes){var B=A[F-1];if(B){var G=_[l0Ol](B);_.insert(G+1,$)}else _.insert(0,$)}$._pid=H._id;this._setAdded($);var E=this,C=$[this.nodesField];if(C){function I(_,$){for(var A=0,B=_.length;A0)B.addRange(G)}C=B}return C||[]},getChildNodeAt:function(A,$){var _=this[l11lll]($);if(_)return _[A];return null},hasChildNodes:function($){var _=this[l11lll]($);return _.length>0},getLevel:function($){return $._level},_is_true:function($){return String($)=="true"||$===1||$==="Y"||$==="y"},_is_false:function($){return String($)=="false"||$===0||$==="N"||$==="n"},leafField:"isLeaf",isLeafNode:function($){return this.isLeaf($)},isLeaf:function($){if(!$)return false;var A=$[this.leafField];if(!$||this._is_false(A))return false;var _=this[l11lll]($,false,false);if(_.length>0)return false;return true},hasChildren:function($){var _=this[l11lll]($);return!!(_&&_.length>0)},isFirstNode:function($){if($==this.root)return true;var _=this[loo01O]($);if(!_)return false;return this.getFirstNode(_)==$},isLastNode:function($){if($==this.root)return true;var _=this[loo01O]($);if(!_)return false;return this.getLastNode(_)==$},isCheckedNode:function($){return $.checked===true},isExpandedNode:function($){return $.expanded==true||$.expanded==1||mini.isNull($.expanded)},isEnabledNode:function($){return $.enabled!==false},isVisibleNode:function($){if($.visible==false)return false;var _=this._ids[$._pid];if(!_||_==this.root)return true;if(_.expanded===false)return false;return this.isVisibleNode(_)},getNextNode:function($){var A=this.getby_id($._pid);if(!A)return null;var _=this.indexOfNode($);return this[l11lll](A)[_+1]},getPrevNode:function($){var A=this.getby_id($._pid);if(!A)return null;var _=this.indexOfNode($);return this[l11lll](A)[_-1]},getFirstNode:function($){return this[l11lll]($)[0]},getLastNode:function(_){var $=this[l11lll](_);return $[$.length-1]},indexOfNode:function($){var _=this.getby_id($._pid);if(_)return this[l11lll](_)[l0Ol]($);return-1},indexOfList:function($){return this[l00oOO]()[l0Ol]($)},getAt:function($){return this.getVisibleRows()[$]},indexOf:function($){return this.getVisibleRows()[l0Ol]($)},getRange:function(A,D){if(A>D){var $=A;A=D;D=$}var _=this[l11lll](this.root,true),B=[];for(var C=A,E=D;C<=E;C++){var F=_[C];if(F)B.push(F)}return B},selectRange:function(A,B){var _=this[l11lll](this.root,true);if(!mini.isNumber(A))A=_[l0Ol](A);if(!mini.isNumber(B))B=_[l0Ol](B);if(mini.isNull(A)||mini.isNull(B))return;var $=this.getRange(A,B);this[Ooo0o0]($)},findRecords:function(K,M){var _=this.toArray(),G=typeof K=="function",B=K,J=M||this,A=[];if(!mini.isNull(M))M=String(M);for(var C=0,E=_.length;C0}$(this.root)},l0OoOo:function(){if(!this._filterInfo&&!this._sortInfo){this.viewNodes=null;return}if(!this._sortInfo)return;var C=this._sortInfo[0],_=this._sortInfo[1],E=this._sortInfo[2],A=this.nodesField;if(!this.viewNodes){var B=this.viewNodes={};B[this.root._id]=this.root[A].clone();this.cascadeChild(this.root,function(_,D,$){var C=_[A];if(C)B[_._id]=C.clone()})}var $=this;function D(A){var F=$[l11lll](A);mini.sort(F,C,_);if(E)F.reverse();for(var G=0,H=F.length;G0},getChanges:function(_,I){var H=this,A=[];if(_=="removed"||_==null)A.addRange(this._removeds.clone());var E=this.getAllChildNodes(this.root,false);for(var B=0,C=E.length;B=D;E--){var G=F[E];F.removeAt(E);if(G!=_){if(!_[this.nodesField])_[this.nodesField]=[];_[this.nodesField].insert($,G)}}var C=this[loo01O](A),B=C[this.nodesField],D=B[l0Ol](A);B.insert(D+1,_);this.o0l1(_,C);this.OOll1o();this.o1lOO()},downGrade:function($){if(this[Ol1l1l]($))return false;var A=this[loo01O]($),_=A[this.nodesField],B=_[l0Ol]($),C=_[B-1];_.removeAt(B);if(!C[this.nodesField])C[this.nodesField]=[];C[this.nodesField][O101ol]($);this.o0l1($,C);this.OOll1o();this.o1lOO()},o0l1:function($,A){var _=this;$._pid=A._id;$._level=A._level+1;$[_.parentField]=A[_.idField];if(!$[_.parentField])$[_.parentField]=A._id;this.cascadeChild($,function(B,A,$){B._pid=$._id;B._level=$._level+1;B[_.parentField]=$[_.idField]},this);this._setModified($)},setCheckModel:function($){this.checkModel=$},getCheckModel:function(){return this.checkModel},setOnlyLeafCheckable:function($){this.onlyLeafCheckable=$},getOnlyLeafCheckable:function(){return this.onlyLeafCheckable},setAutoCheckParent:function($){this.autoCheckParent=$},getAutoCheckParent:function(){return this.autoCheckParent},_doUpdateLoadedCheckedNodes:function(){var _=this[l00oOO]();for(var A=0,B=_.length;A=0;D--){var $=this.getRecord(_[D]);if(!$||(C&&$.checked===true)||(!C&&$.checked!==true)){if($){if(A===true)this._doUpdateNodeCheckState($);if(!C&&!this.isLeaf($))E.push($)}continue}$.checked=C;E.push($);if(A===true)this._doUpdateNodeCheckState($)}var B=this;setTimeout(function(){B[ll00OO]("_checkchanged",{nodes:_,_nodes:E,checked:C})},1)},checkNode:function($,_){this.doCheckNodes([$],true,_!==false)},uncheckNode:function($,_){this.doCheckNodes([$],false,_!==false)},checkNodes:function($,_){if(!mini.isArray($))$=[];this.doCheckNodes($,true,_!==false)},uncheckNodes:function($,_){if(!mini.isArray($))$=[];this.doCheckNodes($,false,_!==false)},checkAllNodes:function(){var $=this[l00oOO]();this.doCheckNodes($,true,false)},uncheckAllNodes:function(){var $=this[l00oOO]();this.doCheckNodes($,false,false)},doGetCheckedNodes:function(J,G){if(G===false)G="leaf";var I=[],$={};for(var C=0,D=J.length;C=0;B--){var $=this.getRecord(_[B]);if(!$)continue;$.checkable=checked}},getCheckable:function($){$=this.getRecord($);if(!$)return false;if($.checkable===true)return true;if($.checkable===false)return false;return this.isLeafNode($)?true:!this.onlyLeafCheckable},showNodeCheckbox:function($,_){},reload:function($,_,A){this._loadingNode=null;this[ol1ol](this.loadParams,$,_,A)},_isNodeLoading:function(){return!!this._loadingNode},loadNode:function($,_){this._loadingNode=$;var A={node:$};this[ll00OO]("beforeloadnode",A);var C=new Date(),B=this;B._doLoadAjax(B.loadParams,null,null,null,function(D){var A=new Date()-C;if(A<60)A=60-A;setTimeout(function(){D.node=$;B._OnPreLoad(D);B._loadingNode=null;if(B.loadParams)delete B.loadParams[B.idField];var H=$[B.nodesField];B.removeNodes(H);var C=D.data;if(C&&C.length>0){B[olOo0l]($);B.addNodes(C,$);var A=B.getAllChildNodes($);for(var E=0,F=A.length;Ethis._maxColumnLevel)this._maxColumnLevel=B._level;var C=parseInt(B.width);if(mini.isNumber(C)&&String(C)==B.width)B.width=C+"px";if(mini.isNull(B.width))B.width=this._defaultColumnWidth+"px";if(String(B.width)[l0Ol]("px"))B.pxWidth=parseInt(B.width);B.visible=B.visible!==false;B[lol0o]=B[lol0o]!==false;B.allowMove=B.allowMove!==false;B.allowSort=B.allowSort===true;B.allowDrag=!!B.allowDrag;B[lo01lo]=!!B[lo01lo];B.autoEscape=!!B.autoEscape;B.enabled=B.enabled!==false;B.showCellTip=B.showCellTip!==false;B.valueFromSelect=B.valueFromSelect!==false;B.vtype=B.vtype||"";if(B.allowCellWrap==null)B.allowCellWrap=this.columnDefaults.allowCellWrap;if(typeof B.filter=="string")B.filter=window["ev"+"al"]("("+B.filter+")");if(B.filter&&!B.filter.el)B.filter=mini.create(B.filter);if(typeof B.init=="function"&&B.inited!=true)B.init(this.owner);B.inited=true;B._gridUID=this.owner.uid;B[OOol0]=this.owner[OOol0]}this[O111O](this,$,this);this._createColumnsRow();var D=0,_=this._visibleColumns=[],G=this.lO1o11=[];this.cascadeColumns(this,function($){if(!$.columns||$.columns.length==0){G.push($);if(this[loo0o]($)){_.push($);$._index=D++}}},this);this._fieldColumns={};var B=this.getAllColumns();for(var E=0,F=B.length;E=0&&this._frozenEndColumn>=this._frozenStartColumn},isFrozenColumn:function($){if(!this[oOOo0]())return false;$=this[olO0]($);if(!$)return false;var _=this.getVisibleColumns()[l0Ol]($);return this._frozenStartColumn<=_&&_<=this._frozenEndColumn},frozen:function(_,$){_=this[olO0](_);$=this[olO0]($);var A=this.getVisibleColumns();this._frozenStartColumn=A[l0Ol](_);this._frozenEndColumn=A[l0Ol]($);if(_&&$)this._columnsChanged()},unFrozen:function(){this._frozenStartColumn=-1;this._frozenEndColumn=-1;this._columnsChanged()},setFrozenStartColumn:function($){this.frozen($,this._frozenEndColumn)},setFrozenEndColumn:function($){this.frozen(this._frozenStartColumn,$)},getFrozenColumns:function(){var $=[],A=this[oOOo0]();for(var _=0,B=this._visibleColumns.length;_this._frozenEndColumn)||!A)$.push(this._visibleColumns[_]);return $},getFrozenColumnsRow:function(){return this[oOOo0]()?this._columnsRow1:[]},getUnFrozenColumnsRow:function(){return this[oOOo0]()?this._columnsRow2:this.getVisibleColumnsRow()},_createFrozenColSpan:function(){var N=this,M=this.getVisibleColumns(),E=this._frozenStartColumn,O=this._frozenEndColumn;function _(A,B){var _=N.isBottomColumn(A)?[A]:N._getVisibleColumnsByColumn(A);for(var C=0,F=_.length;CO)return true}return false}function L($,D){var B=mini.treeToList($.columns,"columns"),C=0;for(var E=0,F=B.length;E0){F.colspan1=L(F,1);F.colspan2=L(F,2);F.colspan0=L(F,0)}else{F.colspan1=1;F.colspan2=1;F.colspan0=1}if(_(F,0))F["viewIndex"+0]=true;if(_(F,1))F["viewIndex"+1]=true;if(_(F,2))F["viewIndex"+2]=true}}var $=this._getMaxColumnLevel();this._columnsRow1=[];this._columnsRow2=[];for(G=0,K=this._visibleColumnsRow.length;G0)D.colspan=I(D);if((!D.columns||D.columns.length==0)&&D._level<$)D.rowspan=$-D._level+1;H.push(D);if(this[loo0o](D))B.push(D)}this._columnsRow=A;this._visibleColumnsRow=_},_getMaxColumnLevel:function(){return this._maxColumnLevel},cascadeColumns:function($,C,B){if(!C)return;var _=$.columns;if(_){_=_.clone();for(var D=0,E=_.length;D0)},updateColumn:function($,_){$=this[olO0]($);if(!$)return;mini.copyTo($,_);this._columnsChanged()},moveColumn:function(_,$,A){_=this[olO0](_);$=this[olO0]($);if(!_||!$||!A||_==$)return;if(this[lO001O](_,$))return;var D=this[l0l1](_);if(D)D.columns.remove(_);var C=$,B=A;if(B=="before"){C=this[l0l1]($);B=C.columns[l0Ol]($)}else if(B=="after"){C=this[l0l1]($);B=C.columns[l0Ol]($)+1}else if(B=="add"||B=="append"){if(!C.columns)C.columns=[];B=C.columns.length}else if(!mini.isNumber(B))return;C.columns.insert(B,_);this._columnsChanged()},addColumn:function($){if(!$)return;delete $._id;this._columnsChanged()},removeColumn:function(){this._columnsChanged()}});mini.GridView=function(){this._createTime=new Date();this._createColumnModel();this._bindColumnModel();this.data=[];this[Ool0l1]();this.lOl11();this[l0OO1l]();mini.GridView[l1o1O][o0lo0].apply(this,arguments);this.ooOo();this.oO10O();this[oOoll0]();if(mini.isNull(this._paddingTop)){if(mini.isNull(mini.GridView._paddingTop)){var _=jQuery("
    ").appendTo("body"),$=Ol1O(_);mini.GridView._paddingTop=$.top;mini.GridView._paddingBottom=$.bottom}this._paddingTop=mini.GridView._paddingTop;this._paddingBottom=mini.GridView._paddingBottom}this.lo0OoHash={}};ll11(mini.GridView,o0lO0o,{OOoOlo:"block",_rowIdField:"_id",width:"100%",showSortIcon:false,showColumns:true,showFilterRow:false,showSummaryRow:false,summaryRows:1,showPager:false,allowCellWrap:false,allowHeaderWrap:false,showModified:true,showNewRow:true,showEmptyText:false,emptyText:"No data returned.",showHGridLines:true,showVGridLines:true,lo0Oo:"mini-grid-row",_cellCls:"mini-grid-cell",_headerCellCls:"mini-grid-headerCell",l1OOl:"mini-grid-row-selected",ooll:"mini-grid-row-hover",o100O:"mini-grid-cell-selected",defaultRowHeight:25,fixedRowHeight:false,isFixedRowHeight:function(){return this.fixedRowHeight},fitColumns:true,isFitColumns:function(){return this.fitColumns},allowAlternating:false,o00lo:"mini-grid-row-alt",getAllowAlternating:function(){return this[OOolo]},setAllowAlternating:function($){this[OOolo]=$;this[oOoll0]()},showGroupSummary:false,getShowGroupSummary:function(){return this.showGroupSummary},setShowGroupSummary:function($){this.showGroupSummary=$},summaryPosition:"bottom",getSummaryPosition:function(){return this.summaryPosition},setSummaryPosition:function($){this.summaryPosition=$;if(this.summaryPosition=="top"){mini.before(this._rowsEl,this.o1OoO);mini.before(this._summaryViewEl,this._summaryLockEl)}jQuery(this.el).toggleClass("mini-grid-summary-top",$=="top")},uiCls:"mini-gridview",_create:function(){mini.GridView[l1o1O][ll010O][oOl1ll](this);var D=this.el;OOl0O0(D,"mini-grid");OOl0O0(this._borderEl,"mini-grid-border");OOl0O0(this.loo0l,"mini-grid-viewport");var $="
    ",_="
    ",A="
    ",C="
    ";this._columnsEl=mini.after(this.Oo0ol0,C);this.l1oooO=mini.after(this._columnsEl,_);this._rowsEl=this.l0O0;OOl0O0(this._rowsEl,"mini-grid-rows");this.o1OoO=mini.after(this._rowsEl,A);this._bottomPagerEl=mini.after(this.o1OoO,$);this._columnsViewEl=this._columnsEl.childNodes[0];this._rowsViewEl=mini.append(this._rowsEl,"
    ");this._rowsViewContentEl=this._rowsViewEl.firstChild;this._filterViewEl=this.l1oooO.childNodes[0];this._summaryViewEl=this.o1OoO.childNodes[0];var B="";this._focusEl=mini.append(this._borderEl,B);var E=this;oO11(this._filterViewEl,"scroll",function($){if(E._filterViewEl.scrollLeft>0)E._filterViewEl.scrollLeft=0})},destroy:function(_){if(this._dataSource){this._dataSource[ol101o]();this._dataSource=null}if(this._columnModel){this._columnModel[ol101o]();this._columnModel=null}if(this._pagers){var $=this._pagers.clone();for(var A=0,B=$.length;Athis._rowsViewEl.clientHeight+1,B=this._columnsViewEl.firstChild,_=$?mini.getScrollOffset():0;B.parentNode.style["paddingRight"]=_+"px";B.style.width="100%"},doLayout:function(){var F=this;if(!this[o100oo]())return;mini.GridView[l1o1O][oOOOl][oOl1ll](this);this[ollo1O]();if(this.viewType=="cardview"){this.doLayoutCardView();return}var _=this._autoHeight;if(mini.isIE)if(_)OOl0O0(this._rowsViewEl,"mini-grid-hidden-y");else oOOO1(this._rowsViewEl,"mini-grid-hidden-y");var D=this._columnsViewEl.firstChild,I=this._rowsViewContentEl.firstChild,B=this._filterViewEl.firstChild,G=this._summaryViewEl.firstChild,H=jQuery(this._columnsViewEl).height(),$=B.offsetHeight,A=this._rowsViewEl.scrollHeight>this._rowsViewEl.clientHeight+1,E=this._rowsViewEl.scrollWidth>this._rowsViewEl.clientWidth+1,L=this._rowsViewContentEl.parentNode.offsetWidth,C=L-(A?mini.getScrollOffset():0);function K($){if(this.isFitColumns()){I.style.width="100%";if(mini.isSafari||mini.isIE6)$.style.width=C+"px";else if(A){$.style.width="100%";$.parentNode.style.width="auto";if(B!=$)$.parentNode.style["paddingRight"]=mini.getScrollOffset()+"px";if(mini.isIE8)oOOO1(this._rowsViewEl,"mini-grid-hidden-y")}else{$.style.width="100%";$.parentNode.style.width="auto";$.parentNode.style["paddingRight"]="0px";if(mini.isIE8)OOl0O0(this._rowsViewEl,"mini-grid-hidden-y")}}else{I.style.width="0px";$.style.width="0px";if(mini.isSafari||mini.isChrome||mini.isIE6);else{$.parentNode.style.width="100%";$.parentNode.style["paddingRight"]="0px"}}}K[oOl1ll](this,D);K[oOl1ll](this,B);K[oOl1ll](this,G);this._syncScroll();var J=this;setTimeout(function(){mini.layout(J.l1oooO);mini.layout(J.o1OoO)},10);if(mini.isIE6)setTimeout(function(){K[oOl1ll](F,D)},1);if(mini.isIE10){setTimeout(function(){if(J.isFitColumns()){D.style.width="auto";D.offsetWidth;D.style.width="100%"}else D.style.width="0px"},0);mini[O00Oo0](I)}this._topRightCellEl=this._columnsViewEl.childNodes[1];if(mini.isIE6)this._topRightCellEl.style.height=H;if(mini.isIE6||mini.isIE7){this._rowsViewContentEl.style["paddingBottom"]="0px";if(_)if(E)this._rowsViewContentEl.style["paddingBottom"]="17px"}this._filterViewEl.style.height=$+"px";B.style.width=this.isFitColumns()?(C+"px"):""},setBody:function(){},_createTopRowHTML:function(B,$,A){var _="";if(mini.isIE){if(mini.isIE6||mini.isIE7||!mini.boxModel)_+="";else _+=""}else if(mini.isChrome&&A&&A.length==0)_+="";else _+="";if(this._userEmptyTd!==false)_+="";for(var E=0,G=B.length;E"}_+="";_+="";return _},_createColumnsHTML:function(H,C,K){var K=K?K:this.getVisibleColumns(),J=[""];J.push(this._createTopRowHTML(K));var N=this[l10ooo](),M=this[ooO1oo]();for(var E=0,F=H.length;E";J[J.length]="";for(var D=0,I=_.length;D0);if(L)J[J.length]=" mini-grid-bottomCell ";if(D==I-1)J[J.length]=" mini-grid-rightCell ";J[J.length]="\" style=\"";if(B.headerStyle)J[J.length]=B.headerStyle+";";if(B.headerAlign)J[J.length]="text-align:"+B.headerAlign+";";J[J.length]="\" ";if(B.rowspan)J[J.length]="rowspan=\""+B.rowspan+"\" ";this._createColumnColSpan(B,J,C);J[J.length]=">
    ";J[J.length]=$;if(P)J[J.length]="";else if(this.showSortIcon)if(B.allowSort)J[J.length]="";J[J.length]="
    ";J[J.length]="
    "}if(this[oOOo0]()&&C==1){J[J.length]="
    "}J[J.length]=""}J.push("
    0
    ");return J.join("")},Ool01Text:function($,_){var A=$.header;if(typeof A=="function")A=A[oOl1ll](this,$);if(mini.isNull(A)||A==="")A=" ";return A},_createColumnColSpan:function($,A,_){if($.colspan)A[A.length]="colspan=\""+$.colspan+"\" "},doUpdateColumns:function(){var A=this._columnsViewEl.scrollLeft,B=this.getVisibleColumnsRow(),_=this._createColumnsHTML(B,2),$="
    ";_+=$;this._columnsViewEl.innerHTML=_;this._columnsViewEl.scrollLeft=A},doUpdate:function(){if(this.canUpdate()==false)return;var $=this,_=this._isCreating(),A=new Date();this.oO10O();var B=this,D=this.getScrollLeft();function C(){if(!B.el)return;B.doUpdateColumns();if($.viewType=="cardview")B.updateCardView();else B.doUpdateRows();B[oOOOl]();B._doUpdateTimer=null}B.doUpdateColumns();if(_)this._useEmptyView=true;this._doRemoveRowContent();if($.viewType=="cardview")B.updateCardView();else B.doUpdateRows();if(D>0&&B.isVirtualScroll())B._syncScrollOffset(D);if(_)this._useEmptyView=false;B[oOOOl]();if(_&&!this._doUpdateTimer)this._doUpdateTimer=setTimeout(C,15);this[oO1OOl]();if($._fireUpdateTimer){clearTimeout($._fireUpdateTimer);$._fireUpdateTimer=null}$._fireUpdateTimer=setTimeout(function(){$._fireUpdateTimer=null;$[ll00OO]("update")},100)},_doRemoveRowContent:function(){if(this._rowsViewContentEl&&this._rowsViewContentEl.firstChild)this._rowsViewContentEl.removeChild(this._rowsViewContentEl.firstChild);if(this._rowsLockContentEl&&this._rowsLockContentEl.firstChild)this._rowsLockContentEl.removeChild(this._rowsLockContentEl.firstChild)},_isCreating:function(){return(new Date()-this._createTime)<1000},deferUpdate:function(_){if(!_)_=5;if(this._updateTimer||this._doUpdateTimer)return;var $=this;this._updateTimer=setTimeout(function(){$._updateTimer=null;$[oOoll0]()},_)},_stopDeferUpdate:function(){if(this._updateTimer){clearTimeout(this._updateTimer);this._updateTimer=null}},_pushUpdateCallback:function(A,_,$){var B=0;if(this._doUpdateTimer||this._updateTimer)B=20;if(B==0)A.apply(_,$);else setTimeout(function(){A.apply(_,$)},B)},_updateCount:0,beginUpdate:function(){this._updateCount++},endUpdate:function($){this._updateCount--;if(this._updateCount==0||$===true){this._updateCount=0;this[oOoll0]()}},canUpdate:function(){return this._updateCount==0},setDefaultRowHeight:function($){this.defaultRowHeight=$},getDefaultRowHeight:function(){return this.defaultRowHeight},_getRowHeight:function($){var _=this.defaultRowHeight;if($._height){_=parseInt($._height);if(isNaN(parseInt($._height)))_=rowHeight}_=_-this._paddingTop-this._paddingBottom;_-=1;return _},_createGroupingHTML:function(_,B){var C=this.getGroupingView(),R=this.showGroupSummary,Q=this[oOOo0](),N=0,M=this;function I(D,E){J.push("");if(_.length>0){J.push(M._createTopRowHTML(_));for(var $=0,A=D.length;$")}var L=this.groupTitleCollapsible!==false,J=["
    "];J.push(this._createTopRowHTML(_));for(var E=0,F=C.length;E";var O=S.expanded?"":"display:none";J[J.length]="";if(R)if(_.length>0){J[J.length]="";J[J.length]="";for(var D=0,H=_.length;D
    ";J[J.length]=$.cellHtml;J[J.length]="
    "}J[J.length]="
    "}}J.push("
    ";if(!Q||(Q&&B==1)){J[J.length]="
    ";J[J.length]="
    "+$.cellHtml+"
    "}else J[J.length]=" ";J[J.length]="
    ";I(S.rows,S);J[J.length]="
    ");return J.join("")},_isFastCreating:function(){var $=this.getVisibleRows();if($.length>50)return this._isCreating()||this.getScrollTop()<50*this._defaultRowHeight;return false},isShowRowDetail:function($){return false},isCellValid:function($,_){return true},updateCardView:function(){var C=this,$=this.getVisibleRows(),_=this.getVisibleColumns(),G=[];for(var D=0,F=$.length;D";G[G.length]=E;G[G.length]="
    "}C._rowsViewContentEl.innerHTML=G.join("")},itemRenderer:function(A,B,$,_){return""},o01l0oHTML:function(H,V,A,O,C){var $=!C;if(!C)C=[];var K="",X=this.isFixedRowHeight();if(X)K=this[l0l10o](H);var E=this.defaultRowHeight-1,B=-1,Q=" ",W=-1,_=" ";C[C.length]="";if(this._userEmptyTd!==false)C[C.length]="";var D=this.llo1oO;for(var P=0,S=A.length;P";C[C.length]="
    ";C[C.length]=L.cellHtml;C[C.length]="
    ";C[C.length]="";if(L.rowCls)Q=L.rowCls;if(L.rowStyle)_=L.rowStyle}if(this[oOOo0]()&&O==1){C[C.length]="
    0
    "}C[B]=Q;C[W]=_;C[C.length]="";if($){var U=C.join(""),G=/()/i;U=U.replace(G,"");return U}},o01l0osHTML:function(_,B,$,A){$=$||this.getVisibleRows();var E=[""];E.push(this._createTopRowHTML(_,true,$));var J=this.uid+"$emptytext"+B;if(B==2&&(this._dataSource.loaded||this.alwaysShowEmptyText)){var H=(this.showEmptyText&&$.length==0)?"":"display:none;";E.push("")}var F=0;if($.length>0){var K=$[0];F=this.getVisibleRows()[l0Ol](K)}for(var C=0,D=$.length;C");return E.join("")},doUpdateRows:function(){var _=this.getVisibleRows(),$=new Date(),A=this.getVisibleColumns();if(this[OOo0Ol]()){var B=this._createGroupingHTML(A,2);this._rowsViewContentEl.innerHTML=B}else{B=this.o01l0osHTML(A,2,_);this._rowsViewContentEl.innerHTML=B}},_createFilterRowHTML:function(_,B){var F=["
    "+this[l11O0]+"
    "];F.push(this._createTopRowHTML(_));F[F.length]="";F[F.length]="";for(var C=0,E=_.length;C "}F[F.length]="
    ";var $=F.join("");return $},_doRenderFilters:function(){var $=this.getVisibleColumns();for(var B=0,C=$.length;B"];H.push(this._createTopRowHTML(A));for(var E=0,F=this.summaryRows;E";H[H.length]="";for(var D=0,G=A.length;D";H[H.length]=_.cellHtml;H[H.length]=""}H[H.length]=""}H[H.length]="
    ";var I=H.join("");return I},oO10O:function(){if(!this[oOo1])return;var $=this.getVisibleColumns(),_=this._createSummaryRowHTML($,2);this._summaryViewEl.innerHTML=_},l0OoOoByField:function(A,$){if(!A)return null;var _=this._columnModel._getDataTypeByField(A);this._dataSource._doClientSortField(A,$,_)},_expandGroupOnLoad:true,oOlolo:1,l000l:"",O1O1O:"",groupBy:function($,_){if(!$)return;this.l000l=$;if(typeof _=="string")_=_.toLowerCase();this.O1O1O=_;this._createGroupingView();this.deferUpdate()},clearGroup:function(){this.l000l="";this.O1O1O="";this.Ool01O=null;this.deferUpdate()},setGroupField:function($){this.groupBy($)},getGroupField:function(){return this.l000l},getGroupDir:function(){return this.O1O1O},setGroupDir:function($){this.O1O1O=field;this.groupBy(this.l000l,$)},isGrouping:function(){return this.l000l!=""},getGroupingView:function(){return this.Ool01O},enableGroupOrder:true,_createGroupingView:function(){if(this[OOo0Ol]()==false)return;this.Ool01O=null;var D=this._dataSource,K=this.l000l,E=this.O1O1O;if(this.enableGroupOrder||E)this.l0OoOoByField(K,E);var $=this.getVisibleRows(),A=[],H={};for(var B=0,F=$.length;B
    ",A="
    ";this._columnsLockEl=mini.before(this._columnsViewEl,C);this._rowsLockEl=mini.before(this._rowsViewEl,A);this._rowsLockContentEl=this._rowsLockEl.firstChild;var _="
    ";this._filterLockEl=mini.before(this._filterViewEl,_);var B="
    ";this._summaryLockEl=mini.before(this._summaryViewEl,B)},_initEvents:function(){mini.FrozenGridView[l1o1O][l0o01][oOl1ll](this);oO11(this._rowsEl,"mousewheel",this.__OnMouseWheel,this)},Ool01Text:function($,_){var A=$.header;if(typeof A=="function")A=A[oOl1ll](this,$);if(mini.isNull(A)||A==="")A=" ";if(this[oOOo0]()&&_==2)if($.viewIndex1)A=" ";return A},_createColumnColSpan:function(_,B,A){if(this[oOOo0]()){var $=_["colspan"+A];if($)B[B.length]="colspan=\""+$+"\" "}else if(_.colspan)B[B.length]="colspan=\""+_.colspan+"\" "},doUpdateColumns:function(){var D=this._columnsViewEl.scrollLeft,A=this[oOOo0]()?this.getFrozenColumnsRow():[],F=this[oOOo0]()?this.getUnFrozenColumnsRow():this.getVisibleColumnsRow(),$=this[oOOo0]()?this.getFrozenColumns():[],B=this[oOOo0]()?this.getUnFrozenColumns():this.getVisibleColumns(),G=this._createColumnsHTML(A,1,$),C=this._createColumnsHTML(F,2,B),_="
    ";G+=_;C+=_;this._columnsLockEl.innerHTML=G;this._columnsViewEl.innerHTML=C;var E=this._columnsLockEl.firstChild;E.style.width="0px";this._columnsViewEl.scrollLeft=D},doUpdateRows:function(){var A=this.getVisibleRows(),_=this.getFrozenColumns(),$=this.getUnFrozenColumns();if(this[OOo0Ol]()){var D=this._createGroupingHTML(_,1),B=this._createGroupingHTML($,2);this._rowsLockContentEl.innerHTML=D;this._rowsViewContentEl.innerHTML=B}else{D=this.o01l0osHTML(_,1,this[oOOo0]()?A:[]),B=this.o01l0osHTML($,2,A);this._rowsLockContentEl.innerHTML=D;this._rowsViewContentEl.innerHTML=B}var C=this._rowsLockContentEl.firstChild;C.style.width="0px"},ooOo:function(){if(this._filterLockEl.firstChild)this._filterLockEl.removeChild(this._filterLockEl.firstChild);if(this._filterViewEl.firstChild)this._filterViewEl.removeChild(this._filterViewEl.firstChild);var _=this.getFrozenColumns(),$=this.getUnFrozenColumns(),B=this._createFilterRowHTML(_,1),A=this._createFilterRowHTML($,2);this._filterLockEl.innerHTML=B;this._filterViewEl.innerHTML=A;this._doRenderFilters()},oO10O:function(){var _=this.getFrozenColumns(),$=this.getUnFrozenColumns(),B=this._createSummaryRowHTML(_,1),A=this._createSummaryRowHTML($,2);this._summaryLockEl.innerHTML=B;this._summaryViewEl.innerHTML=A},_syncRowsHeightTimer:null,syncRowDetail:function(_){var $=this[l0Olll](_,1),A=this[l0Olll](_,2);if($&&A)this._doSyncRowHeight($,A)},_doSyncRowHeight:function(_,D){_.style.height=D.style.height="auto";var $=_.cells[0],A=D.cells[0],B=$.offsetHeight,C=A.offsetHeight;if(BB?_:B;A.style.height=$.style.height=_+"px"}A=this._summaryLockEl,$=this._summaryViewEl;A.style.height=$.style.height="auto";if(this[oOOo0]()){_=A.offsetHeight,B=$.offsetHeight;_=_>B?_:B;A.style.height=$.style.height=_+"px"}},_layoutColumns:function(){function J($){return $.offsetHeight}function _(C){var _=[];for(var A=0,B=C.cells.length;A1;if(C&&F)continue;var B=$.offsetHeight;if(B>D)D=B}return D}if(!this[oOOo0]())return;var L=this._columnsLockEl.firstChild,K=this._columnsViewEl.firstChild;function H(H,C){var E=B(C,true),A=_(H);for(var F=0,G=A.length;F1;if(D);else olOO($,E)}}function A(H,C){var E=B(C),A=_(H);for(var F=0,G=A.length;F1;if(D)olOO($,E)}}I();for(var C=0,F=L.rows.length;CE){H(G,$);A(G,$)}}D=J(L),E=J(K);if(DE)olOO(K,D)},doLayout:function(){if(this[o100oo]()==false)return;this._doLayoutScroll=false;var E=this[oOOo0](),C=this[lo00lo](true),$=this.getLockedWidth(),D=C-$;this.oOO01Text();var _=this.isRightFrozen()?"marginRight":"marginLeft",A=this.isRightFrozen()?"right":"left";if(E){this._filterViewEl.style[_]=$+"px";this._summaryViewEl.style[_]=$+"px";this._columnsViewEl.style[_]=$+"px";this._rowsViewEl.style[_]=$+"px";if(mini.isSafari||mini.isChrome||mini.isIE6){this._filterViewEl.style["width"]=D+"px";this._summaryViewEl.style["width"]=D+"px";this._columnsViewEl.style["width"]=D+"px"}else{this._filterViewEl.style["width"]="auto";this._summaryViewEl.style["width"]="auto";this._columnsViewEl.style["width"]="auto"}if(mini.isSafari||mini.isChrome||mini.isIE6)this._rowsViewEl.style["width"]=D+"px";l01ol(this._filterLockEl,$);l01ol(this._summaryLockEl,$);l01ol(this._columnsLockEl,$);l01ol(this._rowsLockEl,$);this._filterLockEl.style[A]="0px";this._summaryLockEl.style[A]="0px";this._columnsLockEl.style[A]="0px";this._rowsLockEl.style[A]="0px"}else this._doClearFrozen();this._layoutColumns();this._syncColumnHeight();mini.FrozenGridView[l1o1O][oOOOl][oOl1ll](this);var B=this._autoHeight;if(E)if(mini.isChrome||mini.isIE6){this._layoutColumns();this._syncColumnHeight();mini.FrozenGridView[l1o1O][oOOOl][oOl1ll](this)}if(B)this._rowsLockEl.style.height="auto";else this._rowsLockEl.style.height="100%";this._syncRowsHeight()},oOO01Text:function(){},O10o0l:function(A,_){A=this.getRecord(A);var B=this.Oll0l0(A,_),$=document.getElementById(B);return $},_doClearFrozen:function(){var $=this.isRightFrozen()?"marginRight":"marginLeft",_=this.isRightFrozen()?"right":"left";this._filterLockEl.style.left="-10px";this._summaryLockEl.style.left="-10px";this._columnsLockEl.style.left="-10px";this._rowsLockEl.style.left="-10px";this._filterLockEl.style["width"]="0px";this._summaryLockEl.style["width"]="0px";this._columnsLockEl.style["width"]="0px";this._rowsLockEl.style["width"]="0px";this._filterViewEl.style["marginLeft"]="0px";this._summaryViewEl.style["marginLeft"]="0px";this._columnsViewEl.style["marginLeft"]="0px";this._rowsViewEl.style["marginLeft"]="0px";this._filterViewEl.style["width"]="auto";this._summaryViewEl.style["width"]="auto";this._columnsViewEl.style["width"]="auto";this._rowsViewEl.style["width"]="auto";if(mini.isSafari||mini.isChrome||mini.isIE6){this._filterViewEl.style["width"]="100%";this._summaryViewEl.style["width"]="100%";this._columnsViewEl.style["width"]="100%";this._rowsViewEl.style["width"]="100%"}},frozenColumns:function(_,$){this.frozen(_,$)},unFrozenColumns:function(){this.unFrozen()},frozen:function(_,$){this._doClearFrozen();this._columnModel.frozen(_,$)},unFrozen:function(){this._doClearFrozen();this._columnModel.unFrozen()},setFrozenStartColumn:function($){this._columnModel[oollO]($)},setFrozenEndColumn:function($){return this._columnModel[lOool]($)},getFrozenStartColumn:function($){return this._columnModel._frozenStartColumn},getFrozenEndColumn:function($){return this._columnModel._frozenEndColumn},getFrozenColumnsRow:function(){return this._columnModel.getFrozenColumnsRow()},getUnFrozenColumnsRow:function(){return this._columnModel.getUnFrozenColumnsRow()},getLockedWidth:function(){if(!this[oOOo0]())return 0;var _=this._rowsLockContentEl.firstChild.firstChild,$=_?_.offsetWidth:0;return $},_canDeferSyncScroll:function(){return this[oOOo0]()},_syncScroll:function(){var A=this._rowsViewEl.scrollLeft,$=this._filterViewEl.firstChild;$.style.left=-A+"px";this._summaryViewEl.scrollLeft=A;this._columnsViewEl.scrollLeft=A;var _=this,B=_._rowsViewEl.scrollTop;_._rowsLockEl.scrollTop=B},__OnMouseWheel:function(_){var A=this.getScrollTop()-_.wheelDelta,$=this.getScrollTop();this.setScrollTop(A);if($!=this.getScrollTop())_.preventDefault()}});oooO(mini.FrozenGridView,"FrozenGridView");mini.ScrollGridView=function(){mini.ScrollGridView[l1o1O][o0lo0].apply(this,arguments)};ll11(mini.ScrollGridView,mini.FrozenGridView,{virtualScroll:true,virtualRows:25,defaultRowHeight:25,virtualColumns:false,_canDeferSyncScroll:function(){return this[oOOo0]()&&!this.isVirtualScroll()},setVirtualScroll:function($){this.virtualScroll=$;this[oOoll0]()},getVirtualScroll:function($){return this.virtualScroll},isFitColumns:function(){return this.fitColumns&&!this.virtualColumns},setVirtualColumns:function($){this.virtualColumns=$;this[oOoll0]()},getVirtualColumns:function($){return this.virtualColumns},isFixedRowHeight:function(){return this.fixedRowHeight||this.virtualScroll},isVirtualScroll:function(){if(this.virtualScroll)return this[l00oO]()==false&&this[OOo0Ol]()==false;return false},_getScrollView:function(){var $=this.getVisibleRows();return $},_getScrollViewCount:function(){return this._getScrollView().length},_getScrollRowHeight:function(_,A){if(A&&A._height){var $=parseInt(A._height);if(!isNaN($))return $}return this.defaultRowHeight},_getRangeHeight:function($,_){return(_-$)*this.defaultRowHeight},_getIndexByScrollTop:function(_){var $=parseInt(_/this.defaultRowHeight);return $},__getScrollViewRange:function(_,A){var $=this._getScrollView();return $.getRange(_,A)},_getColumnByScrollLeft:function(E){var B=0,_=this.getUnFrozenColumns(),C=_.length;for(var D=0,F=C;D=E)return D}return C},_getRangeWidth:function(B,E){var C=0,_=this.getUnFrozenColumns();for(var D=B;DB)J=B;if(J==0)J=this.virtualRows;var H=this._getRangeHeight(0,C),_=this._getRangeHeight(J,this._getScrollViewCount()),$=this.__getScrollViewRange(C,J),L={top:H,bottom:_,rows:$,start:C,end:J,viewStart:C,viewEnd:J};L.viewTop=this._getRangeHeight(0,L.viewStart);L.viewBottom=this._getRangeHeight(L.viewEnd,this._getScrollViewCount());if(this.virtualColumns){var K=this.getScrollLeft(),M=this._rowsViewEl.offsetWidth;L.startColumn=this._getColumnByScrollLeft(K);L.endColumn=this._getColumnByScrollLeft(K+M);L.columns=this.getUnFrozenColumns().slice(L.startColumn,L.endColumn+1);L.right=this._getColumnAllWidth();L.viewLeft=this._getRangeWidth(0,L.startColumn)}else L.columns=this.getUnFrozenColumns();return L},_getViewNowRegion:function(){var E=this.defaultRowHeight,D=this.getScrollTop(),_=this._rowsViewEl.offsetHeight,$=this._getIndexByScrollTop(D),B=this._getIndexByScrollTop(D+_+30),A=this._getScrollViewCount();if(B>A)B=A;var C={start:$,end:B};return C},_canVirtualUpdate:function(){if(!this._viewRegion)return true;var $=this._getViewNowRegion();if(this._viewRegion.start<=$.start&&$.end<=this._viewRegion.end)return false;return true},__OnColumnsChanged:function(_){var $=this;this.columns=this._columnModel.columns;this.ooOo();this.oO10O();if(this.getVisibleRows().length==0)this[oOoll0]();else this.deferUpdate();if(this.isVirtualScroll())this.__OnVScroll();this[ll00OO]("columnschanged")},doLayout:function(){if(this[o100oo]()==false)return;mini.ScrollGridView[l1o1O][oOOOl][oOl1ll](this);this._layoutScroll();if(mini.isNumber(this._scrollTop)&&this._vscrollEl.scrollTop!=this._scrollTop)this._vscrollEl.scrollTop=this._scrollTop},o01l0osHTML:function(_,B,$,H,A,J){var C=this.isVirtualScroll();if(!C)return mini.ScrollGridView[l1o1O].o01l0osHTML.apply(this,arguments);var L=C?this._viewRegion:null,F=[""];F.push(this._createTopRowHTML(_));if(this.isVirtualScroll()){var K=H==0?"display:none;":"";F.push("")}var G=new Date();if(B==1&&this[oOOo0]()==false);else for(var D=0,E=$.length;D");F.push("
    ");return F.join("")},doUpdateRows:function(){if(this.isVirtualScroll()==false){mini.ScrollGridView[l1o1O].doUpdateRows[oOl1ll](this);return}var E=this._getViewRegion();this._viewRegion=E;var _=this.getFrozenColumns(),$=E.columns,C=E.viewStart,A=E.start,F=E.viewEnd;if(this._scrollPaging){var B=this[OO10lo]()*this[ll1Ol1]();C-=B;A-=B;F-=B}var G=this.o01l0osHTML(_,1,E.rows,E.viewTop,E.viewBottom,C),D=this.o01l0osHTML($,2,E.rows,E.viewTop,E.viewBottom,C);this._rowsLockContentEl.innerHTML=G;this._rowsViewContentEl.innerHTML=D;var H=this._rowsViewContentEl.firstChild;if(this.virtualColumns){D="
    ";jQuery(D).appendTo(this._rowsViewContentEl);H.style.width="0px";H.style.position="absolute";H.style.top="0px";H.style.left=E.viewLeft+"px"}var I=this.getScrollTop();if(this._rowsViewEl.scrollTop!=I)this._syncScrollOffset(null,I)},_create:function(){mini.ScrollGridView[l1o1O][ll010O][oOl1ll](this);this._vscrollEl=mini.append(this._rowsEl,"
    ");this._vscrollContentEl=this._vscrollEl.firstChild},_initEvents:function(){mini.ScrollGridView[l1o1O][l0o01][oOl1ll](this);var $=this;oO11(this._vscrollEl,"scroll",this.__OnVScroll,this);mini._onScrollDownUp(this._vscrollEl,function(_){$._VScrollMouseDown=true},function(_){$._VScrollMouseDown=false})},_layoutScroll:function(){var B=this.isVirtualScroll();if(B){var _=this.getScrollHeight(),$=_>this._rowsViewEl.offsetHeight;if(B&&$){this._vscrollEl.style.display="block";this._vscrollContentEl.style.height=_+"px"}else this._vscrollEl.style.display="none";if(this._rowsViewEl.scrollWidth>this._rowsViewEl.clientWidth+1){var A=this[o011o1](true)-18;if(A<0)A=0;this._vscrollEl.style.height=A+"px"}else this._vscrollEl.style.height="100%"}else this._vscrollEl.style.display="none"},getScrollHeight:function(){var $=this.getVisibleRows();return this._getRangeHeight(0,$.length)},setScrollTop:function($){if(this.isVirtualScroll())this._vscrollEl.scrollTop=$;else this._rowsViewEl.scrollTop=$},getScrollTop:function(){if(this.isVirtualScroll())return this._vscrollEl.scrollTop;else return this._rowsViewEl.scrollTop},__OnVScroll:function($){var A=this.isVirtualScroll();if(A){this._scrollTop=this._vscrollEl.scrollTop;var _=this;setTimeout(function(){_._syncScrollOffset(null,_._scrollTop);_._oO0l=null},8);if(this._scrollTopTimer)clearTimeout(this._scrollTopTimer);this._scrollTopTimer=setTimeout(function(){_._scrollTopTimer=null;_._tryUpdateScroll();_._syncScrollOffset(null,_._scrollTop)},150)}},wheelIncrement:0,setWheelIncrement:function($){this.wheelIncrement=$},getWheelIncrement:function(){return this.wheelIncrement},__OnMouseWheel:function(A){var $=A.wheelDelta?A:A.originalEvent,B=$.wheelDelta||-$.detail*40;if(B>0)B=B+this.wheelIncrement;else B=B-this.wheelIncrement;var C=this.getScrollTop()-B,_=this.getScrollTop();this.setScrollTop(C);if(_!=this.getScrollTop()||this.isVirtualScroll())A.preventDefault()},_tryUpdateScroll:function(){var A=this._canVirtualUpdate();if(A){if(this._scrollPaging){var _=this;this[O0O1l0](null,null,function($){})}else{var $=new Date(),B=this._rowsViewEl.scrollLeft;this._doRemoveRowContent();this.doUpdateRows();this[OllO1o](50);this._syncScrollOffset(B)}}},_updateScrollTop:function($){this._syncScrollOffset(null,$);this._tryUpdateScroll()},__OnRowViewScroll:function($){this._syncScroll();if(this.virtualColumns)this.doVirtualColumns()},doVirtualColumns:function(){var $=this;if($._virtualColumnTimer){clearTimeout($._virtualColumnTimer);$._virtualColumnTimer=null}$._virtualColumnTimer=setTimeout(function(){$._virtualColumnTimer=null;$._doRemoveRowContent();$.doUpdateRows();$[OllO1o](50)},500)}});oooO(mini.ScrollGridView,"ScrollGridView");mini._onScrollDownUp=function(A,D,B){function C(A){if(mini.isFirefox)oO11(document,"mouseup",_);else oO11(document,"mousemove",$);D(A)}function $(_){Olol0O(document,"mousemove",$);B(_)}function _($){Olol0O(document,"mouseup",_);B($)}oO11(A,"mousedown",C)};mini.mousewheelEditable=false;mini._Grido1llOl=function($){this.owner=$,el=$.el;$[O01o0l]("rowmousemove",this.__OnRowMouseMove,this);oO11($.loo0l,"mouseout",this.O001l,this);oO11($.loo0l,"mousewheel",this.__OnMouseWheel,this);oO11(document,"mousewheel",this.__OnMouseWheel,this);$[O01o0l]("cellmousedown",this.__OnCellMouseDown,this);$[O01o0l]("cellmouseup",this.__OnGridCellClick,this);$[O01o0l]("celldblclick",this.__OnGridCellClick,this);oO11($.el,"keydown",this.oll1,this);jQuery($._columnsEl)[O01o0l]("mouseenter",".mini-grid-headerCell",function($){jQuery($.currentTarget)[oo1OOO]("mini-grid-header-over")});jQuery($._columnsEl)[O01o0l]("mouseleave",".mini-grid-headerCell",function($){jQuery($.currentTarget)[Ooo01o]("mini-grid-header-over")})};mini._Grido1llOl[lOolO0]={oll1:function($){var G=this.owner,C=Ooll($.target,"mini-grid-detailRow"),H=C?Ollo(G.el,C):false;if(Ollo(G.l1oooO,$.target)||Ollo(G.o1OoO,$.target)||Ollo(G.Oo0ol0,$.target)||Ollo(G.o0lOOl,$.target)||(Ooll($.target,"mini-grid-detailRow")&&H)||Ooll($.target,"mini-grid-rowEdit")||Ooll($.target,"mini-tree-editinput"))return;var F=G[llllOo]();if($.shiftKey||$.ctrlKey||$.altKey)return;if($.keyCode==37||$.keyCode==38||$.keyCode==39||$.keyCode==40)$.preventDefault();var _=G.getVisibleColumns();function D($){return G.getVisibleRows()[$]}function L($){return G.getVisibleRows()[l0Ol]($)}function M(){return G.getVisibleRows().length}var A=F?F[1]:null,I=F?F[0]:null;if(!F)I=G.getCurrent();var J=_[l0Ol](A),K=L(I),B=M();switch($.keyCode){case 9:if(G[O1O01O]&&G.editOnTabKey){$.preventDefault();G[OlO1O1]($.shiftKey==false,true);return}break;case 27:break;case 13:if(G[O1O01O]&&G.editNextOnEnterKey)if(A)if(G[o0l0o1](F)||!A.editor){G[OlO1O1]($.shiftKey==false);return}if(G[O1O01O]&&F&&!A[lo01lo]&&!G[Ooo0lO]())G[O10OOl]();break;case 37:if(A){if(J>0)J-=1}else J=0;break;case 38:if(I){if(K>0)K-=1}else K=0;if(K!=0&&G.isVirtualScroll());break;case 39:if(A){if(J<_.length-1)J+=1}else J=0;break;case 40:if(I){if(KB.clientWidth){var $=B.innerText||B.textContent||"";B.title=$.trim()}else B.title="";return}var C=A.O0o1(_),B=A.ol0O0O(C[0],C[1]),D=A.getCellError(C[0],C[1]);if(B){if(D){setTimeout(function(){B.title=D.errorText},10);return}setTimeout(function(){var _=B;if(B.firstChild){if(OoO0(B.firstChild,"mini-grid-cell-inner"))_=B.firstChild;if(OoO0(B.firstChild,"mini-tree-nodetitle"))_=B.firstChild}if(_.scrollWidth>_.clientWidth&&A[O10lO1]()&&C[1].showCellTip){var $=_.innerText||_.textContent||"";B.title=$.trim()}else B.title=""},10)}}};mini._Grid_Sorter=function($){this.owner=$;this.owner[O01o0l]("headercellclick",this.__OnGridHeaderCellClick,this);this.owner[O01o0l]("headercelldblclick",this.__OnGridHeaderCellClick,this);oO11($.olO1l,"mousemove",this.__OnGridHeaderMouseMove,this);oO11($.olO1l,"mouseout",this.__OnGridHeaderMouseOut,this)};mini._Grid_Sorter[lOolO0]={__OnGridHeaderMouseOut:function($){if(this.oOoOOColumnEl)oOOO1(this.oOoOOColumnEl,"mini-grid-headerCell-hover")},__OnGridHeaderMouseMove:function(_){var $=Ooll(_.target,"mini-grid-headerCell");if($){OOl0O0($,"mini-grid-headerCell-hover");this.oOoOOColumnEl=$}},__OnGridHeaderCellClick:function($){var _=this.owner,D=$.htmlEvent.type;if(D=="dblclick"&&!_.sortDblClick)return;if(D=="click"&&_.sortDblClick)return;if(OoO0($.htmlEvent.target,"mini-grid-headerCell-inner"))if(_[OOl1ll]&&_[ooOlll]()==false){var B=$.column;if(!B.columns||B.columns.length==0){var C=B.sortField||B.field;if(C&&B.allowSort!==false)if(_.allowCancelSort&&_[ooO1oo]()=="desc")_.clearSort();else{var A="asc";if(_[l10ooo]()==C)A=_[ooO1oo]()=="asc"?"desc":"asc";_[l01oll](C,A)}}}}};mini._Grid_ColumnMove=function($){this.owner=$;oO11(this.owner.el,"mousedown",this.llo1l,this)};mini._Grid_ColumnMove[lOolO0]={llo1l:function(_){var A=this.owner;if(A[ooOlll]())return;if(OoO0(_.target,"mini-grid-column-splitter"))return;if(_.button==mini.MouseButton.Right)return;var $=Ooll(_.target,A._headerCellCls);if($){this._remove();var B=A.oO00(_);if(A[oOO0l0]&&B&&B.allowMove){this.dragColumn=B;this._columnEl=$;this.getDrag().start(_)}}},getDrag:function(){if(!this.drag)this.drag=new mini.Drag({capture:false,onStart:mini.createDelegate(this.ol0010,this),onMove:mini.createDelegate(this.ll1l10,this),onStop:mini.createDelegate(this.O1o0o,this)});return this.drag},ol0010:function(_){function A(_){var A=_.header;if(typeof A=="function")A=A[oOl1ll]($,_);if(mini.isNull(A)||A==="")A=" ";return A}var $=this.owner;this.l1O0o=mini.append(document.body,"
    ");this.l1O0o.innerHTML="
    "+A(this.dragColumn)+"
    ";mini[llO0O0](this.l1O0o,_.now[0]+15,_.now[1]+18);OOl0O0(this.l1O0o,"mini-grid-no");this.moveTop=mini.append(document.body,"
    ");this.moveBottom=mini.append(document.body,"
    ")},ll1l10:function(G){var C=this.owner,D=G.now[0];mini[llO0O0](this.l1O0o,D+15,G.now[1]+18);this.targetColumn=this.insertAction=null;var B=Ooll(G.event.target,C._headerCellCls);if(B){var E=C.oO00(G.event);if(E&&E!=this.dragColumn){var $=C[l0l1](this.dragColumn),A=C[l0l1](E);if($==A){this.targetColumn=E;this.insertAction="before";var _=C[OO1o10](this.targetColumn);if(D>_.x+_.width/2)this.insertAction="after"}}}if(this.targetColumn){OOl0O0(this.l1O0o,"mini-grid-ok");oOOO1(this.l1O0o,"mini-grid-no");var F=C[OO1o10](this.targetColumn);this.moveTop.style.display="block";this.moveBottom.style.display="block";if(this.insertAction=="before"){mini[llO0O0](this.moveTop,F.x-4,F.y-9);mini[llO0O0](this.moveBottom,F.x-4,F.bottom)}else{mini[llO0O0](this.moveTop,F.right-4,F.y-9);mini[llO0O0](this.moveBottom,F.right-4,F.bottom)}}else{oOOO1(this.l1O0o,"mini-grid-ok");OOl0O0(this.l1O0o,"mini-grid-no");this.moveTop.style.display="none";this.moveBottom.style.display="none"}},_remove:function(){var $=this.owner;mini[O0OOl1](this.l1O0o);mini[O0OOl1](this.moveTop);mini[O0OOl1](this.moveBottom);this.l1O0o=this.moveTop=this.moveBottom=this.dragColumn=this.targetColumn=null},O1o0o:function(_){var $=this.owner;$[lll00o](this.dragColumn,this.targetColumn,this.insertAction);this._remove()}};mini._Grid_ColumnSplitter=function($){this.owner=$;oO11($.el,"mousedown",this.O1010,this)};mini._Grid_ColumnSplitter[lOolO0]={O1010:function(_){var A=this.owner,$=_.target;if(OoO0($,"mini-grid-column-splitter")){var B=A.oOOo($.id);if(A[ooOlll]())return;if(A[OlllO]&&B&&B[lol0o]){this.splitterColumn=B;this.getDrag().start(_)}}},getDrag:function(){if(!this.drag)this.drag=new mini.Drag({capture:true,onStart:mini.createDelegate(this.ol0010,this),onMove:mini.createDelegate(this.ll1l10,this),onStop:mini.createDelegate(this.O1o0o,this)});return this.drag},ol0010:function(B){var _=this.owner,$=_[OO1o10](this.splitterColumn);this.columnBox=$;this.l1O0o=mini.append(document.body,"
    ");var A=_.getGridViewBox();A.x=$.x;A.width=$.width;A.right=$.right;lOO01O(this.l1O0o,A);_._ignoreClick=true},ll1l10:function(B){var $=this.owner,A=mini.copyTo({},this.columnBox),_=A.width+(B.now[0]-B.init[0]);if(_<$.columnMinWidth)_=$.columnMinWidth;if(_>$.columnMaxWidth)_=$.columnMaxWidth;l01ol(this.l1O0o,_)},O1o0o:function(F){var _=this.owner,E=lO0l0(this.l1O0o),$=this,G=_[OOl1ll];_[OOl1ll]=false;setTimeout(function(){jQuery($.l1O0o).remove();$.l1O0o=null;_[OOl1ll]=G},10);var B=this.splitterColumn,D=parseInt(B.width);if(D+"%"!=B.width){var C=_[oo1oo0](B),A=parseInt(D/C*E.width);if(A<_.columnMinWidth)A=_.columnMinWidth;_[oll1o1](B,A)}setTimeout(function(){_._ignoreClick=false},100)}};mini._Grid_DragDrop=function($){this.owner=$;this.owner[O01o0l]("CellMouseDown",this.__OnGridCellMouseDown,this)};mini._Grid_DragDrop[lOolO0]={__OnGridCellMouseDown:function(_){if(_.htmlEvent.button==mini.MouseButton.Right)return;var A=this.owner;if(A._dragging)return;this.dropObj=A;if(Ooll(_.htmlEvent.target,"mini-tree-editinput"))return;if(A[Ooo0lO]()||A[O0lOOo](_.record,_.column)==false)return;var $=A.ol0010(_.record,_.column);if($.cancel)return;this.dragText=$.dragText;var B=_.record;this.isTree=!!A.isTree;this.beginRecord=B;var C=this.O0ol1();C.start(_.htmlEvent)},ol0010:function(A){var $=this.owner;$._dragging=true;var _=this.beginRecord;this.dragData=$.O0ol1Data();if(this.dragData[l0Ol](_)==-1)this.dragData.push(_);this.feedbackEl=mini.append(document.body,"
    ");this.feedbackEl.innerHTML=this.dragText;this.lastFeedbackClass="";this[l1lOo]=$[o0l1Oo]();$[ll00o0](false)},_getDropTargetObj:function(_){var $=Ooll(_.target,"mini-grid",500);if($)return mini.get($)},ll1l10:function(C){var $=this.owner,D=this._getDropTargetObj(C.event);this.dropObj=D;var _=C.now[0],A=C.now[1];mini[llO0O0](this.feedbackEl,_+15,A+18);if(D&&D[l1loo]){this.isTree=D.isTree;var B=D.OoO111ByEvent(C.event);this.dropRecord=B;if(B){if(this.isTree)this.dragAction=this.getFeedback(B,A,3);else this.dragAction=this.getFeedback(B,A,2)}else this.dragAction="no"}else this.dragAction="no";if(D&&D[l1loo]&&!B&&D[O101ll]().length==0)this.dragAction="add";this.lastFeedbackClass="mini-feedback-"+this.dragAction;this.feedbackEl.className="mini-feedback "+this.lastFeedbackClass;if(this.dragAction=="no")B=null;this.setRowFeedback(B,this.dragAction)},O1o0o:function(K){var H=this.owner,G=this.dropObj;H._dragging=false;mini[O0OOl1](this.feedbackEl);H[ll00o0](this[l1lOo]);this.feedbackEl=null;this.setRowFeedback(null);if(this.isTree){var L=[];for(var _=0,D=this.dragData.length;_
    ");this.feedbackLine.style.display="block";var D=F[OlO1Oo](A),B=D.x,C=D.y-1;if($=="after")C+=D.height;mini[llO0O0](this.feedbackLine,B,C);var E=F[oO0l0o](true);l01ol(this.feedbackLine,E.width)}else{F[lo0O0O](A,"mini-tree-feedback-add");this.lastAddDomRow=A}},getFeedback:function(H,M,F){var K=this.owner,G=this.dropObj,C=G[OlO1Oo](H),A=C.height,J=M-C.y,L=null;if(this.dragData[l0Ol](H)!=-1)return"no";var $=false;if(F==3){$=G.isLeaf(H);for(var B=0,D=this.dragData.length;BA/2)L="after";else L="before"}else if($&&G.allowLeafDropIn===false){if(J>A/2)L="after";else L="before"}else if(J>(A/3)*2)L="after";else if(A/3<=J&&J<=(A/3*2))L="add";else L="before";var _=G.o1oo10(L,this.dragData,H,K);return _.effect},O0ol1:function(){if(!this.drag)this.drag=new mini.Drag({onStart:mini.createDelegate(this.ol0010,this),onMove:mini.createDelegate(this.ll1l10,this),onStop:mini.createDelegate(this.O1o0o,this)});return this.drag}};mini._Grid_Events=function($){this.owner=$,el=$.el;oO11(el,"click",this.lll10O,this);oO11(el,"dblclick",this.lO11,this);oO11(el,"mousedown",this.O1010,this);oO11(el,"mouseup",this.o1OO0,this);oO11(el,"mousemove",this.loll,this);oO11(el,"mouseover",this.OO101,this);oO11(el,"mouseout",this.O001l,this);oO11(el,"keydown",this.l0100o,this);oO11(el,"keyup",this.O10O1,this);oO11(el,"contextmenu",this.llloO,this);$[O01o0l]("rowmousemove",this.__OnRowMouseMove,this);oO11(window,"resize",this.__windowResize,this)};mini._Grid_Events[lOolO0]={__windowResize:function(){var $=this.owner;function _(){var _=$[lO11Oo]();if(_){var A=$[llllOo](),B=$[looo10](A[0],A[1]);$.lll1(B,_);$[oo11lO](_,B)}}setTimeout(function(){_()},100)},_row:null,__OnRowMouseMove:function($){var _=this.owner,A=$.record;if(this._row!=A){$.record=A;$.row=A;_[ll00OO]("rowmouseenter",$)}this._row=A},lll10O:function($){if(this.owner._ignoreClick)return;this.l11llO($,"Click")},lO11:function($){this.l11llO($,"Dblclick")},O1010:function(_){var A=this.owner;if(Ooll(_.target,"mini-tree-editinput"))return;if(Ooll(_.target,"mini-tree-node-ecicon"))return;this.l11llO(_,"MouseDown");var $=300;if(_.target.tagName.toLowerCase()=="a"&&_.target.href)$=10;function B(){var $=Ooll(_.target,"mini-grid-detailRow");if(Ollo(A.el,$))return;if(!!A.lO0O1)return;A[ollOl](_)}setTimeout(function(){B()},$)},o1OO0:function($){if(Ooll($.target,"mini-tree-editinput"))return;if(Ooll($.target,"mini-tree-node-ecicon"))return;if(Ooll($.target,"mini-tree-checkbox"))return;var _=this.owner;if(Ollo(_.el,$.target))this.l11llO($,"MouseUp")},loll:function($){this.l11llO($,"MouseMove")},OO101:function($){this.l11llO($,"MouseOver")},O001l:function($){this.l11llO($,"MouseOut")},l0100o:function($){this.l11llO($,"KeyDown")},O10O1:function($){this.l11llO($,"KeyUp")},llloO:function($){this.l11llO($,"ContextMenu")},l11llO:function(_,D){var B=this.owner,G=B.O0o1(_),C=G[0],E=G[1];if(C){var A={record:C,row:C,htmlEvent:_},F=B["_OnRow"+D];if(F)F[oOl1ll](B,A);else B[ll00OO]("row"+D,A)}if(E){A={column:E,field:E.field,htmlEvent:_},F=B["_OnColumn"+D];if(F)F[oOl1ll](B,A);else B[ll00OO]("column"+D,A)}if(C&&E){A={sender:B,record:C,row:C,column:E,field:E.field,htmlEvent:_},F=B["_OnCell"+D];if(F)F[oOl1ll](B,A);else B[ll00OO]("cell"+D,A);if(E["onCell"+D])E["onCell"+D][oOl1ll](E,A)}if(!C&&E&&Ooll(_.target,"mini-grid-headerCell")){A={column:E,htmlEvent:_},F=B["_OnHeaderCell"+D];if(F)F[oOl1ll](B,A);else{var $="onheadercell"+D.toLowerCase();if(E[$]){A.sender=B;E[$](A)}B[ll00OO]("headercell"+D,A)}}}};o0ll1l=function($){o0ll1l[l1o1O][o0lo0][oOl1ll](this,null);this._Events=new mini._Grid_Events(this);this.o1llOl=new mini._Grido1llOl(this);this._DragDrop=new mini._Grid_DragDrop(this);this._RowGroup=new mini._Grid_RowGroup(this);this.loll0l=new mini._Grid_ColumnSplitter(this);this._ColumnMove=new mini._Grid_ColumnMove(this);this._Sorter=new mini._Grid_Sorter(this);this._CellToolTip=new mini._Grid_CellToolTip(this);this.oo0oMenu=new mini._Gridoo0oMenu(this);this.oOO1s();if($)mini.applyTo[oOl1ll](this,$)};ll11(o0ll1l,mini.ScrollGridView,{uiCls:"mini-datagrid",selectOnLoad:false,showHeader:false,showPager:true,validateOnAdd:false,dropAction:"move",onlyCheckSelection:false,_$onlyCheckSelection:true,allowUnselect:false,allowRowSelect:true,allowCellSelect:false,allowCellEdit:false,cellEditAction:"cellclick",allowCellValid:false,allowResizeColumn:true,allowSortColumn:true,allowMoveColumn:true,showColumnsMenu:false,virtualScroll:false,enableHotTrack:true,allowHotTrackOut:true,showLoading:true,columnMinWidth:8,O1Ol01:true,llo1oO:null,lO0O1:null,navEditMode:false,editNextRowCell:false,editNextOnEnterKey:false,editOnTabKey:true,createOnEnter:false,skipReadOnlyCell:false,autoHideRowDetail:true,allowDrag:false,allowDrop:false,allowLeafDropIn:false,pageSize:20,pageIndex:0,totalCount:0,totalPage:0,sortField:"",sortOrder:"",url:"",sortDblClick:false,showCellTip:true,allowCancelSort:false,sizeText:"",showPagerButtonText:false,showPagerButtonIcon:false,groupTitleCollapsible:true,allowEmptyContextMenu:false,headerContextMenu:null,selectOnRightClick:true});O0000=o0ll1l[lOolO0];O0000[O0O0O1]=o0OlO;O0000[ol1OO1]=O1oOl;O0000._setOOlo=l10O;O0000._setoOoo1o=Oo0o1;O0000._setol1ol0=Ol0O0;O0000._getol1ol0=l1lOl0;O0000[oo1oOO]=o1oo1O;O0000[o1o1ll]=lo011;O0000[o001O]=o00OO;O0000[oO10lo]=ol1o1;O0000.oooOl=Oo01O;O0000[o01ooO]=OoOOOo;O0000[loOllO]=oO0Ol;O0000[O1O10O]=O1011;O0000[l01oO1]=O0OO1;O0000[ol100l]=ololl;O0000[lo01ol]=OlOlO;O0000[o10l0l]=l10lO;O0000[O11lo]=ll010;O0000[l01l0l]=l01l1;O0000[llo1oo]=OOOoo;O0000[OoOl0o]=ll0o1l;O0000[oooO1o]=looo;O0000[loo1Ol]=OlOOo;O0000[lll0o0]=ll0ll;O0000[l01loo]=O000O;O0000[lOOOo1]=lOlOO;O0000[oolOll]=ll00o1;O0000[Oool1l]=o0ool;O0000[o1o11l]=ooO10;O0000[oloOl1]=Ol0ll;O0000[o00lO1]=ollOO;O0000[oO00o0]=l0l0o0;O0000[OO0lo1]=oOlOl;O0000[OOllo1]=o1o1l;O0000[O0lll0]=ol1O0;O0000[Ol111l]=l1lll;O0000[O0lO1l]=O00ll;O0000[Oo01Oo]=lO1loo;O0000[lOo0o]=ll1l1;O0000[l0010l]=lll0l;O0000[llOO1o]=ooOlo;O0000[O111ll]=Oolo0;O0000[Ol0OO0]=l00O;O0000[OoOOo1]=llooo;O0000[o1O0l0]=l101o;O0000[o0o11l]=l10ll;O0000[OO00l0]=loOOO;O0000[ooOl0O]=OoO0o;O0000[ol1l0O]=oO1lo;O0000[ooOol0]=l01o;O0000[ol11lO]=lO01O;O0000[lo1O0O]=l00O1;O0000[l0o01l]=Ool10l;O0000[l101ll]=oo0o0;O0000[o00001]=lO1ol;O0000[looO00]=OOol1;O0000[llol01]=o1oO0;O0000[o01011]=O0olO1;O0000[l00O0l]=o0lOl0;O0000[o01o0]=oo110;O0000[OOoo0o]=OO1ol;O0000[ol001O]=oo10l;O0000[ooO1oo]=o01l0O;O0000[o1Olll]=O1o110;O0000[l10ooo]=Oo1l1;O0000[o0o0oO]=oOlol;O0000[O11101]=O00oo;O0000[oo0l01]=olOlO;O0000[ll1lO0]=OooO;O0000[ll1Ol1]=O011ll;O0000[l1OoOo]=Ooo11l;O0000[OO10lo]=OOO0O;O0000[O1o1O]=oOll1;O0000[ol1OOO]=lolO;O0000[lol001]=lOO0;O0000[ol1o11]=loO11;O0000[oll0OO]=OOl0l;O0000[ll1O1]=l0Oo;O0000[ll1oo0]=lllol;O0000[loO0lo]=o1ll1;O0000[oOo1l0]=oool0;O0000[O10lO1]=O00o01;O0000[ol0olO]=oll10;O0000[Ooo0OO]=O10o0;O0000[l0OllO]=Ool0O0;O0000[l01oll]=l11oO;O0000[o1Oool]=Oo0ol;O0000[O0O1l0]=o0o00;O0000[ol1ol]=OoOll;O0000[l11ooo]=ol10O;O0000[oo0o00]=olOl0;O0000[OooOO0]=llo10;O0000[OOlOlo]=OO1o0;O0000[Oo1OOo]=Oo1oo0;O0000[OO0l1o]=o1lo;O0000[o11Ool]=l011l;O0000[Ol00Ol]=olOol;O0000[oooOl1]=oO0llO;O0000[o11O01]=ooOoo;O0000[OoOo11]=oOo0l;O0000[o0000l]=lO10O0;O0000[lO00Oo]=OOOl;O0000[OO10l0]=l110o1;O0000.O1lool=OOo10;O0000.o1oo10=o1ol1;O0000.ol0010=o1o0O;O0000[O0lOOo]=lo11l;O0000[l1o1Oo]=ll01O;O0000[Ol0000]=o0000;O0000[Olooll]=O1l1;O0000[ll1O1l]=ollO1;O0000[o1l1OO]=l11ol;O0000[olOOO0]=l1o1;O0000.O0ol1Text=o1oll;O0000.O0ol1Data=o0l1l;O0000.lOoo0=l1O11;O0000[O101o0]=oo11l0;O0000[o00Oll]=o0O11;O0000[ooO1o]=OOo0O;O0000[ll000l]=Olo1O;O0000[oOo11o]=O00O1O;O0000[ol10O0]=O1lO1;O0000[O0lo0]=ll0O0;O0000[olOOo]=ollO;O0000.oOl000=OOOll;O0000.oO1lOo=llOlo;O0000[l0Olll]=lo1OOO;O0000[olOOO]=Ooo1o;O0000[l0101]=OOOo00;O0000[OoloOl]=oO0o1l;O0000[OloOl0]=o0O0;O0000[loOoOl]=OOl00;O0000[o0o1ol]=o0Ol0;O0000[OOOo1l]=l0ool;O0000[l11olo]=oo0O0;O0000[o010ol]=l1O01;O0000[o01l11]=o1O1o1;O0000[o1OOO0]=O11Oo;O0000[OlOoOl]=l01oo;O0000[lO0Olo]=l1ol00;O0000[lo1oO0]=lOoO;O0000[oo1o10]=lOoOs;O0000[o00ooo]=oo11O;O0000[O10lOo]=o01lo;O0000[ooOlll]=l000O;O0000[O1OO1]=OoOOl;O0000[ll001l]=oll1O;O0000[OoOlOo]=O0O0l;O0000[lOlO00]=o0l0o0;O0000[OlO1O1]=oo1l0;O0000[l000l0]=Ol10o;O0000[o0lO1l]=o11oo;O0000[OO1o01]=O11OO;O0000[lo00o]=loo1O;O0000[oOo101]=lo1oo;O0000.l1l0=o011l1;O0000.lll1=lolOo;O0000[lOlool]=o10o1;O0000.lo0oOl=O11111;O0000[oo11lO]=ol1l;O0000[lO11Oo]=oo101l;O0000.l0oO10=lOO01;O0000.l1l0O=l0o1Ol;O0000.oloo=o00110;O0000.llOO0=O101l;O0000[llOlOl]=l0l0oo;O0000[l1Ooll]=o11o0;O0000[Ol1ll0]=Oo1o0;O0000[O10OOl]=ol11;O0000[o0l0o1]=l000OCell;O0000[llllOo]=ll110;O0000[o0ll01]=OOlol;O0000.oO1111=l1OOol;O0000[oo1o0O]=ooOO0;O0000[lO1OO0]=ol0oo;O0000[OlO0o1]=oooo;O0000[l00010]=ooOOl;O0000[l0O1ll]=O1oo0;O0000[oO01l]=OooO0;O0000[o01O0o]=l0o00;O0000[loO00o]=l1lol;O0000[OOlool]=l00OO;O0000[OOOOl1]=Ol1O1;O0000[l0oo1l]=oloOO;O0000[ol0oOo]=Ol110;O0000[lo0Olo]=oll0l;O0000[oOO0OO]=oOo01;O0000[OolOl0]=o0OO;O0000[o11O0o]=lOo1l;O0000[oO0lo0]=O1lo;O0000[OllOOo]=l1010;O0000[olo01O]=oOO0;O0000[oOlo1o]=OOO0l;O0000[OO100o]=olo0ll;O0000[O00o1O]=O0O0l0;O0000[o1Ool]=l0ll;O0000[O1oOOl]=OOOl0;O0000[O1100l]=O1o1;O0000[l1o0lo]=oOol;O0000[olOo11]=O1ol0;O0000[lO1ooO]=lOOo0;O0000[oO11lo]=OooO1;O0000[ooO1oO]=lO01o;O0000[llolOl]=O1lO;O0000[o01Oo1]=O11Ol;O0000[o0l1Oo]=Ol01;O0000[ll00o0]=oO0Oo;O0000[l1OloO]=O00l1;O0000[O1l100]=O1o0O;O0000[lolol]=O10Ol;O0000[ool01O]=l1ol;O0000[l1o0oo]=Ollol;O0000[ollOl]=oll110;O0000[l1OOoO]=oO011;O0000[OlO1Oo]=OO0O01;O0000[OO1o10]=oool1;O0000[looo10]=lllOO;O0000[l1001l]=oll0O;O0000[lo0O0O]=oo0lo;O0000[o0lOo0]=OoOOO;O0000.oOOo=loO0l;O0000[o1OOll]=oo0ll;O0000[lllOo1]=lOl1o1;O0000[OloO00]=ll100;O0000[O1ol0l]=Ooo00;O0000[l00lOo]=lO1Oo;O0000[o0Oo1]=o0l1oo;O0000[l01Ool]=l01ll;O0000.O0o1=lO001;O0000.oO00=olloO;O0000[OloO00]=ll100;O0000.OoO111ByEvent=OOl1l;O0000[lo1000]=o0OO0;O0000[OOoOoo]=o1loo;O0000.ol0O0O=OOl1o;O0000[lOO00o]=lOlo1;O0000[O11Oo1]=olo01;O0000.O01000=Ool0;O0000.O10o0l=O11ll;O0000[l1OOlO]=oOl1O;O0000[O1OloO]=l011l0;O0000[lo0OoO]=lo0Oll;O0000[oo0lO1]=oOl01;O0000[Ol100o]=Olo1l;O0000.O0l0OEl=Oo0Olo;O0000.OolOlO=oO10;O0000[oO0lol]=l1llO;O0000[lo10lO]=llOoO;O0000[O0011l]=oo1Oo;O0000[O01OO0]=oo1OoButtons;O0000[oOlo0l]=OO1O1;O0000[OOol0O]=lOO00;O0000[olOo0O]=OlOoo;O0000[l11lOo]=OlO00;O0000[o100O0]=OlOO;O0000[lll1Ol]=llOl0;O0000[l1l01l]=O001o;O0000[l0olll]=oOO1l;O0000[OOo1lO]=lloO;O0000[o1oll1]=l1o10;O0000[l110l0]=o101O;O0000[Ol1OOo]=o0lo;O0000[O0ol0O]=loo1;O0000[l0OO1l]=l100o;O0000.llol=oo01;O0000.lOl11=ll10o;O0000[O00ll1]=o10ll;O0000[O01lO1]=ll0oll;O0000[oOoll0]=oOo1l;O0000[oO0o1]=O0101;O0000[olO1oo]=OO011;O0000[olO1l0]=O0101ValidateOnAdd;O0000[l01o0O]=OOO0o;oooO(o0ll1l,"datagrid");o0ll1l_CellValidator_Prototype={getCellErrors:function(){var F=this._cellErrors.clone(),A=this._dataSource;for(var _=0,D=F.length;_ .mini-outlookbar-groupHeader .mini-tools-collapse:before +{ + /*content: "\f107"*/ + content: "\f078"; +} +.mini-tools-close:before +{ + content: "\f00d"; +} +.mini-tools-max:before +{ + content: "\f2d0"; + font-size:12px; +} +.mini-tools-restore:before +{ + content: "\f2d2"; + font-size:12px; +} + +.mini-calendar-yearPrev:before +{ + content: "\f100"; +} +.mini-calendar-yearNext:before +{ + content: "\f101"; +} +.mini-calendar-monthPrev:before, +.mini-calendar-menu-prevYear:before +{ + content: "\f104"; +} +.mini-calendar-monthNext:before, +.mini-calendar-menu-nextYear:before +{ + content: "\f105"; +} + +.mini-checkcolumn .mini-grid-checkbox:before, +.mini-grid-checkbox:before +{ + content: "\f096"; +} + +.mini-grid-row-selected .mini-checkcolumn .mini-grid-checkbox:before, +.mini-grid-headerCell.mini-checkcolumn .mini-grid-checkbox.mini-grid-checkbox-checked:before , +.mini-grid-checkbox.mini-grid-checkbox-checked:before, +.mini-menuitem-checked .mini-menuitem-icon:before +{ + content: "\f046";/* content: "\f14a"; */ +} +.mini-grid-desc .mini-grid-sortIcon:before { + content: "\f0d7"; +} +.mini-grid-asc .mini-grid-sortIcon:before { + content: "\f0d8"; +} +.mini-grid-allowsort:before +{ + content: "\f0dc"; + font-size:13px; +} + +.mini-grid-ecIcon:before +{ + content: "\f067"; +} +.mini-grid-expandRow .mini-grid-ecIcon:before +{ + content: "\f068"; +} + +.mini-radiobuttonlist-item .mini-list-icon:before, +.mini-tree-radio:before, +.mini-grid-radio-checked:before, .mini-checkcolumn .mini-grid-radio:before +{ + content: "\f10c"; +} +.mini-radiobuttonlist-item-selected .mini-list-icon:before, +.mini-tree-selectedNode .mini-tree-radio:before,.mini-grid-row-selected .mini-tree-radio:before, +.mini-grid-radio-checked:before, .mini-grid-row-selected .mini-checkcolumn .mini-grid-radio:before +{ + content: "\f192"; +} + +.mini-list-icon:before +{ + content: "\f096"; +} +.mini-checkboxlist-item-selected .mini-list-icon:before +{ + content: "\f046"; +} + +.mini-checkbox-check:before, +.mini-checkbox-icon:before +{ + content: "\f096"; +} +.mini-checkbox-checked .mini-checkbox-icon:before +{ + content: "\f046"; +} + +.mini-tree-checkbox:before +{ + content: "\f096"; +} +.mini-tree-checkbox-checked:before +{ + content: "\f046"; +} + +.mini-pager-first:before +{ + content: "\f100"; +} +.mini-pager-prev:before { + content: "\f104"; +} +.mini-pager-next:before { + content: "\f105"; +} +.mini-pager-last:before { + content: "\f101"; +} +.mini-pager-reload:before { + content: "\f021"; +} + +.mini-tab-close-hover:hover +{ + content: "\f00d"; +} +.mini-tab-close:before +{ + content: "\f00d"; +} +.mini-tabs-leftButton:before { + content: "\f0d9"; +} +.mini-tabs-rightButton:before { + content: "\f0da"; +} +.mini-tabs-tabmenu:before { + content: "\f0d7"; +} + +.mini-buttonedit-trigger .mini-buttonedit-icon:before +{ + /*content: "\f0d7"; */ + content: "\f141"; + font-size:14px; +} +.mini-buttonedit-close:before +{ + content: "\f00d"; + font-size:12px; +} + +.mini-popupedit .mini-buttonedit-trigger .mini-buttonedit-icon:before +{ + content: "\f0d7"; +} +.mini-datepicker .mini-buttonedit-trigger .mini-buttonedit-icon:before +{ + content: "\f073"; +} + +.mini-buttonedit-up span:before +{ + content: "\f0d8"; +} +.mini-buttonedit-down span:before +{ + content: "\f0d7"; +} + +.mini-filteredit .mini-buttonedit-icon:before +{ + content: "\f0b0"; +} + +.mini-layout-region-west .mini-layout-region-header .mini-tools-collapse:before +{ + content: "\f053"; +} +.mini-layout-region-east .mini-layout-region-header .mini-tools-collapse:before +{ + content: "\f054"; +} +.mini-layout-proxy-west .mini-tools-collapse:before +{ + content: "\f054"; +} +.mini-layout-proxy-east .mini-tools-collapse:before +{ + content: "\f053"; +} +.mini-layout-proxy-north .mini-tools-collapse:before, +.mini-layout-proxy-south .mini-tools-collapse:before +{ + content: "\f078"; +} + +.mini-menu-topArrow:before +{ + content: "\f077"; +} +.mini-menu-bottomArrow:before +{ + content: "\f078"; +} + +/* no background */ +.mini-checkboxlist-item .mini-list-icon, +.mini-radiobuttonlist-item .mini-list-icon, +.mini-popupedit .mini-buttonedit-trigger .mini-buttonedit-icon, +.mini-datepicker .mini-buttonedit-trigger .mini-buttonedit-icon, +.mini-filteredit .mini-buttonedit-icon, +span.mini-buttonedit-button-hover, .mini-buttonedit-hover .mini-buttonedit-trigger, .mini-buttonedit-button-pressed,.mini-buttonedit-popup .mini-buttonedit-trigger, +.mini-buttonedit-up span, .mini-buttonedit-down span, +.mini-layout-region .mini-layout-region-header .mini-tools span, +.mini-tab-close, +.mini-grid-checkbox, .mini-grid-radio, +.mini-grid-checkbox-checked, .mini-grid-row-selected .mini-checkcolumn .mini-grid-checkbox, +.mini-tools .mini-tools-collapse, .mini-tools .mini-tools-close, .mini-tools .mini-tools-max, .mini-tools .mini-tools-restore, +.mini-calendar-menu-prevYear, .mini-calendar-menu-nextYear, +.mini-outlookbar .mini-outlookbar-expand .mini-tools-collapse, +mini-tabs-plain .mini-tabs-scrollCt, +.mini-tabs .mini-tabs-plain .mini-tabs-space, .mini-tabs .mini-tabs-plain .mini-tabs-space2, +.mini-tabs-leftButton, .mini-tabs-rightButton, .mini-tabs-tabmenu, +.mini-calendar-header, +.mini-menu .mini-menuitem-checked .mini-menuitem-icon, +.mini-menu-horizontal .mini-menu-border, .mini-menu-horizontal .mini-menuitem-allow, +.mini-tree-selectedNode .mini-tree-radio,.mini-grid-row-selected .mini-tree-radio, +.mini-grid-radio-checked, .mini-grid-row-selected .mini-checkcolumn .mini-grid-radio, +.mini-grid-ecIcon, .mini-grid-expandRow .mini-grid-ecIcon, +.mini-tree-expand .mini-tree-folder +/*, +.mini-pager-first, .mini-pager-prev, .mini-pager-next, .mini-pager-last, .mini-pager-reload*/ +{ + background:none; +} + +/* family */ +/* +.mini-widget, body, +.mini-button, .mini-menuitem, .mini-layout-region-header, .mini-panel-header, +.mini-outlookbar-groupHeader, +.mini-grid-headerCell, .mini-grid-cell, .mini-grid-columnproxy, +.mini-listbox td, +.mini-calendar, .mini-calendar-button, +.mini-tabs, +.mini-tree, +.mini-textbox-input, +.mini-buttonedit-input, +.mini-textboxlist-input, +.mini-textboxlist, +.mini-pager, +.mini-checkboxlist table label, .mini-radiobuttonlist table label, +.mini-checkbox, +.mini-checkboxlist, .mini-radiobuttonlist, .mini-radiobuttonlist label, +.mini-layout, +.mini-calendar, .mini-calendar-menu-month, mini-calendar-date, mini-calendar-menu-year, .mini-calendar-title +{ + font-family:"Helvetica Neue",Helvetica,Arial,sans-serif; + font-size:13px; +}*/ + +/* corner */ +.mini-corner-all, +.mini-button, +.mini-window, .mini-window > .mini-panel-border, +.mini-menu, .mini-menu-border, +.mini-tab, +.mini-tree-nodeshow, +.mini-textboxlist, .mini-textboxlist-border +.mini-textbox, .mini-textbox-border, +.mini-buttonedit, .mini-buttonedit-border, +.mini-htmlfile .mini-buttonedit-button, +.mini-calendar-button, +body .mini-pager-num, +.mini-tooltip-inner +{ + /*border-radius:6px;*/ +} diff --git a/hsweb-ui/plugins/miniui/themes/default/miniui.3.8.2.css b/hsweb-ui/plugins/miniui/themes/default/miniui.3.8.2.css new file mode 100644 index 0000000..2407073 --- /dev/null +++ b/hsweb-ui/plugins/miniui/themes/default/miniui.3.8.2.css @@ -0,0 +1,4933 @@ + +*, +*:before, +*:after{ + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + + + + + +html +{ + padding:0;border:0;margin:0; + width:100%;height:100%; +} +body +{ + font-family:Tahoma, Verdana, 宋体; + font-size:12px; + line-height:22px; +} +table +{ + position:relative; +} + +.app-header +{ + background:url(images/header.gif) repeat-x 0 -1px; +} + +.mini-button-icon, +.mini-button-allow, +.mini-menuitem-icon, +.mini-menuitem-allow +{ + line-height:16px; + text-align:center; +} + + + + + +.mini-iconfont, .mini-icon +{ + 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; + transform: translate(0, 0); + font-size: 16px; + line-height: 16px; + text-align:left; +} + +.mini-disabled { + color: gray; + cursor: default; + opacity: .7; + filter: alpha(opacity=70); +} + + + +.mini-repaint { + zoom: 1; + background-color: transparent; + -moz-outline: none; +} + + +html,body{_background-image:url(about:blank);_background-attachment:fixed;} +.mini-modal +{ + position:fixed;width:100%;height:100%;left:0;top:0; + opacity: .1;-moz-opacity: .1;filter: alpha(opacity=10); + background:#555; + _position:absolute; + _top:expression(eval(document.documentElement.scrollTop)); + _left:expression(eval(document.documentElement.scrollLeft)); + _height:expression(eval(document.documentElement.clientHeight)); + _width:expression(eval(document.documentElement.clientWidth)); +} +.mini-modal iframe +{ + opacity: .0;-moz-opacity: .0;filter: alpha(opacity=0); +} + +.mini-shadow{ + position:absolute; + overflow:hidden; + background:#ddd; + -moz-border-radius:5px; + -webkit-border-radius: 5px; + -moz-box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.3); + -webkit-box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.3); + filter: progid:DXImageTransform.Microsoft.Blur(pixelRadius=2,MakeShadow=false,ShadowOpacity=0.3); + z-index:99; + display:none !important; +} + +.mini-popup +{ + background:white; + border:1px solid #8B8B8B; + overflow:auto; + position:absolute; + left:0; + top:0; + font-size:9pt; + font-family:Tahoma, Verdana, 宋体; +} + +.mini-proxy +{ + position:absolute; + overflow:hidden; + z-index:100000000; + background:gray; + opacity: .4;-moz-opacity: .4;filter: alpha(opacity=40); +} + + + + +.mini-mask{ + position:absolute; + left:0; + top:0; + width:100%; + height:100%; + z-index:1000000; +} +body .mini-fixed +{ + position:fixed;width:100%;height:100%;left:0;top:0; + _position:absolute; + _top:expression(eval(document.documentElement.scrollTop)); + _left:expression(eval(document.documentElement.scrollLeft)); + _height:expression(eval(document.documentElement.clientHeight)); + _width:expression(eval(document.documentElement.clientWidth)); +} +.mini-mask-background{ + position:absolute; + left:0; + top:0; + width:100%; + height:100%; + background:#ccc;opacity: .3;-moz-opacity: .3;filter: alpha(opacity=30); +} + + + +.mini-mask-msg{ + position:absolute; + cursor:wait; + left:50%; + top:50%; + width:auto; + color:#222; + font-family:tahoma,arial,verdana,sans-serif; + font-size:12px; +} +.mini-mask-loading +{ + padding:10px 8px 10px 30px; + background:#fff url(images/grid/loading.gif) no-repeat scroll 5px 50%; + border:2px solid #517fad; +} + + +.mini-tools +{ + position:absolute; + top:5px;right:5px; +} +.mini-tools span +{ + width:15px; + height:15px; + overflow:hidden; + cursor:pointer; +} + +.mini-tools span, +.mini-tools a +{ + display:inline-block; + margin-left:2px; + vertical-align:middle; +} + +.mini-tools-close +{ + background:url(images/tools/close.gif) no-repeat 50% 1px; + _background-position:50% 3px; +} +.mini-tools .mini-tools-collapse +{ + background:url(images/tools/collapse.gif) no-repeat 50% 50%; + width:13px; + _background-position:50% 3px; +} +.mini-tools .mini-tools-expand +{ + background:url(images/tools/expand.gif) no-repeat 50% 50%; + width:13px; + _background-position:50% 3px; +} +.mini-tools-max +{ + background:url(images/tools/max.gif) no-repeat 50% 50%; + _background-position:50% 3px; +} +.mini-tools-min +{ + background:url(images/tools/min.gif) no-repeat 50% 50%; + _background-position:50% 3px; +} +.mini-tools-restore +{ + background:url(images/tools/restore.gif) no-repeat 50% 50%; + _background-position:50% 3px; +} +.mini-tools-refresh +{ + background:url(images/tools/refresh.gif) no-repeat 50% 50%; + _background-position:50% 3px; +} + + + +.mini-toolbar +{ + position:relative; + border:solid 1px #909aa6; + padding:3px; + _padding-bottom:4px; + background:#E7EAEE url(images/toolbar/toolbar.png) repeat-x 0 0; +} +.separator +{ + overflow:hidden; + display:inline-block; + zoom:1; + border:0; + border-left:solid 1px #adb3b9; + margin:1px; + margin-top:0px; + height:18px; + vertical-align:middle; + margin-left:8px; + margin-right:8px; +} + +body .mini-toolbar a.mini-button-disabled, body .mini-toolbar a:hover.mini-button-disabled +{ + cursor:default; + background:none; + + + border-color:transparent; + *border-width:0; + *padding:1px; +} +body .mini-toolbar .mini-button-disabled .mini-button-text, body .mini-toolbar a:hover.mini-button-disabled .mini-button-text +{ + color:#777; +} + +body .mini-toolbar a.mini-button-disabled, body .mini-toolbar a:hover.mini-button-disabled, +body .mini-pager a.mini-button-disabled, body .mini-pager a:hover.mini-button-disabled +{ + background:transparent; + border-color:transparent; + *border-width:0; + *padding:1px; +} + + + +.mini-drag-proxy +{ + position:absolute; + overflow:hidden; + z-index:100000000; + background:gray; + border:solid 1px #000; + opacity: .3; + filter: alpha(opacity=30); + box-sizing:content-box; +} + +.mini-feedback-line +{ + position:absolute;left:-1000px;top:-1000px;z-index:2000080; + height:1px;overflow:hidden;background:blue; +} +.mini-feedback +{ + position:absolute;left:-1000px;top:-1000px;background:no-repeat 3px 50% white;z-index:2000090; + border:solid 1px #aaa;padding:3px;padding-left:22px;padding-bottom:5px;padding-right:5px; + font:normal 12px tahoma, arial, helvetica, sans-serif; + *font-size:11px;line-height:16px; +} +.mini-feedback-add +{ + background-image:url(images/dragdrop/drop-add.gif); +} +.mini-feedback-before +{ + background-image:url(images/dragdrop/drop-over.gif); +} +.mini-feedback-after +{ + background-image:url(images/dragdrop/drop-under.gif); +} +.mini-feedback-no +{ + background-image:url(images/dragdrop/drop-no.gif); +} +.mini-feedback-yes +{ + background-image:url(images/dragdrop/drop-yes.gif); +} +.mini-supergrid-feedback-add .mini-supertree-nodetext +{ + border:dotted 1px #aaa; + background:#ddd; + font-weight:bold; +} +body .mini-tree-feedback-add .mini-tree-nodeshow, +body .mini-tree-feedback-add .mini-treegrid-nodeshow +{ + border:dotted 1px #aaa; + background:#ddd; + padding:0; + padding-left:1px; + padding-right:2px; +} + + + +.mini-resizer-trigger +{ + z-index:100; + position:absolute; + width:14px;height:12px; + right:1px;bottom:1px; + overflow:hidden; + cursor:se-resize; + background:url(images/panel/resize.gif) no-repeat right bottom; +} +.mini-resizer-proxy +{ + border:dotted 1px black; + overflow:hidden; + position:absolute; + z-index:10000000000; + background:gray; + opacity: .30;-moz-opacity: .30;filter: alpha(opacity=30); + border:solid 1px black; +} +.mini-resizer-mask +{ + position:absolute; + left:0; + top:0; + width:100%; + height:100%; + z-index:100000000; + background:white; + opacity:0; + filter:alpha(opacity=0) +} + + +.mini-box +{ + overflow:hidden; +} +.mini-box-border +{ + border:1px solid #999999; + overflow:auto; + position:relative; +} + + +body .mini-grid *, +body .mini-supergird *, +body .mini-gantt *, +body .mini-panel *, +body .mini-window * +{ + box-sizing:content-box; + -moz-box-sizing:content-box; + -ms-box-sizing:content-box; + -webkit-box-sizing:content-box; +} + +body .mini-textbox *, +body .mini-buttonedit * +{ + + box-sizing:content-box; + -moz-box-sizing:content-box; + -ms-box-sizing:content-box; + -webkit-box-sizing:content-box; +} + + +.mini-fit +{ + width:auto; + overflow:auto; + position:relative; +} + + +.mini-error +{ + position:relative; +} +.mini-error .mini-errorIcon +{ + display:block; +} +.mini-errorIcon +{ + background:url(images/textbox/error.gif) no-repeat 50% 50%; + width:14px; + height:16px; + overflow:hidden; + display:none; + cursor:default; + margin-top:2px; + + position:absolute; + right:1px; + top:50%; + margin-top:-8px; +} +.mini-error .mini-listbox-border, +.mini-error .mini-list-border +{ + margin-right:18px; +} + + +.mini-labelfield-label +{ + position:absolute;left:0;top:0;line-height:20px; + width:100px; +} +body .mini-labelfield +{ + display:block; + width:250px; + margin-bottom:5px; +} +body .mini-labelfield-checkboxlist +{ + width:auto;*zoom:1; +} + + + +.mini-row +{ + + *padding-right:1px; +} + +.mini-col-1, .mini-col-2, .mini-col-3, .mini-col-4, .mini-col-5, .mini-col-6, .mini-col-7, .mini-col-8, .mini-col-9, .mini-col-10, .mini-col-11, .mini-col-12, +.mini-sm .mini-col-sm-1, .mini-sm .mini-col-sm-2, .mini-sm .mini-col-sm-3, .mini-sm .mini-col-sm-4, .mini-sm .mini-col-sm-5, .mini-sm .mini-col-sm-6, .mini-sm .mini-col-sm-7, .mini-sm .mini-col-sm-8, .mini-sm .mini-col-sm-9, .mini-sm .mini-col-sm-10, .mini-sm .mini-col-sm-11, .mini-sm .mini-col-sm-12, +.mini-md .mini-col-md-1, .mini-md .mini-col-md-2, .mini-md .mini-col-md-3, .mini-md .mini-col-md-4, .mini-md .mini-col-md-5, .mini-md .mini-col-md-6, .mini-md .mini-col-md-7, .mini-md .mini-col-md-8, .mini-md .mini-col-md-9, .mini-md .mini-col-md-10, .mini-md .mini-col-md-11, .mini-md .mini-col-md-12, +.mini-lg .mini-col-lg-1, .mini-lg .mini-col-lg-2, .mini-lg .mini-col-lg-3, .mini-lg .mini-col-lg-4, .mini-lg .mini-col-lg-5, .mini-lg .mini-col-lg-6, .mini-lg .mini-col-lg-7, .mini-lg .mini-col-lg-8, .mini-lg .mini-col-lg-9, .mini-lg .mini-col-lg-10, .mini-lg .mini-col-lg-11, .mini-lg .mini-col-lg-12 +{ + float:left; + display:inline; + position: relative; + min-height: 1px; +} + +.mini-col-12, +.mini-sm .mini-col-sm-12{ + width: 100%; +} +.mini-col-11, +.mini-sm .mini-col-sm-11{ + width: 91.66666667%; +} +.mini-col-10, +.mini-sm .mini-col-sm-10{ + width: 83.33333333%; +} +.mini-col-9, +.mini-sm .mini-col-sm-9 { + width: 75%; +} +.mini-col-8, +.mini-sm .mini-col-sm-8 { + width: 66.66666667%; +} +.mini-col-7, +.mini-sm .mini-col-sm-7 { + width: 58.33333333%; +} +.mini-col-6, +.mini-sm .mini-col-sm-6 { + width: 50%; +} +.mini-col-5, +.mini-sm .mini-col-sm-5 { + width: 41.66666667%; +} +.mini-col-4, +.mini-sm .mini-col-sm-4 { + width: 33.33333333%; +} +.mini-col-3, +.mini-sm .mini-col-sm-3 { + width: 25%; +} +.mini-col-2, +.mini-sm .mini-col-sm-2 { + width: 16.66666667%; +} +.mini-col-1, +.mini-sm .mini-col-sm-1 { + width: 8.33333333%; +} + +.mini-md .mini-col-md-12{ + width: 100%; +} +.mini-md .mini-col-md-11{ + width: 91.66666667%; +} +.mini-md .mini-col-md-10{ + width: 83.33333333%; +} +.mini-md .mini-col-md-9 { + width: 75%; +} +.mini-md .mini-col-md-8 { + width: 66.66666667%; +} +.mini-md .mini-col-md-7 { + width: 58.33333333%; +} +.mini-md .mini-col-md-6 { + width: 50%; +} +.mini-md .mini-col-md-5 { + width: 41.66666667%; +} +.mini-md .mini-col-md-4 { + width: 33.33333333%; +} +.mini-md .mini-col-md-3 { + width: 25%; +} +.mini-md .mini-col-md-2 { + width: 16.66666667%; +} +.mini-md .mini-col-md-1 { + width: 8.33333333%; +} + +.mini-lg .mini-col-lg-12{ + width: 100%; +} +.mini-lg .mini-col-lg-11{ + width: 91.66666667%; +} +.mini-lg .mini-col-lg-10{ + width: 83.33333333%; +} +.mini-lg .mini-col-lg-9 { + width: 75%; +} +.mini-lg .mini-col-lg-8 { + width: 66.66666667%; +} +.mini-lg .mini-col-lg-7 { + width: 58.33333333%; +} +.mini-lg .mini-col-lg-6 { + width: 50%; +} +.mini-lg .mini-col-lg-5 { + width: 41.66666667%; +} +.mini-lg .mini-col-lg-4 { + width: 33.33333333%; +} +.mini-lg .mini-col-lg-3 { + width: 25%; +} +.mini-lg .mini-col-lg-2 { + width: 16.66666667%; +} +.mini-lg .mini-col-lg-1 { + width: 8.33333333%; +} + + +.mini-clearfix:after, +.mini-row:after{ + display: table; + content: " "; + clear: both; +} +.mini-clearfix, +.mini-row +{ + *zoom:1; +} + +.mini-unspace +{ + *overflow:hidden; + *height:0; +} + + + +.mini-xs-active .mini-hidden-xs, +.mini-sm-active .mini-hidden-sm, +.mini-md-active .mini-hidden-md, +.mini-lg-active .mini-hidden-lg { + display: none !important; +} + +.mini-visible-xs, +.mini-visible-sm, +.mini-visible-md, +.mini-visible-lg, +.mini-visible-xs-inline, +.mini-visible-sm-inline, +.mini-visible-md-inline, +.mini-visible-lg-inline, +.mini-visible-xs-inline-block, +.mini-visible-sm-inline-block, +.mini-visible-md-inline-block, +.mini-visible-lg-inline-block { + display: none !important; +} + +.mini-xs-active .mini-visible-xs, +.mini-sm-active .mini-visible-sm, +.mini-md-active .mini-visible-md, +.mini-lg-active .mini-visible-lg { + display: block !important; +} + +.mini-xs-active .mini-visible-xs-inline, +.mini-sm-active .mini-visible-sm-inline, +.mini-md-active .mini-visible-md-inline, +.mini-lg-active .mini-visible-lg-inline { + display: inline !important; +} + +.mini-xs-active .mini-visible-xs-inline-block, +.mini-sm-active .mini-visible-sm-inline-block, +.mini-md-active .mini-visible-md-inline-block, +.mini-lg-active .mini-visible-lg-inline-block { + display: inline-block !important; + *display: inline !important; + *zoom:1 !important; +} + +.mini-sm-active table.mini-visible-sm, +.mini-md-active table.mini-visible-md, +.mini-lg-active table.mini-visible-lg { + display: table !important; +} + +.mini-xs-active tr.mini-visible-xs, +.mini-sm-active tr.mini-visible-sm, +.mini-md-active tr.mini-visible-md, +.mini-lg-active tr.mini-visible-lg { + display: table-row !important; +} + +.mini-xs-active td.mini-visible-xs, +.mini-sm-active td.mini-visible-sm, +.mini-md-active td.mini-visible-md, +.mini-lg-active td.mini-visible-lg { + display: table-cell !important; +} + + + +.mini-button +{ + padding:0; + border:1px solid #A9ACB5; + background:#EBEDF2 url(images/button/button.png) repeat-x 0 0; + + font-size:9pt; + font-family:Tahoma,Verdana,宋体; + + line-height:22px; + + text-decoration:none; + text-align: center; + display:inline-block; + *zoom:1; + cursor:pointer; + -khtml-user-select: none; + -moz-user-select:none; + vertical-align:middle; + outline:none; + position:relative; +} +.mini-button +{ + color:#201F35; +} +body a:hover.mini-button +{ + padding:0; + border:1px solid #A9ACB5; + background:#dde6fe url(images/button/hover.png) repeat-x 0 0; + text-decoration:none; +} + + + +.mini-button-inner +{ + position:relative; + + line-height:16px; + padding:3px 8px 3px 8px; + + line-height:17px\9; + + display:inline-block; + padding:3px 8px 2px 8px\9; + +padding:3px 8px 2px 8px; + _padding:2px 8px 2px 8px; + + vertical-align:baseline; +} + +.mini-button-text +{ + +} +.mini-button-icon +{ + position:absolute;left:5px;top:50%; + width:18px;height:18px;overflow:hidden; + margin-top:-9px; + +margin-top:-10px; + + line-height:18px; + line-height:16px\9; +} + +.mini-button .mini-button-icon +{ + background-position: 50% 50%; + background-repeat:no-repeat; +} + +.mini-button .mini-button-icon-text +{ + padding-left:25px; +} +.mini-button .mini-button-icon-only +{ + padding-left:14px; +} +.mini-button .mini-button-icon-only .mini-button-icon +{ + left:4px; +} + + +body .mini-button-plain +{ + background:transparent; + border:0; + padding:1px; +} + + +body .mini-button-plain +{ + border:1px solid transparent; + padding:0; + + *border:0; + *padding:1px; +} + +body .mini-button-pressed, body a:hover.mini-button-pressed, +body .mini-button-checked, body a:hover.mini-button-checked, +body a.mini-button-popup, body a:hover.mini-button-popup +{ + border:solid 1px #888; + padding:0px; + color:#3C3C3C; + background:#DBDDE2 url(images/button/pressed.png) repeat-x 0 0; + cursor:pointer; +} + + + +body a:hover.mini-button +{ + padding:0px; + border:1px solid #A9ACB5; +} + + +body a.mini-button-disabled, body a:hover.mini-button-disabled +{ + border:1px solid #ccc; + padding:0px; + color:#777; + background:#F8F9FA url(images/button/disabled.png) repeat-x 0 0px; + cursor:default; +} +body .mini-button-disabled * +{ + cursor: default; + opacity: .7; + -moz-opacity: .7; + filter: alpha(opacity=70); +} + + + + + +.mini-button-iconRight .mini-button-icon-text +{ + padding-left:8px; + padding-right:25px; + +} +.mini-button-iconRight .mini-button-icon +{ + left:auto;right:5px; +} + +.mini-button-iconTop .mini-button-icon-text +{ + padding-left:8px; + padding-top:22px; +} +.mini-button-iconTop .mini-button-icon +{ + left:50%;margin-left:-9px; + top:2px;margin-top:auto; +} + +.mini-button-iconTop .mini-button-allow +{ + position:static;display:block; + background-position:3px 50%; + margin-top:0; + margin:auto; + +margin:0; +} + + + + + +.mini-button-allow +{ + position:relative; + width:14px; + height:16px; + overflow:hidden; + display:inline-block; + vertical-align:top; + margin-top:3px; +} +.mini-button-menu +{ + background:url(images/button/menu_arrow.png) no-repeat 0px 50%; +} +.mini-button-split +{ + width:18px; + background:url(images/button/split_arrow.png) no-repeat 0px 50%; +} + + +.mini-checkbox +{ + font-size:9pt; + font-family:Tahoma,Verdana,宋体; + line-height:22px; + position:relative; +} +.mini-checkbox label +{ + vertical-align:middle; +} +.mini-checkbox-check, +.mini-checkbox-icon +{ + padding:0; + margin:0; + margin-right:6px; + vertical-align:middle; + width:13px;height:13px; + display:inline-block; + background:url(images/icons/checkbox.gif) no-repeat 0 0; + overflow:hidden; + cursor:pointer; +} + +.mini-checkbox-checked .mini-checkbox-icon +{ + background-position:0 -13px; +} + + + +.mini-checkbox-check +{ + display:none; +} +.mini-textbox +{ + width:150px; + height:24px; + display:inline-block; + + padding:0; + margin:0; + border:0; + vertical-align:middle; + overflow:hidden; + + position:relative; + +} +.mini-textbox-border +{ + background:white; + border: solid 1px #a5acb5; + width:auto; + height:22px; + display:block; + + position:relative;overflow:hidden; + padding-left:4px;padding-right:4px; +} + +.mini-textbox-input +{ + cursor:text; + background:none; + + background:url(about:blank) no-repeat\0; + width:100%; + height:22px; + line-height:20px; + font-family: Verdana; + font-size: 9pt; + border:0; + padding: 0; + margin:0; + padding:0; + outline:none; + float:left; + + _position:absolute; + _left:2px; + _top:0px; +} +.mini-required .mini-textbox-border, +.mini-required .mini-buttonedit-border +{ + background:#FFFFE6; +} + + + + +.mini-textbox-focus .mini-textbox-border +{ + border-color:#808891; +} + + +.mini-placeholder-label +{ + position:absolute;left:0;top:0;padding:2px;line-height:17px;padding-left:2px; + color:#9a9a9a;cursor:text;white-space:nowrap; +} + + + +.mini-textbox-disabled +{ + cursor:default; + +} +body .mini-textbox-disabled .mini-textbox-border +{ + background:#f0f0f0;color:#6D6D6D;cursor:default; +} + + +body .mini-textarea +{ + height:50px; +} +.mini-textarea .mini-textbox-border +{ + height:auto;padding-left:2px;padding-right:0px; +} +.mini-textarea .mini-textbox-input +{ + resize:none; + height:100%; + margin:0;padding:0;border:0; +} + +.mini-textarea .mini-textbox-input{ + overflow:auto; +} + + +.mini-error .mini-textbox-border +{ + margin-right:18px; +} +body .mini-invalid .mini-textbox-border, +body .mini-invalid .mini-buttonedit-border +{ + border:red 1px solid; +} + + +.mini-indent .mini-textbox-border, +.mini-indent .mini-buttonedit-border +{ + margin-right:18px; +} + +.mini-buttonedit +{ + width:150px; + height:24px; + display:inline-block; + vertical-align:middle; + overflow:hidden; + + position:relative; +} + +.mini-buttonedit-border +{ + background:white; + border: solid 1px #a5acb5; + width:auto; + height:22px; + display:block; + + position:relative;overflow:hidden; + padding-right:24px;padding-left:4px; +} +.mini-buttonedit-buttons +{ + clear:both;position:absolute;right:0px;top:0px; + +} + + +.mini-buttonedit-height .mini-buttonedit-buttons +{ + height:20px; + top:50%; + margin-top:-10px; +} + +.mini-buttonedit-input +{ + + + background:none; + + background:url(about:blank) no-repeat\0; + border: 0; + height:22px; + line-height:22px; + font-family: Verdana; + font-size: 9pt; + padding: 0; + margin:0; + outline:none; + z-index:1; + cursor:text; + width:100%;float:right; + _position:absolute; + _left:2px; + _top:0px; + + +} +.mini-buttonedit .mini-buttonedit-input +{ + padding: 0; + margin:0; + border: 0; +} + +.mini-buttonedit input::-ms-clear, +.mini-textbox input::-ms-clear +{display:none;} + +.mini-buttonedit-button, .mini-buttonedit-close +{ + border:0px; + padding:1px; + background:none; + width:18px;height:18px; + overflow:hidden; + cursor:pointer; + margin-top:1px; + margin-right:1px; + display:inline-block; + z-index:10; + vertical-align:top; + position:relative; +} +.mini-buttonedit-close +{ + display:none; + background:url(images/buttonedit/close.gif) no-repeat 50% 50%; + width:14px; +} + +.mini-buttonedit-button-hover, +.mini-buttonedit-hover .mini-buttonedit-trigger +{ + border:1px solid #ababab; + padding:0; + background:#dde6fe url(images/buttonedit/hover.png) repeat-x 0 0; +} + + +.mini-buttonedit-button, .mini-buttonedit-close +{ + border:1px solid transparent; + padding:0; + + _border:0px; + _padding:1px; +} +.mini-buttonedit-button-hover, +.mini-buttonedit-hover .mini-buttonedit-trigger +{ + border:1px solid #ababab; + padding:0; + + _border:1px solid #ababab; + _padding:0; +} + + +.mini-buttonedit-button-pressed, +.mini-buttonedit-popup .mini-buttonedit-trigger +{ + border:1px solid #888; + padding:0; + background:#DBDDE2 url(images/buttonedit/pressed.png) repeat-x 0 0; +} + +.mini-buttonedit-focus .mini-buttonedit-border, +.mini-buttonedit-popup .mini-buttonedit-border +{ + border-color:#808891; +} +.mini-buttonedit-hover, +.mini-buttonedit-hover .mini-buttonedit-input +{ + cursor:pointer; +} + +.mini-buttonedit-disabled +{ + cursor:default; + +} +body .mini-buttonedit-disabled .mini-buttonedit-border, +body .mini-buttonedit-disabled .mini-buttonedit-input +{ + background:#f0f0f0;color:#6D6D6D;cursor:default; +} +body .mini-buttonedit-disabled .mini-buttonedit-button +{ + cursor:default;background:#f0f0f0;border-color:#f0f0f0; +} +body .mini-buttonedit-disabled .mini-buttonedit-up, +body .mini-buttonedit-disabled .mini-buttonedit-down +{ + cursor:default; +} + + + +.mini-buttonedit-empty .mini-buttonedit-input +{ + color:#B1B1B8; +} + +.mini-buttonedit-icon +{ + display:block; + width:15px; + height:15px; + overflow:hidden; + background:url(images/buttonedit/icon1.gif) no-repeat 50% 50%; + position:absolute; + left:50%; + top:50%; + margin-left:-8px; + margin-top:-8px; +} +.mini-buttonedit .mini-buttonedit-icon +{ + background-position:50% 50%; +} +.mini-popupedit .mini-buttonedit-trigger .mini-buttonedit-icon +{ + background:url(images/buttonedit/icon2.gif) no-repeat 3px 1px; +} +.mini-datepicker .mini-buttonedit-trigger .mini-buttonedit-icon +{ + background:url(images/datepicker/date.gif) no-repeat 50% 2px; +} +.mini-autocomplete .mini-buttonedit-trigger .mini-buttonedit-icon +{ + +} + + +.mini-buttonedit-up, .mini-buttonedit-down +{ + overflow:hidden; + height:50%; + display:block; + cursor:pointer; + z-index:1; +} +.mini-buttonedit-up span, .mini-buttonedit-down span +{ + background:url(images/buttonedit/up.gif) no-repeat 50% 3px; + width:16px; + height:100%; + overflow:hidden; + display:block; + margin:auto; +} +.mini-buttonedit-down span +{ + background:url(images/buttonedit/down.gif) no-repeat 50% 3px; +} +.mini-buttonedit-button .mini-buttonedit-button-pressed +{ + border:0; +} + + +.mini-filteredit .mini-buttonedit-icon +{ + background:url(images/buttonedit/filter.png) no-repeat 50% 0px; +} + + +input.mini-textbox, +input.mini-buttonedit, +input.mini-datepicker, +input.mini-spinner, +input.mini-timespinner, +input.mini-combobox, +input.mini-treeselect, +input.mini-lookup, +input.mini-htmlfile, +input.mini-password, +input.mini-checkbox, +input.mini-textarea +{ + visibility:hidden; + border:0; + padding:0; + height:21px; + width:125px; +} +input.mini-textarea +{ + height:50px; +} + + + + +.mini-error .mini-buttonedit-border +{ + margin-right:18px; +} +.mini-panel +{ + font-size:9pt; + font-family:Tahoma, Verdana, 宋体; + overflow:hidden; + position:relative; + outline:none; +} +.mini-panel-border +{ + border:1px solid #999999; + overflow:hidden; + position:relative; + +} + .mini-panel-viewport + { + background:white; + } +.mini-panel .mini-panel-viewport +{ + position:relative; + overflow:hidden; +} +.mini-panel-header +{ + width:auto; + + overflow:hidden; + background:#edf1f5 url(images/panel/header.png) repeat-x 0 0px; + color:#201F35; + border-bottom:solid 1px #bbb; + cursor:default; + position:relative; + zoom:1; +} + +.mini-panel-header-inner +{ + padding:5px 4px 5px 8px; + overflow:hidden; + *zoom:1; +} +.mini-panel .mini-panel-title +{ + padding-top:0px\9; + float:left; + line-height:16px; + font-weight:bold; +} +.mini-panel .mini-panel-icon +{ + float:left; + width:16px; + height:16px; + overflow:hidden; + vertical-align:middle; + margin-right:2px; + display:none; +} + +.mini-panel-body +{ + position:relative; + padding:5px; + text-align:left; + width:auto; + overflow:auto; + clear:both; +} +.mini-messagebox-content table +{ + +} + +.mini-panel .mini-tools +{ + position:absolute; + top:5px;right:5px; +} + +.mini-panel-toolbar +{ + clear:both; + border-bottom:solid 1px #C9C9C9; + background:#eff2f4; + + + width:auto; + clear:both; + position:relative;overflow:hidden; + line-height:18px; + zoom:1; +} + +.mini-panel-footer +{ + border-top:solid 1px #C9C9C9; + background:#eff2f4; + + + width:auto; + position:relative;overflow:hidden; + line-height:18px;zoom:1; +} + + +.mini-panel-collapse .mini-panel-header +{ + border-bottom:0; +} +.mini-panel-collapse .mini-tools-collapse +{ + background:url(images/tools/expand.gif) no-repeat 50% 50%; + _background-position:50% 3px; +} + +.mini-panel-titleclick .mini-panel-header +{ + cursor:pointer; +} + + +.mini-window +{ + position:absolute; +} +.mini-window .mini-panel-header +{ + background:#E3E6E8 url(images/window/header.png) repeat-x 0 0px; +} +.mini-window .mini-panel-footer +{ + background:#E3E6E8 url(images/window/footer.png) repeat-x 0 0px; +} +.mini-window-drag .mini-panel-header +{ + cursor:move; +} + +.mini-window-max +{ + position:fixed!important; +} + + +.mini-messagebox-content +{ + padding:5px; + cursor:default; +} +.mini-messagebox-table +{ +} +.mini-messagebox-content td +{ + font-size:12px; +} +.mini-messagebox-content-text +{ + padding:8px;padding-right:40px;padding-left:0px;text-align:center; + white-space:nowrap; +} + +.mini-messagebox-buttons +{ + text-align:center; + padding:5px; + padding-left:15px; + padding-right:15px; +} +.mini-messagebox-info, +.mini-messagebox-warning, +.mini-messagebox-question, +.mini-messagebox-error, +.mini-messagebox-waiting +{ + width:40px; + height:40px; + background:url(images/messagebox/icon-info.gif) no-repeat 50% 50%; +} +.mini-messagebox-warning +{ + background:url(images/messagebox/icon-warning.gif) no-repeat 50% 50%; +} +.mini-messagebox-question +{ + background:url(images/messagebox/icon-question.gif) no-repeat 50% 50%; +} +.mini-messagebox-error +{ + background:url(images/messagebox/icon-error.gif) no-repeat 50% 50%; +} +.mini-messagebox-waiting +{ + width:40px; + height:30px; + background:url(images/messagebox/loading.gif) no-repeat 50% 50%; +} + +.mini-messagebox-input +{ + +} + + + + +.mini-outlookbar +{ + font-size:9pt; + font-family:Tahoma, Verdana, 宋体; + overflow:hidden; +} +.mini-outlookbar-border +{ + border:1px solid #999999; + overflow:hidden; + position:relative; +} + +.mini-outlookbar-group +{ + overflow:hidden; + height:auto; + border-bottom:solid 1px #a7abb0; + position:relative; +} +.mini-outlookbar-groupHeader +{ + position:relative; + background:#edf1f5 url(images/navbar/header.png) repeat-x 0 0; + cursor:pointer; + overflow:hidden; + line-height:16px; + padding:5px 25px 5px 4px; + font-weight:bold; + *zoom:1; +} +.mini-outlookbar-groupTitle +{ + overflow:hidden; + white-space:nowrap; + float:left; + padding-left:4px; + width:80%; +} +.mini-outlookbar-groupHeader .mini-tools +{ + position:absolute; + top:5px;right:5px; +} +.mini-outlookbar-groupBody +{ + clear:both; + border-top:solid 1px #a7abb0; + overflow:auto; + overflow-x:hidden; + overflow-y:auto; + position:relative; +} + +.mini-outlookbar-firstGroup +{ + +} + +.mini-outlookbar .mini-outlookbar-icon +{ + float:left; + width:16px; + height:16px; + overflow:hidden; + vertical-align:middle; + + + margin-left:2px; +} + +.mini-outlookbar-collapse .mini-outlookbar-groupBody +{ + display:none; +} +.mini-outlookbar-lastGroup +{ + border-bottom:0; +} +.mini-outlookbar-lastGroup .mini-outlookbar-groupHeader +{ + border-bottom:0; +} + +.mini-outlookbar .mini-outlookbar-expand .mini-tools-collapse +{ + background:url(images/tools/expand.gif) no-repeat 50% 50%; +} +.mini-outlookbar-collapse +{ + +} +.mini-outlookbar-expand +{ +} + + +.mini-outlookbar-view2 .mini-outlookbar-border +{ + border:0; +} +.mini-outlookbar-view2 .mini-outlookbar-group +{ + border:0; + margin-bottom:1px; +} +.mini-outlookbar-view2 .mini-outlookbar-groupHeader +{ + border:solid 1px #a7abb0; +} +.mini-outlookbar-view2 .mini-outlookbar-groupBody +{ + border:0; + background:#fff; +} +.mini-outlookbar-view2 .mini-outlookbar-lastGroup +{ + margin:0; +} +.mini-outlookbar-view2 .mini-outlookbar-groupBody +{ + background:#fff; + border:solid 1px #ccc; + border-top:0; +} + + + +.mini-outlookbar-view3 .mini-outlookbar-border +{ + border:0; +} +.mini-outlookbar-view3 .mini-outlookbar-group +{ + border:solid 1px #a7abb0; + margin-bottom:8px; +} +.mini-outlookbar-view3 .mini-outlookbar-groupBody +{ + +} +.mini-outlookbar-view3 .mini-outlookbar-lastGroup +{ + margin:0; + margin-bottom:0px; +} + + +.mini-outlookbar-overflow, +.mini-outlookbar-overflow .mini-tree, +.mini-outlookbar-overflow .mini-menu +{ + overflow:hidden; +} + + + +.mini-outlookmenu .mini-menu-border +{ + overflow-y:auto; +} +.mini-outlookmenu .mini-menu +{ + background:none; +} + +.mini-tabs +{ + overflow:hidden; + + position:relative; +} +.mini-tabs-table +{ + + + border-collapse:collapse; + border-collapse:separate; + position:relative; +} +.mini-tabs-scrollCt +{ + position:relative; + border-bottom:solid 1px #A8A8A8; + border:solid 1px #999999; + background:#f0f0f0 repeat-x 0 0; + zoom:1; +} +.mini-tabs-headers +{ + width:auto; + padding:0; + + position:relative; + + margin-bottom:-1px; + *zoom:1; +} + +.mini-tabs-header-bottom .mini-tabs-headers +{ + border-top:0;border-bottom-width:1px;padding-top:0;padding-bottom:2px; +} +body .mini-tabs-plain .mini-tabs-scrollCt +{ + background:none;border-left:0;border-top-width:0;border-right:0; +} +body .mini-tabs-plain .mini-tabs-headers +{ + padding-bottom:0;padding-top:0; +} + +body .mini-tabs-position-bottom .mini-tabs-plain .mini-tabs-scrollCt +{ + border-bottom-width:0;border-top-width:1px; +} + + + +.mini-tabs-position-top .mini-tabs-headers, +.mini-tabs-position-bottom .mini-tabs-headers +{ + width:auto; + overflow:hidden; +} + +.mini-tabs-position-top .mini-tabs-header +{ + margin-top:2px; +} +.mini-tabs-position-bottom .mini-tabs-header +{ + margin-bottom:2px; +} + +.mini-tabs-position-top .mini-tabs-plain .mini-tabs-header +{ + margin-top:0px; +} +.mini-tabs-position-bottom .mini-tabs-plain .mini-tabs-header +{ + margin-bottom:0px; +} + + + + + +.mini-tabs-body +{ + position:relative; + overflow:auto; + height:100%; +} +.mini-tabs-hideOverflow +{ + overflow:hidden; +} + +.mini-tabs-bodys +{ + position:relative; + border:solid 1px #999999; + border-top:0; + background:white; + + padding:5px; + + text-align:left; + overflow:hidden; +} +.mini-tabs-header +{ + width:100%; + border-collapse:collapse; + border-collapse:separate; + margin:0; + padding:0; + border:0; +} +.mini-tabs-header2 +{ + margin-bottom:1px; +} +.mini-tabs-header2 .mini-tabs-firstSpace, +.mini-tabs-header2 .mini-tabs-lastSpace +{ + border-bottom:1px solid transparent; + _border-color:tomato; + _filter:chroma(color=tomato); +} +.mini-tabs-space +{ + width:3px; + border-bottom:solid 1px #999999; +} +.mini-tabs-space div{ + height:1px;width:3px;overflow:hidden; +} +.mini-tabs-space2 +{ + width:3px; + border-bottom:solid 1px #999999; +} +.mini-tabs-space2 div{ + height:3px;width:3px;overflow:hidden; +} + +.mini-tab +{ + background: #EBEBEE url(images/tabs/tab.png) repeat-x 0 0; + color: #201F35; + border: 1px solid #999999; + color: black; + font: 9pt Tahoma; + padding: 3px 10px 3px 10px; + text-align: center; + cursor:pointer; + white-space:nowrap; +} +.mini-tab-hover +{ + background:#E1E8FD url(images/tabs/hover.png) repeat-x 0 0; +} +.mini-tab-active +{ + border-bottom:solid 1px white; + background:white; + cursor:default; + font-weight:bold; +} +.mini-tab-body +{ + position:relative; +} +.mini-tab-text +{ + display:inline-block; + vertical-align:middle; + line-height:16px; + padding:1px; + padding-left:2px; + padding-right:2px; +} +.mini-tabs-plain .mini-tab-text +{ + line-height:18px; +} +.mini-tab .mini-tab-icon +{ + display:inline-block; + width:16px;height:16px; + vertical-align:middle; + background-position:50% 50%; + +} +.mini-tab-close +{ + display:inline-block; + width:13px;height:13px; + vertical-align:top; + margin-top:2px; + + background:url(images/tabs/close.gif) no-repeat 3px 3px; + cursor:pointer; + + opacity: .6; + filter: alpha(opacity=60); +} +.mini-tab-close-hover +{ + background-color:#aaa; + opacity: 1; + filter: alpha(opacity=100); +} + + +.mini-tabs-header-bottom +{ + width:auto; + top:-1px; +} + + +.mini-tabs-header-bottom .mini-tabs-space, +.mini-tabs-header-bottom .mini-tabs-space2 +{ + border:0; + border-top: 1px solid #999999; +} +.mini-tabs-header-bottom .mini-tabs-headers +{ + +} +.mini-tabs-header-bottom .mini-tabs-bodys +{ + border:solid 1px #999999; + border-bottom:0; +} +.mini-tabs-header-bottom .mini-tab-active +{ + border-top:solid 1px white; + border-bottom:solid 1px #999999; +} + +.mini-tabs-position-bottom .mini-tabs-header2 +{ + margin:0px; + margin-top:1px; +} +.mini-tabs-header-bottom .mini-tabs-header2 .mini-tabs-firstSpace, +.mini-tabs-header-bottom .mini-tabs-header2 .mini-tabs-lastSpace +{ + border-top:1px solid transparent; + _border-color:tomato; + _filter:chroma(color=tomato); +} + +.mini-tabs-body-bottom +{ + border:solid 1px #999999; + border-bottom:0; +} + + +.mini-tabs-header-left .mini-tabs-header, +.mini-tabs-header-right .mini-tabs-header +{ + min-width:75px; +} + +.mini-tabs-header-left +{ + width:auto; +} +.mini-tabs-header-left .mini-tabs-space, +.mini-tabs-header-left .mini-tabs-space2 +{ + border:0; + border-right: 1px solid #999999; +} +.mini-tabs-header-left .mini-tabs-space div{ + height:3px;width:1px; +} +.mini-tabs-header-left .mini-tabs-space2 div{ + height:3px;width:3px; +} +.mini-tabs-header-left .mini-tabs-headers +{ + vertical-align:top; + text-align:left; + padding:0; + padding-left:5px; +} +.mini-tabs-header-left .mini-tabs-header{ + width:auto; +} + +.mini-tabs-header-left .mini-tab-active +{ + border:solid 1px #999999; + border-right:solid 1px white; +} + +.mini-tabs-position-left .mini-tabs-header2 +{ + margin:0px; + padding-right:1px; +} +.mini-tabs-header-left .mini-tabs-header2 .mini-tabs-firstSpace, +.mini-tabs-header-left .mini-tabs-header2 .mini-tabs-lastSpace +{ + border-right:1px solid transparent; + _border-color:tomato; + _filter:chroma(color=tomato); +} + + +.mini-tabs-body-left +{ + border:solid 1px #999999; + border-left:0; +} + + +.mini-tabs-header-right +{ + width:auto; +} +.mini-tabs-header-right .mini-tabs-space, +.mini-tabs-header-right .mini-tabs-space2 +{ + border:0; + border-left: 1px solid #999999; +} +.mini-tabs-header-right .mini-tabs-space div{ + height:2px;width:2px; +} +.mini-tabs-header-right .mini-tabs-space2 div{ + height:2px;width:2px; +} +.mini-tabs-header-right .mini-tabs-headers +{ + vertical-align:top; + text-align:left; + padding:0; + padding-right:5px; +} +.mini-tabs-header-right .mini-tabs-header{ + width:auto; +} +.mini-tabs-header-right .mini-tabs-bodys +{ + border:solid 1px #999999; + border-right:0; +} +.mini-tabs-header-right .mini-tab-active +{ + border:solid 1px #999999; + border-left:solid 1px white; +} + +.mini-tabs-position-right .mini-tabs-header2 +{ + margin:0px; + padding-left:1px; +} +.mini-tabs-position-right .mini-tabs-header2 .mini-tabs-firstSpace, +.mini-tabs-position-right .mini-tabs-header2 .mini-tabs-lastSpace +{ + border-left:1px solid transparent; + _border-color:tomato; + _filter:chroma(color=tomato); +} +.mini-tabs-body-right +{ + border:solid 1px #999999; + border-right:0; +} + + + +.mini-tabs-buttons +{ + position:absolute;padding-right:3px;top:0px;z-index:1000;right:0; +} + + +.mini-tabs-nav +{ + position:absolute;right:0px;top:4px;z-index:1000; + padding-left:6px; + padding-right:2px; + display:none; +} +.mini-tabs-leftnav +{ + display: none; + padding-left: 6px; + padding-right: 2px; + position: absolute; + left: 0; + top: 4px; + z-index: 1000; +} +.mini-tabs-tabmenu +{ + background:#ebebee url(images/tabs/down.gif) no-repeat 50% 50%; + display:none; + min-width:16px;min-height:16px; + position:absolute;top: 4px; + border:1px solid #adadad; + z-index: 1000; +} +.mini-tabs-leftButton, .mini-tabs-rightButton +{ + border:solid 1px #adadad; + background:#EBEBEE url(images/tabs/allow_left.gif) no-repeat 50% 50% ; + min-width:16px;min-height:16px; + cursor:pointer; + outline:none; + display:inline-block;margin-right:2px; +} +.mini-tabs-rightButton +{ + background:#EBEBEE url(images/tabs/allow_right.gif) no-repeat 50% 50% ; +} +a:hover.mini-tabs-leftButton,a:hover.mini-tabs-rightButton +{ + background-color:#E1E8FD; +} + + + +.mini-tabs-header-top .mini-tab +{ + border-bottom-right-radius:0; + border-bottom-left-radius:0; +} +.mini-tabs-header-bottom .mini-tab +{ + border-top-right-radius:0; + border-top-left-radius:0; +} +.mini-tabs-header-left .mini-tab +{ + border-bottom-right-radius:0; + border-top-right-radius:0; +} +.mini-tabs-header-right .mini-tab +{ + border-bottom-left-radius:0; + border-top-left-radius:0; +} + + +.mini-splitter +{ + width:300px; + height:180px; + + overflow:hidden; + font-size:9pt; + font-family:Tahoma, Verdana, 宋体; +} +.mini-splitter-border +{ + border:solid 1px #8C8C8C; + position:relative; + overflow:hidden; +} +.mini-splitter-pane +{ + position:absolute; + padding:0; + overflow:hidden; + left:0px; + top:0px; +} +.mini-splitter-pane1 +{ + border-width:0px; + border-color:#8C8C8C; + border-style:solid; + border-right:solid 1px #8C8C8C; +} +.mini-splitter-pane2{ + border-width:0px; + border-color:#8C8C8C; + border-style:solid; + border-left:solid 1px #8C8C8C; +} +.mini-splitter-handler +{ + cursor:w-resize; + position:absolute; + width:5px; + height:100%; + top:0; + left:0; + overflow:visible; +} +.mini-splitter-nodrag +{ + cursor:default; +} + +.mini-splitter-handler-buttons +{ + position:absolute; + left:0;top:0px; + top:50%; + width:100%; + overflow:visible; +} +.mini-splitter-resize-button +{ + width:100%; + height:18px; + display:block; + background:url(images/splitter/resize.gif) no-repeat 50% 50%; +} +.mini-splitter-pane1-button, .mini-splitter-pane2-button +{ + overflow:hidden; + width:100%; + height:35px; + display:block; + + background:url(images/splitter/mini-left.gif) no-repeat 50% 50%; + cursor:pointer; +} +.mini-splitter-pane2-button +{ + background:url(images/splitter/mini-right.gif) no-repeat 50% 50%; +} + +.mini-splitter-pane1-vertical +{ + border:0; + border-bottom:solid 1px #8C8C8C; +} +.mini-splitter-pane2-vertical +{ + border:0; + border-top:solid 1px #8C8C8C; +} + +.mini-splitter-handler-vertical +{ + cursor:n-resize; + position:absolute; + width:100%; + height:5px; +} + +.mini-splitter-handler-vertical .mini-splitter-handler-buttons +{ + height:6px;width:auto;top:0px;left:50%; +} + +.mini-splitter-handler-vertical .mini-splitter-pane1-button, +.mini-splitter-handler-vertical .mini-splitter-pane2-button +{ + display:inline-block; + width:35px;height:5px;zoom:1;float:left; + background:url(images/splitter/mini-top.gif) no-repeat 0px 0px; +} +.mini-splitter-handler-vertical .mini-splitter-pane2-button +{ + background:url(images/splitter/mini-bottom.gif) no-repeat 0px 0px; +} +.mini-splitter-handler-vertical .mini-splitter-resize-button +{ + display:inline-block; + width:18px;height:5px; + background:url(images/splitter/resize_h.gif) no-repeat 50% 50%; +} +.mini-layout +{ + width:500px; + height:250px; + overflow:hidden; + + font-size:9pt; + font-family:Tahoma, Verdana, 宋体; +} +.mini-layout-border +{ + position:relative; + width:auto; + height:100%; + overflow:hidden; + border-style:solid; + border-width:1px; + border-color:#999999; +} +.mini-layout-split +{ + cursor:w-resize; + position:absolute; + width:6px; + height:100%; + top:0; + left:0; + overflow:hidden; +} +.mini-layout-split-north, .mini-layout-split-south +{ + cursor:n-resize; +} +.mini-layout-split-nodrag +{ + cursor:default; +} + +.mini-layout-region +{ + border:1px solid #A8A8A8; + + position:absolute; + padding:0; + overflow:hidden; + left:0px; + top:0px; +} +.mini-layout-region-north +{ + border-top:0; + border-left:0; + border-right:0; +} +.mini-layout-region-south +{ + border-bottom:0; + border-left:0; + border-right:0; +} +.mini-layout-region-west +{ + border-left:0; +} +.mini-layout-region-east +{ + border-right:0; +} + +.mini-layout-region-header +{ + font-weight:bold; + line-height:26px; + background:#edf1f5 url(images/layout/header.png) repeat-x 0 0; + border-bottom:solid 1px #a7abb0; + cursor:default; + overflow:hidden; + height:26px; + padding-left:6px; +} +.mini-layout-region-title +{ + float:left; + font-weight:bold; +} +.mini-layout-region-icon +{ + float:left; + width:16px; + height:16px; + overflow:hidden; + vertical-align:middle; + margin-right:4px; + margin-top:3px; +} +.mini-layout-region-body +{ + overflow:auto; + position:relative; +} + +.mini-layout-proxy +{ + background:#e9edf1; + border:solid 1px #A8A8A8; + cursor:default; + overflow:hidden; + height:24px; + width:24px; + line-height:24px; + padding-left:6px; + position:absolute; + z-index:100; + left:-500px;top:-500px; +} +.mini-layout-proxy-hover +{ + background:#f1f5f6; +} + +.mini-layout-proxy-east .mini-layout-region-title, +.mini-layout-proxy-east .mini-layout-region-icon, +.mini-layout-proxy-west .mini-layout-region-title, +.mini-layout-proxy-west .mini-layout-region-icon +{ + display:none; +} +.mini-layout-proxy-east .mini-tools, +.mini-layout-proxy-west .mini-tools +{ + +} +.mini-layout-proxy-north .mini-tools, +.mini-layout-proxy-south .mini-tools +{ + +} + + + +.mini-layout-region-header .mini-tools, +.mini-layout-proxy .mini-tools +{ + right:8px; +} +.mini-layout-region-west .mini-layout-region-header .mini-tools-collapse +{ + background:url(images/layout/west.gif) no-repeat 50% 50%; +} +.mini-layout-region-east .mini-layout-region-header .mini-tools-collapse +{ + background:url(images/layout/east.gif) no-repeat 50% 50%; +} +.mini-layout-region-north .mini-layout-region-header .mini-tools-collapse +{ + background:url(images/layout/north.gif) no-repeat 50% 50%; +} +.mini-layout-region-south .mini-layout-region-header .mini-tools-collapse +{ + background:url(images/layout/south.gif) no-repeat 50% 50%; +} + +.mini-layout-proxy-west .mini-tools-collapse +{ + background:url(images/layout/east.gif) no-repeat 50% 50%; +} +.mini-layout-proxy-east .mini-tools-collapse +{ + background:url(images/layout/west.gif) no-repeat 50% 50%; +} +.mini-layout-proxy-north .mini-tools-collapse +{ + background:url(images/layout/south.gif) no-repeat 50% 50%; +} +.mini-layout-proxy-south .mini-tools-collapse +{ + background:url(images/layout/north.gif) no-repeat 50% 50%; +} +.mini-layout-popup +{ + background:white; + z-index:101; +} +.mini-layout-maxZIndex +{ + z-index:200; +} + +.mini-layout-spliticon +{ + width:5px; + height:35px; + background:url(images/splitter/mini-left.gif) no-repeat 50% 50%; + position:absolute; + left:0; + top:50%; + margin-top:-17px; + cursor:pointer; +} +.mini-layout-split-east .mini-layout-spliticon +{ + background:url(images/splitter/mini-right.gif) no-repeat 50% 50%; +} +.mini-layout-split-north .mini-layout-spliticon, +.mini-layout-split-south .mini-layout-spliticon +{ + width:35px;height:5px;left:50%;top:0;margin-left:-17px;margin-top:0px; + background:url(images/splitter/mini-top.gif) no-repeat 50% 50%; +} +.mini-layout-split-south .mini-layout-spliticon +{ + background:url(images/splitter/mini-bottom.gif) no-repeat 50% 50%; +} + + +.mini-layout-split-west .mini-layout-spliticon-collapse +{ + background:url(images/splitter/mini-right.gif) no-repeat 50% 50%; +} +.mini-layout-split-east .mini-layout-spliticon-collapse +{ + background:url(images/splitter/mini-left.gif) no-repeat 50% 50%; +} +.mini-layout-split-north .mini-layout-spliticon-collapse +{ + background:url(images/splitter/mini-bottom.gif) no-repeat 50% 50%; +} +.mini-layout-split-south .mini-layout-spliticon-collapse +{ + background:url(images/splitter/mini-top.gif) no-repeat 50% 50%; +} + + +.mini-layout-proxy-text{ + position:relative; + top:30px; + left:0px; + width:200px; + overflow:hidden; + line-height:20px; + transform-origin:10px 10px; + transform:rotate(90deg); + + + +} +.mini-menu +{ + background:white; + color:#201F35; + + font-size:9pt; + font-family:Tahoma, Verdana, 宋体; + border-collapse:collapse; + border-collapse:separate; + overflow:hidden; + +} +.mini-menu-border +{ + border:1px solid #999999;overflow:hidden;position:relative; +} +.mini-menu-inner +{ + padding:1px;overflow:hidden;position:relative; +} +.mini-menu-topArrow, .mini-menu-bottomArrow +{ + height:9px;overflow:hidden;display:none; + background:url(images/menu/top-arrow.gif) no-repeat 50% 2px; +} +.mini-menu-bottomArrow +{ + background:url(images/menu/bottom-arrow.gif) no-repeat 50% 2px; +} +.mini-menu-float +{ + position:relative;overflow:hidden; +} + +.mini-menuitem +{ + line-height:20px; + + height:auto; + width:auto; + position:relative; + cursor:default; + + border:0; + padding:1px; + +} + +.mini-menuitem-hover +{ + padding:0px; + border:solid 1px #9a9a9a; + background:#E3EBFF url(images/menu/item.png) repeat-x 0 0; +} +.mini-menu-popup +{ + padding:0px; + border:solid 1px #9a9a9a; + background:#E3EBFF url(images/menu/item.png) repeat-x 0 0; +} +.mini-menuitem-selected +{ + padding:0px; + border:solid 1px #9a9a9a; + background:#DBDDE2 url(images/menu/pressed.png) repeat-x 0 0; +} + + +.mini-menuitem +{ + border:1px solid transparent; + padding:0; + + *border:0; + *padding:1px; +} +.mini-menuitem-hover, .mini-menu-popup, .mini-menuitem-selected +{ + border:solid 1px #9a9a9a; + padding:0; + + *border:solid 1px #9a9a9a; + *padding:0px; +} + + +.mini-menuitem-inner +{ + position:relative; + padding-right:20px; + padding-left:28px; +} +.mini-menuitem-text +{ + cursor:default; + color:#201F35; + overflow:hidden; + white-space:nowrap; + text-overflow:ellipsis; + word-break:keep-all; + +} + + .mini-disabled .mini-menuitem-text{ + opacity: .7; + -moz-opacity: .7; + filter: alpha(opacity=70); + } + +.mini-menuitem-text a +{ + font-size:9pt; + font-family:Tahoma, Verdana, 宋体; + text-decoration:none; + color:#201F35; +} +.mini-menuitem-text a:hover +{ + text-decoration:underline; +} +.mini-menuitem-icon, .mini-menuitem-allow +{ + width:16px; + height:16px; + line-height:16px; + overflow:hidden; + position:absolute; + left:3px; + top:2px; + display:none; + + + + +height:18px; + +top:0px; + + + _left:-25px; + _top:-3px; + _height:18px; +} +.mini-menu-horizontal .mini-menuitem .mini-menuitem-icon +{ + _position:relative;_left:0;_top:-2px; + +position:relative;+left:0;+top:-2px; +} +.mini-menuitem .mini-menuitem-icon{ + background-position:50% 50%; + background-repeat:no-repeat; +} +.mini-menuitem-allow +{ + left:auto; + right:3px; + background:url(images/menu/arrow.png) no-repeat 8px 50%; +} +.mini-menu .mini-menuitem-showcheck .mini-menuitem-icon +{ + background:none; +} +.mini-menu .mini-menuitem-checked .mini-menuitem-icon +{ + background:url(images/menu/checked.gif) no-repeat 50% 6px; +} + +body .mini-menuitem-icontop .mini-menuitem-inner +{ + text-align:center; + padding-top:5px; + padding-bottom:7px; + line-height:14px; + margin-right:10px; +} +body .mini-menuitem-icontop .mini-menuitem-text +{ + +height:16px; +} +.mini-menuitem-icontop .mini-menuitem-icon +{ + position:static; + margin:auto; +} +.mini-menuitem-icontop .mini-menuitem-text +{ + padding:0; + padding-top:5px; +} + + +.mini-menu-horizontal .mini-menu-border +{ + background:#F1F2F6 url(images/menu/hmenubg.png) repeat-x 0 0; +} +.mini-menu-horizontal .mini-menu-inner +{ + margin:0; + border:0; + padding:3px; + + height:auto; + overflow:hidden; + +} +.mini-menu-horizontal .mini-menuitem +{ + float:left; + display:inline; +} +.mini-menu-horizontal .mini-menuitem-inner +{ + padding-left:6px; + padding-right:6px; + padding-bottom:2px; + *padding-top:2px; + *padding-bottom:0px; + overflow:hidden; +} +.mini-menu-horizontal .mini-menuitem-icon, +.mini-menu-horizontal .mini-menuitem-text, +.mini-menu-horizontal .mini-menuitem-allow +{ + position:static; + float:left; + vertical-align:middle; +} +.mini-menu-horizontal .mini-menuitem-icon +{ + margin-top:2px; +} +.mini-menu-horizontal .mini-menuitem-allow +{ + background:url(images/menu/hallow.gif) no-repeat 50% 50%; + +background-position:50% 20%; + width:10px;height:8px;overflow:hidden; + margin-top:7px; + +} +.mini-menu-horizontal .mini-menuitem-text +{ + padding:0; + padding-left:3px; + padding-right:3px; + +padding-top:0px; + +padding-bottom:3px; + +line-height:18px; + +} +.mini-separator +{ + display:block; + border-top:solid 1px #9b9b9b; + margin-top:1px; + margin-bottom:1px; + margin-right:1px; + margin-left:26px; +} +.mini-menu-horizontal .mini-separator +{ + float:left; + display:inline; + border:0; + border-left:solid 1px #9b9b9b; + margin:1px; + margin-top:6px; + height:12px; +} + + +.mini-menu-toolbar +{ + display:none; + float:right; +} +.mini-menu-horizontal .mini-menu-toolbar +{ + display:none; +} +.mini-menu-horizontal .mini-menu-float +{ + float:left; +} + +.mini-menu-overflow .mini-menu-float +{ + width:20000px; + +} + +.mini-menu-overflow .mini-menu-topArrow, +.mini-menu-overflow .mini-menu-bottomArrow +{ + position:absolute;top:3px;left:0; + width: 17px;height:20px; + z-index:1000; + background: url("images/tabs/allow_left.gif") no-repeat scroll -1px 50% ; +} + +.mini-menu-overflow .mini-menu-bottomArrow +{ + left:auto;right:0; + background: url("images/tabs/allow_right.gif") no-repeat scroll -1px 50%; +} +.mini-calendar +{ + border:1px solid #999999; + + + border-collapse:collapse; + border-collapse:separate; + +} +body .mini-calendar td +{ + line-height:14px; +} +.mini-calendar-views +{ + width:100%; + height:100%; +} +.mini-calendar-view +{ + width:100%; + height:100%; + border-collapse:collapse; + border-collapse:separate; + + display:table; +} +.mini-calendar-daysheader td +{ + padding:4px; + border-bottom:solid 1px #CFCFCF; + font-size:9pt; + cursor:default; + font-weight:400; + text-align:center; + vertical-align:middle; +} +.mini-calendar td.mini-calendar-weeknumber +{ + border:0; + font-size:10px; + color:#BFBFBF; + cursor:default; +} +.mini-calendar-days td +{ + text-align:center; + vertical-align:middle; + padding:3px; + padding-left:4px; + padding-right:4px; + + cursor:default; +} +.mini-calendar .mini-calendar-weekend +{ + color:#C00000; +} +.mini-calendar .mini-calendar-othermonth{ + color:#888888; +} +.mini-calendar .mini-calendar-disabled +{ + color:#aaa; + text-decoration:line-through; +} +.mini-calendar-space +{ + width:3px; +} +.mini-calendar-bottom td +{ + height:3px; +} +.mini-calendar-date +{ + border:solid 1px white; +} + +.mini-calendar-header +{ + height:25px; + text-align:center; + background:#E7EBEF url(images/calendar/header.png) repeat-x 0 0; + border-bottom:solid 1px #a7abb0; +} +.mini-calendar-headerInner +{ + position:relative; + height:100%; +} +.mini-calendar-title +{ + line-height:25px; + font-weight:400; + + cursor:pointer; + position:relative; + font-weight:bold; +} +.mini-calendar-prev, .mini-calendar-next +{ + position:absolute; + left:8px;top:6px; + overflow:hidden; +} +.mini-calendar-next +{ + left:auto;right:8px; +} +.mini-calendar-yearPrev, .mini-calendar-yearNext, +.mini-calendar-monthPrev, .mini-calendar-monthNext +{ + display:inline-block;margin-right:8px;cursor:pointer; + width:11px;height:12px;overflow:hidden; + background:url(images/calendar/prev.gif) no-repeat 50% 3px; +} +.mini-calendar-yearNext +{ + margin:0; + margin-left:8px; + background:url(images/calendar/next.gif) no-repeat 50% 3px; +} +.mini-calendar-monthPrev +{ + background:url(images/calendar/months.gif) no-repeat 0 0; +} +.mini-calendar-monthNext +{ + margin:0; + margin-left:8px; + background:url(images/calendar/months.gif) no-repeat right 0; +} + +.mini-calendar-footer +{ + padding:4px; + padding-bottom:5px; + background:#efefef; + border-top:solid 1px #c9c9c9; + text-align:center; + +} +.mini-calendar-menu .mini-calendar-footer +{ + position:absolute; + left:0; + bottom:0; + width:100%; + padding:4px; + padding-bottom:5px; +} +.mini-calendar-footerSpace +{ + display:inline-block; + width:8px; +} +.mini-calendar-tadayButton, .mini-calendar-clearButton, +.mini-calendar-okButton, .mini-calendar-cancelButton +{ + border:1px solid #A9ACB5; + background:#EBEDF2 url(images/calendar/button.png) repeat-x 0 0; + color:#201F35; + + display:inline-block; + + text-decoration:none; + padding:3px; + padding-left:0px; + padding-right:0px; + width:52px; + text-align: center; + outline:none; + cursor:pointer; + vertical-align:middle; +} +body a:hover.mini-calendar-tadayButton, body a:hover.mini-calendar-clearButton, +body a:hover.mini-calendar-okButton, body a:hover.mini-calendar-cancelButton +{ + text-decoration:none; +} + +.mini-calendar-okButton +{ + +} +.mini-calendar-okButton, .mini-calendar-cancelButton +{ + line-height:14px; +} +.mini-calendar .mini-calendar-today +{ + border:1px solid #C00000; +} +.mini-calendar .mini-calendar-selected +{ + color:black; + background:#e2ecf7; + border:solid 1px #999999; +} + +.mini-calendar-menu +{ + width:250px; + border:#9f9f9f 1px solid; + background:white; + position:absolute; + z-index:10000000; + overflow:hidden; +} +.mini-calendar-menu-months +{ + margin-top:15px; + margin-bottom:15px; + margin-left:15px; + margin-right:0px; + height:70px; +} +.mini-calendar-menu-month +{ + + display:inline; + float:left; + text-align:center; + width:48px;height:22px; + line-height:20px; + color:#000000; + text-decoration:none; + border:solid 1px white; + outline:none; + margin-bottom:2px; +} +a:hover.mini-calendar-menu-month +{ + background:#e5e5d5; + border:solid 1px #d6d6d5; +} +.mini-calendar-menu-years +{ + margin-top:5px; + margin-left:5px; + margin-right:5px; + padding-left:15px; + padding-right:13px; + position:relative; + height:50px; + margin-bottom:5px; +} +.mini-calendar-menu-year +{ + + display:inline; + float:left; + text-align:center; + width:36px;height:21px; + margin-bottom:2px; + line-height:20px; + color:#000000; + text-decoration:none; + border:solid 1px white; + padding:1px; +} +a:hover.mini-calendar-menu-year +{ + background:#e5e5d5; + border:solid 1px #d6d6d5; +} + +.mini-calendar-menu-prevYear, +.mini-calendar-menu-nextYear +{ + position:absolute; + left:0;top:15px; + width:14px; + height:15px; + cursor:pointer; + background:url(images/calendar/months.gif) no-repeat 0 50%; +} +.mini-calendar-menu-nextYear +{ + left:auto;right:0; + background:url(images/calendar/months.gif) no-repeat right 50%; +} +.mini-calendar-menu-selected, a:hover.mini-calendar-menu-selected +{ + color:#333; + background:#e2ecf7; + border:solid 1px #999999; +} + + +.mini-calendar-timespinner +{ + width:85px; + display:inline-block; + float:left; +} + +.mini-calendar-hastime +{ + text-align:right; +} +.mini-listbox +{ + overflow:hidden; + position:relative; +} +.mini-listbox-border +{ + border:1px solid #999999; + overflow:hidden; + border-spacing: 1px; + background:white; +} +.mini-listbox td +{ + white-space:nowrap;text-overflow:ellipsis;word-break:keep-all; + overflow:hidden; + line-height:18px; + cursor:default; + padding-left:4px; + padding-right:2px; + padding-top:3px; + padding-bottom:3px; + font-size:9pt; + font-family:Tahoma, Verdana, 宋体; + text-align:left; +} +.mini-listbox-showColumns .mini-listbox-header td +{ + padding-left:4px; + padding-right:4px; + +} +.mini-listbox-showColumns .mini-listbox-view td +{ + padding-left:4px; + padding-right:4px; + border:0; + border-right:solid 1px #cfcfcf; + border-bottom:solid 1px #cfcfcf; +} + +.mini-listbox-header +{ + overflow:hidden; + background:#E7EBEF url(images/listbox/header.png) repeat-x 0 0; + border-bottom:solid 1px #A5ACB5; +} +.mini-listbox-header td +{ + border-right:solid 1px #A5ACB5; + padding-top:4px; + padding-bottom:4px; + line-height:18px; +} + +.mini-listbox-view +{ + width:100%; + overflow:auto; + position:relative; +} +.mini-listbox-items, .mini-listbox-headerInner +{ + text-align:left; + width:100%; + border-collapse:collapse; + border-collapse:separate; + + display:table; +} +.mini-listbox-showcolumns .mini-listbox-items, +.mini-listbox-showcolumns .mini-listbox-headerInner +{ + table-layout:fixed!important; +} + + +.mini-listbox .mini-listbox-checkbox +{ + text-overflow:clip; + text-align:center; + width:14px; + height:14px; + padding:0; +} +.mini-listbox .mini-listbox-checkbox input +{ + width:14px; + height:14px; +} +.mini-listbox-hideCheckBox .mini-listbox-checkbox +{ + display:none; + width:0; +} + +.mini-listbox-item-hover{ + background:#e2ecf7; +} +.mini-listbox-item-selected{ + background:#ecedef; + color:Black; +} + +.mini-error .mini-list-inner +{ + margin-right:20px; +} + + + +.mini-checkboxlist +{ + overflow:hidden; + font-size:9pt; + font-family:Tahoma, Verdana, 宋体; + position:relative; +} + +.mini-checkboxlist-item +{ + display:inline-block; + *display:inline; + zoom:1; + margin-right:10px; + cursor:default; +} +.mini-checkboxlist table label +{ + padding-left:4px; + line-height:18px; + display:inline-block; + vertical-align:middle; +} +.mini-checkboxlist input, +.mini-radiobuttonlist input +{ + overflow:hidden; + vertical-align:middle; + +vertical-align:bottom; + + margin:0; + padding:0; +} + + +.mini-radiobuttonlist +{ + position:relative; + overflow:hidden; + font-size:9pt; + font-family:Tahoma, Verdana, 宋体; +} + +.mini-radiobuttonlist-item +{ + display:inline-block; + *display:inline; + zoom:1; + margin-right:10px; +} +.mini-radiobuttonlist table label +{ + padding-left:4px; + line-height:18px; + display:inline-block; + font-size:9pt; + font-family:Tahoma, Verdana, 宋体; + vertical-align:middle; +} +.mini-radiobuttonlist input +{ + overflow:hidden; + vertical-align:middle; + width:14px; + height:14px; + + *vertical-align:top; + *height:14px; + +vertical-align:bottom; + + margin:0; + padding:0; + +} + + +.mini-list-icon +{ + margin-right:2px; + vertical-align:middle; + width:13px;height:13px; + display:inline-block; + background:url(images/icons/checkbox.gif) no-repeat 0 0; + cursor:pointer; + +} + +.mini-radiobuttonlist-item .mini-list-icon +{ + background:url(images/icons/radio.gif) no-repeat 0 0; +} + +.mini-checkboxlist-item-selected .mini-list-icon, +.mini-radiobuttonlist-item-selected .mini-list-icon +{ + background-position:0 -13px; +} + + +.mini-disabled .mini-checkboxlist-item{ + color: gray; + cursor: default; + opacity: .7; + filter: alpha(opacity=70); +} + + +.mini-tooltip +{ + position:absolute; + z-index:1030; + font-size:12px; + line-height:1.4; + display:none; +} +.mini-tooltip-inner { + padding: 3px 8px; + + text-align: center; + text-decoration: none; + background-color: #ffffff; + border:solid 1px #888; + border-radius: 4px; + vertical-align:middle; +} +.mini-tooltip-arrow { + position: absolute; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; + + overflow:hidden; + font-size:0; + + _border-left-style:dashed; + _border-right-style:dashed; + +} +.mini-tooltip-left .mini-tooltip-arrow, +.mini-tooltip-right .mini-tooltip-arrow +{ + _border-left-style:solid; + _border-right-style:solid; + _border-top-style:dashed; + _border-bottom-style:dashed; +} + +.mini-tooltip-top { + padding: 5px 0; + margin-top: -3px; +} + +.mini-tooltip-right { + padding: 0 5px; + margin-left: 3px; +} + +.mini-tooltip-bottom { + padding: 5px 0; + margin-top: 3px; +} +.mini-tooltip-left { + padding: 0 5px; + margin-left: -3px; +} + + +.mini-tooltip-top .mini-tooltip-arrow { + bottom: 0; + left: 50%; + margin-left: -5px; + border-top-color: #666; + border-width: 5px 5px 0; +} + + +.mini-tooltip-left .mini-tooltip-arrow { + top: 50%; + right: 0; + margin-top: -5px; + border-left-color: #666; + border-width: 5px 0 5px 5px; +} + +.mini-tooltip-right .mini-tooltip-arrow { + top: 50%; + left: 0; + margin-top: -5px; + border-right-color: #888; + border-width: 5px 5px 5px 0; +} + + + +.mini-tooltip-bottom .mini-tooltip-arrow { + top: 0; + left: 50%; + margin-left: -5px; + border-bottom-color: #666; + border-width: 0 5px 5px; +} + + + +.mini-tooltip-bottomleft { + padding: 5px 0; + margin-top: 3px; +} + +.mini-tooltip-bottomleft .mini-tooltip-arrow { + top: 0; + left: 5px; + border-bottom-color: #666; + border-width: 0 5px 5px; +} + +.mini-tooltip-bottomright { + padding: 5px 0; + margin-top: 3px; +} + +.mini-tooltip-bottomright .mini-tooltip-arrow { + top: 0; + right: 5px; + border-bottom-color: #666; + border-width: 0 5px 5px; +} + +.mini-tooltip-topleft { + padding: 5px 0; + margin-top: -3px; +} +.mini-tooltip-topleft .mini-tooltip-arrow { + bottom: 0; + left: 5px; + border-top-color: #666; + border-width: 5px 5px 0; +} + +.mini-tooltip-topright { + padding: 5px 0; + margin-top: -3px; +} +.mini-tooltip-topright .mini-tooltip-arrow { + right: 5px; + bottom: 0; + border-top-color: #666; + border-width: 5px 5px 0; +} + + +.mini-tooltip-loading +{ + width:16px;height:16px; + background:url(images/tooltip/wait.gif) no-repeat 50% 50%; +} + + +.mini-progressbar +{ + height:22px; + width:150px; + position:relative; +} +.mini-progressbar-border +{ + position:relative; + height:20px; + border:1px solid #a5acb5; +} + + +.mini-progressbar-bar +{ + background:rgb(195,211,293); + height:100%; + width:0; + text-align:center; + position:relative; +} +.mini-progressbar-text +{ + position:absolute; + left:0;top:0; + width:100%;height:100%; + text-align:center; + line-height:20px; + color:#222; + font-size:9pt; + font-family:Tahoma,Verdana,宋体; +} + +.mini-grid, .mini-datagrid +{ + display:none; +} +.mini-grid-viewport +{ + background:white; + +} + + +.mini-grid-columns +{ + + + position:relative; + width:100%; + overflow:hidden; +} +.mini-grid-columns-view +{ + position:relative;overflow:hidden;z-index:9;width:100%; +} +.mini-grid-columns-view .mini-grid-table +{ + z-index:100; +} + +.mini-grid .mini-grid-rows +{ + overflow:hidden;width:100%;padding:0;z-index:0; +} +.mini-grid-rows-view +{ + position:relative;z-index:9; + overflow:auto;height:100%; + width:auto; + _width:100%; + + +} +.mini-grid-rows-content +{ + *zoom:1;padding:0;margin:0;border:0; + + +} +.mini-grid-autoheight .mini-grid-rows-view, +.mini-grid-hidden-y +{ + overflow-y:hidden; +} + +.mini-grid-table +{ + position:relative; + text-align:left; + + table-layout:fixed; + display:table; + width:100%; + height:1px; +} +.mini-grid-rowstable +{ + padding-bottom:1px; +} +.mini-grid-cell, .mini-grid-headerCell, +.mini-grid-filterCell, .mini-grid-summaryCell +{ + overflow: hidden; + padding:0px; + border:0; + border-right:#d2d2d2 1px solid; + border-bottom:#d2d2d2 1px solid; + cursor:default; + text-align:left; + overflow:hidden; + _text-overflow:ellipsis; + + padding-left:4px; + padding-right:4px; + + font-size:9pt; + font-family:Tahoma, Verdana, 宋体; + line-height:18px; +} +.mini-grid-summaryCell +{ + border-bottom:0; + border-top:#d2d2d2 1px solid; +} +.mini-grid-cell-inner, .mini-grid-headerCell-inner +{ + + padding:0px; + padding-top:3px; + padding-bottom:3px; + width:100%; + position:relative; + overflow:hidden; + white-space:normal; + + + word-break:break-all; +} + +.mini-grid-cell-nowrap +{ + overflow:hidden; + white-space:nowrap; + text-overflow:ellipsis; + word-break:keep-all; +} +body .mini-grid-headerCell-nowrap +{ + white-space:nowrap; + + word-break:keep-all; +} +.mini-grid-headerCell +{ + background:#E7EBEF url(images/grid/header.png) repeat-x 0 0; + border-right:#A5ACB5 1px solid; + border-bottom:#A5ACB5 1px solid; + overflow:visible; + padding:0; +} +.mini-grid-headerCell-outer +{ + position:relative; + padding-left:4px; + padding-right:2px; +} +.mini-grid-headerCell-inner +{ + word-break:break-all; + + padding-top:4px; + padding-bottom:4px; + overflow:hidden; +} +.ie .mini-grid-headerCell-inner +{ + padding-top:4px; + padding-bottom:5px; +} + +.mini-grid .mini-grid-bottomCell +{ + +} +.mini-grid .mini-grid-rightCell +{ + border-right-width:1px; +} +.mini-grid-topRightCell +{ + background:#E7EBEF url(images/grid/header.png) repeat-x 0 0; + border-right:#A5ACB5 1px solid; + border-bottom:#A5ACB5 1px solid; + position:absolute; + left:0;top:0;width:20000px;height:100%;z-index:9; + margin-left:-2px; + margin-top:-1px; + _top:auto; + _bottom:-1px; +} +.mini-grid-scrollHeaderCell +{ + position:absolute;left:20000px;top:0;width:1px;height:1px;overflow:hidden; +} +body .mini-grid .mini-grid-cell-error +{ + background:#fee2f0; +} +.mini-grid-cell-dirty +{ + background:url(images/grid/dirty.gif) no-repeat right 4px; +} + +body .mini-grid-deleteRow +{ + text-decoration:line-through; +} +.mini-grid-newRow +{ + background:#fefee9; +} +.mini-grid-emptyText +{ + padding:15px; + text-align:left; + padding-left:35px; + +} + + +.mini-grid-groupCell +{ + height:30px; + border-right:#d2d2d2 1px solid; + border-bottom:solid 2px #A5ACB5; + background:#fff; + +} +.mini-grid-groupHeader +{ + position:relative;height:30px; + cursor:default; +} + +.mini-grid-groupTitle +{ + color:#333; + font-family:Tahoma, Verdana, 宋体; + font-size:9pt; + font-weight:bold; + padding:4px; + padding-top:6px; + border-bottom-width:1px; + border-right-width:1px; + padding-left:23px; + overflow:visible; + white-space:nowrap; +} + + + + + +.mini-grid-group-ecicon +{ + position: absolute; + width: 20px; + height: 23px; + left: 0px; + top: 4px; + cursor: pointer; + background: url("images/grid/expand.gif") no-repeat scroll 4px 0px; +} + + +.mini-grid-group-collapse .mini-grid-group-ecicon +{ + background: url("images/grid/collapse.gif") no-repeat 3px 0px; +} + +.mini-grid-groupHeader-collapsible +{ + cursor:pointer; +} + + + + + + +.mini-grid-detailRow +{ + background:#F7F7F8;position:relative;zoom:1; +} +.mini-grid-detailCell +{ + position:relative;zoom:1; + padding: 8px 10px 10px; + border-right:#cfcfcf 1px solid; + border-bottom:#cfcfcf 1px solid; +} + + +.mini-grid-filterRow +{ + overflow:hidden;background:#f6f6f6;position:relative;zoom:1;width:100%; +} +.mini-grid-filterRow-view +{ + position:relative;overflow:hidden;z-index:9;width:100%; +} +.mini-grid-filterCell +{ + border-right:0; + padding:2px; +} + + +.mini-grid-summaryRow +{ + overflow:hidden;background:#f6f6f6;position:relative;zoom:1;width:100%; +} +.mini-grid-summaryRow-view +{ + position:relative;overflow:hidden;z-index:9;width:100%; +} +.mini-grid-summaryCell +{ + line-height:16px; + border-right:0; + padding:2px; +} + + + +.mini-grid-columns-lock +{ + position:absolute;left:-10px;top:0;width:0px;overflow:hidden;z-index:10; + +} +.mini-grid-columns-lock .mini-grid-topRightCell +{ + display:none; +} +.mini-grid-rows-lock +{ + position:absolute;left:-10px;top:0;overflow:hidden;width:0px;z-index:10; +} +.mini-grid-columns-lock , .mini-grid-rows-lock +{ + border-right:#d2d2d2 1px solid; +} +.mini-grid-rows-lock .mini-grid-rows-content +{ + padding-bottom:30px; +} +.mini-grid-rows-lock .mini-grid-emptyText +{ + visibility:hidden; +} + +.mini-grid-rows-lock .mini-grid-table +{ + width:0; +} + +.mini-grid-filterRow-lock +{ + position:absolute;left:-10px;top:0;width:0px;overflow:hidden;z-index:10; +} +.mini-grid-summaryRow-lock +{ + position:absolute;left:-10px;top:0;width:0px;overflow:hidden;z-index:10; +} + + + +.mini-grid-vscroll +{ + width:18px;overflow:hidden;z-index:100;position:absolute;top:0;right:0; + height:100%;overflow-y:scroll; +} +.mini-grid-vscroll-content +{ + width:1px;overflow:hidden;position:absolute;left:0;top:0; +} +.mini-grid-virtualscroll-top +{ + vertical-align:bottom; +} +.mini-grid-virtualscroll-bottom +{ + vertical-align:top; +} + + +.mini-grid-row-alt +{ + background:#f7f4fd; +} + + +html body .mini-grid-row-selected +{ + background:#dfe8f6; +} + +html body .mini-grid .mini-grid-cell-selected +{ + background:#addffe; +} +body .mini-grid-row-hover +{ + background:#ecedef; +} + + + + +.mini-grid-topPager +{ + position:relative; + overflow:hidden; + border-bottom:solid 1px #C9C9C9; + background:#E7EAEE url(images/grid/footer.png) repeat-x 0 0; +} +.mini-grid-pager +{ + position:relative; + overflow:hidden; + border-top:solid 1px #C9C9C9; + background:#E7EAEE url(images/grid/footer.png) repeat-x 0 0; +} + + + +.mini-grid-resizeColumns-no .mini-grid-column-splitter +{ + display:none; +} +.mini-grid-column-splitter +{ + position:absolute; + overflow:hidden; + background:white; + cursor: e-resize; + + opacity: .0;-moz-opacity: .0;filter: alpha(opacity=0); + z-index:100; + top:0px;right:-3px; + height:100%;width:5px; +} + + + +.mini-grid-sortIcon +{ + width:9px; + height:10px; + overflow:hidden; + display:inline-block; + margin-left:2px; + margin-right:2px; + + background:url(images/grid/icons.png) no-repeat -19px -18px; +} +.mini-grid-asc .mini-grid-sortIcon +{ + + background-position:-19px -18px; +} +.mini-grid-desc .mini-grid-sortIcon +{ + + background-position:-19px 0; +} +.mini-grid-asc .mini-grid-cellInner, .mini-grid-desc .mini-grid-cellInner +{ + position:relative; + padding-right:18px; +} + +.mini-grid-allowsort +{ + background:url("images/grid/sorticon.gif") no-repeat 50% 50%; + display: inline-block; + height: 10px; + margin-left: 2px; + margin-right: 2px; + overflow: hidden; + width: 9px; +} + + +.mini-grid-rowEdit +{ + background:#f9f9fc; +} +.mini-grid-rowEdit .mini-grid-cell +{ + padding-left:1px; + padding-right:1px; +} + + +.mini-checkcolumn +{ + padding:0;text-align:center; +} +.mini-checkcolumn .mini-grid-cell-inner +{ + padding-top:2px; + padding-bottom:1px; +} + + +.mini-grid-expandCell .mini-grid-cell-inner +{ + padding:0; +} +.mini-grid-ecIcon +{ + display:inline-block; + width:18px; + height:20px; + line-height:20px; + background:no-repeat 50% 50%; + outline:none; + background-image:url(images/tree/collapse.gif); +} +.mini-grid-expandRow .mini-grid-ecIcon +{ + background-image:url(images/tree/expand.gif); + background-position:2px 50%; +} + + +.mini-grid-proxy +{ + position:absolute; + overflow:hidden; + background:gray; + opacity: .30;-moz-opacity: .30;filter: alpha(opacity=30); + border:solid 1px black; + z-index:100000000; + box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;-webkit-box-sizing:border-box; + +} +.mini-grid-columnproxy +{ + position:absolute; + overflow:hidden; + line-height:28px; + padding:6px; + padding-right:10px; + padding-top:0; + padding-bottom:0; + z-index:1000000; + + + background:#E7EBEF url(images/grid/header.png) repeat-x 0 0; + border:#A5ACB5 1px solid; + width:100px; +} +.mini-grid-movetop, .mini-grid-movebottom +{ + position:absolute; + overflow:hidden; + width:9px;height:9px; + background:url(images/grid/col-move-top.gif) no-repeat; + display:none; + z-index:100000; +} +.mini-grid-movebottom +{ + background:url(images/grid/col-move-bottom.gif) no-repeat; +} +.mini-grid-no .mini-grid-columnproxy-inner +{ + padding-left:20px;background:url(images/grid/no.gif) no-repeat 0 6px; +} +.mini-grid-ok .mini-grid-columnproxy-inner +{ + padding-left:20px;background:url(images/grid/ok.gif) no-repeat 0 6px; +} + + +.mini-grid-fixwidth .mini-grid-table +{ + width:0px; +} + + +.mini-grid-radio-mask +{ + position:absolute;left:0;top:0;width:100%;height:100%;z-index:100; + background: white; + opacity: .0; + -moz-opacity: .0; + filter: alpha(opacity=0); +} + + + +.mini-tree-checkbox, +.mini-grid-checkbox, +.mini-grid-radio +{ + min-width:13px !important; + min-height:13px !important; +} + +.mini-grid-checkbox, +.mini-grid-radio +{ + width:13px; + height:13px; + + overflow:hidden; + display:block; + margin:auto; + vertical-align:middle; +} +.mini-grid-checkbox{ + + background:url(images/icons/checkbox.gif) no-repeat 0 0; +} +.mini-grid-checkbox-checked, +.mini-grid-row-selected .mini-checkcolumn .mini-grid-checkbox +{ + background:url(images/icons/checkbox.gif) no-repeat 0 -13px; +} +.mini-grid-radio{ + + background:url(images/icons/radio.gif) no-repeat 0 0; +} +.mini-grid-radio-checked, +.mini-grid-row-selected .mini-checkcolumn .mini-grid-radio +{ + background:url(images/icons/radio.gif) no-repeat 0 -13px; +} + + +.mini-grid-column-trigger +{ + position:absolute; + top:0; + right:0; + width:16px; + height:100%; + cursor:pointer; + + display:none; + border-left:solid 1px #ccc; + text-align:center; +} + +.mini-grid-headerCell:hover .mini-grid-column-trigger, +.mini-grid-column-open .mini-grid-column-trigger +{ + display:block; +} + +.mini-grid .mini-pager +{ + border-width:0; +} +.mini-tree .mini-grid-viewport{ + background:none; +} + + + +.mini-treegrid, .mini-tree +{ + display:none; +} +.mini-tree-nodes +{ + position:relative;overflow:hidden; +} +.mini-tree-treecell .mini-grid-cell-inner +{ + padding:0; +} + +.mini-tree-indent +{ + display:inline-block; + width:18px; + height:24px; +} +.mini-tree-nodetitle +{ + margin-top:0px;margin-right:2px;overflow:hidden; + cursor:default;white-space:nowrap; + height:24px; line-height:16px; +} + +.mini-tree .mini-tree-icon +{ + position:relative; + display:inline-block; + width:18px;height:22px;overflow:hidden;line-height:20px; + background-repeat:no-repeat; + background-position:50% 50%; + vertical-align:middle; + -moz-user-select: none; + -webkit-user-select: none; + -ms-user-select: none; + -khtml-user-select: none; + user-select: none; +} + +.mini-tree-nodetext +{ + height:18px; + line-height:18px; + +line-height:19px; + vertical-align:middle; + + _vertical-align:top; + + display:inline-block; + padding-left:3px; + padding-right:3px; + white-space:nowrap; +} + +.mini-tree-nodetext a +{ + text-decoration:none; + color:#000; + outline:none; + display:inline-block; + margin-bottom:2px; + margin-top:1px\9\0; + +line-height:16px; + _margin-top:2px; + +} +.mini-tree-nodetext a:hover +{ + +} + + +.mini-tree-node-ecicon +{ + display:inline-block; + width:18px; + height:24px; + background:no-repeat 2px 0px; + outline:none; + cursor:pointer; +} + +.mini-tree-collapse .mini-tree-node-ecicon +{ + background-image:url(images/tree/collapse.gif); +} +.mini-tree-expand .mini-tree-node-ecicon +{ + background-image:url(images/tree/expand.gif); + background-position: 3px 0px; +} +.mini-tree-leaf +{ + background-image:url(images/tree/leaf.gif); +} +.mini-tree-folder +{ + background-image:url(images/tree/folder.gif); +} +.mini-tree-expand .mini-tree-folder +{ + background-image:url(images/tree/folder-open.gif); +} + +.mini-tree-checkbox +{ + width:16px\9;height:14px\9;margin:0;padding:0; + vertical-align:middle; +} + +body .mini-tree .mini-tree-loading .mini-tree-node-ecicon, +body .mini-tree-loading .mini-treegrid-ec-icon +{ + background:#fff url(images/tree/loading.gif) no-repeat scroll 50% 50%; +} + + +.mini-tree-nodeshow +{ + display:inline-block; + vertical-align:top; + padding:1px; + padding-left:2px; + padding-right:3px; + border:0; + cursor:pointer; +} + +.mini-treegrid .mini-tree-nodeshow +{ + cursor:default; +} + +.mini-tree-node-hover .mini-tree-nodeshow +{ + padding:0; + padding-left:1px; + padding-right:2px; + border:1px solid #A9ACB5; + background:#dde6fe url(images/tree/hover.png) repeat-x 0 0; +} + +.mini-tree-selectedNode .mini-tree-nodeshow +{ + padding:0; + padding-left:1px; + padding-right:2px; + border:1px solid #A9ACB5; + background:#EBEDF2 url(images/tree/button.png) repeat-x 0 0; + zoom:1; +} + + + +.mini-tree-nodeshow +{ + border:1px solid transparent; + padding:0; + + _padding:1px; + _padding-left:2px; + _padding-right:3px; + _border:0; +} +.mini-tree-node-hover .mini-tree-nodeshow +{ + padding:0; + + _padding:0; + _padding-left:1px; + _padding-right:2px; + _border:1px solid #A9ACB5; +} +.mini-tree-selectedNode .mini-tree-nodeshow +{ + padding:0; + + _padding:0; + _padding-left:1px; + _padding-right:2px; + _border:1px solid #A9ACB5; +} + + +.mini-tree-treeLine .mini-tree-indent{ + background:transparent url(images/tree/treeline.gif) repeat-y 9px 0px; +} + +.mini-tree-treeLine .mini-tree-node-ecicon +{ + background:transparent url(images/tree/treeNodeLine.gif) no-repeat 1px -4px; +} + +.mini-tree-treeLine .mini-tree-expand .mini-tree-node-ecicon{ + background:transparent url(images/tree/expandLine.gif) no-repeat 2px -1px; +} +.mini-tree-treeLine .mini-tree-collapse .mini-tree-node-ecicon{ + background:transparent url(images/tree/collapseLine.gif) no-repeat 1px -1px; +} +.mini-tree-treeLine .mini-tree-node-ecicon-last +{ + background:transparent url(images/tree/lastline.gif) no-repeat 2px -5px; +} + + +.mini-tree-treeLine .mini-tree-expand .mini-tree-node-ecicon-first +{ + background:transparent url(images/tree/firstExpandNode.gif) no-repeat 2px 0; +} +.mini-tree-treeLine .mini-tree-expand .mini-tree-node-ecicon-last +{ + background:transparent url(images/tree/lastExpandNode.gif) no-repeat 2px -1px; +} +.mini-tree-treeLine .mini-tree-collapse .mini-tree-node-ecicon-first +{ + background:transparent url(images/tree/firstCollapseNode.gif) no-repeat 1px 0; +} +.mini-tree-treeLine .mini-tree-collapse .mini-tree-node-ecicon-last +{ + background:transparent url(images/tree/lastCollapseNode.gif) no-repeat 1px -1px; +} + + +.mini-tree-treeLine .mini-tree-expand .mini-tree-node-ecicon-firstLast +{ + background:transparent url(images/tree/expand.gif) no-repeat 1px 0; +} +.mini-tree-treeLine .mini-tree-collapse .mini-tree-node-ecicon-firstLast +{ + background:transparent url(images/tree/collapse.gif) no-repeat 0px 0; +} + + +.mini-tree-treeLine .mini-tree-expand .mini-tree-node-ecicon-firstAndlast +{ + background-position:50% 70%; + background-image:url(images/tree/firstAndlastexpand.gif); +} +.mini-tree-treeLine .mini-tree-collapse .mini-tree-node-ecicon-firstAndlast +{ + background-position:50% 50%; + background-image:url(images/tree/firstAndlastcollapse.gif); +} +.mini-tree-treeLine .mini-tree-node-ecicon-firstAndlast +{ + background-position:50% 50%; + background-image:url(images/tree/lastline.gif); +} + + + +.mini-tree-editinput +{ + border-style: solid; + border-width: 1px; + background:white; + border-color: #9DA0AA #C2C4CB #D9DAE0; + font-size:12px; + + padding-top:1px; + _padding-top:0px; + padding-left:2px; + padding-right:2px; + margin-top:0px; + + width:80px; + height:15px; + line-height:15px; + vertical-align:top; +} + + + +body .mini-tree-showArrows .mini-tree-collapse .mini-tree-node-ecicon +{ + background:url(images/tree/arrows.gif) no-repeat 0px 2px; +} +body .mini-tree-showArrows .mini-tree-expand .mini-tree-node-ecicon +{ + background:url(images/tree/arrows.gif) no-repeat -16px 2px; +} +body .mini-tree-showArrows .mini-tree-indent, +body .mini-tree-showArrows .mini-tree-node-ecicon +{ + background:none; +} + + +.mini-tree-nodeclick .mini-tree-parentNode .mini-tree-nodeshow +{ + cursor:pointer; +} + + + + + +.mini-tree-nowrap .mini-tree-nodetext +{ + overflow:visible; +} +.mini-tree-nowrap .mini-grid-table +{ + table-layout:auto; +} +.mini-tree-nowrap .mini-tree-nodetitle +{ + overflow:visible; +} + + +.mini-tree-radio +{ + display:inline-block; + width:16px;height:20px;overflow:hidden; + line-height:20px; + background-repeat:no-repeat; + background-position:50% 50%; + vertical-align:middle; + background-image:url(images/tree/radio_unchecked.gif); +} + +.mini-tree-selectedNode .mini-tree-radio,.mini-grid-row-selected .mini-tree-radio +{ + background-image:url(images/tree/radio_checked.gif); +} + +.mini-tree .mini-tree-checkbox, +.mini-tree .mini-tree-radio +{ + line-height:20px; +} + +.mini-tree-checkbox +{ + width:13px; + height:13px; + overflow:hidden; + vertical-align:middle; + display:inline-block; + *display:inline; + *zoom:1; + background:url(images/icons/checkbox.gif) no-repeat 0 0; + cursor:pointer; + margin-left:2px; + margin-right:1px; +} +.mini-tree-checkbox-checked +{ + background-position:0 -13px; +} + +.mini-tree-checkbox-indeterminate +{ + background-position:0 -26px; +} +.mini-pager +{ + width:auto; + overflow:hidden; + font-size:9pt; + font-family: Tahoma, Verdana; + position:relative; + line-height:24px; + + min-height:24px; + padding:3px 8px 3px 4px; + border:solid 1px #C9C9C9; + +} + +.mini-pager-left +{ + + overflow:hidden; + + float:left; + position:relative; + padding-right:2px; + + +} + + +.mini-pager-right +{ + + + + float:right; +} + +.mini-pager .mini-button +{ + margin-right:0px; +} + +.mini-pager .mini-button-iconOnly +{ + +} + + + +.mini-pager-num +{ + line-height:20px; +} +body .mini-pager-num +{ + border:1px solid #ccc; + margin:0 2px; + width:35px; + text-align:center; + outline:none; + +vertical-align:middle; + position:relative; + _left:0;_top:-1px; + height:21px; +} +body .mini-pager .mini-pager-num +{ + padding:0; +} + +.mini-pager-pages +{ + padding-left:5px; + padding-right:5px; + display:inline-block; +} +.mini-pager-size +{ + display:inline-block; + + + vertical-align:middle; + + + font-size: 0; + line-height:0px; +} + +.mini-pager-size .mini-combobox +{ + width:50px; +} + +.mini-pager-index +{ + vertical-align:middle; + + overflow:hidden; + +} + +.mini-pager-first +{ + background:url(images/pager/first.gif) no-repeat; +} +.mini-pager-prev +{ + background-image:url(images/pager/prev.gif); +} +.mini-pager-next +{ + background-image:url(images/pager/next.gif); +} +.mini-pager-last +{ + background-image:url(images/pager/last.gif); +} +.mini-pager-reload +{ + background-image:url(images/pager/reload.png); +} + +.mini-page-buttons .mini-button, +.mini-page-buttons .mini-textbox, +.mini-page-buttons .mini-buttonedit +{ + vertical-align:middle; +} +.mini-page-buttons +{ + position:relative; + top:-1px; + +top:0px; +} + + +.mini-pager-left table +{ + float:left; +} + +.mini-pager-sizetext +{ + vertical-align:middle; + padding:2px; +} + +.mini-htmlfile +{ + position:relative; + +} +.mini-htmlfile-file +{ + position:absolute; + left:0; + top:0; + z-index:100; + width:10px; + height:10px; + overflow:hidden; + cursor:default; + opacity: .0;-moz-opacity: .0;filter: alpha(opacity=0); + + cursor:pointer; +} +.mini-htmlfile .mini-buttonedit-button +{ + font-size:8pt; + font-size:9pt\9; + font-family: Tahoma, Verdana; + white-space:nowrap; + + border:1px solid #A9ACB5; + background:#EBEDF2 url(images/buttonedit/button.png) repeat-x 0 0; + color:#201F35; + padding:0; + width:50px; + text-align:center; + line-height:16px; +} + +.mini-fileupload .swfupload,.mini-uploadify .swfupload +{ + position:absolute; + left:0; + top:0; + width:100%; + height:100%; + z-index:1000; + background:#efefef; + opacity: .0;-moz-opacity: .0;filter: alpha(opacity=0); + cursor:pointer; +} + +.mini-buttonedit-disabled object +{ + display:none; +} +.mini-fileupload-progressbar +{ + width:100%; + height:4px; + position:absolute; +} +.mini-fileupload-complete +{ + width:0; + height:100%; + background-color:#2fd85e; +} +.mini-textboxlist +{ + width:150px; + height:24px; + + display:inline-table; + *display:inline; + zoom:1; + + table-layout:fixed; + border-collapse:collapse; + border-collapse:separate; + vertical-align:middle; + + font: 9pt Verdana; +} +.mini-textboxlist-border +{ + border-style: solid; + border-width: 1px; + background:white; + border-color: #9DA0AA #C2C4CB #D9DAE0; + + width:100%; + cursor:text; + vertical-align:top; +} +.mini-textboxlist-focus .mini-textboxlist-border +{ + border-color: #434756 #7D808D #AAACB9; +} + +.mini-textboxlist ul +{ + zoom: 1; overflow: hidden; margin: 0; padding: 2px;padding-bottom:0; + padding-left:4px; +} +.mini-textboxlist li +{ + list-style-type: none; float: left; display:inline-block; padding: 0; margin: 0 3px 0px 0; cursor: default; +} +.mini-textboxlist .mini-textboxlist-inputLi +{ + margin-right:2px; + margin-bottom:2px; +} +.mini-textboxlist-input +{ + font: 9pt "Lucida Grande", Verdana; +} +.mini-textboxlist .mini-textboxlist-input +{ + border: 0; padding: 0; + outline:none; + width:20px; + height: 16px; + margin-top:2px; + *+margin-top:0px; + background:transparent; +} + + +.mini-textboxlist .mini-textboxlist-item +{ + position: relative; padding: 0 6px; + -moz-border-radius: 9px; -webkit-border-radius: 9px; border-radius: 9px; + border: 1px solid #CAD8F3; background: #DEE7F8; cursor: default; + padding-right: 15px; + height:16px; + line-height: 16px; + margin-bottom:2px; + white-space:nowrap; +} +.mini-textboxlist .mini-textboxlist-item-hover +{ + background: #BBCEF1; border: 1px solid #6D95E0; +} +.mini-textboxlist .mini-textboxlist-item-selected +{ + border-color: #598BEC; background: #598BEC; color: #fff; +} +.mini-textboxlist-close { position: absolute; right: 4px;top:5px; display: block; width: 7px; height: 7px; font-size: 1px; background: url(images/textboxlist/close.gif); cursor:pointer; } +.mini-textboxlist-close-hover, .mini-textboxlist-item-selected .mini-textboxlist-close{ background-position: bottom; } + +.mini-textboxlist .mini-errorIcon +{ + margin-left:2px; + margin-top:2px; + position:static; +} + +.mini-textboxlist-popup-loading +{ + background:url(images/textboxlist/loading.gif) no-repeat 0 5px; + padding-left:20px; + line-height:25px; + display:block; +} +.mini-textboxlist-popup-error +{ + background:url(images/textboxlist/error.gif) no-repeat 0 5px; + padding-left:20px; + line-height:25px; + display:block; +} +.mini-textboxlist-popup-noresult +{ + padding-left:20px; + line-height:25px; + display:block; +} + +.mini-textboxlist-popup .mini-listbox-item td +{ + white-space:nowrap; +} + + +.mini-required .mini-textboxlist-border{ + background: #ffffe6; +} +.mini-tips +{ + *zoom:1; + cursor:default; + position:relative; + padding-left: 10px; + padding-top:5px; + padding-bottom:5px; + padding-right:30px; + margin-bottom: 20px; + border: 1px solid transparent; + border-radius: 4px; + + font-family:Verdana; + font-size:12px; + + color: #777; + background-color: #f5f5f5; + border-color: #eee; +} + +.mini-tips-success +{ + color: #468847; + background-color: #dff0d8; + border-color: #d6e9c6; +} +.mini-tips-info { + color: #3a87ad; + background-color: #d9edf7; + border-color: #bce8f1; +} +.mini-tips-warning { + color: #c09853; + background-color: #fcf8e3; + border-color: #fbeed5; +} +.mini-tips-danger { + color: #b94a48; + background-color: #f2dede; + border-color: #eed3d7; +} + + +.mini-tabs,.mini-tabs-scrollCt, .mini-tabs-bodys, .mini-tabs-body, +.mini-layout, .mini-layout-border, .mini-layout-region, .mini-layout-region-body, .mini-layout-proxy, +.mini-splitter, mini-splitter-border, .mini-splitter-pane, .mini-splitter-handler, +.mini-panel-border, .mini-panel-viewport, .mini-panel-body, +.mini-textbox-border, .mini-buttonedit-border, .mini-listbox-border, .mini-popup, +.mini-menu, .mini-menu-border, +.mini-grid{ + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; +} + + + +.mini-widget, body, +.mini-button, .mini-menuitem, .mini-layout-region-header, .mini-panel-header, +.mini-outlookbar-groupHeader, +.mini-grid-headerCell, .mini-grid-cell, .mini-grid-columnproxy, +.mini-listbox td, +.mini-calendar, .mini-calendar-button, +.mini-tabs, +.mini-tree, +.mini-textbox-input, +.mini-buttonedit-input, +.mini-textboxlist-input, +.mini-textboxlist, +.mini-pager, +.mini-checkboxlist table label, .mini-radiobuttonlist table label, +.mini-checkbox, +.mini-checkboxlist, .mini-radiobuttonlist, .mini-radiobuttonlist label, +.mini-layout, +.mini-calendar, .mini-calendar-menu-month, mini-calendar-date, mini-calendar-menu-year, .mini-calendar-title +{ + font-family:"Helvetica Neue",Helvetica,Arial,sans-serif; + font-size:13px; +} + + diff --git a/hsweb-ui/plugins/miniui/themes/default/my-mode.css b/hsweb-ui/plugins/miniui/themes/default/my-mode.css index 45c480e..f556c85 100644 --- a/hsweb-ui/plugins/miniui/themes/default/my-mode.css +++ b/hsweb-ui/plugins/miniui/themes/default/my-mode.css @@ -1,123 +1,124 @@ -body -{ - font-size:14px; - line-height:1.4; +body { + font-size: 14px; + line-height: 1.4; } -td{ - font-size:14px; + +td { + font-size: 14px; } + /* button ==========================================*/ -.mini-button -{ - font-size:13px; - line-height:16px; +.mini-button { + font-size: 13px; + line-height: 16px; } -.mini-button-text -{ - padding:6px 12px 6px 12px; - line-height:16px; + +.mini-button-text { + line-height: 16px; } -.mini-button-icon -{ - left:8px; + +.mini-button-icon { + left: 8px; } -.mini-button .mini-button-icon-text -{ - padding-left:28px; + +.mini-button .mini-button-icon-text { + padding-left: 25px; } -.mini-button .mini-button-icon-only -{ - padding-left:18px; + +.mini-button .mini-button-icon-only { + padding-left: 18px; } -.mini-button .mini-button-icon-only .mini-button-icon -{ - left:8px; +.mini-button-inner { + padding:7px 10px 7px 10px; } -.mini-button-iconRight .mini-button-icon-text -{ - padding-left:12px; - padding-right:28px; + +.mini-button .mini-button-icon-only .mini-button-icon { + left: 10px; } -.mini-button-iconRight .mini-button-icon -{ - left:auto; - right:8px; + +.mini-button-iconRight .mini-button-icon-text { + padding-left: 12px; + padding-right: 28px; } -.mini-button-iconTop .mini-button-icon-text -{ - padding-left:12px; - padding-top:28px; + +.mini-button-iconRight .mini-button-icon { + left: auto; + right: 8px; } -.mini-button-iconTop .mini-button-icon -{ - top:6px; + +.mini-button-iconTop .mini-button-icon-text { + padding-left: 12px; + padding-top: 28px; } -.mini-button-allow -{ - margin-top:7px; - left:-3px; + +.mini-button-iconTop .mini-button-icon { + top: 6px; +} + +.mini-button-allow { + margin-top: 7px; + left: -3px; } /* textbox ==========================================*/ -.mini-textbox-input -{ - height:28px; - line-height:28px; - font-size:14px; +.mini-textbox-input { + height: 30px; + line-height: 28px; + font-size: 14px; } -.mini-textbox-border -{ - padding-left:8px; - padding-right:8px; - height:28px; + +.mini-textbox-border { + padding-left: 8px; + padding-right: 8px; + height: 30px; } -.mini-textbox -{ - overflow:visible; - height:30px; - width:150px; + +.mini-textbox { + overflow: visible; + height: 30px; + width: 150px; } -.mini-textarea .mini-textbox-border -{ - padding-left:8px; - padding-right:0px; + +.mini-textarea .mini-textbox-border { + padding-left: 8px; + padding-right: 0px; } -.mini-textarea .mini-textbox-input -{ - line-height:20px; + +.mini-textarea .mini-textbox-input { + line-height: 20px; } /* buttonedit ==========================================*/ -.mini-buttonedit-input -{ - height:28px; - line-height:28px; - font-size:14px; +.mini-buttonedit-input { + height: 30px; + line-height: 30px; + font-size: 14px; } -.mini-buttonedit-border -{ - padding-left:6px; - padding-right:25px; - height:28px; + +.mini-buttonedit-border { + padding-left: 6px; + padding-right: 25px; + height: 30px; } -.mini-buttonedit -{ - overflow:visible; - height:30px; - width:150px; + +.mini-buttonedit { + overflow: visible; + height: 30px; + width: 150px; } -.mini-buttonedit-button -{ - height:24px; - width:22px; + +.mini-buttonedit-button { + height: 24px; + width: 22px; } -.mini-buttonedit-close -{ - height:24px; + +.mini-buttonedit-close { + height: 24px; } + /*.mini-buttonedit-up span, .mini-buttonedit-down span { background-position:50% 50%; @@ -125,391 +126,374 @@ td{ /* htmlfile ==========================================*/ -.mini-htmlfile .mini-buttonedit-button -{ - line-height:24px; +.mini-htmlfile .mini-buttonedit-button { + line-height: 24px; } /* textboxlist ==========================================*/ -.mini-textboxlist -{ - height:30px; +.mini-textboxlist { + height: 30px; } -.mini-textboxlist ul -{ - padding-top:3px; - padding-left:8px; + +.mini-textboxlist ul { + padding-top: 3px; + padding-left: 8px; } -.mini-textboxlist .mini-textboxlist-item -{ - font-size:14px; - line-height:20px; - height:20px; + +.mini-textboxlist .mini-textboxlist-item { + font-size: 14px; + line-height: 20px; + height: 20px; } -.mini-textboxlist .mini-errorIcon -{ - margin-top:4px; + +.mini-textboxlist .mini-errorIcon { + margin-top: 4px; } -.mini-textboxlist .mini-textboxlist-input -{ - height:18px; - line-height:18px; + +.mini-textboxlist .mini-textboxlist-input { + height: 18px; + line-height: 18px; } /* checkbox ==========================================*/ -.mini-checkbox -{ - font-size:14px; - line-height:26px; +.mini-checkbox { + font-size: 14px; + line-height: 26px; } + .mini-checkbox-check, -.mini-checkbox-icon -{ - margin-right:10px; +.mini-checkbox-icon { + margin-right: 10px; } /* checkboxlist & radiobuttonlist ==========================================*/ .mini-checkboxlist table label, -.mini-radiobuttonlist table label -{ - padding-left:8px; - line-height:22px; - font-size:14px; +.mini-radiobuttonlist table label { + padding-left: 8px; + line-height: 22px; + font-size: 14px; } /* listbox ==========================================*/ -.mini-listbox td -{ - line-height:20px; - font-size:14px; +.mini-listbox td { + line-height: 20px; + font-size: 14px; padding: 6px 8px 6px 8px; } /* grid ==========================================*/ -.mini-grid-cell-inner -{ - padding-top:6px; - padding-bottom:6px; - font-size:14px; +.mini-grid-cell-inner { + padding-top: 6px; + padding-bottom: 6px; + font-size: 14px; } -.mini-grid-headerCell-inner -{ - padding-top:12px; - padding-bottom:12px; - font-size:14px; + +.mini-grid-headerCell-inner { + padding-top: 12px; + padding-bottom: 12px; + font-size: 14px; } -.mini-grid-headerCell-outer -{ - padding-left:6px; - padding-right:4px; + +.mini-grid-headerCell-outer { + padding-left: 6px; + padding-right: 4px; } -.mini-grid-columnproxy -{ - padding-top:4px; - padding-bottom:6px; + +.mini-grid-columnproxy { + padding-top: 4px; + padding-bottom: 6px; } + .mini-grid-allowsort, -.mini-grid-sortIcon -{ - margin-left:4px; +.mini-grid-sortIcon { + margin-left: 4px; } /* treegrid & tree ==========================================*/ .mini-tree-nodetitle, .mini-tree-node-ecicon, -.mini-tree-indent -{ - height:29px; +.mini-tree-indent { + height: 29px; vertical-align: middle; } -.mini-tree .mini-tree-icon -{ + +.mini-tree .mini-tree-icon { /*top:-2px;*/ } -.mini-tree-nodeshow -{ - padding:3px; - padding-left:4px; - padding-right:5px; + +.mini-tree-nodeshow { + padding: 3px; + padding-left: 4px; + padding-right: 5px; } + .mini-tree-node-hover .mini-tree-nodeshow, -.mini-tree-selectedNode .mini-tree-nodeshow -{ - padding:2px; - padding-left:3px; - padding-right:4px; +.mini-tree-selectedNode .mini-tree-nodeshow { + padding: 2px; + padding-left: 3px; + padding-right: 4px; } -.mini-tree-nodetext -{ - padding-left:6px; + +.mini-tree-nodetext { + padding-left: 6px; } -.mini-tree-checkbox -{ - margin-left:4px; - margin-right:2px; + +.mini-tree-checkbox { + margin-left: 4px; + margin-right: 2px; } /* pager ==========================================*/ -.mini-pager -{ - height:30px; - line-height:30px; - padding:6px 10px 6px 8px; +.mini-pager { + height: 30px; + line-height: 30px; + padding: 6px 10px 6px 8px; } -body .mini-pager-num -{ - height:22px; - line-height:22px; + +body .mini-pager-num { + height: 22px; + line-height: 22px; } /* toolbar ==========================================*/ -.mini-toolbar -{ - padding:8px; +.mini-toolbar { + padding: 8px; } /* tools ==========================================*/ -.mini-tools span -{ - margin-left:6px; +.mini-tools span { + margin-left: 6px; } /* panel ==========================================*/ -.mini-panel-header-inner -{ - padding:16px 24px; - font-size:16px; +.mini-panel-header-inner { + padding: 16px 24px; + font-size: 16px; } -.mini-panel .mini-panel-icon -{ - margin-right:8px; + +.mini-panel .mini-panel-icon { + margin-right: 8px; } -.mini-panel .mini-tools -{ - top:14px; - right:10px; + +.mini-panel .mini-tools { + top: 14px; + right: 10px; } -.mini-panel-body -{ - padding:8px; + +.mini-panel-body { + padding: 8px; } + .mini-panel-toolbar, -.mini-panel-footer -{ +.mini-panel-footer { /*padding:6px;*/ } /* layout ==========================================*/ -.mini-layout -{ - font-size:14px; +.mini-layout { + font-size: 14px; } + .mini-layout-region-header, -.mini-layout-proxy -{ - height:40px; - line-height:40px; +.mini-layout-proxy { + height: 40px; + line-height: 40px; } + /*主页菜单*/ .main-menu .mini-layout-region-header, -.main-menu .mini-layout-proxy -{ - height:53px; - line-height:53px; +.main-menu .mini-layout-proxy { + height: 53px; + line-height: 53px; } -.mini-layout-proxy -{ - width:40px; +.mini-layout-proxy { + width: 40px; } + .mini-layout-region-header .mini-tools, -.mini-layout-proxy .mini-tools -{ - top:0; - right:16px; +.mini-layout-proxy .mini-tools { + top: 0; + right: 16px; } -.mini-layout-proxy-text -{ - left:8px; - font-size:14px; + +.mini-layout-proxy-text { + left: 8px; + font-size: 14px; } /* outlookbar ==========================================*/ -.mini-outlookbar -{ - font-size:14px; +.mini-outlookbar { + font-size: 14px; } -.mini-outlookbar-groupHeader -{ - line-height:20px; - padding:10px 26px 10px 12px; + +.mini-outlookbar-groupHeader { + line-height: 20px; + padding: 10px 26px 10px 12px; } -.mini-outlookbar-groupTitle -{ - padding-left:8px; + +.mini-outlookbar-groupTitle { + padding-left: 8px; } -.mini-outlookbar-groupHeader .mini-tools -{ - top:12px; - right:12px; + +.mini-outlookbar-groupHeader .mini-tools { + top: 12px; + right: 12px; } /* menu ==========================================*/ -.mini-menu -{ - font-size:14px; +.mini-menu { + font-size: 14px; } -.mini-menuitem-inner -{ - padding:4px 26px 4px 34px; + +.mini-menuitem-inner { + padding: 4px 26px 4px 34px; } -.mini-menuitem-icon -{ - left:10px; - top:6px; -} -.mini-menuitem-allow -{ - top:6px; - right:6px; + +.mini-menuitem-icon { + left: 10px; + top: 6px; } -.mini-menu-horizontal .mini-menu-inner -{ - padding:6px; + +.mini-menuitem-allow { + top: 6px; + right: 6px; } -.mini-menu-horizontal .mini-menuitem-inner -{ - padding:4px 10px 4px 10px; + +.mini-menu-horizontal .mini-menu-inner { + padding: 6px; } -.mini-menu-horizontal .mini-menuitem-icon -{ - margin-right:4px; + +.mini-menu-horizontal .mini-menuitem-inner { + padding: 4px 10px 4px 10px; +} + +.mini-menu-horizontal .mini-menuitem-icon { + margin-right: 4px; } /* tabs ==========================================*/ -.mini-tab -{ - padding-left:14px; - padding-right:14px; +.mini-tab { + padding-left: 14px; + padding-right: 14px; } -.mini-tab-text -{ - font-size:14px; - line-height:16px; - padding:8px 8px 8px 8px; + +.mini-tab-text { + font-size: 14px; + line-height: 16px; + padding: 8px 8px 8px 8px; } -.mini-tabs-plain -{ - line-height:18px; + +.mini-tabs-plain { + line-height: 18px; } -.mini-tab-close -{ - margin-top:0; + +.mini-tab-close { + margin-top: 0; } -.mini-tabs-tabmenu -{ - top:7px; - right:4px; - width:22px; - height:22px; - margin-right:6px; + +.mini-tabs-tabmenu { + top: 7px; + right: 4px; + width: 22px; + height: 22px; + margin-right: 6px; } + .mini-tabs-nav, -.mini-tabs-leftnav -{ - top:7px; +.mini-tabs-leftnav { + top: 7px; padding-left: 8px; padding-right: 4px; } + #mainTabs .mini-tabs-nav, -#mainTabs .mini-tabs-leftnav -{ - top:18px; +#mainTabs .mini-tabs-leftnav { + top: 18px; } -.mini-tabs-leftButton, .mini-tabs-rightButton -{ - width:22px; - height:22px; - margin-right:6px; + +.mini-tabs-leftButton, .mini-tabs-rightButton { + width: 22px; + height: 22px; + margin-right: 6px; } -.mini-tabs-buttons -{ - padding-top:6px; + +.mini-tabs-buttons { + padding-top: 6px; } + /* calendar ==========================================*/ .mini-calendar, .mini-calendar-title, .mini-calendar-menu-month, -.mini-calendar-menu-year -{ - font-size:14px; +.mini-calendar-menu-year { + font-size: 14px; } -.mini-calendar-header -{ - height:34px; + +.mini-calendar-header { + height: 34px; } -.mini-calendar-title -{ - top:4px; + +.mini-calendar-title { + top: 4px; } + .mini-calendar-prev, -.mini-calendar-next -{ - top:10px; +.mini-calendar-next { + top: 10px; } -body .mini-calendar td.mini-calendar-date -{ - line-height:16px; - padding:3px 8px; + +body .mini-calendar td.mini-calendar-date { + line-height: 16px; + padding: 3px 8px; } -body .mini-calendar .mini-calendar-daysheader td -{ - line-height:18px; - padding:4px; + +body .mini-calendar .mini-calendar-daysheader td { + line-height: 18px; + padding: 4px; } + .mini-calendar-tadayButton, .mini-calendar-clearButton, -.mini-calendar-okButton, .mini-calendar-cancelButton -{ - line-height:16px; - padding:6px; - padding-left:0px; - padding-right:0px; +.mini-calendar-okButton, .mini-calendar-cancelButton { + line-height: 16px; + padding: 6px; + padding-left: 0px; + padding-right: 0px; } -.mini-calendar-menu-year -{ - padding:2px 2px; + +.mini-calendar-menu-year { + padding: 2px 2px; } /* progressbar ==========================================*/ -.mini-progressbar -{ - height:30px; +.mini-progressbar { + height: 30px; } -.mini-progressbar-border -{ - height:28px; - border-radius:4px; + +.mini-progressbar-border { + height: 28px; + border-radius: 4px; } -.mini-progressbar-text -{ - line-height:28px; - font-size:14px; + +.mini-progressbar-text { + line-height: 28px; + font-size: 14px; } diff --git a/hsweb-ui/plugins/miniui/themes/layui/images/check-hover.jpg b/hsweb-ui/plugins/miniui/themes/layui/images/check-hover.jpg new file mode 100644 index 0000000..aa689ca Binary files /dev/null and b/hsweb-ui/plugins/miniui/themes/layui/images/check-hover.jpg differ diff --git a/hsweb-ui/plugins/miniui/themes/layui/images/check.jpg b/hsweb-ui/plugins/miniui/themes/layui/images/check.jpg new file mode 100644 index 0000000..b29176e Binary files /dev/null and b/hsweb-ui/plugins/miniui/themes/layui/images/check.jpg differ diff --git a/hsweb-ui/plugins/miniui/themes/layui/images/check2-hover.jpg b/hsweb-ui/plugins/miniui/themes/layui/images/check2-hover.jpg new file mode 100644 index 0000000..272f742 Binary files /dev/null and b/hsweb-ui/plugins/miniui/themes/layui/images/check2-hover.jpg differ diff --git a/hsweb-ui/plugins/miniui/themes/layui/images/check2.jpg b/hsweb-ui/plugins/miniui/themes/layui/images/check2.jpg new file mode 100644 index 0000000..0592352 Binary files /dev/null and b/hsweb-ui/plugins/miniui/themes/layui/images/check2.jpg differ diff --git a/hsweb-ui/plugins/miniui/themes/layui/images/checked.jpg b/hsweb-ui/plugins/miniui/themes/layui/images/checked.jpg new file mode 100644 index 0000000..5ef8f93 Binary files /dev/null and b/hsweb-ui/plugins/miniui/themes/layui/images/checked.jpg differ diff --git a/hsweb-ui/plugins/miniui/themes/layui/images/checked2.jpg b/hsweb-ui/plugins/miniui/themes/layui/images/checked2.jpg new file mode 100644 index 0000000..a86b47d Binary files /dev/null and b/hsweb-ui/plugins/miniui/themes/layui/images/checked2.jpg differ diff --git a/hsweb-ui/plugins/miniui/themes/layui/images/combo/combo-arrow.jpg b/hsweb-ui/plugins/miniui/themes/layui/images/combo/combo-arrow.jpg new file mode 100644 index 0000000..f903da6 Binary files /dev/null and b/hsweb-ui/plugins/miniui/themes/layui/images/combo/combo-arrow.jpg differ diff --git a/hsweb-ui/plugins/miniui/themes/layui/images/radio-hover.jpg b/hsweb-ui/plugins/miniui/themes/layui/images/radio-hover.jpg new file mode 100644 index 0000000..538945e Binary files /dev/null and b/hsweb-ui/plugins/miniui/themes/layui/images/radio-hover.jpg differ diff --git a/hsweb-ui/plugins/miniui/themes/layui/images/radio.jpg b/hsweb-ui/plugins/miniui/themes/layui/images/radio.jpg new file mode 100644 index 0000000..6c5b76f Binary files /dev/null and b/hsweb-ui/plugins/miniui/themes/layui/images/radio.jpg differ diff --git a/hsweb-ui/plugins/miniui/themes/layui/images/radioed.jpg b/hsweb-ui/plugins/miniui/themes/layui/images/radioed.jpg new file mode 100644 index 0000000..74b1a14 Binary files /dev/null and b/hsweb-ui/plugins/miniui/themes/layui/images/radioed.jpg differ diff --git a/hsweb-ui/plugins/miniui/themes/layui/images/tabs/tabclose-hover.jpg b/hsweb-ui/plugins/miniui/themes/layui/images/tabs/tabclose-hover.jpg new file mode 100644 index 0000000..eb86409 Binary files /dev/null and b/hsweb-ui/plugins/miniui/themes/layui/images/tabs/tabclose-hover.jpg differ diff --git a/hsweb-ui/plugins/miniui/themes/layui/images/tabs/tabclose.jpg b/hsweb-ui/plugins/miniui/themes/layui/images/tabs/tabclose.jpg new file mode 100644 index 0000000..8122430 Binary files /dev/null and b/hsweb-ui/plugins/miniui/themes/layui/images/tabs/tabclose.jpg differ diff --git a/hsweb-ui/plugins/miniui/themes/layui/images/tool-sprites.PNG b/hsweb-ui/plugins/miniui/themes/layui/images/tool-sprites.PNG new file mode 100644 index 0000000..f9c1f5f Binary files /dev/null and b/hsweb-ui/plugins/miniui/themes/layui/images/tool-sprites.PNG differ diff --git a/hsweb-ui/plugins/miniui/themes/layui/skin.css b/hsweb-ui/plugins/miniui/themes/layui/skin.css new file mode 100644 index 0000000..5fed538 --- /dev/null +++ b/hsweb-ui/plugins/miniui/themes/layui/skin.css @@ -0,0 +1,1910 @@ +body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,input,button,textarea,p,blockquote,th,td,form,pre{margin: 0; padding: 0; -webkit-tap-highlight-color:rgba(0,0,0,0);} +a:active,a:hover{outline:0} +img{display: inline-block; border: none; vertical-align: middle;} +li{list-style:none;} +table{border-collapse: collapse; border-spacing: 0;} +h1,h2,h3{font-size: 14px; font-weight: 400;} +h4, h5, h6{font-size: 100%; font-weight: 400;} +button,input,select,textarea{font-size: 100%; } +input,button,textarea,select,optgroup,option{font-family: inherit; font-size: inherit; font-style: inherit; font-weight: inherit; outline: 0;} +pre{white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;} + + +body{line-height: 24px; font: 14px Helvetica Neue,Helvetica,PingFang SC,\5FAE\8F6F\96C5\9ED1,Tahoma,Arial,sans-serif;} +hr{height: 1px; margin: 10px 0; border: 0; background-color: #e2e2e2; clear: both;} +a{color: #333; text-decoration:none; } +a:hover{color: #777;} +a cite{font-style: normal; *cursor:pointer;} + +.mini-modal +{ + background:#f8f8f8; + opacity: .6; + filter: alpha(opacity=60); +} +.mini-mask-background +{ + background:#f8f8f8; + opacity: 0; + filter: alpha(opacity=0); +} +/* button +==========================================*/ +.mini-button +{ + background: #009688; + border-color: #009688; + color: white; + -webkit-appearance: none; + transition: all .3s; + -webkit-transition: all .3s; + border-radius: 2px; + font-size: 14px; + font-family:Helvetica Neue,Helvetica,PingFang SC,\5FAE\8F6F\96C5\9ED1,Tahoma,Arial,sans-serif; +} +body a:hover.mini-button +{ + background: #009688; + border-color: #009688; + opacity: 0.8; + filter:alpha(opacity=80); + color: white; +} +body .mini-button-pressed, body a:hover.mini-button-pressed, +body .mini-button-checked, body a:hover.mini-button-checked, +body a.mini-button-popup, body a:hover.mini-button-popup +{ + background: #009688; + border-color: #009688; + opacity: 1; + filter:alpha(opacity=100); + color:#fff; +} +/* primary */ +.mini-button.primary +{ + border: 1px solid #C9C9C9; + background-color: #fff; + color: #555; +} +body a:hover.mini-button.primary +{ + border-color: #009688; + background-color: #fff; + opacity: 0.8; + filter:alpha(opacity=80); + color: #333 +} +body .primary.mini-button-pressed, body a:hover.primary.mini-button-pressed, +body .primary.mini-button-checked, body a:hover.primary.mini-button-checked, +body a.primary.mini-button-popup, body a:hover.primary.mini-button-popup +{ + border: 1px solid #C9C9C9; + background-color: #fff; + opacity: 1; + filter:alpha(opacity=100); + color:#555; +} +/* normal */ +.mini-button.normal +{ + border: 1px solid #1E9FFF; + background-color: #1E9FFF; + color: #fff; +} +body a:hover.mini-button.normal +{ + border-color: #1E9FFF; + background-color: #1E9FFF; + opacity: 0.8; + filter:alpha(opacity=80); + color: #fff +} +body .normal.mini-button-pressed, body a:hover.normal.mini-button-pressed, +body .normal.mini-button-checked, body a:hover.normal.mini-button-checked, +body a.normal.mini-button-popup, body a:hover.normal.mini-button-popup +{ + border: 1px solid #1E9FFF; + background-color: #1E9FFF; + opacity: 1; + filter:alpha(opacity=100); + color:#fff; +} +/* warm */ +.mini-button.warm +{ + border: 1px solid #FFB800; + background-color: #FFB800; + color: #fff; +} +body a:hover.mini-button.warm +{ + border-color: #FFB800; + background-color: #FFB800; + opacity: 0.8; + filter:alpha(opacity=80); + color: #fff +} +body .warm.mini-button-pressed, body a:hover.warm.mini-button-pressed, +body .warm.mini-button-checked, body a:hover.warm.mini-button-checked, +body a.warm.mini-button-popup, body a:hover.warm.mini-button-popup +{ + border: 1px solid #FFB800; + background-color: #FFB800; + opacity: 1; + filter:alpha(opacity=100); + color:#fff; +} + +/* danger */ +.mini-button.danger +{ + border: 1px solid #FF5722; + background-color: #FF5722; + color: #fff; +} +body a:hover.mini-button.danger +{ + border-color: #FF5722; + background-color: #FF5722; + opacity: 0.8; + filter:alpha(opacity=80); + color: #fff; +} +body .danger.mini-button-pressed, body a:hover.danger.mini-button-pressed, +body .danger.mini-button-checked, body a:hover.danger.mini-button-checked, +body a.danger.mini-button-popup, body a:hover.danger.mini-button-popup +{ + border: 1px solid #FF5722; + background-color: #FF5722; + opacity: 1; + filter:alpha(opacity=100); + color:#fff; +} +body a.mini-button-disabled, body a:hover.mini-button-disabled +{ + border: 1px solid #e6e6e6; + background: #FBFBFB; + color: #C9C9C9; + opacity: 1; +} +.mini-button.mini-button-disabled .mini-button-text +{ + /*cursor: not-allowed; */ +} +/* menu +==========================================*/ +.mini-menu +{ + background:#ffffff; + color:black; + font-family: helvetica,arial,verdana,sans-serif; +} +.mini-menu-border +{ + border-color:#ddd; +} +.mini-menuitem-hover, +.mini-menu-popup +{ + border-color:#0079d2; + background:#d6e8f6; +} +.mini-menuitem-selected +{ + border-color:#ddd; + background:#ffffff; +} +.mini-menuitem-text, .mini-menuitem-text a +{ + color:black; + margin-right:12px; +} +.mini-separator +{ + border-color:#ddd; +} + +.mini-menu-horizontal .mini-menuitem-allow +{ + background: url(images/trigger.png) no-repeat -4px -3px; +} +.mini-menu-horizontal .mini-menuitem-allow +{ + width: 15px; + height: 15px; + margin-top: 5px; +} +.mini-menuitem.mini-menuitem-selected .mini-menuitem-inner +{ + background:url(images/menulinearrow.png) no-repeat 100% 50%; +} +.mini-button-menu +{ + background: url(images/menu_arrow.png) no-repeat -2px 0px; +} +.mini-menuitem-allow +{ + left: auto; + right: 5px; + top:2px; + background: url(images/arrows.png) no-repeat 0px 0px; +} +/* panel +==========================================*/ +.mini-panel +{ + font-family: helvetica,arial,verdana,sans-serif; + font-size:13px;line-height:16px; +} +.mini-panel-border +{ + border-color:rgb(21, 127, 204); +} +.mini-panel.framed .mini-panel-border +{ + border:5px solid rgb(21, 127, 204); + border-radius: 4px; +} +.mini-panel.framed .mini-panel-title +{ + line-height: 15px; +} +.mini-panel.framed .mini-panel-header-inner +{ + padding: 7px 5px 10px 5px; +} +.mini-panel.framed .mini-tools { + top: 7px; +} +.mini-panel-header +{ + background:#157fcc; + border-color:#157fcc; +} +.mini-panel .mini-panel-title +{ + text-align:left; + float:none; + color: white; + font-size: 14px; + font-weight: bold; + font-family: arial,helvetica,verdana,sans-serif; + line-height: 15px; +} +.mini-panel-body +{ + height: 100%; + vertical-align: top; + padding: 10px ; +} + +.mini-panel .mini-panel-footer, +.mini-panel .mini-panel-toolbar +{ + padding: 6px 0 6px 6px; + background:#f2f2f2; + border-color:#f2f2f2; +} +.mini-tools-close +{ + background: url(images/tool-sprites.png) no-repeat 0px 0px; + opacity: .5; +} +.mini-panel-collapse .mini-tools .mini-tools-collapse +{ + background:url(images/tool-sprites.png) no-repeat 0px -208px; +} +.mini-panel.framed.mini-panel-collapse .mini-tools .mini-tools-collapse +{ + background: url(images/tool-sprites.png) no-repeat 0px -208px; +} +.mini-tools span +{ + width:16px; + height:16px; +} +/* window +==========================================*/ +.mini-window .mini-panel-border +{ + border:5px solid #009688; + border-radius: 4px; +} +.mini-window .mini-panel-header +{ + background:#009688; +} +.mini-window.form .mini-panel-border +{ + border-color:#157fcc; +} +.mini-window.form .mini-panel-header +{ + background:#157fcc; +} +.mini-window .mini-panel-footer +{ + background:#f2f2f2; + border-color:#f2f2f2; +} +.mini-window .mini-panel-header-inner +{ + padding:7px 10px 8px 10px; +} +.mini-window .mini-tools { + top: 6px; + right: 10px; +} +.mini-tools-max +{ + background: url(images/tool-sprites.png) no-repeat 50% -32px; + opacity: .5; +} +.mini-tools-restore +{ + background: url(images/tool-sprites.png) no-repeat 50% -48px; + opacity: .5; +} +.mini-tools .mini-tools-collapse +{ + background:url(images/tool-sprites.png) no-repeat 0px -224px; + width:16px; + opacity: .5; +} + +.mini-drag-proxy +{ + background:#ddd; + border-color:#ddd; + opacity: .5; +} +.mini-iconfont.mini-tools-remove +{ + background:url(images/tool-sprites.png) no-repeat 50% 0px; + opacity: .5; +} +/* grid +==========================================*/ + +.mini-grid-cell, +.mini-grid-headerCell, +.mini-grid-filterCell, +.mini-grid-summaryCell, +.mini-grid-cell-inner, +.mini-grid-headerCell-inner +{ + line-height:32px; + font-family:Helvetica Neue,Helvetica,PingFang SC,\5FAE\8F6F\96C5\9ED1,Tahoma,Arial,sans-serif; + font-size:14px; +} +.bigger .mini-grid-cell, +.bigger .mini-grid-headerCell, +.bigger .mini-grid-filterCell, +.bigger .mini-grid-summaryCell, +.bigger .mini-grid-cell-inner, +.bigger .mini-grid-headerCell-inner +{ + line-height:44px; +} +.smaller .mini-grid-cell, +.smaller .mini-grid-headerCell, +.smaller .mini-grid-filterCell, +.smaller .mini-grid-summaryCell, +.smaller .mini-grid-cell-inner, +.smaller .mini-grid-headerCell-inner +{ + line-height:24px; +} + +.smaller .mini-grid-cell, +.smaller .mini-grid-headerCell, +.smaller .mini-grid-topRightCell +{ + font-size:12px; +} +.mini-grid-border +{ + border-color:#e2e2e2; + border-bottom:0; +} + +.mini-grid-headerCell, .mini-grid-topRightCell +{ + background:#f2f2f2; + border-right:0; + border-bottom:#e2e2e2 1px solid; + +} +.borderAll .mini-grid-headerCell, +.borderAll .mini-grid-topRightCell, +.borderAll .mini-grid-cell +{ + border-right:1px solid #e2e2e2; +} +.borderY .mini-grid-headerCell, +.borderY .mini-grid-topRightCell, +.borderY .mini-grid-cell +{ + border-right:1px solid #e2e2e2; + border-bottom:0; +} +.borderY .mini-grid-border +{ + border-bottom:1px solid #e2e2e2; +} + +.borderNone .mini-grid-headerCell, +.borderNone .mini-grid-topRightCell, +.borderNone .mini-grid-cell +{ + border:0; +} +.borderNone .mini-grid-border +{ + border:0; +} +.mini-grid-cell +{ + border-color:#e2e2e2; + border-bottom-color:#e2e2e2; + border-right:0; + font-family:Helvetica Neue,Helvetica,PingFang SC,\5FAE\8F6F\96C5\9ED1,Tahoma,Arial,sans-serif; + font-size:14px; +} +.mini-grid-footer +{ + border-top:solid 1px #dddddd; + background:#fff; +} +.mini-grid-pager +{ + border-bottom:1px solid #ddd; + border-top:1px solid #ddd; + background:#fff; + height:38px; +} + +.mini-grid-columnproxy +{ + background:#f4f4f4; + border:#dddddd 1px solid; +} + +body .mini-grid-row-hover, body .mini-grid-row-hover .mini-grid-frozenCell +{ + background:#f2f2f2; +} +html body .mini-grid-row-selected { + background: #f2f2f2; +} +.mini-resizer-trigger +{ + display:none; +} + +.mini-grid-checkbox +{ + height:18px;width:18px; + background:url(images/checkbox.png) no-repeat -2px -2px; +} +.mini-grid-checkbox-checked, +.mini-grid-row-selected .mini-checkcolumn .mini-grid-checkbox +{ + background:url(images/checkbox-checked.png) no-repeat -2px -2px; +} +/* checkbox */ +.mini-checkbox-check, .mini-checkbox-icon +{ + background:url(images/checkbox.jpg) no-repeat 0 0; + width:18px; + height:18px; +} +.mini-checkboxlist-item.mini-checkboxlist-item-selected .mini-list-icon, +.mini-checkboxlist-item.mini-checkboxlist-item-selected .mini-list-icon:hover +{ + background:url(images/checked.jpg) no-repeat 0 0; +} +.mini-checkboxlist-item .mini-list-icon +{ + background:url(images/check.jpg) no-repeat 0 0; + width:18px; + height:18px; + -webkit-transition: .1s linear; + transition: .1s linear; +} +.mini-checkboxlist-item .mini-list-icon:hover +{ + background:url(images/check-hover.jpg) no-repeat 0 0; +} +.mini-checkboxlist .mini-labelfield-label +{ + line-height:16px; +} +.mini-checkboxlist, +.mini-radiobuttonlist +{ + font-size:14px; + font-family: Helvetica Neue,Helvetica,PingFang SC,\5FAE\8F6F\96C5\9ED1,Tahoma,Arial,sans-serif; + margin-bottom:15px; +} +/* checkstyle2 */ +.checkstyle2 .mini-checkboxlist-item .mini-list-icon +{ + background:url(images/check2.jpg) no-repeat 0 0; + width:32px; + height:30px; + -webkit-transition: .1s linear; + transition: .1s linear; +} +.checkstyle2 .mini-checkboxlist-item:hover .mini-list-icon +{ + background:url(images/check2-hover.jpg) no-repeat 0 0; +} +.checkstyle2 .mini-checkboxlist-item.mini-checkboxlist-item-selected .mini-list-icon, +.checkstyle2 .mini-checkboxlist-item.mini-checkboxlist-item-selected .mini-list-icon:hover +{ + background:url(images/checked2.jpg) no-repeat 0 0; +} +.mini-checkboxlist .mini-labelfield-label +{ + /*line-height:30px;*/ +} +.checkstyle2 .mini-checkboxlist-item label +{ + float:left; + padding:0 10px; + line-height:32px; + background:#d2d2d2; + height:30px; + border-radius:2px 0 0 2px; + color:#fff; +} +.checkstyle2 .mini-checkboxlist-item:hover label +{ + background:#c2c2c2; +} +.checkstyle2 .mini-checkboxlist-item.mini-checkboxlist-item-selected label +{ + background:#5FB878; +} +/* radio */ +.mini-radiobuttonlist .mini-labelfield-label +{ + line-height:30px; +} +.mini-radiobuttonlist table label +{ + font-size:14px; + font-family: Helvetica Neue,Helvetica,PingFang SC,\5FAE\8F6F\96C5\9ED1,Tahoma,Arial,sans-serif; + line-height:30px; +} +.mini-radiobuttonlist-item .mini-list-icon +{ + background: url(images/radio.jpg) no-repeat 0 0; + width:20px;height:21px; +} +.mini-radiobuttonlist-item.mini-radiobuttonlist-item-selected .mini-list-icon, +.mini-radiobuttonlist-item.mini-radiobuttonlist-item-selected .mini-list-icon:hover +{ + background: url(images/radioed.jpg) no-repeat 0px 0px; +} +.mini-radiobuttonlist-item .mini-list-icon:hover +{ + background: url(images/radio-hover.jpg) no-repeat 0 0; +} +.mini-radiobuttonlist-item.mini-disabled .mini-list-icon:hover +{ + background: url(images/radio.jpg) no-repeat 0 0; +} +.mini-tree-radio +{ + width: 20px; + height: 21px; + background-repeat: no-repeat; + background-position: 0px 0px; + background-image: url(images/radio.jpg); +} +.mini-tree-selectedNode .mini-tree-radio, .mini-grid-row-selected .mini-tree-radio +{ + background-image: url(images/radioed.jpg)no-repeat 0px 0px; +} +/* base +==========================================*/ +.app-header +{ + background:#f8f8f8; +} +.app-toolbar, +.bg-toolbar +{ + background:#f8f8f8; +} +.mini-modal +{ + background:#ddd; + opacity: .6; + filter: alpha(opacity=60); +} +.mini-mask-background +{ + background:#f8f8f8; + opacity: 0; + filter: alpha(opacity=0); +} +.mini-popup, +.mini-window, +.mini-menu-open +{ + /*box-shadow:rgba(0,​ 0,​ 0,​ 0.6) 0px 6px 12px 0px;*/ + box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3); +} + + +/* popup +==========================================*/ +.mini-popup +{ + border-color:#ddd; + /* height:300px!important;*/ +} + +/* toolbar +==========================================*/ + +.mini-toolbar +{ + background:#fff; + border:0; +} +.separator +{ + border-color:#e1e1e1; + height:14px; + margin-left: 6px; + margin-right: 6px; +} +.toolbar .mini-button-menu { + background: url(images/default-toolbar-small-s-arrow.png) no-repeat 0px 50%; +} +.toolbar .mini-button-allow { + width: 18px; +} +/* refresh */ +.mini-button.refresh, +a:hover.mini-button.refresh, +.refresh.mini-button-checked,a.refresh:hover.mini-button-checked +{ + color: #b6b4b7; + background: transparent; + border:0; +} +/* textbox +==========================================*/ +.mini-textbox-border +{ + background:white; + border:1px solid #e6e6e6; + border-radius:2px; + outline: 0; + -webkit-appearance: none; + transition: all .3s; + -webkit-transition: all .3s; + box-sizing: border-box; +} +.mini-textbox-border:hover, +.mini-textbox-focus .mini-textbox-border +{ + background-color: #fff; + border-color: #D2D2D2; +} +body .mini-error .mini-textbox-border, +body .mini-error .mini-buttonedit-border, +body .mini-error .mini-textboxlist-border +{ + border-color: #ffa8a8; + background-color: #fff; +} +.mini-textbox-input +{ + color:#000; +} +.mini-labelfield-label +{ + text-align: right; + left: -15px; +} +.mini-required .mini-textbox-border, .mini-required .mini-buttonedit-border +{ + background-color: white; +} +body .mini-invalid .mini-textbox-border, body .mini-invalid .mini-buttonedit-border +{ + background-color: white; + border-color: #cf4c35; +} +/* buttonedit +==========================================*/ +.mini-buttonedit-border +{ + background:white; + border: 1px solid #e6e6e6; +} +.mini-buttonedit-focus .mini-buttonedit-border, +.mini-buttonedit-border:hover +{ + background-color: #fff; + border-color: #D2D2D2; +} +.mini-buttonedit-input +{ + color:#000; + font-family:Helvetica Neue,Helvetica,PingFang SC,\5FAE\8F6F\96C5\9ED1,Tahoma,Arial,sans-serif; + font-size:13.3333px; +} +.mini-buttonedit-button +{ + background:#fff; + border-color:#fff; + color: #444; +} +.mini-buttonedit-button-hover, +.mini-buttonedit-hover .mini-buttonedit-trigger +{ + color:#444; + background:#fff; + border-color:#fff; +} +.mini-buttonedit-button-pressed, +.mini-buttonedit-popup .mini-buttonedit-trigger +{ + color:#444; + background:#fff; + border-color:#fff; +} +.mini-buttonedit-button +{ + width:24px; + height: 34px; +} + +.mini-popupedit .mini-buttonedit-trigger .mini-buttonedit-icon +{ + background:url(images/combo/combo-arrow.jpg) no-repeat 1px 4px; +} +.mini-datepicker .mini-buttonedit-trigger .mini-buttonedit-icon +{ + background:url(images/date-trigger.png) no-repeat -69px 0px; +} +.mini-datepicker .mini-buttonedit-trigger.mini-buttonedit-button-hover .mini-buttonedit-icon +{ + background:url(images/date-trigger.png) no-repeat -69px 0px; +} +.mini-buttonedit-up span +{ + background:url(images/spinner.png) no-repeat 50% -1px; +} +.mini-buttonedit-down span +{ + background:url(images/spinner.png) no-repeat 50% -12px; +} + + +/* textboxlist +==========================================*/ +.mini-textboxlist-border +{ + border-color: #ddd; +} +.mini-textboxlist-focus .mini-textboxlist-border +{ + background-color: #f1f8fd; + border-color: #6ea6cc; +} +.mini-textboxlist-item +{ + color:#444; +} + +/* htmlfile +==========================================*/ +.mini-htmlfile .mini-buttonedit-button +{ + color:#fff; + background: #03c497; + border-color: #03c497; +} + + + + +/* outlookbar +==========================================*/ +.mini-outlookbar-border +{ + border-color:#fff; + padding:1px 5px 5px 5px; + background:#fff; + border:0; +} +.mini-outlookbar .mini-outlookbar-groupHeader +{ + border-color:#fff; + background:#dfeaf2; + color:#666; + border-top:4px solid #fff; +} +.mini-outlookbar .mini-outlookbar-hover +{ + background:#e6f1f9; + color:#666; +} +.mini-outlookbar-expand .mini-outlookbar-groupHeader +{ + background:#dfeaf2; + color:#666; +} + +.mini-outlookbar .mini-outlookbar-group +{ + border-color:#fff; +} +.mini-outlookbar .mini-outlookbar-groupBody +{ + border-color:#e5e5e5; +} +.mini-outlookbar-view2 .mini-outlookbar-groupHeader +{ + border-color:#ddd; +} +.mini-outlookbar-view2 .mini-outlookbar-groupBody +{ + background:#f8f8f8; +} +.mini-outlookbar-view3 .mini-outlookbar-group +{ + border-color:#ddd; +} +.mini-outlookbar .mini-outlookbar-expand .mini-tools .mini-tools-collapse +{ + background:url(images/tool-sprites-dark.png) no-repeat 0 -272px; +} +.mini-outlookbar .mini-tools .mini-tools-collapse +{ + background:url(images/tool-sprites-dark.png) no-repeat 0 -256px; +} + + +.mini-menu .mini-menuitem-showcheck .mini-menuitem-icon +{ + background: url(images/checkbox.png) no-repeat 0px 0px; +} +.mini-menu .mini-menuitem-checked .mini-menuitem-icon +{ + background: url(images/checkbox.png) no-repeat 0px -16px; +} + + +/* splitter +==========================================*/ +.mini-splitter-border +{ + border-color: #ddd; +} +.mini-splitter .mini-splitter-pane1{ + border-color:#ddd; +} +.mini-splitter .mini-splitter-pane2{ + border-color:#ddd; +} + +/* layout +==========================================*/ +.mini-layout-region-header +{ + border:0; + background: rgb(21, 127, 204); + height:36px; +} +.mini-layout-border +{ + border:1px solid rgb(21, 127, 204)!important; +} +.mini-layout-region +{ + border:0; +} +.mini-layout-split +{ + background-color: #3892d3; +} +.mini-layout-proxy +{ + padding:10px 7px; + background-image: none; + background-color: #157fcc; + color: white; + font-size: 14px; + font-weight: bold; + font-family: arial,helvetica,verdana,sans-serif; + border:0; +} +.mini-layout-region-title +{ + color:#fff; + font-size: 14px; + font-weight: bold; + font-family: arial, helvetica, verdana, sans-serif; + line-height: 34px; +} +.mini-layout-spliticon { + width: 8px; + height: 48px; + background: url(images/mini-left.png) no-repeat 50% 50%; +} +.mini-layout-proxy.mini-layout-proxy-west .mini-tools .mini-tools-collapse +{ + background: url(images/tool-sprites.png) no-repeat 0px -176px; +} +.mini-layout-proxy.mini-layout-proxy-west .mini-tools +{ + right:11px;top:11px; +} +.mini-layout-proxy-text +{ + top:24px;left:2px; +} +.mini-layout-region-west .mini-layout-region-header .mini-tools-collapse +{ + background: url(images/tool-sprites.png) no-repeat 0px -192px; +} +.mini-layout-region.mini-layout-region-west .mini-tools +{ + top:8px; +} +.mini-layout-split-west .mini-layout-spliticon-collapse +{ + background: url(images/mini-right.png) no-repeat 50% 50%; +} + +.mini-layout-region-east .mini-layout-region-header .mini-tools-collapse +{ + + background: url(images/tool-sprites.png) no-repeat 0px -176px; +} +.mini-layout-proxy.mini-layout-proxy-east .mini-tools .mini-tools-collapse +{ + background: url(images/tool-sprites.png) no-repeat 0px -192px; +} +.mini-layout .mini-menuitem +{ + background:url(images/layoutline.png) no-repeat 13px 50%; +} +.mini-layout .mini-menuitem.mini-menuitem-selected +{ + background:url(images/layoutline2.png) no-repeat 12px 50%; +} +.mini-layout-region-west +{ + border-right:0; +} +.mini-layout-split-east .mini-layout-spliticon +{ + background: url(images/mini-right.png) no-repeat 50% 50%; +} +.mini-layout-split-east .mini-layout-spliticon-collapse +{ + background: url(images/mini-left.png) no-repeat 50% 50%; +} + +.mini-layout-split-north .mini-layout-spliticon +{ + width: 48px; + height: 8px; + background: url(images/mini-top.png) no-repeat 50% 50%; +} +.mini-layout-split-north .mini-layout-spliticon-collapse +{ + width: 48px; + height: 8px; + background: url(images/mini-bottom.png) no-repeat 50% 50%; +} +.mini-layout-split-south .mini-layout-spliticon +{ + width: 48px; + height: 8px; + background: url(images/mini-bottom.png) no-repeat 50% 50%; +} +.mini-layout-split-south .mini-layout-spliticon-collapse +{ + + background: url(images/mini-top.png) no-repeat 50% 50%; +} +.mini-layout-region.mini-layout-region-east .mini-tools +{ + top:9px; +} +.mini-layout-region-header .mini-tools, .mini-layout-proxy .mini-tools { + right: 10px; +} +.mini-tools +{ + top: 9px; +} +.mini-layout-region-south .mini-layout-region-header .mini-tools-collapse +{ + background: url(images/tool-sprites.png) no-repeat 50% -208px; +} +.mini-layout-region-north .mini-layout-region-header .mini-tools-collapse +{ + background: url(images/tool-sprites.png) no-repeat 50% -208px; +} +/* pager +==========================================*/ +.mini-pager +{ + background:#fbfbfb; + border-color:#ddd; + color:#444; + height:35px; + line-height:35px; + padding: 0px 8px 3px 4px; +} +.mini-pager .mini-buttonedit +{ + height: 32px; +} + +.mini-pager .mini-buttonedit-input +{ + height: 32px; + line-height: 32px; +} +.mini-pager .mini-buttonedit-button +{ + height: 28px; + width:18px; +} +.mini-pager .mini-buttonedit-border +{ + height:30px; + padding-left:5px; +} +.mini-pager .mini-button +{ + color:#444; +} +.mini-pager .mini-button-text +{ + line-height: 32px; +} + +.mini-pager .mini-button .mini-button-icon-only .mini-button-icon +{ + top: 50%; +} +body .mini-pager .mini-button-plain +{ + border:1px solid transparent; + padding:0; +} +body .mini-pager a:hover.mini-button +{ + background: transparent; + border-color: transparent; + opacity: 0.8; + filter:alpha(opacity=80); + color: white; +} +body .mini-pager .mini-button-pressed, body .mini-pager a:hover.mini-button-pressed, +body .mini-pager .mini-button-checked, body .mini-pager a:hover.mini-button-checked, +body .mini-pager a.mini-button-popup, body .mini-pager a:hover.mini-button-popup +{ + background: transparent; + border-color: #ddd; + opacity: 1; + filter:alpha(opacity=100); + color:#fff; +} +/*.mini-pager-reload +{ + background: url(images/pager/refresh.png) no-repeat 0px 0px; +} +.mini-pager-first +{ + background: url(images/pager/page-first.png) no-repeat 0px 0px; + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=70); +} +.mini-pager-prev +{ + background: url(images/pager/page-prev.png) no-repeat 0px 0px; +} +.mini-pager-next +{ + background: url(images/pager/page-next.png) no-repeat 0px 0px; +} +.mini-pager-last +{ + background: url(images/pager/page-last.png) no-repeat 0px 0px; +} +body .mini-pager a:hover.mini-button +{ + background: #e1e1e1; + border-color: #e1e1e1; + padding:0; +} +body .mini-pager .mini-button-pressed, body .mini-pager a:hover.mini-button-pressed, +body .mini-pager .mini-button-checked, body .mini-pager a:hover.mini-button-checked, +body .mini-pager a.mini-button-popup, body .mini-pager a:hover.mini-button-popup +{ + background: #e1e1e1; + border-color: #e1e1e1; +} +body .mini-pager a.mini-button-disabled, body .mini-pager a:hover.mini-button-disabled +{ + + color:#444; + opacity: 0.5; + filter: alpha(opacity=50); + padding:0; +} +*/ + +/* tree +==========================================*/ +.mini-tree-node-hover .mini-tree-nodetitle, +.mini-tree-node-hover .mini-tree-nodeshow +{ + background:#e2eff8; + border-color:#e2eff8; +} +.mini-tree-selectedNode .mini-tree-nodetitle, +.mini-tree-selectedNode .mini-tree-nodeshow +{ + background:#c1ddf1; + border-color:#c1ddf1; +} +.mini-tree-treeLine .mini-tree-collapse .mini-tree-node-ecicon-first, +.mini-tree-treeLine .mini-tree-collapse .mini-tree-node-ecicon +{ + background: transparent url(images/elbow-plus.png) no-repeat 0px 0px; +} +.mini-tree-treeLine .mini-tree-expand .mini-tree-node-ecicon-first, +.mini-tree-treeLine .mini-tree-expand .mini-tree-node-ecicon +{ + background: transparent url(images/elbow-minus.png) no-repeat 0px 0px; +} +.mini-tree-collapse .mini-tree-node-ecicon +{ + background: transparent url(images/elbow-plus-noline.png) no-repeat 50% 50%; +} +.mini-tree-expand .mini-tree-node-ecicon +{ + background: transparent url(images/elbow-minus-noline.png) no-repeat 50% 50%; +} +.mini-tree-leaf +{ + background-image:url(images/leaf.png); +} +.mini-tree-folder +{ + background-image:url(images/folder.png); +} +.mini-tree-expand .mini-tree-folder +{ + background-image:url(images/folder-open.png); +} +.mini-tree-checkbox { + width: 15px; + height: 15px; + background: url(images/checkbox.png) no-repeat 0 0; + cursor: pointer; + margin-left: 2px; + margin-right: 1px; +} +.mini-tree-checkbox-checked +{ + background-position: 0 -15px; +} + + +/* tree arrow */ +.arrow .mini-tree-treeLine .mini-tree-collapse .mini-tree-node-ecicon-first, +.arrow .mini-tree-treeLine .mini-tree-collapse .mini-tree-node-ecicon, +.arrow .mini-tree-collapse .mini-tree-node-ecicon +{ + background: transparent url(images/arrows.png) no-repeat 0px 50%; +} +.arrow .mini-tree-treeLine .mini-tree-expand .mini-tree-node-ecicon-first, +.arrow .mini-tree-treeLine .mini-tree-expand .mini-tree-node-ecicon, +.arrow .mini-tree-expand .mini-tree-node-ecicon +{ + background: transparent url(images/arrows.png) no-repeat -16px 50%; +} +/* treegrid */ +.mini-treegrid.mini-tree .mini-grid-viewport +{ + background: #fff; +} + +/* listbox +==========================================*/ +.mini-listbox-border +{ + border-color:#ddd; +} +.mini-listbox-header +{ + background:#f8f8f8; + border-color:#ddd; +} +.mini-listbox-header td +{ + border-color:#ddd; +} +.mini-listbox-item td{ + border-color:#ddd; + color:#444; +} +.mini-listbox-item-hover td +{ + background:#f2f2f2; +} +.mini-listbox-item-selected td +{ + background:#5FB878; + color:#fff; +} +.mini-listbox td +{ + line-height:30px; + font-size:14px; + padding-left:10px; + font-family:Helvetica Neue,Helvetica,PingFang SC,\5FAE\8F6F\96C5\9ED1,Tahoma,Arial,sans-serif; + +} +.mini-listbox-item:first-child td +{ + color:#999; +} + +/* tabs +==========================================*/ +.mini-tabs-header tbody tr td +{ + margin:1px; +} +.mini-tabs-scrollCt +{ + border:0; + background:#fff; +} +body .mini-tabs-plain .mini-tabs-scrollCt +{ + background: transparent; +} +.mini-tabs-leftButton, +.mini-tabs-rightButton, +.mini-tabs-tabmenu +{ + border-color:transparent; + background-color:#f8f8f8; +} +a:hover.mini-tabs-leftButton, +a:hover.mini-tabs-rightButton, +a:hover.mini-tabs-tabmenu +{ + border-color:transparent; + background-color:#fff; +} +.mini-tabs-position-top .mini-tabs-header +{ + margin-top: 0px; +} +.mini-tabs-nav +{ + top:13px; +} +/* top */ +.mini-tabs-bodys +{ + border-color:#fff; + top: 1px; + +} +.mini-tabs-space +{ + border:0; + border-bottom:solid 1px #e2e2e2; + width:0; +} +.mini-tabs-space div +{ + width: 0px; +} +.mini-tabs-space2 div +{ + width:1px; +} +.mini-tabs-space2 +{ + border-color:#4b9cd7; + border-bottom: solid 1px #e2e2e2; +} +.mini-tab +{ + padding: 9px 14px 9px 14px; + font:14px Helvetica Neue,Helvetica,PingFang SC,\5FAE\8F6F\96C5\9ED1,Tahoma,Arial,sans-serif; + background: #fff; + border-color:#fff; + color: #000; + border-radius:3px 3px 0 0; + transition: all .2s; + -webkit-transition: all .2s; + border-bottom-color:#e2e2e2; +} +.mini-tab-text +{ + font-family: Helvetica Neue,Helvetica,PingFang SC,\5FAE\8F6F\96C5\9ED1,Tahoma,Arial,sans-serif; +} +.mini-tab-hover +{ + background:#fff; +} +.mini-tab-active +{ + border-color:#e2e2e2; + background:#fff; + color:#000; + border-bottom-color:#fff; +} +.mini-tab.mini-disabled +{ + background:#4b9cd7; + opacity: .5; + cursor: default; +} +.mini-tab-close-hover +{ + background-color:transparent; +} +.mini-tab-active .mini-tab-icon +{ + color:#157fcc; + +} +.mini-tab .mini-tab-icon +{ + opacity: .5; + font-size: 16px; + margin-right: 5px; +} +.mini-tab-close +{ + background: url(images/tabs/tabclose.jpg) no-repeat 5px 5px; + margin-left: 6px; + width:18px; + height:18px; +} +.mini-tab-close:hover +{ + background: url(images/tabs/tabclose-hover.jpg) no-repeat 0px 0px; + width:18px; + height:18px; +} + + +/* bottom */ +.mini-tabs-header-bottom .mini-tabs-space, +.mini-tabs-header-bottom .mini-tabs-space2 +{ + border-color:#ddd; +} +.mini-tabs-header-bottom .mini-tabs-bodys +{ + border-color:#ddd; +} +.mini-tabs-header-bottom .mini-tab-active +{ + border-top-color:white; + border-bottom-color:#ddd; +} +.mini-tabs-body-bottom +{ + border-color:#ddd; +} +/* left */ +.mini-tabs-header-left .mini-tabs-space, +.mini-tabs-header-left .mini-tabs-space2 +{ + border-color:#ddd; +} +.mini-tabs-header-left .mini-tabs-bodys +{ + border-color:#ddd; +} +.mini-tabs-header-left .mini-tab-active +{ + border-color:#ddd; + border-right-color:white; +} +.mini-tabs-body-left +{ + border-color:#ddd; +} +/* right */ +.mini-tabs-header-right .mini-tabs-space, +.mini-tabs-header-right .mini-tabs-space2 +{ + border-color:#ddd; +} +.mini-tabs-header-right .mini-tabs-bodys +{ + border-color:#ddd; +} +.mini-tabs-header-right .mini-tab-active +{ + border-color:#ddd; + border-left-color:white; +} +.mini-tabs-body-right +{ + border-color:#ddd; +} +/*bordered*/ +.mini-tabs-header-top .mini-tab-active +{ + border-radius:3px 3px 0 0; +} +.mini-tabs-header-bottom .mini-tab-active +{ + border-bottom:solid 3px #4c8fbd; + padding-bottom:1px; +} +.mini-tabs-header-left .mini-tab-active +{ + border-right:solid 3px #4c8fbd; + padding-left:10px; +} +.mini-tabs-header-right .mini-tab-active +{ + border-left:solid 3px #4c8fbd; + padding-right:10px; +} +/* tab big */ +.big .mini-tab +{ + padding: 10px 30px 10px 30px; +} +.brief.big .mini-tab-active +{ + padding-bottom:9px; +} +.brief.big .mini-tabs-header +{ + margin-top: 4px; +} +/* tab brief */ +.brief .mini-tab-active +{ + color:#009688; + border-color:#fff; + border-bottom:2px solid #009688; + padding-bottom:8px; +} +/* tab card */ +.card .mini-tabs-bodys +{ + border: 1px solid #e2e2e2; + border-top:0; + border-radius: 2px; + box-shadow: 0 2px 5px 0 rgba(0,0,0,.1); +} +.card .mini-tab, +.card .mini-tabs-header +{ + background: #f2f2f2; +} +.card .mini-tabs-header +{ + border:1px solid #e2e2e2; + border-bottom:0; +} +.card .mini-tab +{ + border-color:#f2f2f2; +} +.card .mini-tabs-space2 +{ + display:none; +} +.card .mini-tab-active +{ + background:#fff; + border-color: #e2e2e2; + border-bottom-color:#fff; +} +.mini-tabs-leftnav +{ + top:14px; +} +/* tooltip +==========================================*/ +.mini-tooltip-inner { + border-color:#ddd; + border-radius: 0px; +} + +/* calendar +==========================================*/ +.mini-calendar +{ + border-color: #e1e1e1; + background-color: white; +} +.mini-calendar-header +{ + background-image: none; + background-color: #f5f5f5; + border-color:#ddd; + height:30px; +} +.mini-calendar-footer +{ + border-color:#ddd; + background:#f1f5f9; +} +.mini-calendar-tadayButton, .mini-calendar-clearButton, +.mini-calendar-okButton, .mini-calendar-cancelButton +{ + background: #3892d3; + border-color: #126daf; + color: #fff; + font-size: 14px; + font-family: helvetica,arial,verdana,sans-serif; + font-weight:bold; + border-radius:3px; + margin-top:5px; +} +.mini-calendar-tadayButton:hover, .mini-calendar-clearButton:hover, +.mini-calendar-okButton:hover, .mini-calendar-cancelButton:hover +{ + background: #3386c2; + border-color: #157fcc; +} +.mini-calendar .mini-calendar-today +{ + border-color:#3892d3; +} +.mini-calendar-daysheader td +{ + border-color:#ddd; +} +.mini-calendar-menu +{ + border-color:#ddd; +} +.mini-calendar-title, +.mini-calendar-menu-year, +.mini-calendar-menu-month +{ + font-size: 12px; + font-weight: bold; + font-family: helvetica,arial,verdana,sans-serif; + color: #3892d3; + line-height: 22px; +} +.mini-calendar-title +{ + line-height: 30px; +} +.mini-calendar .mini-calendar-selected, +.mini-calendar-menu-selected, +a:hover.mini-calendar-menu-month, +a:hover.mini-calendar-menu-year +{ + color: #fff; + background-color: #3892d3; + border-color: #3892d3; +} +.mini-calendar .mini-calendar-selected +{ + font-weight:bold; +} +.mini-calendar .mini-calendar-othermonth +{ + color: #bfbfbf; +} +.mini-calendar .mini-calendar-weekend +{ + color: black; +} +.mini-calendar-days td +{ + font: normal 14px helvetica,arial,verdana,sans-serif; +} +.mini-calendar-yearPrev +{ + background: url(images/arrow-dbleft.png) no-repeat 50% 3px; + width:18px; + height:18px; +} +.mini-calendar-monthPrev +{ + background: url(images/arrow-left.png) no-repeat 50% 3px; + width:18px; + height:18px; +} +.mini-calendar-monthNext +{ + background: url(images/arrow-right.png) no-repeat 50% 3px; + width: 18px; + height: 18px; +} +.mini-calendar-yearNext +{ + background: url(images/arrow-dbright.png) no-repeat 50% 3px; + width: 18px; + height: 18px; +} +/* progressbar +==========================================*/ +.mini-progressbar +{ + height:6px; + border-radius: 20px; + background-color: #e2e2e2; +} +.mini-progressbar-border +{ + border-color:transparent; + height:6px; + border-radius: 20px; +} +.mini-progressbar-bar +{ + background:#5FB878; + border-radius: 20px; + height:6px; + top: -1px; + left: -1px; +} +.mini-progressbar-text +{ + color:#222; + top:-18px; +} +/* progress big */ +.mini-progressbar.big, +.mini-progressbar.big .mini-progressbar-border, +.mini-progressbar.big .mini-progressbar-bar +{ + height:18px; +} +.mini-progressbar.big .mini-progressbar-text +{ + top:-3px; +} + +.mini-progressbar.red .mini-progressbar-bar +{ + background:#FF5722; +} +.mini-progressbar.orange .mini-progressbar-bar +{ + background:#FFB800; +} +.mini-progressbar.green .mini-progressbar-bar +{ + background:#009688; +} +.mini-progressbar.blue .mini-progressbar-bar +{ + background:#1E9FFF; +} +.mini-progressbar.cyan .mini-progressbar-bar +{ + background:#2F4056; +} + +/* fieldset */ +.mini-fieldset +{ + margin-bottom: 10px; + padding: 0; + border: 1px solid #e2e2e2; + margin-bottom: 30px; + margin-top: 30px; +} +.mini-fieldset.title +{ + margin: 10px 0 20px; + border: none; + border-top: 1px solid #e2e2e2; +} +.mini-fieldset legend +{ + margin-left: 20px; + padding: 0 10px; + font-size: 20px; + font-weight: 300; +} + + +/* button */ +.mini-button-text +{ + line-height:36px; +} +.mini-button-text +{ + padding:0 19px; +} +.mini-button .mini-button-icon-only .mini-button-icon +{ + left: 0px; + width: 100%; + top:60%; +} +.mini-button.big .mini-button-icon-only .mini-button-icon +{ + font-size:18px; +} +.mini-button.radius{border-radius: 100px;} + + + +.big{line-height: 42px;} +.big .mini-button-text, +body a:hover.mini-button.big .mini-button-text +{ + padding:0 25px; + font-size: 16px; +} + +.mini-button.big .mini-button-icon-only, +body a:hover.mini-button.big .mini-button-icon-only +{ + padding:0 25px; +} + +.small{line-height: 28px;} +.small .mini-button-text, +body a:hover.mini-button.small .mini-button-text +{ + padding:0 10px; + font-size: 12px; +} +.mini-button.small .mini-button-icon-only, +body a:hover.mini-button.small .mini-button-icon-only +{ + padding:0 14px; +} +.mini{line-height: 20px;} +.mini .mini-button-text, +body a:hover.mini-button.mini .mini-button-text +{ + padding:0 5px; + font-size: 12px; +} + +.mini-button.small .mini-button-icon-text, +body a:hover.mini-button.small .mini-button-icon-text, +.mini-button.mini .mini-button-icon-text, +body a:hover.mini-button.mini .mini-button-icon-text +{ + padding-left:25px; +} +.small .mini-button-icon, +.mini .mini-button-icon +{ + top:60%; +} +.site-demo-button div +{ + margin: 20px 30px 10px; +} +.site-demo-button .mini-button +{ + margin: 0 7px 10px 0; +} +/* btn-group */ +.group +{ + display: inline-block; + vertical-align: middle; + font-size: 0; +} +.group .mini-button +{ + margin-right:0; + margin-left:0; + border-left:1px solid rgba(255,255,255,.5); + border-radius:0; +} +.group .primary +{ + border-left:none; +} +.group .primary:hover +{ + border-color:#c9c9c9; + color:#009688; +} +body .group a:hover.mini-button.primary +{ + border-color:#c9c9c9; + color:#009688; + border-left:none; +} +.group .mini-button:first-child +{ + border-radius: 2px 0 0 2px; + border-left:none; +} +.group .primary:first-child, + body .group a:first-child.mini-button.primary +{ + border-left:1px solid #c9c9c9; +} +.group .mini-button:last-child +{ + border-radius:0px 2px 2px 0px; +} +/* textbox */ +.mini-form .mini-textbox +{ + margin-bottom:15px; +} +.mini-textbox +{ + height:38px; +} +.mini-labelfield-label +{ + line-height:36px; +} +.mini-textbox-border +{ + padding-left: 10px; + height: 36px; +} +.mini-textbox-input +{ + height: 36px; + line-height: 34px; + font-size:13.3333px; + font-family:Helvetica Neue,Helvetica,PingFang SC,\5FAE\8F6F\96C5\9ED1,Tahoma,Arial,sans-serif; +} +/* buttonedit */ +.mini-form .mini-buttonedit +{ + margin-bottom:15px; +} +.mini-buttonedit +{ + height:38px; +} +.mini-buttonedit-border +{ + height:36px; + padding-left:10px; +} +.mini-buttonedit-input +{ + height: 36px; + line-height: 36px; +} +/* miniui-elem-quote */ +.miniui-elem-quote +{ + margin-bottom: 10px; + padding: 15px; + line-height: 22px; + border-left: 5px solid #009688; + border-radius: 0 2px 2px 0; + background-color: #f2f2f2; +} + + + diff --git a/hsweb-ui/plugins/miniui/themes/worry/skin.css b/hsweb-ui/plugins/miniui/themes/worry/skin.css index 09fc0be..4524953 100644 --- a/hsweb-ui/plugins/miniui/themes/worry/skin.css +++ b/hsweb-ui/plugins/miniui/themes/worry/skin.css @@ -102,10 +102,9 @@ body .mini-button-plain { color: rgba(0,0,0,.65); padding:0; } - .mini-button-text { - padding: 4px 12px 4px 12px; font-size: 13px; + display: inline-block; } body a:hover.mini-button { @@ -1349,13 +1348,15 @@ body .mini-tabs-plain .mini-tabs-headers { font-size: 12px; } -.mini-tab-close-hover { +.mini-tab-close-hover, +.mini-tab-close:hover{ color: rgba(0,0,0,0.85); background: none; + margin-top:0; } .mini-tab-close:before { - /*content: "\E633";*/ + display: inline-block; content: "\f00d"; } diff --git a/hsweb-ui/plugins/miniui/tools.js b/hsweb-ui/plugins/miniui/tools.js index 560b20c..b7fec9e 100644 --- a/hsweb-ui/plugins/miniui/tools.js +++ b/hsweb-ui/plugins/miniui/tools.js @@ -299,7 +299,8 @@ define(function () { grid.setAjaxOptions({ type: "GET", async: true, - dataType: "json" + dataType: "json", + cache:true }); grid.un("loaderror", function (e) { }); @@ -317,16 +318,16 @@ define(function () { require(["message", "logger"], function (message, logger) { try { var res = mini.decode(xhr.responseText);//#115 - if (res.status == 401) { + if (res.status === 401) { if (window.doLogin) { window.doLogin(function () { grid.reload() - }); + },res); } else if (window.top.doLogin) { window.top.doLogin(function () { grid.reload() - }); + },res); } else { message.showTips("请登录", "danger"); } diff --git a/hsweb-ui/plugins/tools/request.js b/hsweb-ui/plugins/tools/request.js index 4effa19..0581ca9 100644 --- a/hsweb-ui/plugins/tools/request.js +++ b/hsweb-ui/plugins/tools/request.js @@ -1,14 +1,43 @@ -define(["jquery"], function ($) { +define(["jquery", "storejs"], function ($, storejs) { //fix #113 ie8不能使用patch方法的bug - if (window.ActiveXObject) { - $.ajaxPrefilter(function (options) { + + $.ajaxPrefilter(function (options) { + if (window.router) { + var url = options.url; + if (url.indexOf(window.API_BASE_PATH) === -1) { + return; + } + var uri = url.substr(window.API_BASE_PATH.length, url.length); + for (var i = 0; i < window.router.length; i++) { + var route = window.router[i]; + if (typeof route.test === 'string') { + if (new RegExp(route.test).test(uri)) { + if (route.prefix) { + uri = route.prefix + uri; + } + break; + } + } + } + options.url = window.API_BASE_PATH + uri; + } + if (window.ActiveXObject) { if (/^patch$/i.test(options.type)) { options.xhr = function () { return new window.ActiveXObject("Microsoft.XMLHTTP"); }; } - }); - } + } + }); + + $.ajaxSetup({ //设置全局性的Ajax选项 + beforeSend: function (r) { + var token = storejs.get("hsweb-user"); + if (token) { + r.setRequestHeader("hsweb-user", token); + } + }, cache: true + }); function doAjax(url, data, method, callback, syc, requestBody, contentType) { var data_tmp = data; @@ -21,12 +50,22 @@ define(["jquery"], function ($) { type: method, url: url, data: data, - cache: false, + cache: true, async: syc === true, - success: callback, + success: function () { + var xhr = arguments[2]; + var requestId = xhr.getResponseHeader("request-id"); + if (callback) { + arguments[0].requestId = requestId; + callback(arguments[0]); + } + }, error: function (e) { + + var requestId = e.getResponseHeader("request-id"); + if (e.status === 200) { - msg = {status: 200, result: e.statusText, success: true}; + msg = {status: 200, result: e.statusText, success: true, requestId: requestId}; return msg; } var msg = {}; @@ -35,22 +74,25 @@ define(["jquery"], function ($) { } else { msg = {status: e.status, message: e.statusText ? e.statusText : "未知错误", success: false}; } + msg.requestId = requestId; if (msg.status === 401) { if (window.doLogin) { window.doLogin(function () { doAjax(url, data_tmp, method, callback, syc, requestBody); - }); + }, msg); } else if (window.top.doLogin) { window.top.doLogin(function () { doAjax(url, data_tmp, method, callback, syc, requestBody); - }); + }, msg); } else { - if (callback) + if (callback) { callback(msg); + } } } else { - if (callback) + if (callback) { callback(msg); + } } }, dataType: 'json' @@ -77,6 +119,22 @@ define(["jquery"], function ($) { me.terms = []; me.sorts = []; me.nowType = "and"; + function buildSort(sorts) { + var tmp = {}; + $(sorts).each(function (i, e) { + for (var f in e) { + if (f !== 'sorts') + tmp["sorts[" + i + "]." + f] = e[f]; + else { + var tmpTerms = buildSort(e[f]); + for (var f2 in tmpTerms) { + tmp["sorts[" + i + "]." + f2] = tmpTerms[f2]; + } + } + } + }); + return tmp + } function bindOperate(operate) { function accept(k, t, v) { @@ -85,7 +143,7 @@ define(["jquery"], function ($) { } var mapping = [ - "gt", "gte", "lt", "lte", "like", "nlike", "in", "is", "eq" + "gt", "gte", "lt", "lte", "like", "nlike", "in", "is", "eq", "not" ]; $(mapping).each(function () { var type = this + ""; @@ -115,9 +173,13 @@ define(["jquery"], function ($) { bindOperate(me); me.getParams = function () { var tmp = me.buildParam(me.terms); + var sorts = buildSort(me.sorts); for (var f in tmp) { me.param[f] = tmp[f]; } + for (var f in sorts) { + me.param[f] = sorts[f]; + } return me.param; }; me.includes = function (columns) { @@ -135,7 +197,7 @@ define(["jquery"], function ($) { me.and = function (k, v, t) { me.nowType = "and"; if (k && v) - me.terms.push({column: k, termType: t ? "eq" : t, type: me.nowType, value: v}); + me.terms.push({column: k, termType: t, type: me.nowType, value: v}); return me; }; me.orNest = function () { @@ -153,13 +215,13 @@ define(["jquery"], function ($) { fun.and = function (k, v, t) { fun.nowType = "and"; if (k && v) - fun.terms.push({column: k, termType: t ? "eq" : t, value: v, type: 'and'}); + fun.terms.push({column: k, termType: t, value: v, type: 'and'}); return fun; }; fun.or = function (k, v, t) { fun.nowType = "or"; if (k && v) - nest.terms.push({column: k, termType: t ? "eq" : t, value: v, type: 'or'}); + nest.terms.push({column: k, termType: t, value: v, type: 'or'}); return fun; }; fun.exec = me.exec; @@ -177,7 +239,7 @@ define(["jquery"], function ($) { me.or = function (k, v, t) { me.nowType = "or"; if (k && v) - me.terms.push({column: k, termType: t ? "eq" : t, value: v, type: me.nowType}); + me.terms.push({column: k, termType: t, value: v, type: me.nowType}); return me; }; @@ -222,9 +284,9 @@ define(["jquery"], function ($) { var index = 0; for (var f in data) { if (data[f] === "") continue; - if (f.indexOf('$LIKE') != -1 && data[f].indexOf('%') == -1) data[f] = "%" + data[f] + "%"; - if (f.indexOf('$START') != -1) data[f] = "%" + data[f]; - if (f.indexOf('$END') != -1) data[f] = data[f] + "%"; + if (f.indexOf('$LIKE') !== -1 && data[f].indexOf('%') === -1) data[f] = "%" + data[f] + "%"; + if (f.indexOf('$START') !== -1) data[f] = "%" + data[f]; + if (f.indexOf('$END') !== -1) data[f] = data[f] + "%"; queryParam["terms[" + (index) + "].column"] = f; queryParam["terms[" + (index) + "].value"] = data[f]; index++; @@ -249,7 +311,10 @@ define(["jquery"], function ($) { return me; }; me.exec = function (callback) { - return doAjax(getRequestUrl(api), {data: me.data, terms: me.terms}, "PUT", callback, typeof(callback) !== 'undefined', true); + return doAjax(getRequestUrl(api), { + data: me.data, + terms: me.terms + }, "PUT", callback, typeof(callback) !== 'undefined', true); }; return me; }, @@ -278,22 +343,6 @@ define(["jquery"], function ($) { return me; }; - function buildSort(sorts) { - var tmp = {}; - $(sorts).each(function (i, e) { - for (var f in e) { - if (f !== 'sorts') - tmp["sorts[" + i + "]." + f] = e[f]; - else { - var tmpTerms = buildSort(e[f]); - for (var f2 in tmpTerms) { - tmp["sorts[" + i + "]." + f2] = tmpTerms[f2]; - } - } - } - }); - return tmp - } me.orderByAsc = function (f) { me.sorts.push({"name": f, "order": "asc"}); @@ -311,15 +360,8 @@ define(["jquery"], function ($) { return me; }; me.exec = function (callback) { - var tmp = me.buildParam(me.terms); - var sorts = buildSort(me.sorts); - for (var f in tmp) { - me.param[f] = tmp[f]; - } - for (var f in sorts) { - me.param[f] = sorts[f]; - } - return doAjax(getRequestUrl(api), me.param, "GET", callback, typeof(callback) !== 'undefined', false); + + return doAjax(getRequestUrl(api), me.getParams(), "GET", callback, typeof(callback) !== 'undefined', false); }; return me; } diff --git a/hsweb-ui/workflow/diagram-viewer/images/bg.png b/hsweb-ui/workflow/diagram-viewer/images/bg.png new file mode 100644 index 0000000..42c4a82 Binary files /dev/null and b/hsweb-ui/workflow/diagram-viewer/images/bg.png differ diff --git a/hsweb-ui/workflow/diagram-viewer/images/breadcrumbs.png b/hsweb-ui/workflow/diagram-viewer/images/breadcrumbs.png new file mode 100644 index 0000000..f70c2d4 Binary files /dev/null and b/hsweb-ui/workflow/diagram-viewer/images/breadcrumbs.png differ diff --git a/hsweb-ui/workflow/diagram-viewer/images/checker-bg.png b/hsweb-ui/workflow/diagram-viewer/images/checker-bg.png new file mode 100644 index 0000000..a23232d Binary files /dev/null and b/hsweb-ui/workflow/diagram-viewer/images/checker-bg.png differ diff --git a/hsweb-ui/workflow/diagram-viewer/images/deployer/blue/message_catch.png b/hsweb-ui/workflow/diagram-viewer/images/deployer/blue/message_catch.png new file mode 100644 index 0000000..a07404c Binary files /dev/null and b/hsweb-ui/workflow/diagram-viewer/images/deployer/blue/message_catch.png differ diff --git a/hsweb-ui/workflow/diagram-viewer/images/deployer/business_rule.png b/hsweb-ui/workflow/diagram-viewer/images/deployer/business_rule.png new file mode 100644 index 0000000..3d1b593 Binary files /dev/null and b/hsweb-ui/workflow/diagram-viewer/images/deployer/business_rule.png differ diff --git a/hsweb-ui/workflow/diagram-viewer/images/deployer/error_catch.png b/hsweb-ui/workflow/diagram-viewer/images/deployer/error_catch.png new file mode 100644 index 0000000..0a33f08 Binary files /dev/null and b/hsweb-ui/workflow/diagram-viewer/images/deployer/error_catch.png differ diff --git a/hsweb-ui/workflow/diagram-viewer/images/deployer/error_throw.png b/hsweb-ui/workflow/diagram-viewer/images/deployer/error_throw.png new file mode 100644 index 0000000..2fdaf71 Binary files /dev/null and b/hsweb-ui/workflow/diagram-viewer/images/deployer/error_throw.png differ diff --git a/hsweb-ui/workflow/diagram-viewer/images/deployer/manual.png b/hsweb-ui/workflow/diagram-viewer/images/deployer/manual.png new file mode 100644 index 0000000..7aa3b85 Binary files /dev/null and b/hsweb-ui/workflow/diagram-viewer/images/deployer/manual.png differ diff --git a/hsweb-ui/workflow/diagram-viewer/images/deployer/message_catch.png b/hsweb-ui/workflow/diagram-viewer/images/deployer/message_catch.png new file mode 100644 index 0000000..6ac06bb Binary files /dev/null and b/hsweb-ui/workflow/diagram-viewer/images/deployer/message_catch.png differ diff --git a/hsweb-ui/workflow/diagram-viewer/images/deployer/message_throw.png b/hsweb-ui/workflow/diagram-viewer/images/deployer/message_throw.png new file mode 100644 index 0000000..971f1c2 Binary files /dev/null and b/hsweb-ui/workflow/diagram-viewer/images/deployer/message_throw.png differ diff --git a/hsweb-ui/workflow/diagram-viewer/images/deployer/receive.png b/hsweb-ui/workflow/diagram-viewer/images/deployer/receive.png new file mode 100644 index 0000000..dd2d1c1 Binary files /dev/null and b/hsweb-ui/workflow/diagram-viewer/images/deployer/receive.png differ diff --git a/hsweb-ui/workflow/diagram-viewer/images/deployer/script.png b/hsweb-ui/workflow/diagram-viewer/images/deployer/script.png new file mode 100644 index 0000000..febac1d Binary files /dev/null and b/hsweb-ui/workflow/diagram-viewer/images/deployer/script.png differ diff --git a/hsweb-ui/workflow/diagram-viewer/images/deployer/send.png b/hsweb-ui/workflow/diagram-viewer/images/deployer/send.png new file mode 100644 index 0000000..11a19f0 Binary files /dev/null and b/hsweb-ui/workflow/diagram-viewer/images/deployer/send.png differ diff --git a/hsweb-ui/workflow/diagram-viewer/images/deployer/service.png b/hsweb-ui/workflow/diagram-viewer/images/deployer/service.png new file mode 100644 index 0000000..2c21f0f Binary files /dev/null and b/hsweb-ui/workflow/diagram-viewer/images/deployer/service.png differ diff --git a/hsweb-ui/workflow/diagram-viewer/images/deployer/signal_catch.png b/hsweb-ui/workflow/diagram-viewer/images/deployer/signal_catch.png new file mode 100644 index 0000000..3991897 Binary files /dev/null and b/hsweb-ui/workflow/diagram-viewer/images/deployer/signal_catch.png differ diff --git a/hsweb-ui/workflow/diagram-viewer/images/deployer/signal_throw.png b/hsweb-ui/workflow/diagram-viewer/images/deployer/signal_throw.png new file mode 100644 index 0000000..29a1637 Binary files /dev/null and b/hsweb-ui/workflow/diagram-viewer/images/deployer/signal_throw.png differ diff --git a/hsweb-ui/workflow/diagram-viewer/images/deployer/timer.png b/hsweb-ui/workflow/diagram-viewer/images/deployer/timer.png new file mode 100644 index 0000000..77f4e4f Binary files /dev/null and b/hsweb-ui/workflow/diagram-viewer/images/deployer/timer.png differ diff --git a/hsweb-ui/workflow/diagram-viewer/images/deployer/user.png b/hsweb-ui/workflow/diagram-viewer/images/deployer/user.png new file mode 100644 index 0000000..5c6b4e1 Binary files /dev/null and b/hsweb-ui/workflow/diagram-viewer/images/deployer/user.png differ diff --git a/hsweb-ui/workflow/diagram-viewer/index-detail.html b/hsweb-ui/workflow/diagram-viewer/index-detail.html new file mode 100644 index 0000000..04652b1 --- /dev/null +++ b/hsweb-ui/workflow/diagram-viewer/index-detail.html @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + +
    +
    + + + diff --git a/hsweb-ui/workflow/diagram-viewer/index.html b/hsweb-ui/workflow/diagram-viewer/index.html new file mode 100644 index 0000000..23a4f53 --- /dev/null +++ b/hsweb-ui/workflow/diagram-viewer/index.html @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    +
    +
    +
    + + + diff --git a/hsweb-ui/workflow/diagram-viewer/js/ActivitiRest.js b/hsweb-ui/workflow/diagram-viewer/js/ActivitiRest.js new file mode 100644 index 0000000..cd8d238 --- /dev/null +++ b/hsweb-ui/workflow/diagram-viewer/js/ActivitiRest.js @@ -0,0 +1,80 @@ +$.ajaxSetup({ //设置全局性的Ajax选项 + beforeSend: function (r, options) { + var token = store.get("ssg-user"); + if (token) { + r.setRequestHeader("ssg-user", token); + } + } +}); + +var ActivitiRest = { + options: {}, + getProcessDefinitionByKey: function(processDefinitionKey, callback) { + var url = Lang.sub(this.options.processDefinitionByKeyUrl, {processDefinitionKey: processDefinitionKey}); + + $.ajax({ + url: url, + cache: false, + async: true, + success: function(data, textStatus) { + var processDefinition = data; + if (!processDefinition) { + console.error("Process definition '" + processDefinitionKey + "' not found"); + } else { + callback.apply({processDefinitionId: processDefinition.id}); + } + } + }).done(function(data, textStatus) { + console.log("ajax done"); + }).fail(function(jqXHR, textStatus, error){ + console.error('Get diagram layout['+processDefinitionKey+'] failure: ', textStatus, 'error: ', error, jqXHR); + }); + }, + + getProcessDefinition: function(processDefinitionId, callback) { + var url = Lang.sub(this.options.processDefinitionUrl, {processDefinitionId: processDefinitionId}); + + $.ajax({ + url: url, + cache: false, + async: true, + success: function(data, textStatus) { + var processDefinitionDiagramLayout = data; + if (!processDefinitionDiagramLayout) { + console.error("Process definition diagram layout '" + processDefinitionId + "' not found"); + return; + } else { + callback.apply({processDefinitionDiagramLayout: processDefinitionDiagramLayout}); + } + } + }).done(function(data, textStatus) { + console.log("ajax done"); + }).fail(function(jqXHR, textStatus, error){ + console.log('Get diagram layout['+processDefinitionId+'] failure: ', textStatus, jqXHR); + }); + }, + + getHighLights: function(processInstanceId, callback) { + var url = Lang.sub(this.options.processInstanceHighLightsUrl, {processInstanceId: processInstanceId}); + + $.ajax({ + url: url, + cache: false, + async: true, + success: function(data, textStatus) { + console.log("ajax returned data"); + var highLights = data; + if (!highLights) { + console.log("highLights not found"); + return; + } else { + callback.apply({highLights: highLights}); + } + } + }).done(function(data, textStatus) { + console.log("ajax done"); + }).fail(function(jqXHR, textStatus, error){ + console.log('Get HighLights['+processInstanceId+'] failure: ', textStatus, jqXHR); + }); + } +}; \ No newline at end of file diff --git a/hsweb-ui/workflow/diagram-viewer/js/ActivityImpl.js b/hsweb-ui/workflow/diagram-viewer/js/ActivityImpl.js new file mode 100644 index 0000000..f310211 --- /dev/null +++ b/hsweb-ui/workflow/diagram-viewer/js/ActivityImpl.js @@ -0,0 +1 @@ +/** * * @author Tom Baeyens * @author (Javascript) Dmitry Farafonov */ var ActivityImpl = function(activityJson){ this.outgoingTransitions = []; this.outgoingTransitions = []; this.incomingTransitions = []; this.activityBehavior = null; this.parent = null; this.isScope = false; this.isAsync = false; this.isExclusive = false; this.x = -1; this.y = -1; this.width = -1; this.height = -1; this.properties = {}; //console.log("activityJson: ", activityJson); if (activityJson != undefined) { this.setId(activityJson.activityId); for (var propertyName in activityJson.properties) { this.setProperty(propertyName, activityJson.properties[propertyName]); } //this.setProperty("name", activityJson.activityName); //this.setProperty("type", activityJson.activityType); this.setX(activityJson.x); this.setY(activityJson.y); this.setWidth(activityJson.width); this.setHeight(activityJson.height); if (activityJson.multiInstance) this.setProperty("multiInstance", activityJson.multiInstance); if (activityJson.collapsed) { this.setProperty("collapsed", activityJson.collapsed); } if (activityJson.isInterrupting != undefined) this.setProperty("isInterrupting", activityJson.isInterrupting); } }; ActivityImpl.prototype = { outgoingTransitions: [], outgoingTransitions: [], incomingTransitions: [], activityBehavior: null, parent: null, isScope: false, isAsync: false, isExclusive: false, id: null, properties: {}, // Graphical information x: -1, y: -1, width: -1, height: -1, setId: function(id){ this.id = id; }, getId: function(){ return this.id; }, setProperty: function(name, value){ this.properties[name] = value; }, getProperty: function(name){ return this.properties[name]; }, createOutgoingTransition: function(transitionId){ }, toString: function(id) { return "Activity("+id+")"; }, getParentActivity: function(){ /* if (parent instanceof ActivityImpl) { 79 return (ActivityImpl) parent; 80 } 81 return null; */ return this.parent; }, // restricted setters /////////////////////////////////////////////////////// setOutgoingTransitions: function(outgoingTransitions){ this.outgoingTransitions = outgoingTransitions; }, setParent: function(parent){ this.parent = parent; }, setIncomingTransitions: function(incomingTransitions){ this.incomingTransitions = incomingTransitions; }, // getters and setters ////////////////////////////////////////////////////// getOutgoingTransitions: function(){ return this.outgoingTransitions; }, getActivityBehavior: function(){ return this.activityBehavior; }, setActivityBehavior: function(activityBehavior){ this.activityBehavior = activityBehavior; }, getParent: function(){ return this.parent; }, getIncomingTransitions: function(){ return this.incomingTransitions; }, isScope: function(){ return this.isScope; }, setScope: function(isScope){ this.isScope = isScope; }, getX: function(){ return this.x; }, setX: function(x){ this.x = x; }, getY: function(){ return this.y; }, setY: function(y){ this.y = y; }, getWidth: function(){ return this.width; }, setWidth: function(width){ this.width = width; }, getHeight: function(){ return this.height; }, setHeight: function(height){ this.height = height; }, isAsync: function() { return this.isAsync; }, setAsync: function(isAsync) { this.isAsync = isAsync; }, isExclusive: function() { return this.isExclusive; }, setExclusive: function(isExclusive) { this.isExclusive = isExclusive; }, vvoid: function(){} }; \ No newline at end of file diff --git a/hsweb-ui/workflow/diagram-viewer/js/Color.js b/hsweb-ui/workflow/diagram-viewer/js/Color.js new file mode 100644 index 0000000..e57027e --- /dev/null +++ b/hsweb-ui/workflow/diagram-viewer/js/Color.js @@ -0,0 +1,603 @@ +/** + * Web color table + * + * @author Dmitry Farafonov + */ + +var Color = { + /** + * The color white. In the default sRGB space. + */ + white : Raphael.getRGB("rgb(255,255,255)"), + + /** + * The color white. In the default sRGB space. + */ + WHITE : this.white, + + /** + * The color light gray. In the default sRGB space. + */ + lightGray : Raphael.getRGB("rgb(192, 192, 192)"), + + /** + * The color light gray. In the default sRGB space. + */ + LIGHT_GRAY : this.lightGray, + + /** + * The color gray. In the default sRGB space. + */ + gray : Raphael.getRGB("rgb(128, 128, 128)"), + + /** + * The color gray. In the default sRGB space. + */ + GRAY : this.gray, + + /** + * The color dark gray. In the default sRGB space. + */ + darkGray : Raphael.getRGB("rgb(64, 64, 64)"), + + /** + * The color dark gray. In the default sRGB space. + */ + DARK_GRAY : this.darkGray, + + /** + * The color black. In the default sRGB space. + */ + black : Raphael.getRGB("rgb(0, 0, 0)"), + + /** + * The color black. In the default sRGB space. + */ + BLACK : this.black, + + /** + * The color red. In the default sRGB space. + */ + red : Raphael.getRGB("rgb(255, 0, 0)"), + + /** + * The color red. In the default sRGB space. + */ + RED : this.red, + + /** + * The color pink. In the default sRGB space. + */ + pink : Raphael.getRGB("rgb(255, 175, 175)"), + + /** + * The color pink. In the default sRGB space. + */ + PINK : this.pink, + + /** + * The color orange. In the default sRGB space. + */ + orange : Raphael.getRGB("rgb(255, 200, 0)"), + + /** + * The color orange. In the default sRGB space. + */ + ORANGE : this.orange, + + /** + * The color yellow. In the default sRGB space. + */ + yellow : Raphael.getRGB("rgb(255, 255, 0)"), + + /** + * The color yellow. In the default sRGB space. + */ + YELLOW : this.yellow, + + /** + * The color green. In the default sRGB space. + */ + green : Raphael.getRGB("rgb(0, 255, 0)"), + + /** + * The color green. In the default sRGB space. + */ + GREEN : this.green, + + /** + * The color magenta. In the default sRGB space. + */ + magenta : Raphael.getRGB("rgb(255, 0, 255)"), + + /** + * The color magenta. In the default sRGB space. + */ + MAGENTA : this.magenta, + + /** + * The color cyan. In the default sRGB space. + */ + cyan : Raphael.getRGB("rgb(0, 255, 255)"), + + /** + * The color cyan. In the default sRGB space. + */ + CYAN : this.cyan, + + /** + * The color blue. In the default sRGB space. + */ + blue : Raphael.getRGB("rgb(0, 0, 255)"), + + /** + * The color blue. In the default sRGB space. + */ + BLUE : this.blue, + + /************************************************************************/ + + // http://www.stm.dp.ua/web-design/color-html.php + + Snow : Raphael.getRGB("#FFFAFA "), // 255 250 250 + GhostWhite : Raphael.getRGB("#F8F8FF "), // 248 248 255 + WhiteSmoke : Raphael.getRGB("#F5F5F5 "), // 245 245 245 + Gainsboro : Raphael.getRGB("#DCDCDC "), // 220 220 220 + FloralWhite : Raphael.getRGB("#FFFAF0 "), // 255 250 240 + OldLace : Raphael.getRGB("#FDF5E6 "), // 253 245 230 + Linen : Raphael.getRGB("#FAF0E6 "), // 250 240 230 + AntiqueWhite : Raphael.getRGB("#FAEBD7 "), // 250 235 215 + PapayaWhip : Raphael.getRGB("#FFEFD5 "), // 255 239 213 + BlanchedAlmond : Raphael.getRGB("#FFEBCD "), // 255 235 205 + Bisque : Raphael.getRGB("#FFE4C4 "), // 255 228 196 + PeachPuff : Raphael.getRGB("#FFDAB9 "), // 255 218 185 + NavajoWhite : Raphael.getRGB("#FFDEAD "), // 255 222 173 + Moccasin : Raphael.getRGB("#FFE4B5 "), // 255 228 181 + Cornsilk : Raphael.getRGB("#FFF8DC "), // 255 248 220 + Ivory : Raphael.getRGB("#FFFFF0 "), // 255 255 240 + LemonChiffon : Raphael.getRGB("#FFFACD "), // 255 250 205 + Seashell : Raphael.getRGB("#FFF5EE "), // 255 245 238 + Honeydew : Raphael.getRGB("#F0FFF0 "), // 240 255 240 + MintCream : Raphael.getRGB("#F5FFFA "), // 245 255 250 + Azure : Raphael.getRGB("#F0FFFF "), // 240 255 255 + AliceBlue : Raphael.getRGB("#F0F8FF "), // 240 248 255 + lavender : Raphael.getRGB("#E6E6FA "), // 230 230 250 + LavenderBlush : Raphael.getRGB("#FFF0F5 "), // 255 240 245 + MistyRose : Raphael.getRGB("#FFE4E1 "), // 255 228 225 + White : Raphael.getRGB("#FFFFFF "), // 255 255 255 + Black : Raphael.getRGB("#000000 "), // 0 0 0 + DarkSlateGray : Raphael.getRGB("#2F4F4F "), // 47 79 79 + DimGrey : Raphael.getRGB("#696969 "), // 105 105 105 + SlateGrey : Raphael.getRGB("#708090 "), // 112 128 144 + LightSlateGray : Raphael.getRGB("#778899 "), // 119 136 153 + Grey : Raphael.getRGB("#BEBEBE "), // 190 190 190 + LightGray : Raphael.getRGB("#D3D3D3 "), // 211 211 211 + MidnightBlue : Raphael.getRGB("#191970 "), // 25 25 112 + NavyBlue : Raphael.getRGB("#000080 "), // 0 0 128 + CornflowerBlue : Raphael.getRGB("#6495ED "), // 100 149 237 + DarkSlateBlue : Raphael.getRGB("#483D8B "), // 72 61 139 + SlateBlue : Raphael.getRGB("#6A5ACD "), // 106 90 205 + MediumSlateBlue : Raphael.getRGB("#7B68EE "), // 123 104 238 + LightSlateBlue : Raphael.getRGB("#8470FF "), // 132 112 255 + MediumBlue : Raphael.getRGB("#0000CD "), // 0 0 205 + RoyalBlue : Raphael.getRGB("#4169E1 "), // 65 105 225 + Blue : Raphael.getRGB("#0000FF "), // 0 0 255 + DodgerBlue : Raphael.getRGB("#1E90FF "), // 30 144 255 + DeepSkyBlue : Raphael.getRGB("#00BFFF "), // 0 191 255 + SkyBlue : Raphael.getRGB("#87CEEB "), // 135 206 235 + LightSkyBlue : Raphael.getRGB("#87CEFA "), // 135 206 250 + SteelBlue : Raphael.getRGB("#4682B4 "), // 70 130 180 + LightSteelBlue : Raphael.getRGB("#B0C4DE "), // 176 196 222 + LightBlue : Raphael.getRGB("#ADD8E6 "), // 173 216 230 + PowderBlue : Raphael.getRGB("#B0E0E6 "), // 176 224 230 + PaleTurquoise : Raphael.getRGB("#AFEEEE "), // 175 238 238 + DarkTurquoise : Raphael.getRGB("#00CED1 "), // 0 206 209 + MediumTurquoise : Raphael.getRGB("#48D1CC "), // 72 209 204 + Turquoise : Raphael.getRGB("#40E0D0 "), // 64 224 208 + Cyan : Raphael.getRGB("#00FFFF "), // 0 255 255 + LightCyan : Raphael.getRGB("#E0FFFF "), // 224 255 255 + CadetBlue : Raphael.getRGB("#5F9EA0 "), // 95 158 160 + MediumAquamarine: Raphael.getRGB("#66CDAA "), // 102 205 170 + Aquamarine : Raphael.getRGB("#7FFFD4 "), // 127 255 212 + DarkGreen : Raphael.getRGB("#006400 "), // 0 100 0 + DarkOliveGreen : Raphael.getRGB("#556B2F "), // 85 107 47 + DarkSeaGreen : Raphael.getRGB("#8FBC8F "), // 143 188 143 + SeaGreen : Raphael.getRGB("#2E8B57 "), // 46 139 87 + MediumSeaGreen : Raphael.getRGB("#3CB371 "), // 60 179 113 + LightSeaGreen : Raphael.getRGB("#20B2AA "), // 32 178 170 + PaleGreen : Raphael.getRGB("#98FB98 "), // 152 251 152 + SpringGreen : Raphael.getRGB("#00FF7F "), // 0 255 127 + LawnGreen : Raphael.getRGB("#7CFC00 "), // 124 252 0 + Green : Raphael.getRGB("#00FF00 "), // 0 255 0 + Chartreuse : Raphael.getRGB("#7FFF00 "), // 127 255 0 + MedSpringGreen : Raphael.getRGB("#00FA9A "), // 0 250 154 + GreenYellow : Raphael.getRGB("#ADFF2F "), // 173 255 47 + LimeGreen : Raphael.getRGB("#32CD32 "), // 50 205 50 + YellowGreen : Raphael.getRGB("#9ACD32 "), // 154 205 50 + ForestGreen : Raphael.getRGB("#228B22 "), // 34 139 34 + OliveDrab : Raphael.getRGB("#6B8E23 "), // 107 142 35 + DarkKhaki : Raphael.getRGB("#BDB76B "), // 189 183 107 + PaleGoldenrod : Raphael.getRGB("#EEE8AA "), // 238 232 170 + LtGoldenrodYello: Raphael.getRGB("#FAFAD2 "), // 250 250 210 + LightYellow : Raphael.getRGB("#FFFFE0 "), // 255 255 224 + Yellow : Raphael.getRGB("#FFFF00 "), // 255 255 0 + Gold : Raphael.getRGB("#FFD700 "), // 255 215 0 + LightGoldenrod : Raphael.getRGB("#EEDD82 "), // 238 221 130 + goldenrod : Raphael.getRGB("#DAA520 "), // 218 165 32 + DarkGoldenrod : Raphael.getRGB("#B8860B "), // 184 134 11 + RosyBrown : Raphael.getRGB("#BC8F8F "), // 188 143 143 + IndianRed : Raphael.getRGB("#CD5C5C "), // 205 92 92 + SaddleBrown : Raphael.getRGB("#8B4513 "), // 139 69 19 + Sienna : Raphael.getRGB("#A0522D "), // 160 82 45 + Peru : Raphael.getRGB("#CD853F "), // 205 133 63 + Burlywood : Raphael.getRGB("#DEB887 "), // 222 184 135 + Beige : Raphael.getRGB("#F5F5DC "), // 245 245 220 + Wheat : Raphael.getRGB("#F5DEB3 "), // 245 222 179 + SandyBrown : Raphael.getRGB("#F4A460 "), // 244 164 96 + Tan : Raphael.getRGB("#D2B48C "), // 210 180 140 + Chocolate : Raphael.getRGB("#D2691E "), // 210 105 30 + Firebrick : Raphael.getRGB("#B22222 "), // 178 34 34 + Brown : Raphael.getRGB("#A52A2A "), // 165 42 42 + DarkSalmon : Raphael.getRGB("#E9967A "), // 233 150 122 + Salmon : Raphael.getRGB("#FA8072 "), // 250 128 114 + LightSalmon : Raphael.getRGB("#FFA07A "), // 255 160 122 + Orange : Raphael.getRGB("#FFA500 "), // 255 165 0 + DarkOrange : Raphael.getRGB("#FF8C00 "), // 255 140 0 + Coral : Raphael.getRGB("#FF7F50 "), // 255 127 80 + LightCoral : Raphael.getRGB("#F08080 "), // 240 128 128 + Tomato : Raphael.getRGB("#FF6347 "), // 255 99 71 + OrangeRed : Raphael.getRGB("#FF4500 "), // 255 69 0 + Red : Raphael.getRGB("#FF0000 "), // 255 0 0 + HotPink : Raphael.getRGB("#FF69B4 "), // 255 105 180 + DeepPink : Raphael.getRGB("#FF1493 "), // 255 20 147 + Pink : Raphael.getRGB("#FFC0CB "), // 255 192 203 + LightPink : Raphael.getRGB("#FFB6C1 "), // 255 182 193 + PaleVioletRed : Raphael.getRGB("#DB7093 "), // 219 112 147 + Maroon : Raphael.getRGB("#B03060 "), // 176 48 96 + MediumVioletRed : Raphael.getRGB("#C71585 "), // 199 21 133 + VioletRed : Raphael.getRGB("#D02090 "), // 208 32 144 + Magenta : Raphael.getRGB("#FF00FF "), // 255 0 255 + Violet : Raphael.getRGB("#EE82EE "), // 238 130 238 + Plum : Raphael.getRGB("#DDA0DD "), // 221 160 221 + Orchid : Raphael.getRGB("#DA70D6 "), // 218 112 214 + MediumOrchid : Raphael.getRGB("#BA55D3 "), // 186 85 211 + DarkOrchid : Raphael.getRGB("#9932CC "), // 153 50 204 + DarkViolet : Raphael.getRGB("#9400D3 "), // 148 0 211 + BlueViolet : Raphael.getRGB("#8A2BE2 "), // 138 43 226 + Purple : Raphael.getRGB("#A020F0 "), // 160 32 240 + MediumPurple : Raphael.getRGB("#9370DB "), // 147 112 219 + Thistle : Raphael.getRGB("#D8BFD8 "), // 216 191 216 + Snow1 : Raphael.getRGB("#FFFAFA "), // 255 250 250 + Snow2 : Raphael.getRGB("#EEE9E9 "), // 238 233 233 + Snow3 : Raphael.getRGB("#CDC9C9 "), // 205 201 201 + Snow4 : Raphael.getRGB("#8B8989 "), // 139 137 137 + Seashell1 : Raphael.getRGB("#FFF5EE "), // 255 245 238 + Seashell2 : Raphael.getRGB("#EEE5DE "), // 238 229 222 + Seashell3 : Raphael.getRGB("#CDC5BF "), // 205 197 191 + Seashell4 : Raphael.getRGB("#8B8682 "), // 139 134 130 + AntiqueWhite1 : Raphael.getRGB("#FFEFDB "), // 255 239 219 + AntiqueWhite2 : Raphael.getRGB("#EEDFCC "), // 238 223 204 + AntiqueWhite3 : Raphael.getRGB("#CDC0B0 "), // 205 192 176 + AntiqueWhite4 : Raphael.getRGB("#8B8378 "), // 139 131 120 + Bisque1 : Raphael.getRGB("#FFE4C4 "), // 255 228 196 + Bisque2 : Raphael.getRGB("#EED5B7 "), // 238 213 183 + Bisque3 : Raphael.getRGB("#CDB79E "), // 205 183 158 + Bisque4 : Raphael.getRGB("#8B7D6B "), // 139 125 107 + PeachPuff1 : Raphael.getRGB("#FFDAB9 "), // 255 218 185 + PeachPuff2 : Raphael.getRGB("#EECBAD "), // 238 203 173 + PeachPuff3 : Raphael.getRGB("#CDAF95 "), // 205 175 149 + PeachPuff4 : Raphael.getRGB("#8B7765 "), // 139 119 101 + NavajoWhite1 : Raphael.getRGB("#FFDEAD "), // 255 222 173 + NavajoWhite2 : Raphael.getRGB("#EECFA1 "), // 238 207 161 + NavajoWhite3 : Raphael.getRGB("#CDB38B "), // 205 179 139 + NavajoWhite4 : Raphael.getRGB("#8B795E "), // 139 121 94 + LemonChiffon1 : Raphael.getRGB("#FFFACD "), // 255 250 205 + LemonChiffon2 : Raphael.getRGB("#EEE9BF "), // 238 233 191 + LemonChiffon3 : Raphael.getRGB("#CDC9A5 "), // 205 201 165 + LemonChiffon4 : Raphael.getRGB("#8B8970 "), // 139 137 112 + Cornsilk1 : Raphael.getRGB("#FFF8DC "), // 255 248 220 + Cornsilk2 : Raphael.getRGB("#EEE8CD "), // 238 232 205 + Cornsilk3 : Raphael.getRGB("#CDC8B1 "), // 205 200 177 + Cornsilk4 : Raphael.getRGB("#8B8878 "), // 139 136 120 + Ivory1 : Raphael.getRGB("#FFFFF0 "), // 255 255 240 + Ivory2 : Raphael.getRGB("#EEEEE0 "), // 238 238 224 + Ivory3 : Raphael.getRGB("#CDCDC1 "), // 205 205 193 + Ivory4 : Raphael.getRGB("#8B8B83 "), // 139 139 131 + Honeydew1 : Raphael.getRGB("#F0FFF0 "), // 240 255 240 + Honeydew2 : Raphael.getRGB("#E0EEE0 "), // 224 238 224 + Honeydew3 : Raphael.getRGB("#C1CDC1 "), // 193 205 193 + Honeydew4 : Raphael.getRGB("#838B83 "), // 131 139 131 + LavenderBlush1 : Raphael.getRGB("#FFF0F5 "), // 255 240 245 + LavenderBlush2 : Raphael.getRGB("#EEE0E5 "), // 238 224 229 + LavenderBlush3 : Raphael.getRGB("#CDC1C5 "), // 205 193 197 + LavenderBlush4 : Raphael.getRGB("#8B8386 "), // 139 131 134 + MistyRose1 : Raphael.getRGB("#FFE4E1 "), // 255 228 225 + MistyRose2 : Raphael.getRGB("#EED5D2 "), // 238 213 210 + MistyRose3 : Raphael.getRGB("#CDB7B5 "), // 205 183 181 + MistyRose4 : Raphael.getRGB("#8B7D7B "), // 139 125 123 + Azure1 : Raphael.getRGB("#F0FFFF "), // 240 255 255 + Azure2 : Raphael.getRGB("#E0EEEE "), // 224 238 238 + Azure3 : Raphael.getRGB("#C1CDCD "), // 193 205 205 + Azure4 : Raphael.getRGB("#838B8B "), // 131 139 139 + SlateBlue1 : Raphael.getRGB("#836FFF "), // 131 111 255 + SlateBlue2 : Raphael.getRGB("#7A67EE "), // 122 103 238 + SlateBlue3 : Raphael.getRGB("#6959CD "), // 105 89 205 + SlateBlue4 : Raphael.getRGB("#473C8B "), // 71 60 139 + RoyalBlue1 : Raphael.getRGB("#4876FF "), // 72 118 255 + RoyalBlue2 : Raphael.getRGB("#436EEE "), // 67 110 238 + RoyalBlue3 : Raphael.getRGB("#3A5FCD "), // 58 95 205 + RoyalBlue4 : Raphael.getRGB("#27408B "), // 39 64 139 + Blue1 : Raphael.getRGB("#0000FF "), // 0 0 255 + Blue2 : Raphael.getRGB("#0000EE "), // 0 0 238 + Blue3 : Raphael.getRGB("#0000CD "), // 0 0 205 + Blue4 : Raphael.getRGB("#00008B "), // 0 0 139 + DodgerBlue1 : Raphael.getRGB("#1E90FF "), // 30 144 255 + DodgerBlue2 : Raphael.getRGB("#1C86EE "), // 28 134 238 + DodgerBlue3 : Raphael.getRGB("#1874CD "), // 24 116 205 + DodgerBlue4 : Raphael.getRGB("#104E8B "), // 16 78 139 + SteelBlue1 : Raphael.getRGB("#63B8FF "), // 99 184 255 + SteelBlue2 : Raphael.getRGB("#5CACEE "), // 92 172 238 + SteelBlue3 : Raphael.getRGB("#4F94CD "), // 79 148 205 + SteelBlue4 : Raphael.getRGB("#36648B "), // 54 100 139 + DeepSkyBlue1 : Raphael.getRGB("#00BFFF "), // 0 191 255 + DeepSkyBlue2 : Raphael.getRGB("#00B2EE "), // 0 178 238 + DeepSkyBlue3 : Raphael.getRGB("#009ACD "), // 0 154 205 + DeepSkyBlue4 : Raphael.getRGB("#00688B "), // 0 104 139 + SkyBlue1 : Raphael.getRGB("#87CEFF "), // 135 206 255 + SkyBlue2 : Raphael.getRGB("#7EC0EE "), // 126 192 238 + SkyBlue3 : Raphael.getRGB("#6CA6CD "), // 108 166 205 + SkyBlue4 : Raphael.getRGB("#4A708B "), // 74 112 139 + LightSkyBlue1 : Raphael.getRGB("#B0E2FF "), // 176 226 255 + LightSkyBlue2 : Raphael.getRGB("#A4D3EE "), // 164 211 238 + LightSkyBlue3 : Raphael.getRGB("#8DB6CD "), // 141 182 205 + LightSkyBlue4 : Raphael.getRGB("#607B8B "), // 96 123 139 + SlateGray1 : Raphael.getRGB("#C6E2FF "), // 198 226 255 + SlateGray2 : Raphael.getRGB("#B9D3EE "), // 185 211 238 + SlateGray3 : Raphael.getRGB("#9FB6CD "), // 159 182 205 + SlateGray4 : Raphael.getRGB("#6C7B8B "), // 108 123 139 + LightSteelBlue1 : Raphael.getRGB("#CAE1FF "), // 202 225 255 + LightSteelBlue2 : Raphael.getRGB("#BCD2EE "), // 188 210 238 + LightSteelBlue3 : Raphael.getRGB("#A2B5CD "), // 162 181 205 + LightSteelBlue4 : Raphael.getRGB("#6E7B8B "), // 110 123 139 + LightBlue1 : Raphael.getRGB("#BFEFFF "), // 191 239 255 + LightBlue2 : Raphael.getRGB("#B2DFEE "), // 178 223 238 + LightBlue3 : Raphael.getRGB("#9AC0CD "), // 154 192 205 + LightBlue4 : Raphael.getRGB("#68838B "), // 104 131 139 + LightCyan1 : Raphael.getRGB("#E0FFFF "), // 224 255 255 + LightCyan2 : Raphael.getRGB("#D1EEEE "), // 209 238 238 + LightCyan3 : Raphael.getRGB("#B4CDCD "), // 180 205 205 + LightCyan4 : Raphael.getRGB("#7A8B8B "), // 122 139 139 + PaleTurquoise1 : Raphael.getRGB("#BBFFFF "), // 187 255 255 + PaleTurquoise2 : Raphael.getRGB("#AEEEEE "), // 174 238 238 + PaleTurquoise3 : Raphael.getRGB("#96CDCD "), // 150 205 205 + PaleTurquoise4 : Raphael.getRGB("#668B8B "), // 102 139 139 + CadetBlue1 : Raphael.getRGB("#98F5FF "), // 152 245 255 + CadetBlue2 : Raphael.getRGB("#8EE5EE "), // 142 229 238 + CadetBlue3 : Raphael.getRGB("#7AC5CD "), // 122 197 205 + CadetBlue4 : Raphael.getRGB("#53868B "), // 83 134 139 + Turquoise1 : Raphael.getRGB("#00F5FF "), // 0 245 255 + Turquoise2 : Raphael.getRGB("#00E5EE "), // 0 229 238 + Turquoise3 : Raphael.getRGB("#00C5CD "), // 0 197 205 + Turquoise4 : Raphael.getRGB("#00868B "), // 0 134 139 + Cyan1 : Raphael.getRGB("#00FFFF "), // 0 255 255 + Cyan2 : Raphael.getRGB("#00EEEE "), // 0 238 238 + Cyan3 : Raphael.getRGB("#00CDCD "), // 0 205 205 + Cyan4 : Raphael.getRGB("#008B8B "), // 0 139 139 + DarkSlateGray1 : Raphael.getRGB("#97FFFF "), // 151 255 255 + DarkSlateGray2 : Raphael.getRGB("#8DEEEE "), // 141 238 238 + DarkSlateGray3 : Raphael.getRGB("#79CDCD "), // 121 205 205 + DarkSlateGray4 : Raphael.getRGB("#528B8B "), // 82 139 139 + Aquamarine1 : Raphael.getRGB("#7FFFD4 "), // 127 255 212 + Aquamarine2 : Raphael.getRGB("#76EEC6 "), // 118 238 198 + Aquamarine3 : Raphael.getRGB("#66CDAA "), // 102 205 170 + Aquamarine4 : Raphael.getRGB("#458B74 "), // 69 139 116 + DarkSeaGreen1 : Raphael.getRGB("#C1FFC1 "), // 193 255 193 + DarkSeaGreen2 : Raphael.getRGB("#B4EEB4 "), // 180 238 180 + DarkSeaGreen3 : Raphael.getRGB("#9BCD9B "), // 155 205 155 + DarkSeaGreen4 : Raphael.getRGB("#698B69 "), // 105 139 105 + SeaGreen1 : Raphael.getRGB("#54FF9F "), // 84 255 159 + SeaGreen2 : Raphael.getRGB("#4EEE94 "), // 78 238 148 + SeaGreen3 : Raphael.getRGB("#43CD80 "), // 67 205 128 + SeaGreen4 : Raphael.getRGB("#2E8B57 "), // 46 139 87 + PaleGreen1 : Raphael.getRGB("#9AFF9A "), // 154 255 154 + PaleGreen2 : Raphael.getRGB("#90EE90 "), // 144 238 144 + PaleGreen3 : Raphael.getRGB("#7CCD7C "), // 124 205 124 + PaleGreen4 : Raphael.getRGB("#548B54 "), // 84 139 84 + SpringGreen1 : Raphael.getRGB("#00FF7F "), // 0 255 127 + SpringGreen2 : Raphael.getRGB("#00EE76 "), // 0 238 118 + SpringGreen3 : Raphael.getRGB("#00CD66 "), // 0 205 102 + SpringGreen4 : Raphael.getRGB("#008B45 "), // 0 139 69 + Green1 : Raphael.getRGB("#00FF00 "), // 0 255 0 + Green2 : Raphael.getRGB("#00EE00 "), // 0 238 0 + Green3 : Raphael.getRGB("#00CD00 "), // 0 205 0 + Green4 : Raphael.getRGB("#008B00 "), // 0 139 0 + Chartreuse1 : Raphael.getRGB("#7FFF00 "), // 127 255 0 + Chartreuse2 : Raphael.getRGB("#76EE00 "), // 118 238 0 + Chartreuse3 : Raphael.getRGB("#66CD00 "), // 102 205 0 + Chartreuse4 : Raphael.getRGB("#458B00 "), // 69 139 0 + OliveDrab1 : Raphael.getRGB("#C0FF3E "), // 192 255 62 + OliveDrab2 : Raphael.getRGB("#B3EE3A "), // 179 238 58 + OliveDrab3 : Raphael.getRGB("#9ACD32 "), // 154 205 50 + OliveDrab4 : Raphael.getRGB("#698B22 "), // 105 139 34 + DarkOliveGreen1 : Raphael.getRGB("#CAFF70 "), // 202 255 112 + DarkOliveGreen2 : Raphael.getRGB("#BCEE68 "), // 188 238 104 + DarkOliveGreen3 : Raphael.getRGB("#A2CD5A "), // 162 205 90 + DarkOliveGreen4 : Raphael.getRGB("#6E8B3D "), // 110 139 61 + Khaki1 : Raphael.getRGB("#FFF68F "), // 255 246 143 + Khaki2 : Raphael.getRGB("#EEE685 "), // 238 230 133 + Khaki3 : Raphael.getRGB("#CDC673 "), // 205 198 115 + Khaki4 : Raphael.getRGB("#8B864E "), // 139 134 78 + LightGoldenrod1 : Raphael.getRGB("#FFEC8B "), // 255 236 139 + LightGoldenrod2 : Raphael.getRGB("#EEDC82 "), // 238 220 130 + LightGoldenrod3 : Raphael.getRGB("#CDBE70 "), // 205 190 112 + LightGoldenrod4 : Raphael.getRGB("#8B814C "), // 139 129 76 + LightYellow1 : Raphael.getRGB("#FFFFE0 "), // 255 255 224 + LightYellow2 : Raphael.getRGB("#EEEED1 "), // 238 238 209 + LightYellow3 : Raphael.getRGB("#CDCDB4 "), // 205 205 180 + LightYellow4 : Raphael.getRGB("#8B8B7A "), // 139 139 122 + Yellow1 : Raphael.getRGB("#FFFF00 "), // 255 255 0 + Yellow2 : Raphael.getRGB("#EEEE00 "), // 238 238 0 + Yellow3 : Raphael.getRGB("#CDCD00 "), // 205 205 0 + Yellow4 : Raphael.getRGB("#8B8B00 "), // 139 139 0 + Gold1 : Raphael.getRGB("#FFD700 "), // 255 215 0 + Gold2 : Raphael.getRGB("#EEC900 "), // 238 201 0 + Gold3 : Raphael.getRGB("#CDAD00 "), // 205 173 0 + Gold4 : Raphael.getRGB("#8B7500 "), // 139 117 0 + Goldenrod1 : Raphael.getRGB("#FFC125 "), // 255 193 37 + Goldenrod2 : Raphael.getRGB("#EEB422 "), // 238 180 34 + Goldenrod3 : Raphael.getRGB("#CD9B1D "), // 205 155 29 + Goldenrod4 : Raphael.getRGB("#8B6914 "), // 139 105 20 + DarkGoldenrod1 : Raphael.getRGB("#FFB90F "), // 255 185 15 + DarkGoldenrod2 : Raphael.getRGB("#EEAD0E "), // 238 173 14 + DarkGoldenrod3 : Raphael.getRGB("#CD950C "), // 205 149 12 + DarkGoldenrod4 : Raphael.getRGB("#8B658B "), // 139 101 8 + RosyBrown1 : Raphael.getRGB("#FFC1C1 "), // 255 193 193 + RosyBrown2 : Raphael.getRGB("#EEB4B4 "), // 238 180 180 + RosyBrown3 : Raphael.getRGB("#CD9B9B "), // 205 155 155 + RosyBrown4 : Raphael.getRGB("#8B6969 "), // 139 105 105 + IndianRed1 : Raphael.getRGB("#FF6A6A "), // 255 106 106 + IndianRed2 : Raphael.getRGB("#EE6363 "), // 238 99 99 + IndianRed3 : Raphael.getRGB("#CD5555 "), // 205 85 85 + IndianRed4 : Raphael.getRGB("#8B3A3A "), // 139 58 58 + Sienna1 : Raphael.getRGB("#FF8247 "), // 255 130 71 + Sienna2 : Raphael.getRGB("#EE7942 "), // 238 121 66 + Sienna3 : Raphael.getRGB("#CD6839 "), // 205 104 57 + Sienna4 : Raphael.getRGB("#8B4726 "), // 139 71 38 + Burlywood1 : Raphael.getRGB("#FFD39B "), // 255 211 155 + Burlywood2 : Raphael.getRGB("#EEC591 "), // 238 197 145 + Burlywood3 : Raphael.getRGB("#CDAA7D "), // 205 170 125 + Burlywood4 : Raphael.getRGB("#8B7355 "), // 139 115 85 + Wheat1 : Raphael.getRGB("#FFE7BA "), // 255 231 186 + Wheat2 : Raphael.getRGB("#EED8AE "), // 238 216 174 + Wheat3 : Raphael.getRGB("#CDBA96 "), // 205 186 150 + Wheat4 : Raphael.getRGB("#8B7E66 "), // 139 126 102 + Tan1 : Raphael.getRGB("#FFA54F "), // 255 165 79 + Tan2 : Raphael.getRGB("#EE9A49 "), // 238 154 73 + Tan3 : Raphael.getRGB("#CD853F "), // 205 133 63 + Tan4 : Raphael.getRGB("#8B5A2B "), // 139 90 43 + Chocolate1 : Raphael.getRGB("#FF7F24 "), // 255 127 36 + Chocolate2 : Raphael.getRGB("#EE7621 "), // 238 118 33 + Chocolate3 : Raphael.getRGB("#CD661D "), // 205 102 29 + Chocolate4 : Raphael.getRGB("#8B4513 "), // 139 69 19 + Firebrick1 : Raphael.getRGB("#FF3030 "), // 255 48 48 + Firebrick2 : Raphael.getRGB("#EE2C2C "), // 238 44 44 + Firebrick3 : Raphael.getRGB("#CD2626 "), // 205 38 38 + Firebrick4 : Raphael.getRGB("#8B1A1A "), // 139 26 26 + Brown1 : Raphael.getRGB("#FF4040 "), // 255 64 64 + Brown2 : Raphael.getRGB("#EE3B3B "), // 238 59 59 + Brown3 : Raphael.getRGB("#CD3333 "), // 205 51 51 + Brown4 : Raphael.getRGB("#8B2323 "), // 139 35 35 + Salmon1 : Raphael.getRGB("#FF8C69 "), // 255 140 105 + Salmon2 : Raphael.getRGB("#EE8262 "), // 238 130 98 + Salmon3 : Raphael.getRGB("#CD7054 "), // 205 112 84 + Salmon4 : Raphael.getRGB("#8B4C39 "), // 139 76 57 + LightSalmon1 : Raphael.getRGB("#FFA07A "), // 255 160 122 + LightSalmon2 : Raphael.getRGB("#EE9572 "), // 238 149 114 + LightSalmon3 : Raphael.getRGB("#CD8162 "), // 205 129 98 + LightSalmon4 : Raphael.getRGB("#8B5742 "), // 139 87 66 + Orange1 : Raphael.getRGB("#FFA500 "), // 255 165 0 + Orange2 : Raphael.getRGB("#EE9A00 "), // 238 154 0 + Orange3 : Raphael.getRGB("#CD8500 "), // 205 133 0 + Orange4 : Raphael.getRGB("#8B5A00 "), // 139 90 0 + DarkOrange1 : Raphael.getRGB("#FF7F00 "), // 255 127 0 + DarkOrange2 : Raphael.getRGB("#EE7600 "), // 238 118 0 + DarkOrange3 : Raphael.getRGB("#CD6600 "), // 205 102 0 + DarkOrange4 : Raphael.getRGB("#8B4500 "), // 139 69 0 + Coral1 : Raphael.getRGB("#FF7256 "), // 255 114 86 + Coral2 : Raphael.getRGB("#EE6A50 "), // 238 106 80 + Coral3 : Raphael.getRGB("#CD5B45 "), // 205 91 69 + Coral4 : Raphael.getRGB("#8B3E2F "), // 139 62 47 + Tomato1 : Raphael.getRGB("#FF6347 "), // 255 99 71 + Tomato2 : Raphael.getRGB("#EE5C42 "), // 238 92 66 + Tomato3 : Raphael.getRGB("#CD4F39 "), // 205 79 57 + Tomato4 : Raphael.getRGB("#8B3626 "), // 139 54 38 + OrangeRed1 : Raphael.getRGB("#FF4500 "), // 255 69 0 + OrangeRed2 : Raphael.getRGB("#EE4000 "), // 238 64 0 + OrangeRed3 : Raphael.getRGB("#CD3700 "), // 205 55 0 + OrangeRed4 : Raphael.getRGB("#8B2500 "), // 139 37 0 + Red1 : Raphael.getRGB("#FF0000 "), // 255 0 0 + Red2 : Raphael.getRGB("#EE0000 "), // 238 0 0 + Red3 : Raphael.getRGB("#CD0000 "), // 205 0 0 + Red4 : Raphael.getRGB("#8B0000 "), // 139 0 0 + DeepPink1 : Raphael.getRGB("#FF1493 "), // 255 20 147 + DeepPink2 : Raphael.getRGB("#EE1289 "), // 238 18 137 + DeepPink3 : Raphael.getRGB("#CD1076 "), // 205 16 118 + DeepPink4 : Raphael.getRGB("#8B0A50 "), // 139 10 80 + HotPink1 : Raphael.getRGB("#FF6EB4 "), // 255 110 180 + HotPink2 : Raphael.getRGB("#EE6AA7 "), // 238 106 167 + HotPink3 : Raphael.getRGB("#CD6090 "), // 205 96 144 + HotPink4 : Raphael.getRGB("#8B3A62 "), // 139 58 98 + Pink1 : Raphael.getRGB("#FFB5C5 "), // 255 181 197 + Pink2 : Raphael.getRGB("#EEA9B8 "), // 238 169 184 + Pink3 : Raphael.getRGB("#CD919E "), // 205 145 158 + Pink4 : Raphael.getRGB("#8B636C "), // 139 99 108 + LightPink1 : Raphael.getRGB("#FFAEB9 "), // 255 174 185 + LightPink2 : Raphael.getRGB("#EEA2AD "), // 238 162 173 + LightPink3 : Raphael.getRGB("#CD8C95 "), // 205 140 149 + LightPink4 : Raphael.getRGB("#8B5F65 "), // 139 95 101 + PaleVioletRed1 : Raphael.getRGB("#FF82AB "), // 255 130 171 + PaleVioletRed2 : Raphael.getRGB("#EE799F "), // 238 121 159 + PaleVioletRed3 : Raphael.getRGB("#CD6889 "), // 205 104 137 + PaleVioletRed4 : Raphael.getRGB("#8B475D "), // 139 71 93 + Maroon1 : Raphael.getRGB("#FF34B3 "), // 255 52 179 + Maroon2 : Raphael.getRGB("#EE30A7 "), // 238 48 167 + Maroon3 : Raphael.getRGB("#CD2990 "), // 205 41 144 + Maroon4 : Raphael.getRGB("#8B1C62 "), // 139 28 98 + VioletRed1 : Raphael.getRGB("#FF3E96 "), // 255 62 150 + VioletRed2 : Raphael.getRGB("#EE3A8C "), // 238 58 140 + VioletRed3 : Raphael.getRGB("#CD3278 "), // 205 50 120 + VioletRed4 : Raphael.getRGB("#8B2252 "), // 139 34 82 + Magenta1 : Raphael.getRGB("#FF00FF "), // 255 0 255 + Magenta2 : Raphael.getRGB("#EE00EE "), // 238 0 238 + Magenta3 : Raphael.getRGB("#CD00CD "), // 205 0 205 + Magenta4 : Raphael.getRGB("#8B008B "), // 139 0 139 + Orchid1 : Raphael.getRGB("#FF83FA "), // 255 131 250 + Orchid2 : Raphael.getRGB("#EE7AE9 "), // 238 122 233 + Orchid3 : Raphael.getRGB("#CD69C9 "), // 205 105 201 + Orchid4 : Raphael.getRGB("#8B4789 "), // 139 71 137 + Plum1 : Raphael.getRGB("#FFBBFF "), // 255 187 255 + Plum2 : Raphael.getRGB("#EEAEEE "), // 238 174 238 + Plum3 : Raphael.getRGB("#CD96CD "), // 205 150 205 + Plum4 : Raphael.getRGB("#8B668B "), // 139 102 139 + MediumOrchid1 : Raphael.getRGB("#E066FF "), // 224 102 255 + MediumOrchid2 : Raphael.getRGB("#D15FEE "), // 209 95 238 + MediumOrchid3 : Raphael.getRGB("#B452CD "), // 180 82 205 + MediumOrchid4 : Raphael.getRGB("#7A378B "), // 122 55 139 + DarkOrchid1 : Raphael.getRGB("#BF3EFF "), // 191 62 255 + DarkOrchid2 : Raphael.getRGB("#B23AEE "), // 178 58 238 + DarkOrchid3 : Raphael.getRGB("#9A32CD "), // 154 50 205 + DarkOrchid4 : Raphael.getRGB("#68228B "), // 104 34 139 + Purple1 : Raphael.getRGB("#9B30FF "), // 155 48 255 + Purple2 : Raphael.getRGB("#912CEE "), // 145 44 238 + Purple3 : Raphael.getRGB("#7D26CD "), // 125 38 205 + Purple4 : Raphael.getRGB("#551A8B "), // 85 26 139 + MediumPurple1 : Raphael.getRGB("#AB82FF "), // 171 130 255 + MediumPurple2 : Raphael.getRGB("#9F79EE "), // 159 121 238 + MediumPurple3 : Raphael.getRGB("#8968CD "), // 137 104 205 + MediumPurple4 : Raphael.getRGB("#5D478B "), // 93 71 139 + Thistle1 : Raphael.getRGB("#FFE1FF "), // 255 225 255 + Thistle2 : Raphael.getRGB("#EED2EE "), // 238 210 238 + Thistle3 : Raphael.getRGB("#CDB5CD "), // 205 181 205 + Thistle4 : Raphael.getRGB("#8B7B8B "), // 139 123 139 + grey11 : Raphael.getRGB("#1C1C1C "), // 28 28 28 + grey21 : Raphael.getRGB("#363636 "), // 54 54 54 + grey31 : Raphael.getRGB("#4F4F4F "), // 79 79 79 + grey41 : Raphael.getRGB("#696969 "), // 105 105 105 + grey51 : Raphael.getRGB("#828282 "), // 130 130 130 + grey61 : Raphael.getRGB("#9C9C9C "), // 156 156 156 + grey71 : Raphael.getRGB("#B5B5B5 "), // 181 181 181 + gray81 : Raphael.getRGB("#CFCFCF "), // 207 207 207 + gray91 : Raphael.getRGB("#E8E8E8 "), // 232 232 232 + DarkGrey : Raphael.getRGB("#A9A9A9 "), // 169 169 169 + DarkBlue : Raphael.getRGB("#00008B "), // 0 0 139 + DarkCyan : Raphael.getRGB("#008B8B "), // 0 139 139 + DarkMagenta : Raphael.getRGB("#8B008B "), // 139 0 139 + DarkRed : Raphael.getRGB("#8B0000 "), // 139 0 0 + LightGreen : Raphael.getRGB("#90EE90 "), // 144 238 144 + + + + get: function(R, G, B){ + return Raphael.getRGB("rgb(" + R + ", " + G + ", " + B + ")"); + } +}; \ No newline at end of file diff --git a/hsweb-ui/workflow/diagram-viewer/js/LineBreakMeasurer.js b/hsweb-ui/workflow/diagram-viewer/js/LineBreakMeasurer.js new file mode 100644 index 0000000..edba1a0 --- /dev/null +++ b/hsweb-ui/workflow/diagram-viewer/js/LineBreakMeasurer.js @@ -0,0 +1,270 @@ +/** + * Word wrapping + * + * @author (Javascript) Dmitry Farafonov + */ + + var AttributedStringIterator = function(text){ + //this.text = this.rtrim(this.ltrim(text)); + text = text.replace(/(\s)+/, " "); + this.text = this.rtrim(text); + /* + if (beginIndex < 0 || beginIndex > endIndex || endIndex > length()) { + throw new IllegalArgumentException("Invalid substring range"); + } + */ + this.beginIndex = 0; + this.endIndex = this.text.length; + this.currentIndex = this.beginIndex; + + //console.group("[AttributedStringIterator]"); + var i = 0; + var string = this.text; + var fullPos = 0; + + //console.log("string: \"" + string + "\", length: " + string.length); + this.startWordOffsets = []; + this.startWordOffsets.push(fullPos); + + // TODO: remove i 1000 + while (i<1000) { + var pos = string.search(/[ \t\n\f-\.\,]/); + if (pos == -1) + break; + + // whitespace start + fullPos += pos; + string = string.substr(pos); + ////console.log("fullPos: " + fullPos + ", pos: " + pos + ", string: ", string); + + // remove whitespaces + var pos = string.search(/[^ \t\n\f-\.\,]/); + if (pos == -1) + break; + + // whitespace end + fullPos += pos; + string = string.substr(pos); + + ////console.log("fullPos: " + fullPos); + this.startWordOffsets.push(fullPos); + + i++; + } + //console.log("startWordOffsets: ", this.startWordOffsets); + //console.groupEnd(); + }; + AttributedStringIterator.prototype = { + getEndIndex: function(pos){ + if (typeof(pos) == "undefined") + return this.endIndex; + + var string = this.text.substr(pos, this.endIndex - pos); + + var posEndOfLine = string.search(/[\n]/); + if (posEndOfLine == -1) + return this.endIndex; + else + return pos + posEndOfLine; + }, + getBeginIndex: function(){ + return this.beginIndex; + }, + isWhitespace: function(pos){ + var str = this.text[pos]; + var whitespaceChars = " \t\n\f"; + + return (whitespaceChars.indexOf(str) != -1); + }, + isNewLine: function(pos){ + var str = this.text[pos]; + var whitespaceChars = "\n"; + + return (whitespaceChars.indexOf(str) != -1); + }, + preceding: function(pos){ + //console.group("[AttributedStringIterator.preceding]"); + for(var i in this.startWordOffsets) { + var startWordOffset = this.startWordOffsets[i]; + if (pos < startWordOffset && i>0) { + //console.log("startWordOffset: " + this.startWordOffsets[i-1]); + //console.groupEnd(); + return this.startWordOffsets[i-1]; + } + } + //console.log("pos: " + pos); + //console.groupEnd(); + return this.startWordOffsets[i]; + }, + following: function(pos){ + //console.group("[AttributedStringIterator.following]"); + for(var i in this.startWordOffsets) { + var startWordOffset = this.startWordOffsets[i]; + if (pos < startWordOffset && i>0) { + //console.log("startWordOffset: " + this.startWordOffsets[i]); + //console.groupEnd(); + return this.startWordOffsets[i]; + } + } + //console.log("pos: " + pos); + //console.groupEnd(); + return this.startWordOffsets[i]; + }, + ltrim: function(str){ + var patt2=/^\s+/g; + return str.replace(patt2, ""); + }, + rtrim: function(str){ + var patt2=/\s+$/g; + return str.replace(patt2, ""); + }, + getLayout: function(start, limit){ + return this.text.substr(start, limit - start); + }, + getCharAtPos: function(pos) { + return this.text[pos]; + } + }; + + var LineBreakMeasurer = function(paper, x, y, text, fontAttrs){ + this.paper = paper; + this.text = new AttributedStringIterator(text); + this.fontAttrs = fontAttrs; + + if (this.text.getEndIndex() - this.text.getBeginIndex() < 1) { + throw {message: "Text must contain at least one character.", code: "IllegalArgumentException"}; + } + + //this.measurer = new TextMeasurer(paper, this.text, this.fontAttrs); + this.limit = this.text.getEndIndex(); + this.pos = this.start = this.text.getBeginIndex(); + + this.rafaelTextObject = this.paper.text(x, y, this.text.text).attr(fontAttrs).attr("text-anchor", "start"); + this.svgTextObject = this.rafaelTextObject[0]; + }; + LineBreakMeasurer.prototype = { + nextOffset: function(wrappingWidth, offsetLimit, requireNextWord) { + //console.group("[nextOffset]"); + var nextOffset = this.pos; + if (this.pos < this.limit) { + if (offsetLimit <= this.pos) { + throw {message: "offsetLimit must be after current position", code: "IllegalArgumentException"}; + } + + var charAtMaxAdvance = this.getLineBreakIndex(this.pos, wrappingWidth); + //charAtMaxAdvance --; + //console.log("charAtMaxAdvance:", charAtMaxAdvance, ", [" + this.text.getCharAtPos(charAtMaxAdvance) + "]"); + + if (charAtMaxAdvance == this.limit) { + nextOffset = this.limit; + //console.log("charAtMaxAdvance == this.limit"); + } else if (this.text.isNewLine(charAtMaxAdvance)) { + //console.log("isNewLine"); + nextOffset = charAtMaxAdvance+1; + } else if (this.text.isWhitespace(charAtMaxAdvance)) { + // TODO: find next noSpaceChar + //return nextOffset; + nextOffset = this.text.following(charAtMaxAdvance); + } else { + // Break is in a word; back up to previous break. + /* + var testPos = charAtMaxAdvance + 1; + if (testPos == this.limit) { + console.error("hbz..."); + } else { + nextOffset = this.text.preceding(charAtMaxAdvance); + } + */ + nextOffset = this.text.preceding(charAtMaxAdvance); + + if (nextOffset <= this.pos) { + nextOffset = Math.max(this.pos+1, charAtMaxAdvance); + } + } + } + if (nextOffset > offsetLimit) { + nextOffset = offsetLimit; + } + //console.log("nextOffset: " + nextOffset); + //console.groupEnd(); + return nextOffset; + }, + nextLayout: function(wrappingWidth) { + //console.groupCollapsed("[nextLayout]"); + if (this.pos < this.limit) { + var requireNextWord = false; + var layoutLimit = this.nextOffset(wrappingWidth, this.limit, requireNextWord); + //console.log("layoutLimit:", layoutLimit); + if (layoutLimit == this.pos) { + //console.groupEnd(); + return null; + } + var result = this.text.getLayout(this.pos, layoutLimit); + //console.log("layout: \"" + result + "\""); + + // remove end of line + + //var posEndOfLine = this.text.getEndIndex(this.pos); + //if (posEndOfLine < result.length) + // result = result.substr(0, posEndOfLine); + + this.pos = layoutLimit; + + //console.groupEnd(); + return result; + } else { + //console.groupEnd(); + return null; + } + }, + getLineBreakIndex: function(pos, wrappingWidth) { + //console.group("[getLineBreakIndex]"); + //console.log("pos:"+pos + ", text: \""+ this.text.text.replace(/\n/g, "_").substr(pos, 1) + "\""); + + var bb = this.rafaelTextObject.getBBox(); + + var charNum = -1; + try { + var svgPoint = this.svgTextObject.getStartPositionOfChar(pos); + //var dot = this.paper.ellipse(svgPoint.x, svgPoint.y, 1, 1).attr({"stroke-width": 0, fill: Color.blue}); + svgPoint.x = svgPoint.x + wrappingWidth; + //svgPoint.y = bb.y; + //console.log("svgPoint:", svgPoint); + + //var dot = this.paper.ellipse(svgPoint.x, svgPoint.y, 1, 1).attr({"stroke-width": 0, fill: Color.red}); + + charNum = this.svgTextObject.getCharNumAtPosition(svgPoint); + } catch (e){ + console.warn("getStartPositionOfChar error, pos:" + pos); + /* + var testPos = pos + 1; + if (testPos < this.limit) { + return testPos + } + */ + } + //console.log("charNum:", charNum); + if (charNum == -1) { + //console.groupEnd(); + return this.text.getEndIndex(pos); + } else { + // When case there is new line between pos and charnum then use this new line + var newLineIndex = this.text.getEndIndex(pos); + if (newLineIndex < charNum ) { + console.log("newLineIndex <= charNum, newLineIndex:"+newLineIndex+", charNum:"+charNum, "\"" + this.text.text.substr(newLineIndex+1).replace(/\n/g, "?") + "\""); + //console.groupEnd(); + + return newLineIndex; + } + + //var charAtMaxAdvance = this.text.text.substring(charNum, charNum + 1); + var charAtMaxAdvance = this.text.getCharAtPos(charNum); + //console.log("!!charAtMaxAdvance: " + charAtMaxAdvance); + //console.groupEnd(); + return charNum; + } + }, + getPosition: function() { + return this.pos; + } + }; \ No newline at end of file diff --git a/hsweb-ui/workflow/diagram-viewer/js/Polyline.js b/hsweb-ui/workflow/diagram-viewer/js/Polyline.js new file mode 100644 index 0000000..e7e4c30 --- /dev/null +++ b/hsweb-ui/workflow/diagram-viewer/js/Polyline.js @@ -0,0 +1,387 @@ +/** + * Class to generate polyline + * + * @author Dmitry Farafonov + */ + +var ANCHOR_TYPE= { + main: "main", + middle: "middle", + first: "first", + last: "last" +}; + +function Anchor(uuid, type, x, y) { + this.uuid = uuid; + this.x = x + this.y = y + this.type = (type == ANCHOR_TYPE.middle) ? ANCHOR_TYPE.middle : ANCHOR_TYPE.main; +}; +Anchor.prototype = { + uuid: null, + x: 0, + y: 0, + type: ANCHOR_TYPE.main, + isFirst: false, + isLast: false, + ndex: 0, + typeIndex: 0 +}; + +function Polyline(uuid, points, strokeWidth) { + /* Array on coordinates: + * points: [{x: 410, y: 110}, 1 + * {x: 570, y: 110}, 1 2 + * {x: 620, y: 240}, 2 3 + * {x: 750, y: 270}, 3 4 + * {x: 650, y: 370}]; 4 + */ + this.points = points; + + /* + * path for graph + * [["M", x1, y1], ["L", x2, y2], ["C", ax, ay, bx, by, x3, y3], ["L", x3, y3]] + */ + this.path = []; + + this.anchors = []; + + if (strokeWidth) this.strokeWidth = strokeWidth; + + this.closePath = false; + + this.init(); +}; + +Polyline.prototype = { + id: null, + points: [], + path: [], + anchors: [], + strokeWidth: 1, + radius: 15, + showDetails: false, + element: null, + isDefaultConditionAvailable: false, + closePath: false, + + init: function(points){ + var linesCount = this.getLinesCount(); + if (linesCount < 1) + return; + + this.normalizeCoordinates(); + + // create anchors + + this.pushAnchor(ANCHOR_TYPE.first, this.getLine(0).x1, this.getLine(0).y1); + + for(var i = 1; i < linesCount; i++){ + var line1 = this.getLine(i-1), + line2 = this.getLine(i); + + //this.pushAnchor(ANCHOR_TYPE.middle, line1.x1 + line1.x2-line1.x1, line1.y1 + line1.y2-line1.y1); + this.pushAnchor(ANCHOR_TYPE.main, line1.x2, line1.y2); + //this.pushAnchor(ANCHOR_TYPE.middle, line2.x1 + line2.x2-line2.x1, line2.y1 + line2.y2-line2.y1); + } + + this.pushAnchor(ANCHOR_TYPE.last, this.getLine(linesCount-1).x2, this.getLine(linesCount-1).y2); + + this.rebuildPath(); + }, + + normalizeCoordinates: function(){ + for(var i=0; i < this.points.length; i++){ + this.points[i].x = parseFloat(this.points[i].x); + this.points[i].y = parseFloat(this.points[i].y); + } + }, + + getLinesCount: function(){ + return this.points.length-1; + }, + _getLine: function(i){ + return {x1: this.points[i].x, y1: this.points[i].y, x2: this.points[i+1].x, y2: this.points[i+1].y}; + }, + getLine: function(i){ + var line = this._getLine(i); + line.angle = this.getLineAngle(i) ; + return line; + }, + getLineAngle: function(i){ + var line = this._getLine(i); + return Math.atan2(line.y2 - line.y1, line.x2 - line.x1); + }, + getLineLengthX: function(i){ + var line = this.getLine(i); + return (line.x2 - line.x1); + }, + getLineLengthY: function(i){ + var line = this.getLine(i); + return (line.y2 - line.y1); + }, + getLineLength: function(i){ + var line = this.getLine(i); + return Math.sqrt(Math.pow(this.getLineLengthX(i), 2) + Math.pow(this.getLineLengthY(i), 2)); + }, + + getAnchors: function(){ + // + // ???? + return this.anchors; + }, + getAnchorsCount: function(type){ + if (!type) + return this.anchors.length; + else { + var count = 0; + for(var i=0; i < this.getAnchorsCount(); i++){ + var anchor = this.anchors[i]; + if (anchor.getType() == type) { + count++; + } + } + return count; + } + }, + + pushAnchor: function(type, x, y, index){ + if (type == ANCHOR_TYPE.first) { + index = 0; + typeIndex = 0; + } else if (type == ANCHOR_TYPE.last) { + index = this.getAnchorsCount(); + typeIndex = 0; + } else if (!index) { + index = this.anchors.length; + } else { + // anchors, , index + //var anchor = this.getAnchor() + for(var i=0; i < this.getAnchorsCount(); i++){ + var anchor = this.anchors[i]; + if (anchor.index > index) { + anchor.index++; + anchor.typeIndex++; + } + } + } + + var anchor = new Anchor(this.id, ANCHOR_TYPE.main, x, y, index, typeIndex); + + this.anchors.push(anchor); + }, + + getAnchor: function(position){ + return this.anchors[position]; + }, + + getAnchorByType: function(type, position){ + if (type == ANCHOR_TYPE.first) + return this.anchors[0]; + if (type == ANCHOR_TYPE.last) + return this.anchors[this.getAnchorsCount()-1]; + + for(var i=0; i < this.getAnchorsCount(); i++){ + var anchor = this.anchors[i]; + if (anchor.type == type) { + if( position == anchor.position) + return anchor; + } + } + return null; + }, + + addNewPoint: function(position, x, y){ + // + for(var i = 0; i < this.getLinesCount(); i++){ + var line = this.getLine(i); + if (x > line.x1 && x < line.x2 && y > line.y1 && y < line.y2) { + this.points.splice(i+1,0,{x: x, y: y}); + break; + } + } + + this.rebuildPath(); + }, + + rebuildPath: function(){ + var path = []; + + for(var i = 0; i < this.getAnchorsCount(); i++){ + var anchor = this.getAnchor(i); + + var pathType = "" + if (i==0) + pathType = "M"; + else + pathType = "L"; + +// TODO: save previous points and calculate new path just if points are updated, and then save currents values as previous + + var targetX = anchor.x, targetY = anchor.y; + if (i>0 && i < this.getAnchorsCount()-1) { + // get new x,y + var cx = anchor.x, cy = anchor.y; + + // pivot point of prev line + var AO = this.getLineLength(i-1); + if (AO < this.radius) { + AO = this.radius; + } + + this.isDefaultConditionAvailable = (this.isDefaultConditionAvailable || (i == 1 && AO > 10)); + //console.log("isDefaultConditionAvailable", this.isDefaultConditionAvailable); + + var ED = this.getLineLengthY(i-1) * this.radius / AO; + var OD = this.getLineLengthX(i-1) * this.radius / AO; + targetX = anchor.x - OD; + targetY = anchor.y - ED; + + if (AO < 2*this.radius && i>1) { + targetX = anchor.x - this.getLineLengthX(i-1)/2; + targetY = anchor.y - this.getLineLengthY(i-1)/2;; + } + + // pivot point of next line + var AO = this.getLineLength(i); + if (AO < this.radius) { + AO = this.radius; + } + var ED = this.getLineLengthY(i) * this.radius / AO; + var OD = this.getLineLengthX(i) * this.radius / AO; + var nextSrcX = anchor.x + OD; + var nextSrcY = anchor.y + ED; + + if (AO < 2*this.radius && i 10)); + //console.log("-- isDefaultConditionAvailable", this.isDefaultConditionAvailable); + } + + // anti smoothing + if (this.strokeWidth%2 == 1) { + targetX += 0.5; + targetY += 0.5; + } + + path.push([pathType, targetX, targetY]); + + if (i>0 && i < this.getAnchorsCount()-1) { + path.push(["C", ax, ay, bx, by, zx, zy]); + } + } + + if (this.closePath) { + console.log("closePath:", this.closePath); + path.push(["Z"]); + } + + this.path = path; + }, + + transform: function(transformation){ + this.element.transform(transformation); + }, + attr: function(attrs){ + //console.log("attrs: " +attrs, "", this.element); + // TODO: foreach and set each + this.element.attr(attrs); + } +}; + +function Polygone(points, strokeWidth) { + /* Array on coordinates: + * points: [{x: 410, y: 110}, 1 + * {x: 570, y: 110}, 1 2 + * {x: 620, y: 240}, 2 3 + * {x: 750, y: 270}, 3 4 + * {x: 650, y: 370}]; 4 + */ + this.points = points; + + /* + * path for graph + * [["M", x1, y1], ["L", x2, y2], ["C", ax, ay, bx, by, x3, y3], ["L", x3, y3]] + */ + this.path = []; + + this.anchors = []; + + if (strokeWidth) this.strokeWidth = strokeWidth; + + this.closePath = true; + this.init(); +}; + + +/* + * Poligone is inherited from Poliline: draws closedPath of polyline + */ + +var Foo = function () { }; +Foo.prototype = Polyline.prototype; + +Polygone.prototype = new Foo(); + +Polygone.prototype.rebuildPath = function(){ + var path = []; + //console.log("Polygone rebuildPath"); + for(var i = 0; i < this.getAnchorsCount(); i++){ + var anchor = this.getAnchor(i); + + var pathType = "" + if (i==0) + pathType = "M"; + else + pathType = "L"; + + var targetX = anchor.x, targetY = anchor.y; + + // anti smoothing + if (this.strokeWidth%2 == 1) { + targetX += 0.5; + targetY += 0.5; + } + + path.push([pathType, targetX, targetY]); + } + if (this.closePath) + path.push(["Z"]); + + this.path = path; +}; +/* +Polygone.prototype.transform = function(transformation){ + this.element.transform(transformation); +}; +*/ \ No newline at end of file diff --git a/hsweb-ui/workflow/diagram-viewer/js/ProcessDiagramCanvas.js b/hsweb-ui/workflow/diagram-viewer/js/ProcessDiagramCanvas.js new file mode 100644 index 0000000..cc3ebbd --- /dev/null +++ b/hsweb-ui/workflow/diagram-viewer/js/ProcessDiagramCanvas.js @@ -0,0 +1,2196 @@ +/** + * Represents a canvas on which BPMN 2.0 constructs can be drawn. + * + * Some of the icons used are licenced under a Creative Commons Attribution 2.5 + * License, see http://www.famfamfam.com/lab/icons/silk/ + * + * @see ProcessDiagramGenerator + * @author (Java) Joram Barrez + * @author (Javascript) Dmitry Farafonov + */ + +//Color.Cornsilk + +var ARROW_HEAD_SIMPLE = "simple"; +var ARROW_HEAD_EMPTY = "empty"; +var ARROW_HEAD_FILL = "FILL"; +var MULTILINE_VERTICAL_ALIGN_TOP = "top"; +var MULTILINE_VERTICAL_ALIGN_MIDDLE = "middle"; +var MULTILINE_VERTICAL_ALIGN_BOTTOM = "bottom"; +var MULTILINE_HORIZONTAL_ALIGN_LEFT = "start"; +var MULTILINE_HORIZONTAL_ALIGN_MIDDLE = "middle"; +var MULTILINE_HORIZONTAL_ALIGN_RIGHT = "end"; + +// Predefined sized +var TEXT_PADDING = 3; +var ARROW_WIDTH = 4; +var CONDITIONAL_INDICATOR_WIDTH = 16; +var MARKER_WIDTH = 12; +var ANNOTATION_TEXT_PADDING = 7; + +// Colors +var TASK_COLOR = Color.OldLace; // original: Color.get(255, 255, 204); +var TASK_STROKE_COLOR = Color.black; +/*Color.SlateGrey; */ +//var EXPANDED_SUBPROCESS_ATTRS = Color.black; /*Color.SlateGrey; */ +var BOUNDARY_EVENT_COLOR = Color.white; +var CONDITIONAL_INDICATOR_COLOR = Color.get(255, 255, 255); +var HIGHLIGHT_COLOR = Color.Firebrick1; +//var SEQUENCEFLOW_COLOR = Color.DimGrey; +var SEQUENCEFLOW_COLOR = Color.black; + +var CATCHING_EVENT_COLOR = Color.black; +/* Color.SlateGrey; */ +var START_EVENT_COLOR = Color.get(251, 251, 251); +var START_EVENT_STROKE_COLOR = Color.black; +/* Color.SlateGrey; */ +var END_EVENT_COLOR = Color.get(251, 251, 251); +//var END_EVENT_STROKE_COLOR = Color.black; +var NONE_END_EVENT_COLOR = Color.Firebrick4; +var NONE_END_EVENT_STROKE_COLOR = Color.Firebrick4; +var ERROR_END_EVENT_COLOR = Color.Firebrick; +var ERROR_END_EVENT_STROKE_COLOR = Color.Firebrick; +//var LABEL_COLOR = Color.get(112, 146, 190); +var LABEL_COLOR = Color.get(72, 106, 150); + +// Fonts +var NORMAL_FONT = {font: "10px Arial", opacity: 1, fill: Color.black}; +var LABEL_FONT = {font: "11px Arial", "font-style": "italic", opacity: 1, "fill": LABEL_COLOR}; +var LABEL_FONT_SMOOTH = {font: "10px Arial", "font-style": "italic", opacity: 1, "fill": LABEL_COLOR, stroke: LABEL_COLOR, "stroke-width": .4}; +var TASK_FONT = {font: "11px Arial", opacity: 1, fill: Color.black}; +var TASK_FONT_SMOOTH = {font: "11px Arial", opacity: 1, fill: Color.black, stroke: LABEL_COLOR, "stroke-width": .4}; +var POOL_LANE_FONT = {font: "11px Arial", opacity: 1, fill: Color.black}; +var EXPANDED_SUBPROCESS_FONT = {font: "11px Arial", opacity: 1, fill: Color.black}; + +// Strokes +var NORMAL_STROKE = 1; +var SEQUENCEFLOW_STROKE = 1.5; +var SEQUENCEFLOW_HIGHLIGHT_STROKE = 2; +var THICK_TASK_BORDER_STROKE = 2.5; +var GATEWAY_TYPE_STROKE = 3.2; +var END_EVENT_STROKE = NORMAL_STROKE + 2; +var MULTI_INSTANCE_STROKE = 1.3; +var EVENT_SUBPROCESS_ATTRS = {"stroke": Color.black, "stroke-width": NORMAL_STROKE, "stroke-dasharray": ". "}; +//var EXPANDED_SUBPROCESS_ATTRS = {"stroke": Color.black, "stroke-width": NORMAL_STROKE, "fill": Color.FloralWhite}; +var EXPANDED_SUBPROCESS_ATTRS = {"stroke": Color.black, "stroke-width": NORMAL_STROKE, "fill": Color.WhiteSmoke}; +var NON_INTERRUPTING_EVENT_STROKE = "- "; + +var TASK_CORNER_ROUND = 10; +var EXPANDED_SUBPROCESS_CORNER_ROUND = 10; + +// icons +var ICON_SIZE = 16; +var ICON_PADDING = 4; +var USERTASK_IMAGE = "images/deployer/user.png"; +var SCRIPTTASK_IMAGE = "images/deployer/script.png"; +var SERVICETASK_IMAGE = "images/deployer/service.png"; +var RECEIVETASK_IMAGE = "images/deployer/receive.png"; +var SENDTASK_IMAGE = "images/deployer/send.png"; +var MANUALTASK_IMAGE = "images/deployer/manual.png"; +var BUSINESS_RULE_TASK_IMAGE = "images/deployer/business_rule.png"; +var TIMER_IMAGE = "images/deployer/timer.png"; +var MESSAGE_CATCH_IMAGE = "images/deployer/message_catch.png"; +var MESSAGE_THROW_IMAGE = "images/deployer/message_throw.png"; +var ERROR_THROW_IMAGE = "images/deployer/error_throw.png"; +var ERROR_CATCH_IMAGE = "images/deployer/error_catch.png"; +var SIGNAL_CATCH_IMAGE = "images/deployer/signal_catch.png"; +var SIGNAL_THROW_IMAGE = "images/deployer/signal_throw.png"; +var MULTIPLE_CATCH_IMAGE = "images/deployer/multiple_catch.png"; + + +var ObjectType = { + ELLIPSE: "ellipse", + FLOW: "flow", + RECT: "rect", + RHOMBUS: "rhombus" +}; + +function OBJ(type) { + this.c = null; + this.type = type; + this.nestedElements = []; +}; +OBJ.prototype = {}; + +var CONNECTION_TYPE = { + SEQUENCE_FLOW: "sequence_flow", + MESSAGE_FLOW: "message_flow", + ASSOCIATION: "association" +}; + +var ProcessDiagramCanvas = function () { +}; +ProcessDiagramCanvas.prototype = { +// var ProcessDiagramCanvas = { + canvasHolder: "holder", + canvasWidth: 0, + canvasHeight: 0, + paint: Color.black, + strokeWidth: 0, + font: null, + fontSmoothing: null, + + g: null, + ninjaPaper: null, + + objects: [], + + processDefinitionId: null, + activity: null, + + frame: null, + + + debug: false, + + /** + * Creates an empty canvas with given width and height. + */ + init: function (width, height, processDefinitionId) { + this.canvasWidth = width; + this.canvasHeight = height; + + // TODO: name it as 'canvasName' + if (!processDefinitionId) + processDefinitionId = "holder"; + + this.processDefinitionId = processDefinitionId; + this.canvasHolder = this.processDefinitionId; + + var h = document.getElementById(this.canvasHolder); + if (!h) return; + + h.style.width = this.canvasWidth; + h.style.height = this.canvasHeight; + + this.g = Raphael(this.canvasHolder); + this.g.clear(); + + //this.setPaint(Color.DimGrey); + this.setPaint(Color.black); + //this.setPaint(Color.white); + this.setStroke(NORMAL_STROKE); + + //this.setFont("Arial", 11); + this.setFont(NORMAL_FONT); + //this.font = this.g.getFont("Arial"); + + this.fontSmoothing = true; + + // ninja! + var RaphaelOriginal = Raphael; + this.ninjaPaper = (function (local_raphael) { + var paper = local_raphael(1, 1, 1, 1, processDefinitionId); + return paper; + })(Raphael.ninja()); + Raphael = RaphaelOriginal; + }, + setPaint: function (color) { + this.paint = color; + }, + getPaint: function () { + return this.paint; + }, + setStroke: function (strokeWidth) { + this.strokeWidth = strokeWidth; + }, + getStroke: function () { + return this.strokeWidth; + }, + /* + setFont: function(family, weight, style, stretch){ + this.font = this.g.getFont(family, weight); + }, + */ + setFont: function (font) { + this.font = font; + }, + getFont: function () { + return this.font; + }, + drawShaddow: function (object) { + var border = object.clone(); + border.attr({ + "stroke-width": this.strokeWidth + 6, + "stroke": Color.white, + "fill": Color.white, + "opacity": 1, + "stroke-dasharray": null + }); + //border.toBack(); + object.toFront(); + + return border; + }, + + setConextObject: function (obj) { + this.contextObject = obj; + }, + getConextObject: function () { + return this.contextObject; + }, + setContextToElement: function (object) { + var contextObject = this.getConextObject(); + object.id = contextObject.id; + object.data("contextObject", contextObject); + }, + onClick: function (event, instance, element) { + var overlay = element; + var set = overlay.data("set"); + var contextObject = overlay.data("contextObject"); + //console.log("["+contextObject.getProperty("type")+"], activityId: " + contextObject.getId()); + if (ProcessDiagramGenerator.options && ProcessDiagramGenerator.options.on && ProcessDiagramGenerator.options.on.click) { + var args = [instance, element, contextObject]; + ProcessDiagramGenerator.options.on.click.apply(event, args); + } + }, + onRightClick: function (event, instance, element) { + var overlay = element; + var set = overlay.data("set"); + var contextObject = overlay.data("contextObject"); + //console.log("[%s], activityId: %s (RIGHTCLICK)", contextObject.getProperty("type"), contextObject.getId()); + + if (ProcessDiagramGenerator.options && ProcessDiagramGenerator.options.on && ProcessDiagramGenerator.options.on.rightClick) { + var args = [instance, element, contextObject]; + ProcessDiagramGenerator.options.on.rightClick.apply(event, args); + } + }, + onHoverIn: function (event, instance, element) { + var overlay = element; + var set = overlay.data("set"); + var contextObject = overlay.data("contextObject"); + + var border = instance.g.getById(contextObject.id + "_border"); + border.attr("opacity", 0.3); + + // provide callback + if (ProcessDiagramGenerator.options && ProcessDiagramGenerator.options.on && ProcessDiagramGenerator.options.on.over) { + var args = [instance, element, contextObject]; + ProcessDiagramGenerator.options.on.over.apply(event, args); + } + }, + onHoverOut: function (event, instance, element) { + var overlay = element; + var set = overlay.data("set"); + var contextObject = overlay.data("contextObject"); + + var border = instance.g.getById(contextObject.id + "_border"); + border.attr("opacity", 0.0); + // provide callback + if (ProcessDiagramGenerator.options && ProcessDiagramGenerator.options.on && ProcessDiagramGenerator.options.on.out) { + var args = [instance, element, contextObject]; + ProcessDiagramGenerator.options.on.out.apply(event, args); + } + }, + addHandlers: function (set, x, y, width, height, type) { + var contextObject = this.getConextObject(); + + var cx = x + width / 2, cy = y + height / 2; + if (type == "event") { + var border = this.g.ellipse(cx, cy, width / 2 + 4, height / 2 + 4); + var overlay = this.g.ellipse(cx, cy, width / 2, height / 2); + } else if (type == "gateway") { + // rhombus + var border = this.g.path("M" + (x - 4) + " " + (y + (height / 2)) + + "L" + (x + (width / 2)) + " " + (y + height + 4) + + "L" + (x + width + 4) + " " + (y + (height / 2)) + + "L" + (x + (width / 2)) + " " + (y - 4) + + "z"); + var overlay = this.g.path("M" + x + " " + (y + (height / 2)) + + "L" + (x + (width / 2)) + " " + (y + height) + + "L" + (x + width) + " " + (y + (height / 2)) + + "L" + (x + (width / 2)) + " " + y + + "z"); + } else if (type == "task") { + var border = this.g.rect(x - 4, y - 4, width + 9, height + 9, TASK_CORNER_ROUND + 4); + var overlay = this.g.rect(x, y, width, height, TASK_CORNER_ROUND); + } + + border.attr({stroke: Color.get(132, 112, 255)/*Color.Tan1*/, "stroke-width": 4, opacity: 0.0}); + border.id = contextObject.id + "_border"; + + set.push(border); + + overlay.attr({stroke: Color.Orange, "stroke-width": 3, fill: Color.get(0, 0, 0), opacity: 0.0, cursor: "hand"}); + overlay.data("set", set); + overlay.id = contextObject.id; + overlay.data("contextObject", contextObject); + + var instance = this; + overlay.mousedown(function (event) { + if (event.button == 2) instance.onRightClick(event, instance, this); + }); + overlay.click(function (event) { + instance.onClick(event, instance, this); + }); + overlay.hover(function (event) { + instance.onHoverIn(event, instance, this); + }, function (event) { + instance.onHoverOut(event, instance, this); + }); + }, + + /* + * Start Events: + * + * drawNoneStartEvent + * drawTimerStartEvent + * drawMessageStartEvent + * drawErrorStartEvent + * drawSignalStartEvent + * _drawStartEventImage + * _drawStartEvent + */ + + drawNoneStartEvent: function (x, y, width, height) { + this.g.setStart(); + + var isInterrupting = undefined; + this._drawStartEvent(x, y, width, height, isInterrupting, null); + + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "event"); + }, + + drawTimerStartEvent: function (x, y, width, height, isInterrupting, name) { + this.g.setStart(); + + this._drawStartEvent(x, y, width, height, isInterrupting, null); + + var cx = x + width / 2 - this.getStroke() / 4; + var cy = y + height / 2 - this.getStroke() / 4; + + var w = width * .9;// - this.getStroke()*2; + var h = height * .9;// - this.getStroke()*2; + + this._drawClock(cx, cy, w, h); + + if (this.gebug) + var center = this.g.ellipse(cx, cy, 3, 3).attr({stroke: "none", fill: Color.green}); + + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "event"); + }, + + drawMessageStartEvent: function (x, y, width, height, isInterrupting, name) { + this.g.setStart(); + + this._drawStartEvent(x, y, width, height, isInterrupting, null); + + this._drawStartEventImage(x, y, width, height, MESSAGE_CATCH_IMAGE); + + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "event"); + }, + + drawErrorStartEvent: function (x, y, width, height, name) { + this.g.setStart(); + var isInterrupting = undefined; + this._drawStartEvent(x, y, width, height, isInterrupting); + + this._drawStartEventImage(x, y, width, height, ERROR_CATCH_IMAGE); + + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "event"); + }, + + drawSignalStartEvent: function (x, y, width, height, isInterrupting, name) { + this.g.setStart(); + this._drawStartEvent(x, y, width, height, isInterrupting, null); + + this._drawStartEventImage(x, y, width, height, SIGNAL_CATCH_IMAGE); + + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "event"); + }, + + drawMultipleStartEvent: function (x, y, width, height, isInterrupting, name) { + this.g.setStart(); + + this._drawStartEvent(x, y, width, height, isInterrupting, null); + + var cx = x + width / 2 - this.getStroke() / 4; + var cy = y + height / 2 - this.getStroke() / 4; + + var w = width * 1; + var h = height * 1; + + this._drawPentagon(cx, cy, w, h); + + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "event"); + }, + + _drawStartEventImage: function (x, y, width, height, image) { + var cx = x + width / 2 - this.getStroke() / 2; + var cy = y + height / 2 - this.getStroke() / 2; + + var w = width * .65;// - this.getStroke()*2; + var h = height * .65;// - this.getStroke()*2; + + var img = this.g.image(image, cx - w / 2, cy - h / 2, w, h); + }, + _drawStartEvent: function (x, y, width, height, isInterrupting) { + var originalPaint = this.getPaint(); + if (typeof(START_EVENT_STROKE_COLOR) != "undefined") + this.setPaint(START_EVENT_STROKE_COLOR); + + + width -= this.strokeWidth / 2; + height -= this.strokeWidth / 2; + + x = x + width / 2; + y = y + height / 2; + + var circle = this.g.ellipse(x, y, width / 2, height / 2); + + circle.attr({ + "stroke-width": this.strokeWidth, + "stroke": this.paint, + //"stroke": START_EVENT_STROKE_COLOR, + "fill": START_EVENT_COLOR + }); + + // white shaddow + this.drawShaddow(circle); + + if (isInterrupting != null && isInterrupting != undefined && !isInterrupting) + circle.attr({"stroke-dasharray": NON_INTERRUPTING_EVENT_STROKE}); + + this.setContextToElement(circle); + + + this.setPaint(originalPaint); + }, + + /* + * End Events: + * + * drawNoneEndEvent + * drawErrorEndEvent + * drawMessageEndEvent + * drawSignalEndEvent + * drawMultipleEndEvent + * _drawEndEventImage + * _drawNoneEndEvent + */ + + drawNoneEndEvent: function (x, y, width, height) { + this.g.setStart(); + + this._drawNoneEndEvent(x, y, width, height, null, "noneEndEvent"); + + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "event"); + }, + + drawErrorEndEvent: function (x, y, width, height) { + this.g.setStart(); + var type = "errorEndEvent"; + this._drawNoneEndEvent(x, y, width, height, null, type); + + this._drawEndEventImage(x, y, width, height, ERROR_THROW_IMAGE); + + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "event"); + }, + + drawMessageEndEvent: function (x, y, width, height, name) { + this.g.setStart(); + var type = "errorEndEvent"; + this._drawNoneEndEvent(x, y, width, height, null, type); + + this._drawEndEventImage(x, y, width, height, MESSAGE_THROW_IMAGE); + + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "event"); + }, + + drawSignalEndEvent: function (x, y, width, height, name) { + this.g.setStart(); + var type = "errorEndEvent"; + this._drawNoneEndEvent(x, y, width, height, null, type); + + this._drawEndEventImage(x, y, width, height, SIGNAL_THROW_IMAGE); + + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "event"); + }, + + drawMultipleEndEvent: function (x, y, width, height, name) { + this.g.setStart(); + var type = "errorEndEvent"; + this._drawNoneEndEvent(x, y, width, height, null, type); + + var cx = x + width / 2;// - this.getStroke(); + var cy = y + height / 2;// - this.getStroke(); + + var w = width * 1; + var h = height * 1; + + var filled = true; + this._drawPentagon(cx, cy, w, h, filled); + + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "event"); + }, + + drawTerminateEndEvent: function (x, y, width, height) { + this.g.setStart(); + var type = "errorEndEvent"; + this._drawNoneEndEvent(x, y, width, height, null, type); + + var cx = x + width / 2;// - this.getStroke()/2; + var cy = y + height / 2;// - this.getStroke()/2; + + var w = width / 2 * .6; + var h = height / 2 * .6; + + var circle = this.g.ellipse(cx, cy, w, h).attr({fill: Color.black}); + + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "event"); + }, + + _drawEndEventImage: function (x, y, width, height, image) { + var cx = x + width / 2 - this.getStroke() / 2; + var cy = y + height / 2 - this.getStroke() / 2; + + var w = width * .65; + var h = height * .65; + + var img = this.g.image(image, cx - w / 2, cy - h / 2, w, h); + }, + + _drawNoneEndEvent: function (x, y, width, height, image, type) { + var originalPaint = this.getPaint(); + if (typeof(CATCHING_EVENT_COLOR) != "undefined") + this.setPaint(CATCHING_EVENT_COLOR); + + var strokeColor = this.getPaint(); + var fillColor = this.getPaint(); + + if (type == "errorEndEvent") { + strokeColor = ERROR_END_EVENT_STROKE_COLOR; + fillColor = ERROR_END_EVENT_COLOR; + } else if (type == "noneEndEvent") { + strokeColor = NONE_END_EVENT_STROKE_COLOR; + fillColor = NONE_END_EVENT_COLOR; + } else + + // event circles + width -= this.strokeWidth / 2; + height -= this.strokeWidth / 2; + + x = x + width / 2;// + this.strokeWidth/2; + y = y + width / 2;// + this.strokeWidth/2; + + // outerCircle + var outerCircle = this.g.ellipse(x, y, width / 2, height / 2); + + // white shaddow + var shaddow = this.drawShaddow(outerCircle); + + outerCircle.attr({ + "stroke-width": this.strokeWidth, + "stroke": strokeColor, + "fill": fillColor + }); + + var innerCircleX = x; + var innerCircleY = y; + var innerCircleWidth = width / 2 - 2; + var innerCircleHeight = height / 2 - 2; + var innerCircle = this.g.ellipse(innerCircleX, innerCircleY, innerCircleWidth, innerCircleHeight); + innerCircle.attr({ + "stroke-width": this.strokeWidth, + "stroke": strokeColor, + "fill": Color.white + }); + + // TODO: implement it + //var originalPaint = this.getPaint(); + //this.g.setPaint(BOUNDARY_EVENT_COLOR); + + this.setPaint(originalPaint); + }, + + /* + * Catching Events: + * + * drawCatchingTimerEvent + * drawCatchingErrorEvent + * drawCatchingSignalEvent + * drawCatchingMessageEvent + * drawCatchingMultipleEvent + * _drawCatchingEventImage + * _drawCatchingEvent + */ + + + drawCatchingTimerEvent: function (x, y, width, height, isInterrupting, name) { + this.g.setStart(); + this._drawCatchingEvent(x, y, width, height, isInterrupting, null); + + var innerCircleWidth = width - 4; + var innerCircleHeight = height - 4; + + var cx = x + width / 2 - this.getStroke() / 4; + var cy = y + height / 2 - this.getStroke() / 4; + + var w = innerCircleWidth * .9;// - this.getStroke()*2; + var h = innerCircleHeight * .9;// - this.getStroke()*2; + + this._drawClock(cx, cy, w, h); + + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "event"); + }, + + drawCatchingErrorEvent: function (x, y, width, height, isInterrupting, name) { + this.g.setStart(); + this._drawCatchingEvent(x, y, width, height, isInterrupting, null); + + this._drawCatchingEventImage(x, y, width, height, ERROR_CATCH_IMAGE); + + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "event"); + }, + + drawCatchingSignalEvent: function (x, y, width, height, isInterrupting, name) { + this.g.setStart(); + this._drawCatchingEvent(x, y, width, height, isInterrupting, null); + + this._drawCatchingEventImage(x, y, width, height, SIGNAL_CATCH_IMAGE); + + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "event"); + }, + + drawCatchingMessageEvent: function (x, y, width, height, isInterrupting, name) { + this.g.setStart(); + this._drawCatchingEvent(x, y, width, height, isInterrupting, null); + + this._drawCatchingEventImage(x, y, width, height, MESSAGE_CATCH_IMAGE); + + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "event"); + }, + + drawCatchingMultipleEvent: function (x, y, width, height, isInterrupting, name) { + this.g.setStart(); + this._drawCatchingEvent(x, y, width, height, isInterrupting, null); + + var cx = x + width / 2 - this.getStroke(); + var cy = y + height / 2 - this.getStroke(); + + var w = width * .9; + var h = height * .9; + + this._drawPentagon(cx, cy, w, h); + + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "event"); + }, + + _drawCatchingEventImage: function (x, y, width, height, image) { + var innerCircleWidth = width - 4; + var innerCircleHeight = height - 4; + + var cx = x + width / 2 - this.getStroke() / 2; + var cy = y + height / 2 - this.getStroke() / 2; + + var w = innerCircleWidth * .6;// - this.getStroke()*2; + var h = innerCircleHeight * .6;// - this.getStroke()*2; + + var img = this.g.image(image, cx - w / 2, cy - h / 2, w, h); + }, + + _drawCatchingEvent: function (x, y, width, height, isInterrupting, image) { + var originalPaint = this.getPaint(); + if (typeof(CATCHING_EVENT_COLOR) != "undefined") + this.setPaint(CATCHING_EVENT_COLOR); + + // event circles + width -= this.strokeWidth / 2; + height -= this.strokeWidth / 2; + + x = x + width / 2;// + this.strokeWidth/2; + y = y + width / 2;// + this.strokeWidth/2; + + // outerCircle + var outerCircle = this.g.ellipse(x, y, width / 2, height / 2); + + // white shaddow + var shaddow = this.drawShaddow(outerCircle); + + //console.log("isInterrupting: " + isInterrupting, "x:" , x, "y:",y); + if (isInterrupting != null && isInterrupting != undefined && !isInterrupting) + outerCircle.attr({"stroke-dasharray": NON_INTERRUPTING_EVENT_STROKE}); + + outerCircle.attr({ + "stroke-width": this.strokeWidth, + "stroke": this.getPaint(), + "fill": BOUNDARY_EVENT_COLOR + }); + + var innerCircleX = x; + var innerCircleY = y; + var innerCircleRadiusX = width / 2 - 4; + var innerCircleRadiusY = height / 2 - 4; + var innerCircle = this.g.ellipse(innerCircleX, innerCircleY, innerCircleRadiusX, innerCircleRadiusY); + innerCircle.attr({ + "stroke-width": this.strokeWidth, + "stroke": this.getPaint() + }); + + if (image) { + var imageWidth = imageHeight = innerCircleRadiusX * 1.2 + this.getStroke() * 2; + var imageX = innerCircleX - imageWidth / 2 - this.strokeWidth / 2; + var imageY = innerCircleY - imageWidth / 2 - this.strokeWidth / 2; + var img = this.g.image(image, imageX, imageY, imageWidth, imageHeight); + } + + this.setPaint(originalPaint); + + var set = this.g.set(); + set.push(outerCircle, innerCircle, shaddow); + this.setContextToElement(outerCircle); + + // TODO: add shapes to set + + /* + var st = this.g.set(); + st.push( + this.g.ellipse(innerCircleX, innerCircleY, 2, 2), + this.g.ellipse(imageX, imageY, 2, 2) + ); + st.attr({fill: "red", "stroke-width":0}); + */ + }, + + /* + * Catching Events: + * + * drawThrowingNoneEvent + * drawThrowingSignalEvent + * drawThrowingMessageEvent + * drawThrowingMultipleEvent + */ + + drawThrowingNoneEvent: function (x, y, width, height, name) { + this.g.setStart(); + this._drawCatchingEvent(x, y, width, height, null, null); + + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "event"); + }, + + drawThrowingSignalEvent: function (x, y, width, height, name) { + this.g.setStart(); + this._drawCatchingEvent(x, y, width, height, null, null); + + this._drawCatchingEventImage(x, y, width, height, SIGNAL_THROW_IMAGE); + + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "event"); + }, + + drawThrowingMessageEvent: function (x, y, width, height, name) { + this.g.setStart(); + this._drawCatchingEvent(x, y, width, height, null, null); + + this._drawCatchingEventImage(x, y, width, height, MESSAGE_THROW_IMAGE); + + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "event"); + }, + + drawThrowingMultipleEvent: function (x, y, width, height, name) { + this.g.setStart(); + this._drawCatchingEvent(x, y, width, height, null, null); + + var cx = x + width / 2 - this.getStroke(); + var cy = y + height / 2 - this.getStroke(); + + var w = width * .9; + var h = height * .9; + + var filled = true; + this._drawPentagon(cx, cy, w, h, filled); + + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "event"); + }, + + /* + * Draw flows: + * + * _connectFlowToActivity + * _drawFlow + * _drawDefaultSequenceFlowIndicator + * drawSequenceflow + * drawMessageflow + * drawAssociation + * _drawCircleTail + * _drawArrowHead + * _drawConditionalSequenceFlowIndicator + * drawSequenceflowWithoutArrow + */ + + _connectFlowToActivity: function (sourceActivityId, destinationActivityId, waypoints) { + var sourceActivity = this.g.getById(sourceActivityId); + var destinationActivity = this.g.getById(destinationActivityId); + if (sourceActivity == null || destinationActivity == null) { + if (sourceActivity == null) + console.error("source activity[" + sourceActivityId + "] not found"); + else + console.error("destination activity[" + destinationActivityId + "] not found"); + return null; + } + var bbSourceActivity = sourceActivity.getBBox() + var bbDestinationActivity = destinationActivity.getBBox() + + var path = []; + var newWaypoints = []; + for (var i = 0; i < waypoints.length; i++) { + var pathType = "" + if (i == 0) + pathType = "M"; + else + pathType = "L"; + + path.push([pathType, waypoints[i].x, waypoints[i].y]); + newWaypoints.push({x: waypoints[i].x, y: waypoints[i].y}); + } + + var ninjaPathSourceActivity = this.ninjaPaper.path(sourceActivity.realPath); + var ninjaPathDestinationActivity = this.ninjaPaper.path(destinationActivity.realPath); + var ninjaBBSourceActivity = ninjaPathSourceActivity.getBBox(); + var ninjaBBDestinationActivity = ninjaPathDestinationActivity.getBBox(); + + // set target of the flow to the center of the taskObject + var newPath = path; + var originalSource = {x: newPath[0][1], y: newPath[0][2]}; + var originalTarget = {x: newPath[newPath.length - 1][1], y: newPath[newPath.length - 1][2]}; + newPath[0][1] = ninjaBBSourceActivity.x + (ninjaBBSourceActivity.x2 - ninjaBBSourceActivity.x ) / 2; + newPath[0][2] = ninjaBBSourceActivity.y + (ninjaBBSourceActivity.y2 - ninjaBBSourceActivity.y ) / 2; + newPath[newPath.length - 1][1] = ninjaBBDestinationActivity.x + (ninjaBBDestinationActivity.x2 - ninjaBBDestinationActivity.x ) / 2; + newPath[newPath.length - 1][2] = ninjaBBDestinationActivity.y + (ninjaBBDestinationActivity.y2 - ninjaBBDestinationActivity.y ) / 2; + + var ninjaPathFlowObject = this.ninjaPaper.path(newPath); + var ninjaBBFlowObject = ninjaPathFlowObject.getBBox(); + + var intersectionsSource = Raphael.pathIntersection(ninjaPathSourceActivity.realPath, ninjaPathFlowObject.realPath); + var intersectionsDestination = Raphael.pathIntersection(ninjaPathDestinationActivity.realPath, ninjaPathFlowObject.realPath); + var intersectionSource = intersectionsSource.pop(); + var intersectionDestination = intersectionsDestination.pop(); + + if (intersectionSource != undefined) { + if (this.gebug) { + var diameter = 5; + var dotOriginal = this.g.ellipse(originalSource.x, originalSource.y, diameter, diameter).attr({"fill": Color.white, "stroke": Color.Pink}); + var dot = this.g.ellipse(intersectionSource.x, intersectionSource.y, diameter, diameter).attr({"fill": Color.white, "stroke": Color.Green}); + } + + newWaypoints[0].x = intersectionSource.x; + newWaypoints[0].y = intersectionSource.y; + } + if (intersectionDestination != undefined) { + if (this.gebug) { + var diameter = 5; + var dotOriginal = this.g.ellipse(originalTarget.x, originalTarget.y, diameter, diameter).attr({"fill": Color.white, "stroke": Color.Red}); + var dot = this.g.ellipse(intersectionDestination.x, intersectionDestination.y, diameter, diameter).attr({"fill": Color.white, "stroke": Color.Blue}); + } + + newWaypoints[newWaypoints.length - 1].x = intersectionDestination.x; + newWaypoints[newWaypoints.length - 1].y = intersectionDestination.y; + } + + this.ninjaPaper.clear(); + return newWaypoints; + }, + + _drawFlow: function (waypoints, conditional, isDefault, highLighted, withArrowHead, connectionType) { + var originalPaint = this.getPaint(); + var originalStroke = this.getStroke(); + + this.setPaint(SEQUENCEFLOW_COLOR); + this.setStroke(SEQUENCEFLOW_STROKE); + + if (highLighted) { + this.setPaint(HIGHLIGHT_COLOR); + this.setStroke(SEQUENCEFLOW_HIGHLIGHT_STROKE); + } + +// TODO: generate polylineId or do something!! + var uuid = Raphael.createUUID(); + + var contextObject = this.getConextObject(); + var newWaypoints = waypoints; + if (contextObject) { + var newWaypoints = this._connectFlowToActivity(contextObject.sourceActivityId, contextObject.destinationActivityId, waypoints); + + if (!newWaypoints) { + console.error("Error draw flow from '" + contextObject.sourceActivityId + "' to '" + contextObject.destinationActivityId + "' "); + return; + } + } + var polyline = new Polyline(uuid, newWaypoints, this.getStroke()); + //var polyline = new Polyline(waypoints, 3); + + polyline.element = this.g.path(polyline.path); + polyline.element.attr("stroke-width", this.getStroke()); + polyline.element.attr("stroke", this.getPaint()); + + if (contextObject) { + polyline.element.id = contextObject.id; + polyline.element.data("contextObject", contextObject); + } else { + polyline.element.id = uuid; + } + + + /* + polyline.element.mouseover(function(){ + this.attr({"stroke-width": NORMAL_STROKE + 2}); + }).mouseout(function(){ + this.attr({"stroke-width": NORMAL_STROKE}); + }); + */ + + var last = polyline.getAnchorsCount() - 1; + var x = polyline.getAnchor(last).x; + var y = polyline.getAnchor(last).y; + //var c = this.g.ellipse(x, y, 5, 5); + + var lastLineIndex = polyline.getLinesCount() - 1; + var line = polyline.getLine(lastLineIndex); + var firstLine = polyline.getLine(0); + + var arrowHead = null, + circleTail = null, + defaultSequenceFlowIndicator = null, + conditionalSequenceFlowIndicator = null; + + if (connectionType == CONNECTION_TYPE.MESSAGE_FLOW) { + circleTail = this._drawCircleTail(firstLine, connectionType); + } + if (withArrowHead) + arrowHead = this._drawArrowHead(line, connectionType); + + //console.log("isDefault: ", isDefault, ", isDefaultConditionAvailable: ", polyline.isDefaultConditionAvailable); + if (isDefault && polyline.isDefaultConditionAvailable) { + //var angle = polyline.getLineAngle(0); + //console.log("firstLine", firstLine); + defaultSequenceFlowIndicator = this._drawDefaultSequenceFlowIndicator(firstLine); + } + + if (conditional) { + conditionalSequenceFlowIndicator = this._drawConditionalSequenceFlowIndicator(firstLine); + } + + // draw flow name + var flowName = contextObject.name; + if (flowName) { + var xPointArray = contextObject.xPointArray; + var yPointArray = contextObject.yPointArray; + var textX = xPointArray[0] < xPointArray[1] ? xPointArray[0] : xPointArray[1]; + var textY = yPointArray[0] < yPointArray[1] ? yPointArray[1] : yPointArray[0]; + // fix xy + textX += 20; + textY -= 10; + this.g.text(textX, textY, flowName).attr(LABEL_FONT); + } + + var st = this.g.set(); + st.push(polyline.element, arrowHead, circleTail, conditionalSequenceFlowIndicator); + polyline.element.data("set", st); + polyline.element.data("withArrowHead", withArrowHead); + + var polyCloneAttrNormal = {"stroke-width": this.getStroke() + 5, stroke: Color.get(132, 112, 255), opacity: 0.0, cursor: "hand"}; + var polyClone = st.clone().attr(polyCloneAttrNormal).hover(function () { + //if (polyLine.data("isSelected")) return; + polyClone.attr({opacity: 0.2}); + }, function () { + //if (polyLine.data("isSelected")) return; + polyClone.attr({opacity: 0.0}); + }); + polyClone.data("objectId", polyline.element.id); + polyClone.click(function () { + var instance = this; + var objectId = instance.data("objectId"); + var object = this.paper.getById(objectId); + var contextObject = object.data("contextObject"); + if (contextObject) { + console.log("[flow], objectId: " + object.id + ", flow: " + contextObject.flow); + ProcessDiagramGenerator.showFlowInfo(contextObject); + } + }).dblclick(function () { + console.log("!!! DOUBLE CLICK !!!"); + }).hover(function (mouseEvent) { + var instance = this; + var objectId = instance.data("objectId"); + var object = this.paper.getById(objectId); + var contextObject = object.data("contextObject"); + if (contextObject) + ProcessDiagramGenerator.showFlowInfo(contextObject); + }); + polyClone.data("parentId", uuid); + + if (!connectionType || connectionType == CONNECTION_TYPE.SEQUENCE_FLOW) + polyline.element.attr("stroke-width", this.getStroke()); + else if (connectionType == CONNECTION_TYPE.MESSAGE_FLOW) + polyline.element.attr({"stroke-dasharray": "--"}); + else if (connectionType == CONNECTION_TYPE.ASSOCIATION) + polyline.element.attr({"stroke-dasharray": ". "}); + + this.setPaint(originalPaint); + this.setStroke(originalStroke); + }, + + _drawDefaultSequenceFlowIndicator: function (line) { + //console.log("line: ", line); + + var len = 10; + c = len / 2, f = 8; + var defaultIndicator = this.g.path("M" + (-c) + " " + 0 + "L" + (c) + " " + 0); + defaultIndicator.attr("stroke-width", this.getStroke() + 0); + defaultIndicator.attr("stroke", this.getPaint()); + + + var cosAngle = Math.cos((line.angle)); + var sinAngle = Math.sin((line.angle)); + + var dx = f * cosAngle; + var dy = f * sinAngle; + + var x1 = line.x1 + dx + 0 * c * cosAngle; + var y1 = line.y1 + dy + 0 * c * sinAngle; + + defaultIndicator.transform("t" + (x1) + "," + (y1) + ""); + defaultIndicator.transform("...r" + Raphael.deg(line.angle - 3 * Math.PI / 4) + " " + 0 + " " + 0); + /* + var c0 = this.g.ellipse(0, 0, 1, 1).attr({stroke: Color.Blue}); + c0.transform("t" + (line.x1) + "," + (line.y1) + ""); + var center = this.g.ellipse(0, 0, 1, 1).attr({stroke: Color.Red}); + center.transform("t" + (line.x1+dx) + "," + (line.y1+dy) + ""); + */ + + return defaultIndicator; + }, + + drawSequenceflow: function (waypoints, conditional, isDefault, highLighted) { + var withArrowHead = true; + this._drawFlow(waypoints, conditional, isDefault, highLighted, withArrowHead, CONNECTION_TYPE.SEQUENCE_FLOW); + }, + + drawMessageflow: function (waypoints, highLighted) { + var withArrowHead = true; + var conditional = isDefault = false; + this._drawFlow(waypoints, conditional, isDefault, highLighted, withArrowHead, CONNECTION_TYPE.MESSAGE_FLOW); + }, + + drawAssociation: function (waypoints, withArrowHead, highLighted) { + var withArrowHead = withArrowHead; + var conditional = isDefault = false; + this._drawFlow(waypoints, conditional, isDefault, highLighted, withArrowHead, CONNECTION_TYPE.ASSOCIATION); + }, + + _drawCircleTail: function (line, connectionType) { + var diameter = ARROW_WIDTH / 2 * 1.5; + + // anti smoothing + if (this.strokeWidth % 2 == 1) + line.x1 += .5, line.y1 += .5; + + var circleTail = this.g.ellipse(line.x1, line.y1, diameter, diameter); + circleTail.attr("fill", Color.white); + circleTail.attr("stroke", this.getPaint()); + + return circleTail; + }, + + _drawArrowHead: function (line, connectionType) { + var doubleArrowWidth = 2 * ARROW_WIDTH; + + if (connectionType == CONNECTION_TYPE.ASSOCIATION) + var arrowHead = this.g.path("M-" + (ARROW_WIDTH / 2 + .5) + " -" + doubleArrowWidth + "L 0 0 L" + (ARROW_WIDTH / 2 + .5) + " -" + doubleArrowWidth); + else + var arrowHead = this.g.path("M0 0L-" + (ARROW_WIDTH / 2 + .5) + " -" + doubleArrowWidth + "L" + (ARROW_WIDTH / 2 + .5) + " -" + doubleArrowWidth + "z"); + + //arrowHead.transform("t" + 0 + ",-" + this.getStroke() + ""); + + // anti smoothing + if (this.strokeWidth % 2 == 1) + line.x2 += .5, line.y2 += .5; + + arrowHead.transform("t" + line.x2 + "," + line.y2 + ""); + arrowHead.transform("...r" + Raphael.deg(line.angle - Math.PI / 2) + " " + 0 + " " + 0); + + if (!connectionType || connectionType == CONNECTION_TYPE.SEQUENCE_FLOW) + arrowHead.attr("fill", this.getPaint()); + else if (connectionType == CONNECTION_TYPE.MESSAGE_FLOW) + arrowHead.attr("fill", Color.white); + + arrowHead.attr("stroke-width", this.getStroke()); + arrowHead.attr("stroke", this.getPaint()); + + return arrowHead; + }, + + /* + drawArrowHead2: function(srcX, srcY, targetX, targetY) { + var doubleArrowWidth = 2 * ARROW_WIDTH; + + //var arrowHead = this.g.path("M-" + ARROW_WIDTH/2 + " -" + doubleArrowWidth + "L0 0" + "L" + ARROW_WIDTH/2 + " -" + doubleArrowWidth + "z"); + + var arrowHead = this.g.path("M0 0L-" + ARROW_WIDTH/1.5 + " -" + doubleArrowWidth + "L" + ARROW_WIDTH/1.5 + " -" + doubleArrowWidth + "z"); + //var c = ProcessDiagramCanvas.g.ellipse(0, 0, 3, 3); + //c.transform("t"+targetX+","+targetY+""); + + var angle = Math.atan2(targetY - srcY, targetX - srcX); + + arrowHead.transform("t"+targetX+","+targetY+""); + arrowHead.transform("...r" + Raphael.deg(angle - Math.PI / 2) + " "+0+" "+0); + + //console.log(arrowHead.transform()); + //console.log("--> " + Raphael.deg(angle - Math.PI / 2)); + + arrowHead.attr("fill", this.getPaint()); + arrowHead.attr("stroke", this.getPaint()); + + / * + // shaddow + var c0 = arrowHead.clone(); + c0.transform("...t-1 1"); + c0.attr("stroke-width", this.strokeWidth); + c0.attr("stroke", Color.black); + c0.attr("opacity", 0.15); + c0.toBack(); + * / + }, + */ + + _drawConditionalSequenceFlowIndicator: function (line) { + var horizontal = (CONDITIONAL_INDICATOR_WIDTH * 0.7); + var halfOfHorizontal = horizontal / 2; + var halfOfVertical = CONDITIONAL_INDICATOR_WIDTH / 2; + + var uuid = null; + var waypoints = [{x: 0, y: 0}, + {x: -halfOfHorizontal, y: halfOfVertical}, + {x: 0, y: CONDITIONAL_INDICATOR_WIDTH}, + {x: halfOfHorizontal, y: halfOfVertical}]; + /* + var polyline = new Polyline(uuid, waypoints, this.getStroke()); + polyline.element = this.g.path(polyline.path); + polyline.element.attr("stroke-width", this.getStroke()); + polyline.element.attr("stroke", this.getPaint()); + polyline.element.id = uuid; + */ + var polygone = new Polygone(waypoints, this.getStroke()); + polygone.element = this.g.path(polygone.path); + polygone.element.attr("fill", Color.white); + + polygone.transform("t" + line.x1 + "," + line.y1 + ""); + polygone.transform("...r" + Raphael.deg(line.angle - Math.PI / 2) + " " + 0 + " " + 0); + + + var cosAngle = Math.cos((line.angle)); + var sinAngle = Math.sin((line.angle)); + + //polygone.element.attr("stroke-width", this.getStroke()); + //polygone.element.attr("stroke", this.getPaint()); + + polygone.attr({"stroke-width": this.getStroke(), "stroke": this.getPaint()}); + + return polygone.element; + }, + + drawSequenceflowWithoutArrow: function (waypoints, conditional, isDefault, highLighted) { + var withArrowHead = false; + this._drawFlow(waypoints, conditional, isDefault, highLighted, withArrowHead, CONNECTION_TYPE.SEQUENCE_FLOW); + }, + + /* + * Draw artifacts + */ + + drawPoolOrLane: function (x, y, width, height, name) { + // anti smoothing + if (this.strokeWidth % 2 == 1) + x = Math.round(x) + .5, y = Math.round(y) + .5; + + // shape + var rect = this.g.rect(x, y, width, height); + var attr = {"stroke-width": NORMAL_STROKE, stroke: TASK_STROKE_COLOR}; + rect.attr(attr); + + // Add the name as text, vertical + if (name != null && name.length > 0) { + var attr = POOL_LANE_FONT; + + // Include some padding + var availableTextSpace = height - 6; + + // Create rotation for derived font + var truncated = this.fitTextToWidth(name, availableTextSpace); + var realWidth = this.getStringWidth(truncated, attr); + var realHeight = this.getStringHeight(truncated, attr); + + //console.log("truncated:", truncated, ", height:", height, ", realHeight:", realHeight, ", availableTextSpace:", availableTextSpace, ", realWidth:", realWidth); + var newX = x + 2 + realHeight * 1 - realHeight / 2; + var newY = 3 + y + availableTextSpace - (availableTextSpace - realWidth) / 2 - realWidth / 2; + var textElement = this.g.text(newX, newY, truncated).attr(attr); + //console.log(".getBBox(): ", t.getBBox()); + textElement.transform("r" + Raphael.deg(270 * Math.PI / 180) + " " + newX + " " + newY); + } + + // TODO: add to set + }, + + _drawTask: function (name, x, y, width, height, thickBorder) { + var originalPaint = this.getPaint(); + this.setPaint(TASK_COLOR); + + // anti smoothing + if (this.strokeWidth % 2 == 1) + x = Math.round(x) + .5, y = Math.round(y) + .5; + + // shape + var shape = this.g.rect(x, y, width, height, TASK_CORNER_ROUND); + var attr = {"stroke-width": this.strokeWidth, stroke: TASK_STROKE_COLOR, fill: this.getPaint()}; + shape.attr(attr); + //shape.attr({fill: "90-"+this.getPaint()+"-" + Color.get(250, 250, 244)}); + + var contextObject = this.getConextObject(); + if (contextObject) { + shape.id = contextObject.id; + shape.data("contextObject", contextObject); + } + + //var activity = this.getConextObject(); + //console.log("activity: " + activity.getId(), activity); + //Object.clone(activity); + + /* + c.mouseover(function(){ + this.attr({"stroke-width": NORMAL_STROKE + 2}); + }).mouseout(function(){ + this.attr({"stroke-width": NORMAL_STROKE}); + }); + */ + + this.setPaint(originalPaint); + + // white shaddow + this.drawShaddow(shape); + + + if (thickBorder) { + shape.attr({"stroke-width": THICK_TASK_BORDER_STROKE}); + } else { + //g.draw(rect); + } + + // text + if (name) { + var fontAttr = TASK_FONT; + + // Include some padding + var paddingX = 5; + var paddingY = 5; + var availableTextSpace = width - paddingX * 2; + + // TODO: this.setFont + // var originalFont = this.getFont(); + // this.setFont(TASK_FONT) + /* + var truncated = this.fitTextToWidth(name, availableTextSpace); + var realWidth = this.getStringWidth(truncated, fontAttr); + var realHeight = this.getStringHeight(truncated, fontAttr); + + //var t = this.g.text(x + width/2 + realWidth*0/2 + paddingX*0, y + height/2, truncated).attr(fontAttr); + */ + //console.log("draw task name: " + name); + var boxWidth = width - (2 * TEXT_PADDING); + var boxHeight = height - ICON_SIZE - ICON_PADDING - ICON_PADDING - MARKER_WIDTH - 2 - 2; + var boxX = x + width / 2 - boxWidth / 2; + var boxY = y + height / 2 - boxHeight / 2 + ICON_PADDING + ICON_PADDING - 2 - 2; + /* + var boxWidth = width - (2 * ANNOTATION_TEXT_PADDING); + var boxHeight = height - (2 * ANNOTATION_TEXT_PADDING); + var boxX = x + width/2 - boxWidth/2; + var boxY = y + height/2 - boxHeight/2; + */ + + this.drawTaskLabel(name, boxX, boxY, boxWidth, boxHeight); + } + }, + + drawTaskLabel: function (text, x, y, boxWidth, boxHeight) { + var originalFont = this.getFont(); + this.setFont(TASK_FONT); + + this._drawMultilineText(text, x, y, boxWidth, boxHeight, MULTILINE_VERTICAL_ALIGN_MIDDLE, MULTILINE_HORIZONTAL_ALIGN_MIDDLE); + + this.setFont(originalFont); + }, + + drawAnnotationText: function (text, x, y, width, height) { + //this._drawMultilineText(text, x, y, width, height, "start"); + + var originalPaint = this.getPaint(); + var originalFont = this.getFont(); + + this.setPaint(Color.black); + this.setFont(TASK_FONT); + + this._drawMultilineText(text, x, y, width, height, MULTILINE_VERTICAL_ALIGN_TOP, MULTILINE_HORIZONTAL_ALIGN_LEFT); + + this.setPaint(originalPaint); + this.setFont(originalFont); + }, + + drawLabel: function (text, x, y, width, height) { + //this._drawMultilineText(text, x, y, width, height, "start"); + + var originalPaint = this.getPaint(); + var originalFont = this.getFont(); + + this.setPaint(LABEL_COLOR); + //this.setFont(LABEL_FONT); + this.setFont(LABEL_FONT_SMOOTH); + + // predefined box width for labels + // TODO: use label width as is, but not height (for stretching) + if (!width || !height) { + width = 100; + height = 0; + } + + // TODO: remove it. It is debug + x = x - width / 2; + + this._drawMultilineText(text, x, y, width, height, MULTILINE_VERTICAL_ALIGN_TOP, MULTILINE_HORIZONTAL_ALIGN_MIDDLE); + + this.setPaint(originalPaint); + this.setFont(originalFont); + }, + + /* + drawMultilineLabel: function(text, x, y){ + var originalFont = this.getFont(); + this.setFont(LABEL_FONT_SMOOTH); + + var boxWidth = 80; + x = x - boxWidth/2 + + this._drawMultilineText(text, x, y, boxWidth, null, "middle"); + this.setFont(originalFont); + }, + */ + + getStringWidth: function (text, fontAttrs) { + var textElement = this.g.text(0, 0, text).attr(fontAttrs).hide(); + var bb = textElement.getBBox(); + + //console.log("string width: ", t.getBBox().width); + return textElement.getBBox().width; + }, + getStringHeight: function (text, fontAttrs) { + var textElement = this.g.text(0, 0, text).attr(fontAttrs).hide(); + var bb = textElement.getBBox(); + + //console.log("string height: ", t.getBBox().height); + return textElement.getBBox().height; + }, + fitTextToWidth: function (original, width) { + var text = original; + + // TODO: move attr on parameters + var attr = {font: "11px Arial", opacity: 0}; + + // remove length for "..." + var dots = this.g.text(0, 0, "...").attr(attr).hide(); + var dotsBB = dots.getBBox(); + + var maxWidth = width - dotsBB.width; + + var textElement = this.g.text(0, 0, text).attr(attr).hide(); + var bb = textElement.getBBox(); + + // it's a little bit incorrect with "..." + while (bb.width > maxWidth && text.length > 0) { + text = text.substring(0, text.length - 1); + textElement.attr({"text": text}); + bb = textElement.getBBox(); + } + + // remove element from paper + textElement.remove(); + + if (text != original) { + text = text + "..."; + } + + return text; + }, + wrapTextToWidth: function (original, width) { + + //return original; + + var text = original; + var wrappedText = "\n"; + + // TODO: move attr on parameters + var attr = {font: "11px Arial", opacity: 0}; + + var textElement = this.g.text(0, 0, wrappedText).attr(attr).hide(); + var bb = textElement.getBBox(); + + var resultText = ""; + var i = 0, j = 0; + while (text.length > 0) { + while (bb.width < width && text.length > 0) { + // remove "\n" + wrappedText = wrappedText.substring(0, wrappedText.length - 1); + // add new char, add "\n" + wrappedText = wrappedText + text.substring(0, 1) + "\n"; + text = text.substring(1); + + textElement.attr({"text": wrappedText}); + bb = textElement.getBBox(); + i++; + if (i > 200) break; + } + // remove "\n" + wrappedText = wrappedText.substring(0, wrappedText.length - 1); + + if (text.length == 0) { + resultText += wrappedText; + break; + } + + // return last char to text + text = wrappedText.substring(wrappedText.length - 1) + text; + // remove last char from wrappedText + wrappedText = wrappedText.substring(0, wrappedText.length - 1) + "\n"; + + textElement.attr({"text": wrappedText}); + bb = textElement.getBBox(); + + //console.log(">> ", wrappedText, ", ", text); + resultText += wrappedText; + wrappedText = "\n"; + + j++; + if (j > 20) break; + } + // remove element from paper + textElement.remove(); + + return resultText; + }, + + wrapTextToWidth2: function (original, width) { + var text = original; + var wrappedText = "\n"; + + // TODO: move attr on parameters + var attr = {font: "11px Arial", opacity: 0}; + + var textElement = this.g.text(0, 0, wrappedText).attr(attr).hide(); + var bb = textElement.getBBox(); + + var resultText = ""; + var i = 0, j = 0; + while (text.length > 0) { + while (bb.width < width && text.length > 0) { + // remove "\n" + wrappedText = wrappedText.substring(0, wrappedText.length - 1); + // add new char, add "\n" + wrappedText = wrappedText + text.substring(0, 1) + "\n"; + text = text.substring(1); + + textElement.attr({"text": wrappedText}); + bb = textElement.getBBox(); + i++; + if (i > 200) break; + } + // remove "\n" + wrappedText = wrappedText.substring(0, wrappedText.length - 1); + + if (text.length == 0) { + resultText += wrappedText; + break; + } + + // return last char to text + text = wrappedText.substring(wrappedText.length - 1) + text; + // remove last char from wrappedText + wrappedText = wrappedText.substring(0, wrappedText.length - 1) + "\n"; + + textElement.attr({"text": wrappedText}); + bb = textElement.getBBox(); + + //console.log(">> ", wrappedText, ", ", text); + resultText += wrappedText; + wrappedText = "\n"; + + j++; + if (j > 20) break; + } + // remove element from paper + textElement.remove(); + + return resultText; + }, + + drawUserTask: function (name, x, y, width, height) { + this.g.setStart(); + this._drawTask(name, x, y, width, height); + var img = this.g.image(USERTASK_IMAGE, x + ICON_PADDING, y + ICON_PADDING, ICON_SIZE, ICON_SIZE); + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "task"); + }, + + drawScriptTask: function (name, x, y, width, height) { + this.g.setStart(); + this._drawTask(name, x, y, width, height); + var img = this.g.image(SCRIPTTASK_IMAGE, x + ICON_PADDING, y + ICON_PADDING, ICON_SIZE, ICON_SIZE); + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "task"); + }, + + drawServiceTask: function (name, x, y, width, height) { + this.g.setStart(); + this._drawTask(name, x, y, width, height); + var img = this.g.image(SERVICETASK_IMAGE, x + ICON_PADDING, y + ICON_PADDING, ICON_SIZE, ICON_SIZE); + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "task"); + }, + + drawReceiveTask: function (name, x, y, width, height) { + this.g.setStart(); + this._drawTask(name, x, y, width, height); + var img = this.g.image(RECEIVETASK_IMAGE, x + 7, y + 7, ICON_SIZE, ICON_SIZE); + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "task"); + }, + + drawSendTask: function (name, x, y, width, height) { + this.g.setStart(); + this._drawTask(name, x, y, width, height); + var img = this.g.image(SENDTASK_IMAGE, x + 7, y + 7, ICON_SIZE, ICON_SIZE); + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "task"); + }, + + drawManualTask: function (name, x, y, width, height) { + this.g.setStart(); + this._drawTask(name, x, y, width, height); + var img = this.g.image(MANUALTASK_IMAGE, x + 7, y + 7, ICON_SIZE, ICON_SIZE); + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "task"); + }, + + drawBusinessRuleTask: function (name, x, y, width, height) { + this.g.setStart(); + this._drawTask(name, x, y, width, height); + var img = this.g.image(BUSINESS_RULE_TASK_IMAGE, x + 7, y + 7, ICON_SIZE, ICON_SIZE); + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "task"); + }, + + drawExpandedSubProcess: function (name, x, y, width, height, isTriggeredByEvent) { + this.g.setStart(); + // anti smoothing + if (this.strokeWidth % 2 == 1) + x = Math.round(x) + .5, y = Math.round(y) + .5; + + // shape + var rect = this.g.rect(x, y, width, height, EXPANDED_SUBPROCESS_CORNER_ROUND); + + // Use different stroke (dashed) + if (isTriggeredByEvent) { + rect.attr(EVENT_SUBPROCESS_ATTRS); + } else { + rect.attr(EXPANDED_SUBPROCESS_ATTRS); + } + + this.setContextToElement(rect); + + var fontAttr = EXPANDED_SUBPROCESS_FONT; + + // Include some padding + var paddingX = 10; + var paddingY = 5; + var availableTextSpace = width - paddingX * 2; + + var truncated = this.fitTextToWidth(name, availableTextSpace); + var realWidth = this.getStringWidth(truncated, fontAttr); + var realHeight = this.getStringHeight(truncated, fontAttr); + + var textElement = this.g.text(x + width / 2 - realWidth * 0 / 2 + 0 * paddingX, y + realHeight / 2 + paddingY, truncated).attr(fontAttr); + + var set = this.g.setFinish(); + // TODO: Expanded Sub Process may has specific handlers + //this.addHandlers(set, x, y, width, height, "task"); + }, + + drawCollapsedSubProcess: function (name, x, y, width, height, isTriggeredByEvent) { + this.g.setStart(); + this._drawCollapsedTask(name, x, y, width, height, false); + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "task"); + }, + + drawCollapsedCallActivity: function (name, x, y, width, height) { + this.g.setStart(); + this._drawCollapsedTask(name, x, y, width, height, true); + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "task"); + }, + + _drawCollapsedTask: function (name, x, y, width, height, thickBorder) { + // The collapsed marker is now visualized separately + this._drawTask(name, x, y, width, height, thickBorder); + }, + + drawCollapsedMarker: function (x, y, width, height) { + // rectangle + var rectangleWidth = MARKER_WIDTH; + var rectangleHeight = MARKER_WIDTH; + + // anti smoothing + if (this.strokeWidth % 2 == 1) + y += .5; + + var rect = this.g.rect(x + (width - rectangleWidth) / 2, y + height - rectangleHeight - 3, rectangleWidth, rectangleHeight); + + // plus inside rectangle + var cx = rect.attr("x") + rect.attr("width") / 2; + var cy = rect.attr("y") + rect.attr("height") / 2; + + var line = this.g.path( + "M" + cx + " " + (cy + 2) + "L" + cx + " " + (cy - 2) + + "M" + (cx - 2) + " " + cy + "L" + (cx + 2) + " " + cy + ).attr({"stroke-width": this.strokeWidth}); + + }, + + drawActivityMarkers: function (x, y, width, height, multiInstanceSequential, multiInstanceParallel, collapsed) { + if (collapsed) { + if (!multiInstanceSequential && !multiInstanceParallel) { + this.drawCollapsedMarker(x, y, width, height); + } else { + this.drawCollapsedMarker(x - MARKER_WIDTH / 2 - 2, y, width, height); + if (multiInstanceSequential) { + console.log("is collapsed and multiInstanceSequential"); + this.drawMultiInstanceMarker(true, x + MARKER_WIDTH / 2 + 2, y, width, height); + } else if (multiInstanceParallel) { + console.log("is collapsed and multiInstanceParallel"); + this.drawMultiInstanceMarker(false, x + MARKER_WIDTH / 2 + 2, y, width, height); + } + } + } else { + if (multiInstanceSequential) { + console.log("is multiInstanceSequential"); + this.drawMultiInstanceMarker(true, x, y, width, height); + } else if (multiInstanceParallel) { + console.log("is multiInstanceParallel"); + this.drawMultiInstanceMarker(false, x, y, width, height); + } + } + }, + + drawGateway: function (x, y, width, height) { + + var rhombus = this.g.path("M" + x + " " + (y + (height / 2)) + + "L" + (x + (width / 2)) + " " + (y + height) + + "L" + (x + width) + " " + (y + (height / 2)) + + "L" + (x + (width / 2)) + " " + y + + "z" + ); + + // white shaddow + this.drawShaddow(rhombus); + + rhombus.attr("stroke-width", this.strokeWidth); + rhombus.attr("stroke", Color.SlateGrey); + rhombus.attr({fill: Color.white}); + + this.setContextToElement(rhombus); + + return rhombus; + }, + + drawParallelGateway: function (x, y, width, height) { + this.g.setStart(); + + // rhombus + this.drawGateway(x, y, width, height); + + // plus inside rhombus + var originalStroke = this.getStroke(); + this.setStroke(GATEWAY_TYPE_STROKE); + + var plus = this.g.path( + "M" + (x + 10) + " " + (y + height / 2) + "L" + (x + width - 10) + " " + (y + height / 2) + // horizontal + "M" + (x + width / 2) + " " + (y + height - 10) + "L" + (x + width / 2) + " " + (y + 10) // vertical + ); + plus.attr({"stroke-width": this.getStroke(), "stroke": this.getPaint()}); + + this.setStroke(originalStroke); + + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "gateway"); + }, + + drawExclusiveGateway: function (x, y, width, height) { + this.g.setStart(); + + // rhombus + var rhombus = this.drawGateway(x, y, width, height); + + var quarterWidth = width / 4; + var quarterHeight = height / 4; + + // X inside rhombus + var originalStroke = this.getStroke(); + this.setStroke(GATEWAY_TYPE_STROKE); + + var iks = this.g.path( + "M" + (x + quarterWidth + 3) + " " + (y + quarterHeight + 3) + "L" + (x + 3 * quarterWidth - 3) + " " + (y + 3 * quarterHeight - 3) + + "M" + (x + quarterWidth + 3) + " " + (y + 3 * quarterHeight - 3) + "L" + (x + 3 * quarterWidth - 3) + " " + (y + quarterHeight + 3) + ); + iks.attr({"stroke-width": this.getStroke(), "stroke": this.getPaint()}); + + this.setStroke(originalStroke); + + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "gateway"); + }, + + drawInclusiveGateway: function (x, y, width, height) { + this.g.setStart(); + + // rhombus + this.drawGateway(x, y, width, height); + + var diameter = width / 4; + + // circle inside rhombus + var originalStroke = this.getStroke(); + this.setStroke(GATEWAY_TYPE_STROKE); + var circle = this.g.ellipse(width / 2 + x, height / 2 + y, diameter, diameter); + circle.attr({"stroke-width": this.getStroke(), "stroke": this.getPaint()}); + + this.setStroke(originalStroke); + + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "gateway"); + }, + + drawEventBasedGateway: function (x, y, width, height) { + this.g.setStart(); + + // rhombus + this.drawGateway(x, y, width, height); + + var diameter = width / 2; + + // rombus inside rhombus + var originalStroke = this.getStroke(); + this.setStroke(GATEWAY_TYPE_STROKE); + + + // draw GeneralPath (polygon) + var n = 5; + var angle = 2 * Math.PI / n; + var x1Points = []; + var y1Points = []; + + for (var index = 0; index < n; index++) { + var v = index * angle - Math.PI / 2; + x1Points[index] = x + parseInt(Math.round(width / 2)) + parseInt(Math.round((width / 4) * Math.cos(v))); + y1Points[index] = y + parseInt(Math.round(height / 2)) + parseInt(Math.round((height / 4) * Math.sin(v))); + } + //g.drawPolygon(x1Points, y1Points, n); + + var path = ""; + for (var index = 0; index < n; index++) { + if (index == 0) + path += "M"; + else + path += "L"; + path += x1Points[index] + "," + y1Points[index]; + } + path += "z"; + var polygone = this.g.path(path); + polygone.attr("stroke-width", this.strokeWidth); + polygone.attr("stroke", this.getPaint()); + + this.setStroke(originalStroke); + + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "gateway"); + }, + + /* + * drawMultiInstanceMarker + * drawHighLight + * highLightFlow + */ + + drawMultiInstanceMarker: function (sequential, x, y, width, height) { + var rectangleWidth = MARKER_WIDTH; + var rectangleHeight = MARKER_WIDTH; + + // anti smoothing + if (this.strokeWidth % 2 == 1) + x += .5;//, y += .5; + + var lineX = x + (width - rectangleWidth) / 2; + var lineY = y + height - rectangleHeight - 3; + + var originalStroke = this.getStroke(); + this.setStroke(MULTI_INSTANCE_STROKE); + + if (sequential) { + var line = this.g.path( + "M" + lineX + " " + lineY + "L" + (lineX + rectangleWidth) + " " + lineY + + "M" + lineX + " " + (lineY + rectangleHeight / 2) + "L" + (lineX + rectangleWidth) + " " + (lineY + rectangleHeight / 2) + + "M" + lineX + " " + (lineY + rectangleHeight) + "L" + (lineX + rectangleWidth) + " " + (lineY + rectangleHeight) + ).attr({"stroke-width": this.strokeWidth}); + } else { + var line = this.g.path( + "M" + lineX + " " + lineY + "L" + lineX + " " + (lineY + rectangleHeight) + + "M" + (lineX + rectangleWidth / 2) + " " + lineY + "L" + (lineX + rectangleWidth / 2) + " " + (lineY + rectangleHeight) + + "M" + (lineX + rectangleWidth) + " " + lineY + "L" + (lineX + rectangleWidth) + " " + (lineY + rectangleHeight) + ).attr({"stroke-width": this.strokeWidth}); + } + + this.setStroke(originalStroke); + }, + + drawHighLight: function (x, y, width, height) { + var originalPaint = this.getPaint(); + var originalStroke = this.getStroke(); + + this.setPaint(HIGHLIGHT_COLOR); + this.setStroke(THICK_TASK_BORDER_STROKE); + + //var c = this.g.rect(x - width/2 - THICK_TASK_BORDER_STROKE, y - height/2 - THICK_TASK_BORDER_STROKE, width + THICK_TASK_BORDER_STROKE*2, height + THICK_TASK_BORDER_STROKE*2, 5); + var rect = this.g.rect(x - THICK_TASK_BORDER_STROKE, y - THICK_TASK_BORDER_STROKE, width + THICK_TASK_BORDER_STROKE * 2, height + THICK_TASK_BORDER_STROKE * 2, TASK_CORNER_ROUND); + rect.attr("stroke-width", this.strokeWidth); + rect.attr("stroke", this.getPaint()); + + this.setPaint(originalPaint); + this.setStroke(originalStroke); + }, + + highLightActivity: function (activityId) { + var shape = this.g.getById(activityId); + if (!shape) { + console.error("Activity " + activityId + " not found"); + return; + } + + var contextObject = shape.data("contextObject"); + if (contextObject) + console.log("--> highLightActivity: [" + contextObject.getProperty("type") + "], activityId: " + contextObject.getId()); + else + console.log("--> highLightActivity: ", shape, shape.data("contextObject")); + + shape.attr("stroke-width", THICK_TASK_BORDER_STROKE); + shape.attr("stroke", HIGHLIGHT_COLOR); + }, + + highLightFlow: function (flowId) { + var shapeFlow = this.g.getById(flowId); + if (!shapeFlow) { + console.error("Flow " + flowId + " not found"); + return; + } + + var contextObject = shapeFlow.data("contextObject"); + if (contextObject) + console.log("--> highLightFlow: [" + contextObject.id + "] " + contextObject.flow); + //console.log("--> highLightFlow: ", flow.flow, flow.data("set")); + + var st = shapeFlow.data("set"); + + st.attr("stroke-width", SEQUENCEFLOW_HIGHLIGHT_STROKE); + st.attr("stroke", HIGHLIGHT_COLOR); + var withArrowHead = shapeFlow.data("withArrowHead"); + if (withArrowHead) + st[1].attr("fill", HIGHLIGHT_COLOR); + + st.forEach(function (el) { + //console.log("---->", el); + //el.attr("") + }); + }, + + + _drawClock: function (cx, cy, width, height) { + + var circle = this.g.ellipse(cx, cy, 1, 1).attr({stroke: "none", fill: Color.get(232, 239, 241)}); + //var c = this.g.ellipse(cx, cy, width, height).attr({stroke:"none", fill: Color.red}); + //x = cx - width/2; + //y = cy - height/2; + + var clock = this.g.path( + /* outer circle */ "M15.5,2.374 C8.251,2.375,2.376,8.251,2.374,15.5 C2.376,22.748,8.251,28.623,15.5,28.627c7.249-0.004,13.124-5.879,13.125-13.127C28.624,8.251,22.749,2.375,15.5,2.374z" + + /* inner circle */ "M15.5,26.623 C8.909,26.615,4.385,22.09,4.375,15.5 C4.385,8.909,8.909,4.384,15.5,4.374c4.59,0.01,11.115,3.535,11.124,11.125C26.615,22.09,22.091,26.615,15.5,26.623z" + + /* 9 */ "M8.625,15.5c-0.001-0.552-0.448-0.999-1.001-1c-0.553,0-1,0.448-1,1c0,0.553,0.449,1,1,1C8.176,16.5,8.624,16.053,8.625,15.5z" + + /* 8 */ "M8.179,18.572c-0.478,0.277-0.642,0.889-0.365,1.367c0.275,0.479,0.889,0.641,1.365,0.365c0.479-0.275,0.643-0.887,0.367-1.367C9.27,18.461,8.658,18.297,8.179,18.572z" + + /* 10 */ "M9.18,10.696c-0.479-0.276-1.09-0.112-1.366,0.366s-0.111,1.09,0.365,1.366c0.479,0.276,1.09,0.113,1.367-0.366C9.821,11.584,9.657,10.973,9.18,10.696z" + + /* 2 */ "M22.822,12.428c0.478-0.275,0.643-0.888,0.366-1.366c-0.275-0.478-0.89-0.642-1.366-0.366c-0.479,0.278-0.642,0.89-0.366,1.367C21.732,12.54,22.344,12.705,22.822,12.428z" + + /* 7 */ "M12.062,21.455c-0.478-0.275-1.089-0.111-1.366,0.367c-0.275,0.479-0.111,1.09,0.366,1.365c0.478,0.277,1.091,0.111,1.365-0.365C12.704,22.344,12.54,21.732,12.062,21.455z" + + /* 11 */ "M12.062,9.545c0.479-0.276,0.642-0.888,0.366-1.366c-0.276-0.478-0.888-0.642-1.366-0.366s-0.642,0.888-0.366,1.366C10.973,9.658,11.584,9.822,12.062,9.545z" + + /* 4 */ "M22.823,18.572c-0.48-0.275-1.092-0.111-1.367,0.365c-0.275,0.479-0.112,1.092,0.367,1.367c0.477,0.275,1.089,0.113,1.365-0.365C23.464,19.461,23.3,18.848,22.823,18.572z" + + /* 2 */ "M19.938,7.813c-0.477-0.276-1.091-0.111-1.365,0.366c-0.275,0.48-0.111,1.091,0.366,1.367s1.089,0.112,1.366-0.366C20.581,8.702,20.418,8.089,19.938,7.813z" + + /* 3 */ "M23.378,14.5c-0.554,0.002-1.001,0.45-1.001,1c0.001,0.552,0.448,1,1.001,1c0.551,0,1-0.447,1-1C24.378,14.949,23.929,14.5,23.378,14.5z" + + /* arrows */ "M15.501,6.624c-0.552,0-1,0.448-1,1l-0.466,7.343l-3.004,1.96c-0.478,0.277-0.642,0.889-0.365,1.365c0.275,0.479,0.889,0.643,1.365,0.367l3.305-1.676C15.39,16.99,15.444,17,15.501,17c0.828,0,1.5-0.671,1.5-1.5l-0.5-7.876C16.501,7.072,16.053,6.624,15.501,6.624z" + + /* 9 */ "M15.501,22.377c-0.552,0-1,0.447-1,1s0.448,1,1,1s1-0.447,1-1S16.053,22.377,15.501,22.377z" + + /* 8 */ "M18.939,21.455c-0.479,0.277-0.643,0.889-0.366,1.367c0.275,0.477,0.888,0.643,1.366,0.365c0.478-0.275,0.642-0.889,0.366-1.365C20.028,21.344,19.417,21.18,18.939,21.455z" + + ""); + clock.attr({fill: Color.black, stroke: "none"}); + //clock.transform("t " + (cx-29.75/2) + " " + (cy-29.75/2)); + //clock.transform("...s 0.85"); + + //clock.transform("...s " + .85 + " " + .85); + clock.transform("t " + (-2.374) + " " + (-2.374)); + clock.transform("...t -" + (15.5 - 2.374) + " -" + (15.5 - 2.374)); + clock.transform("...s " + 1 * (width / 35) + " " + 1 * (height / 35)); + clock.transform("...T " + cx + " " + cy); + //clock.transform("t " + (cx-width/2) + " " + (cy-height/2)); + + //console.log(".getBBox(): ", clock.getBBox()); + //console.log(".attr(): ", c.attrs); + circle.attr("rx", clock.getBBox().width / 2); + circle.attr("ry", clock.getBBox().height / 2); + + //return circle + }, + + _drawPentagon: function (cx, cy, width, height, filled) { + // draw GeneralPath (polygon) + var n = 5; + var angle = 2 * Math.PI / n; + var waypoints = []; + + for (var index = 0; index < n; index++) { + var v = index * angle - Math.PI / 2; + var point = {}; + point.x = -width * 1.2 / 2 + parseInt(Math.round(width * 1.2 / 2)) + parseInt(Math.round((width * 1.2 / 4) * Math.cos(v))); + point.y = -height * 1.2 / 2 + parseInt(Math.round(height * 1.2 / 2)) + parseInt(Math.round((height * 1.2 / 4) * Math.sin(v))); + waypoints[index] = point; + } + + var polygone = new Polygone(waypoints, this.getStroke()); + polygone.element = this.g.path(polygone.path); + if (filled) + polygone.element.attr("fill", Color.black); + else + polygone.element.attr("fill", Color.white); + + polygone.element.transform("s " + 1 * (width / 35) + " " + 1 * (height / 35)); + polygone.element.transform("...T " + cx + " " + cy); + }, + + //_drawMultilineText: function(text, x, y, boxWidth, boxHeight, textAnchor) { + _drawMultilineText: function (text, x, y, boxWidth, boxHeight, verticalAlign, horizontalAlign) { + if (!text || text == "") + return; + y += 5; + // Autostretch boxHeight if boxHeight is 0 + if (boxHeight == 0) + verticalAlign = MULTILINE_VERTICAL_ALIGN_TOP; + + //var TEXT_PADDING = 3; + var width = boxWidth; + if (boxHeight) + var height = boxHeight; + + var layouts = []; + + //var font = {font: "11px Arial", opacity: 1, "fill": LABEL_COLOR}; + var font = this.getFont(); + var measurer = new LineBreakMeasurer(this.g, x, y, text, font); + var lineHeight = measurer.rafaelTextObject.getBBox().height; + //console.log("text: ", text.replace(/\n/g, "?")); + + if (height) { + var availableLinesCount = parseInt(height / lineHeight); + //console.log("availableLinesCount: " + availableLinesCount); + } + + var i = 1; + while (measurer.getPosition() < measurer.text.getEndIndex()) { + var layout = measurer.nextLayout(width); + //console.log("LAYOUT: " + layout + ", getPosition: " + measurer.getPosition()); + + if (layout != null) { + // TODO: and check if measurer has next layout. If no then don't draw dots + if (!availableLinesCount || i < availableLinesCount) { + layouts.push(layout); + } else { + layouts.push(this.fitTextToWidth(layout + "...", boxWidth)); + break; + } + } + i++; + } + ; + //console.log(layouts); + + measurer.rafaelTextObject.attr({"text": layouts.join("\n")}); + + if (horizontalAlign) + measurer.rafaelTextObject.attr({"text-anchor": horizontalAlign}); // end, middle, start + + var bb = measurer.rafaelTextObject.getBBox(); + // TODO: there is somethin wrong with wertical align. May be: measurer.rafaelTextObject.attr({"y": y + height/2 - bb.height/2}) + measurer.rafaelTextObject.attr({"y": y + bb.height / 2}); + //var bb = measurer.rafaelTextObject.getBBox(); + + if (measurer.rafaelTextObject.attr("text-anchor") == MULTILINE_HORIZONTAL_ALIGN_MIDDLE) + measurer.rafaelTextObject.attr("x", x + boxWidth / 2); + else if (measurer.rafaelTextObject.attr("text-anchor") == MULTILINE_HORIZONTAL_ALIGN_RIGHT) + measurer.rafaelTextObject.attr("x", x + boxWidth); + + var boxStyle = {stroke: Color.LightSteelBlue2, "stroke-width": 1.0, "stroke-dasharray": "- "}; + //var box = this.g.rect(x+.5, y + .5, width, height).attr(boxStyle); + var textAreaCX = x + boxWidth / 2; + var height = boxHeight; + if (!height) height = bb.height; + var textAreaCY = y + height / 2; + var dotLeftTop = this.g.ellipse(x, y, 3, 3).attr({"stroke-width": 0, fill: Color.LightSteelBlue, stroke: "none"}).hide(); + var dotCenter = this.g.ellipse(textAreaCX, textAreaCY, 3, 3).attr({fill: Color.LightSteelBlue2, stroke: "none"}).hide(); + + /* + // real bbox + var bb = measurer.rafaelTextObject.getBBox(); + var rect = paper.rect(bb.x+.5, bb.y + .5, bb.width, bb.height).attr({"stroke-width": 1}); + */ + var rect = this.g.rect(x, y, boxWidth, height).attr({"stroke-width": 1}).attr(boxStyle).hide(); + var debugSet = this.g.set(); + debugSet.push(dotLeftTop, dotCenter, rect); + //debugSet.show(); + }, + + drawTextAnnotation: function (text, x, y, width, height) { + var lineLength = 18; + var path = []; + path.push(["M", x + lineLength, y]); + path.push(["L", x, y]); + path.push(["L", x, y + height]); + path.push(["L", x + lineLength, y + height]); + + path.push(["L", x + lineLength, y + height - 1]); + path.push(["L", x + 1, y + height - 1]); + path.push(["L", x + 1, y + 1]); + path.push(["L", x + lineLength, y + 1]); + path.push(["z"]); + + var textAreaLines = this.g.path(path); + + var boxWidth = width - (2 * ANNOTATION_TEXT_PADDING); + var boxHeight = height - (2 * ANNOTATION_TEXT_PADDING); + var boxX = x + width / 2 - boxWidth / 2; + var boxY = y + height / 2 - boxHeight / 2; + + // for debug + var rectStyle = {stroke: Color(112, 146, 190), "stroke-width": 1.0, "stroke-dasharray": "- "}; + var r = this.g.rect(boxX, boxY, boxWidth, boxHeight).attr(rectStyle); + // + + this.drawAnnotationText(text, boxX, boxY, boxWidth, boxHeight); + }, + + drawLabel111111111: function (text, x, y, width, height, labelAttrs) { + var debug = false; + + // text + if (text != null && text != undefined && text != "") { + var attr = LABEL_FONT; + + //console.log("x", x, "y", y, "width", width, "height", height ); + + wrappedText = text; + if (labelAttrs && labelAttrs.wrapWidth) { + wrappedText = this.wrapTextToWidth(wrappedText, labelAttrs.wrapWidth); + } + var realWidth = this.getStringWidth(wrappedText, attr); + var realHeight = this.getStringHeight(wrappedText, attr); + + var textAreaCX = x + width / 2; + var textAreaCY = y + 3 + height + this.getStringHeight(wrappedText, attr) / 2; + + var textX = textAreaCX; + var textY = textAreaCY; + + var textAttrs = {}; + if (labelAttrs && labelAttrs.align) { + switch (labelAttrs.align) { + case "left": + textAttrs["text-anchor"] = "start"; + textX = textX - realWidth / 2; + break; + case "center": + textAttrs["text-anchor"] = "middle"; + break; + case "right": + textAttrs["text-anchor"] = "end"; + textX = textX + realWidth / 2; + break; + } + } + if (labelAttrs && labelAttrs.wrapWidth) { + if (true) { + // Draw frameborder + var textAreaStyle = {stroke: Color.LightSteelBlue2, "stroke-width": 1.0, "stroke-dasharray": "- "}; + var textAreaX = textAreaCX - realWidth / 2; + var textAreaY = textAreaCY + .5 - realHeight / 2; + var textArea = this.g.rect(textAreaX, textAreaY, realWidth, realHeight).attr(textAreaStyle); + + var textAreaLines = this.g.path("M" + textAreaX + " " + textAreaY + "L" + (textAreaX + realWidth) + " " + (textAreaY + realHeight) + "M" + +(textAreaX + realWidth) + " " + textAreaY + "L" + textAreaX + " " + (textAreaY + realHeight)); + textAreaLines.attr(textAreaStyle); + + this.g.ellipse(textAreaCX, textAreaCY, 3, 3).attr({fill: Color.LightSteelBlue2, stroke: "none"}); + } + } + + var label = this.g.text(textX, textY, wrappedText).attr(attr).attr(textAttrs); + //label.id = Raphael.createUUID(); + //console.log("label ", label.id, ", ", wrappedText); + + if (this.fontSmoothing) { + label.attr({stroke: LABEL_COLOR, "stroke-width": .4}); + } + + // debug + if (debug) { + var imageAreaStyle = {stroke: Color.grey61, "stroke-width": 1.0, "stroke-dasharray": "- "}; + var imageArea = this.g.rect(x + .5, y + .5, width, height).attr(imageAreaStyle); + var imageAreaLines = this.g.path("M" + x + " " + y + "L" + (x + width) + " " + (y + height) + "M" + +(x + width) + " " + y + "L" + x + " " + (y + height)); + imageAreaLines.attr(imageAreaStyle); + var dotStyle = {fill: Color.Coral, stroke: "none"}; + this.g.ellipse(x, y, 3, 3).attr(dotStyle); + this.g.ellipse(x + width, y, 2, 2).attr(dotStyle); + this.g.ellipse(x + width, y + height, 2, 2).attr(dotStyle); + this.g.ellipse(x, y + height, 2, 2).attr(dotStyle); + } + + return label; + } + }, + + vvoid: function () { + } +}; diff --git a/hsweb-ui/workflow/diagram-viewer/js/ProcessDiagramGenerator.js b/hsweb-ui/workflow/diagram-viewer/js/ProcessDiagramGenerator.js new file mode 100644 index 0000000..3c98362 --- /dev/null +++ b/hsweb-ui/workflow/diagram-viewer/js/ProcessDiagramGenerator.js @@ -0,0 +1,1087 @@ + /** + * Class to generate an image based the diagram interchange information in a + * BPMN 2.0 process. + * + * @author (Javascript) Dmitry Farafonov + */ + +var ProcessDiagramGenerator = { + options: {}, + + processDiagramCanvas: [], + + activityDrawInstructions:{}, + + processDiagrams: {}, + + diagramBreadCrumbs: null, + + init: function(){ + // start event + this.activityDrawInstructions["startEvent"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + processDiagramCanvas.drawNoneStartEvent(activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight()); + }; + + // start timer event + this.activityDrawInstructions["startTimerEvent"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + var isInterrupting = activityImpl.getProperty("isInterrupting"); + processDiagramCanvas.drawTimerStartEvent(activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight(), isInterrupting, activityImpl.getProperty("name")); + }; + + // start event + this.activityDrawInstructions["messageStartEvent"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + var isInterrupting = activityImpl.getProperty("isInterrupting"); + processDiagramCanvas.drawMessageStartEvent(activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight(), isInterrupting, activityImpl.getProperty("name")); + }; + + // start signal event + this.activityDrawInstructions["startSignalEvent"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + var isInterrupting = activityImpl.getProperty("isInterrupting"); + processDiagramCanvas.drawSignalStartEvent(activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight(), isInterrupting, activityImpl.getProperty("name")); + }; + + // start multiple event + this.activityDrawInstructions["startMultipleEvent"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + var isInterrupting = activityImpl.getProperty("isInterrupting"); + processDiagramCanvas.drawMultipleStartEvent(activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight(), isInterrupting, activityImpl.getProperty("name")); + }; + + // signal catch + this.activityDrawInstructions["intermediateSignalCatch"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + var isInterrupting = activityImpl.getProperty("isInterrupting"); + processDiagramCanvas.drawCatchingSignalEvent(activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight(), isInterrupting, null); + + var label = ProcessDiagramGenerator.getActivitiLabel(activityImpl); + if (label) + processDiagramCanvas.drawLabel(label.text, label.x, label.y, label.width, label.height); + }; + + // message catch + this.activityDrawInstructions["intermediateMessageCatch"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + var isInterrupting = activityImpl.getProperty("isInterrupting"); + processDiagramCanvas.drawCatchingMessageEvent(activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight(), isInterrupting, null); + + var label = ProcessDiagramGenerator.getActivitiLabel(activityImpl); + if (label) + processDiagramCanvas.drawLabel(label.text, label.x, label.y, label.width, label.height); + }; + + // multiple catch + this.activityDrawInstructions["intermediateMultipleCatch"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + var isInterrupting = activityImpl.getProperty("isInterrupting"); + processDiagramCanvas.drawCatchingMultipleEvent(activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight(), isInterrupting, null); + + var label = ProcessDiagramGenerator.getActivitiLabel(activityImpl); + if (label) + processDiagramCanvas.drawLabel(label.text, label.x, label.y, label.width, label.height); + }; + + + + // signal throw + this.activityDrawInstructions["intermediateSignalThrow"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + processDiagramCanvas.drawThrowingSignalEvent(activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight(), activityImpl.getProperty("name")); + + var label = ProcessDiagramGenerator.getActivitiLabel(activityImpl); + if (label) + processDiagramCanvas.drawLabel(label.text, label.x, label.y, label.width, label.height); + }; + + // message throw + this.activityDrawInstructions["intermediateMessageThrow"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + processDiagramCanvas.drawThrowingMessageEvent(activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight(), activityImpl.getProperty("name")); + + var label = ProcessDiagramGenerator.getActivitiLabel(activityImpl); + if (label) + processDiagramCanvas.drawLabel(label.text, label.x, label.y, label.width, label.height); + }; + + // multiple throw + this.activityDrawInstructions["intermediateMultipleThrow"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + processDiagramCanvas.drawThrowingMultipleEvent(activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight(), activityImpl.getProperty("name")); + + var label = ProcessDiagramGenerator.getActivitiLabel(activityImpl); + if (label) + processDiagramCanvas.drawLabel(label.text, label.x, label.y, label.width, label.height); + }; + + // none throw + this.activityDrawInstructions["intermediateThrowEvent"] = function() { + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + processDiagramCanvas.drawThrowingNoneEvent(activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight(), activityImpl.getProperty("name")); + + var label = ProcessDiagramGenerator.getActivitiLabel(activityImpl); + if (label) + processDiagramCanvas.drawLabel(label.text, label.x, label.y, label.width, label.height); + }; + + // end event + this.activityDrawInstructions["endEvent"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + processDiagramCanvas.drawNoneEndEvent(activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight()); + }; + + // error end event + this.activityDrawInstructions["errorEndEvent"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + processDiagramCanvas.drawErrorEndEvent(activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight(), null); + + var label = ProcessDiagramGenerator.getActivitiLabel(activityImpl); + if (label) + processDiagramCanvas.drawLabel(label.text, label.x, label.y, label.width, label.height); + }; + + // message end event + this.activityDrawInstructions["messageEndEvent"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + processDiagramCanvas.drawMessageEndEvent(activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight(), null); + + var label = ProcessDiagramGenerator.getActivitiLabel(activityImpl); + if (label) + processDiagramCanvas.drawLabel(label.text, label.x, label.y, label.width, label.height); + }; + + // signal end event + this.activityDrawInstructions["signalEndEvent"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + processDiagramCanvas.drawSignalEndEvent(activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight(), null); + + var label = ProcessDiagramGenerator.getActivitiLabel(activityImpl); + if (label) + processDiagramCanvas.drawLabel(label.text, label.x, label.y, label.width, label.height); + }; + + // multiple end event + this.activityDrawInstructions["multipleEndEvent"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + processDiagramCanvas.drawMultipleEndEvent(activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight(), null); + + var label = ProcessDiagramGenerator.getActivitiLabel(activityImpl); + if (label) + processDiagramCanvas.drawLabel(label.text, label.x, label.y, label.width, label.height); + }; + + // terminate end event + this.activityDrawInstructions["terminateEndEvent"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + processDiagramCanvas.drawTerminateEndEvent(activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight()); + + var label = ProcessDiagramGenerator.getActivitiLabel(activityImpl); + if (label) + processDiagramCanvas.drawLabel(label.text, label.x, label.y, label.width, label.height); + }; + + // error start event + this.activityDrawInstructions["errorStartEvent"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + processDiagramCanvas.drawErrorStartEvent(activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight(), activityImpl.getProperty("name")); + + var label = ProcessDiagramGenerator.getActivitiLabel(activityImpl); + if (label) + processDiagramCanvas.drawLabel(label.text, label.x, label.y, label.width, label.height); + }; + + // task + this.activityDrawInstructions["task"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + // TODO: + //console.error("task is not implemented yet"); + /* + var activityImpl = this; + processDiagramCanvas.drawTask(activityImpl.getProperty("name"), activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight(), thickBorder); + */ + }; + + + // user task + this.activityDrawInstructions["userTask"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + processDiagramCanvas.drawUserTask(activityImpl.getProperty("name"), activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight()); + }; + + // script task + this.activityDrawInstructions["scriptTask"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + processDiagramCanvas.drawScriptTask(activityImpl.getProperty("name"), activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight()); + }; + + // service task + this.activityDrawInstructions["serviceTask"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + processDiagramCanvas.drawServiceTask(activityImpl.getProperty("name"), activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight()); + }; + + // receive task + this.activityDrawInstructions["receiveTask"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + processDiagramCanvas.drawReceiveTask(activityImpl.getProperty("name"), activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight()); + }; + + // send task + this.activityDrawInstructions["sendTask"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + processDiagramCanvas.drawSendTask(activityImpl.getProperty("name"), activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight()); + }; + + // manual task + this.activityDrawInstructions["manualTask"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + processDiagramCanvas.drawManualTask(activityImpl.getProperty("name"), activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight()); + }; + + // businessRuleTask task + this.activityDrawInstructions["businessRuleTask"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + processDiagramCanvas.drawBusinessRuleTask(activityImpl.getProperty("name"), activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight()); + }; + + // exclusive gateway + this.activityDrawInstructions["exclusiveGateway"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + processDiagramCanvas.drawExclusiveGateway(activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight()); + }; + + // inclusive gateway + this.activityDrawInstructions["inclusiveGateway"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + processDiagramCanvas.drawInclusiveGateway(activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight()); + }; + + // parallel gateway + this.activityDrawInstructions["parallelGateway"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + processDiagramCanvas.drawParallelGateway(activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight()); + }; + + // eventBasedGateway + this.activityDrawInstructions["eventBasedGateway"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + processDiagramCanvas.drawEventBasedGateway(activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight()); + }; + + // Boundary timer + this.activityDrawInstructions["boundaryTimer"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + var isInterrupting = activityImpl.getProperty("isInterrupting"); + processDiagramCanvas.drawCatchingTimerEvent(activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight(), isInterrupting, null); + + var label = ProcessDiagramGenerator.getActivitiLabel(activityImpl); + if (label) + processDiagramCanvas.drawLabel(label.text, label.x, label.y, label.width, label.height); + }; + + // Boundary catch error + this.activityDrawInstructions["boundaryError"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + var isInterrupting = activityImpl.getProperty("isInterrupting"); + processDiagramCanvas.drawCatchingErrorEvent(activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight(), isInterrupting, null); + + var label = ProcessDiagramGenerator.getActivitiLabel(activityImpl); + if (label) + processDiagramCanvas.drawLabel(label.text, label.x, label.y, label.width, label.height); + }; + + // Boundary signal event + this.activityDrawInstructions["boundarySignal"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + var isInterrupting = activityImpl.getProperty("isInterrupting"); + processDiagramCanvas.drawCatchingSignalEvent(activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight(), isInterrupting, null); + + var label = ProcessDiagramGenerator.getActivitiLabel(activityImpl); + if (label) + processDiagramCanvas.drawLabel(label.text, label.x, label.y, label.width, label.height); + }; + + // Boundary message event + this.activityDrawInstructions["boundaryMessage"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + var isInterrupting = activityImpl.getProperty("isInterrupting"); + processDiagramCanvas.drawCatchingMessageEvent(activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight(), isInterrupting, null); + + var label = ProcessDiagramGenerator.getActivitiLabel(activityImpl); + if (label) + processDiagramCanvas.drawLabel(label.text, label.x, label.y, label.width, label.height); + }; + + // timer catch event + this.activityDrawInstructions["intermediateTimer"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + var isInterrupting = null; + processDiagramCanvas.drawCatchingTimerEvent(activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight(), isInterrupting, activityImpl.getProperty("name")); + }; + + // subprocess + this.activityDrawInstructions["subProcess"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + // TODO: + + processDiagramCanvas.setConextObject(activityImpl); + + var isExpanded = activityImpl.getProperty("isExpanded"); + var isTriggeredByEvent = activityImpl.getProperty("triggeredByEvent"); + if(isTriggeredByEvent == undefined) { + isTriggeredByEvent = true; + } + // TODO: check why isTriggeredByEvent = true when undefined + isTriggeredByEvent = false; + + if (isExpanded != undefined && isExpanded == false) { + processDiagramCanvas.drawCollapsedSubProcess(activityImpl.getProperty("name"), activityImpl.getX(), activityImpl.getY(), + activityImpl.getWidth(), activityImpl.getHeight(), isTriggeredByEvent); + } else { + processDiagramCanvas.drawExpandedSubProcess(activityImpl.getProperty("name"), activityImpl.getX(), activityImpl.getY(), + activityImpl.getWidth(), activityImpl.getHeight(), isTriggeredByEvent); + } + + //console.error("subProcess is not implemented yet"); + }; + + // call activity + this.activityDrawInstructions["callActivity"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + processDiagramCanvas.drawCollapsedCallActivity(activityImpl.getProperty("name"), activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight()); + }; + + $(document).ready(function(){ + // Protect right click on SVG elements (and on canvas too) + document.body.oncontextmenu = function(event) { + if (window.event.srcElement.tagName == "shape" || window.event.srcElement.tagName == "DIV" && window.event.srcElement.parentElement.className == "diagram") { + + // IE DIAGRAM CANVAS OR SHAPE DETECTED! + return false; + } + return (!Object.isSVGElement(window.event.srcElement)); + }; + }); + }, + + getActivitiLabel:function(activityImpl){ + /* + TODO: Label object should be in activityImpl and looks like: + { + x: 250, + y: 250, + width: 80, + height: 30 + } + And then: + if (!activityImpl.label) + return null; + var label = activityImpl.label; + label.text = activityImpl.name; + return label; + */ + + // But now default label for all events is: + return { + text: activityImpl.getProperty("name"), + x: activityImpl.getX() + .5 + activityImpl.getWidth()/2, + y: activityImpl.getY() + .5 + activityImpl.getHeight() + ICON_PADDING, + width: 100, + height: 0 + }; + }, + + generateDiagram: function(processDefinitionDiagramLayout){ + // Init canvas + var processDefinitionId = processDefinitionDiagramLayout.processDefinition.id; + //console.log("Init canvas ", processDefinitionId); + + if (this.getProcessDiagram(processDefinitionId) != undefined) { + // TODO: may be reset canvas if exists.. Or just show + //console.log("ProcessDiagram '" + processDefinitionId + "' is already generated. Just show it."); + return; + } + var processDiagram = this.initProcessDiagramCanvas(processDefinitionDiagramLayout); + var processDiagramCanvas = processDiagram.diagramCanvas; + + // Draw pool shape, if process is participant in collaboration + + if(processDefinitionDiagramLayout.participantProcess != undefined) { + //console.log("Draw pool shape"); + var pProc = processDefinitionDiagramLayout.participantProcess; + processDiagramCanvas.drawPoolOrLane(pProc.x, pProc.y, pProc.width, pProc.height, pProc.name); + } + + var laneSets = processDefinitionDiagramLayout.laneSets; + var activities = processDefinitionDiagramLayout.activities; + var sequenceFlows = processDefinitionDiagramLayout.sequenceFlows; + + + pb1.set('value', 0); + var cnt = 0; + if (laneSets) + for(var i in laneSets) { + cnt += laneSets[i].lanes.length; + } + if (activities) + cnt += activities.length; + if (sequenceFlows) + cnt += sequenceFlows.length; + var step = (cnt>0)? 100/cnt : 0; + var progress = 0; + //console.log("progress bar step: ", step); + + var task1 = new $.AsyncQueue(); + + // Draw lanes + + task1.add(function (task1) { + if (!laneSets) laneSets = []; + //console.log("> draw lane sets, count:", laneSets.length) + }); + + for(var i in laneSets) { + var laneSet = laneSets[i]; + //laneSet.id, laneSet.name + + task1.add(laneSet.lanes,function (task1, lane) { + progress += step; + pb1.set('value', parseInt(progress)); + + //console.log("--> laneId: " + lane.name + ", name: " + lane.name); + + processDiagramCanvas.drawPoolOrLane(lane.x, lane.y, lane.width, lane.height, lane.name); + }); + } + + // Draw activities + + task1.add(function (task1) { + if (!activities) activities = []; + //console.log("> draw activities, count:", activities.length) + }); + + var activitiesLength = activities.length; + task1.add(activities,function (task1, activityJson) { + var activity = new ActivityImpl(activityJson); + activitiesLength --; + progress += step; + pb1.set('value', parseInt(progress)); + //console.log(activitiesLength, "--> activityId: " + activity.getId() + ", name: " + activity.getProperty("name")); + ProcessDiagramGenerator.drawActivity(processDiagramCanvas, activity); + }); + + // Draw sequence-flows + + task1.add(function (task1) { + if (!sequenceFlows) sequenceFlows = []; + //console.log("> draw sequence flows, count:", sequenceFlows.length) + }); + + var flowsLength = sequenceFlows.length; + task1.add(sequenceFlows,function (task1, flow) { + var waypoints = []; + for(var j in flow.xPointArray) { + waypoints[j] = {x: flow.xPointArray[j], y: flow.yPointArray[j]}; + } + var isDefault = flow.isDefault; + var isConditional = flow.isConditional; + var isHighLighted = flow.isHighLighted; + + // TODO: add source and destination for sequence flows in REST + // parse for test + var f = flow.flow; + var matches = f.match(/\((.*)\)--.*-->\((.*)\)/); + var sourceActivityId, destinationActivityId; + if (matches != null) { + sourceActivityId = matches[1]; + destinationActivityId = matches[2]; + } + flow.sourceActivityId = sourceActivityId; + flow.destinationActivityId = destinationActivityId; + // + flowsLength--; + progress += step; + pb1.set('value', parseInt(progress)); + + //console.log(flowsLength, "--> flow: " + flow.flow); + + processDiagramCanvas.setConextObject(flow); + processDiagramCanvas.drawSequenceflow(waypoints, isConditional, isDefault, isHighLighted); + }); + + task1.onComplete(function(){ + if (progress<100) + pb1.set('value', 100); + //console.log("COMPLETE!!!"); + + //console.timeEnd('generateDiagram'); + }); + + task1.run(); + }, + + getProcessDiagram: function (processDefinitionId) { + return this.processDiagrams[processDefinitionId]; + }, + + initProcessDiagramCanvas: function (processDefinitionDiagramLayout) { + var minX = 0; + var maxX = 0; + var minY = 0; + var maxY = 0; + + if(processDefinitionDiagramLayout.participantProcess != undefined) { + var pProc = processDefinitionDiagramLayout.participantProcess; + + minX = pProc.x; + maxX = pProc.x + pProc.width; + minY = pProc.y; + maxY = pProc.y + pProc.height; + } + + var activities = processDefinitionDiagramLayout.activities; + for(var i in activities) { + var activityJson = activities[i]; + var activity = new ActivityImpl(activityJson); + + // width + if (activity.getX() + activity.getWidth() > maxX) { + maxX = activity.getX() + activity.getWidth(); + } + if (activity.getX() < minX) { + minX = activity.getX(); + } + // height + if (activity.getY() + activity.getHeight() > maxY) { + maxY = activity.getY() + activity.getHeight(); + } + if (activity.getY() < minY) { + minY = activity.getY(); + } + } + + var sequenceFlows = processDefinitionDiagramLayout.sequenceFlows; + for(var i in sequenceFlows) { + var flow = sequenceFlows[i]; + var waypoints = []; + for(var j in flow.xPointArray) { + waypoints[j] = {x: flow.xPointArray[j], y: flow.yPointArray[j]}; + + // width + if (waypoints[j].x > maxX) { + maxX = waypoints[j].x; + } + if (waypoints[j].x < minX) { + minX = waypoints[j].x; + } + // height + if (waypoints[j].y > maxY) { + maxY = waypoints[j].y; + } + if (waypoints[j].y < minY) { + minY = waypoints[j].y; + } + } + } + + var laneSets = processDefinitionDiagramLayout.laneSets; + for(var i in laneSets) { + var laneSet = laneSets[i]; + //laneSet.id, laneSet.name + + for(var j in laneSet.lanes) { + var lane = laneSet.lanes[j]; + // width + if (lane.x + lane.width > maxX) { + maxX = lane.x + lane.width; + } + if (lane.x < minX) { + minX = lane.x; + } + // height + if (lane.y + lane.height > maxY) { + maxY = lane.y + lane.height; + } + if (lane.y < minY) { + minY = lane.y; + } + } + } + + var diagramCanvas = new ProcessDiagramCanvas(); + if (diagramCanvas) { + + // create div in diagramHolder + var diagramHolder = document.getElementById(this.options.diagramHolderId); + if (!diagramHolder) + throw {msg: "Diagram holder not found", error: "diagramHolderNotFound"}; + var div = document.createElement("DIV"); + div.id = processDefinitionDiagramLayout.processDefinition.id; + div.className = "diagram"; + diagramHolder.appendChild(div); + + diagramCanvas.init(maxX + 20, maxY + 20, processDefinitionDiagramLayout.processDefinition.id); + this.processDiagrams[processDefinitionDiagramLayout.processDefinition.id] = { + processDefinitionDiagramLayout: processDefinitionDiagramLayout, + diagramCanvas: diagramCanvas + }; + } + return this.getProcessDiagram(processDefinitionDiagramLayout.processDefinition.id); + //return new ProcessDiagramCanvas(maxX + 10, maxY + 10, minX, minY); + }, + + drawActivity: function(processDiagramCanvas, activity, highLightedActivities) { + var type = activity.getProperty("type"); + var drawInstruction = this.activityDrawInstructions[type]; + if (drawInstruction != null) { + drawInstruction.apply({processDiagramCanvas:processDiagramCanvas, activity:activity}); + } else { + //console.error("no drawInstruction for " + type + ": ", activity); + } + + // Actually draw the markers + if (activity.getProperty("multiInstance") != undefined || activity.getProperty("collapsed") != undefined) { + //console.log(activity.getProperty("name"), activity.properties); + var multiInstanceSequential = (activity.getProperty("multiInstance") == "sequential"); + var multiInstanceParallel = (activity.getProperty("multiInstance") == "parrallel"); + var collapsed = activity.getProperty("collapsed"); + processDiagramCanvas.drawActivityMarkers(activity.getX(), activity.getY(), activity.getWidth(), activity.getHeight(), + multiInstanceSequential, multiInstanceParallel, collapsed); + } + /* + processDiagramCanvas.drawActivityMarkers(activity.getX(), activity.getY(), activity.getWidth(), activity.getHeight(), multiInstanceSequential, + multiInstanceParallel, collapsed); + */ + + // TODO: Draw highlighted activities if they are present + + }, + + setHighLights: function(highLights){ + if (highLights.processDefinitionId == undefined) { + //console.error("Process instance " + highLights.processInstanceId + " doesn't exist"); + return; + } + + var processDiagram = this.getProcessDiagram(highLights.processDefinitionId); + if (processDiagram == undefined) { + //console.error("Process diagram " + highLights.processDefinitionId + " not found"); + return; + } + + var processDiagramCanvas = processDiagram.diagramCanvas; + + // TODO: remove highLightes from all activities before set new highLight + for (var i in highLights.activities) { + var activityId = highLights.activities[i]; + processDiagramCanvas.highLightActivity(activityId); + } + + // TODO: remove highLightes from all flows before set new highLight + for (var i in highLights.flows) { + var flowId = highLights.flows[i]; + var object = processDiagramCanvas.g.getById(flowId); + var flow = object.data("contextObject"); + flow.isHighLighted = true; + processDiagramCanvas.highLightFlow(flowId); + } + }, + + drawHighLights: function(processInstanceId) { + // Load highLights for the processInstanceId + /* + var url = Lang.sub(this.options.processInstanceHighLightsUrl, {processInstanceId: processInstanceId}); + $.ajax({ + url: url, + type: 'GET', + dataType: 'json', + cache: false, + async: true, + }).done(function(data) { + var highLights = data; + if (!highLights) { + console.log("highLights not found"); + return; + } + + console.log("highLights[" + highLights.processDefinitionId + "][" + processInstanceId + "]: ", highLights); + + ProcessDiagramGenerator.setHighLights(highLights); + }).fail(function(jqXHR, textStatus){ + console.log('Get HighLights['+processDefinitionId+'] failure: ', textStatus, jqXHR); + }); + */ + ActivitiRest.getHighLights(processInstanceId, this._drawHighLights); + }, + _drawHighLights: function() { + var highLights = this.highLights; + ProcessDiagramGenerator.setHighLights(highLights); + }, + + // Load processDefinition + + drawDiagram: function(processDefinitionId) { + // Hide all diagrams + var diagrams = $("#" + this.options.diagramHolderId + " div.diagram"); + diagrams.addClass("hidden"); + + + // If processDefinitionId doesn't contain ":" then it's a "processDefinitionKey", not an id. + // Get process definition by key + if (processDefinitionId.indexOf(":") < 0) { + ActivitiRest.getProcessDefinitionByKey(processDefinitionId, this._drawDiagram); + } else { + this._drawDiagram.apply({processDefinitionId: processDefinitionId}); + } + }, + _drawDiagram: function() { + var processDefinitionId = this.processDefinitionId; + + ProcessDiagramGenerator.addBreadCrumbsItem(processDefinitionId); + + + // Check if processDefinition is already loaded and rendered + + + var processDiagram = ProcessDiagramGenerator.getProcessDiagram(processDefinitionId); + + if (processDiagram != undefined && processDiagram != null) { + //console.log("Process diagram " + processDefinitionId + " is already loaded"); + //return; + + var diagram = document.getElementById(processDefinitionId); + $(diagram).removeClass("hidden"); + + // Regenerate image + var processDefinitionDiagramLayout = processDiagram.processDefinitionDiagramLayout; + ProcessDiagramGenerator.generateDiagram(processDefinitionDiagramLayout); + + return; + } + + //console.time('loadDiagram'); + + // Load processDefinition + + ActivitiRest.getProcessDefinition(processDefinitionId, ProcessDiagramGenerator._generateDiagram); + }, + _generateDiagram: function() { + var processDefinitionDiagramLayout = this.processDefinitionDiagramLayout; + + //console.log("process-definition-diagram-layout["+processDefinitionDiagramLayout.processDefinition.id+"]: ", processDefinitionDiagramLayout); + + //console.timeEnd('loadDiagram'); + //console.time('generateDiagram'); + + pb1.set('value', 0); + ProcessDiagramGenerator.generateDiagram(processDefinitionDiagramLayout); + }, + + getProcessDefinitionByKey: function(processDefinitionKey) { + var url = Lang.sub(this.options.processDefinitionByKeyUrl, {processDefinitionKey: processDefinitionKey}); + + var processDefinition; + $.ajax({ + url: url, + type: 'POST', + dataType: 'json', + cache: false, + async: false + }).done(function(data) { + //console.log("ajax returned data"); + //console.log("ajax returned data:", data); + processDefinition = data; + if (!processDefinition) { + //console.error("Process definition '" + processDefinitionKey + "' not found"); + } + }).fail(function(jqXHR, textStatus){ + //console.error('Get diagram layout['+processDefinitionKey+'] failure: ', textStatus, jqXHR); + }); + + if (processDefinition) { + //console.log("Get process definition by key '" + processDefinitionKey + "': ", processDefinition.id); + return processDefinition; + } else { + return null; + } + }, + + addBreadCrumbsItem: function(processDefinitionId){ + var TPL_UL_CONTAINER = '
      ', + TPL_LI_CONTAINER = '
    • {name}
    • '; + + if (!this.diagramBreadCrumbs) + this.diagramBreadCrumbs = $("#" + this.options.diagramBreadCrumbsId); + if (!this.diagramBreadCrumbs) return; + + + var ul = this.diagramBreadCrumbs.find("ul"); + //console.log("ul: ", ul); + if (ul.size() == 0) { + ul = $(TPL_UL_CONTAINER); + this.diagramBreadCrumbs.append(ul); + + } + var liListOld = ul.find("li"); + //console.warn("liListOld", liListOld); + + // TODO: if there is any items after current then remove that before adding new item (m.b. it is a duplicate) + var currentBreadCrumbsItemId = this.currentBreadCrumbsItemId; + found = false; + liListOld.each( + function(index, item) { + //console.warn("item:", $(this)); + if (!found && currentBreadCrumbsItemId == $(this).attr("id")) { + found = true; + return; + } + if (found) { + //console.warn("remove ", $(this).attr("id")); + $(this).remove(); + } + } + ); + + var liListNew = ul.find("li"); + + //console.log("liListNew size: ", liListNew.size()); + var values = { + id: 'breadCrumbsItem_' + liListNew.size(), + processDefinitionId: processDefinitionId, + name: processDefinitionId + }; + + + var tpl = Lang.sub(TPL_LI_CONTAINER, values); + //console.log("tpl: ", tpl); + ul.append(tpl); + + var li = ul.find("#" + values.id); + //console.warn("li:", li); + $('#' + values.id).on('click', this._breadCrumbsItemClick); + + ul.find("li").removeClass("selected"); + li.attr("num", liListNew.size()); + li.addClass("selected"); + this.currentBreadCrumbsItemId = li.attr("id"); + }, + _breadCrumbsItemClick: function(){ + var li = $(this), + id = li.attr("id"), + processDefinitionId = li.attr("processDefinitionId"); + //console.warn("_breadCrumbsItemClick: ", id, ", processDefinitionId: ", processDefinitionId); + + var ul = ProcessDiagramGenerator.diagramBreadCrumbs.one("ul"); + ul.find("li").removeClass("selected"); + li.addClass("selected"); + ProcessDiagramGenerator.currentBreadCrumbsItemId = li.attr("id"); + + // Hide all diagrams + var diagrams = $("#"+ProcessDiagramGenerator.options.diagramHolderId+" div.diagram"); + diagrams.addClass("hidden"); + + var processDiagram = ProcessDiagramGenerator.getProcessDiagram(processDefinitionId); + + var diagram = document.getElementById(processDefinitionId); + if (!diagram) return; + $(diagram).removeClass("hidden"); + + // Regenerate image + var processDefinitionDiagramLayout = processDiagram.processDefinitionDiagramLayout; + ProcessDiagramGenerator.generateDiagram(processDefinitionDiagramLayout); + }, + + showFlowInfo: function(flow){ + var diagramInfo = $("#" + this.options.diagramInfoId); + if (!diagramInfo) return; + + var values = { + flow: flow.flow, + isDefault: (flow.isDefault)? "true":"", + isConditional: (flow.isConditional)? "true":"", + isHighLighted: (flow.isHighLighted)? "true":"", + sourceActivityId: flow.sourceActivityId, + destinationActivityId: flow.destinationActivityId + }; + var TPL_FLOW_INFO = '
      {flow}
      ' + + '
      sourceActivityId: {sourceActivityId}
      ' + + '
      destinationActivityId: {destinationActivityId}
      ' + + '
      isDefault: {isDefault}
      ' + + '
      isConditional: {isConditional}
      ' + + '
      isHighLighted: {isHighLighted}
      '; + var tpl = Lang.sub(TPL_FLOW_INFO, values); + //console.log("info: ", tpl); + diagramInfo.html(tpl); + }, + + showActivityInfo: function(activity){ + var diagramInfo = $("#" + this.options.diagramInfoId); + if (!diagramInfo) return; + + var values = { + activityId: activity.getId(), + name: activity.getProperty("name"), + type: activity.getProperty("type") + }; + var TPL_ACTIVITY_INFO = '' + + '
      activityId: {activityId}
      ' + + '
      name: {name}
      ' + + '
      type: {type}
      '; + var TPL_CALLACTIVITY_INFO = '' + + '
      collapsed: {collapsed}
      ' + + '
      processDefinitonKey: {processDefinitonKey}
      '; + + var template = TPL_ACTIVITY_INFO; + if (activity.getProperty("type") == "callActivity") { + values.collapsed = activity.getProperty("collapsed"); + values.processDefinitonKey = activity.getProperty("processDefinitonKey"); + template += TPL_CALLACTIVITY_INFO; + } else if (activity.getProperty("type") == "callActivity") { + + } + + var tpl = Lang.sub(template, values); + //console.log("info: ", tpl); + diagramInfo.html(tpl); + }, + + hideInfo: function(){ + var diagramInfo = $("#" + this.options.diagramInfoId); + if (!diagramInfo) return; + diagramInfo.html(""); + }, + + vvoid: function(){} +}; + +var Lang = { + SUBREGEX: /\{\s*([^\|\}]+?)\s*(?:\|([^\}]*))?\s*\}/g, + UNDEFINED: 'undefined', + isUndefined: function(o) { + return typeof o === Lang.UNDEFINED; + }, + sub: function(s, o) { + return ((s.replace) ? s.replace(Lang.SUBREGEX, function(match, key) { + return (!Lang.isUndefined(o[key])) ? o[key] : match; + }) : s); + } +}; + +if (Lang.isUndefined(console)) { + console = { log: function() {}, warn: function() {}, error: function() {}}; +} +ProcessDiagramGenerator.init(); \ No newline at end of file diff --git a/hsweb-ui/workflow/diagram-viewer/js/jquery/jquery.asyncqueue.js b/hsweb-ui/workflow/diagram-viewer/js/jquery/jquery.asyncqueue.js new file mode 100644 index 0000000..7f9d4d0 --- /dev/null +++ b/hsweb-ui/workflow/diagram-viewer/js/jquery/jquery.asyncqueue.js @@ -0,0 +1,125 @@ +/* +* This file is part of the jquery plugin "asyncQueue". +* +* (c) Sebastien Roch +* @author (parallel) Dmitry Farafonov +* +* For the full copyright and license information, please view the LICENSE +* file that was distributed with this source code. +*/ +(function($){ + $.AsyncQueue = function() { + var that = this, + queue = [], + completeFunc, + failureFunc, + paused = false, + lastCallbackData, + _run, + _complete, + inQueue = 0, + defaultTimeOut = 10; + + _run = function() { + var f = queue.shift(); + + if (f) { + inQueue++; + setTimeout(function(){ + f.fn.apply(that, [that]); + + if (!f.isParallel) + if (paused === false) { + _run(); + } + inQueue --; + if (inQueue == 0 && queue.length == 0) + _complete(); + }, f.timeOut); + + if (f.isParallel) + if (paused === false) { + _run(); + } + } + }; + + _complete = function(){ + if (completeFunc) + completeFunc.apply(that, [that]); + }; + + this.onComplete = function(func) { + completeFunc = func; + }; + + this.onFailure = function(func) { + failureFunc = func; + }; + + this.add = function(func) { + // TODO: add callback for queue[i] complete + + var obj = arguments[0]; + if (obj && Object.prototype.toString.call(obj) === "[object Array]") { + var fn = arguments[1]; + var timeOut = (typeof(arguments[2]) != "undefined")? arguments[2] : defaultTimeOut; + if (typeof(fn) == "function") { + for(var i = 0; i < obj.length; i++) { + var f = function(objx){ + queue.push({isParallel: true, fn: function(){fn.apply(that, [that, objx]);}, timeOut: timeOut}); + }(obj[i]) + } + } + } else { + var fn = arguments[0]; + var timeOut = (typeof(arguments[1]) != "undefined")? arguments[2] : defaultTimeOut; + queue.push({isParallel: false, fn: func, timeOut: timeOut}); + } + return this; + }; + + this.addParallel = function(func, timeOut) { + // TODO: add callback for queue[i] complete + + queue.push({isParallel: true, fn: func, timeOut: timeOut}); + return this; + }; + + this.storeData = function(dataObject) { + lastCallbackData = dataObject; + return this; + }; + + this.lastCallbackData = function () { + return lastCallbackData; + }; + + this.run = function() { + paused = false; + _run(); + }; + + this.pause = function () { + paused = true; + return this; + }; + + this.failure = function() { + paused = true; + if (failureFunc) { + var args = [that]; + for(i = 0; i < arguments.length; i++) { + args.push(arguments[i]); + } + failureFunc.apply(that, args); + } + }; + + this.size = function(){ + return queue.length; + }; + + return this; + } +})(jQuery); diff --git a/hsweb-ui/workflow/diagram-viewer/js/jquery/jquery.js b/hsweb-ui/workflow/diagram-viewer/js/jquery/jquery.js new file mode 100644 index 0000000..8ccd0ea --- /dev/null +++ b/hsweb-ui/workflow/diagram-viewer/js/jquery/jquery.js @@ -0,0 +1,9266 @@ +/*! + * jQuery JavaScript Library v1.7.1 + * http://jquery.com/ + * + * Copyright 2011, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * Copyright 2011, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * + * Date: Mon Nov 21 21:11:03 2011 -0500 + */ +(function( window, undefined ) { + +// Use the correct document accordingly with window argument (sandbox) +var document = window.document, + navigator = window.navigator, + location = window.location; +var jQuery = (function() { + +// Define a local copy of jQuery +var jQuery = function( selector, context ) { + // The jQuery object is actually just the init constructor 'enhanced' + return new jQuery.fn.init( selector, context, rootjQuery ); + }, + + // Map over jQuery in case of overwrite + _jQuery = window.jQuery, + + // Map over the $ in case of overwrite + _$ = window.$, + + // A central reference to the root jQuery(document) + rootjQuery, + + // A simple way to check for HTML strings or ID strings + // Prioritize #id over to avoid XSS via location.hash (#9521) + quickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/, + + // Check if a string has a non-whitespace character in it + rnotwhite = /\S/, + + // Used for trimming whitespace + trimLeft = /^\s+/, + trimRight = /\s+$/, + + // Match a standalone tag + rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/, + + // JSON RegExp + rvalidchars = /^[\],:{}\s]*$/, + rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, + rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, + rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, + + // Useragent RegExp + rwebkit = /(webkit)[ \/]([\w.]+)/, + ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/, + rmsie = /(msie) ([\w.]+)/, + rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/, + + // Matches dashed string for camelizing + rdashAlpha = /-([a-z]|[0-9])/ig, + rmsPrefix = /^-ms-/, + + // Used by jQuery.camelCase as callback to replace() + fcamelCase = function( all, letter ) { + return ( letter + "" ).toUpperCase(); + }, + + // Keep a UserAgent string for use with jQuery.browser + userAgent = navigator.userAgent, + + // For matching the engine and version of the browser + browserMatch, + + // The deferred used on DOM ready + readyList, + + // The ready event handler + DOMContentLoaded, + + // Save a reference to some core methods + toString = Object.prototype.toString, + hasOwn = Object.prototype.hasOwnProperty, + push = Array.prototype.push, + slice = Array.prototype.slice, + trim = String.prototype.trim, + indexOf = Array.prototype.indexOf, + + // [[Class]] -> type pairs + class2type = {}; + +jQuery.fn = jQuery.prototype = { + constructor: jQuery, + init: function( selector, context, rootjQuery ) { + var match, elem, ret, doc; + + // Handle $(""), $(null), or $(undefined) + if ( !selector ) { + return this; + } + + // Handle $(DOMElement) + if ( selector.nodeType ) { + this.context = this[0] = selector; + this.length = 1; + return this; + } + + // The body element only exists once, optimize finding it + if ( selector === "body" && !context && document.body ) { + this.context = document; + this[0] = document.body; + this.selector = selector; + this.length = 1; + return this; + } + + // Handle HTML strings + if ( typeof selector === "string" ) { + // Are we dealing with HTML string or an ID? + 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 = quickExpr.exec( selector ); + } + + // Verify a match, and that no context was specified for #id + if ( match && (match[1] || !context) ) { + + // HANDLE: $(html) -> $(array) + if ( match[1] ) { + context = context instanceof jQuery ? context[0] : context; + doc = ( context ? context.ownerDocument || context : document ); + + // If a single string is passed in and it's a single tag + // just do a createElement and skip the rest + ret = rsingleTag.exec( selector ); + + if ( ret ) { + if ( jQuery.isPlainObject( context ) ) { + selector = [ document.createElement( ret[1] ) ]; + jQuery.fn.attr.call( selector, context, true ); + + } else { + selector = [ doc.createElement( ret[1] ) ]; + } + + } else { + ret = jQuery.buildFragment( [ match[1] ], [ doc ] ); + selector = ( ret.cacheable ? jQuery.clone(ret.fragment) : ret.fragment ).childNodes; + } + + return jQuery.merge( this, selector ); + + // 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 || rootjQuery ).find( selector ); + + // HANDLE: $(expr, context) + // (which is just equivalent to: $(context).find(expr) + } else { + return this.constructor( context ).find( selector ); + } + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( jQuery.isFunction( selector ) ) { + return rootjQuery.ready( selector ); + } + + if ( selector.selector !== undefined ) { + this.selector = selector.selector; + this.context = selector.context; + } + + return jQuery.makeArray( selector, this ); + }, + + // Start with an empty selector + selector: "", + + // The current version of jQuery being used + jquery: "1.7.1", + + // The default length of a jQuery object is 0 + length: 0, + + // The number of elements contained in the matched element set + size: function() { + return this.length; + }, + + toArray: function() { + return slice.call( this, 0 ); + }, + + // 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 a 'clean' array + this.toArray() : + + // Return just the object + ( num < 0 ? this[ this.length + num ] : this[ num ] ); + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems, name, selector ) { + // Build a new jQuery matched element set + var ret = this.constructor(); + + if ( jQuery.isArray( elems ) ) { + push.apply( ret, elems ); + + } else { + jQuery.merge( ret, elems ); + } + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + + ret.context = this.context; + + if ( name === "find" ) { + ret.selector = this.selector + ( this.selector ? " " : "" ) + selector; + } else if ( name ) { + ret.selector = this.selector + "." + name + "(" + selector + ")"; + } + + // Return the newly-formed element set + return ret; + }, + + // Execute a callback for every element in the matched set. + // (You can seed the arguments with an array of args, but this is + // only used internally.) + each: function( callback, args ) { + return jQuery.each( this, callback, args ); + }, + + ready: function( fn ) { + // Attach the listeners + jQuery.bindReady(); + + // Add the callback + readyList.add( fn ); + + return this; + }, + + eq: function( i ) { + i = +i; + return i === -1 ? + this.slice( i ) : + this.slice( i, i + 1 ); + }, + + first: function() { + return this.eq( 0 ); + }, + + last: function() { + return this.eq( -1 ); + }, + + slice: function() { + return this.pushStack( slice.apply( this, arguments ), + "slice", slice.call(arguments).join(",") ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map(this, function( elem, i ) { + return callback.call( elem, i, elem ); + })); + }, + + end: function() { + return this.prevObject || this.constructor(null); + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: push, + sort: [].sort, + splice: [].splice +}; + +// Give the init function the jQuery prototype for later instantiation +jQuery.fn.init.prototype = jQuery.fn; + +jQuery.extend = jQuery.fn.extend = function() { + var options, name, src, copy, copyIsArray, clone, + target = arguments[0] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + target = arguments[1] || {}; + // skip the boolean and the target + i = 2; + } + + // 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 ( length === i ) { + 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({ + noConflict: function( deep ) { + if ( window.$ === jQuery ) { + window.$ = _$; + } + + if ( deep && window.jQuery === jQuery ) { + window.jQuery = _jQuery; + } + + return jQuery; + }, + + // 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 ) { + // Either a released hold or an DOMready/load event and not yet ready + if ( (wait === true && !--jQuery.readyWait) || (wait !== true && !jQuery.isReady) ) { + // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). + if ( !document.body ) { + return setTimeout( jQuery.ready, 1 ); + } + + // 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.fireWith( document, [ jQuery ] ); + + // Trigger any bound ready events + if ( jQuery.fn.trigger ) { + jQuery( document ).trigger( "ready" ).off( "ready" ); + } + } + }, + + bindReady: function() { + if ( readyList ) { + return; + } + + readyList = jQuery.Callbacks( "once memory" ); + + // Catch cases where $(document).ready() is called after the + // browser event has already occurred. + if ( document.readyState === "complete" ) { + // Handle it asynchronously to allow scripts the opportunity to delay ready + return setTimeout( jQuery.ready, 1 ); + } + + // Mozilla, Opera and webkit nightlies currently support this event + if ( document.addEventListener ) { + // Use the handy event callback + document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false ); + + // A fallback to window.onload, that will always work + window.addEventListener( "load", jQuery.ready, false ); + + // If IE event model is used + } else if ( document.attachEvent ) { + // ensure firing before onload, + // maybe late but safe also for iframes + document.attachEvent( "onreadystatechange", DOMContentLoaded ); + + // A fallback to window.onload, that will always work + window.attachEvent( "onload", jQuery.ready ); + + // If IE and not a frame + // continually check to see if the document is ready + var toplevel = false; + + try { + toplevel = window.frameElement == null; + } catch(e) {} + + if ( document.documentElement.doScroll && toplevel ) { + doScrollCheck(); + } + } + }, + + // 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"; + }, + + // A crude way of determining if an object is a window + isWindow: function( obj ) { + return obj && typeof obj === "object" && "setInterval" in obj; + }, + + isNumeric: function( obj ) { + return !isNaN( parseFloat(obj) ) && isFinite( obj ); + }, + + type: function( obj ) { + return obj == null ? + String( obj ) : + class2type[ toString.call(obj) ] || "object"; + }, + + isPlainObject: function( obj ) { + // 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; + } + + // Own properties are enumerated firstly, so to speed up, + // if last one is own, then all properties are own. + + var key; + for ( key in obj ) {} + + return key === undefined || hasOwn.call( obj, key ); + }, + + isEmptyObject: function( obj ) { + for ( var name in obj ) { + return false; + } + return true; + }, + + error: function( msg ) { + throw new Error( msg ); + }, + + parseJSON: function( data ) { + if ( typeof data !== "string" || !data ) { + return null; + } + + // Make sure leading/trailing whitespace is removed (IE can't handle it) + data = jQuery.trim( data ); + + // Attempt to parse using the native JSON parser first + if ( window.JSON && window.JSON.parse ) { + return window.JSON.parse( data ); + } + + // Make sure the incoming data is actual JSON + // Logic borrowed from http://json.org/json2.js + if ( rvalidchars.test( data.replace( rvalidescape, "@" ) + .replace( rvalidtokens, "]" ) + .replace( rvalidbraces, "")) ) { + + return ( new Function( "return " + data ) )(); + + } + jQuery.error( "Invalid JSON: " + data ); + }, + + // Cross-browser xml parsing + parseXML: function( data ) { + var xml, tmp; + try { + if ( window.DOMParser ) { // Standard + tmp = new DOMParser(); + xml = tmp.parseFromString( data , "text/xml" ); + } else { // IE + xml = new ActiveXObject( "Microsoft.XMLDOM" ); + xml.async = "false"; + xml.loadXML( data ); + } + } catch( e ) { + xml = undefined; + } + if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) { + jQuery.error( "Invalid XML: " + data ); + } + return xml; + }, + + noop: function() {}, + + // Evaluates a script in a global context + // 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 && rnotwhite.test( 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 ); + } )( 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.toUpperCase() === name.toUpperCase(); + }, + + // args is for internal usage only + each: function( object, callback, args ) { + var name, i = 0, + length = object.length, + isObj = length === undefined || jQuery.isFunction( object ); + + if ( args ) { + if ( isObj ) { + for ( name in object ) { + if ( callback.apply( object[ name ], args ) === false ) { + break; + } + } + } else { + for ( ; i < length; ) { + if ( callback.apply( object[ i++ ], args ) === false ) { + break; + } + } + } + + // A special, fast, case for the most common use of each + } else { + if ( isObj ) { + for ( name in object ) { + if ( callback.call( object[ name ], name, object[ name ] ) === false ) { + break; + } + } + } else { + for ( ; i < length; ) { + if ( callback.call( object[ i ], i, object[ i++ ] ) === false ) { + break; + } + } + } + } + + return object; + }, + + // Use native String.trim function wherever possible + trim: trim ? + function( text ) { + return text == null ? + "" : + trim.call( text ); + } : + + // Otherwise use our own trimming functionality + function( text ) { + return text == null ? + "" : + text.toString().replace( trimLeft, "" ).replace( trimRight, "" ); + }, + + // results is for internal usage only + makeArray: function( array, results ) { + var ret = results || []; + + if ( array != null ) { + // The window, strings (and functions) also have 'length' + // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930 + var type = jQuery.type( array ); + + if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) { + push.call( ret, array ); + } else { + jQuery.merge( ret, array ); + } + } + + return ret; + }, + + inArray: function( elem, array, i ) { + var len; + + if ( array ) { + if ( indexOf ) { + return indexOf.call( array, elem, i ); + } + + len = array.length; + i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; + + for ( ; i < len; i++ ) { + // Skip accessing in sparse arrays + if ( i in array && array[ i ] === elem ) { + return i; + } + } + } + + return -1; + }, + + merge: function( first, second ) { + var i = first.length, + j = 0; + + if ( typeof second.length === "number" ) { + for ( var l = second.length; j < l; j++ ) { + first[ i++ ] = second[ j ]; + } + + } else { + while ( second[j] !== undefined ) { + first[ i++ ] = second[ j++ ]; + } + } + + first.length = i; + + return first; + }, + + grep: function( elems, callback, inv ) { + var ret = [], retVal; + inv = !!inv; + + // Go through the array, only saving the items + // that pass the validator function + for ( var i = 0, length = elems.length; i < length; i++ ) { + retVal = !!callback( elems[ i ], i ); + if ( inv !== retVal ) { + ret.push( elems[ i ] ); + } + } + + return ret; + }, + + // arg is for internal usage only + map: function( elems, callback, arg ) { + var value, key, ret = [], + i = 0, + length = elems.length, + // jquery objects are treated as arrays + isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ; + + // Go through the array, translating each of the items to their + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret[ ret.length ] = value; + } + } + + // Go through every key on the object, + } else { + for ( key in elems ) { + value = callback( elems[ key ], key, arg ); + + if ( value != null ) { + ret[ ret.length ] = value; + } + } + } + + // Flatten any nested arrays + return ret.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 ) { + if ( typeof context === "string" ) { + var 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 + var args = slice.call( arguments, 2 ), + proxy = function() { + return fn.apply( context, 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 || proxy.guid || jQuery.guid++; + + return proxy; + }, + + // Mutifunctional method to get and set values to a collection + // The value/s can optionally be executed if it's a function + access: function( elems, key, value, exec, fn, pass ) { + var length = elems.length; + + // Setting many attributes + if ( typeof key === "object" ) { + for ( var k in key ) { + jQuery.access( elems, k, key[k], exec, fn, value ); + } + return elems; + } + + // Setting one attribute + if ( value !== undefined ) { + // Optionally, function values get executed if exec is true + exec = !pass && exec && jQuery.isFunction(value); + + for ( var i = 0; i < length; i++ ) { + fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass ); + } + + return elems; + } + + // Getting an attribute + return length ? fn( elems[0], key ) : undefined; + }, + + now: function() { + return ( new Date() ).getTime(); + }, + + // Use of jQuery.browser is frowned upon. + // More details: http://docs.jquery.com/Utilities/jQuery.browser + uaMatch: function( ua ) { + ua = ua.toLowerCase(); + + var match = rwebkit.exec( ua ) || + ropera.exec( ua ) || + rmsie.exec( ua ) || + ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) || + []; + + return { browser: match[1] || "", version: match[2] || "0" }; + }, + + sub: function() { + function jQuerySub( selector, context ) { + return new jQuerySub.fn.init( selector, context ); + } + jQuery.extend( true, jQuerySub, this ); + jQuerySub.superclass = this; + jQuerySub.fn = jQuerySub.prototype = this(); + jQuerySub.fn.constructor = jQuerySub; + jQuerySub.sub = this.sub; + jQuerySub.fn.init = function init( selector, context ) { + if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) { + context = jQuerySub( context ); + } + + return jQuery.fn.init.call( this, selector, context, rootjQuerySub ); + }; + jQuerySub.fn.init.prototype = jQuerySub.fn; + var rootjQuerySub = jQuerySub(document); + return jQuerySub; + }, + + browser: {} +}); + +// Populate the class2type map +jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) { + class2type[ "[object " + name + "]" ] = name.toLowerCase(); +}); + +browserMatch = jQuery.uaMatch( userAgent ); +if ( browserMatch.browser ) { + jQuery.browser[ browserMatch.browser ] = true; + jQuery.browser.version = browserMatch.version; +} + +// Deprecated, use jQuery.browser.webkit instead +if ( jQuery.browser.webkit ) { + jQuery.browser.safari = true; +} + +// IE doesn't match non-breaking spaces with \s +if ( rnotwhite.test( "\xA0" ) ) { + trimLeft = /^[\s\xA0]+/; + trimRight = /[\s\xA0]+$/; +} + +// All jQuery objects should point back to these +rootjQuery = jQuery(document); + +// Cleanup functions for the document ready method +if ( document.addEventListener ) { + DOMContentLoaded = function() { + document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false ); + jQuery.ready(); + }; + +} else if ( document.attachEvent ) { + DOMContentLoaded = function() { + // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). + if ( document.readyState === "complete" ) { + document.detachEvent( "onreadystatechange", DOMContentLoaded ); + jQuery.ready(); + } + }; +} + +// The DOM ready check for Internet Explorer +function doScrollCheck() { + if ( jQuery.isReady ) { + return; + } + + try { + // If IE is used, use the trick by Diego Perini + // http://javascript.nwbox.com/IEContentLoaded/ + document.documentElement.doScroll("left"); + } catch(e) { + setTimeout( doScrollCheck, 1 ); + return; + } + + // and execute any waiting functions + jQuery.ready(); +} + +return jQuery; + +})(); + + +// String to Object flags format cache +var flagsCache = {}; + +// Convert String-formatted flags into Object-formatted ones and store in cache +function createFlags( flags ) { + var object = flagsCache[ flags ] = {}, + i, length; + flags = flags.split( /\s+/ ); + for ( i = 0, length = flags.length; i < length; i++ ) { + object[ flags[i] ] = true; + } + return object; +} + +/* + * Create a callback list using the following parameters: + * + * flags: an optional list of space-separated flags that will change how + * the callback list behaves + * + * By default a callback list will act like an event callback list and can be + * "fired" multiple times. + * + * Possible flags: + * + * 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( flags ) { + + // Convert flags from String-formatted to Object-formatted + // (we check in cache first) + flags = flags ? ( flagsCache[ flags ] || createFlags( flags ) ) : {}; + + var // Actual callback list + list = [], + // Stack of fire calls for repeatable lists + stack = [], + // Last fire value (for non-forgettable lists) + memory, + // Flag to know if list is currently firing + firing, + // First callback to fire (used internally by add and fireWith) + firingStart, + // End of the loop when firing + firingLength, + // Index of currently firing callback (modified by remove if needed) + firingIndex, + // Add one or several callbacks to the list + add = function( args ) { + var i, + length, + elem, + type, + actual; + for ( i = 0, length = args.length; i < length; i++ ) { + elem = args[ i ]; + type = jQuery.type( elem ); + if ( type === "array" ) { + // Inspect recursively + add( elem ); + } else if ( type === "function" ) { + // Add if not in unique mode and callback is not in + if ( !flags.unique || !self.has( elem ) ) { + list.push( elem ); + } + } + } + }, + // Fire callbacks + fire = function( context, args ) { + args = args || []; + memory = !flags.memory || [ context, args ]; + firing = true; + firingIndex = firingStart || 0; + firingStart = 0; + firingLength = list.length; + for ( ; list && firingIndex < firingLength; firingIndex++ ) { + if ( list[ firingIndex ].apply( context, args ) === false && flags.stopOnFalse ) { + memory = true; // Mark as halted + break; + } + } + firing = false; + if ( list ) { + if ( !flags.once ) { + if ( stack && stack.length ) { + memory = stack.shift(); + self.fireWith( memory[ 0 ], memory[ 1 ] ); + } + } else if ( memory === true ) { + self.disable(); + } else { + list = []; + } + } + }, + // Actual Callbacks object + self = { + // Add a callback or a collection of callbacks to the list + add: function() { + if ( list ) { + var length = list.length; + add( arguments ); + // Do we need to add the callbacks to the + // current firing batch? + if ( firing ) { + firingLength = list.length; + // With memory, if we're not firing then + // we should call right away, unless previous + // firing was halted (stopOnFalse) + } else if ( memory && memory !== true ) { + firingStart = length; + fire( memory[ 0 ], memory[ 1 ] ); + } + } + return this; + }, + // Remove a callback from the list + remove: function() { + if ( list ) { + var args = arguments, + argIndex = 0, + argLength = args.length; + for ( ; argIndex < argLength ; argIndex++ ) { + for ( var i = 0; i < list.length; i++ ) { + if ( args[ argIndex ] === list[ i ] ) { + // Handle firingIndex and firingLength + if ( firing ) { + if ( i <= firingLength ) { + firingLength--; + if ( i <= firingIndex ) { + firingIndex--; + } + } + } + // Remove the element + list.splice( i--, 1 ); + // If we have some unicity property then + // we only need to do this once + if ( flags.unique ) { + break; + } + } + } + } + } + return this; + }, + // Control if a given callback is in the list + has: function( fn ) { + if ( list ) { + var i = 0, + length = list.length; + for ( ; i < length; i++ ) { + if ( fn === list[ i ] ) { + return true; + } + } + } + return false; + }, + // Remove all callbacks from the list + empty: function() { + list = []; + return this; + }, + // Have the list do nothing anymore + disable: function() { + list = stack = memory = undefined; + return this; + }, + // Is it disabled? + disabled: function() { + return !list; + }, + // Lock the list in its current state + lock: function() { + stack = undefined; + if ( !memory || memory === true ) { + self.disable(); + } + return this; + }, + // Is it locked? + locked: function() { + return !stack; + }, + // Call all callbacks with the given context and arguments + fireWith: function( context, args ) { + if ( stack ) { + if ( firing ) { + if ( !flags.once ) { + stack.push( [ context, args ] ); + } + } else if ( !( flags.once && memory ) ) { + fire( context, args ); + } + } + 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 !!memory; + } + }; + + return self; +}; + + + + +var // Static reference to slice + sliceDeferred = [].slice; + +jQuery.extend({ + + Deferred: function( func ) { + var doneList = jQuery.Callbacks( "once memory" ), + failList = jQuery.Callbacks( "once memory" ), + progressList = jQuery.Callbacks( "memory" ), + state = "pending", + lists = { + resolve: doneList, + reject: failList, + notify: progressList + }, + promise = { + done: doneList.add, + fail: failList.add, + progress: progressList.add, + + state: function() { + return state; + }, + + // Deprecated + isResolved: doneList.fired, + isRejected: failList.fired, + + then: function( doneCallbacks, failCallbacks, progressCallbacks ) { + deferred.done( doneCallbacks ).fail( failCallbacks ).progress( progressCallbacks ); + return this; + }, + always: function() { + deferred.done.apply( deferred, arguments ).fail.apply( deferred, arguments ); + return this; + }, + pipe: function( fnDone, fnFail, fnProgress ) { + return jQuery.Deferred(function( newDefer ) { + jQuery.each( { + done: [ fnDone, "resolve" ], + fail: [ fnFail, "reject" ], + progress: [ fnProgress, "notify" ] + }, function( handler, data ) { + var fn = data[ 0 ], + action = data[ 1 ], + returned; + if ( jQuery.isFunction( fn ) ) { + deferred[ handler ](function() { + returned = fn.apply( this, arguments ); + if ( returned && jQuery.isFunction( returned.promise ) ) { + returned.promise().then( newDefer.resolve, newDefer.reject, newDefer.notify ); + } else { + newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] ); + } + }); + } else { + deferred[ handler ]( newDefer[ action ] ); + } + }); + }).promise(); + }, + // Get a promise for this deferred + // If obj is provided, the promise aspect is added to the object + promise: function( obj ) { + if ( obj == null ) { + obj = promise; + } else { + for ( var key in promise ) { + obj[ key ] = promise[ key ]; + } + } + return obj; + } + }, + deferred = promise.promise({}), + key; + + for ( key in lists ) { + deferred[ key ] = lists[ key ].fire; + deferred[ key + "With" ] = lists[ key ].fireWith; + } + + // Handle state + deferred.done( function() { + state = "resolved"; + }, failList.disable, progressList.lock ).fail( function() { + state = "rejected"; + }, doneList.disable, progressList.lock ); + + // Call given func if any + if ( func ) { + func.call( deferred, deferred ); + } + + // All done! + return deferred; + }, + + // Deferred helper + when: function( firstParam ) { + var args = sliceDeferred.call( arguments, 0 ), + i = 0, + length = args.length, + pValues = new Array( length ), + count = length, + pCount = length, + deferred = length <= 1 && firstParam && jQuery.isFunction( firstParam.promise ) ? + firstParam : + jQuery.Deferred(), + promise = deferred.promise(); + function resolveFunc( i ) { + return function( value ) { + args[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value; + if ( !( --count ) ) { + deferred.resolveWith( deferred, args ); + } + }; + } + function progressFunc( i ) { + return function( value ) { + pValues[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value; + deferred.notifyWith( promise, pValues ); + }; + } + if ( length > 1 ) { + for ( ; i < length; i++ ) { + if ( args[ i ] && args[ i ].promise && jQuery.isFunction( args[ i ].promise ) ) { + args[ i ].promise().then( resolveFunc(i), deferred.reject, progressFunc(i) ); + } else { + --count; + } + } + if ( !count ) { + deferred.resolveWith( deferred, args ); + } + } else if ( deferred !== firstParam ) { + deferred.resolveWith( deferred, length ? [ firstParam ] : [] ); + } + return promise; + } +}); + + + + +jQuery.support = (function() { + + var support, + all, + a, + select, + opt, + input, + marginDiv, + fragment, + tds, + events, + eventName, + i, + isSupported, + div = document.createElement( "div" ), + documentElement = document.documentElement; + + // Preliminary tests + div.setAttribute("className", "t"); + div.innerHTML = "
      a"; + + all = div.getElementsByTagName( "*" ); + a = div.getElementsByTagName( "a" )[ 0 ]; + + // Can't get basic test support + if ( !all || !all.length || !a ) { + return {}; + } + + // First batch of supports tests + select = document.createElement( "select" ); + opt = select.appendChild( document.createElement("option") ); + input = div.getElementsByTagName( "input" )[ 0 ]; + + support = { + // IE strips leading whitespace when .innerHTML is used + leadingWhitespace: ( div.firstChild.nodeType === 3 ), + + // Make sure that tbody elements aren't automatically inserted + // IE will insert them into empty tables + tbody: !div.getElementsByTagName("tbody").length, + + // Make sure that link elements get serialized correctly by innerHTML + // This requires a wrapper element in IE + htmlSerialize: !!div.getElementsByTagName("link").length, + + // Get the style information from getAttribute + // (IE uses .cssText instead) + style: /top/.test( a.getAttribute("style") ), + + // Make sure that URLs aren't manipulated + // (IE normalizes it by default) + hrefNormalized: ( a.getAttribute("href") === "/a" ), + + // Make sure that element opacity exists + // (IE uses filter instead) + // Use a regex to work around a WebKit issue. See #5145 + opacity: /^0.55/.test( a.style.opacity ), + + // Verify style float existence + // (IE uses styleFloat instead of cssFloat) + cssFloat: !!a.style.cssFloat, + + // Make sure that if no value is specified for a checkbox + // that it defaults to "on". + // (WebKit defaults to "" instead) + checkOn: ( input.value === "on" ), + + // Make sure that a selected-by-default option has a working selected property. + // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) + optSelected: opt.selected, + + // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) + getSetAttribute: div.className !== "t", + + // Tests for enctype support on a form(#6743) + enctype: !!document.createElement("form").enctype, + + // Makes sure cloning an html5 element does not cause problems + // Where outerHTML is undefined, this still works + html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav>", + + // Will be defined later + submitBubbles: true, + changeBubbles: true, + focusinBubbles: false, + deleteExpando: true, + noCloneEvent: true, + inlineBlockNeedsLayout: false, + shrinkWrapBlocks: false, + reliableMarginRight: true + }; + + // Make sure checked status is properly cloned + input.checked = true; + support.noCloneChecked = input.cloneNode( true ).checked; + + // Make sure that the options inside disabled selects aren't marked as disabled + // (WebKit marks them as disabled) + select.disabled = true; + support.optDisabled = !opt.disabled; + + // Test to see if it's possible to delete an expando from an element + // Fails in Internet Explorer + try { + delete div.test; + } catch( e ) { + support.deleteExpando = false; + } + + if ( !div.addEventListener && div.attachEvent && div.fireEvent ) { + div.attachEvent( "onclick", function() { + // Cloning a node shouldn't copy over any + // bound event handlers (IE does this) + support.noCloneEvent = false; + }); + div.cloneNode( true ).fireEvent( "onclick" ); + } + + // Check if a radio maintains its value + // after being appended to the DOM + input = document.createElement("input"); + input.value = "t"; + input.setAttribute("type", "radio"); + support.radioValue = input.value === "t"; + + input.setAttribute("checked", "checked"); + div.appendChild( input ); + fragment = document.createDocumentFragment(); + fragment.appendChild( div.lastChild ); + + // WebKit doesn't clone checked state correctly in fragments + support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; + + // Check if a disconnected checkbox will retain its checked + // value of true after appended to the DOM (IE6/7) + support.appendChecked = input.checked; + + fragment.removeChild( input ); + fragment.appendChild( div ); + + div.innerHTML = ""; + + // Check if div with explicit width and no margin-right incorrectly + // gets computed margin-right based on width of container. For more + // info see bug #3333 + // Fails in WebKit before Feb 2011 nightlies + // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right + if ( window.getComputedStyle ) { + marginDiv = document.createElement( "div" ); + marginDiv.style.width = "0"; + marginDiv.style.marginRight = "0"; + div.style.width = "2px"; + div.appendChild( marginDiv ); + support.reliableMarginRight = + ( parseInt( ( window.getComputedStyle( marginDiv, null ) || { marginRight: 0 } ).marginRight, 10 ) || 0 ) === 0; + } + + // Technique from Juriy Zaytsev + // http://perfectionkills.com/detecting-event-support-without-browser-sniffing/ + // We only care about the case where non-standard event systems + // are used, namely in IE. Short-circuiting here helps us to + // avoid an eval call (in setAttribute) which can cause CSP + // to go haywire. See: https://developer.mozilla.org/en/Security/CSP + if ( div.attachEvent ) { + for( i in { + submit: 1, + change: 1, + focusin: 1 + }) { + eventName = "on" + i; + isSupported = ( eventName in div ); + if ( !isSupported ) { + div.setAttribute( eventName, "return;" ); + isSupported = ( typeof div[ eventName ] === "function" ); + } + support[ i + "Bubbles" ] = isSupported; + } + } + + fragment.removeChild( div ); + + // Null elements to avoid leaks in IE + fragment = select = opt = marginDiv = div = input = null; + + // Run tests that need a body at doc ready + jQuery(function() { + var container, outer, inner, table, td, offsetSupport, + conMarginTop, ptlm, vb, style, html, + body = document.getElementsByTagName("body")[0]; + + if ( !body ) { + // Return for frameset docs that don't have a body + return; + } + + conMarginTop = 1; + ptlm = "position:absolute;top:0;left:0;width:1px;height:1px;margin:0;"; + vb = "visibility:hidden;border:0;"; + style = "style='" + ptlm + "border:5px solid #000;padding:0;'"; + html = "
      " + + "" + + "
      "; + + container = document.createElement("div"); + container.style.cssText = vb + "width:0;height:0;position:static;top:0;margin-top:" + conMarginTop + "px"; + body.insertBefore( container, body.firstChild ); + + // Construct the test element + div = document.createElement("div"); + container.appendChild( div ); + + // Check if table cells still have offsetWidth/Height when they are set + // to display:none and there are still other visible table cells in a + // table row; if so, offsetWidth/Height are not reliable for use when + // determining if an element has been hidden directly using + // display:none (it is still safe to use offsets if a parent element is + // hidden; don safety goggles and see bug #4512 for more information). + // (only IE 8 fails this test) + div.innerHTML = "
      t
      "; + tds = div.getElementsByTagName( "td" ); + isSupported = ( tds[ 0 ].offsetHeight === 0 ); + + tds[ 0 ].style.display = ""; + tds[ 1 ].style.display = "none"; + + // Check if empty table cells still have offsetWidth/Height + // (IE <= 8 fail this test) + support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 ); + + // Figure out if the W3C box model works as expected + div.innerHTML = ""; + div.style.width = div.style.paddingLeft = "1px"; + jQuery.boxModel = support.boxModel = div.offsetWidth === 2; + + if ( typeof div.style.zoom !== "undefined" ) { + // Check if natively block-level elements act like inline-block + // elements when setting their display to 'inline' and giving + // them layout + // (IE < 8 does this) + div.style.display = "inline"; + div.style.zoom = 1; + support.inlineBlockNeedsLayout = ( div.offsetWidth === 2 ); + + // Check if elements with layout shrink-wrap their children + // (IE 6 does this) + div.style.display = ""; + div.innerHTML = "
      "; + support.shrinkWrapBlocks = ( div.offsetWidth !== 2 ); + } + + div.style.cssText = ptlm + vb; + div.innerHTML = html; + + outer = div.firstChild; + inner = outer.firstChild; + td = outer.nextSibling.firstChild.firstChild; + + offsetSupport = { + doesNotAddBorder: ( inner.offsetTop !== 5 ), + doesAddBorderForTableAndCells: ( td.offsetTop === 5 ) + }; + + inner.style.position = "fixed"; + inner.style.top = "20px"; + + // safari subtracts parent border width here which is 5px + offsetSupport.fixedPosition = ( inner.offsetTop === 20 || inner.offsetTop === 15 ); + inner.style.position = inner.style.top = ""; + + outer.style.overflow = "hidden"; + outer.style.position = "relative"; + + offsetSupport.subtractsBorderForOverflowNotVisible = ( inner.offsetTop === -5 ); + offsetSupport.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== conMarginTop ); + + body.removeChild( container ); + div = container = null; + + jQuery.extend( support, offsetSupport ); + }); + + return support; +})(); + + + + +var rbrace = /^(?:\{.*\}|\[.*\])$/, + rmultiDash = /([A-Z])/g; + +jQuery.extend({ + cache: {}, + + // Please use with caution + uuid: 0, + + // Unique for each copy of jQuery on the page + // Non-digits removed to match rinlinejQuery + expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ), + + // The following elements throw uncatchable exceptions if you + // attempt to add expando properties to them. + noData: { + "embed": true, + // Ban all objects except for Flash (which handle expandos) + "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", + "applet": true + }, + + hasData: function( elem ) { + elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; + return !!elem && !isEmptyDataObject( elem ); + }, + + data: function( elem, name, data, pvt /* Internal Use Only */ ) { + if ( !jQuery.acceptData( elem ) ) { + return; + } + + var privateCache, thisCache, ret, + internalKey = jQuery.expando, + getByName = typeof name === "string", + + // 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, + isEvents = name === "events"; + + // 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] || (!isEvents && !pvt && !cache[id].data)) && getByName && data === undefined ) { + 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 ) { + elem[ internalKey ] = id = ++jQuery.uuid; + } else { + id = internalKey; + } + } + + if ( !cache[ id ] ) { + cache[ id ] = {}; + + // Avoids exposing jQuery metadata on plain JS objects when the object + // is serialized using JSON.stringify + if ( !isNode ) { + cache[ id ].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 ); + } + } + + privateCache = 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; + } + + // Users should not attempt to inspect the internal events object using jQuery.data, + // it is undocumented and subject to change. But does anyone listen? No. + if ( isEvents && !thisCache[ name ] ) { + return privateCache.events; + } + + // Check for both converted-to-camel and non-converted data property names + // If a data property was specified + if ( getByName ) { + + // 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; + }, + + removeData: function( elem, name, pvt /* Internal Use Only */ ) { + if ( !jQuery.acceptData( elem ) ) { + return; + } + + var thisCache, i, l, + + // Reference to internal data cache key + internalKey = jQuery.expando, + + isNode = elem.nodeType, + + // See jQuery.data for more information + cache = isNode ? jQuery.cache : elem, + + // See jQuery.data for more information + id = isNode ? elem[ internalKey ] : internalKey; + + // 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( " " ); + } + } + } + + for ( i = 0, l = name.length; i < l; 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 : 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; + } + } + + // Browsers that fail expando deletion also refuse to delete expandos on + // the window, but it will allow it on all other JS objects; other browsers + // don't care + // Ensure that `cache` is not a window object #10080 + if ( jQuery.support.deleteExpando || !cache.setInterval ) { + delete cache[ id ]; + } else { + cache[ id ] = null; + } + + // We destroyed the cache and need to eliminate the expando on the node to avoid + // false lookups in the cache for entries that no longer exist + if ( isNode ) { + // IE does not allow us to delete expando properties from nodes, + // nor does it have a removeAttribute function on Document nodes; + // we must handle all of these cases + if ( jQuery.support.deleteExpando ) { + delete elem[ internalKey ]; + } else if ( elem.removeAttribute ) { + elem.removeAttribute( internalKey ); + } else { + elem[ internalKey ] = null; + } + } + }, + + // For internal use only. + _data: function( elem, name, data ) { + return jQuery.data( elem, name, data, true ); + }, + + // A method for determining if a DOM node can handle the data expando + acceptData: function( elem ) { + if ( elem.nodeName ) { + var match = jQuery.noData[ elem.nodeName.toLowerCase() ]; + + if ( match ) { + return !(match === true || elem.getAttribute("classid") !== match); + } + } + + return true; + } +}); + +jQuery.fn.extend({ + data: function( key, value ) { + var parts, attr, name, + data = null; + + if ( typeof key === "undefined" ) { + if ( this.length ) { + data = jQuery.data( this[0] ); + + if ( this[0].nodeType === 1 && !jQuery._data( this[0], "parsedAttrs" ) ) { + attr = this[0].attributes; + for ( var i = 0, l = attr.length; i < l; i++ ) { + name = attr[i].name; + + if ( name.indexOf( "data-" ) === 0 ) { + name = jQuery.camelCase( name.substring(5) ); + + dataAttr( this[0], name, data[ name ] ); + } + } + jQuery._data( this[0], "parsedAttrs", true ); + } + } + + return data; + + } else if ( typeof key === "object" ) { + return this.each(function() { + jQuery.data( this, key ); + }); + } + + parts = key.split("."); + parts[1] = parts[1] ? "." + parts[1] : ""; + + if ( value === undefined ) { + data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]); + + // Try to fetch any internally stored data first + if ( data === undefined && this.length ) { + data = jQuery.data( this[0], key ); + data = dataAttr( this[0], key, data ); + } + + return data === undefined && parts[1] ? + this.data( parts[0] ) : + data; + + } else { + return this.each(function() { + var self = jQuery( this ), + args = [ parts[0], value ]; + + self.triggerHandler( "setData" + parts[1] + "!", args ); + jQuery.data( this, key, value ); + self.triggerHandler( "changeData" + parts[1] + "!", args ); + }); + } + }, + + removeData: function( key ) { + return this.each(function() { + jQuery.removeData( this, key ); + }); + } +}); + +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 : + jQuery.isNumeric( data ) ? parseFloat( 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 ) { + for ( var 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 handleQueueMarkDefer( elem, type, src ) { + var deferDataKey = type + "defer", + queueDataKey = type + "queue", + markDataKey = type + "mark", + defer = jQuery._data( elem, deferDataKey ); + if ( defer && + ( src === "queue" || !jQuery._data(elem, queueDataKey) ) && + ( src === "mark" || !jQuery._data(elem, markDataKey) ) ) { + // Give room for hard-coded callbacks to fire first + // and eventually mark/queue something else on the element + setTimeout( function() { + if ( !jQuery._data( elem, queueDataKey ) && + !jQuery._data( elem, markDataKey ) ) { + jQuery.removeData( elem, deferDataKey, true ); + defer.fire(); + } + }, 0 ); + } +} + +jQuery.extend({ + + _mark: function( elem, type ) { + if ( elem ) { + type = ( type || "fx" ) + "mark"; + jQuery._data( elem, type, (jQuery._data( elem, type ) || 0) + 1 ); + } + }, + + _unmark: function( force, elem, type ) { + if ( force !== true ) { + type = elem; + elem = force; + force = false; + } + if ( elem ) { + type = type || "fx"; + var key = type + "mark", + count = force ? 0 : ( (jQuery._data( elem, key ) || 1) - 1 ); + if ( count ) { + jQuery._data( elem, key, count ); + } else { + jQuery.removeData( elem, key, true ); + handleQueueMarkDefer( elem, type, "mark" ); + } + } + }, + + queue: function( elem, type, data ) { + var q; + if ( elem ) { + type = ( type || "fx" ) + "queue"; + q = jQuery._data( elem, type ); + + // Speed up dequeue by getting out quickly if this is just a lookup + if ( data ) { + if ( !q || jQuery.isArray(data) ) { + q = jQuery._data( elem, type, jQuery.makeArray(data) ); + } else { + q.push( data ); + } + } + return q || []; + } + }, + + dequeue: function( elem, type ) { + type = type || "fx"; + + var queue = jQuery.queue( elem, type ), + fn = queue.shift(), + hooks = {}; + + // If the fx queue is dequeued, always remove the progress sentinel + if ( fn === "inprogress" ) { + fn = queue.shift(); + } + + if ( fn ) { + // Add a progress sentinel to prevent the fx queue from being + // automatically dequeued + if ( type === "fx" ) { + queue.unshift( "inprogress" ); + } + + jQuery._data( elem, type + ".run", hooks ); + fn.call( elem, function() { + jQuery.dequeue( elem, type ); + }, hooks ); + } + + if ( !queue.length ) { + jQuery.removeData( elem, type + "queue " + type + ".run", true ); + handleQueueMarkDefer( elem, type, "queue" ); + } + } +}); + +jQuery.fn.extend({ + queue: function( type, data ) { + if ( typeof type !== "string" ) { + data = type; + type = "fx"; + } + + if ( data === undefined ) { + return jQuery.queue( this[0], type ); + } + return this.each(function() { + var queue = jQuery.queue( this, type, data ); + + if ( type === "fx" && queue[0] !== "inprogress" ) { + jQuery.dequeue( this, type ); + } + }); + }, + dequeue: function( type ) { + return this.each(function() { + jQuery.dequeue( this, type ); + }); + }, + // Based off of the plugin by Clint Helfers, with permission. + // http://blindsignals.com/index.php/2009/07/jquery-delay/ + delay: function( time, type ) { + time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; + type = type || "fx"; + + return this.queue( type, function( next, hooks ) { + var timeout = setTimeout( next, time ); + hooks.stop = function() { + clearTimeout( timeout ); + }; + }); + }, + 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, object ) { + if ( typeof type !== "string" ) { + object = type; + type = undefined; + } + type = type || "fx"; + var defer = jQuery.Deferred(), + elements = this, + i = elements.length, + count = 1, + deferDataKey = type + "defer", + queueDataKey = type + "queue", + markDataKey = type + "mark", + tmp; + function resolve() { + if ( !( --count ) ) { + defer.resolveWith( elements, [ elements ] ); + } + } + while( i-- ) { + if (( tmp = jQuery.data( elements[ i ], deferDataKey, undefined, true ) || + ( jQuery.data( elements[ i ], queueDataKey, undefined, true ) || + jQuery.data( elements[ i ], markDataKey, undefined, true ) ) && + jQuery.data( elements[ i ], deferDataKey, jQuery.Callbacks( "once memory" ), true ) )) { + count++; + tmp.add( resolve ); + } + } + resolve(); + return defer.promise(); + } +}); + + + + +var rclass = /[\n\t\r]/g, + rspace = /\s+/, + rreturn = /\r/g, + rtype = /^(?:button|input)$/i, + rfocusable = /^(?:button|input|object|select|textarea)$/i, + rclickable = /^a(?:rea)?$/i, + rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, + getSetAttribute = jQuery.support.getSetAttribute, + nodeHook, boolHook, fixSpecified; + +jQuery.fn.extend({ + attr: function( name, value ) { + return jQuery.access( this, name, value, true, jQuery.attr ); + }, + + removeAttr: function( name ) { + return this.each(function() { + jQuery.removeAttr( this, name ); + }); + }, + + prop: function( name, value ) { + return jQuery.access( this, name, value, true, jQuery.prop ); + }, + + removeProp: function( name ) { + name = jQuery.propFix[ name ] || name; + return this.each(function() { + // try/catch handles cases where IE balks (such as removing a property on window) + try { + this[ name ] = undefined; + delete this[ name ]; + } catch( e ) {} + }); + }, + + addClass: function( value ) { + var classNames, i, l, elem, + setClass, c, cl; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( j ) { + jQuery( this ).addClass( value.call(this, j, this.className) ); + }); + } + + if ( value && typeof value === "string" ) { + classNames = value.split( rspace ); + + for ( i = 0, l = this.length; i < l; i++ ) { + elem = this[ i ]; + + if ( elem.nodeType === 1 ) { + if ( !elem.className && classNames.length === 1 ) { + elem.className = value; + + } else { + setClass = " " + elem.className + " "; + + for ( c = 0, cl = classNames.length; c < cl; c++ ) { + if ( !~setClass.indexOf( " " + classNames[ c ] + " " ) ) { + setClass += classNames[ c ] + " "; + } + } + elem.className = jQuery.trim( setClass ); + } + } + } + } + + return this; + }, + + removeClass: function( value ) { + var classNames, i, l, elem, className, c, cl; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( j ) { + jQuery( this ).removeClass( value.call(this, j, this.className) ); + }); + } + + if ( (value && typeof value === "string") || value === undefined ) { + classNames = ( value || "" ).split( rspace ); + + for ( i = 0, l = this.length; i < l; i++ ) { + elem = this[ i ]; + + if ( elem.nodeType === 1 && elem.className ) { + if ( value ) { + className = (" " + elem.className + " ").replace( rclass, " " ); + for ( c = 0, cl = classNames.length; c < cl; c++ ) { + className = className.replace(" " + classNames[ c ] + " ", " "); + } + elem.className = jQuery.trim( className ); + + } else { + elem.className = ""; + } + } + } + } + + return this; + }, + + toggleClass: function( value, stateVal ) { + var type = typeof value, + isBool = typeof stateVal === "boolean"; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( i ) { + jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); + }); + } + + return this.each(function() { + if ( type === "string" ) { + // toggle individual class names + var className, + i = 0, + self = jQuery( this ), + state = stateVal, + classNames = value.split( rspace ); + + while ( (className = classNames[ i++ ]) ) { + // check each className given, space seperated list + state = isBool ? state : !self.hasClass( className ); + self[ state ? "addClass" : "removeClass" ]( className ); + } + + } else if ( type === "undefined" || type === "boolean" ) { + if ( this.className ) { + // store className if set + jQuery._data( this, "__className__", this.className ); + } + + // toggle whole className + this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; + } + }); + }, + + hasClass: function( selector ) { + var className = " " + selector + " ", + i = 0, + l = this.length; + for ( ; i < l; i++ ) { + if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) { + return true; + } + } + + return false; + }, + + val: function( value ) { + var hooks, ret, isFunction, + elem = this[0]; + + if ( !arguments.length ) { + if ( elem ) { + hooks = jQuery.valHooks[ elem.nodeName.toLowerCase() ] || jQuery.valHooks[ elem.type ]; + + if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { + return ret; + } + + ret = elem.value; + + return typeof ret === "string" ? + // handle most common string cases + ret.replace(rreturn, "") : + // handle cases where value is null/undef or number + ret == null ? "" : ret; + } + + return; + } + + isFunction = jQuery.isFunction( value ); + + return this.each(function( i ) { + var self = jQuery(this), val; + + if ( this.nodeType !== 1 ) { + return; + } + + if ( isFunction ) { + val = value.call( this, i, self.val() ); + } else { + val = value; + } + + // Treat null/undefined as ""; convert numbers to string + if ( val == null ) { + val = ""; + } else if ( typeof val === "number" ) { + val += ""; + } else if ( jQuery.isArray( val ) ) { + val = jQuery.map(val, function ( value ) { + return value == null ? "" : value + ""; + }); + } + + hooks = jQuery.valHooks[ this.nodeName.toLowerCase() ] || jQuery.valHooks[ this.type ]; + + // If set returns undefined, fall back to normal setting + if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { + this.value = val; + } + }); + } +}); + +jQuery.extend({ + valHooks: { + option: { + get: function( elem ) { + // attributes.value is undefined in Blackberry 4.7 but + // uses .value. See #6932 + var val = elem.attributes.value; + return !val || val.specified ? elem.value : elem.text; + } + }, + select: { + get: function( elem ) { + var value, i, max, option, + index = elem.selectedIndex, + values = [], + options = elem.options, + one = elem.type === "select-one"; + + // Nothing was selected + if ( index < 0 ) { + return null; + } + + // Loop through all the selected options + i = one ? index : 0; + max = one ? index + 1 : options.length; + for ( ; i < max; i++ ) { + option = options[ i ]; + + // Don't return options that are disabled or in a disabled optgroup + if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) && + (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) { + + // Get the specific value for the option + value = jQuery( option ).val(); + + // We don't need an array for one selects + if ( one ) { + return value; + } + + // Multi-Selects return an array + values.push( value ); + } + } + + // Fixes Bug #2551 -- select.val() broken in IE after form.reset() + if ( one && !values.length && options.length ) { + return jQuery( options[ index ] ).val(); + } + + return values; + }, + + set: function( elem, value ) { + var values = jQuery.makeArray( value ); + + jQuery(elem).find("option").each(function() { + this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0; + }); + + if ( !values.length ) { + elem.selectedIndex = -1; + } + return values; + } + } + }, + + attrFn: { + val: true, + css: true, + html: true, + text: true, + data: true, + width: true, + height: true, + offset: true + }, + + attr: function( elem, name, value, pass ) { + var ret, hooks, notxml, + nType = elem.nodeType; + + // don't get/set attributes on text, comment and attribute nodes + if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + if ( pass && name in jQuery.attrFn ) { + return jQuery( elem )[ name ]( value ); + } + + // Fallback to prop when attributes are not supported + if ( typeof elem.getAttribute === "undefined" ) { + return jQuery.prop( elem, name, value ); + } + + notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); + + // All attributes are lowercase + // Grab necessary hook if one is defined + if ( notxml ) { + name = name.toLowerCase(); + hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook ); + } + + if ( value !== undefined ) { + + if ( value === null ) { + jQuery.removeAttr( elem, name ); + return; + + } else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) { + return ret; + + } else { + elem.setAttribute( name, "" + value ); + return value; + } + + } else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) { + return ret; + + } else { + + ret = elem.getAttribute( name ); + + // Non-existent attributes return null, we normalize to undefined + return ret === null ? + undefined : + ret; + } + }, + + removeAttr: function( elem, value ) { + var propName, attrNames, name, l, + i = 0; + + if ( value && elem.nodeType === 1 ) { + attrNames = value.toLowerCase().split( rspace ); + l = attrNames.length; + + for ( ; i < l; i++ ) { + name = attrNames[ i ]; + + if ( name ) { + propName = jQuery.propFix[ name ] || name; + + // See #9699 for explanation of this approach (setting first, then removal) + jQuery.attr( elem, name, "" ); + elem.removeAttribute( getSetAttribute ? name : propName ); + + // Set corresponding property to false for boolean attributes + if ( rboolean.test( name ) && propName in elem ) { + elem[ propName ] = false; + } + } + } + } + }, + + attrHooks: { + type: { + set: function( elem, value ) { + // We can't allow the type property to be changed (since it causes problems in IE) + if ( rtype.test( elem.nodeName ) && elem.parentNode ) { + jQuery.error( "type property can't be changed" ); + } else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { + // Setting the type on a radio button after the value resets the value in IE6-9 + // Reset value to it's default in case type is set after value + // This is for element creation + var val = elem.value; + elem.setAttribute( "type", value ); + if ( val ) { + elem.value = val; + } + return value; + } + } + }, + // Use the value property for back compat + // Use the nodeHook for button elements in IE6/7 (#1954) + value: { + get: function( elem, name ) { + if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { + return nodeHook.get( elem, name ); + } + return name in elem ? + elem.value : + null; + }, + set: function( elem, value, name ) { + if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { + return nodeHook.set( elem, value, name ); + } + // Does not return so that setAttribute is also used + elem.value = value; + } + } + }, + + propFix: { + tabindex: "tabIndex", + readonly: "readOnly", + "for": "htmlFor", + "class": "className", + maxlength: "maxLength", + cellspacing: "cellSpacing", + cellpadding: "cellPadding", + rowspan: "rowSpan", + colspan: "colSpan", + usemap: "useMap", + frameborder: "frameBorder", + contenteditable: "contentEditable" + }, + + prop: function( elem, name, value ) { + var ret, hooks, notxml, + nType = elem.nodeType; + + // don't get/set properties on text, comment and attribute nodes + if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); + + if ( notxml ) { + // Fix name and attach hooks + name = jQuery.propFix[ name ] || name; + hooks = jQuery.propHooks[ name ]; + } + + if ( value !== undefined ) { + if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { + return ret; + + } else { + return ( elem[ name ] = value ); + } + + } else { + if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { + return ret; + + } else { + return elem[ name ]; + } + } + }, + + propHooks: { + tabIndex: { + get: function( elem ) { + // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set + // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ + var attributeNode = elem.getAttributeNode("tabindex"); + + return attributeNode && attributeNode.specified ? + parseInt( attributeNode.value, 10 ) : + rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? + 0 : + undefined; + } + } + } +}); + +// Add the tabIndex propHook to attrHooks for back-compat (different case is intentional) +jQuery.attrHooks.tabindex = jQuery.propHooks.tabIndex; + +// Hook for boolean attributes +boolHook = { + get: function( elem, name ) { + // Align boolean attributes with corresponding properties + // Fall back to attribute presence where some booleans are not supported + var attrNode, + property = jQuery.prop( elem, name ); + return property === true || typeof property !== "boolean" && ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ? + name.toLowerCase() : + undefined; + }, + set: function( elem, value, name ) { + var propName; + if ( value === false ) { + // Remove boolean attributes when set to false + jQuery.removeAttr( elem, name ); + } else { + // value is true since we know at this point it's type boolean and not false + // Set boolean attributes to the same name and set the DOM property + propName = jQuery.propFix[ name ] || name; + if ( propName in elem ) { + // Only set the IDL specifically if it already exists on the element + elem[ propName ] = true; + } + + elem.setAttribute( name, name.toLowerCase() ); + } + return name; + } +}; + +// IE6/7 do not support getting/setting some attributes with get/setAttribute +if ( !getSetAttribute ) { + + fixSpecified = { + name: true, + id: true + }; + + // Use this for any attribute in IE6/7 + // This fixes almost every IE6/7 issue + nodeHook = jQuery.valHooks.button = { + get: function( elem, name ) { + var ret; + ret = elem.getAttributeNode( name ); + return ret && ( fixSpecified[ name ] ? ret.nodeValue !== "" : ret.specified ) ? + ret.nodeValue : + undefined; + }, + set: function( elem, value, name ) { + // Set the existing or create a new attribute node + var ret = elem.getAttributeNode( name ); + if ( !ret ) { + ret = document.createAttribute( name ); + elem.setAttributeNode( ret ); + } + return ( ret.nodeValue = value + "" ); + } + }; + + // Apply the nodeHook to tabindex + jQuery.attrHooks.tabindex.set = nodeHook.set; + + // Set width and height to auto instead of 0 on empty string( Bug #8150 ) + // This is for removals + jQuery.each([ "width", "height" ], function( i, name ) { + jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { + set: function( elem, value ) { + if ( value === "" ) { + elem.setAttribute( name, "auto" ); + return value; + } + } + }); + }); + + // Set contenteditable to false on removals(#10429) + // Setting to empty string throws an error as an invalid value + jQuery.attrHooks.contenteditable = { + get: nodeHook.get, + set: function( elem, value, name ) { + if ( value === "" ) { + value = "false"; + } + nodeHook.set( elem, value, name ); + } + }; +} + + +// Some attributes require a special call on IE +if ( !jQuery.support.hrefNormalized ) { + jQuery.each([ "href", "src", "width", "height" ], function( i, name ) { + jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { + get: function( elem ) { + var ret = elem.getAttribute( name, 2 ); + return ret === null ? undefined : ret; + } + }); + }); +} + +if ( !jQuery.support.style ) { + jQuery.attrHooks.style = { + get: function( elem ) { + // Return undefined in the case of empty string + // Normalize to lowercase since IE uppercases css property names + return elem.style.cssText.toLowerCase() || undefined; + }, + set: function( elem, value ) { + return ( elem.style.cssText = "" + value ); + } + }; +} + +// Safari mis-reports the default selected property of an option +// Accessing the parent's selectedIndex property fixes it +if ( !jQuery.support.optSelected ) { + jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, { + get: function( elem ) { + var parent = elem.parentNode; + + if ( parent ) { + parent.selectedIndex; + + // Make sure that it also works with optgroups, see #5701 + if ( parent.parentNode ) { + parent.parentNode.selectedIndex; + } + } + return null; + } + }); +} + +// IE6/7 call enctype encoding +if ( !jQuery.support.enctype ) { + jQuery.propFix.enctype = "encoding"; +} + +// Radios and checkboxes getter/setter +if ( !jQuery.support.checkOn ) { + jQuery.each([ "radio", "checkbox" ], function() { + jQuery.valHooks[ this ] = { + get: function( elem ) { + // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified + return elem.getAttribute("value") === null ? "on" : elem.value; + } + }; + }); +} +jQuery.each([ "radio", "checkbox" ], function() { + jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], { + set: function( elem, value ) { + if ( jQuery.isArray( value ) ) { + return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 ); + } + } + }); +}); + + + + +var rformElems = /^(?:textarea|input|select)$/i, + rtypenamespace = /^([^\.]*)?(?:\.(.+))?$/, + rhoverHack = /\bhover(\.\S+)?\b/, + rkeyEvent = /^key/, + rmouseEvent = /^(?:mouse|contextmenu)|click/, + rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, + rquickIs = /^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/, + quickParse = function( selector ) { + var quick = rquickIs.exec( selector ); + if ( quick ) { + // 0 1 2 3 + // [ _, tag, id, class ] + quick[1] = ( quick[1] || "" ).toLowerCase(); + quick[3] = quick[3] && new RegExp( "(?:^|\\s)" + quick[3] + "(?:\\s|$)" ); + } + return quick; + }, + quickIs = function( elem, m ) { + var attrs = elem.attributes || {}; + return ( + (!m[1] || elem.nodeName.toLowerCase() === m[1]) && + (!m[2] || (attrs.id || {}).value === m[2]) && + (!m[3] || m[3].test( (attrs[ "class" ] || {}).value )) + ); + }, + hoverHack = function( events ) { + return jQuery.event.special.hover ? events : events.replace( rhoverHack, "mouseenter$1 mouseleave$1" ); + }; + +/* + * Helper functions for managing events -- not part of the public interface. + * Props to Dean Edwards' addEvent library for many of the ideas. + */ +jQuery.event = { + + add: function( elem, types, handler, data, selector ) { + + var elemData, eventHandle, events, + t, tns, type, namespaces, handleObj, + handleObjIn, quick, handlers, special; + + // Don't attach events to noData or text/comment nodes (allow plain objects tho) + if ( elem.nodeType === 3 || elem.nodeType === 8 || !types || !handler || !(elemData = jQuery._data( elem )) ) { + return; + } + + // Caller can pass in an object of custom data in lieu of the handler + if ( handler.handler ) { + handleObjIn = handler; + handler = handleObjIn.handler; + } + + // 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 + events = elemData.events; + if ( !events ) { + elemData.events = events = {}; + } + eventHandle = elemData.handle; + if ( !eventHandle ) { + elemData.handle = eventHandle = 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 + // jQuery(...).bind("mouseover mouseout", fn); + types = jQuery.trim( hoverHack(types) ).split( " " ); + for ( t = 0; t < types.length; t++ ) { + + tns = rtypenamespace.exec( types[t] ) || []; + type = tns[1]; + namespaces = ( tns[2] || "" ).split( "." ).sort(); + + // 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: tns[1], + data: data, + handler: handler, + guid: handler.guid, + selector: selector, + quick: quickParse( selector ), + namespace: namespaces.join(".") + }, handleObjIn ); + + // Init the event handler queue if we're the first + handlers = events[ type ]; + if ( !handlers ) { + 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; + }, + + global: {}, + + // Detach an event or set of events from an element + remove: function( elem, types, handler, selector, mappedTypes ) { + + var elemData = jQuery.hasData( elem ) && jQuery._data( elem ), + t, tns, type, origType, namespaces, origCount, + j, events, special, handle, eventType, handleObj; + + if ( !elemData || !(events = elemData.events) ) { + return; + } + + // Once for each type.namespace in types; type may be omitted + types = jQuery.trim( hoverHack( types || "" ) ).split(" "); + for ( t = 0; t < types.length; t++ ) { + tns = rtypenamespace.exec( types[t] ) || []; + type = origType = tns[1]; + namespaces = tns[2]; + + // 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; + eventType = events[ type ] || []; + origCount = eventType.length; + namespaces = namespaces ? new RegExp("(^|\\.)" + namespaces.split(".").sort().join("\\.(?:.*\\.)?") + "(\\.|$)") : null; + + // Remove matching events + for ( j = 0; j < eventType.length; j++ ) { + handleObj = eventType[ j ]; + + if ( ( mappedTypes || origType === handleObj.origType ) && + ( !handler || handler.guid === handleObj.guid ) && + ( !namespaces || namespaces.test( handleObj.namespace ) ) && + ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { + eventType.splice( j--, 1 ); + + if ( handleObj.selector ) { + eventType.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 ( eventType.length === 0 && origCount !== eventType.length ) { + if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) { + jQuery.removeEvent( elem, type, elemData.handle ); + } + + delete events[ type ]; + } + } + + // Remove the expando if it's no longer used + if ( jQuery.isEmptyObject( events ) ) { + handle = elemData.handle; + if ( handle ) { + handle.elem = null; + } + + // removeData also checks for emptiness and clears the expando if empty + // so use it instead of delete + jQuery.removeData( elem, [ "events", "handle" ], true ); + } + }, + + // Events that are safe to short-circuit if no handlers are attached. + // Native DOM events should not be added, they may have inline handlers. + customEvent: { + "getData": true, + "setData": true, + "changeData": true + }, + + trigger: function( event, data, elem, onlyHandlers ) { + // Don't do events on text and comment nodes + if ( elem && (elem.nodeType === 3 || elem.nodeType === 8) ) { + return; + } + + // Event object or event type + var type = event.type || event, + namespaces = [], + cache, exclusive, i, cur, old, ontype, special, handle, eventPath, bubbleType; + + // 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( "!" ) >= 0 ) { + // Exclusive events trigger only for the exact event (no namespaces) + type = type.slice(0, -1); + exclusive = true; + } + + if ( type.indexOf( "." ) >= 0 ) { + // Namespaced trigger; create a regexp to match event type in handle() + namespaces = type.split("."); + type = namespaces.shift(); + namespaces.sort(); + } + + if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) { + // No jQuery handlers for this event type, and it can't have inline handlers + return; + } + + // Caller can pass in an Event, Object, or just an event type string + event = typeof event === "object" ? + // jQuery.Event object + event[ jQuery.expando ] ? event : + // Object literal + new jQuery.Event( type, event ) : + // Just the event type (string) + new jQuery.Event( type ); + + event.type = type; + event.isTrigger = true; + event.exclusive = exclusive; + event.namespace = namespaces.join( "." ); + event.namespace_re = event.namespace? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)") : null; + ontype = type.indexOf( ":" ) < 0 ? "on" + type : ""; + + // Handle a global trigger + if ( !elem ) { + + // TODO: Stop taunting the data cache; remove global events and always attach to document + cache = jQuery.cache; + for ( i in cache ) { + if ( cache[ i ].events && cache[ i ].events[ type ] ) { + jQuery.event.trigger( event, data, cache[ i ].handle.elem, true ); + } + } + return; + } + + // 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 ? jQuery.makeArray( data ) : []; + data.unshift( event ); + + // Allow special events to draw outside the lines + special = jQuery.event.special[ type ] || {}; + if ( 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) + eventPath = [[ elem, special.bindType || type ]]; + if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { + + bubbleType = special.delegateType || type; + cur = rfocusMorph.test( bubbleType + type ) ? elem : elem.parentNode; + old = null; + for ( ; cur; cur = cur.parentNode ) { + eventPath.push([ cur, bubbleType ]); + old = cur; + } + + // Only add window if we got to document (e.g., not plain obj or detached DOM) + if ( old && old === elem.ownerDocument ) { + eventPath.push([ old.defaultView || old.parentWindow || window, bubbleType ]); + } + } + + // Fire handlers on the event path + for ( i = 0; i < eventPath.length && !event.isPropagationStopped(); i++ ) { + + cur = eventPath[i][0]; + event.type = eventPath[i][1]; + + handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" ); + if ( handle ) { + handle.apply( cur, data ); + } + // Note that this is a bare JS function and not a jQuery handler + handle = ontype && cur[ ontype ]; + if ( handle && jQuery.acceptData( cur ) && handle.apply( cur, data ) === 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( elem.ownerDocument, data ) === false) && + !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.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) + // IE<9 dies on focus/blur to hidden element (#1486) + if ( ontype && elem[ type ] && ((type !== "focus" && type !== "blur") || event.target.offsetWidth !== 0) && !jQuery.isWindow( elem ) ) { + + // Don't re-trigger an onFOO event when we call its FOO() method + old = elem[ ontype ]; + + if ( old ) { + elem[ ontype ] = null; + } + + // Prevent re-triggering of the same event, since we already bubbled it above + jQuery.event.triggered = type; + elem[ type ](); + jQuery.event.triggered = undefined; + + if ( old ) { + elem[ ontype ] = old; + } + } + } + } + + return event.result; + }, + + dispatch: function( event ) { + + // Make a writable jQuery.Event from the native event object + event = jQuery.event.fix( event || window.event ); + + var handlers = ( (jQuery._data( this, "events" ) || {} )[ event.type ] || []), + delegateCount = handlers.delegateCount, + args = [].slice.call( arguments, 0 ), + run_all = !event.exclusive && !event.namespace, + handlerQueue = [], + i, j, cur, jqcur, ret, selMatch, matched, matches, handleObj, sel, related; + + // Use the fix-ed jQuery.Event rather than the (read-only) native event + args[0] = event; + event.delegateTarget = this; + + // Determine handlers that should run if there are delegated events + // Avoid disabled elements in IE (#6911) and non-left-click bubbling in Firefox (#3861) + if ( delegateCount && !event.target.disabled && !(event.button && event.type === "click") ) { + + // Pregenerate a single jQuery object for reuse with .is() + jqcur = jQuery(this); + jqcur.context = this.ownerDocument || this; + + for ( cur = event.target; cur != this; cur = cur.parentNode || this ) { + selMatch = {}; + matches = []; + jqcur[0] = cur; + for ( i = 0; i < delegateCount; i++ ) { + handleObj = handlers[ i ]; + sel = handleObj.selector; + + if ( selMatch[ sel ] === undefined ) { + selMatch[ sel ] = ( + handleObj.quick ? quickIs( cur, handleObj.quick ) : jqcur.is( sel ) + ); + } + if ( selMatch[ sel ] ) { + matches.push( handleObj ); + } + } + if ( matches.length ) { + handlerQueue.push({ elem: cur, matches: matches }); + } + } + } + + // Add the remaining (directly-bound) handlers + if ( handlers.length > delegateCount ) { + handlerQueue.push({ elem: this, matches: handlers.slice( delegateCount ) }); + } + + // Run delegates first; they may want to stop propagation beneath us + for ( i = 0; i < handlerQueue.length && !event.isPropagationStopped(); i++ ) { + matched = handlerQueue[ i ]; + event.currentTarget = matched.elem; + + for ( j = 0; j < matched.matches.length && !event.isImmediatePropagationStopped(); j++ ) { + handleObj = matched.matches[ j ]; + + // Triggered event must either 1) be non-exclusive and have no namespace, or + // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). + if ( run_all || (!event.namespace && !handleObj.namespace) || event.namespace_re && event.namespace_re.test( handleObj.namespace ) ) { + + event.data = handleObj.data; + event.handleObj = handleObj; + + ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) + .apply( matched.elem, args ); + + if ( ret !== undefined ) { + event.result = ret; + if ( ret === false ) { + event.preventDefault(); + event.stopPropagation(); + } + } + } + } + } + + return event.result; + }, + + // Includes some event props shared by KeyEvent and MouseEvent + // *** attrChange attrName relatedNode srcElement are not normalized, non-W3C, deprecated, will be removed in 1.8 *** + props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget 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 eventDoc, doc, body, + 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; + } + }, + + fix: function( event ) { + if ( event[ jQuery.expando ] ) { + return event; + } + + // Create a writable copy of the event object and normalize some properties + var i, prop, + originalEvent = event, + fixHook = jQuery.event.fixHooks[ event.type ] || {}, + copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; + + event = jQuery.Event( originalEvent ); + + for ( i = copy.length; i; ) { + prop = copy[ --i ]; + event[ prop ] = originalEvent[ prop ]; + } + + // Fix target property, if necessary (#1925, IE 6/7/8 & Safari2) + if ( !event.target ) { + event.target = originalEvent.srcElement || document; + } + + // Target should not be a text node (#504, Safari) + if ( event.target.nodeType === 3 ) { + event.target = event.target.parentNode; + } + + // For mouse/key events; add metaKey if it's not there (#3368, IE6/7/8) + if ( event.metaKey === undefined ) { + event.metaKey = event.ctrlKey; + } + + return fixHook.filter? fixHook.filter( event, originalEvent ) : event; + }, + + special: { + ready: { + // Make sure the ready event is setup + setup: jQuery.bindReady + }, + + load: { + // Prevent triggered image.load events from bubbling to window.load + noBubble: true + }, + + focus: { + delegateType: "focusin" + }, + blur: { + delegateType: "focusout" + }, + + beforeunload: { + setup: function( data, namespaces, eventHandle ) { + // We only want to do this special case on windows + if ( jQuery.isWindow( this ) ) { + this.onbeforeunload = eventHandle; + } + }, + + teardown: function( namespaces, eventHandle ) { + if ( this.onbeforeunload === eventHandle ) { + this.onbeforeunload = null; + } + } + } + }, + + simulate: function( type, elem, event, bubble ) { + // Piggyback on a donor event to simulate a different one. + // Fake originalEvent to avoid donor's stopPropagation, but if the + // simulated event prevents default then we do the same on the donor. + var e = jQuery.extend( + new jQuery.Event(), + event, + { type: type, + isSimulated: true, + originalEvent: {} + } + ); + if ( bubble ) { + jQuery.event.trigger( e, null, elem ); + } else { + jQuery.event.dispatch.call( elem, e ); + } + if ( e.isDefaultPrevented() ) { + event.preventDefault(); + } + } +}; + +// Some plugins are using, but it's undocumented/deprecated and will be removed. +// The 1.7 special event interface should provide all the hooks needed now. +jQuery.event.handle = jQuery.event.dispatch; + +jQuery.removeEvent = document.removeEventListener ? + function( elem, type, handle ) { + if ( elem.removeEventListener ) { + elem.removeEventListener( type, handle, false ); + } + } : + function( elem, type, handle ) { + if ( elem.detachEvent ) { + elem.detachEvent( "on" + type, 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.returnValue === false || + src.getPreventDefault && src.getPreventDefault() ) ? 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; +}; + +function returnFalse() { + return false; +} +function returnTrue() { + return 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 = { + preventDefault: function() { + this.isDefaultPrevented = returnTrue; + + var e = this.originalEvent; + if ( !e ) { + return; + } + + // if preventDefault exists run it on the original event + if ( e.preventDefault ) { + e.preventDefault(); + + // otherwise set the returnValue property of the original event to false (IE) + } else { + e.returnValue = false; + } + }, + stopPropagation: function() { + this.isPropagationStopped = returnTrue; + + var e = this.originalEvent; + if ( !e ) { + return; + } + // if stopPropagation exists run it on the original event + if ( e.stopPropagation ) { + e.stopPropagation(); + } + // otherwise set the cancelBubble property of the original event to true (IE) + e.cancelBubble = true; + }, + stopImmediatePropagation: function() { + this.isImmediatePropagationStopped = returnTrue; + this.stopPropagation(); + }, + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse +}; + +// Create mouseenter/leave events using mouseover/out and event-time checks +jQuery.each({ + mouseenter: "mouseover", + mouseleave: "mouseout" +}, function( orig, fix ) { + jQuery.event.special[ orig ] = { + delegateType: fix, + bindType: fix, + + handle: function( event ) { + var target = this, + related = event.relatedTarget, + handleObj = event.handleObj, + selector = handleObj.selector, + ret; + + // For mousenter/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 ( !jQuery.support.submitBubbles ) { + + 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" ) ? elem.form : undefined; + if ( form && !form._submit_attached ) { + jQuery.event.add( form, "submit._submit", function( event ) { + // If form was submitted by the user, bubble the event up the tree + if ( this.parentNode && !event.isTrigger ) { + jQuery.event.simulate( "submit", this.parentNode, event, true ); + } + }); + form._submit_attached = true; + } + }); + // return undefined since we don't need an event listener + }, + + 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 ( !jQuery.support.changeBubbles ) { + + 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._just_changed = true; + } + }); + jQuery.event.add( this, "click._change", function( event ) { + if ( this._just_changed && !event.isTrigger ) { + this._just_changed = false; + jQuery.event.simulate( "change", this, event, true ); + } + }); + } + 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 ) && !elem._change_attached ) { + jQuery.event.add( elem, "change._change", function( event ) { + if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { + jQuery.event.simulate( "change", this.parentNode, event, true ); + } + }); + elem._change_attached = 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 ); + } + }; +} + +// Create "bubbling" focus and blur events +if ( !jQuery.support.focusinBubbles ) { + jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { + + // Attach a single capturing handler while someone wants focusin/focusout + var attaches = 0, + handler = function( event ) { + jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); + }; + + jQuery.event.special[ fix ] = { + setup: function() { + if ( attaches++ === 0 ) { + document.addEventListener( orig, handler, true ); + } + }, + teardown: function() { + if ( --attaches === 0 ) { + document.removeEventListener( orig, handler, true ); + } + } + }; + }); +} + +jQuery.fn.extend({ + + on: function( types, selector, data, fn, /*INTERNAL*/ 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 = selector; + selector = undefined; + } + for ( type in types ) { + this.on( type, selector, data, types[ type ], one ); + } + return this; + } + + 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 this; + } + + 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 this.each( function() { + jQuery.event.add( this, types, fn, data, selector ); + }); + }, + one: function( types, selector, data, fn ) { + return this.on.call( this, types, selector, data, fn, 1 ); + }, + off: function( types, selector, fn ) { + if ( types && types.preventDefault && types.handleObj ) { + // ( event ) dispatched jQuery.Event + var handleObj = types.handleObj; + jQuery( types.delegateTarget ).off( + handleObj.namespace? handleObj.type + "." + handleObj.namespace : handleObj.type, + handleObj.selector, + handleObj.handler + ); + return this; + } + if ( typeof types === "object" ) { + // ( types-object [, selector] ) + for ( var 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 ); + }); + }, + + bind: function( types, data, fn ) { + return this.on( types, null, data, fn ); + }, + unbind: function( types, fn ) { + return this.off( types, null, fn ); + }, + + live: function( types, data, fn ) { + jQuery( this.context ).on( types, this.selector, data, fn ); + return this; + }, + die: function( types, fn ) { + jQuery( this.context ).off( types, this.selector || "**", fn ); + return this; + }, + + delegate: function( selector, types, data, fn ) { + return this.on( types, selector, data, fn ); + }, + undelegate: function( selector, types, fn ) { + // ( namespace ) or ( selector, types [, fn] ) + return arguments.length == 1? this.off( selector, "**" ) : this.off( types, selector, fn ); + }, + + trigger: function( type, data ) { + return this.each(function() { + jQuery.event.trigger( type, data, this ); + }); + }, + triggerHandler: function( type, data ) { + if ( this[0] ) { + return jQuery.event.trigger( type, data, this[0], true ); + } + }, + + toggle: function( fn ) { + // Save reference to arguments for access in closure + var args = arguments, + guid = fn.guid || jQuery.guid++, + i = 0, + toggler = function( event ) { + // Figure out which function to execute + var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i; + jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 ); + + // Make sure that clicks stop + event.preventDefault(); + + // and execute the function + return args[ lastToggle ].apply( this, arguments ) || false; + }; + + // link all the functions, so any of them can unbind this click handler + toggler.guid = guid; + while ( i < args.length ) { + args[ i++ ].guid = guid; + } + + return this.click( toggler ); + }, + + hover: function( fnOver, fnOut ) { + return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); + } +}); + +jQuery.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( i, name ) { + + // Handle event binding + jQuery.fn[ name ] = function( data, fn ) { + if ( fn == null ) { + fn = data; + data = null; + } + + return arguments.length > 0 ? + this.on( name, null, data, fn ) : + this.trigger( name ); + }; + + if ( jQuery.attrFn ) { + jQuery.attrFn[ name ] = true; + } + + if ( rkeyEvent.test( name ) ) { + jQuery.event.fixHooks[ name ] = jQuery.event.keyHooks; + } + + if ( rmouseEvent.test( name ) ) { + jQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks; + } +}); + + + +/*! + * Sizzle CSS Selector Engine + * Copyright 2011, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * More information: http://sizzlejs.com/ + */ +(function(){ + +var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, + expando = "sizcache" + (Math.random() + '').replace('.', ''), + done = 0, + toString = Object.prototype.toString, + hasDuplicate = false, + baseHasDuplicate = true, + rBackslash = /\\/g, + rReturn = /\r\n/g, + rNonWord = /\W/; + +// Here we check if the JavaScript engine is using some sort of +// optimization where it does not always call our comparision +// function. If that is the case, discard the hasDuplicate value. +// Thus far that includes Google Chrome. +[0, 0].sort(function() { + baseHasDuplicate = false; + return 0; +}); + +var Sizzle = function( selector, context, results, seed ) { + results = results || []; + context = context || document; + + var origContext = context; + + if ( context.nodeType !== 1 && context.nodeType !== 9 ) { + return []; + } + + if ( !selector || typeof selector !== "string" ) { + return results; + } + + var m, set, checkSet, extra, ret, cur, pop, i, + prune = true, + contextXML = Sizzle.isXML( context ), + parts = [], + soFar = selector; + + // Reset the position of the chunker regexp (start from head) + do { + chunker.exec( "" ); + m = chunker.exec( soFar ); + + if ( m ) { + soFar = m[3]; + + parts.push( m[1] ); + + if ( m[2] ) { + extra = m[3]; + break; + } + } + } while ( m ); + + if ( parts.length > 1 && origPOS.exec( selector ) ) { + + if ( parts.length === 2 && Expr.relative[ parts[0] ] ) { + set = posProcess( parts[0] + parts[1], context, seed ); + + } else { + set = Expr.relative[ parts[0] ] ? + [ context ] : + Sizzle( parts.shift(), context ); + + while ( parts.length ) { + selector = parts.shift(); + + if ( Expr.relative[ selector ] ) { + selector += parts.shift(); + } + + set = posProcess( selector, set, seed ); + } + } + + } else { + // Take a shortcut and set the context if the root selector is an ID + // (but not if it'll be faster if the inner selector is an ID) + if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML && + Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) { + + ret = Sizzle.find( parts.shift(), context, contextXML ); + context = ret.expr ? + Sizzle.filter( ret.expr, ret.set )[0] : + ret.set[0]; + } + + if ( context ) { + ret = seed ? + { expr: parts.pop(), set: makeArray(seed) } : + Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML ); + + set = ret.expr ? + Sizzle.filter( ret.expr, ret.set ) : + ret.set; + + if ( parts.length > 0 ) { + checkSet = makeArray( set ); + + } else { + prune = false; + } + + while ( parts.length ) { + cur = parts.pop(); + pop = cur; + + if ( !Expr.relative[ cur ] ) { + cur = ""; + } else { + pop = parts.pop(); + } + + if ( pop == null ) { + pop = context; + } + + Expr.relative[ cur ]( checkSet, pop, contextXML ); + } + + } else { + checkSet = parts = []; + } + } + + if ( !checkSet ) { + checkSet = set; + } + + if ( !checkSet ) { + Sizzle.error( cur || selector ); + } + + if ( toString.call(checkSet) === "[object Array]" ) { + if ( !prune ) { + results.push.apply( results, checkSet ); + + } else if ( context && context.nodeType === 1 ) { + for ( i = 0; checkSet[i] != null; i++ ) { + if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) { + results.push( set[i] ); + } + } + + } else { + for ( i = 0; checkSet[i] != null; i++ ) { + if ( checkSet[i] && checkSet[i].nodeType === 1 ) { + results.push( set[i] ); + } + } + } + + } else { + makeArray( checkSet, results ); + } + + if ( extra ) { + Sizzle( extra, origContext, results, seed ); + Sizzle.uniqueSort( results ); + } + + return results; +}; + +Sizzle.uniqueSort = function( results ) { + if ( sortOrder ) { + hasDuplicate = baseHasDuplicate; + results.sort( sortOrder ); + + if ( hasDuplicate ) { + for ( var i = 1; i < results.length; i++ ) { + if ( results[i] === results[ i - 1 ] ) { + results.splice( i--, 1 ); + } + } + } + } + + return results; +}; + +Sizzle.matches = function( expr, set ) { + return Sizzle( expr, null, null, set ); +}; + +Sizzle.matchesSelector = function( node, expr ) { + return Sizzle( expr, null, null, [node] ).length > 0; +}; + +Sizzle.find = function( expr, context, isXML ) { + var set, i, len, match, type, left; + + if ( !expr ) { + return []; + } + + for ( i = 0, len = Expr.order.length; i < len; i++ ) { + type = Expr.order[i]; + + if ( (match = Expr.leftMatch[ type ].exec( expr )) ) { + left = match[1]; + match.splice( 1, 1 ); + + if ( left.substr( left.length - 1 ) !== "\\" ) { + match[1] = (match[1] || "").replace( rBackslash, "" ); + set = Expr.find[ type ]( match, context, isXML ); + + if ( set != null ) { + expr = expr.replace( Expr.match[ type ], "" ); + break; + } + } + } + } + + if ( !set ) { + set = typeof context.getElementsByTagName !== "undefined" ? + context.getElementsByTagName( "*" ) : + []; + } + + return { set: set, expr: expr }; +}; + +Sizzle.filter = function( expr, set, inplace, not ) { + var match, anyFound, + type, found, item, filter, left, + i, pass, + old = expr, + result = [], + curLoop = set, + isXMLFilter = set && set[0] && Sizzle.isXML( set[0] ); + + while ( expr && set.length ) { + for ( type in Expr.filter ) { + if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) { + filter = Expr.filter[ type ]; + left = match[1]; + + anyFound = false; + + match.splice(1,1); + + if ( left.substr( left.length - 1 ) === "\\" ) { + continue; + } + + if ( curLoop === result ) { + result = []; + } + + if ( Expr.preFilter[ type ] ) { + match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter ); + + if ( !match ) { + anyFound = found = true; + + } else if ( match === true ) { + continue; + } + } + + if ( match ) { + for ( i = 0; (item = curLoop[i]) != null; i++ ) { + if ( item ) { + found = filter( item, match, i, curLoop ); + pass = not ^ found; + + if ( inplace && found != null ) { + if ( pass ) { + anyFound = true; + + } else { + curLoop[i] = false; + } + + } else if ( pass ) { + result.push( item ); + anyFound = true; + } + } + } + } + + if ( found !== undefined ) { + if ( !inplace ) { + curLoop = result; + } + + expr = expr.replace( Expr.match[ type ], "" ); + + if ( !anyFound ) { + return []; + } + + break; + } + } + } + + // Improper expression + if ( expr === old ) { + if ( anyFound == null ) { + Sizzle.error( expr ); + + } else { + break; + } + } + + old = expr; + } + + return curLoop; +}; + +Sizzle.error = function( msg ) { + throw new Error( "Syntax error, unrecognized expression: " + msg ); +}; + +/** + * Utility function for retreiving the text value of an array of DOM nodes + * @param {Array|Element} elem + */ +var getText = Sizzle.getText = function( elem ) { + var i, node, + nodeType = elem.nodeType, + ret = ""; + + if ( nodeType ) { + if ( nodeType === 1 || nodeType === 9 ) { + // Use textContent || innerText for elements + if ( typeof elem.textContent === 'string' ) { + return elem.textContent; + } else if ( typeof elem.innerText === 'string' ) { + // Replace IE's carriage returns + return elem.innerText.replace( rReturn, '' ); + } else { + // Traverse it's children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling) { + ret += getText( elem ); + } + } + } else if ( nodeType === 3 || nodeType === 4 ) { + return elem.nodeValue; + } + } else { + + // If no nodeType, this is expected to be an array + for ( i = 0; (node = elem[i]); i++ ) { + // Do not traverse comment nodes + if ( node.nodeType !== 8 ) { + ret += getText( node ); + } + } + } + return ret; +}; + +var Expr = Sizzle.selectors = { + order: [ "ID", "NAME", "TAG" ], + + match: { + ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, + CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, + NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/, + ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/, + TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/, + CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/, + POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/, + PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/ + }, + + leftMatch: {}, + + attrMap: { + "class": "className", + "for": "htmlFor" + }, + + attrHandle: { + href: function( elem ) { + return elem.getAttribute( "href" ); + }, + type: function( elem ) { + return elem.getAttribute( "type" ); + } + }, + + relative: { + "+": function(checkSet, part){ + var isPartStr = typeof part === "string", + isTag = isPartStr && !rNonWord.test( part ), + isPartStrNotTag = isPartStr && !isTag; + + if ( isTag ) { + part = part.toLowerCase(); + } + + for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) { + if ( (elem = checkSet[i]) ) { + while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {} + + checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ? + elem || false : + elem === part; + } + } + + if ( isPartStrNotTag ) { + Sizzle.filter( part, checkSet, true ); + } + }, + + ">": function( checkSet, part ) { + var elem, + isPartStr = typeof part === "string", + i = 0, + l = checkSet.length; + + if ( isPartStr && !rNonWord.test( part ) ) { + part = part.toLowerCase(); + + for ( ; i < l; i++ ) { + elem = checkSet[i]; + + if ( elem ) { + var parent = elem.parentNode; + checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false; + } + } + + } else { + for ( ; i < l; i++ ) { + elem = checkSet[i]; + + if ( elem ) { + checkSet[i] = isPartStr ? + elem.parentNode : + elem.parentNode === part; + } + } + + if ( isPartStr ) { + Sizzle.filter( part, checkSet, true ); + } + } + }, + + "": function(checkSet, part, isXML){ + var nodeCheck, + doneName = done++, + checkFn = dirCheck; + + if ( typeof part === "string" && !rNonWord.test( part ) ) { + part = part.toLowerCase(); + nodeCheck = part; + checkFn = dirNodeCheck; + } + + checkFn( "parentNode", part, doneName, checkSet, nodeCheck, isXML ); + }, + + "~": function( checkSet, part, isXML ) { + var nodeCheck, + doneName = done++, + checkFn = dirCheck; + + if ( typeof part === "string" && !rNonWord.test( part ) ) { + part = part.toLowerCase(); + nodeCheck = part; + checkFn = dirNodeCheck; + } + + checkFn( "previousSibling", part, doneName, checkSet, nodeCheck, isXML ); + } + }, + + find: { + ID: function( match, context, isXML ) { + if ( typeof context.getElementById !== "undefined" && !isXML ) { + var m = context.getElementById(match[1]); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + return m && m.parentNode ? [m] : []; + } + }, + + NAME: function( match, context ) { + if ( typeof context.getElementsByName !== "undefined" ) { + var ret = [], + results = context.getElementsByName( match[1] ); + + for ( var i = 0, l = results.length; i < l; i++ ) { + if ( results[i].getAttribute("name") === match[1] ) { + ret.push( results[i] ); + } + } + + return ret.length === 0 ? null : ret; + } + }, + + TAG: function( match, context ) { + if ( typeof context.getElementsByTagName !== "undefined" ) { + return context.getElementsByTagName( match[1] ); + } + } + }, + preFilter: { + CLASS: function( match, curLoop, inplace, result, not, isXML ) { + match = " " + match[1].replace( rBackslash, "" ) + " "; + + if ( isXML ) { + return match; + } + + for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) { + if ( elem ) { + if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n\r]/g, " ").indexOf(match) >= 0) ) { + if ( !inplace ) { + result.push( elem ); + } + + } else if ( inplace ) { + curLoop[i] = false; + } + } + } + + return false; + }, + + ID: function( match ) { + return match[1].replace( rBackslash, "" ); + }, + + TAG: function( match, curLoop ) { + return match[1].replace( rBackslash, "" ).toLowerCase(); + }, + + CHILD: function( match ) { + if ( match[1] === "nth" ) { + if ( !match[2] ) { + Sizzle.error( match[0] ); + } + + match[2] = match[2].replace(/^\+|\s*/g, ''); + + // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6' + var test = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec( + match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" || + !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]); + + // calculate the numbers (first)n+(last) including if they are negative + match[2] = (test[1] + (test[2] || 1)) - 0; + match[3] = test[3] - 0; + } + else if ( match[2] ) { + Sizzle.error( match[0] ); + } + + // TODO: Move to normal caching system + match[0] = done++; + + return match; + }, + + ATTR: function( match, curLoop, inplace, result, not, isXML ) { + var name = match[1] = match[1].replace( rBackslash, "" ); + + if ( !isXML && Expr.attrMap[name] ) { + match[1] = Expr.attrMap[name]; + } + + // Handle if an un-quoted value was used + match[4] = ( match[4] || match[5] || "" ).replace( rBackslash, "" ); + + if ( match[2] === "~=" ) { + match[4] = " " + match[4] + " "; + } + + return match; + }, + + PSEUDO: function( match, curLoop, inplace, result, not ) { + if ( match[1] === "not" ) { + // If we're dealing with a complex expression, or a simple one + if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) { + match[3] = Sizzle(match[3], null, null, curLoop); + + } else { + var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not); + + if ( !inplace ) { + result.push.apply( result, ret ); + } + + return false; + } + + } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) { + return true; + } + + return match; + }, + + POS: function( match ) { + match.unshift( true ); + + return match; + } + }, + + filters: { + enabled: function( elem ) { + return elem.disabled === false && elem.type !== "hidden"; + }, + + disabled: function( elem ) { + return elem.disabled === true; + }, + + checked: function( elem ) { + return elem.checked === true; + }, + + 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; + }, + + parent: function( elem ) { + return !!elem.firstChild; + }, + + empty: function( elem ) { + return !elem.firstChild; + }, + + has: function( elem, i, match ) { + return !!Sizzle( match[3], elem ).length; + }, + + header: function( elem ) { + return (/h\d/i).test( elem.nodeName ); + }, + + text: function( elem ) { + var attr = elem.getAttribute( "type" ), type = elem.type; + // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) + // use getAttribute instead to test this case + return elem.nodeName.toLowerCase() === "input" && "text" === type && ( attr === type || attr === null ); + }, + + radio: function( elem ) { + return elem.nodeName.toLowerCase() === "input" && "radio" === elem.type; + }, + + checkbox: function( elem ) { + return elem.nodeName.toLowerCase() === "input" && "checkbox" === elem.type; + }, + + file: function( elem ) { + return elem.nodeName.toLowerCase() === "input" && "file" === elem.type; + }, + + password: function( elem ) { + return elem.nodeName.toLowerCase() === "input" && "password" === elem.type; + }, + + submit: function( elem ) { + var name = elem.nodeName.toLowerCase(); + return (name === "input" || name === "button") && "submit" === elem.type; + }, + + image: function( elem ) { + return elem.nodeName.toLowerCase() === "input" && "image" === elem.type; + }, + + reset: function( elem ) { + var name = elem.nodeName.toLowerCase(); + return (name === "input" || name === "button") && "reset" === elem.type; + }, + + button: function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && "button" === elem.type || name === "button"; + }, + + input: function( elem ) { + return (/input|select|textarea|button/i).test( elem.nodeName ); + }, + + focus: function( elem ) { + return elem === elem.ownerDocument.activeElement; + } + }, + setFilters: { + first: function( elem, i ) { + return i === 0; + }, + + last: function( elem, i, match, array ) { + return i === array.length - 1; + }, + + even: function( elem, i ) { + return i % 2 === 0; + }, + + odd: function( elem, i ) { + return i % 2 === 1; + }, + + lt: function( elem, i, match ) { + return i < match[3] - 0; + }, + + gt: function( elem, i, match ) { + return i > match[3] - 0; + }, + + nth: function( elem, i, match ) { + return match[3] - 0 === i; + }, + + eq: function( elem, i, match ) { + return match[3] - 0 === i; + } + }, + filter: { + PSEUDO: function( elem, match, i, array ) { + var name = match[1], + filter = Expr.filters[ name ]; + + if ( filter ) { + return filter( elem, i, match, array ); + + } else if ( name === "contains" ) { + return (elem.textContent || elem.innerText || getText([ elem ]) || "").indexOf(match[3]) >= 0; + + } else if ( name === "not" ) { + var not = match[3]; + + for ( var j = 0, l = not.length; j < l; j++ ) { + if ( not[j] === elem ) { + return false; + } + } + + return true; + + } else { + Sizzle.error( name ); + } + }, + + CHILD: function( elem, match ) { + var first, last, + doneName, parent, cache, + count, diff, + type = match[1], + node = elem; + + switch ( type ) { + case "only": + case "first": + while ( (node = node.previousSibling) ) { + if ( node.nodeType === 1 ) { + return false; + } + } + + if ( type === "first" ) { + return true; + } + + node = elem; + + case "last": + while ( (node = node.nextSibling) ) { + if ( node.nodeType === 1 ) { + return false; + } + } + + return true; + + case "nth": + first = match[2]; + last = match[3]; + + if ( first === 1 && last === 0 ) { + return true; + } + + doneName = match[0]; + parent = elem.parentNode; + + if ( parent && (parent[ expando ] !== doneName || !elem.nodeIndex) ) { + count = 0; + + for ( node = parent.firstChild; node; node = node.nextSibling ) { + if ( node.nodeType === 1 ) { + node.nodeIndex = ++count; + } + } + + parent[ expando ] = doneName; + } + + diff = elem.nodeIndex - last; + + if ( first === 0 ) { + return diff === 0; + + } else { + return ( diff % first === 0 && diff / first >= 0 ); + } + } + }, + + ID: function( elem, match ) { + return elem.nodeType === 1 && elem.getAttribute("id") === match; + }, + + TAG: function( elem, match ) { + return (match === "*" && elem.nodeType === 1) || !!elem.nodeName && elem.nodeName.toLowerCase() === match; + }, + + CLASS: function( elem, match ) { + return (" " + (elem.className || elem.getAttribute("class")) + " ") + .indexOf( match ) > -1; + }, + + ATTR: function( elem, match ) { + var name = match[1], + result = Sizzle.attr ? + Sizzle.attr( elem, name ) : + Expr.attrHandle[ name ] ? + Expr.attrHandle[ name ]( elem ) : + elem[ name ] != null ? + elem[ name ] : + elem.getAttribute( name ), + value = result + "", + type = match[2], + check = match[4]; + + return result == null ? + type === "!=" : + !type && Sizzle.attr ? + result != null : + type === "=" ? + value === check : + type === "*=" ? + value.indexOf(check) >= 0 : + type === "~=" ? + (" " + value + " ").indexOf(check) >= 0 : + !check ? + value && result !== false : + type === "!=" ? + value !== check : + type === "^=" ? + value.indexOf(check) === 0 : + type === "$=" ? + value.substr(value.length - check.length) === check : + type === "|=" ? + value === check || value.substr(0, check.length + 1) === check + "-" : + false; + }, + + POS: function( elem, match, i, array ) { + var name = match[2], + filter = Expr.setFilters[ name ]; + + if ( filter ) { + return filter( elem, i, match, array ); + } + } + } +}; + +var origPOS = Expr.match.POS, + fescape = function(all, num){ + return "\\" + (num - 0 + 1); + }; + +for ( var type in Expr.match ) { + Expr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\[]*\])(?![^\(]*\))/.source) ); + Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, fescape) ); +} + +var makeArray = function( array, results ) { + array = Array.prototype.slice.call( array, 0 ); + + if ( results ) { + results.push.apply( results, array ); + return results; + } + + return array; +}; + +// Perform a simple check to determine if the browser is capable of +// converting a NodeList to an array using builtin methods. +// Also verifies that the returned array holds DOM nodes +// (which is not the case in the Blackberry browser) +try { + Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType; + +// Provide a fallback method if it does not work +} catch( e ) { + makeArray = function( array, results ) { + var i = 0, + ret = results || []; + + if ( toString.call(array) === "[object Array]" ) { + Array.prototype.push.apply( ret, array ); + + } else { + if ( typeof array.length === "number" ) { + for ( var l = array.length; i < l; i++ ) { + ret.push( array[i] ); + } + + } else { + for ( ; array[i]; i++ ) { + ret.push( array[i] ); + } + } + } + + return ret; + }; +} + +var sortOrder, siblingCheck; + +if ( document.documentElement.compareDocumentPosition ) { + sortOrder = function( a, b ) { + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) { + return a.compareDocumentPosition ? -1 : 1; + } + + return a.compareDocumentPosition(b) & 4 ? -1 : 1; + }; + +} else { + sortOrder = function( a, b ) { + // The nodes are identical, we can exit early + if ( a === b ) { + hasDuplicate = true; + return 0; + + // Fallback to using sourceIndex (in IE) if it's available on both nodes + } else if ( a.sourceIndex && b.sourceIndex ) { + return a.sourceIndex - b.sourceIndex; + } + + var al, bl, + ap = [], + bp = [], + aup = a.parentNode, + bup = b.parentNode, + cur = aup; + + // If the nodes are siblings (or identical) we can do a quick check + if ( aup === bup ) { + return siblingCheck( a, b ); + + // If no parents were found then the nodes are disconnected + } else if ( !aup ) { + return -1; + + } else if ( !bup ) { + return 1; + } + + // Otherwise they're somewhere else in the tree so we need + // to build up a full list of the parentNodes for comparison + while ( cur ) { + ap.unshift( cur ); + cur = cur.parentNode; + } + + cur = bup; + + while ( cur ) { + bp.unshift( cur ); + cur = cur.parentNode; + } + + al = ap.length; + bl = bp.length; + + // Start walking down the tree looking for a discrepancy + for ( var i = 0; i < al && i < bl; i++ ) { + if ( ap[i] !== bp[i] ) { + return siblingCheck( ap[i], bp[i] ); + } + } + + // We ended someplace up the tree so do a sibling check + return i === al ? + siblingCheck( a, bp[i], -1 ) : + siblingCheck( ap[i], b, 1 ); + }; + + siblingCheck = function( a, b, ret ) { + if ( a === b ) { + return ret; + } + + var cur = a.nextSibling; + + while ( cur ) { + if ( cur === b ) { + return -1; + } + + cur = cur.nextSibling; + } + + return 1; + }; +} + +// Check to see if the browser returns elements by name when +// querying by getElementById (and provide a workaround) +(function(){ + // We're going to inject a fake input element with a specified name + var form = document.createElement("div"), + id = "script" + (new Date()).getTime(), + root = document.documentElement; + + form.innerHTML = ""; + + // Inject it into the root element, check its status, and remove it quickly + root.insertBefore( form, root.firstChild ); + + // The workaround has to do additional checks after a getElementById + // Which slows things down for other browsers (hence the branching) + if ( document.getElementById( id ) ) { + Expr.find.ID = function( match, context, isXML ) { + if ( typeof context.getElementById !== "undefined" && !isXML ) { + var m = context.getElementById(match[1]); + + return m ? + m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ? + [m] : + undefined : + []; + } + }; + + Expr.filter.ID = function( elem, match ) { + var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); + + return elem.nodeType === 1 && node && node.nodeValue === match; + }; + } + + root.removeChild( form ); + + // release memory in IE + root = form = null; +})(); + +(function(){ + // Check to see if the browser returns only elements + // when doing getElementsByTagName("*") + + // Create a fake element + var div = document.createElement("div"); + div.appendChild( document.createComment("") ); + + // Make sure no comments are found + if ( div.getElementsByTagName("*").length > 0 ) { + Expr.find.TAG = function( match, context ) { + var results = context.getElementsByTagName( match[1] ); + + // Filter out possible comments + if ( match[1] === "*" ) { + var tmp = []; + + for ( var i = 0; results[i]; i++ ) { + if ( results[i].nodeType === 1 ) { + tmp.push( results[i] ); + } + } + + results = tmp; + } + + return results; + }; + } + + // Check to see if an attribute returns normalized href attributes + div.innerHTML = ""; + + if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" && + div.firstChild.getAttribute("href") !== "#" ) { + + Expr.attrHandle.href = function( elem ) { + return elem.getAttribute( "href", 2 ); + }; + } + + // release memory in IE + div = null; +})(); + +if ( document.querySelectorAll ) { + (function(){ + var oldSizzle = Sizzle, + div = document.createElement("div"), + id = "__sizzle__"; + + div.innerHTML = "

      "; + + // Safari can't handle uppercase or unicode characters when + // in quirks mode. + if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) { + return; + } + + Sizzle = function( query, context, extra, seed ) { + context = context || document; + + // Only use querySelectorAll on non-XML documents + // (ID selectors don't work in non-HTML documents) + if ( !seed && !Sizzle.isXML(context) ) { + // See if we find a selector to speed up + var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec( query ); + + if ( match && (context.nodeType === 1 || context.nodeType === 9) ) { + // Speed-up: Sizzle("TAG") + if ( match[1] ) { + return makeArray( context.getElementsByTagName( query ), extra ); + + // Speed-up: Sizzle(".CLASS") + } else if ( match[2] && Expr.find.CLASS && context.getElementsByClassName ) { + return makeArray( context.getElementsByClassName( match[2] ), extra ); + } + } + + if ( context.nodeType === 9 ) { + // Speed-up: Sizzle("body") + // The body element only exists once, optimize finding it + if ( query === "body" && context.body ) { + return makeArray( [ context.body ], extra ); + + // Speed-up: Sizzle("#ID") + } else if ( match && match[3] ) { + var elem = context.getElementById( match[3] ); + + // 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[3] ) { + return makeArray( [ elem ], extra ); + } + + } else { + return makeArray( [], extra ); + } + } + + try { + return makeArray( context.querySelectorAll(query), extra ); + } catch(qsaError) {} + + // qSA works strangely on Element-rooted queries + // We can work around this by specifying an extra ID on the root + // and working up from there (Thanks to Andrew Dupont for the technique) + // IE 8 doesn't work on object elements + } else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { + var oldContext = context, + old = context.getAttribute( "id" ), + nid = old || id, + hasParent = context.parentNode, + relativeHierarchySelector = /^\s*[+~]/.test( query ); + + if ( !old ) { + context.setAttribute( "id", nid ); + } else { + nid = nid.replace( /'/g, "\\$&" ); + } + if ( relativeHierarchySelector && hasParent ) { + context = context.parentNode; + } + + try { + if ( !relativeHierarchySelector || hasParent ) { + return makeArray( context.querySelectorAll( "[id='" + nid + "'] " + query ), extra ); + } + + } catch(pseudoError) { + } finally { + if ( !old ) { + oldContext.removeAttribute( "id" ); + } + } + } + } + + return oldSizzle(query, context, extra, seed); + }; + + for ( var prop in oldSizzle ) { + Sizzle[ prop ] = oldSizzle[ prop ]; + } + + // release memory in IE + div = null; + })(); +} + +(function(){ + var html = document.documentElement, + matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector; + + if ( matches ) { + // Check to see if it's possible to do matchesSelector + // on a disconnected node (IE 9 fails this) + var disconnectedMatch = !matches.call( document.createElement( "div" ), "div" ), + pseudoWorks = false; + + try { + // This should fail with an exception + // Gecko does not error, returns false instead + matches.call( document.documentElement, "[test!='']:sizzle" ); + + } catch( pseudoError ) { + pseudoWorks = true; + } + + Sizzle.matchesSelector = function( node, expr ) { + // Make sure that attribute selectors are quoted + expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']"); + + if ( !Sizzle.isXML( node ) ) { + try { + if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) { + var ret = matches.call( node, expr ); + + // IE 9's matchesSelector returns false on disconnected nodes + if ( ret || !disconnectedMatch || + // As well, disconnected nodes are said to be in a document + // fragment in IE 9, so check for that + node.document && node.document.nodeType !== 11 ) { + return ret; + } + } + } catch(e) {} + } + + return Sizzle(expr, null, null, [node]).length > 0; + }; + } +})(); + +(function(){ + var div = document.createElement("div"); + + div.innerHTML = "
      "; + + // Opera can't find a second classname (in 9.6) + // Also, make sure that getElementsByClassName actually exists + if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) { + return; + } + + // Safari caches class attributes, doesn't catch changes (in 3.2) + div.lastChild.className = "e"; + + if ( div.getElementsByClassName("e").length === 1 ) { + return; + } + + Expr.order.splice(1, 0, "CLASS"); + Expr.find.CLASS = function( match, context, isXML ) { + if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) { + return context.getElementsByClassName(match[1]); + } + }; + + // release memory in IE + div = null; +})(); + +function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { + for ( var i = 0, l = checkSet.length; i < l; i++ ) { + var elem = checkSet[i]; + + if ( elem ) { + var match = false; + + elem = elem[dir]; + + while ( elem ) { + if ( elem[ expando ] === doneName ) { + match = checkSet[elem.sizset]; + break; + } + + if ( elem.nodeType === 1 && !isXML ){ + elem[ expando ] = doneName; + elem.sizset = i; + } + + if ( elem.nodeName.toLowerCase() === cur ) { + match = elem; + break; + } + + elem = elem[dir]; + } + + checkSet[i] = match; + } + } +} + +function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { + for ( var i = 0, l = checkSet.length; i < l; i++ ) { + var elem = checkSet[i]; + + if ( elem ) { + var match = false; + + elem = elem[dir]; + + while ( elem ) { + if ( elem[ expando ] === doneName ) { + match = checkSet[elem.sizset]; + break; + } + + if ( elem.nodeType === 1 ) { + if ( !isXML ) { + elem[ expando ] = doneName; + elem.sizset = i; + } + + if ( typeof cur !== "string" ) { + if ( elem === cur ) { + match = true; + break; + } + + } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) { + match = elem; + break; + } + } + + elem = elem[dir]; + } + + checkSet[i] = match; + } + } +} + +if ( document.documentElement.contains ) { + Sizzle.contains = function( a, b ) { + return a !== b && (a.contains ? a.contains(b) : true); + }; + +} else if ( document.documentElement.compareDocumentPosition ) { + Sizzle.contains = function( a, b ) { + return !!(a.compareDocumentPosition(b) & 16); + }; + +} else { + Sizzle.contains = function() { + return false; + }; +} + +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 : 0).documentElement; + + return documentElement ? documentElement.nodeName !== "HTML" : false; +}; + +var posProcess = function( selector, context, seed ) { + var match, + tmpSet = [], + later = "", + root = context.nodeType ? [context] : context; + + // Position selectors must be done after the filter + // And so must :not(positional) so we move all PSEUDOs to the end + while ( (match = Expr.match.PSEUDO.exec( selector )) ) { + later += match[0]; + selector = selector.replace( Expr.match.PSEUDO, "" ); + } + + selector = Expr.relative[selector] ? selector + "*" : selector; + + for ( var i = 0, l = root.length; i < l; i++ ) { + Sizzle( selector, root[i], tmpSet, seed ); + } + + return Sizzle.filter( later, tmpSet ); +}; + +// EXPOSE +// Override sizzle attribute retrieval +Sizzle.attr = jQuery.attr; +Sizzle.selectors.attrMap = {}; +jQuery.find = Sizzle; +jQuery.expr = Sizzle.selectors; +jQuery.expr[":"] = jQuery.expr.filters; +jQuery.unique = Sizzle.uniqueSort; +jQuery.text = Sizzle.getText; +jQuery.isXMLDoc = Sizzle.isXML; +jQuery.contains = Sizzle.contains; + + +})(); + + +var runtil = /Until$/, + rparentsprev = /^(?:parents|prevUntil|prevAll)/, + // Note: This RegExp should be improved, or likely pulled from Sizzle + rmultiselector = /,/, + isSimple = /^.[^:#\[\.,]*$/, + slice = Array.prototype.slice, + POS = jQuery.expr.match.POS, + // 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({ + find: function( selector ) { + var self = this, + i, l; + + if ( typeof selector !== "string" ) { + return jQuery( selector ).filter(function() { + for ( i = 0, l = self.length; i < l; i++ ) { + if ( jQuery.contains( self[ i ], this ) ) { + return true; + } + } + }); + } + + var ret = this.pushStack( "", "find", selector ), + length, n, r; + + for ( i = 0, l = this.length; i < l; i++ ) { + length = ret.length; + jQuery.find( selector, this[i], ret ); + + if ( i > 0 ) { + // Make sure that the results are unique + for ( n = length; n < ret.length; n++ ) { + for ( r = 0; r < length; r++ ) { + if ( ret[r] === ret[n] ) { + ret.splice(n--, 1); + break; + } + } + } + } + } + + return ret; + }, + + has: function( target ) { + var targets = jQuery( target ); + return this.filter(function() { + for ( var i = 0, l = targets.length; i < l; i++ ) { + if ( jQuery.contains( this, targets[i] ) ) { + return true; + } + } + }); + }, + + not: function( selector ) { + return this.pushStack( winnow(this, selector, false), "not", selector); + }, + + filter: function( selector ) { + return this.pushStack( winnow(this, selector, true), "filter", selector ); + }, + + is: function( selector ) { + return !!selector && ( + typeof selector === "string" ? + // If this is a positional selector, check membership in the returned set + // so $("p:first").is("p:last") won't return true for a doc with two "p". + POS.test( selector ) ? + jQuery( selector, this.context ).index( this[0] ) >= 0 : + jQuery.filter( selector, this ).length > 0 : + this.filter( selector ).length > 0 ); + }, + + closest: function( selectors, context ) { + var ret = [], i, l, cur = this[0]; + + // Array (deprecated as of jQuery 1.7) + if ( jQuery.isArray( selectors ) ) { + var level = 1; + + while ( cur && cur.ownerDocument && cur !== context ) { + for ( i = 0; i < selectors.length; i++ ) { + + if ( jQuery( cur ).is( selectors[ i ] ) ) { + ret.push({ selector: selectors[ i ], elem: cur, level: level }); + } + } + + cur = cur.parentNode; + level++; + } + + return ret; + } + + // String + var pos = POS.test( selectors ) || typeof selectors !== "string" ? + jQuery( selectors, context || this.context ) : + 0; + + for ( i = 0, l = this.length; i < l; i++ ) { + cur = this[i]; + + while ( cur ) { + if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) { + ret.push( cur ); + break; + + } else { + cur = cur.parentNode; + if ( !cur || !cur.ownerDocument || cur === context || cur.nodeType === 11 ) { + break; + } + } + } + } + + ret = ret.length > 1 ? jQuery.unique( ret ) : ret; + + return this.pushStack( ret, "closest", selectors ); + }, + + // 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.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 ) { + var set = typeof selector === "string" ? + jQuery( selector, context ) : + jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ), + all = jQuery.merge( this.get(), set ); + + return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ? + all : + jQuery.unique( all ) ); + }, + + andSelf: function() { + return this.add( this.prevObject ); + } +}); + +// A painfully simple check to see if an element is disconnected +// from a document (should be improved, where feasible). +function isDisconnected( node ) { + return !node || !node.parentNode || node.parentNode.nodeType === 11; +} + +jQuery.each({ + parent: function( elem ) { + var parent = elem.parentNode; + return parent && parent.nodeType !== 11 ? parent : null; + }, + parents: function( elem ) { + return jQuery.dir( elem, "parentNode" ); + }, + parentsUntil: function( elem, i, until ) { + return jQuery.dir( elem, "parentNode", until ); + }, + next: function( elem ) { + return jQuery.nth( elem, 2, "nextSibling" ); + }, + prev: function( elem ) { + return jQuery.nth( elem, 2, "previousSibling" ); + }, + nextAll: function( elem ) { + return jQuery.dir( elem, "nextSibling" ); + }, + prevAll: function( elem ) { + return jQuery.dir( elem, "previousSibling" ); + }, + nextUntil: function( elem, i, until ) { + return jQuery.dir( elem, "nextSibling", until ); + }, + prevUntil: function( elem, i, until ) { + return jQuery.dir( elem, "previousSibling", until ); + }, + siblings: function( elem ) { + return jQuery.sibling( elem.parentNode.firstChild, elem ); + }, + children: function( elem ) { + return jQuery.sibling( elem.firstChild ); + }, + contents: function( elem ) { + return jQuery.nodeName( elem, "iframe" ) ? + elem.contentDocument || elem.contentWindow.document : + jQuery.makeArray( elem.childNodes ); + } +}, function( name, fn ) { + jQuery.fn[ name ] = function( until, selector ) { + var ret = jQuery.map( this, fn, until ); + + if ( !runtil.test( name ) ) { + selector = until; + } + + if ( selector && typeof selector === "string" ) { + ret = jQuery.filter( selector, ret ); + } + + ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret; + + if ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) { + ret = ret.reverse(); + } + + return this.pushStack( ret, name, slice.call( arguments ).join(",") ); + }; +}); + +jQuery.extend({ + filter: function( expr, elems, not ) { + if ( not ) { + expr = ":not(" + expr + ")"; + } + + return elems.length === 1 ? + jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] : + jQuery.find.matches(expr, elems); + }, + + dir: function( elem, dir, until ) { + var matched = [], + cur = elem[ dir ]; + + while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { + if ( cur.nodeType === 1 ) { + matched.push( cur ); + } + cur = cur[dir]; + } + return matched; + }, + + nth: function( cur, result, dir, elem ) { + result = result || 1; + var num = 0; + + for ( ; cur; cur = cur[dir] ) { + if ( cur.nodeType === 1 && ++num === result ) { + break; + } + } + + return cur; + }, + + sibling: function( n, elem ) { + var r = []; + + for ( ; n; n = n.nextSibling ) { + if ( n.nodeType === 1 && n !== elem ) { + r.push( n ); + } + } + + return r; + } +}); + +// Implement the identical functionality for filter and not +function winnow( elements, qualifier, keep ) { + + // Can't pass null or undefined to indexOf in Firefox 4 + // Set to 0 to skip string check + qualifier = qualifier || 0; + + if ( jQuery.isFunction( qualifier ) ) { + return jQuery.grep(elements, function( elem, i ) { + var retVal = !!qualifier.call( elem, i, elem ); + return retVal === keep; + }); + + } else if ( qualifier.nodeType ) { + return jQuery.grep(elements, function( elem, i ) { + return ( elem === qualifier ) === keep; + }); + + } else if ( typeof qualifier === "string" ) { + var filtered = jQuery.grep(elements, function( elem ) { + return elem.nodeType === 1; + }); + + if ( isSimple.test( qualifier ) ) { + return jQuery.filter(qualifier, filtered, !keep); + } else { + qualifier = jQuery.filter( qualifier, filtered ); + } + } + + return jQuery.grep(elements, function( elem, i ) { + return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep; + }); +} + + + + +function createSafeFragment( document ) { + var list = nodeNames.split( "|" ), + safeFrag = document.createDocumentFragment(); + + if ( safeFrag.createElement ) { + while ( list.length ) { + safeFrag.createElement( + list.pop() + ); + } + } + return safeFrag; +} + +var nodeNames = "abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|" + + "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", + rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g, + rleadingWhitespace = /^\s+/, + rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig, + rtagName = /<([\w:]+)/, + rtbody = /", "" ], + legend: [ 1, "
      ", "
      " ], + thead: [ 1, "", "
      " ], + tr: [ 2, "", "
      " ], + td: [ 3, "", "
      " ], + col: [ 2, "", "
      " ], + area: [ 1, "", "" ], + _default: [ 0, "", "" ] + }, + safeFragment = createSafeFragment( document ); + +wrapMap.optgroup = wrapMap.option; +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; + +// IE can't serialize and + + + + + + + + + + + + + + + + + + +
      + +
      + +
      + +
      +
      + + + diff --git a/hsweb-ui/workflow/diagram-viewer/style.css b/hsweb-ui/workflow/diagram-viewer/style.css new file mode 100644 index 0000000..bd9675a --- /dev/null +++ b/hsweb-ui/workflow/diagram-viewer/style.css @@ -0,0 +1 @@ +body { background: #fafafa; color: #708090; /* font: 300 100.1% "Helvetica Neue", Helvetica, "Arial Unicode MS", Arial, sans-serif; */ font-family: Verdana, sans-serif, Arial; font-size: 10px; } .wrapper { height: 100%; position: relative; width: 100%; } /* #holder { height: 480px; width: 640px; b_ackground: #F8F8FF; -moz-border-radius: 10px; -webkit-border-radius: 10px; -webkit-box-shadow: 0 1px 3px #666; background: #DDD url(./images/bg.png); /* background: #DDD url(./images/checker-bg.png); * / b_order:0px solid #dedede; } */ div.diagramHolder { float: left; } div.diagram { /*border:1px solid #dedede;*/ margin: 5px; padding: 5px; background: #FFF; } div.diagram.hidden { display: none; } svg { background: #DDD url(./images/bg.png); } div.diagram-info { float: left; position: relative; padding: 5px; } /* Breadcrumbs */ #diagramBreadCrumbs { margin-left: 2px; margin-right: 2px; margin-top: 10px; } #diagramBreadCrumbs ul { list-style: none; background-color: white; border: 1px solid #DEDEDE; border-color: #C0C2C5; margin: 0; margin-bottom: 10px; margin-left: 0; -webkit-padding-start: 0px; -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; } #diagramBreadCrumbs li { /*text-decoration: underline;*/ display: inline-block; vertical-align: middle; padding-left: .75em; padding-right: 0; cursor: pointer; } #diagramBreadCrumbs li.selected { color: #9370DB; color: #4876FF; color: #4F94CD; font-weight: bold; } #diagramBreadCrumbs li span { background: url(images/breadcrumbs.png) no-repeat 100% 50%; display: block; padding: .5em 15px .5em 0; } /* Progress bar */ .ui-progressbar { height: 25px; /*height:2em; text-align: left; overflow: hidden; */ background: white; border: 1px solid #949DAD; margin: 2px; overflow: hidden; padding: 1px; position: relative; -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; } .ui-progressbar .ui-progressbar-value { m_argin: -1px; height: 100%; background: #D4E4FF; -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; } .ui-widget-header a { color: #222222 /*{fcHeader}*/; } .ui-progressbar .ui-progressbar-label { position: absolute; margin-top: 7px; border: 0px solid red; width: 100%; text-align: center; } \ No newline at end of file diff --git a/hsweb-ui/workflow/editor-app/app-cfg.js b/hsweb-ui/workflow/editor-app/app-cfg.js new file mode 100644 index 0000000..747e42c --- /dev/null +++ b/hsweb-ui/workflow/editor-app/app-cfg.js @@ -0,0 +1,26 @@ +/* + * Activiti Modeler component part of the Activiti project + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ +'use strict'; + +var ACTIVITI = ACTIVITI || {}; + +ACTIVITI.CONFIG = { + 'contextRoot': (window.top.API_BASE_PATH || "http://localhost:8000/api/") + 'workflow/', + 'uiRoot': ( window.top.BASE_PATH || "http://localhost:8000/") + "workflow/" +}; diff --git a/hsweb-ui/workflow/editor-app/app.js b/hsweb-ui/workflow/editor-app/app.js new file mode 100644 index 0000000..3b44e1c --- /dev/null +++ b/hsweb-ui/workflow/editor-app/app.js @@ -0,0 +1,435 @@ +/* + * Activiti Modeler component part of the Activiti project + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ +'use strict'; + +var activitiModeler = angular.module('activitiModeler', [ + 'ngCookies', + 'ngResource', + 'ngSanitize', + 'ngRoute', + 'ngDragDrop', + 'mgcrea.ngStrap', + 'ngGrid', + 'ngAnimate', + 'pascalprecht.translate', + 'duScroll' +]); + +var activitiModule = activitiModeler; + +activitiModeler + // Initialize routes + .config(['$selectProvider', '$translateProvider', function ($selectProvider, $translateProvider) { + + // Override caret for bs-select directive + angular.extend($selectProvider.defaults, { + caretHtml: ' ' + }); + + // Initialize angular-translate + $translateProvider.useStaticFilesLoader({ + prefix: './editor-app/i18n/', + suffix: '.json' + }); + var language = navigator.language; + if("zh-CN" == language){ + $translateProvider.preferredLanguage('zh-CN'); + }else{ + $translateProvider.preferredLanguage('en'); + } + // remember language + $translateProvider.useCookieStorage(); + + }]) + .run(['$rootScope', '$timeout', '$modal', '$translate', '$location', '$window', '$http', '$q', + function($rootScope, $timeout, $modal, $translate, $location, $window, $http, $q) { + + $rootScope.config = ACTIVITI.CONFIG; + + $rootScope.editorInitialized = false; + + $rootScope.editorFactory = $q.defer(); + + $rootScope.forceSelectionRefresh = false; + + $rootScope.ignoreChanges = false; // by default never ignore changes + + $rootScope.validationErrors = []; + + $rootScope.staticIncludeVersion = Date.now(); + + /** + * A 'safer' apply that avoids concurrent updates (which $apply allows). + */ + $rootScope.safeApply = function(fn) { + var phase = this.$root.$$phase; + if(phase == '$apply' || phase == '$digest') { + if(fn && (typeof(fn) === 'function')) { + fn(); + } + } else { + this.$apply(fn); + } + }; + + + /** + * Initialize the event bus: couple all Oryx events with a dispatch of the + * event of the event bus. This way, it gets much easier to attach custom logic + * to any event. + */ + + /* Helper method to fetch model from server (always needed) */ + function fetchModel(modelId) { + + var modelUrl = KISBPM.URL.getModel(modelId); + + $http({method: 'GET', url: modelUrl}). + success(function (data, status, headers, config) { + $rootScope.editor = new ORYX.Editor(data); + $rootScope.modelData = angular.fromJson(data); + $rootScope.editorFactory.resolve(); + }). + error(function (data, status, headers, config) { + console.log('Error loading model with id ' + modelId + ' ' + data); + }); + } + + + function initScrollHandling() { + var canvasSection = jQuery('#canvasSection'); + canvasSection.scroll(function() { + + // Hides the resizer and quick menu items during scrolling + + var selectedElements = $rootScope.editor.selection; + var subSelectionElements = $rootScope.editor._subSelection; + + $rootScope.selectedElements = selectedElements; + $rootScope.subSelectionElements = subSelectionElements; + if (selectedElements && selectedElements.length > 0) { + $rootScope.selectedElementBeforeScrolling = selectedElements[0]; + } + + jQuery('.Oryx_button').each(function(i, obj) { + $rootScope.orginalOryxButtonStyle = obj.style.display; + obj.style.display = 'none'; + }); + + jQuery('.resizer_southeast').each(function(i, obj) { + $rootScope.orginalResizerSEStyle = obj.style.display; + obj.style.display = 'none'; + }); + jQuery('.resizer_northwest').each(function(i, obj) { + $rootScope.orginalResizerNWStyle = obj.style.display; + obj.style.display = 'none'; + }); + $rootScope.editor.handleEvents({type:ORYX.CONFIG.EVENT_CANVAS_SCROLL}); + }); + + canvasSection.scrollStopped(function(){ + + // Puts the quick menu items and resizer back when scroll is stopped. + + $rootScope.editor.setSelection([]); // needed cause it checks for element changes and does nothing if the elements are the same + $rootScope.editor.setSelection($rootScope.selectedElements, $rootScope.subSelectionElements); + $rootScope.selectedElements = undefined; + $rootScope.subSelectionElements = undefined; + + function handleDisplayProperty(obj) { + if (jQuery(obj).position().top > 0) { + obj.style.display = 'block'; + } else { + obj.style.display = 'none'; + } + } + + jQuery('.Oryx_button').each(function(i, obj) { + handleDisplayProperty(obj); + }); + + jQuery('.resizer_southeast').each(function(i, obj) { + handleDisplayProperty(obj); + }); + jQuery('.resizer_northwest').each(function(i, obj) { + handleDisplayProperty(obj); + }); + + }); + } + + /** + * Initialize the Oryx Editor when the content has been loaded + */ + $rootScope.$on('$includeContentLoaded', function (event) { + if (!$rootScope.editorInitialized) { + + ORYX._loadPlugins(); + + var modelId = EDITOR.UTIL.getParameterByName('modelId'); + fetchModel(modelId); + + $rootScope.window = {}; + var updateWindowSize = function() { + $rootScope.window.width = $window.innerWidth; + $rootScope.window.height = $window.innerHeight; + }; + + // Window resize hook + angular.element($window).bind('resize', function() { + $rootScope.safeApply(updateWindowSize()); + }); + + $rootScope.$watch('window.forceRefresh', function(newValue) { + if(newValue) { + $timeout(function() { + updateWindowSize(); + $rootScope.window.forceRefresh = false; + }); + } + }); + + updateWindowSize(); + + // Hook in resizing of main panels when window resizes + // TODO: perhaps move to a separate JS-file? + jQuery(window).resize(function () { + + // Calculate the offset based on the bottom of the module header + var offset = jQuery("#editor-header").offset(); + var propSectionHeight = jQuery('#propertySection').height(); + var canvas = jQuery('#canvasSection'); + var mainHeader = jQuery('#main-header'); + + if (offset == undefined || offset === null + || propSectionHeight === undefined || propSectionHeight === null + || canvas === undefined || canvas === null || mainHeader === null) { + return; + } + + if ($rootScope.editor) + { + var selectedElements = $rootScope.editor.selection; + var subSelectionElements = $rootScope.editor._subSelection; + + $rootScope.selectedElements = selectedElements; + $rootScope.subSelectionElements = subSelectionElements; + if (selectedElements && selectedElements.length > 0) + { + $rootScope.selectedElementBeforeScrolling = selectedElements[0]; + + $rootScope.editor.setSelection([]); // needed cause it checks for element changes and does nothing if the elements are the same + $rootScope.editor.setSelection($rootScope.selectedElements, $rootScope.subSelectionElements); + $rootScope.selectedElements = undefined; + $rootScope.subSelectionElements = undefined; + } + } + + var totalAvailable = jQuery(window).height() - offset.top - mainHeader.height() - 21; + canvas.height(totalAvailable - propSectionHeight); + jQuery('#paletteSection').height(totalAvailable); + + // Update positions of the resize-markers, according to the canvas + + var actualCanvas = null; + if (canvas && canvas[0].children[1]) { + actualCanvas = canvas[0].children[1]; + } + + var canvasTop = canvas.position().top; + var canvasLeft = canvas.position().left; + var canvasHeight = canvas[0].clientHeight; + var canvasWidth = canvas[0].clientWidth; + var iconCenterOffset = 8; + var widthDiff = 0; + + var actualWidth = 0; + if(actualCanvas) { + // In some browsers, the SVG-element clientwidth isn't available, so we revert to the parent + actualWidth = actualCanvas.clientWidth || actualCanvas.parentNode.clientWidth; + } + + + if(actualWidth < canvas[0].clientWidth) { + widthDiff = actualWidth - canvas[0].clientWidth; + // In case the canvas is smaller than the actual viewport, the resizers should be moved + canvasLeft -= widthDiff / 2; + canvasWidth += widthDiff; + } + + var iconWidth = 17; + var iconOffset = 20; + + var north = jQuery('#canvas-grow-N'); + north.css('top', canvasTop + iconOffset + 'px'); + north.css('left', canvasLeft - 10 + (canvasWidth - iconWidth) / 2 + 'px'); + + var south = jQuery('#canvas-grow-S'); + south.css('top', (canvasTop + canvasHeight - iconOffset - iconCenterOffset) + 'px'); + south.css('left', canvasLeft - 10 + (canvasWidth - iconWidth) / 2 + 'px'); + + var east = jQuery('#canvas-grow-E'); + east.css('top', canvasTop - 10 + (canvasHeight - iconWidth) / 2 + 'px'); + east.css('left', (canvasLeft + canvasWidth - iconOffset - iconCenterOffset) + 'px'); + + var west = jQuery('#canvas-grow-W'); + west.css('top', canvasTop -10 + (canvasHeight - iconWidth) / 2 + 'px'); + west.css('left', canvasLeft + iconOffset + 'px'); + + north = jQuery('#canvas-shrink-N'); + north.css('top', canvasTop + iconOffset + 'px'); + north.css('left', canvasLeft + 10 + (canvasWidth - iconWidth) / 2 + 'px'); + + south = jQuery('#canvas-shrink-S'); + south.css('top', (canvasTop + canvasHeight - iconOffset - iconCenterOffset) + 'px'); + south.css('left', canvasLeft +10 + (canvasWidth - iconWidth) / 2 + 'px'); + + east = jQuery('#canvas-shrink-E'); + east.css('top', canvasTop + 10 + (canvasHeight - iconWidth) / 2 + 'px'); + east.css('left', (canvasLeft + canvasWidth - iconOffset - iconCenterOffset) + 'px'); + + west = jQuery('#canvas-shrink-W'); + west.css('top', canvasTop + 10 + (canvasHeight - iconWidth) / 2 + 'px'); + west.css('left', canvasLeft + iconOffset + 'px'); + }); + + jQuery(window).trigger('resize'); + + jQuery.fn.scrollStopped = function(callback) { + jQuery(this).scroll(function(){ + var self = this, $this = jQuery(self); + if ($this.data('scrollTimeout')) { + clearTimeout($this.data('scrollTimeout')); + } + $this.data('scrollTimeout', setTimeout(callback,50,self)); + }); + }; + + // Always needed, cause the DOM element on which the scroll event listeners are attached are changed for every new model + initScrollHandling(); + + $rootScope.editorInitialized = true; + } + }); + + /** + * Initialize the event bus: couple all Oryx events with a dispatch of the + * event of the event bus. This way, it gets much easier to attach custom logic + * to any event. + */ + + $rootScope.editorFactory.promise.then(function() { + + KISBPM.eventBus.editor = $rootScope.editor; + + var eventMappings = [ + { oryxType : ORYX.CONFIG.EVENT_SELECTION_CHANGED, kisBpmType : KISBPM.eventBus.EVENT_TYPE_SELECTION_CHANGE }, + { oryxType : ORYX.CONFIG.EVENT_DBLCLICK, kisBpmType : KISBPM.eventBus.EVENT_TYPE_DOUBLE_CLICK }, + { oryxType : ORYX.CONFIG.EVENT_MOUSEOUT, kisBpmType : KISBPM.eventBus.EVENT_TYPE_MOUSE_OUT }, + { oryxType : ORYX.CONFIG.EVENT_MOUSEOVER, kisBpmType : KISBPM.eventBus.EVENT_TYPE_MOUSE_OVER } + + ]; + + eventMappings.forEach(function(eventMapping) { + $rootScope.editor.registerOnEvent(eventMapping.oryxType, function(event) { + KISBPM.eventBus.dispatch(eventMapping.kisBpmType, event); + }); + }); + + $rootScope.editor.registerOnEvent(ORYX.CONFIG.EVENT_SHAPEREMOVED, function (event) { + var validateButton = document.getElementById(event.shape.resourceId + "-validate-button"); + if (validateButton) + { + validateButton.style.display = 'none'; + } + }); + + // The Oryx canvas is ready (we know since we're in this promise callback) and the + // event bus is ready. The editor is now ready for use + KISBPM.eventBus.dispatch(KISBPM.eventBus.EVENT_TYPE_EDITOR_READY, {type : KISBPM.eventBus.EVENT_TYPE_EDITOR_READY}); + + }); + + // Alerts + $rootScope.alerts = { + queue: [] + }; + + $rootScope.showAlert = function(alert) { + if(alert.queue.length > 0) { + alert.current = alert.queue.shift(); + // Start timout for message-pruning + alert.timeout = $timeout(function() { + if (alert.queue.length == 0) { + alert.current = undefined; + alert.timeout = undefined; + } else { + $rootScope.showAlert(alert); + } + }, (alert.current.type == 'error' ? 5000 : 1000)); + } else { + $rootScope.alerts.current = undefined; + } + }; + + $rootScope.addAlert = function(message, type) { + var newAlert = {message: message, type: type}; + if (!$rootScope.alerts.timeout) { + // Timeout for message queue is not running, start one + $rootScope.alerts.queue.push(newAlert); + $rootScope.showAlert($rootScope.alerts); + } else { + $rootScope.alerts.queue.push(newAlert); + } + }; + + $rootScope.dismissAlert = function() { + if (!$rootScope.alerts.timeout) { + $rootScope.alerts.current = undefined; + } else { + $timeout.cancel($rootScope.alerts.timeout); + $rootScope.alerts.timeout = undefined; + $rootScope.showAlert($rootScope.alerts); + } + }; + + $rootScope.addAlertPromise = function(promise, type) { + if (promise) { + promise.then(function(data) { + $rootScope.addAlert(data, type); + }); + } + }; + + } + ]) + + // Moment-JS date-formatting filter + .filter('dateformat', function() { + return function(date, format) { + if (date) { + if (format) { + return moment(date).format(format); + } else { + return moment(date).calendar(); + } + } + return ''; + }; + }); diff --git a/hsweb-ui/workflow/editor-app/configuration/properties-assignment-controller.js b/hsweb-ui/workflow/editor-app/configuration/properties-assignment-controller.js new file mode 100644 index 0000000..6fbfc20 --- /dev/null +++ b/hsweb-ui/workflow/editor-app/configuration/properties-assignment-controller.js @@ -0,0 +1,150 @@ +/* + * Activiti Modeler component part of the Activiti project + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/* + * Assignment + */ +var KisBpmAssignmentCtrl = [ '$scope', '$modal', function($scope, $modal) { + + // Config for the modal window + var opts = { + template: 'editor-app/configuration/properties/assignment-popup.html?version=' + Date.now(), + scope: $scope + }; + + // Open the dialog + $modal(opts); +}]; + +var KisBpmAssignmentPopupCtrl = [ '$scope', function($scope) { + + // Put json representing assignment on scope + if ($scope.property.value !== undefined && $scope.property.value !== null + && $scope.property.value.assignment !== undefined + && $scope.property.value.assignment !== null) + { + $scope.assignment = $scope.property.value.assignment; + } else { + $scope.assignment = {}; + } + + if ($scope.assignment.candidateUsers == undefined || $scope.assignment.candidateUsers.length == 0) + { + $scope.assignment.candidateUsers = [{value: ''}]; + } + + // Click handler for + button after enum value + var userValueIndex = 1; + $scope.addCandidateUserValue = function(index) { + $scope.assignment.candidateUsers.splice(index + 1, 0, {value: 'value ' + userValueIndex++}); + }; + + // Click handler for - button after enum value + $scope.removeCandidateUserValue = function(index) { + $scope.assignment.candidateUsers.splice(index, 1); + }; + + if ($scope.assignment.candidateGroups == undefined || $scope.assignment.candidateGroups.length == 0) + { + $scope.assignment.candidateGroups = [{value: ''}]; + } + + var groupValueIndex = 1; + $scope.addCandidateGroupValue = function(index) { + $scope.assignment.candidateGroups.splice(index + 1, 0, {value: 'value ' + groupValueIndex++}); + }; + + // Click handler for - button after enum value + $scope.removeCandidateGroupValue = function(index) { + $scope.assignment.candidateGroups.splice(index, 1); + }; + + $scope.save = function() { + + $scope.property.value = {}; + handleAssignmentInput($scope); + $scope.property.value.assignment = $scope.assignment; + + $scope.updatePropertyInModel($scope.property); + $scope.close(); + }; + + // Close button handler + $scope.close = function() { + handleAssignmentInput($scope); + $scope.property.mode = 'read'; + $scope.$hide(); + }; + + var handleAssignmentInput = function($scope) { + if ($scope.assignment.candidateUsers) + { + var emptyUsers = true; + var toRemoveIndexes = []; + for (var i = 0; i < $scope.assignment.candidateUsers.length; i++) + { + if ($scope.assignment.candidateUsers[i].value != '') + { + emptyUsers = false; + } + else + { + toRemoveIndexes[toRemoveIndexes.length] = i; + } + } + + for (var i = 0; i < toRemoveIndexes.length; i++) + { + $scope.assignment.candidateUsers.splice(toRemoveIndexes[i], 1); + } + + if (emptyUsers) + { + $scope.assignment.candidateUsers = undefined; + } + } + + if ($scope.assignment.candidateGroups) + { + var emptyGroups = true; + var toRemoveIndexes = []; + for (var i = 0; i < $scope.assignment.candidateGroups.length; i++) + { + if ($scope.assignment.candidateGroups[i].value != '') + { + emptyGroups = false; + } + else + { + toRemoveIndexes[toRemoveIndexes.length] = i; + } + } + + for (var i = 0; i < toRemoveIndexes.length; i++) + { + $scope.assignment.candidateGroups.splice(toRemoveIndexes[i], 1); + } + + if (emptyGroups) + { + $scope.assignment.candidateGroups = undefined; + } + } + }; +}]; \ No newline at end of file diff --git a/hsweb-ui/workflow/editor-app/configuration/properties-condition-expression-controller.js b/hsweb-ui/workflow/editor-app/configuration/properties-condition-expression-controller.js new file mode 100644 index 0000000..6c2be38 --- /dev/null +++ b/hsweb-ui/workflow/editor-app/configuration/properties-condition-expression-controller.js @@ -0,0 +1,58 @@ +/* + * Activiti Modeler component part of the Activiti project + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/* + * Condition expression + */ + +var KisBpmConditionExpressionCtrl = [ '$scope', '$modal', function($scope, $modal) { + + // Config for the modal window + var opts = { + template: 'editor-app/configuration/properties/condition-expression-popup.html?version=' + Date.now(), + scope: $scope + }; + + // Open the dialog + $modal(opts); +}]; + +var KisBpmConditionExpressionPopupCtrl = [ '$scope', '$translate', '$http', function($scope, $translate, $http) { + + // Put json representing condition on scope + if ($scope.property.value !== undefined && $scope.property.value !== null) { + + $scope.conditionExpression = {value: $scope.property.value}; + + } else { + $scope.conditionExpression = {value: ''}; + } + + $scope.save = function() { + $scope.property.value = $scope.conditionExpression.value; + $scope.updatePropertyInModel($scope.property); + $scope.close(); + }; + + // Close button handler + $scope.close = function() { + $scope.property.mode = 'read'; + $scope.$hide(); + }; +}]; \ No newline at end of file diff --git a/hsweb-ui/workflow/editor-app/configuration/properties-custom-controllers.js b/hsweb-ui/workflow/editor-app/configuration/properties-custom-controllers.js new file mode 100644 index 0000000..92aa0ba --- /dev/null +++ b/hsweb-ui/workflow/editor-app/configuration/properties-custom-controllers.js @@ -0,0 +1,18 @@ +/* + * Activiti Modeler component part of the Activiti project + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ diff --git a/hsweb-ui/workflow/editor-app/configuration/properties-default-controllers.js b/hsweb-ui/workflow/editor-app/configuration/properties-default-controllers.js new file mode 100644 index 0000000..f3f4760 --- /dev/null +++ b/hsweb-ui/workflow/editor-app/configuration/properties-default-controllers.js @@ -0,0 +1,115 @@ +/* + * Activiti Modeler component part of the Activiti project + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/* + * String controller + */ + +var KisBpmStringPropertyCtrl = [ '$scope', function ($scope) { + + $scope.shapeId = $scope.selectedShape.id; + $scope.valueFlushed = false; + /** Handler called when input field is blurred */ + $scope.inputBlurred = function() { + $scope.valueFlushed = true; + if ($scope.property.value) { + $scope.property.value = $scope.property.value.replace(/(<([^>]+)>)/ig,""); + } + $scope.updatePropertyInModel($scope.property); + }; + + $scope.enterPressed = function(keyEvent) { + if (keyEvent && keyEvent.which === 13) { + keyEvent.preventDefault(); + $scope.inputBlurred(); // we want to do the same as if the user would blur the input field + } + }; + + $scope.$on('$destroy', function controllerDestroyed() { + if(!$scope.valueFlushed) { + if ($scope.property.value) { + $scope.property.value = $scope.property.value.replace(/(<([^>]+)>)/ig,""); + } + $scope.updatePropertyInModel($scope.property, $scope.shapeId); + } + }); + +}]; + +/* + * Boolean controller + */ + +var KisBpmBooleanPropertyCtrl = ['$scope', function ($scope) { + + $scope.changeValue = function() { + if ($scope.property.key === 'oryx-defaultflow' && $scope.property.value) { + var selectedShape = $scope.selectedShape; + if (selectedShape) { + var incomingNodes = selectedShape.getIncomingShapes(); + if (incomingNodes && incomingNodes.length > 0) { + // get first node, since there can be only one for a sequence flow + var rootNode = incomingNodes[0]; + var flows = rootNode.getOutgoingShapes(); + if (flows && flows.length > 1) { + // in case there are more flows, check if another flow is already defined as default + for (var i = 0; i < flows.length; i++) { + if (flows[i].resourceId != selectedShape.resourceId) { + var defaultFlowProp = flows[i].properties['oryx-defaultflow']; + if (defaultFlowProp) { + flows[i].setProperty('oryx-defaultflow', false, true); + } + } + } + } + } + } + } + $scope.updatePropertyInModel($scope.property); + }; + +}]; + +/* + * Text controller + */ + +var KisBpmTextPropertyCtrl = [ '$scope', '$modal', function($scope, $modal) { + + var opts = { + template: 'editor-app/configuration/properties/text-popup.html?version=' + Date.now(), + scope: $scope + }; + + // Open the dialog + $modal(opts); +}]; + +var KisBpmTextPropertyPopupCtrl = ['$scope', function($scope) { + + $scope.save = function() { + $scope.updatePropertyInModel($scope.property); + $scope.close(); + }; + + $scope.close = function() { + $scope.property.mode = 'read'; + $scope.$hide(); + }; +}]; \ No newline at end of file diff --git a/hsweb-ui/workflow/editor-app/configuration/properties-event-listeners-controller.js b/hsweb-ui/workflow/editor-app/configuration/properties-event-listeners-controller.js new file mode 100644 index 0000000..6bb0fac --- /dev/null +++ b/hsweb-ui/workflow/editor-app/configuration/properties-event-listeners-controller.js @@ -0,0 +1,266 @@ +/* + * Activiti Modeler component part of the Activiti project + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/* + * Execution listeners + */ + +var KisBpmEventListenersCtrl = [ '$scope', '$modal', '$timeout', '$translate', function($scope, $modal, $timeout, $translate) { + + // Config for the modal window + var opts = { + template: 'editor-app/configuration/properties/event-listeners-popup.html?version=' + Date.now(), + scope: $scope + }; + + // Open the dialog + $modal(opts); +}]; + +//Need a separate controller for the modal window due to https://github.com/angular-ui/bootstrap/issues/259 +// Will be fixed in a newer version of Angular UI +var KisBpmEventListenersPopupCtrl = [ '$scope', '$q', '$translate', function($scope, $q, $translate) { + + // Put json representing form properties on scope + if ($scope.property.value !== undefined && $scope.property.value !== null + && $scope.property.value.eventListeners !== undefined + && $scope.property.value.eventListeners !== null) { + + if ($scope.property.value.eventListeners.constructor == String) + { + $scope.eventListeners = JSON.parse($scope.property.value.eventListeners); + } + else + { + // Note that we clone the json object rather then setting it directly, + // this to cope with the fact that the user can click the cancel button and no changes should have happened + $scope.eventListeners = angular.copy($scope.property.value.eventListeners); + } + + } else { + $scope.eventListeners = []; + } + + // Array to contain selected properties (yes - we only can select one, but ng-grid isn't smart enough) + $scope.selectedListeners = []; + $scope.translationsRetrieved = false; + + $scope.labels = {}; + + var eventPromise = $translate('PROPERTY.EXECUTIONLISTENERS.EVENT'); + var implementationPromise = $translate('PROPERTY.EXECUTIONLISTENERS.FIELDS.IMPLEMENTATION'); + var namePromise = $translate('PROPERTY.EXECUTIONLISTENERS.FIELDS.NAME'); + + $q.all([eventPromise, implementationPromise, namePromise]).then(function(results) { + $scope.labels.eventLabel = results[0]; + $scope.labels.implementationLabel = results[1]; + $scope.labels.nameLabel = results[2]; + $scope.translationsRetrieved = true; + + // Config for grid + $scope.gridOptions = { + data: 'eventListeners', + enableRowReordering: true, + headerRowHeight: 28, + multiSelect: false, + keepLastSelected : false, + selectedItems: $scope.selectedListeners, + afterSelectionChange: function (rowItem, event) { + + if ($scope.selectedListeners.length > 0) + { + var fields = $scope.selectedListeners[0].fields; + if (fields !== undefined && fields !== null) + { + for (var i = 0; i < fields.length; i++) + { + var field = fields[i]; + if (field.stringValue !== undefined && field.stringValue !== '') + { + field.implementation = field.stringValue; + } + else if (field.expression !== undefined && field.expression !== '') + { + field.implementation = field.expression; + } + else if (field.string !== undefined && field.string !== '') + { + field.implementation = field.string; + } + } + } + + if (!$scope.selectedListeners[0].events || $scope.selectedListeners[0].events.length == 0) + { + $scope.selectedListeners[0].events = [{event: ''}]; + } + } + }, + columnDefs: [{ field: 'event', displayName: $scope.labels.eventLabel }, + { field: 'implementation', displayName: $scope.labels.implementationLabel }] + }; + }); + + // Click handler for + button after enum value + $scope.addEventValue = function(index) { + $scope.selectedListeners[0].events.splice(index + 1, 0, {event: ''}); + }; + + // Click handler for - button after enum value + $scope.removeEventValue = function(index) { + $scope.selectedListeners[0].events.splice(index, 1); + $scope.listenerDetailsChanged(); + }; + + $scope.listenerDetailsChanged = function() { + var listener = $scope.selectedListeners[0]; + if (listener.events) + { + var eventText = ''; + for (var i = 0; i < listener.events.length; i++) + { + if (i > 0) + { + eventText += ", "; + } + eventText += listener.events[i].event; + } + $scope.selectedListeners[0].event = eventText; + } + + if (listener.rethrowEvent) + { + var implementationText = ''; + if (listener.rethrowType && listener.rethrowType.length > 0) + { + if (listener.rethrowType === 'error' && listener.errorcode !== '') + { + implementationText = "Rethrow as error " + listener.errorcode; + } + else if (listener.rethrowType === 'message' && listener.messagename !== '') + { + implementationText = "Rethrow as message " + listener.messagename; + } + else if ((listener.rethrowType === 'signal' || listener.rethrowType === 'globalSignal') && listener.signalname !== '') + { + implementationText = "Rethrow as signal " + listener.signalname; + } + } + $scope.selectedListeners[0].implementation = implementationText; + } + else + { + if ($scope.selectedListeners[0].className !== '') + { + $scope.selectedListeners[0].implementation = $scope.selectedListeners[0].className; + } + else if ($scope.selectedListeners[0].delegateExpression !== '') + { + $scope.selectedListeners[0].implementation = $scope.selectedListeners[0].delegateExpression; + } + else + { + $scope.selectedListeners[0].implementation = ''; + } + } + }; + + // Click handler for add button + $scope.addNewListener = function() { + $scope.eventListeners.push({ event : '', + implementation : '', + className : '', + delegateExpression: '', + retrowEvent: false}); + }; + + // Click handler for remove button + $scope.removeListener = function() { + if ($scope.selectedListeners.length > 0) { + var index = $scope.eventListeners.indexOf($scope.selectedListeners[0]); + $scope.gridOptions.selectItem(index, false); + $scope.eventListeners.splice(index, 1); + + $scope.selectedListeners.length = 0; + if (index < $scope.eventListeners.length) { + $scope.gridOptions.selectItem(index + 1, true); + } else if ($scope.eventListeners.length > 0) { + $scope.gridOptions.selectItem(index - 1, true); + } + } + }; + + // Click handler for up button + $scope.moveListenerUp = function() { + if ($scope.selectedListeners.length > 0) { + var index = $scope.eventListeners.indexOf($scope.selectedListeners[0]); + if (index != 0) { // If it's the first, no moving up of course + // Reason for funny way of swapping, see https://github.com/angular-ui/ng-grid/issues/272 + var temp = $scope.eventListeners[index]; + $scope.eventListeners.splice(index, 1); + $timeout(function(){ + $scope.eventListeners.splice(index + -1, 0, temp); + }, 100); + + } + } + }; + + // Click handler for down button + $scope.moveListenerDown = function() { + if ($scope.selectedListeners.length > 0) { + var index = $scope.eventListeners.indexOf($scope.selectedListeners[0]); + if (index != $scope.eventListeners.length - 1) { // If it's the last element, no moving down of course + // Reason for funny way of swapping, see https://github.com/angular-ui/ng-grid/issues/272 + var temp = $scope.eventListeners[index]; + $scope.eventListeners.splice(index, 1); + $timeout(function(){ + $scope.eventListeners.splice(index + 1, 0, temp); + }, 100); + + } + } + }; + + // Click handler for save button + $scope.save = function() { + + if ($scope.eventListeners.length > 0) { + $scope.property.value = {}; + $scope.property.value.eventListeners = $scope.eventListeners; + } else { + $scope.property.value = null; + } + + $scope.updatePropertyInModel($scope.property); + $scope.close(); + }; + + $scope.cancel = function() { + $scope.property.mode = 'read'; + $scope.$hide(); + }; + + // Close button handler + $scope.close = function() { + $scope.property.mode = 'read'; + $scope.$hide(); + }; + +}]; \ No newline at end of file diff --git a/hsweb-ui/workflow/editor-app/configuration/properties-execution-listeners-controller.js b/hsweb-ui/workflow/editor-app/configuration/properties-execution-listeners-controller.js new file mode 100644 index 0000000..abe74e5 --- /dev/null +++ b/hsweb-ui/workflow/editor-app/configuration/properties-execution-listeners-controller.js @@ -0,0 +1,326 @@ +/* + * Activiti Modeler component part of the Activiti project + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/* + * Execution listeners + */ + +var KisBpmExecutionListenersCtrl = [ '$scope', '$modal', '$timeout', '$translate', function($scope, $modal, $timeout, $translate) { + + // Config for the modal window + var opts = { + template: 'editor-app/configuration/properties/execution-listeners-popup.html?version=' + Date.now(), + scope: $scope + }; + + // Open the dialog + $modal(opts); +}]; + +var KisBpmExecutionListenersPopupCtrl = [ '$scope', '$q', '$translate', function($scope, $q, $translate) { + + // Put json representing form properties on scope + if ($scope.property.value !== undefined && $scope.property.value !== null + && $scope.property.value.executionListeners !== undefined + && $scope.property.value.executionListeners !== null) { + + if ($scope.property.value.executionListeners.constructor == String) + { + $scope.executionListeners = JSON.parse($scope.property.value.executionListeners); + } + else + { + // Note that we clone the json object rather then setting it directly, + // this to cope with the fact that the user can click the cancel button and no changes should have happened + $scope.executionListeners = angular.copy($scope.property.value.executionListeners); + } + + for (var i = 0; i < $scope.executionListeners.length; i++) + { + var executionListener = $scope.executionListeners[i]; + if (executionListener.className !== undefined && executionListener.className !== '') + { + executionListener.implementation = executionListener.className; + } + else if (executionListener.expression !== undefined && executionListener.expression !== '') + { + executionListener.implementation = executionListener.expression; + } + else if (executionListener.delegateExpression !== undefined && executionListener.delegateExpression !== '') + { + executionListener.implementation = executionListener.delegateExpression; + } + } + } else { + $scope.executionListeners = []; + } + + // Array to contain selected properties (yes - we only can select one, but ng-grid isn't smart enough) + $scope.selectedListeners = []; + $scope.selectedFields = []; + $scope.translationsRetrieved = false; + + $scope.labels = {}; + + var eventPromise = $translate('PROPERTY.EXECUTIONLISTENERS.EVENT'); + var implementationPromise = $translate('PROPERTY.EXECUTIONLISTENERS.FIELDS.IMPLEMENTATION'); + var namePromise = $translate('PROPERTY.EXECUTIONLISTENERS.FIELDS.NAME'); + + $q.all([eventPromise, implementationPromise, namePromise]).then(function(results) { + $scope.labels.eventLabel = results[0]; + $scope.labels.implementationLabel = results[1]; + $scope.labels.nameLabel = results[2]; + $scope.translationsRetrieved = true; + + // Config for grid + $scope.gridOptions = { + data: 'executionListeners', + enableRowReordering: true, + headerRowHeight: 28, + multiSelect: false, + keepLastSelected : false, + selectedItems: $scope.selectedListeners, + afterSelectionChange: function (rowItem, event) { + $scope.selectedFields.length = 0; + if ($scope.selectedListeners.length > 0) + { + var fields = $scope.selectedListeners[0].fields; + if (fields !== undefined && fields !== null) + { + for (var i = 0; i < fields.length; i++) + { + var field = fields[i]; + if (field.stringValue !== undefined && field.stringValue !== '') + { + field.implementation = field.stringValue; + } + else if (field.expression !== undefined && field.expression !== '') + { + field.implementation = field.expression; + } + else if (field.string !== undefined && field.string !== '') + { + field.implementation = field.string; + } + } + } + } + }, + columnDefs: [{ field: 'event', displayName: $scope.labels.eventLabel }, + { field: 'implementation', displayName: $scope.labels.implementationLabel }] + }; + + // Config for field grid + $scope.gridFieldOptions = { + data: 'selectedListeners[0].fields', + enableRowReordering: true, + headerRowHeight: 28, + multiSelect: false, + keepLastSelected : false, + selectedItems: $scope.selectedFields, + columnDefs: [{ field: 'name', displayName: $scope.labels.nameLabel }, + { field: 'implementation', displayName: $scope.labels.implementationLabel}] + }; + }); + + $scope.listenerDetailsChanged = function() { + if ($scope.selectedListeners[0].className !== '') + { + $scope.selectedListeners[0].implementation = $scope.selectedListeners[0].className; + } + else if ($scope.selectedListeners[0].expression !== '') + { + $scope.selectedListeners[0].implementation = $scope.selectedListeners[0].expression; + } + else if ($scope.selectedListeners[0].delegateExpression !== '') + { + $scope.selectedListeners[0].implementation = $scope.selectedListeners[0].delegateExpression; + } + else + { + $scope.selectedListeners[0].implementation = ''; + } + }; + + // Click handler for add button + $scope.addNewListener = function() { + $scope.executionListeners.push({ event : 'start', + implementation : '', + className : '', + expression: '', + delegateExpression: ''}); + }; + + // Click handler for remove button + $scope.removeListener = function() { + if ($scope.selectedListeners.length > 0) { + var index = $scope.executionListeners.indexOf($scope.selectedListeners[0]); + $scope.gridOptions.selectItem(index, false); + $scope.executionListeners.splice(index, 1); + + $scope.selectedListeners.length = 0; + if (index < $scope.executionListeners.length) { + $scope.gridOptions.selectItem(index + 1, true); + } else if ($scope.executionListeners.length > 0) { + $scope.gridOptions.selectItem(index - 1, true); + } + } + }; + + // Click handler for up button + $scope.moveListenerUp = function() { + if ($scope.selectedListeners.length > 0) { + var index = $scope.executionListeners.indexOf($scope.selectedListeners[0]); + if (index != 0) { // If it's the first, no moving up of course + // Reason for funny way of swapping, see https://github.com/angular-ui/ng-grid/issues/272 + var temp = $scope.executionListeners[index]; + $scope.executionListeners.splice(index, 1); + $timeout(function(){ + $scope.executionListeners.splice(index + -1, 0, temp); + }, 100); + + } + } + }; + + // Click handler for down button + $scope.moveListenerDown = function() { + if ($scope.selectedListeners.length > 0) { + var index = $scope.executionListeners.indexOf($scope.selectedListeners[0]); + if (index != $scope.executionListeners.length - 1) { // If it's the last element, no moving down of course + // Reason for funny way of swapping, see https://github.com/angular-ui/ng-grid/issues/272 + var temp = $scope.executionListeners[index]; + $scope.executionListeners.splice(index, 1); + $timeout(function(){ + $scope.executionListeners.splice(index + 1, 0, temp); + }, 100); + + } + } + }; + + $scope.fieldDetailsChanged = function() { + if ($scope.selectedFields[0].stringValue !== '') + { + $scope.selectedFields[0].implementation = $scope.selectedFields[0].stringValue; + } + else if ($scope.selectedFields[0].expression !== '') + { + $scope.selectedFields[0].implementation = $scope.selectedFields[0].expression; + } + else if ($scope.selectedFields[0].string !== '') + { + $scope.selectedFields[0].implementation = $scope.selectedFields[0].string; + } + else + { + $scope.selectedFields[0].implementation = ''; + } + }; + + // Click handler for add button + $scope.addNewField = function() { + if ($scope.selectedListeners.length > 0) + { + if ($scope.selectedListeners[0].fields == undefined) + { + $scope.selectedListeners[0].fields = []; + } + $scope.selectedListeners[0].fields.push({ name : 'fieldName', + implementation : '', + stringValue : '', + expression: '', + string: ''}); + } + }; + + // Click handler for remove button + $scope.removeField = function() { + if ($scope.selectedFields.length > 0) { + var index = $scope.selectedListeners[0].fields.indexOf($scope.selectedFields[0]); + $scope.gridFieldOptions.selectItem(index, false); + $scope.selectedListeners[0].fields.splice(index, 1); + + $scope.selectedFields.length = 0; + if (index < $scope.selectedListeners[0].fields.length) { + $scope.gridFieldOptions.selectItem(index + 1, true); + } else if ($scope.selectedListeners[0].fields.length > 0) { + $scope.gridFieldOptions.selectItem(index - 1, true); + } + } + }; + + // Click handler for up button + $scope.moveFieldUp = function() { + if ($scope.selectedFields.length > 0) { + var index = $scope.selectedListeners[0].fields.indexOf($scope.selectedFields[0]); + if (index != 0) { // If it's the first, no moving up of course + // Reason for funny way of swapping, see https://github.com/angular-ui/ng-grid/issues/272 + var temp = $scope.selectedListeners[0].fields[index]; + $scope.selectedListeners[0].fields.splice(index, 1); + $timeout(function(){ + $scope.selectedListeners[0].fields.splice(index + -1, 0, temp); + }, 100); + + } + } + }; + + // Click handler for down button + $scope.moveFieldDown = function() { + if ($scope.selectedFields.length > 0) { + var index = $scope.selectedListeners[0].fields.indexOf($scope.selectedFields[0]); + if (index != $scope.selectedListeners[0].fields.length - 1) { // If it's the last element, no moving down of course + // Reason for funny way of swapping, see https://github.com/angular-ui/ng-grid/issues/272 + var temp = $scope.selectedListeners[0].fields[index]; + $scope.selectedListeners[0].fields.splice(index, 1); + $timeout(function(){ + $scope.selectedListeners[0].fields.splice(index + 1, 0, temp); + }, 100); + + } + } + }; + + // Click handler for save button + $scope.save = function() { + + if ($scope.executionListeners.length > 0) { + $scope.property.value = {}; + $scope.property.value.executionListeners = $scope.executionListeners; + } else { + $scope.property.value = null; + } + + $scope.updatePropertyInModel($scope.property); + $scope.close(); + }; + + $scope.cancel = function() { + $scope.$hide(); + $scope.property.mode = 'read'; + }; + + // Close button handler + $scope.close = function() { + $scope.$hide(); + $scope.property.mode = 'read'; + }; + +}]; \ No newline at end of file diff --git a/hsweb-ui/workflow/editor-app/configuration/properties-fields-controller.js b/hsweb-ui/workflow/editor-app/configuration/properties-fields-controller.js new file mode 100644 index 0000000..3066c04 --- /dev/null +++ b/hsweb-ui/workflow/editor-app/configuration/properties-fields-controller.js @@ -0,0 +1,192 @@ +/* + * Activiti Modeler component part of the Activiti project + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/* + * Task listeners + */ + +var KisBpmFieldsCtrl = [ '$scope', '$modal', '$timeout', '$translate', function($scope, $modal, $timeout, $translate) { + + // Config for the modal window + var opts = { + template: 'editor-app/configuration/properties/fields-popup.html', + scope: $scope + }; + + // Open the dialog + $modal(opts); +}]; + +var KisBpmFieldsPopupCtrl = [ '$scope', '$q', '$translate', function($scope, $q, $translate) { + + // Put json representing form properties on scope + if ($scope.property.value !== undefined && $scope.property.value !== null + && $scope.property.value.fields !== undefined + && $scope.property.value.fields !== null) { + // Note that we clone the json object rather then setting it directly, + // this to cope with the fact that the user can click the cancel button and no changes should have happened + $scope.fields = angular.copy($scope.property.value.fields); + + for (var i = 0; i < $scope.fields.length; i++) + { + var field = $scope.fields[i]; + if (field.stringValue !== undefined && field.stringValue !== '') + { + field.implementation = field.stringValue; + } + else if (field.expression !== undefined && field.expression !== '') + { + field.implementation = field.expression; + } + else if (field.string !== undefined && field.string !== '') + { + field.implementation = field.string; + } + } + + } else { + $scope.fields = []; + } + + // Array to contain selected properties (yes - we only can select one, but ng-grid isn't smart enough) + $scope.selectedFields = []; + $scope.translationsRetrieved = false; + $scope.labels = {}; + + var namePromise = $translate('PROPERTY.FIELDS.NAME'); + var implementationPromise = $translate('PROPERTY.FIELDS.IMPLEMENTATION'); + + $q.all([namePromise, implementationPromise]).then(function(results) { + $scope.labels.nameLabel = results[0]; + $scope.labels.implementationLabel = results[1]; + $scope.translationsRetrieved = true; + + // Config for grid + $scope.gridOptions = { + data: 'fields', + enableRowReordering: true, + headerRowHeight: 28, + multiSelect: false, + keepLastSelected: false, + selectedItems: $scope.selectedFields, + columnDefs: [{field: 'name', displayName: $scope.labels.nameLabel}, + {field: 'implementation', displayName: $scope.labels.implementationLabel}] + }; + }); + + $scope.fieldDetailsChanged = function() { + if ($scope.selectedFields[0].stringValue != '') + { + $scope.selectedFields[0].implementation = $scope.selectedFields[0].stringValue; + } + else if ($scope.selectedFields[0].expression != '') + { + $scope.selectedFields[0].implementation = $scope.selectedFields[0].expression; + } + else if ($scope.selectedFields[0].string != '') + { + $scope.selectedFields[0].implementation = $scope.selectedFields[0].string; + } + else + { + $scope.selectedFields[0].implementation = ''; + } + }; + + // Click handler for add button + $scope.addNewField = function() { + $scope.fields.push({ name : 'fieldName', + implementation : '', + stringValue : '', + expression: '', + string: ''}); + }; + + // Click handler for remove button + $scope.removeField = function() { + if ($scope.selectedFields.length > 0) { + var index = $scope.fields.indexOf($scope.selectedFields[0]); + $scope.gridOptions.selectItem(index, false); + $scope.fields.splice(index, 1); + + $scope.selectedFields.length = 0; + if (index < $scope.fields.length) { + $scope.gridOptions.selectItem(index + 1, true); + } else if ($scope.fields.length > 0) { + $scope.gridOptions.selectItem(index - 1, true); + } + } + }; + + // Click handler for up button + $scope.moveFieldUp = function() { + if ($scope.selectedFields.length > 0) { + var index = $scope.fields.indexOf($scope.selectedFields[0]); + if (index != 0) { // If it's the first, no moving up of course + // Reason for funny way of swapping, see https://github.com/angular-ui/ng-grid/issues/272 + var temp = $scope.fields[index]; + $scope.fields.splice(index, 1); + $timeout(function(){ + $scope.fields.splice(index + -1, 0, temp); + }, 100); + + } + } + }; + + // Click handler for down button + $scope.moveFieldDown = function() { + if ($scope.selectedFields.length > 0) { + var index = $scope.fields.indexOf($scope.selectedFields[0]); + if (index != $scope.fields.length - 1) { // If it's the last element, no moving down of course + // Reason for funny way of swapping, see https://github.com/angular-ui/ng-grid/issues/272 + var temp = $scope.fields[index]; + $scope.fields.splice(index, 1); + $timeout(function(){ + $scope.fields.splice(index + 1, 0, temp); + }, 100); + + } + } + }; + + // Click handler for save button + $scope.save = function() { + + if ($scope.fields.length > 0) { + $scope.property.value = {}; + $scope.property.value.fields = $scope.fields; + } else { + $scope.property.value = null; + } + + $scope.updatePropertyInModel($scope.property); + $scope.close(); + }; + + $scope.cancel = function() { + $scope.close(); + }; + + // Close button handler + $scope.close = function() { + $scope.property.mode = 'read'; + $scope.$hide(); + }; +}]; \ No newline at end of file diff --git a/hsweb-ui/workflow/editor-app/configuration/properties-form-properties-controller.js b/hsweb-ui/workflow/editor-app/configuration/properties-form-properties-controller.js new file mode 100644 index 0000000..4bdd135 --- /dev/null +++ b/hsweb-ui/workflow/editor-app/configuration/properties-form-properties-controller.js @@ -0,0 +1,192 @@ +/* + * Activiti Modeler component part of the Activiti project + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/* + * Form Properties + */ + +var KisBpmFormPropertiesCtrl = [ '$scope', '$modal', '$timeout', '$translate', function($scope, $modal, $timeout, $translate) { + + // Config for the modal window + var opts = { + template: 'editor-app/configuration/properties/form-properties-popup.html?version=' + Date.now(), + scope: $scope + }; + + // Open the dialog + $modal(opts); +}]; + +var KisBpmFormPropertiesPopupCtrl = ['$scope', '$q', '$translate', function($scope, $q, $translate) { + + // Put json representing form properties on scope + if ($scope.property.value !== undefined && $scope.property.value !== null + && $scope.property.value.formProperties !== undefined + && $scope.property.value.formProperties !== null) { + // Note that we clone the json object rather then setting it directly, + // this to cope with the fact that the user can click the cancel button and no changes should have happended + $scope.formProperties = angular.copy($scope.property.value.formProperties); + } else { + $scope.formProperties = []; + } + + // Array to contain selected properties (yes - we only can select one, but ng-grid isn't smart enough) + $scope.selectedProperties = []; + + $scope.translationsRetrieved = false; + + $scope.labels = {}; + + var idPromise = $translate('PROPERTY.FORMPROPERTIES.ID'); + var namePromise = $translate('PROPERTY.FORMPROPERTIES.NAME'); + var typePromise = $translate('PROPERTY.FORMPROPERTIES.TYPE'); + + $q.all([idPromise, namePromise, typePromise]).then(function(results) { + $scope.labels.idLabel = results[0]; + $scope.labels.nameLabel = results[1]; + $scope.labels.typeLabel = results[2]; + $scope.translationsRetrieved = true; + + // Config for grid + $scope.gridOptions = { + data: 'formProperties', + enableRowReordering: true, + headerRowHeight: 28, + multiSelect: false, + keepLastSelected : false, + selectedItems: $scope.selectedProperties, + columnDefs: [{ field: 'id', displayName: $scope.labels.idLabel }, + { field: 'name', displayName: $scope.labels.nameLabel}, + { field: 'type', displayName: $scope.labels.typeLabel}] + }; + }); + + // Handler for when the value of the type dropdown changes + $scope.propertyTypeChanged = function() { + + // Check date. If date, show date pattern + if ($scope.selectedProperties[0].type === 'date') { + $scope.selectedProperties[0].datePattern = 'MM-dd-yyyy hh:mm'; + } else { + delete $scope.selectedProperties[0].datePattern; + } + + // Check enum. If enum, show list of options + if ($scope.selectedProperties[0].type === 'enum') { + $scope.selectedProperties[0].enumValues = [ {value: 'value 1'}, {value: 'value 2'}]; + } else { + delete $scope.selectedProperties[0].enumValues; + } + }; + + // Click handler for + button after enum value + var valueIndex = 3; + $scope.addEnumValue = function(index) { + $scope.selectedProperties[0].enumValues.splice(index + 1, 0, {value: 'value ' + valueIndex++}); + }; + + // Click handler for - button after enum value + $scope.removeEnumValue = function(index) { + $scope.selectedProperties[0].enumValues.splice(index, 1); + }; + + // Click handler for add button + var propertyIndex = 1; + $scope.addNewProperty = function() { + $scope.formProperties.push({ id : 'new_property_' + propertyIndex++, + name : '', + type : 'string', + readable: true, + writable: true}); + }; + + // Click handler for remove button + $scope.removeProperty = function() { + if ($scope.selectedProperties.length > 0) { + var index = $scope.formProperties.indexOf($scope.selectedProperties[0]); + $scope.gridOptions.selectItem(index, false); + $scope.formProperties.splice(index, 1); + + $scope.selectedProperties.length = 0; + if (index < $scope.formProperties.length) { + $scope.gridOptions.selectItem(index + 1, true); + } else if ($scope.formProperties.length > 0) { + $scope.gridOptions.selectItem(index - 1, true); + } + } + }; + + // Click handler for up button + $scope.movePropertyUp = function() { + if ($scope.selectedProperties.length > 0) { + var index = $scope.formProperties.indexOf($scope.selectedProperties[0]); + if (index != 0) { // If it's the first, no moving up of course + // Reason for funny way of swapping, see https://github.com/angular-ui/ng-grid/issues/272 + var temp = $scope.formProperties[index]; + $scope.formProperties.splice(index, 1); + $timeout(function(){ + $scope.formProperties.splice(index + -1, 0, temp); + }, 100); + + } + } + }; + + // Click handler for down button + $scope.movePropertyDown = function() { + if ($scope.selectedProperties.length > 0) { + var index = $scope.formProperties.indexOf($scope.selectedProperties[0]); + if (index != $scope.formProperties.length - 1) { // If it's the last element, no moving down of course + // Reason for funny way of swapping, see https://github.com/angular-ui/ng-grid/issues/272 + var temp = $scope.formProperties[index]; + $scope.formProperties.splice(index, 1); + $timeout(function(){ + $scope.formProperties.splice(index + 1, 0, temp); + }, 100); + + } + } + }; + + // Click handler for save button + $scope.save = function() { + + if ($scope.formProperties.length > 0) { + $scope.property.value = {}; + $scope.property.value.formProperties = $scope.formProperties; + } else { + $scope.property.value = null; + } + + $scope.updatePropertyInModel($scope.property); + $scope.close(); + }; + + $scope.cancel = function() { + $scope.$hide(); + $scope.property.mode = 'read'; + }; + + // Close button handler + $scope.close = function() { + $scope.$hide(); + $scope.property.mode = 'read'; + }; + +}]; \ No newline at end of file diff --git a/hsweb-ui/workflow/editor-app/configuration/properties-in-parameters-controller.js b/hsweb-ui/workflow/editor-app/configuration/properties-in-parameters-controller.js new file mode 100644 index 0000000..bfb39a7 --- /dev/null +++ b/hsweb-ui/workflow/editor-app/configuration/properties-in-parameters-controller.js @@ -0,0 +1,158 @@ +/* + * Activiti Modeler component part of the Activiti project + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/* + * Input parameters for call activity + */ + +var KisBpmInParametersCtrl = [ '$scope', '$modal', '$timeout', '$translate', function($scope, $modal, $timeout, $translate) { + + // Config for the modal window + var opts = { + template: 'editor-app/configuration/properties/in-parameters-popup.html?version=' + Date.now(), + scope: $scope + }; + + // Open the dialog + $modal(opts); +}]; + +var KisBpmInParametersPopupCtrl = ['$scope', '$q', '$translate', function($scope, $q, $translate) { + + // Put json representing form properties on scope + if ($scope.property.value !== undefined && $scope.property.value !== null + && $scope.property.value.inParameters !== undefined + && $scope.property.value.inParameters !== null) { + // Note that we clone the json object rather then setting it directly, + // this to cope with the fact that the user can click the cancel button and no changes should have happened + $scope.parameters = angular.copy($scope.property.value.inParameters); + } else { + $scope.parameters = []; + } + + // Array to contain selected properties (yes - we only can select one, but ng-grid isn't smart enough) + $scope.selectedParameters = []; + $scope.translationsRetrieved = false; + + $scope.labels = {}; + + var sourcePromise = $translate('PROPERTY.PARAMETER.SOURCE'); + var sourceExpressionPromise = $translate('PROPERTY.PARAMETER.SOURCEEXPRESSION'); + var targetPromise = $translate('PROPERTY.PARAMETER.TARGET'); + + $q.all([sourcePromise, sourceExpressionPromise, targetPromise]).then(function(results) { + $scope.labels.sourceLabel = results[0]; + $scope.labels.sourceExpressionLabel = results[1]; + $scope.labels.targetLabel = results[2]; + $scope.translationsRetrieved = true; + + // Config for grid + $scope.gridOptions = { + data: 'parameters', + enableRowReordering: true, + headerRowHeight: 28, + multiSelect: false, + keepLastSelected : false, + selectedItems: $scope.selectedParameters, + columnDefs: [{ field: 'source', displayName: $scope.labels.sourceLabel }, + { field: 'sourceExpression', displayName: $scope.labels.sourceExpressionLabel }, + { field: 'target', displayName: $scope.labels.targetLabel }] + }; + }); + + // Click handler for add button + $scope.addNewParameter = function() { + $scope.parameters.push({ source : '', + sourceExpression : '', + target : ''}); + }; + + // Click handler for remove button + $scope.removeParameter = function() { + if ($scope.selectedParameters.length > 0) { + var index = $scope.parameters.indexOf($scope.selectedParameters[0]); + $scope.gridOptions.selectItem(index, false); + $scope.parameters.splice(index, 1); + + $scope.selectedParameters.length = 0; + if (index < $scope.parameters.length) { + $scope.gridOptions.selectItem(index + 1, true); + } else if ($scope.parameters.length > 0) { + $scope.gridOptions.selectItem(index - 1, true); + } + } + }; + + // Click handler for up button + $scope.moveParameterUp = function() { + if ($scope.selectedParameters.length > 0) { + var index = $scope.parameters.indexOf($scope.selectedParameters[0]); + if (index != 0) { // If it's the first, no moving up of course + // Reason for funny way of swapping, see https://github.com/angular-ui/ng-grid/issues/272 + var temp = $scope.parameters[index]; + $scope.parameters.splice(index, 1); + $timeout(function(){ + $scope.parameters.splice(index + -1, 0, temp); + }, 100); + + } + } + }; + + // Click handler for down button + $scope.moveParameterDown = function() { + if ($scope.selectedParameters.length > 0) { + var index = $scope.parameters.indexOf($scope.selectedParameters[0]); + if (index != $scope.parameters.length - 1) { // If it's the last element, no moving down of course + // Reason for funny way of swapping, see https://github.com/angular-ui/ng-grid/issues/272 + var temp = $scope.parameters[index]; + $scope.parameters.splice(index, 1); + $timeout(function(){ + $scope.parameters.splice(index + 1, 0, temp); + }, 100); + + } + } + }; + + // Click handler for save button + $scope.save = function() { + + if ($scope.parameters.length > 0) { + $scope.property.value = {}; + $scope.property.value.inParameters = $scope.parameters; + } else { + $scope.property.value = null; + } + + $scope.updatePropertyInModel($scope.property); + $scope.close(); + }; + + $scope.cancel = function() { + $scope.close(); + }; + + // Close button handler + $scope.close = function() { + $scope.property.mode = 'read'; + $scope.$hide(); + }; + +}]; \ No newline at end of file diff --git a/hsweb-ui/workflow/editor-app/configuration/properties-message-definitions-controller.js b/hsweb-ui/workflow/editor-app/configuration/properties-message-definitions-controller.js new file mode 100644 index 0000000..062230e --- /dev/null +++ b/hsweb-ui/workflow/editor-app/configuration/properties-message-definitions-controller.js @@ -0,0 +1,137 @@ +/* + * Activiti Modeler component part of the Activiti project + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/* + * Execution listeners + */ + +angular.module('activitiModeler').controller('ActivitiMessageDefinitionsCtrl', ['$scope', '$modal', function ($scope, $modal) { + + // Config for the modal window + var opts = { + template: 'editor-app/configuration/properties/message-definitions-popup.html?version=' + Date.now(), + scope: $scope + }; + + // Open the dialog + $modal(opts); +}]); + +//Need a separate controller for the modal window due to https://github.com/angular-ui/bootstrap/issues/259 +// Will be fixed in a newer version of Angular UI +angular.module('activitiModeler').controller('ActivitiMessageDefinitionsPopupCtrl', + ['$scope', '$q', '$translate', '$timeout', function ($scope, $q, $translate, $timeout) { + + // Put json representing mesage definitions on scope + if ($scope.property.value !== undefined && $scope.property.value !== null && $scope.property.value.length > 0) { + + if ($scope.property.value.constructor == String) { + $scope.messageDefinitions = JSON.parse($scope.property.value); + } + else { + // Note that we clone the json object rather then setting it directly, + // this to cope with the fact that the user can click the cancel button and no changes should have happened + $scope.messageDefinitions = angular.copy($scope.property.value); + } + + } else { + $scope.messageDefinitions = []; + } + + // Array to contain selected mesage definitions (yes - we only can select one, but ng-grid isn't smart enough) + $scope.selectedMessages = []; + $scope.translationsRetrieved = false; + + $scope.labels = {}; + + var idPromise = $translate('PROPERTY.MESSAGEDEFINITIONS.ID'); + var namePromise = $translate('PROPERTY.MESSAGEDEFINITIONS.NAME'); + + $q.all([idPromise, namePromise]).then(function (results) { + + $scope.labels.idLabel = results[0]; + $scope.labels.nameLabel = results[1]; + $scope.translationsRetrieved = true; + + // Config for grid + $scope.gridOptions = { + data: 'messageDefinitions', + headerRowHeight: 28, + enableRowSelection: true, + enableRowHeaderSelection: false, + multiSelect: false, + keepLastSelected : false, + selectedItems: $scope.selectedMessages, + columnDefs: [ + {field: 'id', displayName: $scope.labels.idLabel}, + {field: 'name', displayName: $scope.labels.nameLabel}] + }; + }); + + // Click handler for add button + $scope.addNewMessageDefinition = function () { + var newMessageDefinition = {id: '', name: ''}; + + $scope.messageDefinitions.push(newMessageDefinition); + $timeout(function () { + $scope.gridOptions.selectItem($scope.messageDefinitions.length - 1, true); + }); + }; + + // Click handler for remove button + $scope.removeMessageDefinition = function () { + if ($scope.selectedMessages && $scope.selectedMessages.length > 0) { + var index = $scope.messageDefinitions.indexOf($scope.selectedMessages[0]); + $scope.gridOptions.selectItem(index, false); + $scope.messageDefinitions.splice(index, 1); + + $scope.selectedMessages.length = 0; + if (index < $scope.messageDefinitions.length) { + $scope.gridOptions.selectItem(index + 1, true); + } else if ($scope.messageDefinitions.length > 0) { + $scope.gridOptions.selectItem(index - 1, true); + } + } + }; + + // Click handler for save button + $scope.save = function () { + + if ($scope.messageDefinitions.length > 0) { + $scope.property.value = $scope.messageDefinitions; + } else { + $scope.property.value = null; + } + + $scope.updatePropertyInModel($scope.property); + $scope.close(); + }; + + $scope.cancel = function () { + $scope.property.mode = 'read'; + $scope.$hide(); + }; + + // Close button handler + $scope.close = function () { + $scope.property.mode = 'read'; + $scope.$hide(); + }; + + }]); \ No newline at end of file diff --git a/hsweb-ui/workflow/editor-app/configuration/properties-message-scope-controller.js b/hsweb-ui/workflow/editor-app/configuration/properties-message-scope-controller.js new file mode 100644 index 0000000..34e477c --- /dev/null +++ b/hsweb-ui/workflow/editor-app/configuration/properties-message-scope-controller.js @@ -0,0 +1,48 @@ +/* + * Activiti Modeler component part of the Activiti project + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +angular.module('activitiModeler').controller('ActivitiMessageRefCtrl', [ '$scope', function($scope) { + + // Find the parent shape on which the message definitions are defined + var messageDefinitionsProperty = undefined; + var parent = $scope.selectedShape; + while (parent !== null && parent !== undefined && messageDefinitionsProperty === undefined) { + if (parent.properties && parent.properties['oryx-messagedefinitions']) { + messageDefinitionsProperty = parent.properties['oryx-messagedefinitions']; + } else { + parent = parent.parent; + } + } + + try { + messageDefinitionsProperty = JSON.parse(messageDefinitionsProperty); + if (typeof messageDefinitionsProperty == 'string') { + messageDefinitionsProperty = JSON.parse(messageDefinitionsProperty); + } + } catch (err) { + // Do nothing here, just to be sure we try-catch it + } + + $scope.messageDefinitions = messageDefinitionsProperty; + + + $scope.messageChanged = function() { + $scope.updatePropertyInModel($scope.property); + }; +}]); \ No newline at end of file diff --git a/hsweb-ui/workflow/editor-app/configuration/properties-multiinstance-controller.js b/hsweb-ui/workflow/editor-app/configuration/properties-multiinstance-controller.js new file mode 100644 index 0000000..7c1386d --- /dev/null +++ b/hsweb-ui/workflow/editor-app/configuration/properties-multiinstance-controller.js @@ -0,0 +1,34 @@ +/* + * Activiti Modeler component part of the Activiti project + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/* + * Execution listeners + */ + +var KisBpmMultiInstanceCtrl = [ '$scope', function($scope) { + + if ($scope.property.value == undefined && $scope.property.value == null) + { + $scope.property.value = 'None'; + } + + $scope.multiInstanceChanged = function() { + $scope.updatePropertyInModel($scope.property); + }; +}]; \ No newline at end of file diff --git a/hsweb-ui/workflow/editor-app/configuration/properties-out-parameters-controller.js b/hsweb-ui/workflow/editor-app/configuration/properties-out-parameters-controller.js new file mode 100644 index 0000000..dbac84a --- /dev/null +++ b/hsweb-ui/workflow/editor-app/configuration/properties-out-parameters-controller.js @@ -0,0 +1,158 @@ +/* + * Activiti Modeler component part of the Activiti project + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/* + * Input parameters for call activity + */ + +var KisBpmOutParametersCtrl = [ '$scope' , '$modal', '$timeout', '$translate', function($scope, $modal, $timeout, $translate) { + + // Config for the modal window + var opts = { + template: 'editor-app/configuration/properties/out-parameters-popup.html?version=' + Date.now(), + scope: $scope + }; + + // Open the dialog + $modal(opts); +}]; + +var KisBpmOutParametersPopupCtrl = [ '$scope', '$q', '$translate', function($scope, $q, $translate) { + + // Put json representing form properties on scope + if ($scope.property.value !== undefined && $scope.property.value !== null + && $scope.property.value.outParameters !== undefined + && $scope.property.value.outParameters !== null) { + // Note that we clone the json object rather then setting it directly, + // this to cope with the fact that the user can click the cancel button and no changes should have happened + $scope.parameters = angular.copy($scope.property.value.outParameters); + } else { + $scope.parameters = []; + } + + // Array to contain selected properties (yes - we only can select one, but ng-grid isn't smart enough) + $scope.selectedParameters = []; + $scope.translationsRetrieved = false; + + $scope.labels = {}; + + var sourcePromise = $translate('PROPERTY.PARAMETER.SOURCE'); + var sourceExpressionPromise = $translate('PROPERTY.PARAMETER.SOURCEEXPRESSION'); + var targetPromise = $translate('PROPERTY.PARAMETER.TARGET'); + + $q.all([sourcePromise, sourceExpressionPromise, targetPromise]).then(function(results) { + $scope.labels.sourceLabel = results[0]; + $scope.labels.sourceExpressionLabel = results[1]; + $scope.labels.targetLabel = results[2]; + $scope.translationsRetrieved = true; + + // Config for grid + $scope.gridOptions = { + data: 'parameters', + enableRowReordering: true, + headerRowHeight: 28, + multiSelect: false, + keepLastSelected : false, + selectedItems: $scope.selectedParameters, + columnDefs: [{ field: 'source', displayName: $scope.labels.sourceLabel }, + { field: 'sourceExpression', displayName: $scope.labels.sourceExpressionLabel }, + { field: 'target', displayName: $scope.labels.targetLabel }] + }; + }); + + // Click handler for add button + $scope.addNewParameter = function() { + $scope.parameters.push({ source : '', + sourceExpression : '', + target : ''}); + }; + + // Click handler for remove button + $scope.removeParameter = function() { + if ($scope.selectedParameters.length > 0) { + var index = $scope.parameters.indexOf($scope.selectedParameters[0]); + $scope.gridOptions.selectItem(index, false); + $scope.parameters.splice(index, 1); + + $scope.selectedParameters.length = 0; + if (index < $scope.parameters.length) { + $scope.gridOptions.selectItem(index + 1, true); + } else if ($scope.parameters.length > 0) { + $scope.gridOptions.selectItem(index - 1, true); + } + } + }; + + // Click handler for up button + $scope.moveParameterUp = function() { + if ($scope.selectedParameters.length > 0) { + var index = $scope.parameters.indexOf($scope.selectedParameters[0]); + if (index != 0) { // If it's the first, no moving up of course + // Reason for funny way of swapping, see https://github.com/angular-ui/ng-grid/issues/272 + var temp = $scope.parameters[index]; + $scope.parameters.splice(index, 1); + $timeout(function(){ + $scope.parameters.splice(index + -1, 0, temp); + }, 100); + + } + } + }; + + // Click handler for down button + $scope.moveParameterDown = function() { + if ($scope.selectedParameters.length > 0) { + var index = $scope.parameters.indexOf($scope.selectedParameters[0]); + if (index != $scope.parameters.length - 1) { // If it's the last element, no moving down of course + // Reason for funny way of swapping, see https://github.com/angular-ui/ng-grid/issues/272 + var temp = $scope.parameters[index]; + $scope.parameters.splice(index, 1); + $timeout(function(){ + $scope.parameters.splice(index + 1, 0, temp); + }, 100); + + } + } + }; + + // Click handler for save button + $scope.save = function() { + + if ($scope.parameters.length > 0) { + $scope.property.value = {}; + $scope.property.value.outParameters = $scope.parameters; + } else { + $scope.property.value = null; + } + + $scope.updatePropertyInModel($scope.property); + $scope.close(); + }; + + $scope.cancel = function() { + $scope.close(); + }; + + // Close button handler + $scope.close = function() { + $scope.property.mode = 'read'; + $scope.$hide(); + }; + +}]; \ No newline at end of file diff --git a/hsweb-ui/workflow/editor-app/configuration/properties-sequenceflow-order-controller.js b/hsweb-ui/workflow/editor-app/configuration/properties-sequenceflow-order-controller.js new file mode 100644 index 0000000..c1a53b0 --- /dev/null +++ b/hsweb-ui/workflow/editor-app/configuration/properties-sequenceflow-order-controller.js @@ -0,0 +1,130 @@ +/* + * Activiti Modeler component part of the Activiti project + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/* + * Sequence flow order controller + */ + +var KisBpmSequenceFlowOrderCtrl = [ '$scope', '$modal', '$timeout', '$translate', function($scope, $modal, $timeout, $translate) { + + // Config for the modal window + var opts = { + template: 'editor-app/configuration/properties/sequenceflow-order-popup.html?version=' + Date.now(), + scope: $scope + }; + + $modal(opts); +}]; + +var KisBpmSequenceFlowOrderPopupCtrl = ['$scope', '$translate', function($scope, $translate) { + + // Find the outgoing sequence flow of the current selected shape + var outgoingSequenceFlow = []; + var selectedShape = $scope.selectedShape; + if (selectedShape) { + var outgoingNodes = selectedShape.getOutgoingShapes(); + for (var i=0; i 0) { + $scope.property.value = {}; + $scope.property.value.sequenceFlowOrder = []; + + for (var flowIndex=0; flowIndex < $scope.outgoingSequenceFlow.length; flowIndex++) { + $scope.property.value.sequenceFlowOrder.push($scope.outgoingSequenceFlow[flowIndex].id); + } + } else { + $scope.property.value = null; + } + + $scope.updatePropertyInModel($scope.property); + $scope.close(); + }; + + // Cancel click handler + $scope.cancel = function() { + $scope.close(); + }; + + // Close button handler + $scope.close = function() { + $scope.property.mode = 'read'; + $scope.$hide(); + }; + +}]; \ No newline at end of file diff --git a/hsweb-ui/workflow/editor-app/configuration/properties-signal-definitions-controller.js b/hsweb-ui/workflow/editor-app/configuration/properties-signal-definitions-controller.js new file mode 100644 index 0000000..5581411 --- /dev/null +++ b/hsweb-ui/workflow/editor-app/configuration/properties-signal-definitions-controller.js @@ -0,0 +1,136 @@ +/* + * Activiti Modeler component part of the Activiti project + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +angular.module('activitiModeler').controller('ActivitiSignalDefinitionsCtrl', ['$scope', '$modal', function ($scope, $modal) { + + // Config for the modal window + var opts = { + template: 'editor-app/configuration/properties/signal-definitions-popup.html?version=' + Date.now(), + scope: $scope + }; + + // Open the dialog + $modal(opts); +}]); + +//Need a separate controller for the modal window due to https://github.com/angular-ui/bootstrap/issues/259 +// Will be fixed in a newer version of Angular UI +angular.module('activitiModeler').controller('ActivitiSignalDefinitionsPopupCtrl', + ['$scope', '$q', '$translate', '$timeout', function ($scope, $q, $translate, $timeout) { + + // Put json representing signal definitions on scope + if ($scope.property.value !== undefined && $scope.property.value !== null && $scope.property.value.length > 0) { + + if ($scope.property.value.constructor == String) { + $scope.signalDefinitions = JSON.parse($scope.property.value); + } + else { + // Note that we clone the json object rather then setting it directly, + // this to cope with the fact that the user can click the cancel button and no changes should have happened + $scope.signalDefinitions = angular.copy($scope.property.value); + } + + } else { + $scope.signalDefinitions = []; + } + + // Array to contain selected signal definitions (yes - we only can select one, but ng-grid isn't smart enough) + $scope.selectedSignals = []; + $scope.translationsRetrieved = false; + + $scope.labels = {}; + + var idPromise = $translate('PROPERTY.SIGNALDEFINITIONS.ID'); + var namePromise = $translate('PROPERTY.SIGNALDEFINITIONS.NAME'); + var scopePromise = $translate('PROPERTY.SIGNALDEFINITIONS.SCOPE'); + + $q.all([idPromise, namePromise, scopePromise]).then(function (results) { + + $scope.labels.idLabel = results[0]; + $scope.labels.nameLabel = results[1]; + $scope.labels.scopeLabel = results[2]; + $scope.translationsRetrieved = true; + + // Config for grid + $scope.gridOptions = { + data: 'signalDefinitions', + headerRowHeight: 28, + enableRowSelection: true, + enableRowHeaderSelection: false, + multiSelect: false, + keepLastSelected : false, + selectedItems: $scope.selectedSignals, + columnDefs: [ + {field: 'id', displayName: $scope.labels.idLabel}, + {field: 'name', displayName: $scope.labels.nameLabel}, + {field: 'scope', displayName: $scope.labels.scopeLabel}] + }; + }); + + // Click handler for add button + $scope.addNewSignalDefinition = function () { + var newSignalDefinition = {id: '', name: '', scope: 'global'}; + + $scope.signalDefinitions.push(newSignalDefinition); + $timeout(function () { + $scope.gridOptions.selectItem($scope.signalDefinitions.length - 1, true); + }); + }; + + // Click handler for remove button + $scope.removeSignalDefinition = function () { + if ($scope.selectedSignals && $scope.selectedSignals.length > 0) { + var index = $scope.signalDefinitions.indexOf($scope.selectedSignals[0]); + $scope.gridOptions.selectItem(index, false); + $scope.signalDefinitions.splice(index, 1); + + $scope.selectedSignals.length = 0; + if (index < $scope.signalDefinitions.length) { + $scope.gridOptions.selectItem(index + 1, true); + } else if ($scope.signalDefinitions.length > 0) { + $scope.gridOptions.selectItem(index - 1, true); + } + } + }; + + // Click handler for save button + $scope.save = function () { + + if ($scope.signalDefinitions.length > 0) { + $scope.property.value = $scope.signalDefinitions; + } else { + $scope.property.value = null; + } + + $scope.updatePropertyInModel($scope.property); + $scope.close(); + }; + + $scope.cancel = function () { + $scope.property.mode = 'read'; + $scope.$hide(); + }; + + // Close button handler + $scope.close = function () { + $scope.property.mode = 'read'; + $scope.$hide(); + }; + + }]); \ No newline at end of file diff --git a/hsweb-ui/workflow/editor-app/configuration/properties-signal-scope-controller.js b/hsweb-ui/workflow/editor-app/configuration/properties-signal-scope-controller.js new file mode 100644 index 0000000..fb97740 --- /dev/null +++ b/hsweb-ui/workflow/editor-app/configuration/properties-signal-scope-controller.js @@ -0,0 +1,47 @@ +/* + * Activiti Modeler component part of the Activiti project + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ +angular.module('activitiModeler').controller('ActivitiSignalRefCtrl', [ '$scope', function($scope) { + + // Find the parent shape on which the signal definitions are defined + var signalDefinitionsProperty = undefined; + var parent = $scope.selectedShape; + while (parent !== null && parent !== undefined && signalDefinitionsProperty === undefined) { + if (parent.properties && parent.properties['oryx-signaldefinitions']) { + signalDefinitionsProperty = parent.properties['oryx-signaldefinitions']; + } else { + parent = parent.parent; + } + } + + try { + signalDefinitionsProperty = JSON.parse(signalDefinitionsProperty); + if (typeof signalDefinitionsProperty == 'string') { + signalDefinitionsProperty = JSON.parse(signalDefinitionsProperty); + } + } catch (err) { + // Do nothing here, just to be sure we try-catch it + } + + $scope.signalDefinitions = signalDefinitionsProperty; + + + $scope.signalChanged = function() { + $scope.updatePropertyInModel($scope.property); + }; +}]); \ No newline at end of file diff --git a/hsweb-ui/workflow/editor-app/configuration/properties-task-listeners-controller.js b/hsweb-ui/workflow/editor-app/configuration/properties-task-listeners-controller.js new file mode 100644 index 0000000..33f2dfb --- /dev/null +++ b/hsweb-ui/workflow/editor-app/configuration/properties-task-listeners-controller.js @@ -0,0 +1,325 @@ +/* + * Activiti Modeler component part of the Activiti project + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/* + * Task listeners + */ + +var KisBpmTaskListenersCtrl = [ '$scope', '$modal', '$timeout', '$translate', function($scope, $modal, $timeout, $translate) { + + // Config for the modal window + var opts = { + template: 'editor-app/configuration/properties/task-listeners-popup.html?version=' + Date.now(), + scope: $scope + }; + + // Open the dialog + $modal(opts); +}]; + +var KisBpmTaskListenersPopupCtrl = [ '$scope', '$q', '$translate', function($scope, $q, $translate) { + + // Put json representing form properties on scope + if ($scope.property.value !== undefined && $scope.property.value !== null + && $scope.property.value.taskListeners !== undefined + && $scope.property.value.taskListeners !== null) { + + if ($scope.property.value.taskListeners.constructor == String) + { + $scope.taskListeners = JSON.parse($scope.property.value.taskListeners); + } + else + { + // Note that we clone the json object rather then setting it directly, + // this to cope with the fact that the user can click the cancel button and no changes should have happened + $scope.taskListeners = angular.copy($scope.property.value.taskListeners); + } + + for (var i = 0; i < $scope.taskListeners.length; i++) + { + var taskListener = $scope.taskListeners[i]; + if (taskListener.className !== undefined && taskListener.className !== '') + { + taskListener.implementation = taskListener.className; + } + else if (taskListener.expression !== undefined && taskListener.expression !== '') + { + taskListener.implementation = taskListener.expression; + } + else if (taskListener.delegateExpression !== undefined && taskListener.delegateExpression !== '') + { + taskListener.implementation = taskListener.delegateExpression; + } + } + } else { + $scope.taskListeners = []; + } + + // Array to contain selected properties (yes - we only can select one, but ng-grid isn't smart enough) + $scope.selectedListeners = []; + $scope.selectedFields = []; + $scope.translationsRetrieved = false; + + $scope.labels = {}; + + var eventPromise = $translate('PROPERTY.TASKLISTENERS.EVENT'); + var implementationPromise = $translate('PROPERTY.TASKLISTENERS.FIELDS.IMPLEMENTATION'); + var namePromise = $translate('PROPERTY.TASKLISTENERS.FIELDS.NAME'); + + $q.all([eventPromise, implementationPromise, namePromise]).then(function(results) { + $scope.labels.eventLabel = results[0]; + $scope.labels.implementationLabel = results[1]; + $scope.labels.nameLabel = results[2]; + $scope.translationsRetrieved = true; + + // Config for grid + $scope.gridOptions = { + data: 'taskListeners', + enableRowReordering: true, + headerRowHeight: 28, + multiSelect: false, + keepLastSelected : false, + selectedItems: $scope.selectedListeners, + afterSelectionChange: function (rowItem, event) { + $scope.selectedFields.length = 0; + if ($scope.selectedListeners.length > 0) + { + var fields = $scope.selectedListeners[0].fields; + if (fields !== undefined && fields !== null) + { + for (var i = 0; i < fields.length; i++) + { + var field = fields[i]; + if (field.stringValue !== undefined && field.stringValue !== '') + { + field.implementation = field.stringValue; + } + else if (field.expression !== undefined && field.expression !== '') + { + field.implementation = field.expression; + } + else if (field.string !== undefined && field.string !== '') + { + field.implementation = field.string; + } + } + } + } + }, + columnDefs: [{ field: 'event', displayName: $scope.labels.eventLabel }, + { field: 'implementation', displayName: $scope.labels.implementationLabel}] + }; + + // Config for field grid + $scope.gridFieldOptions = { + data: 'selectedListeners[0].fields', + enableRowReordering: true, + headerRowHeight: 28, + multiSelect: false, + keepLastSelected : false, + selectedItems: $scope.selectedFields, + columnDefs: [{ field: 'name', displayName: $scope.labels.name }, + { field: 'implementation', displayName: $scope.labels.implementationLabel}] + }; + }); + + $scope.listenerDetailsChanged = function() { + if ($scope.selectedListeners[0].className !== '') + { + $scope.selectedListeners[0].implementation = $scope.selectedListeners[0].className; + } + else if ($scope.selectedListeners[0].expression !== '') + { + $scope.selectedListeners[0].implementation = $scope.selectedListeners[0].expression; + } + else if ($scope.selectedListeners[0].delegateExpression !== '') + { + $scope.selectedListeners[0].implementation = $scope.selectedListeners[0].delegateExpression; + } + else + { + $scope.selectedListeners[0].implementation = ''; + } + }; + + // Click handler for add button + $scope.addNewListener = function() { + $scope.taskListeners.push({ event : 'create', + implementation : '', + className : '', + expression: '', + delegateExpression: ''}); + }; + + // Click handler for remove button + $scope.removeListener = function() { + if ($scope.selectedListeners.length > 0) { + var index = $scope.taskListeners.indexOf($scope.selectedListeners[0]); + $scope.gridOptions.selectItem(index, false); + $scope.taskListeners.splice(index, 1); + + $scope.selectedListeners.length = 0; + if (index < $scope.taskListeners.length) { + $scope.gridOptions.selectItem(index + 1, true); + } else if ($scope.taskListeners.length > 0) { + $scope.gridOptions.selectItem(index - 1, true); + } + } + }; + + // Click handler for up button + $scope.moveListenerUp = function() { + if ($scope.selectedListeners.length > 0) { + var index = $scope.taskListeners.indexOf($scope.selectedListeners[0]); + if (index != 0) { // If it's the first, no moving up of course + // Reason for funny way of swapping, see https://github.com/angular-ui/ng-grid/issues/272 + var temp = $scope.taskListeners[index]; + $scope.taskListeners.splice(index, 1); + $timeout(function(){ + $scope.taskListeners.splice(index + -1, 0, temp); + }, 100); + + } + } + }; + + // Click handler for down button + $scope.moveListenerDown = function() { + if ($scope.selectedListeners.length > 0) { + var index = $scope.taskListeners.indexOf($scope.selectedListeners[0]); + if (index != $scope.taskListeners.length - 1) { // If it's the last element, no moving down of course + // Reason for funny way of swapping, see https://github.com/angular-ui/ng-grid/issues/272 + var temp = $scope.taskListeners[index]; + $scope.taskListeners.splice(index, 1); + $timeout(function(){ + $scope.taskListeners.splice(index + 1, 0, temp); + }, 100); + + } + } + }; + + $scope.fieldDetailsChanged = function() { + if ($scope.selectedFields[0].stringValue != '') + { + $scope.selectedFields[0].implementation = $scope.selectedFields[0].stringValue; + } + else if ($scope.selectedFields[0].expression != '') + { + $scope.selectedFields[0].implementation = $scope.selectedFields[0].expression; + } + else if ($scope.selectedFields[0].string != '') + { + $scope.selectedFields[0].implementation = $scope.selectedFields[0].string; + } + else + { + $scope.selectedFields[0].implementation = ''; + } + }; + + // Click handler for add button + $scope.addNewField = function() { + if ($scope.selectedListeners.length > 0) + { + if ($scope.selectedListeners[0].fields == undefined) + { + $scope.selectedListeners[0].fields = []; + } + $scope.selectedListeners[0].fields.push({ name : 'fieldName', + implementation : '', + stringValue : '', + expression: '', + string: ''}); + } + }; + + // Click handler for remove button + $scope.removeField = function() { + if ($scope.selectedFields.length > 0) { + var index = $scope.selectedListeners[0].fields.indexOf($scope.selectedFields[0]); + $scope.gridFieldOptions.selectItem(index, false); + $scope.selectedListeners[0].fields.splice(index, 1); + + $scope.selectedFields.length = 0; + if (index < $scope.selectedListeners[0].fields.length) { + $scope.gridFieldOptions.selectItem(index + 1, true); + } else if ($scope.selectedListeners[0].fields.length > 0) { + $scope.gridFieldOptions.selectItem(index - 1, true); + } + } + }; + + // Click handler for up button + $scope.moveFieldUp = function() { + if ($scope.selectedFields.length > 0) { + var index = $scope.selectedListeners[0].fields.indexOf($scope.selectedFields[0]); + if (index != 0) { // If it's the first, no moving up of course + // Reason for funny way of swapping, see https://github.com/angular-ui/ng-grid/issues/272 + var temp = $scope.selectedListeners[0].fields[index]; + $scope.selectedListeners[0].fields.splice(index, 1); + $timeout(function(){ + $scope.selectedListeners[0].fields.splice(index + -1, 0, temp); + }, 100); + + } + } + }; + + // Click handler for down button + $scope.moveFieldDown = function() { + if ($scope.selectedFields.length > 0) { + var index = $scope.selectedListeners[0].fields.indexOf($scope.selectedFields[0]); + if (index != $scope.selectedListeners[0].fields.length - 1) { // If it's the last element, no moving down of course + // Reason for funny way of swapping, see https://github.com/angular-ui/ng-grid/issues/272 + var temp = $scope.selectedListeners[0].fields[index]; + $scope.selectedListeners[0].fields.splice(index, 1); + $timeout(function(){ + $scope.selectedListeners[0].fields.splice(index + 1, 0, temp); + }, 100); + + } + } + }; + + // Click handler for save button + $scope.save = function() { + + if ($scope.taskListeners.length > 0) { + $scope.property.value = {}; + $scope.property.value.taskListeners = $scope.taskListeners; + } else { + $scope.property.value = null; + } + + $scope.updatePropertyInModel($scope.property); + $scope.close(); + }; + + $scope.cancel = function() { + $scope.close(); + }; + + // Close button handler + $scope.close = function() { + $scope.property.mode = 'read'; + $scope.$hide(); + }; + +}]; \ No newline at end of file diff --git a/hsweb-ui/workflow/editor-app/configuration/properties.js b/hsweb-ui/workflow/editor-app/configuration/properties.js new file mode 100644 index 0000000..55727c6 --- /dev/null +++ b/hsweb-ui/workflow/editor-app/configuration/properties.js @@ -0,0 +1,99 @@ +/* + * Activiti Modeler component part of the Activiti project + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ +'use strict'; + +var KISBPM = KISBPM || {}; +KISBPM.PROPERTY_CONFIG = +{ + "string": { + "readModeTemplateUrl": "editor-app/configuration/properties/default-value-display-template.html", + "writeModeTemplateUrl": "editor-app/configuration/properties/string-property-write-mode-template.html" + }, + "boolean": { + "templateUrl": "editor-app/configuration/properties/boolean-property-template.html" + }, + "text" : { + "readModeTemplateUrl": "editor-app/configuration/properties/default-value-display-template.html", + "writeModeTemplateUrl": "editor-app/configuration/properties/text-property-write-template.html" + }, + "kisbpm-multiinstance" : { + "readModeTemplateUrl": "editor-app/configuration/properties/default-value-display-template.html", + "writeModeTemplateUrl": "editor-app/configuration/properties/multiinstance-property-write-template.html" + }, + "oryx-formproperties-complex": { + "readModeTemplateUrl": "editor-app/configuration/properties/form-properties-display-template.html", + "writeModeTemplateUrl": "editor-app/configuration/properties/form-properties-write-template.html" + }, + "oryx-executionlisteners-multiplecomplex": { + "readModeTemplateUrl": "editor-app/configuration/properties/execution-listeners-display-template.html", + "writeModeTemplateUrl": "editor-app/configuration/properties/execution-listeners-write-template.html" + }, + "oryx-tasklisteners-multiplecomplex": { + "readModeTemplateUrl": "editor-app/configuration/properties/task-listeners-display-template.html", + "writeModeTemplateUrl": "editor-app/configuration/properties/task-listeners-write-template.html" + }, + "oryx-eventlisteners-multiplecomplex": { + "readModeTemplateUrl": "editor-app/configuration/properties/event-listeners-display-template.html", + "writeModeTemplateUrl": "editor-app/configuration/properties/event-listeners-write-template.html" + }, + "oryx-usertaskassignment-complex": { + "readModeTemplateUrl": "editor-app/configuration/properties/assignment-display-template.html", + "writeModeTemplateUrl": "editor-app/configuration/properties/assignment-write-template.html" + }, + "oryx-servicetaskfields-complex": { + "readModeTemplateUrl": "editor-app/configuration/properties/fields-display-template.html", + "writeModeTemplateUrl": "editor-app/configuration/properties/fields-write-template.html" + }, + "oryx-callactivityinparameters-complex": { + "readModeTemplateUrl": "editor-app/configuration/properties/in-parameters-display-template.html", + "writeModeTemplateUrl": "editor-app/configuration/properties/in-parameters-write-template.html" + }, + "oryx-callactivityoutparameters-complex": { + "readModeTemplateUrl": "editor-app/configuration/properties/out-parameters-display-template.html", + "writeModeTemplateUrl": "editor-app/configuration/properties/out-parameters-write-template.html" + }, + "oryx-subprocessreference-complex": { + "readModeTemplateUrl": "editor-app/configuration/properties/subprocess-reference-display-template.html", + "writeModeTemplateUrl": "editor-app/configuration/properties/subprocess-reference-write-template.html" + }, + "oryx-sequencefloworder-complex" : { + "readModeTemplateUrl": "editor-app/configuration/properties/sequenceflow-order-display-template.html", + "writeModeTemplateUrl": "editor-app/configuration/properties/sequenceflow-order-write-template.html" + }, + "oryx-conditionsequenceflow-complex" : { + "readModeTemplateUrl": "editor-app/configuration/properties/condition-expression-display-template.html", + "writeModeTemplateUrl": "editor-app/configuration/properties/condition-expression-write-template.html" + }, + "oryx-signaldefinitions-multiplecomplex" : { + "readModeTemplateUrl": "editor-app/configuration/properties/signal-definitions-display-template.html", + "writeModeTemplateUrl": "editor-app/configuration/properties/signal-definitions-write-template.html" + }, + "oryx-signalref-string" : { + "readModeTemplateUrl": "editor-app/configuration/properties/default-value-display-template.html", + "writeModeTemplateUrl": "editor-app/configuration/properties/signal-property-write-template.html" + }, + "oryx-messagedefinitions-multiplecomplex" : { + "readModeTemplateUrl": "editor-app/configuration/properties/message-definitions-display-template.html", + "writeModeTemplateUrl": "editor-app/configuration/properties/message-definitions-write-template.html" + }, + "oryx-messageref-string" : { + "readModeTemplateUrl": "editor-app/configuration/properties/default-value-display-template.html", + "writeModeTemplateUrl": "editor-app/configuration/properties/message-property-write-template.html" + } +}; diff --git a/hsweb-ui/workflow/editor-app/configuration/properties/assignment-display-template.html b/hsweb-ui/workflow/editor-app/configuration/properties/assignment-display-template.html new file mode 100644 index 0000000..40ab69d --- /dev/null +++ b/hsweb-ui/workflow/editor-app/configuration/properties/assignment-display-template.html @@ -0,0 +1,4 @@ +{{'PROPERTY.ASSIGNMENT.ASSIGNEE_DISPLAY' | translate:property.value.assignment }} +{{'PROPERTY.ASSIGNMENT.CANDIDATE_USERS_DISPLAY' | translate:property.value.assignment.candidateUsers}} +{{'PROPERTY.ASSIGNMENT.CANDIDATE_GROUPS_DISPLAY' | translate:property.value.assignment.candidateGroups}} +PROPERTY.ASSIGNMENT.EMPTY \ No newline at end of file diff --git a/hsweb-ui/workflow/editor-app/configuration/properties/assignment-popup.html b/hsweb-ui/workflow/editor-app/configuration/properties/assignment-popup.html new file mode 100644 index 0000000..e4b42b3 --- /dev/null +++ b/hsweb-ui/workflow/editor-app/configuration/properties/assignment-popup.html @@ -0,0 +1,44 @@ + \ No newline at end of file diff --git a/hsweb-ui/workflow/editor-app/configuration/properties/assignment-write-template.html b/hsweb-ui/workflow/editor-app/configuration/properties/assignment-write-template.html new file mode 100644 index 0000000..b498b3d --- /dev/null +++ b/hsweb-ui/workflow/editor-app/configuration/properties/assignment-write-template.html @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/hsweb-ui/workflow/editor-app/configuration/properties/boolean-property-template.html b/hsweb-ui/workflow/editor-app/configuration/properties/boolean-property-template.html new file mode 100644 index 0000000..836dcaa --- /dev/null +++ b/hsweb-ui/workflow/editor-app/configuration/properties/boolean-property-template.html @@ -0,0 +1,4 @@ + +
      + +
      \ No newline at end of file diff --git a/hsweb-ui/workflow/editor-app/configuration/properties/condition-expression-display-template.html b/hsweb-ui/workflow/editor-app/configuration/properties/condition-expression-display-template.html new file mode 100644 index 0000000..37eef24 --- /dev/null +++ b/hsweb-ui/workflow/editor-app/configuration/properties/condition-expression-display-template.html @@ -0,0 +1,2 @@ +{{property.value|limitTo:20}} +{{'PROPERTY.SEQUENCEFLOW.CONDITION.NO-CONDITION-DISPLAY' | translate}} \ No newline at end of file diff --git a/hsweb-ui/workflow/editor-app/configuration/properties/condition-expression-popup.html b/hsweb-ui/workflow/editor-app/configuration/properties/condition-expression-popup.html new file mode 100644 index 0000000..eea2bda --- /dev/null +++ b/hsweb-ui/workflow/editor-app/configuration/properties/condition-expression-popup.html @@ -0,0 +1,29 @@ + + diff --git a/hsweb-ui/workflow/editor-app/configuration/properties/execution-listeners-write-template.html b/hsweb-ui/workflow/editor-app/configuration/properties/execution-listeners-write-template.html new file mode 100644 index 0000000..55a0a52 --- /dev/null +++ b/hsweb-ui/workflow/editor-app/configuration/properties/execution-listeners-write-template.html @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/hsweb-ui/workflow/editor-app/configuration/properties/feedback-popup.html b/hsweb-ui/workflow/editor-app/configuration/properties/feedback-popup.html new file mode 100644 index 0000000..17b9126 --- /dev/null +++ b/hsweb-ui/workflow/editor-app/configuration/properties/feedback-popup.html @@ -0,0 +1,17 @@ + + + +
      + +
      +
      +
      diff --git a/hsweb-ui/workflow/editor-app/configuration/properties/fields-write-template.html b/hsweb-ui/workflow/editor-app/configuration/properties/fields-write-template.html new file mode 100644 index 0000000..da9489e --- /dev/null +++ b/hsweb-ui/workflow/editor-app/configuration/properties/fields-write-template.html @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/hsweb-ui/workflow/editor-app/configuration/properties/form-properties-display-template.html b/hsweb-ui/workflow/editor-app/configuration/properties/form-properties-display-template.html new file mode 100644 index 0000000..1274342 --- /dev/null +++ b/hsweb-ui/workflow/editor-app/configuration/properties/form-properties-display-template.html @@ -0,0 +1,3 @@ + +{{'PROPERTY.FORMPROPERTIES.VALUE' | translate:property.value.formProperties}} +PROPERTY.FORMPROPERTIES.EMPTY \ No newline at end of file diff --git a/hsweb-ui/workflow/editor-app/configuration/properties/form-properties-popup.html b/hsweb-ui/workflow/editor-app/configuration/properties/form-properties-popup.html new file mode 100644 index 0000000..1e84009 --- /dev/null +++ b/hsweb-ui/workflow/editor-app/configuration/properties/form-properties-popup.html @@ -0,0 +1,93 @@ + + diff --git a/hsweb-ui/workflow/editor-app/configuration/properties/form-properties-write-template.html b/hsweb-ui/workflow/editor-app/configuration/properties/form-properties-write-template.html new file mode 100644 index 0000000..c9f49c7 --- /dev/null +++ b/hsweb-ui/workflow/editor-app/configuration/properties/form-properties-write-template.html @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/hsweb-ui/workflow/editor-app/configuration/properties/in-parameters-display-template.html b/hsweb-ui/workflow/editor-app/configuration/properties/in-parameters-display-template.html new file mode 100644 index 0000000..961e637 --- /dev/null +++ b/hsweb-ui/workflow/editor-app/configuration/properties/in-parameters-display-template.html @@ -0,0 +1,3 @@ + +{{'PROPERTY.INPARAMETERS.VALUE' | translate:property.value.inParameters}} +PROPERTY.INPARAMETERS.EMPTY \ No newline at end of file diff --git a/hsweb-ui/workflow/editor-app/configuration/properties/in-parameters-popup.html b/hsweb-ui/workflow/editor-app/configuration/properties/in-parameters-popup.html new file mode 100644 index 0000000..879ab94 --- /dev/null +++ b/hsweb-ui/workflow/editor-app/configuration/properties/in-parameters-popup.html @@ -0,0 +1,53 @@ + + diff --git a/hsweb-ui/workflow/editor-app/configuration/properties/in-parameters-write-template.html b/hsweb-ui/workflow/editor-app/configuration/properties/in-parameters-write-template.html new file mode 100644 index 0000000..658e782 --- /dev/null +++ b/hsweb-ui/workflow/editor-app/configuration/properties/in-parameters-write-template.html @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/hsweb-ui/workflow/editor-app/configuration/properties/message-definitions-display-template.html b/hsweb-ui/workflow/editor-app/configuration/properties/message-definitions-display-template.html new file mode 100644 index 0000000..2f3b2a1 --- /dev/null +++ b/hsweb-ui/workflow/editor-app/configuration/properties/message-definitions-display-template.html @@ -0,0 +1,2 @@ +{{'PROPERTY.MESSAGEDEFINITIONS.DISPLAY' | translate:property.value}} +PROPERTY.MESSAGEDEFINITIONS.EMPTY \ No newline at end of file diff --git a/hsweb-ui/workflow/editor-app/configuration/properties/message-definitions-popup.html b/hsweb-ui/workflow/editor-app/configuration/properties/message-definitions-popup.html new file mode 100644 index 0000000..700f4d9 --- /dev/null +++ b/hsweb-ui/workflow/editor-app/configuration/properties/message-definitions-popup.html @@ -0,0 +1,50 @@ + + \ No newline at end of file diff --git a/hsweb-ui/workflow/editor-app/configuration/properties/message-definitions-write-template.html b/hsweb-ui/workflow/editor-app/configuration/properties/message-definitions-write-template.html new file mode 100644 index 0000000..75a630f --- /dev/null +++ b/hsweb-ui/workflow/editor-app/configuration/properties/message-definitions-write-template.html @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/hsweb-ui/workflow/editor-app/configuration/properties/message-property-write-template.html b/hsweb-ui/workflow/editor-app/configuration/properties/message-property-write-template.html new file mode 100644 index 0000000..03dc9e4 --- /dev/null +++ b/hsweb-ui/workflow/editor-app/configuration/properties/message-property-write-template.html @@ -0,0 +1,4 @@ +
      + +
      \ No newline at end of file diff --git a/hsweb-ui/workflow/editor-app/configuration/properties/multiinstance-property-write-template.html b/hsweb-ui/workflow/editor-app/configuration/properties/multiinstance-property-write-template.html new file mode 100644 index 0000000..a76fe5c --- /dev/null +++ b/hsweb-ui/workflow/editor-app/configuration/properties/multiinstance-property-write-template.html @@ -0,0 +1,8 @@ + +
      + +
      \ No newline at end of file diff --git a/hsweb-ui/workflow/editor-app/configuration/properties/out-parameters-display-template.html b/hsweb-ui/workflow/editor-app/configuration/properties/out-parameters-display-template.html new file mode 100644 index 0000000..859b2e4 --- /dev/null +++ b/hsweb-ui/workflow/editor-app/configuration/properties/out-parameters-display-template.html @@ -0,0 +1,3 @@ + +{{'PROPERTY.OUTPARAMETERS.VALUE' | translate:property.value.outParameters}} +PROPERTY.OUTPARAMETERS.EMPTY \ No newline at end of file diff --git a/hsweb-ui/workflow/editor-app/configuration/properties/out-parameters-popup.html b/hsweb-ui/workflow/editor-app/configuration/properties/out-parameters-popup.html new file mode 100644 index 0000000..72b3656 --- /dev/null +++ b/hsweb-ui/workflow/editor-app/configuration/properties/out-parameters-popup.html @@ -0,0 +1,53 @@ + + diff --git a/hsweb-ui/workflow/editor-app/configuration/properties/out-parameters-write-template.html b/hsweb-ui/workflow/editor-app/configuration/properties/out-parameters-write-template.html new file mode 100644 index 0000000..4075594 --- /dev/null +++ b/hsweb-ui/workflow/editor-app/configuration/properties/out-parameters-write-template.html @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/hsweb-ui/workflow/editor-app/configuration/properties/sequenceflow-order-display-template.html b/hsweb-ui/workflow/editor-app/configuration/properties/sequenceflow-order-display-template.html new file mode 100644 index 0000000..90f50e9 --- /dev/null +++ b/hsweb-ui/workflow/editor-app/configuration/properties/sequenceflow-order-display-template.html @@ -0,0 +1,3 @@ + +PROPERTY.SEQUENCEFLOW.ORDER.NOT.EMPTY +PROPERTY.SEQUENCEFLOW.ORDER.EMPTY \ No newline at end of file diff --git a/hsweb-ui/workflow/editor-app/configuration/properties/sequenceflow-order-popup.html b/hsweb-ui/workflow/editor-app/configuration/properties/sequenceflow-order-popup.html new file mode 100644 index 0000000..30d3d77 --- /dev/null +++ b/hsweb-ui/workflow/editor-app/configuration/properties/sequenceflow-order-popup.html @@ -0,0 +1,47 @@ + + diff --git a/hsweb-ui/workflow/editor-app/configuration/properties/sequenceflow-order-write-template.html b/hsweb-ui/workflow/editor-app/configuration/properties/sequenceflow-order-write-template.html new file mode 100644 index 0000000..2e2ca3a --- /dev/null +++ b/hsweb-ui/workflow/editor-app/configuration/properties/sequenceflow-order-write-template.html @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/hsweb-ui/workflow/editor-app/configuration/properties/signal-definitions-display-template.html b/hsweb-ui/workflow/editor-app/configuration/properties/signal-definitions-display-template.html new file mode 100644 index 0000000..7fa105b --- /dev/null +++ b/hsweb-ui/workflow/editor-app/configuration/properties/signal-definitions-display-template.html @@ -0,0 +1,3 @@ + +{{'PROPERTY.SIGNALDEFINITIONS.DISPLAY' | translate:property.value}} +PROPERTY.SIGNALDEFINITIONS.EMPTY \ No newline at end of file diff --git a/hsweb-ui/workflow/editor-app/configuration/properties/signal-definitions-popup.html b/hsweb-ui/workflow/editor-app/configuration/properties/signal-definitions-popup.html new file mode 100644 index 0000000..4ca3283 --- /dev/null +++ b/hsweb-ui/workflow/editor-app/configuration/properties/signal-definitions-popup.html @@ -0,0 +1,58 @@ + + \ No newline at end of file diff --git a/hsweb-ui/workflow/editor-app/configuration/properties/signal-definitions-write-template.html b/hsweb-ui/workflow/editor-app/configuration/properties/signal-definitions-write-template.html new file mode 100644 index 0000000..2282b4c --- /dev/null +++ b/hsweb-ui/workflow/editor-app/configuration/properties/signal-definitions-write-template.html @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/hsweb-ui/workflow/editor-app/configuration/properties/signal-property-write-template.html b/hsweb-ui/workflow/editor-app/configuration/properties/signal-property-write-template.html new file mode 100644 index 0000000..7505d81 --- /dev/null +++ b/hsweb-ui/workflow/editor-app/configuration/properties/signal-property-write-template.html @@ -0,0 +1,4 @@ +
      + +
      \ No newline at end of file diff --git a/hsweb-ui/workflow/editor-app/configuration/properties/string-property-write-mode-template.html b/hsweb-ui/workflow/editor-app/configuration/properties/string-property-write-mode-template.html new file mode 100644 index 0000000..4fd2d73 --- /dev/null +++ b/hsweb-ui/workflow/editor-app/configuration/properties/string-property-write-mode-template.html @@ -0,0 +1,8 @@ + +
      + +
      \ No newline at end of file diff --git a/hsweb-ui/workflow/editor-app/configuration/properties/subprocess-reference-display-template.html b/hsweb-ui/workflow/editor-app/configuration/properties/subprocess-reference-display-template.html new file mode 100644 index 0000000..9889ea9 --- /dev/null +++ b/hsweb-ui/workflow/editor-app/configuration/properties/subprocess-reference-display-template.html @@ -0,0 +1,3 @@ + +{{property.value.name}} +PROPERTY.SUBPROCESSREFERENCE.EMPTY diff --git a/hsweb-ui/workflow/editor-app/configuration/properties/subprocess-reference-popup.html b/hsweb-ui/workflow/editor-app/configuration/properties/subprocess-reference-popup.html new file mode 100644 index 0000000..818eb1a --- /dev/null +++ b/hsweb-ui/workflow/editor-app/configuration/properties/subprocess-reference-popup.html @@ -0,0 +1,43 @@ + + diff --git a/hsweb-ui/workflow/editor-app/configuration/properties/subprocess-reference-write-template.html b/hsweb-ui/workflow/editor-app/configuration/properties/subprocess-reference-write-template.html new file mode 100644 index 0000000..e9ad8ad --- /dev/null +++ b/hsweb-ui/workflow/editor-app/configuration/properties/subprocess-reference-write-template.html @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/hsweb-ui/workflow/editor-app/configuration/properties/task-listeners-display-template.html b/hsweb-ui/workflow/editor-app/configuration/properties/task-listeners-display-template.html new file mode 100644 index 0000000..4d07171 --- /dev/null +++ b/hsweb-ui/workflow/editor-app/configuration/properties/task-listeners-display-template.html @@ -0,0 +1,3 @@ + +{{'PROPERTY.TASKLISTENERS.VALUE' | translate:property.value.taskListeners}} +PROPERTY.TASKLISTENERS.EMPTY \ No newline at end of file diff --git a/hsweb-ui/workflow/editor-app/configuration/properties/task-listeners-popup.html b/hsweb-ui/workflow/editor-app/configuration/properties/task-listeners-popup.html new file mode 100644 index 0000000..7d83e57 --- /dev/null +++ b/hsweb-ui/workflow/editor-app/configuration/properties/task-listeners-popup.html @@ -0,0 +1,102 @@ + + diff --git a/hsweb-ui/workflow/editor-app/configuration/properties/task-listeners-write-template.html b/hsweb-ui/workflow/editor-app/configuration/properties/task-listeners-write-template.html new file mode 100644 index 0000000..8c4d993 --- /dev/null +++ b/hsweb-ui/workflow/editor-app/configuration/properties/task-listeners-write-template.html @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/hsweb-ui/workflow/editor-app/configuration/properties/text-popup.html b/hsweb-ui/workflow/editor-app/configuration/properties/text-popup.html new file mode 100644 index 0000000..d7c67af --- /dev/null +++ b/hsweb-ui/workflow/editor-app/configuration/properties/text-popup.html @@ -0,0 +1,17 @@ + +